react-native-macos 0.77.4 → 0.77.6

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 (78) hide show
  1. package/Libraries/Blob/RCTBlobManager.h +0 -0
  2. package/Libraries/Blob/RCTBlobManager.mm +0 -0
  3. package/Libraries/Components/TextInput/TextInputState.js +5 -1
  4. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +0 -0
  5. package/Libraries/Core/ReactNativeVersion.js +1 -1
  6. package/Libraries/Inspector/NetworkOverlay.js +1 -1
  7. package/Libraries/Lists/FillRateHelper.js +3 -3
  8. package/Libraries/Lists/FlatList.d.ts +1 -1
  9. package/Libraries/Lists/FlatList.js +2 -2
  10. package/Libraries/Lists/SectionList.d.ts +1 -1
  11. package/Libraries/Lists/SectionList.js +2 -2
  12. package/Libraries/Lists/SectionListModern.js +2 -2
  13. package/Libraries/Lists/ViewabilityHelper.js +3 -3
  14. package/Libraries/Lists/VirtualizeUtils.js +2 -2
  15. package/Libraries/Lists/VirtualizedList.js +3 -3
  16. package/Libraries/Lists/VirtualizedListContext.js +2 -2
  17. package/Libraries/Lists/VirtualizedSectionList.js +3 -3
  18. package/Libraries/Modal/Modal.js +1 -1
  19. package/Libraries/StyleSheet/normalizeColor.js +0 -0
  20. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  21. package/React/Base/RCTJavaScriptLoader.h +0 -0
  22. package/React/Base/RCTJavaScriptLoader.mm +0 -0
  23. package/React/Base/RCTVersion.m +1 -1
  24. package/React/CoreModules/RCTDevLoadingView.mm +1 -1
  25. package/React/CoreModules/RCTLogBoxView.mm +4 -1
  26. package/React/DevSupport/RCTPausedInDebuggerOverlayController.mm +82 -14
  27. package/React/Views/RCTViewKeyboardEvent.m +24 -0
  28. package/ReactAndroid/gradle.properties +1 -1
  29. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.java +1 -1
  30. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  31. package/local-cli/cli.js +0 -0
  32. package/package.json +5 -4
  33. package/scripts/compose-source-maps.js +0 -0
  34. package/scripts/featureflags/README.md +156 -0
  35. package/scripts/featureflags/index.js +39 -0
  36. package/scripts/ios-configure-glog.sh +0 -0
  37. package/scripts/node-binary.sh +0 -0
  38. package/scripts/packager.sh +0 -0
  39. package/scripts/react-native-xcode.sh +0 -0
  40. package/scripts/react_native_pods_utils/script_phases.sh +0 -0
  41. package/scripts/xcode/ccache-clang++.sh +0 -0
  42. package/scripts/xcode/ccache-clang.sh +0 -0
  43. package/scripts/xcode/with-environment.sh +0 -0
  44. package/types/index.d.ts +1 -1
  45. package/scripts/cocoapods/autolinking.rb +0 -206
  46. package/scripts/cocoapods/autolinking_utils.rb +0 -25
  47. package/scripts/cocoapods/codegen.rb +0 -59
  48. package/scripts/cocoapods/codegen_script_phase_extractor.rb +0 -13
  49. package/scripts/cocoapods/codegen_utils.rb +0 -389
  50. package/scripts/cocoapods/fabric.rb +0 -18
  51. package/scripts/cocoapods/helpers.rb +0 -150
  52. package/scripts/cocoapods/jsengine.rb +0 -33
  53. package/scripts/cocoapods/local_podspec_patch.rb +0 -51
  54. package/scripts/cocoapods/new_architecture.rb +0 -194
  55. package/scripts/cocoapods/privacy_manifest_utils.rb +0 -194
  56. package/scripts/cocoapods/runtime.rb +0 -18
  57. package/scripts/cocoapods/spm.rb +0 -94
  58. package/scripts/cocoapods/utils.rb +0 -723
  59. package/scripts/codegen/codegen-utils.js +0 -51
  60. package/scripts/codegen/generate-artifacts-executor.js +0 -982
  61. package/scripts/codegen/generate-specs-cli-executor.js +0 -128
  62. package/scripts/codegen/templates/RCTAppDependencyProviderH.template +0 -25
  63. package/scripts/codegen/templates/RCTAppDependencyProviderMM.template +0 -55
  64. package/scripts/codegen/templates/RCTModulesConformingToProtocolsProviderH.template +0 -18
  65. package/scripts/codegen/templates/RCTModulesConformingToProtocolsProviderMM.template +0 -33
  66. package/scripts/codegen/templates/RCTThirdPartyComponentsProviderH.template +0 -16
  67. package/scripts/codegen/templates/RCTThirdPartyComponentsProviderMM.template +0 -23
  68. package/scripts/codegen/templates/ReactAppDependencyProvider.podspec.template +0 -34
  69. package/sdks/hermes-engine/hermes-engine.podspec +0 -169
  70. package/sdks/hermes-engine/hermes-utils.rb +0 -280
  71. package/sdks/hermes-engine/utils/build-apple-framework.sh +0 -225
  72. package/sdks/hermes-engine/utils/build-hermes-xcode.sh +0 -100
  73. package/sdks/hermes-engine/utils/build-hermesc-xcode.sh +0 -18
  74. package/sdks/hermes-engine/utils/build-ios-framework.sh +0 -90
  75. package/sdks/hermes-engine/utils/build-mac-framework.sh +0 -22
  76. package/sdks/hermes-engine/utils/copy-hermes-xcode.sh +0 -7
  77. package/sdks/hermes-engine/utils/create-dummy-hermes-xcframework.sh +0 -32
  78. package/sdks/hermes-engine/utils/replace_hermes_version.js +0 -106
