react-native-keyboard-controller 1.13.4 → 1.14.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 (115) hide show
  1. package/README.md +1 -0
  2. package/android/src/fabric/java/com/reactnativekeyboardcontroller/KeyboardControllerModule.kt +5 -3
  3. package/android/src/fabric/java/com/reactnativekeyboardcontroller/KeyboardControllerViewManager.kt +19 -20
  4. package/android/src/fabric/java/com/reactnativekeyboardcontroller/KeyboardGestureAreaViewManager.kt +22 -12
  5. package/android/src/fabric/java/com/reactnativekeyboardcontroller/OverKeyboardViewManager.kt +40 -0
  6. package/android/src/fabric/java/com/reactnativekeyboardcontroller/StatusBarManagerCompatModule.kt +7 -3
  7. package/android/src/main/java/com/reactnativekeyboardcontroller/KeyboardControllerPackage.kt +33 -27
  8. package/android/src/main/java/com/reactnativekeyboardcontroller/constants/Keyboard.kt +7 -0
  9. package/android/src/main/java/com/reactnativekeyboardcontroller/events/FocusedInputLayoutChangedEvent.kt +16 -15
  10. package/android/src/main/java/com/reactnativekeyboardcontroller/events/FocusedInputSelectionChangedEvent.kt +25 -24
  11. package/android/src/main/java/com/reactnativekeyboardcontroller/events/FocusedInputTextChangedEvent.kt +4 -3
  12. package/android/src/main/java/com/reactnativekeyboardcontroller/events/KeyboardTransitionEvent.kt +7 -6
  13. package/android/src/main/java/com/reactnativekeyboardcontroller/extensions/Context.kt +38 -0
  14. package/android/src/main/java/com/reactnativekeyboardcontroller/extensions/EditText.kt +78 -58
  15. package/android/src/main/java/com/reactnativekeyboardcontroller/extensions/ReactContext.kt +9 -4
  16. package/android/src/main/java/com/reactnativekeyboardcontroller/extensions/ThemedReactContext.kt +10 -3
  17. package/android/src/main/java/com/reactnativekeyboardcontroller/extensions/View.kt +10 -8
  18. package/android/src/main/java/com/reactnativekeyboardcontroller/interactive/KeyboardAnimationController.kt +65 -60
  19. package/android/src/main/java/com/reactnativekeyboardcontroller/interactive/interpolators/Interpolator.kt +6 -1
  20. package/android/src/main/java/com/reactnativekeyboardcontroller/interactive/interpolators/IosInterpolator.kt +4 -2
  21. package/android/src/main/java/com/reactnativekeyboardcontroller/interactive/interpolators/LinearInterpolator.kt +1 -3
  22. package/android/src/main/java/com/reactnativekeyboardcontroller/listeners/FocusedInputObserver.kt +62 -58
  23. package/android/src/main/java/com/reactnativekeyboardcontroller/listeners/KeyboardAnimationCallback.kt +75 -50
  24. package/android/src/main/java/com/reactnativekeyboardcontroller/listeners/WindowDimensionListener.kt +13 -7
  25. package/android/src/main/java/com/reactnativekeyboardcontroller/log/Logger.kt +10 -2
  26. package/android/src/main/java/com/reactnativekeyboardcontroller/managers/KeyboardControllerViewManagerImpl.kt +35 -24
  27. package/android/src/main/java/com/reactnativekeyboardcontroller/managers/KeyboardGestureAreaViewManagerImpl.kt +21 -8
  28. package/android/src/main/java/com/reactnativekeyboardcontroller/managers/OverKeyboardViewManagerImpl.kt +27 -0
  29. package/android/src/main/java/com/reactnativekeyboardcontroller/modal/ModalAttachedWatcher.kt +46 -16
  30. package/android/src/main/java/com/reactnativekeyboardcontroller/modules/KeyboardControllerModuleImpl.kt +8 -8
  31. package/android/src/main/java/com/reactnativekeyboardcontroller/modules/StatusBarManagerCompatModuleImpl.kt +14 -4
  32. package/android/src/main/java/com/reactnativekeyboardcontroller/traversal/FocusedInputHolder.kt +1 -3
  33. package/android/src/main/java/com/reactnativekeyboardcontroller/traversal/ViewHierarchyNavigator.kt +19 -13
  34. package/android/src/main/java/com/reactnativekeyboardcontroller/ui/FrameScheduler.kt +11 -8
  35. package/android/src/main/java/com/reactnativekeyboardcontroller/views/EdgeToEdgeReactViewGroup.kt +27 -18
  36. package/android/src/main/java/com/reactnativekeyboardcontroller/views/KeyboardGestureAreaReactViewGroup.kt +23 -14
  37. package/android/src/main/java/com/reactnativekeyboardcontroller/views/overlay/OverKeyboardHostShadowNode.kt +30 -0
  38. package/android/src/main/java/com/reactnativekeyboardcontroller/views/overlay/OverKeyboardViewGroup.kt +185 -0
  39. package/android/src/paper/java/com/reactnativekeyboardcontroller/KeyboardControllerModule.kt +3 -1
  40. package/android/src/paper/java/com/reactnativekeyboardcontroller/KeyboardControllerViewManager.kt +19 -10
  41. package/android/src/paper/java/com/reactnativekeyboardcontroller/KeyboardGestureAreaViewManager.kt +21 -8
  42. package/android/src/paper/java/com/reactnativekeyboardcontroller/OverKeyboardViewManager.kt +33 -0
  43. package/android/src/paper/java/com/reactnativekeyboardcontroller/StatusBarManagerCompatModule.kt +7 -3
  44. package/android/src/test/java/com/reactnativekeyboardcontroller/traversal/ViewHierarchyNavigatorTest.kt +30 -21
  45. package/ios/KeyboardController-Bridging-Header.h +1 -0
  46. package/ios/{core → animations}/KeyboardAnimation.swift +1 -0
  47. package/ios/{core → animations}/SpringAnimation.swift +1 -1
  48. package/ios/{core → animations}/TimingAnimation.swift +21 -20
  49. package/ios/extensions/UIApplication.swift +16 -0
  50. package/ios/extensions/UIResponder.swift +0 -3
  51. package/ios/extensions/UIWindow.swift +48 -0
  52. package/ios/views/OverKeyboardViewManager.h +29 -0
  53. package/ios/views/OverKeyboardViewManager.mm +220 -0
  54. package/jest/index.js +1 -0
  55. package/lib/commonjs/bindings.js +2 -1
  56. package/lib/commonjs/bindings.js.map +1 -1
  57. package/lib/commonjs/bindings.native.js +2 -1
  58. package/lib/commonjs/bindings.native.js.map +1 -1
  59. package/lib/commonjs/components/KeyboardAvoidingView/hooks.js +6 -0
  60. package/lib/commonjs/components/KeyboardAvoidingView/hooks.js.map +1 -1
  61. package/lib/commonjs/components/KeyboardAwareScrollView/index.js +2 -1
  62. package/lib/commonjs/components/KeyboardAwareScrollView/index.js.map +1 -1
  63. package/lib/commonjs/components/KeyboardToolbar/index.js +5 -3
  64. package/lib/commonjs/components/KeyboardToolbar/index.js.map +1 -1
  65. package/lib/commonjs/index.js +9 -1
  66. package/lib/commonjs/index.js.map +1 -1
  67. package/lib/commonjs/specs/OverKeyboardViewNativeComponent.js +10 -0
  68. package/lib/commonjs/specs/OverKeyboardViewNativeComponent.js.map +1 -0
  69. package/lib/commonjs/types.js.map +1 -1
  70. package/lib/commonjs/views/OverKeyboardView/index.js +43 -0
  71. package/lib/commonjs/views/OverKeyboardView/index.js.map +1 -0
  72. package/lib/commonjs/views/index.js +14 -0
  73. package/lib/commonjs/views/index.js.map +1 -0
  74. package/lib/module/bindings.js +1 -0
  75. package/lib/module/bindings.js.map +1 -1
  76. package/lib/module/bindings.native.js +1 -0
  77. package/lib/module/bindings.native.js.map +1 -1
  78. package/lib/module/components/KeyboardAvoidingView/hooks.js +6 -0
  79. package/lib/module/components/KeyboardAvoidingView/hooks.js.map +1 -1
  80. package/lib/module/components/KeyboardAwareScrollView/index.js +2 -1
  81. package/lib/module/components/KeyboardAwareScrollView/index.js.map +1 -1
  82. package/lib/module/components/KeyboardToolbar/index.js +5 -3
  83. package/lib/module/components/KeyboardToolbar/index.js.map +1 -1
  84. package/lib/module/index.js +1 -0
  85. package/lib/module/index.js.map +1 -1
  86. package/lib/module/specs/OverKeyboardViewNativeComponent.js +3 -0
  87. package/lib/module/specs/OverKeyboardViewNativeComponent.js.map +1 -0
  88. package/lib/module/types.js.map +1 -1
  89. package/lib/module/views/OverKeyboardView/index.js +35 -0
  90. package/lib/module/views/OverKeyboardView/index.js.map +1 -0
  91. package/lib/module/views/index.js +2 -0
  92. package/lib/module/views/index.js.map +1 -0
  93. package/lib/typescript/bindings.d.ts +2 -1
  94. package/lib/typescript/bindings.native.d.ts +2 -1
  95. package/lib/typescript/components/KeyboardAwareScrollView/index.d.ts +4 -0
  96. package/lib/typescript/components/KeyboardToolbar/index.d.ts +2 -2
  97. package/lib/typescript/index.d.ts +1 -0
  98. package/lib/typescript/specs/OverKeyboardViewNativeComponent.d.ts +7 -0
  99. package/lib/typescript/types.d.ts +4 -1
  100. package/lib/typescript/views/OverKeyboardView/index.d.ts +5 -0
  101. package/lib/typescript/views/index.d.ts +1 -0
  102. package/package.json +8 -3
  103. package/src/bindings.native.ts +3 -0
  104. package/src/bindings.ts +3 -0
  105. package/src/components/KeyboardAvoidingView/hooks.ts +6 -0
  106. package/src/components/KeyboardAwareScrollView/index.tsx +5 -2
  107. package/src/components/KeyboardToolbar/index.tsx +7 -3
  108. package/src/index.ts +1 -0
  109. package/src/specs/OverKeyboardViewNativeComponent.ts +12 -0
  110. package/src/types.ts +4 -0
  111. package/src/views/OverKeyboardView/index.tsx +43 -0
  112. package/src/views/index.ts +1 -0
  113. package/ios/.clang-format +0 -90
  114. package/ios/.swiftformat +0 -5
  115. package/ios/.swiftlint.yml +0 -14
