@office-iss/react-native-win32 0.0.0-canary.258 → 0.0.0-canary.260
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 +2 -4
- package/CHANGELOG.json +31 -1
- package/CHANGELOG.md +24 -8
- package/Libraries/Alert/Alert.js +3 -0
- 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/nodes/AnimatedValue.js +1 -0
- package/Libraries/Animated/useAnimatedProps.js +138 -6
- package/Libraries/BatchedBridge/NativeModules.js +2 -0
- 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 -0
- 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 +220 -80
- package/Libraries/Components/TextInput/TextInput.win32.js +220 -86
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +22 -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/ExceptionsManager.js +2 -0
- package/Libraries/Core/InitializeCore.js +1 -1
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +7 -1
- package/Libraries/Core/setUpReactRefresh.js +0 -4
- 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 +4 -0
- package/Libraries/Inspector/NetworkOverlay.js +1 -1
- package/Libraries/Interaction/TaskQueue.js +1 -0
- package/Libraries/Lists/FlatList.js +1 -1
- package/Libraries/Lists/SectionList.js +2 -2
- package/Libraries/Lists/SectionListModern.js +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +31 -4
- package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +7 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +7 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +9 -2
- package/Libraries/Network/XMLHttpRequest.js +4 -2
- package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
- package/Libraries/ReactNative/RendererImplementation.js +24 -2
- package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -0
- package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -1
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.win32.js +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +57 -19
- package/Libraries/StyleSheet/StyleSheetTypes.js +60 -23
- package/Libraries/StyleSheet/processBackgroundImage.js +286 -0
- package/Libraries/StyleSheet/processBoxShadow.js +211 -0
- package/Libraries/StyleSheet/processFilter.js +24 -14
- package/Libraries/Text/Text.js +395 -212
- package/Libraries/Text/Text.win32.js +443 -245
- package/Libraries/Text/TextNativeComponent.js +7 -0
- package/Libraries/Text/TextNativeComponent.win32.js +7 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
- package/Libraries/Types/CodegenTypes.js +3 -1
- package/Libraries/Utilities/HMRClient.js +1 -0
- package/Libraries/Utilities/Platform.android.js +1 -1
- package/Libraries/Utilities/Platform.d.ts +1 -1
- package/Libraries/Utilities/Platform.flow.js +2 -2
- package/Libraries/Utilities/Platform.flow.win32.js +3 -3
- package/Libraries/Utilities/Platform.ios.js +1 -1
- package/Libraries/Utilities/Platform.win32.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/WebSocket/WebSocket.js +1 -1
- package/Libraries/vendor/emitter/EventEmitter.js +1 -0
- package/flow/jest.js +2 -2
- package/index.js +1 -0
- package/index.win32.js +1 -0
- package/jest/mockModal.js +1 -3
- package/jest/mockScrollView.js +1 -1
- package/jest/renderer.js +2 -2
- package/jest/setup.js +16 -9
- package/overrides.json +16 -16
- package/package.json +15 -15
- 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 +143 -19
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +25 -5
- 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 +14 -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/NativeDebuggerSessionObserver.js +23 -0
- package/src/private/specs/modules/NativeLinkingManager.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsAndroid.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsIOS.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsWin.js +8 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +1 -1
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +5 -8
- 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 +1 -1
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +5 -5
- 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 +36 -18
- package/src/private/webapis/performance/PerformanceObserver.js +29 -43
- package/src/private/webapis/performance/RawPerformanceEntry.js +24 -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 +20 -1
- 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/Text/TextOptimized.js +0 -538
- 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
|
@@ -16,6 +16,7 @@ import type {TextProps} from './TextProps';
|
|
|
16
16
|
import {createViewConfig} from '../NativeComponent/ViewConfig';
|
|
17
17
|
import UIManager from '../ReactNative/UIManager';
|
|
18
18
|
import createReactNativeComponentClass from '../Renderer/shims/createReactNativeComponentClass';
|
|
19
|
+
import Platform from '../Utilities/Platform';
|
|
19
20
|
|
|
20
21
|
export type NativeTextProps = $ReadOnly<{
|
|
21
22
|
...TextProps,
|
|
@@ -48,6 +49,12 @@ const textViewConfig = {
|
|
|
48
49
|
dataDetectorType: true,
|
|
49
50
|
android_hyphenationFrequency: true,
|
|
50
51
|
lineBreakStrategyIOS: true,
|
|
52
|
+
// boxShadow is currently per-component on Android instead of being on BaseViewConfig yet
|
|
53
|
+
...(Platform.OS === 'android' && {
|
|
54
|
+
experimental_boxShadow: {
|
|
55
|
+
process: require('../StyleSheet/processBoxShadow').default,
|
|
56
|
+
},
|
|
57
|
+
}),
|
|
51
58
|
},
|
|
52
59
|
directEventTypes: {
|
|
53
60
|
topTextLayout: {
|
|
@@ -16,6 +16,7 @@ import type {TextProps} from './TextProps';
|
|
|
16
16
|
import {createViewConfig} from '../NativeComponent/ViewConfig';
|
|
17
17
|
import UIManager from '../ReactNative/UIManager';
|
|
18
18
|
import createReactNativeComponentClass from '../Renderer/shims/createReactNativeComponentClass';
|
|
19
|
+
import Platform from '../Utilities/Platform';
|
|
19
20
|
|
|
20
21
|
export type NativeTextProps = $ReadOnly<{
|
|
21
22
|
...TextProps,
|
|
@@ -82,6 +83,12 @@ const textViewConfig = {
|
|
|
82
83
|
textStyle: true,
|
|
83
84
|
tooltip: true,
|
|
84
85
|
// Windows]
|
|
86
|
+
// boxShadow is currently per-component on Android instead of being on BaseViewConfig yet
|
|
87
|
+
...(Platform.OS === 'android' && {
|
|
88
|
+
experimental_boxShadow: {
|
|
89
|
+
process: require('../StyleSheet/processBoxShadow').default,
|
|
90
|
+
},
|
|
91
|
+
}),
|
|
85
92
|
},
|
|
86
93
|
directEventTypes: {
|
|
87
94
|
topTextLayout: {
|
|
@@ -16,52 +16,25 @@ const NativeModules = require('../BatchedBridge/NativeModules');
|
|
|
16
16
|
|
|
17
17
|
const turboModuleProxy = global.__turboModuleProxy;
|
|
18
18
|
|
|
19
|
-
const
|
|
20
|
-
|
|
21
|
-
TurboModules: ([]: Array<string>),
|
|
22
|
-
NotFound: ([]: Array<string>),
|
|
23
|
-
};
|
|
19
|
+
const useLegacyNativeModuleInterop =
|
|
20
|
+
global.RN$Bridgeless !== true || global.RN$TurboInterop === true;
|
|
24
21
|
|
|
25
|
-
function isBridgeless() {
|
|
26
|
-
return global.RN$Bridgeless === true;
|
|
27
|
-
}
|
|
28
|
-
|
|
29
|
-
function isTurboModuleInteropEnabled() {
|
|
30
|
-
return global.RN$TurboInterop === true;
|
|
31
|
-
}
|
|
32
|
-
|
|
33
|
-
// TODO(154308585): Remove "module not found" debug info logging
|
|
34
|
-
function shouldReportDebugInfo() {
|
|
35
|
-
return true;
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
// TODO(148943970): Consider reversing the lookup here:
|
|
39
|
-
// Lookup on __turboModuleProxy, then lookup on nativeModuleProxy
|
|
40
22
|
function requireModule<T: TurboModule>(name: string): ?T {
|
|
41
|
-
if (!isBridgeless() || isTurboModuleInteropEnabled()) {
|
|
42
|
-
// Backward compatibility layer during migration.
|
|
43
|
-
const legacyModule = NativeModules[name];
|
|
44
|
-
if (legacyModule != null) {
|
|
45
|
-
if (shouldReportDebugInfo()) {
|
|
46
|
-
moduleLoadHistory.NativeModules.push(name);
|
|
47
|
-
}
|
|
48
|
-
return ((legacyModule: $FlowFixMe): T);
|
|
49
|
-
}
|
|
50
|
-
}
|
|
51
|
-
|
|
52
23
|
if (turboModuleProxy != null) {
|
|
53
24
|
const module: ?T = turboModuleProxy(name);
|
|
54
25
|
if (module != null) {
|
|
55
|
-
if (shouldReportDebugInfo()) {
|
|
56
|
-
moduleLoadHistory.TurboModules.push(name);
|
|
57
|
-
}
|
|
58
26
|
return module;
|
|
59
27
|
}
|
|
60
28
|
}
|
|
61
29
|
|
|
62
|
-
if (
|
|
63
|
-
|
|
30
|
+
if (useLegacyNativeModuleInterop) {
|
|
31
|
+
// Backward compatibility layer during migration.
|
|
32
|
+
const legacyModule: ?T = NativeModules[name];
|
|
33
|
+
if (legacyModule != null) {
|
|
34
|
+
return legacyModule;
|
|
35
|
+
}
|
|
64
36
|
}
|
|
37
|
+
|
|
65
38
|
return null;
|
|
66
39
|
}
|
|
67
40
|
|
|
@@ -71,20 +44,10 @@ export function get<T: TurboModule>(name: string): ?T {
|
|
|
71
44
|
|
|
72
45
|
export function getEnforcing<T: TurboModule>(name: string): T {
|
|
73
46
|
const module = requireModule<T>(name);
|
|
74
|
-
|
|
47
|
+
invariant(
|
|
48
|
+
module != null,
|
|
75
49
|
`TurboModuleRegistry.getEnforcing(...): '${name}' could not be found. ` +
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
if (shouldReportDebugInfo()) {
|
|
79
|
-
message +=
|
|
80
|
-
' Bridgeless mode: ' + (isBridgeless() ? 'true' : 'false') + '. ';
|
|
81
|
-
message +=
|
|
82
|
-
'TurboModule interop: ' +
|
|
83
|
-
(isTurboModuleInteropEnabled() ? 'true' : 'false') +
|
|
84
|
-
'. ';
|
|
85
|
-
message += 'Modules loaded: ' + JSON.stringify(moduleLoadHistory);
|
|
86
|
-
}
|
|
87
|
-
|
|
88
|
-
invariant(module != null, message);
|
|
50
|
+
'Verify that a module by this name is registered in the native binary.',
|
|
51
|
+
);
|
|
89
52
|
return module;
|
|
90
53
|
}
|
|
@@ -42,4 +42,6 @@ type DefaultTypes = number | boolean | string | $ReadOnlyArray<string>;
|
|
|
42
42
|
// eslint-disable-next-line no-unused-vars
|
|
43
43
|
export type WithDefault<Type: DefaultTypes, Value: ?Type | string> = ?Type;
|
|
44
44
|
|
|
45
|
-
export type EventEmitter<T> = (
|
|
45
|
+
export type EventEmitter<T> = (
|
|
46
|
+
handler: (T) => void | Promise<void>,
|
|
47
|
+
) => EventSubscription;
|
|
@@ -379,6 +379,7 @@ function showCompileError() {
|
|
|
379
379
|
|
|
380
380
|
/* $FlowFixMe[class-object-subtyping] added when improving typing for this
|
|
381
381
|
* parameters */
|
|
382
|
+
// $FlowFixMe[incompatible-type]
|
|
382
383
|
const error: ExtendedError = new Error(message);
|
|
383
384
|
// Symbolicating compile errors is wasted effort
|
|
384
385
|
// because the stack trace is meaningless:
|
|
@@ -32,7 +32,7 @@ type IOSPlatform = {
|
|
|
32
32
|
major: number,
|
|
33
33
|
minor: number,
|
|
34
34
|
patch: number,
|
|
35
|
-
prerelease: ?
|
|
35
|
+
prerelease: ?string,
|
|
36
36
|
|},
|
|
37
37
|
systemName: string,
|
|
38
38
|
isMacCatalyst?: boolean,
|
|
@@ -65,7 +65,7 @@ type AndroidPlatform = {
|
|
|
65
65
|
major: number,
|
|
66
66
|
minor: number,
|
|
67
67
|
patch: number,
|
|
68
|
-
prerelease: ?
|
|
68
|
+
prerelease: ?string,
|
|
69
69
|
|},
|
|
70
70
|
Version: number,
|
|
71
71
|
Release: string,
|
|
@@ -34,7 +34,7 @@ type IOSPlatform = {
|
|
|
34
34
|
major: number,
|
|
35
35
|
minor: number,
|
|
36
36
|
patch: number,
|
|
37
|
-
prerelease: ?string
|
|
37
|
+
prerelease: ?string,
|
|
38
38
|
|},
|
|
39
39
|
isMacCatalyst?: boolean,
|
|
40
40
|
|},
|
|
@@ -66,7 +66,7 @@ type AndroidPlatform = {
|
|
|
66
66
|
major: number,
|
|
67
67
|
minor: number,
|
|
68
68
|
patch: number,
|
|
69
|
-
prerelease: ?
|
|
69
|
+
prerelease: ?string,
|
|
70
70
|
|},
|
|
71
71
|
Version: number,
|
|
72
72
|
Release: string,
|
|
@@ -105,7 +105,7 @@ type Win32Platform = {
|
|
|
105
105
|
major: number,
|
|
106
106
|
minor: number,
|
|
107
107
|
patch: number,
|
|
108
|
-
prerelease: ?string
|
|
108
|
+
prerelease: ?string,
|
|
109
109
|
|},
|
|
110
110
|
systemName: string,
|
|
111
111
|
isMacCatalyst?: boolean,
|
|
@@ -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;
|
|
@@ -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;
|
|
@@ -113,6 +113,7 @@ export default class EventEmitter<TEventToArgsMap: {...}>
|
|
|
113
113
|
// Copy `registrations` to take a snapshot when we invoke `emit`, in case
|
|
114
114
|
// registrations are added or removed when listeners are invoked.
|
|
115
115
|
for (const registration of Array.from(registrations)) {
|
|
116
|
+
// $FlowFixMe[incompatible-call]
|
|
116
117
|
registration.listener.apply(registration.context, args);
|
|
117
118
|
}
|
|
118
119
|
}
|
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';
|
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';
|
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', () => ({
|
|
@@ -287,7 +287,14 @@ jest
|
|
|
287
287
|
},
|
|
288
288
|
PlatformConstants: {
|
|
289
289
|
getConstants() {
|
|
290
|
-
return {
|
|
290
|
+
return {
|
|
291
|
+
reactNativeVersion: {
|
|
292
|
+
major: 1000,
|
|
293
|
+
minor: 0,
|
|
294
|
+
patch: 0,
|
|
295
|
+
prerelease: undefined,
|
|
296
|
+
},
|
|
297
|
+
};
|
|
291
298
|
},
|
|
292
299
|
},
|
|
293
300
|
PushNotificationManager: {
|
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-20240816-17017d2b8",
|
|
11
11
|
"overrides": [
|
|
12
12
|
{
|
|
13
13
|
"type": "derived",
|
|
14
14
|
"file": ".flowconfig",
|
|
15
15
|
"baseFile": ".flowconfig",
|
|
16
|
-
"baseHash": "
|
|
16
|
+
"baseHash": "3d94d14740956b3455abfbdff5e043212d04974b"
|
|
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": "dc1e45b643d33d868da60fa27da2cbda0231b7f3"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"type": "platform",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"type": "patch",
|
|
30
30
|
"file": "src-win/Libraries/Alert/Alert.win32.js",
|
|
31
31
|
"baseFile": "packages/react-native/Libraries/Alert/Alert.js",
|
|
32
|
-
"baseHash": "
|
|
32
|
+
"baseHash": "173b99e6ae120f14176cf3425877728787d3feed"
|
|
33
33
|
},
|
|
34
34
|
{
|
|
35
35
|
"type": "derived",
|
|
@@ -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
|
{
|
|
@@ -498,13 +498,13 @@
|
|
|
498
498
|
"type": "derived",
|
|
499
499
|
"file": "src-win/Libraries/Utilities/Platform.flow.win32.js",
|
|
500
500
|
"baseFile": "packages/react-native/Libraries/Utilities/Platform.flow.js",
|
|
501
|
-
"baseHash": "
|
|
501
|
+
"baseHash": "f38efa527b9426ae0178bb2336be2e93af0392ba"
|
|
502
502
|
},
|
|
503
503
|
{
|
|
504
504
|
"type": "derived",
|
|
505
505
|
"file": "src-win/Libraries/Utilities/Platform.win32.js",
|
|
506
506
|
"baseFile": "packages/react-native/Libraries/Utilities/Platform.android.js",
|
|
507
|
-
"baseHash": "
|
|
507
|
+
"baseHash": "33f07d6fddb5290d05c8d4cc490312e3af88c70b"
|
|
508
508
|
},
|
|
509
509
|
{
|
|
510
510
|
"type": "copy",
|
|
@@ -528,7 +528,7 @@
|
|
|
528
528
|
"type": "derived",
|
|
529
529
|
"file": "src-win/src/private/specs/modules/NativePlatformConstantsWin.js",
|
|
530
530
|
"baseFile": "packages/react-native/src/private/specs/modules/NativePlatformConstantsAndroid.js",
|
|
531
|
-
"baseHash": "
|
|
531
|
+
"baseHash": "fa0f34a2de33b641bd63863629087644796d8b59"
|
|
532
532
|
}
|
|
533
533
|
]
|
|
534
534
|
}
|
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.260",
|
|
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-20240816-17017d2b8",
|
|
34
|
+
"@react-native/codegen": "0.76.0-nightly-20240816-17017d2b8",
|
|
35
|
+
"@react-native/community-cli-plugin": "0.76.0-nightly-20240816-17017d2b8",
|
|
36
|
+
"@react-native/gradle-plugin": "0.76.0-nightly-20240816-17017d2b8",
|
|
37
|
+
"@react-native/js-polyfills": "0.76.0-nightly-20240816-17017d2b8",
|
|
38
|
+
"@react-native/normalize-colors": "0.76.0-nightly-20240816-17017d2b8",
|
|
39
|
+
"@react-native/virtualized-lists": "0.76.0-nightly-20240816-17017d2b8",
|
|
40
40
|
"abort-controller": "^3.0.0",
|
|
41
41
|
"anser": "^1.4.9",
|
|
42
42
|
"ansi-regex": "^5.0.0",
|
|
@@ -57,7 +57,7 @@
|
|
|
57
57
|
"pretty-format": "^26.5.2",
|
|
58
58
|
"promise": "^8.3.0",
|
|
59
59
|
"react-clone-referenced-element": "^1.0.1",
|
|
60
|
-
"react-devtools-core": "^5.3.
|
|
60
|
+
"react-devtools-core": "^5.3.1",
|
|
61
61
|
"react-refresh": "^0.14.0",
|
|
62
62
|
"react-shallow-renderer": "^16.15.0",
|
|
63
63
|
"regenerator-runtime": "^0.13.2",
|
|
@@ -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.241.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-20240816-17017d2b8",
|
|
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-20240816-17017d2b8"
|
|
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
|
|