react-native-external-keyboard 0.9.1 → 1.0.0

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 (372) hide show
  1. package/README.md +95 -600
  2. package/android/build.gradle +0 -18
  3. package/android/src/main/java/com/externalkeyboard/ExternalKeyboardViewPackage.java +24 -22
  4. package/android/src/main/java/com/externalkeyboard/events/EventHelper.java +10 -13
  5. package/android/src/main/java/com/externalkeyboard/helper/FocusHelper.java +1 -2
  6. package/android/src/main/java/com/externalkeyboard/services/FocusMemoryService.java +64 -0
  7. package/android/src/main/java/com/externalkeyboard/services/KeyboardFocusService.java +41 -0
  8. package/android/src/main/java/com/externalkeyboard/services/KeyboardService.java +4 -13
  9. package/android/src/main/java/com/externalkeyboard/views/ExternalKeyboardView/ExternalKeyboardView.java +2 -8
  10. package/android/src/main/java/com/externalkeyboard/views/ExternalKeyboardView/ExternalKeyboardViewManager.java +20 -13
  11. package/android/src/main/java/com/externalkeyboard/views/TextInputFocusWrapper/TextInputFocusWrapper.java +99 -21
  12. package/android/src/main/java/com/externalkeyboard/views/TextInputFocusWrapper/TextInputFocusWrapperManager.java +11 -0
  13. package/android/src/main/java/com/externalkeyboard/views/base/FocusHighlightBase.java +11 -5
  14. package/android/src/main/java/com/externalkeyboard/views/base/FocusableBase.java +36 -0
  15. package/android/src/main/java/com/externalkeyboard/views/base/keyboard/ViewFocusChangeBase.java +2 -3
  16. package/android/src/main/java/com/externalkeyboard/views/base/keyboard/ViewFocusRequestBase.java +10 -61
  17. package/android/src/newarch/ExternalKeyboardLockViewManagerInterface.java +11 -0
  18. package/android/src/newarch/ExternalKeyboardLockViewManagerSpec.java +0 -1
  19. package/android/src/newarch/ExternalKeyboardViewManagerInterface.java +42 -0
  20. package/android/src/newarch/ExternalKeyboardViewManagerSpec.java +0 -1
  21. package/android/src/newarch/KeyboardFocusGroupManagerInterface.java +12 -0
  22. package/android/src/newarch/KeyboardFocusGroupManagerSpec.java +0 -1
  23. package/android/src/newarch/TextInputFocusWrapperManagerInterface.java +34 -0
  24. package/android/src/newarch/TextInputFocusWrapperManagerSpec.java +0 -10
  25. package/android/src/newarch/helper/ReactNativeEventDispatcher.java +28 -0
  26. package/android/src/oldarch/ExternalKeyboardViewManagerSpec.java +6 -4
  27. package/android/src/oldarch/TextInputFocusWrapperManagerSpec.java +4 -0
  28. package/android/src/oldarch/helper/ReactNativeEventDispatcher.java +15 -0
  29. package/ios/Delegates/RNCEKVFocusDelegate/RNCEKVFocusDelegate.mm +1 -1
  30. package/ios/Delegates/RNCEKVFocusDelegate/RNCEKVFocusProtocol.h +1 -1
  31. package/ios/Delegates/RNCEKVHaloDelegate/RNCEKVHaloDelegate.h +2 -1
  32. package/ios/Delegates/RNCEKVHaloDelegate/RNCEKVHaloDelegate.mm +41 -5
  33. package/ios/Delegates/RNCEKVHaloDelegate/RNCEKVHaloProtocol.h +1 -0
  34. package/ios/Extensions/RCTCustomScrollView+RNCEKVExternalKeyboard.mm +5 -6
  35. package/ios/Extensions/RCTEnhancedScrollView+RNCEKVExternalKeyboard.mm +8 -9
  36. package/ios/Extensions/RCTTextInputComponentView+RNCEKVExternalKeyboard.mm +1 -1
  37. package/ios/Extensions/RCTViewComponentView+RNCEKVExternalKeyboard.h +0 -1
  38. package/ios/Extensions/RCTViewComponentView+RNCEKVExternalKeyboard.mm +16 -4
  39. package/ios/Extensions/UIViewController+RNCEKVExternalKeyboard.mm +7 -10
  40. package/ios/Helpers/RNCEKVNativeProps/RNCEKVNativeProps.h +4 -4
  41. package/ios/Helpers/RNCEKVSwizzleInstanceMethod/RNCEKVSwizzleInstanceMethod.h +19 -0
  42. package/ios/Protocols/RNCEKVCustomFocusEffectProtocol.h +1 -1
  43. package/ios/Services/RNCEKVFocusMemoryService.h +39 -0
  44. package/ios/Services/RNCEKVFocusMemoryService.mm +42 -0
  45. package/ios/Services/RNCEKVKeyboardFocusService.h +28 -0
  46. package/ios/Services/RNCEKVKeyboardFocusService.mm +54 -0
  47. package/ios/Views/Base/FocusChange/RNCEKVViewFocusChangeBase.h +2 -0
  48. package/ios/Views/Base/FocusChange/RNCEKVViewFocusChangeBase.mm +12 -10
  49. package/ios/Views/Base/FocusRequest/RNCEKVViewFocusRequestBase.h +1 -1
  50. package/ios/Views/Base/FocusRequest/RNCEKVViewFocusRequestBase.mm +6 -17
  51. package/ios/Views/Base/KeyboardHallo/RNCEKVExternalKeyboardHalloBase.h +1 -0
  52. package/ios/Views/Base/KeyboardHallo/RNCEKVExternalKeyboardHalloBase.mm +146 -6
  53. package/ios/Views/Base/ViewGroup/RNCEKVViewGroupBase.h +2 -0
  54. package/ios/Views/Base/ViewGroup/RNCEKVViewGroupBase.mm +4 -0
  55. package/ios/Views/RNCEKVExternalKeyboardView/RNCEKVExternalKeyboardView.h +1 -1
  56. package/ios/Views/RNCEKVExternalKeyboardView/RNCEKVExternalKeyboardView.mm +8 -4
  57. package/ios/Views/RNCEKVExternalKeyboardView/RNCEKVExternalKeyboardViewManager.mm +22 -11
  58. package/ios/Views/RNCEKVTextInputFocusWrapper/RNCEKVTextInputFocusWrapper.mm +17 -0
  59. package/ios/Views/RNCEKVTextInputFocusWrapper/RNCEKVTextInputFocusWrapperManager.mm +12 -0
  60. package/lib/commonjs/components/BaseKeyboardView/BaseKeyboardView.js +67 -65
  61. package/lib/commonjs/components/BaseKeyboardView/BaseKeyboardView.js.map +1 -1
  62. package/lib/commonjs/components/KeyboardExtendedInput/KeyboardExtendedInput.js +49 -97
  63. package/lib/commonjs/components/KeyboardExtendedInput/KeyboardExtendedInput.js.map +1 -1
  64. package/lib/commonjs/components/KeyboardFocusGroup/KeyboardFocusGroup.android.js.map +1 -1
  65. package/lib/commonjs/components/KeyboardFocusGroup/KeyboardFocusGroup.ios.js.map +1 -1
  66. package/lib/commonjs/components/KeyboardFocusGroup/KeyboardFocusGroup.js.map +1 -1
  67. package/lib/commonjs/components/{KeyboardExtendedInput/KeyboardExtendedInput.types.js → KeyboardFocusGroup/KeyboardFocusGroup.types.js} +1 -1
  68. package/lib/commonjs/components/KeyboardFocusGroup/KeyboardFocusGroup.types.js.map +1 -0
  69. package/lib/commonjs/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.js +2 -1
  70. package/lib/commonjs/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.js.map +1 -1
  71. package/lib/commonjs/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.js +2 -1
  72. package/lib/commonjs/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.js.map +1 -1
  73. package/lib/commonjs/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.js +2 -1
  74. package/lib/commonjs/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.js.map +1 -1
  75. package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.js +14 -51
  76. package/lib/commonjs/components/KeyboardFocusView/KeyboardFocusView.js.map +1 -1
  77. package/lib/commonjs/components/index.js +47 -0
  78. package/lib/commonjs/components/index.js.map +1 -1
  79. package/lib/commonjs/index.js +37 -19
  80. package/lib/commonjs/index.js.map +1 -1
  81. package/lib/commonjs/nativeSpec/ExternalKeyboardLockViewNativeComponent.ts +1 -3
  82. package/lib/commonjs/nativeSpec/ExternalKeyboardViewNativeComponent.ts +12 -9
  83. package/lib/commonjs/nativeSpec/KeyboardFocusGroupNativeComponent.ts +5 -3
  84. package/lib/commonjs/nativeSpec/TextInputFocusWrapperNativeComponent.ts +7 -3
  85. package/lib/commonjs/types/KeyboardFocusLock.types.js +13 -0
  86. package/lib/commonjs/types/KeyboardFocusLock.types.js.map +1 -1
  87. package/lib/commonjs/types/baseKeyboardView.types.js +6 -0
  88. package/lib/commonjs/types/baseKeyboardView.types.js.map +1 -0
  89. package/lib/commonjs/types/{FocusStyle.js → focus.types.js} +1 -1
  90. package/lib/commonjs/types/{FocusStyle.js.map → focus.types.js.map} +1 -1
  91. package/lib/commonjs/types/focusOrder.types.js +33 -0
  92. package/lib/commonjs/types/focusOrder.types.js.map +1 -0
  93. package/lib/commonjs/types/{WithKeyboardFocus.js → focusStyle.types.js} +1 -1
  94. package/lib/commonjs/types/{WithKeyboardFocus.js.map → focusStyle.types.js.map} +1 -1
  95. package/lib/commonjs/types/index.js +18 -0
  96. package/lib/commonjs/types/index.js.map +1 -1
  97. package/lib/commonjs/types/keyPress.types.js +6 -0
  98. package/lib/{module/types/WithKeyboardFocus.js.map → commonjs/types/keyPress.types.js.map} +1 -1
  99. package/lib/commonjs/types/keyboardInput.types.js +6 -0
  100. package/lib/commonjs/types/keyboardInput.types.js.map +1 -0
  101. package/lib/commonjs/types/withKeyboardFocus.types.js +6 -0
  102. package/lib/commonjs/types/withKeyboardFocus.types.js.map +1 -0
  103. package/lib/commonjs/utils/mapLockFocus.js +37 -0
  104. package/lib/commonjs/utils/mapLockFocus.js.map +1 -0
  105. package/lib/commonjs/utils/useFocusStyle.js +4 -21
  106. package/lib/commonjs/utils/useFocusStyle.js.map +1 -1
  107. package/lib/commonjs/utils/useKeyboardFocusContainer.js +79 -0
  108. package/lib/commonjs/utils/useKeyboardFocusContainer.js.map +1 -0
  109. package/lib/commonjs/utils/useKeyboardPress/useKeyboardPress.android.js +4 -7
  110. package/lib/commonjs/utils/useKeyboardPress/useKeyboardPress.android.js.map +1 -1
  111. package/lib/commonjs/utils/useKeyboardPress/useKeyboardPress.ios.js +3 -6
  112. package/lib/commonjs/utils/useKeyboardPress/useKeyboardPress.ios.js.map +1 -1
  113. package/lib/commonjs/utils/useKeyboardPress/useKeyboardPress.js +9 -7
  114. package/lib/commonjs/utils/useKeyboardPress/useKeyboardPress.js.map +1 -1
  115. package/lib/commonjs/utils/useKeyboardPressState.js +65 -0
  116. package/lib/commonjs/utils/useKeyboardPressState.js.map +1 -0
  117. package/lib/commonjs/utils/useOnFocusChange.js +1 -1
  118. package/lib/commonjs/utils/useOnFocusChange.js.map +1 -1
  119. package/lib/commonjs/utils/useOrderValidation.js +35 -0
  120. package/lib/commonjs/utils/useOrderValidation.js.map +1 -0
  121. package/lib/commonjs/utils/useRenderedChildren.js +34 -0
  122. package/lib/commonjs/utils/useRenderedChildren.js.map +1 -0
  123. package/lib/commonjs/utils/useWrappedOrderProps.js +35 -0
  124. package/lib/commonjs/utils/useWrappedOrderProps.js.map +1 -0
  125. package/lib/commonjs/utils/withKeyboardFocus.js +81 -96
  126. package/lib/commonjs/utils/withKeyboardFocus.js.map +1 -1
  127. package/lib/module/components/BaseKeyboardView/BaseKeyboardView.js +57 -55
  128. package/lib/module/components/BaseKeyboardView/BaseKeyboardView.js.map +1 -1
  129. package/lib/module/components/KeyboardExtendedInput/KeyboardExtendedInput.js +51 -99
  130. package/lib/module/components/KeyboardExtendedInput/KeyboardExtendedInput.js.map +1 -1
  131. package/lib/module/components/KeyboardFocusGroup/KeyboardFocusGroup.android.js.map +1 -1
  132. package/lib/module/components/KeyboardFocusGroup/KeyboardFocusGroup.ios.js.map +1 -1
  133. package/lib/module/components/KeyboardFocusGroup/KeyboardFocusGroup.js.map +1 -1
  134. package/lib/module/components/KeyboardFocusGroup/KeyboardFocusGroup.types.js +4 -0
  135. package/lib/module/components/KeyboardFocusGroup/KeyboardFocusGroup.types.js.map +1 -0
  136. package/lib/module/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.js +2 -1
  137. package/lib/module/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.js.map +1 -1
  138. package/lib/module/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.js +2 -1
  139. package/lib/module/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.js.map +1 -1
  140. package/lib/module/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.js +2 -1
  141. package/lib/module/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.js.map +1 -1
  142. package/lib/module/components/KeyboardFocusView/KeyboardFocusView.js +16 -53
  143. package/lib/module/components/KeyboardFocusView/KeyboardFocusView.js.map +1 -1
  144. package/lib/module/components/index.js +5 -0
  145. package/lib/module/components/index.js.map +1 -1
  146. package/lib/module/index.js +20 -7
  147. package/lib/module/index.js.map +1 -1
  148. package/lib/module/nativeSpec/ExternalKeyboardLockViewNativeComponent.ts +1 -3
  149. package/lib/module/nativeSpec/ExternalKeyboardViewNativeComponent.ts +12 -9
  150. package/lib/module/nativeSpec/KeyboardFocusGroupNativeComponent.ts +5 -3
  151. package/lib/module/nativeSpec/TextInputFocusWrapperNativeComponent.ts +7 -3
  152. package/lib/module/types/KeyboardFocusLock.types.js +12 -1
  153. package/lib/module/types/KeyboardFocusLock.types.js.map +1 -1
  154. package/lib/module/types/baseKeyboardView.types.js +4 -0
  155. package/lib/module/types/baseKeyboardView.types.js.map +1 -0
  156. package/lib/module/types/focus.types.js +4 -0
  157. package/lib/module/types/{FocusStyle.js.map → focus.types.js.map} +1 -1
  158. package/lib/module/types/focusOrder.types.js +31 -0
  159. package/lib/module/types/focusOrder.types.js.map +1 -0
  160. package/lib/module/types/focusStyle.types.js +4 -0
  161. package/lib/module/types/focusStyle.types.js.map +1 -0
  162. package/lib/module/types/index.js +3 -0
  163. package/lib/module/types/index.js.map +1 -1
  164. package/lib/module/types/keyPress.types.js +4 -0
  165. package/lib/module/types/keyPress.types.js.map +1 -0
  166. package/lib/module/types/keyboardInput.types.js +4 -0
  167. package/lib/module/types/keyboardInput.types.js.map +1 -0
  168. package/lib/module/types/withKeyboardFocus.types.js +4 -0
  169. package/lib/module/types/withKeyboardFocus.types.js.map +1 -0
  170. package/lib/module/utils/mapLockFocus.js +32 -0
  171. package/lib/module/utils/mapLockFocus.js.map +1 -0
  172. package/lib/module/utils/useFocusStyle.js +4 -21
  173. package/lib/module/utils/useFocusStyle.js.map +1 -1
  174. package/lib/module/utils/useKeyboardFocusContainer.js +74 -0
  175. package/lib/module/utils/useKeyboardFocusContainer.js.map +1 -0
  176. package/lib/module/utils/useKeyboardPress/useKeyboardPress.android.js +4 -7
  177. package/lib/module/utils/useKeyboardPress/useKeyboardPress.android.js.map +1 -1
  178. package/lib/module/utils/useKeyboardPress/useKeyboardPress.ios.js +3 -6
  179. package/lib/module/utils/useKeyboardPress/useKeyboardPress.ios.js.map +1 -1
  180. package/lib/module/utils/useKeyboardPress/useKeyboardPress.js +9 -7
  181. package/lib/module/utils/useKeyboardPress/useKeyboardPress.js.map +1 -1
  182. package/lib/module/utils/useKeyboardPressState.js +60 -0
  183. package/lib/module/utils/useKeyboardPressState.js.map +1 -0
  184. package/lib/module/utils/useOnFocusChange.js +1 -1
  185. package/lib/module/utils/useOnFocusChange.js.map +1 -1
  186. package/lib/module/utils/useOrderValidation.js +30 -0
  187. package/lib/module/utils/useOrderValidation.js.map +1 -0
  188. package/lib/module/utils/useRenderedChildren.js +29 -0
  189. package/lib/module/utils/useRenderedChildren.js.map +1 -0
  190. package/lib/module/utils/useWrappedOrderProps.js +30 -0
  191. package/lib/module/utils/useWrappedOrderProps.js.map +1 -0
  192. package/lib/module/utils/withKeyboardFocus.js +84 -99
  193. package/lib/module/utils/withKeyboardFocus.js.map +1 -1
  194. package/lib/typescript/src/components/BaseKeyboardView/BaseKeyboardView.d.ts +30 -10
  195. package/lib/typescript/src/components/BaseKeyboardView/BaseKeyboardView.d.ts.map +1 -1
  196. package/lib/typescript/src/components/KeyboardExtendedInput/KeyboardExtendedInput.d.ts +187 -12
  197. package/lib/typescript/src/components/KeyboardExtendedInput/KeyboardExtendedInput.d.ts.map +1 -1
  198. package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.android.d.ts +4 -146
  199. package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.android.d.ts.map +1 -1
  200. package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.d.ts +2 -12
  201. package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.d.ts.map +1 -1
  202. package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.ios.d.ts +4 -146
  203. package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.ios.d.ts.map +1 -1
  204. package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.types.d.ts +13 -0
  205. package/lib/typescript/src/components/KeyboardFocusGroup/KeyboardFocusGroup.types.d.ts.map +1 -0
  206. package/lib/typescript/src/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.d.ts +1 -1
  207. package/lib/typescript/src/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.d.ts.map +1 -1
  208. package/lib/typescript/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.d.ts +1 -1
  209. package/lib/typescript/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.d.ts.map +1 -1
  210. package/lib/typescript/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.d.ts +1 -1
  211. package/lib/typescript/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.d.ts.map +1 -1
  212. package/lib/typescript/src/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.d.ts +1 -1
  213. package/lib/typescript/src/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.d.ts.map +1 -1
  214. package/lib/typescript/src/components/KeyboardFocusView/KeyboardFocusView.d.ts +28 -18
  215. package/lib/typescript/src/components/KeyboardFocusView/KeyboardFocusView.d.ts.map +1 -1
  216. package/lib/typescript/src/components/Touchable/Pressable.d.ts +14 -14
  217. package/lib/typescript/src/components/Touchable/Pressable.d.ts.map +1 -1
  218. package/lib/typescript/src/components/index.d.ts +5 -0
  219. package/lib/typescript/src/components/index.d.ts.map +1 -1
  220. package/lib/typescript/src/index.d.ts +694 -9
  221. package/lib/typescript/src/index.d.ts.map +1 -1
  222. package/lib/typescript/src/nativeSpec/ExternalKeyboardLockViewNativeComponent.d.ts +2 -4
  223. package/lib/typescript/src/nativeSpec/ExternalKeyboardLockViewNativeComponent.d.ts.map +1 -1
  224. package/lib/typescript/src/nativeSpec/ExternalKeyboardViewNativeComponent.d.ts +6 -7
  225. package/lib/typescript/src/nativeSpec/ExternalKeyboardViewNativeComponent.d.ts.map +1 -1
  226. package/lib/typescript/src/nativeSpec/KeyboardFocusGroupNativeComponent.d.ts +2 -4
  227. package/lib/typescript/src/nativeSpec/KeyboardFocusGroupNativeComponent.d.ts.map +1 -1
  228. package/lib/typescript/src/nativeSpec/TextInputFocusWrapperNativeComponent.d.ts +4 -4
  229. package/lib/typescript/src/nativeSpec/TextInputFocusWrapperNativeComponent.d.ts.map +1 -1
  230. package/lib/typescript/src/types/KeyboardFocusLock.types.d.ts +15 -1
  231. package/lib/typescript/src/types/KeyboardFocusLock.types.d.ts.map +1 -1
  232. package/lib/typescript/src/types/KeyboardFocusView.types.d.ts +16 -14
  233. package/lib/typescript/src/types/KeyboardFocusView.types.d.ts.map +1 -1
  234. package/lib/typescript/src/types/baseKeyboardView.types.d.ts +119 -0
  235. package/lib/typescript/src/types/baseKeyboardView.types.d.ts.map +1 -0
  236. package/lib/typescript/src/types/focus.types.d.ts +35 -0
  237. package/lib/typescript/src/types/focus.types.d.ts.map +1 -0
  238. package/lib/typescript/src/types/focusOrder.types.d.ts +57 -0
  239. package/lib/typescript/src/types/focusOrder.types.d.ts.map +1 -0
  240. package/lib/typescript/src/types/focusStyle.types.d.ts +11 -0
  241. package/lib/typescript/src/types/focusStyle.types.d.ts.map +1 -0
  242. package/lib/typescript/src/types/index.d.ts +11 -2
  243. package/lib/typescript/src/types/index.d.ts.map +1 -1
  244. package/lib/typescript/src/types/keyPress.types.d.ts +7 -0
  245. package/lib/typescript/src/types/keyPress.types.d.ts.map +1 -0
  246. package/lib/typescript/src/types/keyboardInput.types.d.ts +53 -0
  247. package/lib/typescript/src/types/keyboardInput.types.d.ts.map +1 -0
  248. package/lib/typescript/src/types/withKeyboardFocus.types.d.ts +109 -0
  249. package/lib/typescript/src/types/withKeyboardFocus.types.d.ts.map +1 -0
  250. package/lib/typescript/src/utils/mapLockFocus.d.ts +3 -0
  251. package/lib/typescript/src/utils/mapLockFocus.d.ts.map +1 -0
  252. package/lib/typescript/src/utils/useFocusStyle.d.ts +26 -34
  253. package/lib/typescript/src/utils/useFocusStyle.d.ts.map +1 -1
  254. package/lib/typescript/src/utils/useKeyboardFocusContainer.d.ts +898 -0
  255. package/lib/typescript/src/utils/useKeyboardFocusContainer.d.ts.map +1 -0
  256. package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.android.d.ts +2 -2
  257. package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.android.d.ts.map +1 -1
  258. package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.d.ts +4 -3
  259. package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.d.ts.map +1 -1
  260. package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.ios.d.ts +3 -3
  261. package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.ios.d.ts.map +1 -1
  262. package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.types.d.ts +1 -2
  263. package/lib/typescript/src/utils/useKeyboardPress/useKeyboardPress.types.d.ts.map +1 -1
  264. package/lib/typescript/src/utils/useKeyboardPressState.d.ts +29 -0
  265. package/lib/typescript/src/utils/useKeyboardPressState.d.ts.map +1 -0
  266. package/lib/typescript/src/utils/useOnFocusChange.d.ts +3 -3
  267. package/lib/typescript/src/utils/useOnFocusChange.d.ts.map +1 -1
  268. package/lib/typescript/src/utils/useOrderValidation.d.ts +8 -0
  269. package/lib/typescript/src/utils/useOrderValidation.d.ts.map +1 -0
  270. package/lib/typescript/src/utils/useRenderedChildren.d.ts +18 -0
  271. package/lib/typescript/src/utils/useRenderedChildren.d.ts.map +1 -0
  272. package/lib/typescript/src/utils/useWrappedOrderProps.d.ts +13 -0
  273. package/lib/typescript/src/utils/useWrappedOrderProps.d.ts.map +1 -0
  274. package/lib/typescript/src/utils/withKeyboardFocus.d.ts +3 -4
  275. package/lib/typescript/src/utils/withKeyboardFocus.d.ts.map +1 -1
  276. package/package.json +4 -2
  277. package/src/components/BaseKeyboardView/BaseKeyboardView.tsx +74 -94
  278. package/src/components/KeyboardExtendedInput/KeyboardExtendedInput.tsx +49 -149
  279. package/src/components/KeyboardFocusGroup/KeyboardFocusGroup.android.tsx +23 -32
  280. package/src/components/KeyboardFocusGroup/KeyboardFocusGroup.ios.tsx +32 -41
  281. package/src/components/KeyboardFocusGroup/KeyboardFocusGroup.tsx +3 -14
  282. package/src/components/KeyboardFocusGroup/KeyboardFocusGroup.types.ts +15 -0
  283. package/src/components/KeyboardFocusLock/FocusFrame/FocusFrame.android.tsx +2 -2
  284. package/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.android.tsx +2 -2
  285. package/src/components/KeyboardFocusLock/FocusTrap/FocusTrap.tsx +1 -1
  286. package/src/components/KeyboardFocusLock/KeyboardFocusLockBase/KeyboardFocusLockBase.tsx +2 -2
  287. package/src/components/KeyboardFocusView/KeyboardFocusView.tsx +29 -68
  288. package/src/components/Touchable/Pressable.tsx +2 -2
  289. package/src/components/index.ts +12 -0
  290. package/src/index.tsx +44 -32
  291. package/src/nativeSpec/ExternalKeyboardLockViewNativeComponent.ts +1 -3
  292. package/src/nativeSpec/ExternalKeyboardViewNativeComponent.ts +12 -9
  293. package/src/nativeSpec/KeyboardFocusGroupNativeComponent.ts +5 -3
  294. package/src/nativeSpec/TextInputFocusWrapperNativeComponent.ts +7 -3
  295. package/src/types/KeyboardFocusLock.types.ts +16 -1
  296. package/src/types/KeyboardFocusView.types.ts +17 -18
  297. package/src/types/baseKeyboardView.types.ts +122 -0
  298. package/src/types/focus.types.ts +40 -0
  299. package/src/types/focusOrder.types.ts +59 -0
  300. package/src/types/{FocusStyle.ts → focusStyle.types.ts} +5 -0
  301. package/src/types/index.ts +32 -2
  302. package/src/types/keyPress.types.ts +8 -0
  303. package/src/types/keyboardInput.types.ts +81 -0
  304. package/src/types/withKeyboardFocus.types.ts +178 -0
  305. package/src/utils/mapLockFocus.ts +31 -0
  306. package/src/utils/useFocusStyle.tsx +13 -41
  307. package/src/utils/useKeyboardFocusContainer.ts +102 -0
  308. package/src/utils/useKeyboardPress/useKeyboardPress.android.ts +4 -7
  309. package/src/utils/useKeyboardPress/useKeyboardPress.ios.ts +3 -6
  310. package/src/utils/useKeyboardPress/useKeyboardPress.ts +9 -7
  311. package/src/utils/useKeyboardPress/useKeyboardPress.types.ts +1 -2
  312. package/src/utils/useKeyboardPressState.ts +81 -0
  313. package/src/utils/useOnFocusChange.ts +4 -7
  314. package/src/utils/useOrderValidation.ts +74 -0
  315. package/src/utils/useRenderedChildren.ts +42 -0
  316. package/src/utils/useWrappedOrderProps.ts +48 -0
  317. package/src/utils/withKeyboardFocus.tsx +105 -125
  318. package/lib/commonjs/components/KeyboardExtendedInput/KeyboardExtendedInput.types.js.map +0 -1
  319. package/lib/commonjs/components/KeyboardFocusView/hooks/index.js +0 -13
  320. package/lib/commonjs/components/KeyboardFocusView/hooks/index.js.map +0 -1
  321. package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/index.js +0 -13
  322. package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/index.js.map +0 -1
  323. package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js +0 -33
  324. package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js.map +0 -1
  325. package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.js +0 -39
  326. package/lib/commonjs/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.js.map +0 -1
  327. package/lib/commonjs/components/RenderPropComponent/RenderPropComponent.js +0 -23
  328. package/lib/commonjs/components/RenderPropComponent/RenderPropComponent.js.map +0 -1
  329. package/lib/commonjs/types/BaseKeyboardView.js +0 -18
  330. package/lib/commonjs/types/BaseKeyboardView.js.map +0 -1
  331. package/lib/module/components/KeyboardExtendedInput/KeyboardExtendedInput.types.js +0 -4
  332. package/lib/module/components/KeyboardExtendedInput/KeyboardExtendedInput.types.js.map +0 -1
  333. package/lib/module/components/KeyboardFocusView/hooks/index.js +0 -4
  334. package/lib/module/components/KeyboardFocusView/hooks/index.js.map +0 -1
  335. package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/index.js +0 -4
  336. package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/index.js.map +0 -1
  337. package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js +0 -28
  338. package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.js.map +0 -1
  339. package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.js +0 -34
  340. package/lib/module/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.js.map +0 -1
  341. package/lib/module/components/RenderPropComponent/RenderPropComponent.js +0 -17
  342. package/lib/module/components/RenderPropComponent/RenderPropComponent.js.map +0 -1
  343. package/lib/module/types/BaseKeyboardView.js +0 -14
  344. package/lib/module/types/BaseKeyboardView.js.map +0 -1
  345. package/lib/module/types/FocusStyle.js +0 -4
  346. package/lib/module/types/WithKeyboardFocus.js +0 -4
  347. package/lib/typescript/src/components/KeyboardExtendedInput/KeyboardExtendedInput.types.d.ts +0 -45
  348. package/lib/typescript/src/components/KeyboardExtendedInput/KeyboardExtendedInput.types.d.ts.map +0 -1
  349. package/lib/typescript/src/components/KeyboardFocusView/hooks/index.d.ts +0 -2
  350. package/lib/typescript/src/components/KeyboardFocusView/hooks/index.d.ts.map +0 -1
  351. package/lib/typescript/src/components/KeyboardFocusView/hooks/useFocusStyle/index.d.ts +0 -2
  352. package/lib/typescript/src/components/KeyboardFocusView/hooks/useFocusStyle/index.d.ts.map +0 -1
  353. package/lib/typescript/src/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.d.ts +0 -175
  354. package/lib/typescript/src/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.d.ts.map +0 -1
  355. package/lib/typescript/src/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.d.ts +0 -181
  356. package/lib/typescript/src/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.d.ts.map +0 -1
  357. package/lib/typescript/src/components/RenderPropComponent/RenderPropComponent.d.ts +0 -6
  358. package/lib/typescript/src/components/RenderPropComponent/RenderPropComponent.d.ts.map +0 -1
  359. package/lib/typescript/src/types/BaseKeyboardView.d.ts +0 -70
  360. package/lib/typescript/src/types/BaseKeyboardView.d.ts.map +0 -1
  361. package/lib/typescript/src/types/FocusStyle.d.ts +0 -6
  362. package/lib/typescript/src/types/FocusStyle.d.ts.map +0 -1
  363. package/lib/typescript/src/types/WithKeyboardFocus.d.ts +0 -47
  364. package/lib/typescript/src/types/WithKeyboardFocus.d.ts.map +0 -1
  365. package/src/components/KeyboardExtendedInput/KeyboardExtendedInput.types.ts +0 -73
  366. package/src/components/KeyboardFocusView/hooks/index.ts +0 -1
  367. package/src/components/KeyboardFocusView/hooks/useFocusStyle/index.ts +0 -1
  368. package/src/components/KeyboardFocusView/hooks/useFocusStyle/useFocusStyle.ts +0 -34
  369. package/src/components/KeyboardFocusView/hooks/useFocusStyle/useTintStyle.ts +0 -41
  370. package/src/components/RenderPropComponent/RenderPropComponent.tsx +0 -18
  371. package/src/types/BaseKeyboardView.ts +0 -74
  372. package/src/types/WithKeyboardFocus.ts +0 -115