@@ -0,0 +1 @@
1
+ {"version":3,"names":["codegenNativeComponent"],"sources":["OverKeyboardViewNativeComponent.ts"],"sourcesContent":["import codegenNativeComponent from \"react-native/Libraries/Utilities/codegenNativeComponent\";\n\nimport type { HostComponent } from \"react-native\";\nimport type { ViewProps } from \"react-native/Libraries/Components/View/ViewPropTypes\";\n\nexport interface NativeProps extends ViewProps {\n visible?: boolean;\n}\n\nexport default codegenNativeComponent<NativeProps>(\n \"OverKeyboardView\",\n) as HostComponent<NativeProps>;\n"],"mappings":"AAAA,OAAOA,sBAAsB,MAAM,yDAAyD;AAS5F,eAAeA,sBAAsB,CACnC,kBACF,CAAC","ignoreList":[]}
@@ -1 +1 @@
1
- {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type {\n EmitterSubscription,\n NativeSyntheticEvent,\n ViewProps,\n} from \"react-native\";\n\n// DirectEventHandler events declaration\nexport type NativeEvent = {\n progress: number;\n height: number;\n duration: number;\n target: number;\n};\nexport type FocusedInputLayoutChangedEvent = {\n target: number;\n parentScrollViewTarget: number;\n layout: {\n x: number;\n y: number;\n width: number;\n height: number;\n absoluteX: number;\n absoluteY: number;\n };\n};\nexport type FocusedInputTextChangedEvent = {\n text: string;\n};\nexport type FocusedInputSelectionChangedEvent = {\n target: number;\n selection: {\n start: {\n x: number;\n y: number;\n position: number;\n };\n end: {\n x: number;\n y: number;\n position: number;\n };\n };\n};\nexport type EventWithName<T> = {\n eventName: string;\n} & T;\n\n// native View/Module declarations\nexport type KeyboardControllerProps = {\n //ref prop\n ref?: React.Ref<React.Component<KeyboardControllerProps>>;\n // callback props\n onKeyboardMoveStart?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onKeyboardMove?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onKeyboardMoveEnd?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onKeyboardMoveInteractive?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onFocusedInputLayoutChanged?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputLayoutChangedEvent>>,\n ) => void;\n onFocusedInputTextChanged?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputTextChangedEvent>>,\n ) => void;\n onFocusedInputSelectionChanged?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputSelectionChangedEvent>>,\n ) => void;\n // fake props used to activate reanimated bindings\n onKeyboardMoveReanimated?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onFocusedInputLayoutChangedReanimated?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputLayoutChangedEvent>>,\n ) => void;\n onFocusedInputTextChangedReanimated?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputTextChangedEvent>>,\n ) => void;\n onFocusedInputSelectionChangedReanimated?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputSelectionChangedEvent>>,\n ) => void;\n // props\n statusBarTranslucent?: boolean;\n navigationBarTranslucent?: boolean;\n enabled?: boolean;\n} & ViewProps;\n\nexport type KeyboardGestureAreaProps = {\n interpolator: \"ios\" | \"linear\";\n /**\n * Whether to allow to show a keyboard from dismissed state by swipe up.\n * Default to `false`.\n */\n showOnSwipeUp?: boolean;\n /**\n * Whether to allow to control a keyboard by gestures. The strategy how\n * it should be controlled is determined by `interpolator` property.\n * Defaults to `true`.\n */\n enableSwipeToDismiss?: boolean;\n /**\n * Extra distance to the keyboard.\n */\n offset?: number;\n} & ViewProps;\n\nexport type Direction = \"next\" | \"prev\" | \"current\";\nexport type KeyboardControllerModule = {\n // android only\n setDefaultMode: () => void;\n setInputMode: (mode: number) => void;\n // all platforms\n dismiss: () => void;\n setFocusTo: (direction: Direction) => void;\n // native event module stuff\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n};\n\n// Event module declarations\nexport type KeyboardControllerEvents =\n | \"keyboardWillShow\"\n | \"keyboardDidShow\"\n | \"keyboardWillHide\"\n | \"keyboardDidHide\";\nexport type KeyboardEventData = {\n height: number;\n duration: number;\n timestamp: number;\n target: number;\n};\nexport type KeyboardEventsModule = {\n addListener: (\n name: KeyboardControllerEvents,\n cb: (e: KeyboardEventData) => void,\n ) => EmitterSubscription;\n};\nexport type FocusedInputAvailableEvents = \"focusDidSet\";\nexport type FocusedInputEventData = {\n current: number;\n count: number;\n};\nexport type FocusedInputEventsModule = {\n addListener: (\n name: FocusedInputAvailableEvents,\n cb: (e: FocusedInputEventData) => void,\n ) => EmitterSubscription;\n};\nexport type WindowDimensionsAvailableEvents = \"windowDidResize\";\nexport type WindowDimensionsEventData = {\n width: number;\n height: number;\n};\nexport type WindowDimensionsEventsModule = {\n addListener: (\n name: WindowDimensionsAvailableEvents,\n cb: (e: WindowDimensionsEventData) => void,\n ) => EmitterSubscription;\n};\n\n// reanimated hook declaration\nexport type KeyboardHandlerHook<TContext, Event> = (\n handlers: {\n onKeyboardMoveStart?: (e: NativeEvent, context: TContext) => void;\n onKeyboardMove?: (e: NativeEvent, context: TContext) => void;\n onKeyboardMoveEnd?: (e: NativeEvent, context: TContext) => void;\n onKeyboardMoveInteractive?: (e: NativeEvent, context: TContext) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\nexport type FocusedInputLayoutHandlerHook<TContext, Event> = (\n handlers: {\n onFocusedInputLayoutChanged?: (\n e: FocusedInputLayoutChangedEvent,\n context: TContext,\n ) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\nexport type FocusedInputTextHandlerHook<TContext, Event> = (\n handlers: {\n onFocusedInputTextChanged?: (\n e: FocusedInputTextChangedEvent,\n context: TContext,\n ) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\nexport type FocusedInputSelectionHandlerHook<TContext, Event> = (\n handlers: {\n onFocusedInputSelectionChanged?: (\n e: FocusedInputSelectionChangedEvent,\n context: TContext,\n ) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\n\n// package types\nexport type Handlers<T> = Record<string, T | undefined>;\nexport type KeyboardHandler = Partial<{\n onStart: (e: NativeEvent) => void;\n onMove: (e: NativeEvent) => void;\n onEnd: (e: NativeEvent) => void;\n onInteractive: (e: NativeEvent) => void;\n}>;\nexport type KeyboardHandlers = Handlers<KeyboardHandler>;\nexport type FocusedInputHandler = Partial<{\n onChangeText: (e: FocusedInputTextChangedEvent) => void;\n onSelectionChange: (e: FocusedInputSelectionChangedEvent) => void;\n}>;\nexport type FocusedInputHandlers = Handlers<FocusedInputHandler>;\n"],"mappings":"","ignoreList":[]}
1
+ {"version":3,"names":[],"sources":["types.ts"],"sourcesContent":["import type { PropsWithChildren } from \"react\";\nimport type {\n EmitterSubscription,\n NativeSyntheticEvent,\n ViewProps,\n} from \"react-native\";\n\n// DirectEventHandler events declaration\nexport type NativeEvent = {\n progress: number;\n height: number;\n duration: number;\n target: number;\n};\nexport type FocusedInputLayoutChangedEvent = {\n target: number;\n parentScrollViewTarget: number;\n layout: {\n x: number;\n y: number;\n width: number;\n height: number;\n absoluteX: number;\n absoluteY: number;\n };\n};\nexport type FocusedInputTextChangedEvent = {\n text: string;\n};\nexport type FocusedInputSelectionChangedEvent = {\n target: number;\n selection: {\n start: {\n x: number;\n y: number;\n position: number;\n };\n end: {\n x: number;\n y: number;\n position: number;\n };\n };\n};\nexport type EventWithName<T> = {\n eventName: string;\n} & T;\n\n// native View/Module declarations\nexport type KeyboardControllerProps = {\n //ref prop\n ref?: React.Ref<React.Component<KeyboardControllerProps>>;\n // callback props\n onKeyboardMoveStart?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onKeyboardMove?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onKeyboardMoveEnd?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onKeyboardMoveInteractive?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onFocusedInputLayoutChanged?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputLayoutChangedEvent>>,\n ) => void;\n onFocusedInputTextChanged?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputTextChangedEvent>>,\n ) => void;\n onFocusedInputSelectionChanged?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputSelectionChangedEvent>>,\n ) => void;\n // fake props used to activate reanimated bindings\n onKeyboardMoveReanimated?: (\n e: NativeSyntheticEvent<EventWithName<NativeEvent>>,\n ) => void;\n onFocusedInputLayoutChangedReanimated?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputLayoutChangedEvent>>,\n ) => void;\n onFocusedInputTextChangedReanimated?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputTextChangedEvent>>,\n ) => void;\n onFocusedInputSelectionChangedReanimated?: (\n e: NativeSyntheticEvent<EventWithName<FocusedInputSelectionChangedEvent>>,\n ) => void;\n // props\n statusBarTranslucent?: boolean;\n navigationBarTranslucent?: boolean;\n enabled?: boolean;\n} & ViewProps;\n\nexport type KeyboardGestureAreaProps = {\n interpolator: \"ios\" | \"linear\";\n /**\n * Whether to allow to show a keyboard from dismissed state by swipe up.\n * Default to `false`.\n */\n showOnSwipeUp?: boolean;\n /**\n * Whether to allow to control a keyboard by gestures. The strategy how\n * it should be controlled is determined by `interpolator` property.\n * Defaults to `true`.\n */\n enableSwipeToDismiss?: boolean;\n /**\n * Extra distance to the keyboard.\n */\n offset?: number;\n} & ViewProps;\nexport type OverKeyboardViewProps = PropsWithChildren<{\n visible: boolean;\n}>;\n\nexport type Direction = \"next\" | \"prev\" | \"current\";\nexport type KeyboardControllerModule = {\n // android only\n setDefaultMode: () => void;\n setInputMode: (mode: number) => void;\n // all platforms\n dismiss: () => void;\n setFocusTo: (direction: Direction) => void;\n // native event module stuff\n addListener: (eventName: string) => void;\n removeListeners: (count: number) => void;\n};\n\n// Event module declarations\nexport type KeyboardControllerEvents =\n | \"keyboardWillShow\"\n | \"keyboardDidShow\"\n | \"keyboardWillHide\"\n | \"keyboardDidHide\";\nexport type KeyboardEventData = {\n height: number;\n duration: number;\n timestamp: number;\n target: number;\n};\nexport type KeyboardEventsModule = {\n addListener: (\n name: KeyboardControllerEvents,\n cb: (e: KeyboardEventData) => void,\n ) => EmitterSubscription;\n};\nexport type FocusedInputAvailableEvents = \"focusDidSet\";\nexport type FocusedInputEventData = {\n current: number;\n count: number;\n};\nexport type FocusedInputEventsModule = {\n addListener: (\n name: FocusedInputAvailableEvents,\n cb: (e: FocusedInputEventData) => void,\n ) => EmitterSubscription;\n};\nexport type WindowDimensionsAvailableEvents = \"windowDidResize\";\nexport type WindowDimensionsEventData = {\n width: number;\n height: number;\n};\nexport type WindowDimensionsEventsModule = {\n addListener: (\n name: WindowDimensionsAvailableEvents,\n cb: (e: WindowDimensionsEventData) => void,\n ) => EmitterSubscription;\n};\n\n// reanimated hook declaration\nexport type KeyboardHandlerHook<TContext, Event> = (\n handlers: {\n onKeyboardMoveStart?: (e: NativeEvent, context: TContext) => void;\n onKeyboardMove?: (e: NativeEvent, context: TContext) => void;\n onKeyboardMoveEnd?: (e: NativeEvent, context: TContext) => void;\n onKeyboardMoveInteractive?: (e: NativeEvent, context: TContext) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\nexport type FocusedInputLayoutHandlerHook<TContext, Event> = (\n handlers: {\n onFocusedInputLayoutChanged?: (\n e: FocusedInputLayoutChangedEvent,\n context: TContext,\n ) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\nexport type FocusedInputTextHandlerHook<TContext, Event> = (\n handlers: {\n onFocusedInputTextChanged?: (\n e: FocusedInputTextChangedEvent,\n context: TContext,\n ) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\nexport type FocusedInputSelectionHandlerHook<TContext, Event> = (\n handlers: {\n onFocusedInputSelectionChanged?: (\n e: FocusedInputSelectionChangedEvent,\n context: TContext,\n ) => void;\n },\n dependencies?: unknown[],\n) => (e: NativeSyntheticEvent<Event>) => void;\n\n// package types\nexport type Handlers<T> = Record<string, T | undefined>;\nexport type KeyboardHandler = Partial<{\n onStart: (e: NativeEvent) => void;\n onMove: (e: NativeEvent) => void;\n onEnd: (e: NativeEvent) => void;\n onInteractive: (e: NativeEvent) => void;\n}>;\nexport type KeyboardHandlers = Handlers<KeyboardHandler>;\nexport type FocusedInputHandler = Partial<{\n onChangeText: (e: FocusedInputTextChangedEvent) => void;\n onSelectionChange: (e: FocusedInputSelectionChangedEvent) => void;\n}>;\nexport type FocusedInputHandlers = Handlers<FocusedInputHandler>;\n"],"mappings":"","ignoreList":[]}
@@ -0,0 +1,35 @@
1
+ import React, { useMemo } from "react";
2
+ import { Platform, StyleSheet, View } from "react-native";
3
+ import { RCTOverKeyboardView } from "../../bindings";
4
+ import { useWindowDimensions } from "../../hooks";
5
+ const OverKeyboardView = ({
6
+ children,
7
+ visible
8
+ }) => {
9
+ const {
10
+ height,
11
+ width
12
+ } = useWindowDimensions();
13
+ const inner = useMemo(() => ({
14
+ height,
15
+ width
16
+ }), [height, width]);
17
+ const style = useMemo(() => [styles.absolute,
18
+ // On iOS - stretch view to full window dimensions to make yoga work
19
+ // On Android Fabric we temporarily use the same approach
20
+ // @ts-expect-error `_IS_FABRIC` is injected by REA
21
+ Platform.OS === "ios" || global._IS_FABRIC ? inner : undefined], [inner]);
22
+ return /*#__PURE__*/React.createElement(RCTOverKeyboardView, {
23
+ visible: visible
24
+ }, /*#__PURE__*/React.createElement(View, {
25
+ collapsable: false,
26
+ style: style
27
+ }, children));
28
+ };
29
+ const styles = StyleSheet.create({
30
+ absolute: {
31
+ position: "absolute"
32
+ }
33
+ });
34
+ export default OverKeyboardView;
35
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","useMemo","Platform","StyleSheet","View","RCTOverKeyboardView","useWindowDimensions","OverKeyboardView","children","visible","height","width","inner","style","styles","absolute","OS","global","_IS_FABRIC","undefined","createElement","collapsable","create","position"],"sources":["index.tsx"],"sourcesContent":["import React, { useMemo } from \"react\";\nimport { Platform, StyleSheet, View } from \"react-native\";\n\nimport { RCTOverKeyboardView } from \"../../bindings\";\nimport { useWindowDimensions } from \"../../hooks\";\n\nimport type { OverKeyboardViewProps } from \"../../types\";\nimport type { PropsWithChildren } from \"react\";\n\nconst OverKeyboardView = ({\n children,\n visible,\n}: PropsWithChildren<OverKeyboardViewProps>) => {\n const { height, width } = useWindowDimensions();\n const inner = useMemo(() => ({ height, width }), [height, width]);\n const style = useMemo(\n () => [\n styles.absolute,\n // On iOS - stretch view to full window dimensions to make yoga work\n // On Android Fabric we temporarily use the same approach\n // @ts-expect-error `_IS_FABRIC` is injected by REA\n Platform.OS === \"ios\" || global._IS_FABRIC ? inner : undefined,\n ],\n [inner],\n );\n\n return (\n <RCTOverKeyboardView visible={visible}>\n {/* `OverKeyboardView` should always have a single child */}\n <View collapsable={false} style={style}>\n {children}\n </View>\n </RCTOverKeyboardView>\n );\n};\n\nconst styles = StyleSheet.create({\n absolute: {\n position: \"absolute\",\n },\n});\n\nexport default OverKeyboardView;\n"],"mappings":"AAAA,OAAOA,KAAK,IAAIC,OAAO,QAAQ,OAAO;AACtC,SAASC,QAAQ,EAAEC,UAAU,EAAEC,IAAI,QAAQ,cAAc;AAEzD,SAASC,mBAAmB,QAAQ,gBAAgB;AACpD,SAASC,mBAAmB,QAAQ,aAAa;AAKjD,MAAMC,gBAAgB,GAAGA,CAAC;EACxBC,QAAQ;EACRC;AACwC,CAAC,KAAK;EAC9C,MAAM;IAAEC,MAAM;IAAEC;EAAM,CAAC,GAAGL,mBAAmB,CAAC,CAAC;EAC/C,MAAMM,KAAK,GAAGX,OAAO,CAAC,OAAO;IAAES,MAAM;IAAEC;EAAM,CAAC,CAAC,EAAE,CAACD,MAAM,EAAEC,KAAK,CAAC,CAAC;EACjE,MAAME,KAAK,GAAGZ,OAAO,CACnB,MAAM,CACJa,MAAM,CAACC,QAAQ;EACf;EACA;EACA;EACAb,QAAQ,CAACc,EAAE,KAAK,KAAK,IAAIC,MAAM,CAACC,UAAU,GAAGN,KAAK,GAAGO,SAAS,CAC/D,EACD,CAACP,KAAK,CACR,CAAC;EAED,oBACEZ,KAAA,CAAAoB,aAAA,CAACf,mBAAmB;IAACI,OAAO,EAAEA;EAAQ,gBAEpCT,KAAA,CAAAoB,aAAA,CAAChB,IAAI;IAACiB,WAAW,EAAE,KAAM;IAACR,KAAK,EAAEA;EAAM,GACpCL,QACG,CACa,CAAC;AAE1B,CAAC;AAED,MAAMM,MAAM,GAAGX,UAAU,CAACmB,MAAM,CAAC;EAC/BP,QAAQ,EAAE;IACRQ,QAAQ,EAAE;EACZ;AACF,CAAC,CAAC;AAEF,eAAehB,gBAAgB","ignoreList":[]}
@@ -0,0 +1,2 @@
1
+ export { default as OverKeyboardView } from "./OverKeyboardView";
2
+ //# sourceMappingURL=index.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["default","OverKeyboardView"],"sources":["index.ts"],"sourcesContent":["export { default as OverKeyboardView } from \"./OverKeyboardView\";\n"],"mappings":"AAAA,SAASA,OAAO,IAAIC,gBAAgB,QAAQ,oBAAoB","ignoreList":[]}
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { FocusedInputEventsModule, KeyboardControllerModule, KeyboardControllerProps, KeyboardEventsModule, KeyboardGestureAreaProps, WindowDimensionsEventsModule } from "./types";
2
+ import type { FocusedInputEventsModule, KeyboardControllerModule, KeyboardControllerProps, KeyboardEventsModule, KeyboardGestureAreaProps, OverKeyboardViewProps, WindowDimensionsEventsModule } from "./types";
3
3
  export declare const KeyboardController: KeyboardControllerModule;
