@office-iss/react-native-win32 0.0.0-canary.280 → 0.0.0-canary.282
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 +24 -8
- package/Libraries/Animated/nodes/AnimatedAddition.js +1 -0
- package/Libraries/Animated/nodes/AnimatedDiffClamp.js +1 -0
- package/Libraries/Animated/nodes/AnimatedDivision.js +1 -0
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +1 -0
- package/Libraries/Animated/nodes/AnimatedModulo.js +1 -0
- package/Libraries/Animated/nodes/AnimatedMultiplication.js +1 -0
- package/Libraries/Animated/nodes/AnimatedNode.js +0 -46
- package/Libraries/Animated/nodes/AnimatedObject.js +1 -0
- package/Libraries/Animated/nodes/AnimatedProps.js +1 -0
- package/Libraries/Animated/nodes/AnimatedStyle.js +1 -0
- package/Libraries/Animated/nodes/AnimatedSubtraction.js +1 -0
- package/Libraries/Animated/nodes/AnimatedTracking.js +1 -0
- package/Libraries/Animated/nodes/AnimatedTransform.js +1 -0
- package/Libraries/Animated/nodes/AnimatedValue.js +45 -3
- package/Libraries/Animated/useAnimatedProps.js +0 -43
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +4 -1
- package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +5 -0
- package/Libraries/Components/TextInput/TextInput.flow.js +6 -0
- package/Libraries/Components/TextInput/TextInput.js +6 -0
- package/Libraries/Components/TextInput/TextInput.win32.js +6 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Image/AssetSourceResolver.js +11 -0
- package/Libraries/Inspector/BorderBox.js +26 -14
- package/Libraries/Inspector/BoxInspector.js +60 -42
- package/Libraries/Inspector/ElementBox.js +55 -48
- package/Libraries/Inspector/StyleInspector.js +36 -30
- package/Libraries/ReactNative/UIManagerProperties.js +3 -1
- package/overrides.json +6 -6
- package/package.json +11 -11
- package/src/private/featureflags/ReactNativeFeatureFlags.js +1 -16
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +1 -4
- package/src/private/renderer/errorhandling/ErrorHandlers.js +12 -55
- package/src/private/specs/modules/NativeCPUTime.js +24 -0
- package/src/private/specs/modules/NativeFantom.js +37 -0
- package/src/private/utilities/ensureInstance.js +21 -0
- package/src/private/webapis/dom/nodes/ReactNativeElement.js +1 -0
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +14 -8
|
@@ -10,11 +10,15 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
+
import type {TextStyleProp, ViewStyleProp} from '../StyleSheet/StyleSheet';
|
|
14
|
+
import type {InspectedElementFrame} from './Inspector';
|
|
15
|
+
|
|
16
|
+
import React from 'react';
|
|
17
|
+
|
|
13
18
|
const View = require('../Components/View/View');
|
|
14
19
|
const StyleSheet = require('../StyleSheet/StyleSheet');
|
|
15
20
|
const Text = require('../Text/Text');
|
|
16
21
|
const resolveBoxStyle = require('./resolveBoxStyle');
|
|
17
|
-
const React = require('react');
|
|
18
22
|
|
|
19
23
|
const blank = {
|
|
20
24
|
top: 0,
|
|
@@ -23,51 +27,65 @@ const blank = {
|
|
|
23
27
|
bottom: 0,
|
|
24
28
|
};
|
|
25
29
|
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
<BoxContainer title="padding" box={padding}>
|
|
35
|
-
<View>
|
|
36
|
-
<Text style={styles.innerText}>
|
|
37
|
-
({(frame.left || 0).toFixed(1)}, {(frame.top || 0).toFixed(1)})
|
|
38
|
-
</Text>
|
|
39
|
-
<Text style={styles.innerText}>
|
|
40
|
-
{(frame.width || 0).toFixed(1)} ×{' '}
|
|
41
|
-
{(frame.height || 0).toFixed(1)}
|
|
42
|
-
</Text>
|
|
43
|
-
</View>
|
|
44
|
-
</BoxContainer>
|
|
45
|
-
</BoxContainer>
|
|
46
|
-
);
|
|
47
|
-
}
|
|
48
|
-
}
|
|
30
|
+
type BoxInspectorProps = $ReadOnly<{
|
|
31
|
+
style: ViewStyleProp,
|
|
32
|
+
frame: ?InspectedElementFrame,
|
|
33
|
+
}>;
|
|
34
|
+
|
|
35
|
+
function BoxInspector({style, frame}: BoxInspectorProps): React.Node {
|
|
36
|
+
const margin = (style && resolveBoxStyle('margin', style)) || blank;
|
|
37
|
+
const padding = (style && resolveBoxStyle('padding', style)) || blank;
|
|
49
38
|
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
<Text style={
|
|
58
|
-
{
|
|
39
|
+
return (
|
|
40
|
+
<BoxContainer title="margin" titleStyle={styles.marginLabel} box={margin}>
|
|
41
|
+
<BoxContainer title="padding" box={padding}>
|
|
42
|
+
<View>
|
|
43
|
+
<Text style={styles.innerText}>
|
|
44
|
+
({(frame?.left || 0).toFixed(1)}, {(frame?.top || 0).toFixed(1)})
|
|
45
|
+
</Text>
|
|
46
|
+
<Text style={styles.innerText}>
|
|
47
|
+
{(frame?.width || 0).toFixed(1)} ×{' '}
|
|
48
|
+
{(frame?.height || 0).toFixed(1)}
|
|
59
49
|
</Text>
|
|
60
|
-
<Text style={styles.boxText}>{box.top}</Text>
|
|
61
|
-
</View>
|
|
62
|
-
<View style={styles.row}>
|
|
63
|
-
<Text style={styles.boxText}>{box.left}</Text>
|
|
64
|
-
{this.props.children}
|
|
65
|
-
<Text style={styles.boxText}>{box.right}</Text>
|
|
66
50
|
</View>
|
|
67
|
-
|
|
51
|
+
</BoxContainer>
|
|
52
|
+
</BoxContainer>
|
|
53
|
+
);
|
|
54
|
+
}
|
|
55
|
+
|
|
56
|
+
type BoxContainerProps = $ReadOnly<{
|
|
57
|
+
title: string,
|
|
58
|
+
titleStyle?: TextStyleProp,
|
|
59
|
+
box: $ReadOnly<{
|
|
60
|
+
top: number,
|
|
61
|
+
left: number,
|
|
62
|
+
right: number,
|
|
63
|
+
bottom: number,
|
|
64
|
+
}>,
|
|
65
|
+
children: React.Node,
|
|
66
|
+
}>;
|
|
67
|
+
|
|
68
|
+
function BoxContainer({
|
|
69
|
+
title,
|
|
70
|
+
titleStyle,
|
|
71
|
+
box,
|
|
72
|
+
children,
|
|
73
|
+
}: BoxContainerProps): React.Node {
|
|
74
|
+
return (
|
|
75
|
+
<View style={styles.box}>
|
|
76
|
+
<View style={styles.row}>
|
|
77
|
+
{}
|
|
78
|
+
<Text style={[titleStyle, styles.label]}>{title}</Text>
|
|
79
|
+
<Text style={styles.boxText}>{box.top}</Text>
|
|
80
|
+
</View>
|
|
81
|
+
<View style={styles.row}>
|
|
82
|
+
<Text style={styles.boxText}>{box.left}</Text>
|
|
83
|
+
{children}
|
|
84
|
+
<Text style={styles.boxText}>{box.right}</Text>
|
|
68
85
|
</View>
|
|
69
|
-
|
|
70
|
-
|
|
86
|
+
<Text style={styles.boxText}>{box.bottom}</Text>
|
|
87
|
+
</View>
|
|
88
|
+
);
|
|
71
89
|
}
|
|
72
90
|
|
|
73
91
|
const styles = StyleSheet.create({
|
|
@@ -10,65 +10,72 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
+
import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
|
|
14
|
+
import type {InspectedElementFrame} from './Inspector';
|
|
15
|
+
|
|
16
|
+
import React from 'react';
|
|
17
|
+
|
|
13
18
|
const View = require('../Components/View/View');
|
|
14
19
|
const flattenStyle = require('../StyleSheet/flattenStyle');
|
|
15
20
|
const StyleSheet = require('../StyleSheet/StyleSheet');
|
|
16
21
|
const Dimensions = require('../Utilities/Dimensions').default;
|
|
17
22
|
const BorderBox = require('./BorderBox');
|
|
18
23
|
const resolveBoxStyle = require('./resolveBoxStyle');
|
|
19
|
-
const React = require('react');
|
|
20
|
-
|
|
21
|
-
class ElementBox extends React.Component<$FlowFixMeProps> {
|
|
22
|
-
render(): React.Node {
|
|
23
|
-
const style = flattenStyle(this.props.style) || {};
|
|
24
|
-
let margin: ?$ReadOnly<Style> = resolveBoxStyle('margin', style);
|
|
25
|
-
let padding: ?$ReadOnly<Style> = resolveBoxStyle('padding', style);
|
|
26
|
-
|
|
27
|
-
const frameStyle = {...this.props.frame};
|
|
28
|
-
const contentStyle: {width: number, height: number} = {
|
|
29
|
-
width: this.props.frame.width,
|
|
30
|
-
height: this.props.frame.height,
|
|
31
|
-
};
|
|
32
|
-
|
|
33
|
-
if (margin != null) {
|
|
34
|
-
margin = resolveRelativeSizes(margin);
|
|
35
|
-
|
|
36
|
-
frameStyle.top -= margin.top;
|
|
37
|
-
frameStyle.left -= margin.left;
|
|
38
|
-
frameStyle.height += margin.top + margin.bottom;
|
|
39
|
-
frameStyle.width += margin.left + margin.right;
|
|
40
|
-
|
|
41
|
-
if (margin.top < 0) {
|
|
42
|
-
contentStyle.height += margin.top;
|
|
43
|
-
}
|
|
44
|
-
if (margin.bottom < 0) {
|
|
45
|
-
contentStyle.height += margin.bottom;
|
|
46
|
-
}
|
|
47
|
-
if (margin.left < 0) {
|
|
48
|
-
contentStyle.width += margin.left;
|
|
49
|
-
}
|
|
50
|
-
if (margin.right < 0) {
|
|
51
|
-
contentStyle.width += margin.right;
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
24
|
|
|
55
|
-
|
|
56
|
-
|
|
25
|
+
type Props = $ReadOnly<{
|
|
26
|
+
frame: InspectedElementFrame,
|
|
27
|
+
style?: ?ViewStyleProp,
|
|
28
|
+
}>;
|
|
29
|
+
|
|
30
|
+
function ElementBox({frame, style}: Props): React.Node {
|
|
31
|
+
const flattenedStyle = flattenStyle(style) || {};
|
|
32
|
+
let margin: ?$ReadOnly<Style> = resolveBoxStyle('margin', flattenedStyle);
|
|
33
|
+
let padding: ?$ReadOnly<Style> = resolveBoxStyle('padding', flattenedStyle);
|
|
57
34
|
|
|
58
|
-
|
|
59
|
-
|
|
35
|
+
const frameStyle = {...frame};
|
|
36
|
+
const contentStyle: {width: number, height: number} = {
|
|
37
|
+
width: frame.width,
|
|
38
|
+
height: frame.height,
|
|
39
|
+
};
|
|
40
|
+
|
|
41
|
+
if (margin != null) {
|
|
42
|
+
margin = resolveRelativeSizes(margin);
|
|
43
|
+
|
|
44
|
+
frameStyle.top -= margin.top;
|
|
45
|
+
frameStyle.left -= margin.left;
|
|
46
|
+
frameStyle.height += margin.top + margin.bottom;
|
|
47
|
+
frameStyle.width += margin.left + margin.right;
|
|
48
|
+
|
|
49
|
+
if (margin.top < 0) {
|
|
50
|
+
contentStyle.height += margin.top;
|
|
51
|
+
}
|
|
52
|
+
if (margin.bottom < 0) {
|
|
53
|
+
contentStyle.height += margin.bottom;
|
|
60
54
|
}
|
|
55
|
+
if (margin.left < 0) {
|
|
56
|
+
contentStyle.width += margin.left;
|
|
57
|
+
}
|
|
58
|
+
if (margin.right < 0) {
|
|
59
|
+
contentStyle.width += margin.right;
|
|
60
|
+
}
|
|
61
|
+
}
|
|
61
62
|
|
|
62
|
-
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
</BorderBox>
|
|
68
|
-
</BorderBox>
|
|
69
|
-
</View>
|
|
70
|
-
);
|
|
63
|
+
if (padding != null) {
|
|
64
|
+
padding = resolveRelativeSizes(padding);
|
|
65
|
+
|
|
66
|
+
contentStyle.width -= padding.left + padding.right;
|
|
67
|
+
contentStyle.height -= padding.top + padding.bottom;
|
|
71
68
|
}
|
|
69
|
+
|
|
70
|
+
return (
|
|
71
|
+
<View style={[styles.frame, frameStyle]} pointerEvents="none">
|
|
72
|
+
<BorderBox box={margin} style={styles.margin}>
|
|
73
|
+
<BorderBox box={padding} style={styles.padding}>
|
|
74
|
+
<View style={[styles.content, contentStyle]} />
|
|
75
|
+
</BorderBox>
|
|
76
|
+
</BorderBox>
|
|
77
|
+
</View>
|
|
78
|
+
);
|
|
72
79
|
}
|
|
73
80
|
|
|
74
81
|
const styles = StyleSheet.create({
|
|
@@ -10,42 +10,48 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
+
import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
|
|
14
|
+
import type {____FlattenStyleProp_Internal} from '../StyleSheet/StyleSheetTypes';
|
|
15
|
+
|
|
16
|
+
import React from 'react';
|
|
17
|
+
|
|
13
18
|
const View = require('../Components/View/View');
|
|
14
19
|
const StyleSheet = require('../StyleSheet/StyleSheet');
|
|
15
20
|
const Text = require('../Text/Text');
|
|
16
|
-
const React = require('react');
|
|
17
21
|
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
return <Text style={styles.noStyle}>No style</Text>;
|
|
22
|
-
}
|
|
23
|
-
const names = Object.keys(this.props.style);
|
|
24
|
-
return (
|
|
25
|
-
<View style={styles.container}>
|
|
26
|
-
<View>
|
|
27
|
-
{names.map(name => (
|
|
28
|
-
<Text key={name} style={styles.attr}>
|
|
29
|
-
{name}:
|
|
30
|
-
</Text>
|
|
31
|
-
))}
|
|
32
|
-
</View>
|
|
22
|
+
type Props = $ReadOnly<{
|
|
23
|
+
style?: ?____FlattenStyleProp_Internal<ViewStyleProp>,
|
|
24
|
+
}>;
|
|
33
25
|
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
return (
|
|
38
|
-
<Text key={name} style={styles.value}>
|
|
39
|
-
{typeof value !== 'string' && typeof value !== 'number'
|
|
40
|
-
? JSON.stringify(value)
|
|
41
|
-
: value}
|
|
42
|
-
</Text>
|
|
43
|
-
);
|
|
44
|
-
})}
|
|
45
|
-
</View>
|
|
46
|
-
</View>
|
|
47
|
-
);
|
|
26
|
+
function StyleInspector({style}: Props): React.Node {
|
|
27
|
+
if (!style) {
|
|
28
|
+
return <Text style={styles.noStyle}>No style</Text>;
|
|
48
29
|
}
|
|
30
|
+
const names = Object.keys(style);
|
|
31
|
+
return (
|
|
32
|
+
<View style={styles.container}>
|
|
33
|
+
<View>
|
|
34
|
+
{names.map(name => (
|
|
35
|
+
<Text key={name} style={styles.attr}>
|
|
36
|
+
{name}:
|
|
37
|
+
</Text>
|
|
38
|
+
))}
|
|
39
|
+
</View>
|
|
40
|
+
|
|
41
|
+
<View>
|
|
42
|
+
{names.map(name => {
|
|
43
|
+
const value = style?.[name];
|
|
44
|
+
return (
|
|
45
|
+
<Text key={name} style={styles.value}>
|
|
46
|
+
{typeof value !== 'string' && typeof value !== 'number'
|
|
47
|
+
? JSON.stringify(value)
|
|
48
|
+
: value}
|
|
49
|
+
</Text>
|
|
50
|
+
);
|
|
51
|
+
})}
|
|
52
|
+
</View>
|
|
53
|
+
</View>
|
|
54
|
+
);
|
|
49
55
|
}
|
|
50
56
|
|
|
51
57
|
const styles = StyleSheet.create({
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
* accessed. Once UIManager property accesses for view managers has been fully
|
|
27
27
|
* deprecated, this file will also be removed.
|
|
28
28
|
*/
|
|
29
|
-
|
|
29
|
+
const UIManagerProperties: $ReadOnlyArray<string> = [
|
|
30
30
|
'clearJSResponder',
|
|
31
31
|
'configureNextLayoutAnimation',
|
|
32
32
|
'createView',
|
|
@@ -59,3 +59,5 @@ module.exports = [
|
|
|
59
59
|
'genericDirectEventTypes',
|
|
60
60
|
'lazilyLoadView',
|
|
61
61
|
];
|
|
62
|
+
|
|
63
|
+
module.exports = UIManagerProperties;
|
package/overrides.json
CHANGED
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
"**/__snapshots__/**",
|
|
8
8
|
"src-win/rntypes/**"
|
|
9
9
|
],
|
|
10
|
-
"baseVersion": "0.78.0-nightly-
|
|
10
|
+
"baseVersion": "0.78.0-nightly-20250113-d4407d6f7",
|
|
11
11
|
"overrides": [
|
|
12
12
|
{
|
|
13
13
|
"type": "derived",
|
|
14
14
|
"file": ".flowconfig",
|
|
15
15
|
"baseFile": ".flowconfig",
|
|
16
|
-
"baseHash": "
|
|
16
|
+
"baseHash": "efd6eb0780d7f3b6717feac846e0e7fe8dae1ee9"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"type": "derived",
|
|
@@ -71,11 +71,11 @@
|
|
|
71
71
|
"file": "src-win/Libraries/Components/Button/ButtonWin32.tsx"
|
|
72
72
|
},
|
|
73
73
|
{
|
|
74
|
-
"type": "
|
|
74
|
+
"type": "patch",
|
|
75
75
|
"file": "src-win/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js",
|
|
76
76
|
"baseFile": "packages/react-native/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js",
|
|
77
|
-
"baseHash": "
|
|
78
|
-
"issue":
|
|
77
|
+
"baseHash": "7664e2616540fd4ecc398009216314675f6e3f86",
|
|
78
|
+
"issue": 14290
|
|
79
79
|
},
|
|
80
80
|
{
|
|
81
81
|
"type": "platform",
|
|
@@ -109,7 +109,7 @@
|
|
|
109
109
|
"type": "derived",
|
|
110
110
|
"file": "src-win/Libraries/Components/TextInput/TextInput.win32.js",
|
|
111
111
|
"baseFile": "packages/react-native/Libraries/Components/TextInput/TextInput.js",
|
|
112
|
-
"baseHash": "
|
|
112
|
+
"baseHash": "437a56337e8b6fabd440538af48167c2bbc59704"
|
|
113
113
|
},
|
|
114
114
|
{
|
|
115
115
|
"type": "patch",
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@office-iss/react-native-win32",
|
|
3
|
-
"version": "0.0.0-canary.
|
|
3
|
+
"version": "0.0.0-canary.282",
|
|
4
4
|
"description": "Implementation of react native on top of Office's Win32 platform.",
|
|
5
5
|
"repository": {
|
|
6
6
|
"type": "git",
|
|
@@ -30,13 +30,13 @@
|
|
|
30
30
|
"@react-native-community/cli-platform-android": "15.0.0-alpha.2",
|
|
31
31
|
"@react-native-community/cli-platform-ios": "15.0.0-alpha.2",
|
|
32
32
|
"@react-native/assets": "1.0.0",
|
|
33
|
-
"@react-native/assets-registry": "0.78.0-nightly-
|
|
34
|
-
"@react-native/codegen": "0.78.0-nightly-
|
|
35
|
-
"@react-native/community-cli-plugin": "0.78.0-nightly-
|
|
36
|
-
"@react-native/gradle-plugin": "0.78.0-nightly-
|
|
37
|
-
"@react-native/js-polyfills": "0.78.0-nightly-
|
|
38
|
-
"@react-native/normalize-colors": "0.78.0-nightly-
|
|
39
|
-
"@react-native/virtualized-lists": "0.78.0-nightly-
|
|
33
|
+
"@react-native/assets-registry": "0.78.0-nightly-20250113-d4407d6f7",
|
|
34
|
+
"@react-native/codegen": "0.78.0-nightly-20250113-d4407d6f7",
|
|
35
|
+
"@react-native/community-cli-plugin": "0.78.0-nightly-20250113-d4407d6f7",
|
|
36
|
+
"@react-native/gradle-plugin": "0.78.0-nightly-20250113-d4407d6f7",
|
|
37
|
+
"@react-native/js-polyfills": "0.78.0-nightly-20250113-d4407d6f7",
|
|
38
|
+
"@react-native/normalize-colors": "0.78.0-nightly-20250113-d4407d6f7",
|
|
39
|
+
"@react-native/virtualized-lists": "0.78.0-nightly-20250113-d4407d6f7",
|
|
40
40
|
"abort-controller": "^3.0.0",
|
|
41
41
|
"anser": "^1.4.9",
|
|
42
42
|
"ansi-regex": "^5.0.0",
|
|
@@ -84,19 +84,19 @@
|
|
|
84
84
|
"@types/prop-types": "15.7.1",
|
|
85
85
|
"@types/react": "^19.0.0",
|
|
86
86
|
"eslint": "^8.19.0",
|
|
87
|
-
"flow-bin": "^0.
|
|
87
|
+
"flow-bin": "^0.258.1",
|
|
88
88
|
"jscodeshift": "^0.14.0",
|
|
89
89
|
"just-scripts": "^1.3.3",
|
|
90
90
|
"prettier": "2.8.8",
|
|
91
91
|
"react": "19.0.0",
|
|
92
|
-
"react-native": "0.78.0-nightly-
|
|
92
|
+
"react-native": "0.78.0-nightly-20250113-d4407d6f7",
|
|
93
93
|
"react-native-platform-override": "^1.9.51",
|
|
94
94
|
"typescript": "5.0.4"
|
|
95
95
|
},
|
|
96
96
|
"peerDependencies": {
|
|
97
97
|
"@types/react": "^19.0.0",
|
|
98
98
|
"react": "^19.0.0",
|
|
99
|
-
"react-native": "0.78.0-nightly-
|
|
99
|
+
"react-native": "0.78.0-nightly-20250113-d4407d6f7"
|
|
100
100
|
},
|
|
101
101
|
"beachball": {
|
|
102
102
|
"defaultNpmTag": "canary",
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<3037cf1c938dae492b656333cec9633c>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -56,8 +56,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
56
56
|
disableEventLoopOnBridgeless: Getter<boolean>,
|
|
57
57
|
disableMountItemReorderingAndroid: Getter<boolean>,
|
|
58
58
|
enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean>,
|
|
59
|
-
enableAlignItemsBaselineOnFabricIOS: Getter<boolean>,
|
|
60
|
-
enableAndroidLineHeightCentering: Getter<boolean>,
|
|
61
59
|
enableBridgelessArchitecture: Getter<boolean>,
|
|
62
60
|
enableCppPropsIteratorSetter: Getter<boolean>,
|
|
63
61
|
enableDeletionOfUnmountedViews: Getter<boolean>,
|
|
@@ -83,7 +81,6 @@ export type ReactNativeFeatureFlags = $ReadOnly<{
|
|
|
83
81
|
fixDifferentiatorEmittingUpdatesWithWrongParentTag: Getter<boolean>,
|
|
84
82
|
fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean>,
|
|
85
83
|
fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean>,
|
|
86
|
-
fuseboxEnabledDebug: Getter<boolean>,
|
|
87
84
|
fuseboxEnabledRelease: Getter<boolean>,
|
|
88
85
|
initEagerTurboModulesOnNativeModulesQueueAndroid: Getter<boolean>,
|
|
89
86
|
lazyAnimationCallbacks: Getter<boolean>,
|
|
@@ -210,14 +207,6 @@ export const disableMountItemReorderingAndroid: Getter<boolean> = createNativeFl
|
|
|
210
207
|
* When enabled, Andoid will accumulate updates in rawProps to reduce the number of mounting instructions for cascading rerenders.
|
|
211
208
|
*/
|
|
212
209
|
export const enableAccumulatedUpdatesInRawPropsAndroid: Getter<boolean> = createNativeFlagGetter('enableAccumulatedUpdatesInRawPropsAndroid', false);
|
|
213
|
-
/**
|
|
214
|
-
* Kill-switch to turn off support for aling-items:baseline on Fabric iOS.
|
|
215
|
-
*/
|
|
216
|
-
export const enableAlignItemsBaselineOnFabricIOS: Getter<boolean> = createNativeFlagGetter('enableAlignItemsBaselineOnFabricIOS', true);
|
|
217
|
-
/**
|
|
218
|
-
* When enabled, custom line height calculation will be centered from top to bottom.
|
|
219
|
-
*/
|
|
220
|
-
export const enableAndroidLineHeightCentering: Getter<boolean> = createNativeFlagGetter('enableAndroidLineHeightCentering', true);
|
|
221
210
|
/**
|
|
222
211
|
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer.
|
|
223
212
|
*/
|
|
@@ -318,10 +307,6 @@ export const fixMappingOfEventPrioritiesBetweenFabricAndReact: Getter<boolean> =
|
|
|
318
307
|
* Fixes a limitation on Android where the mounting coordinator would report there are no pending transactions but some of them were actually not processed due to the use of the push model.
|
|
319
308
|
*/
|
|
320
309
|
export const fixMountingCoordinatorReportedPendingTransactionsOnAndroid: Getter<boolean> = createNativeFlagGetter('fixMountingCoordinatorReportedPendingTransactionsOnAndroid', false);
|
|
321
|
-
/**
|
|
322
|
-
* Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in debug builds. This flag is global and should not be changed across React Host lifetimes.
|
|
323
|
-
*/
|
|
324
|
-
export const fuseboxEnabledDebug: Getter<boolean> = createNativeFlagGetter('fuseboxEnabledDebug', true);
|
|
325
310
|
/**
|
|
326
311
|
* Flag determining if the React Native DevTools (Fusebox) CDP backend should be enabled in release builds. This flag is global and should not be changed across React Host lifetimes.
|
|
327
312
|
*/
|
|
@@ -4,7 +4,7 @@
|
|
|
4
4
|
* This source code is licensed under the MIT license found in the
|
|
5
5
|
* LICENSE file in the root directory of this source tree.
|
|
6
6
|
*
|
|
7
|
-
* @generated SignedSource<<
|
|
7
|
+
* @generated SignedSource<<37e95652ef5d824bb05e78ebdb051e43>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -29,8 +29,6 @@ export interface Spec extends TurboModule {
|
|
|
29
29
|
+disableEventLoopOnBridgeless?: () => boolean;
|
|
30
30
|
+disableMountItemReorderingAndroid?: () => boolean;
|
|
31
31
|
+enableAccumulatedUpdatesInRawPropsAndroid?: () => boolean;
|
|
32
|
-
+enableAlignItemsBaselineOnFabricIOS?: () => boolean;
|
|
33
|
-
+enableAndroidLineHeightCentering?: () => boolean;
|
|
34
32
|
+enableBridgelessArchitecture?: () => boolean;
|
|
35
33
|
+enableCppPropsIteratorSetter?: () => boolean;
|
|
36
34
|
+enableDeletionOfUnmountedViews?: () => boolean;
|
|
@@ -56,7 +54,6 @@ export interface Spec extends TurboModule {
|
|
|
56
54
|
+fixDifferentiatorEmittingUpdatesWithWrongParentTag?: () => boolean;
|
|
57
55
|
+fixMappingOfEventPrioritiesBetweenFabricAndReact?: () => boolean;
|
|
58
56
|
+fixMountingCoordinatorReportedPendingTransactionsOnAndroid?: () => boolean;
|
|
59
|
-
+fuseboxEnabledDebug?: () => boolean;
|
|
60
57
|
+fuseboxEnabledRelease?: () => boolean;
|
|
61
58
|
+initEagerTurboModulesOnNativeModulesQueueAndroid?: () => boolean;
|
|
62
59
|
+lazyAnimationCallbacks?: () => boolean;
|
|
@@ -21,7 +21,10 @@ type ErrorInfo = {
|
|
|
21
21
|
+errorBoundary?: ?React$Component<any, any>,
|
|
22
22
|
};
|
|
23
23
|
|
|
24
|
-
|
|
24
|
+
function getExtendedError(
|
|
25
|
+
errorValue: mixed,
|
|
26
|
+
errorInfo: ErrorInfo,
|
|
27
|
+
): ExtendedError {
|
|
25
28
|
let error;
|
|
26
29
|
|
|
27
30
|
// Typically, `errorValue` should be an error. However, other values such as
|
|
@@ -50,38 +53,18 @@ export function onUncaughtError(errorValue: mixed, errorInfo: ErrorInfo): void {
|
|
|
50
53
|
// Ignored.
|
|
51
54
|
}
|
|
52
55
|
|
|
56
|
+
return error;
|
|
57
|
+
}
|
|
58
|
+
|
|
59
|
+
export function onUncaughtError(errorValue: mixed, errorInfo: ErrorInfo): void {
|
|
60
|
+
const error = getExtendedError(errorValue, errorInfo);
|
|
61
|
+
|
|
53
62
|
// Uncaught errors are fatal.
|
|
54
63
|
handleException(error, true);
|
|
55
64
|
}
|
|
56
65
|
|
|
57
66
|
export function onCaughtError(errorValue: mixed, errorInfo: ErrorInfo): void {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
// Typically, `errorValue` should be an error. However, other values such as
|
|
61
|
-
// strings (or even null) are sometimes thrown.
|
|
62
|
-
if (errorValue instanceof Error) {
|
|
63
|
-
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
64
|
-
* this parameters */
|
|
65
|
-
// $FlowFixMe[incompatible-cast]
|
|
66
|
-
error = (errorValue: ExtendedError);
|
|
67
|
-
} else if (typeof errorValue === 'string') {
|
|
68
|
-
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
69
|
-
* this parameters */
|
|
70
|
-
// $FlowFixMe[incompatible-cast]
|
|
71
|
-
error = (new SyntheticError(errorValue): ExtendedError);
|
|
72
|
-
} else {
|
|
73
|
-
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
74
|
-
* this parameters */
|
|
75
|
-
// $FlowFixMe[incompatible-cast]
|
|
76
|
-
error = (new SyntheticError('Unspecified error'): ExtendedError);
|
|
77
|
-
}
|
|
78
|
-
try {
|
|
79
|
-
// $FlowFixMe[incompatible-use] this is in try/catch.
|
|
80
|
-
error.componentStack = errorInfo.componentStack;
|
|
81
|
-
error.isComponentError = true;
|
|
82
|
-
} catch {
|
|
83
|
-
// Ignored.
|
|
84
|
-
}
|
|
67
|
+
const error = getExtendedError(errorValue, errorInfo);
|
|
85
68
|
|
|
86
69
|
// Caught errors are not fatal.
|
|
87
70
|
handleException(error, false);
|
|
@@ -91,33 +74,7 @@ export function onRecoverableError(
|
|
|
91
74
|
errorValue: mixed,
|
|
92
75
|
errorInfo: ErrorInfo,
|
|
93
76
|
): void {
|
|
94
|
-
|
|
95
|
-
|
|
96
|
-
// Typically, `errorValue` should be an error. However, other values such as
|
|
97
|
-
// strings (or even null) are sometimes thrown.
|
|
98
|
-
if (errorValue instanceof Error) {
|
|
99
|
-
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
100
|
-
* this parameters */
|
|
101
|
-
// $FlowFixMe[incompatible-cast]
|
|
102
|
-
error = (errorValue: ExtendedError);
|
|
103
|
-
} else if (typeof errorValue === 'string') {
|
|
104
|
-
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
105
|
-
* this parameters */
|
|
106
|
-
// $FlowFixMe[incompatible-cast]
|
|
107
|
-
error = (new SyntheticError(errorValue): ExtendedError);
|
|
108
|
-
} else {
|
|
109
|
-
/* $FlowFixMe[class-object-subtyping] added when improving typing for
|
|
110
|
-
* this parameters */
|
|
111
|
-
// $FlowFixMe[incompatible-cast]
|
|
112
|
-
error = (new SyntheticError('Unspecified error'): ExtendedError);
|
|
113
|
-
}
|
|
114
|
-
try {
|
|
115
|
-
// $FlowFixMe[incompatible-use] this is in try/catch.
|
|
116
|
-
error.componentStack = errorInfo.componentStack;
|
|
117
|
-
error.isComponentError = true;
|
|
118
|
-
} catch {
|
|
119
|
-
// Ignored.
|
|
120
|
-
}
|
|
77
|
+
const error = getExtendedError(errorValue, errorInfo);
|
|
121
78
|
|
|
122
79
|
// Recoverable errors should only be warnings.
|
|
123
80
|
// This will make it a soft error in LogBox.
|
|
@@ -0,0 +1,24 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and 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 type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';
|
|
12
|
+
|
|
13
|
+
import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';
|
|
14
|
+
|
|
15
|
+
/**
|
|
16
|
+
* This is an internal native module meant to be used for performance
|
|
17
|
+
* measurements and benchmarks. It is not meant to be used in production.
|
|
18
|
+
*/
|
|
19
|
+
export interface Spec extends TurboModule {
|
|
20
|
+
+getCPUTimeNanos: () => number;
|
|
21
|
+
+hasAccurateCPUTimeNanosForBenchmarks: () => boolean;
|
|
22
|
+
}
|
|
23
|
+
|
|
24
|
+
export default (TurboModuleRegistry.getEnforcing<Spec>('CPUTimeCxx'): Spec);
|
|
@@ -0,0 +1,37 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* Copyright (c) Meta Platforms, Inc. and 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 type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';
|
|
12
|
+
|
|
13
|
+
import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';
|
|
14
|
+
|
|
15
|
+
// match RenderFormatOptions.h
|
|
16
|
+
export type RenderFormatOptions = {
|
|
17
|
+
includeRoot: boolean,
|
|
18
|
+
includeLayoutMetrics: boolean,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
interface Spec extends TurboModule {
|
|
22
|
+
startSurface: (
|
|
23
|
+
surfaceId: number,
|
|
24
|
+
viewportWidth: number,
|
|
25
|
+
viewportHeight: number,
|
|
26
|
+
devicePixelRatio: number,
|
|
27
|
+
) => void;
|
|
28
|
+
stopSurface: (surfaceId: number) => void;
|
|
29
|
+
getMountingManagerLogs: (surfaceId: number) => Array<string>;
|
|
30
|
+
flushMessageQueue: () => void;
|
|
31
|
+
getRenderedOutput: (surfaceId: number, config: RenderFormatOptions) => string;
|
|
32
|
+
reportTestSuiteResultsJSON: (results: string) => void;
|
|
33
|
+
}
|
|
34
|
+
|
|
35
|
+
export default TurboModuleRegistry.getEnforcing<Spec>(
|
|
36
|
+
'NativeFantomCxx',
|
|
37
|
+
) as Spec;
|