@office-iss/react-native-win32 0.0.0-canary.274 → 0.0.0-canary.275

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/.flowconfig +5 -1
  2. package/CHANGELOG.json +16 -1
  3. package/CHANGELOG.md +12 -4
  4. package/Libraries/ActionSheetIOS/ActionSheetIOS.d.ts +1 -0
  5. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +13 -0
  6. package/Libraries/Animated/animations/Animation.js +1 -5
  7. package/Libraries/Animated/components/AnimatedFlatList.js +1 -1
  8. package/Libraries/Animated/components/AnimatedSectionList.js +3 -1
  9. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +16 -2
  10. package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +21 -2
  11. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +0 -1
  12. package/Libraries/Components/ScrollView/ScrollView.js +35 -74
  13. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +0 -2
  14. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +0 -1
  15. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
  16. package/Libraries/Components/TextInput/TextInput.flow.js +6 -0
  17. package/Libraries/Components/TextInput/TextInput.js +7 -1
  18. package/Libraries/Components/TextInput/TextInput.win32.js +7 -1
  19. package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -2
  20. package/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
  21. package/Libraries/Core/ExceptionsManager.js +1 -4
  22. package/Libraries/Core/ReactNativeVersion.js +1 -1
  23. package/Libraries/Core/setUpErrorHandling.js +20 -18
  24. package/Libraries/Core/setUpTimers.js +4 -12
  25. package/Libraries/Image/Image.d.ts +2 -0
  26. package/Libraries/Image/ImageProps.js +2 -1
  27. package/Libraries/Image/ImageResizeMode.d.ts +8 -1
  28. package/Libraries/Image/ImageResizeMode.js +4 -1
  29. package/Libraries/Image/ImageSource.d.ts +0 -2
  30. package/Libraries/Image/ImageSource.js +0 -2
  31. package/Libraries/Image/ImageUtils.js +6 -3
  32. package/Libraries/Inspector/Inspector.win32.js +1 -1
  33. package/Libraries/Interaction/InteractionManager.js +6 -1
  34. package/Libraries/Interaction/InteractionManagerStub.js +176 -0
  35. package/Libraries/Lists/FlatList.js +2 -2
  36. package/Libraries/LogBox/LogBox.js +1 -1
  37. package/Libraries/LogBox/UI/AnsiHighlight.js +26 -17
  38. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +6 -1
  39. package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js +6 -1
  40. package/Libraries/Modal/Modal.d.ts +5 -0
  41. package/Libraries/Modal/Modal.js +17 -0
  42. package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +49 -2
  43. package/Libraries/Pressability/usePressability.js +4 -1
  44. package/Libraries/ReactNative/AppRegistry.js +0 -6
  45. package/Libraries/ReactNative/RendererImplementation.js +12 -12
  46. package/Libraries/ReactNative/renderApplication.js +3 -4
  47. package/Libraries/ReactNative/requireNativeComponent.js +2 -1
  48. package/Libraries/Renderer/implementations/ReactFabric-dev.js +26149 -15434
  49. package/Libraries/Renderer/implementations/ReactFabric-prod.js +1630 -2675
  50. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +1691 -2954
  51. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +27069 -16192
  52. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +1657 -2714
  53. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +1733 -2980
  54. package/Libraries/Renderer/shims/ReactFabric.js +3 -3
  55. package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -2
  56. package/Libraries/Renderer/shims/ReactNative.js +3 -3
  57. package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
  58. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +7 -1
  59. package/Libraries/StyleSheet/StyleSheetTypes.js +5 -4
  60. package/Libraries/Utilities/BackHandler.android.js +6 -18
  61. package/Libraries/Utilities/BackHandler.d.ts +0 -4
  62. package/Libraries/Utilities/BackHandler.ios.js +0 -7
  63. package/Libraries/Utilities/BackHandler.win32.js +6 -18
  64. package/Libraries/Utilities/__mocks__/BackHandler.js +3 -8
  65. package/overrides.json +8 -8
  66. package/package.json +13 -13
  67. package/src/private/components/HScrollViewNativeComponents.js +1 -26
  68. package/src/private/components/VScrollViewNativeComponents.js +2 -24
  69. package/src/private/featureflags/ReactNativeFeatureFlags.js +18 -38
  70. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +2 -6
  71. package/src/private/specs/components/RCTModalHostViewNativeComponent.js +8 -0
  72. package/src/private/specs/modules/NativeAccessibilityInfo.js +6 -0
  73. package/src/private/specs/modules/NativeAccessibilityInfoWin32.js +6 -0
  74. package/src/private/specs/modules/NativeActionSheetManager.js +2 -0
  75. package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
  76. package/Libraries/ReactNative/ReactFabricInternals.js +0 -17
  77. package/src/private/components/useSyncOnScroll.js +0 -48
  78. package/types/experimental.d.ts +0 -59
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<27ae96c2bc3459bd89e52063a8ed9490>>
7
+ * @generated SignedSource<<8334fdc6d34d4a090eb8be73f92ccd0f>>
8
8
  * @flow strict