4
4
  export declare const KeyboardEvents: KeyboardEventsModule;
5
5
  /**
@@ -10,3 +10,4 @@ export declare const FocusedInputEvents: FocusedInputEventsModule;
10
10
  export declare const WindowDimensionsEvents: WindowDimensionsEventsModule;
11
11
  export declare const KeyboardControllerView: import("react").FC<KeyboardControllerProps>;
12
12
  export declare const KeyboardGestureArea: import("react").FC<KeyboardGestureAreaProps>;
13
+ export declare const RCTOverKeyboardView: import("react").FC<OverKeyboardViewProps>;
@@ -1,5 +1,5 @@
1
1
  /// <reference types="react" />
2
- import type { FocusedInputEventsModule, KeyboardControllerModule, KeyboardControllerProps, KeyboardEventsModule, KeyboardGestureAreaProps, WindowDimensionsEventsModule } from "./types";
2
+ import type { FocusedInputEventsModule, KeyboardControllerModule, KeyboardControllerProps, KeyboardEventsModule, KeyboardGestureAreaProps, OverKeyboardViewProps, WindowDimensionsEventsModule } from "./types";
3
3
  export declare const KeyboardController: KeyboardControllerModule;
4
4
  export declare const KeyboardEvents: KeyboardEventsModule;
5
5
  /**
@@ -10,3 +10,4 @@ export declare const FocusedInputEvents: FocusedInputEventsModule;
10
10
  export declare const WindowDimensionsEvents: WindowDimensionsEventsModule;
11
11
  export declare const KeyboardControllerView: React.FC<KeyboardControllerProps>;
12
12
  export declare const KeyboardGestureArea: React.FC<KeyboardGestureAreaProps>;
13
+ export declare const RCTOverKeyboardView: React.FC<OverKeyboardViewProps>;
@@ -9,6 +9,8 @@ export type KeyboardAwareScrollViewProps = {
9
9
  enabled?: boolean;
10
10
  /** Adjusting the bottom spacing of KeyboardAwareScrollView. Default is `0` */
