@office-iss/react-native-win32 0.0.0-canary.263 → 0.0.0-canary.265
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.flowconfig +1 -1
- package/CHANGELOG.json +14981 -14942
- package/CHANGELOG.md +31 -19
- package/Libraries/Animated/AnimatedImplementation.js +2 -2
- package/Libraries/Animated/NativeAnimatedAllowlist.js +20 -9
- package/Libraries/Animated/animations/Animation.js +1 -4
- package/Libraries/Animated/createAnimatedComponent.js +13 -0
- package/Libraries/Animated/nodes/AnimatedNode.js +39 -45
- package/Libraries/Animated/nodes/AnimatedObject.js +13 -3
- package/Libraries/Animated/nodes/AnimatedProps.js +81 -37
- package/Libraries/Animated/nodes/AnimatedStyle.js +104 -39
- package/Libraries/Animated/nodes/AnimatedTransform.js +55 -22
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +1 -3
- package/Libraries/Animated/useAnimatedProps.js +38 -20
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +3 -1
- package/Libraries/Components/ScrollView/ScrollView.js +12 -9
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +3 -0
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +10 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +19 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +17 -1
- package/Libraries/Components/TextInput/TextInput.js +17 -1
- package/Libraries/Components/TextInput/TextInput.win32.js +17 -1
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -1
- package/Libraries/Components/Touchable/TouchableHighlight.js +2 -2
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -1
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +6 -2
- package/Libraries/Core/ReactNativeVersion.js +2 -2
- package/Libraries/Image/AssetSourceResolver.js +12 -1
- package/Libraries/Modal/Modal.d.ts +7 -0
- package/Libraries/Modal/Modal.js +9 -1
- package/Libraries/NativeComponent/BaseViewConfig.android.js +7 -2
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +11 -2
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +1 -1
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -1
- package/Libraries/ReactNative/AppRegistry.js +2 -6
- package/Libraries/ReactNative/getNativeComponentAttributes.js +4 -0
- package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +5 -6
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +102 -5
- package/Libraries/StyleSheet/StyleSheetTypes.js +9 -5
- package/Libraries/StyleSheet/processBoxShadow.js +5 -7
- package/Libraries/StyleSheet/processFilter.js +4 -4
- package/Libraries/Text/TextNativeComponent.js +0 -1
- package/Libraries/Utilities/HMRClient.js +5 -5
- package/overrides.json +6 -6
- package/package.json +18 -16
- package/src/private/animated/NativeAnimatedHelper.js +12 -8
- package/src/private/animated/NativeAnimatedHelper.win32.js +12 -8
- package/src/private/animated/useAnimatedPropsMemo.js +349 -0
- package/src/private/components/HScrollViewNativeComponents.js +9 -8
- package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +13 -9
- package/src/private/components/VScrollViewNativeComponents.js +9 -8
- package/src/private/featureflags/ReactNativeFeatureFlags.js +50 -22
- package/src/private/featureflags/ReactNativeFeatureFlagsBase.js +8 -2
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +7 -4
- package/src/private/webapis/dom/geometry/DOMRect.js +2 -2
- package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +2 -2
- package/types/experimental.d.ts +0 -105
- package/types/modules/Codegen.d.ts +6 -0
|
@@ -249,7 +249,10 @@ export type TextContentType =
|
|
|
249
249
|
| 'birthdate'
|
|
250
250
|
| 'birthdateDay'
|
|
251
251
|
| 'birthdateMonth'
|
|
252
|
-
| 'birthdateYear'
|
|
252
|
+
| 'birthdateYear'
|
|
253
|
+
| 'dateTime'
|
|
254
|
+
| 'flightNumber'
|
|
255
|
+
| 'shipmentTrackingNumber';
|
|
253
256
|
|
|
254
257
|
export type enterKeyHintType =
|
|
255
258
|
// Cross Platform
|
|
@@ -366,6 +369,19 @@ type IOSProps = $ReadOnly<{|
|
|
|
366
369
|
*/
|
|
367
370
|
lineBreakStrategyIOS?: ?('none' | 'standard' | 'hangul-word' | 'push-out'),
|
|
368
371
|
|
|
372
|
+
/**
|
|
373
|
+
* Set line break mode on iOS.
|
|
374
|
+
* @platform ios
|
|
375
|
+
*/
|
|
376
|
+
lineBreakModeIOS?: ?(
|
|
377
|
+
| 'wordWrapping'
|
|
378
|
+
| 'char'
|
|
379
|
+
| 'clip'
|
|
380
|
+
| 'head'
|
|
381
|
+
| 'middle'
|
|
382
|
+
| 'tail'
|
|
383
|
+
),
|
|
384
|
+
|
|
369
385
|
/**
|
|
370
386
|
* If `false`, the iOS system will not insert an extra space after a paste operation
|
|
371
387
|
* neither delete one or two spaces after a cut or delete operation.
|
|
@@ -44,7 +44,7 @@ type Props = $ReadOnly<{|
|
|
|
44
44
|
onHideUnderlay?: ?() => void,
|
|
45
45
|
testOnly_pressed?: ?boolean,
|
|
46
46
|
|
|
47
|
-
hostRef: React.
|
|
47
|
+
hostRef: React.RefSetter<React.ElementRef<typeof View>>,
|
|
48
48
|
|}>;
|
|
49
49
|
|
|
50
50
|
type ExtraStyles = $ReadOnly<{|
|
|
@@ -382,7 +382,7 @@ class TouchableHighlight extends React.Component<Props, State> {
|
|
|
382
382
|
}
|
|
383
383
|
|
|
384
384
|
const Touchable: React.AbstractComponent<
|
|
385
|
-
$ReadOnly<$Diff<Props, {
|
|
385
|
+
$ReadOnly<$Diff<Props, {|+hostRef: mixed|}>>,
|
|
386
386
|
React.ElementRef<typeof View>,
|
|
387
387
|
> = React.forwardRef((props, hostRef) => (
|
|
388
388
|
<TouchableHighlight {...props} hostRef={hostRef} />
|
|
@@ -120,7 +120,7 @@ const ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {
|
|
|
120
120
|
/**
|
|
121
121
|
* Filter
|
|
122
122
|
*/
|
|
123
|
-
|
|
123
|
+
filter: {process: processFilter},
|
|
124
124
|
|
|
125
125
|
/**
|
|
126
126
|
* MixBlendMode
|
|
@@ -135,7 +135,7 @@ const ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {
|
|
|
135
135
|
/*
|
|
136
136
|
* BoxShadow
|
|
137
137
|
*/
|
|
138
|
-
|
|
138
|
+
boxShadow: {process: processBoxShadow},
|
|
139
139
|
|
|
140
140
|
/**
|
|
141
141
|
* Linear Gradient
|
|
@@ -174,6 +174,10 @@ const ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {
|
|
|
174
174
|
borderTopStartRadius: true,
|
|
175
175
|
cursor: true,
|
|
176
176
|
opacity: true,
|
|
177
|
+
outlineColor: colorAttributes,
|
|
178
|
+
outlineOffset: true,
|
|
179
|
+
outlineStyle: true,
|
|
180
|
+
outlineWidth: true,
|
|
177
181
|
pointerEvents: true,
|
|
178
182
|
|
|
179
183
|
/**
|
|
@@ -53,6 +53,13 @@ function getAssetPathInDrawableFolder(asset: PackagerAsset): string {
|
|
|
53
53
|
return drawableFolder + '/' + fileName + '.' + asset.type;
|
|
54
54
|
}
|
|
55
55
|
|
|
56
|
+
/**
|
|
57
|
+
* Returns true if the asset can be loaded over the network.
|
|
58
|
+
*/
|
|
59
|
+
function assetSupportsNetworkLoads(asset: PackagerAsset): boolean {
|
|
60
|
+
return !(asset.type === 'xml' && Platform.OS === 'android');
|
|
61
|
+
}
|
|
62
|
+
|
|
56
63
|
class AssetSourceResolver {
|
|
57
64
|
serverUrl: ?string;
|
|
58
65
|
// where the jsbundle is being run from
|
|
@@ -67,7 +74,11 @@ class AssetSourceResolver {
|
|
|
67
74
|
}
|
|
68
75
|
|
|
69
76
|
isLoadedFromServer(): boolean {
|
|
70
|
-
return
|
|
77
|
+
return (
|
|
78
|
+
this.serverUrl != null &&
|
|
79
|
+
this.serverUrl !== '' &&
|
|
80
|
+
assetSupportsNetworkLoads(this.asset)
|
|
81
|
+
);
|
|
71
82
|
}
|
|
72
83
|
|
|
73
84
|
isLoadedFromFileSystem(): boolean {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
import type * as React from 'react';
|
|
11
11
|
import {ViewProps} from '../Components/View/ViewPropTypes';
|
|
12
12
|
import {NativeSyntheticEvent} from '../Types/CoreEventTypes';
|
|
13
|
+
import {ColorValue} from '../StyleSheet/StyleSheet';
|
|
13
14
|
|
|
14
15
|
export interface ModalBaseProps {
|
|
15
16
|
/**
|
|
@@ -43,6 +44,12 @@ export interface ModalBaseProps {
|
|
|
43
44
|
* The `onShow` prop allows passing a function that will be called once the modal has been shown.
|
|
44
45
|
*/
|
|
45
46
|
onShow?: ((event: NativeSyntheticEvent<any>) => void) | undefined;
|
|
47
|
+
|
|
48
|
+
/**
|
|
49
|
+
* The `backdropColor` props sets the background color of the modal's container.
|
|
50
|
+
* Defaults to `white` if not provided and transparent is `false`. Ignored if `transparent` is `true`.
|
|
51
|
+
*/
|
|
52
|
+
backdropColor?: ColorValue | undefined;
|
|
46
53
|
}
|
|
47
54
|
|
|
48
55
|
export interface ModalPropsIOS {
|
package/Libraries/Modal/Modal.js
CHANGED
|
@@ -157,6 +157,12 @@ export type Props = $ReadOnly<{|
|
|
|
157
157
|
* See https://reactnative.dev/docs/modal#onorientationchange
|
|
158
158
|
*/
|
|
159
159
|
onOrientationChange?: ?DirectEventHandler<OrientationChangeEvent>,
|
|
160
|
+
|
|
161
|
+
/**
|
|
162
|
+
* The `backdropColor` props sets the background color of the modal's container.
|
|
163
|
+
* Defaults to `white` if not provided and transparent is `false`. Ignored if `transparent` is `true`.
|
|
164
|
+
*/
|
|
165
|
+
backdropColor?: ?string,
|
|
160
166
|
|}>;
|
|
161
167
|
|
|
162
168
|
function confirmProps(props: Props) {
|
|
@@ -249,7 +255,9 @@ class Modal extends React.Component<Props, State> {
|
|
|
249
255
|
|
|
250
256
|
const containerStyles = {
|
|
251
257
|
backgroundColor:
|
|
252
|
-
this.props.transparent === true
|
|
258
|
+
this.props.transparent === true
|
|
259
|
+
? 'transparent'
|
|
260
|
+
: this.props.backdropColor ?? 'white',
|
|
253
261
|
};
|
|
254
262
|
|
|
255
263
|
let animationType = this.props.animationType || 'none';
|
|
@@ -169,10 +169,10 @@ const validAttributesForNonEventProps = {
|
|
|
169
169
|
experimental_backgroundImage: {
|
|
170
170
|
process: require('../StyleSheet/processBackgroundImage').default,
|
|
171
171
|
},
|
|
172
|
-
|
|
172
|
+
boxShadow: {
|
|
173
173
|
process: require('../StyleSheet/processBoxShadow').default,
|
|
174
174
|
},
|
|
175
|
-
|
|
175
|
+
filter: {
|
|
176
176
|
process: require('../StyleSheet/processFilter').default,
|
|
177
177
|
},
|
|
178
178
|
experimental_mixBlendMode: true,
|
|
@@ -268,6 +268,11 @@ const validAttributesForNonEventProps = {
|
|
|
268
268
|
borderLeftWidth: true,
|
|
269
269
|
borderRightWidth: true,
|
|
270
270
|
|
|
271
|
+
outlineColor: {process: require('../StyleSheet/processColor').default},
|
|
272
|
+
outlineOffset: true,
|
|
273
|
+
outlineStyle: true,
|
|
274
|
+
outlineWidth: true,
|
|
275
|
+
|
|
271
276
|
start: true,
|
|
272
277
|
end: true,
|
|
273
278
|
left: true,
|
|
@@ -198,6 +198,7 @@ const validAttributesForNonEventProps = {
|
|
|
198
198
|
testID: true,
|
|
199
199
|
backgroundColor: {process: require('../StyleSheet/processColor').default},
|
|
200
200
|
backfaceVisibility: true,
|
|
201
|
+
cursor: true,
|
|
201
202
|
opacity: true,
|
|
202
203
|
shadowColor: {process: require('../StyleSheet/processColor').default},
|
|
203
204
|
shadowOffset: {diff: require('../Utilities/differ/sizesDiffer')},
|
|
@@ -216,16 +217,18 @@ const validAttributesForNonEventProps = {
|
|
|
216
217
|
role: true,
|
|
217
218
|
borderRadius: true,
|
|
218
219
|
borderColor: {process: require('../StyleSheet/processColor').default},
|
|
220
|
+
borderBlockColor: {process: require('../StyleSheet/processColor').default},
|
|
219
221
|
borderCurve: true,
|
|
220
222
|
borderWidth: true,
|
|
223
|
+
borderBlockWidth: true,
|
|
221
224
|
borderStyle: true,
|
|
222
225
|
hitSlop: {diff: require('../Utilities/differ/insetsDiffer')},
|
|
223
226
|
collapsable: true,
|
|
224
227
|
collapsableChildren: true,
|
|
225
|
-
|
|
228
|
+
filter: {
|
|
226
229
|
process: require('../StyleSheet/processFilter').default,
|
|
227
230
|
},
|
|
228
|
-
|
|
231
|
+
boxShadow: {
|
|
229
232
|
process: require('../StyleSheet/processBoxShadow').default,
|
|
230
233
|
},
|
|
231
234
|
experimental_mixBlendMode: true,
|
|
@@ -240,9 +243,15 @@ const validAttributesForNonEventProps = {
|
|
|
240
243
|
borderLeftWidth: true,
|
|
241
244
|
borderLeftColor: {process: require('../StyleSheet/processColor').default},
|
|
242
245
|
borderStartWidth: true,
|
|
246
|
+
borderBlockStartWidth: true,
|
|
243
247
|
borderStartColor: {process: require('../StyleSheet/processColor').default},
|
|
248
|
+
borderBlockStartColor: {
|
|
249
|
+
process: require('../StyleSheet/processColor').default,
|
|
250
|
+
},
|
|
244
251
|
borderEndWidth: true,
|
|
252
|
+
borderBlockEndWidth: true,
|
|
245
253
|
borderEndColor: {process: require('../StyleSheet/processColor').default},
|
|
254
|
+
borderBlockEndColor: {process: require('../StyleSheet/processColor').default},
|
|
246
255
|
|
|
247
256
|
borderTopLeftRadius: true,
|
|
248
257
|
borderTopRightRadius: true,
|
|
@@ -225,7 +225,7 @@ const validAttributesForNonEventProps = {
|
|
|
225
225
|
experimental_filter: {
|
|
226
226
|
process: require('../StyleSheet/processFilter').default,
|
|
227
227
|
},
|
|
228
|
-
|
|
228
|
+
boxShadow: {
|
|
229
229
|
process: require('../StyleSheet/processBoxShadow').default,
|
|
230
230
|
},
|
|
231
231
|
experimental_mixBlendMode: true,
|
|
@@ -13,7 +13,7 @@ import type {RootTag} from '../Types/RootTagTypes';
|
|
|
13
13
|
import type {IPerformanceLogger} from '../Utilities/createPerformanceLogger';
|
|
14
14
|
import type {DisplayModeType} from './DisplayMode';
|
|
15
15
|
|
|
16
|
-
import
|
|
16
|
+
import registerCallableModule from '../Core/registerCallableModule';
|
|
17
17
|
import BugReporting from '../BugReporting/BugReporting';
|
|
18
18
|
import createPerformanceLogger from '../Utilities/createPerformanceLogger';
|
|
19
19
|
import infoLog from '../Utilities/infoLog';
|
|
@@ -361,10 +361,6 @@ global.RN$SurfaceRegistry = {
|
|
|
361
361
|
setSurfaceProps: AppRegistry.setSurfaceProps,
|
|
362
362
|
};
|
|
363
363
|
|
|
364
|
-
|
|
365
|
-
console.log('Bridgeless mode is enabled');
|
|
366
|
-
} else {
|
|
367
|
-
BatchedBridge.registerCallableModule('AppRegistry', AppRegistry);
|
|
368
|
-
}
|
|
364
|
+
registerCallableModule('AppRegistry', AppRegistry);
|
|
369
365
|
|
|
370
366
|
module.exports = AppRegistry;
|
|
@@ -188,6 +188,10 @@ function getProcessorForType(typeName: string): ?(nextProp: any) => any {
|
|
|
188
188
|
case 'UIImage':
|
|
189
189
|
case 'RCTImageSource':
|
|
190
190
|
return resolveAssetSource;
|
|
191
|
+
case 'BoxShadowArray':
|
|
192
|
+
return processBoxShadow;
|
|
193
|
+
case 'FilterArray':
|
|
194
|
+
return processFilter;
|
|
191
195
|
// Android Types
|
|
192
196
|
case 'Color':
|
|
193
197
|
return processColor;
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<3eb929731c259569c7af3b6479e486fe>>
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import type {
|
|
@@ -234,8 +234,8 @@ export type ReactNativeType = {
|
|
|
234
234
|
): ?ElementRef<ElementType>,
|
|
235
235
|
unmountComponentAtNode(containerTag: number): void,
|
|
236
236
|
unmountComponentAtNodeAndRemoveContainer(containerTag: number): void,
|
|
237
|
-
unstable_batchedUpdates: <T>(fn: (T) => void, bookkeeping: T) => void,
|
|
238
|
-
__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: SecretInternalsType,
|
|
237
|
+
+unstable_batchedUpdates: <T>(fn: (T) => void, bookkeeping: T) => void,
|
|
238
|
+
+__SECRET_INTERNALS_DO_NOT_USE_OR_YOU_WILL_BE_FIRED: SecretInternalsType,
|
|
239
239
|
...
|
|
240
240
|
};
|
|
241
241
|
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict-local
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<83073425aa3f71ced2c8c51f25a25938>>
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
'use strict';
|
|
@@ -94,8 +94,8 @@ export function register(name: string, callback: () => ViewConfig): string {
|
|
|
94
94
|
* This configuration will be lazy-loaded from UIManager.
|
|
95
95
|
*/
|
|
96
96
|
export function get(name: string): ViewConfig {
|
|
97
|
-
let viewConfig;
|
|
98
|
-
if (
|
|
97
|
+
let viewConfig = viewConfigs.get(name);
|
|
98
|
+
if (viewConfig == null) {
|
|
99
99
|
const callback = viewConfigCallbacks.get(name);
|
|
100
100
|
if (typeof callback !== 'function') {
|
|
101
101
|
invariant(
|
|
@@ -110,15 +110,14 @@ export function get(name: string): ViewConfig {
|
|
|
110
110
|
);
|
|
111
111
|
}
|
|
112
112
|
viewConfig = callback();
|
|
113
|
+
invariant(viewConfig, 'View config not found for component `%s`', name);
|
|
114
|
+
|
|
113
115
|
processEventTypes(viewConfig);
|
|
114
116
|
viewConfigs.set(name, viewConfig);
|
|
115
117
|
|
|
116
118
|
// Clear the callback after the config is set so that
|
|
117
119
|
// we don't mask any errors during registration.
|
|
118
120
|
viewConfigCallbacks.set(name, null);
|
|
119
|
-
} else {
|
|
120
|
-
viewConfig = viewConfigs.get(name);
|
|
121
121
|
}
|
|
122
|
-
invariant(viewConfig, 'View config not found for name %s', name);
|
|
123
122
|
return viewConfig;
|
|
124
123
|
}
|
|
@@ -110,11 +110,102 @@ export interface FlexStyle {
|
|
|
110
110
|
top?: DimensionValue | undefined;
|
|
111
111
|
width?: DimensionValue | undefined;
|
|
112
112
|
zIndex?: number | undefined;
|
|
113
|
+
direction?: 'inherit' | 'ltr' | 'rtl' | undefined;
|
|
113
114
|
|
|
114
115
|
/**
|
|
115
|
-
*
|
|
116
|
+
* Equivalent to `top`, `bottom`, `right` and `left`
|
|
116
117
|
*/
|
|
117
|
-
|
|
118
|
+
inset?: DimensionValue | undefined;
|
|
119
|
+
|
|
120
|
+
/**
|
|
121
|
+
* Equivalent to `top`, `bottom`
|
|
122
|
+
*/
|
|
123
|
+
insetBlock?: DimensionValue | undefined;
|
|
124
|
+
|
|
125
|
+
/**
|
|
126
|
+
* Equivalent to `bottom`
|
|
127
|
+
*/
|
|
128
|
+
insetBlockEnd?: DimensionValue | undefined;
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Equivalent to `top`
|
|
132
|
+
*/
|
|
133
|
+
insetBlockStart?: DimensionValue | undefined;
|
|
134
|
+
|
|
135
|
+
/**
|
|
136
|
+
* Equivalent to `right` and `left`
|
|
137
|
+
*/
|
|
138
|
+
insetInline?: DimensionValue | undefined;
|
|
139
|
+
|
|
140
|
+
/**
|
|
141
|
+
* Equivalent to `right` or `left`
|
|
142
|
+
*/
|
|
143
|
+
insetInlineEnd?: DimensionValue | undefined;
|
|
144
|
+
|
|
145
|
+
/**
|
|
146
|
+
* Equivalent to `right` or `left`
|
|
147
|
+
*/
|
|
148
|
+
insetInlineStart?: DimensionValue | undefined;
|
|
149
|
+
|
|
150
|
+
/**
|
|
151
|
+
* Equivalent to `marginVertical`
|
|
152
|
+
*/
|
|
153
|
+
marginBlock?: DimensionValue | undefined;
|
|
154
|
+
|
|
155
|
+
/**
|
|
156
|
+
* Equivalent to `marginBottom`
|
|
157
|
+
*/
|
|
158
|
+
marginBlockEnd?: DimensionValue | undefined;
|
|
159
|
+
|
|
160
|
+
/**
|
|
161
|
+
* Equivalent to `marginTop`
|
|
162
|
+
*/
|
|
163
|
+
marginBlockStart?: DimensionValue | undefined;
|
|
164
|
+
|
|
165
|
+
/**
|
|
166
|
+
* Equivalent to `marginHorizontal`
|
|
167
|
+
*/
|
|
168
|
+
marginInline?: DimensionValue | undefined;
|
|
169
|
+
|
|
170
|
+
/**
|
|
171
|
+
* Equivalent to `marginEnd`
|
|
172
|
+
*/
|
|
173
|
+
marginInlineEnd?: DimensionValue | undefined;
|
|
174
|
+
|
|
175
|
+
/**
|
|
176
|
+
* Equivalent to `marginStart`
|
|
177
|
+
*/
|
|
178
|
+
marginInlineStart?: DimensionValue | undefined;
|
|
179
|
+
|
|
180
|
+
/**
|
|
181
|
+
* Equivalent to `paddingVertical`
|
|
182
|
+
*/
|
|
183
|
+
paddingBlock?: DimensionValue | undefined;
|
|
184
|
+
|
|
185
|
+
/**
|
|
186
|
+
* Equivalent to `paddingBottom`
|
|
187
|
+
*/
|
|
188
|
+
paddingBlockEnd?: DimensionValue | undefined;
|
|
189
|
+
|
|
190
|
+
/**
|
|
191
|
+
* Equivalent to `paddingTop`
|
|
192
|
+
*/
|
|
193
|
+
paddingBlockStart?: DimensionValue | undefined;
|
|
194
|
+
|
|
195
|
+
/**
|
|
196
|
+
* Equivalent to `paddingHorizontal`
|
|
197
|
+
*/
|
|
198
|
+
paddingInline?: DimensionValue | undefined;
|
|
199
|
+
|
|
200
|
+
/**
|
|
201
|
+
* Equivalent to `paddingEnd`
|
|
202
|
+
*/
|
|
203
|
+
paddingInlineEnd?: DimensionValue | undefined;
|
|
204
|
+
|
|
205
|
+
/**
|
|
206
|
+
* Equivalent to `paddingStart`
|
|
207
|
+
*/
|
|
208
|
+
paddingInlineStart?: DimensionValue | undefined;
|
|
118
209
|
}
|
|
119
210
|
|
|
120
211
|
export interface ShadowStyleIOS {
|
|
@@ -239,16 +330,16 @@ export type FilterFunction =
|
|
|
239
330
|
| {opacity: number | string}
|
|
240
331
|
| {saturate: number | string}
|
|
241
332
|
| {sepia: number | string}
|
|
242
|
-
| {dropShadow:
|
|
333
|
+
| {dropShadow: DropShadowValue | string};
|
|
243
334
|
|
|
244
|
-
export type
|
|
335
|
+
export type DropShadowValue = {
|
|
245
336
|
offsetX: number | string;
|
|
246
337
|
offsetY: number | string;
|
|
247
338
|
standardDeviation?: number | string | undefined;
|
|
248
339
|
color?: ColorValue | number | undefined;
|
|
249
340
|
};
|
|
250
341
|
|
|
251
|
-
export type
|
|
342
|
+
export type BoxShadowValue = {
|
|
252
343
|
offsetX: number | string;
|
|
253
344
|
offsetY: number | string;
|
|
254
345
|
color?: string | undefined;
|
|
@@ -320,6 +411,10 @@ export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
|
|
|
320
411
|
borderTopLeftRadius?: AnimatableNumericValue | string | undefined;
|
|
321
412
|
borderTopRightRadius?: AnimatableNumericValue | string | undefined;
|
|
322
413
|
borderTopStartRadius?: AnimatableNumericValue | string | undefined;
|
|
414
|
+
outlineColor?: ColorValue | undefined;
|
|
415
|
+
outlineOffset?: AnimatableNumericValue | undefined;
|
|
416
|
+
outlineStyle?: 'solid' | 'dotted' | 'dashed' | undefined;
|
|
417
|
+
outlineWidth?: AnimatableNumericValue | undefined;
|
|
323
418
|
opacity?: AnimatableNumericValue | undefined;
|
|
324
419
|
/**
|
|
325
420
|
* Sets the elevation of a view, using Android's underlying
|
|
@@ -336,6 +431,8 @@ export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
|
|
|
336
431
|
pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto' | undefined;
|
|
337
432
|
isolation?: 'auto' | 'isolate' | undefined;
|
|
338
433
|
cursor?: CursorValue | undefined;
|
|
434
|
+
boxShadow?: ReadonlyArray<BoxShadowValue> | string | undefined;
|
|
435
|
+
filter?: ReadonlyArray<FilterFunction> | string | undefined;
|
|
339
436
|
}
|
|
340
437
|
|
|
341
438
|
export type FontVariant =
|
|
@@ -700,9 +700,9 @@ export type FilterFunction =
|
|
|
700
700
|
| {opacity: number | string}
|
|
701
701
|
| {saturate: number | string}
|
|
702
702
|
| {sepia: number | string}
|
|
703
|
-
| {dropShadow:
|
|
703
|
+
| {dropShadow: DropShadowValue | string};
|
|
704
704
|
|
|
705
|
-
export type
|
|
705
|
+
export type DropShadowValue = {
|
|
706
706
|
offsetX: number | string,
|
|
707
707
|
offsetY: number | string,
|
|
708
708
|
standardDeviation?: number | string,
|
|
@@ -719,7 +719,7 @@ export type GradientValue = {
|
|
|
719
719
|
}>,
|
|
720
720
|
};
|
|
721
721
|
|
|
722
|
-
export type
|
|
722
|
+
export type BoxShadowValue = {
|
|
723
723
|
offsetX: number | string,
|
|
724
724
|
offsetY: number | string,
|
|
725
725
|
color?: ____ColorValue_Internal,
|
|
@@ -785,11 +785,15 @@ export type ____ViewStyle_InternalCore = $ReadOnly<{
|
|
|
785
785
|
borderStartWidth?: AnimatableNumericValue,
|
|
786
786
|
borderTopWidth?: AnimatableNumericValue,
|
|
787
787
|
opacity?: AnimatableNumericValue,
|
|
788
|
+
outlineColor?: ____ColorValue_Internal,
|
|
789
|
+
outlineOffset?: AnimatableNumericValue,
|
|
790
|
+
outlineStyle?: 'solid' | 'dotted' | 'dashed',
|
|
791
|
+
outlineWidth?: AnimatableNumericValue,
|
|
788
792
|
elevation?: number,
|
|
789
793
|
pointerEvents?: 'auto' | 'none' | 'box-none' | 'box-only',
|
|
790
794
|
cursor?: CursorValue,
|
|
791
|
-
|
|
792
|
-
|
|
795
|
+
boxShadow?: $ReadOnlyArray<BoxShadowValue> | string,
|
|
796
|
+
filter?: $ReadOnlyArray<FilterFunction> | string,
|
|
793
797
|
experimental_mixBlendMode?: ____BlendMode_Internal,
|
|
794
798
|
experimental_backgroundImage?: $ReadOnlyArray<GradientValue> | string,
|
|
795
799
|
isolation?: 'auto' | 'isolate',
|
|
@@ -10,7 +10,7 @@
|
|
|
10
10
|
*/
|
|
11
11
|
|
|
12
12
|
import type {ProcessedColorValue} from './processColor';
|
|
13
|
-
import type {
|
|
13
|
+
import type {BoxShadowValue} from './StyleSheetTypes';
|
|
14
14
|
|
|
15
15
|
import processColor from './processColor';
|
|
16
16
|
|
|
@@ -24,7 +24,7 @@ export type ParsedBoxShadow = {
|
|
|
24
24
|
};
|
|
25
25
|
|
|
26
26
|
export default function processBoxShadow(
|
|
27
|
-
rawBoxShadows: ?($ReadOnlyArray<
|
|
27
|
+
rawBoxShadows: ?($ReadOnlyArray<BoxShadowValue> | string),
|
|
28
28
|
): Array<ParsedBoxShadow> {
|
|
29
29
|
const result: Array<ParsedBoxShadow> = [];
|
|
30
30
|
if (rawBoxShadows == null) {
|
|
@@ -106,16 +106,14 @@ export default function processBoxShadow(
|
|
|
106
106
|
return result;
|
|
107
107
|
}
|
|
108
108
|
|
|
109
|
-
function parseBoxShadowString(
|
|
110
|
-
|
|
111
|
-
): Array<BoxShadowPrimitive> {
|
|
112
|
-
let result: Array<BoxShadowPrimitive> = [];
|
|
109
|
+
function parseBoxShadowString(rawBoxShadows: string): Array<BoxShadowValue> {
|
|
110
|
+
let result: Array<BoxShadowValue> = [];
|
|
113
111
|
|
|
114
112
|
for (const rawBoxShadow of rawBoxShadows
|
|
115
113
|
.split(/,(?![^()]*\))/) // split by comma that is not in parenthesis
|
|
116
114
|
.map(bS => bS.trim())
|
|
117
115
|
.filter(bS => bS !== '')) {
|
|
118
|
-
const boxShadow:
|
|
116
|
+
const boxShadow: BoxShadowValue = {
|
|
119
117
|
offsetX: 0,
|
|
120
118
|
offsetY: 0,
|
|
121
119
|
};
|
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
14
|
import type {ColorValue} from './StyleSheet';
|
|
15
|
-
import type {
|
|
15
|
+
import type {DropShadowValue, FilterFunction} from './StyleSheetTypes';
|
|
16
16
|
|
|
17
17
|
import processColor from './processColor';
|
|
18
18
|
|
|
@@ -179,7 +179,7 @@ function _getFilterAmount(filterName: string, filterArgs: mixed): ?number {
|
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
function parseDropShadow(
|
|
182
|
-
rawDropShadow: string |
|
|
182
|
+
rawDropShadow: string | DropShadowValue,
|
|
183
183
|
): ?ParsedDropShadow {
|
|
184
184
|
const dropShadow =
|
|
185
185
|
typeof rawDropShadow === 'string'
|
|
@@ -248,8 +248,8 @@ function parseDropShadow(
|
|
|
248
248
|
return parsedDropShadow;
|
|
249
249
|
}
|
|
250
250
|
|
|
251
|
-
function parseDropShadowString(rawDropShadow: string): ?
|
|
252
|
-
const dropShadow:
|
|
251
|
+
function parseDropShadowString(rawDropShadow: string): ?DropShadowValue {
|
|
252
|
+
const dropShadow: DropShadowValue = {
|
|
253
253
|
offsetX: 0,
|
|
254
254
|
offsetY: 0,
|
|
255
255
|
};
|
|
@@ -16,7 +16,6 @@ import type {TextProps} from './TextProps';
|
|
|
16
16
|
import {createViewConfig} from '../NativeComponent/ViewConfig';
|
|
17
17
|
import UIManager from '../ReactNative/UIManager';
|
|
18
18
|
import createReactNativeComponentClass from '../Renderer/shims/createReactNativeComponentClass';
|
|
19
|
-
import Platform from '../Utilities/Platform';
|
|
20
19
|
|
|
21
20
|
export type NativeTextProps = $ReadOnly<{
|
|
22
21
|
...TextProps,
|
|
@@ -153,11 +153,11 @@ const HMRClient: HMRClientNativeInterface = {
|
|
|
153
153
|
level: 'info',
|
|
154
154
|
data: [
|
|
155
155
|
'\n' +
|
|
156
|
-
'\
|
|
157
|
-
' \
|
|
158
|
-
'Tip: Type \
|
|
159
|
-
'or Microsoft Edge).' +
|
|
160
|
-
'\
|
|
156
|
+
'\u001B[7m' +
|
|
157
|
+
' \u001B[1m💡 JavaScript logs have moved!\u001B[22m They can now be ' +
|
|
158
|
+
'viewed in React Native DevTools. Tip: Type \u001B[1mj\u001B[22m in ' +
|
|
159
|
+
'the terminal to open (requires Google Chrome or Microsoft Edge).' +
|
|
160
|
+
'\u001B[27m' +
|
|
161
161
|
'\n',
|
|
162
162
|
],
|
|
163
163
|
}),
|