@cloud-app-dev/vidc 3.2.11 → 3.2.13

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 (421) hide show
  1. package/.dumi/tmp/core/EmptyRoute.tsx +9 -0
  2. package/.dumi/tmp/core/defineApp.ts +16 -0
  3. package/.dumi/tmp/core/history.ts +61 -0
  4. package/.dumi/tmp/core/plugin.ts +42 -0
  5. package/.dumi/tmp/core/pluginConfig.d.ts +276 -0
  6. package/.dumi/tmp/core/polyfill.ts +202 -0
  7. package/.dumi/tmp/core/route.tsx +38 -0
  8. package/.dumi/tmp/core/terminal.ts +38 -0
  9. package/.dumi/tmp/dumi/exports.ts +5 -0
  10. package/.dumi/tmp/dumi/locales/config.ts +56 -0
  11. package/.dumi/tmp/dumi/locales/runtime.tsx +38 -0
  12. package/.dumi/tmp/dumi/meta/atoms.ts +4 -0
  13. package/.dumi/tmp/dumi/meta/index.ts +186 -0
  14. package/.dumi/tmp/dumi/meta/runtime.ts +18 -0
  15. package/.dumi/tmp/dumi/meta/tabs.ts +8 -0
  16. package/.dumi/tmp/dumi/theme/ContextWrapper.tsx +41 -0
  17. package/.dumi/tmp/dumi/theme/builtins/API.ts +4 -0
  18. package/.dumi/tmp/dumi/theme/builtins/Badge.ts +4 -0
  19. package/.dumi/tmp/dumi/theme/builtins/Container.ts +4 -0
  20. package/.dumi/tmp/dumi/theme/builtins/Previewer.ts +4 -0
  21. package/.dumi/tmp/dumi/theme/builtins/SourceCode.ts +4 -0
  22. package/.dumi/tmp/dumi/theme/builtins/Table.ts +4 -0
  23. package/.dumi/tmp/dumi/theme/layouts/DocLayout.ts +4 -0
  24. package/.dumi/tmp/dumi/theme/slots/Content.ts +4 -0
  25. package/.dumi/tmp/dumi/theme/slots/ContentTabs.ts +4 -0
  26. package/.dumi/tmp/dumi/theme/slots/Features.ts +4 -0
  27. package/.dumi/tmp/dumi/theme/slots/Footer.ts +4 -0
  28. package/.dumi/tmp/dumi/theme/slots/Header.ts +4 -0
  29. package/.dumi/tmp/dumi/theme/slots/Hero.ts +4 -0
  30. package/.dumi/tmp/dumi/theme/slots/HeroTitle.ts +4 -0
  31. package/.dumi/tmp/dumi/theme/slots/LangSwitch.ts +4 -0
  32. package/.dumi/tmp/dumi/theme/slots/Logo.ts +4 -0
  33. package/.dumi/tmp/dumi/theme/slots/Navbar.ts +4 -0
  34. package/.dumi/tmp/dumi/theme/slots/NotFound.ts +4 -0
  35. package/.dumi/tmp/dumi/theme/slots/PreviewerActions.ts +4 -0
  36. package/.dumi/tmp/dumi/theme/slots/PreviewerActionsExtra.ts +4 -0
  37. package/.dumi/tmp/dumi/theme/slots/RtlSwitch.ts +4 -0
  38. package/.dumi/tmp/dumi/theme/slots/SearchBar.ts +4 -0
  39. package/.dumi/tmp/dumi/theme/slots/SearchResult.ts +4 -0
  40. package/.dumi/tmp/dumi/theme/slots/Sidebar.ts +4 -0
  41. package/.dumi/tmp/dumi/theme/slots/Toc.ts +4 -0
  42. package/.dumi/tmp/exports.ts +15 -0
  43. package/.dumi/tmp/testBrowser.tsx +82 -0
  44. package/.dumi/tmp/tsconfig.json +35 -0
  45. package/.dumi/tmp/typings.d.ts +136 -0
  46. package/.dumi/tmp/umi.ts +77 -0
  47. package/.dumi/tmp-production/core/EmptyRoute.tsx +9 -0
  48. package/.dumi/tmp-production/core/defineApp.ts +16 -0
  49. package/.dumi/tmp-production/core/history.ts +61 -0
  50. package/.dumi/tmp-production/core/plugin.ts +42 -0
  51. package/.dumi/tmp-production/core/pluginConfig.d.ts +276 -0
  52. package/.dumi/tmp-production/core/polyfill.ts +202 -0
  53. package/.dumi/tmp-production/core/route.tsx +38 -0
  54. package/.dumi/tmp-production/core/terminal.ts +38 -0
  55. package/.dumi/tmp-production/dumi/exports.ts +5 -0
  56. package/.dumi/tmp-production/dumi/locales/config.ts +56 -0
  57. package/.dumi/tmp-production/dumi/locales/runtime.tsx +38 -0
  58. package/.dumi/tmp-production/dumi/meta/atoms.ts +4 -0
  59. package/.dumi/tmp-production/dumi/meta/index.ts +178 -0
  60. package/.dumi/tmp-production/dumi/meta/runtime.ts +18 -0
  61. package/.dumi/tmp-production/dumi/meta/tabs.ts +5 -0
  62. package/.dumi/tmp-production/dumi/theme/ContextWrapper.tsx +41 -0
  63. package/.dumi/tmp-production/dumi/theme/builtins/API.ts +4 -0
  64. package/.dumi/tmp-production/dumi/theme/builtins/Badge.ts +4 -0
  65. package/.dumi/tmp-production/dumi/theme/builtins/Container.ts +4 -0
  66. package/.dumi/tmp-production/dumi/theme/builtins/Previewer.ts +4 -0
  67. package/.dumi/tmp-production/dumi/theme/builtins/SourceCode.ts +4 -0
  68. package/.dumi/tmp-production/dumi/theme/builtins/Table.ts +4 -0
  69. package/.dumi/tmp-production/dumi/theme/layouts/DocLayout.ts +4 -0
  70. package/.dumi/tmp-production/dumi/theme/slots/Content.ts +4 -0
  71. package/.dumi/tmp-production/dumi/theme/slots/ContentTabs.ts +4 -0
  72. package/.dumi/tmp-production/dumi/theme/slots/Features.ts +4 -0
  73. package/.dumi/tmp-production/dumi/theme/slots/Footer.ts +4 -0
  74. package/.dumi/tmp-production/dumi/theme/slots/Header.ts +4 -0
  75. package/.dumi/tmp-production/dumi/theme/slots/Hero.ts +4 -0
  76. package/.dumi/tmp-production/dumi/theme/slots/HeroTitle.ts +4 -0
  77. package/.dumi/tmp-production/dumi/theme/slots/LangSwitch.ts +4 -0
  78. package/.dumi/tmp-production/dumi/theme/slots/Logo.ts +4 -0
  79. package/.dumi/tmp-production/dumi/theme/slots/Navbar.ts +4 -0
  80. package/.dumi/tmp-production/dumi/theme/slots/NotFound.ts +4 -0
  81. package/.dumi/tmp-production/dumi/theme/slots/PreviewerActions.ts +4 -0
  82. package/.dumi/tmp-production/dumi/theme/slots/PreviewerActionsExtra.ts +4 -0
  83. package/.dumi/tmp-production/dumi/theme/slots/RtlSwitch.ts +4 -0
  84. package/.dumi/tmp-production/dumi/theme/slots/SearchBar.ts +4 -0
  85. package/.dumi/tmp-production/dumi/theme/slots/SearchResult.ts +4 -0
  86. package/.dumi/tmp-production/dumi/theme/slots/Sidebar.ts +4 -0
  87. package/.dumi/tmp-production/dumi/theme/slots/Toc.ts +4 -0
  88. package/.dumi/tmp-production/exports.ts +14 -0
  89. package/.dumi/tmp-production/testBrowser.tsx +82 -0
  90. package/.dumi/tmp-production/tsconfig.json +35 -0
  91. package/.dumi/tmp-production/typings.d.ts +136 -0
  92. package/.dumi/tmp-production/umi.ts +77 -0
  93. package/.dumirc.ts +71 -0
  94. package/.editorconfig +0 -3
  95. package/.eslintrc.js +3 -0
  96. package/.fatherrc.ts +19 -0
  97. package/.husky/commit-msg +5 -0
  98. package/.husky/pre-commit +4 -0
  99. package/.prettierrc.js +16 -0
  100. package/.stylelintrc +3 -0
  101. package/README.md +14 -26
  102. package/es/Api/index.js +100 -30
  103. package/es/AppContext/Sync.js +19 -3
  104. package/es/AppContext/index.js +86 -42
  105. package/es/AppContext/static.js +7 -0
  106. package/es/Auth/index.js +11 -4
  107. package/es/AutoExit/index.js +11 -3
  108. package/es/Box/BetweenBox/index.js +19 -10
  109. package/es/Box/BetweenBox/{index.css → index.less} +0 -0
  110. package/es/Box/InfoBox/index.js +24 -18
  111. package/es/Box/InfoBox/index.less +22 -0
  112. package/es/Box/TwoColumnBox/index.js +42 -25
  113. package/es/Box/TwoColumnBox/index.less +70 -0
  114. package/es/Box/deps/grid-factory.d.ts +2 -2
  115. package/es/Box/deps/grid-factory.js +12 -0
  116. package/es/Box/index.js +29 -16
  117. package/es/Box/{index.css → index.less} +5 -4
  118. package/es/CheckGroupFixed/demo.d.ts +3 -0
  119. package/es/CheckGroupFixed/demo.js +28 -0
  120. package/es/CheckGroupFixed/index.js +117 -82
  121. package/es/CheckGroupFixed/index.less +50 -0
  122. package/es/Config/index.js +5 -1
  123. package/es/Config/utils.js +18 -3
  124. package/es/ConfigContext/index.js +8 -4
  125. package/es/CustomRenderSelect/index.js +71 -36
  126. package/es/CustomRenderSelect/index.less +25 -0
  127. package/es/DisableMark/index.js +14 -11
  128. package/es/DisableMark/{index.css → index.less} +0 -0
  129. package/es/DomMove/demo.js +14 -10
  130. package/es/DomMove/index.js +52 -30
  131. package/es/DomMove/utils.js +8 -3
  132. package/es/Drag/DragAndDropItem.js +44 -20
  133. package/es/Drag/DropItem.js +22 -6
  134. package/es/Drag/index.js +2 -2
  135. package/es/Drag/{index.css → index.less} +0 -0
  136. package/es/Drawer/Footer.js +22 -15
  137. package/es/Drawer/{Demo.d.ts → demo.d.ts} +0 -0
  138. package/es/Drawer/demo.js +109 -0
  139. package/es/Drawer/index.js +98 -60
  140. package/es/Drawer/index.less +42 -0
  141. package/es/ErrorFallback/index.js +23 -14
  142. package/es/FrontendPlayer/index.js +1 -1
  143. package/es/FullScreen/index.js +30 -17
  144. package/es/FullScreen/index.less +16 -0
  145. package/es/HightLevel/index.js +11 -4
  146. package/es/HightLevel/{index.css → index.less} +0 -0
  147. package/es/IconFont/index.js +39 -18
  148. package/es/ImageView/index.js +37 -13
  149. package/es/ImageView/index.less +10 -0
  150. package/es/Input/demo.d.ts +3 -0
  151. package/es/Input/demo.js +16 -0
  152. package/es/Input/index.js +46 -22
  153. package/es/Input/index.less +12 -0
  154. package/es/InstanceHistory/index.js +2 -0
  155. package/es/LabelValue/index.js +25 -18
  156. package/es/LabelValue/index.less +20 -0
  157. package/es/List/DynamicGridList/Demo.d.ts +1 -0
  158. package/es/List/DynamicGridList/Demo.js +52 -32
  159. package/es/List/DynamicGridList/index.js +37 -22
  160. package/es/List/DynamicList/index.js +76 -56
  161. package/es/List/DynamicList/index.less +15 -0
  162. package/es/List/GridList/Demo.d.ts +1 -0
  163. package/es/List/GridList/Demo.js +60 -38
  164. package/es/List/GridList/hook.d.ts +1 -1
  165. package/es/List/GridList/hook.js +66 -35
  166. package/es/List/GridList/index.js +33 -29
  167. package/es/List/GridList/{index.css → index.less} +0 -0
  168. package/es/List/GridList/utils.d.ts +2 -2
  169. package/es/List/GridList/utils.js +1 -0
  170. package/es/List/VList/index.d.ts +1 -1
  171. package/es/List/VList/index.js +32 -19
  172. package/es/List/VList/{index.css → index.less} +0 -0
  173. package/es/List/VList/utils.d.ts +2 -2
  174. package/es/List/VList/utils.js +8 -6
  175. package/es/List/demo.d.ts +3 -0
  176. package/es/List/demo.js +26 -0
  177. package/es/List/index.d.ts +1 -1
  178. package/es/List/index.js +31 -23
  179. package/es/List/{index.css → index.less} +5 -4
  180. package/es/LoaderApp/index.js +59 -25
  181. package/es/LoaderApp/{index.css → index.less} +0 -0
  182. package/es/LoaderApp/loader.js +40 -23
  183. package/es/LoaderApp/sandbox.back.js +101 -24
  184. package/es/LoaderApp/sandbox.js +26 -9
  185. package/es/LoaderApp/utils.d.ts +1 -1
  186. package/es/LoaderApp/utils.js +68 -25
  187. package/es/LoaderScript/index.js +25 -10
  188. package/es/LoaderScript/utils.js +151 -87
  189. package/es/Map/BasicMap/AMapInstance.d.ts +1 -1
  190. package/es/Map/BasicMap/AMapInstance.js +25 -3
  191. package/es/Map/BasicMap/LeafletInstance.js +28 -11
  192. package/es/Map/BasicMap/index.js +67 -27
  193. package/es/Map/BasicMap/index.less +24 -0
  194. package/es/Map/ClusterLayer/hook.d.ts +2 -2
  195. package/es/Map/ClusterLayer/hook.js +51 -23
  196. package/es/Map/ClusterLayer/index.d.ts +1 -1
  197. package/es/Map/ClusterLayer/index.js +14 -6
  198. package/es/Map/ClusterLayer/index.less +27 -0
  199. package/es/Map/Config/index.js +44 -16
  200. package/es/Map/Config/utils.js +17 -3
  201. package/es/Map/Context/index.js +43 -9
  202. package/es/Map/FindPio/index.js +5 -2
  203. package/es/Map/FindPio/{index.css → index.less} +0 -0
  204. package/es/Map/InfoWindow/MakerLikeWindow.d.ts +1 -1
  205. package/es/Map/InfoWindow/MakerLikeWindow.js +41 -18
  206. package/es/Map/InfoWindow/demo.d.ts +1 -0
  207. package/es/Map/InfoWindow/demo.js +51 -29
  208. package/es/Map/InfoWindow/index.d.ts +1 -1
  209. package/es/Map/InfoWindow/index.js +39 -18
  210. package/es/Map/LevelCenter/DragMarker/index.js +16 -10
  211. package/es/Map/LevelCenter/demo.d.ts +1 -0
  212. package/es/Map/LevelCenter/demo.js +41 -22
  213. package/es/Map/LevelCenter/index.js +41 -29
  214. package/es/Map/LevelCenter/index.less +2 -0
  215. package/es/Map/LoaderMap/index.js +38 -22
  216. package/es/Map/MapDrawSelect/demo.d.ts +1 -0
  217. package/es/Map/MapDrawSelect/demo.js +65 -46
  218. package/es/Map/MapDrawSelect/index.js +43 -31
  219. package/es/Map/MapDrawSelect/index.less +2 -0
  220. package/es/Map/MouseTool/index.js +32 -18
  221. package/es/Map/MouseTool/useMouseTools.js +37 -8
  222. package/es/Map/ResetTools/index.js +58 -44
  223. package/es/Map/ResetTools/index.less +35 -0
  224. package/es/Map/SinglePoint/index.js +39 -27
  225. package/es/Map/SinglePoint/index.less +41 -0
  226. package/es/Map/hook/useMapEvent.js +8 -4
  227. package/es/Map/hook/useMapType.js +3 -2
  228. package/es/Map/index.d.ts +1 -0
  229. package/es/Map/index.js +11 -11
  230. package/es/Map/useMarker/index.d.ts +1 -1
  231. package/es/Map/useMarker/index.js +33 -13
  232. package/es/Map/{LevelCenter/index.css → useMarker/index.less} +0 -0
  233. package/es/Map/withMap/index.d.ts +1 -0
  234. package/es/Map/withMap/index.js +14 -4
  235. package/es/Modal/demo.d.ts +3 -0
  236. package/es/Modal/demo.js +106 -0
  237. package/es/Modal/index.js +94 -57
  238. package/es/Modal/index.less +45 -0
  239. package/es/Picture/component/DefaultRects/RectInfo.js +59 -37
  240. package/es/Picture/component/DefaultRects/index.js +46 -32
  241. package/es/Picture/component/DefaultRects/index.less +188 -0
  242. package/es/Picture/component/DrawRect/index.js +37 -24
  243. package/es/Picture/component/DrawRect/{index.css → index.less} +0 -0
  244. package/es/Picture/component/RectMenu/index.js +35 -26
  245. package/es/Picture/component/RectMenu/index.less +31 -0
  246. package/es/Picture/component/RectMenu/utils.js +6 -3
  247. package/es/Picture/component/Tools/index.js +91 -69
  248. package/es/Picture/component/Tools/index.less +43 -0
  249. package/es/Picture/component/WheelScale/index.js +9 -4
  250. package/es/Picture/demo.js +14 -11
  251. package/es/Picture/dragBound.d.ts +1 -1
  252. package/es/Picture/dragBound.js +17 -4
  253. package/es/Picture/index.d.ts +2 -2
  254. package/es/Picture/index.js +201 -137
  255. package/es/Picture/index.less +14 -0
  256. package/es/Picture/loadCaptureRectImage.d.ts +1 -1
  257. package/es/Picture/loadCaptureRectImage.js +39 -14
  258. package/es/Picture/useDraw.js +40 -20
  259. package/es/Picture/utils.d.ts +9 -9
  260. package/es/Picture/utils.js +18 -3
  261. package/es/Player/api/index.d.ts +3 -3
  262. package/es/Player/api/index.js +117 -82
  263. package/es/Player/context.js +21 -7
  264. package/es/Player/contraller_bar/bar.d.ts +1 -1
  265. package/es/Player/contraller_bar/bar.js +28 -10
  266. package/es/Player/contraller_bar/contraller_event.js +34 -12
  267. package/es/Player/contraller_bar/index.js +30 -22
  268. package/es/Player/contraller_bar/left_bar.js +62 -39
  269. package/es/Player/contraller_bar/right_bar.js +34 -18
  270. package/es/Player/contraller_bar/time.js +19 -8
  271. package/es/Player/contraller_bar/useBarStatus.js +29 -11
  272. package/es/Player/contraller_bar/volume.js +43 -21
  273. package/es/Player/demo.d.ts +1 -0
  274. package/es/Player/demo.js +258 -215
  275. package/es/Player/event/errorEvent.js +41 -16
  276. package/es/Player/event/eventName.js +12 -1
  277. package/es/Player/event/index.js +66 -24
  278. package/es/Player/fps_play.js +33 -15
  279. package/es/Player/frontend_player.js +42 -20
  280. package/es/Player/frontend_timeline.js +95 -55
  281. package/es/Player/iconfont.js +23 -8
  282. package/es/Player/index.js +1 -1
  283. package/es/Player/live_heart.js +15 -3
  284. package/es/Player/message.js +68 -37
  285. package/es/Player/segment_player.js +113 -62
  286. package/es/Player/segment_timeline.js +145 -97
  287. package/es/Player/single_player.js +153 -111
  288. package/es/Player/style/bar.less +39 -0
  289. package/es/Player/style/iconfont.js +17 -10
  290. package/es/Player/style/index.less +30 -0
  291. package/es/Player/style/message.less +50 -0
  292. package/es/Player/style/slider.less +103 -0
  293. package/es/Player/style/timeline.less +106 -0
  294. package/es/Player/style/volume.less +21 -0
  295. package/es/Player/timeline.d.ts +1 -1
  296. package/es/Player/timeline.js +59 -32
  297. package/es/Player/util.js +46 -7
  298. package/es/PlayerExt/demo.d.ts +1 -0
  299. package/es/PlayerExt/demo.js +145 -112
  300. package/es/PlayerExt/index.d.ts +1 -1
  301. package/es/PlayerExt/index.js +135 -82
  302. package/es/PlayerExt/{index.css → index.less} +0 -0
  303. package/es/Progress/index.js +18 -5
  304. package/es/Progress/index.less +20 -0
  305. package/es/ROI/demo.d.ts +1 -0
  306. package/es/ROI/demo.js +12 -8
  307. package/es/ROI/index.js +45 -35
  308. package/es/ROI/index.less +29 -0
  309. package/es/ScreenPlayer/Live.d.ts +1 -1
  310. package/es/ScreenPlayer/Live.js +159 -103
  311. package/es/ScreenPlayer/LiveTools.js +153 -116
  312. package/es/ScreenPlayer/PlayerWithExt.js +168 -113
  313. package/es/ScreenPlayer/RatePick.js +35 -22
  314. package/es/ScreenPlayer/Record.js +291 -185
  315. package/es/ScreenPlayer/RecordTools.js +192 -148
  316. package/es/ScreenPlayer/ScreenSelect.js +33 -26
  317. package/es/ScreenPlayer/SegmentTimeLine.js +23 -16
  318. package/es/ScreenPlayer/TimeMode.js +22 -16
  319. package/es/ScreenPlayer/TimeSelect.js +84 -63
  320. package/es/ScreenPlayer/demo.js +16 -18
  321. package/es/ScreenPlayer/demo2.js +192 -177
  322. package/es/ScreenPlayer/index.d.ts +1 -0
  323. package/es/ScreenPlayer/index.js +3 -3
  324. package/es/ScreenPlayer/index.less +178 -0
  325. package/es/ScreenPlayer/useTimeSlider.js +148 -49
  326. package/es/ScreenPlayer/useVideoFit.js +18 -5
  327. package/es/ScreenPlayer/utils.js +6 -0
  328. package/es/SegmentPlayer/index.js +1 -1
  329. package/es/Service/fetch-adapter.d.ts +1 -1
  330. package/es/Service/fetch-adapter.js +48 -5
  331. package/es/Service/http.js +46 -16
  332. package/es/Service/index.js +2 -2
  333. package/es/TableLayout/index.js +18 -12
  334. package/es/TableLayout/{index.css → index.less} +0 -0
  335. package/es/ThemeAntd/demo.d.ts +1 -0
  336. package/es/ThemeAntd/demo.js +126 -76
  337. package/es/ThemeAntd/{demo.css → demo.less} +4 -3
  338. package/es/ThemeAntd/index.js +6 -2
  339. package/es/ThemeAntd/index.less +16 -0
  340. package/es/ThemeAntd/style/button.less +67 -0
  341. package/es/ThemeAntd/style/checkbox.less +72 -0
  342. package/es/ThemeAntd/style/form.less +12 -0
  343. package/es/ThemeAntd/style/input.less +83 -0
  344. package/es/ThemeAntd/style/pagination.less +95 -0
  345. package/es/ThemeAntd/style/picker.less +106 -0
  346. package/es/ThemeAntd/style/popover.less +5 -0
  347. package/es/ThemeAntd/style/radio.less +87 -0
  348. package/es/ThemeAntd/style/{scrollbar.css → scrollbar.less} +4 -2
  349. package/es/ThemeAntd/style/select.less +81 -0
  350. package/es/ThemeAntd/style/table.less +57 -0
  351. package/es/ThemeAntd/style/tree.less +18 -0
  352. package/es/Timeout/index.js +36 -12
  353. package/es/Tree/demo.js +26 -21
  354. package/es/Tree/index.js +51 -30
  355. package/es/Tree/index.less +59 -0
  356. package/es/index.js +47 -47
  357. package/es/useDrawROI/index.js +130 -65
  358. package/es/useEventEmitterHandle/index.js +6 -2
  359. package/es/useFullscreen/demo.js +44 -27
  360. package/es/useFullscreen/index.js +30 -8
  361. package/es/useHistory/index.js +3 -1
  362. package/es/useInfiniteScroll/index.js +50 -19
  363. package/es/useRafInterval/index.js +28 -4
  364. package/es/useSimpleState/index.js +23 -6
  365. package/es/useVirtualList/index.js +58 -20
  366. package/es/utils.d.ts +1 -1
  367. package/es/utils.js +53 -14
  368. package/package.json +42 -32
  369. package/tsconfig.json +8 -32
  370. package/.eslintrc +0 -4
  371. package/.fatherrc.js +0 -25
  372. package/.prettierrc +0 -11
  373. package/.umirc.ts +0 -55
  374. package/es/Box/InfoBox/index.css +0 -22
  375. package/es/Box/TwoColumnBox/index.css +0 -70
  376. package/es/CheckGroupFixed/index.css +0 -49
  377. package/es/CustomRenderSelect/index.css +0 -20
  378. package/es/Drawer/Demo.js +0 -59
  379. package/es/Drawer/index.css +0 -40
  380. package/es/FullScreen/index.css +0 -16
  381. package/es/ImageView/index.css +0 -10
  382. package/es/Input/index.css +0 -8
  383. package/es/LabelValue/index.css +0 -18
  384. package/es/List/DynamicList/index.css +0 -15
  385. package/es/Map/BasicMap/index.css +0 -24
  386. package/es/Map/ClusterLayer/index.css +0 -26
  387. package/es/Map/MapDrawSelect/index.css +0 -0
  388. package/es/Map/ResetTools/index.css +0 -32
  389. package/es/Map/SinglePoint/icon/Place_icon_OnLine_Hover.svg +0 -15
  390. package/es/Map/SinglePoint/icon/Place_icon_OnLine_Normal.svg +0 -15
  391. package/es/Map/SinglePoint/icon/Place_icon_OutLine_Hover.svg +0 -15
  392. package/es/Map/SinglePoint/icon/Place_icon_OutLine_Normal.svg +0 -15
  393. package/es/Map/SinglePoint/index.css +0 -29
  394. package/es/Map/useMarker/index.css +0 -0
  395. package/es/Modal/index.css +0 -43
  396. package/es/Picture/component/DefaultRects/index.css +0 -247
  397. package/es/Picture/component/RectMenu/index.css +0 -31
  398. package/es/Picture/component/Tools/index.css +0 -42
  399. package/es/Picture/index.css +0 -12
  400. package/es/Player/style/bar.css +0 -38
  401. package/es/Player/style/index.css +0 -30
  402. package/es/Player/style/message.css +0 -49
  403. package/es/Player/style/slider.css +0 -96
  404. package/es/Player/style/timeline.css +0 -99
  405. package/es/Player/style/volume.css +0 -19
  406. package/es/Progress/index.css +0 -20
  407. package/es/ROI/index.css +0 -29
  408. package/es/ScreenPlayer/index.css +0 -166
  409. package/es/ThemeAntd/index.css +0 -620
  410. package/es/ThemeAntd/style/button.css +0 -55
  411. package/es/ThemeAntd/style/checkbox.css +0 -64
  412. package/es/ThemeAntd/style/form.css +0 -10
  413. package/es/ThemeAntd/style/input.css +0 -68
  414. package/es/ThemeAntd/style/pagination.css +0 -82
  415. package/es/ThemeAntd/style/picker.css +0 -98
  416. package/es/ThemeAntd/style/popover.css +0 -3
  417. package/es/ThemeAntd/style/radio.css +0 -80
  418. package/es/ThemeAntd/style/select.css +0 -76
  419. package/es/ThemeAntd/style/table.css +0 -46
  420. package/es/ThemeAntd/style/tree.css +0 -16
  421. package/es/Tree/index.css +0 -64