File without changes
File without changes
@@ -103,7 +103,11 @@ function focusTextInput(textField: ?HostInstance) {
103
103
 
104
104
  if (textField != null) {
105
105
  const fieldCanBeFocused =
106
- currentlyFocusedInputRef !== textField &&
106
+ // [macOS currentlyFocusedInputRef does not account for the fact that any arbritrary view can
107
+ // recieve focus on desktop. https://github.com/facebook/react-native/pull/52472/ fixes this,
108
+ // disable the check for now
109
+ // currentlyFocusedInputRef !== textField &&
110
+ // macOS]
107
111
  // $FlowFixMe - `currentProps` is missing in `NativeMethods`
108
112
  textField.currentProps?.editable !== false;
109
113
 
@@ -16,7 +16,7 @@ const version: $ReadOnly<{
16
16
  }> = {
17
17
  major: 0,
18
18
  minor: 77,
19
- patch: 4,
19
+ patch: 6,
20
20
  prerelease: null,
21
21
  };
22
22
 
@@ -10,7 +10,7 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- import type {RenderItemProps} from '@react-native-mac/virtualized-lists'; // [macOS]
13
+ import type {RenderItemProps} from '@react-native-macos/virtualized-lists'; // [macOS]
14
14
 
15
15
  const ScrollView = require('../Components/ScrollView/ScrollView');
16
16
  const TouchableHighlight = require('../Components/Touchable/TouchableHighlight');
@@ -10,10 +10,10 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- import {typeof FillRateHelper as FillRateHelperType} from '@react-native-mac/virtualized-lists'; // [macOS]
13
+ import {typeof FillRateHelper as FillRateHelperType} from '@react-native-macos/virtualized-lists'; // [macOS]
14
14
 
15
15
  const FillRateHelper: FillRateHelperType =
16
- require('@react-native-mac/virtualized-lists').FillRateHelper; // [macOS]
16
+ require('@react-native-macos/virtualized-lists').FillRateHelper; // [macOS]
17
17
 
18
- export type {FillRateInfo} from '@react-native-mac/virtualized-lists'; // [macOS]
18
+ export type {FillRateInfo} from '@react-native-macos/virtualized-lists'; // [macOS]
19
19
  module.exports = FillRateHelper;
@@ -13,7 +13,7 @@ import type {
13
13
  ViewToken,
14
14
  VirtualizedListProps,
15
15
  ViewabilityConfig,
16
- } from '@react-native-mac/virtualized-lists'; // [macOS]
16
+ } from '@react-native-macos/virtualized-lists'; // [macOS]
17
17
  import type {ScrollViewComponent} from '../Components/ScrollView/ScrollView';
18
18
  import type {StyleProp} from '../StyleSheet/StyleSheet';
19
19
  import type {ViewStyle} from '../StyleSheet/StyleSheetTypes';
@@ -15,14 +15,14 @@ import type {
15
15
  RenderItemType,
16
16
  ViewabilityConfigCallbackPair,
17
17
  ViewToken,
18
- } from '@react-native-mac/virtualized-lists'; // [macOS]
18
+ } from '@react-native-macos/virtualized-lists'; // [macOS]
19
19
 
