@unicom-cloud/ui 0.8.54 → 0.8.56

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 (429) hide show
  1. package/Affix.js +36 -36
  2. package/Alert.js +41 -45
  3. package/Anchor.js +1 -1
  4. package/AutoComplete.js +40 -40
  5. package/Avatar.js +36 -36
  6. package/BackTop.js +26 -26
  7. package/Badge.js +43 -43
  8. package/Breadcrumb.js +17 -17
  9. package/Button.js +42 -42
  10. package/Calendar.js +54 -56
  11. package/Card.js +28 -28
  12. package/Carousel.js +42 -43
  13. package/Cascader.js +1 -1
  14. package/Checkbox.js +1 -1
  15. package/Collapse.js +1 -1
  16. package/ColorPicker.js +11 -580
  17. package/Comment.js +14 -14
  18. package/ConfigProvider.js +2 -2
  19. package/Copy.js +26 -26
  20. package/DatePicker.js +661 -670
  21. package/Descriptions.js +53 -53
  22. package/Divider.js +15 -15
  23. package/Draggable.js +16 -16
  24. package/Drawer.js +1 -1
  25. package/Dropdown.js +10 -10
  26. package/Empty.js +3 -3
  27. package/Form.js +10 -1410
  28. package/Grid.js +49 -49
  29. package/Icon.js +10 -10
  30. package/IconHover.js +2 -2
  31. package/Image.js +1 -1
  32. package/Input.js +1 -1
  33. package/InputNumber.js +7 -7
  34. package/InputTag.js +1 -1
  35. package/Layout.js +34 -34
  36. package/Link.js +26 -26
  37. package/List.js +39 -39
  38. package/Mentions.js +17 -17
  39. package/Menu.js +1 -1
  40. package/Message.js +3 -3
  41. package/Modal.js +1 -1
  42. package/Notice.js +4 -10
  43. package/Notification.js +3 -3
  44. package/OverflowEllipsis.js +18 -18
  45. package/PageHeader.js +26 -27
  46. package/Pagination.js +1 -1
  47. package/Picker.js +1 -1
  48. package/Popconfirm.js +15 -15
  49. package/Popover.js +22 -22
  50. package/Progress.js +18 -18
  51. package/Radio.js +2 -2
  52. package/Rate.js +40 -43
  53. package/ResizeBox.js +191 -192
  54. package/Result.js +17 -17
  55. package/Select.js +1 -1
  56. package/SelectView.js +56 -56
  57. package/Skeleton.js +35 -35
  58. package/Slider.js +81 -81
  59. package/Space.js +27 -27
  60. package/SpeechSynthesis.js +29 -32
  61. package/Spin.js +15 -15
  62. package/Statistic.js +54 -54
  63. package/Steps.js +44 -44
  64. package/Switch.js +39 -38
  65. package/Table.js +488 -488
  66. package/Tabs.js +1 -1
  67. package/Tag.js +13 -14
  68. package/TimePicker.js +68 -68
  69. package/Timeline.js +1 -1
  70. package/Tooltip.js +27 -28
  71. package/Transfer.js +29 -30
  72. package/Tree.js +1 -1
  73. package/TreeSelect.js +1 -1
  74. package/Trigger.js +53 -52
  75. package/Typography.js +2 -737
  76. package/Upload.js +1 -1
  77. package/VerificationCode.js +1 -1
  78. package/Version.js +1 -1
  79. package/Watermark.js +1 -1
  80. package/chunk/1mEO29GP.js +23 -0
  81. package/chunk/5pZ3ayqs.js +29 -0
  82. package/chunk/9Gh1afjL.js +23 -0
  83. package/chunk/B1S1OEw6.js +29 -0
  84. package/chunk/{RRWbBHK-.js → B2Bp3i5u.js} +221 -221
  85. package/chunk/B45v5S9k.js +209 -0
  86. package/chunk/B6fn5y_s.js +23 -0
  87. package/chunk/B9PsJar0.js +118 -0
  88. package/chunk/BA02BFUV.js +41 -0
  89. package/chunk/BCk8e9fj.js +29 -0
  90. package/chunk/BHK9zpXn.js +207 -0
  91. package/chunk/BHLTzWzi.js +29 -0
  92. package/chunk/BK1FKNAX.js +41 -0
  93. package/chunk/BM6dpkeM.js +32 -0
  94. package/chunk/{DQ3uFRJD.js → BP7xX86Q.js} +223 -202
  95. package/chunk/BWx1cVT_.js +66 -0
  96. package/chunk/BbI3gqVr.js +23 -0
  97. package/chunk/{CIc4yo9k.js → BbYzi8M0.js} +46 -46
  98. package/chunk/Be7oeWU8.js +34 -0
  99. package/chunk/BeM2hfks.js +88 -0
  100. package/chunk/BkHxm4sv.js +41 -0
  101. package/chunk/{BUQBof6z.js → Bl-ODC57.js} +206 -207
  102. package/chunk/BlKc_pDZ.js +678 -0
  103. package/chunk/{BzqZZHGK.js → Bny52uiG.js} +48 -48
  104. package/chunk/{PuuHmqnW.js → BpwDupra.js} +238 -238
  105. package/chunk/BqxwlITu.js +52 -0
  106. package/chunk/BuEC_zcc.js +278 -0
  107. package/chunk/{CqcZfQQ4.js → Bv8ZRDFt.js} +80 -80
  108. package/chunk/{DZGcv_9A.js → C-w9pFY-.js} +32 -32
  109. package/chunk/C2fspJbE.js +23 -0
  110. package/chunk/C7Okdv4u.js +34 -0
  111. package/chunk/C95ipQ6b.js +41 -0
  112. package/chunk/{BzMYgxgO.js → CF3Telny.js} +26 -26
  113. package/chunk/CPl52AZh.js +206 -0
  114. package/chunk/CXNW5Y2a.js +23 -0
  115. package/chunk/Cb_oWoGj.js +40 -0
  116. package/chunk/CcX2pBUh.js +46 -0
  117. package/chunk/{BdJcAQ0Q.js → CggcswbO.js} +18 -18
  118. package/chunk/CilQ012k.js +1796 -0
  119. package/chunk/CkAOsst1.js +73 -0
  120. package/chunk/CnY8SvgY.js +126 -0
  121. package/chunk/{CTSIr-Pr.js → CwXmtKib.js} +89 -101
  122. package/chunk/{C3I_L73_.js → CwjaGytU.js} +39 -40
  123. package/chunk/{DTgc2wl4.js → D6RTBH4C.js} +36 -36
  124. package/chunk/D6mVoX-C.js +116 -0
  125. package/chunk/D9TqtOhq.js +40 -0
  126. package/chunk/{qSJXQ1qu.js → DBJ8d0o0.js} +183 -189
  127. package/chunk/{RL1SNlng.js → DDda6s72.js} +16 -16
  128. package/chunk/{BH5fVprw.js → DJmWXheU.js} +9 -9
  129. package/chunk/DPvnQJ-H.js +52 -0
  130. package/chunk/DQXq1QT0.js +58 -0
  131. package/chunk/DRJO1GfY.js +855 -0
  132. package/chunk/DUxWiN2U.js +1465 -0
  133. package/chunk/DYZzQ2uT.js +29 -0
  134. package/chunk/{CK0H_Yi4.js → DafaH1Qt.js} +140 -138
  135. package/chunk/{ShWkfsJd.js → DalIRWr7.js} +21 -21
  136. package/chunk/{CzTYWtfa.js → Dg2DmtzA.js} +31 -30
  137. package/chunk/DhLbnw3R.js +29 -0
  138. package/chunk/{BmtF7P8U.js → DkIjpuBZ.js} +170 -170
  139. package/chunk/Do1aMgY3.js +12 -0
  140. package/chunk/Dtnux4qL.js +38 -0
  141. package/chunk/{Niaq_og8.js → Dw4SJ4o1.js} +219 -225
  142. package/chunk/{DbtCtriE.js → DxNRWF67.js} +30 -31
  143. package/chunk/JnyGFb5j.js +284 -0
  144. package/chunk/Lk60-jkf.js +1098 -0
  145. package/chunk/V_IcWDFx.js +49 -0
  146. package/chunk/{DG7VgAhL.js → WkB0MERB.js} +107 -108
  147. package/chunk/bsawGxt8.js +32 -0
  148. package/chunk/cUuQh7L_.js +46 -0
  149. package/chunk/fqgc8r6C.js +29 -0
  150. package/chunk/m_kOQCiU.js +29 -0
  151. package/chunk/sl8s35SK.js +29 -0
  152. package/chunk/{Dki1RB5p.js → t51ig1FZ.js} +154 -155
  153. package/chunk/{BC0PujUD.js → yvbAFxtk.js} +119 -121
  154. package/hooks/index.js +52 -246
  155. package/hooks/useForceUpdate.js +6 -6
  156. package/hooks/useIntersectionObserver.js +12 -10
  157. package/hooks/useKeyboardEvent.js +7 -7
  158. package/hooks/useMedia.js +9 -12
  159. package/hooks/useMergeValue.js +10 -8
  160. package/hooks/useResizeObserver.js +16 -0
  161. package/hooks/useUpdateEffect.js +7 -9
  162. package/hooks/useWindowSize.js +16 -20
  163. package/icons.js +6003 -0
  164. package/index.js +377 -472
  165. package/locale/en-US.js +20 -6
  166. package/locale/ja-JP.js +4 -2
  167. package/locale/ko-KR.js +2 -2
  168. package/locale/pt-BR.js +3 -3
  169. package/locale/pt-PT.js +3 -3
  170. package/locale/tr-TR.js +11 -3
  171. package/locale/zh-CN.js +6 -0
  172. package/locale/zh-HK.js +2 -0
  173. package/locale/zh-TW.js +2 -0
  174. package/package.json +1 -1
  175. package/style.css +1 -1
  176. package/types/anchor/util.d.ts +1 -0
  177. package/types/button/index.d.ts +2 -2
  178. package/types/color-picker/colors.d.ts +1 -1
  179. package/types/date-picker/util.d.ts +1 -1
  180. package/types/hooks/index.d.ts +3 -101
  181. package/types/hooks/useForceUpdate.d.ts +1 -2
  182. package/types/hooks/useIntersectionObserver.d.ts +1 -1
  183. package/types/hooks/useKeyboardEvent.d.ts +2 -2
  184. package/types/hooks/useMergeProps.d.ts +1 -1
  185. package/types/hooks/useResizeObserver.d.ts +5 -0
  186. package/types/hooks/useUpdateEffect.d.ts +2 -3
  187. package/types/hooks/useWindowSize.d.ts +1 -1
  188. package/types/icons.d.ts +4 -0
  189. package/types/index.d.ts +12 -2
  190. package/types/locale/en-US.d.ts +4 -0
  191. package/types/locale/interface.d.ts +2 -0
  192. package/types/locale/ja-JP.d.ts +4 -0
  193. package/types/locale/zh-CN.d.ts +4 -0
  194. package/types/locale/zh-HK.d.ts +4 -0
  195. package/types/locale/zh-TW.d.ts +4 -0
  196. package/types/modal/config.d.ts +1 -1
  197. package/types/version/index.d.ts +1 -1
  198. package/utils/CSSTransition.js +1 -1
  199. package/utils/className.js +2 -3
  200. package/utils/contextHolder.js +2 -2
  201. package/utils/copy.js +2 -3
  202. package/utils/is.js +127 -90
  203. package/utils/reactDOM.js +17 -15
  204. package/utils/responsiveObserve.js +16 -16
  205. package/utils/saveAs.js +2 -3
  206. package/utils/scrollIntoView.js +1 -1
  207. package/chunk/BdYAMaw9.js +0 -6
  208. package/chunk/CiZVOdJ3.js +0 -122
  209. package/chunk/DdtfPvgk.js +0 -272
  210. package/chunk/I4RV9SKZ.js +0 -135
  211. package/chunk/TXCrI0jN.js +0 -20
  212. package/chunk/i1A7W8Qt.js +0 -277
  213. package/chunk/xPzFRQJn.js +0 -740
  214. package/hooks/useAsync.js +0 -13
  215. package/hooks/useAsyncFn.js +0 -15
  216. package/hooks/useAsyncRetry.js +0 -17
  217. package/hooks/useAudio.js +0 -5
  218. package/hooks/useBeforeUnload.js +0 -18
  219. package/hooks/useBoolean.js +0 -4
  220. package/hooks/useClickAway.js +0 -22
  221. package/hooks/useCopyToClipboard.js +0 -51
  222. package/hooks/useCounter.js +0 -45
  223. package/hooks/useCreation.js +0 -17
  224. package/hooks/useCustomCompareEffect.js +0 -15
  225. package/hooks/useDebounce.js +0 -9
  226. package/hooks/useDefault.js +0 -10
  227. package/hooks/useDrop.js +0 -44
  228. package/hooks/useDropArea.js +0 -45
  229. package/hooks/useEffectOnce.js +0 -7
  230. package/hooks/useEffectState.js +0 -9
  231. package/hooks/useEnsuredForwardedRef.js +0 -17
  232. package/hooks/useError.js +0 -13
  233. package/hooks/useEvent.js +0 -13
  234. package/hooks/useEventListener.js +0 -39
  235. package/hooks/useFavicon.js +0 -16
  236. package/hooks/useFirstMountState.js +0 -8
  237. package/hooks/useFullscreen.js +0 -39
  238. package/hooks/useGeolocation.js +0 -38
  239. package/hooks/useGetSet.js +0 -18
  240. package/hooks/useGetSetState.js +0 -12
  241. package/hooks/useHash.js +0 -26
  242. package/hooks/useHover.js +0 -16
  243. package/hooks/useHoverDirty.js +0 -17
  244. package/hooks/useIdle.js +0 -34
  245. package/hooks/useIntersection.js +0 -19
  246. package/hooks/useIsomorphicLayoutEffect2.js +0 -6
  247. package/hooks/useKey.js +0 -16
  248. package/hooks/useKeyPress.js +0 -13
  249. package/hooks/useKeyPressEvent.js +0 -11
  250. package/hooks/useLatest.js +0 -8
  251. package/hooks/useLifecycles.js +0 -9
  252. package/hooks/useList.js +0 -67
  253. package/hooks/useLocalStorage.js +0 -42
  254. package/hooks/useLocation.js +0 -51
  255. package/hooks/useLockBodyScroll.js +0 -55
  256. package/hooks/useLogger.js +0 -10
  257. package/hooks/useLongPress.js +0 -24
  258. package/hooks/useMap.js +0 -31
  259. package/hooks/useMeasure.js +0 -34
  260. package/hooks/useMeasureDirty.js +0 -24
  261. package/hooks/useMediaDevices.js +0 -26
  262. package/hooks/useMediatedState.js +0 -14
  263. package/hooks/useMethods.js +0 -14
  264. package/hooks/useMotion.js +0 -56
  265. package/hooks/useMount.js +0 -9
  266. package/hooks/useMountedState.js +0 -10
  267. package/hooks/useMouse.js +0 -44
  268. package/hooks/useMouseHovered.js +0 -9
  269. package/hooks/useMouseWheel.js +0 -14
  270. package/hooks/useMultiStateValidator.js +0 -19
  271. package/hooks/useNetworkState.js +0 -31
  272. package/hooks/useNumber.js +0 -4
  273. package/hooks/useObservable.js +0 -12
  274. package/hooks/useOrientation.js +0 -30
  275. package/hooks/usePageLeave.js +0 -19
  276. package/hooks/usePermission.js +0 -19
  277. package/hooks/usePinchZoom.js +0 -40
  278. package/hooks/usePreviousDistinct.js +0 -10
  279. package/hooks/usePromise.js +0 -19
  280. package/hooks/useQueue.js +0 -25
  281. package/hooks/useRaf.js +0 -24
  282. package/hooks/useRafLoop.js +0 -24
  283. package/hooks/useRafState.js +0 -15
  284. package/hooks/useReactive.js +0 -21
  285. package/hooks/useRendersCount.js +0 -7
  286. package/hooks/useScroll.js +0 -27
  287. package/hooks/useScrolling.js +0 -23
  288. package/hooks/useSearchParam.js +0 -18
  289. package/hooks/useSessionStorage.js +0 -29
  290. package/hooks/useSet.js +0 -15
  291. package/hooks/useSetState.js +0 -16
  292. package/hooks/useSize.js +0 -58
  293. package/hooks/useSlider.js +0 -48
  294. package/hooks/useSpeech.js +0 -45
  295. package/hooks/useStartTyping.js +0 -30
  296. package/hooks/useStateList.js +0 -37
  297. package/hooks/useStateValidator.js +0 -17
  298. package/hooks/useStateWithHistory.js +0 -46
  299. package/hooks/useSyncState.js +0 -14
  300. package/hooks/useThrottle.js +0 -21
  301. package/hooks/useThrottleFn.js +0 -21
  302. package/hooks/useTimeout.js +0 -17
  303. package/hooks/useTimeoutFn.js +0 -16
  304. package/hooks/useTitle.js +0 -18
  305. package/hooks/useToggle.js +0 -5
  306. package/hooks/useTween.js +0 -11
  307. package/hooks/useUnmount.js +0 -9
  308. package/hooks/useUnmountPromise.js +0 -20
  309. package/hooks/useUpdate.js +0 -10
  310. package/hooks/useUpdateTimeout.js +0 -9
  311. package/hooks/useUpsert.js +0 -16
  312. package/hooks/useVibrate.js +0 -21
  313. package/hooks/useVideo.js +0 -5
  314. package/hooks/useWindowScroll.js +0 -29
  315. package/types/hooks/component/UseKey.d.ts +0 -2
  316. package/types/hooks/factory/createBreakpoint.d.ts +0 -4
  317. package/types/hooks/factory/createGlobalState.d.ts +0 -7
  318. package/types/hooks/factory/createHTMLMediaHook.d.ts +0 -33
  319. package/types/hooks/factory/createMemo.d.ts +0 -2
  320. package/types/hooks/factory/createReducer.d.ts +0 -8
  321. package/types/hooks/factory/createReducerContext.d.ts +0 -5
  322. package/types/hooks/factory/createRenderProp.d.ts +0 -1
  323. package/types/hooks/factory/createRouter.d.ts +0 -7
  324. package/types/hooks/factory/createStateContext.d.ts +0 -5
  325. package/types/hooks/misc/hookState.d.ts +0 -8
  326. package/types/hooks/misc/parseTimeRanges.d.ts +0 -4
  327. package/types/hooks/misc/types.d.ts +0 -2
  328. package/types/hooks/misc/util.d.ts +0 -5
  329. package/types/hooks/useAsync.d.ts +0 -20
  330. package/types/hooks/useAsyncFn.d.ts +0 -23
  331. package/types/hooks/useAsyncRetry.d.ts +0 -27
  332. package/types/hooks/useAudio.d.ts +0 -11
  333. package/types/hooks/useBeforeUnload.d.ts +0 -2
  334. package/types/hooks/useBoolean.d.ts +0 -2
  335. package/types/hooks/useClickAway.d.ts +0 -3
  336. package/types/hooks/useCopyToClipboard.d.ts +0 -7
  337. package/types/hooks/useCounter.d.ts +0 -9
  338. package/types/hooks/useCreation.d.ts +0 -2
  339. package/types/hooks/useCustomCompareEffect.d.ts +0 -4
  340. package/types/hooks/useDebounce.d.ts +0 -3
  341. package/types/hooks/useDefault.d.ts +0 -2
  342. package/types/hooks/useDrop.d.ts +0 -17
  343. package/types/hooks/useDropArea.d.ts +0 -18
  344. package/types/hooks/useEffectOnce.d.ts +0 -3
  345. package/types/hooks/useEffectState.d.ts +0 -2
  346. package/types/hooks/useEnsuredForwardedRef.d.ts +0 -3
  347. package/types/hooks/useError.d.ts +0 -2
  348. package/types/hooks/useEvent.d.ts +0 -13
  349. package/types/hooks/useEventListener.d.ts +0 -2
  350. package/types/hooks/useFavicon.d.ts +0 -2
  351. package/types/hooks/useFirstMountState.d.ts +0 -1
  352. package/types/hooks/useFullscreen.d.ts +0 -10
  353. package/types/hooks/useGeolocation.d.ts +0 -21
  354. package/types/hooks/useGetSet.d.ts +0 -3
  355. package/types/hooks/useGetSetState.d.ts +0 -2
  356. package/types/hooks/useHash.d.ts +0 -2
  357. package/types/hooks/useHover.d.ts +0 -4
  358. package/types/hooks/useHoverDirty.d.ts +0 -3
  359. package/types/hooks/useIdle.d.ts +0 -2
  360. package/types/hooks/useIntersection.d.ts +0 -3
  361. package/types/hooks/useIsomorphicLayoutEffect2.d.ts +0 -3
  362. package/types/hooks/useKey.d.ts +0 -12
  363. package/types/hooks/useKeyPress.d.ts +0 -3
  364. package/types/hooks/useKeyPressEvent.d.ts +0 -3
  365. package/types/hooks/useLatest.d.ts +0 -4
  366. package/types/hooks/useLifecycles.d.ts +0 -2
  367. package/types/hooks/useList.d.ts +0 -18
  368. package/types/hooks/useLocalStorage.d.ts +0 -10
  369. package/types/hooks/useLocation.d.ts +0 -16
  370. package/types/hooks/useLockBodyScroll.d.ts +0 -8
  371. package/types/hooks/useLogger.d.ts +0 -2
  372. package/types/hooks/useLongPress.d.ts +0 -12
  373. package/types/hooks/useMap.d.ts +0 -11
  374. package/types/hooks/useMeasure.d.ts +0 -9
  375. package/types/hooks/useMeasureDirty.d.ts +0 -11
  376. package/types/hooks/useMediaDevices.d.ts +0 -2
  377. package/types/hooks/useMediatedState.d.ts +0 -9
  378. package/types/hooks/useMethods.d.ts +0 -8
  379. package/types/hooks/useMotion.d.ts +0 -20
  380. package/types/hooks/useMount.d.ts +0 -2
  381. package/types/hooks/useMountedState.d.ts +0 -1
  382. package/types/hooks/useMouse.d.ts +0 -13
  383. package/types/hooks/useMouseHovered.d.ts +0 -8
  384. package/types/hooks/useMouseWheel.d.ts +0 -2
  385. package/types/hooks/useMultiStateValidator.d.ts +0 -9
  386. package/types/hooks/useNetworkState.d.ts +0 -22
  387. package/types/hooks/useNumber.d.ts +0 -2
  388. package/types/hooks/useObservable.d.ts +0 -8
  389. package/types/hooks/useOrientation.d.ts +0 -6
  390. package/types/hooks/usePageLeave.d.ts +0 -2
  391. package/types/hooks/usePermission.d.ts +0 -16
  392. package/types/hooks/usePinchZoom.d.ts +0 -18
  393. package/types/hooks/usePreviousDistinct.d.ts +0 -2
  394. package/types/hooks/usePromise.d.ts +0 -3
  395. package/types/hooks/useQueue.d.ts +0 -9
  396. package/types/hooks/useRaf.d.ts +0 -2
  397. package/types/hooks/useRafLoop.d.ts +0 -2
  398. package/types/hooks/useRafState.d.ts +0 -3
  399. package/types/hooks/useReactive.d.ts +0 -2
  400. package/types/hooks/useRendersCount.d.ts +0 -1
  401. package/types/hooks/useScroll.d.ts +0 -7
  402. package/types/hooks/useScrolling.d.ts +0 -3
  403. package/types/hooks/useSearchParam.d.ts +0 -3
  404. package/types/hooks/useSessionStorage.d.ts +0 -2
  405. package/types/hooks/useSet.d.ts +0 -11
  406. package/types/hooks/useSetState.d.ts +0 -2
  407. package/types/hooks/useSize.d.ts +0 -8
  408. package/types/hooks/useSlider.d.ts +0 -15
  409. package/types/hooks/useSpeech.d.ts +0 -16
  410. package/types/hooks/useStartTyping.d.ts +0 -2
  411. package/types/hooks/useStateList.d.ts +0 -9
  412. package/types/hooks/useStateValidator.d.ts +0 -8
  413. package/types/hooks/useStateWithHistory.d.ts +0 -18
  414. package/types/hooks/useSyncState.d.ts +0 -3
  415. package/types/hooks/useThrottle.d.ts +0 -2
  416. package/types/hooks/useThrottleFn.d.ts +0 -2
  417. package/types/hooks/useTimeout.d.ts +0 -2
  418. package/types/hooks/useTimeoutFn.d.ts +0 -2
  419. package/types/hooks/useTitle.d.ts +0 -6
  420. package/types/hooks/useToggle.d.ts +0 -2
  421. package/types/hooks/useTween.d.ts +0 -3
  422. package/types/hooks/useUnmount.d.ts +0 -2
  423. package/types/hooks/useUnmountPromise.d.ts +0 -3
  424. package/types/hooks/useUpdate.d.ts +0 -2
  425. package/types/hooks/useUpdateTimeout.d.ts +0 -2
  426. package/types/hooks/useUpsert.d.ts +0 -6
  427. package/types/hooks/useVibrate.d.ts +0 -4
  428. package/types/hooks/useVideo.d.ts +0 -11
  429. package/types/hooks/useWindowScroll.d.ts +0 -6
