@office-iss/react-native-win32 0.84.0-preview.2 → 0.85.0-preview.1
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/.eslintignore +1 -0
- package/.flowconfig +1 -5
- package/CHANGELOG.json +79 -13
- package/CHANGELOG.md +14 -8
- package/IntegrationTests/IntegrationTestHarnessTest.js +1 -1
- package/IntegrationTests/LayoutEventsTest.js +1 -1
- package/IntegrationTests/TimersTest.js +1 -1
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +3 -3
- package/Libraries/Animated/Animated.d.ts +8 -1
- package/Libraries/Animated/AnimatedEvent.js +4 -4
- package/Libraries/Animated/AnimatedImplementation.js +2 -2
- package/Libraries/Animated/animations/Animation.js +3 -3
- package/Libraries/Animated/animations/DecayAnimation.js +4 -4
- package/Libraries/Animated/animations/SpringAnimation.js +5 -5
- package/Libraries/Animated/animations/TimingAnimation.js +5 -5
- package/Libraries/Animated/createAnimatedComponent.js +7 -7
- package/Libraries/Animated/nodes/AnimatedColor.js +2 -2
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +12 -12
- package/Libraries/Animated/nodes/AnimatedNode.js +3 -3
- package/Libraries/Animated/nodes/AnimatedObject.js +3 -3
- package/Libraries/Animated/nodes/AnimatedProps.js +6 -6
- package/Libraries/Animated/nodes/AnimatedStyle.js +7 -7
- package/Libraries/Animated/nodes/AnimatedTransform.js +13 -13
- package/Libraries/Animated/nodes/AnimatedValue.js +1 -1
- package/Libraries/Animated/nodes/AnimatedValueXY.js +1 -1
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -1
- package/Libraries/Animated/useAnimatedColor.d.ts +15 -0
- package/Libraries/Animated/useAnimatedColor.js +25 -0
- package/Libraries/Animated/useAnimatedValueXY.d.ts +15 -0
- package/Libraries/Animated/useAnimatedValueXY.js +26 -0
- package/Libraries/AppState/AppState.js +1 -1
- package/Libraries/BatchedBridge/MessageQueue.js +3 -3
- package/Libraries/BatchedBridge/NativeModules.js +12 -10
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +30 -26
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +34 -30
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +2 -2
- package/Libraries/Components/Button.js +2 -2
- package/Libraries/Components/Button.win32.js +2 -2
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroidTypes.js +2 -2
- package/Libraries/Components/EnterString.win32.js +2 -2
- package/Libraries/Components/EnterString.win32.js.map +1 -1
- package/Libraries/Components/Keyboard/Keyboard.js +6 -6
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +1 -1
- package/Libraries/Components/LayoutConformance/LayoutConformance.js +1 -1
- package/Libraries/Components/LayoutConformance/LayoutConformanceNativeComponent.js +1 -1
- package/Libraries/Components/Pressable/Pressable.d.ts +5 -0
- package/Libraries/Components/Pressable/Pressable.js +3 -3
- package/Libraries/Components/Pressable/Pressable.win32.js +3 -3
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +4 -4
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js +1 -1
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroidTypes.js +3 -3
- package/Libraries/Components/RefreshControl/RefreshControl.js +5 -5
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +8 -12
- package/Libraries/Components/ScrollView/ScrollView.d.ts +9 -0
- package/Libraries/Components/ScrollView/ScrollView.js +19 -9
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +8 -18
- package/Libraries/Components/ScrollView/ScrollViewNativeComponentType.js +4 -3
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StaticRenderer.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +8 -8
- package/Libraries/Components/Switch/Switch.js +3 -3
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +33 -48
- package/Libraries/Components/TextInput/InputAccessoryView.js +1 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +6 -11
- package/Libraries/Components/TextInput/TextInput.flow.js +21 -20
- package/Libraries/Components/TextInput/TextInput.flow.win32.js +23 -22
- package/Libraries/Components/TextInput/TextInput.js +8 -4
- package/Libraries/Components/TextInput/TextInput.win32.js +3 -4
- package/Libraries/Components/Touchable/PooledClass.js +1 -1
- package/Libraries/Components/Touchable/Touchable.js +2 -2
- package/Libraries/Components/Touchable/Touchable.win32.js +2 -2
- package/Libraries/Components/Touchable/TouchableBounce.js +4 -4
- package/Libraries/Components/Touchable/TouchableHighlight.js +8 -8
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +7 -7
- package/Libraries/Components/Touchable/TouchableNativeFeedback.win32.js +7 -7
- package/Libraries/Components/Touchable/TouchableOpacity.js +4 -4
- package/Libraries/Components/Touchable/TouchableWin32.js +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -1
- package/Libraries/Components/UnimplementedViews/UnimplementedView.js +1 -1
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +68 -31
- package/Libraries/Components/View/ViewAccessibility.js +7 -7
- package/Libraries/Components/View/ViewAccessibility.win32.js +7 -7
- package/Libraries/Components/View/ViewPropTypes.js +14 -14
- package/Libraries/Components/View/ViewPropTypes.win32.js +16 -16
- package/Libraries/Core/Devtools/parseHermesStack.js +8 -8
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -2
- package/Libraries/Core/ExceptionsManager.js +2 -2
- package/Libraries/Core/ExtendedError.js +3 -3
- package/Libraries/Core/RawEventEmitter.js +1 -1
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Core/Timers/JSTimers.js +3 -2
- package/Libraries/Core/setUpDeveloperTools.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +4 -2
- package/Libraries/Core/setUpReactDevTools.js +23 -6
- package/Libraries/Core/setUpSegmentFetcher.js +1 -1
- package/Libraries/Debugging/DebuggingOverlay.js +2 -2
- package/Libraries/EventEmitter/NativeEventEmitter.js +7 -9
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +1 -1
- package/Libraries/Image/AssetSourceResolver.js +1 -1
- package/Libraries/Image/Image.android.js +172 -306
- package/Libraries/Image/ImageProps.js +9 -11
- package/Libraries/Image/ImageSource.js +2 -2
- package/Libraries/Image/ImageSourceUtils.js +8 -4
- package/Libraries/Image/ImageTypes.flow.js +2 -2
- package/Libraries/Image/ImageViewNativeComponent.js +7 -16
- package/Libraries/Image/nativeImageSource.js +1 -1
- package/Libraries/Interaction/InteractionManager.js +5 -4
- package/Libraries/Interaction/PanResponder.js +1 -1
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -2
- package/Libraries/Linking/Linking.js +1 -1
- package/Libraries/Lists/FlatList.js +3 -3
- package/Libraries/Lists/SectionList.js +1 -1
- package/Libraries/Lists/SectionListModern.js +2 -2
- package/Libraries/LogBox/Data/LogBoxData.js +38 -24
- package/Libraries/LogBox/Data/LogBoxLog.js +43 -112
- package/Libraries/LogBox/Data/parseLogBoxLog.js +21 -117
- package/Libraries/LogBox/LogBox.js +42 -19
- package/Libraries/LogBox/LogBoxInspectorContainer.js +2 -2
- package/Libraries/LogBox/LogBoxNotificationContainer.js +2 -2
- package/Libraries/LogBox/UI/LogBoxButton.js +14 -16
- package/Libraries/LogBox/UI/LogBoxInspector.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.js +6 -9
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js +6 -9
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorFooterButton.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorHeaderButton.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorMessageHeader.js +10 -15
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js +25 -18
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.win32.js +15 -16
- package/Libraries/LogBox/UI/LogBoxInspectorSection.js +5 -7
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +8 -10
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.win32.js +11 -13
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +8 -6
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.win32.js +3 -5
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +17 -29
- package/Libraries/LogBox/UI/LogBoxMessage.js +28 -37
- package/Libraries/LogBox/UI/LogBoxNotification.js +1 -1
- package/Libraries/Modal/Modal.js +3 -3
- package/Libraries/NativeComponent/BaseViewConfig.android.js +28 -52
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +19 -21
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +16 -16
- package/Libraries/Network/RCTNetworking.android.js +1 -1
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.js.flow +1 -1
- package/Libraries/Network/RCTNetworking.win32.js +1 -1
- package/Libraries/Network/RCTNetworkingEventDefinitions.flow.js +1 -1
- package/Libraries/Network/XMLHttpRequest.js +1 -1
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -3
- package/Libraries/Pressability/Pressability.js +5 -5
- package/Libraries/Pressability/Pressability.win32.js +5 -5
- package/Libraries/Pressability/PressabilityDebug.js +1 -1
- package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -1
- package/Libraries/Pressability/usePressability.js +3 -14
- package/Libraries/PushNotificationIOS/PushNotificationIOS.js +2 -2
- package/Libraries/ReactNative/AppContainer-dev.js +18 -1
- package/Libraries/ReactNative/AppContainer.js +1 -1
- package/Libraries/ReactNative/AppRegistry.flow.js +2 -2
- package/Libraries/ReactNative/AppRegistryImpl.js +2 -2
- package/Libraries/ReactNative/FabricUIManager.js +1 -1
- package/Libraries/ReactNative/RendererImplementation.js +4 -4
- package/Libraries/ReactNative/UIManagerProperties.js +1 -1
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +3 -2
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3 -2
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3 -2
- package/Libraries/Renderer/shims/ReactFabric.js +1 -3
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +1 -3
- package/Libraries/Renderer/shims/ReactNative.js +3 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.win32.js +1 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +1 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +1 -3
- package/Libraries/StyleSheet/PointPropType.js +1 -1
- package/Libraries/StyleSheet/Rect.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.d.ts +0 -5
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.js.flow +1 -1
- package/Libraries/StyleSheet/StyleSheetExports.js +16 -25
- package/Libraries/StyleSheet/StyleSheetExports.js.flow +2 -7
- package/Libraries/StyleSheet/StyleSheetTypes.js +33 -35
- package/Libraries/StyleSheet/private/_StyleSheetTypesOverrides.js +5 -5
- package/Libraries/StyleSheet/private/_TransformStyle.js +7 -7
- package/Libraries/StyleSheet/processBackgroundImage.js +7 -7
- package/Libraries/StyleSheet/processBackgroundPosition.js +4 -4
- package/Libraries/StyleSheet/processBackgroundRepeat.js +4 -4
- package/Libraries/StyleSheet/processBackgroundSize.js +4 -4
- package/Libraries/StyleSheet/processBoxShadow.js +44 -4
- package/Libraries/StyleSheet/processColorArray.js +2 -2
- package/Libraries/StyleSheet/processFilter.js +2 -2
- package/Libraries/Text/Text.js +295 -627
- package/Libraries/Text/Text.win32.js +360 -744
- package/Libraries/Text/TextNativeComponent.js +14 -7
- package/Libraries/Text/TextNativeComponent.win32.js +14 -7
- package/Libraries/Text/TextProps.js +4 -4
- package/Libraries/Text/TextProps.win32.js +4 -4
- package/Libraries/Types/CodegenTypes.js +1 -1
- package/Libraries/Types/CoreEventTypes.js +21 -21
- package/Libraries/Types/CoreEventTypes.win32.js +22 -21
- package/Libraries/Types/ReactDevToolsTypes.js +2 -2
- package/Libraries/Utilities/Appearance.js +6 -1
- package/Libraries/Utilities/Dimensions.js +1 -1
- package/Libraries/Utilities/Dimensions.win32.js +1 -1
- package/Libraries/Utilities/HMRClient.js +32 -5
- package/Libraries/Utilities/IPerformanceLogger.js +4 -4
- package/Libraries/Utilities/codegenNativeCommands.js +4 -4
- package/Libraries/Utilities/codegenNativeComponent.d.ts +2 -0
- package/Libraries/Utilities/codegenNativeComponent.js +2 -2
- package/Libraries/Utilities/logError.js +1 -1
- package/Libraries/Utilities/stringifySafe.js +3 -3
- package/Libraries/Utilities/useMergeRefs.js +2 -2
- package/Libraries/vendor/core/ErrorUtils.js +4 -4
- package/Libraries/vendor/emitter/EventEmitter.js +16 -20
- package/flow/bom.js.flow +18 -17
- package/flow/dom.js.flow +12 -5
- package/flow/global.js +1 -1
- package/index.js +9 -0
- package/index.win32.js +9 -0
- package/index.win32.js.flow +8 -1
- package/jest/RefreshControlMock.js +2 -2
- package/jest/assetFileTransformer.js +8 -3
- package/jest/mockComponent.js +3 -4
- package/jest/mockNativeComponent.js +1 -1
- package/jest/mocks/ActivityIndicator.js +2 -2
- package/jest/mocks/Image.js +2 -2
- package/jest/mocks/Modal.js +2 -2
- package/jest/mocks/RefreshControl.js +3 -3
- package/jest/mocks/RendererProxy.js +2 -2
- package/jest/mocks/ScrollView.js +5 -5
- package/jest/mocks/Text.js +2 -2
- package/jest/mocks/TextInput.js +2 -2
- package/jest/mocks/View.js +2 -2
- package/jest/mocks/ViewNativeComponent.js +1 -1
- package/jest/mocks/requireNativeComponent.js +1 -1
- package/jest/mocks/useColorScheme.js +1 -1
- package/jest/setup.js +68 -31
- package/overrides.json +30 -36
- package/package.json +20 -17
- package/src/private/animated/NativeAnimatedHelper.js +2 -2
- package/src/private/animated/NativeAnimatedHelper.win32.js +2 -2
- package/src/private/animated/createAnimatedPropsMemoHook.js +19 -19
- package/src/private/components/virtualview/VirtualView.js +14 -21
- package/src/private/components/virtualview/VirtualViewExperimentalNativeComponent.js +11 -10
- package/src/private/components/virtualview/VirtualViewNativeComponent.js +4 -4
- package/src/private/devsupport/devmenu/elementinspector/BorderBox.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/BoxInspector.js +3 -3
- package/src/private/devsupport/devmenu/elementinspector/ElementBox.js +4 -4
- package/src/private/devsupport/devmenu/elementinspector/ElementProperties.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/Inspector.js +39 -17
- package/src/private/devsupport/devmenu/elementinspector/InspectorOverlay.js +15 -3
- package/src/private/devsupport/devmenu/elementinspector/InspectorPanel.js +2 -2
- package/src/private/devsupport/devmenu/elementinspector/ReactDevToolsOverlay.js +2 -8
- package/src/private/devsupport/devmenu/elementinspector/StyleInspector.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/resolveBoxStyle.js +1 -1
- package/src/private/devsupport/devmenu/elementinspector/useExternalInspection.js +102 -0
- package/src/private/devsupport/rndevtools/FuseboxSessionObserver.js +12 -25
- package/src/private/devsupport/rndevtools/GlobalStateObserver.js +56 -0
- package/src/private/devsupport/rndevtools/TracingStateObserver.js +28 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +71 -79
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +2 -2
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +14 -12
- package/src/private/setup/setUpDefaultReactNativeEnvironment.js +6 -0
- package/src/private/specs_DEPRECATED/components/ActivityIndicatorViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidDrawerLayoutNativeComponent.js +3 -3
- package/src/private/specs_DEPRECATED/components/AndroidHorizontalScrollContentViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/AndroidSwipeRefreshLayoutNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/AndroidSwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/DebuggingOverlayNativeComponent.js +3 -3
- 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 +3 -3
- package/src/private/specs_DEPRECATED/components/RCTSafeAreaViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/components/SwitchNativeComponent.js +2 -2
- package/src/private/specs_DEPRECATED/components/UnimplementedNativeViewNativeComponent.js +1 -1
- package/src/private/specs_DEPRECATED/modules/NativeImageLoaderIOS.js +1 -1
- package/src/private/styles/composeStyles.js +1 -1
- package/src/private/utilities/toError.js +27 -0
- package/src/private/utilities/toExtendedError.js +30 -0
- package/src/private/webapis/dom/events/Event.js +1 -1
- package/src/private/webapis/dom/events/EventHandlerAttributes.js +2 -2
- package/src/private/webapis/dom/events/EventTarget.js +3 -3
- package/src/private/webapis/dom/events/internals/EventInternals.js +2 -2
- package/src/private/webapis/dom/nodes/ReadOnlyElement.js +1 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +2 -2
- package/src/private/webapis/dom/nodes/specs/NativeDOM.js +14 -14
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +2 -2
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +2 -2
- package/src/private/webapis/geometry/DOMRectList.js +2 -2
- package/src/private/webapis/intersectionobserver/IntersectionObserver.js +8 -8
- package/src/private/webapis/intersectionobserver/specs/NativeIntersectionObserver.js +6 -6
- package/src/private/webapis/mutationobserver/MutationObserver.js +2 -2
- package/src/private/webapis/mutationobserver/MutationRecord.js +2 -2
- package/src/private/webapis/mutationobserver/internals/MutationObserverManager.js +1 -1
- package/src/private/webapis/mutationobserver/specs/NativeMutationObserver.js +3 -3
- package/src/private/webapis/performance/LongTasks.js +3 -3
- package/src/private/webapis/performance/Performance.js +4 -4
- package/src/private/webapis/performance/PerformanceEntry.js +1 -1
- package/src/private/webapis/performance/PerformanceObserver.js +2 -2
- package/src/private/webapis/performance/specs/NativePerformance.js +8 -8
- package/src/private/webapis/structuredClone/structuredClone.js +2 -2
- package/src/types/globals.d.ts +4 -4
- package/src-win/Libraries/Components/EnterString.win32.tsx +2 -2
- package/src-win/Libraries/Components/Touchable/TouchableWin32.tsx +14 -14
- package/src-win/index.win32.js.flow +8 -1
- package/types/index.d.ts +2 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +0 -60
- package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +0 -94
- package/Libraries/Image/TextInlineImageNativeComponent.js +0 -49
|
@@ -37,23 +37,23 @@ import {PerformanceMark, PerformanceMeasure} from './UserTiming';
|
|
|
37
37
|
import nullthrows from 'nullthrows';
|
|
38
38
|
|
|
39
39
|
export type PerformanceMeasureOptions =
|
|
40
|
-
|
|
|
40
|
+
| Readonly<{
|
|
41
41
|
detail?: DetailType,
|
|
42
42
|
start?: DOMHighResTimeStamp | string,
|
|
43
43
|
duration?: DOMHighResTimeStamp,
|
|
44
44
|
}>
|
|
45
|
-
|
|
|
45
|
+
| Readonly<{
|
|
46
46
|
detail?: DetailType,
|
|
47
47
|
start?: DOMHighResTimeStamp | string,
|
|
48
48
|
end?: DOMHighResTimeStamp | string,
|
|
49
49
|
}>
|
|
50
|
-
|
|
|
50
|
+
| Readonly<{
|
|
51
51
|
detail?: DetailType,
|
|
52
52
|
duration?: DOMHighResTimeStamp | string,
|
|
53
53
|
end?: DOMHighResTimeStamp | string,
|
|
54
54
|
}>;
|
|
55
55
|
|
|
56
|
-
const ENTRY_TYPES_AVAILABLE_FROM_TIMELINE:
|
|
56
|
+
const ENTRY_TYPES_AVAILABLE_FROM_TIMELINE: ReadonlyArray<PerformanceEntryType> =
|
|
57
57
|
['mark', 'measure'];
|
|
58
58
|
|
|
59
59
|
const NativePerformance = nullthrows(MaybeNativePerformance);
|
|
@@ -88,7 +88,7 @@ export interface PerformanceObserverInit {
|
|
|
88
88
|
+durationThreshold?: DOMHighResTimeStamp;
|
|
89
89
|
}
|
|
90
90
|
|
|
91
|
-
function getSupportedPerformanceEntryTypes():
|
|
91
|
+
function getSupportedPerformanceEntryTypes(): ReadonlyArray<PerformanceEntryType> {
|
|
92
92
|
return Object.freeze(
|
|
93
93
|
NativePerformance.getSupportedPerformanceEntryTypes().map(
|
|
94
94
|
rawToPerformanceEntryType,
|
|
@@ -237,7 +237,7 @@ export class PerformanceObserver {
|
|
|
237
237
|
}
|
|
238
238
|
}
|
|
239
239
|
|
|
240
|
-
static supportedEntryTypes:
|
|
240
|
+
static supportedEntryTypes: ReadonlyArray<PerformanceEntryType> =
|
|
241
241
|
getSupportedPerformanceEntryTypes();
|
|
242
242
|
}
|
|
243
243
|
|
|
@@ -46,10 +46,10 @@ export opaque type OpaqueNativeObserverHandle = unknown;
|
|
|
46
46
|
|
|
47
47
|
export type NativeBatchedObserverCallback = () => void;
|
|
48
48
|
export type NativePerformanceMarkResult = number;
|
|
49
|
-
export type NativePerformanceMeasureResult =
|
|
49
|
+
export type NativePerformanceMeasureResult = ReadonlyArray<number>; // [startTime, duration]
|
|
50
50
|
|
|
51
51
|
export type PerformanceObserverInit = {
|
|
52
|
-
entryTypes?:
|
|
52
|
+
entryTypes?: ReadonlyArray<number>,
|
|
53
53
|
type?: number,
|
|
54
54
|
buffered?: boolean,
|
|
55
55
|
durationThreshold?: number,
|
|
@@ -69,15 +69,15 @@ export interface Spec extends TurboModule {
|
|
|
69
69
|
+getMarkTime: (name: string) => ?number;
|
|
70
70
|
+clearMarks: (entryName?: string) => void;
|
|
71
71
|
+clearMeasures: (entryName?: string) => void;
|
|
72
|
-
+getEntries: () =>
|
|
72
|
+
+getEntries: () => ReadonlyArray<RawPerformanceEntry>;
|
|
73
73
|
+getEntriesByName: (
|
|
74
74
|
entryName: string,
|
|
75
75
|
entryType?: ?RawPerformanceEntryType,
|
|
76
|
-
) =>
|
|
76
|
+
) => ReadonlyArray<RawPerformanceEntry>;
|
|
77
77
|
+getEntriesByType: (
|
|
78
78
|
entryType: RawPerformanceEntryType,
|
|
79
|
-
) =>
|
|
80
|
-
+getEventCounts: () =>
|
|
79
|
+
) => ReadonlyArray<RawPerformanceEntry>;
|
|
80
|
+
+getEventCounts: () => ReadonlyArray<[string, number]>;
|
|
81
81
|
+getSimpleMemoryInfo: () => NativeMemoryInfo;
|
|
82
82
|
+getReactNativeStartupTiming: () => ReactNativeStartupTiming;
|
|
83
83
|
|
|
@@ -94,9 +94,9 @@ export interface Spec extends TurboModule {
|
|
|
94
94
|
+takeRecords: (
|
|
95
95
|
observer: OpaqueNativeObserverHandle,
|
|
96
96
|
sort: boolean,
|
|
97
|
-
) =>
|
|
97
|
+
) => ReadonlyArray<RawPerformanceEntry>;
|
|
98
98
|
|
|
99
|
-
+getSupportedPerformanceEntryTypes: () =>
|
|
99
|
+
+getSupportedPerformanceEntryTypes: () => ReadonlyArray<RawPerformanceEntryType>;
|
|
100
100
|
|
|
101
101
|
+clearEventCountsForTesting: () => void;
|
|
102
102
|
}
|
|
@@ -28,7 +28,7 @@ const BASIC_CONSTRUCTORS = [Number, String, Boolean, Date];
|
|
|
28
28
|
|
|
29
29
|
const ObjectPrototype = Object.prototype;
|
|
30
30
|
|
|
31
|
-
//
|
|
31
|
+
// Technically the memory value should be a parameter in
|
|
32
32
|
// `structuredCloneInternal` but as an optimization we can reuse the same map
|
|
33
33
|
// and avoid allocating a new one in every call to `structuredClone`.
|
|
34
34
|
// This is safe because we don't invoke user code in `structuredClone`, so at
|
|
@@ -205,7 +205,7 @@ function structuredCloneInternal<T>(value: T): T {
|
|
|
205
205
|
* but implements the cloning in a single step.
|
|
206
206
|
*
|
|
207
207
|
* Known limitations:
|
|
208
|
-
* - It does not support
|
|
208
|
+
* - It does not support transferring values.
|
|
209
209
|
*/
|
|
210
210
|
export default function structuredClone<T>(value: T): T {
|
|
211
211
|
try {
|
package/src/types/globals.d.ts
CHANGED
|
@@ -101,8 +101,8 @@ declare global {
|
|
|
101
101
|
|
|
102
102
|
// #region Timer Functions
|
|
103
103
|
|
|
104
|
-
function clearInterval(handle: number): void;
|
|
105
|
-
function clearTimeout(handle: number): void;
|
|
104
|
+
function clearInterval(handle: number | null | undefined): void;
|
|
105
|
+
function clearTimeout(handle: number | null | undefined): void;
|
|
106
106
|
function setInterval(handler: () => void, timeout: number): number;
|
|
107
107
|
function setInterval<Args extends any[]>(
|
|
108
108
|
handler: (...args: Args) => void,
|
|
@@ -115,14 +115,14 @@ declare global {
|
|
|
115
115
|
timeout?: number,
|
|
116
116
|
...args: Args
|
|
117
117
|
): number;
|
|
118
|
-
function clearImmediate(handle: number): void;
|
|
118
|
+
function clearImmediate(handle: number | null | undefined): void;
|
|
119
119
|
function setImmediate(handler: () => void): number;
|
|
120
120
|
function setImmediate<Args extends any[]>(
|
|
121
121
|
handler: (...args: Args) => void,
|
|
122
122
|
...args: Args
|
|
123
123
|
): number;
|
|
124
124
|
|
|
125
|
-
function cancelAnimationFrame(handle: number): void;
|
|
125
|
+
function cancelAnimationFrame(handle: number | null | undefined): void;
|
|
126
126
|
function requestAnimationFrame(callback: (time: number) => void): number;
|
|
127
127
|
|
|
128
128
|
function fetchBundle(
|
|
@@ -76,7 +76,7 @@ class EnterStringNative extends React.Component<IEnterStringNativeProps, {}> {
|
|
|
76
76
|
disabled: false,
|
|
77
77
|
value: '',
|
|
78
78
|
label: '',
|
|
79
|
-
onChanged:
|
|
79
|
+
onChanged: undefined,
|
|
80
80
|
};
|
|
81
81
|
|
|
82
82
|
public render() {
|
|
@@ -91,7 +91,7 @@ export default class EnterString extends React.Component<IEnterStringProps, {}>
|
|
|
91
91
|
disabled: false,
|
|
92
92
|
value: '',
|
|
93
93
|
label: '',
|
|
94
|
-
onChanged:
|
|
94
|
+
onChanged: undefined,
|
|
95
95
|
};
|
|
96
96
|
|
|
97
97
|
public render() {
|
|
@@ -192,7 +192,7 @@ export class TouchableWin32 extends React.Component<ITouchableWin32Props, IInter
|
|
|
192
192
|
private _positionOnActivate: IPosition;
|
|
193
193
|
private _dimensionsOnActivate: IDimensions;
|
|
194
194
|
|
|
195
|
-
private readonly _internalRef: React.RefObject<ViewWin32>
|
|
195
|
+
private readonly _internalRef: React.RefObject<ViewWin32|null>
|
|
196
196
|
|
|
197
197
|
constructor(props) {
|
|
198
198
|
super(props);
|
|
@@ -268,7 +268,7 @@ export class TouchableWin32 extends React.Component<ITouchableWin32Props, IInter
|
|
|
268
268
|
}
|
|
269
269
|
|
|
270
270
|
public focus = () => {
|
|
271
|
-
this._internalRef.current
|
|
271
|
+
this._internalRef.current?.focus();
|
|
272
272
|
}
|
|
273
273
|
|
|
274
274
|
/**
|
|
@@ -298,7 +298,7 @@ export class TouchableWin32 extends React.Component<ITouchableWin32Props, IInter
|
|
|
298
298
|
e.persist();
|
|
299
299
|
|
|
300
300
|
this._pressOutDelayTimeout && clearTimeout(this._pressOutDelayTimeout);
|
|
301
|
-
this._pressOutDelayTimeout = null;
|
|
301
|
+
this._pressOutDelayTimeout = null as unknown as NodeJS.Timeout;
|
|
302
302
|
|
|
303
303
|
this._touchState = 'NOT_RESPONDER';
|
|
304
304
|
this._responderID = dispatchID;
|
|
@@ -326,7 +326,7 @@ export class TouchableWin32 extends React.Component<ITouchableWin32Props, IInter
|
|
|
326
326
|
* Handle responder release
|
|
327
327
|
*/
|
|
328
328
|
private readonly _touchableHandleResponderRelease = (e: IPressEvent) => {
|
|
329
|
-
this._pressInLocation = null;
|
|
329
|
+
this._pressInLocation = null as unknown as IPressInLocation;
|
|
330
330
|
this._receiveSignal('RESPONDER_RELEASE', e);
|
|
331
331
|
};
|
|
332
332
|
|
|
@@ -334,7 +334,7 @@ export class TouchableWin32 extends React.Component<ITouchableWin32Props, IInter
|
|
|
334
334
|
* Handle responder terminate
|
|
335
335
|
*/
|
|
336
336
|
private readonly _touchableHandleResponderTerminate = (e: IPressEvent) => {
|
|
337
|
-
this._pressInLocation = null;
|
|
337
|
+
this._pressInLocation = null as unknown as IPressInLocation;
|
|
338
338
|
this._receiveSignal('RESPONDER_TERMINATED', e);
|
|
339
339
|
};
|
|
340
340
|
|
|
@@ -357,10 +357,10 @@ export class TouchableWin32 extends React.Component<ITouchableWin32Props, IInter
|
|
|
357
357
|
bottom: PRESS_EXPAND_DIPS,
|
|
358
358
|
};
|
|
359
359
|
|
|
360
|
-
let pressExpandLeft = pressRectOffset.left
|
|
361
|
-
let pressExpandTop = pressRectOffset.top
|
|
362
|
-
let pressExpandRight = pressRectOffset.right
|
|
363
|
-
let pressExpandBottom = pressRectOffset.bottom
|
|
360
|
+
let pressExpandLeft = pressRectOffset.left!;
|
|
361
|
+
let pressExpandTop = pressRectOffset.top!;
|
|
362
|
+
let pressExpandRight = pressRectOffset.right!;
|
|
363
|
+
let pressExpandBottom = pressRectOffset.bottom!;
|
|
364
364
|
|
|
365
365
|
// TODO implement touchableGetHitSlop natively
|
|
366
366
|
const hitSlop = this.props.touchableGetHitSlop ? this.props.touchableGetHitSlop() : null;
|
|
@@ -427,12 +427,12 @@ export class TouchableWin32 extends React.Component<ITouchableWin32Props, IInter
|
|
|
427
427
|
};
|
|
428
428
|
|
|
429
429
|
private readonly _handleDelay = (e: IPressEvent) => {
|
|
430
|
-
this._touchableDelayTimeout = null;
|
|
430
|
+
this._touchableDelayTimeout = null as unknown as NodeJS.Timeout;
|
|
431
431
|
this._receiveSignal('DELAY', e);
|
|
432
432
|
};
|
|
433
433
|
|
|
434
434
|
private readonly _handleLongDelay = (e: IPressEvent) => {
|
|
435
|
-
this._longPressDelayTimeout = null;
|
|
435
|
+
this._longPressDelayTimeout = null as unknown as NodeJS.Timeout;
|
|
436
436
|
const currState = this._touchState;
|
|
437
437
|
|
|
438
438
|
if (currState !== 'RESPONDER_ACTIVE_PRESS_IN' && currState !== 'RESPONDER_ACTIVE_LONG_PRESS_IN') {
|
|
@@ -455,7 +455,7 @@ export class TouchableWin32 extends React.Component<ITouchableWin32Props, IInter
|
|
|
455
455
|
private readonly _receiveSignal = (signal: ISignal, e: IPressEvent) => {
|
|
456
456
|
const responderID = this._responderID;
|
|
457
457
|
const currState = this._touchState;
|
|
458
|
-
const nextState: IState = transitions[currState] ? transitions[currState][signal] : null;
|
|
458
|
+
const nextState: IState | null = transitions[currState] ? transitions[currState][signal] : null;
|
|
459
459
|
|
|
460
460
|
if (!nextState) {
|
|
461
461
|
const errorMessage = 'Unrecognized signal ' + signal + ' or state ' + currState + ' for Touchable responder ' + responderID + '.';
|
|
@@ -474,7 +474,7 @@ export class TouchableWin32 extends React.Component<ITouchableWin32Props, IInter
|
|
|
474
474
|
|
|
475
475
|
private readonly _cancelLongPressDelayTimeout = () => {
|
|
476
476
|
this._longPressDelayTimeout && clearTimeout(this._longPressDelayTimeout);
|
|
477
|
-
this._longPressDelayTimeout = null;
|
|
477
|
+
this._longPressDelayTimeout = null as unknown as NodeJS.Timeout;
|
|
478
478
|
};
|
|
479
479
|
|
|
480
480
|
private readonly _isHighlight = (state: IState) => {
|
|
@@ -546,7 +546,7 @@ export class TouchableWin32 extends React.Component<ITouchableWin32Props, IInter
|
|
|
546
546
|
}
|
|
547
547
|
|
|
548
548
|
this._touchableDelayTimeout && clearTimeout(this._touchableDelayTimeout);
|
|
549
|
-
this._touchableDelayTimeout = null;
|
|
549
|
+
this._touchableDelayTimeout = null as unknown as NodeJS.Timeout;
|
|
550
550
|
};
|
|
551
551
|
|
|
552
552
|
private readonly _startHighlight = (e: IPressEvent) => {
|
|
@@ -324,7 +324,6 @@ export * as NativeComponentRegistry from './Libraries/NativeComponent/NativeComp
|
|
|
324
324
|
export {default as NativeDialogManagerAndroid} from './Libraries/NativeModules/specs/NativeDialogManagerAndroid';
|
|
325
325
|
|
|
326
326
|
export type {
|
|
327
|
-
EventSubscription,
|
|
328
327
|
EmitterSubscription,
|
|
329
328
|
NativeEventSubscription,
|
|
330
329
|
} from './Libraries/EventEmitter/NativeEventEmitter';
|
|
@@ -412,6 +411,8 @@ export * as TurboModuleRegistry from './Libraries/TurboModule/TurboModuleRegistr
|
|
|
412
411
|
export {default as UIManager} from './Libraries/ReactNative/UIManager';
|
|
413
412
|
export {unstable_batchedUpdates} from './Libraries/ReactNative/RendererProxy';
|
|
414
413
|
export {default as useAnimatedValue} from './Libraries/Animated/useAnimatedValue';
|
|
414
|
+
export {default as useAnimatedValueXY} from './Libraries/Animated/useAnimatedValueXY';
|
|
415
|
+
export {default as useAnimatedColor} from './Libraries/Animated/useAnimatedColor';
|
|
415
416
|
export type {
|
|
416
417
|
PressabilityConfig,
|
|
417
418
|
EventHandlers as PressabilityEventHandlers,
|
|
@@ -467,6 +468,12 @@ export type {
|
|
|
467
468
|
PublicTextInstance,
|
|
468
469
|
} from './Libraries/ReactPrivate/ReactNativePrivateInterface';
|
|
469
470
|
|
|
471
|
+
export type {
|
|
472
|
+
EventSubscription,
|
|
473
|
+
IEventEmitter,
|
|
474
|
+
} from './Libraries/vendor/emitter/EventEmitter';
|
|
475
|
+
export {default as EventEmitter} from './Libraries/vendor/emitter/EventEmitter';
|
|
476
|
+
|
|
470
477
|
export {
|
|
471
478
|
default as unstable_VirtualView,
|
|
472
479
|
VirtualViewMode,
|
package/types/index.d.ts
CHANGED
|
@@ -75,6 +75,8 @@ export * from '../Libraries/Alert/Alert';
|
|
|
75
75
|
export * from '../Libraries/Animated/Animated';
|
|
76
76
|
export * from '../Libraries/Animated/Easing';
|
|
77
77
|
export * from '../Libraries/Animated/useAnimatedValue';
|
|
78
|
+
export * from '../Libraries/Animated/useAnimatedValueXY';
|
|
79
|
+
export * from '../Libraries/Animated/useAnimatedColor';
|
|
78
80
|
export * from '../Libraries/AppState/AppState';
|
|
79
81
|
export * from '../Libraries/BatchedBridge/NativeModules';
|
|
80
82
|
export * from '../Libraries/Components/AccessibilityInfo/AccessibilityInfo';
|
|
@@ -1,60 +0,0 @@
|
|
|
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-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
import ReactNativeStyleAttributes from './ReactNativeStyleAttributes';
|
|
13
|
-
|
|
14
|
-
const UIView = {
|
|
15
|
-
pointerEvents: true,
|
|
16
|
-
accessible: true,
|
|
17
|
-
accessibilityActions: true,
|
|
18
|
-
accessibilityLabel: true,
|
|
19
|
-
accessibilityLiveRegion: true,
|
|
20
|
-
accessibilityRole: true,
|
|
21
|
-
accessibilityState: true,
|
|
22
|
-
accessibilityValue: true,
|
|
23
|
-
accessibilityHint: true,
|
|
24
|
-
accessibilityLanguage: true,
|
|
25
|
-
accessibilityShowsLargeContentViewer: true,
|
|
26
|
-
accessibilityLargeContentTitle: true,
|
|
27
|
-
importantForAccessibility: true,
|
|
28
|
-
nativeID: true,
|
|
29
|
-
testID: true,
|
|
30
|
-
renderToHardwareTextureAndroid: true,
|
|
31
|
-
shouldRasterizeIOS: true,
|
|
32
|
-
onLayout: true,
|
|
33
|
-
onAccessibilityAction: true,
|
|
34
|
-
onAccessibilityTap: true,
|
|
35
|
-
onMagicTap: true,
|
|
36
|
-
onAccessibilityEscape: true,
|
|
37
|
-
collapsable: true,
|
|
38
|
-
collapsableChildren: true,
|
|
39
|
-
needsOffscreenAlphaCompositing: true,
|
|
40
|
-
style: ReactNativeStyleAttributes,
|
|
41
|
-
role: true,
|
|
42
|
-
};
|
|
43
|
-
|
|
44
|
-
const RCTView = {
|
|
45
|
-
...UIView,
|
|
46
|
-
|
|
47
|
-
// This is a special performance property exposed by RCTView and useful for
|
|
48
|
-
// scrolling content when there are many subviews, most of which are offscreen.
|
|
49
|
-
// For this property to be effective, it must be applied to a view that contains
|
|
50
|
-
// many subviews that extend outside its bound. The subviews must also have
|
|
51
|
-
// overflow: hidden, as should the containing view (or one of its superviews).
|
|
52
|
-
removeClippedSubviews: true,
|
|
53
|
-
};
|
|
54
|
-
|
|
55
|
-
const ReactNativeViewAttributes = {
|
|
56
|
-
UIView: UIView,
|
|
57
|
-
RCTView: RCTView,
|
|
58
|
-
};
|
|
59
|
-
|
|
60
|
-
export default ReactNativeViewAttributes;
|
|
@@ -1,94 +0,0 @@
|
|
|
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-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
import ReactNativeStyleAttributes from './ReactNativeStyleAttributes';
|
|
13
|
-
|
|
14
|
-
const UIView = {
|
|
15
|
-
pointerEvents: true,
|
|
16
|
-
accessible: true,
|
|
17
|
-
accessibilityActions: true,
|
|
18
|
-
accessibilityLabel: true,
|
|
19
|
-
accessibilityLiveRegion: true,
|
|
20
|
-
accessibilityRole: true,
|
|
21
|
-
accessibilityState: true,
|
|
22
|
-
accessibilityValue: true,
|
|
23
|
-
accessibilityHint: true,
|
|
24
|
-
accessibilityLanguage: true,
|
|
25
|
-
accessibilityShowsLargeContentViewer: true,
|
|
26
|
-
accessibilityLargeContentTitle: true,
|
|
27
|
-
importantForAccessibility: true,
|
|
28
|
-
nativeID: true,
|
|
29
|
-
testID: true,
|
|
30
|
-
renderToHardwareTextureAndroid: true,
|
|
31
|
-
shouldRasterizeIOS: true,
|
|
32
|
-
onLayout: true,
|
|
33
|
-
onAccessibilityAction: true,
|
|
34
|
-
onAccessibilityTap: true,
|
|
35
|
-
onMagicTap: true,
|
|
36
|
-
onAccessibilityEscape: true,
|
|
37
|
-
collapsable: true,
|
|
38
|
-
collapsableChildren: true,
|
|
39
|
-
needsOffscreenAlphaCompositing: true,
|
|
40
|
-
style: ReactNativeStyleAttributes,
|
|
41
|
-
role: true,
|
|
42
|
-
// [Win32
|
|
43
|
-
accessibilityAccessKey: true,
|
|
44
|
-
accessibilityAnnotation: true,
|
|
45
|
-
accessibilityControls: true,
|
|
46
|
-
accessibilityDescribedBy: true,
|
|
47
|
-
accessibilityDescription: true,
|
|
48
|
-
accessibilityItemType: true,
|
|
49
|
-
accessibilityLevel: true,
|
|
50
|
-
accessibilityPositionInSet: true,
|
|
51
|
-
accessibilitySetSize: true,
|
|
52
|
-
animationClass: true,
|
|
53
|
-
cursor: true,
|
|
54
|
-
draggedTypes: true,
|
|
55
|
-
enableFocusRing: true,
|
|
56
|
-
focusable: true,
|
|
57
|
-
keyDownEvents: true,
|
|
58
|
-
keyUpEvents: true,
|
|
59
|
-
onBlur: true,
|
|
60
|
-
onBlurCapture: true,
|
|
61
|
-
onDragEnter: true,
|
|
62
|
-
onDragLeave: true,
|
|
63
|
-
onDrop: true,
|
|
64
|
-
onFocus: true,
|
|
65
|
-
onFocusCapture: true,
|
|
66
|
-
onKeyDown: true,
|
|
67
|
-
onKeyDownCapture: true,
|
|
68
|
-
onKeyUp: true,
|
|
69
|
-
onKeyUpCapture: true,
|
|
70
|
-
onMouseEnter: true,
|
|
71
|
-
onMouseLeave: true,
|
|
72
|
-
tabIndex: true,
|
|
73
|
-
textStyle: true, // Once we flush out our JS theming story this property will no longer be needed
|
|
74
|
-
tooltip: true,
|
|
75
|
-
// Win32]
|
|
76
|
-
};
|
|
77
|
-
|
|
78
|
-
const RCTView = {
|
|
79
|
-
...UIView,
|
|
80
|
-
|
|
81
|
-
// This is a special performance property exposed by RCTView and useful for
|
|
82
|
-
// scrolling content when there are many subviews, most of which are offscreen.
|
|
83
|
-
// For this property to be effective, it must be applied to a view that contains
|
|
84
|
-
// many subviews that extend outside its bound. The subviews must also have
|
|
85
|
-
// overflow: hidden, as should the containing view (or one of its superviews).
|
|
86
|
-
removeClippedSubviews: true,
|
|
87
|
-
};
|
|
88
|
-
|
|
89
|
-
const ReactNativeViewAttributes = {
|
|
90
|
-
UIView: UIView,
|
|
91
|
-
RCTView: RCTView,
|
|
92
|
-
};
|
|
93
|
-
|
|
94
|
-
export default ReactNativeViewAttributes;
|
|
@@ -1,49 +0,0 @@
|
|
|
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-local
|
|
8
|
-
* @format
|
|
9
|
-
*/
|
|
10
|
-
|
|
11
|
-
'use strict';
|
|
12
|
-
|
|
13
|
-
import type {HostComponent} from '../../src/private/types/HostComponent';
|
|
14
|
-
import type {ViewProps} from '../Components/View/ViewPropTypes';
|
|
15
|
-
import type {PartialViewConfig} from '../Renderer/shims/ReactNativeTypes';
|
|
16
|
-
import type {ColorValue} from '../StyleSheet/StyleSheet';
|
|
17
|
-
import type {ImageResizeMode} from './ImageResizeMode';
|
|
18
|
-
|
|
19
|
-
import * as NativeComponentRegistry from '../NativeComponent/NativeComponentRegistry';
|
|
20
|
-
|
|
21
|
-
type RCTTextInlineImageNativeProps = $ReadOnly<{
|
|
22
|
-
...ViewProps,
|
|
23
|
-
resizeMode?: ?ImageResizeMode,
|
|
24
|
-
src?: ?$ReadOnlyArray<?$ReadOnly<{uri?: ?string, ...}>>,
|
|
25
|
-
tintColor?: ?ColorValue,
|
|
26
|
-
headers?: ?{[string]: string},
|
|
27
|
-
}>;
|
|
28
|
-
|
|
29
|
-
export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
|
|
30
|
-
uiViewClassName: 'RCTTextInlineImage',
|
|
31
|
-
bubblingEventTypes: {},
|
|
32
|
-
directEventTypes: {},
|
|
33
|
-
validAttributes: {
|
|
34
|
-
resizeMode: true,
|
|
35
|
-
src: true,
|
|
36
|
-
tintColor: {
|
|
37
|
-
process: require('../StyleSheet/processColor').default,
|
|
38
|
-
},
|
|
39
|
-
headers: true,
|
|
40
|
-
},
|
|
41
|
-
};
|
|
42
|
-
|
|
43
|
-
const TextInlineImage: HostComponent<RCTTextInlineImageNativeProps> =
|
|
44
|
-
NativeComponentRegistry.get<RCTTextInlineImageNativeProps>(
|
|
45
|
-
'RCTTextInlineImage',
|
|
46
|
-
() => __INTERNAL_VIEW_CONFIG,
|
|
47
|
-
);
|
|
48
|
-
|
|
49
|
-
export default TextInlineImage;
|