@office-iss/react-native-win32 0.71.4 → 0.72.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/.flowconfig +15 -3
- package/CHANGELOG.json +310 -40
- package/CHANGELOG.md +145 -23
- package/IntegrationTests/IntegrationTestHarnessTest.js +1 -0
- package/Libraries/ActionSheetIOS/ActionSheetIOS.js +1 -1
- package/Libraries/Alert/Alert.d.ts +4 -4
- package/Libraries/Alert/Alert.win32.js +1 -0
- package/Libraries/Animated/Animated.d.ts +17 -6
- package/Libraries/Animated/NativeAnimatedHelper.js +18 -6
- package/Libraries/Animated/NativeAnimatedHelper.win32.js +606 -0
- package/Libraries/Animated/bezier.js +1 -1
- package/Libraries/Animated/components/AnimatedFlatList.js +8 -3
- package/Libraries/Animated/components/AnimatedScrollView.js +4 -1
- package/Libraries/Animated/components/AnimatedSectionList.js +12 -3
- package/Libraries/Animated/createAnimatedComponent.js +26 -239
- package/Libraries/Animated/nodes/AnimatedColor.js +47 -80
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +167 -121
- package/Libraries/Animated/nodes/AnimatedNode.js +3 -5
- package/Libraries/Animated/nodes/AnimatedProps.js +7 -6
- package/Libraries/Animated/nodes/AnimatedStyle.js +42 -8
- package/Libraries/Animated/nodes/AnimatedTransform.js +1 -1
- package/Libraries/Animated/nodes/AnimatedValue.js +8 -12
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -1
- package/Libraries/Animated/useAnimatedProps.js +7 -10
- package/Libraries/BatchedBridge/MessageQueue.js +2 -1
- package/Libraries/BatchedBridge/NativeModules.d.ts +1 -1
- package/Libraries/BatchedBridge/NativeModules.js +1 -0
- package/Libraries/Blob/Blob.js +4 -0
- package/Libraries/Blob/FileReader.js +30 -2
- package/Libraries/Blob/URL.js +3 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +2 -2
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +2 -3
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +2 -3
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +6 -4
- package/Libraries/Components/Button.js +3 -2
- package/Libraries/Components/Button.win32.js +451 -0
- package/Libraries/Components/Clipboard/Clipboard.js +1 -1
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -0
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +1 -0
- package/Libraries/Components/Pressable/Pressable.d.ts +1 -1
- package/Libraries/Components/Pressable/Pressable.js +1 -1
- package/Libraries/Components/RefreshControl/RefreshControl.js +1 -0
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +1 -2
- package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +1 -2
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +12 -6
- package/Libraries/Components/ScrollView/ScrollView.d.ts +2 -2
- package/Libraries/Components/ScrollView/ScrollView.js +149 -91
- package/Libraries/Components/ScrollView/ScrollView.win32.js +1939 -0
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +16 -6
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +5 -7
- package/Libraries/Components/ScrollView/ScrollViewViewConfig.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +3 -0
- package/Libraries/Components/Switch/Switch.js +3 -1
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +21 -11
- package/Libraries/Components/TextInput/InputAccessoryView.d.ts +1 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +11 -5
- package/Libraries/Components/TextInput/TextInput.Types.win32.d.ts +51 -0
- package/Libraries/Components/TextInput/TextInput.Types.win32.js +3 -0
- package/Libraries/Components/TextInput/TextInput.Types.win32.js.map +1 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +15 -5
- package/Libraries/Components/TextInput/TextInput.flow.js +1 -1
- package/Libraries/Components/TextInput/TextInput.js +130 -103
- package/Libraries/Components/TextInput/TextInput.win32.js +202 -890
- package/Libraries/Components/Touchable/Touchable.d.ts +1 -1
- package/Libraries/Components/Touchable/Touchable.flow.js +30 -4
- package/Libraries/Components/Touchable/Touchable.js +6 -3
- package/Libraries/Components/Touchable/Touchable.win32.js +6 -3
- package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +2 -2
- package/Libraries/Components/Touchable/TouchableOpacity.js +3 -0
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.d.ts +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +2 -2
- package/Libraries/Components/TraceUpdateOverlay/TraceUpdateOverlay.js +189 -0
- package/Libraries/Components/TraceUpdateOverlay/TraceUpdateOverlayNativeComponent.js +43 -0
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +26 -0
- package/Libraries/Components/View/View.js +71 -45
- package/Libraries/Components/View/View.win32.js +38 -16
- package/Libraries/Components/View/ViewAccessibility.d.ts +6 -6
- package/Libraries/Components/View/ViewAccessibility.js +10 -1
- package/Libraries/Components/View/ViewAccessibility.win32.d.ts +5 -5
- package/Libraries/Components/View/ViewNativeComponent.js +32 -8
- package/Libraries/Components/View/ViewPropTypes.d.ts +1 -1
- package/Libraries/Components/View/ViewPropTypes.js +1 -1
- package/Libraries/Components/View/ViewPropTypes.win32.d.ts +1 -1
- package/Libraries/Components/View/ViewPropTypes.win32.js +1 -1
- package/Libraries/Core/Devtools/openFileInEditor.js +1 -0
- package/Libraries/Core/Devtools/openURLInBrowser.js +1 -0
- package/Libraries/Core/Devtools/parseErrorStack.js +2 -2
- package/Libraries/Core/Devtools/parseHermesStack.js +54 -34
- package/Libraries/Core/ExceptionsManager.js +2 -2
- package/Libraries/Core/InitializeCore.js +2 -1
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Core/ReactNativeVersionCheck.js +1 -9
- package/Libraries/Core/ReactNativeVersionCheck.win32.js +1 -9
- package/Libraries/Core/Timers/JSTimers.js +1 -1
- package/Libraries/Core/Timers/immediateShim.js +1 -0
- package/Libraries/Core/Timers/queueMicrotask.js +1 -1
- package/Libraries/Core/setUpAlert.js +1 -1
- package/Libraries/Core/setUpDOM.js +18 -0
- package/Libraries/Core/setUpDeveloperTools.js +1 -1
- package/Libraries/Core/setUpGlobals.js +5 -2
- package/Libraries/Core/setUpNavigator.js +6 -5
- package/Libraries/Core/setUpPerformance.js +23 -13
- package/Libraries/Core/setUpReactDevTools.js +2 -0
- package/Libraries/Core/setUpSegmentFetcher.js +0 -41
- package/Libraries/Core/setUpTimers.js +2 -2
- package/Libraries/DOM/Geometry/DOMRect.js +82 -0
- package/Libraries/DOM/Geometry/DOMRectReadOnly.js +188 -0
- package/Libraries/DOM/Nodes/ReactNativeElement.js +75 -0
- package/Libraries/DOM/Nodes/ReadOnlyElement.js +89 -0
- package/Libraries/DOM/Nodes/ReadOnlyNode.js +167 -0
- package/Libraries/DOM/OldStyleCollections/ArrayLikeUtils.js +46 -0
- package/Libraries/DOM/OldStyleCollections/DOMRectList.js +76 -0
- package/Libraries/DOM/OldStyleCollections/HTMLCollection.js +82 -0
- package/Libraries/DOM/OldStyleCollections/NodeList.js +104 -0
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.android.js +35 -0
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.d.ts +20 -0
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.ios.js +49 -0
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.win32.js +35 -0
- package/Libraries/{Utilities/NativeDevSplitBundleLoader.js → DevToolsSettings/NativeDevToolsSettingsManager.js} +7 -2
- package/Libraries/EventEmitter/NativeEventEmitter.d.ts +1 -2
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.d.ts +1 -2
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +9 -1
- package/Libraries/Events/EventPolyfill.js +1 -1
- package/Libraries/Image/AssetRegistry.js +1 -1
- package/Libraries/Image/AssetSourceResolver.js +3 -3
- package/Libraries/Image/Image.android.js +4 -1
- package/Libraries/Image/Image.d.ts +63 -2
- package/Libraries/Image/Image.ios.js +3 -0
- package/Libraries/Image/Image.win32.js +3 -0
- package/Libraries/Image/ImageBackground.js +1 -0
- package/Libraries/Image/ImageProps.js +1 -1
- package/Libraries/Image/ImageViewNativeComponent.js +4 -4
- package/Libraries/Image/RelativeImageStub.js +1 -1
- package/Libraries/Image/TextInlineImageNativeComponent.js +1 -1
- package/Libraries/Image/resolveAssetSource.js +1 -1
- package/Libraries/Inspector/DevtoolsOverlay.js +29 -19
- package/Libraries/Inspector/ElementBox.js +4 -1
- package/Libraries/Inspector/Inspector.js +5 -6
- package/Libraries/Inspector/Inspector.win32.js +7 -6
- package/Libraries/Inspector/InspectorOverlay.js +3 -3
- package/Libraries/Inspector/InspectorOverlay.win32.js +2 -1
- package/Libraries/Inspector/NetworkOverlay.js +1 -1
- package/Libraries/Interaction/JSEventLoopWatchdog.js +1 -1
- package/Libraries/Interaction/PanResponder.js +5 -6
- package/Libraries/LayoutAnimation/LayoutAnimation.js +2 -1
- package/Libraries/Linking/Linking.js +1 -4
- package/Libraries/Lists/FillRateHelper.js +4 -238
- package/Libraries/Lists/FlatList.d.ts +15 -22
- package/Libraries/Lists/FlatList.js +9 -6
- package/Libraries/Lists/SectionList.d.ts +10 -6
- package/Libraries/Lists/SectionList.js +5 -3
- package/Libraries/Lists/SectionListModern.js +3 -3
- package/Libraries/Lists/ViewabilityHelper.js +8 -344
- package/Libraries/Lists/VirtualizeUtils.js +4 -244
- package/Libraries/Lists/VirtualizedList.js +10 -1867
- package/Libraries/Lists/VirtualizedListContext.js +6 -104
- package/Libraries/Lists/VirtualizedSectionList.js +9 -602
- package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +1 -0
- package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/Data/parseLogBoxLog.js +1 -1
- package/Libraries/LogBox/LogBox.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspector.js +1 -3
- package/Libraries/LogBox/UI/LogBoxInspectorCodeFrame.win32.js +168 -0
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +3 -0
- package/Libraries/LogBox/UI/LogBoxInspectorReactFrames.win32.js +193 -0
- package/Libraries/LogBox/UI/LogBoxInspectorSourceMapStatus.js +1 -0
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.js +2 -2
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrame.win32.js +7 -3
- package/Libraries/LogBox/UI/LogBoxMessage.js +87 -5
- package/Libraries/LogBox/UI/LogBoxNotification.js +5 -7
- package/Libraries/Modal/Modal.js +2 -2
- package/Libraries/NativeComponent/BaseViewConfig.android.js +32 -12
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +43 -19
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +43 -19
- package/Libraries/NativeComponent/NativeComponentRegistryUnstable.js +4 -1
- package/Libraries/NativeComponent/ViewConfig.js +1 -0
- package/Libraries/NativeComponent/ViewConfigIgnore.js +1 -4
- package/Libraries/Network/RCTNetworking.android.js +2 -2
- package/Libraries/Network/RCTNetworking.ios.js +1 -1
- package/Libraries/Network/RCTNetworking.win32.js +1 -1
- package/Libraries/Network/XMLHttpRequest.js +1 -1
- package/Libraries/Pressability/Pressability.js +11 -5
- package/Libraries/Pressability/Pressability.win32.js +9 -3
- package/Libraries/ReactNative/AppContainer.js +7 -1
- package/Libraries/ReactNative/AppRegistry.d.ts +1 -1
- package/Libraries/ReactNative/AppRegistry.js +10 -13
- package/Libraries/ReactNative/FabricUIManager.js +24 -8
- package/Libraries/ReactNative/NativeUIManager.js +5 -5
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +10 -10
- package/Libraries/ReactNative/UIManager.js +142 -1
- package/Libraries/ReactNative/getCachedComponentWithDebugName.js +5 -5
- package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -1
- package/Libraries/ReactNative/requireNativeComponent.d.ts +1 -1
- package/Libraries/ReactNative/requireNativeComponent.js +1 -1
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +1 -0
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +26 -3
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +13 -1
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +13 -1
- package/Libraries/Renderer/public/ReactFabricPublicInstanceUtils.js +38 -0
- package/Libraries/Renderer/shims/ReactNativeTypes.js +38 -20
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +7 -7
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -2
- package/Libraries/Share/Share.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.win32.js +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +115 -76
- package/Libraries/StyleSheet/StyleSheetTypes.js +188 -33
- package/Libraries/StyleSheet/flattenStyle.js +2 -0
- package/Libraries/StyleSheet/normalizeColor.js +1 -1
- package/Libraries/StyleSheet/processColor.js +1 -1
- package/Libraries/Text/Text.d.ts +12 -2
- package/Libraries/Text/Text.js +50 -41
- package/Libraries/Text/TextProps.js +3 -4
- package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +6 -0
- package/Libraries/Types/CodegenTypes.js +1 -0
- package/Libraries/UTFSequence.js +3 -1
- package/Libraries/Utilities/Appearance.d.ts +10 -0
- package/Libraries/Utilities/Appearance.js +13 -0
- package/Libraries/Utilities/Dimensions.js +1 -1
- package/Libraries/Utilities/Dimensions.win32.js +1 -1
- package/Libraries/Utilities/GlobalPerformanceLogger.js +12 -1
- package/Libraries/Utilities/HMRClient.js +16 -10
- package/Libraries/Utilities/{createPerformanceLogger.d.ts → IPerformanceLogger.d.ts} +4 -4
- package/Libraries/Utilities/IPerformanceLogger.js +49 -0
- package/Libraries/Utilities/LoadingView.android.js +28 -11
- package/Libraries/Utilities/NativeAppearance.js +1 -0
- package/Libraries/Utilities/NativePlatformConstantsWin.js +1 -1
- package/Libraries/Utilities/PixelRatio.js +2 -2
- package/Libraries/Utilities/Platform.win32.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/Utilities/__mocks__/PixelRatio.js +1 -1
- package/Libraries/Utilities/codegenNativeCommands.js +2 -0
- package/Libraries/Utilities/createPerformanceLogger.js +55 -43
- package/Libraries/Utilities/stringifySafe.js +2 -7
- package/Libraries/Utilities/useColorScheme.js +1 -1
- package/Libraries/Utilities/useWindowDimensions.js +3 -3
- package/Libraries/WebPerformance/EventCounts.js +78 -0
- package/Libraries/WebPerformance/MemoryInfo.js +54 -0
- package/Libraries/WebPerformance/NativePerformance.js +38 -0
- package/Libraries/WebPerformance/NativePerformanceObserver.js +22 -7
- package/Libraries/WebPerformance/Performance.js +312 -0
- package/Libraries/WebPerformance/PerformanceEntry.js +45 -0
- package/Libraries/WebPerformance/PerformanceEventTiming.js +38 -0
- package/Libraries/WebPerformance/PerformanceObserver.js +196 -101
- package/Libraries/WebPerformance/RawPerformanceEntry.js +87 -0
- package/Libraries/WebPerformance/ReactNativeStartupTiming.js +65 -0
- package/Libraries/WebPerformance/__mocks__/NativePerformance.js +65 -0
- package/Libraries/WebPerformance/__mocks__/NativePerformanceObserver.js +101 -0
- package/Libraries/YellowBox/YellowBoxDeprecated.js +1 -1
- package/Libraries/vendor/core/ErrorUtils.js +1 -1
- package/Libraries/vendor/emitter/EventEmitter.d.ts +2 -2
- package/Libraries/vendor/emitter/EventEmitter.js +9 -1
- package/flow/global.js +29 -4
- package/flow/jest.js +258 -164
- package/index.js +56 -42
- package/index.win32.js +56 -42
- package/interface.js +1 -1
- package/jest/local-setup.js +33 -0
- package/jest/mockComponent.js +4 -2
- package/jest/mockNativeComponent.js +1 -1
- package/jest/mockScrollView.js +2 -1
- package/jest/react-native-env.js +1 -3
- package/jest/setup.js +11 -8
- package/overrides.json +115 -85
- package/package.json +38 -28
- package/rn-get-polyfills.js +1 -1
- package/src/Libraries/Components/TextInput/TextInput.Types.win32.ts +68 -0
- package/src/Libraries/Components/View/ViewAccessibility.win32.d.ts +5 -5
- package/src/Libraries/Components/View/ViewPropTypes.win32.d.ts +1 -1
- package/types/index.d.ts +2 -6
- package/types/modules/Codegen.d.ts +4 -4
- package/types/modules/globals.d.ts +27 -25
- package/types/public/DeprecatedPropertiesAlias.d.ts +0 -20
- package/types/public/ReactNativeRenderer.d.ts +2 -7
- package/Libraries/Animated/createAnimatedComponentInjection.js +0 -48
- package/Libraries/Animated/createAnimatedComponent_EXPERIMENTAL.js +0 -48
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.flow.js +0 -208
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.flow.js +0 -58
- package/Libraries/Components/DatePicker/DatePickerIOS.android.js +0 -47
- package/Libraries/Components/DatePicker/DatePickerIOS.d.ts +0 -92
- package/Libraries/Components/DatePicker/DatePickerIOS.flow.android.js +0 -14
- package/Libraries/Components/DatePicker/DatePickerIOS.flow.ios.js +0 -113
- package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +0 -242
- package/Libraries/Components/DatePicker/DatePickerIOS.win32.js +0 -47
- package/Libraries/Components/DatePicker/RCTDatePickerNativeComponent.js +0 -60
- package/Libraries/Components/DatePickerAndroid/NativeDatePickerAndroid.js +0 -26
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.android.js +0 -45
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.d.ts +0 -62
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.ios.js +0 -75
- package/Libraries/Components/ProgressViewIOS/ProgressViewIOS.win32.js +0 -45
- package/Libraries/Components/ProgressViewIOS/RCTProgressViewNativeComponent.js +0 -33
- package/Libraries/Components/SafeAreaView/SafeAreaView.flow.js +0 -19
- package/Libraries/Components/Slider/Slider.d.ts +0 -132
- package/Libraries/Components/Slider/Slider.js +0 -282
- package/Libraries/Components/Slider/SliderNativeComponent.js +0 -56
- package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +0 -23
- package/Libraries/Interaction/Batchinator.js +0 -76
- package/Libraries/Interaction/BridgeSpyStallHandler.js +0 -63
- package/Libraries/Interaction/InteractionStallDebugger.js +0 -23
- package/Libraries/Interaction/PanResponder.flow.js +0 -257
- package/Libraries/Lists/CellRenderMask.js +0 -155
- package/Libraries/Lists/ChildListCollection.js +0 -72
- package/Libraries/Lists/StateSafePureComponent.js +0 -85
- package/Libraries/Lists/VirtualizedList.d.ts +0 -347
- package/Libraries/Lists/VirtualizedListCellRenderer.js +0 -259
- package/Libraries/Lists/VirtualizedListProps.js +0 -279
- package/Libraries/Performance/PureComponentDebug.js +0 -74
- package/Libraries/Reliability/UserFlow.js +0 -158
- package/Libraries/Renderer/implementations/ReactNativeRenderer.d.ts +0 -149
- package/Libraries/Renderer/shims/ReactNativeTypes.d.ts +0 -141
- package/Libraries/Utilities/MatrixMath.js +0 -748
- package/Libraries/Utilities/buildStyleInterpolator.js +0 -209
- package/Libraries/Utilities/clamp.js +0 -23
- package/Libraries/Utilities/deprecatedPropType.js +0 -36
- package/Libraries/Utilities/groupByEveryN.js +0 -51
- package/Libraries/Utilities/mergeIntoFast.js +0 -26
- package/Libraries/Utilities/setAndForwardRef.js +0 -71
- package/Libraries/Utilities/truncate.js +0 -51
- package/flow/JSITimerInternalType.js +0 -30
- package/flow/use-sync-external-store.js +0 -19
|
@@ -7,6 +7,7 @@
|
|
|
7
7
|
* @format
|
|
8
8
|
*/
|
|
9
9
|
|
|
10
|
+
import {Animated} from '../Animated/Animated';
|
|
10
11
|
import {ImageResizeMode} from '../Image/ImageResizeMode';
|
|
11
12
|
import {ColorValue} from './StyleSheet';
|
|
12
13
|
|
|
@@ -17,6 +18,15 @@ type FlexAlignType =
|
|
|
17
18
|
| 'stretch'
|
|
18
19
|
| 'baseline';
|
|
19
20
|
|
|
21
|
+
type DimensionValue =
|
|
22
|
+
| number
|
|
23
|
+
| 'auto'
|
|
24
|
+
| `${number}%`
|
|
25
|
+
| Animated.AnimatedNode
|
|
26
|
+
| null;
|
|
27
|
+
type AnimatableNumericValue = number | Animated.AnimatedNode;
|
|
28
|
+
type AnimatableStringValue = string | Animated.AnimatedNode;
|
|
29
|
+
|
|
20
30
|
/**
|
|
21
31
|
* Flex Prop Types
|
|
22
32
|
* @see https://reactnative.dev/docs/flexbox
|
|
@@ -35,17 +45,17 @@ export interface FlexStyle {
|
|
|
35
45
|
alignSelf?: 'auto' | FlexAlignType | undefined;
|
|
36
46
|
aspectRatio?: number | string | undefined;
|
|
37
47
|
borderBottomWidth?: number | undefined;
|
|
38
|
-
borderEndWidth?: number |
|
|
48
|
+
borderEndWidth?: number | undefined;
|
|
39
49
|
borderLeftWidth?: number | undefined;
|
|
40
50
|
borderRightWidth?: number | undefined;
|
|
41
|
-
borderStartWidth?: number |
|
|
51
|
+
borderStartWidth?: number | undefined;
|
|
42
52
|
borderTopWidth?: number | undefined;
|
|
43
53
|
borderWidth?: number | undefined;
|
|
44
|
-
bottom?:
|
|
54
|
+
bottom?: DimensionValue | undefined;
|
|
45
55
|
display?: 'none' | 'flex' | undefined;
|
|
46
|
-
end?:
|
|
56
|
+
end?: DimensionValue | undefined;
|
|
47
57
|
flex?: number | undefined;
|
|
48
|
-
flexBasis?:
|
|
58
|
+
flexBasis?: DimensionValue | undefined;
|
|
49
59
|
flexDirection?:
|
|
50
60
|
| 'row'
|
|
51
61
|
| 'column'
|
|
@@ -58,7 +68,14 @@ export interface FlexStyle {
|
|
|
58
68
|
flexGrow?: number | undefined;
|
|
59
69
|
flexShrink?: number | undefined;
|
|
60
70
|
flexWrap?: 'wrap' | 'nowrap' | 'wrap-reverse' | undefined;
|
|
61
|
-
height?:
|
|
71
|
+
height?: DimensionValue | undefined;
|
|
72
|
+
inset?: DimensionValue | undefined;
|
|
73
|
+
insetBlock?: DimensionValue | undefined;
|
|
74
|
+
insetBlockEnd?: DimensionValue | undefined;
|
|
75
|
+
insetBlockStart?: DimensionValue | undefined;
|
|
76
|
+
insetInline?: DimensionValue | undefined;
|
|
77
|
+
insetInlineEnd?: DimensionValue | undefined;
|
|
78
|
+
insetInlineStart?: DimensionValue | undefined;
|
|
62
79
|
justifyContent?:
|
|
63
80
|
| 'flex-start'
|
|
64
81
|
| 'flex-end'
|
|
@@ -67,35 +84,47 @@ export interface FlexStyle {
|
|
|
67
84
|
| 'space-around'
|
|
68
85
|
| 'space-evenly'
|
|
69
86
|
| undefined;
|
|
70
|
-
left?:
|
|
71
|
-
margin?:
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
|
|
76
|
-
|
|
77
|
-
|
|
78
|
-
|
|
79
|
-
|
|
80
|
-
|
|
81
|
-
|
|
82
|
-
|
|
83
|
-
|
|
87
|
+
left?: DimensionValue | undefined;
|
|
88
|
+
margin?: DimensionValue | undefined;
|
|
89
|
+
marginBlock?: DimensionValue | undefined;
|
|
90
|
+
marginBlockEnd?: DimensionValue | undefined;
|
|
91
|
+
marginBlockStart?: DimensionValue | undefined;
|
|
92
|
+
marginBottom?: DimensionValue | undefined;
|
|
93
|
+
marginEnd?: DimensionValue | undefined;
|
|
94
|
+
marginHorizontal?: DimensionValue | undefined;
|
|
95
|
+
marginInline?: DimensionValue | undefined;
|
|
96
|
+
marginInlineEnd?: DimensionValue | undefined;
|
|
97
|
+
marginInlineStart?: DimensionValue | undefined;
|
|
98
|
+
marginLeft?: DimensionValue | undefined;
|
|
99
|
+
marginRight?: DimensionValue | undefined;
|
|
100
|
+
marginStart?: DimensionValue | undefined;
|
|
101
|
+
marginTop?: DimensionValue | undefined;
|
|
102
|
+
marginVertical?: DimensionValue | undefined;
|
|
103
|
+
maxHeight?: DimensionValue | undefined;
|
|
104
|
+
maxWidth?: DimensionValue | undefined;
|
|
105
|
+
minHeight?: DimensionValue | undefined;
|
|
106
|
+
minWidth?: DimensionValue | undefined;
|
|
84
107
|
overflow?: 'visible' | 'hidden' | 'scroll' | undefined;
|
|
85
|
-
padding?:
|
|
86
|
-
paddingBottom?:
|
|
87
|
-
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
93
|
-
|
|
108
|
+
padding?: DimensionValue | undefined;
|
|
109
|
+
paddingBottom?: DimensionValue | undefined;
|
|
110
|
+
paddingBlock?: DimensionValue | undefined;
|
|
111
|
+
paddingBlockEnd?: DimensionValue | undefined;
|
|
112
|
+
paddingBlockStart?: DimensionValue | undefined;
|
|
113
|
+
paddingEnd?: DimensionValue | undefined;
|
|
114
|
+
paddingHorizontal?: DimensionValue | undefined;
|
|
115
|
+
paddingInline?: DimensionValue | undefined;
|
|
116
|
+
paddingInlineEnd?: DimensionValue | undefined;
|
|
117
|
+
paddingInlineStart?: DimensionValue | undefined;
|
|
118
|
+
paddingLeft?: DimensionValue | undefined;
|
|
119
|
+
paddingRight?: DimensionValue | undefined;
|
|
120
|
+
paddingStart?: DimensionValue | undefined;
|
|
121
|
+
paddingTop?: DimensionValue | undefined;
|
|
122
|
+
paddingVertical?: DimensionValue | undefined;
|
|
94
123
|
position?: 'absolute' | 'relative' | undefined;
|
|
95
|
-
right?:
|
|
96
|
-
start?:
|
|
97
|
-
top?:
|
|
98
|
-
width?:
|
|
124
|
+
right?: DimensionValue | undefined;
|
|
125
|
+
start?: DimensionValue | undefined;
|
|
126
|
+
top?: DimensionValue | undefined;
|
|
127
|
+
width?: DimensionValue | undefined;
|
|
99
128
|
zIndex?: number | undefined;
|
|
100
129
|
|
|
101
130
|
/**
|
|
@@ -106,61 +135,61 @@ export interface FlexStyle {
|
|
|
106
135
|
|
|
107
136
|
export interface ShadowStyleIOS {
|
|
108
137
|
shadowColor?: ColorValue | undefined;
|
|
109
|
-
shadowOffset?: {width: number; height: number} | undefined;
|
|
110
|
-
shadowOpacity?:
|
|
138
|
+
shadowOffset?: Readonly<{width: number; height: number}> | undefined;
|
|
139
|
+
shadowOpacity?: AnimatableNumericValue | undefined;
|
|
111
140
|
shadowRadius?: number | undefined;
|
|
112
141
|
}
|
|
113
142
|
|
|
114
143
|
interface PerpectiveTransform {
|
|
115
|
-
perspective:
|
|
144
|
+
perspective: AnimatableNumericValue;
|
|
116
145
|
}
|
|
117
146
|
|
|
118
147
|
interface RotateTransform {
|
|
119
|
-
rotate:
|
|
148
|
+
rotate: AnimatableStringValue;
|
|
120
149
|
}
|
|
121
150
|
|
|
122
151
|
interface RotateXTransform {
|
|
123
|
-
rotateX:
|
|
152
|
+
rotateX: AnimatableStringValue;
|
|
124
153
|
}
|
|
125
154
|
|
|
126
155
|
interface RotateYTransform {
|
|
127
|
-
rotateY:
|
|
156
|
+
rotateY: AnimatableStringValue;
|
|
128
157
|
}
|
|
129
158
|
|
|
130
159
|
interface RotateZTransform {
|
|
131
|
-
rotateZ:
|
|
160
|
+
rotateZ: AnimatableStringValue;
|
|
132
161
|
}
|
|
133
162
|
|
|
134
163
|
interface ScaleTransform {
|
|
135
|
-
scale:
|
|
164
|
+
scale: AnimatableNumericValue;
|
|
136
165
|
}
|
|
137
166
|
|
|
138
167
|
interface ScaleXTransform {
|
|
139
|
-
scaleX:
|
|
168
|
+
scaleX: AnimatableNumericValue;
|
|
140
169
|
}
|
|
141
170
|
|
|
142
171
|
interface ScaleYTransform {
|
|
143
|
-
scaleY:
|
|
172
|
+
scaleY: AnimatableNumericValue;
|
|
144
173
|
}
|
|
145
174
|
|
|
146
175
|
interface TranslateXTransform {
|
|
147
|
-
translateX:
|
|
176
|
+
translateX: AnimatableNumericValue;
|
|
148
177
|
}
|
|
149
178
|
|
|
150
179
|
interface TranslateYTransform {
|
|
151
|
-
translateY:
|
|
180
|
+
translateY: AnimatableNumericValue;
|
|
152
181
|
}
|
|
153
182
|
|
|
154
183
|
interface SkewXTransform {
|
|
155
|
-
skewX:
|
|
184
|
+
skewX: AnimatableStringValue;
|
|
156
185
|
}
|
|
157
186
|
|
|
158
187
|
interface SkewYTransform {
|
|
159
|
-
skewY:
|
|
188
|
+
skewY: AnimatableStringValue;
|
|
160
189
|
}
|
|
161
190
|
|
|
162
191
|
interface MatrixTransform {
|
|
163
|
-
matrix:
|
|
192
|
+
matrix: AnimatableNumericValue[];
|
|
164
193
|
}
|
|
165
194
|
|
|
166
195
|
export interface TransformsStyle {
|
|
@@ -188,23 +217,23 @@ export interface TransformsStyle {
|
|
|
188
217
|
/**
|
|
189
218
|
* @deprecated Use rotate in transform prop instead.
|
|
190
219
|
*/
|
|
191
|
-
rotation?:
|
|
220
|
+
rotation?: AnimatableNumericValue | undefined;
|
|
192
221
|
/**
|
|
193
222
|
* @deprecated Use scaleX in transform prop instead.
|
|
194
223
|
*/
|
|
195
|
-
scaleX?:
|
|
224
|
+
scaleX?: AnimatableNumericValue | undefined;
|
|
196
225
|
/**
|
|
197
226
|
* @deprecated Use scaleY in transform prop instead.
|
|
198
227
|
*/
|
|
199
|
-
scaleY?:
|
|
228
|
+
scaleY?: AnimatableNumericValue | undefined;
|
|
200
229
|
/**
|
|
201
230
|
* @deprecated Use translateX in transform prop instead.
|
|
202
231
|
*/
|
|
203
|
-
translateX?:
|
|
232
|
+
translateX?: AnimatableNumericValue | undefined;
|
|
204
233
|
/**
|
|
205
234
|
* @deprecated Use translateY in transform prop instead.
|
|
206
235
|
*/
|
|
207
|
-
translateY?:
|
|
236
|
+
translateY?: AnimatableNumericValue | undefined;
|
|
208
237
|
}
|
|
209
238
|
|
|
210
239
|
/**
|
|
@@ -213,29 +242,36 @@ export interface TransformsStyle {
|
|
|
213
242
|
export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
|
|
214
243
|
backfaceVisibility?: 'visible' | 'hidden' | undefined;
|
|
215
244
|
backgroundColor?: ColorValue | undefined;
|
|
245
|
+
borderBlockColor?: ColorValue | undefined;
|
|
246
|
+
borderBlockEndColor?: ColorValue | undefined;
|
|
247
|
+
borderBlockStartColor?: ColorValue | undefined;
|
|
216
248
|
borderBottomColor?: ColorValue | undefined;
|
|
217
|
-
borderBottomEndRadius?:
|
|
218
|
-
borderBottomLeftRadius?:
|
|
219
|
-
borderBottomRightRadius?:
|
|
220
|
-
borderBottomStartRadius?:
|
|
221
|
-
borderBottomWidth?: number | undefined;
|
|
249
|
+
borderBottomEndRadius?: AnimatableNumericValue | undefined;
|
|
250
|
+
borderBottomLeftRadius?: AnimatableNumericValue | undefined;
|
|
251
|
+
borderBottomRightRadius?: AnimatableNumericValue | undefined;
|
|
252
|
+
borderBottomStartRadius?: AnimatableNumericValue | undefined;
|
|
222
253
|
borderColor?: ColorValue | undefined;
|
|
254
|
+
/**
|
|
255
|
+
* On iOS 13+, it is possible to change the corner curve of borders.
|
|
256
|
+
* @platform ios
|
|
257
|
+
*/
|
|
258
|
+
borderCurve?: 'circular' | 'continuous' | undefined;
|
|
223
259
|
borderEndColor?: ColorValue | undefined;
|
|
260
|
+
borderEndEndRadius?: AnimatableNumericValue | undefined;
|
|
261
|
+
borderEndStartRadius?: AnimatableNumericValue | undefined;
|
|
224
262
|
borderLeftColor?: ColorValue | undefined;
|
|
225
|
-
|
|
226
|
-
borderRadius?: number | undefined;
|
|
263
|
+
borderRadius?: AnimatableNumericValue | undefined;
|
|
227
264
|
borderRightColor?: ColorValue | undefined;
|
|
228
|
-
borderRightWidth?: number | undefined;
|
|
229
265
|
borderStartColor?: ColorValue | undefined;
|
|
266
|
+
borderStartEndRadius?: AnimatableNumericValue | undefined;
|
|
267
|
+
borderStartStartRadius?: AnimatableNumericValue | undefined;
|
|
230
268
|
borderStyle?: 'solid' | 'dotted' | 'dashed' | undefined;
|
|
231
269
|
borderTopColor?: ColorValue | undefined;
|
|
232
|
-
borderTopEndRadius?:
|
|
233
|
-
borderTopLeftRadius?:
|
|
234
|
-
borderTopRightRadius?:
|
|
235
|
-
borderTopStartRadius?:
|
|
236
|
-
|
|
237
|
-
borderWidth?: number | undefined;
|
|
238
|
-
opacity?: number | undefined;
|
|
270
|
+
borderTopEndRadius?: AnimatableNumericValue | undefined;
|
|
271
|
+
borderTopLeftRadius?: AnimatableNumericValue | undefined;
|
|
272
|
+
borderTopRightRadius?: AnimatableNumericValue | undefined;
|
|
273
|
+
borderTopStartRadius?: AnimatableNumericValue | undefined;
|
|
274
|
+
opacity?: AnimatableNumericValue | undefined;
|
|
239
275
|
/**
|
|
240
276
|
* Sets the elevation of a view, using Android's underlying
|
|
241
277
|
* [elevation API](https://developer.android.com/training/material/shadows-clipping.html#Elevation).
|
|
@@ -245,6 +281,10 @@ export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
|
|
|
245
281
|
* @platform android
|
|
246
282
|
*/
|
|
247
283
|
elevation?: number | undefined;
|
|
284
|
+
/**
|
|
285
|
+
* Controls whether the View can be the target of touch events.
|
|
286
|
+
*/
|
|
287
|
+
pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto' | undefined;
|
|
248
288
|
}
|
|
249
289
|
|
|
250
290
|
export type FontVariant =
|
|
@@ -255,7 +295,6 @@ export type FontVariant =
|
|
|
255
295
|
| 'proportional-nums';
|
|
256
296
|
export interface TextStyleIOS extends ViewStyle {
|
|
257
297
|
fontVariant?: FontVariant[] | undefined;
|
|
258
|
-
letterSpacing?: number | undefined;
|
|
259
298
|
textDecorationColor?: ColorValue | undefined;
|
|
260
299
|
textDecorationStyle?: 'solid' | 'double' | 'dotted' | 'dashed' | undefined;
|
|
261
300
|
writingDirection?: 'auto' | 'ltr' | 'rtl' | undefined;
|
|
@@ -316,16 +355,16 @@ export interface TextStyle extends TextStyleIOS, TextStyleAndroid, ViewStyle {
|
|
|
316
355
|
export interface ImageStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
|
|
317
356
|
resizeMode?: ImageResizeMode | undefined;
|
|
318
357
|
backfaceVisibility?: 'visible' | 'hidden' | undefined;
|
|
319
|
-
borderBottomLeftRadius?:
|
|
320
|
-
borderBottomRightRadius?:
|
|
358
|
+
borderBottomLeftRadius?: AnimatableNumericValue | undefined;
|
|
359
|
+
borderBottomRightRadius?: AnimatableNumericValue | undefined;
|
|
321
360
|
backgroundColor?: ColorValue | undefined;
|
|
322
361
|
borderColor?: ColorValue | undefined;
|
|
323
|
-
|
|
324
|
-
|
|
325
|
-
|
|
326
|
-
borderTopRightRadius?: number | undefined;
|
|
362
|
+
borderRadius?: AnimatableNumericValue | undefined;
|
|
363
|
+
borderTopLeftRadius?: AnimatableNumericValue | undefined;
|
|
364
|
+
borderTopRightRadius?: AnimatableNumericValue | undefined;
|
|
327
365
|
overflow?: 'visible' | 'hidden' | undefined;
|
|
328
366
|
overlayColor?: ColorValue | undefined;
|
|
329
367
|
tintColor?: ColorValue | undefined;
|
|
330
|
-
opacity?:
|
|
368
|
+
opacity?: AnimatableNumericValue | undefined;
|
|
369
|
+
objectFit?: 'cover' | 'contain' | 'fill' | 'scale-down' | undefined;
|
|
331
370
|
}
|
|
@@ -33,7 +33,9 @@ export type EdgeInsetsValue = {
|
|
|
33
33
|
right: number,
|
|
34
34
|
bottom: number,
|
|
35
35
|
};
|
|
36
|
-
|
|
36
|
+
|
|
37
|
+
export type DimensionValue = number | string | 'auto' | AnimatedNode | null;
|
|
38
|
+
export type AnimatableNumericValue = number | AnimatedNode;
|
|
37
39
|
|
|
38
40
|
/**
|
|
39
41
|
* React Native's layout system is based on Flexbox and is powered both
|
|
@@ -132,6 +134,80 @@ type ____LayoutStyle_Internal = $ReadOnly<{
|
|
|
132
134
|
*/
|
|
133
135
|
top?: DimensionValue,
|
|
134
136
|
|
|
137
|
+
/** `inset` is a shorthand that corresponds to the top, right, bottom, and/or left properties.
|
|
138
|
+
*
|
|
139
|
+
* It works similarly to `inset` in CSS, but in React Native you
|
|
140
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
141
|
+
*
|
|
142
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/inset
|
|
143
|
+
* for more details of how `inset` affects layout.
|
|
144
|
+
*/
|
|
145
|
+
inset?: DimensionValue,
|
|
146
|
+
|
|
147
|
+
/** `insetBlock` is a shorthand that corresponds to the `insetBlockStart` and `insetBlockEnd` properties.
|
|
148
|
+
*
|
|
149
|
+
* It works similarly to `inset-block` in CSS, but in React Native you
|
|
150
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
151
|
+
*
|
|
152
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block
|
|
153
|
+
* for more details of how `inset-block` affects layout.
|
|
154
|
+
*/
|
|
155
|
+
insetBlock?: DimensionValue,
|
|
156
|
+
|
|
157
|
+
/** `insetBlockEnd` is a logical property that sets the length that an
|
|
158
|
+
* element is offset in the block direction from its ending edge.
|
|
159
|
+
*
|
|
160
|
+
* It works similarly to `inset-block-end` in CSS, but in React Native you
|
|
161
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
162
|
+
*
|
|
163
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block-end
|
|
164
|
+
* for more details of how `inset-block-end` affects layout.
|
|
165
|
+
*/
|
|
166
|
+
insetBlockEnd?: DimensionValue,
|
|
167
|
+
|
|
168
|
+
/** `insetBlockStart` is a logical property that sets the length that an
|
|
169
|
+
* element is offset in the block direction from its starting edge.
|
|
170
|
+
*
|
|
171
|
+
* It works similarly to `inset-block-start` in CSS, but in React Native you
|
|
172
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
173
|
+
*
|
|
174
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-block-start
|
|
175
|
+
* for more details of how `inset-block-start` affects layout.
|
|
176
|
+
*/
|
|
177
|
+
insetBlockStart?: DimensionValue,
|
|
178
|
+
|
|
179
|
+
/** `insetInline` is a shorthand that corresponds to the `insetInlineStart` and `insetInlineEnd` properties.
|
|
180
|
+
*
|
|
181
|
+
* It works similarly to `inset-inline` in CSS, but in React Native you
|
|
182
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
183
|
+
*
|
|
184
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline
|
|
185
|
+
* for more details of how `inset-inline` affects layout.
|
|
186
|
+
*/
|
|
187
|
+
insetInline?: DimensionValue,
|
|
188
|
+
|
|
189
|
+
/** `insetInlineEnd` is a logical property that sets the length that an
|
|
190
|
+
* element is offset in the starting inline direction.
|
|
191
|
+
*
|
|
192
|
+
* It works similarly to `inset-inline-end` in CSS, but in React Native you
|
|
193
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
194
|
+
*
|
|
195
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline-end
|
|
196
|
+
* for more details of how `inset-inline-end` affects layout.
|
|
197
|
+
*/
|
|
198
|
+
insetInlineEnd?: DimensionValue,
|
|
199
|
+
|
|
200
|
+
/** `insetInlineStart` is a logical property that sets the length that an
|
|
201
|
+
* element is offset in the starting inline direction.
|
|
202
|
+
*
|
|
203
|
+
* It works similarly to `inset-inline-start` in CSS, but in React Native you
|
|
204
|
+
* must use points or percentages. Ems and other units are not supported.
|
|
205
|
+
*
|
|
206
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/inset-inline-start
|
|
207
|
+
* for more details of how `inset-inline-start` affects layout.
|
|
208
|
+
*/
|
|
209
|
+
insetInlineStart?: DimensionValue,
|
|
210
|
+
|
|
135
211
|
/** `minWidth` is the minimum width for this component, in logical pixels.
|
|
136
212
|
*
|
|
137
213
|
* It works similarly to `min-width` in CSS, but in React Native you
|
|
@@ -179,8 +255,27 @@ type ____LayoutStyle_Internal = $ReadOnly<{
|
|
|
179
255
|
*/
|
|
180
256
|
margin?: DimensionValue,
|
|
181
257
|
|
|
258
|
+
/** Setting `marginBlock` has the same effect as setting both
|
|
259
|
+
* `marginTop` and `marginBottom`.
|
|
260
|
+
*/
|
|
261
|
+
marginBlock?: DimensionValue,
|
|
262
|
+
|
|
263
|
+
/** `marginBlockEnd` works like `margin-block-end`in CSS. Because React
|
|
264
|
+
* Native doesn not support `writing-mode` this is always mapped to
|
|
265
|
+
* `margin-bottom`. See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-block-end
|
|
266
|
+
* for more details.
|
|
267
|
+
*/
|
|
268
|
+
marginBlockEnd?: DimensionValue,
|
|
269
|
+
|
|
270
|
+
/** `marginBlockEnd` works like `margin-block-end`in CSS. Because React
|
|
271
|
+
* Native doesn not support `writing-mode` this is always mapped to
|
|
272
|
+
* `margin-top`. See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-block-end
|
|
273
|
+
* for more details.
|
|
274
|
+
*/
|
|
275
|
+
marginBlockStart?: DimensionValue,
|
|
276
|
+
|
|
182
277
|
/** `marginBottom` works like `margin-bottom` in CSS.
|
|
183
|
-
* See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-
|
|
278
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-block-start
|
|
184
279
|
* for more details.
|
|
185
280
|
*/
|
|
186
281
|
marginBottom?: DimensionValue,
|
|
@@ -196,6 +291,23 @@ type ____LayoutStyle_Internal = $ReadOnly<{
|
|
|
196
291
|
*/
|
|
197
292
|
marginHorizontal?: DimensionValue,
|
|
198
293
|
|
|
294
|
+
/** Setting `marginInline` has the same effect as setting
|
|
295
|
+
* both `marginLeft` and `marginRight`.
|
|
296
|
+
*/
|
|
297
|
+
marginInline?: DimensionValue,
|
|
298
|
+
|
|
299
|
+
/**
|
|
300
|
+
* When direction is `ltr`, `marginInlineEnd` is equivalent to `marginRight`.
|
|
301
|
+
* When direction is `rtl`, `marginInlineEnd` is equivalent to `marginLeft`.
|
|
302
|
+
*/
|
|
303
|
+
marginInlineEnd?: DimensionValue,
|
|
304
|
+
|
|
305
|
+
/**
|
|
306
|
+
* When direction is `ltr`, `marginInlineStart` is equivalent to `marginLeft`.
|
|
307
|
+
* When direction is `rtl`, `marginInlineStart` is equivalent to `marginRight`.
|
|
308
|
+
*/
|
|
309
|
+
marginInlineStart?: DimensionValue,
|
|
310
|
+
|
|
199
311
|
/** `marginLeft` works like `margin-left` in CSS.
|
|
200
312
|
* See https://developer.mozilla.org/en-US/docs/Web/CSS/margin-left
|
|
201
313
|
* for more details.
|
|
@@ -232,6 +344,25 @@ type ____LayoutStyle_Internal = $ReadOnly<{
|
|
|
232
344
|
*/
|
|
233
345
|
padding?: DimensionValue,
|
|
234
346
|
|
|
347
|
+
/** Setting `paddingBlock` is like setting both of
|
|
348
|
+
* `paddingTop` and `paddingBottom`.
|
|
349
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-block
|
|
350
|
+
* for more details.
|
|
351
|
+
*/
|
|
352
|
+
paddingBlock?: DimensionValue,
|
|
353
|
+
|
|
354
|
+
/** `paddingBlockEnd` works like `padding-bottom` in CSS.
|
|
355
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-block-end
|
|
356
|
+
* for more details.
|
|
357
|
+
*/
|
|
358
|
+
paddingBlockEnd?: DimensionValue,
|
|
359
|
+
|
|
360
|
+
/** `paddingBlockStart` works like `padding-top` in CSS.
|
|
361
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-block-start
|
|
362
|
+
* for more details.
|
|
363
|
+
*/
|
|
364
|
+
paddingBlockStart?: DimensionValue,
|
|
365
|
+
|
|
235
366
|
/** `paddingBottom` works like `padding-bottom` in CSS.
|
|
236
367
|
* See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-bottom
|
|
237
368
|
* for more details.
|
|
@@ -249,6 +380,23 @@ type ____LayoutStyle_Internal = $ReadOnly<{
|
|
|
249
380
|
*/
|
|
250
381
|
paddingHorizontal?: DimensionValue,
|
|
251
382
|
|
|
383
|
+
/** Setting `paddingInline` is like setting both of
|
|
384
|
+
* `paddingLeft` and `paddingRight`.
|
|
385
|
+
*/
|
|
386
|
+
paddingInline?: DimensionValue,
|
|
387
|
+
|
|
388
|
+
/**
|
|
389
|
+
* When direction is `ltr`, `paddingInlineEnd` is equivalent to `paddingRight`.
|
|
390
|
+
* When direction is `rtl`, `paddingInlineEnd` is equivalent to `paddingLeft`.
|
|
391
|
+
*/
|
|
392
|
+
paddingInlineEnd?: DimensionValue,
|
|
393
|
+
|
|
394
|
+
/**
|
|
395
|
+
* When direction is `ltr`, `paddingInlineStart` is equivalent to `paddingLeft`.
|
|
396
|
+
* When direction is `rtl`, `paddingInlineStart` is equivalent to `paddingRight`.
|
|
397
|
+
*/
|
|
398
|
+
paddingInlineStart?: DimensionValue,
|
|
399
|
+
|
|
252
400
|
/** `paddingLeft` works like `padding-left` in CSS.
|
|
253
401
|
* See https://developer.mozilla.org/en-US/docs/Web/CSS/padding-left
|
|
254
402
|
* for more details.
|
|
@@ -482,6 +630,19 @@ type ____LayoutStyle_Internal = $ReadOnly<{
|
|
|
482
630
|
* @platform ios
|
|
483
631
|
*/
|
|
484
632
|
direction?: 'inherit' | 'ltr' | 'rtl',
|
|
633
|
+
|
|
634
|
+
/**
|
|
635
|
+
* In React Native, gap works the same way it does in CSS.
|
|
636
|
+
* If there are two or more children in a container, they will be separated from each other
|
|
637
|
+
* by the value of the gap - but the children will not be separated from the edges of their parent container.
|
|
638
|
+
* For horizontal gaps, use columnGap, for vertical gaps, use rowGap, and to apply both at the same time, it's gap.
|
|
639
|
+
* When align-content or justify-content are set to space-between or space-around, the separation
|
|
640
|
+
* between children may be larger than the gap value.
|
|
641
|
+
* See https://developer.mozilla.org/en-US/docs/Web/CSS/gap for more details.
|
|
642
|
+
*/
|
|
643
|
+
rowGap?: number,
|
|
644
|
+
columnGap?: number,
|
|
645
|
+
gap?: number,
|
|
485
646
|
}>;
|
|
486
647
|
|
|
487
648
|
/**
|
|
@@ -512,25 +673,12 @@ export type ____ShadowStyle_InternalCore = $ReadOnly<{
|
|
|
512
673
|
* Sets the drop shadow opacity (multiplied by the color's alpha component)
|
|
513
674
|
* @platform ios
|
|
514
675
|
*/
|
|
515
|
-
shadowOpacity?:
|
|
676
|
+
shadowOpacity?: AnimatableNumericValue,
|
|
516
677
|
/**
|
|
517
678
|
* Sets the drop shadow blur radius
|
|
518
679
|
* @platform ios
|
|
519
680
|
*/
|
|
520
681
|
shadowRadius?: number,
|
|
521
|
-
|
|
522
|
-
/**
|
|
523
|
-
* In React Native, gap works the same way it does in CSS.
|
|
524
|
-
* If there are two or more children in a container, they will be separated from each other
|
|
525
|
-
* by the value of the gap - but the children will not be separated from the edges of their parent container.
|
|
526
|
-
* For horizontal gaps, use columnGap, for vertical gaps, use rowGap, and to apply both at the same time, it's gap.
|
|
527
|
-
* When align-content or justify-content are set to space-between or space-around, the separation
|
|
528
|
-
* between children may be larger than the gap value.
|
|
529
|
-
* See https://developer.mozilla.org/en-US/docs/Web/CSS/gap for more details.
|
|
530
|
-
*/
|
|
531
|
-
rowGap?: number,
|
|
532
|
-
columnGap?: number,
|
|
533
|
-
gap?: number,
|
|
534
682
|
}>;
|
|
535
683
|
|
|
536
684
|
export type ____ShadowStyle_Internal = $ReadOnly<{
|
|
@@ -552,24 +700,31 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
|
|
|
552
700
|
borderRightColor?: ____ColorValue_Internal,
|
|
553
701
|
borderStartColor?: ____ColorValue_Internal,
|
|
554
702
|
borderTopColor?: ____ColorValue_Internal,
|
|
555
|
-
|
|
556
|
-
|
|
557
|
-
|
|
558
|
-
|
|
559
|
-
|
|
560
|
-
|
|
561
|
-
|
|
562
|
-
|
|
563
|
-
|
|
703
|
+
borderBlockColor?: ____ColorValue_Internal,
|
|
704
|
+
borderBlockEndColor?: ____ColorValue_Internal,
|
|
705
|
+
borderBlockStartColor?: ____ColorValue_Internal,
|
|
706
|
+
borderRadius?: AnimatableNumericValue,
|
|
707
|
+
borderBottomEndRadius?: AnimatableNumericValue,
|
|
708
|
+
borderBottomLeftRadius?: AnimatableNumericValue,
|
|
709
|
+
borderBottomRightRadius?: AnimatableNumericValue,
|
|
710
|
+
borderBottomStartRadius?: AnimatableNumericValue,
|
|
711
|
+
borderEndEndRadius?: AnimatableNumericValue,
|
|
712
|
+
borderEndStartRadius?: AnimatableNumericValue,
|
|
713
|
+
borderStartEndRadius?: AnimatableNumericValue,
|
|
714
|
+
borderStartStartRadius?: AnimatableNumericValue,
|
|
715
|
+
borderTopEndRadius?: AnimatableNumericValue,
|
|
716
|
+
borderTopLeftRadius?: AnimatableNumericValue,
|
|
717
|
+
borderTopRightRadius?: AnimatableNumericValue,
|
|
718
|
+
borderTopStartRadius?: AnimatableNumericValue,
|
|
564
719
|
borderStyle?: 'solid' | 'dotted' | 'dashed',
|
|
565
|
-
borderWidth?:
|
|
566
|
-
borderBottomWidth?:
|
|
567
|
-
borderEndWidth?:
|
|
568
|
-
borderLeftWidth?:
|
|
569
|
-
borderRightWidth?:
|
|
570
|
-
borderStartWidth?:
|
|
571
|
-
borderTopWidth?:
|
|
572
|
-
opacity?:
|
|
720
|
+
borderWidth?: AnimatableNumericValue,
|
|
721
|
+
borderBottomWidth?: AnimatableNumericValue,
|
|
722
|
+
borderEndWidth?: AnimatableNumericValue,
|
|
723
|
+
borderLeftWidth?: AnimatableNumericValue,
|
|
724
|
+
borderRightWidth?: AnimatableNumericValue,
|
|
725
|
+
borderStartWidth?: AnimatableNumericValue,
|
|
726
|
+
borderTopWidth?: AnimatableNumericValue,
|
|
727
|
+
opacity?: AnimatableNumericValue,
|
|
573
728
|
elevation?: number,
|
|
574
729
|
pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only',
|
|
575
730
|
}>;
|
|
@@ -15,6 +15,7 @@ import type {____FlattenStyleProp_Internal} from './StyleSheetTypes';
|
|
|
15
15
|
|
|
16
16
|
function flattenStyle<+TStyleProp: DangerouslyImpreciseStyleProp>(
|
|
17
17
|
style: ?TStyleProp,
|
|
18
|
+
// $FlowFixMe[underconstrained-implicit-instantiation]
|
|
18
19
|
): ?____FlattenStyleProp_Internal<TStyleProp> {
|
|
19
20
|
if (style === null || typeof style !== 'object') {
|
|
20
21
|
return undefined;
|
|
@@ -26,6 +27,7 @@ function flattenStyle<+TStyleProp: DangerouslyImpreciseStyleProp>(
|
|
|
26
27
|
|
|
27
28
|
const result: {[string]: $FlowFixMe} = {};
|
|
28
29
|
for (let i = 0, styleLength = style.length; i < styleLength; ++i) {
|
|
30
|
+
// $FlowFixMe[underconstrained-implicit-instantiation]
|
|
29
31
|
const computedStyle = flattenStyle(style[i]);
|
|
30
32
|
if (computedStyle) {
|
|
31
33
|
for (const key in computedStyle) {
|
|
@@ -13,7 +13,7 @@
|
|
|
13
13
|
import type {ProcessedColorValue} from './processColor';
|
|
14
14
|
import type {ColorValue} from './StyleSheet';
|
|
15
15
|
|
|
16
|
-
import _normalizeColor from '@react-native/normalize-
|
|
16
|
+
import _normalizeColor from '@react-native/normalize-colors';
|
|
17
17
|
|
|
18
18
|
function normalizeColor(
|
|
19
19
|
color: ?(ColorValue | ProcessedColorValue),
|