@quicktvui/ai 1.0.6 → 1.0.8

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.
Files changed (1288) hide show
  1. package/package.json +1 -1
  2. package/rules/.clinerules +28 -4
  3. package/rules/.cursorrules +28 -4
  4. package/rules/.github/copilot-instructions.md +28 -4
  5. package/rules/.source/ESADPlayer/package.json +24 -0
  6. package/rules/.source/ESADPlayer/rollup.config.js +33 -0
  7. package/rules/.source/ESADPlayer/src/component/ESADPlayerViewComponent.ts +466 -0
  8. package/rules/.source/ESADPlayer/src/core/ESADType.ts +6 -0
  9. package/rules/.source/ESADPlayer/src/index.ts +18 -0
  10. package/rules/.source/ESADPlayer/src/index.vue +963 -0
  11. package/rules/.source/ESADPlayer/src/typings/shims-vue.d.ts +6 -0
  12. package/rules/.source/ESADPlayer/tsconfig.json +34 -0
  13. package/rules/.source/ESAudioPlayer/package.json +23 -0
  14. package/rules/.source/ESAudioPlayer/rollup.config.js +33 -0
  15. package/rules/.source/ESAudioPlayer/src/index.ts +10 -0
  16. package/rules/.source/ESAudioPlayer/src/index.vue +1441 -0
  17. package/rules/.source/ESAudioPlayer/src/module/ESAudioPlayer.ts +169 -0
  18. package/rules/.source/ESAudioPlayer/src/module/ESAudioPlayerModule.android.ts +134 -0
  19. package/rules/.source/ESAudioPlayer/src/module/ESAudioPlayerModule.harmony.ts +139 -0
  20. package/rules/.source/ESAudioPlayer/src/module/ESAudioPlayerModule.ts +44 -0
  21. package/rules/.source/ESAudioPlayer/src/typings/shims-vue.d.ts +6 -0
  22. package/rules/.source/ESAudioPlayer/src/utils/ESAudioPlayerDefinitionUtils.ts +36 -0
  23. package/rules/.source/ESAudioPlayer/tsconfig.json +34 -0
  24. package/rules/.source/ESAudioServicePlayer/package.json +23 -0
  25. package/rules/.source/ESAudioServicePlayer/rollup.config.js +33 -0
  26. package/rules/.source/ESAudioServicePlayer/src/index.ts +10 -0
  27. package/rules/.source/ESAudioServicePlayer/src/index.vue +1400 -0
  28. package/rules/.source/ESAudioServicePlayer/src/module/ESAudioServicePlayer.ts +189 -0
  29. package/rules/.source/ESAudioServicePlayer/src/module/ESAudioServicePlayerModule.android.ts +155 -0
  30. package/rules/.source/ESAudioServicePlayer/src/module/ESAudioServicePlayerModule.harmony.ts +163 -0
  31. package/rules/.source/ESAudioServicePlayer/src/module/ESAudioServicePlayerModule.ts +50 -0
  32. package/rules/.source/ESAudioServicePlayer/src/typings/shims-vue.d.ts +6 -0
  33. package/rules/.source/ESAudioServicePlayer/src/utils/ESAudioServicePlayerDefinitionUtils.ts +36 -0
  34. package/rules/.source/ESAudioServicePlayer/tsconfig.json +34 -0
  35. package/rules/.source/ESAxios/CHANGELOG.md +1072 -0
  36. package/rules/.source/ESAxios/LICENSE +7 -0
  37. package/rules/.source/ESAxios/MIGRATION_GUIDE.md +3 -0
  38. package/rules/.source/ESAxios/README.md +1673 -0
  39. package/rules/.source/ESAxios/index.d.cts +549 -0
  40. package/rules/.source/ESAxios/index.d.ts +766 -0
  41. package/rules/.source/ESAxios/index.js +43 -0
  42. package/rules/.source/ESAxios/lib/adapters/README.md +37 -0
  43. package/rules/.source/ESAxios/lib/adapters/adapters.js +80 -0
  44. package/rules/.source/ESAxios/lib/adapters/fetch.js +295 -0
  45. package/rules/.source/ESAxios/lib/axios.js +90 -0
  46. package/rules/.source/ESAxios/lib/cancel/CancelToken.js +135 -0
  47. package/rules/.source/ESAxios/lib/cancel/CanceledError.js +31 -0
  48. package/rules/.source/ESAxios/lib/cancel/isCancel.js +5 -0
  49. package/rules/.source/ESAxios/lib/core/Axios.js +292 -0
  50. package/rules/.source/ESAxios/lib/core/AxiosError.js +108 -0
  51. package/rules/.source/ESAxios/lib/core/AxiosHeaders.js +340 -0
  52. package/rules/.source/ESAxios/lib/core/InterceptorManager.js +71 -0
  53. package/rules/.source/ESAxios/lib/core/README.md +8 -0
  54. package/rules/.source/ESAxios/lib/core/buildFullPath.js +26 -0
  55. package/rules/.source/ESAxios/lib/core/dispatchRequest.js +81 -0
  56. package/rules/.source/ESAxios/lib/core/mergeConfig.js +112 -0
  57. package/rules/.source/ESAxios/lib/core/settle.js +31 -0
  58. package/rules/.source/ESAxios/lib/core/transformData.js +33 -0
  59. package/rules/.source/ESAxios/lib/defaults/index.js +182 -0
  60. package/rules/.source/ESAxios/lib/defaults/transitional.js +7 -0
  61. package/rules/.source/ESAxios/lib/env/README.md +3 -0
  62. package/rules/.source/ESAxios/lib/env/classes/FormData.js +2 -0
  63. package/rules/.source/ESAxios/lib/env/data.js +1 -0
  64. package/rules/.source/ESAxios/lib/helpers/AxiosTransformStream.js +160 -0
  65. package/rules/.source/ESAxios/lib/helpers/AxiosURLSearchParams.js +65 -0
  66. package/rules/.source/ESAxios/lib/helpers/HttpStatusCode.js +71 -0
  67. package/rules/.source/ESAxios/lib/helpers/README.md +7 -0
  68. package/rules/.source/ESAxios/lib/helpers/ZlibHeaderTransformStream.js +29 -0
  69. package/rules/.source/ESAxios/lib/helpers/bind.js +7 -0
  70. package/rules/.source/ESAxios/lib/helpers/buildURL.js +69 -0
  71. package/rules/.source/ESAxios/lib/helpers/callbackify.js +18 -0
  72. package/rules/.source/ESAxios/lib/helpers/combineURLs.js +15 -0
  73. package/rules/.source/ESAxios/lib/helpers/composeSignals.js +61 -0
  74. package/rules/.source/ESAxios/lib/helpers/cookies.js +40 -0
  75. package/rules/.source/ESAxios/lib/helpers/deprecatedMethod.js +31 -0
  76. package/rules/.source/ESAxios/lib/helpers/formDataToJSON.js +95 -0
  77. package/rules/.source/ESAxios/lib/helpers/formDataToStream.js +122 -0
  78. package/rules/.source/ESAxios/lib/helpers/fromDataURI.js +62 -0
  79. package/rules/.source/ESAxios/lib/helpers/isAbsoluteURL.js +15 -0
  80. package/rules/.source/ESAxios/lib/helpers/isAxiosError.js +14 -0
  81. package/rules/.source/ESAxios/lib/helpers/isURLSameOrigin.js +17 -0
  82. package/rules/.source/ESAxios/lib/helpers/null.js +2 -0
  83. package/rules/.source/ESAxios/lib/helpers/parseHeaders.js +69 -0
  84. package/rules/.source/ESAxios/lib/helpers/parseProtocol.js +6 -0
  85. package/rules/.source/ESAxios/lib/helpers/progressEventReducer.js +51 -0
  86. package/rules/.source/ESAxios/lib/helpers/readBlob.js +15 -0
  87. package/rules/.source/ESAxios/lib/helpers/resolveConfig.js +83 -0
  88. package/rules/.source/ESAxios/lib/helpers/speedometer.js +55 -0
  89. package/rules/.source/ESAxios/lib/helpers/spread.js +28 -0
  90. package/rules/.source/ESAxios/lib/helpers/throttle.js +44 -0
  91. package/rules/.source/ESAxios/lib/helpers/toFormData.js +241 -0
  92. package/rules/.source/ESAxios/lib/helpers/toURLEncodedForm.js +25 -0
  93. package/rules/.source/ESAxios/lib/helpers/trackStream.js +89 -0
  94. package/rules/.source/ESAxios/lib/helpers/validator.js +120 -0
  95. package/rules/.source/ESAxios/lib/platform/browser/classes/Blob.js +3 -0
  96. package/rules/.source/ESAxios/lib/platform/browser/classes/FormData.js +3 -0
  97. package/rules/.source/ESAxios/lib/platform/browser/classes/URLSearchParams.js +6 -0
  98. package/rules/.source/ESAxios/lib/platform/browser/index.js +13 -0
  99. package/rules/.source/ESAxios/lib/platform/common/classes/FormData.js +142 -0
  100. package/rules/.source/ESAxios/lib/platform/common/index.js +7 -0
  101. package/rules/.source/ESAxios/lib/platform/common/utils.js +54 -0
  102. package/rules/.source/ESAxios/lib/platform/index.js +7 -0
  103. package/rules/.source/ESAxios/lib/platform/node/classes/FormData.js +3 -0
  104. package/rules/.source/ESAxios/lib/platform/node/classes/URLSearchParams.js +4 -0
  105. package/rules/.source/ESAxios/lib/platform/node/index.js +12 -0
  106. package/rules/.source/ESAxios/lib/utils.js +820 -0
  107. package/rules/.source/ESCore/CHANGELOG.md +7 -0
  108. package/rules/.source/ESCore/package.json +24 -0
  109. package/rules/.source/ESCore/rollup.config.js +28 -0
  110. package/rules/.source/ESCore/src/actionbar/ESActionBar.ts +48 -0
  111. package/rules/.source/ESCore/src/actionbar/ESActionBarModule.android.ts +29 -0
  112. package/rules/.source/ESCore/src/actionbar/ESActionBarModule.harmony.ts +31 -0
  113. package/rules/.source/ESCore/src/actionbar/ESActionBarModule.ts +9 -0
  114. package/rules/.source/ESCore/src/actionbar/index.ts +2 -0
  115. package/rules/.source/ESCore/src/app/ESAppInfo.ts +12 -0
  116. package/rules/.source/ESCore/src/app/ESAppInfoList.ts +9 -0
  117. package/rules/.source/ESCore/src/app/ESAppList.ts +64 -0
  118. package/rules/.source/ESCore/src/app/ESAppListModule.android.ts +55 -0
  119. package/rules/.source/ESCore/src/app/ESAppListModule.harmony.ts +57 -0
  120. package/rules/.source/ESCore/src/app/ESAppListModule.ts +15 -0
  121. package/rules/.source/ESCore/src/app/index.ts +4 -0
  122. package/rules/.source/ESCore/src/application/ESAppContext.ts +99 -0
  123. package/rules/.source/ESCore/src/application/ESAppKeyManager.android.ts +86 -0
  124. package/rules/.source/ESCore/src/application/ESAppKeyManager.harmony.ts +91 -0
  125. package/rules/.source/ESCore/src/application/ESAppKeyManager.ts +23 -0
  126. package/rules/.source/ESCore/src/application/ESAppLifecycleManager.android.ts +199 -0
  127. package/rules/.source/ESCore/src/application/ESAppLifecycleManager.harmony.ts +197 -0
  128. package/rules/.source/ESCore/src/application/ESAppLifecycleManager.ts +36 -0
  129. package/rules/.source/ESCore/src/application/ESAppModuleManager.ts +294 -0
  130. package/rules/.source/ESCore/src/application/ESAppParams.ts +14 -0
  131. package/rules/.source/ESCore/src/application/ESApplication.ts +169 -0
  132. package/rules/.source/ESCore/src/application/index.ts +38 -0
  133. package/rules/.source/ESCore/src/audio/ESAudio.ts +190 -0
  134. package/rules/.source/ESCore/src/audio/ESAudioContentType.ts +7 -0
  135. package/rules/.source/ESCore/src/audio/ESAudioDirection.ts +5 -0
  136. package/rules/.source/ESCore/src/audio/ESAudioDurationHint.ts +7 -0
  137. package/rules/.source/ESCore/src/audio/ESAudioManagerFlag.ts +14 -0
  138. package/rules/.source/ESCore/src/audio/ESAudioModule.android.ts +173 -0
  139. package/rules/.source/ESCore/src/audio/ESAudioModule.harmony.ts +152 -0
  140. package/rules/.source/ESCore/src/audio/ESAudioModule.ts +63 -0
  141. package/rules/.source/ESCore/src/audio/ESAudioStreamType.ts +15 -0
  142. package/rules/.source/ESCore/src/audio/ESAudioUsage.ts +20 -0
  143. package/rules/.source/ESCore/src/audio/index.ts +9 -0
  144. package/rules/.source/ESCore/src/brightness/ESBrightness.ts +69 -0
  145. package/rules/.source/ESCore/src/brightness/ESBrightnessModule.android.ts +73 -0
  146. package/rules/.source/ESCore/src/brightness/ESBrightnessModule.harmony.ts +59 -0
  147. package/rules/.source/ESCore/src/brightness/ESBrightnessModule.ts +15 -0
  148. package/rules/.source/ESCore/src/brightness/index.ts +2 -0
  149. package/rules/.source/ESCore/src/broadcast/ESBroadcast.ts +107 -0
  150. package/rules/.source/ESCore/src/broadcast/ESBroadcastModule.android.ts +42 -0
  151. package/rules/.source/ESCore/src/broadcast/ESBroadcastModule.harmony.ts +45 -0
  152. package/rules/.source/ESCore/src/broadcast/ESBroadcastModule.ts +10 -0
  153. package/rules/.source/ESCore/src/broadcast/ESBroadcastReceiver.ts +5 -0
  154. package/rules/.source/ESCore/src/broadcast/ESIntent.ts +6 -0
  155. package/rules/.source/ESCore/src/broadcast/ESIntentDataAuthority.ts +4 -0
  156. package/rules/.source/ESCore/src/broadcast/ESIntentDataPath.ts +4 -0
  157. package/rules/.source/ESCore/src/broadcast/ESIntentDataSchemeSpecificPart.ts +4 -0
  158. package/rules/.source/ESCore/src/broadcast/ESIntentFilter.ts +13 -0
  159. package/rules/.source/ESCore/src/broadcast/index.ts +8 -0
  160. package/rules/.source/ESCore/src/core/IESComponent.ts +1 -0
  161. package/rules/.source/ESCore/src/core/IESManager.ts +7 -0
  162. package/rules/.source/ESCore/src/core/IESModule.ts +13 -0
  163. package/rules/.source/ESCore/src/core/NeedToTyped.ts +1 -0
  164. package/rules/.source/ESCore/src/core/index.ts +4 -0
  165. package/rules/.source/ESCore/src/database/ESDatabase.ts +63 -0
  166. package/rules/.source/ESCore/src/database/ESDatabaseModule.android.ts +49 -0
  167. package/rules/.source/ESCore/src/database/ESDatabaseModule.harmony.ts +46 -0
  168. package/rules/.source/ESCore/src/database/ESDatabaseModule.ts +23 -0
  169. package/rules/.source/ESCore/src/database/index.ts +2 -0
  170. package/rules/.source/ESCore/src/develop/ESDevelop.ts +75 -0
  171. package/rules/.source/ESCore/src/develop/ESDevelopInfo.ts +9 -0
  172. package/rules/.source/ESCore/src/develop/ESDevelopModule.android.ts +50 -0
  173. package/rules/.source/ESCore/src/develop/ESDevelopModule.harmony.ts +52 -0
  174. package/rules/.source/ESCore/src/develop/ESDevelopModule.ts +14 -0
  175. package/rules/.source/ESCore/src/develop/index.ts +3 -0
  176. package/rules/.source/ESCore/src/device/ESDevice.ts +289 -0
  177. package/rules/.source/ESCore/src/device/ESDeviceInfo.ts +51 -0
  178. package/rules/.source/ESCore/src/device/ESDeviceModule.android.ts +143 -0
  179. package/rules/.source/ESCore/src/device/ESDeviceModule.harmony.ts +116 -0
  180. package/rules/.source/ESCore/src/device/ESDeviceModule.ts +42 -0
  181. package/rules/.source/ESCore/src/device/index.ts +3 -0
  182. package/rules/.source/ESCore/src/display/ESDisplay.ts +61 -0
  183. package/rules/.source/ESCore/src/display/index.ts +2 -0
  184. package/rules/.source/ESCore/src/download/ESDownload.ts +181 -0
  185. package/rules/.source/ESCore/src/download/ESDownloadInfo.ts +14 -0
  186. package/rules/.source/ESCore/src/download/ESDownloadListener.ts +21 -0
  187. package/rules/.source/ESCore/src/download/ESDownloadModule.android.ts +57 -0
  188. package/rules/.source/ESCore/src/download/ESDownloadModule.harmony.ts +66 -0
  189. package/rules/.source/ESCore/src/download/ESDownloadModule.ts +21 -0
  190. package/rules/.source/ESCore/src/download/ESDownloadParams.ts +4 -0
  191. package/rules/.source/ESCore/src/download/ESDownloadState.ts +9 -0
  192. package/rules/.source/ESCore/src/download/ESDownloadStatus.ts +11 -0
  193. package/rules/.source/ESCore/src/download/index.ts +7 -0
  194. package/rules/.source/ESCore/src/error/ESError.ts +88 -0
  195. package/rules/.source/ESCore/src/error/ESErrorListener.ts +9 -0
  196. package/rules/.source/ESCore/src/error/ErrorOptions.ts +16 -0
  197. package/rules/.source/ESCore/src/error/index.ts +2 -0
  198. package/rules/.source/ESCore/src/es/ES.ts +140 -0
  199. package/rules/.source/ESCore/src/es/ESModule.android.ts +166 -0
  200. package/rules/.source/ESCore/src/es/ESModule.harmony.ts +167 -0
  201. package/rules/.source/ESCore/src/es/ESModule.ts +41 -0
  202. package/rules/.source/ESCore/src/es/ESSDKInfo.ts +17 -0
  203. package/rules/.source/ESCore/src/es/ESVersion.ts +14 -0
  204. package/rules/.source/ESCore/src/es/index.ts +4 -0
  205. package/rules/.source/ESCore/src/eventbus/ESEventBus.ts +135 -0
  206. package/rules/.source/ESCore/src/eventbus/ESEventBusArg.ts +2 -0
  207. package/rules/.source/ESCore/src/eventbus/ESEventBusCallback.ts +4 -0
  208. package/rules/.source/ESCore/src/eventbus/ESEventBusContext.ts +2 -0
  209. package/rules/.source/ESCore/src/eventbus/ESEventBusEvent.ts +7 -0
  210. package/rules/.source/ESCore/src/eventbus/index.ts +6 -0
  211. package/rules/.source/ESCore/src/file/ESFile.ts +381 -0
  212. package/rules/.source/ESCore/src/file/ESFileModule.android.ts +334 -0
  213. package/rules/.source/ESCore/src/file/ESFileModule.harmony.ts +343 -0
  214. package/rules/.source/ESCore/src/file/ESFileModule.ts +101 -0
  215. package/rules/.source/ESCore/src/file/ESFileStat.ts +19 -0
  216. package/rules/.source/ESCore/src/file/index.ts +1 -0
  217. package/rules/.source/ESCore/src/focus/ESFocus.ts +56 -0
  218. package/rules/.source/ESCore/src/focus/ESFocusModule.android.ts +35 -0
  219. package/rules/.source/ESCore/src/focus/ESFocusModule.harmony.ts +35 -0
  220. package/rules/.source/ESCore/src/focus/ESFocusModule.ts +12 -0
  221. package/rules/.source/ESCore/src/focus/ESFocusable.ts +1 -0
  222. package/rules/.source/ESCore/src/focus/index.ts +3 -0
  223. package/rules/.source/ESCore/src/global.d.ts +37 -0
  224. package/rules/.source/ESCore/src/hlog/ESHLog.ts +276 -0
  225. package/rules/.source/ESCore/src/hlog/ESHLogModule.ts +130 -0
  226. package/rules/.source/ESCore/src/hlog/ESLogListener.ts +959 -0
  227. package/rules/.source/ESCore/src/hlog/LogPluginHelper.ts +44 -0
  228. package/rules/.source/ESCore/src/hlog/index.ts +6 -0
  229. package/rules/.source/ESCore/src/hlog/listener/OnInitListenerBase.ts +24 -0
  230. package/rules/.source/ESCore/src/hlog/listener/OnUploadListenerBase.ts +39 -0
  231. package/rules/.source/ESCore/src/hlog/listener/RemoveInitListenerBase.ts +17 -0
  232. package/rules/.source/ESCore/src/hlog/listener/RemoveOldUploadListenerBase.ts +21 -0
  233. package/rules/.source/ESCore/src/hlog/listener/RemoveUploadListenerBase.ts +29 -0
  234. package/rules/.source/ESCore/src/hlog/listener/SetInitListenerBase.ts +25 -0
  235. package/rules/.source/ESCore/src/hlog/listener/SetOldUploadListenerBase.ts +33 -0
  236. package/rules/.source/ESCore/src/hlog/listener/SetUploadListenerBase.ts +47 -0
  237. package/rules/.source/ESCore/src/iac/ESIAC.ts +150 -0
  238. package/rules/.source/ESCore/src/iac/ESIACMessage.ts +5 -0
  239. package/rules/.source/ESCore/src/iac/ESIACMessageFilter.ts +3 -0
  240. package/rules/.source/ESCore/src/iac/ESIACModule.android.ts +40 -0
  241. package/rules/.source/ESCore/src/iac/ESIACModule.harmony.ts +63 -0
  242. package/rules/.source/ESCore/src/iac/ESIACModule.ts +15 -0
  243. package/rules/.source/ESCore/src/iac/ESIACReceiver.ts +5 -0
  244. package/rules/.source/ESCore/src/iac/index.ts +5 -0
  245. package/rules/.source/ESCore/src/index.ts +92 -0
  246. package/rules/.source/ESCore/src/key/ESKeyAction.ts +5 -0
  247. package/rules/.source/ESCore/src/key/ESKeyCode.ts +15 -0
  248. package/rules/.source/ESCore/src/key/ESKeyEvent.ts +8 -0
  249. package/rules/.source/ESCore/src/key/index.ts +3 -0
  250. package/rules/.source/ESCore/src/kv/ESKV.ts +104 -0
  251. package/rules/.source/ESCore/src/kv/ESKVModule.android.ts +60 -0
  252. package/rules/.source/ESCore/src/kv/ESKVModule.harmony.ts +80 -0
  253. package/rules/.source/ESCore/src/kv/ESKVModule.ts +28 -0
  254. package/rules/.source/ESCore/src/kv/index.ts +2 -0
  255. package/rules/.source/ESCore/src/local/ESLocalStorage.ts +114 -0
  256. package/rules/.source/ESCore/src/local/ESLocalStorageModule.android.ts +150 -0
  257. package/rules/.source/ESCore/src/local/ESLocalStorageModule.harmony.ts +119 -0
  258. package/rules/.source/ESCore/src/local/ESLocalStorageModule.ts +23 -0
  259. package/rules/.source/ESCore/src/local/index.ts +2 -0
  260. package/rules/.source/ESCore/src/location/ESLocation.ts +89 -0
  261. package/rules/.source/ESCore/src/location/ESLocationInfo.ts +9 -0
  262. package/rules/.source/ESCore/src/location/ESLocationListener.ts +5 -0
  263. package/rules/.source/ESCore/src/location/ESLocationModule.android.ts +53 -0
  264. package/rules/.source/ESCore/src/location/ESLocationModule.harmony.ts +23 -0
  265. package/rules/.source/ESCore/src/location/ESLocationModule.ts +8 -0
  266. package/rules/.source/ESCore/src/location/index.ts +4 -0
  267. package/rules/.source/ESCore/src/log/ESLog.ts +163 -0
  268. package/rules/.source/ESCore/src/log/ESLogModule.android.ts +51 -0
  269. package/rules/.source/ESCore/src/log/ESLogModule.harmony.ts +52 -0
  270. package/rules/.source/ESCore/src/log/ESLogModule.ts +18 -0
  271. package/rules/.source/ESCore/src/log/index.ts +3 -0
  272. package/rules/.source/ESCore/src/network/ESNetwork.ts +102 -0
  273. package/rules/.source/ESCore/src/network/ESNetworkInfo.ts +20 -0
  274. package/rules/.source/ESCore/src/network/ESNetworkInfoState.ts +8 -0
  275. package/rules/.source/ESCore/src/network/ESNetworkInfoType.ts +6 -0
  276. package/rules/.source/ESCore/src/network/ESNetworkListener.ts +5 -0
  277. package/rules/.source/ESCore/src/network/ESNetworkModule.android.ts +38 -0
  278. package/rules/.source/ESCore/src/network/ESNetworkModule.harmony.ts +122 -0
  279. package/rules/.source/ESCore/src/network/ESNetworkModule.ts +13 -0
  280. package/rules/.source/ESCore/src/network/ESWifiInfo.ts +6 -0
  281. package/rules/.source/ESCore/src/network/index.ts +9 -0
  282. package/rules/.source/ESCore/src/page/ESPageParams.ts +14 -0
  283. package/rules/.source/ESCore/src/page/index.ts +1 -0
  284. package/rules/.source/ESCore/src/permission/ESPermission.ts +46 -0
  285. package/rules/.source/ESCore/src/permission/ESPermissionModule.android.ts +33 -0
  286. package/rules/.source/ESCore/src/permission/ESPermissionModule.harmony.ts +33 -0
  287. package/rules/.source/ESCore/src/permission/ESPermissionModule.ts +12 -0
  288. package/rules/.source/ESCore/src/permission/ESRequestPermissionsResult.ts +6 -0
  289. package/rules/.source/ESCore/src/permission/index.ts +3 -0
  290. package/rules/.source/ESCore/src/platform/ESPlatform.ts +63 -0
  291. package/rules/.source/ESCore/src/platform/index.ts +1 -0
  292. package/rules/.source/ESCore/src/plugin/ESPlugin.ts +152 -0
  293. package/rules/.source/ESCore/src/plugin/ESPluginModule.android.ts +20 -0
  294. package/rules/.source/ESCore/src/plugin/ESPluginModule.harmony.ts +24 -0
  295. package/rules/.source/ESCore/src/plugin/ESPluginModule.ts +9 -0
  296. package/rules/.source/ESCore/src/plugin/index.ts +3 -0
  297. package/rules/.source/ESCore/src/power/ESPower.ts +41 -0
  298. package/rules/.source/ESCore/src/power/ESPowerModule.android.ts +31 -0
  299. package/rules/.source/ESCore/src/power/ESPowerModule.harmony.ts +33 -0
  300. package/rules/.source/ESCore/src/power/ESPowerModule.ts +7 -0
  301. package/rules/.source/ESCore/src/power/index.ts +2 -0
  302. package/rules/.source/ESCore/src/provider/ESContentProvider.ts +82 -0
  303. package/rules/.source/ESCore/src/provider/ESContentProviderInfo.ts +8 -0
  304. package/rules/.source/ESCore/src/provider/ESContentProviderModule.android.ts +62 -0
  305. package/rules/.source/ESCore/src/provider/ESContentProviderModule.harmony.ts +62 -0
  306. package/rules/.source/ESCore/src/provider/ESContentProviderModule.ts +29 -0
  307. package/rules/.source/ESCore/src/provider/ESContentProviderResult.ts +4 -0
  308. package/rules/.source/ESCore/src/provider/ESContentValues.ts +3 -0
  309. package/rules/.source/ESCore/src/provider/index.ts +5 -0
  310. package/rules/.source/ESCore/src/router/ESData.ts +3 -0
  311. package/rules/.source/ESCore/src/router/ESParams.ts +3 -0
  312. package/rules/.source/ESCore/src/router/ESRouter.ts +364 -0
  313. package/rules/.source/ESCore/src/router/ESRouterKeyManager.android.ts +107 -0
  314. package/rules/.source/ESCore/src/router/ESRouterKeyManager.harmony.ts +205 -0
  315. package/rules/.source/ESCore/src/router/ESRouterKeyManager.ts +11 -0
  316. package/rules/.source/ESCore/src/router/ESRouterLifecycleManager.ts +301 -0
  317. package/rules/.source/ESCore/src/router/ESRouterManager.ts +221 -0
  318. package/rules/.source/ESCore/src/router/index.ts +9 -0
  319. package/rules/.source/ESCore/src/runtime/ESRuntime.ts +164 -0
  320. package/rules/.source/ESCore/src/runtime/ESRuntimeDeviceModule.android.ts +76 -0
  321. package/rules/.source/ESCore/src/runtime/ESRuntimeDeviceModule.harmony.ts +39 -0
  322. package/rules/.source/ESCore/src/runtime/ESRuntimeDeviceModule.ts +14 -0
  323. package/rules/.source/ESCore/src/runtime/ESRuntimeDeviceType.ts +53 -0
  324. package/rules/.source/ESCore/src/runtime/index.ts +4 -0
  325. package/rules/.source/ESCore/src/service/ESService.ts +34 -0
  326. package/rules/.source/ESCore/src/service/ESServiceModule.android.ts +20 -0
  327. package/rules/.source/ESCore/src/service/ESServiceModule.harmony.ts +19 -0
  328. package/rules/.source/ESCore/src/service/ESServiceModule.ts +5 -0
  329. package/rules/.source/ESCore/src/service/index.ts +2 -0
  330. package/rules/.source/ESCore/src/share/ESShareData.ts +177 -0
  331. package/rules/.source/ESCore/src/share/ESShareDataModule.android.ts +370 -0
  332. package/rules/.source/ESCore/src/share/ESShareDataModule.harmony.ts +201 -0
  333. package/rules/.source/ESCore/src/share/ESShareDataModule.ts +83 -0
  334. package/rules/.source/ESCore/src/share/ESSharedData.ts +9 -0
  335. package/rules/.source/ESCore/src/share/ESSharedDataMode.ts +5 -0
  336. package/rules/.source/ESCore/src/share/ESSharedDataParams.ts +4 -0
  337. package/rules/.source/ESCore/src/share/ESSharedDataType.ts +9 -0
  338. package/rules/.source/ESCore/src/share/index.ts +7 -0
  339. package/rules/.source/ESCore/src/slot/ESSlot.ts +75 -0
  340. package/rules/.source/ESCore/src/slot/ESSlotEvent.ts +4 -0
  341. package/rules/.source/ESCore/src/slot/ESSlotEventName.ts +3 -0
  342. package/rules/.source/ESCore/src/slot/ESSlotParams.ts +14 -0
  343. package/rules/.source/ESCore/src/slot/index.ts +3 -0
  344. package/rules/.source/ESCore/src/theme/ESTheme.ts +88 -0
  345. package/rules/.source/ESCore/src/theme/ESThemeListener.ts +3 -0
  346. package/rules/.source/ESCore/src/theme/index.ts +3 -0
  347. package/rules/.source/ESCore/src/toast/ESToast.ts +47 -0
  348. package/rules/.source/ESCore/src/toast/ESToastModule.android.ts +30 -0
  349. package/rules/.source/ESCore/src/toast/ESToastModule.harmony.ts +30 -0
  350. package/rules/.source/ESCore/src/toast/ESToastModule.ts +9 -0
  351. package/rules/.source/ESCore/src/toast/index.ts +2 -0
  352. package/rules/.source/ESCore/src/upload/ESUpload.ts +226 -0
  353. package/rules/.source/ESCore/src/upload/ESUploadInfo.ts +13 -0
  354. package/rules/.source/ESCore/src/upload/ESUploadListener.ts +21 -0
  355. package/rules/.source/ESCore/src/upload/ESUploadModule.android.ts +60 -0
  356. package/rules/.source/ESCore/src/upload/ESUploadModule.harmony.ts +51 -0
  357. package/rules/.source/ESCore/src/upload/ESUploadModule.ts +19 -0
  358. package/rules/.source/ESCore/src/upload/ESUploadState.ts +9 -0
  359. package/rules/.source/ESCore/src/upload/ESUploadStatus.ts +11 -0
  360. package/rules/.source/ESCore/src/upload/index.ts +6 -0
  361. package/rules/.source/ESCore/src/usb/ESUsbDevice.ts +112 -0
  362. package/rules/.source/ESCore/src/usb/ESUsbDeviceInfo.ts +11 -0
  363. package/rules/.source/ESCore/src/usb/ESUsbDeviceListener.ts +7 -0
  364. package/rules/.source/ESCore/src/usb/ESUsbDeviceModule.android.ts +62 -0
  365. package/rules/.source/ESCore/src/usb/ESUsbDeviceModule.harmony.ts +58 -0
  366. package/rules/.source/ESCore/src/usb/ESUsbDeviceModule.ts +23 -0
  367. package/rules/.source/ESCore/src/usb/index.ts +4 -0
  368. package/rules/.source/ESCore/src/useApi.ts +257 -0
  369. package/rules/.source/ESCore/src/xlog/ESLogUpload.ts +92 -0
  370. package/rules/.source/ESCore/src/xlog/ESLogUploadInfo.ts +12 -0
  371. package/rules/.source/ESCore/src/xlog/ESLogUploadListener.ts +7 -0
  372. package/rules/.source/ESCore/src/xlog/ESXLog.ts +130 -0
  373. package/rules/.source/ESCore/src/xlog/ESXLogModule.android.ts +74 -0
  374. package/rules/.source/ESCore/src/xlog/ESXLogModule.harmony.ts +47 -0
  375. package/rules/.source/ESCore/src/xlog/ESXLogModule.ts +24 -0
  376. package/rules/.source/ESCore/src/xlog/index.ts +6 -0
  377. package/rules/.source/ESCore/tsconfig.json +34 -0
  378. package/rules/.source/ESPlayer/package.json +24 -0
  379. package/rules/.source/ESPlayer/rollup.config.js +28 -0
  380. package/rules/.source/ESPlayer/src/cache/ESPlayerCache.ts +14 -0
  381. package/rules/.source/ESPlayer/src/cache/ESPlayerCacheManager.ts +39 -0
  382. package/rules/.source/ESPlayer/src/core/ESIPlayer.ts +179 -0
  383. package/rules/.source/ESPlayer/src/core/ESIPlayerManager.ts +7 -0
  384. package/rules/.source/ESPlayer/src/core/ESMediaMetadata.ts +8 -0
  385. package/rules/.source/ESPlayer/src/core/ESMediaSource.ts +13 -0
  386. package/rules/.source/ESPlayer/src/core/ESMediaSourceList.ts +15 -0
  387. package/rules/.source/ESPlayer/src/core/ESPlayer.ts +100 -0
  388. package/rules/.source/ESPlayer/src/core/ESPlayerBufferPercentCallback.ts +3 -0
  389. package/rules/.source/ESPlayer/src/core/ESPlayerCDNInfo.ts +5 -0
  390. package/rules/.source/ESPlayer/src/core/ESPlayerCommand.ts +1 -0
  391. package/rules/.source/ESPlayer/src/core/ESPlayerComponentInfo.ts +7 -0
  392. package/rules/.source/ESPlayer/src/core/ESPlayerConfiguration.ts +13 -0
  393. package/rules/.source/ESPlayer/src/core/ESPlayerControlOptions.ts +8 -0
  394. package/rules/.source/ESPlayer/src/core/ESPlayerDurationCallback.ts +3 -0
  395. package/rules/.source/ESPlayer/src/core/ESPlayerMediaMeta.ts +48 -0
  396. package/rules/.source/ESPlayer/src/core/ESPlayerPosition.ts +5 -0
  397. package/rules/.source/ESPlayer/src/core/ESPlayerProgressCallback.ts +3 -0
  398. package/rules/.source/ESPlayer/src/core/ESPlayerState.ts +44 -0
  399. package/rules/.source/ESPlayer/src/core/ESPlayerStatus.ts +10 -0
  400. package/rules/.source/ESPlayer/src/core/ESPlayerTrackInfo.ts +36 -0
  401. package/rules/.source/ESPlayer/src/core/ESPlayerTrackType.ts +5 -0
  402. package/rules/.source/ESPlayer/src/core/M3U8DefinitionInfo.ts +38 -0
  403. package/rules/.source/ESPlayer/src/decode/ESPlayerDecode.ts +12 -0
  404. package/rules/.source/ESPlayer/src/decode/ESPlayerDecodeManager.ts +81 -0
  405. package/rules/.source/ESPlayer/src/definition/ESPlayerDefinition.ts +21 -0
  406. package/rules/.source/ESPlayer/src/definition/ESPlayerDefinitionManager.ts +93 -0
  407. package/rules/.source/ESPlayer/src/definition/ESPlayerDefinitionStrategy.ts +12 -0
  408. package/rules/.source/ESPlayer/src/device/ESPlayerDevice.ts +4 -0
  409. package/rules/.source/ESPlayer/src/device/ESPlayerDeviceManager.ts +41 -0
  410. package/rules/.source/ESPlayer/src/device/ESPlayerDeviceType.ts +53 -0
  411. package/rules/.source/ESPlayer/src/display/ESPlayerDisplay.ts +4 -0
  412. package/rules/.source/ESPlayer/src/display/ESPlayerDisplayManager.ts +63 -0
  413. package/rules/.source/ESPlayer/src/error/ESPlayerError.ts +5 -0
  414. package/rules/.source/ESPlayer/src/error/ESPlayerErrors.ts +8 -0
  415. package/rules/.source/ESPlayer/src/event/ESPlayerEventDefaultListener.ts +127 -0
  416. package/rules/.source/ESPlayer/src/event/ESPlayerEventListener.ts +120 -0
  417. package/rules/.source/ESPlayer/src/event/ESPlayerEventManager.ts +451 -0
  418. package/rules/.source/ESPlayer/src/index.ts +166 -0
  419. package/rules/.source/ESPlayer/src/info/ESPlayerInfo.ts +16 -0
  420. package/rules/.source/ESPlayer/src/injectionSymbols.ts +84 -0
  421. package/rules/.source/ESPlayer/src/interceptor/ESIPlayerInterceptor.ts +11 -0
  422. package/rules/.source/ESPlayer/src/interceptor/ESPlayerInterceptError.ts +8 -0
  423. package/rules/.source/ESPlayer/src/interceptor/ESPlayerInterceptResult.ts +8 -0
  424. package/rules/.source/ESPlayer/src/interceptor/ESPlayerInterceptorManager.ts +95 -0
  425. package/rules/.source/ESPlayer/src/interceptor/ESPlayerInterceptorType.ts +17 -0
  426. package/rules/.source/ESPlayer/src/log/ESPlayerLog.ts +143 -0
  427. package/rules/.source/ESPlayer/src/log/ESPlayerLogModule.ts +43 -0
  428. package/rules/.source/ESPlayer/src/mode/ESPlayerPlayMode.ts +8 -0
  429. package/rules/.source/ESPlayer/src/mode/ESPlayerPlayModeManager.ts +39 -0
  430. package/rules/.source/ESPlayer/src/option/ESPlayerOption.ts +11 -0
  431. package/rules/.source/ESPlayer/src/option/ESPlayerOptionType.ts +14 -0
  432. package/rules/.source/ESPlayer/src/rate/ESPlayerRate.ts +11 -0
  433. package/rules/.source/ESPlayer/src/rate/ESPlayerRateManager.ts +39 -0
  434. package/rules/.source/ESPlayer/src/ratio/ESPlayerAspectRatio.ts +9 -0
  435. package/rules/.source/ESPlayer/src/ratio/ESPlayerAspectRatioManager.ts +39 -0
  436. package/rules/.source/ESPlayer/src/render/ESPlayerRender.ts +5 -0
  437. package/rules/.source/ESPlayer/src/render/ESPlayerRenderManager.ts +36 -0
  438. package/rules/.source/ESPlayer/src/storage/ESPlayerLocalStorageManager.ts +97 -0
  439. package/rules/.source/ESPlayer/src/storage/ESPlayerLocalStorageModule.android.ts +111 -0
  440. package/rules/.source/ESPlayer/src/storage/ESPlayerLocalStorageModule.harmony.ts +111 -0
  441. package/rules/.source/ESPlayer/src/storage/ESPlayerLocalStorageModule.ts +21 -0
  442. package/rules/.source/ESPlayer/src/type/ESPlayerType.ts +18 -0
  443. package/rules/.source/ESPlayer/src/type/ESPlayerTypeManager.ts +81 -0
  444. package/rules/.source/ESPlayer/src/useApi.ts +108 -0
  445. package/rules/.source/ESPlayer/src/view/ESIPlayerView.ts +120 -0
  446. package/rules/.source/ESPlayer/src/view/ESPlayerDefaultView.ts +127 -0
  447. package/rules/.source/ESPlayer/src/view/ESPlayerViewManager.ts +453 -0
  448. package/rules/.source/ESPlayer/src/volume/ESPlayerVolume.ts +4 -0
  449. package/rules/.source/ESPlayer/src/volume/ESPlayerVolumeManager.ts +51 -0
  450. package/rules/.source/ESPlayer/src/window/ESPlayerWindowType.ts +5 -0
  451. package/rules/.source/ESPlayer/tsconfig.json +34 -0
  452. package/rules/.source/ESPlayer/yarn.lock +4 -0
  453. package/rules/.source/ESPlayerManager/package.json +24 -0
  454. package/rules/.source/ESPlayerManager/rollup.config.js +33 -0
  455. package/rules/.source/ESPlayerManager/src/core/ESBuiltinADPlayerType.ts +9 -0
  456. package/rules/.source/ESPlayerManager/src/core/ESBuiltinPlayerType.ts +8 -0
  457. package/rules/.source/ESPlayerManager/src/core/ESIPlayerManager.ts +71 -0
  458. package/rules/.source/ESPlayerManager/src/core/ESMediaItem.ts +47 -0
  459. package/rules/.source/ESPlayerManager/src/core/ESMediaItemList.ts +11 -0
  460. package/rules/.source/ESPlayerManager/src/core/ESPlayerManager.ts +41 -0
  461. package/rules/.source/ESPlayerManager/src/core/ESPlayerManagerConfiguration.ts +6 -0
  462. package/rules/.source/ESPlayerManager/src/core/ESPlayerManagerErrors.ts +6 -0
  463. package/rules/.source/ESPlayerManager/src/event/ESPlayerManagerEventDefaultListener.ts +154 -0
  464. package/rules/.source/ESPlayerManager/src/event/ESPlayerManagerEventListener.ts +37 -0
  465. package/rules/.source/ESPlayerManager/src/event/ESPlayerManagerEventManager.ts +521 -0
  466. package/rules/.source/ESPlayerManager/src/index.ts +37 -0
  467. package/rules/.source/ESPlayerManager/src/index.vue +2676 -0
  468. package/rules/.source/ESPlayerManager/src/injectionSymbols.ts +16 -0
  469. package/rules/.source/ESPlayerManager/src/mode/ESPlayerManagerPlayModeManager.ts +27 -0
  470. package/rules/.source/ESPlayerManager/src/typings/shims-vue.d.ts +6 -0
  471. package/rules/.source/ESPlayerManager/src/useApi.ts +22 -0
  472. package/rules/.source/ESPlayerManager/src/utils/SparseArray.ts +103 -0
  473. package/rules/.source/ESPlayerManager/src/view/ESIPlayerManagerDefaultView.ts +167 -0
  474. package/rules/.source/ESPlayerManager/src/view/ESIPlayerManagerView.ts +44 -0
  475. package/rules/.source/ESPlayerManager/src/view/ESPlayerManagerViewManager.ts +517 -0
  476. package/rules/.source/ESPlayerManager/tsconfig.json +34 -0
  477. package/rules/.source/ESRouter/CHANGELOGG.md +899 -0
  478. package/rules/.source/ESRouter/SECURITY.md +20 -0
  479. package/rules/.source/ESRouter/api-extractor.json +49 -0
  480. package/rules/.source/ESRouter/index.js +7 -0
  481. package/rules/.source/ESRouter/nightwatch.conf.js +240 -0
  482. package/rules/.source/ESRouter/package.json +19 -0
  483. package/rules/.source/ESRouter/rollup.config.mjs +195 -0
  484. package/rules/.source/ESRouter/src/RouterLink.ts +358 -0
  485. package/rules/.source/ESRouter/src/RouterView.ts +794 -0
  486. package/rules/.source/ESRouter/src/SlotView.ts +477 -0
  487. package/rules/.source/ESRouter/src/config.ts +6 -0
  488. package/rules/.source/ESRouter/src/devtools.ts +576 -0
  489. package/rules/.source/ESRouter/src/encoding.ts +147 -0
  490. package/rules/.source/ESRouter/src/errors.ts +200 -0
  491. package/rules/.source/ESRouter/src/es/ESNativeRouter.android.ts +100 -0
  492. package/rules/.source/ESRouter/src/es/ESNativeRouter.harmony.ts +155 -0
  493. package/rules/.source/ESRouter/src/es/ESNativeRouter.ts +24 -0
  494. package/rules/.source/ESRouter/src/es/ESNativeRouterLaunchMode.ts +7 -0
  495. package/rules/.source/ESRouter/src/es/ESNativeRouterSplash.ts +6 -0
  496. package/rules/.source/ESRouter/src/global.d.ts +15 -0
  497. package/rules/.source/ESRouter/src/globalExtensions.ts +83 -0
  498. package/rules/.source/ESRouter/src/history/common.ts +237 -0
  499. package/rules/.source/ESRouter/src/history/es.ts +278 -0
  500. package/rules/.source/ESRouter/src/history/hash.ts +46 -0
  501. package/rules/.source/ESRouter/src/history/html5.ts +354 -0
  502. package/rules/.source/ESRouter/src/history/index.ts +40 -0
  503. package/rules/.source/ESRouter/src/history/memory.ts +127 -0
  504. package/rules/.source/ESRouter/src/index.ts +131 -0
  505. package/rules/.source/ESRouter/src/injectionSymbols.ts +91 -0
  506. package/rules/.source/ESRouter/src/location.ts +251 -0
  507. package/rules/.source/ESRouter/src/log/RouterLog.ts +90 -0
  508. package/rules/.source/ESRouter/src/log/info.ts +9 -0
  509. package/rules/.source/ESRouter/src/matcher/index.ts +533 -0
  510. package/rules/.source/ESRouter/src/matcher/pathMatcher.ts +55 -0
  511. package/rules/.source/ESRouter/src/matcher/pathParserRanker.ts +369 -0
  512. package/rules/.source/ESRouter/src/matcher/pathTokenizer.ts +200 -0
  513. package/rules/.source/ESRouter/src/matcher/types.ts +131 -0
  514. package/rules/.source/ESRouter/src/navigationGuards.ts +409 -0
  515. package/rules/.source/ESRouter/src/page/PageRouteView.ts +11 -0
  516. package/rules/.source/ESRouter/src/page/PageView.ts +12 -0
  517. package/rules/.source/ESRouter/src/query.ts +149 -0
  518. package/rules/.source/ESRouter/src/result/RouteResult.ts +11 -0
  519. package/rules/.source/ESRouter/src/result/RouteResultCallback.ts +5 -0
  520. package/rules/.source/ESRouter/src/router.ts +1930 -0
  521. package/rules/.source/ESRouter/src/scrollBehavior.ts +194 -0
  522. package/rules/.source/ESRouter/src/slot/SlotRootView.ts +11 -0
  523. package/rules/.source/ESRouter/src/slot/SlotView.ts +11 -0
  524. package/rules/.source/ESRouter/src/types/index.ts +605 -0
  525. package/rules/.source/ESRouter/src/types/typeGuards.ts +9 -0
  526. package/rules/.source/ESRouter/src/types/utils.ts +77 -0
  527. package/rules/.source/ESRouter/src/useApi.ts +29 -0
  528. package/rules/.source/ESRouter/src/utils/callbacks.ts +24 -0
  529. package/rules/.source/ESRouter/src/utils/env.ts +1 -0
  530. package/rules/.source/ESRouter/src/utils/index.ts +60 -0
  531. package/rules/.source/ESRouter/src/warning.ts +9 -0
  532. package/rules/.source/ESRouter/tsconfig.json +37 -0
  533. package/rules/.source/ESSoundPoolPlayer/package.json +23 -0
  534. package/rules/.source/ESSoundPoolPlayer/rollup.config.js +33 -0
  535. package/rules/.source/ESSoundPoolPlayer/src/core/ESSoundPoolContentType.ts +7 -0
  536. package/rules/.source/ESSoundPoolPlayer/src/core/ESSoundPoolStreamType.ts +15 -0
  537. package/rules/.source/ESSoundPoolPlayer/src/core/ESSoundPoolUsage.ts +19 -0
  538. package/rules/.source/ESSoundPoolPlayer/src/index.ts +19 -0
  539. package/rules/.source/ESSoundPoolPlayer/src/index.vue +1564 -0
  540. package/rules/.source/ESSoundPoolPlayer/src/module/ESSoundPoolPlayerModul.android.ts +133 -0
  541. package/rules/.source/ESSoundPoolPlayer/src/module/ESSoundPoolPlayerModul.harmony.ts +119 -0
  542. package/rules/.source/ESSoundPoolPlayer/src/module/ESSoundPoolPlayerModule.ts +48 -0
  543. package/rules/.source/ESSoundPoolPlayer/src/typings/shims-vue.d.ts +6 -0
  544. package/rules/.source/ESSoundPoolPlayer/tsconfig.json +34 -0
  545. package/rules/.source/ESVideoPlayer/package.json +26 -0
  546. package/rules/.source/ESVideoPlayer/rollup.config.js +33 -0
  547. package/rules/.source/ESVideoPlayer/src/component/ESVideoPlayerViewComponent.android.ts +948 -0
  548. package/rules/.source/ESVideoPlayer/src/component/ESVideoPlayerViewComponent.harmony.ts +763 -0
  549. package/rules/.source/ESVideoPlayer/src/index.ts +18 -0
  550. package/rules/.source/ESVideoPlayer/src/index.vue +2003 -0
  551. package/rules/.source/ESVideoPlayer/src/typings/shims-vue.d.ts +6 -0
  552. package/rules/.source/ESVideoPlayer/src/utils/ESVideoPlayerDefinitionUtils.ts +36 -0
  553. package/rules/.source/ESVideoPlayer/tsconfig.json +34 -0
  554. package/rules/.source/ESVideoPlayer/tsconfig.json.vite +0 -0
  555. package/rules/.source/ESVideoPlayer/tsconfig.node.json +0 -0
  556. package/rules/.source/ESVideoPlayer/vite.config.ts +29 -0
  557. package/rules/.source/ESVue/CHANGELOG.MD +201 -0
  558. package/rules/.source/ESVue/api-extractor.json +41 -0
  559. package/rules/.source/ESVue/package.json +42 -0
  560. package/rules/.source/ESVue/rollup.config.js +40 -0
  561. package/rules/.source/ESVue/src/built-in-component.ts +650 -0
  562. package/rules/.source/ESVue/src/config/index.ts +109 -0
  563. package/rules/.source/ESVue/src/global.d.ts +636 -0
  564. package/rules/.source/ESVue/src/hooks/lifecycle.ts +248 -0
  565. package/rules/.source/ESVue/src/index.ts +365 -0
  566. package/rules/.source/ESVue/src/modules/attrs.ts +24 -0
  567. package/rules/.source/ESVue/src/modules/class.ts +31 -0
  568. package/rules/.source/ESVue/src/modules/events.ts +119 -0
  569. package/rules/.source/ESVue/src/modules/patch-log.ts +39 -0
  570. package/rules/.source/ESVue/src/modules/style.ts +68 -0
  571. package/rules/.source/ESVue/src/node-ops.ts +153 -0
  572. package/rules/.source/ESVue/src/patch-prop.ts +93 -0
  573. package/rules/.source/ESVue/src/runtime/component/index.ts +83 -0
  574. package/rules/.source/ESVue/src/runtime/document/hippy-document.ts +56 -0
  575. package/rules/.source/ESVue/src/runtime/element/hippy-comment-element.ts +21 -0
  576. package/rules/.source/ESVue/src/runtime/element/hippy-element.ts +1623 -0
  577. package/rules/.source/ESVue/src/runtime/element/hippy-input-element.ts +75 -0
  578. package/rules/.source/ESVue/src/runtime/element/hippy-list-element.ts +306 -0
  579. package/rules/.source/ESVue/src/runtime/event/event-bus.ts +148 -0
  580. package/rules/.source/ESVue/src/runtime/event/hippy-event-dispatcher.ts +391 -0
  581. package/rules/.source/ESVue/src/runtime/event/hippy-event-target.ts +191 -0
  582. package/rules/.source/ESVue/src/runtime/event/hippy-event.ts +317 -0
  583. package/rules/.source/ESVue/src/runtime/native/index.ts +924 -0
  584. package/rules/.source/ESVue/src/runtime/node/hippy-node.ts +722 -0
  585. package/rules/.source/ESVue/src/runtime/node/node-log.ts +39 -0
  586. package/rules/.source/ESVue/src/runtime/render/index.ts +550 -0
  587. package/rules/.source/ESVue/src/runtime/style/css-map.ts +100 -0
  588. package/rules/.source/ESVue/src/runtime/style/css-resolve-auto-style.ts +119 -0
  589. package/rules/.source/ESVue/src/runtime/style/css-resolve-percent-style.ts +111 -0
  590. package/rules/.source/ESVue/src/runtime/style/css-resolve-rem-style.ts +45 -0
  591. package/rules/.source/ESVue/src/runtime/style/css-resolve-scale-style.ts +103 -0
  592. package/rules/.source/ESVue/src/runtime/style/css-resolve-style.ts +24 -0
  593. package/rules/.source/ESVue/src/runtime/style/css-resolve-variables.ts +209 -0
  594. package/rules/.source/ESVue/src/runtime/style/css-resolve-vwvh-style.ts +65 -0
  595. package/rules/.source/ESVue/src/runtime/style/css-resolve-width-height-style.ts +18 -0
  596. package/rules/.source/ESVue/src/runtime/style/css-selectors-match.ts +295 -0
  597. package/rules/.source/ESVue/src/runtime/style/css-selectors.ts +1173 -0
  598. package/rules/.source/ESVue/src/runtime/style/index.ts +154 -0
  599. package/rules/.source/ESVue/src/runtime/style/log.ts +39 -0
  600. package/rules/.source/ESVue/src/runtime/style/parser.ts +291 -0
  601. package/rules/.source/ESVue/src/runtime/text/hippy-text.ts +41 -0
  602. package/rules/.source/ESVue/src/runtime/websocket/websocket.ts +282 -0
  603. package/rules/.source/ESVue/src/types/index.ts +25 -0
  604. package/rules/.source/ESVue/src/types/native-modules/clip-board-module.ts +24 -0
  605. package/rules/.source/ESVue/src/types/native-modules/device-event-module.ts +24 -0
  606. package/rules/.source/ESVue/src/types/native-modules/http.ts +57 -0
  607. package/rules/.source/ESVue/src/types/native-modules/image-loader-module.ts +27 -0
  608. package/rules/.source/ESVue/src/types/native-modules/net-info.ts +29 -0
  609. package/rules/.source/ESVue/src/types/native-modules/network.ts +24 -0
  610. package/rules/.source/ESVue/src/types/native-modules/test-module.ts +23 -0
  611. package/rules/.source/ESVue/src/types/native-modules/ui-manager-module.ts +44 -0
  612. package/rules/.source/ESVue/src/types/native-modules/websocket.ts +49 -0
  613. package/rules/.source/ESVue/src/types/native-modules.ts +41 -0
  614. package/rules/.source/ESVue/src/types/native-node.ts +48 -0
  615. package/rules/.source/ESVue/src/util/event.ts +74 -0
  616. package/rules/.source/ESVue/src/util/i18n.ts +32 -0
  617. package/rules/.source/ESVue/src/util/index.ts +418 -0
  618. package/rules/.source/ESVue/src/util/instance.ts +77 -0
  619. package/rules/.source/ESVue/src/util/log.ts +39 -0
  620. package/rules/.source/ESVue/src/util/node.ts +152 -0
  621. package/rules/.source/ESVue/src/util/rem.ts +54 -0
  622. package/rules/.source/ESVue/src/util/screen.ts +42 -0
  623. package/rules/.source/ESVue/tsconfig.json +34 -0
  624. package/rules/.source/ESVue/tsdoc.json +6 -0
  625. package/rules/.source/ESVue/yarn.lock +4 -0
  626. package/rules/.source/ESVueCssLoader/package.json +27 -0
  627. package/rules/.source/ESVueCssLoader/rollup.config.js +20 -0
  628. package/rules/.source/ESVueCssLoader/src/index.ts +2 -0
  629. package/rules/.source/ESVueCssLoader/src/log/log.ts +38 -0
  630. package/rules/.source/ESVueCssLoader/src/style-parser/color-parser.ts +357 -0
  631. package/rules/.source/ESVueCssLoader/src/style-parser/css-loader.ts +93 -0
  632. package/rules/.source/ESVueCssLoader/src/style-parser/css-parser.ts +1123 -0
  633. package/rules/.source/ESVueCssLoader/src/types.ts +5 -0
  634. package/rules/.source/ESVueCssLoader/src/utils/utils.ts +59 -0
  635. package/rules/.source/ESVueCssLoader/tsconfig.json +34 -0
  636. package/rules/.source/ESVueStyleParser/api-extractor.json +38 -0
  637. package/rules/.source/ESVueStyleParser/package.json +24 -0
  638. package/rules/.source/ESVueStyleParser/rollup.config.js +28 -0
  639. package/rules/.source/ESVueStyleParser/src/index.ts +24 -0
  640. package/rules/.source/ESVueStyleParser/src/style-parser/android-color-parser.ts +143 -0
  641. package/rules/.source/ESVueStyleParser/src/style-parser/color-parser.ts +256 -0
  642. package/rules/.source/ESVueStyleParser/src/style-parser/css-parser.ts +1371 -0
  643. package/rules/.source/ESVueStyleParser/src/style-parser/named-colors.ts +154 -0
  644. package/rules/.source/ESVueStyleParser/src/style-parser/utils.ts +55 -0
  645. package/rules/.source/ESVueStyleParser/src/types.ts +5 -0
  646. package/rules/.source/ESVueStyleParser/tsconfig.json +34 -0
  647. package/rules/.source/component/package.json +24 -0
  648. package/rules/.source/component/rollup.config.js +28 -0
  649. package/rules/.source/component/src/ESAnimationView/ESAnimationViewComponent.ts +51 -0
  650. package/rules/.source/component/src/ESAppIconView/ESAppIconViewComponent.ts +46 -0
  651. package/rules/.source/component/src/ESAppIconView/ESIAppIcon.ts +5 -0
  652. package/rules/.source/component/src/ESCardView/ESCardContainerViewComponent.ts +127 -0
  653. package/rules/.source/component/src/ESCardView/ESCardEvent.ts +3 -0
  654. package/rules/.source/component/src/ESCardView/ESCardViewComponent.ts +54 -0
  655. package/rules/.source/component/src/ESCardView/ESICard.ts +9 -0
  656. package/rules/.source/component/src/ESCardView/ESICardContainer.ts +25 -0
  657. package/rules/.source/component/src/ESChartView/ESBarChartViewComponent.ts +35 -0
  658. package/rules/.source/component/src/ESChartView/ESIChart.ts +3 -0
  659. package/rules/.source/component/src/ESChartView/ESLineChartViewComponent.ts +35 -0
  660. package/rules/.source/component/src/ESDialog/ESDialogComponent.ts +15 -0
  661. package/rules/.source/component/src/ESFastSwiperSlideView/ESFastSwiperSlideViewComponent.ts +46 -0
  662. package/rules/.source/component/src/ESFlexView/ESFlexViewComponent.ts +22 -0
  663. package/rules/.source/component/src/ESGradient/ESGradient.ts +14 -0
  664. package/rules/.source/component/src/ESGradient/ESGradientOrientation.ts +10 -0
  665. package/rules/.source/component/src/ESGradient/ESGradientShape.ts +6 -0
  666. package/rules/.source/component/src/ESGradient/ESGradientType.ts +5 -0
  667. package/rules/.source/component/src/ESItem/ESItemComponent.ts +40 -0
  668. package/rules/.source/component/src/ESItemStoreView/ESItemStoreViewComponent.ts +23 -0
  669. package/rules/.source/component/src/ESLargeListView/ESLargeListViewComponent.ts +136 -0
  670. package/rules/.source/component/src/ESLoading/ESLoadingViewComponent.ts +16 -0
  671. package/rules/.source/component/src/ESLoading/ESLoadingViewElement.android.ts +11 -0
  672. package/rules/.source/component/src/ESLoading/ESLoadingViewElement.harmony.ts +11 -0
  673. package/rules/.source/component/src/ESLottieView/ESLottieViewComponent.android.ts +29 -0
  674. package/rules/.source/component/src/ESLottieView/ESLottieViewComponent.harmony.ts +29 -0
  675. package/rules/.source/component/src/ESMediaSeries/ESIMediaSeries.ts +24 -0
  676. package/rules/.source/component/src/ESMediaSeries/ESMediaSeries.ts +6 -0
  677. package/rules/.source/component/src/ESMediaSeries/ESMediaSeriesComponent.ts +142 -0
  678. package/rules/.source/component/src/ESOrientationSeekBar/ESHorizontalSeekBarViewComponent.ts +1305 -0
  679. package/rules/.source/component/src/ESOrientationSeekBar/ESIHorizontalSeekBar.ts +255 -0
  680. package/rules/.source/component/src/ESOrientationSeekBar/ESIVerticalSeekBar.ts +13 -0
  681. package/rules/.source/component/src/ESOrientationSeekBar/ESVerticalSeekBarViewComponent.ts +1356 -0
  682. package/rules/.source/component/src/ESPlayMarkView/ESPlayMarkViewComponent.ts +21 -0
  683. package/rules/.source/component/src/ESPluginView/ESPluginViewComponent.ts +34 -0
  684. package/rules/.source/component/src/ESProgressBarView/ESProgressBarViewComponent.ts +38 -0
  685. package/rules/.source/component/src/ESQRCodeView/ESQRCodeViewComponent.ts +11 -0
  686. package/rules/.source/component/src/ESReplaceChildView/ESReplaceChildViewComponent.ts +151 -0
  687. package/rules/.source/component/src/ESRippleView/ESRippleViewComponent.ts +45 -0
  688. package/rules/.source/component/src/ESScrollView/ESIScrollView.ts +7 -0
  689. package/rules/.source/component/src/ESScrollView/ESScrollViewComponent.ts +49 -0
  690. package/rules/.source/component/src/ESSeekBarView/ESSeekBarViewElement.android.ts +38 -0
  691. package/rules/.source/component/src/ESSeekBarView/ESSeekBarViewElement.harmony.ts +38 -0
  692. package/rules/.source/component/src/ESSurfaceView/ESSurfaceViewComponent.ts +21 -0
  693. package/rules/.source/component/src/ESSwiftListView/ESSwiftListViewComponent.ts +117 -0
  694. package/rules/.source/component/src/ESSwiperSlideView/ESSwiperSlideViewComponent.ts +31 -0
  695. package/rules/.source/component/src/ESSwiperView/ESSwiperViewComponent.ts +82 -0
  696. package/rules/.source/component/src/ESTVItemView/ESTVItemViewComponent.ts +185 -0
  697. package/rules/.source/component/src/ESTVListView/ESIListView.ts +184 -0
  698. package/rules/.source/component/src/ESTVListView/ESListInitPosition.ts +15 -0
  699. package/rules/.source/component/src/ESTVListView/ESListViewItem.ts +10 -0
  700. package/rules/.source/component/src/ESTVListView/ESListViewItemDecoration.ts +7 -0
  701. package/rules/.source/component/src/ESTVListView/ESListViewItemFunctionParams.ts +7 -0
  702. package/rules/.source/component/src/ESTVListView/ESTVListViewComponent.ts +697 -0
  703. package/rules/.source/component/src/ESTabsView/ESITab.ts +90 -0
  704. package/rules/.source/component/src/ESTabsView/ESTab.ts +7 -0
  705. package/rules/.source/component/src/ESTabsView/ESTabItem.ts +8 -0
  706. package/rules/.source/component/src/ESTabsView/ESTabsViewComponent.ts +383 -0
  707. package/rules/.source/component/src/ESTestView/ESITestAView.ts +1 -0
  708. package/rules/.source/component/src/ESTestView/ESITestGroup.ts +3 -0
  709. package/rules/.source/component/src/ESTestView/ESITestView.ts +3 -0
  710. package/rules/.source/component/src/ESTestView/ESTestAViewComponent.ts +34 -0
  711. package/rules/.source/component/src/ESTestView/ESTestGroupComponent.ts +39 -0
  712. package/rules/.source/component/src/ESTestView/ESTestViewComponent.ts +51 -0
  713. package/rules/.source/component/src/ESTextView/ESTextViewComponent.ts +22 -0
  714. package/rules/.source/component/src/ESTransitionImageView/ESITransitionImage.ts +7 -0
  715. package/rules/.source/component/src/ESTransitionImageView/ESTransitionImageViewComponent.ts +58 -0
  716. package/rules/.source/component/src/ESView/ESDirections.ts +7 -0
  717. package/rules/.source/component/src/ESView/ESIView.ts +6 -0
  718. package/rules/.source/component/src/ESView/ESViewComponent.ts +24 -0
  719. package/rules/.source/component/src/ESView/ESViewCoordinate.ts +4 -0
  720. package/rules/.source/component/src/ESView/ESViewScrollState.ts +5 -0
  721. package/rules/.source/component/src/ESView/ESViewState.ts +16 -0
  722. package/rules/.source/component/src/ESView/ESViewStateCallback.ts +5 -0
  723. package/rules/.source/component/src/ESViewPager/ESIViewPager.ts +8 -0
  724. package/rules/.source/component/src/ESViewPager/ESPageData.ts +7 -0
  725. package/rules/.source/component/src/ESViewPager/ESViewPagerComponent.ts +58 -0
  726. package/rules/.source/component/src/ESWebView/ESWebViewComponent.ts +48 -0
  727. package/rules/.source/component/src/ESX5WebView/ESX5WebViewElement.android.ts +70 -0
  728. package/rules/.source/component/src/ESX5WebView/ESX5WebViewElement.harmony.ts +70 -0
  729. package/rules/.source/component/src/index.ts +180 -0
  730. package/rules/.source/component/src/tv-div/TVDivComponent.ts +131 -0
  731. package/rules/.source/component/src/tv-image/TVImageComponent.ts +126 -0
  732. package/rules/.source/component/src/tv-li/TVLiComponent.ts +10 -0
  733. package/rules/.source/component/src/tv-swiper/TVSwiperComponent.ts +110 -0
  734. package/rules/.source/component/src/tv-ul/TVULComponent.ts +82 -0
  735. package/rules/.source/component/src/typings/index.ts +7 -0
  736. package/rules/.source/component/src/typings/shims-vue.d.ts +6 -0
  737. package/rules/.source/component/tsconfig.json +34 -0
  738. package/rules/.source/hippy/extend_views/CoverFlowHorizontalView.java +203 -0
  739. package/rules/.source/hippy/extend_views/CoverFlowVerticalView.java +203 -0
  740. package/rules/.source/hippy/extend_views/CoverFlowViewController.java +195 -0
  741. package/rules/.source/hippy/extend_views/EngineRootView.java +125 -0
  742. package/rules/.source/hippy/extend_views/ExtendTag.java +83 -0
  743. package/rules/.source/hippy/extend_views/FocusSearchHelper.java +124 -0
  744. package/rules/.source/hippy/extend_views/IRecyclerItemView.java +12 -0
  745. package/rules/.source/hippy/extend_views/JSEventHandleView.java +5 -0
  746. package/rules/.source/hippy/extend_views/MarqueeRelayManager.java +133 -0
  747. package/rules/.source/hippy/extend_views/MarqueeRelayTextView.java +211 -0
  748. package/rules/.source/hippy/extend_views/ProgressBarView.java +83 -0
  749. package/rules/.source/hippy/extend_views/ProgressBarViewController.java +145 -0
  750. package/rules/.source/hippy/extend_views/SeekBarView.java +104 -0
  751. package/rules/.source/hippy/extend_views/SeekBarViewController.java +218 -0
  752. package/rules/.source/hippy/extend_views/StateImageView.java +149 -0
  753. package/rules/.source/hippy/extend_views/StateImageViewController.java +34 -0
  754. package/rules/.source/hippy/extend_views/TVButtonView.java +314 -0
  755. package/rules/.source/hippy/extend_views/TVButtonViewController.java +89 -0
  756. package/rules/.source/hippy/extend_views/TVTextView.java +684 -0
  757. package/rules/.source/hippy/extend_views/TVViewActor.java +811 -0
  758. package/rules/.source/hippy/extend_views/TVViewActorHost.java +6 -0
  759. package/rules/.source/hippy/extend_views/TVViewActor/346/216/245/345/205/245.md +66 -0
  760. package/rules/.source/hippy/extend_views/TemplateUtil.java +336 -0
  761. package/rules/.source/hippy/extend_views/TextButtonNode.java +47 -0
  762. package/rules/.source/hippy/extend_views/TextViewController.java +377 -0
  763. package/rules/.source/hippy/extend_views/fastlist/CenterFlyInAnimator.java +96 -0
  764. package/rules/.source/hippy/extend_views/fastlist/ChildOnScreenScroller.java +548 -0
  765. package/rules/.source/hippy/extend_views/fastlist/ClonedViewTag.java +17 -0
  766. package/rules/.source/hippy/extend_views/fastlist/EventDeliverer.java +55 -0
  767. package/rules/.source/hippy/extend_views/fastlist/FastAdapter.java +4683 -0
  768. package/rules/.source/hippy/extend_views/fastlist/FastAdapterUtil.java +982 -0
  769. package/rules/.source/hippy/extend_views/fastlist/FastFlexNode.java +48 -0
  770. package/rules/.source/hippy/extend_views/fastlist/FastFlexView.java +873 -0
  771. package/rules/.source/hippy/extend_views/fastlist/FastFlexViewController.java +130 -0
  772. package/rules/.source/hippy/extend_views/fastlist/FastItemNode.java +67 -0
  773. package/rules/.source/hippy/extend_views/fastlist/FastItemView.java +306 -0
  774. package/rules/.source/hippy/extend_views/fastlist/FastItemViewController.java +106 -0
  775. package/rules/.source/hippy/extend_views/fastlist/FastListModule.java +95 -0
  776. package/rules/.source/hippy/extend_views/fastlist/FastListNode.java +90 -0
  777. package/rules/.source/hippy/extend_views/fastlist/FastListView.java +2466 -0
  778. package/rules/.source/hippy/extend_views/fastlist/FastListViewController.java +1038 -0
  779. package/rules/.source/hippy/extend_views/fastlist/FastListView/346/270/262/346/237/223/346/265/201/347/250/213/345/233/276.graffle +0 -0
  780. package/rules/.source/hippy/extend_views/fastlist/FastPendingView.java +47 -0
  781. package/rules/.source/hippy/extend_views/fastlist/ItemDecorations.java +71 -0
  782. package/rules/.source/hippy/extend_views/fastlist/ItemStoreNode.java +64 -0
  783. package/rules/.source/hippy/extend_views/fastlist/ItemStoreView.java +13 -0
  784. package/rules/.source/hippy/extend_views/fastlist/ItemStoreViewController.java +45 -0
  785. package/rules/.source/hippy/extend_views/fastlist/ListItemHolder.java +7 -0
  786. package/rules/.source/hippy/extend_views/fastlist/ListViewControlProp.java +41 -0
  787. package/rules/.source/hippy/extend_views/fastlist/MouseRecycleView.java +509 -0
  788. package/rules/.source/hippy/extend_views/fastlist/OnFastItemClickListener.java +12 -0
  789. package/rules/.source/hippy/extend_views/fastlist/OnFastItemFocusChangeListener.java +9 -0
  790. package/rules/.source/hippy/extend_views/fastlist/OnFastScrollStateChangedListener.java +7 -0
  791. package/rules/.source/hippy/extend_views/fastlist/PendingListNode.java +18 -0
  792. package/rules/.source/hippy/extend_views/fastlist/PendingViewController.java +13 -0
  793. package/rules/.source/hippy/extend_views/fastlist/PostHandlerView.java +6 -0
  794. package/rules/.source/hippy/extend_views/fastlist/PostTaskHolder.java +20 -0
  795. package/rules/.source/hippy/extend_views/fastlist/ReplaceChildController.java +105 -0
  796. package/rules/.source/hippy/extend_views/fastlist/ReplaceChildView.java +312 -0
  797. package/rules/.source/hippy/extend_views/fastlist/TVListView.java +3692 -0
  798. package/rules/.source/hippy/extend_views/fastlist/TemplateCodeParser.java +247 -0
  799. package/rules/.source/hippy/extend_views/fastlist/Utils.java +572 -0
  800. package/rules/.source/hippy/extend_views/fastlist/ViewTag.java +317 -0
  801. package/rules/.source/hippy/extend_views/fastlist/VirtualListView.java +8 -0
  802. package/rules/.source/hippy/extend_views/fastlist/diff/FastListDataBindingHelper.java +320 -0
  803. package/rules/.source/hippy/extend_views/fastlist/diff/KeyDiffHelper.java +289 -0
  804. package/rules/.source/hippy/extend_views/fastlist/diff/NoKeyDiffHelper.java +278 -0
  805. package/rules/.source/hippy/extend_views/tag/FontTag.java +53 -0
  806. package/rules/.source/hippy/extend_views/tag/HtmlTag.java +191 -0
  807. package/rules/.source/hippy/extend_views/tag/HtmlTagHandler.java +185 -0
  808. package/rules/.source/hippy/extend_views/tag/SpanTag.java +160 -0
  809. package/rules/.source/hippy/extend_views/tag/TextFontSpan.java +102 -0
  810. package/rules/.source/hippy/extend_views/waterfall/Chunk.java +10 -0
  811. package/rules/.source/hippy/extend_views/waterfall/ChunkGroup.java +5 -0
  812. package/rules/.source/hippy/extend_views/waterfall/Section.java +4 -0
  813. package/rules/.source/hippy/extend_views/waterfall/Tabs.java +5 -0
  814. package/rules/.source/hippy/extend_views/waterfall/WaterfallUtils.java +26 -0
  815. package/rules/.source/hippy/hippy_uimanager/ControllerHolder.java +30 -0
  816. package/rules/.source/hippy/hippy_uimanager/ControllerManager.java +651 -0
  817. package/rules/.source/hippy/hippy_uimanager/ControllerRegistry.java +102 -0
  818. package/rules/.source/hippy/hippy_uimanager/ControllerUpdateManger.java +252 -0
  819. package/rules/.source/hippy/hippy_uimanager/CustomControllerHelper.java +425 -0
  820. package/rules/.source/hippy/hippy_uimanager/DiffUtils.java +526 -0
  821. package/rules/.source/hippy/hippy_uimanager/ExtendViewGroup.java +36 -0
  822. package/rules/.source/hippy/hippy_uimanager/HippyCustomViewCreator.java +29 -0
  823. package/rules/.source/hippy/hippy_uimanager/HippyGroupController.java +83 -0
  824. package/rules/.source/hippy/hippy_uimanager/HippyViewBase.java +27 -0
  825. package/rules/.source/hippy/hippy_uimanager/HippyViewController.java +2189 -0
  826. package/rules/.source/hippy/hippy_uimanager/HippyViewEvent.java +52 -0
  827. package/rules/.source/hippy/hippy_uimanager/IHippyZIndexViewGroup.java +24 -0
  828. package/rules/.source/hippy/hippy_uimanager/InternalExtendViewUtil.java +395 -0
  829. package/rules/.source/hippy/hippy_uimanager/ListItemRenderNode.java +143 -0
  830. package/rules/.source/hippy/hippy_uimanager/ListViewRenderNode.java +44 -0
  831. package/rules/.source/hippy/hippy_uimanager/MatrixUtil.java +470 -0
  832. package/rules/.source/hippy/hippy_uimanager/NativeGestureDispatcher.java +349 -0
  833. package/rules/.source/hippy/hippy_uimanager/NativeGestureProcessor.java +188 -0
  834. package/rules/.source/hippy/hippy_uimanager/PullFooterRenderNode.java +43 -0
  835. package/rules/.source/hippy/hippy_uimanager/PullHeaderRenderNode.java +43 -0
  836. package/rules/.source/hippy/hippy_uimanager/RenderManager.java +304 -0
  837. package/rules/.source/hippy/hippy_uimanager/RenderNode.java +533 -0
  838. package/rules/.source/hippy/hippy_uimanager/StateView.java +17 -0
  839. package/rules/.source/hippy/hippy_uimanager/TransformUtil.java +125 -0
  840. package/rules/.source/hippy/hippy_uimanager/ViewGroupDrawingOrderHelper.java +108 -0
  841. package/rules/.source/hippy/hippy_uimanager/ViewStateProvider.java +10 -0
  842. package/rules/.source/hippy/hippy_views/audioview/AudioPlayManager.java +457 -0
  843. package/rules/.source/hippy/hippy_views/audioview/AudioView.java +225 -0
  844. package/rules/.source/hippy/hippy_views/audioview/AudioViewController.java +135 -0
  845. package/rules/.source/hippy/hippy_views/common/CommonBackgroundDrawable.java +58 -0
  846. package/rules/.source/hippy/hippy_views/common/CommonBorder.java +37 -0
  847. package/rules/.source/hippy/hippy_views/custom/HippyCustomPropsController.java +61 -0
  848. package/rules/.source/hippy/hippy_views/hippylist/HippyRecyclerListAdapter.java +399 -0
  849. package/rules/.source/hippy/hippy_views/hippylist/HippyRecyclerView.java +378 -0
  850. package/rules/.source/hippy/hippy_views/hippylist/HippyRecyclerViewController.java +187 -0
  851. package/rules/.source/hippy/hippy_views/hippylist/HippyRecyclerViewHolder.java +39 -0
  852. package/rules/.source/hippy/hippy_views/hippylist/HippyRecyclerViewWrapper.java +134 -0
  853. package/rules/.source/hippy/hippy_views/hippylist/NodePositionHelper.java +55 -0
  854. package/rules/.source/hippy/hippy_views/hippylist/PreloadHelper.java +54 -0
  855. package/rules/.source/hippy/hippy_views/hippylist/PullFooterEventHelper.java +61 -0
  856. package/rules/.source/hippy/hippy_views/hippylist/PullHeaderEventHelper.java +127 -0
  857. package/rules/.source/hippy/hippy_views/hippylist/RecyclerViewEventHelper.java +394 -0
  858. package/rules/.source/hippy/hippy_views/image/HippyContentDrawable.java +113 -0
  859. package/rules/.source/hippy/hippy_views/image/HippyImageView.java +1608 -0
  860. package/rules/.source/hippy/hippy_views/image/HippyImageViewController.java +382 -0
  861. package/rules/.source/hippy/hippy_views/image/IImageStateListener.java +7 -0
  862. package/rules/.source/hippy/hippy_views/list/ChildOnScreenScroller.java +255 -0
  863. package/rules/.source/hippy/hippy_views/list/HippyListAdapter.java +647 -0
  864. package/rules/.source/hippy/hippy_views/list/HippyListItemView.java +162 -0
  865. package/rules/.source/hippy/hippy_views/list/HippyListItemViewController.java +45 -0
  866. package/rules/.source/hippy/hippy_views/list/HippyListView.java +915 -0
  867. package/rules/.source/hippy/hippy_views/list/HippyListViewController.java +622 -0
  868. package/rules/.source/hippy/hippy_views/list/HippyRecycler.java +31 -0
  869. package/rules/.source/hippy/hippy_views/list/IRecycleItemTypeChange.java +23 -0
  870. package/rules/.source/hippy/hippy_views/list/ItemDecorations.java +70 -0
  871. package/rules/.source/hippy/hippy_views/list/NegativeLongKeyFlinger.java +156 -0
  872. package/rules/.source/hippy/hippy_views/list/NodeHolder.java +34 -0
  873. package/rules/.source/hippy/hippy_views/list/RecycleViewFlinger.java +126 -0
  874. package/rules/.source/hippy/hippy_views/list/TVRecyclerView.java +2070 -0
  875. package/rules/.source/hippy/hippy_views/list/TVSingleLineListView.java +15 -0
  876. package/rules/.source/hippy/hippy_views/modal/HippyModalHostManager.java +102 -0
  877. package/rules/.source/hippy/hippy_views/modal/HippyModalHostView.java +597 -0
  878. package/rules/.source/hippy/hippy_views/modal/ModalHostHelper.java +46 -0
  879. package/rules/.source/hippy/hippy_views/modal/ModalStyleNode.java +34 -0
  880. package/rules/.source/hippy/hippy_views/modal/RequestCloseEvent.java +32 -0
  881. package/rules/.source/hippy/hippy_views/modal/ShowEvent.java +31 -0
  882. package/rules/.source/hippy/hippy_views/navigator/Navigator.java +126 -0
  883. package/rules/.source/hippy/hippy_views/navigator/NavigatorController.java +120 -0
  884. package/rules/.source/hippy/hippy_views/refresh/HippyPullFooterView.java +47 -0
  885. package/rules/.source/hippy/hippy_views/refresh/HippyPullFooterViewController.java +65 -0
  886. package/rules/.source/hippy/hippy_views/refresh/HippyPullHeaderView.java +39 -0
  887. package/rules/.source/hippy/hippy_views/refresh/HippyPullHeaderViewController.java +104 -0
  888. package/rules/.source/hippy/hippy_views/refresh/RefreshWrapper.java +237 -0
  889. package/rules/.source/hippy/hippy_views/refresh/RefreshWrapperController.java +62 -0
  890. package/rules/.source/hippy/hippy_views/refresh/RefreshWrapperItemController.java +39 -0
  891. package/rules/.source/hippy/hippy_views/refresh/RefreshWrapperItemView.java +26 -0
  892. package/rules/.source/hippy/hippy_views/scroll/HippyHorizontalScrollView.java +500 -0
  893. package/rules/.source/hippy/hippy_views/scroll/HippyOnScrollHelper.java +39 -0
  894. package/rules/.source/hippy/hippy_views/scroll/HippyScrollView.java +46 -0
  895. package/rules/.source/hippy/hippy_views/scroll/HippyScrollViewController.java +178 -0
  896. package/rules/.source/hippy/hippy_views/scroll/HippyScrollViewEventHelper.java +92 -0
  897. package/rules/.source/hippy/hippy_views/scroll/HippyVerticalScrollView.java +522 -0
  898. package/rules/.source/hippy/hippy_views/text/HippyTextView.java +512 -0
  899. package/rules/.source/hippy/hippy_views/text/HippyTextViewController.java +77 -0
  900. package/rules/.source/hippy/hippy_views/textinput/HippyTextInput.java +668 -0
  901. package/rules/.source/hippy/hippy_views/textinput/HippyTextInputController.java +528 -0
  902. package/rules/.source/hippy/hippy_views/textinput/TextInputNode.java +115 -0
  903. package/rules/.source/hippy/hippy_views/videoview/APEZProvider.java +287 -0
  904. package/rules/.source/hippy/hippy_views/videoview/APKExpansionSupport.java +82 -0
  905. package/rules/.source/hippy/hippy_views/videoview/PivotPoint.java +13 -0
  906. package/rules/.source/hippy/hippy_views/videoview/ScalableType.java +34 -0
  907. package/rules/.source/hippy/hippy_views/videoview/ScalableVideoView.java +265 -0
  908. package/rules/.source/hippy/hippy_views/videoview/ScaleManager.java +191 -0
  909. package/rules/.source/hippy/hippy_views/videoview/Size.java +19 -0
  910. package/rules/.source/hippy/hippy_views/videoview/VideoHippyView.java +917 -0
  911. package/rules/.source/hippy/hippy_views/videoview/VideoHippyViewController.java +236 -0
  912. package/rules/.source/hippy/hippy_views/videoview/ZipResourceFile.java +427 -0
  913. package/rules/.source/hippy/hippy_views/view/CardRootView.java +28 -0
  914. package/rules/.source/hippy/hippy_views/view/CustomLayoutView.java +10 -0
  915. package/rules/.source/hippy/hippy_views/view/CustomNodeView.java +5 -0
  916. package/rules/.source/hippy/hippy_views/view/DialogViewGroup.java +113 -0
  917. package/rules/.source/hippy/hippy_views/view/HippyViewGroup.java +2042 -0
  918. package/rules/.source/hippy/hippy_views/view/HippyViewGroupController.java +583 -0
  919. package/rules/.source/hippy/hippy_views/view/WindowRoot.java +5 -0
  920. package/rules/.source/hippy/hippy_views/viewpager/HippyViewPager.java +308 -0
  921. package/rules/.source/hippy/hippy_views/viewpager/HippyViewPagerAdapter.java +148 -0
  922. package/rules/.source/hippy/hippy_views/viewpager/HippyViewPagerController.java +246 -0
  923. package/rules/.source/hippy/hippy_views/viewpager/HippyViewPagerItem.java +27 -0
  924. package/rules/.source/hippy/hippy_views/viewpager/HippyViewPagerItemController.java +42 -0
  925. package/rules/.source/hippy/hippy_views/viewpager/ViewPagerPageChangeListener.java +114 -0
  926. package/rules/.source/hippy/hippy_views/viewpager/event/HippyPageItemExposureEvent.java +40 -0
  927. package/rules/.source/hippy/hippy_views/viewpager/event/HippyPageScrollEvent.java +43 -0
  928. package/rules/.source/hippy/hippy_views/viewpager/event/HippyPageScrollStateChangedEvent.java +42 -0
  929. package/rules/.source/hippy/hippy_views/viewpager/event/HippyPageSelectedEvent.java +42 -0
  930. package/rules/.source/hippy/hippy_views/webview/HippyWebView.java +160 -0
  931. package/rules/.source/hippy/hippy_views/webview/HippyWebViewBridge.java +20 -0
  932. package/rules/.source/hippy/hippy_views/webview/HippyWebViewController.java +103 -0
  933. package/rules/.source/hippy/hippy_views/webview/HippyWebViewInner.java +77 -0
  934. package/rules/.source/quicktvui/assets/ic_media_sereis_vip.png +0 -0
  935. package/rules/.source/quicktvui/package.json +38 -0
  936. package/rules/.source/quicktvui/rollup.config.js +33 -0
  937. package/rules/.source/quicktvui/src/animation/QTAnimation.android.ts +1139 -0
  938. package/rules/.source/quicktvui/src/animation/QTAnimation.harmony.ts +1088 -0
  939. package/rules/.source/quicktvui/src/animation/QTIAnimation.ts +336 -0
  940. package/rules/.source/quicktvui/src/animation/QtAnimationAPI.ts +467 -0
  941. package/rules/.source/quicktvui/src/animation/types.ts +97 -0
  942. package/rules/.source/quicktvui/src/app/QTAppIcon.ts +41 -0
  943. package/rules/.source/quicktvui/src/app/QTIAppIcon.ts +5 -0
  944. package/rules/.source/quicktvui/src/app/QtAppIconAPI.ts +56 -0
  945. package/rules/.source/quicktvui/src/assets/vip.png +0 -0
  946. package/rules/.source/quicktvui/src/base/QTIBaseView.ts +95 -0
  947. package/rules/.source/quicktvui/src/base/QtBaseNativeViewAPI.ts +604 -0
  948. package/rules/.source/quicktvui/src/base/QtBaseViewAPI.ts +750 -0
  949. package/rules/.source/quicktvui/src/base/useBaseView.ts +374 -0
  950. package/rules/.source/quicktvui/src/button/QTIButton.ts +3 -0
  951. package/rules/.source/quicktvui/src/button/QtButtonAPI.ts +9 -0
  952. package/rules/.source/quicktvui/src/button/index.vue +223 -0
  953. package/rules/.source/quicktvui/src/canvas/CanvasGradient.ts +84 -0
  954. package/rules/.source/quicktvui/src/canvas/QTCanvasView.ts +468 -0
  955. package/rules/.source/quicktvui/src/canvas/QTICanvasView.ts +141 -0
  956. package/rules/.source/quicktvui/src/canvas/QtCanvasViewAPI.ts +1140 -0
  957. package/rules/.source/quicktvui/src/classified-list-view/QtClassifiedListViewAPI.ts +115 -0
  958. package/rules/.source/quicktvui/src/classified-list-view/core/QTClassifiedListViewItem.ts +11 -0
  959. package/rules/.source/quicktvui/src/classified-list-view/core/QTClassifiedListViewItemDecoration.ts +7 -0
  960. package/rules/.source/quicktvui/src/classified-list-view/core/QTIClassifiedListView.ts +18 -0
  961. package/rules/.source/quicktvui/src/classified-list-view/index.vue +520 -0
  962. package/rules/.source/quicktvui/src/collapse/QtCollapseAPI.ts +60 -0
  963. package/rules/.source/quicktvui/src/collapse/core/QTCollapse.ts +13 -0
  964. package/rules/.source/quicktvui/src/collapse/core/QTCollapseItem.ts +7 -0
  965. package/rules/.source/quicktvui/src/collapse/core/QTICollapse.ts +15 -0
  966. package/rules/.source/quicktvui/src/collapse/core/QTICollapseItem.ts +5 -0
  967. package/rules/.source/quicktvui/src/collapse/index.vue +337 -0
  968. package/rules/.source/quicktvui/src/column/QTIColumn.ts +3 -0
  969. package/rules/.source/quicktvui/src/column/QtColumnAPI.ts +9 -0
  970. package/rules/.source/quicktvui/src/column/index.vue +29 -0
  971. package/rules/.source/quicktvui/src/core/QTEventData.ts +4 -0
  972. package/rules/.source/quicktvui/src/core/QTFlexStyleBackground.ts +4 -0
  973. package/rules/.source/quicktvui/src/core/QTFlexStyleCoordinate.ts +5 -0
  974. package/rules/.source/quicktvui/src/core/QTFlexStyleDecoration.ts +7 -0
  975. package/rules/.source/quicktvui/src/core/QTFlexStyleGradientBackground.ts +6 -0
  976. package/rules/.source/quicktvui/src/core/QTFlexStyleMargin.ts +8 -0
  977. package/rules/.source/quicktvui/src/core/QTFlexStylePadding.ts +8 -0
  978. package/rules/.source/quicktvui/src/core/QTFlexStylePosition.ts +7 -0
  979. package/rules/.source/quicktvui/src/core/QTFlexStyleSize.ts +6 -0
  980. package/rules/.source/quicktvui/src/core/QTFlexStyleSpacing.ts +4 -0
  981. package/rules/.source/quicktvui/src/core/QTFlexStyleText.ts +5 -0
  982. package/rules/.source/quicktvui/src/core/QTFocusable.ts +5 -0
  983. package/rules/.source/quicktvui/src/core/QTLocation.ts +4 -0
  984. package/rules/.source/quicktvui/src/core/QTNativeParams.ts +22 -0
  985. package/rules/.source/quicktvui/src/core/QTPosition.ts +4 -0
  986. package/rules/.source/quicktvui/src/core/QTVisibility.ts +5 -0
  987. package/rules/.source/quicktvui/src/dialog/QTDialog.ts +28 -0
  988. package/rules/.source/quicktvui/src/dialog/QTIDialog.ts +3 -0
  989. package/rules/.source/quicktvui/src/file-browse/QTFileBrowse.ts +76 -0
  990. package/rules/.source/quicktvui/src/file-browse/QTIFileBrowse.ts +13 -0
  991. package/rules/.source/quicktvui/src/focus/QTDescendantFocusability.ts +5 -0
  992. package/rules/.source/quicktvui/src/focus/QTFocusDescendant.ts +5 -0
  993. package/rules/.source/quicktvui/src/focus/QTFocusDirection.ts +8 -0
  994. package/rules/.source/quicktvui/src/focus/QTFocusDirectionName.ts +7 -0
  995. package/rules/.source/quicktvui/src/gradient/QTGradient.ts +14 -0
  996. package/rules/.source/quicktvui/src/gradient/QTGradientOrientation.ts +10 -0
  997. package/rules/.source/quicktvui/src/gradient/QTGradientShape.ts +6 -0
  998. package/rules/.source/quicktvui/src/gradient/QTGradientType.ts +5 -0
  999. package/rules/.source/quicktvui/src/grid-view/QtGridViewAPI.ts +121 -0
  1000. package/rules/.source/quicktvui/src/grid-view/README.md +93 -0
  1001. package/rules/.source/quicktvui/src/grid-view/core/QTGridViewItem.ts +4 -0
  1002. package/rules/.source/quicktvui/src/grid-view/core/QTGridViewItemDecoration.ts +7 -0
  1003. package/rules/.source/quicktvui/src/grid-view/core/QTGridViewItemFunctionParams.ts +7 -0
  1004. package/rules/.source/quicktvui/src/grid-view/core/QTIGridView.ts +23 -0
  1005. package/rules/.source/quicktvui/src/grid-view/index.vue +390 -0
  1006. package/rules/.source/quicktvui/src/image/QTIImage.ts +8 -0
  1007. package/rules/.source/quicktvui/src/image/QTImageResizeMode.ts +7 -0
  1008. package/rules/.source/quicktvui/src/image/QtImageAPI.ts +54 -0
  1009. package/rules/.source/quicktvui/src/image/index.vue +33 -0
  1010. package/rules/.source/quicktvui/src/index.ts +404 -0
  1011. package/rules/.source/quicktvui/src/list/QTIBaseListView.ts +144 -0
  1012. package/rules/.source/quicktvui/src/list/QTListInitPosition.ts +15 -0
  1013. package/rules/.source/quicktvui/src/list/QtBaseListViewAPI.ts +930 -0
  1014. package/rules/.source/quicktvui/src/list/useBaseListView.ts +454 -0
  1015. package/rules/.source/quicktvui/src/list/useListView.ts +294 -0
  1016. package/rules/.source/quicktvui/src/list-indicator/QTIndicatorListViewComponent.ts +553 -0
  1017. package/rules/.source/quicktvui/src/list-indicator/QtIndicatorViewAPI.ts +114 -0
  1018. package/rules/.source/quicktvui/src/list-indicator/core/QTIIndicatorView.ts +21 -0
  1019. package/rules/.source/quicktvui/src/list-item/ESListItemComponent.ts +86 -0
  1020. package/rules/.source/quicktvui/src/list-item/QTIListItem.ts +14 -0
  1021. package/rules/.source/quicktvui/src/list-item/QtListItemAPI.ts +107 -0
  1022. package/rules/.source/quicktvui/src/list-view/QTListViewComponent.ts +389 -0
  1023. package/rules/.source/quicktvui/src/list-view/QtListViewAPI.ts +101 -0
  1024. package/rules/.source/quicktvui/src/list-view/core/QTIListView.ts +19 -0
  1025. package/rules/.source/quicktvui/src/list-view/core/QTListViewItem.ts +12 -0
  1026. package/rules/.source/quicktvui/src/list-view/core/QTListViewItemDecoration.ts +7 -0
  1027. package/rules/.source/quicktvui/src/list-view/core/QTListViewItemFunctionParams.ts +7 -0
  1028. package/rules/.source/quicktvui/src/list-view/core/QTListViewItemState.ts +8 -0
  1029. package/rules/.source/quicktvui/src/loading/QTILoadingView.ts +3 -0
  1030. package/rules/.source/quicktvui/src/loading/QTLoadingView.ts +25 -0
  1031. package/rules/.source/quicktvui/src/loading/QtLoadingAPI.ts +9 -0
  1032. package/rules/.source/quicktvui/src/long-image/QTILongImage.ts +68 -0
  1033. package/rules/.source/quicktvui/src/long-image/QTLongImage.ts +442 -0
  1034. package/rules/.source/quicktvui/src/long-image/QTLongImageEventBean.ts +62 -0
  1035. package/rules/.source/quicktvui/src/long-image/QTLongImageOrientation.ts +19 -0
  1036. package/rules/.source/quicktvui/src/long-image/QTLongImagePositionType.ts +5 -0
  1037. package/rules/.source/quicktvui/src/long-image/QTLongImageScaleType.ts +9 -0
  1038. package/rules/.source/quicktvui/src/long-image/QtLongImageAPI.ts +9 -0
  1039. package/rules/.source/quicktvui/src/long-image/index.vue +397 -0
  1040. package/rules/.source/quicktvui/src/lottie/QTILottieView.ts +62 -0
  1041. package/rules/.source/quicktvui/src/lottie/QTLottieAsyncUpdates.ts +5 -0
  1042. package/rules/.source/quicktvui/src/lottie/QTLottieEvent.ts +5 -0
  1043. package/rules/.source/quicktvui/src/lottie/QTLottieRenderMode.ts +5 -0
  1044. package/rules/.source/quicktvui/src/lottie/QTLottieRepeatMode.ts +5 -0
  1045. package/rules/.source/quicktvui/src/lottie/QTLottieView.android.ts +207 -0
  1046. package/rules/.source/quicktvui/src/lottie/QTLottieView.harmony.ts +207 -0
  1047. package/rules/.source/quicktvui/src/lottie/QtLottieViewAPI.ts +586 -0
  1048. package/rules/.source/quicktvui/src/nav-bar/QTINavBar.ts +11 -0
  1049. package/rules/.source/quicktvui/src/nav-bar/QTNavBar.ts +9 -0
  1050. package/rules/.source/quicktvui/src/nav-bar/QTNavBarItem.ts +9 -0
  1051. package/rules/.source/quicktvui/src/nav-bar/QTNavBarItemType.ts +3 -0
  1052. package/rules/.source/quicktvui/src/nav-bar/QtNavBarAPI.ts +36 -0
  1053. package/rules/.source/quicktvui/src/nav-bar/index.vue +220 -0
  1054. package/rules/.source/quicktvui/src/plugin/QTIPluginView.ts +11 -0
  1055. package/rules/.source/quicktvui/src/plugin/QTPluginView.ts +49 -0
  1056. package/rules/.source/quicktvui/src/plugin/QtPluginViewAPI.ts +44 -0
  1057. package/rules/.source/quicktvui/src/poster/QtPosterAPI.ts +9 -0
  1058. package/rules/.source/quicktvui/src/poster/core/QTIPoster.ts +3 -0
  1059. package/rules/.source/quicktvui/src/poster/core/QTPoster.ts +32 -0
  1060. package/rules/.source/quicktvui/src/poster/core/QTPosterCorner.ts +9 -0
  1061. package/rules/.source/quicktvui/src/poster/core/QTPosterElement.ts +8 -0
  1062. package/rules/.source/quicktvui/src/poster/core/QTPosterImage.ts +7 -0
  1063. package/rules/.source/quicktvui/src/poster/core/QTPosterPlaceholderImg.ts +4 -0
  1064. package/rules/.source/quicktvui/src/poster/core/QTPosterRipple.ts +10 -0
  1065. package/rules/.source/quicktvui/src/poster/core/QTPosterScore.ts +14 -0
  1066. package/rules/.source/quicktvui/src/poster/core/QTPosterShadow.ts +4 -0
  1067. package/rules/.source/quicktvui/src/poster/core/QTPosterShimmer.ts +4 -0
  1068. package/rules/.source/quicktvui/src/poster/core/QTPosterTitle.ts +17 -0
  1069. package/rules/.source/quicktvui/src/poster/index.vue +279 -0
  1070. package/rules/.source/quicktvui/src/poster/qt-poster-corner-title.vue +69 -0
  1071. package/rules/.source/quicktvui/src/poster/qt-poster-focus-title.vue +113 -0
  1072. package/rules/.source/quicktvui/src/progressbar/QTIProgressBar.ts +264 -0
  1073. package/rules/.source/quicktvui/src/progressbar/QTProgressBar.ts +1284 -0
  1074. package/rules/.source/quicktvui/src/progressbar/QtProgressBarAPI.ts +2637 -0
  1075. package/rules/.source/quicktvui/src/qrcode/QTIQRCode.ts +3 -0
  1076. package/rules/.source/quicktvui/src/qrcode/QTQRCodeView.ts +24 -0
  1077. package/rules/.source/quicktvui/src/qrcode/QtQRCodeAPI.ts +9 -0
  1078. package/rules/.source/quicktvui/src/qt/QtAPI.ts +337 -0
  1079. package/rules/.source/quicktvui/src/qt/QtAPIModule.ts +3 -0
  1080. package/rules/.source/quicktvui/src/qt/warning.ts +9 -0
  1081. package/rules/.source/quicktvui/src/qtListen/README.md +76 -0
  1082. package/rules/.source/quicktvui/src/qtListen/effect.ts +141 -0
  1083. package/rules/.source/quicktvui/src/qtListen/index.ts +11 -0
  1084. package/rules/.source/quicktvui/src/qtListen/qtArray.ts +156 -0
  1085. package/rules/.source/quicktvui/src/qtListen/qtDiff.ts +143 -0
  1086. package/rules/.source/quicktvui/src/qtListen/reactive.ts +205 -0
  1087. package/rules/.source/quicktvui/src/qtListen/ref.ts +98 -0
  1088. package/rules/.source/quicktvui/src/qtListen/types.ts +311 -0
  1089. package/rules/.source/quicktvui/src/qtListen/watch.ts +233 -0
  1090. package/rules/.source/quicktvui/src/replace-child/QTIReplaceChildView.ts +5 -0
  1091. package/rules/.source/quicktvui/src/replace-child/QTReplaceChildView.ts +30 -0
  1092. package/rules/.source/quicktvui/src/replace-child/QtReplaceChildViewAPI.ts +37 -0
  1093. package/rules/.source/quicktvui/src/row/QTIRow.ts +3 -0
  1094. package/rules/.source/quicktvui/src/row/QtRowAPI.ts +9 -0
  1095. package/rules/.source/quicktvui/src/row/index.vue +29 -0
  1096. package/rules/.source/quicktvui/src/scroll-view/QTIScrollView.ts +7 -0
  1097. package/rules/.source/quicktvui/src/scroll-view/QTScrollView.ts +45 -0
  1098. package/rules/.source/quicktvui/src/scroll-view/QtScrollViewAPI.ts +62 -0
  1099. package/rules/.source/quicktvui/src/section/index.vue +40 -0
  1100. package/rules/.source/quicktvui/src/seekbar/QTISeekBar.ts +277 -0
  1101. package/rules/.source/quicktvui/src/seekbar/QTSeekBar.ts +1380 -0
  1102. package/rules/.source/quicktvui/src/seekbar/QTSeekBarGravity.ts +5 -0
  1103. package/rules/.source/quicktvui/src/seekbar/QTSeekBarIndicatorMode.ts +6 -0
  1104. package/rules/.source/quicktvui/src/seekbar/QTSeekBarMode.ts +4 -0
  1105. package/rules/.source/quicktvui/src/seekbar/QTSeekBarTickMarkGravity.ts +5 -0
  1106. package/rules/.source/quicktvui/src/seekbar/QTSeekBarTickMarkLayoutGravity.ts +4 -0
  1107. package/rules/.source/quicktvui/src/seekbar/QTSeekBarTickMarkMode.ts +4 -0
  1108. package/rules/.source/quicktvui/src/seekbar/QtSeekBarAPI.ts +2645 -0
  1109. package/rules/.source/quicktvui/src/series/DataAdapter.ts +329 -0
  1110. package/rules/.source/quicktvui/src/series/QTIMediaSeries.ts +33 -0
  1111. package/rules/.source/quicktvui/src/series/QTMediaSeries.ts +9 -0
  1112. package/rules/.source/quicktvui/src/series/QTMediaSeriesData.ts +9 -0
  1113. package/rules/.source/quicktvui/src/series/QTMediaSeriesDataStyle.ts +4 -0
  1114. package/rules/.source/quicktvui/src/series/QTMediaSeriesEvent.ts +7 -0
  1115. package/rules/.source/quicktvui/src/series/QTMediaSeriesGroup.ts +8 -0
  1116. package/rules/.source/quicktvui/src/series/QTMediaSeriesGroupStyle.ts +58 -0
  1117. package/rules/.source/quicktvui/src/series/QTMediaSeriesStyleType.ts +5 -0
  1118. package/rules/.source/quicktvui/src/series/QTMediaSeriesType.ts +8 -0
  1119. package/rules/.source/quicktvui/src/series/QTMediaSeriesVip.ts +4 -0
  1120. package/rules/.source/quicktvui/src/series/QtMediaSeriesAPI.ts +140 -0
  1121. package/rules/.source/quicktvui/src/series/component/media-series.vue +160 -0
  1122. package/rules/.source/quicktvui/src/series/index.vue +316 -0
  1123. package/rules/.source/quicktvui/src/series/item/media-series-number-item.vue +212 -0
  1124. package/rules/.source/quicktvui/src/series/item/media-series-text-item.vue +239 -0
  1125. package/rules/.source/quicktvui/src/tab/QTITab.ts +163 -0
  1126. package/rules/.source/quicktvui/src/tab/QTTab.ts +8 -0
  1127. package/rules/.source/quicktvui/src/tab/QTTabDataManager.ts +620 -0
  1128. package/rules/.source/quicktvui/src/tab/QTTabEvent.ts +11 -0
  1129. package/rules/.source/quicktvui/src/tab/QTTabEventParams.ts +12 -0
  1130. package/rules/.source/quicktvui/src/tab/QTTabIndex.ts +8 -0
  1131. package/rules/.source/quicktvui/src/tab/QTTabItem.ts +5 -0
  1132. package/rules/.source/quicktvui/src/tab/QTTabItemType.ts +3 -0
  1133. package/rules/.source/quicktvui/src/tab/QTTabPage.ts +5 -0
  1134. package/rules/.source/quicktvui/src/tab/QTTabPageData.ts +11 -0
  1135. package/rules/.source/quicktvui/src/tab/QTTabPageDataState.ts +8 -0
  1136. package/rules/.source/quicktvui/src/tab/QTTabPageState.ts +8 -0
  1137. package/rules/.source/quicktvui/src/tab/QtTabAPI.ts +578 -0
  1138. package/rules/.source/quicktvui/src/tab/index.vue +1561 -0
  1139. package/rules/.source/quicktvui/src/tab/useQtTabWatch.ts +203 -0
  1140. package/rules/.source/quicktvui/src/text/QTIText.ts +12 -0
  1141. package/rules/.source/quicktvui/src/text/QTTextSpan.ts +6 -0
  1142. package/rules/.source/quicktvui/src/text/QTTextSpanAttribute.ts +6 -0
  1143. package/rules/.source/quicktvui/src/text/QTTextSpanAttributeType.ts +4 -0
  1144. package/rules/.source/quicktvui/src/text/QtTextAPI.ts +90 -0
  1145. package/rules/.source/quicktvui/src/text/index.vue +44 -0
  1146. package/rules/.source/quicktvui/src/theme/button.css +195 -0
  1147. package/rules/.source/quicktvui/src/typings/shims-vue.d.ts +6 -0
  1148. package/rules/.source/quicktvui/src/ul/QTIUL.ts +34 -0
  1149. package/rules/.source/quicktvui/src/ul/QTULInitPosition.ts +3 -0
  1150. package/rules/.source/quicktvui/src/ul/QtULAPI.ts +232 -0
  1151. package/rules/.source/quicktvui/src/utils/QtVirtualViewAPI.ts +32 -0
  1152. package/rules/.source/quicktvui/src/utils/VirtualView.ts +124 -0
  1153. package/rules/.source/quicktvui/src/utils/functions.ts +1 -0
  1154. package/rules/.source/quicktvui/src/utils/index.ts +3 -0
  1155. package/rules/.source/quicktvui/src/utils/make-installer.ts +16 -0
  1156. package/rules/.source/quicktvui/src/utils/objects.ts +4 -0
  1157. package/rules/.source/quicktvui/src/utils/type.ts +1 -0
  1158. package/rules/.source/quicktvui/src/utils/types.ts +42 -0
  1159. package/rules/.source/quicktvui/src/utils/utils.ts +62 -0
  1160. package/rules/.source/quicktvui/src/utils/vue/index.ts +3 -0
  1161. package/rules/.source/quicktvui/src/utils/vue/install.ts +48 -0
  1162. package/rules/.source/quicktvui/src/utils/vue/props/index.ts +3 -0
  1163. package/rules/.source/quicktvui/src/utils/vue/props/runtime.ts +129 -0
  1164. package/rules/.source/quicktvui/src/utils/vue/props/types.ts +165 -0
  1165. package/rules/.source/quicktvui/src/utils/vue/props/util.ts +10 -0
  1166. package/rules/.source/quicktvui/src/utils/vue/typescript.ts +9 -0
  1167. package/rules/.source/quicktvui/src/view/QTIView.ts +3 -0
  1168. package/rules/.source/quicktvui/src/view/QTIViewVisibility.ts +5 -0
  1169. package/rules/.source/quicktvui/src/view/QTViewEvent.ts +3 -0
  1170. package/rules/.source/quicktvui/src/view/QTViewState.ts +12 -0
  1171. package/rules/.source/quicktvui/src/view/QtViewAPI.ts +9 -0
  1172. package/rules/.source/quicktvui/src/view/index.vue +24 -0
  1173. package/rules/.source/quicktvui/src/waterfall/QtWaterfallAPI.ts +219 -0
  1174. package/rules/.source/quicktvui/src/waterfall/README.md +143 -0
  1175. package/rules/.source/quicktvui/src/waterfall/core/QTIWaterfall.ts +49 -0
  1176. package/rules/.source/quicktvui/src/waterfall/core/QTScrollState.ts +5 -0
  1177. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfall.ts +13 -0
  1178. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallCardItem.ts +11 -0
  1179. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallCardPlaceHolder.ts +10 -0
  1180. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallCardSection.ts +12 -0
  1181. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallDataAdapter.ts +195 -0
  1182. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallDataManager.ts +305 -0
  1183. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallEvent.ts +11 -0
  1184. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallFlexStyle.ts +19 -0
  1185. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallIndex.ts +7 -0
  1186. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallItem.ts +9 -0
  1187. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallItemType.ts +7 -0
  1188. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallPlaceholder.ts +5 -0
  1189. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallPluginItem.ts +9 -0
  1190. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallPluginSection.ts +8 -0
  1191. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallSection.ts +17 -0
  1192. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallSectionType.ts +14 -0
  1193. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallTabItem.ts +10 -0
  1194. package/rules/.source/quicktvui/src/waterfall/core/QTWaterfallVisibleType.ts +7 -0
  1195. package/rules/.source/quicktvui/src/waterfall/index.vue +704 -0
  1196. package/rules/.source/quicktvui/src/waterfall/item/card-item.vue +49 -0
  1197. package/rules/.source/quicktvui/src/waterfall/item/plugin-item.vue +52 -0
  1198. package/rules/.source/quicktvui/src/waterfall/section/blank-section.vue +27 -0
  1199. package/rules/.source/quicktvui/src/waterfall/section/card-section.vue +81 -0
  1200. package/rules/.source/quicktvui/src/waterfall/section/end-section.vue +50 -0
  1201. package/rules/.source/quicktvui/src/waterfall/section/flex-section.vue +167 -0
  1202. package/rules/.source/quicktvui/src/waterfall/section/list-section.vue +247 -0
  1203. package/rules/.source/quicktvui/src/waterfall/section/loading-section.vue +34 -0
  1204. package/rules/.source/quicktvui/src/waterfall/section/plugin-section.vue +87 -0
  1205. package/rules/.source/quicktvui/src/waterfall/section/section-title.vue +63 -0
  1206. package/rules/.source/quicktvui/src/waterfall/section/vue-section.vue +44 -0
  1207. package/rules/.source/quicktvui/src/webview/QTIWebView.ts +199 -0
  1208. package/rules/.source/quicktvui/src/webview/QTWebView.ts +957 -0
  1209. package/rules/.source/quicktvui/src/webview/QTWebViewInterceptRule.ts +4 -0
  1210. package/rules/.source/quicktvui/src/webview/QTWebViewLayerType.ts +6 -0
  1211. package/rules/.source/quicktvui/src/webview/QTWebViewSniffingRule.ts +18 -0
  1212. package/rules/.source/quicktvui/src/webview/QtWebViewAPI.ts +1963 -0
  1213. package/rules/.source/quicktvui/src/x5webview/QTIX5WebView.ts +211 -0
  1214. package/rules/.source/quicktvui/src/x5webview/QTX5WebView.ts +1014 -0
  1215. package/rules/.source/quicktvui/src/x5webview/QTX5WebViewInterceptRule.ts +4 -0
  1216. package/rules/.source/quicktvui/src/x5webview/QTX5WebViewLayerType.ts +6 -0
  1217. package/rules/.source/quicktvui/src/x5webview/QTX5WebViewSniffingRule.ts +18 -0
  1218. package/rules/.source/quicktvui/src/x5webview/QtX5WebViewAPI.ts +2015 -0
  1219. package/rules/.source/quicktvui/tsconfig.json +34 -0
  1220. package/rules/.source/quicktvui/web-types.json +1 -0
  1221. package/rules/.source/quicktvui/yarn.lock +72 -0
  1222. package/rules/.source/web/audio/index.ts +9 -0
  1223. package/rules/.source/web/audio/src/audio.ts +34 -0
  1224. package/rules/.source/web/audio/src/audio.vue +146 -0
  1225. package/rules/.source/web/audio/src/instance.ts +3 -0
  1226. package/rules/.source/web/audio-service/index.ts +10 -0
  1227. package/rules/.source/web/audio-service/src/audio-service.ts +34 -0
  1228. package/rules/.source/web/audio-service/src/audio-service.vue +115 -0
  1229. package/rules/.source/web/audio-service/src/instance.ts +3 -0
  1230. package/rules/.source/web/base/index.ts +1 -0
  1231. package/rules/.source/web/base/src/base-types.ts +1 -0
  1232. package/rules/.source/web/component.ts +25 -0
  1233. package/rules/.source/web/docs/h.txt +6 -0
  1234. package/rules/.source/web/docs/video.txt +88 -0
  1235. package/rules/.source/web/h1/index.ts +9 -0
  1236. package/rules/.source/web/h1/src/h1.ts +9 -0
  1237. package/rules/.source/web/h1/src/h1.vue +30 -0
  1238. package/rules/.source/web/h1/src/instance.ts +3 -0
  1239. package/rules/.source/web/h2/index.ts +9 -0
  1240. package/rules/.source/web/h2/src/h2.ts +9 -0
  1241. package/rules/.source/web/h2/src/h2.vue +30 -0
  1242. package/rules/.source/web/h2/src/instance.ts +3 -0
  1243. package/rules/.source/web/h3/index.ts +9 -0
  1244. package/rules/.source/web/h3/src/h3.ts +9 -0
  1245. package/rules/.source/web/h3/src/h3.vue +30 -0
  1246. package/rules/.source/web/h3/src/instance.ts +3 -0
  1247. package/rules/.source/web/h4/index.ts +9 -0
  1248. package/rules/.source/web/h4/src/h4.ts +9 -0
  1249. package/rules/.source/web/h4/src/h4.vue +30 -0
  1250. package/rules/.source/web/h4/src/instance.ts +3 -0
  1251. package/rules/.source/web/h5/index.ts +9 -0
  1252. package/rules/.source/web/h5/src/h5.ts +9 -0
  1253. package/rules/.source/web/h5/src/h5.vue +30 -0
  1254. package/rules/.source/web/h5/src/instance.ts +3 -0
  1255. package/rules/.source/web/h6/index.ts +9 -0
  1256. package/rules/.source/web/h6/src/h6.ts +9 -0
  1257. package/rules/.source/web/h6/src/h6.vue +30 -0
  1258. package/rules/.source/web/h6/src/instance.ts +3 -0
  1259. package/rules/.source/web/index.ts +84 -0
  1260. package/rules/.source/web/package.json +24 -0
  1261. package/rules/.source/web/plugin.ts +3 -0
  1262. package/rules/.source/web/rollup.config.js +37 -0
  1263. package/rules/.source/web/shims-vue.d.ts +6 -0
  1264. package/rules/.source/web/source/index.ts +9 -0
  1265. package/rules/.source/web/source/src/instance.ts +3 -0
  1266. package/rules/.source/web/source/src/source.ts +17 -0
  1267. package/rules/.source/web/source/src/source.vue +19 -0
  1268. package/rules/.source/web/tsconfig.json +34 -0
  1269. package/rules/.source/web/utils/functions.ts +1 -0
  1270. package/rules/.source/web/utils/index.ts +3 -0
  1271. package/rules/.source/web/utils/make-installer.ts +16 -0
  1272. package/rules/.source/web/utils/objects.ts +4 -0
  1273. package/rules/.source/web/utils/types.ts +42 -0
  1274. package/rules/.source/web/utils/vue/index.ts +3 -0
  1275. package/rules/.source/web/utils/vue/install.ts +48 -0
  1276. package/rules/.source/web/utils/vue/props/index.ts +3 -0
  1277. package/rules/.source/web/utils/vue/props/runtime.ts +129 -0
  1278. package/rules/.source/web/utils/vue/props/types.ts +165 -0
  1279. package/rules/.source/web/utils/vue/props/util.ts +10 -0
  1280. package/rules/.source/web/utils/vue/typescript.ts +9 -0
  1281. package/rules/.source/web/video/index.ts +9 -0
  1282. package/rules/.source/web/video/src/instance.ts +3 -0
  1283. package/rules/.source/web/video/src/video.ts +34 -0
  1284. package/rules/.source/web/video/src/video.vue +171 -0
  1285. package/rules/.windsurfrules +28 -4
  1286. package/rules/AGENTS.md +28 -4
  1287. package/rules/CLAUDE.md +28 -3
  1288. package/rules/GEMINI.md +26 -3