20
20
  import * as ReactNativeFeatureFlags from '../../src/private/featureflags/ReactNativeFeatureFlags';
21
21
  import {type ScrollResponderType} from '../Components/ScrollView/ScrollView';
22
22
  import {
23
23
  VirtualizedList,
24
24
  keyExtractor as defaultKeyExtractor,
25
- } from '@react-native-mac/virtualized-lists'; // [macOS]
25
+ } from '@react-native-macos/virtualized-lists'; // [macOS]
26
26
  import memoizeOne from 'memoize-one';
27
27
 
28
28
  const View = require('../Components/View/View');
@@ -11,7 +11,7 @@ import type * as React from 'react';
11
11
  import type {
12
12
  ListRenderItemInfo,
13
13
  VirtualizedListWithoutRenderItemProps,
14
- } from '@react-native-mac/virtualized-lists'; // [macOS]
14
+ } from '@react-native-macos/virtualized-lists'; // [macOS]
15
15
  import type {
16
16
  ScrollView,
17
17
  ScrollViewProps,
@@ -15,10 +15,10 @@ import type {
15
15
  ScrollToLocationParamsType,
16
16
  SectionBase as _SectionBase,
17
17
  VirtualizedSectionListProps,
18
- } from '@react-native-mac/virtualized-lists'; // [macOS]
18
+ } from '@react-native-macos/virtualized-lists'; // [macOS]
19
19
 
20
20
  import Platform from '../Utilities/Platform';
21
- import {VirtualizedSectionList} from '@react-native-mac/virtualized-lists'; // [macOS]
21
+ import {VirtualizedSectionList} from '@react-native-macos/virtualized-lists'; // [macOS]
22
22
  import * as React from 'react';
23
23
 
24
24
  type Item = any;
@@ -15,11 +15,11 @@ import type {
15
15
  ScrollToLocationParamsType,
16
16
  SectionBase as _SectionBase,
17
17
  VirtualizedSectionListProps,
18
- } from '@react-native-mac/virtualized-lists'; // [macOS]
18
+ } from '@react-native-macos/virtualized-lists'; // [macOS]
19
19
  import type {ElementRef} from 'react';
20
20
 
21
21
  import Platform from '../Utilities/Platform';
22
- import {VirtualizedSectionList} from '@react-native-mac/virtualized-lists'; // [macOS]
22
+ import {VirtualizedSectionList} from '@react-native-macos/virtualized-lists'; // [macOS]
23
23
  import React, {forwardRef, useImperativeHandle, useRef} from 'react';
24
24
 
25
25
  type Item = any;
@@ -14,11 +14,11 @@ export type {
14
14
  ViewToken,
15
15
  ViewabilityConfig,
16
16
  ViewabilityConfigCallbackPair,
17
- } from '@react-native-mac/virtualized-lists'; // [macOS]
17
+ } from '@react-native-macos/virtualized-lists'; // [macOS]
18
18
 
