@24i/bigscreen-sdk 1.0.4 → 1.0.5-4.alpha-2832

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 (292) hide show
  1. package/README.md +2 -3
  2. package/ci/is_ci_job_skippable.sh +153 -0
  3. package/package.json +55 -34
  4. package/packages/adobe-heartbeat/src/AdobeHeartbeat.ts +9 -9
  5. package/packages/analytics/README.md +8 -0
  6. package/packages/analytics/src/A.ts +1 -0
  7. package/packages/analytics/src/Analytics.ts +1 -0
  8. package/packages/analytics/src/analyticsOnScroll.ts +1 -0
  9. package/packages/analytics/src/clients/ConsoleAnalytics/ConsoleAnalytics.ts +1 -0
  10. package/packages/analytics/src/clients/ConsoleAnalytics/index.ts +1 -0
  11. package/packages/analytics/src/clients/GoogleAnalytics/GoogleAnalytics.ts +196 -0
  12. package/packages/analytics/src/clients/GoogleAnalytics/constants.ts +126 -0
  13. package/packages/analytics/src/clients/GoogleAnalytics/getUrl.ts +17 -0
  14. package/packages/analytics/src/clients/GoogleAnalytics/index.ts +2 -0
  15. package/packages/analytics/src/clients/GoogleAnalytics/interface.ts +82 -0
  16. package/packages/analytics/src/clients/GoogleAnalytics/mapPayload.ts +51 -0
  17. package/packages/analytics/src/clients/GoogleAnalytics/prepareBody.ts +14 -0
  18. package/packages/analytics/src/clients/TealiumAnalytics/TealiumAnalytics.ts +181 -0
  19. package/packages/analytics/src/clients/TealiumAnalytics/constants.ts +106 -0
  20. package/packages/analytics/src/clients/TealiumAnalytics/findForLanguage.ts +9 -0
  21. package/packages/analytics/src/clients/TealiumAnalytics/index.ts +4 -0
  22. package/packages/analytics/src/clients/TealiumAnalytics/interface.ts +35 -0
  23. package/packages/analytics/src/clients/TealiumAnalytics/mappers/__mocks__/mediaPayload.ts +72 -0
  24. package/packages/analytics/src/clients/TealiumAnalytics/mappers/helper.ts +36 -0
  25. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppError.ts +13 -0
  26. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapAppOpen.ts +13 -0
  27. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteAdd.ts +11 -0
  28. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapFavoriteRemove.ts +11 -0
  29. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerClose.ts +15 -0
  30. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapPlayerOpen.ts +15 -0
  31. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSceneView.ts +18 -0
  32. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearch.ts +18 -0
  33. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchFailed.ts +8 -0
  34. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapSearchSuccess.ts +8 -0
  35. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoPause.ts +15 -0
  36. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoProgress.ts +18 -0
  37. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoResume.ts +15 -0
  38. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStart.ts +15 -0
  39. package/packages/analytics/src/clients/TealiumAnalytics/mappers/mapVideoStop.ts +15 -0
  40. package/packages/analytics/src/clients/TealiumAnalytics/types.ts +161 -0
  41. package/packages/analytics/src/clients/TwentyFourIQ/TwentyFourIQClient.ts +107 -0
  42. package/packages/analytics/src/clients/TwentyFourIQ/constants.ts +111 -0
  43. package/packages/analytics/src/clients/TwentyFourIQ/helper.ts +34 -0
  44. package/packages/analytics/src/clients/TwentyFourIQ/index.ts +2 -0
  45. package/packages/analytics/src/clients/TwentyFourIQ/interface.ts +34 -0
  46. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapAdEvent.ts +20 -0
  47. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBase.ts +24 -0
  48. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapBuffering.ts +15 -0
  49. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerClose.ts +25 -0
  50. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapPlayerOpen.ts +17 -0
  51. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapSceneView.ts +15 -0
  52. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapScroll.ts +17 -0
  53. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoComplete.ts +22 -0
  54. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoPause.ts +25 -0
  55. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoProgress.ts +25 -0
  56. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStart.ts +34 -0
  57. package/packages/analytics/src/clients/TwentyFourIQ/mappers/mapVideoStop.ts +32 -0
  58. package/packages/analytics/src/clients/TwentyFourIQ/types.ts +132 -0
  59. package/packages/analytics/src/constants.ts +1 -0
  60. package/packages/analytics/src/index.ts +3 -0
  61. package/packages/analytics/src/interface.ts +1 -0
  62. package/packages/analytics/src/utils/generateSessionId.ts +8 -0
  63. package/packages/async-image/src/AsyncImage.tsx +15 -10
  64. package/packages/developer-tools/PlayerDebugWindow/README.md +1 -1
  65. package/packages/developer-tools/src/DeveloperConsole/DeveloperConsole.tsx +1 -0
  66. package/packages/developer-tools/src/DeveloperToolsService/DeveloperToolsList.tsx +11 -0
  67. package/packages/developer-tools/src/PlayerDebugWindow/PlayerDebugWindow.tsx +5 -5
  68. package/packages/developer-tools/src/PlayerDebugWindow/constants.ts +15 -0
  69. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfo.tsx +2 -0
  70. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoDetail.tsx +2 -1
  71. package/packages/developer-tools/src/TechnicalInfo/TechnicalInfoProvider.ts +57 -5
  72. package/packages/developer-tools/src/TechnicalInfo/__mocks__/Device.ts +12 -0
  73. package/packages/developer-tools/src/TechnicalInfo/translations.ts +8 -0
  74. package/packages/device/src/driver/index.android.tv.ts +1 -0
  75. package/packages/device/src/driver/index.firetv.ts +1 -0
  76. package/packages/device/src/driver/index.smartcast.tv.ts +1 -0
  77. package/packages/device/src/getKeyDigit.ts +2 -2
  78. package/packages/device/src/resolver/resolver.ts +19 -0
  79. package/packages/digital-clock/src/DigitalClock.tsx +15 -4
  80. package/packages/driver-androidtv/src/DeviceAndroidTV.ts +262 -0
  81. package/packages/driver-androidtv/src/__mocks__/javaScriptBridge.ts +45 -0
  82. package/packages/driver-androidtv/src/formatUserAgent.ts +11 -0
  83. package/packages/driver-androidtv/src/index.ts +2 -0
  84. package/packages/driver-androidtv/src/keymap.ts +27 -0
  85. package/packages/driver-androidtv/src/types.ts +155 -0
  86. package/packages/driver-base/src/DeviceBase.ts +73 -2
  87. package/packages/driver-base/src/KeyMap/Key.ts +8 -1
  88. package/packages/driver-base/src/KeyMap/KeyMap.ts +4 -0
  89. package/packages/driver-base/src/KeyMap/interface.ts +1 -0
  90. package/packages/driver-base/src/KeyMap/overrideValues.ts +2 -1
  91. package/packages/driver-base/src/__mocks__/DeviceBase.ts +24 -0
  92. package/packages/driver-base/src/__mocks__/keyMap.ts +1 -0
  93. package/packages/driver-base/src/index.ts +3 -0
  94. package/packages/driver-base/src/types/AdInfo.ts +5 -0
  95. package/packages/driver-base/src/types/DeviceEvent.ts +2 -0
  96. package/packages/driver-base/src/types/InAppPurchase.ts +20 -0
  97. package/packages/driver-base/src/types/KeycodeKeyMap.ts +1 -0
  98. package/packages/driver-browser/src/DeviceBrowser.ts +26 -0
  99. package/packages/driver-browser/src/keymap.ts +8 -0
  100. package/packages/driver-entone/src/DeviceEntone.ts +31 -1
  101. package/packages/driver-entone/src/keymap.ts +1 -0
  102. package/packages/driver-firetv/src/DeviceFireTV.ts +86 -0
  103. package/packages/driver-firetv/src/__mocks__/javaScriptBridge.ts +45 -0
  104. package/packages/driver-firetv/src/index.ts +1 -0
  105. package/packages/driver-firetv/src/types.ts +1 -0
  106. package/packages/driver-hbbtv/src/DeviceHbbTV.ts +26 -0
  107. package/packages/driver-kreatv/src/DeviceKreaTV.ts +26 -0
  108. package/packages/driver-saphi/src/DeviceSaphi.ts +26 -0
  109. package/packages/driver-smartcast/src/DeviceSmartCast.ts +380 -0
  110. package/packages/driver-smartcast/src/__mocks__/api.ts +69 -0
  111. package/packages/driver-smartcast/src/index.ts +1 -0
  112. package/packages/driver-smartcast/src/keymap.ts +9 -0
  113. package/packages/driver-smartcast/src/types.ts +102 -0
  114. package/packages/driver-tizen/src/DeviceTizen.ts +121 -7
  115. package/packages/driver-tizen/src/ITizen.ts +15116 -202
  116. package/packages/driver-tizen/src/IWebapis.ts +8643 -87
  117. package/packages/driver-tizen/src/TizenKeys.ts +4 -2
  118. package/packages/driver-tizen/src/__mocks__/tizen.ts +7 -8
  119. package/packages/driver-tizen/src/constants.ts +1 -195
  120. package/packages/driver-vidaa/src/DeviceVidaa.ts +29 -2
  121. package/packages/driver-vidaa/src/__mocks__/vidaa.ts +1 -1
  122. package/packages/driver-vidaa/src/keymap.ts +2 -0
  123. package/packages/driver-webos/src/DeviceWebos.ts +55 -0
  124. package/packages/driver-webos/src/__mocks__/webos.ts +33 -0
  125. package/packages/driver-webos/src/constants.ts +1 -0
  126. package/packages/driver-webos/src/keymap.ts +2 -1
  127. package/packages/driver-webos/src/types.ts +30 -0
  128. package/packages/driver-xbox/src/DeviceXbox.ts +30 -1
  129. package/packages/driver-xbox/src/keymap.ts +1 -1
  130. package/packages/epg/README.md +3 -1
  131. package/packages/epg/src/v2/Cell.tsx +16 -2
  132. package/packages/epg/src/v2/DataManager.ts +112 -41
  133. package/packages/epg/src/v2/DatePicker.tsx +9 -3
  134. package/packages/epg/src/v2/DateToast/DateToast.tsx +12 -9
  135. package/packages/epg/src/v2/Day.tsx +6 -3
  136. package/packages/epg/src/v2/Epg.tsx +5 -5
  137. package/packages/epg/src/v2/MockGenerator/generator.ts +3 -2
  138. package/packages/epg/src/v2/ProgramInfo/utils.ts +4 -3
  139. package/packages/epg/src/v2/Row.tsx +3 -1
  140. package/packages/epg/src/v2/TimelineSection.tsx +4 -1
  141. package/packages/epg/src/v2/basic/CellsManager.tsx +7 -2
  142. package/packages/epg/src/v2/basic/RowsManager.tsx +3 -1
  143. package/packages/epg/src/v2/interface.ts +13 -0
  144. package/packages/events-manager/src/EventsManager.ts +1 -56
  145. package/packages/focus/README.md +33 -0
  146. package/packages/focus/src/IFocusable.ts +1 -0
  147. package/packages/focus/src/Layout/Base.tsx +41 -6
  148. package/packages/focus/src/Layout/Matrix.tsx +51 -19
  149. package/packages/focus/src/focusFirstExisting.ts +7 -1
  150. package/packages/focus/src/hasFocus.ts +36 -0
  151. package/packages/focus/src/index.ts +2 -1
  152. package/packages/gallup/src/Gallup.ts +3 -3
  153. package/packages/grid/src/Base/Base.tsx +15 -10
  154. package/packages/grid/src/FirstOnlyGrid/FirstOnlyGrid.tsx +4 -2
  155. package/packages/grid/src/UnifiedGridController/UnifiedGridController.ts +6 -6
  156. package/packages/icon/src/Icon.tsx +27 -5
  157. package/packages/input/README.md +1 -1
  158. package/packages/input/src/Input.tsx +10 -10
  159. package/packages/interactable/README.md +2 -1
  160. package/packages/interactable/src/Interactable.tsx +9 -3
  161. package/packages/interactable/src/interface.ts +1 -0
  162. package/packages/jsx/src/index.ts +1 -1
  163. package/packages/jsx/src/test-utils/index.ts +1 -0
  164. package/packages/jsx/src/test-utils/keyup.ts +27 -0
  165. package/packages/keyboard/README.md +2 -0
  166. package/packages/keyboard/src/Backdrop/Backdrop.scss +2 -0
  167. package/packages/keyboard/src/KeyboardBase.tsx +16 -4
  168. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.scss +10 -0
  169. package/packages/keyboard/src/WhitelabelKeyboard/Keyboard.tsx +128 -142
  170. package/packages/keyboard/src/WhitelabelKeyboard/WhitelabelStyles/whitelabel.scss +4 -0
  171. package/packages/keyboard/src/WhitelabelKeyboard/_sizes.1080.scss +1 -0
  172. package/packages/keyboard/src/WhitelabelKeyboard/_sizes.scss +1 -0
  173. package/packages/keyboard/src/WhitelabelKeyboard/icons/key_language.svg +20 -0
  174. package/packages/keyboard/src/WhitelabelKeyboard/index.ts +1 -1
  175. package/packages/keyboard/src/WhitelabelKeyboard/layouts/arabic.ts +27 -0
  176. package/packages/keyboard/src/WhitelabelKeyboard/layouts/burmese.ts +27 -0
  177. package/packages/keyboard/src/WhitelabelKeyboard/layouts/dari.ts +28 -0
  178. package/packages/keyboard/src/WhitelabelKeyboard/layouts/hebrew.ts +28 -0
  179. package/packages/keyboard/src/WhitelabelKeyboard/layouts/index.ts +15 -0
  180. package/packages/keyboard/src/WhitelabelKeyboard/layouts/korean.ts +26 -0
  181. package/packages/keyboard/src/WhitelabelKeyboard/layouts/latin.ts +26 -0
  182. package/packages/keyboard/src/WhitelabelKeyboard/layouts/pashto.ts +27 -0
  183. package/packages/keyboard/src/WhitelabelKeyboard/layouts/persian.ts +27 -0
  184. package/packages/keyboard/src/WhitelabelKeyboard/layouts/russian.ts +27 -0
  185. package/packages/keyboard/src/WhitelabelKeyboard/layouts/spanish.ts +26 -0
  186. package/packages/keyboard/src/WhitelabelKeyboard/layouts/special.ts +28 -0
  187. package/packages/keyboard/src/WhitelabelKeyboard/layouts/tibetan.ts +26 -0
  188. package/packages/keyboard/src/WhitelabelKeyboard/layouts/turkish.ts +26 -0
  189. package/packages/keyboard/src/WhitelabelKeyboard/layouts/ukrainian.ts +27 -0
  190. package/packages/keyboard/src/WhitelabelKeyboard/layouts/urdu.ts +26 -0
  191. package/packages/keyboard/src/WhitelabelKeyboard/types.ts +22 -2
  192. package/packages/keyboard/src/types/index.ts +1 -1
  193. package/packages/keyboard/src/utils/caret.ts +5 -8
  194. package/packages/keyboard/src/utils/input.ts +5 -6
  195. package/packages/keyboard/src/utils/setInputSelectionRange.ts +10 -0
  196. package/packages/l10n/README.md +18 -0
  197. package/packages/l10n/src/date/common.ts +18 -6
  198. package/packages/l10n/src/date/cs.ts +2 -8
  199. package/packages/l10n/src/date/de.ts +97 -0
  200. package/packages/l10n/src/date/en-001.ts +3 -3
  201. package/packages/l10n/src/date/en-common.ts +5 -4
  202. package/packages/l10n/src/date/en-us.ts +3 -3
  203. package/packages/l10n/src/date/es.ts +71 -0
  204. package/packages/l10n/src/date/fr.ts +94 -0
  205. package/packages/l10n/src/date/he.ts +101 -0
  206. package/packages/l10n/src/date/iso.ts +12 -13
  207. package/packages/l10n/src/date/types.ts +9 -0
  208. package/packages/l10n/src/l10n.ts +61 -3
  209. package/packages/list/src/Base/Base.tsx +19 -9
  210. package/packages/list/src/Base/interface.ts +2 -2
  211. package/packages/list/src/BasicList/BasicList.tsx +7 -7
  212. package/packages/list/src/CenteredList/CenteredList.tsx +2 -2
  213. package/packages/list/src/CenteredList/controller.ts +0 -1
  214. package/packages/list/src/EdgeOffsetList/EdgeOffsetList.tsx +10 -10
  215. package/packages/list/src/FirstOnlyList/FirstOnlyList.tsx +2 -2
  216. package/packages/list/src/FirstOnlyVariedList/FirstOnlyVariedList.tsx +2 -2
  217. package/packages/list/src/FixedToEndList/FixedToEndList.tsx +2 -2
  218. package/packages/list/src/UnifiedListController/UnifiedListController.ts +6 -2
  219. package/packages/list/src/interface.ts +2 -2
  220. package/packages/logger/src/loggers/ConsoleLogger/ConsoleLogger.ts +7 -1
  221. package/packages/logger/src/loggers/SentryLogger/Sentry.ts +1 -0
  222. package/packages/logger/src/loggers/SentryLogger/SentryLogger.ts +5 -3
  223. package/packages/menu/src/MenuAndContentContainer/MenuAndContentContainer.tsx +31 -3
  224. package/packages/menu/src/MenuAndContentContainer/interface.ts +8 -0
  225. package/packages/modal-service/README.md +4 -1
  226. package/packages/modal-service/src/ModalService.tsx +29 -5
  227. package/packages/perf-utils/README.md +1 -120
  228. package/packages/perf-utils/src/array/filter.ts +1 -54
  229. package/packages/perf-utils/src/array/find.ts +1 -43
  230. package/packages/perf-utils/src/array/findIndex.ts +1 -43
  231. package/packages/perf-utils/src/array/forEach.ts +1 -48
  232. package/packages/perf-utils/src/array/includes.ts +1 -41
  233. package/packages/perf-utils/src/array/includesNaN.ts +1 -32
  234. package/packages/perf-utils/src/array/index.ts +1 -7
  235. package/packages/perf-utils/src/array/map.ts +1 -52
  236. package/packages/player-ui/README.md +1 -1
  237. package/packages/player-ui/src/CurrentTime.tsx +2 -2
  238. package/packages/player-ui/src/Duration.tsx +2 -2
  239. package/packages/player-ui/src/PauseButton.tsx +8 -0
  240. package/packages/player-ui/src/PlayerInteractable.tsx +1 -0
  241. package/packages/player-ui/src/PlayerTime.tsx +3 -1
  242. package/packages/player-ui/src/PlayerUI.tsx +68 -35
  243. package/packages/player-ui/src/RemainingTime.tsx +2 -2
  244. package/packages/player-ui/src/Seekbar.tsx +110 -18
  245. package/packages/player-ui/src/Seeking.ts +57 -16
  246. package/packages/player-ui/src/Subtitles.tsx +2 -2
  247. package/packages/player-ui/src/index.ts +1 -0
  248. package/packages/player-ui/src/mocks.ts +32 -8
  249. package/packages/player-ui/src/timeUtils.ts +3 -3
  250. package/packages/player-ui/src/types.ts +9 -3
  251. package/packages/router/README.md +1 -0
  252. package/packages/router/src/Route.tsx +61 -27
  253. package/packages/router/src/Router.tsx +63 -14
  254. package/packages/router/src/history.ts +8 -1
  255. package/packages/router/src/index.ts +1 -1
  256. package/packages/router/src/utils.ts +9 -4
  257. package/packages/sass-utils/src/linear-gradient.scss +9 -4
  258. package/packages/sass-utils/src/scale.1080.scss +3 -1
  259. package/packages/sass-utils/src/scale.720.scss +1 -1
  260. package/packages/time/README.md +4 -1
  261. package/packages/time/src/Time.ts +35 -13
  262. package/packages/time/src/adapters/24iMediaTimeApi.ts +47 -0
  263. package/packages/time/src/constants.ts +1 -0
  264. package/packages/time/src/services/24iMediaTimeApi/24iMediaTimeApi.ts +43 -0
  265. package/packages/time/src/services/24iMediaTimeApi/index.ts +6 -0
  266. package/packages/toast/src/ToastService.scss +1 -0
  267. package/packages/toast/src/ToastService.tsx +16 -5
  268. package/packages/types-bigscreen-jsx/README.md +5 -4
  269. package/packages/types-bigscreen-jsx/index.d.ts +72 -67
  270. package/packages/utils/README.md +27 -0
  271. package/packages/utils/src/elementUtils.ts +25 -0
  272. package/packages/utils/src/forceReflow.ts +14 -0
  273. package/packages/utils/src/index.ts +8 -0
  274. package/packages/utils/src/keyPress/index.ts +6 -0
  275. package/packages/utils/src/keyPress/keyPressSimulator.ts +74 -0
  276. package/packages/utils/src/keyPress/simulateKeyPress.ts +25 -0
  277. package/packages/utils/src/scaledImage.ts +6 -3
  278. package/packages/utils/src/textUtils.ts +46 -14
  279. package/packages/utils/src/wait.ts +3 -1
  280. package/packages/utils/src/xhr/xhrSend.ts +3 -1
  281. package/packages/utils/src/xhr/xhrSendRetry.ts +3 -1
  282. package/packages/zapping/src/ChannelZapping.ts +9 -0
  283. package/packages/zapping/src/Zapping.tsx +10 -0
  284. package/utils/release/release.ts +156 -0
  285. package/packages/driver-tizen/src/types.ts +0 -14
  286. package/packages/focus/src/Layout/__test__/Base.spec.ts +0 -180
  287. package/packages/focus/src/Layout/__test__/Horizontal.spec.ts +0 -94
  288. package/packages/focus/src/Layout/__test__/Matrix.spec.ts +0 -261
  289. package/packages/focus/src/Layout/__test__/Vertical.spec.ts +0 -46
  290. package/packages/focus/src/Layout/__test__/isRtl.spec.ts +0 -23
  291. package/packages/focus/src/Layout/__test__/shared.ts +0 -19
  292. package/packages/keyboard/src/WhitelabelKeyboard/focusMatrix.ts +0 -19
