<commit_before>diff --git a/node_modules/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js b/node_modules/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js
index 5dc03df..e526092 100644
--- a/node_modules/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js
+++ b/node_modules/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js
@@ -338,7 +338,7 @@ class TouchableNativeFeedback extends React.Component<Props, State> {
 }
 
 const getBackgroundProp =
-  Platform.OS === 'android'
+  Platform.OS === 'android' && Platform.Version >= 21
     ? (background, useForeground) =>
         useForeground && TouchableNativeFeedback.canUseNativeForeground()
           ? {nativeForegroundAndroid: background}
diff --git a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h
index 7e12add..f6c9e40 100644
--- a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h
+++ b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h
@@ -36,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
 // The `caretHidden` property actually is not supported yet;
 // it's declared here only to conform to the interface.
 @property (nonatomic, assign) BOOL caretHidden;
+@property (nonatomic, assign) BOOL allowImagePaste;
 
 @end
 
diff --git a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.m b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.m
index 88d3183..79185de 100644
--- a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.m
+++ b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.m
@@ -173,6 +173,9 @@ - (void)setSelectedTextRange:(UITextRange *)selectedTextRange notifyDelegate:(BO
 
 - (void)paste:(id)sender
 {
+  if ([UIPasteboard generalPasteboard].hasImages && _allowImagePaste) {
+    [_textInputDelegate textInputImagePasted];
+  }
   [super paste:sender];
   _textWasPasted = YES;
 }
@@ -261,6 +264,9 @@ - (BOOL)canPerformAction:(SEL)action withSender:(id)sender
     return NO;
   }
   
+  if (action == @selector(paste:) && [UIPasteboard generalPasteboard].hasImages) {
+    return _allowImagePaste;
+  }
   return [super canPerformAction:action withSender:sender];
 }
 
diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h b/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h
index 3e1839b..2df81fb 100644
--- a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h
+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h
@@ -32,6 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)textInputDidChange;
 
 - (void)textInputDidChangeSelection;
+- (void)textInputImagePasted;
 
 @optional
 
diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m
index aa69593..8366cf2 100644
--- a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m
+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m
@@ -19,6 +19,8 @@
 #import <React/RCTTextAttributes.h>
 #import <React/RCTTextSelection.h>
 
+#import <MobileCoreServices/MobileCoreServices.h>
+
 @implementation RCTBaseTextInputView {
   __weak RCTBridge *_bridge;
   __weak RCTEventDispatcher *_eventDispatcher;
@@ -479,6 +481,36 @@ - (void)textInputDidChangeSelection
   });
 }
 
