@office-iss/react-native-win32 0.0.0-canary.270 → 0.0.0-canary.272
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 +31 -1
- package/CHANGELOG.md +20 -4
- package/Libraries/Animated/animations/Animation.js +63 -24
- package/Libraries/Animated/animations/DecayAnimation.js +26 -38
- package/Libraries/Animated/animations/SpringAnimation.js +33 -39
- package/Libraries/Animated/animations/TimingAnimation.js +34 -42
- package/Libraries/Animated/createAnimatedComponent.js +46 -32
- package/Libraries/Animated/nodes/AnimatedProps.js +16 -10
- package/Libraries/Animated/nodes/AnimatedStyle.js +4 -0
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +19 -3
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.js +61 -3
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +61 -3
- package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +4 -4
- package/Libraries/Components/Button.js +9 -4
- package/Libraries/Components/Button.win32.js +12 -4
- package/Libraries/Components/Pressable/Pressable.js +4 -4
- package/Libraries/Components/Pressable/Pressable.win32.js +4 -4
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +9 -6
- package/Libraries/Components/SafeAreaView/SafeAreaView.js +4 -4
- package/Libraries/Components/SafeAreaView/SafeAreaView.win32.js +4 -4
- package/Libraries/Components/ScrollView/ScrollView.js +10 -10
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +4 -4
- package/Libraries/Components/Switch/Switch.js +8 -6
- package/Libraries/Components/TextInput/TextInput.d.ts +4 -4
- package/Libraries/Components/TextInput/TextInput.flow.js +7 -10
- package/Libraries/Components/TextInput/TextInput.js +11 -11
- package/Libraries/Components/TextInput/TextInput.win32.js +11 -11
- package/Libraries/Components/TextInput/TextInputState.js +11 -13
- package/Libraries/Components/TextInput/TextInputState.win32.js +13 -16
- package/Libraries/Components/Touchable/TouchableBounce.js +4 -1
- package/Libraries/Components/Touchable/TouchableHighlight.js +4 -4
- package/Libraries/Components/Touchable/TouchableOpacity.js +4 -4
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +1 -0
- package/Libraries/Components/View/View.js +4 -4
- package/Libraries/Components/View/View.win32.js +4 -4
- package/Libraries/Components/View/ViewNativeComponent.js +3 -10
- package/Libraries/Core/ExceptionsManager.js +3 -2
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpBatchedBridge.js +1 -10
- package/Libraries/Core/setUpReactDevTools.js +3 -3
- package/Libraries/Core/setUpSegmentFetcher.js +1 -0
- package/Libraries/Core/setUpTimers.js +8 -8
- package/Libraries/Debugging/DebuggingOverlay.js +4 -5
- package/Libraries/Image/ImageBackground.js +2 -5
- package/Libraries/Image/ImageProps.js +5 -5
- package/Libraries/Image/ImageTypes.flow.js +11 -9
- package/Libraries/Image/ImageViewNativeComponent.js +2 -2
- package/Libraries/Inspector/ReactDevToolsOverlay.js +0 -1
- package/Libraries/Inspector/getInspectorDataForViewAtPoint.js +3 -5
- package/Libraries/JSInspector/NetworkAgent.js +1 -1
- package/Libraries/Lists/FlatList.d.ts +1 -2
- package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +2 -2
- package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +1 -1
- package/Libraries/LogBox/LogBox.js +18 -5
- package/Libraries/LogBox/UI/LogBoxInspectorStackFrames.js +1 -1
- package/Libraries/LogBox/UI/LogBoxMessage.js +2 -2
- package/Libraries/NativeComponent/BaseViewConfig.android.js +1 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +1 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +1 -0
- package/Libraries/Network/XMLHttpRequest.js +26 -1
- package/Libraries/Pressability/HoverState.js +2 -0
- package/Libraries/Pressability/HoverState.win32.js +2 -0
- package/Libraries/Pressability/Pressability.js +2 -3
- package/Libraries/Pressability/Pressability.win32.js +2 -3
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +2 -3
- package/Libraries/ReactNative/RendererImplementation.js +4 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +13 -18
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -0
- package/Libraries/StyleSheet/StyleSheetTypes.js +13 -0
- package/Libraries/StyleSheet/processTransform.js +3 -34
- package/Libraries/Text/Text.js +248 -249
- package/Libraries/Text/Text.win32.js +282 -295
- package/Libraries/Types/CoreEventTypes.d.ts +3 -10
- package/Libraries/Types/CoreEventTypes.js +4 -6
- package/Libraries/Types/CoreEventTypes.win32.js +4 -6
- package/Libraries/Utilities/Platform.flow.js +2 -2
- package/Libraries/Utilities/Platform.flow.win32.js +3 -2
- package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +5 -4
- package/Libraries/promiseRejectionTrackingOptions.js +1 -1
- package/index.js +5 -2
- package/index.win32.js +5 -2
- package/jest/setup.js +30 -0
- package/overrides.json +21 -21
- package/package.json +13 -13
- package/src/private/animated/NativeAnimatedHelper.js +2 -4
- package/src/private/animated/NativeAnimatedHelper.win32.js +2 -3
- package/src/private/components/HScrollViewNativeComponents.js +4 -5
- package/src/private/components/VScrollViewNativeComponents.js +4 -5
- package/src/private/{fusebox → debugging}/setUpFuseboxReactDevToolsDispatcher.js +6 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +13 -22
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +2 -5
- package/src/private/fusebox/specs/NativeReactDevToolsRuntimeSettingsModule.js +34 -0
- package/src/private/specs/modules/NativeAccessibilityInfo.js +3 -0
- package/src/private/specs/modules/NativeAccessibilityInfoWin32.js +3 -0
- package/src/private/specs/modules/NativeAccessibilityManager.js +4 -0
- package/src/private/specs/modules/NativeAppearance.js +4 -10
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +2 -3
- package/src/private/webapis/performance/EventTiming.js +13 -8
- package/src/private/webapis/performance/Performance.js +30 -40
- package/src/private/webapis/performance/PerformanceEntry.js +2 -5
- package/src/private/webapis/performance/PerformanceObserver.js +20 -32
- package/src/private/webapis/performance/RawPerformanceEntry.js +1 -1
- package/src/private/webapis/performance/UserTiming.js +6 -2
- package/src/private/webapis/performance/Utilities.js +0 -7
- package/src/private/webapis/performance/specs/NativePerformance.js +53 -0
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +247 -0
- package/src-win/Libraries/Components/AccessibilityInfo/AccessibilityInfo.d.ts +19 -3
- package/types/public/ReactNativeTypes.d.ts +4 -4
- package/src/private/webapis/performance/specs/NativePerformanceObserver.js +0 -69
- package/src/private/webapis/performance/specs/__mocks__/NativePerformance.js +0 -69
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceObserver.js +0 -154
- /package/src/private/{fusebox → debugging}/FuseboxSessionObserver.js +0 -0
- /package/src/private/{reactdevtools → debugging}/ReactDevToolsSettingsManager.android.js +0 -0
- /package/src/private/{reactdevtools → debugging}/ReactDevToolsSettingsManager.ios.js +0 -0
- /package/src/private/{reactdevtools → debugging}/ReactDevToolsSettingsManager.win32.js +0 -0
|
@@ -8,7 +8,7 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {
|
|
11
|
+
import type {HostInstance} from '../Renderer/shims/ReactNativeTypes';
|
|
12
12
|
import type {
|
|
13
13
|
BlurEvent,
|
|
14
14
|
FocusEvent,
|
|
@@ -27,7 +27,6 @@ import {isHoverEnabled} from './HoverState';
|
|
|
27
27
|
import PressabilityPerformanceEventEmitter from './PressabilityPerformanceEventEmitter.js';
|
|
28
28
|
import {type PressabilityTouchSignal as TouchSignal} from './PressabilityTypes.js';
|
|
29
29
|
import invariant from 'invariant';
|
|
30
|
-
import * as React from 'react';
|
|
31
30
|
|
|
32
31
|
export type PressabilityConfig = $ReadOnly<{|
|
|
33
32
|
/**
|
|
@@ -409,7 +408,7 @@ export default class Pressability {
|
|
|
409
408
|
_longPressDelayTimeout: ?TimeoutID = null;
|
|
410
409
|
_pressDelayTimeout: ?TimeoutID = null;
|
|
411
410
|
_pressOutDelayTimeout: ?TimeoutID = null;
|
|
412
|
-
_responderID: ?number |
|
|
411
|
+
_responderID: ?number | HostInstance = null;
|
|
413
412
|
_responderRegion: ?$ReadOnly<{|
|
|
414
413
|
bottom: number,
|
|
415
414
|
left: number,
|
|
@@ -9,7 +9,7 @@
|
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
11
|
import type {
|
|
12
|
-
|
|
12
|
+
HostInstance,
|
|
13
13
|
INativeMethods,
|
|
14
14
|
InternalInstanceHandle,
|
|
15
15
|
MeasureInWindowOnSuccessCallback,
|
|
@@ -17,7 +17,6 @@ import type {
|
|
|
17
17
|
MeasureOnSuccessCallback,
|
|
18
18
|
ViewConfig,
|
|
19
19
|
} from '../../Renderer/shims/ReactNativeTypes';
|
|
20
|
-
import type {ElementRef} from 'react';
|
|
21
20
|
|
|
22
21
|
import TextInputState from '../../Components/TextInput/TextInputState';
|
|
23
22
|
import {getNodeFromInternalInstanceHandle} from '../../ReactNative/RendererProxy';
|
|
@@ -85,7 +84,7 @@ export default class ReactFabricHostComponent implements INativeMethods {
|
|
|
85
84
|
}
|
|
86
85
|
|
|
87
86
|
measureLayout(
|
|
88
|
-
relativeToNativeNode: number |
|
|
87
|
+
relativeToNativeNode: number | HostInstance,
|
|
89
88
|
onSuccess: MeasureLayoutOnSuccessCallback,
|
|
90
89
|
onFail?: () => void /* currently unused */,
|
|
91
90
|
) {
|
|
@@ -10,6 +10,7 @@
|
|
|
10
10
|
|
|
11
11
|
import type {
|
|
12
12
|
HostComponent,
|
|
13
|
+
HostInstance,
|
|
13
14
|
InternalInstanceHandle,
|
|
14
15
|
Node,
|
|
15
16
|
} from '../Renderer/shims/ReactNativeTypes';
|
|
@@ -61,7 +62,7 @@ export function renderElement({
|
|
|
61
62
|
|
|
62
63
|
export function findHostInstance_DEPRECATED<TElementType: ElementType>(
|
|
63
64
|
componentOrHandle: ?(ElementRef<TElementType> | number),
|
|
64
|
-
): ?
|
|
65
|
+
): ?HostInstance {
|
|
65
66
|
return require('../Renderer/shims/ReactNative').findHostInstance_DEPRECATED(
|
|
66
67
|
componentOrHandle,
|
|
67
68
|
);
|
|
@@ -76,7 +77,7 @@ export function findNodeHandle<TElementType: ElementType>(
|
|
|
76
77
|
}
|
|
77
78
|
|
|
78
79
|
export function dispatchCommand(
|
|
79
|
-
handle:
|
|
80
|
+
handle: HostInstance,
|
|
80
81
|
command: string,
|
|
81
82
|
args: Array<mixed>,
|
|
82
83
|
): void {
|
|
@@ -98,7 +99,7 @@ export function dispatchCommand(
|
|
|
98
99
|
}
|
|
99
100
|
|
|
100
101
|
export function sendAccessibilityEvent(
|
|
101
|
-
handle:
|
|
102
|
+
handle: HostInstance,
|
|
102
103
|
eventType: string,
|
|
103
104
|
): void {
|
|
104
105
|
return require('../Renderer/shims/ReactNative').sendAccessibilityEvent(
|
|
@@ -7,7 +7,7 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<9e6c8931d3b0c36d35ad5da90b721b85>>
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
13
|
import type {
|
|
@@ -113,31 +113,32 @@ export interface INativeMethods {
|
|
|
113
113
|
measure(callback: MeasureOnSuccessCallback): void;
|
|
114
114
|
measureInWindow(callback: MeasureInWindowOnSuccessCallback): void;
|
|
115
115
|
measureLayout(
|
|
116
|
-
relativeToNativeNode: number |
|
|
116
|
+
relativeToNativeNode: number | HostInstance,
|
|
117
117
|
onSuccess: MeasureLayoutOnSuccessCallback,
|
|
118
118
|
onFail?: () => void,
|
|
119
119
|
): void;
|
|
120
120
|
setNativeProps(nativeProps: {...}): void;
|
|
121
121
|
}
|
|
122
122
|
|
|
123
|
-
export type NativeMethods = $ReadOnly<{
|
|
123
|
+
export type NativeMethods = $ReadOnly<{
|
|
124
124
|
blur(): void,
|
|
125
125
|
focus(): void,
|
|
126
126
|
measure(callback: MeasureOnSuccessCallback): void,
|
|
127
127
|
measureInWindow(callback: MeasureInWindowOnSuccessCallback): void,
|
|
128
128
|
measureLayout(
|
|
129
|
-
relativeToNativeNode: number |
|
|
129
|
+
relativeToNativeNode: number | HostInstance,
|
|
130
130
|
onSuccess: MeasureLayoutOnSuccessCallback,
|
|
131
131
|
onFail?: () => void,
|
|
132
132
|
): void,
|
|
133
133
|
setNativeProps(nativeProps: {...}): void,
|
|
134
|
-
|
|
134
|
+
}>;
|
|
135
135
|
|
|
136
136
|
// This validates that INativeMethods and NativeMethods stay in sync using Flow!
|
|
137
137
|
declare const ensureNativeMethodsAreSynced: NativeMethods;
|
|
138
138
|
(ensureNativeMethodsAreSynced: INativeMethods);
|
|
139
139
|
|
|
140
|
-
export type
|
|
140
|
+
export type HostInstance = NativeMethods;
|
|
141
|
+
export type HostComponent<Config> = AbstractComponent<Config, HostInstance>;
|
|
141
142
|
|
|
142
143
|
type SecretInternalsType = {
|
|
143
144
|
computeComponentStackForErrorReporting(tag: number): string,
|
|
@@ -210,7 +211,7 @@ export type RenderRootOptions = {
|
|
|
210
211
|
export type ReactNativeType = {
|
|
211
212
|
findHostInstance_DEPRECATED<TElementType: ElementType>(
|
|
212
213
|
componentOrHandle: ?(ElementRef<TElementType> | number),
|
|
213
|
-
): ?
|
|
214
|
+
): ?HostInstance,
|
|
214
215
|
findNodeHandle<TElementType: ElementType>(
|
|
215
216
|
componentOrHandle: ?(ElementRef<TElementType> | number),
|
|
216
217
|
): ?number,
|
|
@@ -219,14 +220,11 @@ export type ReactNativeType = {
|
|
|
219
220
|
child: PublicInstance | HostComponent<mixed>,
|
|
220
221
|
): boolean,
|
|
221
222
|
dispatchCommand(
|
|
222
|
-
handle:
|
|
223
|
+
handle: HostInstance,
|
|
223
224
|
command: string,
|
|
224
225
|
args: Array<mixed>,
|
|
225
226
|
): void,
|
|
226
|
-
sendAccessibilityEvent(
|
|
227
|
-
handle: ElementRef<HostComponent<mixed>>,
|
|
228
|
-
eventType: string,
|
|
229
|
-
): void,
|
|
227
|
+
sendAccessibilityEvent(handle: HostInstance, eventType: string): void,
|
|
230
228
|
render(
|
|
231
229
|
element: MixedElement,
|
|
232
230
|
containerTag: number,
|
|
@@ -248,20 +246,17 @@ type PublicTextInstance = mixed;
|
|
|
248
246
|
export type ReactFabricType = {
|
|
249
247
|
findHostInstance_DEPRECATED<TElementType: ElementType>(
|
|
250
248
|
componentOrHandle: ?(ElementRef<TElementType> | number),
|
|
251
|
-
): ?
|
|
249
|
+
): ?HostInstance,
|
|
252
250
|
findNodeHandle<TElementType: ElementType>(
|
|
253
251
|
componentOrHandle: ?(ElementRef<TElementType> | number),
|
|
254
252
|
): ?number,
|
|
255
253
|
dispatchCommand(
|
|
256
|
-
handle:
|
|
254
|
+
handle: HostInstance,
|
|
257
255
|
command: string,
|
|
258
256
|
args: Array<mixed>,
|
|
259
257
|
): void,
|
|
260
258
|
isChildPublicInstance(parent: PublicInstance, child: PublicInstance): boolean,
|
|
261
|
-
sendAccessibilityEvent(
|
|
262
|
-
handle: ElementRef<HostComponent<mixed>>,
|
|
263
|
-
eventType: string,
|
|
264
|
-
): void,
|
|
259
|
+
sendAccessibilityEvent(handle: HostInstance, eventType: string): void,
|
|
265
260
|
render(
|
|
266
261
|
element: MixedElement,
|
|
267
262
|
containerTag: number,
|
|
@@ -55,6 +55,7 @@ export interface FlexStyle {
|
|
|
55
55
|
borderTopWidth?: number | undefined;
|
|
56
56
|
borderWidth?: number | undefined;
|
|
57
57
|
bottom?: DimensionValue | undefined;
|
|
58
|
+
boxSizing?: 'border-box' | 'content-box' | undefined;
|
|
58
59
|
display?: 'none' | 'flex' | undefined;
|
|
59
60
|
end?: DimensionValue | undefined;
|
|
60
61
|
flex?: number | undefined;
|
|
@@ -612,6 +612,19 @@ type ____LayoutStyle_Internal = $ReadOnly<{
|
|
|
612
612
|
*/
|
|
613
613
|
aspectRatio?: number | string,
|
|
614
614
|
|
|
615
|
+
/**
|
|
616
|
+
* Box sizing controls whether certain size properties apply to the node's
|
|
617
|
+
* content box or border box. The size properties in question include `width`,
|
|
618
|
+
* `height`, `minWidth`, `minHeight`, `maxWidth`, `maxHeight`, and `flexBasis`.
|
|
619
|
+
*
|
|
620
|
+
* e.g: Say a node has 10px of padding and 10px of borders on all
|
|
621
|
+
* sides and a defined `width` and `height` of 100px and 50px. Then the total
|
|
622
|
+
* size of the node (content area + padding + border) would be 100px by 50px
|
|
623
|
+
* under `boxSizing: border-box` and 120px by 70px under
|
|
624
|
+
* `boxSizing: content-box`.
|
|
625
|
+
*/
|
|
626
|
+
boxSizing?: 'border-box' | 'content-box',
|
|
627
|
+
|
|
615
628
|
/** `zIndex` controls which components display on top of others.
|
|
616
629
|
* Normally, you don't use `zIndex`. Components render according to
|
|
617
630
|
* their order in the document tree, so later components draw over
|
|
@@ -26,7 +26,7 @@ function processTransform(
|
|
|
26
26
|
): Array<Object> | Array<number> {
|
|
27
27
|
if (typeof transform === 'string') {
|
|
28
28
|
const regex = new RegExp(/(\w+)\(([^)]+)\)/g);
|
|
29
|
-
|
|
29
|
+
const transformArray: Array<Object> = [];
|
|
30
30
|
let matches;
|
|
31
31
|
|
|
32
32
|
while ((matches = regex.exec(transform))) {
|
|
@@ -50,23 +50,7 @@ function processTransform(
|
|
|
50
50
|
}
|
|
51
51
|
|
|
52
52
|
const _getKeyAndValueFromCSSTransform: (
|
|
53
|
-
key:
|
|
54
|
-
| string
|
|
55
|
-
| $TEMPORARY$string<'matrix'>
|
|
56
|
-
| $TEMPORARY$string<'perspective'>
|
|
57
|
-
| $TEMPORARY$string<'rotate'>
|
|
58
|
-
| $TEMPORARY$string<'rotateX'>
|
|
59
|
-
| $TEMPORARY$string<'rotateY'>
|
|
60
|
-
| $TEMPORARY$string<'rotateZ'>
|
|
61
|
-
| $TEMPORARY$string<'scale'>
|
|
62
|
-
| $TEMPORARY$string<'scaleX'>
|
|
63
|
-
| $TEMPORARY$string<'scaleY'>
|
|
64
|
-
| $TEMPORARY$string<'skewX'>
|
|
65
|
-
| $TEMPORARY$string<'skewY'>
|
|
66
|
-
| $TEMPORARY$string<'translate'>
|
|
67
|
-
| $TEMPORARY$string<'translate3d'>
|
|
68
|
-
| $TEMPORARY$string<'translateX'>
|
|
69
|
-
| $TEMPORARY$string<'translateY'>,
|
|
53
|
+
key: string,
|
|
70
54
|
args: string,
|
|
71
55
|
) => {key: string, value?: Array<string | number> | number | string} = (
|
|
72
56
|
key,
|
|
@@ -169,22 +153,7 @@ function _validateTransforms(transform: Array<Object>): void {
|
|
|
169
153
|
}
|
|
170
154
|
|
|
171
155
|
function _validateTransform(
|
|
172
|
-
key:
|
|
173
|
-
| string
|
|
174
|
-
| $TEMPORARY$string<'matrix'>
|
|
175
|
-
| $TEMPORARY$string<'perspective'>
|
|
176
|
-
| $TEMPORARY$string<'rotate'>
|
|
177
|
-
| $TEMPORARY$string<'rotateX'>
|
|
178
|
-
| $TEMPORARY$string<'rotateY'>
|
|
179
|
-
| $TEMPORARY$string<'rotateZ'>
|
|
180
|
-
| $TEMPORARY$string<'scale'>
|
|
181
|
-
| $TEMPORARY$string<'scaleX'>
|
|
182
|
-
| $TEMPORARY$string<'scaleY'>
|
|
183
|
-
| $TEMPORARY$string<'skewX'>
|
|
184
|
-
| $TEMPORARY$string<'skewY'>
|
|
185
|
-
| $TEMPORARY$string<'translate'>
|
|
186
|
-
| $TEMPORARY$string<'translateX'>
|
|
187
|
-
| $TEMPORARY$string<'translateY'>,
|
|
156
|
+
key: string,
|
|
188
157
|
value: any | number | string,
|
|
189
158
|
transformation: any,
|
|
190
159
|
) {
|