@office-iss/react-native-win32 0.72.8 → 0.73.0-preview.2
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 -5
- package/CHANGELOG.json +530 -101
- package/CHANGELOG.md +213 -56
- package/IntegrationTests/PromiseTest.js +1 -0
- package/IntegrationTests/websocket_integration_test_server.js +1 -1
- package/Libraries/Animated/Animated.js +1 -1
- package/Libraries/Animated/AnimatedImplementation.js +1 -1
- package/Libraries/Animated/NativeAnimatedHelper.js +14 -10
- package/Libraries/Animated/NativeAnimatedHelper.win32.js +16 -12
- package/Libraries/Animated/NativeAnimatedModule.js +6 -2
- package/Libraries/Animated/NativeAnimatedTurboModule.js +7 -4
- package/Libraries/Animated/animations/Animation.js +57 -3
- package/Libraries/Animated/animations/DecayAnimation.js +9 -0
- package/Libraries/Animated/animations/SpringAnimation.js +8 -0
- package/Libraries/Animated/animations/TimingAnimation.js +8 -0
- package/Libraries/Animated/components/AnimatedFlatList.js +2 -1
- package/Libraries/Animated/components/AnimatedScrollView.js +2 -0
- package/Libraries/Animated/components/AnimatedSectionList.js +2 -1
- package/Libraries/Animated/createAnimatedComponent.js +1 -0
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Animated/nodes/AnimatedObject.js +146 -0
- package/Libraries/Animated/nodes/AnimatedProps.js +19 -7
- package/Libraries/Animated/nodes/AnimatedStyle.js +29 -55
- package/Libraries/Animated/nodes/AnimatedValueXY.js +3 -17
- package/Libraries/Animated/shouldUseTurboAnimatedModule.js +17 -0
- package/Libraries/Animated/useAnimatedProps.js +9 -10
- package/Libraries/AppState/AppState.d.ts +1 -1
- package/Libraries/AppState/NativeAppState.js +8 -4
- package/Libraries/BatchedBridge/MessageQueue.js +45 -36
- package/Libraries/Blob/Blob.js +6 -2
- package/Libraries/Blob/BlobManager.js +9 -10
- package/Libraries/Blob/BlobRegistry.js +14 -9
- package/Libraries/Blob/File.js +1 -1
- package/Libraries/Blob/FileReader.js +1 -2
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +1 -5
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +7 -48
- package/Libraries/Components/Button/ButtonWin32.Props.d.ts +1 -1
- package/Libraries/Components/Button/ButtonWin32.Props.js.map +1 -1
- package/Libraries/Components/Button/ButtonWin32.d.ts +1 -1
- package/Libraries/Components/Button/ButtonWin32.js +1 -4
- package/Libraries/Components/Button/ButtonWin32.js.map +1 -1
- package/Libraries/Components/Clipboard/Clipboard.d.ts +4 -4
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +3 -1
- package/Libraries/Components/EnterString.win32.d.ts +1 -1
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +26 -6
- package/Libraries/Components/Pressable/Pressable.js +3 -2
- package/Libraries/Components/Pressable/Pressable.win32.js +4 -3
- package/Libraries/Components/Pressable/useAndroidRippleForView.js +1 -1
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +7 -7
- package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +7 -8
- package/Libraries/Components/ScrollView/ScrollView.js +3 -1
- package/Libraries/Components/ScrollView/ScrollView.win32.js +3 -1
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +39 -46
- package/Libraries/Components/Switch/Switch.js +1 -0
- package/Libraries/Components/Text/TextWin32.d.ts +1 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +49 -7
- package/Libraries/Components/TextInput/TextInput.flow.js +43 -10
- package/Libraries/Components/TextInput/TextInput.js +62 -10
- package/Libraries/Components/TextInput/TextInput.win32.js +953 -206
- package/Libraries/Components/TextInput/Win32TextInputNativeComponent.js +23 -0
- package/Libraries/Components/ToastAndroid/{ToastAndroid.ios.js → ToastAndroid.js} +9 -1
- package/Libraries/Components/ToastAndroid/ToastAndroid.win32.js +9 -1
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js +2 -2
- package/Libraries/Components/Touchable/Tests/TouchableWin32Test.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
- package/Libraries/Components/Touchable/TouchableHighlight.js +1 -1
- package/Libraries/Components/Touchable/TouchableNativeFeedback.js +1 -1
- package/Libraries/Components/Touchable/TouchableOpacity.js +4 -1
- package/Libraries/Components/Touchable/TouchableWin32.d.ts +1 -1
- package/Libraries/Components/Touchable/TouchableWin32.js.map +1 -1
- package/Libraries/Components/Touchable/TouchableWithoutFeedback.js +1 -0
- package/Libraries/Components/TraceUpdateOverlay/TraceUpdateOverlay.js +16 -6
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +9 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
- package/Libraries/Components/View/View.js +46 -32
- package/Libraries/Components/View/View.win32.js +37 -6
- package/Libraries/Components/View/ViewAccessibility.d.ts +8 -2
- package/Libraries/Components/View/ViewNativeComponent.js +1 -0
- package/Libraries/Components/View/ViewPropTypes.js +18 -3
- package/Libraries/Components/View/ViewPropTypes.win32.js +30 -4
- package/Libraries/Components/View/ViewWin32.js +3 -2
- package/Libraries/Core/Devtools/loadBundleFromServer.js +152 -0
- package/Libraries/Core/Devtools/symbolicateStackTrace.js +2 -1
- package/Libraries/Core/ExceptionsManager.js +16 -7
- package/Libraries/Core/ExtendedError.js +12 -0
- package/Libraries/Core/ReactNativeVersion.js +3 -3
- package/Libraries/Core/ReactNativeVersionCheck.js +0 -2
- package/Libraries/Core/ReactNativeVersionCheck.win32.js +0 -2
- package/Libraries/Core/__mocks__/NativeExceptionsManager.js +20 -0
- package/Libraries/Core/setUpDeveloperTools.js +5 -1
- package/Libraries/Core/setUpIntersectionObserver.js +16 -0
- package/Libraries/{Components/ProgressBarAndroid/ProgressBarAndroid.ios.js → Core/setUpMutationObserver.js} +6 -2
- package/Libraries/Core/setUpPerformance.js +6 -13
- package/Libraries/Core/setUpPerformanceObserver.js +16 -0
- package/Libraries/Core/setUpRegeneratorRuntime.js +4 -2
- package/Libraries/DOM/Nodes/ReactNativeElement.js +135 -18
- package/Libraries/DOM/Nodes/ReadOnlyCharacterData.js +72 -0
- package/Libraries/DOM/Nodes/ReadOnlyElement.js +209 -21
- package/Libraries/DOM/Nodes/ReadOnlyNode.js +206 -17
- package/Libraries/DOM/Nodes/ReadOnlyText.js +30 -0
- package/Libraries/DOM/Nodes/Utilities/Traversal.js +54 -0
- package/Libraries/EventEmitter/NativeEventEmitter.d.ts +0 -6
- package/Libraries/EventEmitter/RCTDeviceEventEmitter.js +15 -4
- package/Libraries/Image/Image.android.js +8 -2
- package/Libraries/Image/Image.d.ts +1 -1
- package/Libraries/Image/Image.ios.js +4 -1
- package/Libraries/Image/Image.win32.js +6 -3
- package/Libraries/Image/ImageBackground.js +3 -0
- package/Libraries/Image/resolveAssetSource.win32.js +1 -1
- package/Libraries/Inspector/DevtoolsOverlay.js +6 -3
- package/Libraries/Inspector/NetworkOverlay.js +2 -2
- package/Libraries/Interaction/JSEventLoopWatchdog.js +1 -5
- package/Libraries/Interaction/PanResponder.js +1 -4
- package/Libraries/IntersectionObserver/IntersectionObserver.js +252 -0
- package/Libraries/IntersectionObserver/IntersectionObserverEntry.js +140 -0
- package/Libraries/IntersectionObserver/IntersectionObserverManager.js +221 -0
- package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +41 -0
- package/Libraries/IntersectionObserver/__mocks__/NativeIntersectionObserver.js +162 -0
- package/Libraries/LayoutAnimation/LayoutAnimation.js +1 -1
- package/Libraries/Lists/FlatList.d.ts +2 -1
- package/Libraries/Lists/FlatList.js +15 -5
- package/Libraries/Lists/SectionList.js +4 -0
- package/Libraries/LogBox/Data/LogBoxData.js +2 -1
- package/Libraries/LogBox/Data/LogBoxLog.js +4 -1
- package/Libraries/LogBox/Data/LogBoxSymbolication.js +5 -2
- package/Libraries/LogBox/Data/parseLogBoxLog.js +57 -20
- package/Libraries/LogBox/UI/AnsiHighlight.js +1 -1
- package/Libraries/LogBox/UI/LogBoxInspectorFooter.js +24 -31
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +1 -1
- package/Libraries/LogBox/UI/LogBoxMessage.js +4 -7
- package/Libraries/MutationObserver/MutationObserver.js +184 -0
- package/Libraries/MutationObserver/MutationObserverManager.js +218 -0
- package/Libraries/MutationObserver/MutationRecord.js +82 -0
- package/Libraries/MutationObserver/NativeMutationObserver.js +58 -0
- package/Libraries/MutationObserver/__mocks__/NativeMutationObserver.js +327 -0
- package/Libraries/NativeComponent/BaseViewConfig.android.js +18 -3
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +33 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +33 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +13 -9
- package/Libraries/NativeModules/specs/NativeSourceCode.js +6 -6
- package/Libraries/Network/RCTNetworking.android.js +2 -1
- package/Libraries/Network/XMLHttpRequest.js +1 -1
- package/Libraries/NewAppScreen/components/DebugInstructions.js +4 -4
- package/Libraries/NewAppScreen/components/LearnMoreLinks.js +9 -2
- package/Libraries/Performance/QuickPerformanceLogger.js +1 -1
- package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +1 -0
- package/Libraries/PermissionsAndroid/PermissionsAndroid.d.ts +1 -0
- package/Libraries/PermissionsAndroid/PermissionsAndroid.js +3 -1
- package/Libraries/Pressability/Pressability.js +28 -3
- package/Libraries/Pressability/Pressability.win32.js +30 -5
- package/Libraries/ReactNative/AppContainer.js +2 -3
- package/Libraries/ReactNative/AppRegistry.d.ts +0 -5
- package/Libraries/ReactNative/AppRegistry.js +66 -53
- package/Libraries/ReactNative/BridgelessUIManager.js +38 -9
- package/Libraries/ReactNative/FabricUIManager.js +143 -34
- package/Libraries/ReactNative/I18nManager.js +5 -11
- package/Libraries/ReactNative/NativeI18nManager.js +7 -5
- package/Libraries/ReactNative/PaperUIManager.win32.js +2 -2
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +151 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +81 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload.js +492 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +32 -0
- package/Libraries/ReactNative/ReactNativeFeatureFlags.js +19 -3
- package/Libraries/ReactNative/UIManager.js +8 -0
- package/Libraries/ReactNative/__mocks__/FabricUIManager.js +648 -0
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +38 -2
- package/Libraries/Renderer/implementations/ReactFabric-dev.js +27 -27
- package/Libraries/Renderer/implementations/ReactFabric-prod.js +3 -3
- package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3 -3
- package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +27 -27
- package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +3 -3
- package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +3 -3
- package/Libraries/Renderer/shims/ReactFabric.js +5 -6
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +2 -3
- package/Libraries/Renderer/shims/ReactNative.js +2 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +35 -17
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +3 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +2 -3
- package/Libraries/Settings/{Settings.android.js → Settings.js} +4 -4
- package/Libraries/Share/Share.d.ts +3 -9
- package/Libraries/StyleSheet/PlatformColorValueTypes.android.js +9 -4
- package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +28 -13
- package/Libraries/StyleSheet/PlatformColorValueTypes.win32.js +14 -4
- package/Libraries/StyleSheet/PlatformColorValueTypesIOS.ios.js +1 -1
- package/Libraries/StyleSheet/PlatformColorValueTypesWin32.d.ts +1 -1
- package/Libraries/StyleSheet/StyleSheet.d.ts +10 -1
- package/Libraries/StyleSheet/StyleSheet.js +3 -0
- package/Libraries/StyleSheet/StyleSheet.win32.js +3 -0
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +31 -17
- package/Libraries/StyleSheet/StyleSheetTypes.js +90 -6
- package/Libraries/StyleSheet/flattenStyle.js +4 -0
- package/Libraries/StyleSheet/private/_TransformStyle.js +16 -2
- package/Libraries/StyleSheet/processColor.js +1 -2
- package/Libraries/StyleSheet/processTransformOrigin.js +136 -0
- package/Libraries/StyleSheet/splitLayoutProps.js +1 -0
- package/Libraries/Text/Text.d.ts +5 -5
- package/Libraries/Text/Text.js +17 -10
- package/Libraries/Text/Text.win32.js +354 -0
- package/Libraries/Text/TextProps.win32.js +281 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +47 -7
- package/Libraries/TurboModule/samples/NativeSampleTurboModule.js +6 -0
- package/Libraries/Types/CoreEventTypes.d.ts +5 -2
- package/Libraries/Utilities/GlobalPerformanceLogger.js +2 -12
- package/Libraries/Utilities/NativeDeviceInfo.js +8 -9
- package/Libraries/Utilities/NativePlatformConstantsAndroid.js +23 -18
- package/Libraries/Utilities/NativePlatformConstantsIOS.js +16 -13
- package/Libraries/Utilities/NativePlatformConstantsWin.js +13 -10
- package/Libraries/Utilities/PerformanceLoggerContext.js +1 -1
- package/Libraries/Utilities/Platform.android.js +12 -8
- package/Libraries/Utilities/Platform.d.ts +1 -0
- package/Libraries/Utilities/Platform.flow.js +84 -0
- package/Libraries/Utilities/Platform.flow.win32.js +111 -0
- package/Libraries/Utilities/Platform.ios.js +12 -8
- package/Libraries/Utilities/Platform.win32.js +12 -8
- package/Libraries/Utilities/PolyfillFunctions.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -2
- package/Libraries/Utilities/SceneTracker.js +1 -1
- package/Libraries/Utilities/createPerformanceLogger.js +63 -32
- package/Libraries/Utilities/useColorScheme.js +7 -8
- package/Libraries/WebPerformance/MemoryInfo.js +1 -1
- package/Libraries/WebPerformance/NativePerformance.js +3 -8
- package/Libraries/WebPerformance/NativePerformanceObserver.js +4 -0
- package/Libraries/WebPerformance/Performance.js +42 -15
- package/Libraries/WebPerformance/PerformanceEntry.js +14 -6
- package/Libraries/WebPerformance/PerformanceEventTiming.js +18 -1
- package/Libraries/WebPerformance/ReactNativeStartupTiming.js +40 -14
- package/Libraries/WebPerformance/__mocks__/NativePerformance.js +4 -2
- package/Libraries/WebPerformance/__mocks__/NativePerformanceObserver.js +21 -3
- package/Libraries/promiseRejectionTrackingOptions.js +21 -9
- package/Libraries/vendor/emitter/EventEmitter.js +17 -17
- package/flow/global.js +1 -3
- package/flow/jest.js +5 -1
- package/{Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.ios.js → jest/ReactNativeInternalFeatureFlagsMock.js} +2 -1
- package/jest/__tests__/setup-test.js +18 -0
- package/jest/mockModal.js +6 -4
- package/jest/setup.js +61 -30
- package/jest.config.js +1 -1
- package/just-task.js +1 -0
- package/overrides.json +54 -60
- package/package.json +35 -33
- package/src/Libraries/Components/Button/ButtonWin32.Props.ts +1 -1
- package/src/Libraries/Components/Button/ButtonWin32.tsx +0 -2
- package/src/Libraries/Components/Touchable/Tests/TouchableWin32Test.tsx +2 -2
- package/src/Libraries/Components/Touchable/TouchableWin32.tsx +1 -1
- package/src/Libraries/Components/View/ViewAccessibility.d.ts +8 -2
- package/src/Libraries/StyleSheet/PlatformColorValueTypesWin32.d.ts +1 -1
- package/types/experimental.d.ts +44 -0
- package/types/index.d.ts +2 -1
- package/types/modules/Devtools.d.ts +1 -0
- package/types/modules/globals.d.ts +16 -1
- package/IntegrationTests/BUCK +0 -32
- package/IntegrationTests/PropertiesUpdateTest.js +0 -29
- package/IntegrationTests/RCTRootViewIntegrationTestApp.js +0 -86
- package/IntegrationTests/ReactContentSizeUpdateTest.js +0 -89
- package/IntegrationTests/SizeFlexibilityUpdateTest.js +0 -106
- package/Libraries/Components/AccessibilityInfo/NativeAccessibilityInfoWin32.js +0 -37
- package/Libraries/Components/TextInput/TextInput.Types.win32.d.ts +0 -51
- package/Libraries/Components/TextInput/TextInput.Types.win32.js +0 -3
- package/Libraries/Components/TextInput/TextInput.Types.win32.js.map +0 -1
- package/Libraries/Utilities/AcessibilityMapping.js +0 -154
- package/Libraries/Utilities/AcessibilityMapping.win32.js +0 -156
- package/Libraries/Utilities/NativeDevSplitBundleLoader.js +0 -19
- package/Libraries/Utilities/useColorScheme.win32.js +0 -26
- package/flow/use-sync-external-store.js +0 -20
- package/flow-typed/npm/base64-js_v1.x.x.js +0 -12
- package/flow-typed/npm/glob_v7.x.x.js +0 -79
- package/flow-typed/npm/pretty-format_v26.x.x.js +0 -49
- package/flow-typed/npm/promise_v8.x.x.js +0 -30
- package/flow-typed/npm/react-dom_v17.x.x.js +0 -139
- package/flow-typed/npm/react-test-renderer_v16.x.x.js +0 -79
- package/flow-typed/npm/stacktrace-parser_v0.1.x.js +0 -17
- package/flow-typed/npm/yargs_v17.x.x.js +0 -341
- package/src/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +0 -161
- package/src/Libraries/Components/TextInput/TextInput.Types.win32.ts +0 -68
- /package/Libraries/{Renderer/public → ReactNative/ReactFabricPublicInstance}/ReactFabricPublicInstanceUtils.js +0 -0
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @noformat
|
|
8
8
|
* @flow strict
|
|
9
|
-
* @
|
|
10
|
-
*
|
|
11
|
-
* This file was sync'd from the facebook/react repository.
|
|
9
|
+
* @nolint
|
|
10
|
+
* @generated SignedSource<<652b117c94307244bcf5e4af18928903>>
|
|
12
11
|
*/
|
|
13
12
|
|
|
14
13
|
import type {ElementRef, ElementType, Element, AbstractComponent} from 'react';
|
|
@@ -98,7 +97,23 @@ export type PartialViewConfig = $ReadOnly<{
|
|
|
98
97
|
validAttributes?: PartialAttributeConfiguration,
|
|
99
98
|
}>;
|
|
100
99
|
|
|
101
|
-
|
|
100
|
+
/**
|
|
101
|
+
* Current usages should migrate to this definition
|
|
102
|
+
*/
|
|
103
|
+
export interface INativeMethods {
|
|
104
|
+
blur(): void;
|
|
105
|
+
focus(): void;
|
|
106
|
+
measure(callback: MeasureOnSuccessCallback): void;
|
|
107
|
+
measureInWindow(callback: MeasureInWindowOnSuccessCallback): void;
|
|
108
|
+
measureLayout(
|
|
109
|
+
relativeToNativeNode: number | ElementRef<HostComponent<mixed>>,
|
|
110
|
+
onSuccess: MeasureLayoutOnSuccessCallback,
|
|
111
|
+
onFail?: () => void,
|
|
112
|
+
): void;
|
|
113
|
+
setNativeProps(nativeProps: {...}): void;
|
|
114
|
+
}
|
|
115
|
+
|
|
116
|
+
export type NativeMethods = $ReadOnly<{|
|
|
102
117
|
blur(): void,
|
|
103
118
|
focus(): void,
|
|
104
119
|
measure(callback: MeasureOnSuccessCallback): void,
|
|
@@ -109,7 +124,11 @@ export type NativeMethods = $ReadOnly<{
|
|
|
109
124
|
onFail?: () => void,
|
|
110
125
|
): void,
|
|
111
126
|
setNativeProps(nativeProps: {...}): void,
|
|
112
|
-
}>;
|
|
127
|
+
|}>;
|
|
128
|
+
|
|
129
|
+
// This validates that INativeMethods and NativeMethods stay in sync using Flow!
|
|
130
|
+
declare var ensureNativeMethodsAreSynced: NativeMethods;
|
|
131
|
+
(ensureNativeMethodsAreSynced: INativeMethods);
|
|
113
132
|
|
|
114
133
|
export type HostComponent<T> = AbstractComponent<T, $ReadOnly<NativeMethods>>;
|
|
115
134
|
|
|
@@ -195,6 +214,11 @@ export type ReactNativeType = {
|
|
|
195
214
|
...
|
|
196
215
|
};
|
|
197
216
|
|
|
217
|
+
export opaque type Node = mixed;
|
|
218
|
+
export opaque type InternalInstanceHandle = mixed;
|
|
219
|
+
type PublicInstance = mixed;
|
|
220
|
+
type PublicTextInstance = mixed;
|
|
221
|
+
|
|
198
222
|
export type ReactFabricType = {
|
|
199
223
|
findHostInstance_DEPRECATED<TElementType: ElementType>(
|
|
200
224
|
componentOrHandle: ?(ElementRef<TElementType> | number),
|
|
@@ -218,18 +242,12 @@ export type ReactFabricType = {
|
|
|
218
242
|
concurrentRoot: ?boolean,
|
|
219
243
|
): ?ElementRef<ElementType>,
|
|
220
244
|
unmountComponentAtNode(containerTag: number): void,
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
226
|
-
|
|
227
|
-
_nativeTag: number,
|
|
228
|
-
viewConfig: ViewConfig,
|
|
229
|
-
currentProps: {...},
|
|
230
|
-
_internalInstanceHandle: {...},
|
|
231
|
-
...
|
|
232
|
-
},
|
|
245
|
+
getNodeFromInternalInstanceHandle(
|
|
246
|
+
internalInstanceHandle: InternalInstanceHandle,
|
|
247
|
+
): ?Node,
|
|
248
|
+
getPublicInstanceFromInternalInstanceHandle(
|
|
249
|
+
internalInstanceHandle: InternalInstanceHandle,
|
|
250
|
+
): PublicInstance | PublicTextInstance,
|
|
233
251
|
...
|
|
234
252
|
};
|
|
235
253
|
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @noformat
|
|
8
8
|
* @flow strict-local
|
|
9
|
-
* @
|
|
10
|
-
*
|
|
11
|
-
* This file was sync'd from the facebook/react repository.
|
|
9
|
+
* @nolint
|
|
10
|
+
* @generated SignedSource<<1b39316520f5af25f0a141d7d78b0809>>
|
|
12
11
|
*/
|
|
13
12
|
|
|
14
13
|
'use strict';
|
|
@@ -109,6 +108,7 @@ exports.get = function (name: string): ViewConfig {
|
|
|
109
108
|
'View config getter callback for component `%s` must be a function (received `%s`).%s',
|
|
110
109
|
name,
|
|
111
110
|
callback === null ? 'null' : typeof callback,
|
|
111
|
+
// $FlowFixMe[recursive-definition]
|
|
112
112
|
typeof name[0] === 'string' && /[a-z]/.test(name[0])
|
|
113
113
|
? ' Make sure to start component names with a capital letter.'
|
|
114
114
|
: '',
|
|
@@ -6,9 +6,8 @@
|
|
|
6
6
|
*
|
|
7
7
|
* @noformat
|
|
8
8
|
* @flow strict-local
|
|
9
|
-
* @
|
|
10
|
-
*
|
|
11
|
-
* This file was sync'd from the facebook/react repository.
|
|
9
|
+
* @nolint
|
|
10
|
+
* @generated SignedSource<<ede54ac2fa1b9a09e234cdf098048989>>
|
|
12
11
|
*/
|
|
13
12
|
|
|
14
13
|
'use strict';
|
|
@@ -12,21 +12,21 @@
|
|
|
12
12
|
|
|
13
13
|
const Settings = {
|
|
14
14
|
get(key: string): mixed {
|
|
15
|
-
console.warn('Settings is not yet supported on
|
|
15
|
+
console.warn('Settings is not yet supported on this platform.');
|
|
16
16
|
return null;
|
|
17
17
|
},
|
|
18
18
|
|
|
19
19
|
set(settings: Object) {
|
|
20
|
-
console.warn('Settings is not yet supported on
|
|
20
|
+
console.warn('Settings is not yet supported on this platform.');
|
|
21
21
|
},
|
|
22
22
|
|
|
23
23
|
watchKeys(keys: string | Array<string>, callback: Function): number {
|
|
24
|
-
console.warn('Settings is not yet supported on
|
|
24
|
+
console.warn('Settings is not yet supported on this platform.');
|
|
25
25
|
return -1;
|
|
26
26
|
},
|
|
27
27
|
|
|
28
28
|
clearWatch(watchId: number) {
|
|
29
|
-
console.warn('Settings is not yet supported on
|
|
29
|
+
console.warn('Settings is not yet supported on this platform.');
|
|
30
30
|
},
|
|
31
31
|
};
|
|
32
32
|
|
|
@@ -27,17 +27,11 @@ export type ShareOptions = {
|
|
|
27
27
|
anchor?: number | undefined;
|
|
28
28
|
};
|
|
29
29
|
|
|
30
|
-
export type
|
|
31
|
-
action: 'sharedAction';
|
|
32
|
-
activityType?: string | undefined;
|
|
30
|
+
export type ShareAction = {
|
|
31
|
+
action: 'sharedAction' | 'dismissedAction';
|
|
32
|
+
activityType?: string | null | undefined;
|
|
33
33
|
};
|
|
34
34
|
|
|
35
|
-
export type ShareDismissedAction = {
|
|
36
|
-
action: 'dismissedAction';
|
|
37
|
-
};
|
|
38
|
-
|
|
39
|
-
export type ShareAction = ShareSharedAction | ShareDismissedAction;
|
|
40
|
-
|
|
41
35
|
export interface ShareStatic {
|
|
42
36
|
/**
|
|
43
37
|
* Open a dialog to share text content.
|
|
@@ -9,20 +9,25 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ProcessedColorValue} from './processColor';
|
|
12
|
-
import type {ColorValue} from './StyleSheet';
|
|
12
|
+
import type {ColorValue, NativeColorValue} from './StyleSheet';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
/** The actual type of the opaque NativeColorValue on Android platform */
|
|
15
|
+
type LocalNativeColorValue = {
|
|
15
16
|
resource_paths?: Array<string>,
|
|
16
17
|
};
|
|
17
18
|
|
|
18
19
|
export const PlatformColor = (...names: Array<string>): ColorValue => {
|
|
19
|
-
return
|
|
20
|
+
/* $FlowExpectedError[incompatible-return]
|
|
21
|
+
* LocalNativeColorValue is the actual type of the opaque NativeColorValue on Android platform */
|
|
22
|
+
return ({resource_paths: names}: LocalNativeColorValue);
|
|
20
23
|
};
|
|
21
24
|
|
|
22
25
|
export const normalizeColorObject = (
|
|
23
26
|
color: NativeColorValue,
|
|
24
27
|
): ?ProcessedColorValue => {
|
|
25
|
-
|
|
28
|
+
/* $FlowExpectedError[incompatible-cast]
|
|
29
|
+
* LocalNativeColorValue is the actual type of the opaque NativeColorValue on Android platform */
|
|
30
|
+
if ('resource_paths' in (color: LocalNativeColorValue)) {
|
|
26
31
|
return color;
|
|
27
32
|
}
|
|
28
33
|
return null;
|
|
@@ -9,9 +9,10 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {ProcessedColorValue} from './processColor';
|
|
12
|
-
import type {ColorValue} from './StyleSheet';
|
|
12
|
+
import type {ColorValue, NativeColorValue} from './StyleSheet';
|
|
13
13
|
|
|
14
|
-
|
|
14
|
+
/** The actual type of the opaque NativeColorValue on iOS platform */
|
|
15
|
+
type LocalNativeColorValue = {
|
|
15
16
|
semantic?: Array<string>,
|
|
16
17
|
dynamic?: {
|
|
17
18
|
light: ?(ColorValue | ProcessedColorValue),
|
|
@@ -22,7 +23,8 @@ export opaque type NativeColorValue = {
|
|
|
22
23
|
};
|
|
23
24
|
|
|
24
25
|
export const PlatformColor = (...names: Array<string>): ColorValue => {
|
|
25
|
-
return
|
|
26
|
+
// $FlowExpectedError[incompatible-return] LocalNativeColorValue is the iOS LocalNativeColorValue type
|
|
27
|
+
return ({semantic: names}: LocalNativeColorValue);
|
|
26
28
|
};
|
|
27
29
|
|
|
28
30
|
export type DynamicColorIOSTuplePrivate = {
|
|
@@ -35,19 +37,21 @@ export type DynamicColorIOSTuplePrivate = {
|
|
|
35
37
|
export const DynamicColorIOSPrivate = (
|
|
36
38
|
tuple: DynamicColorIOSTuplePrivate,
|
|
37
39
|
): ColorValue => {
|
|
38
|
-
return {
|
|
40
|
+
return ({
|
|
39
41
|
dynamic: {
|
|
40
42
|
light: tuple.light,
|
|
41
43
|
dark: tuple.dark,
|
|
42
44
|
highContrastLight: tuple.highContrastLight,
|
|
43
45
|
highContrastDark: tuple.highContrastDark,
|
|
44
46
|
},
|
|
45
|
-
|
|
47
|
+
/* $FlowExpectedError[incompatible-return]
|
|
48
|
+
* LocalNativeColorValue is the actual type of the opaque NativeColorValue on iOS platform */
|
|
49
|
+
}: LocalNativeColorValue);
|
|
46
50
|
};
|
|
47
51
|
|
|
48
|
-
|
|
49
|
-
color:
|
|
50
|
-
): ?
|
|
52
|
+
const _normalizeColorObject = (
|
|
53
|
+
color: LocalNativeColorValue,
|
|
54
|
+
): ?LocalNativeColorValue => {
|
|
51
55
|
if ('semantic' in color) {
|
|
52
56
|
// an ios semantic color
|
|
53
57
|
return color;
|
|
@@ -56,7 +60,7 @@ export const normalizeColorObject = (
|
|
|
56
60
|
|
|
57
61
|
// a dynamic, appearance aware color
|
|
58
62
|
const dynamic = color.dynamic;
|
|
59
|
-
const dynamicColor:
|
|
63
|
+
const dynamicColor: LocalNativeColorValue = {
|
|
60
64
|
dynamic: {
|
|
61
65
|
// $FlowFixMe[incompatible-use]
|
|
62
66
|
light: normalizeColor(dynamic.light),
|
|
@@ -70,17 +74,22 @@ export const normalizeColorObject = (
|
|
|
70
74
|
};
|
|
71
75
|
return dynamicColor;
|
|
72
76
|
}
|
|
73
|
-
|
|
74
77
|
return null;
|
|
75
78
|
};
|
|
76
79
|
|
|
77
|
-
export const
|
|
80
|
+
export const normalizeColorObject: (
|
|
78
81
|
color: NativeColorValue,
|
|
79
|
-
|
|
82
|
+
/* $FlowExpectedError[incompatible-type]
|
|
83
|
+
* LocalNativeColorValue is the actual type of the opaque NativeColorValue on iOS platform */
|
|
84
|
+
) => ?ProcessedColorValue = _normalizeColorObject;
|
|
85
|
+
|
|
86
|
+
const _processColorObject = (
|
|
87
|
+
color: LocalNativeColorValue,
|
|
88
|
+
): ?LocalNativeColorValue => {
|
|
80
89
|
if ('dynamic' in color && color.dynamic != null) {
|
|
81
90
|
const processColor = require('./processColor').default;
|
|
82
91
|
const dynamic = color.dynamic;
|
|
83
|
-
const dynamicColor:
|
|
92
|
+
const dynamicColor: LocalNativeColorValue = {
|
|
84
93
|
dynamic: {
|
|
85
94
|
// $FlowFixMe[incompatible-use]
|
|
86
95
|
light: processColor(dynamic.light),
|
|
@@ -96,3 +105,9 @@ export const processColorObject = (
|
|
|
96
105
|
}
|
|
97
106
|
return color;
|
|
98
107
|
};
|
|
108
|
+
|
|
109
|
+
export const processColorObject: (
|
|
110
|
+
color: NativeColorValue,
|
|
111
|
+
/* $FlowExpectedError[incompatible-type]
|
|
112
|
+
* LocalNativeColorValue is the actual type of the opaque NativeColorValue on iOS platform */
|
|
113
|
+
) => ?NativeColorValue = _processColorObject;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
-
import type {ColorValue} from './StyleSheet';
|
|
13
|
+
import type {ColorValue, NativeColorValue} from './StyleSheet';
|
|
14
14
|
import type {ProcessedColorValue} from './processColor';
|
|
15
15
|
|
|
16
16
|
type GradientColorStop = {|
|
|
@@ -23,26 +23,36 @@ export type GradientColorValueWin32 = {|
|
|
|
23
23
|
colorStops: Array<GradientColorStop>,
|
|
24
24
|
|};
|
|
25
25
|
|
|
26
|
-
|
|
26
|
+
/** The actual type of the opaque NativeColorValue on Windows platform */
|
|
27
|
+
type LocalNativeColorValue =
|
|
27
28
|
| $ReadOnly<GradientColorValueWin32>
|
|
28
29
|
| $ReadOnly<{|
|
|
29
30
|
resource_paths?: Array<string>,
|
|
30
31
|
|}>;
|
|
31
32
|
|
|
32
33
|
export const PlatformColor = (...names: Array<string>): ColorValue => {
|
|
33
|
-
return
|
|
34
|
+
// $FlowExpectedError[incompatible-return] LocalNativeColorValue is the Windows LocalNativeColorValue type
|
|
35
|
+
return ({resource_paths: names}: LocalNativeColorValue);
|
|
34
36
|
};
|
|
35
37
|
|
|
36
38
|
export const ColorGradientWin32Private = (
|
|
37
39
|
gradientColor: GradientColorValueWin32,
|
|
38
40
|
): ColorValue => {
|
|
41
|
+
// $FlowExpectedError[incompatible-return]
|
|
39
42
|
return gradientColor;
|
|
40
43
|
};
|
|
41
44
|
|
|
42
45
|
export const normalizeColorObject = (
|
|
43
46
|
color: NativeColorValue,
|
|
44
47
|
): ?ProcessedColorValue => {
|
|
45
|
-
|
|
48
|
+
/* $FlowExpectedError[incompatible-cast]
|
|
49
|
+
* LocalNativeColorValue is the actual type of the opaque NativeColorValue on Windows platform */
|
|
50
|
+
if (
|
|
51
|
+
// $FlowExpectedError[incompatible-cast]
|
|
52
|
+
'resource_paths' in (color: LocalNativeColorValue) ||
|
|
53
|
+
// $FlowExpectedError[incompatible-cast]
|
|
54
|
+
'gradientDirection' in (color: LocalNativeColorValue)
|
|
55
|
+
) {
|
|
46
56
|
return color;
|
|
47
57
|
}
|
|
48
58
|
return null;
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import type {ColorValue} from './StyleSheet';
|
|
12
12
|
|
|
13
|
-
import {DynamicColorIOSPrivate} from './PlatformColorValueTypes';
|
|
13
|
+
import {DynamicColorIOSPrivate} from './PlatformColorValueTypes.ios';
|
|
14
14
|
|
|
15
15
|
export type DynamicColorIOSTuple = {
|
|
16
16
|
light: ColorValue,
|
|
@@ -30,7 +30,7 @@ export type GradientColorValueWin32 = {
|
|
|
30
30
|
};
|
|
31
31
|
|
|
32
32
|
/**
|
|
33
|
-
* Creates a color value that renders using a
|
|
33
|
+
* Creates a color value that renders using a gradient brush.
|
|
34
34
|
* This can be used to provide a value to most components that take a standard color value.
|
|
35
35
|
*/
|
|
36
36
|
export declare const ColorGradientWin32: (
|
|
@@ -35,7 +35,16 @@ export namespace StyleSheet {
|
|
|
35
35
|
* Creates a StyleSheet style reference from the given object.
|
|
36
36
|
*/
|
|
37
37
|
export function create<T extends NamedStyles<T> | NamedStyles<any>>(
|
|
38
|
-
|
|
38
|
+
// The extra & NamedStyles<any> here helps Typescript catch typos: e.g.,
|
|
39
|
+
// the following code would not error with `styles: T | NamedStyles<T>`,
|
|
40
|
+
// but would error with `styles: T & NamedStyles<any>`
|
|
41
|
+
//
|
|
42
|
+
// ```ts
|
|
43
|
+
// StyleSheet.create({
|
|
44
|
+
// someComponent: { marginLeft: 1, magrinRight: 1 },
|
|
45
|
+
// });
|
|
46
|
+
// ```
|
|
47
|
+
styles: T & NamedStyles<any>,
|
|
39
48
|
): T;
|
|
40
49
|
|
|
41
50
|
/**
|
|
@@ -27,6 +27,8 @@ const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleA
|
|
|
27
27
|
const PixelRatio = require('../Utilities/PixelRatio').default;
|
|
28
28
|
const flatten = require('./flattenStyle');
|
|
29
29
|
|
|
30
|
+
export type {NativeColorValue} from './StyleSheetTypes';
|
|
31
|
+
|
|
30
32
|
/**
|
|
31
33
|
* This type should be used as the type for anything that is a color. It is
|
|
32
34
|
* most useful when using DynamicColorIOS which can be a string or a dynamic
|
|
@@ -361,6 +363,7 @@ module.exports = {
|
|
|
361
363
|
/**
|
|
362
364
|
* Creates a StyleSheet style reference from the given object.
|
|
363
365
|
*/
|
|
366
|
+
// $FlowFixMe[unsupported-variance-annotation]
|
|
364
367
|
create<+S: ____Styles_Internal>(obj: S): $ReadOnly<S> {
|
|
365
368
|
// TODO: This should return S as the return type. But first,
|
|
366
369
|
// we need to codemod all the callsites that are typing this
|
|
@@ -28,6 +28,8 @@ const PixelRatio = require('../Utilities/PixelRatio').default;
|
|
|
28
28
|
const Platform = require('../Utilities/Platform'); // [Win32]
|
|
29
29
|
const flatten = require('./flattenStyle');
|
|
30
30
|
|
|
31
|
+
export type {NativeColorValue} from './StyleSheetTypes';
|
|
32
|
+
|
|
31
33
|
/**
|
|
32
34
|
* This type should be used as the type for anything that is a color. It is
|
|
33
35
|
* most useful when using DynamicColorIOS which can be a string or a dynamic
|
|
@@ -363,6 +365,7 @@ module.exports = {
|
|
|
363
365
|
/**
|
|
364
366
|
* Creates a StyleSheet style reference from the given object.
|
|
365
367
|
*/
|
|
368
|
+
// $FlowFixMe[unsupported-variance-annotation]
|
|
366
369
|
create<+S: ____Styles_Internal>(obj: S): $ReadOnly<S> {
|
|
367
370
|
// TODO: This should return S as the return type. But first,
|
|
368
371
|
// we need to codemod all the callsites that are typing this
|
|
@@ -173,25 +173,31 @@ interface MatrixTransform {
|
|
|
173
173
|
matrix: AnimatableNumericValue[];
|
|
174
174
|
}
|
|
175
175
|
|
|
176
|
+
type MaximumOneOf<T, K extends keyof T = keyof T> = K extends keyof T
|
|
177
|
+
? {[P in K]: T[K]} & {[P in Exclude<keyof T, K>]?: never}
|
|
178
|
+
: never;
|
|
179
|
+
|
|
176
180
|
export interface TransformsStyle {
|
|
177
181
|
transform?:
|
|
178
|
-
|
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
182
|
+
| MaximumOneOf<
|
|
183
|
+
PerpectiveTransform &
|
|
184
|
+
RotateTransform &
|
|
185
|
+
RotateXTransform &
|
|
186
|
+
RotateYTransform &
|
|
187
|
+
RotateZTransform &
|
|
188
|
+
ScaleTransform &
|
|
189
|
+
ScaleXTransform &
|
|
190
|
+
ScaleYTransform &
|
|
191
|
+
TranslateXTransform &
|
|
192
|
+
TranslateYTransform &
|
|
193
|
+
SkewXTransform &
|
|
194
|
+
SkewYTransform &
|
|
195
|
+
MatrixTransform
|
|
196
|
+
>[]
|
|
193
197
|
| string
|
|
194
198
|
| undefined;
|
|
199
|
+
transformOrigin?: Array<string | number> | string | undefined;
|
|
200
|
+
|
|
195
201
|
/**
|
|
196
202
|
* @deprecated Use matrix in transform prop instead.
|
|
197
203
|
*/
|
|
@@ -274,7 +280,15 @@ export type FontVariant =
|
|
|
274
280
|
| 'oldstyle-nums'
|
|
275
281
|
| 'lining-nums'
|
|
276
282
|
| 'tabular-nums'
|
|
277
|
-
| 'proportional-nums'
|
|
283
|
+
| 'proportional-nums'
|
|
284
|
+
| 'common-ligatures'
|
|
285
|
+
| 'no-common-ligatures'
|
|
286
|
+
| 'discretionary-ligatures'
|
|
287
|
+
| 'no-discretionary-ligatures'
|
|
288
|
+
| 'historical-ligatures'
|
|
289
|
+
| 'no-historical-ligatures'
|
|
290
|
+
| 'contextual'
|
|
291
|
+
| 'no-contextual';
|
|
278
292
|
export interface TextStyleIOS extends ViewStyle {
|
|
279
293
|
fontVariant?: FontVariant[] | undefined;
|
|
280
294
|
textDecorationColor?: ColorValue | undefined;
|
|
@@ -327,7 +341,7 @@ export interface TextStyle extends TextStyleIOS, TextStyleAndroid, ViewStyle {
|
|
|
327
341
|
textShadowOffset?: {width: number; height: number} | undefined;
|
|
328
342
|
textShadowRadius?: number | undefined;
|
|
329
343
|
textTransform?: 'none' | 'capitalize' | 'uppercase' | 'lowercase' | undefined;
|
|
330
|
-
|
|
344
|
+
userSelect?: 'auto' | 'none' | 'text' | 'contain' | 'all' | undefined;
|
|
331
345
|
}
|
|
332
346
|
|
|
333
347
|
/**
|
|
@@ -11,7 +11,6 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
13
|
import type AnimatedNode from '../Animated/nodes/AnimatedNode';
|
|
14
|
-
import type {NativeColorValue} from './PlatformColorValueTypes';
|
|
15
14
|
import type {
|
|
16
15
|
____DangerouslyImpreciseStyle_InternalOverrides,
|
|
17
16
|
____ImageStyle_InternalOverrides,
|
|
@@ -21,6 +20,7 @@ import type {
|
|
|
21
20
|
} from './private/_StyleSheetTypesOverrides';
|
|
22
21
|
import type {____TransformStyle_Internal} from './private/_TransformStyle';
|
|
23
22
|
|
|
23
|
+
declare export opaque type NativeColorValue;
|
|
24
24
|
export type ____ColorValue_Internal = null | string | number | NativeColorValue;
|
|
25
25
|
export type ColorArrayValue = null | $ReadOnlyArray<____ColorValue_Internal>;
|
|
26
26
|
export type PointValue = {
|
|
@@ -134,6 +134,80 @@ type ____LayoutStyle_Internal = $ReadOnly<{
|
|
|
134
134
|
*/
|
|
135
135
|
top?: DimensionValue,
|
|
136
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
|
+
|
|
137
211
|
/** `minWidth` is the minimum width for this component, in logical pixels.
|
|
138
212
|
*
|
|
139
213
|
* It works similarly to `min-width` in CSS, but in React Native you
|
|
@@ -714,6 +788,14 @@ export type ____FontVariantArray_Internal = $ReadOnlyArray<
|
|
|
714
788
|
| 'oldstyle-nums'
|
|
715
789
|
| 'lining-nums'
|
|
716
790
|
| 'tabular-nums'
|
|
791
|
+
| 'common-ligatures'
|
|
792
|
+
| 'no-common-ligatures'
|
|
793
|
+
| 'discretionary-ligatures'
|
|
794
|
+
| 'no-discretionary-ligatures'
|
|
795
|
+
| 'historical-ligatures'
|
|
796
|
+
| 'no-historical-ligatures'
|
|
797
|
+
| 'contextual'
|
|
798
|
+
| 'no-contextual'
|
|
717
799
|
| 'proportional-nums'
|
|
718
800
|
| 'stylistic-one'
|
|
719
801
|
| 'stylistic-two'
|
|
@@ -810,20 +892,22 @@ type GenericStyleProp<+T> =
|
|
|
810
892
|
| $ReadOnlyArray<GenericStyleProp<T>>;
|
|
811
893
|
|
|
812
894
|
export type ____DangerouslyImpreciseStyleProp_Internal = GenericStyleProp<
|
|
813
|
-
|
|
895
|
+
Partial<____DangerouslyImpreciseStyle_Internal>,
|
|
814
896
|
>;
|
|
815
897
|
export type ____ViewStyleProp_Internal = GenericStyleProp<
|
|
816
|
-
$ReadOnly
|
|
898
|
+
$ReadOnly<Partial<____ViewStyle_Internal>>,
|
|
817
899
|
>;
|
|
818
900
|
export type ____TextStyleProp_Internal = GenericStyleProp<
|
|
819
|
-
$ReadOnly
|
|
901
|
+
$ReadOnly<Partial<____TextStyle_Internal>>,
|
|
820
902
|
>;
|
|
821
903
|
export type ____ImageStyleProp_Internal = GenericStyleProp<
|
|
822
|
-
$ReadOnly
|
|
904
|
+
$ReadOnly<Partial<____ImageStyle_Internal>>,
|
|
823
905
|
>;
|
|
824
906
|
|
|
825
907
|
export type ____Styles_Internal = {
|
|
826
|
-
|
|
908
|
+
// $FlowFixMe[incompatible-exact]
|
|
909
|
+
// $FlowFixMe[incompatible-type]
|
|
910
|
+
+[key: string]: Partial<____DangerouslyImpreciseStyle_Internal>,
|
|
827
911
|
...
|
|
828
912
|
};
|
|
829
913
|
|
|
@@ -13,6 +13,7 @@
|
|
|
13
13
|
import type {DangerouslyImpreciseStyleProp} from './StyleSheet';
|
|
14
14
|
import type {____FlattenStyleProp_Internal} from './StyleSheetTypes';
|
|
15
15
|
|
|
16
|
+
// $FlowFixMe[unsupported-variance-annotation]
|
|
16
17
|
function flattenStyle<+TStyleProp: DangerouslyImpreciseStyleProp>(
|
|
17
18
|
style: ?TStyleProp,
|
|
18
19
|
// $FlowFixMe[underconstrained-implicit-instantiation]
|
|
@@ -30,11 +31,14 @@ function flattenStyle<+TStyleProp: DangerouslyImpreciseStyleProp>(
|
|
|
30
31
|
// $FlowFixMe[underconstrained-implicit-instantiation]
|
|
31
32
|
const computedStyle = flattenStyle(style[i]);
|
|
32
33
|
if (computedStyle) {
|
|
34
|
+
// $FlowFixMe[invalid-in-rhs]
|
|
33
35
|
for (const key in computedStyle) {
|
|
36
|
+
// $FlowFixMe[incompatible-use]
|
|
34
37
|
result[key] = computedStyle[key];
|
|
35
38
|
}
|
|
36
39
|
}
|
|
37
40
|
}
|
|
41
|
+
// $FlowFixMe[incompatible-return]
|
|
38
42
|
return result;
|
|
39
43
|
}
|
|
40
44
|
|