9
9
  */
10
10
 
@@ -30,13 +30,13 @@ export type ReactNativeFeatureFlagsJsOnly = {
30
30
  jsOnlyTestFlag: Getter<boolean>,
31
31
  animatedShouldDebounceQueueFlush: Getter<boolean>,
32
32
  animatedShouldUseSingleOp: Getter<boolean>,
33
+ disableInteractionManager: Getter<boolean>,
33
34
  enableAccessToHostTreeInFabric: Getter<boolean>,
34
35
  enableAnimatedAllowlist: Getter<boolean>,
35
36
  enableAnimatedClearImmediateFix: Getter<boolean>,
36
37
  enableAnimatedPropsMemo: Getter<boolean>,
37
38
  enableOptimisedVirtualizedCells: Getter<boolean>,
38
39
  isLayoutAnimationEnabled: Getter<boolean>,
39
- scheduleAnimatedEndCallbackInMicrotask: Getter<boolean>,
40
40
  shouldSkipStateUpdatesForLoopingAnimations: Getter<boolean>,
41
41
  shouldUseAnimatedObjectForTransform: Getter<boolean>,
42
42
  shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean>,
@@ -52,8 +52,6 @@ export type ReactNativeFeatureFlags = {
52
52
  ...ReactNativeFeatureFlagsJsOnly,
53
53
  commonTestFlag: Getter<boolean>,
54
54
  commonTestFlagWithoutNativeImplementation: Getter<boolean>,
55
- allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean>,
56
- batchRenderingUpdatesInEventLoop: Getter<boolean>,
57
55
  completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean>,
58
56
  disableEventLoopOnBridgeless: Getter<boolean>,
59
57
  disableMountItemReorderingAndroid: Getter<boolean>,
@@ -67,12 +65,12 @@ export type ReactNativeFeatureFlags = {
67
65
  enableFabricLogs: Getter<boolean>,
68
66
  enableFabricRenderer: Getter<boolean>,
69
67
  enableFabricRendererExclusively: Getter<boolean>,
68
+ enableFixForViewCommandRace: Getter<boolean>,
70
69
  enableGranularShadowTreeStateReconciliation: Getter<boolean>,
71
70
  enableIOSViewClipToPaddingBox: Getter<boolean>,
72
71
  enableLayoutAnimationsOnAndroid: Getter<boolean>,
73
72
  enableLayoutAnimationsOnIOS: Getter<boolean>,
74
73
  enableLongTaskAPI: Getter<boolean>,
75
- enableMicrotasks: Getter<boolean>,
76
74
  enableNewBackgroundAndBorderDrawables: Getter<boolean>,
77
75
  enablePreciseSchedulingForPremountItemsOnAndroid: Getter<boolean>,
78
76
  enablePropsUpdateReconciliationAndroid: Getter<boolean>,
@@ -83,7 +81,6 @@ export type ReactNativeFeatureFlags = {
83
81
  excludeYogaFromRawProps: Getter<boolean>,
84
82
  fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
85
83
  fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean>,
86
- forceBatchingMountItemsOnAndroid: Getter<boolean>,
87
84
  fuseboxEnabledDebug: Getter<boolean>,
88
85
  fuseboxEnabledRelease: Getter<boolean>,
89
86
  initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean>,
@@ -94,7 +91,6 @@ export type ReactNativeFeatureFlags = {
94
91
  useAlwaysAvailableJSErrorHandling: Getter<boolean>,
95
92
  useFabricInterop: Getter<boolean>,
96
93
  useImmediateExecutorInAndroidBridgeless: Getter<boolean>,
97
- useModernRuntimeScheduler: Getter<boolean>,
98
94
  useNativeViewConfigsInBridgelessMode: Getter<boolean>,
99
95
  useOptimisedViewPreallocationOnAndroid: Getter<boolean>,
100
96
  useOptimizedEventBatchingOnAndroid: Getter<boolean>,
@@ -118,6 +114,11 @@ export const animatedShouldDebounceQueueFlush: Getter<boolean> = createJavaScrip
118
114
  */
119
115
  export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGetter('animatedShouldUseSingleOp', false);
120
116
 
117
+ /**
118
+ * Disables InteractionManager and replaces its scheduler with `setImmediate`.
119
+ */
120
+ export const disableInteractionManager: Getter<boolean> = createJavaScriptFlagGetter('disableInteractionManager', false);
121
+
121
122
  /**
122
123
  * Enables access to the host tree in Fabric using DOM-compatible APIs.
123
124
  */
@@ -126,7 +127,7 @@ export const enableAccessToHostTreeInFabric: Getter<boolean> = createJavaScriptF
126
127
  /**
127
128
  * Enables Animated to skip non-allowlisted props and styles.
128
129
  */
129
- export const enableAnimatedAllowlist: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedAllowlist', false);
130
+ export const enableAnimatedAllowlist: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedAllowlist', true);
130
131
 
131
132
  /**
132
133
  * Enables an experimental to use the proper clearIntermediate instead of calling the wrong clearTimeout and canceling another timer.
@@ -136,7 +137,7 @@ export const enableAnimatedClearImmediateFix: Getter<boolean> = createJavaScript
136
137
  /**
137
138
  * Enables Animated to analyze props to minimize invalidating `AnimatedProps`.
138
139
  */
139
- export const enableAnimatedPropsMemo: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedPropsMemo', false);
140
+ export const enableAnimatedPropsMemo: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedPropsMemo', true);
140
141
 
141
142
  /**
142
143
  * Removing unnecessary rerenders Virtualized cells after any rerenders of Virualized list. Works with strict=true option
@@ -148,11 +149,6 @@ export const enableOptimisedVirtualizedCells: Getter<boolean> = createJavaScript
148
149
  */
149
150
  export const isLayoutAnimationEnabled: Getter<boolean> = createJavaScriptFlagGetter('isLayoutAnimationEnabled', true);
150
151
 
151
- /**
152
- * Changes the completion callback supplied via `Animation#start` to be scheduled in a microtask instead of synchronously executed.
153
- */
154
- export const scheduleAnimatedEndCallbackInMicrotask: Getter<boolean> = createJavaScriptFlagGetter('scheduleAnimatedEndCallbackInMicrotask', false);
155
-
156
152
  /**
157
153
  * If the animation is within Animated.loop, we do not send state updates to React.
158
154
  */
@@ -181,7 +177,7 @@ export const shouldUseSetNativePropsInNativeAnimationsInFabric: Getter<boolean>
181
177
  /**
182
178
  * Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`.
183
179
  */
184
- export const useInsertionEffectsForAnimations: Getter<boolean> = createJavaScriptFlagGetter('useInsertionEffectsForAnimations', false);
180
+ export const useInsertionEffectsForAnimations: Getter<boolean> = createJavaScriptFlagGetter('useInsertionEffectsForAnimations', true);
185
181
 
186
182
  /**
187
183
  * Enable a variant of TextInput that moves some state to refs to avoid unnecessary re-renders
@@ -196,18 +192,10 @@ export const commonTestFlag: Getter<boolean> = createNativeFlagGetter('commonTes
196
192
  * Common flag for testing (without native implementation). Do NOT modify.
197
193
  */
198
194
  export const commonTestFlagWithoutNativeImplementation: Getter<boolean> = createNativeFlagGetter('commonTestFlagWithoutNativeImplementation', false);
199
- /**
200
- * Adds support for recursively processing commits that mount synchronously (Android only).
201
- */
202
- export const allowRecursiveCommitsWithSynchronousMountOnAndroid: Getter<boolean> = createNativeFlagGetter('allowRecursiveCommitsWithSynchronousMountOnAndroid', false);
203
- /**
204
- * When enabled, the RuntimeScheduler processing the event loop will batch all rendering updates and dispatch them together at the end of each iteration of the loop.
205
- */
206
- export const batchRenderingUpdatesInEventLoop: Getter<boolean> = createNativeFlagGetter('batchRenderingUpdatesInEventLoop', false);
207
195
  /**
208
196
  * Do not wait for a main-thread dispatch to complete init to start executing work on the JS thread on Android
209
197
  */
210
- export const completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean> = createNativeFlagGetter('completeReactInstanceCreationOnBgThreadOnAndroid', false);
198
+ export const completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean> = createNativeFlagGetter('completeReactInstanceCreationOnBgThreadOnAndroid', true);
211
199
  /**
212
200
  * The bridgeless architecture enables the event loop by default. This feature flag allows us to force disabling it in specific instances.
213
201
  */
@@ -256,6 +244,10 @@ export const enableFabricRenderer: Getter<boolean> = createNativeFlagGetter('ena
256
244
  * When the app is completely migrated to Fabric, set this flag to true to disable parts of Paper infrastructure that are not needed anymore but consume memory and CPU. Specifically, UIViewOperationQueue and EventDispatcherImpl will no longer work as they will not subscribe to ReactChoreographer for updates.
257
245
  */
258
246
  export const enableFabricRendererExclusively: Getter<boolean> = createNativeFlagGetter('enableFabricRendererExclusively', false);
247
+ /**
248
+ * Synchronise the view command dispatching with mounting of new transaction
249
+ */
250
+ export const enableFixForViewCommandRace: Getter<boolean> = createNativeFlagGetter('enableFixForViewCommandRace', false);
259
251
  /**
260
252
  * When enabled, the renderer would only fail commits when they propagate state and the last commit that updated state changed before committing.
261
253
  */
@@ -276,10 +268,6 @@ export const enableLayoutAnimationsOnIOS: Getter<boolean> = createNativeFlagGett
276
268
  * Enables the reporting of long tasks through `PerformanceObserver`. Only works if the event loop is enabled.
277
269
  */
278
270
  export const enableLongTaskAPI: Getter<boolean> = createNativeFlagGetter('enableLongTaskAPI', false);
279
- /**
280
- * Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution).
281
- */
282
- export const enableMicrotasks: Getter<boolean> = createNativeFlagGetter('enableMicrotasks', false);
283
271
  /**
284
272
  * Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable
285
273
  */
@@ -320,10 +308,6 @@ export const fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean> =
320
308
  * Fixes a limitation on Android where the mounting coordinator would report there are no pending transactions but some of them were actually not processed due to the use of the push model.
321
309
  */
322
310
  export const fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean> = createNativeFlagGetter('fixMountingCoordinatorReportedPendingTransactionsOnAndroid', false);
323
- /**
324
- * Forces the mounting layer on Android to always batch mount items instead of dispatching them immediately. This might fix some crashes related to synchronous state updates, where some views dispatch state updates during mount.
325
- */
326
- export const forceBatchingMountItemsOnAndroid: Getter<boolean> = createNativeFlagGetter('forceBatchingMountItemsOnAndroid', false);
327
311
  /**
328
312
  * Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in debug builds. This flag is global and should not be changed across React Host lifetimes.
329
313
  */
@@ -335,7 +319,7 @@ export const fuseboxEnabledRelease: Getter<boolean> = createNativeFlagGetter('fu
335
319
  /**
336
320
  * Construct modules that requires eager init on the dedicate native modules thread
337
321
  */
338
- export const initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean> = createNativeFlagGetter('initEagerTurboModulesOnNativeModulesQueueAndroid', false);
322
+ export const initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean> = createNativeFlagGetter('initEagerTurboModulesOnNativeModulesQueueAndroid', true);
339
323
  /**
340
324
  * Only enqueue Choreographer calls if there is an ongoing animation, instead of enqueueing every frame.
341
325
  */
@@ -363,11 +347,7 @@ export const useFabricInterop: Getter<boolean> = createNativeFlagGetter('useFabr
363
347
  /**
364
348
  * Invoke callbacks immediately on the ReactInstance rather than going through a background thread for synchronization
365
349
  */
366
- export const useImmediateExecutorInAndroidBridgeless: Getter<boolean> = createNativeFlagGetter('useImmediateExecutorInAndroidBridgeless', false);
367
- /**
368
- * When enabled, it uses the modern fork of RuntimeScheduler that allows scheduling tasks with priorities from any thread.
369
- */
370
- export const useModernRuntimeScheduler: Getter<boolean> = createNativeFlagGetter('useModernRuntimeScheduler', false);
350
+ export const useImmediateExecutorInAndroidBridgeless: Getter<boolean> = createNativeFlagGetter('useImmediateExecutorInAndroidBridgeless', true);
371
351
  /**
372
352
  * When enabled, the native view configs are used in bridgeless mode.
373
353
  */
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<d4297e2a804f238f538463d3d9af480a>>
7
+ * @generated SignedSource<<ced421dd8531e9a074999a1cdb5e4a16>>
8
8
  * @flow strict
9
9
  */
10
10
 
@@ -25,8 +25,6 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
25
25
  export interface Spec extends TurboModule {
26
26
  +commonTestFlag?: () => boolean;
27
27
  +commonTestFlagWithoutNativeImplementation?: () => boolean;
28
- +allowRecursiveCommitsWithSynchronousMountOnAndroid?: () => boolean;
29
- +batchRenderingUpdatesInEventLoop?: () => boolean;
30
28
  +completeReactInstanceCreationOnBgThreadOnAndroid?: () => boolean;
31
29
  +disableEventLoopOnBridgeless?: () => boolean;
32
30
  +disableMountItemReorderingAndroid?: () => boolean;
@@ -40,12 +38,12 @@ export interface Spec extends TurboModule {
40
38
  +enableFabricLogs?: () => boolean;
41
39
  +enableFabricRenderer?: () => boolean;
42
40
  +enableFabricRendererExclusively?: () => boolean;
41
+ +enableFixForViewCommandRace?: () => boolean;
43
42
  +enableGranularShadowTreeStateReconciliation?: () => boolean;
44
43
  +enableIOSViewClipToPaddingBox?: () => boolean;
45
44
  +enableLayoutAnimationsOnAndroid?: () => boolean;
46
45
  +enableLayoutAnimationsOnIOS?: () => boolean;
47
46
  +enableLongTaskAPI?: () => boolean;
48
- +enableMicrotasks?: () => boolean;
49
47
  +enableNewBackgroundAndBorderDrawables?: () => boolean;
50
48
  +enablePreciseSchedulingForPremountItemsOnAndroid?: () => boolean;
51
49
  +enablePropsUpdateReconciliationAndroid?: () => boolean;
@@ -56,7 +54,6 @@ export interface Spec extends TurboModule {
56
54
  +excludeYogaFromRawProps?: () => boolean;
57
55
  +fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
58
56
  +fixMountingCoordinatorReportedPendingTransactionsOnAndroid?: () => boolean;
59
- +forceBatchingMountItemsOnAndroid?: () => boolean;
60
57
  +fuseboxEnabledDebug?: () => boolean;
61
58
  +fuseboxEnabledRelease?: () => boolean;
62
59
  +initEagerTurboModulesOnNativeModulesQueueAndroid?: () => boolean;
@@ -67,7 +64,6 @@ export interface Spec extends TurboModule {
67
64
  +useAlwaysAvailableJSErrorHandling?: () => boolean;
68
65
  +useFabricInterop?: () => boolean;
69
66
  +useImmediateExecutorInAndroidBridgeless?: () => boolean;
70
- +useModernRuntimeScheduler?: () => boolean;
71
67
  +useNativeViewConfigsInBridgelessMode?: () => boolean;
72
68
  +useOptimisedViewPreallocationOnAndroid?: () => boolean;
73
69
  +useOptimizedEventBatchingOnAndroid?: () => boolean;
@@ -58,6 +58,14 @@ type NativeProps = $ReadOnly<{|
58
58
  */
59
59
  statusBarTranslucent?: WithDefault<boolean, false>,
60
60
 
61
+ /**
62
+ * The `navigationBarTranslucent` prop determines whether your modal should go under
63
+ * the system navigationbar.
64
+ *
65
+ * See https://reactnative.dev/docs/modal#navigationBarTranslucent
66
+ */
67
+ navigationBarTranslucent?: WithDefault<boolean, false>,
68
+
61
69
  /**
62
70
  * The `hardwareAccelerated` prop controls whether to force hardware
63
71
  * acceleration for the underlying window.
@@ -16,6 +16,9 @@ export interface Spec extends TurboModule {
16
16
  +isReduceMotionEnabled: (
17
17
  onSuccess: (isReduceMotionEnabled: boolean) => void,
18
18
  ) => void;
19
+ +isInvertColorsEnabled?: (
20
+ onSuccess: (isInvertColorsEnabled: boolean) => void,
21
+ ) => void;
19
22
  +isHighTextContrastEnabled?: (
20
23
  onSuccess: (isHighTextContrastEnabled: boolean) => void,
21
24
  ) => void;
@@ -31,6 +34,9 @@ export interface Spec extends TurboModule {
31
34
  mSec: number,
32
35
  onSuccess: (recommendedTimeoutMillis: number) => void,
33
36
  ) => void;
37
+ +isGrayscaleEnabled?: (
38
+ onSuccess: (isGrayscaleEnabled: boolean) => void,
39
+ ) => void;
34
40
  }
35
41
 
36
42
  export default (TurboModuleRegistry.get<Spec>('AccessibilityInfo'): ?Spec);
@@ -16,6 +16,9 @@ export interface Spec extends TurboModule {
16
16
  +isReduceMotionEnabled: (
17
17
  onSuccess: (isReduceMotionEnabled: boolean) => void,
18
18
  ) => void;
19
+ +isInvertColorsEnabled?: (
20
+ onSuccess: (isInvertColorsEnabled: boolean) => void,
21
+ ) => void;
19
22
  +isHighTextContrastEnabled?: (
20
23
  onSuccess: (isHighTextContrastEnabled: boolean) => void,
21
24
  ) => void;
@@ -37,6 +40,9 @@ export interface Spec extends TurboModule {
37
40
  mSec: number,
38
41
  onSuccess: (recommendedTimeoutMillis: number) => void,
39
42
  ) => void;
43
+ +isGrayscaleEnabled?: (
44
+ onSuccess: (isGrayscaleEnabled: boolean) => void,
45
+ ) => void;
40
46
  }
41
47
 
42
48
  export default (TurboModuleRegistry.get<Spec>('AccessibilityInfo'): ?Spec);
@@ -24,6 +24,7 @@ export interface Spec extends TurboModule {
24
24
  +anchor?: ?number,
25
25
  +tintColor?: ?number,
26
26
  +cancelButtonTintColor?: ?number,
27
+ +disabledButtonTintColor?: ?number,
27
28
  +userInterfaceStyle?: ?string,
28
29
  +disabledButtonIndices?: Array<number>,
29
30
  |},
@@ -37,6 +38,7 @@ export interface Spec extends TurboModule {
37
38
  +anchor?: ?number,
38
39
  +tintColor?: ?number,
39
40
  +cancelButtonTintColor?: ?number,
41
+ +disabledButtonTintColor?: ?number,
40
42
  +excludedActivityTypes?: ?Array<string>,
41
43
  +userInterfaceStyle?: ?string,
42
44
  |},
@@ -343,6 +343,13 @@ export interface ViewProps
343
343
  * Used to reference react managed views from native code.
344
344
  */
345
345
  nativeID?: string | undefined;
346
+
347
+ /**
348
+ * Contols whether this view, and its transitive children, are laid in a way
349
+ * consistent with web browsers ('strict'), or consistent with existing
350
+ * React Native code which may rely on incorrect behavior ('classic').
351
+ */
352
+ experimental_layoutConformance?: 'strict' | 'classic' | undefined;
346
353
  }
347
354
 
348
355
  // For backwards compat.... // Win32
@@ -1,17 +0,0 @@
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
- * @flow strict-local
8
- * @format
9
- */
10
-
11
- 'use strict';
12
-
13
- const createReactNativeComponentClass = require('../Renderer/shims/createReactNativeComponentClass');
14
-
15
- module.exports = {
16
- createReactNativeComponentClass,
17
- };
@@ -1,48 +0,0 @@
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
- * @flow strict-local
8
- * @format
9
- * @oncall react_native
10
- */
11
-
12
- import type {ScrollViewNativeProps} from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
- import type {HostComponent} from '../../../Libraries/Renderer/shims/ReactNativeTypes';
14
-
15
- import * as React from 'react';
16
- import {useImperativeHandle, useRef, useState} from 'react';
17
-
18
- export type TScrollViewNativeComponentInstance = React.ElementRef<
19
- HostComponent<ScrollViewNativeProps>,
20
- >;
21
-
22
- export type TScrollViewNativeImperativeHandle = {
23
- componentRef: React.RefObject<TScrollViewNativeComponentInstance | null>,
24
- unstable_setEnableSyncOnScroll: (enabled: true) => void,
25
- };
26
-
27
- /**
28
- * Hook used by `HScrollViewNativeComponent` and `VScrollViewNativeComponent`
29
- * to make an implementation of `unstable_setEnableSyncOnScroll` available that
30
- * does not require updating all `ScrollView` children.
31
- */
32
- export default function useSyncOnScroll(
33
- inputRef: ?React.RefSetter<TScrollViewNativeImperativeHandle | null>,
34
- ): [React.RefSetter<TScrollViewNativeComponentInstance | null>, true | void] {
35
- const componentRef = useRef<TScrollViewNativeComponentInstance | null>(null);
36
- const [enableSyncOnScroll, setEnableSyncOnScroll] = useState<true | void>();
37
-
38
- useImperativeHandle<TScrollViewNativeImperativeHandle>(inputRef, () => {
39
- return {
40
- componentRef,
41
- unstable_setEnableSyncOnScroll(enabled: true): void {
42
- setEnableSyncOnScroll(enabled);
43
- },
44
- };
45
- }, []);
46
-
47
- return [componentRef, enableSyncOnScroll];
48
- }
@@ -1,59 +0,0 @@
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
- * @format
8
- */
9
-
10
- /**
11
- * These are types for things that are present for New Architecture enabled apps
12
- * which is currently considered experimental.
13
- *
14
- * To load the types declared here in an actual project, there are three ways.
15
- *
16
- * 1. If your `tsconfig.json` already has a `"types"` array in the `"compilerOptions"` section,
17
- * is to add `"react-native/types/experimental"` to the `"types"` array.
18
- *
19
- * 2. Alternatively, a specific import syntax can to be used from a typescript file.
20
- * This module does not exist in reality, which is why the {} is important:
21
- *
22
- * ```ts
23
- * import {} from 'react-native/types/experimental'
24
- * ```
25
- *
26
- * 3. It is also possible to include it through a triple-slash reference:
27
- *
28
- * ```ts
29
- * /// <reference types="react-native/types/experimental" />
30
- * ```
31
- *
32
- * Either the import or the reference only needs to appear once, anywhere in the project.
33
- */
34
-
35
- import {
36
- GradientValue,
37
- BlendMode,
38
- } from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
39
-
40
- export {};
41
-
42
- declare module '.' {
43
- export interface ViewProps {
44
- /**
45
- * Contols whether this view, and its transitive children, are laid in a way
46
- * consistent with web browsers ('strict'), or consistent with existing
47
- * React Native code which may rely on incorrect behavior ('classic').
48
- */
49
- experimental_layoutConformance?: 'strict' | 'classic' | undefined;
50
- }
51
-
52
- export interface ViewStyle {
53
- mixBlendMode?: BlendMode | undefined;
54
- experimental_backgroundImage?:
55
- | ReadonlyArray<GradientValue>
56
- | string
57
- | undefined;
58
- }
59
- }