19
- import {typeof ViewabilityHelper as ViewabilityHelperType} from '@react-native-mac/virtualized-lists'; // [macOS]
19
+ import {typeof ViewabilityHelper as ViewabilityHelperType} from '@react-native-macos/virtualized-lists'; // [macOS]
20
20
 
21
21
  const ViewabilityHelper: ViewabilityHelperType =
22
- require('@react-native-mac/virtualized-lists').ViewabilityHelper; // [macOS]
22
+ require('@react-native-macos/virtualized-lists').ViewabilityHelper; // [macOS]
23
23
 
24
24
  module.exports = ViewabilityHelper;
@@ -10,9 +10,9 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- import {typeof keyExtractor as KeyExtractorType} from '@react-native-mac/virtualized-lists'; // [macOS]
13
+ import {typeof keyExtractor as KeyExtractorType} from '@react-native-macos/virtualized-lists'; // [macOS]
14
14
 
15
15
  const keyExtractor: KeyExtractorType =
16
- require('@react-native-mac/virtualized-lists').keyExtractor; // [macOS]
16
+ require('@react-native-macos/virtualized-lists').keyExtractor; // [macOS]
17
17
 
18
18
  module.exports = {keyExtractor};
@@ -10,14 +10,14 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- import {typeof VirtualizedList as VirtualizedListType} from '@react-native-mac/virtualized-lists'; // [macOS]
13
+ import {typeof VirtualizedList as VirtualizedListType} from '@react-native-macos/virtualized-lists'; // [macOS]
14
14
 
15
15
  const VirtualizedList: VirtualizedListType =
16
- require('@react-native-mac/virtualized-lists').VirtualizedList; // [macOS]
16
+ require('@react-native-macos/virtualized-lists').VirtualizedList; // [macOS]
17
17
 
18
18
  export type {
19
19
  RenderItemProps,
20
20
  RenderItemType,
21
21
  Separators,
22
- } from '@react-native-mac/virtualized-lists'; // [macOS]
22
+ } from '@react-native-macos/virtualized-lists'; // [macOS]
23
23
  module.exports = VirtualizedList;
@@ -10,9 +10,9 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- import {typeof VirtualizedListContextResetter as VirtualizedListContextResetterType} from '@react-native-mac/virtualized-lists'; // [macOS]
13
+ import {typeof VirtualizedListContextResetter as VirtualizedListContextResetterType} from '@react-native-macos/virtualized-lists'; // [macOS]
14
14
 
15
15
  const VirtualizedListContextResetter: VirtualizedListContextResetterType =
16
- require('@react-native-mac/virtualized-lists').VirtualizedListContextResetter; // [macOS]
16
+ require('@react-native-macos/virtualized-lists').VirtualizedListContextResetter; // [macOS]
17
17
 
18
18
  module.exports = {VirtualizedListContextResetter};
@@ -10,13 +10,13 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- import {typeof VirtualizedSectionList as VirtualizedSectionListType} from '@react-native-mac/virtualized-lists'; // [macOS]
13
+ import {typeof VirtualizedSectionList as VirtualizedSectionListType} from '@react-native-macos/virtualized-lists'; // [macOS]
14
14
 
15
15
  const VirtualizedSectionList: VirtualizedSectionListType =
16
- require('@react-native-mac/virtualized-lists').VirtualizedSectionList; // [macOS]
16
+ require('@react-native-macos/virtualized-lists').VirtualizedSectionList; // [macOS]
17
17
 
18
18
  export type {
19
19
  SectionBase,
20
20
  ScrollToLocationParamsType,
21
- } from '@react-native-mac/virtualized-lists'; // [macOS]
21
+ } from '@react-native-macos/virtualized-lists'; // [macOS]
22
22
  module.exports = VirtualizedSectionList;
@@ -17,7 +17,7 @@ import {type EventSubscription} from '../vendor/emitter/EventEmitter';
17
17
  import ModalInjection from './ModalInjection';
18
18
  import NativeModalManager from './NativeModalManager';
