@office-iss/react-native-win32 0.0.0-canary.259 → 0.0.0-canary.261

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 (125) hide show
  1. package/.flowconfig +4 -3
  2. package/CHANGELOG.json +31 -1
  3. package/CHANGELOG.md +20 -4
  4. package/Libraries/Animated/AnimatedImplementation.js +7 -7
  5. package/Libraries/Animated/animations/Animation.js +10 -0
  6. package/Libraries/Animated/animations/TimingAnimation.js +1 -0
  7. package/Libraries/Animated/components/AnimatedScrollView.js +2 -2
  8. package/Libraries/Animated/createAnimatedComponent.js +1 -1
  9. package/Libraries/Animated/useAnimatedProps.js +71 -4
  10. package/Libraries/Blob/FileReader.js +1 -1
  11. package/Libraries/Blob/URL.js +2 -62
  12. package/Libraries/Blob/URLSearchParams.js +71 -0
  13. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
  14. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
  15. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +3 -0
  16. package/Libraries/Components/ScrollView/ScrollView.js +5 -5
  17. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +3 -3
  18. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
  19. package/Libraries/Components/StatusBar/StatusBar.js +3 -1
  20. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +3 -0
  21. package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
  22. package/Libraries/Components/TextInput/TextInput.js +19 -10
  23. package/Libraries/Components/TextInput/TextInput.win32.js +19 -10
  24. package/Libraries/Components/View/ReactNativeStyleAttributes.js +11 -0
  25. package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
  26. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +2 -0
  27. package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  28. package/Libraries/Components/View/ViewNativeComponent.js +6 -0
  29. package/Libraries/Components/View/ViewPropTypes.js +14 -0
  30. package/Libraries/Components/View/ViewPropTypes.win32.js +14 -0
  31. package/Libraries/Core/InitializeCore.js +1 -1
  32. package/Libraries/Core/ReactNativeVersion.js +1 -1
  33. package/Libraries/Core/setUpErrorHandling.js +7 -1
  34. package/Libraries/Image/AssetSourceResolver.js +28 -1
  35. package/Libraries/Image/Image.android.js +9 -14
  36. package/Libraries/Image/Image.ios.js +11 -22
  37. package/Libraries/Image/Image.win32.js +10 -21
  38. package/Libraries/Image/ImageBackground.js +1 -8
  39. package/Libraries/Image/ImageUtils.js +9 -9
  40. package/Libraries/Image/ImageViewNativeComponent.js +3 -0
  41. package/Libraries/Inspector/NetworkOverlay.js +1 -1
  42. package/Libraries/Lists/FlatList.js +1 -1
  43. package/Libraries/Lists/SectionList.js +1 -1
  44. package/Libraries/Lists/SectionListModern.js +3 -3
  45. package/Libraries/LogBox/Data/LogBoxData.js +30 -4
  46. package/Libraries/NativeComponent/BaseViewConfig.android.js +1 -0
  47. package/Libraries/NativeComponent/BaseViewConfig.ios.js +4 -0
  48. package/Libraries/NativeComponent/BaseViewConfig.win32.js +4 -0
  49. package/Libraries/NativeComponent/NativeComponentRegistry.js +13 -20
  50. package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -21
  51. package/Libraries/Network/XMLHttpRequest.js +4 -2
  52. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
  53. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
  54. package/Libraries/ReactNative/RendererImplementation.js +26 -4
  55. package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -0
  56. package/Libraries/Renderer/shims/ReactNativeTypes.js +9 -4
  57. package/Libraries/StyleSheet/StyleSheet.js +1 -1
  58. package/Libraries/StyleSheet/StyleSheet.win32.js +1 -1
  59. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +11 -0
  60. package/Libraries/StyleSheet/StyleSheetTypes.js +14 -2
  61. package/Libraries/StyleSheet/processBackgroundImage.js +384 -0
  62. package/Libraries/StyleSheet/processFilter.js +4 -4
  63. package/Libraries/Text/Text.js +7 -6
  64. package/Libraries/Text/Text.win32.js +7 -6
  65. package/Libraries/Text/TextNativeComponent.js +7 -0
  66. package/Libraries/Text/TextNativeComponent.win32.js +7 -0
  67. package/Libraries/Utilities/Appearance.js +65 -73
  68. package/Libraries/Utilities/DevLoadingView.js +2 -4
  69. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  70. package/Libraries/Utilities/stringifyViewConfig.js +22 -0
  71. package/Libraries/Utilities/useColorScheme.js +3 -3
  72. package/Libraries/WebSocket/WebSocket.js +1 -1
  73. package/flow/jest.js +2 -2
  74. package/index.js +2 -1
  75. package/index.win32.js +2 -1
  76. package/jest/mockModal.js +1 -3
  77. package/jest/mockScrollView.js +1 -1
  78. package/jest/renderer.js +2 -2
  79. package/jest/setup.js +8 -12
  80. package/overrides.json +12 -12
  81. package/package.json +14 -14
  82. package/src/private/{core/components → components}/HScrollViewNativeComponents.js +8 -8
  83. package/src/private/{core/components → components}/VScrollViewNativeComponents.js +7 -7
  84. package/src/private/{core/components → components}/useSyncOnScroll.js +2 -2
  85. package/src/private/featureflags/ReactNativeFeatureFlags.js +93 -10
  86. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +16 -3
  87. package/src/private/hooks/DebouncedEffectImplementation.js +148 -0
  88. package/src/private/hooks/useDebouncedEffect.js +23 -0
  89. package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +5 -4
  90. package/src/private/setup/setUpDOM.js +28 -0
  91. package/src/private/setup/setUpIntersectionObserver.js +27 -0
  92. package/src/private/setup/setUpMutationObserver.js +26 -0
  93. package/src/private/setup/setUpPerformanceObserver.js +64 -0
  94. package/src/private/specs/modules/NativeAppearance.js +3 -3
  95. package/src/private/specs/modules/NativeDebuggerSessionObserver.js +23 -0
  96. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
  97. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +5 -3
  98. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
  99. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +14 -17
  100. package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
  101. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
  102. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +5 -3
  103. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +24 -15
  104. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
  105. package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
  106. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
  107. package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
  108. package/src/private/webapis/performance/LongTasks.js +39 -0
  109. package/src/private/webapis/performance/Performance.js +22 -9
  110. package/src/private/webapis/performance/PerformanceEntry.js +35 -17
  111. package/src/private/webapis/performance/PerformanceObserver.js +29 -43
  112. package/src/private/webapis/performance/RawPerformanceEntry.js +19 -1
  113. package/src/private/webapis/performance/UserTiming.js +17 -12
  114. package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
  115. package/src-win/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  116. package/types/experimental.d.ts +10 -2
  117. package/Libraries/Core/setUpIntersectionObserver.js +0 -16
  118. package/Libraries/Core/setUpMutationObserver.js +0 -16
  119. package/Libraries/Core/setUpPerformanceObserver.js +0 -18
  120. package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
  121. package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
  122. package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -135
  123. package/src/private/core/setUpDOM.js +0 -18
  124. package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
  125. /package/src/private/{core → styles}/composeStyles.js +0 -0
