@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.
- package/.flowconfig +4 -3
- package/CHANGELOG.json +31 -1
- package/CHANGELOG.md +20 -4
- package/Libraries/Animated/AnimatedImplementation.js +7 -7
- package/Libraries/Animated/animations/Animation.js +10 -0
- package/Libraries/Animated/animations/TimingAnimation.js +1 -0
- package/Libraries/Animated/components/AnimatedScrollView.js +2 -2
- package/Libraries/Animated/createAnimatedComponent.js +1 -1
- package/Libraries/Animated/useAnimatedProps.js +71 -4
- package/Libraries/Blob/FileReader.js +1 -1
- package/Libraries/Blob/URL.js +2 -62
- package/Libraries/Blob/URLSearchParams.js +71 -0
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +3 -0
- package/Libraries/Components/ScrollView/ScrollView.js +5 -5
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +3 -3
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +3 -1
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +3 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
- package/Libraries/Components/TextInput/TextInput.js +19 -10
- package/Libraries/Components/TextInput/TextInput.win32.js +19 -10
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +11 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +2 -0
- package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
- package/Libraries/Components/View/ViewNativeComponent.js +6 -0
- package/Libraries/Components/View/ViewPropTypes.js +14 -0
- package/Libraries/Components/View/ViewPropTypes.win32.js +14 -0
- package/Libraries/Core/InitializeCore.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +7 -1
- package/Libraries/Image/AssetSourceResolver.js +28 -1
- package/Libraries/Image/Image.android.js +9 -14
- package/Libraries/Image/Image.ios.js +11 -22
- package/Libraries/Image/Image.win32.js +10 -21
- package/Libraries/Image/ImageBackground.js +1 -8
- package/Libraries/Image/ImageUtils.js +9 -9
- package/Libraries/Image/ImageViewNativeComponent.js +3 -0
- package/Libraries/Inspector/NetworkOverlay.js +1 -1
- package/Libraries/Lists/FlatList.js +1 -1
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/Lists/SectionListModern.js +3 -3
- package/Libraries/LogBox/Data/LogBoxData.js +30 -4
- package/Libraries/NativeComponent/BaseViewConfig.android.js +1 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +4 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +4 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +13 -20
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -21
- package/Libraries/Network/XMLHttpRequest.js +4 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
- package/Libraries/ReactNative/RendererImplementation.js +26 -4
- package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -0
- package/Libraries/Renderer/shims/ReactNativeTypes.js +9 -4
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.win32.js +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +11 -0
- package/Libraries/StyleSheet/StyleSheetTypes.js +14 -2
- package/Libraries/StyleSheet/processBackgroundImage.js +384 -0
- package/Libraries/StyleSheet/processFilter.js +4 -4
- package/Libraries/Text/Text.js +7 -6
- package/Libraries/Text/Text.win32.js +7 -6
- package/Libraries/Text/TextNativeComponent.js +7 -0
- package/Libraries/Text/TextNativeComponent.win32.js +7 -0
- package/Libraries/Utilities/Appearance.js +65 -73
- package/Libraries/Utilities/DevLoadingView.js +2 -4
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/Utilities/stringifyViewConfig.js +22 -0
- package/Libraries/Utilities/useColorScheme.js +3 -3
- package/Libraries/WebSocket/WebSocket.js +1 -1
- package/flow/jest.js +2 -2
- package/index.js +2 -1
- package/index.win32.js +2 -1
- package/jest/mockModal.js +1 -3
- package/jest/mockScrollView.js +1 -1
- package/jest/renderer.js +2 -2
- package/jest/setup.js +8 -12
- package/overrides.json +12 -12
- package/package.json +14 -14
- package/src/private/{core/components → components}/HScrollViewNativeComponents.js +8 -8
- package/src/private/{core/components → components}/VScrollViewNativeComponents.js +7 -7
- package/src/private/{core/components → components}/useSyncOnScroll.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +93 -10
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +16 -3
- package/src/private/hooks/DebouncedEffectImplementation.js +148 -0
- package/src/private/hooks/useDebouncedEffect.js +23 -0
- package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +5 -4
- package/src/private/setup/setUpDOM.js +28 -0
- package/src/private/setup/setUpIntersectionObserver.js +27 -0
- package/src/private/setup/setUpMutationObserver.js +26 -0
- package/src/private/setup/setUpPerformanceObserver.js +64 -0
- package/src/private/specs/modules/NativeAppearance.js +3 -3
- package/src/private/specs/modules/NativeDebuggerSessionObserver.js +23 -0
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +5 -3
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +14 -17
- package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +5 -3
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +24 -15
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
- package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
- package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
- package/src/private/webapis/performance/LongTasks.js +39 -0
- package/src/private/webapis/performance/Performance.js +22 -9
- package/src/private/webapis/performance/PerformanceEntry.js +35 -17
- package/src/private/webapis/performance/PerformanceObserver.js +29 -43
- package/src/private/webapis/performance/RawPerformanceEntry.js +19 -1
- package/src/private/webapis/performance/UserTiming.js +17 -12
- package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
- package/src-win/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
- package/types/experimental.d.ts +10 -2
- package/Libraries/Core/setUpIntersectionObserver.js +0 -16
- package/Libraries/Core/setUpMutationObserver.js +0 -16
- package/Libraries/Core/setUpPerformanceObserver.js +0 -18
- package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
- package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -135
- package/src/private/core/setUpDOM.js +0 -18
- package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
- /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: [
|
|
23
|
+
change: [{colorScheme: ?ColorSchemeName}],
|
|
26
24
|
}>();
|
|
27
25
|
|
|
28
26
|
type NativeAppearanceEventDefinitions = {
|
|
29
27
|
appearanceChanged: [AppearancePreferences],
|
|
30
28
|
};
|
|
31
29
|
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
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
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
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
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
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
|
-
|
|
97
|
-
|
|
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
|
-
|
|
103
|
-
|
|
104
|
-
|
|
105
|
-
|
|
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
|
|
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
|
-
|
|
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.
|
|
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
|
|
15
|
+
import {addChangeListener, getColorScheme} from './Appearance';
|
|
16
16
|
import {useSyncExternalStore} from 'react';
|
|
17
17
|
|
|
18
18
|
const subscribe = (onStoreChange: () => void) => {
|
|
19
|
-
const appearanceSubscription =
|
|
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,
|
|
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):
|
|
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
|
|
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
|
|
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.
|
|
19
|
+
render(): React.MixedElement | null {
|
|
22
20
|
if (this.props.visible === false) {
|
|
23
21
|
return null;
|
|
24
22
|
}
|
package/jest/mockScrollView.js
CHANGED
|
@@ -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.
|
|
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.
|
|
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.
|
|
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-
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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": "
|
|
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.
|
|
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
|
|
30
|
-
"@react-native-community/cli-platform-android": "14.0.0
|
|
31
|
-
"@react-native-community/cli-platform-ios": "14.0.0
|
|
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-
|
|
34
|
-
"@react-native/codegen": "0.76.0-nightly-
|
|
35
|
-
"@react-native/community-cli-plugin": "0.76.0-nightly-
|
|
36
|
-
"@react-native/gradle-plugin": "0.76.0-nightly-
|
|
37
|
-
"@react-native/js-polyfills": "0.76.0-nightly-
|
|
38
|
-
"@react-native/normalize-colors": "0.76.0-nightly-
|
|
39
|
-
"@react-native/virtualized-lists": "0.76.0-nightly-
|
|
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.
|
|
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-
|
|
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-
|
|
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 '
|
|
13
|
-
import type {ViewProps} from '
|
|
14
|
-
import type {HostComponent} from '
|
|
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 '
|
|
18
|
-
import ScrollContentViewNativeComponent from '
|
|
19
|
-
import ScrollViewNativeComponent from '
|
|
20
|
-
import Platform from '
|
|
21
|
-
import AndroidHorizontalScrollContentViewNativeComponent from '
|
|
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 '
|
|
13
|
-
import type {ViewProps} from '
|
|
14
|
-
import type {HostComponent} from '
|
|
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 '
|
|
18
|
-
import ScrollViewNativeComponent from '
|
|
19
|
-
import View from '
|
|
20
|
-
import Platform from '
|
|
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 '
|
|
13
|
-
import type {HostComponent} from '
|
|
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';
|