react-native 0.79.0-rc.4 → 0.79.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -16,6 +16,6 @@ export const version: $ReadOnly<{
16
16
  }> = {
17
17
  major: 0,
18
18
  minor: 79,
19
- patch: 0,
20
- prerelease: 'rc.4',
19
+ patch: 1,
20
+ prerelease: null,
21
21
  };
@@ -23,8 +23,8 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(79),
26
- RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"rc.4",
26
+ RCTVersionPatch: @(1),
27
+ RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -698,6 +698,11 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
698
698
  }
699
699
 
700
700
  - (void)_restoreTextSelection
701
+ {
702
+ [self _restoreTextSelectionAndIgnoreCaretChange:NO];
703
+ }
704
+
705
+ - (void)_restoreTextSelectionAndIgnoreCaretChange:(BOOL)ignore
701
706
  {
702
707
  const auto &selection = static_cast<const TextInputProps &>(*_props).selection;
703
708
  if (!selection.has_value()) {
@@ -707,6 +712,9 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
707
712
  offset:selection->start];
708
713
  auto end = [_backedTextInputView positionFromPosition:_backedTextInputView.beginningOfDocument offset:selection->end];
709
714
  auto range = [_backedTextInputView textRangeFromPosition:start toPosition:end];
715
+ if (ignore && range.empty) {
716
+ return;
717
+ }
710
718
  [_backedTextInputView setSelectedTextRange:range notifyDelegate:YES];
711
719
  }
712
720
 
@@ -721,19 +729,20 @@ static NSSet<NSNumber *> *returnKeyTypesSet;
721
729
  // Updating the UITextView attributedText, for example changing the lineHeight, the color or adding
722
730
  // a new paragraph with \n, causes the cursor to move to the end of the Text and scroll.
723
731
  // This is fixed by restoring the cursor position and scrolling to that position (iOS issue 652653).
724
- if (selectedRange.empty) {
725
- // Maintaining a cursor position relative to the end of the old text.
726
- NSInteger offsetStart = [_backedTextInputView offsetFromPosition:_backedTextInputView.beginningOfDocument
727
- toPosition:selectedRange.start];
728
- NSInteger offsetFromEnd = oldTextLength - offsetStart;
729
- NSInteger newOffset = attributedString.string.length - offsetFromEnd;
730
- UITextPosition *position = [_backedTextInputView positionFromPosition:_backedTextInputView.beginningOfDocument
731
- offset:newOffset];
732
- [_backedTextInputView setSelectedTextRange:[_backedTextInputView textRangeFromPosition:position toPosition:position]
733
- notifyDelegate:YES];
734
- [_backedTextInputView scrollRangeToVisible:NSMakeRange(offsetStart, 0)];
735
- }
736
- [self _restoreTextSelection];
732
+ // Maintaining a cursor position relative to the end of the old text.
733
+ NSInteger offsetStart = [_backedTextInputView offsetFromPosition:_backedTextInputView.beginningOfDocument
734
+ toPosition:selectedRange.start];
735
+ NSInteger offsetFromEnd = oldTextLength - offsetStart;
736
+ NSInteger newOffset = attributedString.string.length - offsetFromEnd;
737
+ UITextPosition *position = [_backedTextInputView positionFromPosition:_backedTextInputView.beginningOfDocument
738
+ offset:newOffset];
739
+ [_backedTextInputView setSelectedTextRange:[_backedTextInputView textRangeFromPosition:position toPosition:position]
740
+ notifyDelegate:YES];
741
+ [_backedTextInputView scrollRangeToVisible:NSMakeRange(offsetStart, 0)];
742
+
743
+ // A zero-length selection range can cause the caret position to change on iOS,
744
+ // and we have already updated the caret position, so we can safely ignore caret changing in this place.
745
+ [self _restoreTextSelectionAndIgnoreCaretChange:YES];
737
746
  [self _updateTypingAttributes];
738
747
  _lastStringStateWasUpdatedWith = attributedString;
739
748
  }
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.79.0-rc.4
1
+ VERSION_NAME=0.79.1
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -11,6 +11,7 @@ import android.app.Activity
11
11
  import android.util.Pair
12
12
  import android.view.View
13
13
  import com.facebook.react.bridge.DefaultJSExceptionHandler
14
+ import com.facebook.react.bridge.JSExceptionHandler
14
15
  import com.facebook.react.bridge.ReactContext