@@ -1,18 +0,0 @@
1
- import React from 'react';
2
- export interface DropAreaState {
3
- over: boolean;
4
- }
5
- export interface DropAreaBond {
6
- onDragOver: React.DragEventHandler;
7
- onDragEnter: React.DragEventHandler;
8
- onDragLeave: React.DragEventHandler;
9
- onDrop: React.DragEventHandler;
10
- onPaste: React.ClipboardEventHandler;
11
- }
12
- export interface DropAreaOptions {
13
- onFiles?: (files: File[], event?: any) => void;
14
- onText?: (text: string, event?: any) => void;
15
- onUri?: (url: string, event?: any) => void;
16
- }
17
- declare const useDropArea: (options?: DropAreaOptions) => [DropAreaBond, DropAreaState];
18
- export default useDropArea;
@@ -1,3 +0,0 @@
1
- import { EffectCallback } from 'react';
2
- declare const useEffectOnce: (effect: EffectCallback) => void;
3
- export default useEffectOnce;
@@ -1,2 +0,0 @@
1
- export default useEffectState;
2
- declare function useEffectState(props: any): any[];
@@ -1,3 +0,0 @@
1
- import { ForwardRefExoticComponent, MutableRefObject, PropsWithoutRef, RefAttributes, RefForwardingComponent } from 'react';
2
- export default function useEnsuredForwardedRef<T>(forwardedRef: MutableRefObject<T>): MutableRefObject<T>;
3
- export declare function ensuredForwardRef<T, P = {}>(Component: RefForwardingComponent<T, P>): ForwardRefExoticComponent<PropsWithoutRef<P> & RefAttributes<T>>;
@@ -1,2 +0,0 @@
1
- declare const useError: () => ((err: Error) => void);
2
- export default useError;
@@ -1,13 +0,0 @@
1
- export interface ListenerType1 {
2
- addEventListener(name: string, handler: (event?: any) => void, ...args: any[]): any;
3
- removeEventListener(name: string, handler: (event?: any) => void, ...args: any[]): any;
4
- }
5
- export interface ListenerType2 {
6
- on(name: string, handler: (event?: any) => void, ...args: any[]): any;
7
- off(name: string, handler: (event?: any) => void, ...args: any[]): any;
8
- }
9
- export type UseEventTarget = ListenerType1 | ListenerType2;
10
- type AddEventListener<T> = T extends ListenerType1 ? T['addEventListener'] : T extends ListenerType2 ? T['on'] : never;
11
- export type UseEventOptions<T> = Parameters<AddEventListener<T>>[2];
12
- declare const useEvent: <T extends UseEventTarget>(name: Parameters<AddEventListener<T>>[0], handler?: null | undefined | Parameters<AddEventListener<T>>[1], target?: null | T | Window, options?: UseEventOptions<T>) => void;
13
- export default useEvent;
@@ -1,2 +0,0 @@
1
- export default useEventListener;
2
- declare function useEventListener(event: any, handler: any, target?: Window & typeof globalThis): void;
@@ -1,2 +0,0 @@
1
- export default useFavicon;
2
- declare function useFavicon(href: any): void;
@@ -1 +0,0 @@
1
- export default function useFirstMountState(): boolean;
@@ -1,10 +0,0 @@
1
- import { RefObject } from 'react';
2
- export interface FullScreenOptions {
3
- video?: RefObject<HTMLVideoElement & {
4
- webkitEnterFullscreen?: () => void;
5
- webkitExitFullscreen?: () => void;
6
- }>;
7
- onClose?: (error?: Error) => void;
8
- }
9
- declare const useFullscreen: (ref: RefObject<Element>, enabled: boolean, options?: FullScreenOptions) => boolean;
10
- export default useFullscreen;
@@ -1,21 +0,0 @@
1
- export interface IGeolocationPositionError {
2
- readonly code: number;
3
- readonly message: string;
4
- readonly PERMISSION_DENIED: number;
5
- readonly POSITION_UNAVAILABLE: number;
6
- readonly TIMEOUT: number;
7
- }
8
- export interface GeoLocationSensorState {
9
- loading: boolean;
10
- accuracy: number | null;
11
- altitude: number | null;
12
- altitudeAccuracy: number | null;
13
- heading: number | null;
14
- latitude: number | null;
15
- longitude: number | null;
16
- speed: number | null;
17
- timestamp: number | null;
18
- error?: Error | IGeolocationPositionError;
19
- }
20
- declare const useGeolocation: (options?: PositionOptions) => GeoLocationSensorState;
21
- export default useGeolocation;
@@ -1,3 +0,0 @@
1
- import { Dispatch } from 'react';
2
- import { IHookStateInitAction, IHookStateSetAction } from './misc/hookState';
3
- export default function useGetSet<S>(initialState: IHookStateInitAction<S>): [get: () => S, set: Dispatch<IHookStateSetAction<S>>];
@@ -1,2 +0,0 @@
1
- declare const useGetSetState: <T extends object>(initialState?: T) => [() => T, (patch: Partial<T>) => void];
2
- export default useGetSetState;
@@ -1,2 +0,0 @@
1
- declare const useHash: () => readonly [string, (newHash: string) => void];
2
- export default useHash;
@@ -1,4 +0,0 @@
1
- import React from 'react';
2
- export type Element = ((state: boolean) => React.ReactElement<any>) | React.ReactElement<any>;
3
- declare const useHover: (element: Element) => [React.ReactElement<any>, boolean];
4
- export default useHover;
@@ -1,3 +0,0 @@
1
- import { RefObject } from 'react';
2
- declare const useHoverDirty: (ref: RefObject<Element>, enabled?: boolean) => boolean;
3
- export default useHoverDirty;
@@ -1,2 +0,0 @@
1
- declare const useIdle: (ms?: number, initialState?: boolean, events?: string[]) => boolean;
2
- export default useIdle;
@@ -1,3 +0,0 @@
1
- import { RefObject } from 'react';
2
- declare const useIntersection: (ref: RefObject<HTMLElement>, options: IntersectionObserverInit) => IntersectionObserverEntry | null;
3
- export default useIntersection;
@@ -1,3 +0,0 @@
1
- import { useEffect } from 'react';
2
- declare const useIsomorphicLayoutEffect: typeof useEffect;
3
- export default useIsomorphicLayoutEffect;
@@ -1,12 +0,0 @@
1
- import { DependencyList } from 'react';
2
- import { UseEventOptions, UseEventTarget } from './useEvent';
3
- export type KeyPredicate = (event: KeyboardEvent) => boolean;
4
- export type KeyFilter = null | undefined | string | ((event: KeyboardEvent) => boolean);
5
- export type Handler = (event: KeyboardEvent) => void;
6
- export interface UseKeyOptions<T extends UseEventTarget> {
7
- event?: 'keydown' | 'keypress' | 'keyup';
8
- target?: T | null;
9
- options?: UseEventOptions<T>;
10
- }
11
- declare const useKey: <T extends UseEventTarget>(key: KeyFilter, fn?: Handler, opts?: UseKeyOptions<T>, deps?: DependencyList) => void;
12
- export default useKey;
@@ -1,3 +0,0 @@
1
- import { KeyFilter } from './useKey';
2
- declare const useKeyPress: (keyFilter: KeyFilter) => [boolean, KeyboardEvent | null];
3
- export default useKeyPress;
@@ -1,3 +0,0 @@
1
- import { Handler, KeyFilter } from './useKey';
2
- declare const useKeyPressEvent: (key: string | KeyFilter, keydown?: Handler | null | undefined, keyup?: Handler | null | undefined, useKeyPress?: (keyFilter: KeyFilter) => [boolean, KeyboardEvent | null]) => void;
3
- export default useKeyPressEvent;
@@ -1,4 +0,0 @@
1
- declare const useLatest: <T>(value: T) => {
2
- readonly current: T;
3
- };
4
- export default useLatest;
@@ -1,2 +0,0 @@
1
- declare const useLifecycles: (mount: any, unmount?: any) => void;
2
- export default useLifecycles;
@@ -1,18 +0,0 @@
1
- import { IHookStateInitAction, IHookStateSetAction } from './misc/hookState';
2
- export interface ListActions<T> {
3
- set: (newList: IHookStateSetAction<T[]>) => void;
4
- push: (...items: T[]) => void;
5
- updateAt: (index: number, item: T) => void;
6
- insertAt: (index: number, item: T) => void;
7
- update: (predicate: (a: T, b: T) => boolean, newItem: T) => void;
8
- updateFirst: (predicate: (a: T, b: T) => boolean, newItem: T) => void;
9
- upsert: (predicate: (a: T, b: T) => boolean, newItem: T) => void;
10
- sort: (compareFn?: (a: T, b: T) => number) => void;
11
- filter: (callbackFn: (value: T, index?: number, array?: T[]) => boolean, thisArg?: any) => void;
12
- removeAt: (index: number) => void;
13
- remove: (index: number) => void;
14
- clear: () => void;
15
- reset: () => void;
16
- }
17
- declare function useList<T>(initialList?: IHookStateInitAction<T[]>): [T[], ListActions<T>];
18
- export default useList;
@@ -1,10 +0,0 @@
1
- import { Dispatch, SetStateAction } from 'react';
2
- type parserOptions<T> = {
3
- raw: true;
4
- } | {
5
- raw: false;
6
- serializer: (value: T) => string;
7
- deserializer: (value: string) => T;
8
- };
9
- declare const useLocalStorage: <T>(key: string, initialValue?: T, options?: parserOptions<T>) => [T | undefined, Dispatch<SetStateAction<T | undefined>>, () => void];
10
- export default useLocalStorage;
@@ -1,16 +0,0 @@
1
- export interface LocationSensorState {
2
- trigger: string;
3
- state?: any;
4
- length?: number;
5
- hash?: string;
6
- host?: string;
7
- hostname?: string;
8
- href?: string;
9
- origin?: string;
10
- pathname?: string;
11
- port?: string;
12
- protocol?: string;
13
- search?: string;
14
- }
15
- declare const _default: () => LocationSensorState;
16
- export default _default;
@@ -1,8 +0,0 @@
1
- import { RefObject } from 'react';
2
- export declare function getClosestBody(el: Element | HTMLElement | HTMLIFrameElement | null): HTMLElement | null;
3
- export interface BodyInfoItem {
4
- counter: number;
5
- initialOverflow: CSSStyleDeclaration['overflow'];
6
- }
7
- declare const _default: (_locked?: boolean, _elementRef?: RefObject<HTMLElement>) => void;
8
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const useLogger: (componentName: string, ...rest: any[]) => void;
2
- export default useLogger;
@@ -1,12 +0,0 @@
1
- interface Options {
2
- isPreventDefault?: boolean;
3
- delay?: number;
4
- }
5
- declare const useLongPress: (callback: (e: TouchEvent | MouseEvent) => void, { isPreventDefault, delay }?: Options) => {
6
- readonly onMouseDown: (e: any) => void;
7
- readonly onTouchStart: (e: any) => void;
8
- readonly onMouseUp: () => void;
9
- readonly onMouseLeave: () => void;
10
- readonly onTouchEnd: () => void;
11
- };
12
- export default useLongPress;
@@ -1,11 +0,0 @@
1
- export interface StableActions<T extends object> {
2
- set: <K extends keyof T>(key: K, value: T[K]) => void;
3
- setAll: (newMap: T) => void;
4
- remove: <K extends keyof T>(key: K) => void;
5
- reset: () => void;
6
- }
7
- export interface Actions<T extends object> extends StableActions<T> {
8
- get: <K extends keyof T>(key: K) => T[K];
9
- }
10
- declare const useMap: <T extends object = any>(initialMap?: T) => [T, Actions<T>];
11
- export default useMap;
@@ -1,9 +0,0 @@
1
- export type UseMeasureRect = Pick<DOMRectReadOnly, 'x' | 'y' | 'top' | 'left' | 'right' | 'bottom' | 'height' | 'width'>;
2
- export type UseMeasureRef<E extends Element = Element> = (element: E) => void;
3
- export type UseMeasureResult<E extends Element = Element> = [
4
- UseMeasureRef<E>,
5
- UseMeasureRect
6
- ];
7
- declare function useMeasure<E extends Element = Element>(): UseMeasureResult<E>;
8
- declare const _default: typeof useMeasure;
9
- export default _default;
@@ -1,11 +0,0 @@
1
- import { RefObject } from 'react';
2
- export interface ContentRect {
3
- width: number;
4
- height: number;
5
- top: number;
6
- right: number;
7
- left: number;
8
- bottom: number;
9
- }
10
- declare const useMeasureDirty: (ref: RefObject<HTMLElement>) => ContentRect;
11
- export default useMeasureDirty;
@@ -1,2 +0,0 @@
1
- declare const _default: () => {};
2
- export default _default;
@@ -1,9 +0,0 @@
1
- import { Dispatch, SetStateAction } from 'react';
2
- export interface StateMediator<S = any> {
3
- (newState: any): S;
4
- (newState: any, dispatch: Dispatch<SetStateAction<S>>): void;
5
- }
6
- export type UseMediatedStateReturn<S = any> = [S, Dispatch<SetStateAction<S>>];
7
- export declare function useMediatedState<S = undefined>(mediator: StateMediator<S | undefined>): UseMediatedStateReturn<S | undefined>;
8
- export declare function useMediatedState<S = any>(mediator: StateMediator<S>, initialState: S): UseMediatedStateReturn<S>;
9
- export default useMediatedState;
@@ -1,8 +0,0 @@
1
- type CreateMethods<M, T> = (state: T) => {
2
- [P in keyof M]: (payload?: any) => T;
3
- };
4
- type WrappedMethods<M> = {
5
- [P in keyof M]: (...payload: any) => void;
6
- };
7
- declare const useMethods: <M, T>(createMethods: CreateMethods<M, T>, initialState: T) => [T, WrappedMethods<M>];
8
- export default useMethods;
@@ -1,20 +0,0 @@
1
- export interface MotionSensorState {
2
- acceleration: {
3
- x: number | null;
4
- y: number | null;
5
- z: number | null;
6
- };
7
- accelerationIncludingGravity: {
8
- x: number | null;
9
- y: number | null;
10
- z: number | null;
11
- };
12
- rotationRate: {
13
- alpha: number | null;
14
- beta: number | null;
15
- gamma: number | null;
16
- };
17
- interval: number | null;
18
- }
19
- declare const useMotion: (initialState?: MotionSensorState) => MotionSensorState;
20
- export default useMotion;
@@ -1,2 +0,0 @@
1
- declare const useMount: (fn: () => void) => void;
2
- export default useMount;
@@ -1 +0,0 @@
1
- export default function useMountedState(): () => boolean;
@@ -1,13 +0,0 @@
1
- import { RefObject } from 'react';
2
- export interface State {
3
- docX: number;
4
- docY: number;
5
- posX: number;
6
- posY: number;
7
- elX: number;
8
- elY: number;
9
- elH: number;
10
- elW: number;
11
- }
12
- declare const useMouse: (ref: RefObject<Element>) => State;
13
- export default useMouse;
@@ -1,8 +0,0 @@
1
- import { RefObject } from 'react';
2
- import { State } from './useMouse';
3
- export interface UseMouseHoveredOptions {
4
- whenHovered?: boolean;
5
- bound?: boolean;
6
- }
7
- declare const useMouseHovered: (ref: RefObject<Element>, options?: UseMouseHoveredOptions) => State;
8
- export default useMouseHovered;
@@ -1,2 +0,0 @@
1
- declare const _default: () => number;
2
- export default _default;
@@ -1,9 +0,0 @@
1
- import { StateValidator, UseStateValidatorReturn, ValidityState } from './useStateValidator';
2
- export type MultiStateValidatorStates = any[] | {
3
- [p: string]: any;
4
- } | {
5
- [p: number]: any;
6
- };
7
- export type MultiStateValidator<V extends ValidityState, S extends MultiStateValidatorStates> = StateValidator<V, S>;
8
- export declare function useMultiStateValidator<V extends ValidityState, S extends MultiStateValidatorStates>(states: S, validator: MultiStateValidator<V, S>, initialValidity?: V): UseStateValidatorReturn<V>;
9
- export default useMultiStateValidator;
@@ -1,22 +0,0 @@
1
- import { IHookStateInitAction } from './misc/hookState';
2
- export interface INetworkInformation extends EventTarget {
3
- readonly downlink: number;
4
- readonly downlinkMax: number;
5
- readonly effectiveType: 'slow-2g' | '2g' | '3g' | '4g';
6
- readonly rtt: number;
7
- readonly saveData: boolean;
8
- readonly type: 'bluetooth' | 'cellular' | 'ethernet' | 'none' | 'wifi' | 'wimax' | 'other' | 'unknown';
9
- onChange: (event: Event) => void;
10
- }
11
- export interface IUseNetworkState {
12
- online: boolean | undefined;
13
- previous: boolean | undefined;
14
- since: Date | undefined;
15
- downlink: INetworkInformation['downlink'] | undefined;
16
- downlinkMax: INetworkInformation['downlinkMax'] | undefined;
17
- effectiveType: INetworkInformation['effectiveType'] | undefined;
18
- rtt: INetworkInformation['rtt'] | undefined;
19
- saveData: INetworkInformation['saveData'] | undefined;
20
- type: INetworkInformation['type'] | undefined;
21
- }
22
- export default function useNetworkState(initialState?: IHookStateInitAction<IUseNetworkState>): IUseNetworkState;
@@ -1,2 +0,0 @@
1
- import useNumber from './useCounter';
2
- export default useNumber;
@@ -1,8 +0,0 @@
1
- export interface Observable<T> {
2
- subscribe: (listener: (value: T) => void) => {
3
- unsubscribe: () => void;
4
- };
5
- }
6
- declare function useObservable<T>(observable$: Observable<T>): T | undefined;
7
- declare function useObservable<T>(observable$: Observable<T>, initialValue: T): T;
8
- export default useObservable;
@@ -1,6 +0,0 @@
1
- export interface OrientationState {
2
- angle: number;
3
- type: string;
4
- }
5
- declare const useOrientation: (initialState?: OrientationState) => OrientationState;
6
- export default useOrientation;
@@ -1,2 +0,0 @@
1
- declare const usePageLeave: (onPageLeave: any, args?: never[]) => void;
2
- export default usePageLeave;
@@ -1,16 +0,0 @@
1
- export type IState = PermissionState | '';
2
- interface IPushPermissionDescriptor extends PermissionDescriptor {
3
- name: 'push';
4
- userVisibleOnly?: boolean;
5
- }
6
- interface IMidiPermissionDescriptor extends PermissionDescriptor {
7
- name: 'midi';
8
- sysex?: boolean;
9
- }
10
- interface IDevicePermissionDescriptor extends PermissionDescriptor {
11
- name: 'camera' | 'microphone' | 'speaker';
12
- deviceId?: string;
13
- }
14
- export type IPermissionDescriptor = PermissionDescriptor | IPushPermissionDescriptor | IMidiPermissionDescriptor | IDevicePermissionDescriptor;
15
- declare const usePermission: (permissionDesc: IPermissionDescriptor) => IState;
16
- export default usePermission;
@@ -1,18 +0,0 @@
1
- import { RefObject } from 'react';
2
- export type CacheRef = {
3
- prevDiff: number;
4
- evCache: Array<PointerEvent>;
5
- };
6
- export declare enum ZoomState {
7
- 'ZOOMING_IN' = "ZOOMING_IN",
8
- 'ZOOMING_OUT' = "ZOOMING_OUT"
9
- }
10
- export type ZoomStateType = ZoomState.ZOOMING_IN | ZoomState.ZOOMING_OUT;
11
- declare const usePinchZoom: (ref: RefObject<HTMLElement>) => {
12
- zoomingState: ZoomStateType;
13
- pinchState: number;
14
- } | {
15
- zoomingState: null;
16
- pinchState: number;
17
- };
18
- export default usePinchZoom;
@@ -1,2 +0,0 @@
1
- export type Predicate<T> = (prev: T | undefined, next: T) => boolean;
2
- export default function usePreviousDistinct<T>(value: T, compare?: Predicate<T>): T | undefined;
@@ -1,3 +0,0 @@
1
- export type UsePromise = () => <T>(promise: Promise<T>) => Promise<T>;
2
- declare const usePromise: UsePromise;
3
- export default usePromise;
@@ -1,9 +0,0 @@
1
- export interface QueueMethods<T> {
2
- add: (item: T) => void;
3
- remove: () => T;
4
- first: T;
5
- last: T;
6
- size: number;
7
- }
8
- declare const useQueue: <T>(initialValue?: T[]) => QueueMethods<T>;
9
- export default useQueue;
@@ -1,2 +0,0 @@
1
- declare const useRaf: (ms?: number, delay?: number) => number;
2
- export default useRaf;
@@ -1,2 +0,0 @@
1
- export type RafLoopReturns = [() => void, () => void, () => boolean];
2
- export default function useRafLoop(callback: FrameRequestCallback, initiallyActive?: boolean): RafLoopReturns;
@@ -1,3 +0,0 @@
1
- import { Dispatch, SetStateAction } from 'react';
2
- declare const useRafState: <S>(initialState: S | (() => S)) => [S, Dispatch<SetStateAction<S>>];
3
- export default useRafState;
@@ -1,2 +0,0 @@
1
- declare const useReactive: (initialState: any) => undefined;
2
- export default useReactive;
@@ -1 +0,0 @@
1
- export default function useRendersCount(): number;
@@ -1,7 +0,0 @@
1
- import { RefObject } from 'react';
2
- export interface State {
3
- x: number;
4
- y: number;
5
- }
6
- declare const useScroll: (ref: RefObject<HTMLElement>) => State;
7
- export default useScroll;
@@ -1,3 +0,0 @@
1
- import { RefObject } from 'react';
2
- declare const useScrolling: (ref: RefObject<HTMLElement>) => boolean;
3
- export default useScrolling;
@@ -1,3 +0,0 @@
1
- export type UseQueryParam = (param: string) => string | null;
2
- declare const _default: UseQueryParam;
3
- export default _default;
@@ -1,2 +0,0 @@
1
- declare const useSessionStorage: <T>(key: string, initialValue?: T, raw?: boolean) => [T, (value: T) => void];
2
- export default useSessionStorage;
@@ -1,11 +0,0 @@
1
- export interface StableActions<K> {
2
- add: (key: K) => void;
3
- remove: (key: K) => void;
4
- toggle: (key: K) => void;
5
- reset: () => void;
6
- }
7
- export interface Actions<K> extends StableActions<K> {
8
- has: (key: K) => boolean;
9
- }
10
- declare const useSet: <K>(initialSet?: Set<K>) => [Set<K>, Actions<K>];
11
- export default useSet;
@@ -1,2 +0,0 @@
1
- declare const useSetState: <T extends object>(initialState?: T) => [T, (patch: Partial<T> | ((prevState: T) => Partial<T>)) => void];
2
- export default useSetState;
@@ -1,8 +0,0 @@
1
- import React from 'react';
2
- export type Element = ((state: State) => React.ReactElement<any>) | React.ReactElement<any>;
3
- export interface State {
4
- width: number;
5
- height: number;
6
- }
7
- declare const useSize: (element: Element, { width, height }?: Partial<State>) => [React.ReactElement<any>, State];
8
- export default useSize;
@@ -1,15 +0,0 @@
1
- import { CSSProperties, RefObject } from 'react';
2
- export interface State {
3
- isSliding: boolean;
4
- value: number;
5
- }
6
- export interface Options {
7
- onScrub: (value: number) => void;
8
- onScrubStart: () => void;
9
- onScrubStop: (value: number) => void;
10
- reverse: boolean;
11
- styles: boolean | CSSProperties;
12
- vertical?: boolean;
13
- }
14
- declare const useSlider: (ref: RefObject<HTMLElement>, options?: Partial<Options>) => State;
15
- export default useSlider;
@@ -1,16 +0,0 @@
1
- type SpeechOptions = {
2
- lang: string;
3
- voice?: SpeechSynthesisVoice;
4
- rate: number;
5
- pitch: number;
6
- volume: number;
7
- };
8
- export type ISpeechOptions = Partial<SpeechOptions>;
9
- export type VoiceInfo = Pick<SpeechSynthesisVoice, 'lang' | 'name'>;
10
- export type ISpeechState = SpeechOptions & {
11
- isPlaying: boolean;
12
- status: string;
13
- voiceInfo: VoiceInfo;
14
- };
15
- declare const useSpeech: (text: string, options: ISpeechOptions) => ISpeechState;
16
- export default useSpeech;
@@ -1,2 +0,0 @@
1
- declare const useStartTyping: (onStartTyping: (event: KeyboardEvent) => void) => void;
2
- export default useStartTyping;
@@ -1,9 +0,0 @@
1
- export interface UseStateListReturn<T> {
2
- state: T;
3
- currentIndex: number;
4
- setStateAt: (newIndex: number) => void;
5
- setState: (state: T) => void;
6
- next: () => void;
7
- prev: () => void;
8
- }
9
- export default function useStateList<T>(stateSet?: T[]): UseStateListReturn<T>;
@@ -1,8 +0,0 @@
1
- import { Dispatch, SetStateAction } from 'react';
2
- export type ValidityState = [boolean | undefined, ...any[]] | [undefined];
3
- export interface StateValidator<V, S> {
4
- (state: S): V;
5
- (state: S, dispatch: Dispatch<SetStateAction<V>>): void;
6
- }
7
- export type UseStateValidatorReturn<V> = [V, () => void];
8
- export default function useStateValidator<V extends ValidityState, S>(state: S, validator: StateValidator<V, S>, initialState?: V): UseStateValidatorReturn<V>;