react-native-transformer-text-input 0.1.0-alpha.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/LICENSE +20 -0
- package/README.md +141 -0
- package/RNTransformerTextInput.podspec +35 -0
- package/android/build.gradle +96 -0
- package/android/gradle.properties +5 -0
- package/android/spotless.gradle +19 -0
- package/android/src/main/AndroidManifest.xml +2 -0
- package/android/src/main/java/com/appandflow/transformertextinput/TextState.kt +15 -0
- package/android/src/main/java/com/appandflow/transformertextinput/TransformerTextInputDecoratorView.kt +160 -0
- package/android/src/main/java/com/appandflow/transformertextinput/TransformerTextInputDecoratorViewManager.kt +44 -0
- package/android/src/main/java/com/appandflow/transformertextinput/TransformerTextInputJni.kt +25 -0
- package/android/src/main/java/com/appandflow/transformertextinput/TransformerTextInputModule.kt +22 -0
- package/android/src/main/java/com/appandflow/transformertextinput/TransformerTextInputPackage.kt +53 -0
- package/android/src/main/jni/CMakeLists.txt +62 -0
- package/android/src/main/jni/TransformerTextInputJni.cpp +94 -0
- package/android/src/main/jni/rntti.h +17 -0
- package/cpp/TransformerTextInputDecoratorViewComponentDescriptor.h +16 -0
- package/cpp/TransformerTextInputDecoratorViewShadowNode.cpp +21 -0
- package/cpp/TransformerTextInputDecoratorViewShadowNode.h +40 -0
- package/cpp/TransformerTextInputRuntime.cpp +86 -0
- package/cpp/TransformerTextInputRuntime.h +31 -0
- package/ios/TransformerTextInputDecoratorView.h +9 -0
- package/ios/TransformerTextInputDecoratorView.mm +256 -0
- package/ios/TransformerTextInputModule.h +8 -0
- package/ios/TransformerTextInputModule.mm +28 -0
- package/lib/module/NativeTransformerTextInputModule.js +5 -0
- package/lib/module/NativeTransformerTextInputModule.js.map +1 -0
- package/lib/module/Transformer.js +15 -0
- package/lib/module/Transformer.js.map +1 -0
- package/lib/module/TransformerTextInput.js +86 -0
- package/lib/module/TransformerTextInput.js.map +1 -0
- package/lib/module/TransformerTextInputDecoratorViewNativeComponent.ts +31 -0
- package/lib/module/formatters/phone-number.js +315 -0
- package/lib/module/formatters/phone-number.js.map +1 -0
- package/lib/module/index.js +5 -0
- package/lib/module/index.js.map +1 -0
- package/lib/module/package.json +1 -0
- package/lib/module/registry.js +83 -0
- package/lib/module/registry.js.map +1 -0
- package/lib/module/selection.js +48 -0
- package/lib/module/selection.js.map +1 -0
- package/lib/module/utils/useMergeRefs.js +49 -0
- package/lib/module/utils/useMergeRefs.js.map +1 -0
- package/lib/module/utils/useRefEffect.js +37 -0
- package/lib/module/utils/useRefEffect.js.map +1 -0
- package/lib/typescript/package.json +1 -0
- package/lib/typescript/src/NativeTransformerTextInputModule.d.ts +7 -0
- package/lib/typescript/src/NativeTransformerTextInputModule.d.ts.map +1 -0
- package/lib/typescript/src/Transformer.d.ts +19 -0
- package/lib/typescript/src/Transformer.d.ts.map +1 -0
- package/lib/typescript/src/TransformerTextInput.d.ts +247 -0
- package/lib/typescript/src/TransformerTextInput.d.ts.map +1 -0
- package/lib/typescript/src/TransformerTextInputDecoratorViewNativeComponent.d.ts +12 -0
- package/lib/typescript/src/TransformerTextInputDecoratorViewNativeComponent.d.ts.map +1 -0
- package/lib/typescript/src/formatters/phone-number.d.ts +18 -0
- package/lib/typescript/src/formatters/phone-number.d.ts.map +1 -0
- package/lib/typescript/src/index.d.ts +3 -0
- package/lib/typescript/src/index.d.ts.map +1 -0
- package/lib/typescript/src/registry.d.ts +17 -0
- package/lib/typescript/src/registry.d.ts.map +1 -0
- package/lib/typescript/src/selection.d.ts +4 -0
- package/lib/typescript/src/selection.d.ts.map +1 -0
- package/lib/typescript/src/utils/useMergeRefs.d.ts +20 -0
- package/lib/typescript/src/utils/useMergeRefs.d.ts.map +1 -0
- package/lib/typescript/src/utils/useRefEffect.d.ts +24 -0
- package/lib/typescript/src/utils/useRefEffect.d.ts.map +1 -0
- package/package.json +199 -0
- package/react-native.config.js +13 -0
- package/src/NativeTransformerTextInputModule.ts +10 -0
- package/src/Transformer.ts +32 -0
- package/src/TransformerTextInput.tsx +147 -0
- package/src/TransformerTextInputDecoratorViewNativeComponent.ts +31 -0
- package/src/formatters/phone-number.ts +327 -0
- package/src/index.tsx +10 -0
- package/src/registry.ts +120 -0
- package/src/selection.ts +62 -0
- package/src/utils/useMergeRefs.ts +59 -0
- package/src/utils/useRefEffect.ts +42 -0
|
@@ -0,0 +1,49 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import useRefEffect from "./useRefEffect.js";
|
|
11
|
+
import { useCallback } from 'react';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* Constructs a new ref that forwards new values to each of the given refs. The
|
|
15
|
+
* given refs will always be invoked in the order that they are supplied.
|
|
16
|
+
*
|
|
17
|
+
* WARNING: A known problem of merging refs using this approach is that if any
|
|
18
|
+
* of the given refs change, the returned callback ref will also be changed. If
|
|
19
|
+
* the returned callback ref is supplied as a `ref` to a React element, this may
|
|
20
|
+
* lead to problems with the given refs being invoked more times than desired.
|
|
21
|
+
*/
|
|
22
|
+
|
|
23
|
+
export default function useMergeRefs(...refs) {
|
|
24
|
+
const refEffect = useCallback(current => {
|
|
25
|
+
const cleanups = refs.map(ref => {
|
|
26
|
+
if (ref == null) {
|
|
27
|
+
return undefined;
|
|
28
|
+
}
|
|
29
|
+
if (typeof ref === 'function') {
|
|
30
|
+
const cleanup = ref(current);
|
|
31
|
+
return typeof cleanup === 'function' ? cleanup : () => {
|
|
32
|
+
ref(null);
|
|
33
|
+
};
|
|
34
|
+
}
|
|
35
|
+
ref.current = current;
|
|
36
|
+
return () => {
|
|
37
|
+
ref.current = null;
|
|
38
|
+
};
|
|
39
|
+
});
|
|
40
|
+
return () => {
|
|
41
|
+
for (const cleanup of cleanups) {
|
|
42
|
+
cleanup?.();
|
|
43
|
+
}
|
|
44
|
+
};
|
|
45
|
+
}, [...refs] // eslint-disable-line react-hooks/exhaustive-deps
|
|
46
|
+
);
|
|
47
|
+
return useRefEffect(refEffect);
|
|
48
|
+
}
|
|
49
|
+
//# sourceMappingURL=useMergeRefs.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useRefEffect","useCallback","useMergeRefs","refs","refEffect","current","cleanups","map","ref","undefined","cleanup"],"sourceRoot":"../../../src","sources":["utils/useMergeRefs.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,OAAOA,YAAY,MAAM,mBAAgB;AACzC,SAASC,WAAW,QAAQ,OAAO;;AAGnC;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAOA,eAAe,SAASC,YAAYA,CAClC,GAAGC,IAA6C,EACX;EACrC,MAAMC,SAAS,GAAGH,WAAW,CAC1BI,OAAiB,IAAK;IACrB,MAAMC,QAAoC,GAAGH,IAAI,CAACI,GAAG,CAAEC,GAAG,IAAK;MAC7D,IAAIA,GAAG,IAAI,IAAI,EAAE;QACf,OAAOC,SAAS;MAClB;MACA,IAAI,OAAOD,GAAG,KAAK,UAAU,EAAE;QAC7B,MAAME,OAAO,GAAGF,GAAG,CAACH,OAAO,CAAC;QAC5B,OAAO,OAAOK,OAAO,KAAK,UAAU,GAChCA,OAAO,GACP,MAAM;UACJF,GAAG,CAAC,IAAI,CAAC;QACX,CAAC;MACP;MACAA,GAAG,CAACH,OAAO,GAAGA,OAAO;MACrB,OAAO,MAAM;QACXG,GAAG,CAACH,OAAO,GAAG,IAAI;MACpB,CAAC;IACH,CAAC,CAAC;IAEF,OAAO,MAAM;MACX,KAAK,MAAMK,OAAO,IAAIJ,QAAQ,EAAE;QAC9BI,OAAO,GAAG,CAAC;MACb;IACF,CAAC;EACH,CAAC,EACD,CAAC,GAAGP,IAAI,CAAC,CAAE;EACb,CAAC;EACD,OAAOH,YAAY,CAACI,SAAS,CAAC;AAChC","ignoreList":[]}
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
5
|
+
*
|
|
6
|
+
* This source code is licensed under the MIT license found in the
|
|
7
|
+
* LICENSE file in the root directory of this source tree.
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
import { useCallback, useRef } from 'react';
|
|
11
|
+
/**
|
|
12
|
+
* Constructs a callback ref that provides similar semantics as `useEffect`. The
|
|
13
|
+
* supplied `effect` callback will be called with non-null component instances.
|
|
14
|
+
* The `effect` callback can also optionally return a cleanup function.
|
|
15
|
+
*
|
|
16
|
+
* When a component is updated or unmounted, the cleanup function is called. The
|
|
17
|
+
* `effect` callback will then be called again, if applicable.
|
|
18
|
+
*
|
|
19
|
+
* When a new `effect` callback is supplied, the previously returned cleanup
|
|
20
|
+
* function will be called before the new `effect` callback is called with the
|
|
21
|
+
* same instance.
|
|
22
|
+
*
|
|
23
|
+
* WARNING: The `effect` callback should be stable (e.g. using `useCallback`).
|
|
24
|
+
*/
|
|
25
|
+
export default function useRefEffect(effect) {
|
|
26
|
+
const cleanupRef = useRef(undefined);
|
|
27
|
+
return useCallback(instance => {
|
|
28
|
+
if (cleanupRef.current) {
|
|
29
|
+
cleanupRef.current();
|
|
30
|
+
cleanupRef.current = undefined;
|
|
31
|
+
}
|
|
32
|
+
if (instance != null) {
|
|
33
|
+
cleanupRef.current = effect(instance);
|
|
34
|
+
}
|
|
35
|
+
}, [effect]);
|
|
36
|
+
}
|
|
37
|
+
//# sourceMappingURL=useRefEffect.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"names":["useCallback","useRef","useRefEffect","effect","cleanupRef","undefined","instance","current"],"sourceRoot":"../../../src","sources":["utils/useRefEffect.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,WAAW,EAAEC,MAAM,QAAQ,OAAO;AAI3C;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,eAAe,SAASC,YAAYA,CAClCC,MAAoD,EAC5B;EACxB,MAAMC,UAAU,GAAGH,MAAM,CAAsBI,SAAS,CAAC;EACzD,OAAOL,WAAW,CACfM,QAA0B,IAAK;IAC9B,IAAIF,UAAU,CAACG,OAAO,EAAE;MACtBH,UAAU,CAACG,OAAO,CAAC,CAAC;MACpBH,UAAU,CAACG,OAAO,GAAGF,SAAS;IAChC;IACA,IAAIC,QAAQ,IAAI,IAAI,EAAE;MACpBF,UAAU,CAACG,OAAO,GAAGJ,MAAM,CAACG,QAAQ,CAAC;IACvC;EACF,CAAC,EACD,CAACH,MAAM,CACT,CAAC;AACH","ignoreList":[]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"type":"module"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"NativeTransformerTextInputModule.d.ts","sourceRoot":"","sources":["../../../src/NativeTransformerTextInputModule.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,cAAc,CAAC;AAGhD,MAAM,WAAW,IAAK,SAAQ,WAAW;IACvC,OAAO,IAAI,OAAO,CAAC;CACpB;;AAED,wBAEE"}
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
export type Selection = {
|
|
2
|
+
start: number;
|
|
3
|
+
end: number;
|
|
4
|
+
};
|
|
5
|
+
export type TransformerWorklet = (input: {
|
|
6
|
+
value: string;
|
|
7
|
+
previousValue: string;
|
|
8
|
+
selection: Selection;
|
|
9
|
+
previousSelection: Selection;
|
|
10
|
+
}) => {
|
|
11
|
+
value?: string | null;
|
|
12
|
+
selection?: Selection | null;
|
|
13
|
+
} | null | undefined;
|
|
14
|
+
export declare class Transformer {
|
|
15
|
+
private readonly _worklet;
|
|
16
|
+
constructor(worklet: TransformerWorklet);
|
|
17
|
+
get worklet(): TransformerWorklet;
|
|
18
|
+
}
|
|
19
|
+
//# sourceMappingURL=Transformer.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Transformer.d.ts","sourceRoot":"","sources":["../../../src/Transformer.ts"],"names":[],"mappings":"AAAA,MAAM,MAAM,SAAS,GAAG;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,GAAG,EAAE,MAAM,CAAA;CAAE,CAAC;AAEvD,MAAM,MAAM,kBAAkB,GAAG,CAAC,KAAK,EAAE;IACvC,KAAK,EAAE,MAAM,CAAC;IACd,aAAa,EAAE,MAAM,CAAC;IACtB,SAAS,EAAE,SAAS,CAAC;IACrB,iBAAiB,EAAE,SAAS,CAAC;CAC9B,KACG;IACE,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;IACtB,SAAS,CAAC,EAAE,SAAS,GAAG,IAAI,CAAC;CAC9B,GACD,IAAI,GACJ,SAAS,CAAC;AAEd,qBAAa,WAAW;IACtB,OAAO,CAAC,QAAQ,CAAC,QAAQ,CAAqB;gBAElC,OAAO,EAAE,kBAAkB;IAUvC,IAAI,OAAO,uBAEV;CACF"}
|
|
@@ -0,0 +1,247 @@
|
|
|
1
|
+
import { type HostInstance, type TextInputProps } from 'react-native';
|
|
2
|
+
import { type Transformer } from './Transformer';
|
|
3
|
+
type TransformerTextInputInstanceMethods = {
|
|
4
|
+
/**
|
|
5
|
+
* Get the current text value.
|
|
6
|
+
*/
|
|
7
|
+
getValue: () => string;
|
|
8
|
+
/**
|
|
9
|
+
* Update the value and/or selection, optionally running the transformer.
|
|
10
|
+
*/
|
|
11
|
+
update: (options: {
|
|
12
|
+
/**
|
|
13
|
+
* New value to apply.
|
|
14
|
+
*/
|
|
15
|
+
value?: string | null;
|
|
16
|
+
/**
|
|
17
|
+
* Optional selection to apply alongside the value.
|
|
18
|
+
*/
|
|
19
|
+
selection?: {
|
|
20
|
+
start: number;
|
|
21
|
+
end: number;
|
|
22
|
+
};
|
|
23
|
+
/**
|
|
24
|
+
* Whether to run the transformer on update. Defaults to true.
|
|
25
|
+
*/
|
|
26
|
+
transform?: boolean;
|
|
27
|
+
}) => void;
|
|
28
|
+
/**
|
|
29
|
+
* Clear the input value without running the transformer.
|
|
30
|
+
*/
|
|
31
|
+
clear: () => void;
|
|
32
|
+
};
|
|
33
|
+
export type TransformerTextInputInstance = HostInstance & TransformerTextInputInstanceMethods;
|
|
34
|
+
export type TransformerTextInputProps = Omit<TextInputProps, 'value'> & {
|
|
35
|
+
/**
|
|
36
|
+
* Transformer instance used to sync text changes on the UI thread.
|
|
37
|
+
*/
|
|
38
|
+
transformer: Transformer;
|
|
39
|
+
};
|
|
40
|
+
export declare const TransformerTextInput: import("react").ForwardRefExoticComponent<Omit<Readonly<Omit<Omit<Readonly<Omit<Readonly<{
|
|
41
|
+
onAccessibilityAction?: ((event: import("react-native").AccessibilityActionEvent) => unknown) | undefined;
|
|
42
|
+
onAccessibilityTap?: (() => unknown) | undefined;
|
|
43
|
+
onLayout?: ((event: import("react-native").LayoutChangeEvent) => unknown) | undefined;
|
|
44
|
+
onMagicTap?: (() => unknown) | undefined;
|
|
45
|
+
onAccessibilityEscape?: (() => unknown) | undefined;
|
|
46
|
+
}>, "onMoveShouldSetResponder" | "onMoveShouldSetResponderCapture" | "onResponderGrant" | "onResponderMove" | "onResponderReject" | "onResponderRelease" | "onResponderStart" | "onResponderEnd" | "onResponderTerminate" | "onResponderTerminationRequest" | "onStartShouldSetResponder" | "onStartShouldSetResponderCapture" | "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
47
|
+
onMoveShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
48
|
+
onMoveShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
49
|
+
onResponderGrant?: ((e: import("react-native").GestureResponderEvent) => void | boolean) | undefined;
|
|
50
|
+
onResponderMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
51
|
+
onResponderReject?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
52
|
+
onResponderRelease?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
53
|
+
onResponderStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
54
|
+
onResponderEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
55
|
+
onResponderTerminate?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
56
|
+
onResponderTerminationRequest?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
57
|
+
onStartShouldSetResponder?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
58
|
+
onStartShouldSetResponderCapture?: ((e: import("react-native").GestureResponderEvent) => boolean) | undefined;
|
|
59
|
+
}>, "onMouseEnter" | "onMouseLeave" | "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
60
|
+
onMouseEnter?: ((event: import("react-native").MouseEvent) => void) | undefined;
|
|
61
|
+
onMouseLeave?: ((event: import("react-native").MouseEvent) => void) | undefined;
|
|
62
|
+
}>, "onClick" | "onClickCapture" | "onPointerEnter" | "onPointerEnterCapture" | "onPointerLeave" | "onPointerLeaveCapture" | "onPointerMove" | "onPointerMoveCapture" | "onPointerCancel" | "onPointerCancelCapture" | "onPointerDown" | "onPointerDownCapture" | "onPointerUp" | "onPointerUpCapture" | "onPointerOver" | "onPointerOverCapture" | "onPointerOut" | "onPointerOutCapture" | "onGotPointerCapture" | "onGotPointerCaptureCapture" | "onLostPointerCapture" | "onLostPointerCaptureCapture" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
63
|
+
onClick?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
64
|
+
onClickCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
65
|
+
onPointerEnter?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
66
|
+
onPointerEnterCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
67
|
+
onPointerLeave?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
68
|
+
onPointerLeaveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
69
|
+
onPointerMove?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
70
|
+
onPointerMoveCapture?: ((event: import("react-native").PointerEvent) => void) | undefined;
|
|
71
|
+
onPointerCancel?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
72
|
+
onPointerCancelCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
73
|
+
onPointerDown?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
74
|
+
onPointerDownCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
75
|
+
onPointerUp?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
76
|
+
onPointerUpCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
77
|
+
onPointerOver?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
78
|
+
onPointerOverCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
79
|
+
onPointerOut?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
80
|
+
onPointerOutCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
81
|
+
onGotPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
82
|
+
onGotPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
83
|
+
onLostPointerCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
84
|
+
onLostPointerCaptureCapture?: ((e: import("react-native").PointerEvent) => void) | undefined;
|
|
85
|
+
}>, "onClick" | "onBlur" | "onBlurCapture" | "onFocus" | "onFocusCapture" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
86
|
+
onBlur?: ((event: import("react-native").BlurEvent) => void) | undefined;
|
|
87
|
+
onBlurCapture?: ((event: import("react-native").BlurEvent) => void) | undefined;
|
|
88
|
+
onFocus?: ((event: import("react-native").FocusEvent) => void) | undefined;
|
|
89
|
+
onFocusCapture?: ((event: import("react-native").FocusEvent) => void) | undefined;
|
|
90
|
+
}>, "onClick" | "onTouchCancel" | "onTouchCancelCapture" | "onTouchEnd" | "onTouchEndCapture" | "onTouchMove" | "onTouchMoveCapture" | "onTouchStart" | "onTouchStartCapture" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
91
|
+
onTouchCancel?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
92
|
+
onTouchCancelCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
93
|
+
onTouchEnd?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
94
|
+
onTouchEndCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
95
|
+
onTouchMove?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
96
|
+
onTouchMoveCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
97
|
+
onTouchStart?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
98
|
+
onTouchStartCapture?: ((e: import("react-native").GestureResponderEvent) => void) | undefined;
|
|
99
|
+
}>, "onClick" | "nativeBackgroundAndroid" | "nativeForegroundAndroid" | "renderToHardwareTextureAndroid" | "hasTVPreferredFocus" | "nextFocusDown" | "nextFocusForward" | "nextFocusLeft" | "nextFocusRight" | "nextFocusUp" | "focusable" | "tabIndex" | "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
100
|
+
nativeBackgroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
|
|
101
|
+
nativeForegroundAndroid?: import("react-native/types_generated/Libraries/Components/View/ViewPropTypes").AndroidDrawable | undefined;
|
|
102
|
+
renderToHardwareTextureAndroid?: boolean | undefined;
|
|
103
|
+
hasTVPreferredFocus?: boolean | undefined;
|
|
104
|
+
nextFocusDown?: number | undefined;
|
|
105
|
+
nextFocusForward?: number | undefined;
|
|
106
|
+
nextFocusLeft?: number | undefined;
|
|
107
|
+
nextFocusRight?: number | undefined;
|
|
108
|
+
nextFocusUp?: number | undefined;
|
|
109
|
+
focusable?: boolean | undefined;
|
|
110
|
+
tabIndex?: 0 | -1;
|
|
111
|
+
onClick?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
|
|
112
|
+
}>, "shouldRasterizeIOS" | "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
113
|
+
shouldRasterizeIOS?: boolean | undefined;
|
|
114
|
+
}>, "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden" | "accessibilityLabelledBy" | "aria-labelledby" | "accessibilityLiveRegion" | "aria-live" | "importantForAccessibility" | "screenReaderFocusable" | "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<Omit<Readonly<{
|
|
115
|
+
accessibilityLabelledBy?: (string | undefined) | (Array<string> | undefined);
|
|
116
|
+
"aria-labelledby"?: string | undefined;
|
|
117
|
+
accessibilityLiveRegion?: ("none" | "polite" | "assertive") | undefined;
|
|
118
|
+
"aria-live"?: ("polite" | "assertive" | "off") | undefined;
|
|
119
|
+
importantForAccessibility?: ("auto" | "yes" | "no" | "no-hide-descendants") | undefined;
|
|
120
|
+
screenReaderFocusable?: boolean;
|
|
121
|
+
}>, "accessibilityIgnoresInvertColors" | "accessibilityViewIsModal" | "accessibilityShowsLargeContentViewer" | "accessibilityLargeContentTitle" | "aria-modal" | "accessibilityElementsHidden" | "accessibilityLanguage" | "accessibilityRespondsToUserInteraction" | "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & Omit<Readonly<{
|
|
122
|
+
accessibilityIgnoresInvertColors?: boolean | undefined;
|
|
123
|
+
accessibilityViewIsModal?: boolean | undefined;
|
|
124
|
+
accessibilityShowsLargeContentViewer?: boolean | undefined;
|
|
125
|
+
accessibilityLargeContentTitle?: string | undefined;
|
|
126
|
+
"aria-modal"?: boolean | undefined;
|
|
127
|
+
accessibilityElementsHidden?: boolean | undefined;
|
|
128
|
+
accessibilityLanguage?: string | undefined;
|
|
129
|
+
accessibilityRespondsToUserInteraction?: boolean | undefined;
|
|
130
|
+
}>, "accessible" | "accessibilityLabel" | "accessibilityHint" | "aria-label" | "accessibilityRole" | "role" | "accessibilityState" | "accessibilityValue" | "aria-valuemax" | "aria-valuemin" | "aria-valuenow" | "aria-valuetext" | "accessibilityActions" | "aria-busy" | "aria-checked" | "aria-disabled" | "aria-expanded" | "aria-selected" | "aria-hidden"> & {
|
|
131
|
+
accessible?: boolean | undefined;
|
|
132
|
+
accessibilityLabel?: string | undefined;
|
|
133
|
+
accessibilityHint?: string | undefined;
|
|
134
|
+
"aria-label"?: string | undefined;
|
|
135
|
+
accessibilityRole?: import("react-native").AccessibilityRole | undefined;
|
|
136
|
+
role?: import("react-native").Role | undefined;
|
|
137
|
+
accessibilityState?: import("react-native").AccessibilityState | undefined;
|
|
138
|
+
accessibilityValue?: import("react-native").AccessibilityValue | undefined;
|
|
139
|
+
"aria-valuemax"?: import("react-native").AccessibilityValue["max"] | undefined;
|
|
140
|
+
"aria-valuemin"?: import("react-native").AccessibilityValue["min"] | undefined;
|
|
141
|
+
"aria-valuenow"?: import("react-native").AccessibilityValue["now"] | undefined;
|
|
142
|
+
"aria-valuetext"?: import("react-native").AccessibilityValue["text"] | undefined;
|
|
143
|
+
accessibilityActions?: ReadonlyArray<import("react-native/types_generated/Libraries/Components/View/ViewAccessibility").AccessibilityActionInfo> | undefined;
|
|
144
|
+
"aria-busy"?: boolean | undefined;
|
|
145
|
+
"aria-checked"?: (boolean | undefined) | "mixed";
|
|
146
|
+
"aria-disabled"?: boolean | undefined;
|
|
147
|
+
"aria-expanded"?: boolean | undefined;
|
|
148
|
+
"aria-selected"?: boolean | undefined;
|
|
149
|
+
"aria-hidden"?: boolean | undefined;
|
|
150
|
+
}>, "children" | "style" | "collapsable" | "collapsableChildren" | "id" | "testID" | "nativeID" | "needsOffscreenAlphaCompositing" | "hitSlop" | "pointerEvents" | "removeClippedSubviews" | "experimental_accessibilityOrder"> & Omit<Readonly<{
|
|
151
|
+
children?: React.ReactNode;
|
|
152
|
+
style?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheet").ViewStyleProp | undefined;
|
|
153
|
+
collapsable?: boolean | undefined;
|
|
154
|
+
collapsableChildren?: boolean | undefined;
|
|
155
|
+
id?: string;
|
|
156
|
+
testID?: string | undefined;
|
|
157
|
+
nativeID?: string | undefined;
|
|
158
|
+
needsOffscreenAlphaCompositing?: boolean | undefined;
|
|
159
|
+
hitSlop?: import("react-native/types_generated/Libraries/StyleSheet/EdgeInsetsPropType").EdgeInsetsOrSizeProp | undefined;
|
|
160
|
+
pointerEvents?: ("auto" | "box-none" | "box-only" | "none") | undefined;
|
|
161
|
+
removeClippedSubviews?: boolean | undefined;
|
|
162
|
+
experimental_accessibilityOrder?: Array<string> | undefined;
|
|
163
|
+
}>, never>>, "style" | "experimental_accessibilityOrder">, "onBlur" | "onFocus" | "style" | "selection" | "disableKeyboardShortcuts" | "clearButtonMode" | "clearTextOnFocus" | "dataDetectorTypes" | "enablesReturnKeyAutomatically" | "inputAccessoryViewID" | "inputAccessoryViewButtonLabel" | "keyboardAppearance" | "passwordRules" | "rejectResponderTermination" | "scrollEnabled" | "spellCheck" | "textContentType" | "lineBreakStrategyIOS" | "lineBreakModeIOS" | "smartInsertDelete" | "cursorColor" | "selectionHandleColor" | "disableFullscreenUI" | "importantForAutofill" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "rows" | "showSoftInputOnFocus" | "textBreakStrategy" | "underlineColorAndroid" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "allowFontScaling" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxFontSizeMultiplier" | "maxLength" | "multiline" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onPress" | "onPressIn" | "onPressOut" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selectionColor" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior" | "value" | "textAlign"> & Omit<Readonly<{
|
|
164
|
+
disableKeyboardShortcuts?: boolean | undefined;
|
|
165
|
+
clearButtonMode?: ("never" | "while-editing" | "unless-editing" | "always") | undefined;
|
|
166
|
+
clearTextOnFocus?: boolean | undefined;
|
|
167
|
+
dataDetectorTypes?: (import("react-native/types_generated/Libraries/Components/TextInput/TextInput.flow").DataDetectorTypesType | undefined) | ReadonlyArray<import("react-native/types_generated/Libraries/Components/TextInput/TextInput.flow").DataDetectorTypesType>;
|
|
168
|
+
enablesReturnKeyAutomatically?: boolean | undefined;
|
|
169
|
+
inputAccessoryViewID?: string | undefined;
|
|
170
|
+
inputAccessoryViewButtonLabel?: string | undefined;
|
|
171
|
+
keyboardAppearance?: ("default" | "light" | "dark") | undefined;
|
|
172
|
+
passwordRules?: import("react-native/types_generated/Libraries/Components/TextInput/TextInput.flow").PasswordRules | undefined;
|
|
173
|
+
rejectResponderTermination?: boolean | undefined;
|
|
174
|
+
scrollEnabled?: boolean | undefined;
|
|
175
|
+
spellCheck?: boolean | undefined;
|
|
176
|
+
textContentType?: import("react-native").TextContentType | undefined;
|
|
177
|
+
lineBreakStrategyIOS?: ("none" | "standard" | "hangul-word" | "push-out") | undefined;
|
|
178
|
+
lineBreakModeIOS?: ("wordWrapping" | "char" | "clip" | "head" | "middle" | "tail") | undefined;
|
|
179
|
+
smartInsertDelete?: boolean | undefined;
|
|
180
|
+
}>, "onBlur" | "onFocus" | "style" | "selection" | "cursorColor" | "selectionHandleColor" | "disableFullscreenUI" | "importantForAutofill" | "inlineImageLeft" | "inlineImagePadding" | "numberOfLines" | "returnKeyLabel" | "rows" | "showSoftInputOnFocus" | "textBreakStrategy" | "underlineColorAndroid" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "allowFontScaling" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxFontSizeMultiplier" | "maxLength" | "multiline" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onPress" | "onPressIn" | "onPressOut" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selectionColor" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior" | "value" | "textAlign"> & Omit<Readonly<{
|
|
181
|
+
cursorColor?: import("react-native").ColorValue | undefined;
|
|
182
|
+
selectionHandleColor?: import("react-native").ColorValue | undefined;
|
|
183
|
+
disableFullscreenUI?: boolean | undefined;
|
|
184
|
+
importantForAutofill?: ("auto" | "no" | "noExcludeDescendants" | "yes" | "yesExcludeDescendants") | undefined;
|
|
185
|
+
inlineImageLeft?: string | undefined;
|
|
186
|
+
inlineImagePadding?: number | undefined;
|
|
187
|
+
numberOfLines?: number | undefined;
|
|
188
|
+
returnKeyLabel?: string | undefined;
|
|
189
|
+
rows?: number | undefined;
|
|
190
|
+
showSoftInputOnFocus?: boolean | undefined;
|
|
191
|
+
textBreakStrategy?: ("simple" | "highQuality" | "balanced") | undefined;
|
|
192
|
+
underlineColorAndroid?: import("react-native").ColorValue | undefined;
|
|
193
|
+
}>, "onBlur" | "onFocus" | "style" | "selection" | "experimental_acceptDragAndDropTypes" | "autoCapitalize" | "autoComplete" | "autoCorrect" | "autoFocus" | "allowFontScaling" | "caretHidden" | "contextMenuHidden" | "defaultValue" | "editable" | "forwardedRef" | "enterKeyHint" | "inputMode" | "keyboardType" | "maxFontSizeMultiplier" | "maxLength" | "multiline" | "onChange" | "onChangeText" | "onContentSizeChange" | "onEndEditing" | "onKeyPress" | "onPress" | "onPressIn" | "onPressOut" | "onSelectionChange" | "onSubmitEditing" | "onScroll" | "placeholder" | "placeholderTextColor" | "readOnly" | "returnKeyType" | "secureTextEntry" | "selectionColor" | "selectTextOnFocus" | "blurOnSubmit" | "submitBehavior" | "value" | "textAlign"> & Omit<Readonly<{
|
|
194
|
+
experimental_acceptDragAndDropTypes?: ReadonlyArray<string> | undefined;
|
|
195
|
+
autoCapitalize?: import("react-native").AutoCapitalize | undefined;
|
|
196
|
+
autoComplete?: ("additional-name" | "address-line1" | "address-line2" | "birthdate-day" | "birthdate-full" | "birthdate-month" | "birthdate-year" | "cc-csc" | "cc-exp" | "cc-exp-day" | "cc-exp-month" | "cc-exp-year" | "cc-number" | "cc-name" | "cc-given-name" | "cc-middle-name" | "cc-family-name" | "cc-type" | "country" | "current-password" | "email" | "family-name" | "gender" | "given-name" | "honorific-prefix" | "honorific-suffix" | "name" | "name-family" | "name-given" | "name-middle" | "name-middle-initial" | "name-prefix" | "name-suffix" | "new-password" | "nickname" | "one-time-code" | "organization" | "organization-title" | "password" | "password-new" | "postal-address" | "postal-address-country" | "postal-address-extended" | "postal-address-extended-postal-code" | "postal-address-locality" | "postal-address-region" | "postal-code" | "street-address" | "sms-otp" | "tel" | "tel-country-code" | "tel-national" | "tel-device" | "url" | "username" | "username-new" | "off") | undefined;
|
|
197
|
+
autoCorrect?: boolean | undefined;
|
|
198
|
+
autoFocus?: boolean | undefined;
|
|
199
|
+
allowFontScaling?: boolean | undefined;
|
|
200
|
+
caretHidden?: boolean | undefined;
|
|
201
|
+
contextMenuHidden?: boolean | undefined;
|
|
202
|
+
defaultValue?: string | undefined;
|
|
203
|
+
editable?: boolean | undefined;
|
|
204
|
+
forwardedRef?: React.Ref<import("react-native/types_generated/Libraries/Components/TextInput/TextInput.flow").TextInputInstance> | undefined;
|
|
205
|
+
enterKeyHint?: import("react-native").EnterKeyHintTypeOptions | undefined;
|
|
206
|
+
inputMode?: import("react-native").InputModeOptions | undefined;
|
|
207
|
+
keyboardType?: import("react-native").KeyboardTypeOptions | undefined;
|
|
208
|
+
maxFontSizeMultiplier?: number | undefined;
|
|
209
|
+
maxLength?: number | undefined;
|
|
210
|
+
multiline?: boolean | undefined;
|
|
211
|
+
onBlur?: ((e: import("react-native/types_generated/Libraries/Components/TextInput/TextInput.flow").TextInputBlurEvent) => unknown) | undefined;
|
|
212
|
+
onChange?: ((e: import("react-native").TextInputChangeEvent) => unknown) | undefined;
|
|
213
|
+
onChangeText?: ((text: string) => unknown) | undefined;
|
|
214
|
+
onContentSizeChange?: ((e: import("react-native").TextInputContentSizeChangeEvent) => unknown) | undefined;
|
|
215
|
+
onEndEditing?: ((e: import("react-native").TextInputEndEditingEvent) => unknown) | undefined;
|
|
216
|
+
onFocus?: ((e: import("react-native").TextInputFocusEvent) => unknown) | undefined;
|
|
217
|
+
onKeyPress?: ((e: import("react-native").TextInputKeyPressEvent) => unknown) | undefined;
|
|
218
|
+
onPress?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
|
|
219
|
+
onPressIn?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
|
|
220
|
+
onPressOut?: ((event: import("react-native").GestureResponderEvent) => unknown) | undefined;
|
|
221
|
+
onSelectionChange?: ((e: import("react-native").TextInputSelectionChangeEvent) => unknown) | undefined;
|
|
222
|
+
onSubmitEditing?: ((e: import("react-native").TextInputSubmitEditingEvent) => unknown) | undefined;
|
|
223
|
+
onScroll?: ((e: import("react-native").ScrollEvent) => unknown) | undefined;
|
|
224
|
+
placeholder?: string | undefined;
|
|
225
|
+
placeholderTextColor?: import("react-native").ColorValue | undefined;
|
|
226
|
+
readOnly?: boolean | undefined;
|
|
227
|
+
returnKeyType?: import("react-native").ReturnKeyTypeOptions | undefined;
|
|
228
|
+
secureTextEntry?: boolean | undefined;
|
|
229
|
+
selection?: Readonly<{
|
|
230
|
+
start: number;
|
|
231
|
+
end?: number | undefined;
|
|
232
|
+
}> | undefined;
|
|
233
|
+
selectionColor?: import("react-native").ColorValue | undefined;
|
|
234
|
+
selectTextOnFocus?: boolean | undefined;
|
|
235
|
+
blurOnSubmit?: boolean | undefined;
|
|
236
|
+
submitBehavior?: import("react-native").SubmitBehavior | undefined;
|
|
237
|
+
style?: import("react-native/types_generated/Libraries/StyleSheet/StyleSheet").TextStyleProp | undefined;
|
|
238
|
+
value?: string | undefined;
|
|
239
|
+
textAlign?: ("left" | "center" | "right") | undefined;
|
|
240
|
+
}>, never>>, "value"> & {
|
|
241
|
+
/**
|
|
242
|
+
* Transformer instance used to sync text changes on the UI thread.
|
|
243
|
+
*/
|
|
244
|
+
transformer: Transformer;
|
|
245
|
+
} & import("react").RefAttributes<TransformerTextInputInstance>>;
|
|
246
|
+
export {};
|
|
247
|
+
//# sourceMappingURL=TransformerTextInput.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransformerTextInput.d.ts","sourceRoot":"","sources":["../../../src/TransformerTextInput.tsx"],"names":[],"mappings":"AASA,OAAO,EAGL,KAAK,YAAY,EACjB,KAAK,cAAc,EACpB,MAAM,cAAc,CAAC;AACtB,OAAO,EAAkB,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAQjE,KAAK,mCAAmC,GAAG;IACzC;;OAEG;IACH,QAAQ,EAAE,MAAM,MAAM,CAAC;IACvB;;OAEG;IACH,MAAM,EAAE,CAAC,OAAO,EAAE;QAChB;;WAEG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,IAAI,CAAC;QACtB;;WAEG;QACH,SAAS,CAAC,EAAE;YAAE,KAAK,EAAE,MAAM,CAAC;YAAC,GAAG,EAAE,MAAM,CAAA;SAAE,CAAC;QAC3C;;WAEG;QACH,SAAS,CAAC,EAAE,OAAO,CAAC;KACrB,KAAK,IAAI,CAAC;IACX;;OAEG;IACH,KAAK,EAAE,MAAM,IAAI,CAAC;CACnB,CAAC;AAEF,MAAM,MAAM,4BAA4B,GAAG,YAAY,GACrD,mCAAmC,CAAC;AAEtC,MAAM,MAAM,yBAAyB,GAAG,IAAI,CAAC,cAAc,EAAE,OAAO,CAAC,GAAG;IACtE;;OAEG;IACH,WAAW,EAAE,WAAW,CAAC;CAC1B,CAAC;AAEF,eAAO,MAAM,oBAAoB;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;WAsF4xnB,CAAC;;;;;;;;;;IA5F5znB;;OAEG;iBACU,WAAW;gEAoFzB,CAAC"}
|
|
@@ -0,0 +1,12 @@
|
|
|
1
|
+
import React from 'react';
|
|
2
|
+
import { type HostComponent, type ViewProps, type CodegenTypes } from 'react-native';
|
|
3
|
+
interface NativeProps extends ViewProps {
|
|
4
|
+
transformerId: CodegenTypes.Int32;
|
|
5
|
+
}
|
|
6
|
+
interface NativeCommands {
|
|
7
|
+
update: (viewRef: React.ElementRef<HostComponent<NativeProps>>, transform: boolean, value: string | null, selectionStart: CodegenTypes.Int32, selectionEnd: CodegenTypes.Int32) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare const Commands: NativeCommands;
|
|
10
|
+
declare const _default: import("react-native/types_generated/Libraries/Utilities/codegenNativeComponent").NativeComponentType<NativeProps>;
|
|
11
|
+
export default _default;
|
|
12
|
+
//# sourceMappingURL=TransformerTextInputDecoratorViewNativeComponent.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"TransformerTextInputDecoratorViewNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/TransformerTextInputDecoratorViewNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAGL,KAAK,aAAa,EAClB,KAAK,SAAS,EACd,KAAK,YAAY,EAClB,MAAM,cAAc,CAAC;AAEtB,UAAU,WAAY,SAAQ,SAAS;IACrC,aAAa,EAAE,YAAY,CAAC,KAAK,CAAC;CACnC;AAED,UAAU,cAAc;IACtB,MAAM,EAAE,CACN,OAAO,EAAE,KAAK,CAAC,UAAU,CAAC,aAAa,CAAC,WAAW,CAAC,CAAC,EACrD,SAAS,EAAE,OAAO,EAClB,KAAK,EAAE,MAAM,GAAG,IAAI,EACpB,cAAc,EAAE,YAAY,CAAC,KAAK,EAClC,YAAY,EAAE,YAAY,CAAC,KAAK,KAC7B,IAAI,CAAC;CACX;AAED,eAAO,MAAM,QAAQ,EAAE,cAErB,CAAC;;AAEH,wBAGE"}
|
|
@@ -0,0 +1,18 @@
|
|
|
1
|
+
import { Transformer } from '../Transformer';
|
|
2
|
+
export type PhoneNumberTransformerOptions = {
|
|
3
|
+
/**
|
|
4
|
+
* Country code for phone number formatting.
|
|
5
|
+
* Currently only 'US' is supported.
|
|
6
|
+
* @default 'US'
|
|
7
|
+
*/
|
|
8
|
+
country?: 'US';
|
|
9
|
+
/**
|
|
10
|
+
* Enable debug logging for transformer operations.
|
|
11
|
+
* @default false
|
|
12
|
+
*/
|
|
13
|
+
debug?: boolean;
|
|
14
|
+
};
|
|
15
|
+
export declare class PhoneNumberTransformer extends Transformer {
|
|
16
|
+
constructor({ country, debug, }?: PhoneNumberTransformerOptions);
|
|
17
|
+
}
|
|
18
|
+
//# sourceMappingURL=phone-number.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"phone-number.d.ts","sourceRoot":"","sources":["../../../../src/formatters/phone-number.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,WAAW,EAAkB,MAAM,gBAAgB,CAAC;AAE7D,MAAM,MAAM,6BAA6B,GAAG;IAC1C;;;;OAIG;IACH,OAAO,CAAC,EAAE,IAAI,CAAC;IACf;;;OAGG;IACH,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AA8FF,qBAAa,sBAAuB,SAAQ,WAAW;gBACzC,EACV,OAAc,EACd,KAAa,GACd,GAAE,6BAAkC;CAsNtC"}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.tsx"],"names":[],"mappings":"AAAA,OAAO,EACL,WAAW,EACX,KAAK,kBAAkB,EACvB,KAAK,SAAS,GACf,MAAM,eAAe,CAAC;AACvB,OAAO,EACL,oBAAoB,EACpB,KAAK,4BAA4B,EACjC,KAAK,yBAAyB,GAC/B,MAAM,wBAAwB,CAAC"}
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { type Selection, type Transformer } from './Transformer';
|
|
2
|
+
type TransformerWrapper = (input: string, selectionStart: number, selectionEnd: number) => {
|
|
3
|
+
value: string;
|
|
4
|
+
selection: Selection;
|
|
5
|
+
};
|
|
6
|
+
type ReactNativeTextInputTransformerRegistry = {
|
|
7
|
+
register(id: number, transformer: TransformerWrapper): void;
|
|
8
|
+
unregister(transformerId: number): void;
|
|
9
|
+
get(transformerId: number): TransformerWrapper | undefined;
|
|
10
|
+
};
|
|
11
|
+
declare global {
|
|
12
|
+
var __rntti_registerTransformerRegistry: ReactNativeTextInputTransformerRegistry | undefined;
|
|
13
|
+
}
|
|
14
|
+
export declare function registerTransformer(transformer: Transformer): number;
|
|
15
|
+
export declare function unregisterTransformer(transformerId: number): void;
|
|
16
|
+
export {};
|
|
17
|
+
//# sourceMappingURL=registry.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"registry.d.ts","sourceRoot":"","sources":["../../../src/registry.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,KAAK,SAAS,EAAE,KAAK,WAAW,EAAE,MAAM,eAAe,CAAC;AAGjE,KAAK,kBAAkB,GAAG,CACxB,KAAK,EAAE,MAAM,EACb,cAAc,EAAE,MAAM,EACtB,YAAY,EAAE,MAAM,KACjB;IAAE,KAAK,EAAE,MAAM,CAAC;IAAC,SAAS,EAAE,SAAS,CAAA;CAAE,CAAC;AAE7C,KAAK,uCAAuC,GAAG;IAC7C,QAAQ,CAAC,EAAE,EAAE,MAAM,EAAE,WAAW,EAAE,kBAAkB,GAAG,IAAI,CAAC;IAC5D,UAAU,CAAC,aAAa,EAAE,MAAM,GAAG,IAAI,CAAC;IACxC,GAAG,CAAC,aAAa,EAAE,MAAM,GAAG,kBAAkB,GAAG,SAAS,CAAC;CAC5D,CAAC;AAEF,OAAO,CAAC,MAAM,CAAC;IACb,IAAI,mCAAmC,EACnC,uCAAuC,GACvC,SAAS,CAAC;CACf;AAoCD,wBAAgB,mBAAmB,CAAC,WAAW,EAAE,WAAW,GAAG,MAAM,CAsDpE;AAED,wBAAgB,qBAAqB,CAAC,aAAa,EAAE,MAAM,QAM1D"}
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
import { type Selection } from './Transformer';
|
|
2
|
+
export declare const computeUncontrolledSelection: (oldValue: string, newValue: string, selectionStart: number, selectionEnd: number) => Selection;
|
|
3
|
+
export declare const validateSelection: (selection: Selection, valueLength: number) => void;
|
|
4
|
+
//# sourceMappingURL=selection.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"selection.d.ts","sourceRoot":"","sources":["../../../src/selection.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,eAAe,CAAC;AAE/C,eAAO,MAAM,4BAA4B,GACvC,UAAU,MAAM,EAChB,UAAU,MAAM,EAChB,gBAAgB,MAAM,EACtB,cAAc,MAAM,KACnB,SAgCF,CAAC;AAEF,eAAO,MAAM,iBAAiB,GAC5B,WAAW,SAAS,EACpB,aAAa,MAAM,SAkBpB,CAAC"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
import type { MutableRefObject } from 'react';
|
|
8
|
+
/**
|
|
9
|
+
* Constructs a new ref that forwards new values to each of the given refs. The
|
|
10
|
+
* given refs will always be invoked in the order that they are supplied.
|
|
11
|
+
*
|
|
12
|
+
* WARNING: A known problem of merging refs using this approach is that if any
|
|
13
|
+
* of the given refs change, the returned callback ref will also be changed. If
|
|
14
|
+
* the returned callback ref is supplied as a `ref` to a React element, this may
|
|
15
|
+
* lead to problems with the given refs being invoked more times than desired.
|
|
16
|
+
*/
|
|
17
|
+
type RefWithCleanup<T> = ((instance: T | null) => void | (() => void)) | MutableRefObject<T | null> | null | undefined;
|
|
18
|
+
export default function useMergeRefs<Instance>(...refs: ReadonlyArray<RefWithCleanup<Instance>>): (instance: Instance | null) => void;
|
|
19
|
+
export {};
|
|
20
|
+
//# sourceMappingURL=useMergeRefs.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useMergeRefs.d.ts","sourceRoot":"","sources":["../../../../src/utils/useMergeRefs.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,OAAO,KAAK,EAAE,gBAAgB,EAAE,MAAM,OAAO,CAAC;AAE9C;;;;;;;;GAQG;AACH,KAAK,cAAc,CAAC,CAAC,IACjB,CAAC,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,GAAG,CAAC,MAAM,IAAI,CAAC,CAAC,GAC7C,gBAAgB,CAAC,CAAC,GAAG,IAAI,CAAC,GAC1B,IAAI,GACJ,SAAS,CAAC;AAEd,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,QAAQ,EAC3C,GAAG,IAAI,EAAE,aAAa,CAAC,cAAc,CAAC,QAAQ,CAAC,CAAC,GAC/C,CAAC,QAAQ,EAAE,QAAQ,GAAG,IAAI,KAAK,IAAI,CA8BrC"}
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*/
|
|
7
|
+
type CallbackRef<T> = (instance: T | null) => void;
|
|
8
|
+
/**
|
|
9
|
+
* Constructs a callback ref that provides similar semantics as `useEffect`. The
|
|
10
|
+
* supplied `effect` callback will be called with non-null component instances.
|
|
11
|
+
* The `effect` callback can also optionally return a cleanup function.
|
|
12
|
+
*
|
|
13
|
+
* When a component is updated or unmounted, the cleanup function is called. The
|
|
14
|
+
* `effect` callback will then be called again, if applicable.
|
|
15
|
+
*
|
|
16
|
+
* When a new `effect` callback is supplied, the previously returned cleanup
|
|
17
|
+
* function will be called before the new `effect` callback is called with the
|
|
18
|
+
* same instance.
|
|
19
|
+
*
|
|
20
|
+
* WARNING: The `effect` callback should be stable (e.g. using `useCallback`).
|
|
21
|
+
*/
|
|
22
|
+
export default function useRefEffect<TInstance>(effect: (instance: TInstance) => (() => void) | void): CallbackRef<TInstance>;
|
|
23
|
+
export {};
|
|
24
|
+
//# sourceMappingURL=useRefEffect.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"useRefEffect.d.ts","sourceRoot":"","sources":["../../../../src/utils/useRefEffect.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,KAAK,WAAW,CAAC,CAAC,IAAI,CAAC,QAAQ,EAAE,CAAC,GAAG,IAAI,KAAK,IAAI,CAAC;AAEnD;;;;;;;;;;;;;GAaG;AACH,MAAM,CAAC,OAAO,UAAU,YAAY,CAAC,SAAS,EAC5C,MAAM,EAAE,CAAC,QAAQ,EAAE,SAAS,KAAK,CAAC,MAAM,IAAI,CAAC,GAAG,IAAI,GACnD,WAAW,CAAC,SAAS,CAAC,CAcxB"}
|