11
11
  extraKeyboardSpace?: number;
12
+ /** Custom component for `ScrollView`. Default is `ScrollView` */
13
+ ScrollViewComponent?: React.ComponentType<ScrollViewProps>;
12
14
  } & ScrollViewProps;
13
15
  declare const KeyboardAwareScrollView: React.ForwardRefExoticComponent<{
14
16
  /** The distance between keyboard and focused `TextInput` when keyboard is shown. Default is `0`. */
@@ -19,6 +21,8 @@ declare const KeyboardAwareScrollView: React.ForwardRefExoticComponent<{
19
21
  enabled?: boolean | undefined;
20
22
  /** Adjusting the bottom spacing of KeyboardAwareScrollView. Default is `0` */
21
23
  extraKeyboardSpace?: number | undefined;
24
+ /** Custom component for `ScrollView`. Default is `ScrollView` */
25
+ ScrollViewComponent?: React.ComponentType<ScrollViewProps> | undefined;
22
26
  } & ScrollViewProps & {
23
27
  children?: React.ReactNode;
24
28
  } & React.RefAttributes<ScrollView>>;
@@ -4,8 +4,8 @@ import Button from "./Button";
4
4
  import { colors } from "./colors";
5
5
  import type { HEX, KeyboardToolbarTheme } from "./types";
6
6
  import type { ReactNode } from "react";
7
- import type { GestureResponderEvent } from "react-native";
8
- export type KeyboardToolbarProps = {
7
+ import type { GestureResponderEvent, ViewProps } from "react-native";
8
+ export type KeyboardToolbarProps = Omit<ViewProps, "style" | "testID" | "children"> & {
9
9
  /** An element that is shown in the middle of the toolbar. */
10
10
  content?: JSX.Element | null;
11
11
  /** A set of dark/light colors consumed by toolbar component. */
@@ -6,3 +6,4 @@ export * from "./constants";
6
6
  export * from "./types";
7
7
  export { KeyboardAvoidingView, KeyboardStickyView, KeyboardAwareScrollView, KeyboardToolbar, DefaultKeyboardToolbarTheme, } from "./components";
8
8
  export type { KeyboardAvoidingViewProps, KeyboardStickyViewProps, KeyboardAwareScrollViewProps, KeyboardToolbarProps, } from "./components";
9
+ export { OverKeyboardView } from "./views";
@@ -0,0 +1,7 @@
1
+ import type { HostComponent } from "react-native";
2
+ import type { ViewProps } from "react-native/Libraries/Components/View/ViewPropTypes";
3
+ export interface NativeProps extends ViewProps {
4
+ visible?: boolean;
5
+ }
6
+ declare const _default: HostComponent<NativeProps>;
7
+ export default _default;
@@ -1,4 +1,4 @@
1
- /// <reference types="react" />
1
+ import type { PropsWithChildren } from "react";
2
2
  import type { EmitterSubscription, NativeSyntheticEvent, ViewProps } from "react-native";
3
3
  export type NativeEvent = {
4
4
  progress: number;
@@ -74,6 +74,9 @@ export type KeyboardGestureAreaProps = {
74
74
  */
75
75
  offset?: number;
76
76
  } & ViewProps;
77
+ export type OverKeyboardViewProps = PropsWithChildren<{
78
+ visible: boolean;
79
+ }>;
77
80
  export type Direction = "next" | "prev" | "current";
78
81
  export type KeyboardControllerModule = {
79
82
  setDefaultMode: () => void;
@@ -0,0 +1,5 @@
1
+ import React from "react";
2
+ import type { OverKeyboardViewProps } from "../../types";
3
+ import type { PropsWithChildren } from "react";
4
+ declare const OverKeyboardView: ({ children, visible, }: PropsWithChildren<OverKeyboardViewProps>) => React.JSX.Element;
5
+ export default OverKeyboardView;
@@ -0,0 +1 @@
1
+ export { default as OverKeyboardView } from "./OverKeyboardView";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-keyboard-controller",
3
- "version": "1.13.4",
3
+ "version": "1.14.1",
4
4
  "description": "Keyboard manager which works in identical way on both iOS and Android",
5
5
  "main": "lib/commonjs/index",
6
6
  "module": "lib/module/index",
@@ -21,8 +21,12 @@
21
21
  "!android/gradle",
22
22
  "!android/gradlew",
23
23
  "!android/gradlew.bat",
24
+ "!android/.editorconfig",
24
25
  "!ios/build",
25
26
  "!ios/KeyboardControllerNative",
27
+ "!ios/.swiftlint.yml",
28
+ "!ios/.swiftformat",
29
+ "!ios/.clang-format",
26
30
  "!**/__tests__",
27
31
  "!**/__fixtures__",
28
32
  "!**/__mocks__"
@@ -51,6 +55,7 @@
51
55
  "avoiding view",
52
56
  "avoid keyboard",
53
57
  "sticky view",
58
+ "over keyboard view",
54
59
  "keyboard aware scroll view",
55
60
  "keyboard toolbar",
56
61
  "keyboard done button",
@@ -71,7 +76,7 @@
71
76
  },
72
77
  "devDependencies": {
73
78
  "@commitlint/config-conventional": "^11.0.0",
74
- "@react-native/eslint-config": "^0.75.2",
79
+ "@react-native/eslint-config": "^0.75.3",
75
80
  "@release-it/conventional-changelog": "^2.0.0",
76
81
  "@testing-library/react-hooks": "^8.0.1",
77
82
  "@types/jest": "^29.2.1",
@@ -94,7 +99,7 @@
94
99
  "pod-install": "^0.1.0",
95
100
  "prettier": "^2.8.8",
96
101
  "react": "18.3.1",
97
- "react-native": "0.75.2",
102
+ "react-native": "0.75.3",
98
103
  "react-native-builder-bob": "^0.18.0",
99
104
  "react-native-reanimated": "3.15.0",
100
105
  "react-test-renderer": "18.2.0",
@@ -6,6 +6,7 @@ import type {
6
6
  KeyboardControllerProps,
7
7
  KeyboardEventsModule,
8
8
  KeyboardGestureAreaProps,
9
+ OverKeyboardViewProps,
9
10
  WindowDimensionsEventsModule,
10
11
  } from "./types";
11
12
 
@@ -56,3 +57,5 @@ export const KeyboardGestureArea: React.FC<KeyboardGestureAreaProps> =
56
57
  Platform.OS === "android" && Platform.Version >= 30
57
58
  ? require("./specs/KeyboardGestureAreaNativeComponent").default
58
59
  : ({ children }: KeyboardGestureAreaProps) => children;
60
+ export const RCTOverKeyboardView: React.FC<OverKeyboardViewProps> =
61
+ require("./specs/OverKeyboardViewNativeComponent").default;
package/src/bindings.ts CHANGED
@@ -6,6 +6,7 @@ import type {
6
6
  KeyboardControllerProps,
7
7
  KeyboardEventsModule,
8
8
  KeyboardGestureAreaProps,
9
+ OverKeyboardViewProps,
9
10
  WindowDimensionsEventsModule,
10
11
  } from "./types";
11
12
  import type { EmitterSubscription } from "react-native";
@@ -37,3 +38,5 @@ export const KeyboardControllerView =
37
38
  View as unknown as React.FC<KeyboardControllerProps>;
38
39
  export const KeyboardGestureArea =
39
40
  View as unknown as React.FC<KeyboardGestureAreaProps>;
41
+ export const RCTOverKeyboardView =
42
+ View as unknown as React.FC<OverKeyboardViewProps>;
@@ -27,6 +27,12 @@ export const useKeyboardAnimation = () => {
27
27
  progress.value = e.progress;
28
28
  height.value = e.height;
29
29
  },
30
+ onInteractive: (e) => {
31
+ "worklet";
32
+
33
+ progress.value = e.progress;
34
+ height.value = e.height;
35
+ },
30
36
  onEnd: (e) => {
31
37
  "worklet";
32
38
 
@@ -38,6 +38,8 @@ export type KeyboardAwareScrollViewProps = {
38
38
  enabled?: boolean;
39
39
  /** Adjusting the bottom spacing of KeyboardAwareScrollView. Default is `0` */
40
40
  extraKeyboardSpace?: number;
41
+ /** Custom component for `ScrollView`. Default is `ScrollView` */
42
+ ScrollViewComponent?: React.ComponentType<ScrollViewProps>;
41
43
  } & ScrollViewProps;
42
44
 
43
45
  /*
@@ -90,6 +92,7 @@ const KeyboardAwareScrollView = forwardRef<
90
92
  disableScrollOnKeyboardHide = false,
91
93
  enabled = true,
92
94
  extraKeyboardSpace = 0,
95
+ ScrollViewComponent = Reanimated.ScrollView,
93
96
  snapToOffsets,
94
97
  ...rest
95
98
  },
@@ -362,7 +365,7 @@ const KeyboardAwareScrollView = forwardRef<
362
365
  );
363
366
 
364
367
  return (
365
- <Reanimated.ScrollView
368
+ <ScrollViewComponent
366
369
  ref={onRef}
367
370
  {...rest}
368
371
  scrollEventThrottle={16}
@@ -370,7 +373,7 @@ const KeyboardAwareScrollView = forwardRef<
370
373
  >
371
374
  {children}
372
375
  <Reanimated.View style={view} />
373
- </Reanimated.ScrollView>
376
+ </ScrollViewComponent>
374
377
  );
375
378
  },
376
379
  );
@@ -11,9 +11,12 @@ import { colors } from "./colors";
11
11
 
12
12
  import type { HEX, KeyboardToolbarTheme } from "./types";
13
13
  import type { ReactNode } from "react";
14
- import type { GestureResponderEvent } from "react-native";
14
+ import type { GestureResponderEvent, ViewProps } from "react-native";
15
15
 
16
- export type KeyboardToolbarProps = {
16
+ export type KeyboardToolbarProps = Omit<
17
+ ViewProps,
18
+ "style" | "testID" | "children"
19
+ > & {
17
20
  /** An element that is shown in the middle of the toolbar. */
18
21
  content?: JSX.Element | null;
19
22
  /** A set of dark/light colors consumed by toolbar component. */
@@ -81,6 +84,7 @@ const KeyboardToolbar: React.FC<KeyboardToolbarProps> = ({
81
84
  onDoneCallback,
82
85
  blur = null,
83
86
  opacity = DEFAULT_OPACITY,
87
+ ...rest
84
88
  }) => {
85
89
  const colorScheme = useColorScheme();
86
90
  const [inputs, setInputs] = useState({
@@ -146,7 +150,7 @@ const KeyboardToolbar: React.FC<KeyboardToolbarProps> = ({
146
150
 
147
151
  return (
148
152
  <KeyboardStickyView offset={offset}>
149
- <View style={toolbarStyle} testID={TEST_ID_KEYBOARD_TOOLBAR}>
153
+ <View {...rest} style={toolbarStyle} testID={TEST_ID_KEYBOARD_TOOLBAR}>
150
154
  {blur}
151
155
  {showArrows && (
152
156
  <>
package/src/index.ts CHANGED
@@ -19,3 +19,4 @@ export type {
19
19
  KeyboardAwareScrollViewProps,
20
20
  KeyboardToolbarProps,
21
21
  } from "./components";
22
+ export { OverKeyboardView } from "./views";
@@ -0,0 +1,12 @@
1
+ import codegenNativeComponent from "react-native/Libraries/Utilities/codegenNativeComponent";
2
+
3
+ import type { HostComponent } from "react-native";
4
+ import type { ViewProps } from "react-native/Libraries/Components/View/ViewPropTypes";
5
+
6
+ export interface NativeProps extends ViewProps {
7
+ visible?: boolean;
8
+ }
9
+
10
+ export default codegenNativeComponent<NativeProps>(
11
+ "OverKeyboardView",
12
+ ) as HostComponent<NativeProps>;
package/src/types.ts CHANGED
@@ -1,3 +1,4 @@
1
+ import type { PropsWithChildren } from "react";
1
2
  import type {
2
3
  EmitterSubscription,
3
4
  NativeSyntheticEvent,
@@ -108,6 +109,9 @@ export type KeyboardGestureAreaProps = {
108
109
  */
109
110
  offset?: number;
110
111
  } & ViewProps;
112
+ export type OverKeyboardViewProps = PropsWithChildren<{
113
+ visible: boolean;
114
+ }>;
111
115
 
112
116
  export type Direction = "next" | "prev" | "current";
113
117
  export type KeyboardControllerModule = {
@@ -0,0 +1,43 @@
1
+ import React, { useMemo } from "react";
2
+ import { Platform, StyleSheet, View } from "react-native";
3
+
4
+ import { RCTOverKeyboardView } from "../../bindings";
5
+ import { useWindowDimensions } from "../../hooks";
6
+
7
+ import type { OverKeyboardViewProps } from "../../types";
8
+ import type { PropsWithChildren } from "react";
9
+
10
+ const OverKeyboardView = ({
11
+ children,
12
+ visible,
13
+ }: PropsWithChildren<OverKeyboardViewProps>) => {
14
+ const { height, width } = useWindowDimensions();
15
+ const inner = useMemo(() => ({ height, width }), [height, width]);
16
+ const style = useMemo(
17
+ () => [
18
+ styles.absolute,
19
+ // On iOS - stretch view to full window dimensions to make yoga work
20
+ // On Android Fabric we temporarily use the same approach
21
+ // @ts-expect-error `_IS_FABRIC` is injected by REA
22
+ Platform.OS === "ios" || global._IS_FABRIC ? inner : undefined,
23
+ ],
24
+ [inner],
25
+ );
26
+
27
+ return (
28
+ <RCTOverKeyboardView visible={visible}>
29
+ {/* `OverKeyboardView` should always have a single child */}
30
+ <View collapsable={false} style={style}>
31
+ {children}
32
+ </View>
33
+ </RCTOverKeyboardView>
34
+ );
35
+ };
36
+
37
+ const styles = StyleSheet.create({
38
+ absolute: {
39
+ position: "absolute",
40
+ },
41
+ });
42
+
43
+ export default OverKeyboardView;
@@ -0,0 +1 @@
1
+ export { default as OverKeyboardView } from "./OverKeyboardView";
package/ios/.clang-format DELETED
@@ -1,90 +0,0 @@
1
- ---
2
- AccessModifierOffset: -1
3
- AlignAfterOpenBracket: AlwaysBreak
4
- AlignConsecutiveAssignments: false
5
- AlignConsecutiveDeclarations: false
6
- AlignEscapedNewlinesLeft: true
7
- AlignOperands: false
8
- AlignTrailingComments: false
9
- AllowAllParametersOfDeclarationOnNextLine: false
10
- AllowShortBlocksOnASingleLine: false
11
- AllowShortCaseLabelsOnASingleLine: false
12
- AllowShortFunctionsOnASingleLine: Empty
13
- AllowShortIfStatementsOnASingleLine: false
14
- AllowShortLoopsOnASingleLine: false
15
- AlwaysBreakAfterReturnType: None
16
- AlwaysBreakBeforeMultilineStrings: true
17
- AlwaysBreakTemplateDeclarations: true
18
- BinPackArguments: false
19
- BinPackParameters: false
20
- BraceWrapping:
21
- AfterClass: false
22
- AfterControlStatement: false
23
- AfterEnum: false
24
- AfterFunction: false
25
- AfterNamespace: false
26
- AfterObjCDeclaration: false
27
- AfterStruct: false
28
- AfterUnion: false
29
- BeforeCatch: false
30
- BeforeElse: false
31
- IndentBraces: false
32
- BreakBeforeBinaryOperators: None
33
- BreakBeforeBraces: Attach
34
- BreakBeforeTernaryOperators: true
35
- BreakConstructorInitializersBeforeComma: false
36
- BreakAfterJavaFieldAnnotations: false
37
- BreakStringLiterals: false
38
- ColumnLimit: 80
39
- CommentPragmas: "^ IWYU pragma:"
40
- ConstructorInitializerAllOnOneLineOrOnePerLine: true
41
- ConstructorInitializerIndentWidth: 4
42
- ContinuationIndentWidth: 4
43
- Cpp11BracedListStyle: true
44
- DerivePointerAlignment: false
45
- DisableFormat: false
46
- ForEachMacros: [FOR_EACH_RANGE, FOR_EACH]
47
- IncludeCategories:
48
- - Regex: '^<.*\.h(pp)?>'
49
- Priority: 1
50
- - Regex: "^<.*"
51
- Priority: 2
52
- - Regex: ".*"
53
- Priority: 3
54
- IndentCaseLabels: true
55
- IndentWidth: 2
56
- IndentWrappedFunctionNames: false
57
- KeepEmptyLinesAtTheStartOfBlocks: false
58
- MacroBlockBegin: ""
59
- MacroBlockEnd: ""
60
- MaxEmptyLinesToKeep: 1
61
- NamespaceIndentation: None
62
- ObjCBlockIndentWidth: 2
63
- ObjCSpaceAfterProperty: true
64
- ObjCSpaceBeforeProtocolList: true
65
- PenaltyBreakBeforeFirstCallParameter: 1
66
- PenaltyBreakComment: 300
67
- PenaltyBreakFirstLessLess: 120
68
- PenaltyBreakString: 1000
69
- PenaltyExcessCharacter: 1000000
70
- PenaltyReturnTypeOnItsOwnLine: 200
71
- PointerAlignment: Right
72
- ReflowComments: true
73
- SortIncludes: true
74
- SpaceAfterCStyleCast: false
75
- SpaceBeforeAssignmentOperators: true
76
- SpaceBeforeParens: ControlStatements
77
- SpaceInEmptyParentheses: false
78
- SpacesBeforeTrailingComments: 1
79
- SpacesInAngles: false
80
- SpacesInContainerLiterals: true
81
- SpacesInCStyleCastParentheses: false
82
- SpacesInParentheses: false
83
- SpacesInSquareBrackets: false
84
- Standard: Cpp11
85
- TabWidth: 8
86
- UseTab: Never
87
- ---
88
- Language: ObjC
89
- ColumnLimit: 100
90
- BreakBeforeBraces: WebKit
package/ios/.swiftformat DELETED
@@ -1,5 +0,0 @@
1
- --indent 2
2
-
3
- --disable redundantReturn
4
-
5
- --exclude Pods,Generated
@@ -1,14 +0,0 @@
1
- disabled_rules:
2
- - trailing_comma
3
- - for_where
4
-
5
- line_length:
6
- warning: 120
7
- ignores_urls: true
8
-
9
- identifier_name:
10
- excluded:
11
- - i # allow `i` variable in cycles
12
-
13
- excluded:
14
- - Pods