15
16
  import com.facebook.react.bridge.ReadableArray
16
17
  import com.facebook.react.common.SurfaceDelegate
@@ -34,7 +35,7 @@ import java.io.File
34
35
  */
35
36
  public open class ReleaseDevSupportManager : DevSupportManager {
36
37
 
37
- private val defaultJSExceptionHandler: DefaultJSExceptionHandler = DefaultJSExceptionHandler()
38
+ private val defaultJSExceptionHandler: JSExceptionHandler = DefaultJSExceptionHandler()
38
39
 
39
40
  public override fun showNewJavaError(message: String?, e: Throwable?): Unit = Unit
40
41
 
@@ -17,6 +17,6 @@ public class ReactNativeVersion {
17
17
  public static final Map<String, Object> VERSION = MapBuilder.<String, Object>of(
18
18
  "major", 0,
19
19
  "minor", 79,
20
- "patch", 0,
21
- "prerelease", "rc.4");
20
+ "patch", 1,
21
+ "prerelease", null);
22
22
  }
@@ -14,15 +14,15 @@
14
14
 
15
15
  #define REACT_NATIVE_VERSION_MAJOR 0
16
16
  #define REACT_NATIVE_VERSION_MINOR 79
17
- #define REACT_NATIVE_VERSION_PATCH 0
17
+ #define REACT_NATIVE_VERSION_PATCH 1
18
18
 
19
19
  namespace facebook::react {
20
20
 
21
21
  constexpr struct {
22
22
  int32_t Major = 0;
23
23
  int32_t Minor = 79;
24
- int32_t Patch = 0;
25
- std::string_view Prerelease = "rc.4";
24
+ int32_t Patch = 1;
25
+ std::string_view Prerelease = "";
26
26
  } ReactNativeVersion;
27
27
 
28
28
  } // namespace facebook::react
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.79.0-rc.4",
3
+ "version": "0.79.1",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -108,13 +108,13 @@
108
108
  },
109
109
  "dependencies": {
110
110
  "@jest/create-cache-key-function": "^29.7.0",
111
- "@react-native/assets-registry": "0.79.0-rc.4",
112
- "@react-native/codegen": "0.79.0-rc.4",
113
- "@react-native/community-cli-plugin": "0.79.0-rc.4",
114
- "@react-native/gradle-plugin": "0.79.0-rc.4",
115
- "@react-native/js-polyfills": "0.79.0-rc.4",
116
- "@react-native/normalize-colors": "0.79.0-rc.4",
117
- "@react-native/virtualized-lists": "0.79.0-rc.4",
111
+ "@react-native/assets-registry": "0.79.1",
112
+ "@react-native/codegen": "0.79.1",
113
+ "@react-native/community-cli-plugin": "0.79.1",
114
+ "@react-native/gradle-plugin": "0.79.1",
115
+ "@react-native/js-polyfills": "0.79.1",
116
+ "@react-native/normalize-colors": "0.79.1",
117
+ "@react-native/virtualized-lists": "0.79.1",
118
118
  "abort-controller": "^3.0.0",
119
119
  "anser": "^1.4.9",
120
120
  "ansi-regex": "^5.0.0",
@@ -1081,19 +1081,19 @@ function execute(projectRoot, targetPlatform, baseOutputPath, source) {
1081
1081
  platform,
1082
1082
  );
1083
1083
 
1084
- if (source === 'app') {
1085
- // These components are only required by apps, not by libraries
1084
+ if (source === 'app' && platform !== 'android') {
1085
+ // These components are only required by apps, not by libraries. They are also Apple specific.
1086
1086
  generateRCTThirdPartyComponents(libraries, outputPath);
1087
1087
  generateRCTModuleProviders(projectRoot, pkgJson, libraries, outputPath);
1088
1088
  generateCustomURLHandlers(libraries, outputPath);
1089
1089
  generateAppDependencyProvider(outputPath);
1090
+ generateReactCodegenPodspec(
1091
+ projectRoot,
1092
+ pkgJson,
1093
+ outputPath,
1094
+ baseOutputPath,
1095
+ );
1090
1096
  }
1091
- generateReactCodegenPodspec(
1092
- projectRoot,
1093
- pkgJson,
1094
- outputPath,
1095
- baseOutputPath,
1096
- );
1097
1097
 
1098
1098
  cleanupEmptyFilesAndFolders(outputPath);
1099
1099
  }
Binary file
Binary file
Binary file