@@ -1,40 +1,53 @@
1
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+
2
3
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+
3
5
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+
4
7
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
+
5
9
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
+
6
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
+
7
13
  import React, { useState, useCallback, useMemo, useContext } from 'react';
8
- import IconFont from '../iconfont';
9
- import Bar from './bar';
10
- import { Context } from '../context';
11
- import { useVideoEvent } from '../event';
12
- import Volume from './volume';
13
- import Time from './time';
14
+ import IconFont from "../iconfont";
15
+ import Bar from "./bar";
16
+ import { Context } from "../context";
17
+ import { useVideoEvent } from "../event";
18
+ import Volume from "./volume";
19
+ import Time from "./time";
20
+ import { jsx as _jsx } from "react/jsx-runtime";
21
+ import { jsxs as _jsxs } from "react/jsx-runtime";
22
+
14
23
  function LeftBar(_ref) {
15
24
  var reload = _ref.reload,
16
- leftExtContents = _ref.leftExtContents,
17
- leftMidExtContents = _ref.leftMidExtContents,
18
- hideTimeProgress = _ref.hideTimeProgress,
19
- oneFpsPlay = _ref.oneFpsPlay;
25
+ leftExtContents = _ref.leftExtContents,
26
+ leftMidExtContents = _ref.leftMidExtContents,
27
+ hideTimeProgress = _ref.hideTimeProgress,
28
+ oneFpsPlay = _ref.oneFpsPlay;
29
+
20
30
  var _useContext = useContext(Context),
21
- api = _useContext.api,
22
- container = _useContext.container,
23
- isLive = _useContext.isLive,
24
- isFpsPlay = _useContext.isFpsPlay;
31
+ api = _useContext.api,
32
+ container = _useContext.container,
33
+ isLive = _useContext.isLive,
34
+ isFpsPlay = _useContext.isFpsPlay;
35
+
25
36
  var _useState = useState(Date.now()),
26
- _useState2 = _slicedToArray(_useState, 2),
27
- dep = _useState2[0],
28
- setDep = _useState2[1];
37
+ _useState2 = _slicedToArray(_useState, 2),
38
+ dep = _useState2[0],
39
+ setDep = _useState2[1];
40
+
29
41
  var updateRender = function updateRender() {
30
42
  return setDep(Date.now());
31
43
  };
44
+
32
45
  useVideoEvent('play', updateRender);
33
46
  useVideoEvent('pause', updateRender);
34
47
  useVideoEvent('volumechange', updateRender);
35
- var video = container.querySelector('video');
36
- //缓存值
48
+ var video = container.querySelector('video'); //缓存值
37
49
  // eslint-disable-next-line react-hooks/exhaustive-deps
50
+
38
51
  var paused = useMemo(function () {
39
52
  return video === null || video === void 0 ? void 0 : video.paused;
40
53
  }, [dep, video]);
@@ -43,10 +56,10 @@ function LeftBar(_ref) {
43
56
  }, [paused]);
