@react-native-ohos/react-native-keyboard-controller 1.12.8-rc.1

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 (248) hide show
  1. package/LICENSE +21 -0
  2. package/README.OpenSource +11 -0
  3. package/README.md +19 -0
  4. package/harmony/keyboard_controller/BuildProfile.ets +17 -0
  5. package/harmony/keyboard_controller/Index.ets +9 -0
  6. package/harmony/keyboard_controller/ResourceTable.txt +9 -0
  7. package/harmony/keyboard_controller/build-profile.json5 +31 -0
  8. package/harmony/keyboard_controller/consumer-rules.txt +0 -0
  9. package/harmony/keyboard_controller/hvigorfile.ts +6 -0
  10. package/harmony/keyboard_controller/obfuscation-rules.txt +18 -0
  11. package/harmony/keyboard_controller/oh-package.json5 +11 -0
  12. package/harmony/keyboard_controller/src/main/cpp/CMakeLists.txt +7 -0
  13. package/harmony/keyboard_controller/src/main/cpp/EventEmitters.cpp +96 -0
  14. package/harmony/keyboard_controller/src/main/cpp/EventEmitters.h +90 -0
  15. package/harmony/keyboard_controller/src/main/cpp/KeyboardControllerViewComponentDescriptor.h +77 -0
  16. package/harmony/keyboard_controller/src/main/cpp/KeyboardControllerViewComponentInstance.cpp +158 -0
  17. package/harmony/keyboard_controller/src/main/cpp/KeyboardControllerViewComponentInstance.h +74 -0
  18. package/harmony/keyboard_controller/src/main/cpp/KeyboardControllerViewJSIBinder.h +43 -0
  19. package/harmony/keyboard_controller/src/main/cpp/KeyboardGestureAreaComponentDescriptor.h +64 -0
  20. package/harmony/keyboard_controller/src/main/cpp/KeyboardGestureAreaComponentInstance.cpp +89 -0
  21. package/harmony/keyboard_controller/src/main/cpp/KeyboardGestureAreaComponentInstance.h +63 -0
  22. package/harmony/keyboard_controller/src/main/cpp/KeyboardGestureAreaJSIBinder.h +39 -0
  23. package/harmony/keyboard_controller/src/main/cpp/RNKeyboardController.cpp +25 -0
  24. package/harmony/keyboard_controller/src/main/cpp/RNKeyboardController.h +27 -0
  25. package/harmony/keyboard_controller/src/main/cpp/RNKeyboardControllerPackage.cpp +43 -0
  26. package/harmony/keyboard_controller/src/main/cpp/RNKeyboardControllerPackage.h +56 -0
  27. package/harmony/keyboard_controller/src/main/cpp/RNStatusBarManagerCompat.cpp +24 -0
  28. package/harmony/keyboard_controller/src/main/cpp/RNStatusBarManagerCompat.h +28 -0
  29. package/harmony/keyboard_controller/src/main/cpp/keyboardControllerPackage.cpp +43 -0
  30. package/harmony/keyboard_controller/src/main/cpp/keyboardControllerPackage.h +56 -0
  31. package/harmony/keyboard_controller/src/main/ets/Logger.ts +46 -0
  32. package/harmony/keyboard_controller/src/main/ets/RNKeyboardControllerPackage.ets +46 -0
  33. package/harmony/keyboard_controller/src/main/ets/RNKeyboardControllerTurboModule.ts +210 -0
  34. package/harmony/keyboard_controller/src/main/ets/RNStatusBarManagerCompatTurboModule.ts +98 -0
  35. package/harmony/keyboard_controller/src/main/ets/Type.ts +41 -0
  36. package/harmony/keyboard_controller/src/main/module.json +29 -0
  37. package/harmony/keyboard_controller/src/main/module.json5 +11 -0
  38. package/harmony/keyboard_controller/src/main/resources/base/element/string.json +8 -0
  39. package/harmony/keyboard_controller/src/main/resources/en_US/element/string.json +8 -0
  40. package/harmony/keyboard_controller/src/main/resources/zh_CN/element/string.json +8 -0
  41. package/harmony/keyboard_controller/ts.ets +9 -0
  42. package/harmony/keyboard_controller.har +0 -0
  43. package/lib/commonjs/animated.js +174 -0
  44. package/lib/commonjs/animated.js.map +1 -0
  45. package/lib/commonjs/bindings.js +38 -0
  46. package/lib/commonjs/bindings.js.map +1 -0
  47. package/lib/commonjs/bindings.native.js +37 -0
  48. package/lib/commonjs/bindings.native.js.map +1 -0
  49. package/lib/commonjs/components/KeyboardAvoidingView/hooks.js +66 -0
  50. package/lib/commonjs/components/KeyboardAvoidingView/hooks.js.map +1 -0
  51. package/lib/commonjs/components/KeyboardAvoidingView/index.js +102 -0
  52. package/lib/commonjs/components/KeyboardAvoidingView/index.js.map +1 -0
  53. package/lib/commonjs/components/KeyboardAwareScrollView/index.js +255 -0
  54. package/lib/commonjs/components/KeyboardAwareScrollView/index.js.map +1 -0
  55. package/lib/commonjs/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js +110 -0
  56. package/lib/commonjs/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js.map +1 -0
  57. package/lib/commonjs/components/KeyboardAwareScrollView/utils.js +37 -0
  58. package/lib/commonjs/components/KeyboardAwareScrollView/utils.js.map +1 -0
  59. package/lib/commonjs/components/KeyboardStickyView/index.js +40 -0
  60. package/lib/commonjs/components/KeyboardStickyView/index.js.map +1 -0
  61. package/lib/commonjs/components/KeyboardToolbar/Arrow.js +76 -0
  62. package/lib/commonjs/components/KeyboardToolbar/Arrow.js.map +1 -0
  63. package/lib/commonjs/components/KeyboardToolbar/Button.js +70 -0
  64. package/lib/commonjs/components/KeyboardToolbar/Button.js.map +1 -0
  65. package/lib/commonjs/components/KeyboardToolbar/colors.js +21 -0
  66. package/lib/commonjs/components/KeyboardToolbar/colors.js.map +1 -0
  67. package/lib/commonjs/components/KeyboardToolbar/colors.native.js +40 -0
  68. package/lib/commonjs/components/KeyboardToolbar/colors.native.js.map +1 -0
  69. package/lib/commonjs/components/KeyboardToolbar/index.js +152 -0
  70. package/lib/commonjs/components/KeyboardToolbar/index.js.map +1 -0
  71. package/lib/commonjs/components/KeyboardToolbar/types.js +6 -0
  72. package/lib/commonjs/components/KeyboardToolbar/types.js.map +1 -0
  73. package/lib/commonjs/components/hooks/useColorScheme.js +10 -0
  74. package/lib/commonjs/components/hooks/useColorScheme.js.map +1 -0
  75. package/lib/commonjs/components/index.js +42 -0
  76. package/lib/commonjs/components/index.js.map +1 -0
  77. package/lib/commonjs/constants.js +25 -0
  78. package/lib/commonjs/constants.js.map +1 -0
  79. package/lib/commonjs/context.js +42 -0
  80. package/lib/commonjs/context.js.map +1 -0
  81. package/lib/commonjs/hooks/index.js +104 -0
  82. package/lib/commonjs/hooks/index.js.map +1 -0
  83. package/lib/commonjs/hooks/useWindowDimensions/index.android.js +29 -0
  84. package/lib/commonjs/hooks/useWindowDimensions/index.android.js.map +1 -0
  85. package/lib/commonjs/hooks/useWindowDimensions/index.js +13 -0
  86. package/lib/commonjs/hooks/useWindowDimensions/index.js.map +1 -0
  87. package/lib/commonjs/index.js +116 -0
  88. package/lib/commonjs/index.js.map +1 -0
  89. package/lib/commonjs/internal.js +73 -0
  90. package/lib/commonjs/internal.js.map +1 -0
  91. package/lib/commonjs/monkey-patch.android.js +57 -0
  92. package/lib/commonjs/monkey-patch.android.js.map +1 -0
  93. package/lib/commonjs/monkey-patch.js +11 -0
  94. package/lib/commonjs/monkey-patch.js.map +1 -0
  95. package/lib/commonjs/reanimated.js +12 -0
  96. package/lib/commonjs/reanimated.js.map +1 -0
  97. package/lib/commonjs/reanimated.native.js +88 -0
  98. package/lib/commonjs/reanimated.native.js.map +1 -0
  99. package/lib/commonjs/specs/KeyboardControllerViewNativeComponent.js +10 -0
  100. package/lib/commonjs/specs/KeyboardControllerViewNativeComponent.js.map +1 -0
  101. package/lib/commonjs/specs/KeyboardGestureAreaNativeComponent.js +12 -0
  102. package/lib/commonjs/specs/KeyboardGestureAreaNativeComponent.js.map +1 -0
  103. package/lib/commonjs/specs/NativeKeyboardController.js +9 -0
  104. package/lib/commonjs/specs/NativeKeyboardController.js.map +1 -0
  105. package/lib/commonjs/specs/NativeStatusBarManagerCompat.js +9 -0
  106. package/lib/commonjs/specs/NativeStatusBarManagerCompat.js.map +1 -0
  107. package/lib/commonjs/types.js +6 -0
  108. package/lib/commonjs/types.js.map +1 -0
  109. package/lib/commonjs/utils.js +9 -0
  110. package/lib/commonjs/utils.js.map +1 -0
  111. package/lib/module/animated.js +166 -0
  112. package/lib/module/animated.js.map +1 -0
  113. package/lib/module/bindings.js +32 -0
  114. package/lib/module/bindings.js.map +1 -0
  115. package/lib/module/bindings.native.js +31 -0
  116. package/lib/module/bindings.native.js.map +1 -0
  117. package/lib/module/components/KeyboardAvoidingView/hooks.js +59 -0
  118. package/lib/module/components/KeyboardAvoidingView/hooks.js.map +1 -0
  119. package/lib/module/components/KeyboardAvoidingView/index.js +95 -0
  120. package/lib/module/components/KeyboardAvoidingView/index.js.map +1 -0
  121. package/lib/module/components/KeyboardAwareScrollView/index.js +248 -0
  122. package/lib/module/components/KeyboardAwareScrollView/index.js.map +1 -0
  123. package/lib/module/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js +103 -0
  124. package/lib/module/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.js.map +1 -0
  125. package/lib/module/components/KeyboardAwareScrollView/utils.js +29 -0
  126. package/lib/module/components/KeyboardAwareScrollView/utils.js.map +1 -0
  127. package/lib/module/components/KeyboardStickyView/index.js +33 -0
  128. package/lib/module/components/KeyboardStickyView/index.js.map +1 -0
  129. package/lib/module/components/KeyboardToolbar/Arrow.js +68 -0
  130. package/lib/module/components/KeyboardToolbar/Arrow.js.map +1 -0
  131. package/lib/module/components/KeyboardToolbar/Button.js +62 -0
  132. package/lib/module/components/KeyboardToolbar/Button.js.map +1 -0
  133. package/lib/module/components/KeyboardToolbar/colors.js +15 -0
  134. package/lib/module/components/KeyboardToolbar/colors.js.map +1 -0
  135. package/lib/module/components/KeyboardToolbar/colors.native.js +34 -0
  136. package/lib/module/components/KeyboardToolbar/colors.native.js.map +1 -0
  137. package/lib/module/components/KeyboardToolbar/index.js +140 -0
  138. package/lib/module/components/KeyboardToolbar/index.js.map +1 -0
  139. package/lib/module/components/KeyboardToolbar/types.js +2 -0
  140. package/lib/module/components/KeyboardToolbar/types.js.map +1 -0
  141. package/lib/module/components/hooks/useColorScheme.js +4 -0
  142. package/lib/module/components/hooks/useColorScheme.js.map +1 -0
  143. package/lib/module/components/index.js +5 -0
  144. package/lib/module/components/index.js.map +1 -0
  145. package/lib/module/constants.js +19 -0
  146. package/lib/module/constants.js.map +1 -0
  147. package/lib/module/context.js +35 -0
  148. package/lib/module/context.js.map +1 -0
  149. package/lib/module/hooks/index.js +68 -0
  150. package/lib/module/hooks/index.js.map +1 -0
  151. package/lib/module/hooks/useWindowDimensions/index.android.js +22 -0
  152. package/lib/module/hooks/useWindowDimensions/index.android.js.map +1 -0
  153. package/lib/module/hooks/useWindowDimensions/index.js +2 -0
  154. package/lib/module/hooks/useWindowDimensions/index.js.map +1 -0
  155. package/lib/module/index.js +10 -0
  156. package/lib/module/index.js.map +1 -0
  157. package/lib/module/internal.js +66 -0
  158. package/lib/module/internal.js.map +1 -0
  159. package/lib/module/monkey-patch.android.js +47 -0
  160. package/lib/module/monkey-patch.android.js.map +1 -0
  161. package/lib/module/monkey-patch.js +5 -0
  162. package/lib/module/monkey-patch.js.map +1 -0
  163. package/lib/module/reanimated.js +6 -0
  164. package/lib/module/reanimated.js.map +1 -0
  165. package/lib/module/reanimated.native.js +78 -0
  166. package/lib/module/reanimated.native.js.map +1 -0
  167. package/lib/module/specs/KeyboardControllerViewNativeComponent.js +3 -0
  168. package/lib/module/specs/KeyboardControllerViewNativeComponent.js.map +1 -0
  169. package/lib/module/specs/KeyboardGestureAreaNativeComponent.js +5 -0
  170. package/lib/module/specs/KeyboardGestureAreaNativeComponent.js.map +1 -0
  171. package/lib/module/specs/NativeKeyboardController.js +3 -0
  172. package/lib/module/specs/NativeKeyboardController.js.map +1 -0
  173. package/lib/module/specs/NativeStatusBarManagerCompat.js +3 -0
  174. package/lib/module/specs/NativeStatusBarManagerCompat.js.map +1 -0
  175. package/lib/module/types.js +2 -0
  176. package/lib/module/types.js.map +1 -0
  177. package/lib/module/utils.js +2 -0
  178. package/lib/module/utils.js.map +1 -0
  179. package/lib/typescript/animated.d.ts +31 -0
  180. package/lib/typescript/bindings.d.ts +12 -0
  181. package/lib/typescript/bindings.native.d.ts +12 -0
  182. package/lib/typescript/components/KeyboardAvoidingView/hooks.d.ts +6 -0
  183. package/lib/typescript/components/KeyboardAvoidingView/index.d.ts +50 -0
  184. package/lib/typescript/components/KeyboardAwareScrollView/index.d.ts +25 -0
  185. package/lib/typescript/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.d.ts +6 -0
  186. package/lib/typescript/components/KeyboardAwareScrollView/utils.d.ts +2 -0
  187. package/lib/typescript/components/KeyboardStickyView/index.d.ts +35 -0
  188. package/lib/typescript/components/KeyboardToolbar/Arrow.d.ts +9 -0
  189. package/lib/typescript/components/KeyboardToolbar/Button.d.ts +15 -0
  190. package/lib/typescript/components/KeyboardToolbar/colors.d.ts +2 -0
  191. package/lib/typescript/components/KeyboardToolbar/colors.native.d.ts +2 -0
  192. package/lib/typescript/components/KeyboardToolbar/index.d.ts +50 -0
  193. package/lib/typescript/components/KeyboardToolbar/types.d.ts +18 -0
  194. package/lib/typescript/components/hooks/useColorScheme.d.ts +2 -0
  195. package/lib/typescript/components/index.d.ts +8 -0
  196. package/lib/typescript/constants.d.ts +16 -0
  197. package/lib/typescript/context.d.ts +23 -0
  198. package/lib/typescript/hooks/index.d.ts +17 -0
  199. package/lib/typescript/hooks/useWindowDimensions/index.android.d.ts +2 -0
  200. package/lib/typescript/hooks/useWindowDimensions/index.d.ts +1 -0
  201. package/lib/typescript/index.d.ts +8 -0
  202. package/lib/typescript/internal.d.ts +30 -0
  203. package/lib/typescript/monkey-patch.android.d.ts +2 -0
  204. package/lib/typescript/monkey-patch.d.ts +2 -0
  205. package/lib/typescript/reanimated.d.ts +5 -0
  206. package/lib/typescript/reanimated.native.d.ts +7 -0
  207. package/lib/typescript/specs/KeyboardControllerViewNativeComponent.d.ts +53 -0
  208. package/lib/typescript/specs/KeyboardGestureAreaNativeComponent.d.ts +10 -0
  209. package/lib/typescript/specs/NativeKeyboardController.d.ts +12 -0
  210. package/lib/typescript/specs/NativeStatusBarManagerCompat.d.ts +10 -0
  211. package/lib/typescript/types.d.ts +133 -0
  212. package/lib/typescript/utils.d.ts +1 -0
  213. package/package.json +177 -0
  214. package/react-native-keyboard-controller.podspec +61 -0
  215. package/src/animated.tsx +246 -0
  216. package/src/bindings.native.ts +57 -0
  217. package/src/bindings.ts +38 -0
  218. package/src/components/KeyboardAvoidingView/hooks.ts +58 -0
  219. package/src/components/KeyboardAvoidingView/index.tsx +156 -0
  220. package/src/components/KeyboardAwareScrollView/index.tsx +373 -0
  221. package/src/components/KeyboardAwareScrollView/useSmoothKeyboardHandler.ts +133 -0
  222. package/src/components/KeyboardAwareScrollView/utils.ts +41 -0
  223. package/src/components/KeyboardStickyView/index.tsx +57 -0
  224. package/src/components/KeyboardToolbar/Arrow.tsx +80 -0
  225. package/src/components/KeyboardToolbar/Button.tsx +98 -0
  226. package/src/components/KeyboardToolbar/colors.native.ts +37 -0
  227. package/src/components/KeyboardToolbar/colors.ts +16 -0
  228. package/src/components/KeyboardToolbar/index.tsx +211 -0
  229. package/src/components/KeyboardToolbar/types.ts +40 -0
  230. package/src/components/hooks/useColorScheme.ts +5 -0
  231. package/src/components/index.ts +11 -0
  232. package/src/constants.ts +19 -0
  233. package/src/context.ts +65 -0
  234. package/src/hooks/index.ts +90 -0
  235. package/src/hooks/useWindowDimensions/index.android.ts +33 -0
  236. package/src/hooks/useWindowDimensions/index.ts +1 -0
  237. package/src/index.ts +21 -0
  238. package/src/internal.ts +84 -0
  239. package/src/monkey-patch.android.ts +44 -0
  240. package/src/monkey-patch.ts +4 -0
  241. package/src/reanimated.native.ts +132 -0
  242. package/src/reanimated.ts +29 -0
  243. package/src/specs/KeyboardControllerViewNativeComponent.ts +70 -0
  244. package/src/specs/KeyboardGestureAreaNativeComponent.ts +15 -0
  245. package/src/specs/NativeKeyboardController.ts +19 -0
  246. package/src/specs/NativeStatusBarManagerCompat.ts +14 -0
  247. package/src/types.ts +211 -0
  248. package/src/utils.ts +1 -0
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_bindings","require","Object","keys","forEach","key","prototype","hasOwnProperty","call","_exportNames","exports","defineProperty","enumerable","get","_animated","_context","_hooks","_constants","_types","_components"],"sources":["index.ts"],"sourcesContent":["export * from \"./bindings\";\r\nexport * from \"./animated\";\r\nexport * from \"./context\";\r\nexport * from \"./hooks\";\r\nexport * from \"./constants\";\r\nexport * from \"./types\";\r\n\r\nexport {\r\n KeyboardAvoidingView,\r\n KeyboardStickyView,\r\n KeyboardAwareScrollView,\r\n // keyboard toolbar\r\n KeyboardToolbar,\r\n DefaultKeyboardToolbarTheme,\r\n} from \"./components\";\r\nexport type {\r\n KeyboardAvoidingViewProps,\r\n KeyboardStickyViewProps,\r\n KeyboardAwareScrollViewProps,\r\n KeyboardToolbarProps,\r\n} from \"./components\";\r\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,IAAAA,SAAA,GAAAC,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAH,SAAA,EAAAI,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAL,SAAA,CAAAK,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAb,SAAA,CAAAK,GAAA;IAAA;EAAA;AAAA;AACA,IAAAS,SAAA,GAAAb,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAW,SAAA,EAAAV,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAS,SAAA,CAAAT,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAC,SAAA,CA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AH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAI,UAAA,CAAAZ,GAAA;IAAA;EAAA;AAAA;AACA,IAAAa,MAAA,GAAAjB,OAAA;AAAAC,MAAA,CAAAC,IAAA,CAAAe,MAAA,EAAAd,OAAA,WAAAC,GAAA;EAAA,IAAAA,GAAA,kBAAAA,GAAA;EAAA,IAAAH,MAAA,CAAAI,SAAA,CAAAC,cAAA,CAAAC,IAAA,CAAAC,YAAA,EAAAJ,GAAA;EAAA,IAAAA,GAAA,IAAAK,OAAA,IAAAA,OAAA,CAAAL,GAAA,MAAAa,MAAA,CAAAb,GAAA;EAAAH,MAAA,CAAAS,cAAA,CAAAD,OAAA,EAAAL,GAAA;IAAAO,UAAA;IAAAC,GAAA,WAAAA,CAAA;MAAA,OAAAK,MAAA,CAAAb,GAAA;IAAA;EAAA;AAAA;AAEA,IAAAc,WAAA,GAAAlB,OAAA","ignoreList":[]}
@@ -0,0 +1,73 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useAnimatedValue = useAnimatedValue;
7
+ exports.useSharedHandlers = useSharedHandlers;
8
+ var _react = require("react");
9
+ var _reactNative = require("react-native");
10
+ var _reactNativeReanimated = require("react-native-reanimated");
11
+ /**
12
+ * Hook for storing worklet handlers (objects with keys, where values are worklets).
13
+ * Returns methods for setting handlers and broadcasting events in them.
14
+ *
15
+ * T is a generic that looks like:
16
+ * @example
17
+ * {
18
+ * onEvent: () => {},
19
+ * onEvent2: () => {},
20
+ * }
21
+ */
22
+ function useSharedHandlers() {
23
+ const handlers = (0, _reactNativeReanimated.useSharedValue)({});
24
+ const jsHandlers = (0, _react.useRef)({});
25
+
26
+ // since js -> worklet -> js call is asynchronous, we can not write handlers
27
+ // straight into shared variable (using current shared value as a previous result),
28
+ // since there may be a race condition in a call, and closure may have out-of-dated
29
+ // values. As a result, some of handlers may be not written to "all handlers" object.
30
+ // Below we are writing all handlers to `ref` and afterwards synchronize them with
31
+ // shared value (since `refs` are not referring to actual value in worklets).
32
+ // This approach allow us to update synchronously handlers in js thread (and it assures,
33
+ // that it will have all of them) and then update them in worklet thread (calls are
34
+ // happening in FIFO order, so we will always have actual value).
35
+ const updateSharedHandlers = () => {
36
+ // eslint-disable-next-line react-compiler/react-compiler
37
+ handlers.value = jsHandlers.current;
38
+ };
39
+ const setHandlers = (0, _react.useCallback)(handler => {
40
+ jsHandlers.current = {
41
+ ...jsHandlers.current,
42
+ ...handler
43
+ };
44
+ updateSharedHandlers();
45
+ }, []);
46
+ const broadcast = (type, event) => {
47
+ "worklet";
48
+
49
+ Object.keys(handlers.value).forEach(key => {
50
+ var _handlers$value$key, _handlers$value$key$t;
51
+ (_handlers$value$key = handlers.value[key]) === null || _handlers$value$key === void 0 || (_handlers$value$key$t = _handlers$value$key[type]) === null || _handlers$value$key$t === void 0 || _handlers$value$key$t.call(_handlers$value$key, event);
52
+ });
53
+ };
54
+ return [setHandlers, broadcast];
55
+ }
56
+
57
+ /**
58
+ * TS variant of `useAnimatedValue` hook which is added in RN 0.71
59
+ * A better alternative of storing animated values in refs, since
60
+ * it doesn't recreate a new `Animated.Value` object on every re-render
61
+ * and therefore consumes less memory. We can not use a variant from
62
+ * RN, since this library supports earlier versions of RN.
63
+ *
64
+ * @see https://github.com/facebook/react-native/commit/e22217fe8b9455e32695f88ca835e11442b0a937
65
+ */
66
+ function useAnimatedValue(initialValue, config) {
67
+ const ref = (0, _react.useRef)(null);
68
+ if (ref.current == null) {
69
+ ref.current = new _reactNative.Animated.Value(initialValue, config);
70
+ }
71
+ return ref.current;
72
+ }
73
+ //# sourceMappingURL=internal.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_react","require","_reactNative","_reactNativeReanimated","useSharedHandlers","handlers","useSharedValue","jsHandlers","useRef","updateSharedHandlers","value","current","setHandlers","useCallback","handler","broadcast","type","event","Object","keys","forEach","key","_handlers$value$key","_handlers$value$key$t","call","useAnimatedValue","initialValue","config","ref","Animated","Value"],"sources":["internal.ts"],"sourcesContent":["import { useCallback, useRef } from \"react\";\r\nimport { Animated } from \"react-native\";\r\nimport { useSharedValue } from \"react-native-reanimated\";\r\n\r\nimport type { Handlers } from \"./types\";\r\n\r\ntype UntypedHandler = Record<string, (event: never) => void>;\r\ntype SharedHandlersReturnType<T extends UntypedHandler> = [\r\n (handler: Handlers<T>) => void,\r\n <K extends keyof T>(type: K, event: Parameters<T[K]>[0]) => void,\r\n];\r\n\r\n/**\r\n * Hook for storing worklet handlers (objects with keys, where values are worklets).\r\n * Returns methods for setting handlers and broadcasting events in them.\r\n *\r\n * T is a generic that looks like:\r\n * @example\r\n * {\r\n * onEvent: () => {},\r\n * onEvent2: () => {},\r\n * }\r\n */\r\nexport function useSharedHandlers<\r\n T extends UntypedHandler,\r\n>(): SharedHandlersReturnType<T> {\r\n const handlers = useSharedValue<Handlers<T>>({});\r\n const jsHandlers = useRef<Handlers<T>>({});\r\n\r\n // since js -> worklet -> js call is asynchronous, we can not write handlers\r\n // straight into shared variable (using current shared value as a previous result),\r\n // since there may be a race condition in a call, and closure may have out-of-dated\r\n // values. As a result, some of handlers may be not written to \"all handlers\" object.\r\n // Below we are writing all handlers to `ref` and afterwards synchronize them with\r\n // shared value (since `refs` are not referring to actual value in worklets).\r\n // This approach allow us to update synchronously handlers in js thread (and it assures,\r\n // that it will have all of them) and then update them in worklet thread (calls are\r\n // happening in FIFO order, so we will always have actual value).\r\n const updateSharedHandlers = () => {\r\n // eslint-disable-next-line react-compiler/react-compiler\r\n handlers.value = jsHandlers.current;\r\n };\r\n const setHandlers = useCallback((handler: Handlers<T>) => {\r\n jsHandlers.current = {\r\n ...jsHandlers.current,\r\n ...handler,\r\n };\r\n updateSharedHandlers();\r\n }, []);\r\n const broadcast = <K extends keyof T>(\r\n type: K,\r\n event: Parameters<T[K]>[0],\r\n ) => {\r\n \"worklet\";\r\n\r\n Object.keys(handlers.value).forEach((key) => {\r\n handlers.value[key]?.[type]?.(event);\r\n });\r\n };\r\n\r\n return [setHandlers, broadcast];\r\n}\r\n\r\n/**\r\n * TS variant of `useAnimatedValue` hook which is added in RN 0.71\r\n * A better alternative of storing animated values in refs, since\r\n * it doesn't recreate a new `Animated.Value` object on every re-render\r\n * and therefore consumes less memory. We can not use a variant from\r\n * RN, since this library supports earlier versions of RN.\r\n *\r\n * @see https://github.com/facebook/react-native/commit/e22217fe8b9455e32695f88ca835e11442b0a937\r\n */\r\nexport function useAnimatedValue(\r\n initialValue: number,\r\n config?: Animated.AnimatedConfig,\r\n): Animated.Value {\r\n const ref = useRef<Animated.Value | null>(null);\r\n\r\n if (ref.current == null) {\r\n ref.current = new Animated.Value(initialValue, config);\r\n }\r\n\r\n return ref.current;\r\n}\r\n"],"mappings":";;;;;;;AAAA,IAAAA,MAAA,GAAAC,OAAA;AACA,IAAAC,YAAA,GAAAD,OAAA;AACA,IAAAE,sBAAA,GAAAF,OAAA;AAUA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASG,iBAAiBA,CAAA,EAEA;EAC/B,MAAMC,QAAQ,GAAG,IAAAC,qCAAc,EAAc,CAAC,CAAC,CAAC;EAChD,MAAMC,UAAU,GAAG,IAAAC,aAAM,EAAc,CAAC,CAAC,CAAC;;EAE1C;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA;EACA,MAAMC,oBAAoB,GAAGA,CAAA,KAAM;IACjC;IACAJ,QAAQ,CAACK,KAAK,GAAGH,UAAU,CAACI,OAAO;EACrC,CAAC;EACD,MAAMC,WAAW,GAAG,IAAAC,kBAAW,EAAEC,OAAoB,IAAK;IACxDP,UAAU,CAACI,OAAO,GAAG;MACnB,GAAGJ,UAAU,CAACI,OAAO;MACrB,GAAGG;IACL,CAAC;IACDL,oBAAoB,CAAC,CAAC;EACxB,CAAC,EAAE,EAAE,CAAC;EACN,MAAMM,SAAS,GAAGA,CAChBC,IAAO,EACPC,KAA0B,KACvB;IACH,SAAS;;IAETC,MAAM,CAACC,IAAI,CAACd,QAAQ,CAACK,KAAK,CAAC,CAACU,OAAO,CAAEC,GAAG,IAAK;MAAA,IAAAC,mBAAA,EAAAC,qBAAA;MAC3C,CAAAD,mBAAA,GAAAjB,QAAQ,CAACK,KAAK,CAACW,GAAG,CAAC,cAAAC,mBAAA,gBAAAC,qBAAA,GAAnBD,mBAAA,CAAsBN,IAAI,CAAC,cAAAO,qBAAA,eAA3BA,qBAAA,CAAAC,IAAA,CAAAF,mBAAA,EAA8BL,KAAK,CAAC;IACtC,CAAC,CAAC;EACJ,CAAC;EAED,OAAO,CAACL,WAAW,EAAEG,SAAS,CAAC;AACjC;;AAEA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACO,SAASU,gBAAgBA,CAC9BC,YAAoB,EACpBC,MAAgC,EAChB;EAChB,MAAMC,GAAG,GAAG,IAAApB,aAAM,EAAwB,IAAI,CAAC;EAE/C,IAAIoB,GAAG,CAACjB,OAAO,IAAI,IAAI,EAAE;IACvBiB,GAAG,CAACjB,OAAO,GAAG,IAAIkB,qBAAQ,CAACC,KAAK,CAACJ,YAAY,EAAEC,MAAM,CAAC;EACxD;EAEA,OAAOC,GAAG,CAACjB,OAAO;AACpB","ignoreList":[]}
@@ -0,0 +1,57 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.revertMonkeyPatch = exports.applyMonkeyPatch = void 0;
7
+ var NativeAndroidManager = _interopRequireWildcard(require("react-native/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid"));
8
+ 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); }
9
+ // @ts-expect-error because there is no corresponding type definition
10
+
11
+ const RCTStatusBarManagerCompat =
12
+ // eslint-disable-next-line @typescript-eslint/no-var-requires
13
+ require("./specs/NativeStatusBarManagerCompat").default;
14
+
15
+ // Copy original default manager to keep its original state and methods
16
+ const OriginalNativeAndroidManager = {
17
+ ...NativeAndroidManager.default
18
+ };
19
+
20
+ // Create a new object that modifies the necessary methods
21
+ // On Android < 11 RN uses legacy API which breaks EdgeToEdge mode in RN, so
22
+ // in order to use library on all available platforms we have to monkey patch
23
+ // default RN implementation and use modern `WindowInsetsControllerCompat`.
24
+ const ModifiedNativeAndroidManager = {
25
+ ...NativeAndroidManager.default,
26
+ // Spread original properties to keep existing functionality
27
+ setColor: (color, animated) => {
28
+ RCTStatusBarManagerCompat.setColor(color, animated);
29
+ },
30
+ setTranslucent: translucent => {
31
+ RCTStatusBarManagerCompat.setTranslucent(translucent);
32
+ },
33
+ /**
34
+ * - statusBarStyles can be:
35
+ * - 'default'
36
+ * - 'dark-content'
37
+ */
38
+ setStyle: statusBarStyle => {
39
+ RCTStatusBarManagerCompat.setStyle(statusBarStyle);
40
+ },
41
+ setHidden: hidden => {
42
+ RCTStatusBarManagerCompat.setHidden(hidden);
43
+ }
44
+ };
45
+
46
+ // Define a function to apply the monkey patch
47
+ const applyMonkeyPatch = () => {
48
+ Object.assign(NativeAndroidManager.default, ModifiedNativeAndroidManager);
49
+ };
50
+
51
+ // Define a function to revert changes back to the original state
52
+ exports.applyMonkeyPatch = applyMonkeyPatch;
53
+ const revertMonkeyPatch = () => {
54
+ Object.assign(NativeAndroidManager.default, OriginalNativeAndroidManager);
55
+ };
56
+ exports.revertMonkeyPatch = revertMonkeyPatch;
57
+ //# sourceMappingURL=monkey-patch.android.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NativeAndroidManager","_interopRequireWildcard","require","e","t","WeakMap","r","n","__esModule","o","i","f","__proto__","default","has","get","set","hasOwnProperty","call","Object","defineProperty","getOwnPropertyDescriptor","RCTStatusBarManagerCompat","OriginalNativeAndroidManager","ModifiedNativeAndroidManager","setColor","color","animated","setTranslucent","translucent","setStyle","statusBarStyle","setHidden","hidden","applyMonkeyPatch","assign","exports","revertMonkeyPatch"],"sources":["monkey-patch.android.ts"],"sourcesContent":["// @ts-expect-error because there is no corresponding type definition\r\nimport * as NativeAndroidManager from \"react-native/Libraries/Components/StatusBar/NativeStatusBarManagerAndroid\";\r\n\r\nconst RCTStatusBarManagerCompat =\r\n // eslint-disable-next-line @typescript-eslint/no-var-requires\r\n require(\"./specs/NativeStatusBarManagerCompat\").default;\r\n\r\n// Copy original default manager to keep its original state and methods\r\nconst OriginalNativeAndroidManager = { ...NativeAndroidManager.default };\r\n\r\n// Create a new object that modifies the necessary methods\r\n// On Android < 11 RN uses legacy API which breaks EdgeToEdge mode in RN, so\r\n// in order to use library on all available platforms we have to monkey patch\r\n// default RN implementation and use modern `WindowInsetsControllerCompat`.\r\nconst ModifiedNativeAndroidManager = {\r\n ...NativeAndroidManager.default, // Spread original properties to keep existing functionality\r\n setColor: (color: number, animated: boolean): void => {\r\n RCTStatusBarManagerCompat.setColor(color, animated);\r\n },\r\n setTranslucent: (translucent: boolean): void => {\r\n RCTStatusBarManagerCompat.setTranslucent(translucent);\r\n },\r\n /**\r\n * - statusBarStyles can be:\r\n * - 'default'\r\n * - 'dark-content'\r\n */\r\n setStyle: (statusBarStyle?: string): void => {\r\n RCTStatusBarManagerCompat.setStyle(statusBarStyle);\r\n },\r\n setHidden: (hidden: boolean): void => {\r\n RCTStatusBarManagerCompat.setHidden(hidden);\r\n },\r\n};\r\n\r\n// Define a function to apply the monkey patch\r\nexport const applyMonkeyPatch = () => {\r\n Object.assign(NativeAndroidManager.default, ModifiedNativeAndroidManager);\r\n};\r\n\r\n// Define a function to revert changes back to the original state\r\nexport const revertMonkeyPatch = () => {\r\n Object.assign(NativeAndroidManager.default, OriginalNativeAndroidManager);\r\n};\r\n"],"mappings":";;;;;;AACA,IAAAA,oBAAA,GAAAC,uBAAA,CAAAC,OAAA;AAAkH,SAAAD,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;AADlH;;AAGA,MAAMkB,yBAAyB;AAC7B;AACApB,OAAO,CAAC,sCAAsC,CAAC,CAACW,OAAO;;AAEzD;AACA,MAAMU,4BAA4B,GAAG;EAAE,GAAGvB,oBAAoB,CAACa;AAAQ,CAAC;;AAExE;AACA;AACA;AACA;AACA,MAAMW,4BAA4B,GAAG;EACnC,GAAGxB,oBAAoB,CAACa,OAAO;EAAE;EACjCY,QAAQ,EAAEA,CAACC,KAAa,EAAEC,QAAiB,KAAW;IACpDL,yBAAyB,CAACG,QAAQ,CAACC,KAAK,EAAEC,QAAQ,CAAC;EACrD,CAAC;EACDC,cAAc,EAAGC,WAAoB,IAAW;IAC9CP,yBAAyB,CAACM,cAAc,CAACC,WAAW,CAAC;EACvD,CAAC;EACD;AACF;AACA;AACA;AACA;EACEC,QAAQ,EAAGC,cAAuB,IAAW;IAC3CT,yBAAyB,CAACQ,QAAQ,CAACC,cAAc,CAAC;EACpD,CAAC;EACDC,SAAS,EAAGC,MAAe,IAAW;IACpCX,yBAAyB,CAACU,SAAS,CAACC,MAAM,CAAC;EAC7C;AACF,CAAC;;AAED;AACO,MAAMC,gBAAgB,GAAGA,CAAA,KAAM;EACpCf,MAAM,CAACgB,MAAM,CAACnC,oBAAoB,CAACa,OAAO,EAAEW,4BAA4B,CAAC;AAC3E,CAAC;;AAED;AAAAY,OAAA,CAAAF,gBAAA,GAAAA,gBAAA;AACO,MAAMG,iBAAiB,GAAGA,CAAA,KAAM;EACrClB,MAAM,CAACgB,MAAM,CAACnC,oBAAoB,CAACa,OAAO,EAAEU,4BAA4B,CAAC;AAC3E,CAAC;AAACa,OAAA,CAAAC,iBAAA,GAAAA,iBAAA","ignoreList":[]}
@@ -0,0 +1,11 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.revertMonkeyPatch = exports.applyMonkeyPatch = void 0;
7
+ // stub for all platforms
8
+ const NOOP = () => {};
9
+ const applyMonkeyPatch = exports.applyMonkeyPatch = NOOP;
10
+ const revertMonkeyPatch = exports.revertMonkeyPatch = NOOP;
11
+ //# sourceMappingURL=monkey-patch.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NOOP","applyMonkeyPatch","exports","revertMonkeyPatch"],"sources":["monkey-patch.ts"],"sourcesContent":["// stub for all platforms\r\nconst NOOP = () => {};\r\nexport const applyMonkeyPatch = NOOP;\r\nexport const revertMonkeyPatch = NOOP;\r\n"],"mappings":";;;;;;AAAA;AACA,MAAMA,IAAI,GAAGA,CAAA,KAAM,CAAC,CAAC;AACd,MAAMC,gBAAgB,GAAAC,OAAA,CAAAD,gBAAA,GAAGD,IAAI;AAC7B,MAAMG,iBAAiB,GAAAD,OAAA,CAAAC,iBAAA,GAAGH,IAAI","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useFocusedInputTextHandler = exports.useFocusedInputSelectionHandler = exports.useFocusedInputLayoutHandler = exports.useAnimatedKeyboardHandler = void 0;
7
+ const NOOP = () => () => {};
8
+ const useAnimatedKeyboardHandler = exports.useAnimatedKeyboardHandler = NOOP;
9
+ const useFocusedInputLayoutHandler = exports.useFocusedInputLayoutHandler = NOOP;
10
+ const useFocusedInputTextHandler = exports.useFocusedInputTextHandler = NOOP;
11
+ const useFocusedInputSelectionHandler = exports.useFocusedInputSelectionHandler = NOOP;
12
+ //# sourceMappingURL=reanimated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["NOOP","useAnimatedKeyboardHandler","exports","useFocusedInputLayoutHandler","useFocusedInputTextHandler","useFocusedInputSelectionHandler"],"sources":["reanimated.ts"],"sourcesContent":["import type {\r\n EventWithName,\r\n FocusedInputLayoutChangedEvent,\r\n FocusedInputLayoutHandlerHook,\r\n FocusedInputSelectionChangedEvent,\r\n FocusedInputSelectionHandlerHook,\r\n FocusedInputTextChangedEvent,\r\n FocusedInputTextHandlerHook,\r\n KeyboardHandlerHook,\r\n NativeEvent,\r\n} from \"./types\";\r\n\r\nconst NOOP = () => () => {};\r\nexport const useAnimatedKeyboardHandler: KeyboardHandlerHook<\r\n Record<string, unknown>,\r\n EventWithName<NativeEvent>\r\n> = NOOP;\r\nexport const useFocusedInputLayoutHandler: FocusedInputLayoutHandlerHook<\r\n Record<string, unknown>,\r\n EventWithName<FocusedInputLayoutChangedEvent>\r\n> = NOOP;\r\nexport const useFocusedInputTextHandler: FocusedInputTextHandlerHook<\r\n Record<string, unknown>,\r\n EventWithName<FocusedInputTextChangedEvent>\r\n> = NOOP;\r\nexport const useFocusedInputSelectionHandler: FocusedInputSelectionHandlerHook<\r\n Record<string, unknown>,\r\n EventWithName<FocusedInputSelectionChangedEvent>\r\n> = NOOP;\r\n"],"mappings":";;;;;;AAYA,MAAMA,IAAI,GAAGA,CAAA,KAAM,MAAM,CAAC,CAAC;AACpB,MAAMC,0BAGZ,GAAAC,OAAA,CAAAD,0BAAA,GAAGD,IAAI;AACD,MAAMG,4BAGZ,GAAAD,OAAA,CAAAC,4BAAA,GAAGH,IAAI;AACD,MAAMI,0BAGZ,GAAAF,OAAA,CAAAE,0BAAA,GAAGJ,IAAI;AACD,MAAMK,+BAGZ,GAAAH,OAAA,CAAAG,+BAAA,GAAGL,IAAI","ignoreList":[]}
@@ -0,0 +1,88 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.useFocusedInputTextHandler = exports.useFocusedInputSelectionHandler = exports.useFocusedInputLayoutHandler = exports.useAnimatedKeyboardHandler = void 0;
7
+ var _reactNativeReanimated = require("react-native-reanimated");
8
+ const useAnimatedKeyboardHandler = (handlers, dependencies) => {
9
+ const {
10
+ context,
11
+ doDependenciesDiffer
12
+ } = (0, _reactNativeReanimated.useHandler)(handlers, dependencies);
13
+ return (0, _reactNativeReanimated.useEvent)(event => {
14
+ "worklet";
15
+
16
+ const {
17
+ onKeyboardMoveStart,
18
+ onKeyboardMove,
19
+ onKeyboardMoveEnd,
20
+ onKeyboardMoveInteractive
21
+ } = handlers;
22
+ if (onKeyboardMoveStart && event.eventName.endsWith("onKeyboardMoveStart")) {
23
+ onKeyboardMoveStart(event, context);
24
+ }
25
+ if (onKeyboardMove && event.eventName.endsWith("onKeyboardMove")) {
26
+ onKeyboardMove(event, context);
27
+ }
28
+ if (onKeyboardMoveEnd && event.eventName.endsWith("onKeyboardMoveEnd")) {
29
+ onKeyboardMoveEnd(event, context);
30
+ }
31
+ if (onKeyboardMoveInteractive && event.eventName.endsWith("onKeyboardMoveInteractive")) {
32
+ onKeyboardMoveInteractive(event, context);
33
+ }
34
+ }, ["onKeyboardMoveStart", "onKeyboardMove", "onKeyboardMoveEnd", "onKeyboardMoveInteractive"], doDependenciesDiffer);
35
+ };
36
+ exports.useAnimatedKeyboardHandler = useAnimatedKeyboardHandler;
37
+ const useFocusedInputLayoutHandler = (handlers, dependencies) => {
38
+ const {
39
+ context,
40
+ doDependenciesDiffer
41
+ } = (0, _reactNativeReanimated.useHandler)(handlers, dependencies);
42
+ return (0, _reactNativeReanimated.useEvent)(event => {
43
+ "worklet";
44
+
45
+ const {
46
+ onFocusedInputLayoutChanged
47
+ } = handlers;
48
+ if (onFocusedInputLayoutChanged && event.eventName.endsWith("onFocusedInputLayoutChanged")) {
49
+ onFocusedInputLayoutChanged(event, context);
50
+ }
51
+ }, ["onFocusedInputLayoutChanged"], doDependenciesDiffer);
52
+ };
53
+ exports.useFocusedInputLayoutHandler = useFocusedInputLayoutHandler;
54
+ const useFocusedInputTextHandler = (handlers, dependencies) => {
55
+ const {
56
+ context,
57
+ doDependenciesDiffer
58
+ } = (0, _reactNativeReanimated.useHandler)(handlers, dependencies);
59
+ return (0, _reactNativeReanimated.useEvent)(event => {
60
+ "worklet";
61
+
62
+ const {
63
+ onFocusedInputTextChanged
64
+ } = handlers;
65
+ if (onFocusedInputTextChanged && event.eventName.endsWith("onFocusedInputTextChanged")) {
66
+ onFocusedInputTextChanged(event, context);
67
+ }
68
+ }, ["onFocusedInputTextChanged"], doDependenciesDiffer);
69
+ };
70
+ exports.useFocusedInputTextHandler = useFocusedInputTextHandler;
71
+ const useFocusedInputSelectionHandler = (handlers, dependencies) => {
72
+ const {
73
+ context,
74
+ doDependenciesDiffer
75
+ } = (0, _reactNativeReanimated.useHandler)(handlers, dependencies);
76
+ return (0, _reactNativeReanimated.useEvent)(event => {
77
+ "worklet";
78
+
79
+ const {
80
+ onFocusedInputSelectionChanged
81
+ } = handlers;
82
+ if (onFocusedInputSelectionChanged && event.eventName.endsWith("onFocusedInputSelectionChanged")) {
83
+ onFocusedInputSelectionChanged(event, context);
84
+ }
85
+ }, ["onFocusedInputSelectionChanged"], doDependenciesDiffer);
86
+ };
87
+ exports.useFocusedInputSelectionHandler = useFocusedInputSelectionHandler;
88
+ //# sourceMappingURL=reanimated.native.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNativeReanimated","require","useAnimatedKeyboardHandler","handlers","dependencies","context","doDependenciesDiffer","useHandler","useEvent","event","onKeyboardMoveStart","onKeyboardMove","onKeyboardMoveEnd","onKeyboardMoveInteractive","eventName","endsWith","exports","useFocusedInputLayoutHandler","onFocusedInputLayoutChanged","useFocusedInputTextHandler","onFocusedInputTextChanged","useFocusedInputSelectionHandler","onFocusedInputSelectionChanged"],"sources":["reanimated.native.ts"],"sourcesContent":["import { useEvent, useHandler } from \"react-native-reanimated\";\r\n\r\nimport type {\r\n EventWithName,\r\n FocusedInputLayoutChangedEvent,\r\n FocusedInputLayoutHandlerHook,\r\n FocusedInputSelectionChangedEvent,\r\n FocusedInputSelectionHandlerHook,\r\n FocusedInputTextChangedEvent,\r\n FocusedInputTextHandlerHook,\r\n KeyboardHandlerHook,\r\n NativeEvent,\r\n} from \"./types\";\r\n\r\ntype EventContext = Record<string, unknown>;\r\n\r\nexport const useAnimatedKeyboardHandler: KeyboardHandlerHook<\r\n EventContext,\r\n EventWithName<NativeEvent>\r\n> = (handlers, dependencies) => {\r\n const { context, doDependenciesDiffer } = useHandler(handlers, dependencies);\r\n\r\n return useEvent(\r\n (event) => {\r\n \"worklet\";\r\n const {\r\n onKeyboardMoveStart,\r\n onKeyboardMove,\r\n onKeyboardMoveEnd,\r\n onKeyboardMoveInteractive,\r\n } = handlers;\r\n\r\n if (\r\n onKeyboardMoveStart &&\r\n event.eventName.endsWith(\"onKeyboardMoveStart\")\r\n ) {\r\n onKeyboardMoveStart(event, context);\r\n }\r\n\r\n if (onKeyboardMove && event.eventName.endsWith(\"onKeyboardMove\")) {\r\n onKeyboardMove(event, context);\r\n }\r\n\r\n if (onKeyboardMoveEnd && event.eventName.endsWith(\"onKeyboardMoveEnd\")) {\r\n onKeyboardMoveEnd(event, context);\r\n }\r\n\r\n if (\r\n onKeyboardMoveInteractive &&\r\n event.eventName.endsWith(\"onKeyboardMoveInteractive\")\r\n ) {\r\n onKeyboardMoveInteractive(event, context);\r\n }\r\n },\r\n [\r\n \"onKeyboardMoveStart\",\r\n \"onKeyboardMove\",\r\n \"onKeyboardMoveEnd\",\r\n \"onKeyboardMoveInteractive\",\r\n ],\r\n doDependenciesDiffer,\r\n );\r\n};\r\n\r\nexport const useFocusedInputLayoutHandler: FocusedInputLayoutHandlerHook<\r\n EventContext,\r\n EventWithName<FocusedInputLayoutChangedEvent>\r\n> = (handlers, dependencies) => {\r\n const { context, doDependenciesDiffer } = useHandler(handlers, dependencies);\r\n\r\n return useEvent(\r\n (event) => {\r\n \"worklet\";\r\n const { onFocusedInputLayoutChanged } = handlers;\r\n\r\n if (\r\n onFocusedInputLayoutChanged &&\r\n event.eventName.endsWith(\"onFocusedInputLayoutChanged\")\r\n ) {\r\n onFocusedInputLayoutChanged(event, context);\r\n }\r\n },\r\n [\"onFocusedInputLayoutChanged\"],\r\n doDependenciesDiffer,\r\n );\r\n};\r\n\r\nexport const useFocusedInputTextHandler: FocusedInputTextHandlerHook<\r\n EventContext,\r\n EventWithName<FocusedInputTextChangedEvent>\r\n> = (handlers, dependencies) => {\r\n const { context, doDependenciesDiffer } = useHandler(handlers, dependencies);\r\n\r\n return useEvent(\r\n (event) => {\r\n \"worklet\";\r\n const { onFocusedInputTextChanged } = handlers;\r\n\r\n if (\r\n onFocusedInputTextChanged &&\r\n event.eventName.endsWith(\"onFocusedInputTextChanged\")\r\n ) {\r\n onFocusedInputTextChanged(event, context);\r\n }\r\n },\r\n [\"onFocusedInputTextChanged\"],\r\n doDependenciesDiffer,\r\n );\r\n};\r\n\r\nexport const useFocusedInputSelectionHandler: FocusedInputSelectionHandlerHook<\r\n EventContext,\r\n EventWithName<FocusedInputSelectionChangedEvent>\r\n> = (handlers, dependencies) => {\r\n const { context, doDependenciesDiffer } = useHandler(handlers, dependencies);\r\n\r\n return useEvent(\r\n (event) => {\r\n \"worklet\";\r\n const { onFocusedInputSelectionChanged } = handlers;\r\n\r\n if (\r\n onFocusedInputSelectionChanged &&\r\n event.eventName.endsWith(\"onFocusedInputSelectionChanged\")\r\n ) {\r\n onFocusedInputSelectionChanged(event, context);\r\n }\r\n },\r\n [\"onFocusedInputSelectionChanged\"],\r\n doDependenciesDiffer,\r\n );\r\n};\r\n"],"mappings":";;;;;;AAAA,IAAAA,sBAAA,GAAAC,OAAA;AAgBO,MAAMC,0BAGZ,GAAGA,CAACC,QAAQ,EAAEC,YAAY,KAAK;EAC9B,MAAM;IAAEC,OAAO;IAAEC;EAAqB,CAAC,GAAG,IAAAC,iCAAU,EAACJ,QAAQ,EAAEC,YAAY,CAAC;EAE5E,OAAO,IAAAI,+BAAQ,EACZC,KAAK,IAAK;IACT,SAAS;;IACT,MAAM;MACJC,mBAAmB;MACnBC,cAAc;MACdC,iBAAiB;MACjBC;IACF,CAAC,GAAGV,QAAQ;IAEZ,IACEO,mBAAmB,IACnBD,KAAK,CAACK,SAAS,CAACC,QAAQ,CAAC,qBAAqB,CAAC,EAC/C;MACAL,mBAAmB,CAACD,KAAK,EAAEJ,OAAO,CAAC;IACrC;IAEA,IAAIM,cAAc,IAAIF,KAAK,CAACK,SAAS,CAACC,QAAQ,CAAC,gBAAgB,CAAC,EAAE;MAChEJ,cAAc,CAACF,KAAK,EAAEJ,OAAO,CAAC;IAChC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,yBAAyB,IACzBX,KAAK,CAACK,SAAS,CAACC,QAAQ,CAAC,2BAA2B,CAAC,EACrD;MACAK,yBAAyB,CAACX,KAAK,EAAEJ,OAAO,CAAC;IAC3C;EACF,CAAC,EACD,CAAC,2BAA2B,CAAC,EAC7BC,oBACF,CAAC;AACH,CAAC;AAACU,OAAA,CAAAG,0BAAA,GAAAA,0BAAA;AAEK,MAAME,+BAGZ,GAAGA,CAAClB,QAAQ,EAAEC,YAAY,KAAK;EAC9B,MAAM;IAAEC,OAAO;IAAEC;EAAqB,CAAC,GAAG,IAAAC,iCAAU,EAACJ,QAAQ,EAAEC,YAAY,CAAC;EAE5E,OAAO,IAAAI,+BAAQ,EACZC,KAAK,IAAK;IACT,SAAS;;IACT,MAAM;MAAEa;IAA+B,CAAC,GAAGnB,QAAQ;IAEnD,IACEmB,8BAA8B,IAC9Bb,KAAK,CAACK,SAAS,CAACC,QAAQ,CAAC,gCAAgC,CAAC,EAC1D;MACAO,8BAA8B,CAACb,KAAK,EAAEJ,OAAO,CAAC;IAChD;EACF,CAAC,EACD,CAAC,gCAAgC,CAAC,EAClCC,oBACF,CAAC;AACH,CAAC;AAACU,OAAA,CAAAK,+BAAA,GAAAA,+BAAA","ignoreList":[]}
@@ -0,0 +1,10 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ var _default = exports.default = (0, _codegenNativeComponent.default)("RNKeyboardControllerView");
10
+ //# sourceMappingURL=KeyboardControllerViewNativeComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","default","_default","exports","codegenNativeComponent"],"sources":["KeyboardControllerViewNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from \"react-native/Libraries/Utilities/codegenNativeComponent\";\r\n\r\nimport type { HostComponent } from \"react-native\";\r\nimport type { ViewProps } from \"react-native/Libraries/Components/View/ViewPropTypes\";\r\nimport type {\r\n DirectEventHandler,\r\n Double,\r\n Int32,\r\n} from \"react-native/Libraries/Types/CodegenTypes\";\r\n\r\ntype KeyboardMoveEvent = Readonly<{\r\n height: Double;\r\n progress: Double;\r\n duration: Int32;\r\n target: Int32;\r\n}>;\r\n\r\ntype FocusedInputLayoutChangedEvent = Readonly<{\r\n target: Int32;\r\n parentScrollViewTarget: Int32;\r\n layout: {\r\n x: Double;\r\n y: Double;\r\n width: Double;\r\n height: Double;\r\n absoluteX: Double;\r\n absoluteY: Double;\r\n };\r\n}>;\r\n\r\ntype FocusedInputTextChangedEvent = Readonly<{\r\n text: string;\r\n}>;\r\n\r\ntype FocusedInputSelectionChangedEvent = Readonly<{\r\n target: Int32;\r\n selection: {\r\n start: {\r\n x: Double;\r\n y: Double;\r\n position: Int32;\r\n };\r\n end: {\r\n x: Double;\r\n y: Double;\r\n position: Int32;\r\n };\r\n };\r\n}>;\r\n\r\nexport interface NativeProps extends ViewProps {\r\n // props\r\n enabled?: boolean;\r\n statusBarTranslucent?: boolean;\r\n navigationBarTranslucent?: boolean;\r\n // callbacks\r\n /// keyboard\r\n onKeyboardMoveStart?: DirectEventHandler<KeyboardMoveEvent>;\r\n onKeyboardMove?: DirectEventHandler<KeyboardMoveEvent>;\r\n onKeyboardMoveEnd?: DirectEventHandler<KeyboardMoveEvent>;\r\n onKeyboardMoveInteractive?: DirectEventHandler<KeyboardMoveEvent>;\r\n /// focused input\r\n onFocusedInputLayoutChanged?: DirectEventHandler<FocusedInputLayoutChangedEvent>;\r\n onFocusedInputTextChanged?: DirectEventHandler<FocusedInputTextChangedEvent>;\r\n onFocusedInputSelectionChanged?: DirectEventHandler<FocusedInputSelectionChangedEvent>;\r\n}\r\n\r\nexport default codegenNativeComponent<NativeProps>(\r\n \"RNKeyboardControllerView\",\r\n) as HostComponent<NativeProps>;\r\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAmE9E,IAAAG,+BAAsB,EACnC,0BACF,CAAC","ignoreList":[]}
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _codegenNativeComponent = _interopRequireDefault(require("react-native/Libraries/Utilities/codegenNativeComponent"));
8
+ function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
9
+ var _default = exports.default = (0, _codegenNativeComponent.default)("RNKeyboardGestureArea", {
10
+ excludedPlatforms: ["iOS"]
11
+ });
12
+ //# sourceMappingURL=KeyboardGestureAreaNativeComponent.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_codegenNativeComponent","_interopRequireDefault","require","e","__esModule","default","_default","exports","codegenNativeComponent","excludedPlatforms"],"sources":["KeyboardGestureAreaNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from \"react-native/Libraries/Utilities/codegenNativeComponent\";\r\n\r\nimport type { HostComponent } from \"react-native\";\r\nimport type { ViewProps } from \"react-native/Libraries/Components/View/ViewPropTypes\";\r\nimport type { WithDefault } from \"react-native/Libraries/Types/CodegenTypes\";\r\n\r\nexport interface NativeProps extends ViewProps {\r\n interpolator?: WithDefault<\"linear\" | \"ios\", \"linear\">;\r\n showOnSwipeUp?: boolean;\r\n enableSwipeToDismiss?: boolean;\r\n}\r\n\r\nexport default codegenNativeComponent<NativeProps>(\"RNKeyboardGestureArea\", {\r\n excludedPlatforms: [\"iOS\"],\r\n}) as HostComponent<NativeProps>;\r\n"],"mappings":";;;;;;AAAA,IAAAA,uBAAA,GAAAC,sBAAA,CAAAC,OAAA;AAA6F,SAAAD,uBAAAE,CAAA,WAAAA,CAAA,IAAAA,CAAA,CAAAC,UAAA,GAAAD,CAAA,KAAAE,OAAA,EAAAF,CAAA;AAAA,IAAAG,QAAA,GAAAC,OAAA,CAAAF,OAAA,GAY9E,IAAAG,+BAAsB,EAAc,uBAAuB,EAAE;EAC1EC,iBAAiB,EAAE,CAAC,KAAK;AAC3B,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _default = exports.default = _reactNative.TurboModuleRegistry.get("KeyboardController");
9
+ //# sourceMappingURL=NativeKeyboardController.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","get"],"sources":["NativeKeyboardController.ts"],"sourcesContent":["import { TurboModuleRegistry } from \"react-native\";\r\n\r\nimport type { TurboModule } from \"react-native\";\r\n\r\nexport interface Spec extends TurboModule {\r\n readonly getConstants: () => {};\r\n\r\n // methods\r\n setInputMode(mode: number): void;\r\n setDefaultMode(): void;\r\n dismiss(): void;\r\n setFocusTo(direction: string): void;\r\n\r\n // event emitter\r\n addListener: (eventName: string) => void;\r\n removeListeners: (count: number) => void;\r\n}\r\n\r\nexport default TurboModuleRegistry.get<Spec>(\"KeyboardController\");\r\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAkBpCC,gCAAmB,CAACC,GAAG,CAAO,oBAAoB,CAAC","ignoreList":[]}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.default = void 0;
7
+ var _reactNative = require("react-native");
8
+ var _default = exports.default = _reactNative.TurboModuleRegistry.get("StatusBarManagerCompat");
9
+ //# sourceMappingURL=NativeStatusBarManagerCompat.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["_reactNative","require","_default","exports","default","TurboModuleRegistry","get"],"sources":["NativeStatusBarManagerCompat.ts"],"sourcesContent":["import { TurboModuleRegistry } from \"react-native\";\r\n\r\nimport type { TurboModule } from \"react-native\";\r\n\r\nexport interface Spec extends TurboModule {\r\n readonly getConstants: () => {};\r\n\r\n setHidden(hidden: boolean): void;\r\n setColor(color: number, animated: boolean): void;\r\n setTranslucent(translucent: boolean): void;\r\n setStyle(style: string): void;\r\n}\r\n\r\nexport default TurboModuleRegistry.get<Spec>(\"StatusBarManagerCompat\");\r\n"],"mappings":";;;;;;AAAA,IAAAA,YAAA,GAAAC,OAAA;AAAmD,IAAAC,QAAA,GAAAC,OAAA,CAAAC,OAAA,GAapCC,gCAAmB,CAACC,GAAG,CAAO,wBAAwB,CAAC","ignoreList":[]}
@@ -0,0 +1,6 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ //# sourceMappingURL=types.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\r\n EmitterSubscription,\r\n NativeSyntheticEvent,\r\n ViewProps,\r\n} from \"react-native\";\r\n\r\n// DirectEventHandler events declaration\r\nexport type NativeEvent = {\r\n progress: number;\r\n height: number;\r\n duration: number;\r\n target: number;\r\n};\r\nexport type FocusedInputLayoutChangedEvent = {\r\n target: number;\r\n parentScrollViewTarget: number;\r\n layout: {\r\n x: number;\r\n y: number;\r\n width: number;\r\n height: number;\r\n absoluteX: number;\r\n absoluteY: number;\r\n };\r\n};\r\nexport type FocusedInputTextChangedEvent = {\r\n text: string;\r\n};\r\nexport type FocusedInputSelectionChangedEvent = {\r\n target: number;\r\n selection: {\r\n start: {\r\n x: number;\r\n y: number;\r\n position: number;\r\n };\r\n end: {\r\n x: number;\r\n y: number;\r\n position: number;\r\n };\r\n };\r\n};\r\nexport type EventWithName<T> = {\r\n eventName: string;\r\n} & T;\r\n\r\n// native View/Module declarations\r\nexport type KeyboardControllerProps = {\r\n // callback props\r\n onKeyboardMoveStart?: (\r\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\r\n ) => void;\r\n onKeyboardMove?: (\r\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\r\n ) => void;\r\n onKeyboardMoveEnd?: (\r\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\r\n ) => void;\r\n onKeyboardMoveInteractive?: (\r\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\r\n ) => void;\r\n onFocusedInputLayoutChanged?: (\r\n e: NativeSyntheticEvent<EventWithName<FocusedInputLayoutChangedEvent>>,\r\n ) => void;\r\n onFocusedInputTextChanged?: (\r\n e: NativeSyntheticEvent<EventWithName<FocusedInputTextChangedEvent>>,\r\n ) => void;\r\n onFocusedInputSelectionChanged?: (\r\n e: NativeSyntheticEvent<EventWithName<FocusedInputSelectionChangedEvent>>,\r\n ) => void;\r\n // fake props used to activate reanimated bindings\r\n onKeyboardMoveReanimated?: (\r\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\r\n ) => void;\r\n onFocusedInputLayoutChangedReanimated?: (\r\n e: NativeSyntheticEvent<EventWithName<FocusedInputLayoutChangedEvent>>,\r\n ) => void;\r\n onFocusedInputTextChangedReanimated?: (\r\n e: NativeSyntheticEvent<EventWithName<FocusedInputTextChangedEvent>>,\r\n ) => void;\r\n onFocusedInputSelectionChangedReanimated?: (\r\n e: NativeSyntheticEvent<EventWithName<FocusedInputSelectionChangedEvent>>,\r\n ) => void;\r\n // props\r\n statusBarTranslucent?: boolean;\r\n navigationBarTranslucent?: boolean;\r\n enabled?: boolean;\r\n} & ViewProps;\r\n\r\nexport type KeyboardGestureAreaProps = {\r\n interpolator: \"ios\" | \"linear\";\r\n /**\r\n * Whether to allow to show a keyboard from dismissed state by swipe up.\r\n * Default to `false`.\r\n */\r\n showOnSwipeUp?: boolean;\r\n /**\r\n * Whether to allow to control a keyboard by gestures. The strategy how\r\n * it should be controlled is determined by `interpolator` property.\r\n * Defaults to `true`.\r\n */\r\n enableSwipeToDismiss?: boolean;\r\n} & ViewProps;\r\n\r\nexport type Direction = \"next\" | \"prev\" | \"current\";\r\nexport type KeyboardControllerModule = {\r\n // android only\r\n setDefaultMode: () => void;\r\n setInputMode: (mode: number) => void;\r\n // all platforms\r\n dismiss: () => void;\r\n setFocusTo: (direction: Direction) => void;\r\n // native event module stuff\r\n addListener: (eventName: string) => void;\r\n removeListeners: (count: number) => void;\r\n};\r\n\r\n// Event module declarations\r\nexport type KeyboardControllerEvents =\r\n | \"keyboardWillShow\"\r\n | \"keyboardDidShow\"\r\n | \"keyboardWillHide\"\r\n | \"keyboardDidHide\";\r\nexport type KeyboardEventData = {\r\n height: number;\r\n duration: number;\r\n timestamp: number;\r\n target: number;\r\n};\r\nexport type KeyboardEventsModule = {\r\n addListener: (\r\n name: KeyboardControllerEvents,\r\n cb: (e: KeyboardEventData) => void,\r\n ) => EmitterSubscription;\r\n};\r\nexport type FocusedInputAvailableEvents = \"focusDidSet\";\r\nexport type FocusedInputEventData = {\r\n current: number;\r\n count: number;\r\n};\r\nexport type FocusedInputEventsModule = {\r\n addListener: (\r\n name: FocusedInputAvailableEvents,\r\n cb: (e: FocusedInputEventData) => void,\r\n ) => EmitterSubscription;\r\n};\r\nexport type WindowDimensionsAvailableEvents = \"windowDidResize\";\r\nexport type WindowDimensionsEventData = {\r\n width: number;\r\n height: number;\r\n};\r\nexport type WindowDimensionsEventsModule = {\r\n addListener: (\r\n name: WindowDimensionsAvailableEvents,\r\n cb: (e: WindowDimensionsEventData) => void,\r\n ) => EmitterSubscription;\r\n};\r\n\r\n// reanimated hook declaration\r\nexport type KeyboardHandlerHook<TContext, Event> = (\r\n handlers: {\r\n onKeyboardMoveStart?: (e: NativeEvent, context: TContext) => void;\r\n onKeyboardMove?: (e: NativeEvent, context: TContext) => void;\r\n onKeyboardMoveEnd?: (e: NativeEvent, context: TContext) => void;\r\n onKeyboardMoveInteractive?: (e: NativeEvent, context: TContext) => void;\r\n },\r\n dependencies?: unknown[],\r\n) => (e: NativeSyntheticEvent<Event>) => void;\r\nexport type FocusedInputLayoutHandlerHook<TContext, Event> = (\r\n handlers: {\r\n onFocusedInputLayoutChanged?: (\r\n e: FocusedInputLayoutChangedEvent,\r\n context: TContext,\r\n ) => void;\r\n },\r\n dependencies?: unknown[],\r\n) => (e: NativeSyntheticEvent<Event>) => void;\r\nexport type FocusedInputTextHandlerHook<TContext, Event> = (\r\n handlers: {\r\n onFocusedInputTextChanged?: (\r\n e: FocusedInputTextChangedEvent,\r\n context: TContext,\r\n ) => void;\r\n },\r\n dependencies?: unknown[],\r\n) => (e: NativeSyntheticEvent<Event>) => void;\r\nexport type FocusedInputSelectionHandlerHook<TContext, Event> = (\r\n handlers: {\r\n onFocusedInputSelectionChanged?: (\r\n e: FocusedInputSelectionChangedEvent,\r\n context: TContext,\r\n ) => void;\r\n },\r\n dependencies?: unknown[],\r\n) => (e: NativeSyntheticEvent<Event>) => void;\r\n\r\n// package types\r\nexport type Handlers<T> = Record<string, T | undefined>;\r\nexport type KeyboardHandler = Partial<{\r\n onStart: (e: NativeEvent) => void;\r\n onMove: (e: NativeEvent) => void;\r\n onEnd: (e: NativeEvent) => void;\r\n onInteractive: (e: NativeEvent) => void;\r\n}>;\r\nexport type KeyboardHandlers = Handlers<KeyboardHandler>;\r\nexport type FocusedInputHandler = Partial<{\r\n onChangeText: (e: FocusedInputTextChangedEvent) => void;\r\n onSelectionChange: (e: FocusedInputSelectionChangedEvent) => void;\r\n}>;\r\nexport type FocusedInputHandlers = Handlers<FocusedInputHandler>;\r\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,9 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.uuid = void 0;
7
+ const uuid = () => Math.random().toString(36).slice(-6);
8
+ exports.uuid = uuid;
9
+ //# sourceMappingURL=utils.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["uuid","Math","random","toString","slice","exports"],"sources":["utils.ts"],"sourcesContent":["export const uuid = () => Math.random().toString(36).slice(-6);\r\n"],"mappings":";;;;;;AAAO,MAAMA,IAAI,GAAGA,CAAA,KAAMC,IAAI,CAACC,MAAM,CAAC,CAAC,CAACC,QAAQ,CAAC,EAAE,CAAC,CAACC,KAAK,CAAC,CAAC,CAAC,CAAC;AAACC,OAAA,CAAAL,IAAA,GAAAA,IAAA","ignoreList":[]}
@@ -0,0 +1,166 @@
1
+ import React, { useEffect, useMemo, useState } from "react";
2
+ import { Animated, Platform, StyleSheet } from "react-native";
3
+ import Reanimated, { useSharedValue } from "react-native-reanimated";
4
+ import { KeyboardControllerView } from "./bindings";
5
+ import { KeyboardContext } from "./context";
6
+ import { useAnimatedValue, useSharedHandlers } from "./internal";
7
+ import { applyMonkeyPatch, revertMonkeyPatch } from "./monkey-patch";
8
+ import { useAnimatedKeyboardHandler, useFocusedInputLayoutHandler, useFocusedInputSelectionHandler, useFocusedInputTextHandler } from "./reanimated";
9
+ const KeyboardControllerViewAnimated = Reanimated.createAnimatedComponent(Animated.createAnimatedComponent(KeyboardControllerView));
10
+ const styles = StyleSheet.create({
11
+ container: {
12
+ flex: 1
13
+ },
14
+ hidden: {
15
+ display: "none",
16
+ position: "absolute"
17
+ }
18
+ });
19
+ // capture `Platform.OS` in separate variable to avoid deep workletization of entire RN package
20
+ // see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/393 and https://github.com/kirillzyusko/react-native-keyboard-controller/issues/294 for more details
21
+ const OS = Platform.OS;
22
+ export const KeyboardProvider = ({
23
+ children,
24
+ statusBarTranslucent,
25
+ navigationBarTranslucent,
26
+ enabled: initiallyEnabled = true
27
+ }) => {
28
+ // state
29
+ const [enabled, setEnabled] = useState(initiallyEnabled);
30
+ // animated values
31
+ const progress = useAnimatedValue(0);
32
+ const height = useAnimatedValue(0);
33
+ // shared values
34
+ const progressSV = useSharedValue(0);
35
+ const heightSV = useSharedValue(0);
36
+ const layout = useSharedValue(null);
37
+ const [setKeyboardHandlers, broadcastKeyboardEvents] = useSharedHandlers();
38
+ const [setInputHandlers, broadcastInputEvents] = useSharedHandlers();
39
+ // memo
40
+ const context = useMemo(() => ({
41
+ enabled,
42
+ animated: {
43
+ progress: progress,
44
+ height: Animated.multiply(height, -1)
45
+ },
46
+ reanimated: {
47
+ progress: progressSV,
48
+ height: heightSV
49
+ },
50
+ layout,
51
+ setKeyboardHandlers,
52
+ setInputHandlers,
53
+ setEnabled
54
+ }), [enabled]);
55
+ const style = useMemo(() => [styles.hidden, {
56
+ transform: [{
57
+ translateX: height
58
+ }, {
59
+ translateY: progress
60
+ }]
61
+ }], []);
62
+ const onKeyboardMove = useMemo(() => Animated.event([{
63
+ nativeEvent: {
64
+ progress,
65
+ height
66
+ }
67
+ }], {
68
+ useNativeDriver: Platform.OS == 'harmony' ? false : true
69
+ }), []);
70
+ // handlers
71
+ const updateSharedValues = (event, platforms) => {
72
+ "worklet";
73
+
74
+ if (platforms.includes(OS)) {
75
+ // eslint-disable-next-line react-compiler/react-compiler
76
+ progressSV.value = event.progress;
77
+ heightSV.value = -event.height;
78
+ }
79
+ };
80
+ const keyboardHandler = useAnimatedKeyboardHandler({
81
+ onKeyboardMoveStart: event => {
82
+ "worklet";
83
+
84
+ broadcastKeyboardEvents("onStart", event);
85
+ updateSharedValues(event, ["ios"]);
86
+ },
87
+ onKeyboardMove: event => {
88
+ "worklet";
89
+
90
+ broadcastKeyboardEvents("onMove", event);
91
+ updateSharedValues(event, ["android"]);
92
+ },
93
+ onKeyboardMoveEnd: event => {
94
+ "worklet";
95
+
96
+ broadcastKeyboardEvents("onEnd", event);
97
+ updateSharedValues(event, ['harmony']);
98
+ },
99
+ onKeyboardMoveInteractive: event => {
100
+ "worklet";
101
+
102
+ updateSharedValues(event, ["android", "ios"]);
103
+ broadcastKeyboardEvents("onInteractive", event);
104
+ }
105
+ }, []);
106
+ const inputLayoutHandler = useFocusedInputLayoutHandler({
107
+ onFocusedInputLayoutChanged: e => {
108
+ "worklet";
109
+
110
+ if (e.target !== -1) {
111
+ layout.value = e;
112
+ } else {
113
+ layout.value = null;
114
+ }
115
+ }
116
+ }, []);
117
+ const inputTextHandler = useFocusedInputTextHandler({
118
+ onFocusedInputTextChanged: e => {
119
+ "worklet";
120
+
121
+ broadcastInputEvents("onChangeText", e);
122
+ }
123
+ }, []);
124
+ const inputSelectionHandler = useFocusedInputSelectionHandler({
125
+ onFocusedInputSelectionChanged: e => {
126
+ "worklet";
127
+
128
+ broadcastInputEvents("onSelectionChange", e);
129
+ }
130
+ }, []);
131
+ // effects
132
+ useEffect(() => {
133
+ if (enabled) {
134
+ applyMonkeyPatch();
135
+ } else {
136
+ revertMonkeyPatch();
137
+ }
138
+ }, [enabled]);
139
+ return /*#__PURE__*/React.createElement(KeyboardContext.Provider, {
140
+ value: context
141
+ }, /*#__PURE__*/React.createElement(KeyboardControllerViewAnimated, {
142
+ enabled: enabled,
143
+ onKeyboardMoveReanimated: keyboardHandler,
144
+ onKeyboardMoveStart: OS === "ios" ? onKeyboardMove : undefined,
145
+ onKeyboardMove: OS === "android" ? onKeyboardMove : undefined,
146
+ onKeyboardMoveInteractive: onKeyboardMove,
147
+ onKeyboardMoveEnd: OS === "harmony" ? onKeyboardMove : undefined,
148
+ onFocusedInputLayoutChangedReanimated: inputLayoutHandler,
149
+ onFocusedInputTextChangedReanimated: inputTextHandler,
150
+ onFocusedInputSelectionChangedReanimated: inputSelectionHandler,
151
+ navigationBarTranslucent: navigationBarTranslucent,
152
+ statusBarTranslucent: statusBarTranslucent,
153
+ style: styles.container
154
+ }, /*#__PURE__*/React.createElement(Reanimated.View, null, children)), /*#__PURE__*/React.createElement(Animated.View, {
155
+ // we are using this small hack, because if the component (where
156
+ // animated value has been used) is unmounted, then animation will
157
+ // stop receiving events (seems like it's react-native optimization).
158
+ // So we need to keep a reference to the animated value, to keep it's
159
+ // always mounted (keep a reference to an animated value).
160
+ //
161
+ // To test why it's needed, try to open screen which consumes Animated.Value
162
+ // then close it and open it again (for example 'Animated transition').
163
+ style: style
164
+ }));
165
+ };
166
+ //# sourceMappingURL=animated.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useEffect","useMemo","useState","Animated","Platform","StyleSheet","Reanimated","useSharedValue","KeyboardControllerView","KeyboardContext","useAnimatedValue","useSharedHandlers","applyMonkeyPatch","revertMonkeyPatch","useAnimatedKeyboardHandler","useFocusedInputLayoutHandler","useFocusedInputSelectionHandler","useFocusedInputTextHandler","KeyboardControllerViewAnimated","createAnimatedComponent","styles","create","container","flex","hidden","display","position","OS","KeyboardProvider","children","statusBarTranslucent","navigationBarTranslucent","enabled","initiallyEnabled","setEnabled","progress","height","progressSV","heightSV","layout","setKeyboardHandlers","broadcastKeyboardEvents","setInputHandlers","broadcastInputEvents","context","animated","multiply","reanimated","style","transform","translateX","translateY","onKeyboardMove","event","nativeEvent","useNativeDriver","updateSharedValues","platforms","includes","value","keyboardHandler","onKeyboardMoveStart","onKeyboardMoveEnd","onKeyboardMoveInteractive","inputLayoutHandler","onFocusedInputLayoutChanged","e","target","inputTextHandler","onFocusedInputTextChanged","inputSelectionHandler","onFocusedInputSelectionChanged","createElement","Provider","onKeyboardMoveReanimated","undefined","onFocusedInputLayoutChangedReanimated","onFocusedInputTextChangedReanimated","onFocusedInputSelectionChangedReanimated","View"],"sources":["animated.tsx"],"sourcesContent":["import React, { useEffect, useMemo, useState } from \"react\";\r\nimport { Animated, Platform, StyleSheet } from \"react-native\";\r\nimport Reanimated, { useSharedValue } from \"react-native-reanimated\";\r\n\r\nimport { KeyboardControllerView } from \"./bindings\";\r\nimport { KeyboardContext } from \"./context\";\r\nimport { useAnimatedValue, useSharedHandlers } from \"./internal\";\r\nimport { applyMonkeyPatch, revertMonkeyPatch } from \"./monkey-patch\";\r\nimport {\r\n useAnimatedKeyboardHandler,\r\n useFocusedInputLayoutHandler,\r\n useFocusedInputSelectionHandler,\r\n useFocusedInputTextHandler,\r\n} from \"./reanimated\";\r\n\r\nimport type { KeyboardAnimationContext } from \"./context\";\r\nimport type {\r\n FocusedInputHandler,\r\n FocusedInputLayoutChangedEvent,\r\n KeyboardControllerProps,\r\n KeyboardHandler,\r\n NativeEvent,\r\n} from \"./types\";\r\nimport type { ViewStyle } from \"react-native\";\r\n\r\nconst KeyboardControllerViewAnimated = Reanimated.createAnimatedComponent(\r\n Animated.createAnimatedComponent(\r\n KeyboardControllerView,\r\n ) as React.FC<KeyboardControllerProps>,\r\n);\r\n\r\ntype Styles = {\r\n container: ViewStyle;\r\n hidden: ViewStyle;\r\n};\r\n\r\nconst styles = StyleSheet.create<Styles>({\r\n container: {\r\n flex: 1,\r\n },\r\n hidden: {\r\n display: \"none\",\r\n position: \"absolute\",\r\n },\r\n});\r\n\r\ntype KeyboardProviderProps = {\r\n children: React.ReactNode;\r\n /**\r\n * Set the value to `true`, if you use translucent status bar on Android.\r\n * If you already control status bar translucency via `react-native-screens`\r\n * or `StatusBar` component from `react-native`, you can ignore it.\r\n * Defaults to `false`.\r\n *\r\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/14\r\n * @platform android\r\n */\r\n statusBarTranslucent?: boolean;\r\n /**\r\n * Set the value to `true`, if you use translucent navigation bar on Android.\r\n * Defaults to `false`.\r\n *\r\n * @see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/119\r\n * @platform android\r\n */\r\n navigationBarTranslucent?: boolean;\r\n /**\r\n * A boolean prop indicating whether the module is enabled. It indicate only initial state,\r\n * i. e. if you try to change this prop after component mount it will not have any effect.\r\n * To change the property in runtime use `useKeyboardController` hook and `setEnabled` method.\r\n * Defaults to `true`.\r\n */\r\n enabled?: boolean;\r\n};\r\n\r\n// capture `Platform.OS` in separate variable to avoid deep workletization of entire RN package\r\n// see https://github.com/kirillzyusko/react-native-keyboard-controller/issues/393 and https://github.com/kirillzyusko/react-native-keyboard-controller/issues/294 for more details\r\nconst OS = Platform.OS;\r\n\r\nexport const KeyboardProvider = ({\r\n children,\r\n statusBarTranslucent,\r\n navigationBarTranslucent,\r\n enabled: initiallyEnabled = true,\r\n}: KeyboardProviderProps) => {\r\n // state\r\n const [enabled, setEnabled] = useState(initiallyEnabled);\r\n // animated values\r\n const progress = useAnimatedValue(0);\r\n const height = useAnimatedValue(0);\r\n // shared values\r\n const progressSV = useSharedValue(0);\r\n const heightSV = useSharedValue(0);\r\n const layout = useSharedValue<FocusedInputLayoutChangedEvent | null>(null);\r\n const [setKeyboardHandlers, broadcastKeyboardEvents] =\r\n useSharedHandlers<KeyboardHandler>();\r\n const [setInputHandlers, broadcastInputEvents] =\r\n useSharedHandlers<FocusedInputHandler>();\r\n // memo\r\n const context = useMemo<KeyboardAnimationContext>(\r\n () => ({\r\n enabled,\r\n animated: { progress: progress, height: Animated.multiply(height,-1) },\r\n reanimated: { progress: progressSV, height: heightSV },\r\n layout,\r\n setKeyboardHandlers,\r\n setInputHandlers,\r\n setEnabled,\r\n }),\r\n [enabled],\r\n );\r\n const style = useMemo(\r\n () => [\r\n styles.hidden,\r\n { transform: [{ translateX: height }, { translateY: progress }] },\r\n ],\r\n [],\r\n );\r\n const onKeyboardMove = useMemo(\r\n () =>\r\n Animated.event(\r\n [\r\n {\r\n nativeEvent: {\r\n progress,\r\n height,\r\n },\r\n },\r\n ],\r\n { useNativeDriver:Platform.OS as string=='harmony'?false:true },\r\n ),\r\n [],\r\n );\r\n // handlers\r\n const updateSharedValues = (event: NativeEvent, platforms: string[]) => {\r\n \"worklet\";\r\n\r\n if (platforms.includes(OS)) {\r\n // eslint-disable-next-line react-compiler/react-compiler\r\n progressSV.value = event.progress;\r\n heightSV.value = -event.height;\r\n }\r\n };\r\n const keyboardHandler = useAnimatedKeyboardHandler(\r\n {\r\n onKeyboardMoveStart: (event: NativeEvent) => {\r\n \"worklet\";\r\n\r\n broadcastKeyboardEvents(\"onStart\", event);\r\n updateSharedValues(event, [\"ios\"]);\r\n },\r\n onKeyboardMove: (event: NativeEvent) => {\r\n \"worklet\";\r\n\r\n broadcastKeyboardEvents(\"onMove\", event);\r\n updateSharedValues(event, [\"android\"]);\r\n },\r\n onKeyboardMoveEnd: (event: NativeEvent) => {\r\n \"worklet\";\r\n broadcastKeyboardEvents(\"onEnd\", event);\r\n updateSharedValues(event, ['harmony']);\r\n },\r\n onKeyboardMoveInteractive: (event: NativeEvent) => {\r\n \"worklet\";\r\n\r\n updateSharedValues(event, [\"android\", \"ios\"]);\r\n broadcastKeyboardEvents(\"onInteractive\", event);\r\n },\r\n },\r\n [],\r\n );\r\n const inputLayoutHandler = useFocusedInputLayoutHandler(\r\n {\r\n onFocusedInputLayoutChanged: (e) => {\r\n \"worklet\";\r\n\r\n if (e.target !== -1) {\r\n layout.value = e;\r\n } else {\r\n layout.value = null;\r\n }\r\n },\r\n },\r\n [],\r\n );\r\n const inputTextHandler = useFocusedInputTextHandler(\r\n {\r\n onFocusedInputTextChanged: (e) => {\r\n \"worklet\";\r\n\r\n broadcastInputEvents(\"onChangeText\", e);\r\n },\r\n },\r\n [],\r\n );\r\n const inputSelectionHandler = useFocusedInputSelectionHandler(\r\n {\r\n onFocusedInputSelectionChanged: (e) => {\r\n \"worklet\";\r\n broadcastInputEvents(\"onSelectionChange\", e);\r\n },\r\n },\r\n [],\r\n );\r\n // effects\r\n useEffect(() => {\r\n if (enabled) {\r\n applyMonkeyPatch();\r\n } else {\r\n revertMonkeyPatch();\r\n }\r\n }, [enabled]);\r\n\r\n return (\r\n <KeyboardContext.Provider value={context}>\r\n <KeyboardControllerViewAnimated\r\n enabled={enabled}\r\n onKeyboardMoveReanimated={keyboardHandler}\r\n onKeyboardMoveStart={OS === \"ios\" ? onKeyboardMove : undefined}\r\n onKeyboardMove={OS === \"android\" ? onKeyboardMove : undefined}\r\n onKeyboardMoveInteractive={onKeyboardMove}\r\n onKeyboardMoveEnd={ OS as string === \"harmony\"?onKeyboardMove:undefined}\r\n onFocusedInputLayoutChangedReanimated={inputLayoutHandler}\r\n onFocusedInputTextChangedReanimated={inputTextHandler}\r\n onFocusedInputSelectionChangedReanimated={inputSelectionHandler}\r\n navigationBarTranslucent={navigationBarTranslucent}\r\n statusBarTranslucent={statusBarTranslucent}\r\n style={styles.container}\r\n >\r\n <Reanimated.View>{children}</Reanimated.View>\r\n {/* {children} */}\r\n </KeyboardControllerViewAnimated>\r\n <Animated.View\r\n // we are using this small hack, because if the component (where\r\n // animated value has been used) is unmounted, then animation will\r\n // stop receiving events (seems like it's react-native optimization).\r\n // So we need to keep a reference to the animated value, to keep it's\r\n // always mounted (keep a reference to an animated value).\r\n //\r\n // To test why it's needed, try to open screen which consumes Animated.Value\r\n // then close it and open it again (for example 'Animated transition').\r\n style={style}\r\n />\r\n </KeyboardContext.Provider>\r\n );\r\n};\r\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,SAAS,EAAEC,OAAO,EAAEC,QAAQ,QAAQ,OAAO;AAC3D,SAASC,QAAQ,EAAEC,QAAQ,EAAEC,UAAU,QAAQ,cAAc;AAC7D,OAAOC,UAAU,IAAIC,cAAc,QAAQ,yBAAyB;AAEpE,SAASC,sBAAsB,QAAQ,YAAY;AACnD,SAASC,eAAe,QAAQ,WAAW;AAC3C,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,YAAY;AAChE,SAASC,gBAAgB,EAAEC,iBAAiB,QAAQ,gBAAgB;AACpE,SACEC,0BAA0B,EAC1BC,4BAA4B,EAC5BC,+BAA+B,EAC/BC,0BAA0B,QACrB,cAAc;AAYrB,MAAMC,8BAA8B,GAAGZ,UAAU,CAACa,uBAAuB,CACvEhB,QAAQ,CAACgB,uBAAuB,CAC9BX,sBACF,CACF,CAAC;AAOD,MAAMY,MAAM,GAAGf,UAAU,CAACgB,MAAM,CAAS;EACvCC,SAAS,EAAE;IACTC,IAAI,EAAE;EACR,CAAC;EACDC,MAAM,EAAE;IACNC,OAAO,EAAE,MAAM;IACfC,QAAQ,EAAE;EACZ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