19
19
  import RCTModalHostView from './RCTModalHostViewNativeComponent';
20
- import {VirtualizedListContextResetter} from '@react-native-mac/virtualized-lists'; // [macOS]
20
+ import {VirtualizedListContextResetter} from '@react-native-macos/virtualized-lists'; // [macOS]
21
21
 
22
22
  const ScrollView = require('../Components/ScrollView/ScrollView');
23
23
  const View = require('../Components/View/View');
File without changes
@@ -18,7 +18,7 @@ const Switch = require('../Components/Switch/Switch').default;
18
18
  const TextInput = require('../Components/TextInput/TextInput');
19
19
  const View = require('../Components/View/View');
20
20
  const Text = require('../Text/Text');
21
- const {VirtualizedList} = require('@react-native-mac/virtualized-lists'); // [macOS]
21
+ const {VirtualizedList} = require('@react-native-macos/virtualized-lists'); // [macOS]
22
22
  const React = require('react');
23
23
  const ReactTestRenderer = require('react-test-renderer');
24
24
 
File without changes
File without changes
@@ -23,7 +23,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
23
23
  __rnVersion = @{
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(77),
26
- RCTVersionPatch: @(4),
26
+ RCTVersionPatch: @(6),
27
27
  RCTVersionPrerelease: [NSNull null],
28
28
  };
29
29
  });
@@ -130,7 +130,7 @@ RCT_EXPORT_MODULE()
130
130
  self->_window.rootViewController = [UIViewController new];
131
131
  #else // [macOS
132
132
  self->_window = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 375, 20)
133
- styleMask:NSWindowStyleMaskBorderless
133
+ styleMask:NSWindowStyleMaskBorderless | NSWindowStyleMaskFullSizeContentView
134
134
  backing:NSBackingStoreBuffered
135
135
  defer:YES];
136
136
  [self->_window setIdentifier:sRCTDevLoadingViewWindowIdentifier];
@@ -79,7 +79,10 @@
79
79
  #if !TARGET_OS_OSX // [macOS]
80
80
  self = [super initWithWindowScene:window.windowScene];
81
81
  #else // [macOS
82
- self = [super initWithContentRect:NSMakeRect(0, 0, 600, 800) styleMask:NSWindowStyleMaskTitled backing:NSBackingStoreBuffered defer:YES];
82
+ self = [super initWithContentRect:NSMakeRect(0, 0, 600, 800)
83
+ styleMask:NSWindowStyleMaskBorderless | NSWindowStyleMaskFullSizeContentView
84
+ backing:NSBackingStoreBuffered
85
+ defer:YES];
83
86
  _window = window;
84
87
  #endif // macOS]
85
88
 
@@ -16,19 +16,17 @@
16
16
  @end
17
17
 
18
18
  @interface RCTPausedInDebuggerOverlayController ()
19
- #if !TARGET_OS_OSX // [macOS]
20
19
 
21
- @property (nonatomic, strong) UIWindow *alertWindow;
20
+ @property (nonatomic, strong) RCTPlatformWindow *alertWindow; // [macOS]
22
21
 
23
- #endif // [macOS];
24
22
  @end
25
23
 
26
24
  @implementation RCTPausedInDebuggerViewController
27
- #if !TARGET_OS_OSX // [macOS]
28
25
  - (void)viewDidLoad
29
26
  {
30
27
  [super viewDidLoad];
31
28
 
29
+ #if !TARGET_OS_OSX // [macOS]
32
30
  UIView *dimmingView = [[UIView alloc] init];
33
31
  dimmingView.translatesAutoresizingMaskIntoConstraints = NO;
34
32
  dimmingView.backgroundColor = [[UIColor blackColor] colorWithAlphaComponent:0.2];
@@ -39,15 +37,18 @@
39
37
  [dimmingView.leadingAnchor constraintEqualToAnchor:self.view.leadingAnchor],
40
38
  [dimmingView.trailingAnchor constraintEqualToAnchor:self.view.trailingAnchor]
41
39
  ]];