@@ -0,0 +1,1930 @@
1
+ import registerPageRouteView from "./page/PageRouteView";
2
+ import registerPageView from "./page/PageView";
3
+ import registerSlotRootView from "./slot/SlotRootView";
4
+ import registerSlotView from "./slot/SlotView";
5
+
6
+ import {
7
+ isRouteName,
8
+ Lazy,
9
+ MatcherLocationRaw,
10
+ NavigationGuardWithThis,
11
+ NavigationHookAfter,
12
+ RouteLocation,
13
+ RouteLocationMatched,
14
+ RouteLocationNormalized,
15
+ RouteLocationNormalizedLoaded,
16
+ RouteLocationOptions,
17
+ RouteLocationRaw,
18
+ RouteParams,
19
+ RouteRecordName,
20
+ RouteRecordRaw,
21
+ START_LOCATION_NORMALIZED,
22
+ } from "./types";
23
+ import {
24
+ HistoryLocation,
25
+ HistoryState,
26
+ NavigationType,
27
+ RouterHistory,
28
+ } from "./history/common";
29
+ import {
30
+ _ScrollPositionNormalized,
31
+ computeScrollPosition,
32
+ getSavedScrollPosition,
33
+ getScrollKey,
34
+ saveScrollPosition,
35
+ ScrollPosition,
36
+ scrollToPosition,
37
+ } from "./scrollBehavior";
38
+ import { createRouterMatcher, PathParserOptions } from "./matcher";
39
+ import {
40
+ createRouterError,
41
+ ErrorTypes,
42
+ isNavigationFailure,
43
+ NavigationFailure,
44
+ NavigationRedirectError,
45
+ } from "./errors";
46
+ import { applyToParams, assign, isArray, isBrowser, noop } from "./utils";
47
+ import { useCallbacks } from "./utils/callbacks";
48
+ import { decode, encodeHash, encodeParam } from "./encoding";
49
+ import {
50
+ LocationQuery,
51
+ normalizeQuery,
52
+ parseQuery as originalParseQuery,
53
+ stringifyQuery as originalStringifyQuery,
54
+ } from "./query";
55
+ import {
56
+ App,
57
+ ComponentPublicInstance,
58
+ computed,
59
+ ComputedRef,
60
+ nextTick,
61
+ reactive,
62
+ Ref,
63
+ ref,
64
+ shallowRef,
65
+ unref,
66
+ } from "vue";
67
+ import {
68
+ ESRouteLaunchMode,
69
+ ESRouteType,
70
+ LifecycleState,
71
+ RouteRecord,
72
+ RouteRecordNormalized,
73
+ } from "./matcher/types";
74
+ import {
75
+ isSameRouteLocation,
76
+ isSameRouteRecord,
77
+ parseURL,
78
+ stringifyURL,
79
+ } from "./location";
80
+ import { extractComponentsGuards, guardToPromiseFn } from "./navigationGuards";
81
+ import { warn } from "./warning";
82
+ import { RouterLink } from "./RouterLink";
83
+
84
+ import { RouterView } from "./RouterView";
85
+ import { SlotView } from "./SlotView";
86
+
87
+ import { RouteResult } from "./result/RouteResult";
88
+
89
+ import {
90
+ nativeRouterKey,
91
+ navigationTypeKey,
92
+ routeLocationKey,
93
+ routerComponentInstanceKey,
94
+ routerHistoryKey,
95
+ routerKey,
96
+ routerRecordRawKey,
97
+ routerViewLocationKey,
98
+ routerViewNameKey,
99
+ routerViewInstanceKey,
100
+ routeViewInstancesKey,
101
+ } from "./injectionSymbols";
102
+ import { addDevtools } from "./devtools";
103
+ import { createESNativeRouterForAndroid } from "./es/ESNativeRouter.android";
104
+ import { createESNativeRouterForHarmony } from "./es/ESNativeRouter.harmony";
105
+ import { info } from "./log/info";
106
+ import { Native } from "@extscreen/es3-vue";
107
+ import { triggerESLifecycle } from "@extscreen/es3-vue";
108
+
109
+ /**
110
+ * Internal type to define an ErrorHandler
111
+ *
112
+ * @param error - error thrown
113
+ * @param to - location we were navigating to when the error happened
114
+ * @param from - location we were navigating from when the error happened
115
+ * @internal
116
+ */
117
+ export type _ErrorHandler = (
118
+ error: any,
119
+ to: RouteLocationNormalized,
120
+ from: RouteLocationNormalizedLoaded,
121
+ ) => any;
122
+ // resolve, reject arguments of Promise constructor
123
+ type OnReadyCallback = [() => void, (reason?: any) => void];
124
+
125
+ type Awaitable<T> = T | Promise<T>;
126
+
127
+ /**
128
+ * Type of the `scrollBehavior` option that can be passed to `createRouter`.
129
+ */
130
+ export interface RouterScrollBehavior {
131
+ /**
132
+ * @param to - Route location where we are navigating to
133
+ * @param from - Route location where we are navigating from
134
+ * @param savedPosition - saved position if it exists, `null` otherwise
135
+ */
136
+ (
137
+ to: RouteLocationNormalized,
138
+ from: RouteLocationNormalizedLoaded,
139
+ savedPosition: _ScrollPositionNormalized | null,
140
+ ): Awaitable<ScrollPosition | false | void>;
141
+ }
142
+
143
+ /**
144
+ * Options to initialize a {@link Router} instance.
145
+ */
146
+ export interface RouterOptions extends PathParserOptions {
147
+ /**
148
+ * History implementation used by the router. Most web applications should use
149
+ * `createWebHistory` but it requires the server to be properly configured.
150
+ * You can also use a _hash_ based history with `createWebHashHistory` that
151
+ * does not require any configuration on the server but isn't handled at all
152
+ * by search engines and does poorly on SEO.
153
+ *
154
+ * @example
155
+ * ```js
156
+ * createRouter({
157
+ * history: createWebHistory(),
158
+ * // other options...
159
+ * })
160
+ * ```
161
+ */
162
+ history: RouterHistory;
163
+ /**
164
+ * Initial list of routes that should be added to the router.
165
+ */
166
+ routes: Readonly<RouteRecordRaw[]>;
167
+ /**
168
+ * Function to control scrolling when navigating between pages. Can return a
169
+ * Promise to delay scrolling. Check {@link ScrollBehavior}.
170
+ *
171
+ * @example
172
+ * ```js
173
+ * function scrollBehavior(to, from, savedPosition) {
174
+ * // `to` and `from` are both route locations
175
+ * // `savedPosition` can be null if there isn't one
176
+ * }
177
+ * ```
178
+ */
179
+ scrollBehavior?: RouterScrollBehavior;
180
+ /**
181
+ * Custom implementation to parse a query. See its counterpart,
182
+ * {@link RouterOptions.stringifyQuery}.
183
+ *
184
+ * @example
185
+ * Let's say you want to use the [qs package](https://github.com/ljharb/qs)
186
+ * to parse queries, you can provide both `parseQuery` and `stringifyQuery`:
187
+ * ```js
188
+ * import qs from 'qs'
189
+ *
190
+ * createRouter({
191
+ * // other options...
192
+ * parseQuery: qs.parse,
193
+ * stringifyQuery: qs.stringify,
194
+ * })
195
+ * ```
196
+ */
197
+ parseQuery?: typeof originalParseQuery;
198
+ /**
199
+ * Custom implementation to stringify a query object. Should not prepend a leading `?`.
200
+ * {@link RouterOptions.parseQuery | parseQuery} counterpart to handle query parsing.
201
+ */
202
+ stringifyQuery?: typeof originalStringifyQuery;
203
+ /**
204
+ * Default class applied to active {@link RouterLink}. If none is provided,
205
+ * `router-link-active` will be applied.
206
+ */
207
+ linkActiveClass?: string;
208
+ /**
209
+ * Default class applied to exact active {@link RouterLink}. If none is provided,
210
+ * `router-link-exact-active` will be applied.
211
+ */
212
+ linkExactActiveClass?: string;
213
+ /**
214
+ * Default class applied to non-active {@link RouterLink}. If none is provided,
215
+ * `router-link-inactive` will be applied.
216
+ */
217
+ // linkInactiveClass?: string
218
+
219
+ /**
220
+ * router history stack limit number
221
+ */
222
+ limit?: number;
223
+
224
+ /**
225
+ * main router
226
+ */
227
+ main?: string;
228
+
229
+ /**
230
+ * error router
231
+ */
232
+ error?: string;
233
+
234
+ /**
235
+ * types
236
+ */
237
+ types: Array<ESRouteType>;
238
+ }
239
+
240
+ /**
241
+ * Router instance.
242
+ */
243
+ export interface Router {
244
+ /**
245
+ * @internal
246
+ */
247
+ // readonly history: RouterHistory
248
+ /**
249
+ * Current {@link RouteLocationNormalized}
250
+ */
251
+ readonly currentRoute: Ref<RouteLocationNormalizedLoaded>;
252
+ /**
253
+ * Original options object passed to create the Router
254
+ */
255
+ readonly options: RouterOptions;
256
+
257
+ /**
258
+ * Allows turning off the listening of history events. This is a low level api for micro-frontends.
259
+ */
260
+ listening: boolean;
261
+
262
+ /**
263
+ * Add a new {@link RouteRecordRaw | route record} as the child of an existing route.
264
+ *
265
+ * @param parentName - Parent Route Record where `route` should be appended at
266
+ * @param route - Route Record to add
267
+ */
268
+ addRoute(parentName: RouteRecordName, route: RouteRecordRaw): () => void;
269
+
270
+ /**
271
+ * Add a new {@link RouteRecordRaw | route record} to the router.
272
+ *
273
+ * @param route - Route Record to add
274
+ */
275
+ addRoute(route: RouteRecordRaw): () => void;
276
+
277
+ /**
278
+ * Remove an existing route by its name.
279
+ *
280
+ * @param name - Name of the route to remove
281
+ */
282
+ removeRoute(name: RouteRecordName): void;
283
+
284
+ /**
285
+ * Checks if a route with a given name exists
286
+ *
287
+ * @param name - Name of the route to check
288
+ */
289
+ hasRoute(name: RouteRecordName): boolean;
290
+
291
+ /**
292
+ * Get a full list of all the {@link RouteRecord | route records}.
293
+ */
294
+ getRoutes(): RouteRecord[];
295
+
296
+ /**
297
+ *
298
+ */
299
+ getRouterHistory(): RouterHistory;
300
+
301
+ /**
302
+ * Get RouteRecord | route records.
303
+ * @param name - Name of the route to check
304
+ */
305
+ getRoute(name: RouteRecordName): RouteRecord | undefined;
306
+
307
+ /**
308
+ * Returns the {@link RouteLocation | normalized version} of a
309
+ * {@link RouteLocationRaw | route location}. Also includes an `href` property
310
+ * that includes any existing `base`. By default, the `currentLocation` used is
311
+ * `router.currentRoute` and should only be overridden in advanced use cases.
312
+ *
313
+ * @param to - Raw route location to resolve
314
+ * @param currentLocation - Optional current location to resolve against
315
+ */
316
+ resolve(
317
+ to: RouteLocationRaw,
318
+ currentLocation?: RouteLocationNormalizedLoaded,
319
+ ): RouteLocation & { href: string };
320
+
321
+ /**
322
+ * Programmatically navigate to a new URL by pushing an entry in the history
323
+ * stack.
324
+ *
325
+ * @param to - Route location to navigate to
326
+ */
327
+ push(to: RouteLocationRaw): Promise<NavigationFailure | void | undefined>;
328
+
329
+ /**
330
+ * Programmatically navigate to a new URL by replacing the current entry in
331
+ * the history stack.
332
+ *
333
+ * @param to - Route location to navigate to
334
+ */
335
+ replace(to: RouteLocationRaw): Promise<NavigationFailure | void | undefined>;
336
+
337
+ /**
338
+ *
339
+ * @param to - Route location to navigate to
340
+ */
341
+ splice(to: RouteLocationRaw): boolean;
342
+
343
+ /**
344
+ *
345
+ * @param result
346
+ */
347
+ setResult(result: RouteResult): Promise<any>;
348
+
349
+ /**
350
+ * Go back in history if possible by calling `history.back()`. Equivalent to
351
+ * `router.go(-1)`.
352
+ */
353
+ back(): ReturnType<Router["go"]>;
354
+
355
+ /**
356
+ * Go forward in history if possible by calling `history.forward()`.
357
+ * Equivalent to `router.go(1)`.
358
+ */
359
+ forward(): ReturnType<Router["go"]>;
360
+
361
+ /**
362
+ * Allows you to move forward or backward through the history. Calls
363
+ * `history.go()`.
364
+ *
365
+ * @param delta - The position in the history to which you want to move,
366
+ * relative to the current page
367
+ */
368
+ go(delta: number): boolean;
369
+
370
+ /**
371
+ * Add a navigation guard that executes before any navigation. Returns a
372
+ * function that removes the registered guard.
373
+ *
374
+ * @param guard - navigation guard to add
375
+ */
376
+ beforeEach(guard: NavigationGuardWithThis<undefined>): () => void;
377
+
378
+ /**
379
+ * Add a navigation guard that executes before navigation is about to be
380
+ * resolved. At this state all component have been fetched and other
381
+ * navigation guards have been successful. Returns a function that removes the
382
+ * registered guard.
383
+ *
384
+ * @example
385
+ * ```js
386
+ * router.beforeResolve(to => {
387
+ * if (to.meta.requiresAuth && !isAuthenticated) return false
388
+ * })
389
+ * ```
390
+ *
391
+ * @param guard - navigation guard to add
392
+ */
393
+ beforeResolve(guard: NavigationGuardWithThis<undefined>): () => void;
394
+
395
+ /**
396
+ * Add a navigation hook that is executed after every navigation. Returns a
397
+ * function that removes the registered hook.
398
+ *
399
+ * @example
400
+ * ```js
401
+ * router.afterEach((to, from, failure) => {
402
+ * if (isNavigationFailure(failure)) {
403
+ * console.log('failed navigation', failure)
404
+ * }
405
+ * })
406
+ * ```
407
+ *
408
+ * @param guard - navigation hook to add
409
+ */
410
+ afterEach(guard: NavigationHookAfter): () => void;
411
+
412
+ /**
413
+ * Adds an error handler that is called every time a non caught error happens
414
+ * during navigation. This includes errors thrown synchronously and
415
+ * asynchronously, errors returned or passed to `next` in any navigation
416
+ * guard, and errors occurred when trying to resolve an async component that
417
+ * is required to render a route.
418
+ *
419
+ * @param handler - error handler to register
420
+ */
421
+ onError(handler: _ErrorHandler): () => void;
422
+
423
+ /**
424
+ * Returns a Promise that resolves when the router has completed the initial
425
+ * navigation, which means it has resolved all async enter hooks and async
426
+ * components that are associated with the initial route. If the initial
427
+ * navigation already happened, the promise resolves immediately.
428
+ *
429
+ * This is useful in server-side rendering to ensure consistent output on both
430
+ * the server and the client. Note that on server side, you need to manually
431
+ * push the initial location while on client side, the router automatically
432
+ * picks it up from the URL.
433
+ */
434
+ isReady(): Promise<void>;
435
+
436
+ /**
437
+ * Called automatically by `app.use(router)`. Should not be called manually by
438
+ * the user. This will trigger the initial navigation when on client side.
439
+ *
440
+ * @internal
441
+ * @param app - Application that uses the router
442
+ */
443
+ install(app: App): void;
444
+
445
+ /**
446
+ * 当前是否处于前台
447
+ */
448
+ readonly active: boolean;
449
+
450
+ setActive(active: boolean): void;
451
+ }
452
+
453
+ /**
454
+ * Creates a Router instance that can be used by a Vue app.
455
+ *
456
+ * @param options - {@link RouterOptions}
457
+ */
458
+ export function createRouter(options: RouterOptions): Router {
459
+ const matcher = createRouterMatcher(options.routes, options);
460
+ const parseQuery = options.parseQuery || originalParseQuery;
461
+ const stringifyQuery = options.stringifyQuery || originalStringifyQuery;
462
+ const routerHistory = options.history;
463
+ const routeRecordRawList: RouteLocationRaw[] = options.routes;
464
+ const limit: number | undefined = options.limit;
465
+ const routeTypes: Array<ESRouteType> = options.types;
466
+
467
+ //---------------------------------------------------------------
468
+ const _active = ref(true);
469
+
470
+ function getActive(): boolean {
471
+ return _active.value;
472
+ }
473
+
474
+ function setActive(active: boolean): void {
475
+ info("router setActive:", active);
476
+ _active.value = active;
477
+ }
478
+
479
+ //---------------------------------------------------------------
480
+
481
+ function isSupportSlotType() {
482
+ const index = routeTypes.findIndex(
483
+ (type) => type == ESRouteType.ES_ROUTE_TYPE_SLOT,
484
+ );
485
+ return index > -1;
486
+ }
487
+
488
+ //原生路由
489
+ const nativeRouter = Native.isAndroid()
490
+ ? createESNativeRouterForAndroid(isSupportSlotType())
491
+ : createESNativeRouterForHarmony(isSupportSlotType());
492
+
493
+ if (__DEV__ && !routerHistory)
494
+ throw new Error(
495
+ 'Provide the "history" option when calling "createRouter()":' +
496
+ " https://next.router.vuejs.org/api/#history.",
497
+ );
498
+
499
+ const beforeGuards = useCallbacks<NavigationGuardWithThis<undefined>>();
500
+ const beforeResolveGuards =
501
+ useCallbacks<NavigationGuardWithThis<undefined>>();
502
+ const afterGuards = useCallbacks<NavigationHookAfter>();
503
+ const currentRoute = shallowRef<RouteLocationNormalizedLoaded>(
504
+ START_LOCATION_NORMALIZED,
505
+ );
506
+ let pendingLocation: RouteLocation = START_LOCATION_NORMALIZED;
507
+
508
+ //
509
+ const navigationType = shallowRef<NavigationType>(NavigationType.push);
510
+
511
+ //router view name : default
512
+ const routerViewName = shallowRef<string>();
513
+
514
+ //
515
+ const routerComponentInstance = ref<ComponentPublicInstance | undefined>();
516
+ const routerViewInstance = ref<ComponentPublicInstance | undefined>();
517
+ const routeViewInstanceList: Ref<ComponentPublicInstance | undefined>[] = [];
518
+ // leave the scrollRestoration if no scrollBehavior is provided
519
+ if (isBrowser && options.scrollBehavior && "scrollRestoration" in history) {
520
+ history.scrollRestoration = "manual";
521
+ }
522
+
523
+ const normalizeParams = applyToParams.bind(
524
+ null,
525
+ (paramValue) => "" + paramValue,
526
+ );
527
+ const encodeParams = applyToParams.bind(null, encodeParam);
528
+ const decodeParams: (params: RouteParams | undefined) => RouteParams =
529
+ // @ts-expect-error: intentionally avoid the type check
530
+ applyToParams.bind(null, decode);
531
+
532
+ function addRoute(
533
+ parentOrRoute: RouteRecordName | RouteRecordRaw,
534
+ route?: RouteRecordRaw,
535
+ ) {
536
+ let parent: Parameters<(typeof matcher)["addRoute"]>[1] | undefined;
537
+ let record: RouteRecordRaw;
538
+ if (isRouteName(parentOrRoute)) {
539
+ parent = matcher.getRecordMatcher(parentOrRoute);
540
+ record = route!;
541
+ } else {
542
+ record = parentOrRoute;
543
+ }
544
+
545
+ return matcher.addRoute(record, parent);
546
+ }
547
+
548
+ function removeRoute(name: RouteRecordName) {
549
+ const recordMatcher = matcher.getRecordMatcher(name);
550
+ if (recordMatcher) {
551
+ matcher.removeRoute(recordMatcher);
552
+ } else if (__DEV__) {
553
+ warn(`Cannot remove non-existent route "${String(name)}"`);
554
+ }
555
+ }
556
+
557
+ function getRoutes() {
558
+ return matcher.getRoutes().map((routeMatcher) => routeMatcher.record);
559
+ }
560
+
561
+ function getRouterHistory() {
562
+ return routerHistory;
563
+ }
564
+
565
+ function getRoute(name: RouteRecordName) {
566
+ const routeRecordMatcher = matcher.getRecordMatcher(name);
567
+ if (routeRecordMatcher) {
568
+ return routeRecordMatcher.record;
569
+ }
570
+ return undefined;
571
+ }
572
+
573
+ function hasRoute(name: RouteRecordName): boolean {
574
+ return !!matcher.getRecordMatcher(name);
575
+ }
576
+
577
+ function resolve(
578
+ rawLocation: Readonly<RouteLocationRaw>,
579
+ currentLocation?: RouteLocationNormalizedLoaded,
580
+ ): RouteLocation & { href: string } {
581
+ //
582
+ let key: string = new Date().getTime().toString();
583
+
584
+ // const objectLocation = routerLocationAsObject(rawLocation)
585
+ // we create a copy to modify it later
586
+ currentLocation = assign({}, currentLocation || currentRoute.value);
587
+ if (typeof rawLocation === "string") {
588
+ const locationNormalized = parseURL(
589
+ parseQuery,
590
+ rawLocation,
591
+ currentLocation.path,
592
+ );
593
+ const matchedRoute = matcher.resolve(
594
+ { path: locationNormalized.path },
595
+ currentLocation,
596
+ );
597
+
598
+ const href = routerHistory.createHref(locationNormalized.fullPath);
599
+ if (__DEV__) {
600
+ if (href.startsWith("//"))
601
+ warn(
602
+ `Location "${rawLocation}" resolved to "${href}". A resolved location cannot start with multiple slashes.`,
603
+ );
604
+ else if (!matchedRoute.matched.length) {
605
+ warn(`No match found for location with path "${rawLocation}"`);
606
+ }
607
+ }
608
+
609
+ // locationNormalized is always a new object
610
+ return assign(locationNormalized, matchedRoute, {
611
+ key: key,
612
+ params: decodeParams(matchedRoute.params),
613
+ hash: decode(locationNormalized.hash),
614
+ redirectedFrom: undefined,
615
+ href,
616
+ });
617
+ }
618
+
619
+ let matcherLocation: MatcherLocationRaw;
620
+
621
+ // path could be relative in object as well
622
+ if ("path" in rawLocation) {
623
+ if (
624
+ __DEV__ &&
625
+ "params" in rawLocation &&
626
+ !("name" in rawLocation) &&
627
+ // @ts-expect-error: the type is never
628
+ Object.keys(rawLocation.params).length
629
+ ) {
630
+ warn(
631
+ `Path "${rawLocation.path}" was passed with params but they will be ignored. Use a named route alongside params instead.`,
632
+ );
633
+ }
634
+ matcherLocation = assign({}, rawLocation, {
635
+ path: parseURL(parseQuery, rawLocation.path, currentLocation.path).path,
636
+ });
637
+ } else {
638
+ // remove any nullish param
639
+ const targetParams = assign({}, rawLocation.params);
640
+ for (const key in targetParams) {
641
+ if (targetParams[key] == null) {
642
+ delete targetParams[key];
643
+ }
644
+ }
645
+ // pass encoded values to the matcher, so it can produce encoded path and fullPath
646
+ matcherLocation = assign({}, rawLocation, {
647
+ params: encodeParams(targetParams),
648
+ });
649
+ // current location params are decoded, we need to encode them in case the
650
+ // matcher merges the params
651
+ currentLocation.params = encodeParams(currentLocation.params);
652
+ }
653
+
654
+ const matchedRoute = matcher.resolve(matcherLocation, currentLocation);
655
+ const hash = rawLocation.hash || "";
656
+
657
+ if (__DEV__ && hash && !hash.startsWith("#")) {
658
+ warn(
659
+ `A \`hash\` should always start with the character "#". Replace "${hash}" with "#${hash}".`,
660
+ );
661
+ }
662
+
663
+ // the matcher might have merged current location params, so
664
+ // we need to run the decoding again
665
+ matchedRoute.params = normalizeParams(decodeParams(matchedRoute.params));
666
+
667
+ const fullPath = stringifyURL(
668
+ stringifyQuery,
669
+ assign({}, rawLocation, {
670
+ hash: encodeHash(hash),
671
+ path: matchedRoute.path,
672
+ }),
673
+ );
674
+
675
+ const href = routerHistory.createHref(fullPath);
676
+ if (__DEV__) {
677
+ if (href.startsWith("//")) {
678
+ warn(
679
+ `Location "${rawLocation}" resolved to "${href}". A resolved location cannot start with multiple slashes.`,
680
+ );
681
+ } else if (!matchedRoute.matched.length) {
682
+ warn(
683
+ `No match found for location with path "${
684
+ "path" in rawLocation ? rawLocation.path : rawLocation
685
+ }"`,
686
+ );
687
+ }
688
+ }
689
+
690
+ let resultCallback = {};
691
+
692
+ if (typeof rawLocation === "object") {
693
+ const rawKey = (rawLocation as RouteLocationOptions).key;
694
+ if (rawKey) {
695
+ key = rawKey;
696
+ }
697
+ //
698
+ const callback = (rawLocation as RouteLocationOptions).resultCallback;
699
+ if (callback) {
700
+ resultCallback = {
701
+ resultCallback: callback,
702
+ };
703
+ }
704
+ }
705
+
706
+ /**
707
+ * TODO LIULIPENG 参数转换
708
+ */
709
+ return assign(
710
+ {
711
+ key: key,
712
+ fullPath,
713
+ // keep the hash encoded so fullPath is effectively path + encodedQuery +
714
+ // hash
715
+ hash,
716
+ query:
717
+ // if the user is using a custom query lib like qs, we might have
718
+ // nested objects, so we keep the query as is, meaning it can contain
719
+ // numbers at `$route.query`, but at the point, the user will have to
720
+ // use their own type anyway.
721
+ // https://github.com/vuejs/router/issues/328#issuecomment-649481567
722
+ stringifyQuery === originalStringifyQuery
723
+ ? normalizeQuery(rawLocation.query)
724
+ : ((rawLocation.query || {}) as LocationQuery),
725
+ },
726
+ matchedRoute,
727
+ {
728
+ redirectedFrom: undefined,
729
+ href,
730
+ },
731
+ resultCallback,
732
+ );
733
+ }
734
+
735
+ function locationAsObject(
736
+ to: RouteLocationRaw | RouteLocationNormalized,
737
+ ): Exclude<RouteLocationRaw, string> | RouteLocationNormalized {
738
+ return typeof to === "string"
739
+ ? parseURL(parseQuery, to, currentRoute.value.path)
740
+ : assign({}, to);
741
+ }
742
+
743
+ function checkCanceledNavigation(
744
+ to: RouteLocationNormalized,
745
+ from: RouteLocationNormalized,
746
+ ): NavigationFailure | void {
747
+ if (pendingLocation !== to) {
748
+ return createRouterError<NavigationFailure>(
749
+ ErrorTypes.NAVIGATION_CANCELLED,
750
+ {
751
+ from,
752
+ to,
753
+ },
754
+ );
755
+ }
756
+ }
757
+
758
+ function setResult(result: RouteResult): Promise<any> {
759
+ try {
760
+ const historyLocationList = routerHistory.getHistoryLocations();
761
+ if (historyLocationList && historyLocationList.length > 0) {
762
+ const topHistoryLocation: HistoryLocation =
763
+ historyLocationList[historyLocationList.length - 1];
764
+ console.log(
765
+ "ESRouter:setResult: route:",
766
+ topHistoryLocation.location,
767
+ " lifecycle:" + topHistoryLocation.lifecycle,
768
+ );
769
+ if (topHistoryLocation && topHistoryLocation.resultCallback) {
770
+ const ret = topHistoryLocation.resultCallback.onResult(result);
771
+ console.log("ESRouter:setResult: onResult:", ret);
772
+ if (ret instanceof Promise) {
773
+ return ret as Promise<any>;
774
+ }
775
+ return Promise.resolve();
776
+ } else {
777
+ console.log("ESRouter:setResult: resultCallback is null ...");
778
+ }
779
+ }
780
+ } catch (e) {
781
+ console.log("ESRouter:setResult: error", e);
782
+ }
783
+ return Promise.reject();
784
+ }
785
+
786
+ function push(to: RouteLocationRaw) {
787
+ navigationType.value = NavigationType.push;
788
+ return pushWithRedirect(to);
789
+ }
790
+
791
+ function replace(to: RouteLocationRaw) {
792
+ navigationType.value = NavigationType.pop;
793
+ return push(assign(locationAsObject(to), { replace: true }));
794
+ }
795
+
796
+ function splice(to: RouteLocationRaw): boolean {
797
+ navigationType.value = NavigationType.splice;
798
+ const targetLocation: RouteLocation = (pendingLocation = resolve(to));
799
+ const toLocation = targetLocation as RouteLocationNormalized;
800
+ const location = resolveHistoryLocation(
801
+ toLocation.key,
802
+ toLocation.fullPath,
803
+ toLocation.resultCallback,
804
+ );
805
+ //
806
+ let ret = routerHistory.splice(location);
807
+ console.log("ESRouter:splice location: ", location, "result:" + ret);
808
+ return ret;
809
+ }
810
+
811
+ function handleRedirectRecord(to: RouteLocation): RouteLocationRaw | void {
812
+ const lastMatched = to.matched[to.matched.length - 1];
813
+ if (lastMatched && lastMatched.redirect) {
814
+ const { redirect } = lastMatched;
815
+ let newTargetLocation =
816
+ typeof redirect === "function" ? redirect(to) : redirect;
817
+
818
+ if (typeof newTargetLocation === "string") {
819
+ newTargetLocation =
820
+ newTargetLocation.includes("?") || newTargetLocation.includes("#")
821
+ ? (newTargetLocation = locationAsObject(newTargetLocation))
822
+ : // force empty params
823
+ { path: newTargetLocation };
824
+ // @ts-expect-error: force empty params when a string is passed to let
825
+ // the router parse them again
826
+ newTargetLocation.params = {};
827
+ }
828
+
829
+ if (
830
+ __DEV__ &&
831
+ !("path" in newTargetLocation) &&
832
+ !("name" in newTargetLocation)
833
+ ) {
834
+ warn(
835
+ `Invalid redirect found:\n${JSON.stringify(
836
+ newTargetLocation,
837
+ null,
838
+ 2,
839
+ )}\n when navigating to "${
840
+ to.fullPath
841
+ }". A redirect must contain a name or path. This will break in production.`,
842
+ );
843
+ throw new Error("Invalid redirect");
844
+ }
845
+
846
+ return assign(
847
+ {
848
+ query: to.query,
849
+ hash: to.hash,
850
+ // avoid transferring params if the redirect has a path
851
+ params: "path" in newTargetLocation ? {} : to.params,
852
+ },
853
+ newTargetLocation,
854
+ );
855
+ }
856
+ }
857
+
858
+ function pushWithRedirect(
859
+ to: RouteLocationRaw | RouteLocation,
860
+ redirectedFrom?: RouteLocation,
861
+ ): Promise<NavigationFailure | void | undefined> {
862
+ const targetLocation: RouteLocation = (pendingLocation = resolve(to));
863
+ const from = currentRoute.value;
864
+ const data: HistoryState | undefined = (to as RouteLocationOptions).state;
865
+ const force: boolean | undefined = (to as RouteLocationOptions).force;
866
+ // to could be a string where `replace` is a function
867
+ const replace = (to as RouteLocationOptions).replace === true;
868
+
869
+ const shouldRedirect = handleRedirectRecord(targetLocation);
870
+
871
+ if (shouldRedirect)
872
+ return pushWithRedirect(
873
+ assign(locationAsObject(shouldRedirect), {
874
+ state:
875
+ typeof shouldRedirect === "object"
876
+ ? assign({}, data, shouldRedirect.state)
877
+ : data,
878
+ force,
879
+ replace,
880
+ }),
881
+ // keep original redirectedFrom if it exists
882
+ redirectedFrom || targetLocation,
883
+ );
884
+
885
+ // if it was a redirect we already called `pushWithRedirect` above
886
+ const toLocation = targetLocation as RouteLocationNormalized;
887
+
888
+ toLocation.redirectedFrom = redirectedFrom;
889
+ let failure: NavigationFailure | void | undefined;
890
+ return (failure ? Promise.resolve(failure) : navigate(toLocation, from))
891
+ .catch((error: NavigationFailure | NavigationRedirectError) =>
892
+ isNavigationFailure(error)
893
+ ? // navigation redirects still mark the router as ready
894
+ isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT)
895
+ ? error
896
+ : markAsReady(error) // also returns the error
897
+ : // reject any unknown error
898
+ triggerError(error, toLocation, from),
899
+ )
900
+ .then((failure: NavigationFailure | NavigationRedirectError | void) => {
901
+ if (failure) {
902
+ if (
903
+ isNavigationFailure(failure, ErrorTypes.NAVIGATION_GUARD_REDIRECT)
904
+ ) {
905
+ if (
906
+ __DEV__ &&
907
+ // we are redirecting to the same location we were already at
908
+ isSameRouteLocation(
909
+ stringifyQuery,
910
+ resolve(failure.to),
911
+ toLocation,
912
+ ) &&
913
+ // and we have done it a couple of times
914
+ redirectedFrom &&
915
+ // @ts-expect-error: added only in dev
916
+ (redirectedFrom._count = redirectedFrom._count
917
+ ? // @ts-expect-error
918
+ redirectedFrom._count + 1
919
+ : 1) > 30
920
+ ) {
921
+ warn(
922
+ `Detected a possibly infinite redirection in a navigation guard when going from "${from.fullPath}" to "${toLocation.fullPath}". Aborting to avoid a Stack Overflow.\n Are you always returning a new location within a navigation guard? That would lead to this error. Only return when redirecting or aborting, that should fix this. This might break in production if not fixed.`,
923
+ );
924
+ return Promise.reject(
925
+ new Error("Infinite redirect in navigation guard"),
926
+ );
927
+ }
928
+
929
+ return pushWithRedirect(
930
+ // keep options
931
+ assign(
932
+ {
933
+ // preserve an existing replacement but allow the redirect to override it
934
+ replace,
935
+ },
936
+ locationAsObject(failure.to),
937
+ {
938
+ state:
939
+ typeof failure.to === "object"
940
+ ? assign({}, data, failure.to.state)
941
+ : data,
942
+ force,
943
+ },
944
+ ),
945
+ // preserve the original redirectedFrom if any
946
+ redirectedFrom || toLocation,
947
+ );
948
+ }
949
+ } else {
950
+ // if we fail we don't finalize the navigation
951
+ failure = finalizeNavigation(
952
+ toLocation as RouteLocationNormalizedLoaded,
953
+ from,
954
+ true,
955
+ replace,
956
+ data,
957
+ );
958
+ }
959
+ triggerAfterEach(
960
+ toLocation as RouteLocationNormalizedLoaded,
961
+ from,
962
+ failure,
963
+ );
964
+ return failure;
965
+ });
966
+ }
967
+
968
+ /**
969
+ * Helper to reject and skip all navigation guards if a new navigation happened
970
+ * @param to
971
+ * @param from
972
+ */
973
+ function checkCanceledNavigationAndReject(
974
+ to: RouteLocationNormalized,
975
+ from: RouteLocationNormalized,
976
+ ): Promise<void> {
977
+ const error = checkCanceledNavigation(to, from);
978
+ return error ? Promise.reject(error) : Promise.resolve();
979
+ }
980
+
981
+ function runWithContext<T>(fn: () => T): T {
982
+ const app: App | undefined = installedApps.values().next().value;
983
+ // support Vue < 3.3
984
+ return app && typeof app.runWithContext === "function"
985
+ ? app.runWithContext(fn)
986
+ : fn();
987
+ }
988
+
989
+ // TODO: refactor the whole before guards by internally using router.beforeEach
990
+
991
+ function navigate(
992
+ to: RouteLocationNormalized,
993
+ from: RouteLocationNormalizedLoaded,
994
+ ): Promise<any> {
995
+ let guards: Lazy<any>[];
996
+
997
+ const [leavingRecords, updatingRecords, enteringRecords] =
998
+ extractChangingRecords(to, from);
999
+
1000
+ // all components here have been resolved once because we are leaving
1001
+ guards = extractComponentsGuards(
1002
+ leavingRecords.reverse(),
1003
+ "beforeRouteLeave",
1004
+ to,
1005
+ from,
1006
+ );
1007
+
1008
+ // leavingRecords is already reversed
1009
+ for (const record of leavingRecords) {
1010
+ record.leaveGuards.forEach((guard) => {
1011
+ guards.push(guardToPromiseFn(guard, to, from));
1012
+ });
1013
+ }
1014
+
1015
+ const canceledNavigationCheck = checkCanceledNavigationAndReject.bind(
1016
+ null,
1017
+ to,
1018
+ from,
1019
+ );
1020
+
1021
+ guards.push(canceledNavigationCheck);
1022
+
1023
+ // run the queue of per route beforeRouteLeave guards
1024
+ return (
1025
+ runGuardQueue(guards)
1026
+ .then(() => {
1027
+ // check global guards beforeEach
1028
+ guards = [];
1029
+ for (const guard of beforeGuards.list()) {
1030
+ guards.push(guardToPromiseFn(guard, to, from));
1031
+ }
1032
+ guards.push(canceledNavigationCheck);
1033
+
1034
+ return runGuardQueue(guards);
1035
+ })
1036
+ .then(() => {
1037
+ // check in components beforeRouteUpdate
1038
+ guards = extractComponentsGuards(
1039
+ updatingRecords,
1040
+ "beforeRouteUpdate",
1041
+ to,
1042
+ from,
1043
+ );
1044
+
1045
+ for (const record of updatingRecords) {
1046
+ record.updateGuards.forEach((guard) => {
1047
+ guards.push(guardToPromiseFn(guard, to, from));
1048
+ });
1049
+ }
1050
+ guards.push(canceledNavigationCheck);
1051
+
1052
+ // run the queue of per route beforeEnter guards
1053
+ return runGuardQueue(guards);
1054
+ })
1055
+ .then(() => {
1056
+ // check the route beforeEnter
1057
+ guards = [];
1058
+ for (const record of to.matched) {
1059
+ // do not trigger beforeEnter on reused views
1060
+ if (record.beforeEnter && !from.matched.includes(record)) {
1061
+ if (isArray(record.beforeEnter)) {
1062
+ for (const beforeEnter of record.beforeEnter)
1063
+ guards.push(guardToPromiseFn(beforeEnter, to, from));
1064
+ } else {
1065
+ guards.push(guardToPromiseFn(record.beforeEnter, to, from));
1066
+ }
1067
+ }
1068
+ }
1069
+ guards.push(canceledNavigationCheck);
1070
+
1071
+ // run the queue of per route beforeEnter guards
1072
+ return runGuardQueue(guards);
1073
+ })
1074
+ .then(() => {
1075
+ // NOTE: at this point to.matched is normalized and does not contain any () => Promise<Component>
1076
+
1077
+ // clear existing enterCallbacks, these are added by extractComponentsGuards
1078
+ to.matched.forEach((record) => (record.enterCallbacks = {}));
1079
+
1080
+ // check in-component beforeRouteEnter
1081
+ guards = extractComponentsGuards(
1082
+ enteringRecords,
1083
+ "beforeRouteEnter",
1084
+ to,
1085
+ from,
1086
+ );
1087
+ guards.push(canceledNavigationCheck);
1088
+
1089
+ // run the queue of per route beforeEnter guards
1090
+ return runGuardQueue(guards);
1091
+ })
1092
+ .then(() => {
1093
+ // check global guards beforeResolve
1094
+ guards = [];
1095
+ for (const guard of beforeResolveGuards.list()) {
1096
+ guards.push(guardToPromiseFn(guard, to, from));
1097
+ }
1098
+ guards.push(canceledNavigationCheck);
1099
+
1100
+ return runGuardQueue(guards);
1101
+ })
1102
+ // catch any navigation canceled
1103
+ .catch((err) =>
1104
+ isNavigationFailure(err, ErrorTypes.NAVIGATION_CANCELLED)
1105
+ ? err
1106
+ : Promise.reject(err),
1107
+ )
1108
+ );
1109
+ }
1110
+
1111
+ function triggerAfterEach(
1112
+ to: RouteLocationNormalizedLoaded,
1113
+ from: RouteLocationNormalizedLoaded,
1114
+ failure?: NavigationFailure | void,
1115
+ ): void {
1116
+ // navigation is confirmed, call afterGuards
1117
+ // TODO: wrap with error handlers
1118
+ for (const guard of afterGuards.list()) {
1119
+ runWithContext(() => guard(to, from, failure));
1120
+ }
1121
+ }
1122
+
1123
+ /**
1124
+ * - Cleans up any navigation guards
1125
+ * - Changes the url if necessary
1126
+ * - Calls the scrollBehavior
1127
+ */
1128
+ function finalizeNavigation(
1129
+ toLocation: RouteLocationNormalizedLoaded,
1130
+ from: RouteLocationNormalizedLoaded,
1131
+ isPush: boolean,
1132
+ replace?: boolean,
1133
+ data?: HistoryState,
1134
+ ): NavigationFailure | void {
1135
+ // a more recent navigation took place
1136
+ const error = checkCanceledNavigation(toLocation, from);
1137
+ if (error) return error;
1138
+
1139
+ // only consider as push if it's not the first navigation
1140
+ const isFirstNavigation = from === START_LOCATION_NORMALIZED;
1141
+ const state: Partial<HistoryState> | null = !isBrowser ? {} : history.state;
1142
+
1143
+ // change URL only if the user did a push/replace and if it's not the initial navigation because
1144
+ // it's just reflecting the url
1145
+ if (isPush) {
1146
+ info("router::isPush start...", toLocation);
1147
+ //---------------------------TODO LIULIPENG---------------------------
1148
+ const routeLocationMatched = resolveRouteLocationMatched(toLocation);
1149
+ console.log("toLocation: ", toLocation);
1150
+ console.log("RouteLocationMatched: ", routeLocationMatched);
1151
+
1152
+ if (!isSupportSlotType()) {
1153
+ //resume
1154
+ const toHistoryLocation = findHistoryLocation(toLocation);
1155
+ if (toHistoryLocation) {
1156
+ if (toHistoryLocation.lifecycle >= LifecycleState.destroy) {
1157
+ toHistoryLocation.lifecycle = LifecycleState.initialized;
1158
+ }
1159
+ }
1160
+
1161
+ //clear task
1162
+ if (
1163
+ routeLocationMatched.launchMode ===
1164
+ ESRouteLaunchMode.ES_ROUTE_LAUNCH_MODE_CLEAR_TASK
1165
+ ) {
1166
+ if (!isFirstNavigation) {
1167
+ resolveClearTaskLifecycle(routeLocationMatched);
1168
+ }
1169
+ }
1170
+ //single task
1171
+ else if (
1172
+ routeLocationMatched.launchMode ===
1173
+ ESRouteLaunchMode.ES_ROUTE_LAUNCH_MODE_SINGLE_TASK
1174
+ ) {
1175
+ resolveSingleTaskLifecycle(routeLocationMatched, toLocation, replace);
1176
+ }
1177
+ //standard
1178
+ else {
1179
+ resolveStandardLifecycle(routeLocationMatched, replace);
1180
+ }
1181
+ }
1182
+ //--------------------------------------------------------------
1183
+ // TODO replace + clear task = clear task ==> 不执行replace操作(replace 操作没有意义)
1184
+ //
1185
+ // on the initial navigation, we want to reuse the scroll position from
1186
+ // history state if it exists
1187
+ if (
1188
+ replace &&
1189
+ routeLocationMatched.launchMode !==
1190
+ ESRouteLaunchMode.ES_ROUTE_LAUNCH_MODE_CLEAR_TASK
1191
+ ) {
1192
+ info("router::replace start...", toLocation);
1193
+ routerHistory.replace(
1194
+ resolveHistoryLocation(
1195
+ toLocation.key,
1196
+ toLocation.fullPath,
1197
+ toLocation.resultCallback,
1198
+ ),
1199
+ assign(
1200
+ {
1201
+ scroll: isFirstNavigation && state && state.scroll,
1202
+ },
1203
+ data,
1204
+ ),
1205
+ );
1206
+ } else {
1207
+ if (
1208
+ routeLocationMatched.launchMode ===
1209
+ ESRouteLaunchMode.ES_ROUTE_LAUNCH_MODE_SINGLE_TASK
1210
+ ) {
1211
+ const index = findHistoryLocationIndex(toLocation);
1212
+ if (index <= -1) {
1213
+ routerHistory.push(
1214
+ resolveHistoryLocation(
1215
+ toLocation.key,
1216
+ toLocation.fullPath,
1217
+ toLocation.resultCallback,
1218
+ ),
1219
+ data,
1220
+ );
1221
+ }
1222
+ } else {
1223
+ routerHistory.push(
1224
+ resolveHistoryLocation(
1225
+ toLocation.key,
1226
+ toLocation.fullPath,
1227
+ toLocation.resultCallback,
1228
+ ),
1229
+ data,
1230
+ );
1231
+ }
1232
+ }
1233
+ }
1234
+ // TODO
1235
+ // accept current navigation
1236
+ currentRoute.value = toLocation;
1237
+ //
1238
+ handleScroll(toLocation, from, isPush, isFirstNavigation);
1239
+ //
1240
+ markAsReady();
1241
+ }
1242
+
1243
+ /**
1244
+ * TODO LIULIPENG 参数转换
1245
+ */
1246
+ function resolveHistoryLocation(
1247
+ key?: string,
1248
+ location: string,
1249
+ resultCallback?: RouteResultCallback,
1250
+ ): HistoryLocation {
1251
+ return {
1252
+ key: key,
1253
+ location: location,
1254
+ lifecycle: LifecycleState.uninitialized,
1255
+ saveInstanceState: {},
1256
+ resultCallback: resultCallback,
1257
+ };
1258
+ }
1259
+
1260
+ let removeHistoryListener: undefined | null | (() => void);
1261
+
1262
+ //------------------------------------清空堆栈--------------------------------------
1263
+ function resolveClearTaskLifecycle(routeLocationMatched) {
1264
+ info("router::resolveClearTaskLifecycle ...");
1265
+ console.log("ESRouter: resolveClearTaskLifecycle");
1266
+ const historyLocationList: HistoryLocation[] =
1267
+ routerHistory.clearHistoryLocations();
1268
+ if (historyLocationList && historyLocationList.length > 0) {
1269
+ historyLocationList.forEach((historyLocation, index) => {
1270
+ if (historyLocation) {
1271
+ pauseStopDestroyRoute(historyLocation, true, true, false);
1272
+ }
1273
+ });
1274
+ }
1275
+ }
1276
+
1277
+ function findHistoryLocationIndex(toLocation) {
1278
+ const historyLocationList = routerHistory.getHistoryLocations();
1279
+ if (historyLocationList && historyLocationList.length > 0) {
1280
+ for (let i = 0; i < historyLocationList.length; i++) {
1281
+ const location = historyLocationList[i];
1282
+ if (location && location.location === toLocation.fullPath) {
1283
+ return i;
1284
+ }
1285
+ }
1286
+ }
1287
+ return -1;
1288
+ }
1289
+
1290
+ function findHistoryLocation(toLocation) {
1291
+ const historyLocationList = routerHistory.getHistoryLocations();
1292
+ if (historyLocationList && historyLocationList.length > 0) {
1293
+ for (let i = 0; i < historyLocationList.length; i++) {
1294
+ const location = historyLocationList[i];
1295
+ if (
1296
+ location &&
1297
+ location.location === toLocation.fullPath &&
1298
+ location.key === toLocation.key
1299
+ ) {
1300
+ return location;
1301
+ }
1302
+ }
1303
+ }
1304
+ return null;
1305
+ }
1306
+
1307
+ //------------------------------------单例--------------------------------------
1308
+ function resolveSingleTaskLifecycle(
1309
+ routeLocationMatched,
1310
+ toLocation,
1311
+ replace: boolean,
1312
+ ) {
1313
+ const historyLocationList = routerHistory.getHistoryLocations();
1314
+ const length = historyLocationList.length;
1315
+ const index = findHistoryLocationIndex(toLocation);
1316
+ if (index > -1) {
1317
+ const locationList = routerHistory.popHistoryLocations(
1318
+ length - index - 1,
1319
+ );
1320
+ if (locationList && locationList.length > 0) {
1321
+ locationList.forEach((historyLocation, index) => {
1322
+ if (historyLocation) {
1323
+ pauseStopDestroyRoute(historyLocation, true, true, false);
1324
+ }
1325
+ });
1326
+ }
1327
+ if (replace) {
1328
+ resolveStandardLifecycle(routeLocationMatched, replace);
1329
+ }
1330
+ }
1331
+ //
1332
+ else {
1333
+ resolveStandardLifecycle(routeLocationMatched, replace);
1334
+ }
1335
+ }
1336
+
1337
+ //------------------------------------标准模式--------------------------------------
1338
+ function resolveStandardLifecycle(routeLocationMatched, replace?: boolean) {
1339
+ const historyLocationList = routerHistory.getHistoryLocations();
1340
+ if (historyLocationList && historyLocationList.length > 0) {
1341
+ const length = historyLocationList.length;
1342
+ //stack bottom
1343
+ try {
1344
+ if (limit && length + 1 > limit) {
1345
+ const historyLocation = historyLocationList[length - limit];
1346
+ if (historyLocation) {
1347
+ pauseStopDestroyRoute(historyLocation, true, true, true);
1348
+ }
1349
+ }
1350
+ } catch (e) {
1351
+ console.log(
1352
+ "invoke stack bottom component instance pause stop error...",
1353
+ e,
1354
+ );
1355
+ }
1356
+
1357
+ const isDialogType =
1358
+ routeLocationMatched.type == ESRouteType.ES_ROUTE_TYPE_DIALOG;
1359
+ console.log(
1360
+ "RouteLocationMatched: isDialogType",
1361
+ routeLocationMatched,
1362
+ isDialogType,
1363
+ );
1364
+
1365
+ //stack middle
1366
+ if (!isDialogType) {
1367
+ for (let i = 0; i < historyLocationList.length - 1; i++) {
1368
+ const location = historyLocationList[i];
1369
+ if (location) {
1370
+ pauseStopDestroyRoute(location, true, false, false);
1371
+ }
1372
+ }
1373
+ }
1374
+
1375
+ //stack top
1376
+ try {
1377
+ const historyLocation = historyLocationList[length - 1];
1378
+ if (historyLocation) {
1379
+ const stop = replace || !isDialogType;
1380
+ const destroy = replace;
1381
+ pauseStopDestroyRoute(historyLocation, stop, destroy, false);
1382
+ }
1383
+ } catch (e) {
1384
+ console.log(
1385
+ "invoke stack top component instance pause stop error...",
1386
+ e,
1387
+ );
1388
+ }
1389
+ }
1390
+ }
1391
+
1392
+ function pauseStopDestroyRoute(
1393
+ historyLocation: HistoryLocation,
1394
+ stop: boolean,
1395
+ destroy: boolean,
1396
+ saveInstanceState: boolean,
1397
+ ) {
1398
+ console.log(
1399
+ "PauseStopDestroyRoute: " +
1400
+ " Location" +
1401
+ historyLocation.location +
1402
+ " stop:" +
1403
+ stop +
1404
+ " destroy:" +
1405
+ destroy +
1406
+ " saveInstanceState:" +
1407
+ saveInstanceState,
1408
+ );
1409
+ //
1410
+ const instance = historyLocation.instances;
1411
+ //onESPause
1412
+ if (historyLocation.lifecycle < LifecycleState.pause) {
1413
+ historyLocation.lifecycle = LifecycleState.pause;
1414
+ try {
1415
+ if (instance) {
1416
+ try {
1417
+ triggerESLifecycle(instance, "pause");
1418
+ } catch (e) {}
1419
+
1420
+ // @ts-ignore
1421
+ if (isFunction(instance.onESPause)) {
1422
+ // @ts-ignore
1423
+ instance.onESPause();
1424
+ }
1425
+ }
1426
+ } catch (e) {
1427
+ console.log(
1428
+ "invoke " +
1429
+ historyLocation +
1430
+ " component instance onESPause error...",
1431
+ e,
1432
+ );
1433
+ }
1434
+ }
1435
+ //onESStop
1436
+ if (stop && historyLocation.lifecycle < LifecycleState.stop) {
1437
+ historyLocation.lifecycle = LifecycleState.stop;
1438
+ try {
1439
+ if (instance) {
1440
+ try {
1441
+ triggerESLifecycle(instance, "stop");
1442
+ } catch (e) {}
1443
+
1444
+ // @ts-ignore
1445
+ if (isFunction(instance.onESStop)) {
1446
+ // @ts-ignore
1447
+ instance.onESStop();
1448
+ }
1449
+ }
1450
+ } catch (e) {
1451
+ console.log(
1452
+ "invoke " + historyLocation + " component instance onESStop error...",
1453
+ e,
1454
+ );
1455
+ }
1456
+ }
1457
+
1458
+ //onESSaveInstanceState
1459
+ if (
1460
+ stop &&
1461
+ saveInstanceState &&
1462
+ historyLocation.lifecycle < LifecycleState.saveInstanceState
1463
+ ) {
1464
+ historyLocation.lifecycle = LifecycleState.saveInstanceState;
1465
+ try {
1466
+ if (instance) {
1467
+ try {
1468
+ triggerESLifecycle(
1469
+ instance,
1470
+ "saveInstanceState",
1471
+ historyLocation.saveInstanceState,
1472
+ );
1473
+ } catch (e) {}
1474
+
1475
+ // @ts-ignore
1476
+ if (isFunction(instance.onESSaveInstanceState)) {
1477
+ // @ts-ignore
1478
+ instance.onESSaveInstanceState(historyLocation.saveInstanceState);
1479
+ }
1480
+ }
1481
+ } catch (e) {
1482
+ console.log(
1483
+ "invoke " +
1484
+ historyLocation +
1485
+ " component instance onESSaveInstanceState error...",
1486
+ e,
1487
+ );
1488
+ }
1489
+ }
1490
+
1491
+ //onESDestroy
1492
+ if (stop && destroy && historyLocation.lifecycle < LifecycleState.destroy) {
1493
+ historyLocation.lifecycle = LifecycleState.destroy;
1494
+ try {
1495
+ if (instance) {
1496
+ try {
1497
+ triggerESLifecycle(instance, "destroy");
1498
+ } catch (e) {}
1499
+ // @ts-ignore
1500
+ if (isFunction(instance.onESDestroy)) {
1501
+ // @ts-ignore
1502
+ instance.onESDestroy();
1503
+ }
1504
+ }
1505
+ } catch (e) {
1506
+ console.log(
1507
+ "invoke " +
1508
+ historyLocation +
1509
+ " component instance onESDestroy error...",
1510
+ e,
1511
+ );
1512
+ }
1513
+ //
1514
+ historyLocation.instances = null;
1515
+ }
1516
+ }
1517
+
1518
+ function resolveRouteLocationMatched(
1519
+ targetLocation: RouteLocation,
1520
+ ): RouteLocationMatched {
1521
+ let initialDepth = 0;
1522
+ const { matched } = targetLocation;
1523
+ let matchedRoute: RouteLocationMatched | undefined;
1524
+ while ((matchedRoute = matched[initialDepth]) && !matchedRoute.components) {
1525
+ initialDepth++;
1526
+ }
1527
+ return matched[initialDepth];
1528
+ }
1529
+
1530
+ function isFunction(func) {
1531
+ return Object.prototype.toString.call(func) === "[object Function]";
1532
+ }
1533
+
1534
+ // attach listener to history to trigger navigations
1535
+ function setupListeners() {
1536
+ // avoid setting up listeners twice due to an invalid first navigation
1537
+ if (removeHistoryListener) return;
1538
+ removeHistoryListener = routerHistory.listen((to, _from, info) => {
1539
+ if (!router.listening) return;
1540
+ // cannot be a redirect route because it was in history
1541
+ const toLocation = resolve(to.location) as RouteLocationNormalized;
1542
+
1543
+ // due to dynamic routing, and to hash history with manual navigation
1544
+ // (manually changing the url or calling history.hash = '#/somewhere'),
1545
+ // there could be a redirect record in history
1546
+ const shouldRedirect = handleRedirectRecord(toLocation);
1547
+ if (shouldRedirect) {
1548
+ pushWithRedirect(
1549
+ assign(shouldRedirect, { replace: true }),
1550
+ toLocation,
1551
+ ).catch(noop);
1552
+ return;
1553
+ }
1554
+
1555
+ pendingLocation = toLocation;
1556
+ const from = currentRoute.value;
1557
+
1558
+ //-------------------------TODO LIULIPENG----------------------
1559
+ //resume
1560
+ if (to) {
1561
+ if (to.lifecycle >= LifecycleState.destroy) {
1562
+ to.lifecycle = LifecycleState.initialized;
1563
+ }
1564
+ }
1565
+ //---------------------------------------------------------
1566
+ // TODO: should be moved to web history?
1567
+ if (isBrowser) {
1568
+ saveScrollPosition(
1569
+ getScrollKey(from.fullPath, info.delta),
1570
+ computeScrollPosition(),
1571
+ );
1572
+ }
1573
+
1574
+ navigate(toLocation, from)
1575
+ .catch((error: NavigationFailure | NavigationRedirectError) => {
1576
+ if (
1577
+ isNavigationFailure(
1578
+ error,
1579
+ ErrorTypes.NAVIGATION_ABORTED | ErrorTypes.NAVIGATION_CANCELLED,
1580
+ )
1581
+ ) {
1582
+ return error;
1583
+ }
1584
+ if (
1585
+ isNavigationFailure(error, ErrorTypes.NAVIGATION_GUARD_REDIRECT)
1586
+ ) {
1587
+ // Here we could call if (info.delta) routerHistory.go(-info.delta,
1588
+ // false) but this is bug prone as we have no way to wait the
1589
+ // navigation to be finished before calling pushWithRedirect. Using
1590
+ // a setTimeout of 16ms seems to work but there is no guarantee for
1591
+ // it to work on every browser. So instead we do not restore the
1592
+ // history entry and trigger a new navigation as requested by the
1593
+ // navigation guard.
1594
+
1595
+ // the error is already handled by router.push we just want to avoid
1596
+ // logging the error
1597
+ pushWithRedirect(
1598
+ (error as NavigationRedirectError).to,
1599
+ toLocation,
1600
+ // avoid an uncaught rejection, let push call triggerError
1601
+ )
1602
+ .then((failure) => {
1603
+ // manual change in hash history #916 ending up in the URL not
1604
+ // changing, but it was changed by the manual url change, so we
1605
+ // need to manually change it ourselves
1606
+ if (
1607
+ isNavigationFailure(
1608
+ failure,
1609
+ ErrorTypes.NAVIGATION_ABORTED |
1610
+ ErrorTypes.NAVIGATION_DUPLICATED,
1611
+ ) &&
1612
+ !info.delta &&
1613
+ info.type === NavigationType.pop
1614
+ ) {
1615
+ routerHistory.go(-1, false);
1616
+ }
1617
+ })
1618
+ .catch(noop);
1619
+ // avoid the then branch
1620
+ return Promise.reject();
1621
+ }
1622
+ // do not restore history on unknown direction
1623
+ if (info.delta) {
1624
+ routerHistory.go(-info.delta, false);
1625
+ }
1626
+ // unrecognized error, transfer to the global handler
1627
+ return triggerError(error, toLocation, from);
1628
+ })
1629
+ .then((failure: NavigationFailure | void) => {
1630
+ failure =
1631
+ failure ||
1632
+ finalizeNavigation(
1633
+ // after navigation, all matched components are resolved
1634
+ toLocation as RouteLocationNormalizedLoaded,
1635
+ from,
1636
+ false,
1637
+ );
1638
+
1639
+ // revert the navigation
1640
+ if (failure) {
1641
+ if (
1642
+ info.delta &&
1643
+ // a new navigation has been triggered, so we do not want to revert, that will change the current history
1644
+ // entry while a different route is displayed
1645
+ !isNavigationFailure(failure, ErrorTypes.NAVIGATION_CANCELLED)
1646
+ ) {
1647
+ routerHistory.go(-info.delta, false);
1648
+ } else if (
1649
+ info.type === NavigationType.pop &&
1650
+ isNavigationFailure(
1651
+ failure,
1652
+ ErrorTypes.NAVIGATION_ABORTED |
1653
+ ErrorTypes.NAVIGATION_DUPLICATED,
1654
+ )
1655
+ ) {
1656
+ // manual change in hash history #916
1657
+ // it's like a push but lacks the information of the direction
1658
+ routerHistory.go(-1, false);
1659
+ }
1660
+ }
1661
+
1662
+ triggerAfterEach(
1663
+ toLocation as RouteLocationNormalizedLoaded,
1664
+ from,
1665
+ failure,
1666
+ );
1667
+ })
1668
+ .catch(noop);
1669
+ });
1670
+ }
1671
+
1672
+ // Initialization and Errors
1673
+
1674
+ let readyHandlers = useCallbacks<OnReadyCallback>();
1675
+ let errorHandlers = useCallbacks<_ErrorHandler>();
1676
+ let ready: boolean;
1677
+
1678
+ /**
1679
+ * Trigger errorHandlers added via onError and throws the error as well
1680
+ *
1681
+ * @param error - error to throw
1682
+ * @param to - location we were navigating to when the error happened
1683
+ * @param from - location we were navigating from when the error happened
1684
+ * @returns the error as a rejected promise
1685
+ */
1686
+ function triggerError(
1687
+ error: any,
1688
+ to: RouteLocationNormalized,
1689
+ from: RouteLocationNormalizedLoaded,
1690
+ ): Promise<unknown> {
1691
+ markAsReady(error);
1692
+ const list = errorHandlers.list();
1693
+ if (list.length) {
1694
+ list.forEach((handler) => handler(error, to, from));
1695
+ } else {
1696
+ if (__DEV__) {
1697
+ warn("uncaught error during route navigation:");
1698
+ }
1699
+ console.error(error);
1700
+ }
1701
+ return Promise.reject(error);
1702
+ }
1703
+
1704
+ function isReady(): Promise<void> {
1705
+ if (ready && currentRoute.value !== START_LOCATION_NORMALIZED)
1706
+ return Promise.resolve();
1707
+ return new Promise((resolve, reject) => {
1708
+ readyHandlers.add([resolve, reject]);
1709
+ });
1710
+ }
1711
+
1712
+ /**
1713
+ * Mark the router as ready, resolving the promised returned by isReady(). Can
1714
+ * only be called once, otherwise does nothing.
1715
+ * @param err - optional error
1716
+ */
1717
+ function markAsReady<E = any>(err: E): E;
1718
+ function markAsReady<E = any>(): void;
1719
+ function markAsReady<E = any>(err?: E): E | void {
1720
+ if (!ready) {
1721
+ // still not ready if an error happened
1722
+ ready = !err;
1723
+ setupListeners();
1724
+ readyHandlers
1725
+ .list()
1726
+ .forEach(([resolve, reject]) => (err ? reject(err) : resolve()));
1727
+ readyHandlers.reset();
1728
+ }
1729
+ return err;
1730
+ }
1731
+
1732
+ // Scroll behavior
1733
+ function handleScroll(
1734
+ to: RouteLocationNormalizedLoaded,
1735
+ from: RouteLocationNormalizedLoaded,
1736
+ isPush: boolean,
1737
+ isFirstNavigation: boolean,
1738
+ ): Promise<any> {
1739
+ const { scrollBehavior } = options;
1740
+ if (!isBrowser || !scrollBehavior) return Promise.resolve();
1741
+
1742
+ const scrollPosition: _ScrollPositionNormalized | null =
1743
+ (!isPush && getSavedScrollPosition(getScrollKey(to.fullPath, 0))) ||
1744
+ ((isFirstNavigation || !isPush) &&
1745
+ (history.state as HistoryState) &&
1746
+ history.state.scroll) ||
1747
+ null;
1748
+
1749
+ return nextTick()
1750
+ .then(() => scrollBehavior(to, from, scrollPosition))
1751
+ .then((position) => position && scrollToPosition(position))
1752
+ .catch((err) => triggerError(err, to, from));
1753
+ }
1754
+
1755
+ function go(delta) {
1756
+ navigationType.value = delta < 0 ? NavigationType.pop : NavigationType.push;
1757
+ //
1758
+ if (delta < 0) {
1759
+ pauseStopDestroyRoute(routerHistory.getLocation(), true, true, false);
1760
+ }
1761
+ //
1762
+ let ret = routerHistory.go(delta);
1763
+ console.log("ESRouter:go result:" + ret);
1764
+ if (!ret || isSupportSlotType()) {
1765
+ console.log("call native router:go start:" + delta);
1766
+ ret = nativeRouter.go(delta);
1767
+ console.log("call native router:go result:" + ret);
1768
+ }
1769
+ return ret;
1770
+ }
1771
+
1772
+ let started: boolean | undefined;
1773
+ const installedApps = new Set<App>();
1774
+
1775
+ const router: Router = {
1776
+ //----------------------------------------------
1777
+ get active() {
1778
+ return getActive();
1779
+ },
1780
+ setActive,
1781
+ //----------------------------------------------
1782
+ currentRoute,
1783
+ listening: true,
1784
+
1785
+ addRoute,
1786
+ removeRoute,
1787
+ hasRoute,
1788
+ getRoutes,
1789
+ getRouterHistory,
1790
+ getRoute,
1791
+ resolve,
1792
+ options,
1793
+
1794
+ //
1795
+ push,
1796
+ replace,
1797
+ splice,
1798
+ go,
1799
+ back: () => go(-1),
1800
+ forward: () => go(1),
1801
+
1802
+ //
1803
+ setResult,
1804
+
1805
+ //
1806
+ beforeEach: beforeGuards.add,
1807
+ beforeResolve: beforeResolveGuards.add,
1808
+ afterEach: afterGuards.add,
1809
+
1810
+ onError: errorHandlers.add,
1811
+ isReady,
1812
+
1813
+ install: function (app: App) {
1814
+ const router = this;
1815
+ app.component("EsRouterLink", RouterLink);
1816
+ app.component("EsRouterView", RouterView);
1817
+ app.component("EsSlotView", SlotView);
1818
+
1819
+ registerPageRouteView(app);
1820
+ registerPageView(app);
1821
+ registerSlotRootView(app);
1822
+ registerSlotView(app);
1823
+
1824
+ app.config.globalProperties.$router = router;
1825
+ Object.defineProperty(app.config.globalProperties, "$route", {
1826
+ enumerable: true,
1827
+ get: () => unref(currentRoute),
1828
+ });
1829
+
1830
+ // this initial navigation is only necessary on client, on server it doesn't
1831
+ // make sense because it will create an extra unnecessary navigation and could
1832
+ // lead to problems
1833
+ if (
1834
+ isBrowser &&
1835
+ // used for the initial navigation client side to avoid pushing
1836
+ // multiple times when the router is used in multiple apps
1837
+ !started &&
1838
+ currentRoute.value === START_LOCATION_NORMALIZED
1839
+ ) {
1840
+ // see above
1841
+ started = true;
1842
+ push(routerHistory.location).catch((err) => {
1843
+ if (__DEV__) warn("Unexpected error when starting the router:", err);
1844
+ });
1845
+ }
1846
+
1847
+ const reactiveRoute = {} as {
1848
+ [k in keyof RouteLocationNormalizedLoaded]: ComputedRef<
1849
+ RouteLocationNormalizedLoaded[k]
1850
+ >;
1851
+ };
1852
+ for (const key in START_LOCATION_NORMALIZED) {
1853
+ // @ts-expect-error: the key matches
1854
+ reactiveRoute[key] = computed(() => currentRoute.value[key]);
1855
+ }
1856
+
1857
+ app.provide(routerKey, router);
1858
+ app.provide(routeLocationKey, reactive(reactiveRoute));
1859
+ app.provide(routerViewLocationKey, currentRoute);
1860
+ app.provide(routerHistoryKey, options.history);
1861
+ app.provide(routerRecordRawKey, options.routes);
1862
+ app.provide(navigationTypeKey, navigationType);
1863
+ app.provide(routerComponentInstanceKey, routerComponentInstance);
1864
+ app.provide(routerViewNameKey, routerViewName);
1865
+ app.provide(nativeRouterKey, nativeRouter);
1866
+ app.provide(routerViewInstanceKey, routerViewInstance);
1867
+ app.provide(routeViewInstancesKey, routeViewInstanceList);
1868
+
1869
+ const unmountApp = app.unmount;
1870
+ installedApps.add(app);
1871
+ app.unmount = function () {
1872
+ installedApps.delete(app);
1873
+ // the router is not attached to an app anymore
1874
+ if (installedApps.size < 1) {
1875
+ // invalidate the current navigation
1876
+ pendingLocation = START_LOCATION_NORMALIZED;
1877
+ removeHistoryListener && removeHistoryListener();
1878
+ removeHistoryListener = null;
1879
+ currentRoute.value = START_LOCATION_NORMALIZED;
1880
+ started = false;
1881
+ ready = false;
1882
+ }
1883
+ unmountApp();
1884
+ };
1885
+
1886
+ // TODO: this probably needs to be updated so it can be used by vue-termui
1887
+ if ((__DEV__ || __FEATURE_PROD_DEVTOOLS__) && isBrowser) {
1888
+ addDevtools(app, router, matcher);
1889
+ }
1890
+ },
1891
+ };
1892
+
1893
+ // TODO: type this as NavigationGuardReturn or similar instead of any
1894
+ function runGuardQueue(guards: Lazy<any>[]): Promise<any> {
1895
+ return guards.reduce(
1896
+ (promise, guard) => promise.then(() => runWithContext(guard)),
1897
+ Promise.resolve(),
1898
+ );
1899
+ }
1900
+
1901
+ return router;
1902
+ }
1903
+
1904
+ function extractChangingRecords(
1905
+ to: RouteLocationNormalized,
1906
+ from: RouteLocationNormalizedLoaded,
1907
+ ) {
1908
+ const leavingRecords: RouteRecordNormalized[] = [];
1909
+ const updatingRecords: RouteRecordNormalized[] = [];
1910
+ const enteringRecords: RouteRecordNormalized[] = [];
1911
+
1912
+ const len = Math.max(from.matched.length, to.matched.length);
1913
+ for (let i = 0; i < len; i++) {
1914
+ const recordFrom = from.matched[i];
1915
+ if (recordFrom) {
1916
+ if (to.matched.find((record) => isSameRouteRecord(record, recordFrom)))
1917
+ updatingRecords.push(recordFrom);
1918
+ else leavingRecords.push(recordFrom);
1919
+ }
1920
+ const recordTo = to.matched[i];
1921
+ if (recordTo) {
1922
+ // the type doesn't matter because we are comparing per reference
1923
+ if (!from.matched.find((record) => isSameRouteRecord(record, recordTo))) {
1924
+ enteringRecords.push(recordTo);
1925
+ }
1926
+ }
1927
+ }
1928
+
1929
+ return [leavingRecords, updatingRecords, enteringRecords];
1930
+ }