44
57
  var statusText = useMemo(function () {
45
58
  return paused ? '播放' : '暂停';
46
- }, [paused]);
47
- //TODO 方法
59
+ }, [paused]); //TODO 方法
60
+
48
61
  var changePlayStatus = useCallback(function () {
49
- if (video === null || video === void 0 ? void 0 : video.paused) {
62
+ if (video !== null && video !== void 0 && video.paused) {
50
63
  var buffered = api.getSecondsLoaded();
51
64
  api.seekTo(buffered - 1);
52
65
  api.play();
@@ -54,22 +67,32 @@ function LeftBar(_ref) {
54
67
  api.pause();
55
68
  }
56
69
  }, [video, api]);
57
- return /*#__PURE__*/React.createElement("div", {
58
- className: "contraller-left-bar"
59
- }, leftExtContents, !isFpsPlay && /*#__PURE__*/React.createElement(Bar, null, /*#__PURE__*/React.createElement(IconFont, {
60
- onClick: changePlayStatus,
61
- type: statusIconClassName,
62
- title: statusText
63
- })), /*#__PURE__*/React.createElement(Bar, null, /*#__PURE__*/React.createElement(Volume, {
64
- api: api
65
- })), !isLive && !hideTimeProgress && /*#__PURE__*/React.createElement(Time, null), /*#__PURE__*/React.createElement(Bar, null, /*#__PURE__*/React.createElement(IconFont, {
66
- onClick: reload,
67
- type: "lm-player-Refresh_Main",
68
- title: "\u91CD\u8F7D"
69
- })), !isLive && oneFpsPlay && /*#__PURE__*/React.createElement(Bar, null, /*#__PURE__*/React.createElement(IconFont, {
70
- onClick: isFpsPlay ? api.closeFpsPlay : api.openFpsPlay,
71
- type: "lm-player-zhuzhenplay",
72
- title: "\u9010\u5E27\u64AD\u653E"
73
- })), leftMidExtContents);
70
+ return /*#__PURE__*/_jsxs("div", {
71
+ className: "contraller-left-bar",
72
+ children: [leftExtContents, !isFpsPlay && /*#__PURE__*/_jsx(Bar, {
73
+ children: /*#__PURE__*/_jsx(IconFont, {
74
+ onClick: changePlayStatus,
75
+ type: statusIconClassName,
76
+ title: statusText
77
+ })
78
+ }), /*#__PURE__*/_jsx(Bar, {
79
+ children: /*#__PURE__*/_jsx(Volume, {
80
+ api: api
81
+ })
82
+ }), !isLive && !hideTimeProgress && /*#__PURE__*/_jsx(Time, {}), /*#__PURE__*/_jsx(Bar, {
83
+ children: /*#__PURE__*/_jsx(IconFont, {
84
+ onClick: reload,
85
+ type: "lm-player-Refresh_Main",
86
+ title: "\u91CD\u8F7D"
87
+ })
88
+ }), !isLive && oneFpsPlay && /*#__PURE__*/_jsx(Bar, {
89
+ children: /*#__PURE__*/_jsx(IconFont, {
90
+ onClick: isFpsPlay ? api.closeFpsPlay : api.openFpsPlay,
91
+ type: "lm-player-zhuzhenplay",
92
+ title: "\u9010\u5E27\u64AD\u653E"
93
+ })
94
+ }), leftMidExtContents]
95
+ });
74
96
  }
97
+
75
98
  export default LeftBar;
@@ -1,32 +1,48 @@
1
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+
2
3
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+
3
5
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+
4
7
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
+
5
9
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
+
6
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
+
7
13
  import React, { useContext } from 'react';
8
- import IconFont from '../iconfont';
9
- import Bar from './bar';
10
- import useFullscreen from '../../useFullscreen';
11
- import { Context } from '../context';
14
+ import IconFont from "../iconfont";
15
+ import Bar from "./bar";
16
+ import useFullscreen from "../../useFullscreen";
17
+ import { Context } from "../context";
18
+ import { jsx as _jsx } from "react/jsx-runtime";
19
+ import { jsxs as _jsxs } from "react/jsx-runtime";
20
+
12
21
  function RightBar(_ref) {
13
22
  var rightExtContents = _ref.rightExtContents,
14
- rightMidExtContents = _ref.rightMidExtContents;
23
+ rightMidExtContents = _ref.rightMidExtContents;
24
+
15
25
  var _useContext = useContext(Context),
16
- container = _useContext.container;
26
+ container = _useContext.container;
27
+
17
28
  var _useFullscreen = useFullscreen(container),
18
- _useFullscreen2 = _slicedToArray(_useFullscreen, 2),
19
- isFullScreen = _useFullscreen2[0],
20
- _useFullscreen2$ = _useFullscreen2[1],
21
- enterFullscreen = _useFullscreen2$.enterFullscreen,
22
- exitFullscreen = _useFullscreen2$.exitFullscreen;
29
+ _useFullscreen2 = _slicedToArray(_useFullscreen, 2),
30
+ isFullScreen = _useFullscreen2[0],
31
+ _useFullscreen2$ = _useFullscreen2[1],
32
+ enterFullscreen = _useFullscreen2$.enterFullscreen,
33
+ exitFullscreen = _useFullscreen2$.exitFullscreen;
34
+
23
35
  var fullscreen = isFullScreen ? exitFullscreen : enterFullscreen;
24
- return /*#__PURE__*/React.createElement("div", {
25
- className: "contraller-right-bar"
26
- }, rightMidExtContents, /*#__PURE__*/React.createElement(Bar, null, /*#__PURE__*/React.createElement(IconFont, {
27
- title: isFullScreen ? '窗口' : '全屏',
28
- onClick: fullscreen,
29
- type: isFullScreen ? 'lm-player-ExitFull_Main' : 'lm-player-Full_Main'
30
- })), rightExtContents);
36
+ return /*#__PURE__*/_jsxs("div", {
37
+ className: "contraller-right-bar",
38
+ children: [rightMidExtContents, /*#__PURE__*/_jsx(Bar, {
39
+ children: /*#__PURE__*/_jsx(IconFont, {
40
+ title: isFullScreen ? '窗口' : '全屏',
41
+ onClick: fullscreen,
42
+ type: isFullScreen ? 'lm-player-ExitFull_Main' : 'lm-player-Full_Main'
43
+ })
44
+ }), rightExtContents]
45
+ });
31
46
  }
47
+
32
48
  export default RightBar;
@@ -1,19 +1,30 @@
1
1
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
2
+
2
3
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
4
+
3
5
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
6
+
4
7
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
8
+
5
9
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
10
+
6
11
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
12
+
7
13
  import React from 'react';
8
- import { useTimes } from '../timeline';
9
- import { timeStamp } from '../util';
14
+ import { useTimes } from "../timeline";
15
+ import { timeStamp } from "../util";
16
+ import { jsxs as _jsxs } from "react/jsx-runtime";
17
+
10
18
  function Time() {
11
19
  var _useTimes = useTimes(),
12
- _useTimes2 = _slicedToArray(_useTimes, 3),
13
- current = _useTimes2[0],
14
- duration = _useTimes2[2];
15
- return /*#__PURE__*/React.createElement("span", {
16
- className: "video-time-progress"
17
- }, timeStamp(current), "/", timeStamp(duration || 0));
20
+ _useTimes2 = _slicedToArray(_useTimes, 3),
21
+ current = _useTimes2[0],
22
+ duration = _useTimes2[2];
23
+
24
+ return /*#__PURE__*/_jsxs("span", {
25
+ className: "video-time-progress",
26
+ children: [timeStamp(current), "/", timeStamp(duration || 0)]
27
+ });
18
28
  }
29
+
19
30
  export default Time;
@@ -1,37 +1,55 @@
1
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
2
+
3
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { _defineProperty(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
4
+
5
+ function _defineProperty(obj, key, value) { if (key in obj) { Object.defineProperty(obj, key, { value: value, enumerable: true, configurable: true, writable: true }); } else { obj[key] = value; } return obj; }
6
+
1
7
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
8
+
2
9
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
10
+
3
11
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12
+
4
13
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
14
+
5
15
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
16
+
6
17
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
18
+
7
19
  import { useContext, useState } from 'react';
8
- import { Context } from '../context';
9
- import { useRegisterPlayerEvents } from '../event';
10
- import EventName from '../event/eventName';
20
+ import { Context } from "../context";
21
+ import { useRegisterPlayerEvents } from "../event";
22
+ import EventName from "../event/eventName";
23
+
11
24
  function useBarStatus() {
12
25
  var _useContext = useContext(Context),
13
- event = _useContext.event;
26
+ event = _useContext.event;
27
+
14
28
  var _useState = useState({
15
- status: 1
16
- }),
17
- _useState2 = _slicedToArray(_useState, 2),
18
- state = _useState2[0],
19
- setState = _useState2[1];
29
+ status: 1
30
+ }),
31
+ _useState2 = _slicedToArray(_useState, 2),
32
+ state = _useState2[0],
33
+ setState = _useState2[1];
34
+
20
35
  var show = function show() {
21
36
  return setState(function (old) {
22
- return Object.assign(Object.assign({}, old), {
37
+ return _objectSpread(_objectSpread({}, old), {}, {
23
38
  status: 1
24
39
  });
25
40
  });
26
41
  };
42
+
27
43
  var hide = function hide() {
28
44
  return setState(function (old) {
29
- return Object.assign(Object.assign({}, old), {
45
+ return _objectSpread(_objectSpread({}, old), {}, {
30
46
  status: 0
31
47
  });
32
48
  });
33
49
  };
50
+
34
51
  useRegisterPlayerEvents(event, [[EventName.SHOW_CONTRALLER, show], [EventName.HIDE_CONTRALLER, hide]]);
35
52
  return state.status;
36
53
  }
54
+
37
55
  export default useBarStatus;
@@ -1,42 +1,59 @@
1
- import "antd/lib/slider/style";
2
- import _Slider from "antd/lib/slider";
3
1
  import "antd/lib/tooltip/style";
4
2
  import _Tooltip from "antd/lib/tooltip";
3
+ import "antd/lib/slider/style";
4
+ import _Slider from "antd/lib/slider";
5
5
  import _useUpdateEffect from "ahooks/es/useUpdateEffect";
6
6
  import _useUpdate from "ahooks/es/useUpdate";
7
+
7
8
  function _slicedToArray(arr, i) { return _arrayWithHoles(arr) || _iterableToArrayLimit(arr, i) || _unsupportedIterableToArray(arr, i) || _nonIterableRest(); }
9
+
8
10
  function _nonIterableRest() { throw new TypeError("Invalid attempt to destructure non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); }
11
+
9
12
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
13
+
10
14
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) { arr2[i] = arr[i]; } return arr2; }
15
+
11
16
  function _iterableToArrayLimit(arr, i) { var _i = arr == null ? null : typeof Symbol !== "undefined" && arr[Symbol.iterator] || arr["@@iterator"]; if (_i == null) return; var _arr = []; var _n = true; var _d = false; var _s, _e; try { for (_i = _i.call(arr); !(_n = (_s = _i.next()).done); _n = true) { _arr.push(_s.value); if (i && _arr.length === i) break; } } catch (err) { _d = true; _e = err; } finally { try { if (!_n && _i["return"] != null) _i["return"](); } finally { if (_d) throw _e; } } return _arr; }
17
+
12
18
  function _arrayWithHoles(arr) { if (Array.isArray(arr)) return arr; }
19
+
13
20
  import React, { useMemo, useState } from 'react';
14
- import IconFont from '../iconfont';
15
- import "../style/volume.css";
21
+ import IconFont from "../iconfont";
22
+ import "../style/volume.less";
23
+ import { jsx as _jsx } from "react/jsx-runtime";
24
+
16
25
  function Volume(_ref) {
26
+ var _api$getVolume;
27
+
17
28
  var api = _ref.api,
18
- style = _ref.style;
19
- var _a;
20
- var _useState = useState(Math.round((_a = api === null || api === void 0 ? void 0 : api.getVolume()) !== null && _a !== void 0 ? _a : 0 * 100)),
21
- _useState2 = _slicedToArray(_useState, 2),
22
- val = _useState2[0],
23
- setVal = _useState2[1];
24
- var update = _useUpdate();
25
- // eslint-disable-next-line react-hooks/exhaustive-deps
29
+ style = _ref.style;
30
+
31
+ var _useState = useState(Math.round((_api$getVolume = api === null || api === void 0 ? void 0 : api.getVolume()) !== null && _api$getVolume !== void 0 ? _api$getVolume : 0 * 100)),
32
+ _useState2 = _slicedToArray(_useState, 2),
33
+ val = _useState2[0],
34
+ setVal = _useState2[1];
35
+
36
+ var update = _useUpdate(); // eslint-disable-next-line react-hooks/exhaustive-deps
37
+
38
+
26
39
  var volume = useMemo(function () {
27
- return (api === null || api === void 0 ? void 0 : api.muted) ? 0 : val;
40
+ return api !== null && api !== void 0 && api.muted ? 0 : val;
28
41
  }, undefined);
42
+
29
43
  var onChange = function onChange(num) {
30
- if (api === null || api === void 0 ? void 0 : api.muted) {
44
+ if (api !== null && api !== void 0 && api.muted) {
31
45
  api === null || api === void 0 ? void 0 : api.unmute();
32
46
  }
47
+
33
48
  setVal(num);
34
49
  update();
35
50
  };
51
+
36
52
  var toggleMuted = function toggleMuted() {
37
53
  if (!api) {
38
54
  return;
39
55
  }
56
+
40
57
  if (api.muted) {
41
58
  api.unmute();
42
59
  setVal(100);
@@ -44,23 +61,28 @@ function Volume(_ref) {
44
61
  api.mute();
45
62
  setVal(0);
46
63
  }
64
+
47
65
  update();
48
66
  };
67
+
49
68
  _useUpdateEffect(function () {
50
69
  return api === null || api === void 0 ? void 0 : api.setVolume(val / 100);
51
70
  }, [val]);
52
- return /*#__PURE__*/React.createElement(_Tooltip, {
71
+
72
+ return /*#__PURE__*/_jsx(_Tooltip, {
53
73
  showArrow: false,
54
74
  overlayClassName: "lm-player-volume-popup",
55
- title: /*#__PURE__*/React.createElement(_Slider, {
75
+ title: /*#__PURE__*/_jsx(_Slider, {
56
76
  onChange: onChange,
57
77
  vertical: true,
58
78
  value: val
79
+ }),
80
+ children: /*#__PURE__*/_jsx(IconFont, {
81
+ style: style,
82
+ type: volume !== 0 ? 'lm-player-volume-open' : 'lm-player-volume-close',
83
+ onClick: toggleMuted
59
84
  })
60
- }, /*#__PURE__*/React.createElement(IconFont, {
61
- style: style,
62
- type: volume !== 0 ? 'lm-player-volume-open' : 'lm-player-volume-close',
63
- onClick: toggleMuted
64
- }));
85
+ });
65
86
  }
87
+
66
88
  export default /*#__PURE__*/React.memo(Volume);
@@ -1,2 +1,3 @@
1
+ /// <reference types="react" />
1
2
  declare const App: () => JSX.Element;
2
3
  export default App;