42
-
43
- UILabel *messageLabel = [[UILabel alloc] init];
40
+ #endif // [macOS]
41
+
42
+ RCTUILabel *messageLabel = [[RCTUILabel alloc] init]; // [macOS]
44
43
  messageLabel.text = self.message;
45
44
  messageLabel.textAlignment = NSTextAlignmentCenter;
45
+ #if !TARGET_OS_OSX // [macOS]
46
46
  messageLabel.numberOfLines = 0;
47
+ #endif // [macOS]
47
48
  messageLabel.font = [UIFont boldSystemFontOfSize:16];
48
- messageLabel.textColor = [UIColor blackColor];
49
+ messageLabel.textColor = [RCTUIColor blackColor]; // [macOS]
49
50
  messageLabel.translatesAutoresizingMaskIntoConstraints = NO;
50
- UIView *messageContainer = [[UIView alloc] init];
51
+ RCTUIView *messageContainer = [[RCTUIView alloc] init]; // [macOS]
51
52
  [messageContainer addSubview:messageLabel];
52
53
  [NSLayoutConstraint activateConstraints:@[
53
54
  [messageLabel.topAnchor constraintEqualToAnchor:messageContainer.topAnchor constant:-1],
@@ -56,6 +57,7 @@
56
57
  [messageLabel.trailingAnchor constraintEqualToAnchor:messageContainer.trailingAnchor],
57
58
  ]];
58
59
 
60
+ #if !TARGET_OS_OSX // [macOS]
59
61
  UIButton *resumeButton = [UIButton buttonWithType:UIButtonTypeCustom];
60
62
  [resumeButton setImage:[UIImage systemImageNamed:@"forward.frame.fill"] forState:UIControlStateNormal];
61
63
  resumeButton.tintColor = [UIColor colorWithRed:0.37 green:0.37 blue:0.37 alpha:1];
@@ -65,11 +67,21 @@
65
67
  };
66
68
 
67
69
  resumeButton.enabled = NO;
70
+ #else // [macOS
71
+ NSButton *resumeButton = [[NSButton alloc] init];
72
+ [resumeButton setImage:[NSImage imageWithSystemSymbolName:@"forward.frame.fill" accessibilityDescription:@"Resume"]];
73
+ resumeButton.bordered = NO;
74
+ resumeButton.target = self;
75
+ resumeButton.action = @selector(handleResume:);
76
+ resumeButton.contentTintColor = [NSColor colorWithRed:0.37 green:0.37 blue:0.37 alpha:1];
77
+ #endif // macOS]
78
+
68
79
  [NSLayoutConstraint activateConstraints:@[
69
80
  [resumeButton.widthAnchor constraintEqualToConstant:48],
70
81
  [resumeButton.heightAnchor constraintEqualToConstant:46],
71
82
  ]];
72
83
 
84
+ #if !TARGET_OS_OSX // [macOS]
73
85
  UIStackView *stackView = [[UIStackView alloc] initWithArrangedSubviews:@[ messageContainer, resumeButton ]];
74
86
  stackView.backgroundColor = [UIColor colorWithRed:1 green:1 blue:0.757 alpha:1];
75
87
  stackView.layer.cornerRadius = 12;
@@ -84,41 +96,75 @@
84
96
  action:@selector(handleResume:)];
85
97
  [stackView addGestureRecognizer:gestureRecognizer];
86
98
  stackView.userInteractionEnabled = YES;
99
+ #else // [macOS
100
+ NSStackView *stackView = [NSStackView stackViewWithViews:@[ messageContainer, resumeButton ]];
101
+ stackView.wantsLayer = YES;
102
+ stackView.layer.backgroundColor = [NSColor colorWithRed:1 green:1 blue:0.757 alpha:1].CGColor;
103
+ stackView.translatesAutoresizingMaskIntoConstraints = NO;
104
+ stackView.orientation = NSUserInterfaceLayoutOrientationHorizontal;
105
+ stackView.distribution = NSStackViewDistributionFill;
106
+ stackView.alignment = NSLayoutAttributeCenterY;
107
+
108
+ NSClickGestureRecognizer *gestureRecognizer = [[NSClickGestureRecognizer alloc] initWithTarget:self
109
+ action:@selector(handleResume:)];
110
+ [stackView addGestureRecognizer:gestureRecognizer];
111
+ #endif // macOS]
87
112
 