+- (void)textInputImagePasted
+{
+  NSFileManager *fileManager = [NSFileManager defaultManager];
+  UIPasteboard *clipboard = [UIPasteboard generalPasteboard];
+  NSData *imageData = [clipboard dataForPasteboardType:(NSString*)kUTTypeImage];
+  
+  if (!imageData) {
+    RCTLog(@"Failed to get image from UIPasteboard.");
+    return;
+  }
+  
+  NSString *fileName = [@([imageData hash]) stringValue];
+  NSString *fileDest = [NSTemporaryDirectory() stringByAppendingPathComponent:fileName];
+  
+  if (![fileManager fileExistsAtPath:fileDest]) {
+    BOOL fileWritten = [imageData writeToFile:fileDest atomically:true];
+    if (!fileWritten) {
+      RCTLog(@"Failed to save image to temporary directory.");
+      return;
+    }
+  }
+  
+  NSDictionary *eventBody = @{
+    @"fileName": fileName,
+    @"filePath": fileDest,
+  };
+  
+  [_eventDispatcher sendAppEventWithName:@"imagePasted" body:eventBody];
+}
+
 - (void)updateLocalData
 {
   [self enforceTextAttributesIfNeeded];
diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m<commit_msg>Getting image dimensions from objc side<commit_after>diff --git a/node_modules/react-native/Libraries/Components/TextInput/TextInput.js b/node_modules/react-native/Libraries/Components/TextInput/TextInput.js
index b124944..ca0884a 100644
--- a/node_modules/react-native/Libraries/Components/TextInput/TextInput.js
+++ b/node_modules/react-native/Libraries/Components/TextInput/TextInput.js
@@ -207,6 +207,13 @@ export type TextContentType =
 type PasswordRules = string;
 
 type IOSProps = $ReadOnly<{|
+  /**
+   * If `true`, allows pasting of images.
+   * The default value is false.
+   * @platform ios
+   */
+  allowImagePaste?: ?boolean,
+
   /**
    * If `false`, disables spell-check style (i.e. red underlines).
    * The default value is inherited from `autoCorrect`.
diff --git a/node_modules/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js b/node_modules/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js
index 5dc03df..e526092 100644
--- a/node_modules/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js
+++ b/node_modules/react-native/Libraries/Components/Touchable/TouchableNativeFeedback.js
@@ -338,7 +338,7 @@ class TouchableNativeFeedback extends React.Component<Props, State> {
 }
 
 const getBackgroundProp =
-  Platform.OS === 'android'
+  Platform.OS === 'android' && Platform.Version >= 21
     ? (background, useForeground) =>
         useForeground && TouchableNativeFeedback.canUseNativeForeground()
           ? {nativeForegroundAndroid: background}
diff --git a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h
index 7e12add..f6c9e40 100644
--- a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h
+++ b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.h
@@ -36,6 +36,7 @@ NS_ASSUME_NONNULL_BEGIN
 // The `caretHidden` property actually is not supported yet;
 // it's declared here only to conform to the interface.
 @property (nonatomic, assign) BOOL caretHidden;
+@property (nonatomic, assign) BOOL allowImagePaste;
 
 @end
 
diff --git a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.m b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.m
index 88d3183..79185de 100644
--- a/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.m
+++ b/node_modules/react-native/Libraries/Text/TextInput/Multiline/RCTUITextView.m
@@ -173,6 +173,9 @@ - (void)setSelectedTextRange:(UITextRange *)selectedTextRange notifyDelegate:(BO
 
 - (void)paste:(id)sender
 {
+  if ([UIPasteboard generalPasteboard].hasImages && _allowImagePaste) {
+    [_textInputDelegate textInputImagePasted];
+  }
   [super paste:sender];
   _textWasPasted = YES;
 }
@@ -261,6 +264,9 @@ - (BOOL)canPerformAction:(SEL)action withSender:(id)sender
     return NO;
   }
   
+  if (action == @selector(paste:) && [UIPasteboard generalPasteboard].hasImages) {
+    return _allowImagePaste;
+  }
   return [super canPerformAction:action withSender:sender];
 }
 
diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h b/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h
index 3e1839b..2df81fb 100644
--- a/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h
+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBackedTextInputDelegate.h
@@ -32,6 +32,7 @@ NS_ASSUME_NONNULL_BEGIN
 - (void)textInputDidChange;
 
 - (void)textInputDidChangeSelection;
+- (void)textInputImagePasted;
 
 @optional
 
diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m
index aa69593..007c6b0 100644
--- a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m
+++ b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputView.m
@@ -19,6 +19,8 @@
 #import <React/RCTTextAttributes.h>
 #import <React/RCTTextSelection.h>
 
+#import <MobileCoreServices/MobileCoreServices.h>
+
 @implementation RCTBaseTextInputView {
   __weak RCTBridge *_bridge;
   __weak RCTEventDispatcher *_eventDispatcher;
@@ -479,6 +481,39 @@ - (void)textInputDidChangeSelection
   });
 }
 
+- (void)textInputImagePasted
+{
+  NSFileManager *fileManager = [NSFileManager defaultManager];
+  UIPasteboard *clipboard = [UIPasteboard generalPasteboard];
+  NSData *imageData = [clipboard dataForPasteboardType:(NSString*)kUTTypeImage];
+  UIImage *uiImage = [UIImage imageWithData:imageData];
+  
+  if (!imageData) {
+    RCTLog(@"Failed to get image from UIPasteboard.");
+    return;
+  }
+  
+  NSString *fileName = [@([imageData hash]) stringValue];
+  NSString *fileDest = [NSTemporaryDirectory() stringByAppendingPathComponent:fileName];
+  
+  if (![fileManager fileExistsAtPath:fileDest]) {
+    BOOL fileWritten = [imageData writeToFile:fileDest atomically:true];
+    if (!fileWritten) {
+      RCTLog(@"Failed to save image to temporary directory.");
+      return;
+    }
+  }
+  
+  NSDictionary *eventBody = @{
+    @"fileName": fileName,
+    @"filePath": fileDest,
+    @"height": @(uiImage.size.height),
+    @"width": @(uiImage.size.width),
+  };
+  
+  [_eventDispatcher sendAppEventWithName:@"imagePasted" body:eventBody];
+}
+
 - (void)updateLocalData
 {
   [self enforceTextAttributesIfNeeded];
diff --git a/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m b/node_modules/react-native/Libraries/Text/TextInput/RCTBaseTextInputViewManager.m
{'fraction_non_alphanumeric': 0.13070956621660443, 'fraction_numerical': 0.02690797663506655, 'mean_word_length': 5.1945432977461445, 'pattern_counts': {'":': 6, '<': 12, '<?xml version=': 0, '>': 15, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '5981101', 'n_tokens_mistral': 3802, 'n_tokens_neox': 3472, 'n_words': 504}