@office-iss/react-native-win32 0.0.0-canary.287 → 0.0.0-canary.289
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 +6 -2
- package/CHANGELOG.json +63 -1
- package/CHANGELOG.md +24 -4
- package/Libraries/Alert/Alert.d.ts +4 -1
- package/Libraries/Alert/Alert.js +3 -0
- package/Libraries/{Modal/ModalInjection.js → Alert/RCTAlertManager.js.flow} +7 -4
- package/Libraries/Animated/Animated.js +8 -37
- package/Libraries/Animated/Animated.js.flow +15 -0
- package/Libraries/Animated/AnimatedExports.js +47 -0
- package/Libraries/Animated/AnimatedExports.js.flow +48 -0
- package/Libraries/Animated/Easing.js +13 -15
- package/Libraries/Animated/createAnimatedComponent.js +24 -12
- package/Libraries/Animated/nodes/AnimatedNode.js +2 -1
- package/Libraries/Animated/nodes/AnimatedProps.js +18 -1
- package/Libraries/Animated/nodes/AnimatedValue.js +6 -2
- package/Libraries/Animated/useAnimatedValue.js +1 -3
- package/Libraries/Blob/URL.js +23 -10
- package/Libraries/Blob/URLSearchParams.js.flow +23 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +1 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +1 -1
- package/Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent.js.flow +20 -0
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +8 -8
- package/Libraries/Components/Button.js +2 -2
- package/Libraries/Components/Button.win32.js +2 -2
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +14 -100
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +64 -4
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +138 -0
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +7 -4
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +6 -4
- package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +1 -1
- package/Libraries/Components/Pressable/Pressable.js +18 -63
- package/Libraries/Components/Pressable/Pressable.win32.js +19 -65
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +2 -2
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +4 -46
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +10 -4
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +54 -0
- package/Libraries/Components/RefreshControl/RefreshControl.js +10 -7
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +2 -1
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +1 -1
- package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +1 -1
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +2 -4
- package/Libraries/Components/ScrollView/ScrollContentViewNativeComponent.js +2 -4
- package/Libraries/Components/ScrollView/ScrollView.js +43 -59
- package/Libraries/Components/ScrollView/ScrollViewCommands.js +1 -1
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +2 -4
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +6 -7
- package/Libraries/Components/StatusBar/StatusBar.js +33 -22
- package/Libraries/Components/Switch/Switch.js +70 -41
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +2 -4
- package/Libraries/Components/TextInput/RCTMultilineTextInputNativeComponent.js +2 -4
- package/Libraries/Components/TextInput/RCTSingelineTextInputNativeComponent.js +2 -4
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/Tests/TextInputTest.d.ts +2 -1
- package/Libraries/Components/TextInput/Tests/TextInputTest.js.map +1 -1
- package/Libraries/Components/TextInput/TextInput.d.ts +6 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +45 -14
- package/Libraries/Components/TextInput/TextInput.js +121 -136
- package/Libraries/Components/TextInput/TextInput.win32.js +122 -137
- package/Libraries/Components/TextInput/TextInputState.js +2 -18
- package/Libraries/Components/TextInput/TextInputState.win32.js +2 -18
- package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +1 -1
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.d.ts +2 -1
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
- package/Libraries/Components/Touchable/Touchable.js +7 -7
- package/Libraries/Components/Touchable/Touchable.win32.js +7 -7
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
- package/Libraries/Components/Touchable/TouchableHighlight.js +35 -14
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +95 -47
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +248 -43
- package/Libraries/Components/Touchable/TouchableOpacity.js +52 -10
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +112 -59
- package/Libraries/Components/View/View.js +1 -1
- package/Libraries/Components/View/View.win32.js +1 -1
- package/Libraries/Components/View/ViewNativeComponent.js +2 -4
- package/Libraries/Components/View/ViewPropTypes.js +15 -12
- package/Libraries/Components/View/ViewPropTypes.win32.js +74 -71
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/setUpReactDevTools.js +2 -0
- package/Libraries/Debugging/DebuggingOverlayRegistry.js +10 -7
- package/Libraries/Image/Image.android.js +1 -1
- package/Libraries/Image/Image.js.flow +27 -0
- package/Libraries/Image/ImageBackground.js +1 -1
- package/Libraries/Image/ImageProps.js +97 -30
- package/Libraries/Image/ImageTypes.flow.js +16 -6
- package/Libraries/Image/ImageViewNativeComponent.js +3 -5
- package/Libraries/Image/Tests/ImageWin32Test.d.ts +2 -1
- package/Libraries/Image/Tests/ImageWin32Test.js.map +1 -1
- package/Libraries/Image/TextInlineImageNativeComponent.js +2 -4
- package/Libraries/Interaction/InteractionManager.js +9 -1
- package/Libraries/Interaction/PanResponder.js +11 -11
- package/Libraries/Interaction/TaskQueue.js +3 -2
- package/Libraries/Lists/FlatList.js +8 -7
- package/Libraries/LogBox/LogBox.js +1 -1
- package/Libraries/Modal/Modal.js +30 -4
- package/Libraries/NativeComponent/BaseViewConfig.js.flow +14 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +1 -1
- package/Libraries/Network/RCTNetworking.js.flow +44 -0
- package/Libraries/Network/XMLHttpRequest_new.js +3 -0
- package/Libraries/Network/XMLHttpRequest_old.js +3 -0
- package/Libraries/Pressability/HoverState.js +1 -0
- package/Libraries/Pressability/HoverState.win32.js +1 -0
- package/Libraries/Pressability/Pressability.js +2 -2
- package/Libraries/Pressability/Pressability.win32.js +3 -3
- package/Libraries/ReactNative/AppRegistry.flow.js +49 -0
- package/Libraries/ReactNative/AppRegistry.js +2 -322
- package/Libraries/ReactNative/AppRegistry.js.flow +23 -0
- package/Libraries/ReactNative/AppRegistryImpl.js +316 -0
- package/Libraries/ReactNative/FabricUIManager.js +5 -3
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +7 -5
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +1 -4
- package/Libraries/ReactNative/RendererImplementation.js +3 -5
- package/Libraries/ReactNative/requireNativeComponent.js +1 -1
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +12 -0
- package/Libraries/Renderer/shims/ReactNativeTypes.js +39 -91
- package/Libraries/StyleSheet/PlatformColorValueTypes.js.flow +22 -0
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.js +6 -0
- package/Libraries/StyleSheet/StyleSheet.js +5 -197
- package/Libraries/StyleSheet/StyleSheet.js.flow +166 -0
- package/Libraries/StyleSheet/{StyleSheet.win32.js → StyleSheetExports.js} +2 -151
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +110 -0
- package/Libraries/StyleSheet/StyleSheetTypes.js +42 -18
- package/Libraries/Text/Text.d.ts +1 -1
- package/Libraries/Text/Text.js +3 -1
- package/Libraries/Text/Text.win32.js +3 -1
- package/Libraries/Text/TextNativeComponent.js +1 -1
- package/Libraries/Text/TextNativeComponent.win32.js +1 -1
- package/Libraries/Text/TextProps.js +124 -84
- package/Libraries/Text/TextProps.win32.js +124 -84
- package/Libraries/Types/CodegenTypesNamespace.d.ts +45 -0
- package/Libraries/Types/CodegenTypesNamespace.js +14 -0
- package/Libraries/Types/CoreEventTypes.js +1 -1
- package/Libraries/Types/CoreEventTypes.win32.js +1 -1
- package/Libraries/Types/ReactDevToolsTypes.js +4 -8
- package/Libraries/Utilities/BackHandler.js.flow +25 -0
- package/Libraries/Utilities/DevSettings.js +14 -0
- package/Libraries/Utilities/Dimensions.js +5 -0
- package/Libraries/Utilities/Dimensions.win32.js +5 -0
- package/{flow/Position.js → Libraries/Utilities/Platform.js.flow} +3 -6
- package/Libraries/Utilities/PlatformTypes.js +97 -7
- package/Libraries/Utilities/codegenNativeCommands.d.ts +18 -0
- package/Libraries/Utilities/codegenNativeComponent.d.ts +26 -0
- package/Libraries/Utilities/codegenNativeComponent.js +1 -1
- package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +2 -4
- package/Libraries/vendor/emitter/EventEmitter.js +6 -2
- package/flow/global.js +1 -0
- package/flow/jest.js +4 -2
- package/index.js +47 -43
- package/index.win32.js +63 -59
- package/overrides.json +27 -35
- package/package.json +18 -18
- package/src/private/animated/NativeAnimatedHelper.js +18 -7
- package/src/private/animated/NativeAnimatedHelper.win32.js +18 -7
- package/src/private/animated/createAnimatedPropsHook.js +34 -15
- package/src/private/components/HScrollViewNativeComponents.js +1 -1
- package/src/private/components/VScrollViewNativeComponents.js +1 -1
- package/src/private/featureflags/ReactNativeFeatureFlags.js +24 -36
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +9 -1
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +4 -4
- package/src/private/inspector/getInspectorDataForViewAtPoint.js +2 -4
- package/src/private/setup/setUpDOM.js +36 -1
- package/src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/ProgressBarAndroidNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/PullToRefreshViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/RCTInputAccessoryViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/RCTModalHostViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent.js +1 -1
- package/src/private/types/HostComponent.js +16 -0
- package/src/private/types/HostInstance.js +50 -0
- package/src/private/webapis/dom/nodes/ReactNativeDocument.js +1 -0
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +40 -32
- package/src/private/webapis/dom/nodes/ReadOnlyCharacterData.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -19
- package/src/private/webapis/dom/nodes/internals/NodeInternals.js +6 -0
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +4 -4
- package/src/private/webapis/mutationobserver/MutationObserver.js +9 -9
- package/src/private/webapis/performance/PerformanceObserver.js +6 -6
- package/src/types/globals.d.ts +628 -0
- package/src/types/third_party/event-target-shim.d.ts +392 -0
- package/src-win/Libraries/Components/TextInput/Tests/TextInputTest.tsx +7 -7
- package/src-win/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +3 -3
- package/src-win/Libraries/Image/Tests/ImageWin32Test.tsx +1 -1
- package/src-win/Libraries/Text/Text.d.ts +1 -1
- package/types/index.d.ts +5 -52
- package/types/modules/globals.d.ts +0 -599
|
@@ -24,6 +24,7 @@ import {
|
|
|
24
24
|
useCallback,
|
|
25
25
|
useEffect,
|
|
26
26
|
useInsertionEffect,
|
|
27
|
+
useMemo,
|
|
27
28
|
useReducer,
|
|
28
29
|
useRef,
|
|
29
30
|
} from 'react';
|
|
@@ -51,6 +52,31 @@ export default function createAnimatedPropsHook(
|
|
|
51
52
|
): AnimatedPropsHook {
|
|
52
53
|
const useAnimatedPropsMemo = createAnimatedPropsMemoHook(allowlist);
|
|
53
54
|
|
|
55
|
+
const useNativePropsInFabric =
|
|
56
|
+
ReactNativeFeatureFlags.shouldUseSetNativePropsInFabric();
|
|
57
|
+
|
|
58
|
+
const useNativeAnimatedEvents: <TProps: {...}>(
|
|
59
|
+
node: AnimatedProps,
|
|
60
|
+
props: TProps,
|
|
61
|
+
) => $ReadOnlyArray<[string, AnimatedEvent]> =
|
|
62
|
+
ReactNativeFeatureFlags.avoidAnimatedRefInvalidation()
|
|
63
|
+
? function useNativeAnimatedEventsFromAnimatedProps(node, props) {
|
|
64
|
+
return useMemo(() => node.__getNativeAnimatedEventTuples(), [node]);
|
|
65
|
+
}
|
|
66
|
+
: function useNativeAnimatedEventsFromProps(node, props) {
|
|
67
|
+
return useMemo(() => {
|
|
68
|
+
const tuples = [];
|
|
69
|
+
for (const propName in props) {
|
|
70
|
+
// $FlowFixMe[invalid-computed-prop]
|
|
71
|
+
const propValue = props[propName];
|
|
72
|
+
if (propValue instanceof AnimatedEvent && propValue.__isNative) {
|
|
73
|
+
tuples.push([propName, propValue]);
|
|
74
|
+
}
|
|
75
|
+
}
|
|
76
|
+
return tuples;
|
|
77
|
+
}, [props]);
|
|
78
|
+
};
|
|
79
|
+
|
|
54
80
|
return function useAnimatedProps<TProps: {...}, TInstance>(
|
|
55
81
|
props: TProps,
|
|
56
82
|
): [ReducedProps<TProps>, CallbackRef<TInstance | null>] {
|
|
@@ -63,9 +89,6 @@ export default function createAnimatedPropsHook(
|
|
|
63
89
|
props,
|
|
64
90
|
);
|
|
65
91
|
|
|
66
|
-
const useNativePropsInFabric =
|
|
67
|
-
ReactNativeFeatureFlags.shouldUseSetNativePropsInFabric();
|
|
68
|
-
|
|
69
92
|
useEffect(() => {
|
|
70
93
|
// If multiple components call `flushQueue`, the first one will flush the
|
|
71
94
|
// queue and subsequent ones will do nothing.
|
|
@@ -95,6 +118,8 @@ export default function createAnimatedPropsHook(
|
|
|
95
118
|
|
|
96
119
|
useAnimatedPropsLifecycle(node);
|
|
97
120
|
|
|
121
|
+
const eventTuples = useNativeAnimatedEvents(node, props);
|
|
122
|
+
|
|
98
123
|
// TODO: This "effect" does three things:
|
|
99
124
|
//
|
|
100
125
|
// 1) Call `setNativeView`.
|
|
@@ -182,24 +207,18 @@ export default function createAnimatedPropsHook(
|
|
|
182
207
|
};
|
|
183
208
|
|
|
184
209
|
const target = getEventTarget(instance);
|
|
185
|
-
const events = [];
|
|
186
210
|
const animatedValueListeners: AnimatedValueListeners = [];
|
|
187
211
|
|
|
188
|
-
for (const propName
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
propValue.__attach(target, propName);
|
|
193
|
-
events.push([propName, propValue]);
|
|
194
|
-
// $FlowFixMe[incompatible-call] - the `addListenersToPropsValue` drills down the propValue.
|
|
195
|
-
addListenersToPropsValue(propValue, animatedValueListeners);
|
|
196
|
-
}
|
|
212
|
+
for (const [propName, propValue] of eventTuples) {
|
|
213
|
+
propValue.__attach(target, propName);
|
|
214
|
+
// $FlowFixMe[incompatible-call] - the `addListenersToPropsValue` drills down the propValue.
|
|
215
|
+
addListenersToPropsValue(propValue, animatedValueListeners);
|
|
197
216
|
}
|
|
198
217
|
|
|
199
218
|
return () => {
|
|
200
219
|
onUpdateRef.current = null;
|
|
201
220
|
|
|
202
|
-
for (const [propName, propValue] of
|
|
221
|
+
for (const [propName, propValue] of eventTuples) {
|
|
203
222
|
propValue.__detach(target, propName);
|
|
204
223
|
}
|
|
205
224
|
|
|
@@ -208,7 +227,7 @@ export default function createAnimatedPropsHook(
|
|
|
208
227
|
}
|
|
209
228
|
};
|
|
210
229
|
},
|
|
211
|
-
[
|
|
230
|
+
[eventTuples, node],
|
|
212
231
|
);
|
|
213
232
|
const callbackRef = useRefEffect<TInstance>(refEffect);
|
|
214
233
|
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import type {ScrollViewNativeProps} from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
|
|
13
13
|
import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
|
|
14
|
-
import type {HostComponent} from '
|
|
14
|
+
import type {HostComponent} from '../types/HostComponent';
|
|
15
15
|
|
|
16
16
|
import AndroidHorizontalScrollViewNativeComponent from '../../../Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent';
|
|
17
17
|
import ScrollContentViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollContentViewNativeComponent';
|
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
|
|
12
12
|
import type {ScrollViewNativeProps} from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponentType';
|
|
13
13
|
import type {ViewProps} from '../../../Libraries/Components/View/ViewPropTypes';
|
|
14
|
-
import type {HostComponent} from '
|
|
14
|
+
import type {HostComponent} from '../types/HostComponent';
|
|
15
15
|
|
|
16
16
|
import ScrollContentViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollContentViewNativeComponent';
|
|
17
17
|
import ScrollViewNativeComponent from '../../../Libraries/Components/ScrollView/ScrollViewNativeComponent';
|
|
@@ -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
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<e76d584cb67e2feae209795beb2009d6>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -30,18 +30,16 @@ export type ReactNativeFeatureFlagsJsOnly = $ReadOnly<{
|
|
|
30
30
|
jsOnlyTestFlag: Getter<boolean>,
|
|
31
31
|
animatedShouldDebounceQueueFlush: Getter<boolean>,
|
|
32
32
|
animatedShouldUseSingleOp: Getter<boolean>,
|
|
33
|
+
avoidAnimatedRefInvalidation: Getter<boolean>,
|
|
33
34
|
avoidStateUpdateInAnimatedPropsMemo: Getter<boolean>,
|
|
34
35
|
disableInteractionManager: Getter<boolean>,
|
|
35
36
|
enableAccessToHostTreeInFabric: Getter<boolean>,
|
|
36
|
-
enableAnimatedClearImmediateFix: Getter<boolean>,
|
|
37
|
-
enableDOMDocumentAPI: Getter<boolean>,
|
|
38
37
|
fixVirtualizeListCollapseWindowSize: Getter<boolean>,
|
|
39
38
|
isLayoutAnimationEnabled: Getter<boolean>,
|
|
40
39
|
scheduleAnimatedCleanupInMicrotask: Getter<boolean>,
|
|
41
40
|
shouldUseAnimatedObjectForTransform: Getter<boolean>,
|
|
42
41
|
shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean>,
|
|
43
42
|
shouldUseSetNativePropsInFabric: Getter<boolean>,
|
|
44
|
-
useRefsForTextInputState: Getter<boolean>,
|
|
45
43
|
}>;
|
|
46
44
|
|
|
47
45
|
export type ReactNativeFeatureFlagsJsOnlyOverrides = OverridesFor<ReactNativeFeatureFlagsJsOnly>;
|
|
@@ -50,12 +48,12 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
50
48
|
...ReactNativeFeatureFlagsJsOnly,
|
|
51
49
|
commonTestFlag: Getter<boolean>,
|
|
52
50
|
commonTestFlagWithoutNativeImplementation: Getter<boolean>,
|
|
51
|
+
animatedShouldSignalBatch: Getter<boolean>,
|
|
53
52
|
disableMountItemReorderingAndroid: Getter<boolean>,
|
|
54
53
|
enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean>,
|
|
55
54
|
enableBridgelessArchitecture: Getter<boolean>,
|
|
56
55
|
enableCppPropsIteratorSetter: Getter<boolean>,
|
|
57
56
|
enableEagerRootViewAttachment: Getter<boolean>,
|
|
58
|
-
enableEventEmitterRetentionDuringGesturesOnAndroid: Getter<boolean>,
|
|
59
57
|
enableFabricLogs: Getter<boolean>,
|
|
60
58
|
enableFabricRenderer: Getter<boolean>,
|
|
61
59
|
enableIOSViewClipToPaddingBox: Getter<boolean>,
|
|
@@ -66,7 +64,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
66
64
|
enableLongTaskAPI: Getter<boolean>,
|
|
67
65
|
enableNativeCSSParsing: Getter<boolean>,
|
|
68
66
|
enableNewBackgroundAndBorderDrawables: Getter<boolean>,
|
|
69
|
-
enablePreciseSchedulingForPremountItemsOnAndroid: Getter<boolean>,
|
|
70
67
|
enablePropsUpdateReconciliationAndroid: Getter<boolean>,
|
|
71
68
|
enableReportEventPaintTime: Getter<boolean>,
|
|
72
69
|
enableSynchronousStateUpdates: Getter<boolean>,
|
|
@@ -75,13 +72,14 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
75
72
|
enableViewRecycling: Getter<boolean>,
|
|
76
73
|
enableViewRecyclingForText: Getter<boolean>,
|
|
77
74
|
enableViewRecyclingForView: Getter<boolean>,
|
|
78
|
-
excludeYogaFromRawProps: Getter<boolean>,
|
|
79
75
|
fixDifferentiatorEmittingUpdatesWithWrongParentTag: Getter<boolean>,
|
|
80
76
|
fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
|
|
81
77
|
fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean>,
|
|
82
78
|
fuseboxEnabledRelease: Getter<boolean>,
|
|
83
79
|
fuseboxNetworkInspectionEnabled: Getter<boolean>,
|
|
84
80
|
lazyAnimationCallbacks: Getter<boolean>,
|
|
81
|
+
removeTurboModuleManagerDelegateMutex: Getter<boolean>,
|
|
82
|
+
throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS: Getter<boolean>,
|
|
85
83
|
traceTurboModulePromiseRejectionsOnAndroid: Getter<boolean>,
|
|
86
84
|
useAlwaysAvailableJSErrorHandling: Getter<boolean>,
|
|
87
85
|
useEditTextStockAndroidFocusBehavior: Getter<boolean>,
|
|
@@ -108,6 +106,11 @@ export const animatedShouldDebounceQueueFlush: Getter<boolean> = createJavaScrip
|
|
|
108
106
|
*/
|
|
109
107
|
export const animatedShouldUseSingleOp: Getter<boolean> = createJavaScriptFlagGetter('animatedShouldUseSingleOp', false);
|
|
110
108
|
|
|
109
|
+
/**
|
|
110
|
+
* Changes `useAnimatedProps` to avoid invalidating the callback ref whenever `props` changes.
|
|
111
|
+
*/
|
|
112
|
+
export const avoidAnimatedRefInvalidation: Getter<boolean> = createJavaScriptFlagGetter('avoidAnimatedRefInvalidation', false);
|
|
113
|
+
|
|
111
114
|
/**
|
|
112
115
|
* Changes `useAnimatedPropsMemo` to avoid state updates to invalidate the cached `AnimatedProps`.
|
|
113
116
|
*/
|
|
@@ -123,16 +126,6 @@ export const disableInteractionManager: Getter<boolean> = createJavaScriptFlagGe
|
|
|
123
126
|
*/
|
|
124
127
|
export const enableAccessToHostTreeInFabric: Getter<boolean> = createJavaScriptFlagGetter('enableAccessToHostTreeInFabric', false);
|
|
125
128
|
|
|
126
|
-
/**
|
|
127
|
-
* Enables an experimental to use the proper clearIntermediate instead of calling the wrong clearTimeout and canceling another timer.
|
|
128
|
-
*/
|
|
129
|
-
export const enableAnimatedClearImmediateFix: Getter<boolean> = createJavaScriptFlagGetter('enableAnimatedClearImmediateFix', true);
|
|
130
|
-
|
|
131
|
-
/**
|
|
132
|
-
* Enables the DOM Document API, exposing instaces of document through `getRootNode` and `ownerDocument`, and providing access to the `documentElement` representing the root node. This flag will be short-lived, only to test the Document API specifically, and then it will be collapsed into the enableAccessToHostTreeInFabric flag.
|
|
133
|
-
*/
|
|
134
|
-
export const enableDOMDocumentAPI: Getter<boolean> = createJavaScriptFlagGetter('enableDOMDocumentAPI', false);
|
|
135
|
-
|
|
136
129
|
/**
|
|
137
130
|
* Fixing an edge case where the current window size is not properly calculated with fast scrolling. Window size collapsed to 1 element even if windowSize more than the current amount of elements
|
|
138
131
|
*/
|
|
@@ -163,11 +156,6 @@ export const shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean> = cre
|
|
|
163
156
|
*/
|
|
164
157
|
export const shouldUseSetNativePropsInFabric: Getter<boolean> = createJavaScriptFlagGetter('shouldUseSetNativePropsInFabric', true);
|
|
165
158
|
|
|
166
|
-
/**
|
|
167
|
-
* Enable a variant of TextInput that moves some state to refs to avoid unnecessary re-renders
|
|
168
|
-
*/
|
|
169
|
-
export const useRefsForTextInputState: Getter<boolean> = createJavaScriptFlagGetter('useRefsForTextInputState', false);
|
|
170
|
-
|
|
171
159
|
/**
|
|
172
160
|
* Common flag for testing. Do NOT modify.
|
|
173
161
|
*/
|
|
@@ -176,6 +164,10 @@ export const commonTestFlag: Getter<boolean> = createNativeFlagGetter('commonTes
|
|
|
176
164
|
* Common flag for testing (without native implementation). Do NOT modify.
|
|
177
165
|
*/
|
|
178
166
|
export const commonTestFlagWithoutNativeImplementation: Getter<boolean> = createNativeFlagGetter('commonTestFlagWithoutNativeImplementation', false);
|
|
167
|
+
/**
|
|
168
|
+
* Enables start- and finishOperationBatch on any platform.
|
|
169
|
+
*/
|
|
170
|
+
export const animatedShouldSignalBatch: Getter<boolean> = createNativeFlagGetter('animatedShouldSignalBatch', false);
|
|
179
171
|
/**
|
|
180
172
|
* Prevent FabricMountingManager from reordering mountitems, which may lead to invalid state on the UI thread
|
|
181
173
|
*/
|
|
@@ -185,7 +177,7 @@ export const disableMountItemReorderingAndroid: Getter<boolean> = createNativeFl
|
|
|
185
177
|
*/
|
|
186
178
|
export const enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean> = createNativeFlagGetter('enableAccumulatedUpdatesInRawPropsAndroid', false);
|
|
187
179
|
/**
|
|
188
|
-
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer
|
|
180
|
+
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer`.
|
|
189
181
|
*/
|
|
190
182
|
export const enableBridgelessArchitecture: Getter<boolean> = createNativeFlagGetter('enableBridgelessArchitecture', false);
|
|
191
183
|
/**
|
|
@@ -196,10 +188,6 @@ export const enableCppPropsIteratorSetter: Getter<boolean> = createNativeFlagGet
|
|
|
196
188
|
* Feature flag to configure eager attachment of the root view/initialisation of the JS code.
|
|
197
189
|
*/
|
|
198
190
|
export const enableEagerRootViewAttachment: Getter<boolean> = createNativeFlagGetter('enableEagerRootViewAttachment', false);
|
|
199
|
-
/**
|
|
200
|
-
* Enables the retention of EventEmitterWrapper on Android till the touch gesture is over to fix a bug on pressable (#44610)
|
|
201
|
-
*/
|
|
202
|
-
export const enableEventEmitterRetentionDuringGesturesOnAndroid: Getter<boolean> = createNativeFlagGetter('enableEventEmitterRetentionDuringGesturesOnAndroid', false);
|
|
203
191
|
/**
|
|
204
192
|
* This feature flag enables logs for Fabric.
|
|
205
193
|
*/
|
|
@@ -240,10 +228,6 @@ export const enableNativeCSSParsing: Getter<boolean> = createNativeFlagGetter('e
|
|
|
240
228
|
* Use BackgroundDrawable and BorderDrawable instead of CSSBackgroundDrawable
|
|
241
229
|
*/
|
|
242
230
|
export const enableNewBackgroundAndBorderDrawables: Getter<boolean> = createNativeFlagGetter('enableNewBackgroundAndBorderDrawables', false);
|
|
243
|
-
/**
|
|
244
|
-
* Moves execution of pre-mount items to outside the choregrapher in the main thread, so we can estimate idle time more precisely (Android only).
|
|
245
|
-
*/
|
|
246
|
-
export const enablePreciseSchedulingForPremountItemsOnAndroid: Getter<boolean> = createNativeFlagGetter('enablePreciseSchedulingForPremountItemsOnAndroid', false);
|
|
247
231
|
/**
|
|
248
232
|
* When enabled, Android will receive prop updates based on the differences between the last rendered shadow node and the last committed shadow node.
|
|
249
233
|
*/
|
|
@@ -276,10 +260,6 @@ export const enableViewRecyclingForText: Getter<boolean> = createNativeFlagGette
|
|
|
276
260
|
* Enables View Recycling for <View> via ReactViewGroup/ReactViewManager.
|
|
277
261
|
*/
|
|
278
262
|
export const enableViewRecyclingForView: Getter<boolean> = createNativeFlagGetter('enableViewRecyclingForView', true);
|
|
279
|
-
/**
|
|
280
|
-
* When enabled, rawProps in Props will not include Yoga specific props.
|
|
281
|
-
*/
|
|
282
|
-
export const excludeYogaFromRawProps: Getter<boolean> = createNativeFlagGetter('excludeYogaFromRawProps', false);
|
|
283
263
|
/**
|
|
284
264
|
* Fixes a bug in Differentiator where parent views may be referenced before they're created
|
|
285
265
|
*/
|
|
@@ -297,13 +277,21 @@ export const fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<
|
|
|
297
277
|
*/
|
|
298
278
|
export const fuseboxEnabledRelease: Getter<boolean> = createNativeFlagGetter('fuseboxEnabledRelease', false);
|
|
299
279
|
/**
|
|
300
|
-
* Enable network inspection support in the React Native DevTools CDP backend. This flag is global and should not be changed across React Host lifetimes.
|
|
280
|
+
* Enable network inspection support in the React Native DevTools CDP backend. Requires `enableBridgelessArchitecture`. This flag is global and should not be changed across React Host lifetimes.
|
|
301
281
|
*/
|
|
302
282
|
export const fuseboxNetworkInspectionEnabled: Getter<boolean> = createNativeFlagGetter('fuseboxNetworkInspectionEnabled', false);
|
|
303
283
|
/**
|
|
304
284
|
* Only enqueue Choreographer calls if there is an ongoing animation, instead of enqueueing every frame.
|
|
305
285
|
*/
|
|
306
286
|
export const lazyAnimationCallbacks: Getter<boolean> = createNativeFlagGetter('lazyAnimationCallbacks', false);
|
|
287
|
+
/**
|
|
288
|
+
* When enabled, mutex _turboModuleManagerDelegateMutex in RCTTurboModuleManager will not be used
|
|
289
|
+
*/
|
|
290
|
+
export const removeTurboModuleManagerDelegateMutex: Getter<boolean> = createNativeFlagGetter('removeTurboModuleManagerDelegateMutex', false);
|
|
291
|
+
/**
|
|
292
|
+
* Throw an exception instead of deadlocking when a TurboModule that requires main queue setup is initialized during a synchronous render on iOS.
|
|
293
|
+
*/
|
|
294
|
+
export const throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS: Getter<boolean> = createNativeFlagGetter('throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS', false);
|
|
307
295
|
/**
|
|
308
296
|
* Enables storing js caller stack when creating promise in native module. This is useful in case of Promise rejection and tracing the cause.
|
|
309
297
|
*/
|
|
@@ -96,9 +96,17 @@ export function setOverrides(
|
|
|
96
96
|
}
|
|
97
97
|
|
|
98
98
|
const reportedConfigNames: Set<string> = new Set();
|
|
99
|
+
const hasTurboModules =
|
|
100
|
+
global.RN$Bridgeless === true || global.__turboModuleProxy != null;
|
|
99
101
|
|
|
100
102
|
function maybeLogUnavailableNativeModuleError(configName: string): void {
|
|
101
|
-
if (
|
|
103
|
+
if (
|
|
104
|
+
!NativeReactNativeFeatureFlags &&
|
|
105
|
+
// Don't log more than once per config
|
|
106
|
+
!reportedConfigNames.has(configName) &&
|
|
107
|
+
// Don't log in the legacy architecture.
|
|
108
|
+
hasTurboModules
|
|
109
|
+
) {
|
|
102
110
|
reportedConfigNames.add(configName);
|
|
103
111
|
console.error(
|
|
104
112
|
`Could not access feature flag '${configName}' because native module method was not available`,
|
|
@@ -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
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<22d8e7623a2eee5182c786f2ec914401>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -25,12 +25,12 @@ import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboMod
|
|
|
25
25
|
export interface Spec extends TurboModule {
|
|
26
26
|
+commonTestFlag?: () => boolean;
|
|
27
27
|
+commonTestFlagWithoutNativeImplementation?: () => boolean;
|
|
28
|
+
+animatedShouldSignalBatch?: () => boolean;
|
|
28
29
|
+disableMountItemReorderingAndroid?: () => boolean;
|
|
29
30
|
+enableAccumulatedUpdatesInRawPropsAndroid?: () => boolean;
|
|
30
31
|
+enableBridgelessArchitecture?: () => boolean;
|
|
31
32
|
+enableCppPropsIteratorSetter?: () => boolean;
|
|
32
33
|
+enableEagerRootViewAttachment?: () => boolean;
|
|
33
|
-
+enableEventEmitterRetentionDuringGesturesOnAndroid?: () => boolean;
|
|
34
34
|
+enableFabricLogs?: () => boolean;
|
|
35
35
|
+enableFabricRenderer?: () => boolean;
|
|
36
36
|
+enableIOSViewClipToPaddingBox?: () => boolean;
|
|
@@ -41,7 +41,6 @@ export interface Spec extends TurboModule {
|
|
|
41
41
|
+enableLongTaskAPI?: () => boolean;
|
|
42
42
|
+enableNativeCSSParsing?: () => boolean;
|
|
43
43
|
+enableNewBackgroundAndBorderDrawables?: () => boolean;
|
|
44
|
-
+enablePreciseSchedulingForPremountItemsOnAndroid?: () => boolean;
|
|
45
44
|
+enablePropsUpdateReconciliationAndroid?: () => boolean;
|
|
46
45
|
+enableReportEventPaintTime?: () => boolean;
|
|
47
46
|
+enableSynchronousStateUpdates?: () => boolean;
|
|
@@ -50,13 +49,14 @@ export interface Spec extends TurboModule {
|
|
|
50
49
|
+enableViewRecycling?: () => boolean;
|
|
51
50
|
+enableViewRecyclingForText?: () => boolean;
|
|
52
51
|
+enableViewRecyclingForView?: () => boolean;
|
|
53
|
-
+excludeYogaFromRawProps?: () => boolean;
|
|
54
52
|
+fixDifferentiatorEmittingUpdatesWithWrongParentTag?: () => boolean;
|
|
55
53
|
+fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
|
|
56
54
|
+fixMountingCoordinatorReportedPendingTransactionsOnAndroid?: () => boolean;
|
|
57
55
|
+fuseboxEnabledRelease?: () => boolean;
|
|
58
56
|
+fuseboxNetworkInspectionEnabled?: () => boolean;
|
|
59
57
|
+lazyAnimationCallbacks?: () => boolean;
|
|
58
|
+
+removeTurboModuleManagerDelegateMutex?: () => boolean;
|
|
59
|
+
+throwExceptionInsteadOfDeadlockOnTurboModuleSetupDuringSyncRenderIOS?: () => boolean;
|
|
60
60
|
+traceTurboModulePromiseRejectionsOnAndroid?: () => boolean;
|
|
61
61
|
+useAlwaysAvailableJSErrorHandling?: () => boolean;
|
|
62
62
|
+useEditTextStockAndroidFocusBehavior?: () => boolean;
|
|
@@ -8,10 +8,8 @@
|
|
|
8
8
|
* @flow
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {
|
|
12
|
-
|
|
13
|
-
TouchedViewDataAtPoint,
|
|
14
|
-
} from '../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
11
|
+
import type {TouchedViewDataAtPoint} from '../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
12
|
+
import type {HostInstance} from '../types/HostInstance';
|
|
15
13
|
|
|
16
14
|
const invariant = require('invariant');
|
|
17
15
|
|
|
@@ -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-local
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -29,6 +29,11 @@ export default function setUpDOM() {
|
|
|
29
29
|
() => require('../webapis/geometry/DOMRectReadOnly').default,
|
|
30
30
|
);
|
|
31
31
|
|
|
32
|
+
polyfillGlobal(
|
|
33
|
+
'DOMRectList',
|
|
34
|
+
() => require('../webapis/geometry/DOMRectList').default,
|
|
35
|
+
);
|
|
36
|
+
|
|
32
37
|
polyfillGlobal(
|
|
33
38
|
'HTMLCollection',
|
|
34
39
|
() => require('../webapis/dom/oldstylecollections/HTMLCollection').default,
|
|
@@ -38,4 +43,34 @@ export default function setUpDOM() {
|
|
|
38
43
|
'NodeList',
|
|
39
44
|
() => require('../webapis/dom/oldstylecollections/NodeList').default,
|
|
40
45
|
);
|
|
46
|
+
|
|
47
|
+
polyfillGlobal(
|
|
48
|
+
'Node',
|
|
49
|
+
() => require('../webapis/dom/nodes/ReadOnlyNode').default,
|
|
50
|
+
);
|
|
51
|
+
|
|
52
|
+
polyfillGlobal(
|
|
53
|
+
'Document',
|
|
54
|
+
() => require('../webapis/dom/nodes/ReactNativeDocument').default,
|
|
55
|
+
);
|
|
56
|
+
|
|
57
|
+
polyfillGlobal(
|
|
58
|
+
'CharacterData',
|
|
59
|
+
() => require('../webapis/dom/nodes/ReadOnlyCharacterData').default,
|
|
60
|
+
);
|
|
61
|
+
|
|
62
|
+
polyfillGlobal(
|
|
63
|
+
'Text',
|
|
64
|
+
() => require('../webapis/dom/nodes/ReadOnlyText').default,
|
|
65
|
+
);
|
|
66
|
+
|
|
67
|
+
polyfillGlobal(
|
|
68
|
+
'Element',
|
|
69
|
+
() => require('../webapis/dom/nodes/ReadOnlyElement').default,
|
|
70
|
+
);
|
|
71
|
+
|
|
72
|
+
polyfillGlobal(
|
|
73
|
+
'HTMLElement',
|
|
74
|
+
() => require('../webapis/dom/nodes/ReactNativeElement').default,
|
|
75
|
+
);
|
|
41
76
|
}
|
|
@@ -9,9 +9,9 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
-
import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
13
12
|
import type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';
|
|
14
13
|
import type {WithDefault} from '../../../../Libraries/Types/CodegenTypes';
|
|
14
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
15
15
|
|
|
16
16
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
17
17
|
|
|
@@ -9,7 +9,6 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
-
import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
13
12
|
import type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';
|
|
14
13
|
import type {
|
|
15
14
|
DirectEventHandler,
|
|
@@ -17,6 +16,7 @@ import type {
|
|
|
17
16
|
Int32,
|
|
18
17
|
WithDefault,
|
|
19
18
|
} from '../../../../Libraries/Types/CodegenTypes';
|
|
19
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
20
20
|
|
|
21
21
|
import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNativeCommands';
|
|
22
22
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js
CHANGED
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
-
import type {HostComponent} from '
|
|
12
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
13
13
|
|
|
14
14
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
15
15
|
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
-
import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
13
12
|
import type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';
|
|
14
13
|
import type {
|
|
15
14
|
DirectEventHandler,
|
|
16
15
|
Float,
|
|
17
16
|
WithDefault,
|
|
18
17
|
} from '../../../../Libraries/Types/CodegenTypes';
|
|
18
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
19
19
|
|
|
20
20
|
import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNativeCommands';
|
|
21
21
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
-
import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
13
12
|
import type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';
|
|
14
13
|
import type {
|
|
15
14
|
BubblingEventHandler,
|
|
16
15
|
Int32,
|
|
17
16
|
WithDefault,
|
|
18
17
|
} from '../../../../Libraries/Types/CodegenTypes';
|
|
18
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
19
19
|
|
|
20
20
|
import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNativeCommands';
|
|
21
21
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
-
import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
13
12
|
import type {ProcessedColorValue} from '../../../../Libraries/StyleSheet/processColor';
|
|
13
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
14
14
|
|
|
15
15
|
import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNativeCommands';
|
|
16
16
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
-
import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
13
12
|
import type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';
|
|
14
13
|
import type {
|
|
15
14
|
Double,
|
|
16
15
|
WithDefault,
|
|
17
16
|
} from '../../../../Libraries/Types/CodegenTypes';
|
|
17
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
18
18
|
|
|
19
19
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
20
20
|
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
-
import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
13
12
|
import type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';
|
|
14
13
|
import type {
|
|
15
14
|
DirectEventHandler,
|
|
16
15
|
Float,
|
|
17
16
|
WithDefault,
|
|
18
17
|
} from '../../../../Libraries/Types/CodegenTypes';
|
|
18
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
19
19
|
|
|
20
20
|
import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNativeCommands';
|
|
21
21
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
-
import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
13
12
|
import type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';
|
|
13
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
14
14
|
|
|
15
15
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
16
16
|
|
|
@@ -9,12 +9,12 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
-
import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
13
12
|
import type {
|
|
14
13
|
DirectEventHandler,
|
|
15
14
|
Int32,
|
|
16
15
|
WithDefault,
|
|
17
16
|
} from '../../../../Libraries/Types/CodegenTypes';
|
|
17
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
18
18
|
|
|
19
19
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
20
20
|
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
-
import type {HostComponent} from '
|
|
12
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
13
13
|
|
|
14
14
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
15
15
|
|
|
@@ -9,13 +9,13 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
-
import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
13
12
|
import type {ColorValue} from '../../../../Libraries/StyleSheet/StyleSheet';
|
|
14
13
|
import type {
|
|
15
14
|
BubblingEventHandler,
|
|
16
15
|
Int32,
|
|
17
16
|
WithDefault,
|
|
18
17
|
} from '../../../../Libraries/Types/CodegenTypes';
|
|
18
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
19
19
|
|
|
20
20
|
import codegenNativeCommands from '../../../../Libraries/Utilities/codegenNativeCommands';
|
|
21
21
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
@@ -9,8 +9,8 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ViewProps} from '../../../../Libraries/Components/View/ViewPropTypes';
|
|
12
|
-
import type {HostComponent} from '../../../../Libraries/Renderer/shims/ReactNativeTypes';
|
|
13
12
|
import type {WithDefault} from '../../../../Libraries/Types/CodegenTypes';
|
|
13
|
+
import type {HostComponent} from '../../types/HostComponent';
|
|
14
14
|
|
|
15
15
|
import codegenNativeComponent from '../../../../Libraries/Utilities/codegenNativeComponent';
|
|
16
16
|
|
|
@@ -0,0 +1,16 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @flow strict
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import type {HostInstance} from './HostInstance';
|
|
12
|
+
|
|
13
|
+
export type HostComponent<Config: {...}> = component(
|
|
14
|
+
ref: React.RefSetter<HostInstance>,
|
|
15
|
+
...Config
|
|
16
|
+
);
|