@office-iss/react-native-win32 0.0.0-canary.272 → 0.0.0-canary.274
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 +1 -1
- package/CHANGELOG.json +31 -1
- package/CHANGELOG.md +20 -4
- package/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/animations/Animation.js +1 -1
- package/Libraries/Animated/createAnimatedComponent.js +7 -7
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +1 -1
- package/Libraries/Animated/nodes/AnimatedProps.js +1 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +1 -1
- package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
- package/Libraries/Animated/useAnimatedProps.js +3 -3
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +1 -1
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +5 -0
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +3 -2
- package/Libraries/Components/ScrollView/ScrollView.js +4 -4
- package/Libraries/Components/ScrollView/ScrollViewCommands.js +1 -1
- package/Libraries/Components/ScrollView/ScrollViewContext.js +2 -0
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +4 -4
- package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
- package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +4 -4
- package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +6 -4
- package/Libraries/Components/TextInput/TextInput.d.ts +4 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +7 -9
- package/Libraries/Components/TextInput/TextInput.js +2 -0
- package/Libraries/Components/TextInput/TextInput.win32.js +3 -0
- package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +3 -0
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
- package/Libraries/Components/View/ViewNativeComponent.js +3 -88
- package/Libraries/Components/View/ViewWin32.js +1 -0
- package/Libraries/Core/ExceptionsManager.js +44 -27
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -1
- package/Libraries/Core/setUpErrorHandling.js +1 -7
- package/Libraries/Core/setUpReactDevTools.js +74 -1
- package/Libraries/Core/setUpTimers.js +21 -10
- package/Libraries/Image/Image.android.js +1 -3
- package/Libraries/Image/Image.d.ts +18 -29
- package/Libraries/Image/Image.ios.js +0 -2
- package/Libraries/Image/Image.win32.js +0 -2
- package/Libraries/Inspector/Inspector.js +1 -0
- package/Libraries/Inspector/Inspector.win32.js +1 -0
- package/Libraries/Lists/SectionListModern.js +7 -7
- package/Libraries/LogBox/Data/LogBoxData.js +2 -2
- package/Libraries/LogBox/LogBoxInspectorContainer.js +1 -1
- package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +1 -1
- package/Libraries/Modal/Modal.js +5 -3
- package/Libraries/NativeComponent/BaseViewConfig.android.js +65 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +3 -3
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +4 -4
- package/Libraries/ReactNative/AppContainer.js +1 -1
- package/Libraries/ReactNative/AppRegistry.js +1 -1
- package/Libraries/ReactNative/DisplayMode.js +1 -1
- package/Libraries/ReactNative/RendererImplementation.js +2 -2
- package/Libraries/ReactNative/getCachedComponentWithDebugName.js +1 -3
- package/Libraries/ReactNative/renderApplication.js +6 -4
- package/Libraries/ReactNative/requireNativeComponent.js +3 -1
- package/Libraries/Renderer/shims/ReactNativeTypes.js +9 -18
- package/Libraries/StyleSheet/StyleSheet.js +7 -1
- package/Libraries/StyleSheet/StyleSheet.win32.js +7 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +1 -1
- package/Libraries/Utilities/FocusManager.win32.js +1 -1
- package/Libraries/Utilities/codegenNativeComponent.js +1 -1
- package/Libraries/Utilities/useMergeRefs.js +26 -7
- package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +1 -1
- package/index.js +2 -2
- package/index.win32.js +2 -2
- package/jest/setup.js +1 -0
- package/overrides.json +10 -10
- package/package.json +12 -12
- package/src/private/animated/NativeAnimatedHelper.js +4 -4
- package/src/private/animated/NativeAnimatedHelper.win32.js +4 -4
- package/src/private/animated/useAnimatedPropsMemo.js +0 -1
- package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +6 -5
- package/src/private/featureflags/ReactNativeFeatureFlags.js +31 -21
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +8 -6
- package/src/private/specs/modules/NativeExceptionsManager.js +0 -12
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +6 -0
- package/src/private/webapis/performance/EventTiming.js +1 -1
- package/src/private/webapis/performance/Performance.js +36 -15
- package/src/private/webapis/performance/PerformanceObserver.js +2 -2
- package/src/private/webapis/performance/UserTiming.js +5 -5
- package/src/private/webapis/performance/specs/NativePerformance.js +18 -2
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +32 -12
|
@@ -88,7 +88,7 @@ const PERMISSIONS = Object.freeze({
|
|
|
88
88
|
*/
|
|
89
89
|
|
|
90
90
|
class PermissionsAndroid {
|
|
91
|
-
PERMISSIONS: {|
|
|
91
|
+
PERMISSIONS: $ReadOnly<{|
|
|
92
92
|
ACCEPT_HANDOVER: string,
|
|
93
93
|
ACCESS_BACKGROUND_LOCATION: string,
|
|
94
94
|
ACCESS_COARSE_LOCATION: string,
|
|
@@ -132,12 +132,12 @@ class PermissionsAndroid {
|
|
|
132
132
|
WRITE_CALL_LOG: string,
|
|
133
133
|
WRITE_CONTACTS: string,
|
|
134
134
|
WRITE_EXTERNAL_STORAGE: string,
|
|
135
|
-
|} = PERMISSIONS;
|
|
136
|
-
RESULTS: {|
|
|
135
|
+
|}> = PERMISSIONS;
|
|
136
|
+
RESULTS: $ReadOnly<{|
|
|
137
137
|
DENIED: 'denied',
|
|
138
138
|
GRANTED: 'granted',
|
|
139
139
|
NEVER_ASK_AGAIN: 'never_ask_again',
|
|
140
|
-
|} = PERMISSION_REQUEST_RESULT;
|
|
140
|
+
|}> = PERMISSION_REQUEST_RESULT;
|
|
141
141
|
|
|
142
142
|
/**
|
|
143
143
|
* DEPRECATED - use check
|
|
@@ -24,7 +24,7 @@ export type Props = $ReadOnly<{|
|
|
|
24
24
|
internal_excludeInspector?: boolean,
|
|
25
25
|
|}>;
|
|
26
26
|
|
|
27
|
-
const AppContainer:
|
|
27
|
+
const AppContainer: component(...Props) = __DEV__
|
|
28
28
|
? require('./AppContainer-dev').default
|
|
29
29
|
: require('./AppContainer-prod').default;
|
|
30
30
|
|
|
@@ -13,8 +13,8 @@ import type {RootTag} from '../Types/RootTagTypes';
|
|
|
13
13
|
import type {IPerformanceLogger} from '../Utilities/createPerformanceLogger';
|
|
14
14
|
import type {DisplayModeType} from './DisplayMode';
|
|
15
15
|
|
|
16
|
-
import registerCallableModule from '../Core/registerCallableModule';
|
|
17
16
|
import BugReporting from '../BugReporting/BugReporting';
|
|
17
|
+
import registerCallableModule from '../Core/registerCallableModule';
|
|
18
18
|
import createPerformanceLogger from '../Utilities/createPerformanceLogger';
|
|
19
19
|
import infoLog from '../Utilities/infoLog';
|
|
20
20
|
import SceneTracker from '../Utilities/SceneTracker';
|
|
@@ -12,7 +12,7 @@ export opaque type DisplayModeType = number;
|
|
|
12
12
|
|
|
13
13
|
/** DisplayMode should be in sync with the method displayModeToInt from
|
|
14
14
|
* react/renderer/uimanager/primitives.h. */
|
|
15
|
-
const DisplayMode: {[string]: DisplayModeType} = Object.freeze({
|
|
15
|
+
const DisplayMode: {+[string]: DisplayModeType} = Object.freeze({
|
|
16
16
|
VISIBLE: 1,
|
|
17
17
|
SUSPENDED: 2,
|
|
18
18
|
HIDDEN: 3,
|
|
@@ -136,8 +136,8 @@ export function isProfilingRenderer(): boolean {
|
|
|
136
136
|
}
|
|
137
137
|
|
|
138
138
|
export function isChildPublicInstance(
|
|
139
|
-
parentInstance: ReactFabricHostComponent | HostComponent<
|
|
140
|
-
childInstance: ReactFabricHostComponent | HostComponent<
|
|
139
|
+
parentInstance: ReactFabricHostComponent | HostComponent<empty>,
|
|
140
|
+
childInstance: ReactFabricHostComponent | HostComponent<empty>,
|
|
141
141
|
): boolean {
|
|
142
142
|
return require('../Renderer/shims/ReactNative').isChildPublicInstance(
|
|
143
143
|
parentInstance,
|
|
@@ -8,11 +8,9 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {AbstractComponent} from 'react';
|
|
12
|
-
|
|
13
11
|
import * as React from 'react';
|
|
14
12
|
|
|
15
|
-
type NoopComponent =
|
|
13
|
+
type NoopComponent = component(children: React.Node);
|
|
16
14
|
|
|
17
15
|
const cache: Map<
|
|
18
16
|
string, // displayName
|
|
@@ -23,10 +23,12 @@ import * as React from 'react';
|
|
|
23
23
|
// require BackHandler so it sets the default handler that exits the app if no listeners respond
|
|
24
24
|
import '../Utilities/BackHandler';
|
|
25
25
|
|
|
26
|
-
type ActivityType =
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
26
|
+
type ActivityType = component(
|
|
27
|
+
...{
|
|
28
|
+
mode: 'visible' | 'hidden',
|
|
29
|
+
children: React.Node,
|
|
30
|
+
}
|
|
31
|
+
);
|
|
30
32
|
|
|
31
33
|
export default function renderApplication<Props: Object>(
|
|
32
34
|
RootComponent: React.ComponentType<Props>,
|
|
@@ -24,7 +24,9 @@ const getNativeComponentAttributes = require('./getNativeComponentAttributes');
|
|
|
24
24
|
*
|
|
25
25
|
*/
|
|
26
26
|
|
|
27
|
-
const requireNativeComponent = <T
|
|
27
|
+
const requireNativeComponent = <T: {...}>(
|
|
28
|
+
uiViewClassName: string,
|
|
29
|
+
): HostComponent<T> =>
|
|
28
30
|
((createReactNativeComponentClass(uiViewClassName, () =>
|
|
29
31
|
getNativeComponentAttributes(uiViewClassName),
|
|
30
32
|
): any): HostComponent<T>);
|
|
@@ -7,15 +7,10 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<9cf3e28d6ca0299bc0bb5caa75b19556>>
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import type {
|
|
14
|
-
ElementRef,
|
|
15
|
-
ElementType,
|
|
16
|
-
MixedElement,
|
|
17
|
-
AbstractComponent,
|
|
18
|
-
} from 'react';
|
|
13
|
+
import type {ElementRef, ElementType, MixedElement} from 'react';
|
|
19
14
|
|
|
20
15
|
export type MeasureOnSuccessCallback = (
|
|
21
16
|
x: number,
|
|
@@ -138,14 +133,9 @@ declare const ensureNativeMethodsAreSynced: NativeMethods;
|
|
|
138
133
|
(ensureNativeMethodsAreSynced: INativeMethods);
|
|
139
134
|
|
|
140
135
|
export type HostInstance = NativeMethods;
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
computeComponentStackForErrorReporting(tag: number): string,
|
|
145
|
-
// TODO (bvaughn) Decide which additional types to expose here?
|
|
146
|
-
// And how much information to fill in for the above types.
|
|
147
|
-
...
|
|
148
|
-
};
|
|
136
|
+
/*::
|
|
137
|
+
export type HostComponent<Config: {...}> = component(ref: React$RefSetter<HostInstance>, ...Config);
|
|
138
|
+
*/
|
|
149
139
|
|
|
150
140
|
type InspectorDataProps = $ReadOnly<{
|
|
151
141
|
[propName: string]: string,
|
|
@@ -216,8 +206,10 @@ export type ReactNativeType = {
|
|
|
216
206
|
componentOrHandle: ?(ElementRef<TElementType> | number),
|
|
217
207
|
): ?number,
|
|
218
208
|
isChildPublicInstance(
|
|
219
|
-
|
|
220
|
-
|
|
209
|
+
// eslint-disable-next-line no-undef
|
|
210
|
+
parent: PublicInstance | HostComponent<empty>,
|
|
211
|
+
// eslint-disable-next-line no-undef
|
|
212
|
+
child: PublicInstance | HostComponent<empty>,
|
|
221
213
|
): boolean,
|
|
222
214
|
dispatchCommand(
|
|
223
215
|
handle: HostInstance,
|
|
@@ -234,7 +226,6 @@ export type ReactNativeType = {
|
|
|
234
226
|
unmountComponentAtNode(containerTag: number): void,
|
|
235
227
|
unmountComponentAtNodeAndRemoveContainer(containerTag: number): void,
|
|
236
228
|
+unstable_batchedUpdates: <T>(fn: (T) => void, bookkeeping: T) => void,
|
|
237
|
-
+__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: SecretInternalsType,
|
|
238
229
|
...
|
|
239
230
|
};
|
|
240
231
|
|
|
@@ -170,7 +170,13 @@ if (hairlineWidth === 0) {
|
|
|
170
170
|
hairlineWidth = 1 / PixelRatio.get();
|
|
171
171
|
}
|
|
172
172
|
|
|
173
|
-
const absoluteFill
|
|
173
|
+
const absoluteFill: {
|
|
174
|
+
+bottom: 0,
|
|
175
|
+
+left: 0,
|
|
176
|
+
+position: 'absolute',
|
|
177
|
+
+right: 0,
|
|
178
|
+
+top: 0,
|
|
179
|
+
} = {
|
|
174
180
|
position: 'absolute',
|
|
175
181
|
left: 0,
|
|
176
182
|
right: 0,
|
|
@@ -172,7 +172,13 @@ if (hairlineWidth === 0) {
|
|
|
172
172
|
hairlineWidth = 1 / PixelRatio.get();
|
|
173
173
|
}
|
|
174
174
|
|
|
175
|
-
const absoluteFill
|
|
175
|
+
const absoluteFill: {
|
|
176
|
+
+bottom: 0,
|
|
177
|
+
+left: 0,
|
|
178
|
+
+position: 'absolute',
|
|
179
|
+
+right: 0,
|
|
180
|
+
+top: 0,
|
|
181
|
+
} = {
|
|
176
182
|
position: 'absolute',
|
|
177
183
|
left: 0,
|
|
178
184
|
right: 0,
|
|
@@ -56,7 +56,7 @@ export interface FlexStyle {
|
|
|
56
56
|
borderWidth?: number | undefined;
|
|
57
57
|
bottom?: DimensionValue | undefined;
|
|
58
58
|
boxSizing?: 'border-box' | 'content-box' | undefined;
|
|
59
|
-
display?: 'none' | 'flex' | undefined;
|
|
59
|
+
display?: 'none' | 'flex' | 'contents' | undefined;
|
|
60
60
|
end?: DimensionValue | undefined;
|
|
61
61
|
flex?: number | undefined;
|
|
62
62
|
flexBasis?: DimensionValue | undefined;
|
|
@@ -58,7 +58,7 @@ type ____LayoutStyle_Internal = $ReadOnly<{
|
|
|
58
58
|
* It works similarly to `display` in CSS, but only support 'flex' and 'none'.
|
|
59
59
|
* 'flex' is the default.
|
|
60
60
|
*/
|
|
61
|
-
display?: 'none' | 'flex',
|
|
61
|
+
display?: 'none' | 'flex' | 'contents',
|
|
62
62
|
|
|
63
63
|
/** `width` sets the width of this component.
|
|
64
64
|
*
|
|
@@ -18,7 +18,7 @@ class FocusManager {
|
|
|
18
18
|
// This function takes in a ref to a React Component and a bool value. If setWindowFocus = true, call aggressive focus.
|
|
19
19
|
// Else, call polite focus
|
|
20
20
|
|
|
21
|
-
static focus(ref: React.
|
|
21
|
+
static focus(ref: React.RefObject<any>, setWindowFocus: boolean) {
|
|
22
22
|
if (ref) {
|
|
23
23
|
if (setWindowFocus) {
|
|
24
24
|
UIManager.dispatchViewManagerCommand(
|
|
@@ -31,7 +31,7 @@ export type NativeComponentType<T> = HostComponent<T>;
|
|
|
31
31
|
// `requireNativeComponent` is not available in Bridgeless mode.
|
|
32
32
|
// e.g. This function runs at runtime if `codegenNativeComponent` was not called
|
|
33
33
|
// from a file suffixed with NativeComponent.js.
|
|
34
|
-
function codegenNativeComponent<Props>(
|
|
34
|
+
function codegenNativeComponent<Props: {...}>(
|
|
35
35
|
componentName: string,
|
|
36
36
|
options?: Options,
|
|
37
37
|
): NativeComponentType<Props> {
|
|
@@ -8,6 +8,7 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
+
import useRefEffect from './useRefEffect';
|
|
11
12
|
import * as React from 'react';
|
|
12
13
|
import {useCallback} from 'react';
|
|
13
14
|
|
|
@@ -22,19 +23,37 @@ import {useCallback} from 'react';
|
|
|
22
23
|
*/
|
|
23
24
|
export default function useMergeRefs<Instance>(
|
|
24
25
|
...refs: $ReadOnlyArray<?React.RefSetter<Instance>>
|
|
25
|
-
):
|
|
26
|
-
|
|
27
|
-
(current: Instance
|
|
28
|
-
|
|
29
|
-
if (ref
|
|
26
|
+
): React.RefSetter<Instance> {
|
|
27
|
+
const refEffect = useCallback(
|
|
28
|
+
(current: Instance) => {
|
|
29
|
+
const cleanups: $ReadOnlyArray<void | (() => void)> = refs.map(ref => {
|
|
30
|
+
if (ref == null) {
|
|
31
|
+
return undefined;
|
|
32
|
+
} else {
|
|
30
33
|
if (typeof ref === 'function') {
|
|
31
|
-
ref
|
|
34
|
+
// $FlowIssue[incompatible-type] - Flow does not understand ref cleanup.
|
|
35
|
+
const cleanup: void | (() => void) = ref(current);
|
|
36
|
+
return typeof cleanup === 'function'
|
|
37
|
+
? cleanup
|
|
38
|
+
: () => {
|
|
39
|
+
ref(null);
|
|
40
|
+
};
|
|
32
41
|
} else {
|
|
33
42
|
ref.current = current;
|
|
43
|
+
return () => {
|
|
44
|
+
ref.current = null;
|
|
45
|
+
};
|
|
34
46
|
}
|
|
35
47
|
}
|
|
36
|
-
}
|
|
48
|
+
});
|
|
49
|
+
|
|
50
|
+
return () => {
|
|
51
|
+
for (const cleanup of cleanups) {
|
|
52
|
+
cleanup?.();
|
|
53
|
+
}
|
|
54
|
+
};
|
|
37
55
|
},
|
|
38
56
|
[...refs], // eslint-disable-line react-hooks/exhaustive-deps
|
|
39
57
|
);
|
|
58
|
+
return useRefEffect(refEffect);
|
|
40
59
|
}
|
|
@@ -17,7 +17,7 @@ import * as React from 'react';
|
|
|
17
17
|
|
|
18
18
|
function takesHostComponentInstance(instance: HostInstance | null): void {}
|
|
19
19
|
|
|
20
|
-
const MyHostComponent = (('Host': any): HostComponent<
|
|
20
|
+
const MyHostComponent = (('Host': any): HostComponent<{...}>);
|
|
21
21
|
|
|
22
22
|
<MyHostComponent
|
|
23
23
|
ref={hostComponentRef => {
|
package/index.js
CHANGED
|
@@ -88,7 +88,6 @@ import typeof UTFSequence from './Libraries/UTFSequence';
|
|
|
88
88
|
import typeof * as Appearance from './Libraries/Utilities/Appearance';
|
|
89
89
|
import typeof BackHandler from './Libraries/Utilities/BackHandler';
|
|
90
90
|
import typeof DeviceInfo from './Libraries/Utilities/DeviceInfo';
|
|
91
|
-
import typeof DevMenu from './src/private/devmenu/DevMenu';
|
|
92
91
|
import typeof DevSettings from './Libraries/Utilities/DevSettings';
|
|
93
92
|
import typeof Dimensions from './Libraries/Utilities/Dimensions';
|
|
94
93
|
import typeof PixelRatio from './Libraries/Utilities/PixelRatio';
|
|
@@ -97,6 +96,7 @@ import typeof useColorScheme from './Libraries/Utilities/useColorScheme';
|
|
|
97
96
|
import typeof useWindowDimensions from './Libraries/Utilities/useWindowDimensions';
|
|
98
97
|
import typeof Vibration from './Libraries/Vibration/Vibration';
|
|
99
98
|
import typeof YellowBox from './Libraries/YellowBox/YellowBoxDeprecated';
|
|
99
|
+
import typeof DevMenu from './src/private/devmenu/DevMenu';
|
|
100
100
|
|
|
101
101
|
const warnOnce = require('./Libraries/Utilities/warnOnce');
|
|
102
102
|
const invariant = require('invariant');
|
|
@@ -375,7 +375,7 @@ module.exports = {
|
|
|
375
375
|
get processColor(): processColor {
|
|
376
376
|
return require('./Libraries/StyleSheet/processColor').default;
|
|
377
377
|
},
|
|
378
|
-
get requireNativeComponent(): <T>(
|
|
378
|
+
get requireNativeComponent(): <T: {...}>(
|
|
379
379
|
uiViewClassName: string,
|
|
380
380
|
) => HostComponent<T> {
|
|
381
381
|
return require('./Libraries/ReactNative/requireNativeComponent').default;
|
package/index.win32.js
CHANGED
|
@@ -88,7 +88,6 @@ import typeof UTFSequence from './Libraries/UTFSequence';
|
|
|
88
88
|
import typeof * as Appearance from './Libraries/Utilities/Appearance';
|
|
89
89
|
import typeof BackHandler from './Libraries/Utilities/BackHandler';
|
|
90
90
|
import typeof DeviceInfo from './Libraries/Utilities/DeviceInfo';
|
|
91
|
-
import typeof DevMenu from './src/private/devmenu/DevMenu';
|
|
92
91
|
import typeof DevSettings from './Libraries/Utilities/DevSettings';
|
|
93
92
|
import typeof Dimensions from './Libraries/Utilities/Dimensions';
|
|
94
93
|
import typeof PixelRatio from './Libraries/Utilities/PixelRatio';
|
|
@@ -97,6 +96,7 @@ import typeof useColorScheme from './Libraries/Utilities/useColorScheme';
|
|
|
97
96
|
import typeof useWindowDimensions from './Libraries/Utilities/useWindowDimensions';
|
|
98
97
|
import typeof Vibration from './Libraries/Vibration/Vibration';
|
|
99
98
|
import typeof YellowBox from './Libraries/YellowBox/YellowBoxDeprecated';
|
|
99
|
+
import typeof DevMenu from './src/private/devmenu/DevMenu';
|
|
100
100
|
|
|
101
101
|
const warnOnce = require('./Libraries/Utilities/warnOnce');
|
|
102
102
|
const invariant = require('invariant');
|
|
@@ -381,7 +381,7 @@ module.exports = {
|
|
|
381
381
|
get processColor(): processColor {
|
|
382
382
|
return require('./Libraries/StyleSheet/processColor').default;
|
|
383
383
|
},
|
|
384
|
-
get requireNativeComponent(): <T>(
|
|
384
|
+
get requireNativeComponent(): <T: {...}>(
|
|
385
385
|
uiViewClassName: string,
|
|
386
386
|
) => HostComponent<T> {
|
|
387
387
|
return require('./Libraries/ReactNative/requireNativeComponent').default;
|
package/jest/setup.js
CHANGED
|
@@ -146,6 +146,7 @@ jest
|
|
|
146
146
|
remove: jest.fn(),
|
|
147
147
|
})),
|
|
148
148
|
announceForAccessibility: jest.fn(),
|
|
149
|
+
announceForAccessibilityWithOptions: jest.fn(),
|
|
149
150
|
isAccessibilityServiceEnabled: jest.fn(() => Promise.resolve(false)),
|
|
150
151
|
isBoldTextEnabled: jest.fn(() => Promise.resolve(false)),
|
|
151
152
|
isGrayscaleEnabled: jest.fn(() => Promise.resolve(false)),
|
package/overrides.json
CHANGED
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
"**/__snapshots__/**",
|
|
8
8
|
"src-win/rntypes/**"
|
|
9
9
|
],
|
|
10
|
-
"baseVersion": "0.77.0-nightly-
|
|
10
|
+
"baseVersion": "0.77.0-nightly-20241031-3a01a0c9c",
|
|
11
11
|
"overrides": [
|
|
12
12
|
{
|
|
13
13
|
"type": "derived",
|
|
14
14
|
"file": ".flowconfig",
|
|
15
15
|
"baseFile": ".flowconfig",
|
|
16
|
-
"baseHash": "
|
|
16
|
+
"baseHash": "16d33187350d986e6c2fd343ff06f8f1c6f64ebf"
|
|
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": "5f0532348ca7440731478ef5b119a3a569529a7f"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"type": "platform",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"type": "derived",
|
|
110
110
|
"file": "src-win/Libraries/Components/TextInput/TextInput.win32.js",
|
|
111
111
|
"baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js",
|
|
112
|
-
"baseHash": "
|
|
112
|
+
"baseHash": "87f676e0bfd031b3dd8c79cf78b64af3c525b151"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"type": "patch",
|
|
@@ -232,7 +232,7 @@
|
|
|
232
232
|
"type": "derived",
|
|
233
233
|
"file": "src-win/Libraries/Image/Image.win32.js",
|
|
234
234
|
"baseFile": "packages/react-native/Libraries/Image/Image.ios.js",
|
|
235
|
-
"baseHash": "
|
|
235
|
+
"baseHash": "a5abee6de7dca3cb043b834925de3f6f0443c738",
|
|
236
236
|
"issue": 4320
|
|
237
237
|
},
|
|
238
238
|
{
|
|
@@ -286,7 +286,7 @@
|
|
|
286
286
|
"type": "patch",
|
|
287
287
|
"file": "src-win/Libraries/Inspector/Inspector.win32.js",
|
|
288
288
|
"baseFile": "packages/react-native/Libraries/Inspector/Inspector.js",
|
|
289
|
-
"baseHash": "
|
|
289
|
+
"baseHash": "ad3ed5cb941f304f5751c6d12274ffe81753162c"
|
|
290
290
|
},
|
|
291
291
|
{
|
|
292
292
|
"type": "patch",
|
|
@@ -304,7 +304,7 @@
|
|
|
304
304
|
"type": "patch",
|
|
305
305
|
"file": "src-win/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js",
|
|
306
306
|
"baseFile": "packages/react-native/Libraries/LogBox/UI/LogBoxInspectorHeader.js",
|
|
307
|
-
"baseHash": "
|
|
307
|
+
"baseHash": "c4a8a3591ffb65360237708c9fb919408835cb76",
|
|
308
308
|
"issue": 7952
|
|
309
309
|
},
|
|
310
310
|
{
|
|
@@ -414,7 +414,7 @@
|
|
|
414
414
|
"type": "patch",
|
|
415
415
|
"file": "src-win/Libraries/StyleSheet/StyleSheet.win32.js",
|
|
416
416
|
"baseFile": "packages/react-native/Libraries/StyleSheet/StyleSheet.js",
|
|
417
|
-
"baseHash": "
|
|
417
|
+
"baseHash": "46f00f057f504c71fa0feb5695307e3e3806211b"
|
|
418
418
|
},
|
|
419
419
|
{
|
|
420
420
|
"type": "derived",
|
|
@@ -497,13 +497,13 @@
|
|
|
497
497
|
"type": "copy",
|
|
498
498
|
"file": "src-win/Libraries/Utilities/useMergeRefs.js",
|
|
499
499
|
"baseFile": "packages/react-native/Libraries/Utilities/useMergeRefs.js",
|
|
500
|
-
"baseHash": "
|
|
500
|
+
"baseHash": "4ba42e1b43ef55a1a9e3095336979fa712f4dc8d"
|
|
501
501
|
},
|
|
502
502
|
{
|
|
503
503
|
"type": "patch",
|
|
504
504
|
"file": "src-win/src/private/animated/NativeAnimatedHelper.win32.js",
|
|
505
505
|
"baseFile": "packages/react-native/src/private/animated/NativeAnimatedHelper.js",
|
|
506
|
-
"baseHash": "
|
|
506
|
+
"baseHash": "8c67d57575cccb7281b15ca2591e4edf5c5c36dd",
|
|
507
507
|
"issue": 11041
|
|
508
508
|
},
|
|
509
509
|
{
|
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.274",
|
|
4
4
|
"description": "Implementation of react native on top of Office's Win32 platform.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@react-native-community/cli-platform-android": "15.0.0-alpha.2",
|
|
31
31
|
"@react-native-community/cli-platform-ios": "15.0.0-alpha.2",
|
|
32
32
|
"@react-native/assets": "1.0.0",
|
|
33
|
-
"@react-native/assets-registry": "0.77.0-nightly-
|
|
34
|
-
"@react-native/codegen": "0.77.0-nightly-
|
|
35
|
-
"@react-native/community-cli-plugin": "0.77.0-nightly-
|
|
36
|
-
"@react-native/gradle-plugin": "0.77.0-nightly-
|
|
37
|
-
"@react-native/js-polyfills": "0.77.0-nightly-
|
|
38
|
-
"@react-native/normalize-colors": "0.77.0-nightly-
|
|
39
|
-
"@react-native/virtualized-lists": "0.77.0-nightly-
|
|
33
|
+
"@react-native/assets-registry": "0.77.0-nightly-20241031-3a01a0c9c",
|
|
34
|
+
"@react-native/codegen": "0.77.0-nightly-20241031-3a01a0c9c",
|
|
35
|
+
"@react-native/community-cli-plugin": "0.77.0-nightly-20241031-3a01a0c9c",
|
|
36
|
+
"@react-native/gradle-plugin": "0.77.0-nightly-20241031-3a01a0c9c",
|
|
37
|
+
"@react-native/js-polyfills": "0.77.0-nightly-20241031-3a01a0c9c",
|
|
38
|
+
"@react-native/normalize-colors": "0.77.0-nightly-20241031-3a01a0c9c",
|
|
39
|
+
"@react-native/virtualized-lists": "0.77.0-nightly-20241031-3a01a0c9c",
|
|
40
40
|
"abort-controller": "^3.0.0",
|
|
41
41
|
"anser": "^1.4.9",
|
|
42
42
|
"ansi-regex": "^5.0.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"pretty-format": "^29.7.0",
|
|
61
61
|
"promise": "^8.3.0",
|
|
62
62
|
"react-clone-referenced-element": "^1.0.1",
|
|
63
|
-
"react-devtools-core": "^6.0.
|
|
63
|
+
"react-devtools-core": "^6.0.1",
|
|
64
64
|
"react-refresh": "^0.14.0",
|
|
65
65
|
"react-shallow-renderer": "^16.15.0",
|
|
66
66
|
"regenerator-runtime": "^0.13.2",
|
|
@@ -85,19 +85,19 @@
|
|
|
85
85
|
"@types/prop-types": "15.7.1",
|
|
86
86
|
"@types/react": "^18.2.6",
|
|
87
87
|
"eslint": "^8.19.0",
|
|
88
|
-
"flow-bin": "^0.
|
|
88
|
+
"flow-bin": "^0.250.0",
|
|
89
89
|
"jscodeshift": "^0.14.0",
|
|
90
90
|
"just-scripts": "^1.3.3",
|
|
91
91
|
"prettier": "2.8.8",
|
|
92
92
|
"react": "19.0.0-rc-fb9a90fa48-20240614",
|
|
93
|
-
"react-native": "0.77.0-nightly-
|
|
93
|
+
"react-native": "0.77.0-nightly-20241031-3a01a0c9c",
|
|
94
94
|
"react-native-platform-override": "^1.9.49",
|
|
95
95
|
"typescript": "5.0.4"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"@types/react": "^18.2.6",
|
|
99
99
|
"react": "^19.0.0-rc-fb9a90fa48-20240614",
|
|
100
|
-
"react-native": "0.77.0-nightly-
|
|
100
|
+
"react-native": "0.77.0-nightly-20241031-3a01a0c9c"
|
|
101
101
|
},
|
|
102
102
|
"beachball": {
|
|
103
103
|
"defaultNpmTag": "canary",
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {EventSubscription} from '../../../Libraries/vendor/emitter/EventEmitter';
|
|
12
11
|
import type {EventConfig} from '../../../Libraries/Animated/AnimatedEvent';
|
|
13
12
|
import type {
|
|
14
13
|
AnimationConfig,
|
|
@@ -18,13 +17,14 @@ import type {
|
|
|
18
17
|
AnimatedNodeConfig,
|
|
19
18
|
EventMapping,
|
|
20
19
|
} from '../../../Libraries/Animated/NativeAnimatedModule';
|
|
20
|
+
import type {EventSubscription} from '../../../Libraries/vendor/emitter/EventEmitter';
|
|
21
21
|
|
|
22
|
-
import
|
|
22
|
+
import NativeAnimatedNonTurboModule from '../../../Libraries/Animated/NativeAnimatedModule';
|
|
23
|
+
import NativeAnimatedTurboModule from '../../../Libraries/Animated/NativeAnimatedTurboModule';
|
|
23
24
|
import NativeEventEmitter from '../../../Libraries/EventEmitter/NativeEventEmitter';
|
|
24
25
|
import RCTDeviceEventEmitter from '../../../Libraries/EventEmitter/RCTDeviceEventEmitter';
|
|
25
26
|
import Platform from '../../../Libraries/Utilities/Platform';
|
|
26
|
-
import
|
|
27
|
-
import NativeAnimatedTurboModule from '../../../Libraries/Animated/NativeAnimatedTurboModule';
|
|
27
|
+
import * as ReactNativeFeatureFlags from '../featureflags/ReactNativeFeatureFlags';
|
|
28
28
|
import invariant from 'invariant';
|
|
29
29
|
import nullthrows from 'nullthrows';
|
|
30
30
|
|
|
@@ -8,7 +8,6 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {EventSubscription} from '../../../Libraries/vendor/emitter/EventEmitter';
|
|
12
11
|
import type {EventConfig} from '../../../Libraries/Animated/AnimatedEvent';
|
|
13
12
|
import type {
|
|
14
13
|
AnimationConfig,
|
|
@@ -18,13 +17,14 @@ import type {
|
|
|
18
17
|
AnimatedNodeConfig,
|
|
19
18
|
EventMapping,
|
|
20
19
|
} from '../../../Libraries/Animated/NativeAnimatedModule';
|
|
20
|
+
import type {EventSubscription} from '../../../Libraries/vendor/emitter/EventEmitter';
|
|
21
21
|
|
|
22
|
-
import
|
|
22
|
+
import NativeAnimatedNonTurboModule from '../../../Libraries/Animated/NativeAnimatedModule';
|
|
23
|
+
import NativeAnimatedTurboModule from '../../../Libraries/Animated/NativeAnimatedTurboModule';
|
|
23
24
|
import NativeEventEmitter from '../../../Libraries/EventEmitter/NativeEventEmitter';
|
|
24
25
|
import RCTDeviceEventEmitter from '../../../Libraries/EventEmitter/RCTDeviceEventEmitter';
|
|
25
26
|
import Platform from '../../../Libraries/Utilities/Platform';
|
|
26
|
-
import
|
|
27
|
-
import NativeAnimatedTurboModule from '../../../Libraries/Animated/NativeAnimatedTurboModule';
|
|
27
|
+
import * as ReactNativeFeatureFlags from '../featureflags/ReactNativeFeatureFlags';
|
|
28
28
|
import invariant from 'invariant';
|
|
29
29
|
import nullthrows from 'nullthrows';
|
|
30
30
|
|
|
@@ -17,7 +17,6 @@ import {AnimatedEvent} from '../../../Libraries/Animated/AnimatedEvent';
|
|
|
17
17
|
import AnimatedNode from '../../../Libraries/Animated/nodes/AnimatedNode';
|
|
18
18
|
import {isPlainObject} from '../../../Libraries/Animated/nodes/AnimatedObject';
|
|
19
19
|
import flattenStyle from '../../../Libraries/StyleSheet/flattenStyle';
|
|
20
|
-
|
|
21
20
|
import nullthrows from 'nullthrows';
|
|
22
21
|
import {useMemo, useState} from 'react';
|
|
23
22
|
|
|
@@ -10,15 +10,16 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
|
|
13
|
-
|
|
13
|
+
|
|
14
14
|
import View from '../../../Libraries/Components/View/View';
|
|
15
15
|
import UIManager from '../../../Libraries/ReactNative/UIManager';
|
|
16
|
+
import Platform from '../../../Libraries/Utilities/Platform';
|
|
16
17
|
import * as React from 'react';
|
|
17
18
|
|
|
18
|
-
const exported:
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
19
|
+
const exported: component(
|
|
20
|
+
ref?: React.RefSetter<React.ElementRef<typeof View>>,
|
|
21
|
+
...ViewProps
|
|
22
|
+
) = Platform.select({
|
|
22
23
|
ios: require('../../../src/private/specs/components/RCTSafeAreaViewNativeComponent')
|
|
23
24
|
.default,
|
|
24
25
|
android: UIManager.hasViewManagerConfig('RCTSafeAreaView')
|