113
+ #if !TARGET_OS_OSX
88
114
  [self.view addSubview:stackView];
89
115
 
90
116
  [NSLayoutConstraint activateConstraints:@[
91
117
  [stackView.topAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.topAnchor constant:12],
92
118
  [stackView.centerXAnchor constraintEqualToAnchor:self.view.safeAreaLayoutGuide.centerXAnchor],
93
119
  ]];
120
+ #else
121
+ [self setView:stackView];
122
+ #endif
94
123
 
124
+ #if !TARGET_OS_OSX // [macOS]
95
125
  stackView.semanticContentAttribute = UISemanticContentAttributeForceLeftToRight;
126
+ #else // [macOS
127
+ stackView.userInterfaceLayoutDirection = NSUserInterfaceLayoutDirectionLeftToRight;
128
+ #endif // macOS]
96
129
  }
97
130
 
131
+ #if !TARGET_OS_OSX // [macOS]
98
132
  - (void)handleResume:(UITapGestureRecognizer *)recognizer
99
133
  {
100
134
  self.onResume();
101
135
  }
102
- #endif // [macOS]
136
+ #else // [macOS
137
+ - (void)handleResume:(id)sender
138
+ {
139
+ self.onResume();
140
+ }
141
+ #endif // macOS]
103
142
  @end
104
143
 
105
144
  @implementation RCTPausedInDebuggerOverlayController
106
145
 
107
- #if !TARGET_OS_OSX // [macOS]
108
- - (UIWindow *)alertWindow
146
+ - (RCTPlatformWindow *)alertWindow // [macOS]
109
147
  {
110
148
  if (_alertWindow == nil) {
149
+ #if !TARGET_OS_OSX // [macOS]
111
150
  _alertWindow = [[UIWindow alloc] initWithWindowScene:RCTKeyWindow().windowScene];
112
151
 
113
152
  if (_alertWindow) {
114
153
  _alertWindow.rootViewController = [UIViewController new];
115
154
  _alertWindow.windowLevel = UIWindowLevelAlert + 1;
116
155
  }
156
+ #else // [macOS]
157
+ _alertWindow = [[NSWindow alloc] initWithContentRect:NSMakeRect(0, 0, 100, 100)
158
+ styleMask:NSWindowStyleMaskBorderless | NSWindowStyleMaskFullSizeContentView
159
+ backing:NSBackingStoreBuffered
160
+ defer:YES];
161
+ _alertWindow.backgroundColor = [NSColor clearColor];
162
+ _alertWindow.opaque = NO;
163
+ #endif // macOS]
117
164
  }
118
165
 
119
166
  return _alertWindow;
120
167
  }
121
- #endif // [macOS]
122
168
 
123
169
  - (void)showWithMessage:(NSString *)message onResume:(void (^)(void))onResume
124
170
  {
@@ -129,9 +175,21 @@
129
175
  view.modalPresentationStyle = UIModalPresentationOverFullScreen;
130
176
  view.message = message;
131
177
  view.onResume = onResume;
178
+
132
179
  [self.alertWindow makeKeyAndVisible];
133
180
  [self.alertWindow.rootViewController presentViewController:view animated:NO completion:nil];
134
- #endif // [macOS]
181
+ #else // [macOS]
182
+ view.message = message;
183
+ view.onResume = onResume;
184
+
185
+ self.alertWindow.contentViewController = view;
186
+ NSWindow *parentWindow = RCTKeyWindow();
187
+ if (![[parentWindow sheets] doesContain:self->_alertWindow]) {
188
+ [parentWindow beginSheet:self.alertWindow completionHandler:^(NSModalResponse returnCode) {
189
+ [self->_alertWindow orderOut:self];
190
+ }];
191
+ }
192
+ #endif // macOS]
135
193
  }
