@office-iss/react-native-win32 0.0.0-canary.247 → 0.0.0-canary.248
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 +3 -2
- package/CHANGELOG.json +46 -1
- package/CHANGELOG.md +21 -8
- package/Libraries/Animated/NativeAnimatedHelper.js +4 -0
- package/Libraries/Animated/NativeAnimatedHelper.win32.js +4 -0
- package/Libraries/Animated/createAnimatedComponent.js +10 -4
- package/Libraries/Animated/useAnimatedProps.js +1 -0
- package/Libraries/BatchedBridge/MessageQueue.js +1 -0
- package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +2 -0
- package/Libraries/Components/ScrollView/ScrollView.js +9 -1
- package/Libraries/Components/TextInput/TextInput.js +6 -0
- package/Libraries/Components/TextInput/TextInput.win32.js +6 -0
- package/Libraries/Components/Touchable/TouchableBounce.js +1 -0
- package/Libraries/Components/Touchable/TouchableOpacity.js +1 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +1 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +1 -0
- package/Libraries/Components/View/View.js +0 -11
- package/Libraries/Components/View/View.win32.js +0 -11
- package/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
- package/Libraries/Components/View/ViewPropTypes.js +7 -0
- package/Libraries/Components/View/ViewPropTypes.win32.js +7 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/ImageUtils.js +1 -0
- package/Libraries/Inspector/ElementBox.js +4 -0
- package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +2 -0
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +3 -0
- package/Libraries/Network/XMLHttpRequest.js +1 -0
- package/Libraries/ReactNative/AppRegistry.js +2 -4
- package/Libraries/ReactNative/ReactFabricPublicInstance/warnForStyleProps.js +1 -0
- package/Libraries/Renderer/shims/ReactFabric.js +0 -3
- package/Libraries/Renderer/shims/ReactFeatureFlags.js +0 -3
- package/Libraries/Renderer/shims/ReactNative.js +0 -3
- package/Libraries/Renderer/shims/ReactNativeTypes.js +0 -3
- package/Libraries/Renderer/shims/ReactNativeViewConfigRegistry.js +0 -3
- package/Libraries/Renderer/shims/createReactNativeComponentClass.js +0 -3
- package/Libraries/StyleSheet/StyleSheet.js +3 -10
- package/Libraries/StyleSheet/StyleSheet.win32.js +3 -10
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +18 -18
- package/Libraries/StyleSheet/StyleSheetTypes.js +13 -13
- package/Libraries/StyleSheet/flattenStyle.js +1 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +2 -1
- package/Libraries/Utilities/Dimensions.js +1 -0
- package/Libraries/Utilities/Dimensions.win32.js +1 -0
- package/Libraries/Utilities/RCTLog.js +1 -0
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +11 -6
- package/overrides.json +11 -11
- package/package.json +15 -15
- package/src/private/core/composeStyles.js +27 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +29 -14
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +7 -4
- package/src/private/webapis/dom/geometry/DOMRectReadOnly.js +24 -24
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +4 -4
- package/src/private/webapis/dom/oldstylecollections/DOMRectList.js +4 -4
- package/src/private/webapis/dom/oldstylecollections/HTMLCollection.js +4 -4
- package/src/private/webapis/dom/oldstylecollections/NodeList.js +5 -5
- package/src/private/webapis/performance/MemoryInfo.js +9 -9
- package/src/private/webapis/performance/PerformanceObserver.js +16 -16
- package/src/private/webapis/performance/ReactNativeStartupTiming.js +18 -18
- package/src-win/Libraries/Components/View/ViewPropTypes.d.ts +7 -0
|
@@ -33,10 +33,10 @@ function castToNumber(value: mixed): number {
|
|
|
33
33
|
* This is a (mostly) spec-compliant version of `DOMRectReadOnly` (https://developer.mozilla.org/en-US/docs/Web/API/DOMRectReadOnly).
|
|
34
34
|
*/
|
|
35
35
|
export default class DOMRectReadOnly {
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
36
|
+
#x: number;
|
|
37
|
+
#y: number;
|
|
38
|
+
#width: number;
|
|
39
|
+
#height: number;
|
|
40
40
|
|
|
41
41
|
constructor(x: ?number, y: ?number, width: ?number, height: ?number) {
|
|
42
42
|
this.__setInternalX(x);
|
|
@@ -49,36 +49,36 @@ export default class DOMRectReadOnly {
|
|
|
49
49
|
* The x coordinate of the `DOMRectReadOnly`'s origin.
|
|
50
50
|
*/
|
|
51
51
|
get x(): number {
|
|
52
|
-
return this
|
|
52
|
+
return this.#x;
|
|
53
53
|
}
|
|
54
54
|
|
|
55
55
|
/**
|
|
56
56
|
* The y coordinate of the `DOMRectReadOnly`'s origin.
|
|
57
57
|
*/
|
|
58
58
|
get y(): number {
|
|
59
|
-
return this
|
|
59
|
+
return this.#y;
|
|
60
60
|
}
|
|
61
61
|
|
|
62
62
|
/**
|
|
63
63
|
* The width of the `DOMRectReadOnly`.
|
|
64
64
|
*/
|
|
65
65
|
get width(): number {
|
|
66
|
-
return this
|
|
66
|
+
return this.#width;
|
|
67
67
|
}
|
|
68
68
|
|
|
69
69
|
/**
|
|
70
70
|
* The height of the `DOMRectReadOnly`.
|
|
71
71
|
*/
|
|
72
72
|
get height(): number {
|
|
73
|
-
return this
|
|
73
|
+
return this.#height;
|
|
74
74
|
}
|
|
75
75
|
|
|
76
76
|
/**
|
|
77
77
|
* Returns the top coordinate value of the `DOMRect` (has the same value as `y`, or `y + height` if `height` is negative).
|
|
78
78
|
*/
|
|
79
79
|
get top(): number {
|
|
80
|
-
const height = this
|
|
81
|
-
const y = this
|
|
80
|
+
const height = this.#height;
|
|
81
|
+
const y = this.#y;
|
|
82
82
|
|
|
83
83
|
if (height < 0) {
|
|
84
84
|
return y + height;
|
|
@@ -91,8 +91,8 @@ export default class DOMRectReadOnly {
|
|
|
91
91
|
* Returns the right coordinate value of the `DOMRect` (has the same value as ``x + width`, or `x` if `width` is negative).
|
|
92
92
|
*/
|
|
93
93
|
get right(): number {
|
|
94
|
-
const width = this
|
|
95
|
-
const x = this
|
|
94
|
+
const width = this.#width;
|
|
95
|
+
const x = this.#x;
|
|
96
96
|
|
|
97
97
|
if (width < 0) {
|
|
98
98
|
return x;
|
|
@@ -105,8 +105,8 @@ export default class DOMRectReadOnly {
|
|
|
105
105
|
* Returns the bottom coordinate value of the `DOMRect` (has the same value as `y + height`, or `y` if `height` is negative).
|
|
106
106
|
*/
|
|
107
107
|
get bottom(): number {
|
|
108
|
-
const height = this
|
|
109
|
-
const y = this
|
|
108
|
+
const height = this.#height;
|
|
109
|
+
const y = this.#y;
|
|
110
110
|
|
|
111
111
|
if (height < 0) {
|
|
112
112
|
return y;
|
|
@@ -119,8 +119,8 @@ export default class DOMRectReadOnly {
|
|
|
119
119
|
* Returns the left coordinate value of the `DOMRect` (has the same value as `x`, or `x + width` if `width` is negative).
|
|
120
120
|
*/
|
|
121
121
|
get left(): number {
|
|
122
|
-
const width = this
|
|
123
|
-
const x = this
|
|
122
|
+
const width = this.#width;
|
|
123
|
+
const x = this.#x;
|
|
124
124
|
|
|
125
125
|
if (width < 0) {
|
|
126
126
|
return x + width;
|
|
@@ -155,34 +155,34 @@ export default class DOMRectReadOnly {
|
|
|
155
155
|
}
|
|
156
156
|
|
|
157
157
|
__getInternalX(): number {
|
|
158
|
-
return this
|
|
158
|
+
return this.#x;
|
|
159
159
|
}
|
|
160
160
|
|
|
161
161
|
__getInternalY(): number {
|
|
162
|
-
return this
|
|
162
|
+
return this.#y;
|
|
163
163
|
}
|
|
164
164
|
|
|
165
165
|
__getInternalWidth(): number {
|
|
166
|
-
return this
|
|
166
|
+
return this.#width;
|
|
167
167
|
}
|
|
168
168
|
|
|
169
169
|
__getInternalHeight(): number {
|
|
170
|
-
return this
|
|
170
|
+
return this.#height;
|
|
171
171
|
}
|
|
172
172
|
|
|
173
173
|
__setInternalX(x: ?number) {
|
|
174
|
-
this
|
|
174
|
+
this.#x = castToNumber(x);
|
|
175
175
|
}
|
|
176
176
|
|
|
177
177
|
__setInternalY(y: ?number) {
|
|
178
|
-
this
|
|
178
|
+
this.#y = castToNumber(y);
|
|
179
179
|
}
|
|
180
180
|
|
|
181
181
|
__setInternalWidth(width: ?number) {
|
|
182
|
-
this
|
|
182
|
+
this.#width = castToNumber(width);
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
__setInternalHeight(height: ?number) {
|
|
186
|
-
this
|
|
186
|
+
this.#height = castToNumber(height);
|
|
187
187
|
}
|
|
188
188
|
}
|
|
@@ -44,7 +44,7 @@ export default class ReactNativeElement
|
|
|
44
44
|
__nativeTag: number;
|
|
45
45
|
__internalInstanceHandle: InternalInstanceHandle;
|
|
46
46
|
|
|
47
|
-
|
|
47
|
+
#viewConfig: ViewConfig;
|
|
48
48
|
|
|
49
49
|
constructor(
|
|
50
50
|
tag: number,
|
|
@@ -55,7 +55,7 @@ export default class ReactNativeElement
|
|
|
55
55
|
|
|
56
56
|
this.__nativeTag = tag;
|
|
57
57
|
this.__internalInstanceHandle = internalInstanceHandle;
|
|
58
|
-
this
|
|
58
|
+
this.#viewConfig = viewConfig;
|
|
59
59
|
}
|
|
60
60
|
|
|
61
61
|
get offsetHeight(): number {
|
|
@@ -172,12 +172,12 @@ export default class ReactNativeElement
|
|
|
172
172
|
|
|
173
173
|
setNativeProps(nativeProps: {...}): void {
|
|
174
174
|
if (__DEV__) {
|
|
175
|
-
warnForStyleProps(nativeProps, this.
|
|
175
|
+
warnForStyleProps(nativeProps, this.#viewConfig.validAttributes);
|
|
176
176
|
}
|
|
177
177
|
|
|
178
178
|
const updatePayload = createAttributePayload(
|
|
179
179
|
nativeProps,
|
|
180
|
-
this.
|
|
180
|
+
this.#viewConfig.validAttributes,
|
|
181
181
|
);
|
|
182
182
|
|
|
183
183
|
const node = getShadowNode(this);
|
|
@@ -20,7 +20,7 @@ import {createValueIterator} from './ArrayLikeUtils';
|
|
|
20
20
|
|
|
21
21
|
// $FlowIssue[prop-missing] Flow doesn't understand [Symbol.iterator]() {} and thinks this class doesn't implement the Iterable interface.
|
|
22
22
|
export default class DOMRectList implements Iterable<DOMRectReadOnly> {
|
|
23
|
-
|
|
23
|
+
#length: number;
|
|
24
24
|
|
|
25
25
|
/**
|
|
26
26
|
* Use `createDOMRectList` to create instances of this class.
|
|
@@ -38,15 +38,15 @@ export default class DOMRectList implements Iterable<DOMRectReadOnly> {
|
|
|
38
38
|
});
|
|
39
39
|
}
|
|
40
40
|
|
|
41
|
-
this
|
|
41
|
+
this.#length = elements.length;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
get length(): number {
|
|
45
|
-
return this
|
|
45
|
+
return this.#length;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
item(index: number): DOMRectReadOnly | null {
|
|
49
|
-
if (index < 0 || index >= this
|
|
49
|
+
if (index < 0 || index >= this.#length) {
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -19,7 +19,7 @@ import {createValueIterator} from './ArrayLikeUtils';
|
|
|
19
19
|
|
|
20
20
|
// $FlowIssue[prop-missing] Flow doesn't understand [Symbol.iterator]() {} and thinks this class doesn't implement the Iterable<T> interface.
|
|
21
21
|
export default class HTMLCollection<T> implements Iterable<T>, ArrayLike<T> {
|
|
22
|
-
|
|
22
|
+
#length: number;
|
|
23
23
|
|
|
24
24
|
/**
|
|
25
25
|
* Use `createHTMLCollection` to create instances of this class.
|
|
@@ -37,15 +37,15 @@ export default class HTMLCollection<T> implements Iterable<T>, ArrayLike<T> {
|
|
|
37
37
|
});
|
|
38
38
|
}
|
|
39
39
|
|
|
40
|
-
this
|
|
40
|
+
this.#length = elements.length;
|
|
41
41
|
}
|
|
42
42
|
|
|
43
43
|
get length(): number {
|
|
44
|
-
return this
|
|
44
|
+
return this.#length;
|
|
45
45
|
}
|
|
46
46
|
|
|
47
47
|
item(index: number): T | null {
|
|
48
|
-
if (index < 0 || index >= this
|
|
48
|
+
if (index < 0 || index >= this.#length) {
|
|
49
49
|
return null;
|
|
50
50
|
}
|
|
51
51
|
|
|
@@ -23,7 +23,7 @@ import {
|
|
|
23
23
|
|
|
24
24
|
// $FlowIssue[prop-missing] Flow doesn't understand [Symbol.iterator]() {} and thinks this class doesn't implement the Iterable<T> interface.
|
|
25
25
|
export default class NodeList<T> implements Iterable<T>, ArrayLike<T> {
|
|
26
|
-
|
|
26
|
+
#length: number;
|
|
27
27
|
|
|
28
28
|
/**
|
|
29
29
|
* Use `createNodeList` to create instances of this class.
|
|
@@ -38,15 +38,15 @@ export default class NodeList<T> implements Iterable<T>, ArrayLike<T> {
|
|
|
38
38
|
writable: false,
|
|
39
39
|
});
|
|
40
40
|
}
|
|
41
|
-
this
|
|
41
|
+
this.#length = elements.length;
|
|
42
42
|
}
|
|
43
43
|
|
|
44
44
|
get length(): number {
|
|
45
|
-
return this
|
|
45
|
+
return this.#length;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
item(index: number): T | null {
|
|
49
|
-
if (index < 0 || index >= this
|
|
49
|
+
if (index < 0 || index >= this.#length) {
|
|
50
50
|
return null;
|
|
51
51
|
}
|
|
52
52
|
|
|
@@ -70,7 +70,7 @@ export default class NodeList<T> implements Iterable<T>, ArrayLike<T> {
|
|
|
70
70
|
// eslint-disable-next-line consistent-this
|
|
71
71
|
const arrayLike: ArrayLike<T> = this;
|
|
72
72
|
|
|
73
|
-
for (let index = 0; index < this
|
|
73
|
+
for (let index = 0; index < this.#length; index++) {
|
|
74
74
|
if (thisArg == null) {
|
|
75
75
|
callbackFn(arrayLike[index], index, this);
|
|
76
76
|
} else {
|
|
@@ -19,15 +19,15 @@ type MemoryInfoLike = {
|
|
|
19
19
|
|
|
20
20
|
// Read-only object with JS memory information. This is returned by the performance.memory API.
|
|
21
21
|
export default class MemoryInfo {
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
22
|
+
#jsHeapSizeLimit: ?number;
|
|
23
|
+
#totalJSHeapSize: ?number;
|
|
24
|
+
#usedJSHeapSize: ?number;
|
|
25
25
|
|
|
26
26
|
constructor(memoryInfo: ?MemoryInfoLike) {
|
|
27
27
|
if (memoryInfo != null) {
|
|
28
|
-
this
|
|
29
|
-
this
|
|
30
|
-
this
|
|
28
|
+
this.#jsHeapSizeLimit = memoryInfo.jsHeapSizeLimit;
|
|
29
|
+
this.#totalJSHeapSize = memoryInfo.totalJSHeapSize;
|
|
30
|
+
this.#usedJSHeapSize = memoryInfo.usedJSHeapSize;
|
|
31
31
|
}
|
|
32
32
|
}
|
|
33
33
|
|
|
@@ -35,20 +35,20 @@ export default class MemoryInfo {
|
|
|
35
35
|
* The maximum size of the heap, in bytes, that is available to the context
|
|
36
36
|
*/
|
|
37
37
|
get jsHeapSizeLimit(): ?number {
|
|
38
|
-
return this
|
|
38
|
+
return this.#jsHeapSizeLimit;
|
|
39
39
|
}
|
|
40
40
|
|
|
41
41
|
/**
|
|
42
42
|
* The total allocated heap size, in bytes
|
|
43
43
|
*/
|
|
44
44
|
get totalJSHeapSize(): ?number {
|
|
45
|
-
return this
|
|
45
|
+
return this.#totalJSHeapSize;
|
|
46
46
|
}
|
|
47
47
|
|
|
48
48
|
/**
|
|
49
49
|
* The currently active segment of JS heap, in bytes.
|
|
50
50
|
*/
|
|
51
51
|
get usedJSHeapSize(): ?number {
|
|
52
|
-
return this
|
|
52
|
+
return this.#usedJSHeapSize;
|
|
53
53
|
}
|
|
54
54
|
}
|
|
@@ -25,18 +25,18 @@ export type PerformanceEntryList = $ReadOnlyArray<PerformanceEntry>;
|
|
|
25
25
|
export {PerformanceEntry} from './PerformanceEntry';
|
|
26
26
|
|
|
27
27
|
export class PerformanceObserverEntryList {
|
|
28
|
-
|
|
28
|
+
#entries: PerformanceEntryList;
|
|
29
29
|
|
|
30
30
|
constructor(entries: PerformanceEntryList) {
|
|
31
|
-
this
|
|
31
|
+
this.#entries = entries;
|
|
32
32
|
}
|
|
33
33
|
|
|
34
34
|
getEntries(): PerformanceEntryList {
|
|
35
|
-
return this
|
|
35
|
+
return this.#entries;
|
|
36
36
|
}
|
|
37
37
|
|
|
38
38
|
getEntriesByType(type: PerformanceEntryType): PerformanceEntryList {
|
|
39
|
-
return this.
|
|
39
|
+
return this.#entries.filter(entry => entry.entryType === type);
|
|
40
40
|
}
|
|
41
41
|
|
|
42
42
|
getEntriesByName(
|
|
@@ -44,9 +44,9 @@ export class PerformanceObserverEntryList {
|
|
|
44
44
|
type?: PerformanceEntryType,
|
|
45
45
|
): PerformanceEntryList {
|
|
46
46
|
if (type === undefined) {
|
|
47
|
-
return this.
|
|
47
|
+
return this.#entries.filter(entry => entry.name === name);
|
|
48
48
|
} else {
|
|
49
|
-
return this.
|
|
49
|
+
return this.#entries.filter(
|
|
50
50
|
entry => entry.name === name && entry.entryType === type,
|
|
51
51
|
);
|
|
52
52
|
}
|
|
@@ -175,11 +175,11 @@ function getSupportedPerformanceEntryTypes(): $ReadOnlyArray<PerformanceEntryTyp
|
|
|
175
175
|
* observer.observe({ type: "event" });
|
|
176
176
|
*/
|
|
177
177
|
export default class PerformanceObserver {
|
|
178
|
-
|
|
179
|
-
|
|
178
|
+
#callback: PerformanceObserverCallback;
|
|
179
|
+
#type: 'single' | 'multiple' | void;
|
|
180
180
|
|
|
181
181
|
constructor(callback: PerformanceObserverCallback) {
|
|
182
|
-
this
|
|
182
|
+
this.#callback = callback;
|
|
183
183
|
}
|
|
184
184
|
|
|
185
185
|
observe(options: PerformanceObserverInit): void {
|
|
@@ -188,17 +188,17 @@ export default class PerformanceObserver {
|
|
|
188
188
|
return;
|
|
189
189
|
}
|
|
190
190
|
|
|
191
|
-
this
|
|
191
|
+
this.#validateObserveOptions(options);
|
|
192
192
|
|
|
193
193
|
let requestedEntryTypes;
|
|
194
194
|
|
|
195
195
|
if (options.entryTypes) {
|
|
196
|
-
this
|
|
196
|
+
this.#type = 'multiple';
|
|
197
197
|
requestedEntryTypes = new Map(
|
|
198
198
|
options.entryTypes.map(t => [t, undefined]),
|
|
199
199
|
);
|
|
200
200
|
} else {
|
|
201
|
-
this
|
|
201
|
+
this.#type = 'single';
|
|
202
202
|
requestedEntryTypes = new Map([
|
|
203
203
|
[options.type, options.durationThreshold],
|
|
204
204
|
]);
|
|
@@ -217,7 +217,7 @@ export default class PerformanceObserver {
|
|
|
217
217
|
}
|
|
218
218
|
|
|
219
219
|
registeredObservers.set(this, {
|
|
220
|
-
callback: this
|
|
220
|
+
callback: this.#callback,
|
|
221
221
|
entryTypes: nextEntryTypes,
|
|
222
222
|
});
|
|
223
223
|
|
|
@@ -284,7 +284,7 @@ export default class PerformanceObserver {
|
|
|
284
284
|
applyDurationThresholds();
|
|
285
285
|
}
|
|
286
286
|
|
|
287
|
-
|
|
287
|
+
#validateObserveOptions(options: PerformanceObserverInit): void {
|
|
288
288
|
const {type, entryTypes, durationThreshold} = options;
|
|
289
289
|
|
|
290
290
|
if (!type && !entryTypes) {
|
|
@@ -299,13 +299,13 @@ export default class PerformanceObserver {
|
|
|
299
299
|
);
|
|
300
300
|
}
|
|
301
301
|
|
|
302
|
-
if (this
|
|
302
|
+
if (this.#type === 'multiple' && type) {
|
|
303
303
|
throw new Error(
|
|
304
304
|
"Failed to execute 'observe' on 'PerformanceObserver': This observer has performed observe({entryTypes:...}, therefore it cannot perform observe({type:...})",
|
|
305
305
|
);
|
|
306
306
|
}
|
|
307
307
|
|
|
308
|
-
if (this
|
|
308
|
+
if (this.#type === 'single' && entryTypes) {
|
|
309
309
|
throw new Error(
|
|
310
310
|
"Failed to execute 'observe' on 'PerformanceObserver': This PerformanceObserver has performed observe({type:...}, therefore it cannot perform observe({entryTypes:...})",
|
|
311
311
|
);
|
|
@@ -27,22 +27,22 @@ export default class ReactNativeStartupTiming {
|
|
|
27
27
|
// We do NOT match web spect here for two reasons:
|
|
28
28
|
// 1. The `ReactNativeStartupTiming` is non-standard API
|
|
29
29
|
// 2. The timing information is relative to the time origin, which means `0` has valid meaning
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
30
|
+
#startTime: ?number;
|
|
31
|
+
#endTime: ?number;
|
|
32
|
+
#initializeRuntimeStart: ?number;
|
|
33
|
+
#initializeRuntimeEnd: ?number;
|
|
34
|
+
#executeJavaScriptBundleEntryPointStart: ?number;
|
|
35
|
+
#executeJavaScriptBundleEntryPointEnd: ?number;
|
|
36
36
|
|
|
37
37
|
constructor(startUpTiming: ?ReactNativeStartupTimingLike) {
|
|
38
38
|
if (startUpTiming != null) {
|
|
39
|
-
this
|
|
40
|
-
this
|
|
41
|
-
this
|
|
42
|
-
this
|
|
43
|
-
this
|
|
39
|
+
this.#startTime = startUpTiming.startTime;
|
|
40
|
+
this.#endTime = startUpTiming.endTime;
|
|
41
|
+
this.#initializeRuntimeStart = startUpTiming.initializeRuntimeStart;
|
|
42
|
+
this.#initializeRuntimeEnd = startUpTiming.initializeRuntimeEnd;
|
|
43
|
+
this.#executeJavaScriptBundleEntryPointStart =
|
|
44
44
|
startUpTiming.executeJavaScriptBundleEntryPointStart;
|
|
45
|
-
this
|
|
45
|
+
this.#executeJavaScriptBundleEntryPointEnd =
|
|
46
46
|
startUpTiming.executeJavaScriptBundleEntryPointEnd;
|
|
47
47
|
}
|
|
48
48
|
}
|
|
@@ -51,41 +51,41 @@ export default class ReactNativeStartupTiming {
|
|
|
51
51
|
* Start time of the RN app startup process. This is provided by the platform by implementing the `ReactMarker.setAppStartTime` API in the native platform code.
|
|
52
52
|
*/
|
|
53
53
|
get startTime(): ?number {
|
|
54
|
-
return this
|
|
54
|
+
return this.#startTime;
|
|
55
55
|
}
|
|
56
56
|
|
|
57
57
|
/**
|
|
58
58
|
* End time of the RN app startup process. This is equal to `executeJavaScriptBundleEntryPointEnd`.
|
|
59
59
|
*/
|
|
60
60
|
get endTime(): ?number {
|
|
61
|
-
return this
|
|
61
|
+
return this.#endTime;
|
|
62
62
|
}
|
|
63
63
|
|
|
64
64
|
/**
|
|
65
65
|
* Start time when RN runtime get initialized. This is when RN infra first kicks in app startup process.
|
|
66
66
|
*/
|
|
67
67
|
get initializeRuntimeStart(): ?number {
|
|
68
|
-
return this
|
|
68
|
+
return this.#initializeRuntimeStart;
|
|
69
69
|
}
|
|
70
70
|
|
|
71
71
|
/**
|
|
72
72
|
* End time when RN runtime get initialized. This is the last marker before ends of the app startup process.
|
|
73
73
|
*/
|
|
74
74
|
get initializeRuntimeEnd(): ?number {
|
|
75
|
-
return this
|
|
75
|
+
return this.#initializeRuntimeEnd;
|
|
76
76
|
}
|
|
77
77
|
|
|
78
78
|
/**
|
|
79
79
|
* Start time of JS bundle being executed. This indicates the RN JS bundle is loaded and start to be evaluated.
|
|
80
80
|
*/
|
|
81
81
|
get executeJavaScriptBundleEntryPointStart(): ?number {
|
|
82
|
-
return this
|
|
82
|
+
return this.#executeJavaScriptBundleEntryPointStart;
|
|
83
83
|
}
|
|
84
84
|
|
|
85
85
|
/**
|
|
86
86
|
* End time of JS bundle being executed. This indicates all the synchronous entry point jobs are finished.
|
|
87
87
|
*/
|
|
88
88
|
get executeJavaScriptBundleEntryPointEnd(): ?number {
|
|
89
|
-
return this
|
|
89
|
+
return this.#executeJavaScriptBundleEntryPointEnd;
|
|
90
90
|
}
|
|
91
91
|
}
|
|
@@ -88,6 +88,13 @@ export interface ViewPropsAndroid {
|
|
|
88
88
|
*/
|
|
89
89
|
collapsable?: boolean | undefined;
|
|
90
90
|
|
|
91
|
+
/**
|
|
92
|
+
* Setting to false prevents direct children of the view from being removed
|
|
93
|
+
* from the native view hierarchy, similar to the effect of setting
|
|
94
|
+
* `collapsable={false}` on each child.
|
|
95
|
+
*/
|
|
96
|
+
collapsableChildren?: boolean | undefined;
|
|
97
|
+
|
|
91
98
|
/**
|
|
92
99
|
* Whether this view should render itself (and all of its children) into a single hardware texture on the GPU.
|
|
93
100
|
*
|