@tbvjaos510/react-native-paste-input 0.9.2 → 0.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (52) hide show
  1. package/README.md +47 -22
  2. package/android/build.gradle +5 -27
  3. package/android/src/main/java/com/mattermost/pasteinputtext/PasteInputActionCallback.kt +10 -9
  4. package/android/src/main/java/com/mattermost/pasteinputtext/PasteInputEditText.kt +1 -2
  5. package/android/src/main/java/com/mattermost/pasteinputtext/PasteInputListener.kt +91 -44
  6. package/android/src/main/java/com/mattermost/pasteinputtext/PasteTextInputManager.kt +33 -0
  7. package/ios/PasteTextInput.mm +15 -5
  8. package/ios/PasteTextInputManager.mm +28 -93
  9. package/lib/commonjs/PasteTextInput.js +5 -5
  10. package/lib/commonjs/PasteTextInput.js.map +1 -1
  11. package/lib/commonjs/PasteTextInputSpec.js +33 -0
  12. package/lib/commonjs/PasteTextInputSpec.js.map +1 -0
  13. package/lib/module/PasteTextInput.js +1 -1
  14. package/lib/module/PasteTextInput.js.map +1 -1
  15. package/lib/module/PasteTextInputSpec.js +31 -0
  16. package/lib/module/PasteTextInputSpec.js.map +1 -0
  17. package/lib/typescript/PasteTextInput.d.ts.map +1 -0
  18. package/lib/typescript/{src/PasteTextInputNativeComponent.d.ts → PasteTextInputSpec.d.ts} +4 -4
  19. package/lib/typescript/PasteTextInputSpec.d.ts.map +1 -0
  20. package/lib/typescript/index.d.ts.map +1 -0
  21. package/lib/typescript/types.d.ts.map +1 -0
  22. package/package.json +5 -17
  23. package/react-native-paste-input.podspec +12 -4
  24. package/react-native.config.js +5 -1
  25. package/src/PasteTextInput.tsx +1 -3
  26. package/{lib/module/PasteTextInputNativeComponent.ts → src/PasteTextInputSpec.ts} +34 -7
  27. package/android/generated/java/com/facebook/react/viewmanagers/PasteTextInputManagerDelegate.java +0 -236
  28. package/android/generated/java/com/facebook/react/viewmanagers/PasteTextInputManagerInterface.java +0 -84
  29. package/android/generated/jni/CMakeLists.txt +0 -36
  30. package/android/generated/jni/PasteTextInputSpecs-generated.cpp +0 -27
  31. package/android/generated/jni/PasteTextInputSpecs.h +0 -28
  32. package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/ComponentDescriptors.cpp +0 -22
  33. package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/ComponentDescriptors.h +0 -166
  34. package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/EventEmitters.cpp +0 -183
  35. package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/EventEmitters.h +0 -148
  36. package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/PasteTextInputSpecsJSI-generated.cpp +0 -17
  37. package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/PasteTextInputSpecsJSI.h +0 -19
  38. package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/Props.cpp +0 -640
  39. package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/Props.h +0 -144
  40. package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/ShadowNodes.cpp +0 -247
  41. package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/ShadowNodes.h +0 -95
  42. package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/States.cpp +0 -14
  43. package/android/generated/jni/react/renderer/components/PasteTextInputSpecs/States.h +0 -19
  44. package/lib/commonjs/PasteTextInputNativeComponent.ts +0 -277
  45. package/lib/typescript/src/PasteTextInput.d.ts.map +0 -1
  46. package/lib/typescript/src/PasteTextInputNativeComponent.d.ts.map +0 -1
  47. package/lib/typescript/src/index.d.ts.map +0 -1
  48. package/lib/typescript/src/types.d.ts.map +0 -1
  49. package/src/PasteTextInputNativeComponent.ts +0 -277
  50. /package/lib/typescript/{src/PasteTextInput.d.ts → PasteTextInput.d.ts} +0 -0
  51. /package/lib/typescript/{src/index.d.ts → index.d.ts} +0 -0
  52. /package/lib/typescript/{src/types.d.ts → types.d.ts} +0 -0
