@office-iss/react-native-win32 0.67.0-preview.2 → 0.67.0-preview.3
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 +5 -0
- package/CHANGELOG.json +30 -0
- package/CHANGELOG.md +20 -4
- package/Libraries/Components/Pressable/Pressable.win32.js +384 -0
- package/Libraries/Components/View/View.win32.js +58 -2
- package/Libraries/Components/View/ViewPropTypes.win32.js +546 -0
- package/Libraries/Pressability/HoverState.win32.js +60 -0
- package/Libraries/Pressability/Pressability.win32.js +962 -0
- package/Libraries/Types/CoreEventTypes.win32.js +191 -0
- package/overrides.json +35 -0
- package/package.json +1 -1
|
@@ -0,0 +1,191 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Facebook, Inc. and its affiliates.
|
|
3
|
+
*
|
|
4
|
+
* This source code is licensed under the MIT license found in the
|
|
5
|
+
* LICENSE file in the root directory of this source tree.
|
|
6
|
+
*
|
|
7
|
+
* @flow strict
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import * as React from 'react';
|
|
12
|
+
import type {HostComponent} from '../Renderer/shims/ReactNativeTypes';
|
|
13
|
+
|
|
14
|
+
export type SyntheticEvent<T> = $ReadOnly<{|
|
|
15
|
+
bubbles: ?boolean,
|
|
16
|
+
cancelable: ?boolean,
|
|
17
|
+
currentTarget: number | React.ElementRef<HostComponent<mixed>>,
|
|
18
|
+
defaultPrevented: ?boolean,
|
|
19
|
+
dispatchConfig: $ReadOnly<{|
|
|
20
|
+
registrationName: string,
|
|
21
|
+
|}>,
|
|
22
|
+
eventPhase: ?number,
|
|
23
|
+
preventDefault: () => void,
|
|
24
|
+
isDefaultPrevented: () => boolean,
|
|
25
|
+
stopPropagation: () => void,
|
|
26
|
+
isPropagationStopped: () => boolean,
|
|
27
|
+
isTrusted: ?boolean,
|
|
28
|
+
nativeEvent: T,
|
|
29
|
+
persist: () => void,
|
|
30
|
+
target: ?number | React.ElementRef<HostComponent<mixed>>,
|
|
31
|
+
timeStamp: number,
|
|
32
|
+
type: ?string,
|
|
33
|
+
|}>;
|
|
34
|
+
|
|
35
|
+
export type ResponderSyntheticEvent<T> = $ReadOnly<{|
|
|
36
|
+
...SyntheticEvent<T>,
|
|
37
|
+
touchHistory: $ReadOnly<{|
|
|
38
|
+
indexOfSingleActiveTouch: number,
|
|
39
|
+
mostRecentTimeStamp: number,
|
|
40
|
+
numberActiveTouches: number,
|
|
41
|
+
touchBank: $ReadOnlyArray<
|
|
42
|
+
$ReadOnly<{|
|
|
43
|
+
touchActive: boolean,
|
|
44
|
+
startPageX: number,
|
|
45
|
+
startPageY: number,
|
|
46
|
+
startTimeStamp: number,
|
|
47
|
+
currentPageX: number,
|
|
48
|
+
currentPageY: number,
|
|
49
|
+
currentTimeStamp: number,
|
|
50
|
+
previousPageX: number,
|
|
51
|
+
previousPageY: number,
|
|
52
|
+
previousTimeStamp: number,
|
|
53
|
+
|}>,
|
|
54
|
+
>,
|
|
55
|
+
|}>,
|
|
56
|
+
|}>;
|
|
57
|
+
|
|
58
|
+
export type Layout = $ReadOnly<{|
|
|
59
|
+
x: number,
|
|
60
|
+
y: number,
|
|
61
|
+
width: number,
|
|
62
|
+
height: number,
|
|
63
|
+
|}>;
|
|
64
|
+
|
|
65
|
+
export type TextLayout = $ReadOnly<{|
|
|
66
|
+
...Layout,
|
|
67
|
+
ascender: number,
|
|
68
|
+
capHeight: number,
|
|
69
|
+
descender: number,
|
|
70
|
+
text: string,
|
|
71
|
+
xHeight: number,
|
|
72
|
+
|}>;
|
|
73
|
+
|
|
74
|
+
export type LayoutEvent = SyntheticEvent<
|
|
75
|
+
$ReadOnly<{|
|
|
76
|
+
layout: Layout,
|
|
77
|
+
|}>,
|
|
78
|
+
>;
|
|
79
|
+
|
|
80
|
+
export type TextLayoutEvent = SyntheticEvent<
|
|
81
|
+
$ReadOnly<{|
|
|
82
|
+
lines: Array<TextLayout>,
|
|
83
|
+
|}>,
|
|
84
|
+
>;
|
|
85
|
+
|
|
86
|
+
export type PressEvent = ResponderSyntheticEvent<
|
|
87
|
+
$ReadOnly<{|
|
|
88
|
+
altKey: ?boolean, // TODO(macOS)
|
|
89
|
+
button: ?number, // TODO(macOS)
|
|
90
|
+
changedTouches: $ReadOnlyArray<$PropertyType<PressEvent, 'nativeEvent'>>,
|
|
91
|
+
ctrlKey: ?boolean, // TODO(macOS)
|
|
92
|
+
force?: number,
|
|
93
|
+
identifier: number,
|
|
94
|
+
locationX: number,
|
|
95
|
+
locationY: number,
|
|
96
|
+
metaKey: ?boolean, // TODO(macOS)
|
|
97
|
+
pageX: number,
|
|
98
|
+
pageY: number,
|
|
99
|
+
shiftKey: ?boolean, // TODO(macOS)
|
|
100
|
+
target: ?number,
|
|
101
|
+
timestamp: number,
|
|
102
|
+
touches: $ReadOnlyArray<$PropertyType<PressEvent, 'nativeEvent'>>,
|
|
103
|
+
|}>,
|
|
104
|
+
>;
|
|
105
|
+
|
|
106
|
+
export type ScrollEvent = SyntheticEvent<
|
|
107
|
+
$ReadOnly<{|
|
|
108
|
+
contentInset: $ReadOnly<{|
|
|
109
|
+
bottom: number,
|
|
110
|
+
left: number,
|
|
111
|
+
right: number,
|
|
112
|
+
top: number,
|
|
113
|
+
|}>,
|
|
114
|
+
contentOffset: $ReadOnly<{|
|
|
115
|
+
y: number,
|
|
116
|
+
x: number,
|
|
117
|
+
|}>,
|
|
118
|
+
contentSize: $ReadOnly<{|
|
|
119
|
+
height: number,
|
|
120
|
+
width: number,
|
|
121
|
+
|}>,
|
|
122
|
+
layoutMeasurement: $ReadOnly<{|
|
|
123
|
+
height: number,
|
|
124
|
+
width: number,
|
|
125
|
+
|}>,
|
|
126
|
+
targetContentOffset?: $ReadOnly<{|
|
|
127
|
+
y: number,
|
|
128
|
+
x: number,
|
|
129
|
+
|}>,
|
|
130
|
+
velocity?: $ReadOnly<{|
|
|
131
|
+
y: number,
|
|
132
|
+
x: number,
|
|
133
|
+
|}>,
|
|
134
|
+
zoomScale?: number,
|
|
135
|
+
responderIgnoreScroll?: boolean,
|
|
136
|
+
key?: string, // TODO(macOS)
|
|
137
|
+
|}>,
|
|
138
|
+
>;
|
|
139
|
+
|
|
140
|
+
export type BlurEvent = SyntheticEvent<
|
|
141
|
+
$ReadOnly<{|
|
|
142
|
+
target: number,
|
|
143
|
+
|}>,
|
|
144
|
+
>;
|
|
145
|
+
|
|
146
|
+
export type FocusEvent = SyntheticEvent<
|
|
147
|
+
$ReadOnly<{|
|
|
148
|
+
target: number,
|
|
149
|
+
|}>,
|
|
150
|
+
>;
|
|
151
|
+
|
|
152
|
+
// [Windows Mouse events on Windows don't match up with the version in core
|
|
153
|
+
// introduced for react-native-web. Replace typings with our values to catch
|
|
154
|
+
// anything dependent on react-native-web specific values
|
|
155
|
+
export type MouseEvent = SyntheticEvent<
|
|
156
|
+
$ReadOnly<{|
|
|
157
|
+
target: number,
|
|
158
|
+
identifier: number,
|
|
159
|
+
pageX: number,
|
|
160
|
+
pageY: number,
|
|
161
|
+
locationX: number,
|
|
162
|
+
locationY: number,
|
|
163
|
+
timestamp: number,
|
|
164
|
+
pointerType: string,
|
|
165
|
+
force: number,
|
|
166
|
+
isLeftButton: boolean,
|
|
167
|
+
isRightButton: boolean,
|
|
168
|
+
isMiddleButton: boolean,
|
|
169
|
+
isBarrelButtonPressed: boolean,
|
|
170
|
+
isHorizontalScrollWheel: boolean,
|
|
171
|
+
isEraser: boolean,
|
|
172
|
+
shiftKey: boolean,
|
|
173
|
+
ctrlKey: boolean,
|
|
174
|
+
altKey: boolean,
|
|
175
|
+
|}>,
|
|
176
|
+
>;
|
|
177
|
+
// Windows]
|
|
178
|
+
|
|
179
|
+
// [Windows
|
|
180
|
+
export type KeyEvent = SyntheticEvent<
|
|
181
|
+
$ReadOnly<{|
|
|
182
|
+
altKey: boolean,
|
|
183
|
+
ctrlKey: boolean,
|
|
184
|
+
metaKey: boolean,
|
|
185
|
+
shiftKey: boolean,
|
|
186
|
+
key: string,
|
|
187
|
+
code: string,
|
|
188
|
+
eventPhase: number,
|
|
189
|
+
|}>,
|
|
190
|
+
>;
|
|
191
|
+
// Windows]
|
package/overrides.json
CHANGED
|
@@ -74,6 +74,13 @@
|
|
|
74
74
|
"baseHash": "0b409391c852a1001cee74a84414a13c4fe88f8b",
|
|
75
75
|
"issue": 4378
|
|
76
76
|
},
|
|
77
|
+
{
|
|
78
|
+
"type": "patch",
|
|
79
|
+
"file": "src/Libraries/Components/Pressable/Pressable.win32.js",
|
|
80
|
+
"baseFile": "Libraries/Components/Pressable/Pressable.js",
|
|
81
|
+
"baseHash": "614553aa8396b42e932f8c717ebc8b493d772d93",
|
|
82
|
+
"issue": 6240
|
|
83
|
+
},
|
|
77
84
|
{
|
|
78
85
|
"type": "copy",
|
|
79
86
|
"file": "src/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.js",
|
|
@@ -185,6 +192,13 @@
|
|
|
185
192
|
"baseFile": "Libraries/Components/View/View.js",
|
|
186
193
|
"baseHash": "689895e8755aed42e913460d1fa964907a74f06c"
|
|
187
194
|
},
|
|
195
|
+
{
|
|
196
|
+
"type": "patch",
|
|
197
|
+
"file": "src/Libraries/Components/View/ViewPropTypes.win32.js",
|
|
198
|
+
"baseFile": "Libraries/Components/View/ViewPropTypes.js",
|
|
199
|
+
"baseHash": "2b12228aa1ab0e12844996a99ff5d38fbff689a1",
|
|
200
|
+
"issue": 6240
|
|
201
|
+
},
|
|
188
202
|
{
|
|
189
203
|
"type": "platform",
|
|
190
204
|
"file": "src/Libraries/Components/View/ViewWin32.Props.ts"
|
|
@@ -364,6 +378,20 @@
|
|
|
364
378
|
"type": "platform",
|
|
365
379
|
"file": "src/Libraries/PersonaCoin/PersonaCoinTypes.ts"
|
|
366
380
|
},
|
|
381
|
+
{
|
|
382
|
+
"type": "patch",
|
|
383
|
+
"file": "src/Libraries/Pressability/HoverState.win32.js",
|
|
384
|
+
"baseFile": "Libraries/Pressability/HoverState.js",
|
|
385
|
+
"baseHash": "2807a1cddb7c5135f63e5dd4d0706ac660f25d76",
|
|
386
|
+
"issue": 6240
|
|
387
|
+
},
|
|
388
|
+
{
|
|
389
|
+
"type": "patch",
|
|
390
|
+
"file": "src/Libraries/Pressability/Pressability.win32.js",
|
|
391
|
+
"baseFile": "Libraries/Pressability/Pressability.js",
|
|
392
|
+
"baseHash": "05c53428a4b7b142fabb6833ecf54ba88c0aa05d",
|
|
393
|
+
"issue": 6240
|
|
394
|
+
},
|
|
367
395
|
{
|
|
368
396
|
"type": "platform",
|
|
369
397
|
"file": "src/Libraries/QuirkSettings/CachingNativeQuirkSettings.js"
|
|
@@ -417,6 +445,13 @@
|
|
|
417
445
|
"baseHash": "1a196691fb0e9b656c348b7d42427c1c6163c9bb",
|
|
418
446
|
"issue": 7074
|
|
419
447
|
},
|
|
448
|
+
{
|
|
449
|
+
"type": "patch",
|
|
450
|
+
"file": "src/Libraries/Types/CoreEventTypes.win32.js",
|
|
451
|
+
"baseFile": "Libraries/Types/CoreEventTypes.js",
|
|
452
|
+
"baseHash": "22c50d13820ca4db6c6cf5e6563f8437d55c24af",
|
|
453
|
+
"issue": 6240
|
|
454
|
+
},
|
|
420
455
|
{
|
|
421
456
|
"type": "copy",
|
|
422
457
|
"file": "src/Libraries/Utilities/BackHandler.win32.js",
|
package/package.json
CHANGED