react-native-keyboard-controller
Version:
Keyboard manager which works in identical way on both iOS and Android
100 lines (99 loc) • 4.21 kB
JavaScript
"use strict";
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.WindowDimensionsEvents = exports.RCTOverKeyboardView = exports.RCTKeyboardToolbarGroupView = exports.RCTKeyboardExtender = exports.KeyboardGestureArea = exports.KeyboardEvents = exports.KeyboardControllerViewCommands = exports.KeyboardControllerView = exports.KeyboardControllerNative = exports.KeyboardBackgroundView = exports.FocusedInputEvents = exports.ClippingScrollView = void 0;
var _reactNative = require("react-native");
const NOOP = () => {};
const KeyboardControllerNative = exports.KeyboardControllerNative = {
setDefaultMode: NOOP,
setInputMode: NOOP,
preload: NOOP,
dismiss: NOOP,
setFocusTo: NOOP,
viewPositionInWindow: () => Promise.resolve({
x: 0,
y: 0,
width: 0,
height: 0
}),
addListener: NOOP,
removeListeners: NOOP,
getConstants: () => ({
keyboardBorderRadius: 0
})
};
/**
* An event emitter that provides a way to subscribe to next keyboard events:
* - `keyboardWillShow`;
* - `keyboardDidShow`;
* - `keyboardWillHide`;
* - `keyboardDidHide`.
*
* Use `addListener` function to add your event listener for a specific keyboard event.
*/
const KeyboardEvents = exports.KeyboardEvents = {
addListener: () => ({
remove: NOOP
})
};
/**
* This API is not documented, it's for internal usage only (for now), and is a subject to potential breaking changes in future.
* Use it with cautious.
*/
const FocusedInputEvents = exports.FocusedInputEvents = {
addListener: () => ({
remove: NOOP
})
};
const WindowDimensionsEvents = exports.WindowDimensionsEvents = {
addListener: () => ({
remove: NOOP
})
};
/**
* A view that sends events whenever keyboard or focused events are happening.
*
* @see {@link https://kirillzyusko.github.io/react-native-keyboard-controller/docs/api/keyboard-controller-view|Documentation} page for more details.
*/
const KeyboardControllerView = exports.KeyboardControllerView = _reactNative.View;
const KeyboardControllerViewCommands = exports.KeyboardControllerViewCommands = {
synchronizeFocusedInputLayout: _ref => {}
};
/**
* A view that defines a region on the screen, where gestures will control the keyboard position.
*
* @see {@link https://kirillzyusko.github.io/react-native-keyboard-controller/docs/api/keyboard-gesture-area|Documentation} page for more details.
*/
const KeyboardGestureArea = exports.KeyboardGestureArea = _reactNative.View;
const RCTOverKeyboardView = exports.RCTOverKeyboardView = _reactNative.View;
/**
* A view that matches keyboard background.
*
* @see {@link https://kirillzyusko.github.io/react-native-keyboard-controller/docs/api/keyboard-background-view|Documentation} page for more details.
*/
const KeyboardBackgroundView = exports.KeyboardBackgroundView = _reactNative.View;
/**
* A container that will embed its children into the keyboard
* and will always show them above the keyboard.
*
* @see {@link https://kirillzyusko.github.io/react-native-keyboard-controller/docs/api/keyboard-extender|Documentation} page for more details.
*/
const RCTKeyboardExtender = exports.RCTKeyboardExtender = _reactNative.View;
/**
* A decorator that will clip the content of the `ScrollView`. It helps to simulate `contentInset` behavior on Android
* Supports only `bottom` property (`paddingBottom` is not supported property of `ScrollView.style`).
* Using this component we can modify bottom inset without having a fake view.
*
* On iOS we use swizzling to apply runtime patches to fix some broken internal methods.
* Ideally this component shouldn't exist and all its fixes/polyfills must be added directly to react-native and
* we will port features/fixes back to upstream, but at the moment we use this view to
* deliver desired functionality regardless of react-native version used.
*/
const ClippingScrollView = exports.ClippingScrollView = _reactNative.View;
/**
* A View that defines a group of `TextInput`s.
* Used in toolbar navigation to assure that you can navigate only between inputs withing the same group.
*/
const RCTKeyboardToolbarGroupView = exports.RCTKeyboardToolbarGroupView = _reactNative.View;
//# sourceMappingURL=bindings.js.map