@@ -1,277 +0,0 @@
1
- import {
2
- type ColorValue,
3
- type HostComponent,
4
- type ViewProps,
5
- } from 'react-native';
6
- import type {
7
- BubblingEventHandler,
8
- DirectEventHandler,
9
- Double,
10
- Float,
11
- Int32,
12
- WithDefault,
13
- } from 'react-native/Libraries/Types/CodegenTypes';
14
- import { codegenNativeComponent } from 'react-native';
15
- import { codegenNativeCommands } from 'react-native';
16
-
17
- export interface PasteTextInputPasteEventData {
18
- data: Readonly<
19
- {
20
- fileName: string;
21
- fileSize: Int32;
22
- type: string;
23
- uri: string;
24
- }[]
25
- >;
26
- error?: Readonly<{
27
- message: string;
28
- }>;
29
- }
30
-
31
- export type TargetedEvent = {
32
- target: Int32;
33
- };
34
-
35
- export interface PasteTextInputContentSizeChangeEventData
36
- extends TargetedEvent {
37
- contentSize: {
38
- width: Int32;
39
- height: Int32;
40
- };
41
- }
42
-
43
- export interface PasteTextInputSelectionChangeEventData extends TargetedEvent {
44
- selection: Readonly<{
45
- start: Int32;
46
- end: Int32;
47
- }>;
48
- }
49
-
50
- export interface PasteTextInputScrollEventData extends TargetedEvent {
51
- contentInset: Readonly<{
52
- top: Double;
53
- bottom: Double;
54
- left: Double;
55
- right: Double;
56
- }>;
57
- contentOffset: Readonly<{ x: Double; y: Double }>;
58
- contentSize: Readonly<{
59
- width: Double;
60
- height: Double;
61
- }>;
62
- layoutMeasurement: Readonly<{
63
- width: Double;
64
- height: Double;
65
- }>;
66
- responderIgnoreScroll: boolean;
67
- velocity: Readonly<{ x: Double; y: Double }>;
68
- }
69
-
70
- export interface PasteTextInputChangeEventData extends TargetedEvent {
71
- eventCount: Int32;
72
- text: string;
73
- }
74
-
75
- export interface PasteTextInputTextInputEventData extends TargetedEvent {
76
- text: string;
77
- previousText: string;
78
- range: Readonly<{ start: Int32; end: Int32 }>;
79
- }
80
-
81
- export interface PasteTextInputEditEventData extends TargetedEvent {
82
- text: string;
83
- }
84
-
85
- export interface PasteTextInputKeyEventData extends TargetedEvent {
86
- key: string;
87
- }
88
-
89
- type KeyboardType =
90
- | 'default'
91
- | 'email-address'
92
- | 'numeric'
93
- | 'phone-pad'
94
- | 'number-pad'
95
- | 'decimal-pad'
96
- | 'url'
97
- // iOS-only
98
- | 'ascii-capable'
99
- | 'numbers-and-punctuation'
100
- | 'name-phone-pad'
101
- | 'twitter'
102
- | 'web-search'
103
- // Android-only
104
- | 'visible-password';
105
-
106
- export type ReturnKeyType =
107
- // Cross Platform
108
- | 'done'
109
- | 'go'
110
- | 'next'
111
- | 'search'
112
- | 'send'
113
- // Android-only
114
- | 'none'
115
- | 'previous'
116
- // iOS-only
117
- | 'default'
118
- | 'emergency-call'
119
- | 'google'
120
- | 'join'
121
- | 'route'
122
- | 'yahoo';
123
-
124
- export type Autocomplete =
125
- | 'birthdate-day'
126
- | 'birthdate-full'
127
- | 'birthdate-month'
128
- | 'birthdate-year'
129
- | 'cc-csc'
130
- | 'cc-exp'
131
- | 'cc-exp-day'
132
- | 'cc-exp-month'
133
- | 'cc-exp-year'
134
- | 'cc-number'
135
- | 'email'
136
- | 'gender'
137
- | 'name'
138
- | 'name-family'
139
- | 'name-given'
140
- | 'name-middle'
141
- | 'name-middle-initial'
142
- | 'name-prefix'
143
- | 'name-suffix'
144
- | 'password'
145
- | 'password-new'
146
- | 'postal-address'
147
- | 'postal-address-country'
148
- | 'postal-address-extended'
149
- | 'postal-address-extended-postal-code'
150
- | 'postal-address-locality'
151
- | 'postal-address-region'
152
- | 'postal-code'
153
- | 'street-address'
154
- | 'sms-otp'
155
- | 'tel'
156
- | 'tel-country-code'
157
- | 'tel-national'
158
- | 'tel-device'
159
- | 'username'
160
- | 'username-new'
161
- | 'off';
162
-
163
- type SubmitBehavior = 'submit' | 'blurAndSubmit' | 'newline';
164
-
165
- export interface NativeProps extends ViewProps {
166
- allowFontScaling?: boolean;
167
- autoCapitalize?: WithDefault<
168
- 'none' | 'sentences' | 'words' | 'characters',
169
- 'none'
170
- >;
171
- autoComplete?: WithDefault<Autocomplete, 'off'>;
172
- autoCorrect?: boolean;
173
- autoFocus?: boolean;
174
- blurOnSubmit?: boolean;
175
- caretHidden?: boolean;
176
- clearButtonMode?: string;
177
- clearTextOnFocus?: boolean;
178
- contextMenuHidden?: boolean;
179
- defaultValue?: string;
180
- disableCopyPaste?: boolean;
181
- disableFullscreenUI?: boolean;
182
- editable?: boolean;
183
- enablesReturnKeyAutomatically?: boolean;
184
- importantForAutofill?: string;
185
- inlineImageLeft?: string;
186
- inlineImagePadding?: Int32;
187
- inputAccessoryViewID?: string;
188
- keyboardAppearance?: string;
189
- keyboardType?: WithDefault<KeyboardType, 'default'>;
190
- maxFontSizeMultiplier?: Float;
191
- maxLength?: Int32;
192
- mostRecentEventCount?: Int32;
193
- multiline?: boolean;
194
- numberOfLines?: Int32;
195
- passwordRules?: string;
196
- placeholder?: string;
197
- placeholderTextColor?: ColorValue;
198
- returnKeyLabel?: string;
199
- returnKeyType?: WithDefault<ReturnKeyType, 'done'>;
200
- scrollEnabled?: boolean;
201
- secureTextEntry?: boolean;
202
- selection?: Readonly<{ start: Int32; end?: Int32 }>;
203
- selectionColor?: ColorValue;
204
- selectionHandleColor?: ColorValue;
205
- selectTextOnFocus?: boolean;
206
- showSoftInputOnFocus?: boolean;
207
- smartInsertDelete?: boolean;
208
- smartPunctuation?: string;
209
- spellCheck?: boolean;
210
- submitBehavior?: WithDefault<SubmitBehavior, 'submit'>;
211
-
212
- text?: string;
213
- textBreakStrategy?: WithDefault<
214
- 'simple' | 'highQuality' | 'balanced',
215
- 'simple'
216
- >;
217
- textContentType?: string;
218
- underlineColorAndroid?: ColorValue;
219
- value?: string;
220
-
221
- onBlur?: BubblingEventHandler<TargetedEvent>;
222
- onChange?: BubblingEventHandler<PasteTextInputChangeEventData>;
223
- onChangeText?: BubblingEventHandler<PasteTextInputChangeEventData>;
224
- onEndEditing?: BubblingEventHandler<PasteTextInputEditEventData>;
225
- onFocus?: BubblingEventHandler<TargetedEvent>;
226
- onKeyPress?: BubblingEventHandler<PasteTextInputKeyEventData>;
227
- onPaste?: BubblingEventHandler<PasteTextInputPasteEventData>;
228
- onSubmitEdition?: BubblingEventHandler<PasteTextInputEditEventData>;
229
-
230
- onContentSizeChange?: DirectEventHandler<PasteTextInputContentSizeChangeEventData>;
231
- onScroll?: DirectEventHandler<PasteTextInputScrollEventData>;
232
- onSelectionChange?: DirectEventHandler<PasteTextInputSelectionChangeEventData>;
233
-
234
- textShadowColor?: ColorValue;
235
- textShadowRadius?: Float;
236
- textDecorationLine?: string;
237
- fontStyle?: string;
238
- textShadowOffset?: Readonly<{ width?: Double; height?: Double }>;
239
- lineHeight?: Float;
240
- textTransform?: string;
241
- color?: Int32;
242
- letterSpacing?: Float;
243
- fontSize?: Float;
244
- textAlign?: string;
245
- includeFontPadding?: boolean;
246
- fontWeight?: string;
247
- fontFamily?: string;
248
-
249
- textAlignVertical?: string;
250
- cursorColor?: ColorValue;
251
- }
252
-
253
- type PasteTextInputNativeComponentType = HostComponent<NativeProps>;
254
-
255
- interface NativeCommands {
256
- readonly focus: (
257
- viewRef: React.ElementRef<PasteTextInputNativeComponentType>
258
- ) => void;
259
- readonly blur: (
260
- viewRef: React.ElementRef<PasteTextInputNativeComponentType>
261
- ) => void;
262
- readonly setTextAndSelection: (
263
- viewRef: React.ElementRef<PasteTextInputNativeComponentType>,
264
- mostRecentEventCount: Int32,
265
- value: string | null | undefined, // in theory this is nullable
266
- start: Int32,
267
- end: Int32
268
- ) => void;
269
- }
270
-
271
- export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
272
- supportedCommands: ['focus', 'blur', 'setTextAndSelection'],
273
- });
274
-
275
- export default codegenNativeComponent<NativeProps>(
276
- 'PasteTextInput'
277
- ) as HostComponent<NativeProps>;
@@ -1 +0,0 @@
1
- {"version":3,"file":"PasteTextInput.d.ts","sourceRoot":"","sources":["../../../src/PasteTextInput.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAC;AAI/B,OAAO,KAAK,EAER,eAAe,EACf,sBAAsB,EAGzB,MAAM,SAAS,CAAC;AA8gBjB,QAAA,MAAM,kBAAkB,gGAiEtB,CAAC;AAaH,eAAe,kBAAkB,CAAC"}
@@ -1 +0,0 @@
1
- {"version":3,"file":"PasteTextInputNativeComponent.d.ts","sourceRoot":"","sources":["../../../src/PasteTextInputNativeComponent.ts"],"names":[],"mappings":"AAAA,OAAO,EACH,KAAK,UAAU,EACf,KAAK,aAAa,EAClB,KAAK,SAAS,EACjB,MAAM,cAAc,CAAC;AACtB,OAAO,KAAK,EACR,oBAAoB,EACpB,kBAAkB,EAClB,MAAM,EACN,KAAK,EACL,KAAK,EACL,WAAW,EACd,MAAM,2CAA2C,CAAC;AAInD,MAAM,WAAW,4BAA4B;IACzC,IAAI,EAAE,QAAQ,CACV;QACI,QAAQ,EAAE,MAAM,CAAC;QACjB,QAAQ,EAAE,KAAK,CAAC;QAChB,IAAI,EAAE,MAAM,CAAC;QACb,GAAG,EAAE,MAAM,CAAC;KACf,EAAE,CACN,CAAC;IACF,KAAK,CAAC,EAAE,QAAQ,CAAC;QACb,OAAO,EAAE,MAAM,CAAC;KACnB,CAAC,CAAC;CACN;AAED,MAAM,MAAM,aAAa,GAAG;IACxB,MAAM,EAAE,KAAK,CAAC;CACjB,CAAC;AAEF,MAAM,WAAW,wCACb,SAAQ,aAAa;IACrB,WAAW,EAAE;QACT,KAAK,EAAE,KAAK,CAAC;QACb,MAAM,EAAE,KAAK,CAAC;KACjB,CAAC;CACL;AAED,MAAM,WAAW,sCAAuC,SAAQ,aAAa;IACzE,SAAS,EAAE,QAAQ,CAAC;QAChB,KAAK,EAAE,KAAK,CAAC;QACb,GAAG,EAAE,KAAK,CAAC;KACd,CAAC,CAAC;CACN;AAED,MAAM,WAAW,6BAA8B,SAAQ,aAAa;IAChE,YAAY,EAAE,QAAQ,CAAC;QACnB,GAAG,EAAE,MAAM,CAAC;QACZ,MAAM,EAAE,MAAM,CAAC;QACf,IAAI,EAAE,MAAM,CAAC;QACb,KAAK,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;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ent,
4
- type ViewProps,
5
- } from 'react-native';
6
- import type {
7
- BubblingEventHandler,
8
- DirectEventHandler,
9
- Double,
10
- Float,
11
- Int32,
12
- WithDefault,
13
- } from 'react-native/Libraries/Types/CodegenTypes';
14
- import { codegenNativeComponent } from 'react-native';
15
- import { codegenNativeCommands } from 'react-native';
16
-
17
- export interface PasteTextInputPasteEventData {
18
- data: Readonly<
19
- {
20
- fileName: string;
21
- fileSize: Int32;
22
- type: string;
23
- uri: string;
24
- }[]
25
- >;
26
- error?: Readonly<{
27
- message: string;
28
- }>;
29
- }
30
-
31
- export type TargetedEvent = {
32
- target: Int32;
33
- };
34
-
35
- export interface PasteTextInputContentSizeChangeEventData
36
- extends TargetedEvent {
37
- contentSize: {
38
- width: Int32;
39
- height: Int32;
40
- };
41
- }
42
-
43
- export interface PasteTextInputSelectionChangeEventData extends TargetedEvent {
44
- selection: Readonly<{
45
- start: Int32;
46
- end: Int32;
47
- }>;
48
- }
49
-
50
- export interface PasteTextInputScrollEventData extends TargetedEvent {
51
- contentInset: Readonly<{
52
- top: Double;
53
- bottom: Double;
54
- left: Double;
55
- right: Double;
56
- }>;
57
- contentOffset: Readonly<{ x: Double; y: Double }>;
58
- contentSize: Readonly<{
59
- width: Double;
60
- height: Double;
61
- }>;
62
- layoutMeasurement: Readonly<{
63
- width: Double;
64
- height: Double;
65
- }>;
66
- responderIgnoreScroll: boolean;
67
- velocity: Readonly<{ x: Double; y: Double }>;
68
- }
69
-
70
- export interface PasteTextInputChangeEventData extends TargetedEvent {
71
- eventCount: Int32;
72
- text: string;
73
- }
74
-
75
- export interface PasteTextInputTextInputEventData extends TargetedEvent {
76
- text: string;
77
- previousText: string;
78
- range: Readonly<{ start: Int32; end: Int32 }>;
79
- }
80
-
81
- export interface PasteTextInputEditEventData extends TargetedEvent {
82
- text: string;
83
- }
84
-
85
- export interface PasteTextInputKeyEventData extends TargetedEvent {
86
- key: string;
87
- }
88
-
89
- type KeyboardType =
90
- | 'default'
91
- | 'email-address'
92
- | 'numeric'
93
- | 'phone-pad'
94
- | 'number-pad'
95
- | 'decimal-pad'
96
- | 'url'
97
- // iOS-only
98
- | 'ascii-capable'
99
- | 'numbers-and-punctuation'
100
- | 'name-phone-pad'
101
- | 'twitter'
102
- | 'web-search'
103
- // Android-only
104
- | 'visible-password';
105
-
106
- export type ReturnKeyType =
107
- // Cross Platform
108
- | 'done'
109
- | 'go'
110
- | 'next'
111
- | 'search'
112
- | 'send'
113
- // Android-only
114
- | 'none'
115
- | 'previous'
116
- // iOS-only
117
- | 'default'
118
- | 'emergency-call'
119
- | 'google'
120
- | 'join'
121
- | 'route'
122
- | 'yahoo';
123
-
124
- export type Autocomplete =
125
- | 'birthdate-day'
126
- | 'birthdate-full'
127
- | 'birthdate-month'
128
- | 'birthdate-year'
129
- | 'cc-csc'
130
- | 'cc-exp'
131
- | 'cc-exp-day'
132
- | 'cc-exp-month'
133
- | 'cc-exp-year'
134
- | 'cc-number'
135
- | 'email'
136
- | 'gender'
137
- | 'name'
138
- | 'name-family'
139
- | 'name-given'
140
- | 'name-middle'
141
- | 'name-middle-initial'
142
- | 'name-prefix'
143
- | 'name-suffix'
144
- | 'password'
145
- | 'password-new'
146
- | 'postal-address'
147
- | 'postal-address-country'
148
- | 'postal-address-extended'
149
- | 'postal-address-extended-postal-code'
150
- | 'postal-address-locality'
151
- | 'postal-address-region'
152
- | 'postal-code'
153
- | 'street-address'
154
- | 'sms-otp'
155
- | 'tel'
156
- | 'tel-country-code'
157
- | 'tel-national'
158
- | 'tel-device'
159
- | 'username'
160
- | 'username-new'
161
- | 'off';
162
-
163
- type SubmitBehavior = 'submit' | 'blurAndSubmit' | 'newline';
164
-
165
- export interface NativeProps extends ViewProps {
166
- allowFontScaling?: boolean;
167
- autoCapitalize?: WithDefault<
168
- 'none' | 'sentences' | 'words' | 'characters',
169
- 'none'
170
- >;
171
- autoComplete?: WithDefault<Autocomplete, 'off'>;
172
- autoCorrect?: boolean;
173
- autoFocus?: boolean;
174
- blurOnSubmit?: boolean;
175
- caretHidden?: boolean;
176
- clearButtonMode?: string;
177
- clearTextOnFocus?: boolean;
178
- contextMenuHidden?: boolean;
179
- defaultValue?: string;
180
- disableCopyPaste?: boolean;
181
- disableFullscreenUI?: boolean;
182
- editable?: boolean;
183
- enablesReturnKeyAutomatically?: boolean;
184
- importantForAutofill?: string;
185
- inlineImageLeft?: string;
186
- inlineImagePadding?: Int32;
187
- inputAccessoryViewID?: string;
188
- keyboardAppearance?: string;
189
- keyboardType?: WithDefault<KeyboardType, 'default'>;
190
- maxFontSizeMultiplier?: Float;
191
- maxLength?: Int32;
192
- mostRecentEventCount?: Int32;
193
- multiline?: boolean;
194
- numberOfLines?: Int32;
195
- passwordRules?: string;
196
- placeholder?: string;
197
- placeholderTextColor?: ColorValue;
198
- returnKeyLabel?: string;
199
- returnKeyType?: WithDefault<ReturnKeyType, 'done'>;
200
- scrollEnabled?: boolean;
201
- secureTextEntry?: boolean;
202
- selection?: Readonly<{ start: Int32; end?: Int32 }>;
203
- selectionColor?: ColorValue;
204
- selectionHandleColor?: ColorValue;
205
- selectTextOnFocus?: boolean;
206
- showSoftInputOnFocus?: boolean;
207
- smartInsertDelete?: boolean;
208
- smartPunctuation?: string;
209
- spellCheck?: boolean;
210
- submitBehavior?: WithDefault<SubmitBehavior, 'submit'>;
211
-
212
- text?: string;
213
- textBreakStrategy?: WithDefault<
214
- 'simple' | 'highQuality' | 'balanced',
215
- 'simple'
216
- >;
217
- textContentType?: string;
218
- underlineColorAndroid?: ColorValue;
219
- value?: string;
220
-
221
- onBlur?: BubblingEventHandler<TargetedEvent>;
222
- onChange?: BubblingEventHandler<PasteTextInputChangeEventData>;
223
- onChangeText?: BubblingEventHandler<PasteTextInputChangeEventData>;
224
- onEndEditing?: BubblingEventHandler<PasteTextInputEditEventData>;
225
- onFocus?: BubblingEventHandler<TargetedEvent>;
226
- onKeyPress?: BubblingEventHandler<PasteTextInputKeyEventData>;
227
- onPaste?: BubblingEventHandler<PasteTextInputPasteEventData>;
228
- onSubmitEdition?: BubblingEventHandler<PasteTextInputEditEventData>;
229
-
230
- onContentSizeChange?: DirectEventHandler<PasteTextInputContentSizeChangeEventData>;
231
- onScroll?: DirectEventHandler<PasteTextInputScrollEventData>;
232
- onSelectionChange?: DirectEventHandler<PasteTextInputSelectionChangeEventData>;
233
-
234
- textShadowColor?: ColorValue;
235
- textShadowRadius?: Float;
236
- textDecorationLine?: string;
237
- fontStyle?: string;
238
- textShadowOffset?: Readonly<{ width?: Double; height?: Double }>;
239
- lineHeight?: Float;
240
- textTransform?: string;
241
- color?: Int32;
242
- letterSpacing?: Float;
243
- fontSize?: Float;
244
- textAlign?: string;
245
- includeFontPadding?: boolean;
246
- fontWeight?: string;
247
- fontFamily?: string;
248
-
249
- textAlignVertical?: string;
250
- cursorColor?: ColorValue;
251
- }
252
-
253
- type PasteTextInputNativeComponentType = HostComponent<NativeProps>;
254
-
255
- interface NativeCommands {
256
- readonly focus: (
257
- viewRef: React.ElementRef<PasteTextInputNativeComponentType>
258
- ) => void;
259
- readonly blur: (
260
- viewRef: React.ElementRef<PasteTextInputNativeComponentType>
261
- ) => void;
262
- readonly setTextAndSelection: (
263
- viewRef: React.ElementRef<PasteTextInputNativeComponentType>,
264
- mostRecentEventCount: Int32,
265
- value: string | null | undefined, // in theory this is nullable
266
- start: Int32,
267
- end: Int32
268
- ) => void;
269
- }
270
-
271
- export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
272
- supportedCommands: ['focus', 'blur', 'setTextAndSelection'],
273
- });
274
-
275
- export default codegenNativeComponent<NativeProps>(
276
- 'PasteTextInput'
277
- ) as HostComponent<NativeProps>;
File without changes
File without changes