@@ -9,7 +9,6 @@
9
9
  */
10
10
 
11
11
  import NativeEventEmitter from '../EventEmitter/NativeEventEmitter';
12
- import Platform from '../Utilities/Platform';
13
12
  import EventEmitter, {
14
13
  type EventSubscription,
15
14
  } from '../vendor/emitter/EventEmitter';
@@ -20,88 +19,81 @@ import NativeAppearance, {
20
19
  } from './NativeAppearance';
21
20
  import invariant from 'invariant';
22
21
 
23
- type AppearanceListener = (preferences: AppearancePreferences) => void;
24
22
  const eventEmitter = new EventEmitter<{
25
- change: [AppearancePreferences],
23
+ change: [{colorScheme: ?ColorSchemeName}],
26
24
  }>();
27
25
 
28
26
  type NativeAppearanceEventDefinitions = {
29
27
  appearanceChanged: [AppearancePreferences],
30
28
  };
31
29
 
32
- if (NativeAppearance) {
33
- const nativeEventEmitter =
34
- new NativeEventEmitter<NativeAppearanceEventDefinitions>(
35
- // T88715063: NativeEventEmitter only used this parameter on iOS. Now it uses it on all platforms, so this code was modified automatically to preserve its behavior
36
- // If you want to use the native module on other platforms, please remove this condition and test its behavior
37
- Platform.OS !== 'ios' ? null : NativeAppearance,
38
- );
39
- nativeEventEmitter.addListener(
40
- 'appearanceChanged',
41
- (newAppearance: AppearancePreferences) => {
42
- const {colorScheme} = newAppearance;
43
- invariant(
44
- colorScheme === 'dark' ||
45
- colorScheme === 'light' ||
46
- colorScheme == null,
47
- "Unrecognized color scheme. Did you mean 'dark' or 'light'?",
48
- );
49
- eventEmitter.emit('change', {colorScheme});
50
- },
51
- );
30
+ // Cache the color scheme to reduce the cost of reading it between changes.
31
+ // NOTE: If `NativeAppearance` is null, this will always be null.
32
+ let appearance: ?{colorScheme: ?ColorSchemeName} = null;
33
+
34
+ if (NativeAppearance != null) {
35
+ new NativeEventEmitter<NativeAppearanceEventDefinitions>(
36
+ NativeAppearance,
37
+ ).addListener('appearanceChanged', (newAppearance: AppearancePreferences) => {
38
+ const colorScheme = toColorScheme(newAppearance.colorScheme);
39
+ appearance = {colorScheme};
40
+ eventEmitter.emit('change', appearance);
41
+ });
52
42
  }
53
43
 
54
- module.exports = {
55
- /**
56
- * Note: Although color scheme is available immediately, it may change at any
57
- * time. Any rendering logic or styles that depend on this should try to call
58
- * this function on every render, rather than caching the value (for example,
59
- * using inline styles rather than setting a value in a `StyleSheet`).
60
- *
61
- * Example: `const colorScheme = Appearance.getColorScheme();`
62
- *
63
- * @returns {?ColorSchemeName} Value for the color scheme preference.
64
- */
65
- getColorScheme(): ?ColorSchemeName {
66
- if (__DEV__) {
67
- if (isAsyncDebugging) {
68
- // Hard code light theme when using the async debugger as
69
- // sync calls aren't supported
70
- return 'light';
71
- }
44
+ /**
45
+ * Returns the current color scheme preference. This value may change, so the
46
+ * value should not be cached without either listening to changes or using
47
+ * the `useColorScheme` hook.
48
+ */
49
+ export function getColorScheme(): ?ColorSchemeName {
50
+ if (__DEV__) {
51
+ if (isAsyncDebugging) {
52
+ // Hard code light theme when using the async debugger as
53
+ // sync calls aren't supported
54
+ return 'light';
72
55
  }
56
+ }
57
+ let colorScheme = null;
58
+ if (NativeAppearance != null) {
59
+ if (appearance == null) {
60
+ // Lazily initialize `appearance`. This should only happen once because
61
+ // we never reassign a null value to `appearance`.
62
+ appearance = {
63
+ colorScheme: toColorScheme(NativeAppearance.getColorScheme()),
64
+ };
65
+ }
66
+ colorScheme = appearance.colorScheme;
67
+ }
68
+ return colorScheme;
69
+ }
73
70
 
74
- // TODO: (hramos) T52919652 Use ?ColorSchemeName once codegen supports union
75
- const nativeColorScheme: ?string =
76
- NativeAppearance == null
77
- ? null
78
- : NativeAppearance.getColorScheme() || null;
79
- invariant(
80
- nativeColorScheme === 'dark' ||
81
- nativeColorScheme === 'light' ||
82
- nativeColorScheme == null,
83
- "Unrecognized color scheme. Did you mean 'dark' or 'light'?",
84
- );
85
- return nativeColorScheme;
86
- },
87
-
88
- setColorScheme(colorScheme: ?ColorSchemeName): void {
89
- const nativeColorScheme = colorScheme == null ? 'unspecified' : colorScheme;
90
-
91
- invariant(
92
- colorScheme === 'dark' || colorScheme === 'light' || colorScheme == null,
93
- "Unrecognized color scheme. Did you mean 'dark', 'light' or null?",
94
- );
71
+ /**
72
+ * Updates the current color scheme to the supplied value.
73
+ */
74
+ export function setColorScheme(colorScheme: ?ColorSchemeName): void {
75
+ if (NativeAppearance != null) {
76
+ NativeAppearance.setColorScheme(colorScheme ?? 'unspecified');
77
+ appearance = {colorScheme};
78
+ }
79
+ }
95
80
 
96
- if (NativeAppearance != null && NativeAppearance.setColorScheme != null) {
97
- NativeAppearance.setColorScheme(nativeColorScheme);
98
- }
99
- },
81
+ /**
82
+ * Add an event handler that is fired when appearance preferences change.
83
+ */
84
+ export function addChangeListener(
85
+ listener: ({colorScheme: ?ColorSchemeName}) => void,
86
+ ): EventSubscription {
87
+ return eventEmitter.addListener('change', listener);
88
+ }
100
89
 
101
- /**
102
- * Add an event handler that is fired when appearance preferences change.
103
- */
104
- addChangeListener(listener: AppearanceListener): EventSubscription {
105
- return eventEmitter.addListener('change', listener);
106
- },
107
- };
90
+ /**
91
+ * TODO: (hramos) T52919652 Use ?ColorSchemeName once codegen supports union
92
+ */
93
+ function toColorScheme(colorScheme: ?string): ?ColorSchemeName {
94
+ invariant(
95
+ colorScheme === 'dark' || colorScheme === 'light' || colorScheme == null,
96
+ "Unrecognized color scheme. Did you mean 'dark', 'light' or null?",
97
+ );
98
+ return colorScheme;
99
+ }
@@ -9,7 +9,7 @@
9
9
  */
10
10
 
11
11
  import processColor from '../StyleSheet/processColor';
12
- import Appearance from './Appearance';
12
+ import {getColorScheme} from './Appearance';
13
13
  import NativeDevLoadingView from './NativeDevLoadingView';
14
14
 
15
15
  const COLOR_SCHEME = {
@@ -39,9 +39,7 @@ module.exports = {
39
39
  showMessage(message: string, type: 'load' | 'refresh') {
40
40
  if (NativeDevLoadingView) {
41
41
  const colorScheme =
42
- Appearance.getColorScheme() === 'dark'
43
- ? COLOR_SCHEME.dark
44
- : COLOR_SCHEME.default;
42
+ getColorScheme() === 'dark' ? COLOR_SCHEME.dark : COLOR_SCHEME.default;
45
43
 
46
44
  const colorSet = colorScheme[type];
47
45
 
@@ -115,7 +115,7 @@ function expectNoConsoleError() {
115
115
 
116
116
  async function expectRendersMatchingSnapshot(
117
117
  name: string,
118
- ComponentProvider: () => React.Element<any>,
118
+ ComponentProvider: () => React.MixedElement,
119
119
  unmockComponent: () => mixed,
120
120
  ) {
121
121
  let instance;
@@ -0,0 +1,22 @@
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
+ * @flow
9
+ */
10
+
11
+ export default function stringifyViewConfig(viewConfig: any): string {
12
+ return JSON.stringify(
13
+ viewConfig,
14
+ (key, val) => {
15
+ if (typeof val === 'function') {
16
+ return `ƒ ${val.name}`;
17
+ }
18
+ return val;
19
+ },
20
+ 2,
21
+ );
22
+ }
@@ -12,14 +12,14 @@
12
12
 
13
13
  import type {ColorSchemeName} from './NativeAppearance';
14
14
 
15
- import Appearance from './Appearance';
15
+ import {addChangeListener, getColorScheme} from './Appearance';
16
16
  import {useSyncExternalStore} from 'react';
17
17
 
18
18
  const subscribe = (onStoreChange: () => void) => {
19
- const appearanceSubscription = Appearance.addChangeListener(onStoreChange);
19
+ const appearanceSubscription = addChangeListener(onStoreChange);
20
20
  return () => appearanceSubscription.remove();
21
21
  };
22
22
 
23
23
  export default function useColorScheme(): ?ColorSchemeName {
24
- return useSyncExternalStore(subscribe, Appearance.getColorScheme);
24
+ return useSyncExternalStore(subscribe, getColorScheme);
25
25
  }
@@ -68,7 +68,7 @@ type WebSocketEventDefinitions = {
68
68
  * See https://developer.mozilla.org/en-US/docs/Web/API/WebSocket
69
69
  * See https://github.com/websockets/ws
70
70
  */
71
- class WebSocket extends (EventTarget(...WEBSOCKET_EVENTS): any) {
71
+ class WebSocket extends (EventTarget(...WEBSOCKET_EVENTS): typeof EventTarget) {
72
72
  static CONNECTING: number = CONNECTING;
73
73
  static OPEN: number = OPEN;
74
74
  static CLOSING: number = CLOSING;
package/flow/jest.js CHANGED
@@ -251,7 +251,7 @@ type EnzymeMatchersType = {
251
251
  toContainMatchingElement(selector: string): void,
252
252
  toContainMatchingElements(n: number, selector: string): void,
253
253
  toContainExactlyOneMatchingElement(selector: string): void,
254
- toContainReact(element: React$Element<any>): void,
254
+ toContainReact(element: React.MixedElement): void,
255
255
  toExist(): void,
256
256
  toHaveClassName(className: string): void,
257
257
  toHaveHTML(html: string): void,
@@ -267,7 +267,7 @@ type EnzymeMatchersType = {
267
267
  toHaveValue(value: any): void,
268
268
  toIncludeText(text: string): void,
269
269
  toMatchElement(
270
- element: React$Element<any>,
270
+ element: React.MixedElement,
271
271
  options?: {|ignoreProps?: boolean, verbose?: boolean|},
272
272
  ): void,
273
273
  toMatchSelector(selector: string): void,
package/index.js CHANGED
@@ -60,6 +60,7 @@ import typeof VirtualizedList from './Libraries/Lists/VirtualizedList';
60
60
  import typeof VirtualizedSectionList from './Libraries/Lists/VirtualizedSectionList';
61
61
  import typeof LogBox from './Libraries/LogBox/LogBox';
62
62
  import typeof Modal from './Libraries/Modal/Modal';
63
+ // $FlowFixMe[invalid-exported-annotation]
63
64
  import typeof NativeDialogManagerAndroid from './Libraries/NativeModules/specs/NativeDialogManagerAndroid';
64
65
  import typeof Networking from './Libraries/Network/RCTNetworking';
65
66
  import typeof * as Systrace from './Libraries/Performance/Systrace';
@@ -81,7 +82,7 @@ import typeof StyleSheet from './Libraries/StyleSheet/StyleSheet';
81
82
  import typeof Text from './Libraries/Text/Text';
82
83
  import typeof * as TurboModuleRegistry from './Libraries/TurboModule/TurboModuleRegistry';
83
84
  import typeof UTFSequence from './Libraries/UTFSequence';
84
- import typeof Appearance from './Libraries/Utilities/Appearance';
85
+ import typeof * as Appearance from './Libraries/Utilities/Appearance';
85
86
  import typeof BackHandler from './Libraries/Utilities/BackHandler';
86
87
  import typeof DeviceInfo from './Libraries/Utilities/DeviceInfo';
87
88
  import typeof DevSettings from './Libraries/Utilities/DevSettings';
package/index.win32.js CHANGED
@@ -60,6 +60,7 @@ import typeof VirtualizedList from './Libraries/Lists/VirtualizedList';
60
60
  import typeof VirtualizedSectionList from './Libraries/Lists/VirtualizedSectionList';
61
61
  import typeof LogBox from './Libraries/LogBox/LogBox';
62
62
  import typeof Modal from './Libraries/Modal/Modal';
63
+ // $FlowFixMe[invalid-exported-annotation]
63
64
  import typeof NativeDialogManagerAndroid from './Libraries/NativeModules/specs/NativeDialogManagerAndroid';
64
65
  import typeof Networking from './Libraries/Network/RCTNetworking';
65
66
  import typeof * as Systrace from './Libraries/Performance/Systrace';
@@ -81,7 +82,7 @@ import typeof StyleSheet from './Libraries/StyleSheet/StyleSheet';
81
82
  import typeof Text from './Libraries/Text/Text';
82
83
  import typeof * as TurboModuleRegistry from './Libraries/TurboModule/TurboModuleRegistry';
83
84
  import typeof UTFSequence from './Libraries/UTFSequence';
84
- import typeof Appearance from './Libraries/Utilities/Appearance';
85
+ import typeof * as Appearance from './Libraries/Utilities/Appearance';
85
86
  import typeof BackHandler from './Libraries/Utilities/BackHandler';
86
87
  import typeof DeviceInfo from './Libraries/Utilities/DeviceInfo';
87
88
  import typeof DevSettings from './Libraries/Utilities/DevSettings';
package/jest/mockModal.js CHANGED
@@ -12,13 +12,11 @@
12
12
 
13
13
  'use strict';
14
14
 
15
- import typeof Modal from '../Libraries/Modal/Modal';
16
-
17
15
  const React = require('react');
18
16
 
19
17
  function mockModal(BaseComponent: $FlowFixMe) {
20
18
  class ModalMock extends BaseComponent {
21
- render(): React.Element<Modal> | null {
19
+ render(): React.MixedElement | null {
22
20
  if (this.props.visible === false) {
23
21
  return null;
24
22
  }
@@ -20,7 +20,7 @@ const RCTScrollView: $FlowFixMe = requireNativeComponent('RCTScrollView');
20
20
 
21
21
  function mockScrollView(BaseComponent: $FlowFixMe) {
22
22
  class ScrollViewMock extends BaseComponent {
23
- render(): React.Element<typeof RCTScrollView> {
23
+ render(): React.MixedElement {
24
24
  return (
25
25
  <RCTScrollView {...this.props}>
26
26
  {this.props.refreshControl}
package/jest/renderer.js CHANGED
@@ -16,7 +16,7 @@ import * as React from 'react';
16
16
  import TestRenderer from 'react-test-renderer';
17
17
 
18
18
  export async function create(
19
- Component: React.Element<any>,
19
+ Component: React.MixedElement,
20
20
  ): Promise<ReactTestRenderer> {
21
21
  let component;
22
22
  await TestRenderer.act(async () => {
@@ -33,7 +33,7 @@ export async function unmount(testRenderer: ReactTestRenderer) {
33
33
 
34
34
  export async function update(
35
35
  testRenderer: ReactTestRenderer,
36
- element: React.Element<any>,
36
+ element: React.MixedElement,
37
37
  ) {
38
38
  await TestRenderer.act(async () => {
39
39
  testRenderer.update(element);
package/jest/setup.js CHANGED
@@ -146,17 +146,17 @@ jest
146
146
  remove: jest.fn(),
147
147
  })),
148
148
  announceForAccessibility: jest.fn(),
149
- isAccessibilityServiceEnabled: jest.fn(),
150
- isBoldTextEnabled: jest.fn(),
151
- isGrayscaleEnabled: jest.fn(),
152
- isInvertColorsEnabled: jest.fn(),
153
- isReduceMotionEnabled: jest.fn(),
154
- prefersCrossFadeTransitions: jest.fn(),
155
- isReduceTransparencyEnabled: jest.fn(),
149
+ isAccessibilityServiceEnabled: jest.fn(() => Promise.resolve(false)),
150
+ isBoldTextEnabled: jest.fn(() => Promise.resolve(false)),
151
+ isGrayscaleEnabled: jest.fn(() => Promise.resolve(false)),
152
+ isInvertColorsEnabled: jest.fn(() => Promise.resolve(false)),
153
+ isReduceMotionEnabled: jest.fn(() => Promise.resolve(false)),
154
+ prefersCrossFadeTransitions: jest.fn(() => Promise.resolve(false)),
155
+ isReduceTransparencyEnabled: jest.fn(() => Promise.resolve(false)),
156
156
  isScreenReaderEnabled: jest.fn(() => Promise.resolve(false)),
157
157
  setAccessibilityFocus: jest.fn(),
158
158
  sendAccessibilityEvent: jest.fn(),
159
- getRecommendedTimeoutMillis: jest.fn(),
159
+ getRecommendedTimeoutMillis: jest.fn(() => Promise.resolve(false)),
160
160
  },
161
161
  }))
162
162
  .mock('../Libraries/Components/Clipboard/Clipboard', () => ({
@@ -392,10 +392,6 @@ jest
392
392
  .mock('../Libraries/ReactNative/requireNativeComponent', () => {
393
393
  return jest.requireActual('./mockNativeComponent');
394
394
  })
395
- .mock(
396
- '../Libraries/Utilities/verifyComponentAttributeEquivalence',
397
- () => function () {},
398
- )
399
395
  .mock('../Libraries/Vibration/Vibration', () => ({
400
396
  vibrate: jest.fn(),
401
397
  cancel: jest.fn(),
package/overrides.json CHANGED
@@ -7,19 +7,19 @@
7
7
  "**/__snapshots__/**",
8
8
  "src-win/rntypes/**"
9
9
  ],
10
- "baseVersion": "0.76.0-nightly-20240719-6d56cea28",
10
+ "baseVersion": "0.76.0-nightly-20240824-09e88448c",
11
11
  "overrides": [
12
12
  {
13
13
  "type": "derived",
14
14
  "file": ".flowconfig",
15
15
  "baseFile": ".flowconfig",
16
- "baseHash": "83d25eb077cc8d865039ec211f3fedeac9e57d39"
16
+ "baseHash": "27c9677306d4f1bd627a346969c592aee606811a"
17
17
  },
18
18
  {
19
19
  "type": "derived",
20
20
  "file": "src-win/index.win32.js",
21
21
  "baseFile": "packages/react-native/index.js",
22
- "baseHash": "2690130ef7a40e3fb37fc465979e69b1036cdae8"
22
+ "baseHash": "da5d9e79c8c14c56ba00f73c8514c06e6fffe8ed"
23
23
  },
24
24
  {
25
25
  "type": "platform",
@@ -116,7 +116,7 @@
116
116
  "type": "derived",
117
117
  "file": "src-win/Libraries/Components/TextInput/TextInput.win32.js",
118
118
  "baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js",
119
- "baseHash": "2cc1ee09c4a71e79656db18576b4983cfca153ed"
119
+ "baseHash": "259941a60002c5a2a4166a39404d099f0472941e"
120
120
  },
121
121
  {
122
122
  "type": "patch",
@@ -174,7 +174,7 @@
174
174
  "type": "patch",
175
175
  "file": "src-win/Libraries/Components/View/ReactNativeViewAttributes.win32.js",
176
176
  "baseFile": "packages/react-native/Libraries/Components/View/ReactNativeViewAttributes.js",
177
- "baseHash": "8fc645a55ff86ceeac9c45f09d232586589ee7dc"
177
+ "baseHash": "4279b8fc936dbb03599892069fb7e3ceeb86b846"
178
178
  },
179
179
  {
180
180
  "type": "patch",
@@ -186,7 +186,7 @@
186
186
  "type": "derived",
187
187
  "file": "src-win/Libraries/Components/View/ViewAccessibility.d.ts",
188
188
  "baseFile": "packages/react-native/Libraries/Components/View/ViewAccessibility.d.ts",
189
- "baseHash": "eafbdb8db89b98aafd23514173360e07a942d205"
189
+ "baseHash": "d97e29f01e57cc2b0de209a03f8584b984cfe190"
190
190
  },
191
191
  {
192
192
  "type": "derived",
@@ -204,7 +204,7 @@
204
204
  "type": "patch",
205
205
  "file": "src-win/Libraries/Components/View/ViewPropTypes.win32.js",
206
206
  "baseFile": "packages/react-native/Libraries/Components/View/ViewPropTypes.js",
207
- "baseHash": "50bd550ba0710173ca3533b7b103075ecdda6b56",
207
+ "baseHash": "a742b26e4c96fdefb07779e40bc58cd1cc872675",
208
208
  "issue": 6240
209
209
  },
210
210
  {
@@ -245,7 +245,7 @@
245
245
  "type": "derived",
246
246
  "file": "src-win/Libraries/Image/Image.win32.js",
247
247
  "baseFile": "packages/react-native/Libraries/Image/Image.ios.js",
248
- "baseHash": "f3298e1dac3f1cd3d277b15b916753535b677f04",
248
+ "baseHash": "e5cd104f5060ad354072889937ea92d508a32490",
249
249
  "issue": 4320
250
250
  },
251
251
  {
@@ -344,7 +344,7 @@
344
344
  "type": "derived",
345
345
  "file": "src-win/Libraries/NativeComponent/BaseViewConfig.win32.js",
346
346
  "baseFile": "packages/react-native/Libraries/NativeComponent/BaseViewConfig.ios.js",
347
- "baseHash": "86178b8f2e04b5df9e4c8dc8ca412c22231e6673"
347
+ "baseHash": "91e7e2aacf6c1559247dccad0c581fde64202bf3"
348
348
  },
349
349
  {
350
350
  "type": "copy",
@@ -427,7 +427,7 @@
427
427
  "type": "patch",
428
428
  "file": "src-win/Libraries/StyleSheet/StyleSheet.win32.js",
429
429
  "baseFile": "packages/react-native/Libraries/StyleSheet/StyleSheet.js",
430
- "baseHash": "5c01bd55040fb9d31534bd27b98fe9c3671994c0"
430
+ "baseHash": "acf84f21e80cce08afd0a56a2f79690641c7228e"
431
431
  },
432
432
  {
433
433
  "type": "derived",
@@ -439,13 +439,13 @@
439
439
  "type": "derived",
440
440
  "file": "src-win/Libraries/Text/Text.win32.js",
441
441
  "baseFile": "packages/react-native/Libraries/Text/Text.js",
442
- "baseHash": "fa9abb0db816a992824228c520fc0381bf2a1f63"
442
+ "baseHash": "8ad2e56ba09c1b5428d50cfd71972c60502ed2e2"
443
443
  },
444
444
  {
445
445
  "type": "derived",
446
446
  "file": "src-win/Libraries/Text/TextNativeComponent.win32.js",
447
447
  "baseFile": "packages/react-native/Libraries/Text/TextNativeComponent.js",
448
- "baseHash": "1b2e6301edc13f3a91e47b9befe8a47a12e6ad39",
448
+ "baseHash": "dcb764530f8a6529152d9791597865034e2c36ae",
449
449
  "issue": 7074
450
450
  },
451
451
  {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@office-iss/react-native-win32",
3
- "version": "0.0.0-canary.259",
3
+ "version": "0.0.0-canary.261",
4
4
  "description": "Implementation of react native on top of Office's Win32 platform.",
5
5
  "repository": {
6
6
  "type": "git",
@@ -26,17 +26,17 @@
26
26
  "dependencies": {
27
27
  "@babel/runtime": "^7.0.0",
28
28
  "@jest/create-cache-key-function": "^29.6.3",
29
- "@react-native-community/cli": "14.0.0-alpha.11",
30
- "@react-native-community/cli-platform-android": "14.0.0-alpha.11",
31
- "@react-native-community/cli-platform-ios": "14.0.0-alpha.11",
29
+ "@react-native-community/cli": "14.0.0",
30
+ "@react-native-community/cli-platform-android": "14.0.0",
31
+ "@react-native-community/cli-platform-ios": "14.0.0",
32
32
  "@react-native/assets": "1.0.0",
33
- "@react-native/assets-registry": "0.76.0-nightly-20240719-6d56cea28",
34
- "@react-native/codegen": "0.76.0-nightly-20240719-6d56cea28",
35
- "@react-native/community-cli-plugin": "0.76.0-nightly-20240719-6d56cea28",
36
- "@react-native/gradle-plugin": "0.76.0-nightly-20240719-6d56cea28",
37
- "@react-native/js-polyfills": "0.76.0-nightly-20240719-6d56cea28",
38
- "@react-native/normalize-colors": "0.76.0-nightly-20240719-6d56cea28",
39
- "@react-native/virtualized-lists": "0.76.0-nightly-20240719-6d56cea28",
33
+ "@react-native/assets-registry": "0.76.0-nightly-20240824-09e88448c",
34
+ "@react-native/codegen": "0.76.0-nightly-20240824-09e88448c",
35
+ "@react-native/community-cli-plugin": "0.76.0-nightly-20240824-09e88448c",
36
+ "@react-native/gradle-plugin": "0.76.0-nightly-20240824-09e88448c",
37
+ "@react-native/js-polyfills": "0.76.0-nightly-20240824-09e88448c",
38
+ "@react-native/normalize-colors": "0.76.0-nightly-20240824-09e88448c",
39
+ "@react-native/virtualized-lists": "0.76.0-nightly-20240824-09e88448c",
40
40
  "abort-controller": "^3.0.0",
41
41
  "anser": "^1.4.9",
42
42
  "ansi-regex": "^5.0.0",
@@ -82,19 +82,19 @@
82
82
  "@types/prop-types": "15.7.1",
83
83
  "@types/react": "^18.2.6",
84
84
  "eslint": "^8.19.0",
85
- "flow-bin": "^0.241.0",
85
+ "flow-bin": "^0.244.0",
86
86
  "jscodeshift": "^0.14.0",
87
87
  "just-scripts": "^1.3.3",
88
88
  "prettier": "2.8.8",
89
89
  "react": "19.0.0-rc-fb9a90fa48-20240614",
90
- "react-native": "0.76.0-nightly-20240719-6d56cea28",
90
+ "react-native": "0.76.0-nightly-20240824-09e88448c",
91
91
  "react-native-platform-override": "^1.9.45",
92
92
  "typescript": "5.0.4"
93
93
  },
94
94
  "peerDependencies": {
95
95
  "@types/react": "^18.2.6",
96
96
  "react": "^19.0.0-rc-fb9a90fa48-20240614",
97
- "react-native": "0.76.0-nightly-20240719-6d56cea28"
97
+ "react-native": "0.76.0-nightly-20240824-09e88448c"
98
98
  },
99
99
  "beachball": {
100
100
  "defaultNpmTag": "canary",
@@ -9,16 +9,16 @@
9
9
  * @oncall react_native
10
10
  */
11
11
 
12
- import type {ScrollViewNativeProps} from '../../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
- import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
14
- import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
12
+ import type {ScrollViewNativeProps} from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
+ import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
14
+ import type {HostComponent} from '../../../Libraries/Renderer/shims/ReactNativeTypes';
15
15
  import type {TScrollViewNativeImperativeHandle} from './useSyncOnScroll';
16
16
 
17
- import AndroidHorizontalScrollViewNativeComponent from '../../../../Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent';
18
- import ScrollContentViewNativeComponent from '../../../../Libraries/Components/ScrollView/ScrollContentViewNativeComponent';
19
- import ScrollViewNativeComponent from '../../../../Libraries/Components/ScrollView/ScrollViewNativeComponent';
20
- import Platform from '../../../../Libraries/Utilities/Platform';
21
- import AndroidHorizontalScrollContentViewNativeComponent from '../../specs/components/AndroidHorizontalScrollContentViewNativeComponent';
17
+ import AndroidHorizontalScrollViewNativeComponent from '../../../Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent';
18
+ import ScrollContentViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollContentViewNativeComponent';
19
+ import ScrollViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponent';
20
+ import Platform from '../../../Libraries/Utilities/Platform';
21
+ import AndroidHorizontalScrollContentViewNativeComponent from '../specs/components/AndroidHorizontalScrollContentViewNativeComponent';
22
22
  import useSyncOnScroll from './useSyncOnScroll';
23
23
  import * as React from 'react';
24
24
 
@@ -9,15 +9,15 @@
9
9
  * @oncall react_native
10
10
  */
11
11
 
12
- import type {ScrollViewNativeProps} from '../../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
- import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
14
- import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
12
+ import type {ScrollViewNativeProps} from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
+ import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
14
+ import type {HostComponent} from '../../../Libraries/Renderer/shims/ReactNativeTypes';
15
15
  import type {TScrollViewNativeImperativeHandle} from './useSyncOnScroll';
16
16
 
17
- import ScrollContentViewNativeComponent from '../../../../Libraries/Components/ScrollView/ScrollContentViewNativeComponent';
18
- import ScrollViewNativeComponent from '../../../../Libraries/Components/ScrollView/ScrollViewNativeComponent';
19
- import View from '../../../../Libraries/Components/View/View';
20
- import Platform from '../../../../Libraries/Utilities/Platform';
17
+ import ScrollContentViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollContentViewNativeComponent';
18
+ import ScrollViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponent';
19
+ import View from '../../../Libraries/Components/View/View';
20
+ import Platform from '../../../Libraries/Utilities/Platform';
21
21
  import useSyncOnScroll from './useSyncOnScroll';
22
22
  import * as React from 'react';
23
23
 
@@ -9,8 +9,8 @@
9
9
  * @oncall react_native
10
10
  */
11
11
 
12
- import type {ScrollViewNativeProps} from '../../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
- import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
12
+ import type {ScrollViewNativeProps} from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
13
+ import type {HostComponent} from '../../../Libraries/Renderer/shims/ReactNativeTypes';
14
14
 
15
15
  import * as React from 'react';
16
16
  import {useImperativeHandle, useRef, useState} from 'react';