@@ -12,7 +12,7 @@ Object.defineProperty(exports, "BaseKeyboardView", {
12
12
  Object.defineProperty(exports, "ExternalKeyboardView", {
13
13
  enumerable: true,
14
14
  get: function () {
15
- return _components.ExternalKeyboardView;
15
+ return _components.BaseKeyboardView;
16
16
  }
17
17
  });
18
18
  Object.defineProperty(exports, "ExternalKeyboardViewNative", {
@@ -21,35 +21,35 @@ Object.defineProperty(exports, "ExternalKeyboardViewNative", {
21
21
  return _nativeSpec.ExternalKeyboardViewNative;
22
22
  }
23
23
  });
24
- exports.Keyboard = exports.Focus = void 0;
24
+ exports.Keyboard = exports.K = exports.Focus = void 0;
25
25
  Object.defineProperty(exports, "KeyboardExtendedBaseView", {
26
26
  enumerable: true,
27
27
  get: function () {
28
- return _components.KeyboardExtendedBaseView;
28
+ return _components.BaseKeyboardView;
29
29
  }
30
30
  });
31
31
  Object.defineProperty(exports, "KeyboardExtendedInput", {
32
32
  enumerable: true,
33
33
  get: function () {
34
- return _KeyboardExtendedInput.KeyboardExtendedInput;
34
+ return _components.KeyboardExtendedInput;
35
35
  }
36
36
  });
37
37
  Object.defineProperty(exports, "KeyboardExtendedPressable", {
38
38
  enumerable: true,
39
39
  get: function () {
40
- return _Pressable.Pressable;
40
+ return _components.Pressable;
41
41
  }
42
42
  });
43
43
  Object.defineProperty(exports, "KeyboardExtendedView", {
44
44
  enumerable: true,
45
45
  get: function () {
46
- return _components.KeyboardExtendedView;
46
+ return _components.KeyboardFocusView;
47
47
  }
48
48
  });
49
49
  Object.defineProperty(exports, "KeyboardFocusGroup", {
50
50
  enumerable: true,
51
51
  get: function () {
52
- return _KeyboardFocusGroup.KeyboardFocusGroup;
52
+ return _components.KeyboardFocusGroup;
53
53
  }
54
54
  });
55
55
  Object.defineProperty(exports, "KeyboardFocusView", {
@@ -64,6 +64,12 @@ Object.defineProperty(exports, "KeyboardOrderFocusGroup", {
64
64
  return _OrderFocusContext.KeyboardOrderFocusGroup;
65
65
  }
66
66
  });
67
+ Object.defineProperty(exports, "LockComponentType", {
68
+ enumerable: true,
69
+ get: function () {
70
+ return _types.LockComponentType;
71
+ }
72
+ });
67
73
  Object.defineProperty(exports, "OrderFocusGroupContext", {
68
74
  enumerable: true,
69
75
  get: function () {
@@ -73,13 +79,13 @@ Object.defineProperty(exports, "OrderFocusGroupContext", {
73
79
  Object.defineProperty(exports, "Pressable", {
74
80
  enumerable: true,
75
81
  get: function () {
76
- return _Pressable.Pressable;
82
+ return _components.Pressable;
77
83
  }
78
84
  });
79
85
  Object.defineProperty(exports, "TextInput", {
80
86
  enumerable: true,
81
87
  get: function () {
82
- return _KeyboardExtendedInput.KeyboardExtendedInput;
88
+ return _components.KeyboardExtendedInput;
83
89
  }
84
90
  });
85
91
  Object.defineProperty(exports, "TextInputFocusWrapperNative", {
@@ -106,21 +112,33 @@ Object.defineProperty(exports, "withKeyboardFocus", {
106
112
  return _withKeyboardFocus.withKeyboardFocus;
107
113
  }
108
114
  });
109
- var _FocusFrame = require("./components/KeyboardFocusLock/FocusFrame/FocusFrame");
110
- var _FocusTrap = require("./components/KeyboardFocusLock/FocusTrap/FocusTrap");
111
- var _nativeSpec = require("./nativeSpec");
112
115
  var _components = require("./components");
113
- var _Pressable = require("./components/Touchable/Pressable");
114
- var _KeyboardExtendedInput = require("./components/KeyboardExtendedInput/KeyboardExtendedInput");
115
- var _KeyboardFocusGroup = require("./components/KeyboardFocusGroup/KeyboardFocusGroup");
116
+ var Keyboard = _interopRequireWildcard(require("./modules/Keyboard"));
117
+ exports.Keyboard = Keyboard;
118
+ var _nativeSpec = require("./nativeSpec");
119
+ var _types = require("./types");
116
120
  var _withKeyboardFocus = require("./utils/withKeyboardFocus");
117
121
  var _IsViewFocusedContext = require("./context/IsViewFocusedContext");
118
122
  var _OrderFocusContext = require("./context/OrderFocusContext");
119
- var Keyboard = _interopRequireWildcard(require("./modules/Keyboard"));
120
- exports.Keyboard = Keyboard;
121
123
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function (e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != typeof e && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (const t in e) "default" !== t && {}.hasOwnProperty.call(e, t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, t)) && (i.get || i.set) ? o(f, t, i) : f[t] = e[t]); return f; })(e, t); }
124
+ // Native spec
125
+
126
+ // Components
127
+
128
+ // Types
129
+
130
+ // Hooks & context
131
+
132
+ // Modules
133
+
134
+ // Namespaces
122
135
  const Focus = exports.Focus = {
123
- Frame: _FocusFrame.FocusFrame,
124
- Trap: _FocusTrap.FocusTrap
136
+ Frame: _components.FocusFrame,
137
+ Trap: _components.FocusTrap
138
+ };
139
+ const K = exports.K = {
140
+ Input: _components.KeyboardExtendedInput,
141
+ View: _components.KeyboardFocusView,
142
+ Pressable: _components.Pressable
125
143
  };
126
144
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["_FocusFrame","require","_FocusTrap","_nativeSpec","_components","_Pressable","_KeyboardExtendedInput","_KeyboardFocusGroup","_withKeyboardFocus","_IsViewFocusedContext","_OrderFocusContext","Keyboard","_interopRequireWildcard","exports","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Focus","Frame","FocusFrame","Trap","FocusTrap"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AACA,IAAAC,UAAA,GAAAD,OAAA;AAEA,IAAAE,WAAA,GAAAF,OAAA;AAmBA,IAAAG,WAAA,GAAAH,OAAA;AAOA,IAAAI,UAAA,GAAAJ,OAAA;AAMA,IAAAK,sBAAA,GAAAL,OAAA;AAUA,IAAAM,mBAAA,GAAAN,OAAA;AACA,IAAAO,kBAAA,GAAAP,OAAA;AACA,IAAAQ,qBAAA,GAAAR,OAAA;AACA,IAAAS,kBAAA,GAAAT,OAAA;AAKA,IAAAU,QAAA,GAAAC,uBAAA,CAAAX,OAAA;AAA+CY,OAAA,CAAAF,QAAA,GAAAA,QAAA;AAAA,SAAAC,wBAAAE,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAJ,uBAAA,YAAAA,CAAAE,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AAGxC,MAAMkB,KAAK,GAAApB,OAAA,CAAAoB,KAAA,GAAG;EACnBC,KAAK,EAAEC,sBAAU;EACjBC,IAAI,EAAEC;AACR,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["_components","require","Keyboard","_interopRequireWildcard","exports","_nativeSpec","_types","_withKeyboardFocus","_IsViewFocusedContext","_OrderFocusContext","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","Focus","Frame","FocusFrame","Trap","FocusTrap","K","Input","KeyboardExtendedInput","View","KeyboardFocusView","Pressable"],"sourceRoot":"../../src","sources":["index.tsx"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,WAAA,GAAAC,OAAA;AAOA,IAAAC,QAAA,GAAAC,uBAAA,CAAAF,OAAA;AAA+CG,OAAA,CAAAF,QAAA,GAAAA,QAAA;AAG/C,IAAAG,WAAA,GAAAJ,OAAA;AAqBA,IAAAK,MAAA,GAAAL,OAAA;AAmBA,IAAAM,kBAAA,GAAAN,OAAA;AACA,IAAAO,qBAAA,GAAAP,OAAA;AACA,IAAAQ,kBAAA,GAAAR,OAAA;AAIqC,SAAAE,wBAAAO,CAAA,EAAAC,CAAA,6BAAAC,OAAA,MAAAC,CAAA,OAAAD,OAAA,IAAAE,CAAA,OAAAF,OAAA,YAAAT,uBAAA,YAAAA,CAAAO,CAAA,EAAAC,CAAA,SAAAA,CAAA,IAAAD,CAAA,IAAAA,CAAA,CAAAK,UAAA,SAAAL,CAAA,MAAAM,CAAA,EAAAC,CAAA,EAAAC,CAAA,KAAAC,SAAA,QAAAC,OAAA,EAAAV,CAAA,iBAAAA,CAAA,uBAAAA,CAAA,yBAAAA,CAAA,SAAAQ,CAAA,MAAAF,CAAA,GAAAL,CAAA,GAAAG,CAAA,GAAAD,CAAA,QAAAG,CAAA,CAAAK,GAAA,CAAAX,CAAA,UAAAM,CAAA,CAAAM,GAAA,CAAAZ,CAAA,GAAAM,CAAA,CAAAO,GAAA,CAAAb,CAAA,EAAAQ,CAAA,gBAAAP,CAAA,IAAAD,CAAA,gBAAAC,CAAA,OAAAa,cAAA,CAAAC,IAAA,CAAAf,CAAA,EAAAC,CAAA,OAAAM,CAAA,IAAAD,CAAA,GAAAU,MAAA,CAAAC,cAAA,KAAAD,MAAA,CAAAE,wBAAA,CAAAlB,CAAA,EAAAC,CAAA,OAAAM,CAAA,CAAAK,GAAA,IAAAL,CAAA,CAAAM,GAAA,IAAAP,CAAA,CAAAE,CAAA,EAAAP,CAAA,EAAAM,CAAA,IAAAC,CAAA,CAAAP,CAAA,IAAAD,CAAA,CAAAC,CAAA,WAAAO,CAAA,KAAAR,CAAA,EAAAC,CAAA;AA/CrC;;AAOA;;AAcA;;AAmBA;;AASA;;AAGA;AACO,MAAMkB,KAAK,GAAAzB,OAAA,CAAAyB,KAAA,GAAG;EACnBC,KAAK,EAAEC,sBAAU;EACjBC,IAAI,EAAEC;AACR,CAAC;AAEM,MAAMC,CAAC,GAAA9B,OAAA,CAAA8B,CAAA,GAAG;EACfC,KAAK,EAAEC,iCAAqB;EAC5BC,IAAI,EAAEC,6BAAiB;EACvBC,SAAS,EAATA;AACF,CAAC","ignoreList":[]}
@@ -1,7 +1,5 @@
1
- import type { ViewProps } from 'react-native';
1
+ import { codegenNativeComponent, type ViewProps } from 'react-native';
2
2
  import type { Int32 } from 'react-native/Libraries/Types/CodegenTypes';
3
- // eslint-disable-next-line @react-native/no-deep-imports
4
- import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
5
3
 
6
4
  export interface ExternalKeyboardLockViewNativeComponentProps
7
5
  extends ViewProps {
@@ -1,4 +1,9 @@
1
- import type { ColorValue, ViewProps } from 'react-native';
1
+ import {
2
+ codegenNativeComponent,
3
+ codegenNativeCommands,
4
+ type ColorValue,
5
+ type ViewProps,
6
+ } from 'react-native';
2
7
  import type {
3
8
  BubblingEventHandler,
4
9
  DirectEventHandler,
@@ -6,10 +11,6 @@ import type {
6
11
  Int32,
7
12
  } from 'react-native/Libraries/Types/CodegenTypes';
8
13
  import type { ComponentType } from 'react';
9
- // eslint-disable-next-line @react-native/no-deep-imports
10
- import codegenNativeCommands from 'react-native/Libraries/Utilities/codegenNativeCommands';
11
- // eslint-disable-next-line @react-native/no-deep-imports
12
- import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
13
14
 
14
15
  export type FocusChange = Readonly<{
15
16
  isFocused: boolean;
@@ -48,10 +49,10 @@ export interface ExternalKeyboardNativeProps extends ViewProps {
48
49
  haloCornerRadius?: Float;
49
50
  haloExpendX?: Float;
50
51
  haloExpendY?: Float;
52
+ roundedHaloFix?: boolean;
51
53
  tintColor?: ColorValue;
52
- group?: boolean;
54
+ focusableWrapper?: boolean;
53
55
  groupIdentifier?: string;
54
- enableA11yFocus?: boolean;
55
56
  screenAutoA11yFocus?: boolean;
56
57
  screenAutoA11yFocusDelay?: Int32;
57
58
  orderGroup?: string;
@@ -71,11 +72,13 @@ export interface ExternalKeyboardNativeProps extends ViewProps {
71
72
 
72
73
  export interface NativeCommands {
73
74
  // @ts-ignore
74
- focus: (viewRef: React.ElementRef<ComponentType>) => void;
75
+ rnekKeyboardFocus: (viewRef: React.ElementRef<ComponentType>) => void;
76
+ // @ts-ignore
77
+ rnekScreenReaderFocus: (viewRef: React.ElementRef<ComponentType>) => void;
75
78
  }
76
79
 
77
80
  export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
78
- supportedCommands: ['focus'],
81
+ supportedCommands: ['rnekKeyboardFocus', 'rnekScreenReaderFocus'],
79
82
  });
80
83
 
81
84
  export default codegenNativeComponent<ExternalKeyboardNativeProps>(
@@ -1,7 +1,9 @@
1
- import type { ViewProps, ColorValue } from 'react-native';
1
+ import {
2
+ codegenNativeComponent,
3
+ type ViewProps,
4
+ type ColorValue,
5
+ } from 'react-native';
2
6
  import type { DirectEventHandler } from 'react-native/Libraries/Types/CodegenTypes';
3
- // eslint-disable-next-line @react-native/no-deep-imports
4
- import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
5
7
 
6
8
  export type FocusChange = Readonly<{
7
9
  isFocused: boolean;
@@ -1,11 +1,13 @@
1
- import type { ViewProps, ColorValue } from 'react-native';
1
+ import {
2
+ codegenNativeComponent,
3
+ type ViewProps,
4
+ type ColorValue,
5
+ } from 'react-native';
2
6
  import type {
3
7
  DirectEventHandler,
4
8
  Float,
5
9
  Int32,
6
10
  } from 'react-native/Libraries/Types/CodegenTypes';
7
- // eslint-disable-next-line @react-native/no-deep-imports
8
- import codegenNativeComponent from 'react-native/Libraries/Utilities/codegenNativeComponent';
9
11
 
10
12
  export type FocusChange = Readonly<{
11
13
  isFocused: boolean;
@@ -21,10 +23,12 @@ export interface TextInputFocusWrapperNativeComponent extends ViewProps {
21
23
  focusType?: Int32;
22
24
  blurType?: Int32;
23
25
  canBeFocused?: boolean;
26
+ hasOnFocusChanged?: boolean;
24
27
  haloEffect?: boolean;
25
28
  haloCornerRadius?: Float;
26
29
  haloExpendX?: Float;
27
30
  haloExpendY?: Float;
31
+ roundedHaloFix?: boolean;
28
32
  tintColor?: ColorValue;
29
33
  blurOnSubmit?: boolean;
30
34
  multiline?: boolean;
@@ -3,4 +3,17 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.LockComponentType = void 0;
7
+ /**
8
+ * Native role for a KeyboardFocusLock component on Android.
9
+ * iOS does not consume this value.
10
+ *
11
+ * Values must match the constants in
12
+ * `android/src/main/java/com/externalkeyboard/views/ExternalKeyboardLockView/ExternalKeyboardLockView.java`.
13
+ */
14
+ let LockComponentType = exports.LockComponentType = /*#__PURE__*/function (LockComponentType) {
15
+ LockComponentType[LockComponentType["Trap"] = 0] = "Trap";
16
+ LockComponentType[LockComponentType["Frame"] = 1] = "Frame";
17
+ return LockComponentType;
18
+ }({});
6
19
  //# sourceMappingURL=KeyboardFocusLock.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/KeyboardFocusLock.types.ts"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":["LockComponentType","exports"],"sourceRoot":"../../../src","sources":["types/KeyboardFocusLock.types.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AANA,IAOYA,iBAAiB,GAAAC,OAAA,CAAAD,iBAAA,0BAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAjBA,iBAAiB,CAAjBA,iBAAiB;EAAA,OAAjBA,iBAAiB;AAAA","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=baseKeyboardView.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/baseKeyboardView.types.ts"],"mappings":"","ignoreList":[]}
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- //# sourceMappingURL=FocusStyle.js.map
6
+ //# sourceMappingURL=focus.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/FocusStyle.ts"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/focus.types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,33 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.LockFocusEnum = void 0;
7
+ /**
8
+ * Directions in which keyboard focus movement can be locked via {@link CommonFocusProps.lockFocus}.
9
+ *
10
+ * - `Up` / `Down` / `Left` / `Right` — block directional (arrow / DPad) movement.
11
+ * - `Forward` / `Backward` — block `Tab` and `Shift + Tab` movement.
12
+ * - `First` / `Last` — block jumping to the first / last focusable element.
13
+ */
14
+ let LockFocusEnum = exports.LockFocusEnum = /*#__PURE__*/function (LockFocusEnum) {
15
+ LockFocusEnum["Up"] = "up";
16
+ LockFocusEnum["Down"] = "down";
17
+ LockFocusEnum["Right"] = "right";
18
+ LockFocusEnum["Left"] = "left";
19
+ LockFocusEnum["Forward"] = "forward";
20
+ LockFocusEnum["Backward"] = "backward";
21
+ LockFocusEnum["First"] = "first";
22
+ LockFocusEnum["Last"] = "last";
23
+ return LockFocusEnum;
24
+ }({});
25
+ /** String-literal form of {@link LockFocusEnum} — `'up' | 'down' | 'left' | …`. */
26
+ /**
27
+ * Link-based focus ordering props. Each `order*` target names the {@link FocusOrderProps.orderId orderId}
28
+ * of the element that should receive focus when moving in that direction.
29
+ *
30
+ * > `orderId` values are global. In repeated content (lists, cards) duplicate IDs cause
31
+ * > incorrect focus jumps — namespace them with `orderPrefix` or a `KeyboardOrderFocusGroup`.
32
+ */
33
+ //# sourceMappingURL=focusOrder.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["LockFocusEnum","exports"],"sourceRoot":"../../../src","sources":["types/focusOrder.types.ts"],"mappings":";;;;;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AANA,IAOYA,aAAa,GAAAC,OAAA,CAAAD,aAAA,0BAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAbA,aAAa;EAAA,OAAbA,aAAa;AAAA;AAWzB;AAGA;AACA;AACA;AACA;AACA;AACA;AACA","ignoreList":[]}
@@ -3,4 +3,4 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
- //# sourceMappingURL=WithKeyboardFocus.js.map
6
+ //# sourceMappingURL=focusStyle.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/WithKeyboardFocus.ts"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/focusStyle.types.ts"],"mappings":"","ignoreList":[]}
@@ -1,2 +1,20 @@
1
1
  "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "LockComponentType", {
7
+ enumerable: true,
8
+ get: function () {
9
+ return _KeyboardFocusLock.LockComponentType;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "LockFocusEnum", {
13
+ enumerable: true,
14
+ get: function () {
15
+ return _focusOrder.LockFocusEnum;
16
+ }
17
+ });
18
+ var _KeyboardFocusLock = require("./KeyboardFocusLock.types");
19
+ var _focusOrder = require("./focusOrder.types");
2
20
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":["_KeyboardFocusLock","require","_focusOrder"],"sourceRoot":"../../../src","sources":["types/index.ts"],"mappings":";;;;;;;;;;;;;;;;;AAKA,IAAAA,kBAAA,GAAAC,OAAA;AAUA,IAAAC,WAAA,GAAAD,OAAA","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=keyPress.types.js.map
@@ -1 +1 @@
1
- {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/WithKeyboardFocus.ts"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/keyPress.types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=keyboardInput.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/keyboardInput.types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=withKeyboardFocus.types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sourceRoot":"../../../src","sources":["types/withKeyboardFocus.types.ts"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,37 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.mapLockFocus = void 0;
7
+ var _types = require("../types");
8
+ var BITS = /*#__PURE__*/function (BITS) {
9
+ BITS[BITS["BIT_01"] = 1] = "BIT_01";
10
+ BITS[BITS["BIT_02"] = 2] = "BIT_02";
11
+ BITS[BITS["BIT_03"] = 4] = "BIT_03";
12
+ BITS[BITS["BIT_04"] = 8] = "BIT_04";
13
+ BITS[BITS["BIT_05"] = 16] = "BIT_05";
14
+ BITS[BITS["BIT_06"] = 32] = "BIT_06";
15
+ BITS[BITS["BIT_07"] = 64] = "BIT_07";
16
+ BITS[BITS["BIT_08"] = 128] = "BIT_08";
17
+ BITS[BITS["BIT_09"] = 256] = "BIT_09";
18
+ BITS[BITS["BIT_10"] = 512] = "BIT_10";
19
+ return BITS;
20
+ }(BITS || {});
21
+ const focusBinaryValue = {
22
+ [_types.LockFocusEnum.Up]: BITS.BIT_01,
23
+ [_types.LockFocusEnum.Down]: BITS.BIT_02,
24
+ [_types.LockFocusEnum.Left]: BITS.BIT_03,
25
+ [_types.LockFocusEnum.Right]: BITS.BIT_04,
26
+ [_types.LockFocusEnum.Forward]: BITS.BIT_05,
27
+ [_types.LockFocusEnum.Backward]: BITS.BIT_06,
28
+ [_types.LockFocusEnum.First]: BITS.BIT_09,
29
+ [_types.LockFocusEnum.Last]: BITS.BIT_10
30
+ };
31
+ const mapLockFocus = values => {
32
+ if (!values || !values.length) return 0;
33
+ // eslint-disable-next-line no-bitwise
34
+ return values.reduce((acc, item) => acc | focusBinaryValue[item], 0);
35
+ };
36
+ exports.mapLockFocus = mapLockFocus;
37
+ //# sourceMappingURL=mapLockFocus.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_types","require","BITS","focusBinaryValue","LockFocusEnum","Up","BIT_01","Down","BIT_02","Left","BIT_03","Right","BIT_04","Forward","BIT_05","Backward","BIT_06","First","BIT_09","Last","BIT_10","mapLockFocus","values","length","reduce","acc","item","exports"],"sourceRoot":"../../../src","sources":["utils/mapLockFocus.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAA6D,IAExDC,IAAI,0BAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAJA,IAAI,CAAJA,IAAI;EAAA,OAAJA,IAAI;AAAA,EAAJA,IAAI;AAaT,MAAMC,gBAA+C,GAAG;EACtD,CAACC,oBAAa,CAACC,EAAE,GAAGH,IAAI,CAACI,MAAM;EAC/B,CAACF,oBAAa,CAACG,IAAI,GAAGL,IAAI,CAACM,MAAM;EACjC,CAACJ,oBAAa,CAACK,IAAI,GAAGP,IAAI,CAACQ,MAAM;EACjC,CAACN,oBAAa,CAACO,KAAK,GAAGT,IAAI,CAACU,MAAM;EAClC,CAACR,oBAAa,CAACS,OAAO,GAAGX,IAAI,CAACY,MAAM;EACpC,CAACV,oBAAa,CAACW,QAAQ,GAAGb,IAAI,CAACc,MAAM;EACrC,CAACZ,oBAAa,CAACa,KAAK,GAAGf,IAAI,CAACgB,MAAM;EAClC,CAACd,oBAAa,CAACe,IAAI,GAAGjB,IAAI,CAACkB;AAC7B,CAAC;AAEM,MAAMC,YAAY,GAAIC,MAAmC,IAAa;EAC3E,IAAI,CAACA,MAAM,IAAI,CAACA,MAAM,CAACC,MAAM,EAAE,OAAO,CAAC;EACvC;EACA,OAAOD,MAAM,CAACE,MAAM,CAAC,CAACC,GAAG,EAAEC,IAAI,KAAKD,GAAG,GAAGtB,gBAAgB,CAACuB,IAAI,CAAC,EAAE,CAAC,CAAC;AACtE,CAAC;AAACC,OAAA,CAAAN,YAAA,GAAAA,YAAA","ignoreList":[]}
@@ -5,20 +5,12 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.useFocusStyle = void 0;
7
7
  var _react = require("react");
8
- var _reactNative = require("react-native");
9
- const backgroundTintMap = {
10
- background: true
11
- };
12
- const DEFAULT_BACKGROUND_TINT = '#dce3f9';
13
8
  const useFocusStyle = ({
14
9
  focusStyle,
15
10
  onFocusChange,
16
11
  containerFocusStyle,
17
- tintColor,
18
- tintType = 'default',
19
12
  style,
20
- Component,
21
- withPressedStyle = false
13
+ pressedStyleSignature = false
22
14
  }) => {
23
15
  const [focused, setFocusStatus] = (0, _react.useState)(false);
24
16
  const onFocusChangeHandler = (0, _react.useCallback)(isFocused => {
@@ -31,22 +23,14 @@ const useFocusStyle = ({
31
23
  }) : focusStyle;
32
24
  return focused ? specificStyle : undefined;
33
25
  }, [focusStyle, focused]);
34
- const hoverColor = (0, _react.useMemo)(() => ({
35
- backgroundColor: tintColor
36
- }), [tintColor]);
37
26
  const containerFocusedStyle = (0, _react.useMemo)(() => {
38
- if (backgroundTintMap[tintType] && !containerFocusStyle) {
39
- return focused ? {
40
- backgroundColor: tintColor ?? DEFAULT_BACKGROUND_TINT
41
- } : undefined;
42
- }
43
27
  if (!containerFocusStyle) return undefined;
44
28
  const specificStyle = typeof containerFocusStyle === 'function' ? containerFocusStyle({
45
29
  focused
46
30
  }) : containerFocusStyle;
47
31
  return focused ? specificStyle : undefined;
48
- }, [containerFocusStyle, focused, tintColor, tintType]);
49
- const dafaultComponentStyle = (0, _react.useMemo)(() => [style, componentFocusedStyle], [style, componentFocusedStyle]);
32
+ }, [containerFocusStyle, focused]);
33
+ const defaultComponentStyle = (0, _react.useMemo)(() => pressedStyleSignature ? undefined : [style, componentFocusedStyle], [pressedStyleSignature, style, componentFocusedStyle]);
50
34
  const styleHandlerPressable = (0, _react.useCallback)(({
51
35
  pressed
52
36
  }) => {
@@ -58,13 +42,12 @@ const useFocusStyle = ({
58
42
  return [style, componentFocusedStyle];
59
43
  }
60
44
  }, [componentFocusedStyle, style]);
61
- const componentStyleViewStyle = Component === _reactNative.Pressable || withPressedStyle ? styleHandlerPressable : dafaultComponentStyle;
45
+ const componentStyleViewStyle = pressedStyleSignature ? styleHandlerPressable : defaultComponentStyle;
62
46
  return {
63
47
  componentStyleViewStyle,
64
48
  componentFocusedStyle,
65
49
  containerFocusedStyle,
66
50
  onFocusChangeHandler,
67
- hoverColor,
68
51
  focused
69
52
  };
70
53
  };
@@ -1 +1 @@
1
- {"version":3,"names":["_react","require","_reactNative","backgroundTintMap","background","DEFAULT_BACKGROUND_TINT","useFocusStyle","focusStyle","onFocusChange","containerFocusStyle","tintColor","tintType","style","Component","withPressedStyle","focused","setFocusStatus","useState","onFocusChangeHandler","useCallback","isFocused","componentFocusedStyle","useMemo","specificStyle","undefined","hoverColor","backgroundColor","containerFocusedStyle","dafaultComponentStyle","styleHandlerPressable","pressed","componentStyleViewStyle","Pressable","exports"],"sourceRoot":"../../../src","sources":["utils/useFocusStyle.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AAIA,MAAME,iBAAqD,GAAG;EAC5DC,UAAU,EAAE;AACd,CAAC;AAED,MAAMC,uBAAuB,GAAG,SAAS;AAclC,MAAMC,aAAa,GAAGA,CAAe;EAC1CC,UAAU;EACVC,aAAa;EACbC,mBAAmB;EACnBC,SAAS;EACTC,QAAQ,GAAG,SAAS;EACpBC,KAAK;EACLC,SAAS;EACTC,gBAAgB,GAAG;AACE,CAAC,KAAK;EAC3B,MAAM,CAACC,OAAO,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAEjD,MAAMC,oBAAoB,GAAG,IAAAC,kBAAW,EACrCC,SAAkB,IAAK;IACtBJ,cAAc,CAACI,SAAS,CAAC;IACzBZ,aAAa,GAAGY,SAAS,CAAC;EAC5B,CAAC,EACD,CAACZ,aAAa,CAChB,CAAC;EAED,MAAMa,qBAAqB,GAAG,IAAAC,cAAO,EAAC,MAAM;IAC1C,MAAMC,aAAa,GACjB,OAAOhB,UAAU,KAAK,UAAU,GAAGA,UAAU,CAAC;MAAEQ;IAAQ,CAAC,CAAC,GAAGR,UAAU;IACzE,OAAOQ,OAAO,GAAGQ,aAAa,GAAGC,SAAS;EAC5C,CAAC,EAAE,CAACjB,UAAU,EAAEQ,OAAO,CAAC,CAAC;EAEzB,MAAMU,UAAU,GAAG,IAAAH,cAAO,EACxB,OAAO;IACLI,eAAe,EAAEhB;EACnB,CAAC,CAAC,EACF,CAACA,SAAS,CACZ,CAAC;EAED,MAAMiB,qBAAqB,GAAG,IAAAL,cAAO,EAAC,MAAM;IAC1C,IAAInB,iBAAiB,CAACQ,QAAQ,CAAC,IAAI,CAACF,mBAAmB,EAAE;MACvD,OAAOM,OAAO,GACV;QAAEW,eAAe,EAAEhB,SAAS,IAAIL;MAAwB,CAAC,GACzDmB,SAAS;IACf;IACA,IAAI,CAACf,mBAAmB,EAAE,OAAOe,SAAS;IAE1C,MAAMD,aAAa,GACjB,OAAOd,mBAAmB,KAAK,UAAU,GACrCA,mBAAmB,CAAC;MAAEM;IAAQ,CAAC,CAAC,GAChCN,mBAAmB;IAEzB,OAAOM,OAAO,GAAGQ,aAAa,GAAGC,SAAS;EAC5C,CAAC,EAAE,CAACf,mBAAmB,EAAEM,OAAO,EAAEL,SAAS,EAAEC,QAAQ,CAAC,CAAC;EAEvD,MAAMiB,qBAAqB,GAAG,IAAAN,cAAO,EACnC,MAAM,CAACV,KAAK,EAAES,qBAAqB,CAAC,EACpC,CAACT,KAAK,EAAES,qBAAqB,CAC/B,CAAC;EACD,MAAMQ,qBAAqB,GAAG,IAAAV,kBAAW,EACvC,CAAC;IAAEW;EAA8B,CAAC,KAAK;IACrC,IAAI,OAAOlB,KAAK,KAAK,UAAU,EAAE;MAC/B,OAAO,CAACA,KAAK,CAAC;QAAEkB;MAAQ,CAAC,CAAC,EAAET,qBAAqB,CAAC;IACpD,CAAC,MAAM;MACL,OAAO,CAACT,KAAK,EAAES,qBAAqB,CAAC;IACvC;EACF,CAAC,EACD,CAACA,qBAAqB,EAAET,KAAK,CAC/B,CAAC;EAED,MAAMmB,uBAAuB,GAC3BlB,SAAS,KAAKmB,sBAAS,IAAIlB,gBAAgB,GACvCe,qBAAqB,GACrBD,qBAAqB;EAE3B,OAAO;IACLG,uBAAuB;IACvBV,qBAAqB;IACrBM,qBAAqB;IACrBT,oBAAoB;IACpBO,UAAU;IACVV;EACF,CAAC;AACH,CAAC;AAACkB,OAAA,CAAA3B,aAAA,GAAAA,aAAA","ignoreList":[]}
1
+ {"version":3,"names":["_react","require","useFocusStyle","focusStyle","onFocusChange","containerFocusStyle","style","pressedStyleSignature","focused","setFocusStatus","useState","onFocusChangeHandler","useCallback","isFocused","componentFocusedStyle","useMemo","specificStyle","undefined","containerFocusedStyle","defaultComponentStyle","styleHandlerPressable","pressed","componentStyleViewStyle","exports"],"sourceRoot":"../../../src","sources":["utils/useFocusStyle.tsx"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAYO,MAAMC,aAAa,GAAGA,CAAC;EAC5BC,UAAU;EACVC,aAAa;EACbC,mBAAmB;EACnBC,KAAK;EACLC,qBAAqB,GAAG;AACN,CAAC,KAAK;EACxB,MAAM,CAACC,OAAO,EAAEC,cAAc,CAAC,GAAG,IAAAC,eAAQ,EAAC,KAAK,CAAC;EAEjD,MAAMC,oBAAoB,GAAG,IAAAC,kBAAW,EACrCC,SAAkB,IAAK;IACtBJ,cAAc,CAACI,SAAS,CAAC;IACzBT,aAAa,GAAGS,SAAS,CAAC;EAC5B,CAAC,EACD,CAACT,aAAa,CAChB,CAAC;EAED,MAAMU,qBAAqB,GAAG,IAAAC,cAAO,EAAC,MAAM;IAC1C,MAAMC,aAAa,GACjB,OAAOb,UAAU,KAAK,UAAU,GAAGA,UAAU,CAAC;MAAEK;IAAQ,CAAC,CAAC,GAAGL,UAAU;IACzE,OAAOK,OAAO,GAAGQ,aAAa,GAAGC,SAAS;EAC5C,CAAC,EAAE,CAACd,UAAU,EAAEK,OAAO,CAAC,CAAC;EAEzB,MAAMU,qBAAqB,GAAG,IAAAH,cAAO,EAAC,MAAM;IAC1C,IAAI,CAACV,mBAAmB,EAAE,OAAOY,SAAS;IAE1C,MAAMD,aAAa,GACjB,OAAOX,mBAAmB,KAAK,UAAU,GACrCA,mBAAmB,CAAC;MAAEG;IAAQ,CAAC,CAAC,GAChCH,mBAAmB;IAEzB,OAAOG,OAAO,GAAGQ,aAAa,GAAGC,SAAS;EAC5C,CAAC,EAAE,CAACZ,mBAAmB,EAAEG,OAAO,CAAC,CAAC;EAElC,MAAMW,qBAAqB,GAAG,IAAAJ,cAAO,EACnC,MAAOR,qBAAqB,GAAGU,SAAS,GAAG,CAACX,KAAK,EAAEQ,qBAAqB,CAAE,EAC1E,CAACP,qBAAqB,EAAED,KAAK,EAAEQ,qBAAqB,CACtD,CAAC;EACD,MAAMM,qBAAqB,GAAG,IAAAR,kBAAW,EACvC,CAAC;IAAES;EAA8B,CAAC,KAAK;IACrC,IAAI,OAAOf,KAAK,KAAK,UAAU,EAAE;MAC/B,OAAO,CAACA,KAAK,CAAC;QAAEe;MAAQ,CAAC,CAAC,EAAEP,qBAAqB,CAAC;IACpD,CAAC,MAAM;MACL,OAAO,CAACR,KAAK,EAAEQ,qBAAqB,CAAC;IACvC;EACF,CAAC,EACD,CAACA,qBAAqB,EAAER,KAAK,CAC/B,CAAC;EAED,MAAMgB,uBAAuB,GAAGf,qBAAqB,GACjDa,qBAAqB,GACrBD,qBAAqB;EAEzB,OAAO;IACLG,uBAAuB;IACvBR,qBAAqB;IACrBI,qBAAqB;IACrBP,oBAAoB;IACpBH;EACF,CAAC;AACH,CAAC;AAACe,OAAA,CAAArB,aAAA,GAAAA,aAAA","ignoreList":[]}
@@ -0,0 +1,79 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useKeyboardFocusContainer = void 0;
7
+ var _react = require("react");
8
+ var _useFocusStyle = require("./useFocusStyle");
9
+ var _useKeyboardPress = require("./useKeyboardPress/useKeyboardPress");
10
+ var _useKeyboardPressState = require("./useKeyboardPressState");
11
+ const useKeyboardFocusContainer = ({
12
+ focusStyle,
13
+ containerFocusStyle,
14
+ onFocusChange,
15
+ style,
16
+ pressedStyleSignature,
17
+ onKeyUpPress,
18
+ onKeyDownPress,
19
+ onPress,
20
+ onLongPress,
21
+ onPressIn,
22
+ onPressOut,
23
+ triggerCodes,
24
+ androidKeyboardPressState = false
25
+ }) => {
26
+ const keyboardPress = (0, _useKeyboardPressState.useKeyboardPressState)({
27
+ enabled: androidKeyboardPressState,
28
+ onPressIn,
29
+ onPressOut,
30
+ onFocusChange
31
+ });
32
+ const {
33
+ focused,
34
+ containerFocusedStyle,
35
+ componentStyleViewStyle,
36
+ onFocusChangeHandler
37
+ } = (0, _useFocusStyle.useFocusStyle)({
38
+ onFocusChange: keyboardPress.onFocusChange,
39
+ focusStyle,
40
+ containerFocusStyle,
41
+ style,
42
+ pressedStyleSignature
43
+ });
44
+ const {
45
+ onKeyUpPressHandler,
46
+ onKeyDownPressHandler,
47
+ onPressHandler
48
+ } = (0, _useKeyboardPress.useKeyboardPress)({
49
+ onKeyUpPress,
50
+ onKeyDownPress,
51
+ onPress,
52
+ onLongPress,
53
+ onPressIn: keyboardPress.onPressIn,
54
+ onPressOut: keyboardPress.onPressOut,
55
+ triggerCodes
56
+ });
57
+ const {
58
+ applyPressedStyle
59
+ } = keyboardPress;
60
+ const componentStyle = (0, _react.useMemo)(() => applyPressedStyle(componentStyleViewStyle), [applyPressedStyle, componentStyleViewStyle]);
61
+ const onContextMenuHandler = (0, _react.useCallback)(() => {
62
+ onLongPress?.();
63
+ }, [onLongPress]);
64
+ const enableContextMenu = Boolean(onLongPress);
65
+ return {
66
+ focused,
67
+ keyboardPressed: keyboardPress.pressed,
68
+ containerFocusedStyle,
69
+ componentStyleViewStyle: componentStyle,
70
+ onFocusChangeHandler,
71
+ onKeyUpPressHandler,
72
+ onKeyDownPressHandler,
73
+ onPressHandler,
74
+ onContextMenuHandler,
75
+ enableContextMenu
76
+ };
77
+ };
78
+ exports.useKeyboardFocusContainer = useKeyboardFocusContainer;
79
+ //# sourceMappingURL=useKeyboardFocusContainer.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_useFocusStyle","_useKeyboardPress","_useKeyboardPressState","useKeyboardFocusContainer","focusStyle","containerFocusStyle","onFocusChange","style","pressedStyleSignature","onKeyUpPress","onKeyDownPress","onPress","onLongPress","onPressIn","onPressOut","triggerCodes","androidKeyboardPressState","keyboardPress","useKeyboardPressState","enabled","focused","containerFocusedStyle","componentStyleViewStyle","onFocusChangeHandler","useFocusStyle","onKeyUpPressHandler","onKeyDownPressHandler","onPressHandler","useKeyboardPress","applyPressedStyle","componentStyle","useMemo","onContextMenuHandler","useCallback","enableContextMenu","Boolean","keyboardPressed","pressed","exports"],"sourceRoot":"../../../src","sources":["utils/useKeyboardFocusContainer.ts"],"mappings":";;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AAEA,IAAAC,cAAA,GAAAD,OAAA;AACA,IAAAE,iBAAA,GAAAF,OAAA;AACA,IAAAG,sBAAA,GAAAH,OAAA;AAwBO,MAAMI,yBAAyB,GAAGA,CAGvC;EACAC,UAAU;EACVC,mBAAmB;EACnBC,aAAa;EACbC,KAAK;EACLC,qBAAqB;EACrBC,YAAY;EACZC,cAAc;EACdC,OAAO;EACPC,WAAW;EACXC,SAAS;EACTC,UAAU;EACVC,YAAY;EACZC,yBAAyB,GAAG;AACyB,CAAC,KAAK;EAC3D,MAAMC,aAAa,GAAG,IAAAC,4CAAqB,EAAC;IAC1CC,OAAO,EAAEH,yBAAyB;IAClCH,SAAS;IACTC,UAAU;IACVR;EACF,CAAC,CAAC;EAEF,MAAM;IACJc,OAAO;IACPC,qBAAqB;IACrBC,uBAAuB;IACvBC;EACF,CAAC,GAAG,IAAAC,4BAAa,EAAC;IAChBlB,aAAa,EAAEW,aAAa,CAACX,aAAa;IAC1CF,UAAU;IACVC,mBAAmB;IACnBE,KAAK;IACLC;EACF,CAAC,CAAC;EAEF,MAAM;IAAEiB,mBAAmB;IAAEC,qBAAqB;IAAEC;EAAe,CAAC,GAClE,IAAAC,kCAAgB,EAAC;IACfnB,YAAY;IACZC,cAAc;IACdC,OAAO;IACPC,WAAW;IACXC,SAAS,EAAEI,aAAa,CAACJ,SAA6B;IACtDC,UAAU,EAAEG,aAAa,CAACH,UAA+B;IACzDC;EACF,CAAC,CAAC;EAEJ,MAAM;IAAEc;EAAkB,CAAC,GAAGZ,aAAa;EAC3C,MAAMa,cAAc,GAAG,IAAAC,cAAO,EAC5B,MAAMF,iBAAiB,CAACP,uBAAuB,CAAC,EAChD,CAACO,iBAAiB,EAAEP,uBAAuB,CAC7C,CAAC;EAED,MAAMU,oBAAoB,GAAG,IAAAC,kBAAW,EAAC,MAAM;IAC7CrB,WAAW,GAAG,CAAC;EACjB,CAAC,EAAE,CAACA,WAAW,CAAC,CAAC;EAEjB,MAAMsB,iBAAiB,GAAGC,OAAO,CAACvB,WAAW,CAAC;EAE9C,OAAO;IACLQ,OAAO;IACPgB,eAAe,EAAEnB,aAAa,CAACoB,OAAO;IACtChB,qBAAqB;IACrBC,uBAAuB,EAAEQ,cAAc;IACvCP,oBAAoB;IACpBE,mBAAmB;IACnBC,qBAAqB;IACrBC,cAAc;IACdK,oBAAoB;IACpBE;EACF,CAAC;AACH,CAAC;AAACI,OAAA,CAAAnC,yBAAA,GAAAA,yBAAA","ignoreList":[]}