@office-iss/react-native-win32 0.0.0-canary.264 → 0.0.0-canary.265
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 +14981 -14942
- package/CHANGELOG.md +31 -19
- package/Libraries/Animated/AnimatedImplementation.js +2 -2
- package/Libraries/Animated/NativeAnimatedAllowlist.js +20 -9
- package/Libraries/Animated/animations/Animation.js +1 -4
- package/Libraries/Animated/createAnimatedComponent.js +13 -0
- package/Libraries/Animated/nodes/AnimatedNode.js +39 -45
- package/Libraries/Animated/nodes/AnimatedObject.js +13 -3
- package/Libraries/Animated/nodes/AnimatedProps.js +81 -37
- package/Libraries/Animated/nodes/AnimatedStyle.js +104 -39
- package/Libraries/Animated/nodes/AnimatedTransform.js +55 -22
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -3
- package/Libraries/Animated/useAnimatedProps.js +38 -20
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +3 -1
- package/Libraries/Components/ScrollView/ScrollView.js +12 -9
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +3 -0
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +10 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +19 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +17 -1
- package/Libraries/Components/TextInput/TextInput.js +17 -1
- package/Libraries/Components/TextInput/TextInput.win32.js +17 -1
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
- package/Libraries/Components/Touchable/TouchableHighlight.js +2 -2
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -1
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +6 -2
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Image/AssetSourceResolver.js +12 -1
- package/Libraries/Modal/Modal.d.ts +7 -0
- package/Libraries/Modal/Modal.js +9 -1
- package/Libraries/NativeComponent/BaseViewConfig.android.js +7 -2
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +11 -2
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +1 -1
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -1
- package/Libraries/ReactNative/AppRegistry.js +2 -6
- package/Libraries/ReactNative/getNativeComponentAttributes.js +4 -0
- package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +5 -6
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +102 -5
- package/Libraries/StyleSheet/StyleSheetTypes.js +9 -5
- package/Libraries/StyleSheet/processBoxShadow.js +5 -7
- package/Libraries/StyleSheet/processFilter.js +4 -4
- package/Libraries/Text/TextNativeComponent.js +0 -1
- package/Libraries/Utilities/HMRClient.js +5 -5
- package/overrides.json +6 -6
- package/package.json +18 -16
- package/src/private/animated/NativeAnimatedHelper.js +12 -8
- package/src/private/animated/NativeAnimatedHelper.win32.js +12 -8
- package/src/private/animated/useAnimatedPropsMemo.js +349 -0
- package/src/private/components/HScrollViewNativeComponents.js +9 -8
- package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +13 -9
- package/src/private/components/VScrollViewNativeComponents.js +9 -8
- package/src/private/featureflags/ReactNativeFeatureFlags.js +50 -22
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +8 -2
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +7 -4
- package/src/private/webapis/dom/geometry/DOMRect.js +2 -2
- package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +2 -2
- package/types/experimental.d.ts +0 -105
- package/types/modules/Codegen.d.ts +6 -0
|
@@ -20,28 +20,29 @@ import View from '../../../Libraries/Components/View/View';
|
|
|
20
20
|
import Platform from '../../../Libraries/Utilities/Platform';
|
|
21
21
|
import useSyncOnScroll from './useSyncOnScroll';
|
|
22
22
|
import * as React from 'react';
|
|
23
|
+
import {forwardRef} from 'react';
|
|
23
24
|
|
|
25
|
+
// TODO: After upgrading to React 19, remove `forwardRef` from this component.
|
|
24
26
|
export const VScrollViewNativeComponent: React.AbstractComponent<
|
|
25
27
|
ScrollViewNativeProps,
|
|
26
28
|
TScrollViewNativeImperativeHandle,
|
|
27
29
|
// $FlowExpectedError[incompatible-type] - Flow cannot model imperative handles, yet.
|
|
28
|
-
> = function VScrollViewNativeComponent(
|
|
29
|
-
|
|
30
|
-
ref
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
const [ref, enableSyncOnScroll] = useSyncOnScroll(props.ref);
|
|
30
|
+
> = forwardRef(function VScrollViewNativeComponent(
|
|
31
|
+
props: ScrollViewNativeProps,
|
|
32
|
+
ref: ?React.RefSetter<TScrollViewNativeImperativeHandle | null>,
|
|
33
|
+
): React.Node {
|
|
34
|
+
const [componentRef, enableSyncOnScroll] = useSyncOnScroll(ref);
|
|
34
35
|
// NOTE: When `useSyncOnScroll` triggers an update, `props` will not have
|
|
35
36
|
// changed. Notably, `props.children` will be the same, allowing React to
|
|
36
37
|
// bail out during reconciliation.
|
|
37
38
|
return (
|
|
38
39
|
<ScrollViewNativeComponent
|
|
39
40
|
{...props}
|
|
40
|
-
ref={
|
|
41
|
+
ref={componentRef}
|
|
41
42
|
enableSyncOnScroll={enableSyncOnScroll}
|
|
42
43
|
/>
|
|
43
44
|
);
|
|
44
|
-
};
|
|
45
|
+
});
|
|
45
46
|
|
|
46
47
|
export const VScrollContentViewNativeComponent: HostComponent<ViewProps> =
|
|
47
48
|
Platform.OS === 'android' ? View : ScrollContentViewNativeComponent;
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
8
|
-
* @flow strict
|
|
7
|
+
* @generated SignedSource<<79bdedd5a09ba284cdaa2e4f40ffd2fd>>
|
|
8
|
+
* @flow strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -20,6 +20,7 @@
|
|
|
20
20
|
|
|
21
21
|
import {
|
|
22
22
|
type Getter,
|
|
23
|
+
type OverridesFor,
|
|
23
24
|
createJavaScriptFlagGetter,
|
|
24
25
|
createNativeFlagGetter,
|
|
25
26
|
setOverrides,
|
|
@@ -30,18 +31,20 @@ export type ReactNativeFeatureFlagsJsOnly = {
|
|
|
30
31
|
animatedShouldDebounceQueueFlush: Getter<boolean>,
|
|
31
32
|
animatedShouldUseSingleOp: Getter<boolean>,
|
|
32
33
|
enableAccessToHostTreeInFabric: Getter<boolean>,
|
|
34
|
+
enableAnimatedAllowlist: Getter<boolean>,
|
|
35
|
+
enableAnimatedClearImmediateFix: Getter<boolean>,
|
|
36
|
+
enableAnimatedPropsMemo: Getter<boolean>,
|
|
33
37
|
enableOptimisedVirtualizedCells: Getter<boolean>,
|
|
34
38
|
isLayoutAnimationEnabled: Getter<boolean>,
|
|
35
|
-
shouldSkipStateUpdatesForLoopingAnimations: Getter<boolean>,
|
|
36
39
|
shouldUseAnimatedObjectForTransform: Getter<boolean>,
|
|
37
40
|
shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean>,
|
|
38
41
|
shouldUseSetNativePropsInFabric: Getter<boolean>,
|
|
39
42
|
shouldUseSetNativePropsInNativeAnimationsInFabric: Getter<boolean>,
|
|
40
|
-
|
|
43
|
+
useInsertionEffectsForAnimations: Getter<boolean>,
|
|
41
44
|
useRefsForTextInputState: Getter<boolean>,
|
|
42
45
|
};
|
|
43
46
|
|
|
44
|
-
export type ReactNativeFeatureFlagsJsOnlyOverrides =
|
|
47
|
+
export type ReactNativeFeatureFlagsJsOnlyOverrides = OverridesFor<ReactNativeFeatureFlagsJsOnly>;
|
|
45
48
|
|
|
46
49
|
export type ReactNativeFeatureFlags = {
|
|
47
50
|
...ReactNativeFeatureFlagsJsOnly,
|
|
@@ -51,9 +54,11 @@ export type ReactNativeFeatureFlags = {
|
|
|
51
54
|
completeReactInstanceCreationOnBgThreadOnAndroid: Getter<boolean>,
|
|
52
55
|
destroyFabricSurfacesInReactInstanceManager: Getter<boolean>,
|
|
53
56
|
enableAlignItemsBaselineOnFabricIOS: Getter<boolean>,
|
|
57
|
+
enableAndroidLineHeightCentering: Getter<boolean>,
|
|
54
58
|
enableAndroidMixBlendModeProp: Getter<boolean>,
|
|
55
59
|
enableBackgroundStyleApplicator: Getter<boolean>,
|
|
56
60
|
enableCleanTextInputYogaNode: Getter<boolean>,
|
|
61
|
+
enableDeletionOfUnmountedViews: Getter<boolean>,
|
|
57
62
|
enableEagerRootViewAttachment: Getter<boolean>,
|
|
58
63
|
enableEventEmitterRetentionDuringGesturesOnAndroid: Getter<boolean>,
|
|
59
64
|
enableFabricLogs: Getter<boolean>,
|
|
@@ -63,16 +68,16 @@ export type ReactNativeFeatureFlags = {
|
|
|
63
68
|
enableLayoutAnimationsOnIOS: Getter<boolean>,
|
|
64
69
|
enableLongTaskAPI: Getter<boolean>,
|
|
65
70
|
enableMicrotasks: Getter<boolean>,
|
|
71
|
+
enablePreciseSchedulingForPremountItemsOnAndroid: Getter<boolean>,
|
|
66
72
|
enablePropsUpdateReconciliationAndroid: Getter<boolean>,
|
|
67
73
|
enableReportEventPaintTime: Getter<boolean>,
|
|
68
74
|
enableSynchronousStateUpdates: Getter<boolean>,
|
|
75
|
+
enableTextPreallocationOptimisation: Getter<boolean>,
|
|
69
76
|
enableUIConsistency: Getter<boolean>,
|
|
70
77
|
enableViewRecycling: Getter<boolean>,
|
|
71
78
|
excludeYogaFromRawProps: Getter<boolean>,
|
|
72
79
|
fetchImagesInViewPreallocation: Getter<boolean>,
|
|
73
|
-
fixIncorrectScrollViewStateUpdateOnAndroid: Getter<boolean>,
|
|
74
80
|
fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
|
|
75
|
-
fixMissedFabricStateUpdatesOnAndroid: Getter<boolean>,
|
|
76
81
|
fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean>,
|
|
77
82
|
forceBatchingMountItemsOnAndroid: Getter<boolean>,
|
|
78
83
|
fuseboxEnabledDebug: Getter<boolean>,
|
|
@@ -80,6 +85,7 @@ export type ReactNativeFeatureFlags = {
|
|
|
80
85
|
initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean>,
|
|
81
86
|
lazyAnimationCallbacks: Getter<boolean>,
|
|
82
87
|
loadVectorDrawablesOnImages: Getter<boolean>,
|
|
88
|
+
removeNestedCallsToDispatchMountItemsOnAndroid: Getter<boolean>,
|
|
83
89
|
setAndroidLayoutDirection: Getter<boolean>,
|
|
84
90
|
traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
|
|
85
91
|
useFabricInterop: Getter<boolean>,
|
|
@@ -115,6 +121,21 @@ export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGe
|
|
|
115
121
|
*/
|
|
116
122
|
export const enableAccessToHostTreeInFabric: Getter<boolean> = createJavaScriptFlagGetter('enableAccessToHostTreeInFabric', false);
|
|
117
123
|
|
|
124
|
+
/**
|
|
125
|
+
* Enables Animated to skip non-allowlisted props and styles.
|
|
126
|
+
*/
|
|
127
|
+
export const enableAnimatedAllowlist: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedAllowlist', false);
|
|
128
|
+
|
|
129
|
+
/**
|
|
130
|
+
* Enables an experimental to use the proper clearIntermediate instead of calling the wrong clearTimeout and canceling another timer.
|
|
131
|
+
*/
|
|
132
|
+
export const enableAnimatedClearImmediateFix: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedClearImmediateFix', true);
|
|
133
|
+
|
|
134
|
+
/**
|
|
135
|
+
* Enables Animated to analyze props to minimize invalidating `AnimatedProps`.
|
|
136
|
+
*/
|
|
137
|
+
export const enableAnimatedPropsMemo: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedPropsMemo', false);
|
|
138
|
+
|
|
118
139
|
/**
|
|
119
140
|
* Removing unnecessary rerenders Virtualized cells after any rerenders of Virualized list. Works with strict=true option
|
|
120
141
|
*/
|
|
@@ -125,11 +146,6 @@ export const enableOptimisedVirtualizedCells: Getter<boolean> = createJavaScript
|
|
|
125
146
|
*/
|
|
126
147
|
export const isLayoutAnimationEnabled: Getter<boolean> = createJavaScriptFlagGetter('isLayoutAnimationEnabled', true);
|
|
127
148
|
|
|
128
|
-
/**
|
|
129
|
-
* If the animation is within Animated.loop, we do not send state updates to React.
|
|
130
|
-
*/
|
|
131
|
-
export const shouldSkipStateUpdatesForLoopingAnimations: Getter<boolean> = createJavaScriptFlagGetter('shouldSkipStateUpdatesForLoopingAnimations', false);
|
|
132
|
-
|
|
133
149
|
/**
|
|
134
150
|
* Enables use of AnimatedObject for animating transform values.
|
|
135
151
|
*/
|
|
@@ -151,9 +167,9 @@ export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScript
|
|
|
151
167
|
export const shouldUseSetNativePropsInNativeAnimationsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInNativeAnimationsInFabric', false);
|
|
152
168
|
|
|
153
169
|
/**
|
|
154
|
-
*
|
|
170
|
+
* Changes construction of the animation graph to `useInsertionEffect` instead of `useLayoutEffect`.
|
|
155
171
|
*/
|
|
156
|
-
export const
|
|
172
|
+
export const useInsertionEffectsForAnimations: Getter<boolean> = createJavaScriptFlagGetter('useInsertionEffectsForAnimations', false);
|
|
157
173
|
|
|
158
174
|
/**
|
|
159
175
|
* Enable a variant of TextInput that moves some state to refs to avoid unnecessary re-renders
|
|
@@ -184,6 +200,10 @@ export const destroyFabricSurfacesInReactInstanceManager: Getter<boolean> = crea
|
|
|
184
200
|
* Kill-switch to turn off support for aling-items:baseline on Fabric iOS.
|
|
185
201
|
*/
|
|
186
202
|
export const enableAlignItemsBaselineOnFabricIOS: Getter<boolean> = createNativeFlagGetter('enableAlignItemsBaselineOnFabricIOS', true);
|
|
203
|
+
/**
|
|
204
|
+
* When enabled, custom line height calculation will be centered from top to bottom.
|
|
205
|
+
*/
|
|
206
|
+
export const enableAndroidLineHeightCentering: Getter<boolean> = createNativeFlagGetter('enableAndroidLineHeightCentering', false);
|
|
187
207
|
/**
|
|
188
208
|
* Enables mix-blend-mode prop on Android.
|
|
189
209
|
*/
|
|
@@ -196,6 +216,10 @@ export const enableBackgroundStyleApplicator: Getter<boolean> = createNativeFlag
|
|
|
196
216
|
* Clean yoga node when <TextInput /> does not change.
|
|
197
217
|
*/
|
|
198
218
|
export const enableCleanTextInputYogaNode: Getter<boolean> = createNativeFlagGetter('enableCleanTextInputYogaNode', false);
|
|
219
|
+
/**
|
|
220
|
+
* Deletes views that were pre-allocated but never mounted on the screen.
|
|
221
|
+
*/
|
|
222
|
+
export const enableDeletionOfUnmountedViews: Getter<boolean> = createNativeFlagGetter('enableDeletionOfUnmountedViews', false);
|
|
199
223
|
/**
|
|
200
224
|
* Feature flag to configure eager attachment of the root view/initialisation of the JS code.
|
|
201
225
|
*/
|
|
@@ -232,6 +256,10 @@ export const enableLongTaskAPI: Getter<boolean> = createNativeFlagGetter('enable
|
|
|
232
256
|
* Enables the use of microtasks in Hermes (scheduling) and RuntimeScheduler (execution).
|
|
233
257
|
*/
|
|
234
258
|
export const enableMicrotasks: Getter<boolean> = createNativeFlagGetter('enableMicrotasks', false);
|
|
259
|
+
/**
|
|
260
|
+
* Moves execution of pre-mount items to outside the choregrapher in the main thread, so we can estimate idle time more precisely (Android only).
|
|
261
|
+
*/
|
|
262
|
+
export const enablePreciseSchedulingForPremountItemsOnAndroid: Getter<boolean> = createNativeFlagGetter('enablePreciseSchedulingForPremountItemsOnAndroid', false);
|
|
235
263
|
/**
|
|
236
264
|
* When enabled, Android will receive prop updates based on the differences between the last rendered shadow node and the last committed shadow node.
|
|
237
265
|
*/
|
|
@@ -244,6 +272,10 @@ export const enableReportEventPaintTime: Getter<boolean> = createNativeFlagGette
|
|
|
244
272
|
* Dispatches state updates synchronously in Fabric (e.g.: updates the scroll position in the shadow tree synchronously from the main thread).
|
|
245
273
|
*/
|
|
246
274
|
export const enableSynchronousStateUpdates: Getter<boolean> = createNativeFlagGetter('enableSynchronousStateUpdates', false);
|
|
275
|
+
/**
|
|
276
|
+
* Text preallocation optimisation where unnecessary work is removed.
|
|
277
|
+
*/
|
|
278
|
+
export const enableTextPreallocationOptimisation: Getter<boolean> = createNativeFlagGetter('enableTextPreallocationOptimisation', false);
|
|
247
279
|
/**
|
|
248
280
|
* Ensures that JavaScript always has a consistent view of the state of the UI (e.g.: commits done in other threads are not immediately propagated to JS during its execution).
|
|
249
281
|
*/
|
|
@@ -260,18 +292,10 @@ export const excludeYogaFromRawProps: Getter<boolean> = createNativeFlagGetter('
|
|
|
260
292
|
* Start image fetching during view preallocation instead of waiting for layout pass
|
|
261
293
|
*/
|
|
262
294
|
export const fetchImagesInViewPreallocation: Getter<boolean> = createNativeFlagGetter('fetchImagesInViewPreallocation', false);
|
|
263
|
-
/**
|
|
264
|
-
* When doing a smooth scroll animation, it stops setting the state with the final scroll position in Fabric before the animation starts.
|
|
265
|
-
*/
|
|
266
|
-
export const fixIncorrectScrollViewStateUpdateOnAndroid: Getter<boolean> = createNativeFlagGetter('fixIncorrectScrollViewStateUpdateOnAndroid', false);
|
|
267
295
|
/**
|
|
268
296
|
* Uses the default event priority instead of the discreet event priority by default when dispatching events from Fabric to React.
|
|
269
297
|
*/
|
|
270
298
|
export const fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean> = createNativeFlagGetter('fixMappingOfEventPrioritiesBetweenFabricAndReact', false);
|
|
271
|
-
/**
|
|
272
|
-
* Enables a fix to prevent the possibility of state updates in Fabric being missed due to race conditions with previous state updates.
|
|
273
|
-
*/
|
|
274
|
-
export const fixMissedFabricStateUpdatesOnAndroid: Getter<boolean> = createNativeFlagGetter('fixMissedFabricStateUpdatesOnAndroid', false);
|
|
275
299
|
/**
|
|
276
300
|
* Fixes a limitation on Android where the mounting coordinator would report there are no pending transactions but some of them were actually not processed due to the use of the push model.
|
|
277
301
|
*/
|
|
@@ -300,6 +324,10 @@ export const lazyAnimationCallbacks: Getter<boolean> = createNativeFlagGetter('l
|
|
|
300
324
|
* Adds support for loading vector drawable assets in the Image component (only on Android)
|
|
301
325
|
*/
|
|
302
326
|
export const loadVectorDrawablesOnImages: Getter<boolean> = createNativeFlagGetter('loadVectorDrawablesOnImages', false);
|
|
327
|
+
/**
|
|
328
|
+
* Removes nested calls to MountItemDispatcher.dispatchMountItems on Android, so we do less work per frame on the UI thread.
|
|
329
|
+
*/
|
|
330
|
+
export const removeNestedCallsToDispatchMountItemsOnAndroid: Getter<boolean> = createNativeFlagGetter('removeNestedCallsToDispatchMountItemsOnAndroid', false);
|
|
303
331
|
/**
|
|
304
332
|
* Propagate layout direction to Android views.
|
|
305
333
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @flow strict
|
|
7
|
+
* @flow strict
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -20,6 +20,12 @@ let overrides: ?ReactNativeFeatureFlagsJsOnlyOverrides;
|
|
|
20
20
|
|
|
21
21
|
export type Getter<T> = () => T;
|
|
22
22
|
|
|
23
|
+
// This defines the types for the overrides object, whose methods also receive
|
|
24
|
+
// the default value as a parameter.
|
|
25
|
+
export type OverridesFor<T> = Partial<{
|
|
26
|
+
[key in keyof T]: (ReturnType<T[key]>) => ReturnType<T[key]>,
|
|
27
|
+
}>;
|
|
28
|
+
|
|
23
29
|
function createGetter<T: boolean | number | string>(
|
|
24
30
|
configName: string,
|
|
25
31
|
customValueGetter: Getter<?T>,
|
|
@@ -45,7 +51,7 @@ export function createJavaScriptFlagGetter<
|
|
|
45
51
|
configName,
|
|
46
52
|
() => {
|
|
47
53
|
accessedFeatureFlags.add(configName);
|
|
48
|
-
return overrides?.[configName]?.();
|
|
54
|
+
return overrides?.[configName]?.(defaultValue);
|
|
49
55
|
},
|
|
50
56
|
defaultValue,
|
|
51
57
|
);
|
|
@@ -4,8 +4,8 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
8
|
-
* @flow strict
|
|
7
|
+
* @generated SignedSource<<ee3f60941427d4efa2f5b03bf0b78514>>
|
|
8
|
+
* @flow strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
/**
|
|
@@ -29,9 +29,11 @@ export interface Spec extends TurboModule {
|
|
|
29
29
|
+completeReactInstanceCreationOnBgThreadOnAndroid?: () => boolean;
|
|
30
30
|
+destroyFabricSurfacesInReactInstanceManager?: () => boolean;
|
|
31
31
|
+enableAlignItemsBaselineOnFabricIOS?: () => boolean;
|
|
32
|
+
+enableAndroidLineHeightCentering?: () => boolean;
|
|
32
33
|
+enableAndroidMixBlendModeProp?: () => boolean;
|
|
33
34
|
+enableBackgroundStyleApplicator?: () => boolean;
|
|
34
35
|
+enableCleanTextInputYogaNode?: () => boolean;
|
|
36
|
+
+enableDeletionOfUnmountedViews?: () => boolean;
|
|
35
37
|
+enableEagerRootViewAttachment?: () => boolean;
|
|
36
38
|
+enableEventEmitterRetentionDuringGesturesOnAndroid?: () => boolean;
|
|
37
39
|
+enableFabricLogs?: () => boolean;
|
|
@@ -41,16 +43,16 @@ export interface Spec extends TurboModule {
|
|
|
41
43
|
+enableLayoutAnimationsOnIOS?: () => boolean;
|
|
42
44
|
+enableLongTaskAPI?: () => boolean;
|
|
43
45
|
+enableMicrotasks?: () => boolean;
|
|
46
|
+
+enablePreciseSchedulingForPremountItemsOnAndroid?: () => boolean;
|
|
44
47
|
+enablePropsUpdateReconciliationAndroid?: () => boolean;
|
|
45
48
|
+enableReportEventPaintTime?: () => boolean;
|
|
46
49
|
+enableSynchronousStateUpdates?: () => boolean;
|
|
50
|
+
+enableTextPreallocationOptimisation?: () => boolean;
|
|
47
51
|
+enableUIConsistency?: () => boolean;
|
|
48
52
|
+enableViewRecycling?: () => boolean;
|
|
49
53
|
+excludeYogaFromRawProps?: () => boolean;
|
|
50
54
|
+fetchImagesInViewPreallocation?: () => boolean;
|
|
51
|
-
+fixIncorrectScrollViewStateUpdateOnAndroid?: () => boolean;
|
|
52
55
|
+fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
|
|
53
|
-
+fixMissedFabricStateUpdatesOnAndroid?: () => boolean;
|
|
54
56
|
+fixMountingCoordinatorReportedPendingTransactionsOnAndroid?: () => boolean;
|
|
55
57
|
+forceBatchingMountItemsOnAndroid?: () => boolean;
|
|
56
58
|
+fuseboxEnabledDebug?: () => boolean;
|
|
@@ -58,6 +60,7 @@ export interface Spec extends TurboModule {
|
|
|
58
60
|
+initEagerTurboModulesOnNativeModulesQueueAndroid?: () => boolean;
|
|
59
61
|
+lazyAnimationCallbacks?: () => boolean;
|
|
60
62
|
+loadVectorDrawablesOnImages?: () => boolean;
|
|
63
|
+
+removeNestedCallsToDispatchMountItemsOnAndroid?: () => boolean;
|
|
61
64
|
+setAndroidLayoutDirection?: () => boolean;
|
|
62
65
|
+traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
|
|
63
66
|
+useFabricInterop?: () => boolean;
|
|
@@ -14,7 +14,7 @@
|
|
|
14
14
|
* licensed under [CC-BY-SA 2.5](https://creativecommons.org/licenses/by-sa/2.5/).
|
|
15
15
|
*/
|
|
16
16
|
|
|
17
|
-
import DOMRectReadOnly, {type
|
|
17
|
+
import DOMRectReadOnly, {type DOMRectInit} from './DOMRectReadOnly';
|
|
18
18
|
|
|
19
19
|
// flowlint unsafe-getters-setters:off
|
|
20
20
|
|
|
@@ -72,7 +72,7 @@ export default class DOMRect extends DOMRectReadOnly {
|
|
|
72
72
|
/**
|
|
73
73
|
* Creates a new `DOMRect` object with a given location and dimensions.
|
|
74
74
|
*/
|
|
75
|
-
static fromRect(rect?: ?
|
|
75
|
+
static fromRect(rect?: ?DOMRectInit): DOMRect {
|
|
76
76
|
if (!rect) {
|
|
77
77
|
return new DOMRect();
|
|
78
78
|
}
|
|
@@ -16,7 +16,7 @@
|
|
|
16
16
|
|
|
17
17
|
// flowlint sketchy-null:off, unsafe-getters-setters:off
|
|
18
18
|
|
|
19
|
-
export interface
|
|
19
|
+
export interface DOMRectInit {
|
|
20
20
|
x?: ?number;
|
|
21
21
|
y?: ?number;
|
|
22
22
|
width?: ?number;
|
|
@@ -146,7 +146,7 @@ export default class DOMRectReadOnly {
|
|
|
146
146
|
/**
|
|
147
147
|
* Creates a new `DOMRectReadOnly` object with a given location and dimensions.
|
|
148
148
|
*/
|
|
149
|
-
static fromRect(rect?: ?
|
|
149
|
+
static fromRect(rect?: ?DOMRectInit): DOMRectReadOnly {
|
|
150
150
|
if (!rect) {
|
|
151
151
|
return new DOMRectReadOnly();
|
|
152
152
|
}
|
package/types/experimental.d.ts
CHANGED
|
@@ -35,111 +35,11 @@
|
|
|
35
35
|
import {
|
|
36
36
|
GradientValue,
|
|
37
37
|
BlendMode,
|
|
38
|
-
BoxShadowPrimitive,
|
|
39
|
-
DimensionValue,
|
|
40
|
-
FilterFunction,
|
|
41
38
|
} from 'react-native/Libraries/StyleSheet/StyleSheetTypes';
|
|
42
39
|
|
|
43
40
|
export {};
|
|
44
41
|
|
|
45
42
|
declare module '.' {
|
|
46
|
-
export interface FlexStyle {
|
|
47
|
-
/**
|
|
48
|
-
* Equivalent to `top`, `bottom`, `right` and `left`
|
|
49
|
-
*/
|
|
50
|
-
inset?: DimensionValue | undefined;
|
|
51
|
-
|
|
52
|
-
/**
|
|
53
|
-
* Equivalent to `top`, `bottom`
|
|
54
|
-
*/
|
|
55
|
-
insetBlock?: DimensionValue | undefined;
|
|
56
|
-
|
|
57
|
-
/**
|
|
58
|
-
* Equivalent to `bottom`
|
|
59
|
-
*/
|
|
60
|
-
insetBlockEnd?: DimensionValue | undefined;
|
|
61
|
-
|
|
62
|
-
/**
|
|
63
|
-
* Equivalent to `top`
|
|
64
|
-
*/
|
|
65
|
-
insetBlockStart?: DimensionValue | undefined;
|
|
66
|
-
|
|
67
|
-
/**
|
|
68
|
-
* Equivalent to `right` and `left`
|
|
69
|
-
*/
|
|
70
|
-
insetInline?: DimensionValue | undefined;
|
|
71
|
-
|
|
72
|
-
/**
|
|
73
|
-
* Equivalent to `right` or `left`
|
|
74
|
-
*/
|
|
75
|
-
insetInlineEnd?: DimensionValue | undefined;
|
|
76
|
-
|
|
77
|
-
/**
|
|
78
|
-
* Equivalent to `right` or `left`
|
|
79
|
-
*/
|
|
80
|
-
insetInlineStart?: DimensionValue | undefined;
|
|
81
|
-
|
|
82
|
-
/**
|
|
83
|
-
* Equivalent to `marginVertical`
|
|
84
|
-
*/
|
|
85
|
-
marginBlock?: DimensionValue | undefined;
|
|
86
|
-
|
|
87
|
-
/**
|
|
88
|
-
* Equivalent to `marginBottom`
|
|
89
|
-
*/
|
|
90
|
-
marginBlockEnd?: DimensionValue | undefined;
|
|
91
|
-
|
|
92
|
-
/**
|
|
93
|
-
* Equivalent to `marginTop`
|
|
94
|
-
*/
|
|
95
|
-
marginBlockStart?: DimensionValue | undefined;
|
|
96
|
-
|
|
97
|
-
/**
|
|
98
|
-
* Equivalent to `marginHorizontal`
|
|
99
|
-
*/
|
|
100
|
-
marginInline?: DimensionValue | undefined;
|
|
101
|
-
|
|
102
|
-
/**
|
|
103
|
-
* Equivalent to `marginEnd`
|
|
104
|
-
*/
|
|
105
|
-
marginInlineEnd?: DimensionValue | undefined;
|
|
106
|
-
|
|
107
|
-
/**
|
|
108
|
-
* Equivalent to `marginStart`
|
|
109
|
-
*/
|
|
110
|
-
marginInlineStart?: DimensionValue | undefined;
|
|
111
|
-
|
|
112
|
-
/**
|
|
113
|
-
* Equivalent to `paddingVertical`
|
|
114
|
-
*/
|
|
115
|
-
paddingBlock?: DimensionValue | undefined;
|
|
116
|
-
|
|
117
|
-
/**
|
|
118
|
-
* Equivalent to `paddingBottom`
|
|
119
|
-
*/
|
|
120
|
-
paddingBlockEnd?: DimensionValue | undefined;
|
|
121
|
-
|
|
122
|
-
/**
|
|
123
|
-
* Equivalent to `paddingTop`
|
|
124
|
-
*/
|
|
125
|
-
paddingBlockStart?: DimensionValue | undefined;
|
|
126
|
-
|
|
127
|
-
/**
|
|
128
|
-
* Equivalent to `paddingHorizontal`
|
|
129
|
-
*/
|
|
130
|
-
paddingInline?: DimensionValue | undefined;
|
|
131
|
-
|
|
132
|
-
/**
|
|
133
|
-
* Equivalent to `paddingEnd`
|
|
134
|
-
*/
|
|
135
|
-
paddingInlineEnd?: DimensionValue | undefined;
|
|
136
|
-
|
|
137
|
-
/**
|
|
138
|
-
* Equivalent to `paddingStart`
|
|
139
|
-
*/
|
|
140
|
-
paddingInlineStart?: DimensionValue | undefined;
|
|
141
|
-
}
|
|
142
|
-
|
|
143
43
|
export interface ViewProps {
|
|
144
44
|
/**
|
|
145
45
|
* Contols whether this view, and its transitive children, are laid in a way
|
|
@@ -150,11 +50,6 @@ declare module '.' {
|
|
|
150
50
|
}
|
|
151
51
|
|
|
152
52
|
export interface ViewStyle {
|
|
153
|
-
experimental_boxShadow?:
|
|
154
|
-
| ReadonlyArray<BoxShadowPrimitive>
|
|
155
|
-
| string
|
|
156
|
-
| undefined;
|
|
157
|
-
experimental_filter?: ReadonlyArray<FilterFunction> | string | undefined;
|
|
158
53
|
experimental_mixBlendMode?: BlendMode | undefined;
|
|
159
54
|
experimental_backgroundImage?:
|
|
160
55
|
| ReadonlyArray<GradientValue>
|
|
@@ -41,6 +41,7 @@ declare module 'react-native/Libraries/Utilities/codegenNativeComponent' {
|
|
|
41
41
|
|
|
42
42
|
declare module 'react-native/Libraries/Types/CodegenTypes' {
|
|
43
43
|
import type {NativeSyntheticEvent} from 'react-native';
|
|
44
|
+
import type {EventSubscription} from 'react-native/Libraries/vendor/emitter/EventEmitter';
|
|
44
45
|
|
|
45
46
|
// Event types
|
|
46
47
|
// We're not using the PaperName, it is only used to codegen view config settings
|
|
@@ -59,6 +60,7 @@ declare module 'react-native/Libraries/Types/CodegenTypes' {
|
|
|
59
60
|
export type Float = number;
|
|
60
61
|
export type Int32 = number;
|
|
61
62
|
export type UnsafeObject = object;
|
|
63
|
+
export type UnsafeMixed = unknown;
|
|
62
64
|
|
|
63
65
|
type DefaultTypes = number | boolean | string | ReadonlyArray<string>;
|
|
64
66
|
// Default handling, ignore the unused value
|
|
@@ -71,4 +73,8 @@ declare module 'react-native/Libraries/Types/CodegenTypes' {
|
|
|
71
73
|
Type extends DefaultTypes,
|
|
72
74
|
Value extends Type | string | undefined | null,
|
|
73
75
|
> = Type | undefined | null;
|
|
76
|
+
|
|
77
|
+
export type EventEmitter<T> = (
|
|
78
|
+
handler: (arg: T) => void | Promise<void>,
|
|
79
|
+
) => EventSubscription;
|
|
74
80
|
}
|