136
194
 
137
195
  - (void)hide
@@ -140,9 +198,19 @@
140
198
  [_alertWindow setHidden:YES];
141
199
 
142
200
  _alertWindow.windowScene = nil;
201
+ #else // [macOS]
202
+ NSWindow *parentWindow = RCTKeyWindow();
203
+ if (parentWindow) {
204
+ for (NSWindow *sheet in [parentWindow sheets]) {
205
+ if (sheet == _alertWindow) {
206
+ [parentWindow endSheet:sheet];
207
+ break;
208
+ }
209
+ }
210
+ }
211
+ #endif // macOS]
143
212
 
144
213
  _alertWindow = nil;
145
- #endif // macOS]
146
214
  }
147
215
 
148
216
  @end
@@ -63,6 +63,30 @@
63
63
  return @"PageUp";
64
64
  } else if (code == NSPageDownFunctionKey) {
65
65
  return @"PageDown";
66
+ } else if (code == NSF1FunctionKey) {
67
+ return @"F1";
68
+ } else if (code == NSF2FunctionKey) {
69
+ return @"F2";
70
+ } else if (code == NSF3FunctionKey) {
71
+ return @"F3";
72
+ } else if (code == NSF4FunctionKey) {
73
+ return @"F4";
74
+ } else if (code == NSF5FunctionKey) {
75
+ return @"F5";
76
+ } else if (code == NSF6FunctionKey) {
77
+ return @"F6";
78
+ } else if (code == NSF7FunctionKey) {
79
+ return @"F7";
80
+ } else if (code == NSF8FunctionKey) {
81
+ return @"F8";
82
+ } else if (code == NSF9FunctionKey) {
83
+ return @"F9";
84
+ } else if (code == NSF10FunctionKey) {
85
+ return @"F10";
86
+ } else if (code == NSF11FunctionKey) {
87
+ return @"F11";
88
+ } else if (code == NSF12FunctionKey) {
89
+ return @"F12";
66
90
  }
67
91
 
68
92
  return key;
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.77.4
1
+ VERSION_NAME=0.77.6
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -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", 77,
20
- "patch", 4,
20
+ "patch", 6,
21
21
  "prerelease", null);
22
22
  }
@@ -17,7 +17,7 @@ namespace facebook::react {
17
17
  constexpr struct {
18
18
  int32_t Major = 0;
19
19
  int32_t Minor = 77;
20
- int32_t Patch = 4;
20
+ int32_t Patch = 6;
21
21
  std::string_view Prerelease = "";
22
22
  } ReactNativeVersion;
23
23
 
package/local-cli/cli.js CHANGED
File without changes
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-macos",
3
- "version": "0.77.4",
3
+ "version": "0.77.6",
4
4
  "description": "React Native for macOS",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -101,7 +101,8 @@
101
101
  },
102
102
  "peerDependencies": {
103
103
  "@types/react": "^18.2.6",
104
- "react": "^18.2.0"
104
+ "react": "^18.2.0",
105
+ "react-native": "0.77.2"
105
106
  },
106
107
  "peerDependenciesMeta": {
107
108
  "@types/react": {
@@ -110,7 +111,7 @@
110
111
  },
111
112
  "dependencies": {
112
113
  "@jest/create-cache-key-function": "^29.6.3",
113
- "@react-native-mac/virtualized-lists": "0.77.2",
114
+ "@react-native-macos/virtualized-lists": "0.77.6",
114
115
  "@react-native/assets-registry": "0.77.2",
115
116
  "@react-native/codegen": "0.77.2",
116
117
  "@react-native/community-cli-plugin": "0.77.2",
@@ -165,4 +166,4 @@
165
166
  }
166
167
  ]
167
168
  }
168
- }
169
+ }
File without changes