@@ -27,6 +27,7 @@
27
27
  // Victor Magalhães <https://github.com/vhfmag>
28
28
  // Dale Tan <https://github.com/hellatan>
29
29
  // Priyanshu Rav <https://github.com/priyanshurav>
30
+ // Dmitry Semigradsky <https://github.com/Semigradsky>
30
31
  // Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
31
32
  // TypeScript Version: 2.8
32
33
 
@@ -132,9 +133,19 @@ declare namespace React {
132
133
  key?: Key | null | undefined;
133
134
  }
134
135
  interface RefAttributes<T> extends Attributes {
136
+ /**
137
+ * Allows getting a ref to the component instance.
138
+ * Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
139
+ * @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom
140
+ */
135
141
  ref?: Ref<T> | undefined;
136
142
  }
137
143
  interface ClassAttributes<T> extends Attributes {
144
+ /**
145
+ * Allows getting a ref to the component instance.
146
+ * Once the component unmounts, React will set `ref.current` to `null` (or call the ref with `null` if you passed a callback ref).
147
+ * @see https://react.dev/learn/referencing-values-with-refs#refs-and-the-dom
148
+ */
138
149
  ref?: LegacyRef<T> | undefined;
139
150
  }
140
151
 
@@ -402,7 +413,7 @@ declare namespace React {
402
413
  const version: string;
403
414
 
404
415
  /**
405
- * {@link https://reactjs.org/docs/profiler.html#onrender-callback Profiler API}
416
+ * {@link https://react.dev/reference/react/Profiler#onrender-callback Profiler API}
406
417
  */
407
418
  type ProfilerOnRenderCallback = (
408
419
  id: string,
@@ -449,7 +460,7 @@ declare namespace React {
449
460
  * }
450
461
  * ```
451
462
  *
452
- * @see https://reactjs.org/docs/context.html#classcontexttype
463
+ * @see https://react.dev/reference/react/Component#static-contexttype
453
464
  */
454
465
  static contextType?: Context<any> | undefined;
455
466
 
@@ -466,14 +477,14 @@ declare namespace React {
466
477
  * declare context: React.ContextType<typeof MyContext>
467
478
  * ```
468
479
  *
469
- * @see https://reactjs.org/docs/context.html
480
+ * @see https://react.dev/reference/react/Component#context
470
481
  */
471
482
  context: unknown;
472
483
 
473
484
  constructor(props: Readonly<P> | P);
474
485
  /**
475
486
  * @deprecated
476
- * @see https://reactjs.org/docs/legacy-context.html
487
+ * @see https://legacy.reactjs.org/docs/legacy-context.html
477
488
  */
478
489
  constructor(props: P, context: any);
479
490
 
@@ -492,7 +503,7 @@ declare namespace React {
492
503
  state: Readonly<S>;
493
504
  /**
494
505
  * @deprecated
495
- * https://reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs
506
+ * https://legacy.reactjs.org/docs/refs-and-the-dom.html#legacy-api-string-refs
496
507
  */
497
508
  refs: {
498
509
  [key: string]: ReactInstance
@@ -668,8 +679,8 @@ declare namespace React {
668
679
  * prevents this from being invoked.
669
680
  *
670
681
  * @deprecated 16.3, use componentDidMount or the constructor instead; will stop working in React 17
671
- * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state
672
- * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
682
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state
683
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
673
684
  */
674
685
  componentWillMount?(): void;
675
686
  /**
@@ -682,8 +693,8 @@ declare namespace React {
682
693
  * prevents this from being invoked.
683
694
  *
684
695
  * @deprecated 16.3, use componentDidMount or the constructor instead
685
- * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state
686
- * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
696
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#initializing-state
697
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
687
698
  */
688
699
  UNSAFE_componentWillMount?(): void;
689
700
  /**
@@ -697,8 +708,8 @@ declare namespace React {
697
708
  * prevents this from being invoked.
698
709
  *
699
710
  * @deprecated 16.3, use static getDerivedStateFromProps instead; will stop working in React 17
700
- * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props
701
- * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
711
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props
712
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
702
713
  */
703
714
  componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
704
715
  /**
@@ -714,8 +725,8 @@ declare namespace React {
714
725
  * prevents this from being invoked.
715
726
  *
716
727
  * @deprecated 16.3, use static getDerivedStateFromProps instead
717
- * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props
718
- * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
728
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#updating-state-based-on-props
729
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
719
730
  */
720
731
  UNSAFE_componentWillReceiveProps?(nextProps: Readonly<P>, nextContext: any): void;
721
732
  /**
@@ -727,8 +738,8 @@ declare namespace React {
727
738
  * prevents this from being invoked.
728
739
  *
729
740
  * @deprecated 16.3, use getSnapshotBeforeUpdate instead; will stop working in React 17
730
- * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update
731
- * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
741
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update
742
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
732
743
  */
733
744
  componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
734
745
  /**
@@ -742,8 +753,8 @@ declare namespace React {
742
753
  * prevents this from being invoked.
743
754
  *
744
755
  * @deprecated 16.3, use getSnapshotBeforeUpdate instead
745
- * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update
746
- * @see https://reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
756
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#reading-dom-properties-before-an-update
757
+ * @see https://legacy.reactjs.org/blog/2018/03/27/update-on-async-rendering.html#gradual-migration-path
747
758
  */
748
759
  UNSAFE_componentWillUpdate?(nextProps: Readonly<P>, nextState: Readonly<S>, nextContext: any): void;
749
760
  }
@@ -782,10 +793,10 @@ declare namespace React {
782
793
 
783
794
  /** Ensures that the props do not include ref at all */
784
795
  type PropsWithoutRef<P> =
785
- // Pick would not be sufficient for this. We'd like to avoid unnecessary mapping and need a distributive conditional to support unions.
796
+ // Omit would not be sufficient for this. We'd like to avoid unnecessary mapping and need a distributive conditional to support unions.
786
797
  // see: https://www.typescriptlang.org/docs/handbook/2/conditional-types.html#distributive-conditional-types
787
798
  // https://github.com/Microsoft/TypeScript/issues/28339
788
- P extends any ? ('ref' extends keyof P ? Pick<P, Exclude<keyof P, 'ref'>> : P) : P;
799
+ P extends any ? ('ref' extends keyof P ? Omit<P, 'ref'> : P) : P;
789
800
  /** Ensures that the props do not include string ref, which cannot be forwarded */
790
801
  type PropsWithRef<P> =
791
802
  // Just "P extends { ref?: infer R }" looks sufficient, but R will infer as {} if P is {}.
@@ -886,14 +897,14 @@ declare namespace React {
886
897
  * context value, as given by the nearest context provider for the given context.
887
898
  *
888
899
  * @version 16.8.0
889
- * @see https://reactjs.org/docs/hooks-reference.html#usecontext
900
+ * @see https://react.dev/reference/react/useContext
890
901
  */
891
902
  function useContext<T>(context: Context<T>/*, (not public API) observedBits?: number|boolean */): T;
892
903
  /**
893
904
  * Returns a stateful value, and a function to update it.
894
905
  *
895
906
  * @version 16.8.0
896
- * @see https://reactjs.org/docs/hooks-reference.html#usestate
907
+ * @see https://react.dev/reference/react/useState
897
908
  */
898
909
  function useState<S>(initialState: S | (() => S)): [S, Dispatch<SetStateAction<S>>];
899
910
  // convenience overload when first argument is omitted
@@ -901,7 +912,7 @@ declare namespace React {
901
912
  * Returns a stateful value, and a function to update it.
902
913
  *
903
914
  * @version 16.8.0
904
- * @see https://reactjs.org/docs/hooks-reference.html#usestate
915
+ * @see https://react.dev/reference/react/useState
905
916
  */
906
917
  function useState<S = undefined>(): [S | undefined, Dispatch<SetStateAction<S | undefined>>];
907
918
  /**
@@ -912,7 +923,7 @@ declare namespace React {
912
923
  * updates because you can pass `dispatch` down instead of callbacks.
913
924
  *
914
925
  * @version 16.8.0
915
- * @see https://reactjs.org/docs/hooks-reference.html#usereducer
926
+ * @see https://react.dev/reference/react/useReducer
916
927
  */
917
928
  // overload where dispatch could accept 0 arguments.
918
929
  function useReducer<R extends ReducerWithoutAction<any>, I>(
@@ -928,7 +939,7 @@ declare namespace React {
928
939
  * updates because you can pass `dispatch` down instead of callbacks.
929
940
  *
930
941
  * @version 16.8.0
931
- * @see https://reactjs.org/docs/hooks-reference.html#usereducer
942
+ * @see https://react.dev/reference/react/useReducer
932
943
  */
933
944
  // overload where dispatch could accept 0 arguments.
934
945
  function useReducer<R extends ReducerWithoutAction<any>>(
@@ -944,7 +955,7 @@ declare namespace React {
944
955
  * updates because you can pass `dispatch` down instead of callbacks.
945
956
  *
946
957
  * @version 16.8.0
947
- * @see https://reactjs.org/docs/hooks-reference.html#usereducer
958
+ * @see https://react.dev/reference/react/useReducer
948
959
  */
949
960
  // overload where "I" may be a subset of ReducerState<R>; used to provide autocompletion.
950
961
  // If "I" matches ReducerState<R> exactly then the last overload will allow initializer to be omitted.
@@ -962,7 +973,7 @@ declare namespace React {
962
973
  * updates because you can pass `dispatch` down instead of callbacks.
963
974
  *
964
975
  * @version 16.8.0
965
- * @see https://reactjs.org/docs/hooks-reference.html#usereducer
976
+ * @see https://react.dev/reference/react/useReducer
966
977
  */
967
978
  // overload for free "I"; all goes as long as initializer converts it into "ReducerState<R>".
968
979
  function useReducer<R extends Reducer<any, any>, I>(
@@ -978,7 +989,7 @@ declare namespace React {
978
989
  * updates because you can pass `dispatch` down instead of callbacks.
979
990
  *
980
991
  * @version 16.8.0
981
- * @see https://reactjs.org/docs/hooks-reference.html#usereducer
992
+ * @see https://react.dev/reference/react/useReducer
982
993
  */
983
994
 
984
995
  // I'm not sure if I keep this 2-ary or if I make it (2,3)-ary; it's currently (2,3)-ary.
@@ -1003,7 +1014,7 @@ declare namespace React {
1003
1014
  * value around similar to how you’d use instance fields in classes.
1004
1015
  *
1005
1016
  * @version 16.8.0
1006
- * @see https://reactjs.org/docs/hooks-reference.html#useref
1017
+ * @see https://react.dev/reference/react/useRef
1007
1018
  */
1008
1019
  function useRef<T>(initialValue: T): MutableRefObject<T>;
1009
1020
  // convenience overload for refs given as a ref prop as they typically start with a null value
@@ -1018,7 +1029,7 @@ declare namespace React {
1018
1029
  * of the generic argument.
1019
1030
  *
1020
1031
  * @version 16.8.0
1021
- * @see https://reactjs.org/docs/hooks-reference.html#useref
1032
+ * @see https://react.dev/reference/react/useRef
1022
1033
  */
1023
1034
  function useRef<T>(initialValue: T|null): RefObject<T>;
1024
1035
  // convenience overload for potentially undefined initialValue / call with 0 arguments
@@ -1031,7 +1042,7 @@ declare namespace React {
1031
1042
  * value around similar to how you’d use instance fields in classes.
1032
1043
  *
1033
1044
  * @version 16.8.0
1034
- * @see https://reactjs.org/docs/hooks-reference.html#useref
1045
+ * @see https://react.dev/reference/react/useRef
1035
1046
  */
1036
1047
  function useRef<T = undefined>(): MutableRefObject<T | undefined>;
1037
1048
  /**
@@ -1045,7 +1056,7 @@ declare namespace React {
1045
1056
  * `componentDidMount` and `componentDidUpdate`.
1046
1057
  *
1047
1058
  * @version 16.8.0
1048
- * @see https://reactjs.org/docs/hooks-reference.html#uselayouteffect
1059
+ * @see https://react.dev/reference/react/useLayoutEffect
1049
1060
  */
1050
1061
  function useLayoutEffect(effect: EffectCallback, deps?: DependencyList): void;
1051
1062
  /**
@@ -1055,7 +1066,7 @@ declare namespace React {
1055
1066
  * @param deps If present, effect will only activate if the values in the list change.
1056
1067
  *
1057
1068
  * @version 16.8.0
1058
- * @see https://reactjs.org/docs/hooks-reference.html#useeffect
1069
+ * @see https://react.dev/reference/react/useEffect
1059
1070
  */
1060
1071
  function useEffect(effect: EffectCallback, deps?: DependencyList): void;
1061
1072
  // NOTE: this does not accept strings, but this will have to be fixed by removing strings from type Ref<T>
@@ -1066,7 +1077,7 @@ declare namespace React {
1066
1077
  * `useImperativeHandle` should be used with `React.forwardRef`.
1067
1078
  *
1068
1079
  * @version 16.8.0
1069
- * @see https://reactjs.org/docs/hooks-reference.html#useimperativehandle
1080
+ * @see https://react.dev/reference/react/useImperativeHandle
1070
1081
  */
1071
1082
  function useImperativeHandle<T, R extends T>(ref: Ref<T>|undefined, init: () => R, deps?: DependencyList): void;
1072
1083
  // I made 'inputs' required here and in useMemo as there's no point to memoizing without the memoization key
@@ -1076,7 +1087,7 @@ declare namespace React {
1076
1087
  * has changed.
1077
1088
  *
1078
1089
  * @version 16.8.0
1079
- * @see https://reactjs.org/docs/hooks-reference.html#usecallback
1090
+ * @see https://react.dev/reference/react/useCallback
1080
1091
  */
1081
1092
  // A specific function type would not trigger implicit any.
1082
1093
  // See https://github.com/DefinitelyTyped/DefinitelyTyped/issues/52873#issuecomment-845806435 for a comparison between `Function` and more specific types.
@@ -1086,7 +1097,7 @@ declare namespace React {
1086
1097
  * `useMemo` will only recompute the memoized value when one of the `deps` has changed.
1087
1098
  *
1088
1099
  * @version 16.8.0
1089
- * @see https://reactjs.org/docs/hooks-reference.html#usememo
1100
+ * @see https://react.dev/reference/react/useMemo
1090
1101
  */
1091
1102
  // allow undefined, but don't make it optional as that is very likely a mistake
1092
1103
  function useMemo<T>(factory: () => T, deps: DependencyList | undefined): T;
@@ -1097,7 +1108,7 @@ declare namespace React {
1097
1108
  * It’s most valuable for custom hooks that are part of shared libraries.
1098
1109
  *
1099
1110
  * @version 16.8.0
1100
- * @see https://reactjs.org/docs/hooks-reference.html#usedebugvalue
1111
+ * @see https://react.dev/reference/react/useDebugValue
1101
1112
  */
1102
1113
  // the name of the custom hook is itself derived from the function name at runtime:
1103
1114
  // it's just the function name without the "use" prefix.
@@ -1127,7 +1138,7 @@ declare namespace React {
1127
1138
  *
1128
1139
  * @param value The value that is going to be deferred
1129
1140
  *
1130
- * @see https://reactjs.org/docs/concurrent-mode-reference.html#usedeferredvalue
1141
+ * @see https://react.dev/reference/react/useDeferredValue
1131
1142
  */
1132
1143
  export function useDeferredValue<T>(value: T): T;
1133
1144
 
@@ -1144,7 +1155,7 @@ declare namespace React {
1144
1155
  *
1145
1156
  * **If some state update causes a component to suspend, that state update should be wrapped in a transition.**`
1146
1157
  *
1147
- * @see https://reactjs.org/docs/concurrent-mode-reference.html#usetransition
1158
+ * @see https://react.dev/reference/react/useTransition
1148
1159
  */
1149
1160
  export function useTransition(): [boolean, TransitionStartFunction];
1150
1161
 
@@ -1250,6 +1261,8 @@ declare namespace React {
1250
1261
  target: EventTarget & T;
1251
1262
  }
1252
1263
 
1264
+ export type ModifierKey = "Alt" | "AltGraph" | "CapsLock" | "Control" | "Fn" | "FnLock" | "Hyper" | "Meta" | "NumLock" | "ScrollLock" | "Shift" | "Super" | "Symbol" | "SymbolLock";
1265
+
1253
1266
  interface KeyboardEvent<T = Element> extends UIEvent<T, NativeKeyboardEvent> {
1254
1267
  altKey: boolean;
1255
1268
  /** @deprecated */
@@ -1259,7 +1272,7 @@ declare namespace React {
1259
1272
  /**
1260
1273
  * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
1261
1274
  */
1262
- getModifierState(key: string): boolean;
1275
+ getModifierState(key: ModifierKey): boolean;
1263
1276
  /**
1264
1277
  * See the [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#named-key-attribute-values). for possible values
1265
1278
  */
@@ -1285,7 +1298,7 @@ declare namespace React {
1285
1298
  /**
1286
1299
  * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
1287
1300
  */
1288
- getModifierState(key: string): boolean;
1301
+ getModifierState(key: ModifierKey): boolean;
1289
1302
  metaKey: boolean;
1290
1303
  movementX: number;
1291
1304
  movementY: number;
@@ -1304,7 +1317,7 @@ declare namespace React {
1304
1317
  /**
1305
1318
  * See [DOM Level 3 Events spec](https://www.w3.org/TR/uievents-key/#keys-modifier). for a list of valid (case-sensitive) arguments to this method.
1306
1319
  */
1307
- getModifierState(key: string): boolean;
1320
+ getModifierState(key: ModifierKey): boolean;
1308
1321
  metaKey: boolean;
1309
1322
  shiftKey: boolean;
1310
1323
  targetTouches: TouchList;
@@ -1393,10 +1406,10 @@ declare namespace React {
1393
1406
  onCompositionUpdateCapture?: CompositionEventHandler<T> | undefined;
1394
1407
 
1395
1408
  // Focus Events
1396
- onFocus?: FocusEventHandler<T> | undefined;
1397
- onFocusCapture?: FocusEventHandler<T> | undefined;
1398
- onBlur?: FocusEventHandler<T> | undefined;
1399
- onBlurCapture?: FocusEventHandler<T> | undefined;
1409
+ onFocus?: (event: globalThis.FocusEvent) => void;
1410
+ onFocusCapture?: (event: globalThis.FocusEvent) => void;
1411
+ onBlur?: (event: globalThis.FocusEvent) => void;
1412
+ onBlurCapture?: (event: globalThis.FocusEvent) => void;
1400
1413
 
1401
1414
  // Form Events
1402
1415
  onChange?: (event: globalThis.Event) => void;
@@ -1459,6 +1472,8 @@ declare namespace React {
1459
1472
  onProgressCapture?: ReactEventHandler<T> | undefined;
1460
1473
  onRateChange?: ReactEventHandler<T> | undefined;
1461
1474
  onRateChangeCapture?: ReactEventHandler<T> | undefined;
1475
+ onResize?: ReactEventHandler<T> | undefined;
1476
+ onResizeCapture?: ReactEventHandler<T> | undefined;
1462
1477
  onSeeked?: ReactEventHandler<T> | undefined;
1463
1478
  onSeekedCapture?: ReactEventHandler<T> | undefined;
1464
1479
  onSeeking?: ReactEventHandler<T> | undefined;
@@ -1850,6 +1865,7 @@ declare namespace React {
1850
1865
 
1851
1866
  // Standard HTML Attributes
1852
1867
  accessKey?: string | undefined;
1868
+ autoFocus?: boolean | undefined;
1853
1869
  className?: string | undefined;
1854
1870
  contentEditable?: Booleanish | "inherit" | undefined;
1855
1871
  contextMenu?: string | undefined;
@@ -1858,6 +1874,7 @@ declare namespace React {
1858
1874
  hidden?: boolean | undefined;
1859
1875
  id?: string | undefined;
1860
1876
  lang?: string | undefined;
1877
+ nonce?: string | undefined;
1861
1878
  placeholder?: string | undefined;
1862
1879
  slot?: string | undefined;
1863
1880
  spellCheck?: Booleanish | undefined;
@@ -1874,11 +1891,14 @@ declare namespace React {
1874
1891
 
1875
1892
  // RDFa Attributes
1876
1893
  about?: string | undefined;
1894
+ content?: string | undefined;
1877
1895
  datatype?: string | undefined;
1878
1896
  inlist?: any;
1879
1897
  prefix?: string | undefined;
1880
1898
  property?: string | undefined;
1899
+ rel?: string | undefined;
1881
1900
  resource?: string | undefined;
1901
+ rev?: string | undefined;
1882
1902
  typeof?: string | undefined;
1883
1903
  vocab?: string | undefined;
1884
1904
 
@@ -1920,7 +1940,6 @@ declare namespace React {
1920
1940
  as?: string | undefined;
1921
1941
  async?: boolean | undefined;
1922
1942
  autoComplete?: string | undefined;
1923
- autoFocus?: boolean | undefined;
1924
1943
  autoPlay?: boolean | undefined;
1925
1944
  capture?: boolean | 'user' | 'environment' | undefined;
1926
1945
  cellPadding?: number | string | undefined;
@@ -1932,10 +1951,9 @@ declare namespace React {
1932
1951
  classID?: string | undefined;
1933
1952
  cols?: number | undefined;
1934
1953
  colSpan?: number | undefined;
1935
- content?: string | undefined;
1936
1954
  controls?: boolean | undefined;
1937
1955
  coords?: string | undefined;
1938
- crossOrigin?: string | undefined;
1956
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
1939
1957
  data?: string | undefined;
1940
1958
  dateTime?: string | undefined;
1941
1959
  default?: boolean | undefined;
@@ -1978,7 +1996,6 @@ declare namespace React {
1978
1996
  multiple?: boolean | undefined;
1979
1997
  muted?: boolean | undefined;
1980
1998
  name?: string | undefined;
1981
- nonce?: string | undefined;
1982
1999
  noValidate?: boolean | undefined;
1983
2000
  open?: boolean | undefined;
1984
2001
  optimum?: number | undefined;
@@ -1988,7 +2005,6 @@ declare namespace React {
1988
2005
  poster?: string | undefined;
1989
2006
  preload?: string | undefined;
1990
2007
  readOnly?: boolean | undefined;
1991
- rel?: string | undefined;
1992
2008
  required?: boolean | undefined;
1993
2009
  reversed?: boolean | undefined;
1994
2010
  rows?: number | undefined;
@@ -2043,7 +2059,6 @@ declare namespace React {
2043
2059
  hrefLang?: string | undefined;
2044
2060
  media?: string | undefined;
2045
2061
  ping?: string | undefined;
2046
- rel?: string | undefined;
2047
2062
  target?: HTMLAttributeAnchorTarget | undefined;
2048
2063
  type?: string | undefined;
2049
2064
  referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
@@ -2059,7 +2074,6 @@ declare namespace React {
2059
2074
  hrefLang?: string | undefined;
2060
2075
  media?: string | undefined;
2061
2076
  referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
2062
- rel?: string | undefined;
2063
2077
  shape?: string | undefined;
2064
2078
  target?: string | undefined;
2065
2079
  }
@@ -2074,7 +2088,6 @@ declare namespace React {
2074
2088
  }
2075
2089
 
2076
2090
  interface ButtonHTMLAttributes<T> extends HTMLAttributes<T> {
2077
- autoFocus?: boolean | undefined;
2078
2091
  disabled?: boolean | undefined;
2079
2092
  form?: string | undefined;
2080
2093
  formAction?: string | undefined;
@@ -2143,7 +2156,6 @@ declare namespace React {
2143
2156
  name?: string | undefined;
2144
2157
  noValidate?: boolean | undefined;
2145
2158
  target?: string | undefined;
2146
- rel?: string | undefined;
2147
2159
  }
2148
2160
 
2149
2161
  interface HtmlHTMLAttributes<T> extends HTMLAttributes<T> {
@@ -2221,10 +2233,9 @@ declare namespace React {
2221
2233
  accept?: string | undefined;
2222
2234
  alt?: string | undefined;
2223
2235
  autoComplete?: string | undefined;
2224
- autoFocus?: boolean | undefined;
2225
2236
  capture?: boolean | 'user' | 'environment' | undefined; // https://www.w3.org/TR/html-media-capture/#the-capture-attribute
2226
2237
  checked?: boolean | undefined;
2227
- crossOrigin?: string | undefined;
2238
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2228
2239
  disabled?: boolean | undefined;
2229
2240
  enterKeyHint?: 'enter' | 'done' | 'go' | 'next' | 'previous' | 'search' | 'send' | undefined;
2230
2241
  form?: string | undefined;
@@ -2256,7 +2267,6 @@ declare namespace React {
2256
2267
  }
2257
2268
 
2258
2269
  interface KeygenHTMLAttributes<T> extends HTMLAttributes<T> {
2259
- autoFocus?: boolean | undefined;
2260
2270
  challenge?: string | undefined;
2261
2271
  disabled?: boolean | undefined;
2262
2272
  form?: string | undefined;
@@ -2276,7 +2286,7 @@ declare namespace React {
2276
2286
 
2277
2287
  interface LinkHTMLAttributes<T> extends HTMLAttributes<T> {
2278
2288
  as?: string | undefined;
2279
- crossOrigin?: string | undefined;
2289
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2280
2290
  href?: string | undefined;
2281
2291
  hrefLang?: string | undefined;
2282
2292
  integrity?: string | undefined;
@@ -2284,7 +2294,6 @@ declare namespace React {
2284
2294
  imageSrcSet?: string | undefined;
2285
2295
  imageSizes?: string | undefined;
2286
2296
  referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
2287
- rel?: string | undefined;
2288
2297
  sizes?: string | undefined;
2289
2298
  type?: string | undefined;
2290
2299
  charSet?: string | undefined;
@@ -2302,7 +2311,7 @@ declare namespace React {
2302
2311
  autoPlay?: boolean | undefined;
2303
2312
  controls?: boolean | undefined;
2304
2313
  controlsList?: string | undefined;
2305
- crossOrigin?: string | undefined;
2314
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2306
2315
  loop?: boolean | undefined;
2307
2316
  mediaGroup?: string | undefined;
2308
2317
  muted?: boolean | undefined;
@@ -2313,7 +2322,6 @@ declare namespace React {
2313
2322
 
2314
2323
  interface MetaHTMLAttributes<T> extends HTMLAttributes<T> {
2315
2324
  charSet?: string | undefined;
2316
- content?: string | undefined;
2317
2325
  httpEquiv?: string | undefined;
2318
2326
  name?: string | undefined;
2319
2327
  media?: string | undefined;
@@ -2387,11 +2395,10 @@ declare namespace React {
2387
2395
  async?: boolean | undefined;
2388
2396
  /** @deprecated */
2389
2397
  charSet?: string | undefined;
2390
- crossOrigin?: string | undefined;
2398
+ crossOrigin?: "anonymous" | "use-credentials" | "" | undefined;
2391
2399
  defer?: boolean | undefined;
2392
2400
  integrity?: string | undefined;
2393
2401
  noModule?: boolean | undefined;
2394
- nonce?: string | undefined;
2395
2402
  referrerPolicy?: HTMLAttributeReferrerPolicy | undefined;
2396
2403
  src?: string | undefined;
2397
2404
  type?: string | undefined;
@@ -2399,7 +2406,6 @@ declare namespace React {
2399
2406
 
2400
2407
  interface SelectHTMLAttributes<T> extends HTMLAttributes<T> {
2401
2408
  autoComplete?: string | undefined;
2402
- autoFocus?: boolean | undefined;
2403
2409
  disabled?: boolean | undefined;
2404
2410
  form?: string | undefined;
2405
2411
  multiple?: boolean | undefined;
@@ -2422,7 +2428,6 @@ declare namespace React {
2422
2428
 
2423
2429
  interface StyleHTMLAttributes<T> extends HTMLAttributes<T> {
2424
2430
  media?: string | undefined;
2425
- nonce?: string | undefined;
2426
2431
  scoped?: boolean | undefined;
2427
2432
  type?: string | undefined;
2428
2433
  }
@@ -2441,7 +2446,6 @@ declare namespace React {
2441
2446
 
2442
2447
  interface TextareaHTMLAttributes<T> extends HTMLAttributes<T> {
2443
2448
  autoComplete?: string | undefined;
2444
- autoFocus?: boolean | undefined;
2445
2449
  cols?: number | undefined;
2446
2450
  dirName?: string | undefined;
2447
2451
  disabled?: boolean | undefined;
@@ -2781,7 +2785,6 @@ declare namespace React {
2781
2785
  interface WebViewHTMLAttributes<T> extends HTMLAttributes<T> {
2782
2786
  allowFullScreen?: boolean | undefined;
2783
2787
  allowpopups?: boolean | undefined;
2784
- autoFocus?: boolean | undefined;
2785
2788
  autosize?: boolean | undefined;
2786
2789
  blinkfeatures?: string | undefined;
2787
2790
  disableblinkfeatures?: string | undefined;
@@ -2821,6 +2824,7 @@ declare namespace React {
2821
2824
  button: DetailedHTMLFactory<ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
2822
2825
  canvas: DetailedHTMLFactory<CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>;
2823
2826
  caption: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2827
+ center: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2824
2828
  cite: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2825
2829
  code: DetailedHTMLFactory<HTMLAttributes<HTMLElement>, HTMLElement>;
2826
2830
  col: DetailedHTMLFactory<ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
@@ -3158,6 +3162,7 @@ declare global {
3158
3162
  button: React.DetailedHTMLProps<React.ButtonHTMLAttributes<HTMLButtonElement>, HTMLButtonElement>;
3159
3163
  canvas: React.DetailedHTMLProps<React.CanvasHTMLAttributes<HTMLCanvasElement>, HTMLCanvasElement>;
3160
3164
  caption: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3165
+ center: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3161
3166
  cite: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3162
3167
  code: React.DetailedHTMLProps<React.HTMLAttributes<HTMLElement>, HTMLElement>;
3163
3168
  col: React.DetailedHTMLProps<React.ColHTMLAttributes<HTMLTableColElement>, HTMLTableColElement>;
@@ -21,6 +21,8 @@ import { generateUuid } from '@24i/bigscreen-sdk/utils/generateUuid';
21
21
  - **[addClass](#addClass)** - safely adds class to reference.
22
22
  - **[debounce](#debounce)** - debounced function is only executed again after a period of not being called, supports leading, trailing (default) and both executions.
23
23
  - **[displayToggler](#displayToggler)** - exports `getDisplayToggler` that allows you to easily show/hide an element with guard preventing unnecessary DOM calls.
24
+ - **[elementUtils](#elementUtils)** - various utils above HTMLElement.
25
+ - **[forceReflow](#forceReflow)** - To force a DOM reflow on given DOM element.
24
26
  - **[generateUuid](#generateUuid)** - function to get UUIDv4 according to RFC 4122.
25
27
  - **[isMouseUsed](#isMouseUsed)** - **DEPRECATED** moved to `device` package.
26
28
  - **[memoryInfo](#memoryInfo)** - two functions that returns currently active segment size and total allocated size of JS heap, in bytes.
@@ -34,6 +36,8 @@ import { generateUuid } from '@24i/bigscreen-sdk/utils/generateUuid';
34
36
  - **[timers](#timers)** - functions to simplify work with setTimeout and setInterval.
35
37
  - **[counter](#counter)** - exports `createCounter` that allows you to add value to counter till callback is triggered at some point.
36
38
  - **[xhr](#xhr)** - provides wrap over `XMLHttpRequest`, with the possibility to repeat the failing request.
39
+ - **[simulateKeyPress](#simulateKeyPress)** - simulate key press in the `keydown` handler.
40
+ - **[keyPressSimulator](#keyPressSimulator)** - simulate key press globally for the specific keys.
37
41
 
38
42
  ### addClass
39
43
  Adds a class to the element in the reference.
@@ -92,6 +96,21 @@ And returns `IDisplayToggler` interface with 4 functions:
92
96
  - `isVisible: () => boolean;` - returns true if the element is visible, false otherwise
93
97
  - `isHidden: () => boolean;` - returns true if the element is hidden, false otherwise
94
98
 
99
+ ### elementUtils
100
+ Various utils for HTMLElement such as visibility tests or element wrapping tests.
101
+
102
+ ### forceReflow
103
+ To force a DOM reflow on given DOM element. It can be needed for transitions
104
+ or other purposes.
105
+
106
+ It takes 1 param:
107
+ - `elementOrReference: HTMLElement | Reference<HTMLElement>` - DOM element or
108
+ reference to element on which reflow is called.
109
+
110
+ ```ts
111
+ forceReflow(elementRef);
112
+ ```
113
+
95
114
  ### generateUuid
96
115
  Returns an UUIDv4 according to RFC 4122, like ex. "123e4567-e89b-12d3-a456-426614174000".
97
116
 
@@ -334,3 +353,11 @@ const retryConfig = {
334
353
  const options = { ...xhrSendOptions, retryConfig };
335
354
  const response = await xhrSendRetry(url, options);
336
355
  ```
356
+
357
+ ### keyPressSimulator and simulateKeyPress
358
+ Modifies `keydown` event behavior to be similar to `keypress` and causes triggering `keydown` event only once
359
+ before the key is released. This is because `keypress` event is deprecated and it is not implemented
360
+ with the same behavior on all platforms.
361
+
362
+ - Use globally for the specific keys with `keyPressSimulator` util.
363
+ - Use locally in the `keydown` handler with `simulateKeyPress` util.