@office-iss/react-native-win32 0.0.0-canary.266 → 0.0.0-canary.268
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 +55 -1
- package/CHANGELOG.md +24 -4
- package/Libraries/Animated/animations/Animation.js +4 -1
- package/Libraries/Components/AccessibilityInfo/AccessibilityInfo.win32.js +15 -15
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js +3 -1
- package/Libraries/Components/Keyboard/KeyboardAvoidingView.js +17 -0
- package/Libraries/Components/ProgressBarAndroid/ProgressBarAndroid.android.js +1 -0
- package/Libraries/Components/TextInput/TextInput.win32.js +17 -12
- package/Libraries/Components/Touchable/BoundingDimensions.js +11 -3
- package/Libraries/Components/Touchable/Position.js +7 -2
- package/Libraries/Components/Touchable/Touchable.js +4 -0
- package/Libraries/Components/Touchable/Touchable.win32.js +6 -2
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +1 -1
- package/Libraries/Components/View/ViewWin32.js +3 -3
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpReactDevTools.js +33 -7
- package/Libraries/Inspector/NetworkOverlay.js +4 -0
- package/Libraries/Inspector/ReactDevToolsOverlay.js +8 -13
- package/Libraries/Interaction/TouchHistoryMath.js +22 -19
- package/Libraries/LogBox/Data/LogBoxData.js +2 -2
- package/Libraries/NativeComponent/BaseViewConfig.android.js +1 -1
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +1 -1
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +1 -1
- package/Libraries/Network/XHRInterceptor.js +63 -14
- package/Libraries/Renderer/shims/ReactNativeTypes.js +2 -1
- package/Libraries/StyleSheet/StyleSheetTypes.js +1 -1
- package/Libraries/Text/Text.win32.js +11 -7
- package/Libraries/Utilities/Platform.win32.js +4 -4
- package/Libraries/WebSocket/WebSocketEvent.js +4 -1
- package/Libraries/WebSocket/WebSocketInterceptor.js +31 -13
- package/index.js +4 -0
- package/index.win32.js +4 -0
- package/just-task.js +1 -1
- package/overrides.json +12 -12
- package/package.json +16 -16
- package/src/private/devmenu/DevMenu.d.ts +20 -0
- package/src/private/devmenu/DevMenu.js +31 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +22 -11
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +4 -3
- package/src/private/reactdevtools/ReactDevToolsSettingsManager.android.js +20 -0
- package/src/private/reactdevtools/ReactDevToolsSettingsManager.ios.js +30 -0
- package/src/private/reactdevtools/ReactDevToolsSettingsManager.win32.js +20 -0
- package/src/private/specs/components/AndroidHorizontalScrollContentViewNativeComponent.js +1 -0
- package/src/private/specs/modules/{NativeDevToolsSettingsManager.js → NativeReactDevToolsSettingsManager.js} +3 -5
- package/src/private/webapis/performance/EventTiming.js +1 -1
- package/src/private/webapis/performance/Performance.js +3 -21
- package/src/private/webapis/performance/PerformanceObserver.js +68 -155
- package/src/private/webapis/performance/Utilities.js +25 -0
- package/src/private/webapis/performance/specs/NativePerformanceObserver.js +24 -16
- package/src/private/webapis/performance/specs/__mocks__/NativePerformance.js +11 -9
- package/src/private/webapis/performance/specs/__mocks__/NativePerformanceObserver.js +85 -58
- package/types/experimental.d.ts +1 -1
- package/types/index.d.ts +1 -1
- package/types/public/ReactNativeTypes.d.ts +0 -4
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.android.js +0 -35
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.d.ts +0 -20
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.ios.js +0 -49
- package/Libraries/DevToolsSettings/DevToolsSettingsManager.win32.js +0 -35
- package/Libraries/DevToolsSettings/NativeDevToolsSettingsManager.js +0 -13
package/overrides.json
CHANGED
|
@@ -7,19 +7,19 @@
|
|
|
7
7
|
"**/__snapshots__/**",
|
|
8
8
|
"src-win/rntypes/**"
|
|
9
9
|
],
|
|
10
|
-
"baseVersion": "0.77.0-nightly-
|
|
10
|
+
"baseVersion": "0.77.0-nightly-20241001-223e98cc4",
|
|
11
11
|
"overrides": [
|
|
12
12
|
{
|
|
13
13
|
"type": "derived",
|
|
14
14
|
"file": ".flowconfig",
|
|
15
15
|
"baseFile": ".flowconfig",
|
|
16
|
-
"baseHash": "
|
|
16
|
+
"baseHash": "0ef50a705dc56608e4a8bd11d3b0d3daedfc0012"
|
|
17
17
|
},
|
|
18
18
|
{
|
|
19
19
|
"type": "derived",
|
|
20
20
|
"file": "src-win/index.win32.js",
|
|
21
21
|
"baseFile": "packages/react-native/index.js",
|
|
22
|
-
"baseHash": "
|
|
22
|
+
"baseHash": "70b04f859a60e3752e6937b9fc294ffee30e6366"
|
|
23
23
|
},
|
|
24
24
|
{
|
|
25
25
|
"type": "platform",
|
|
@@ -74,7 +74,7 @@
|
|
|
74
74
|
"type": "copy",
|
|
75
75
|
"file": "src-win/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js",
|
|
76
76
|
"baseFile": "packages/react-native/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.js",
|
|
77
|
-
"baseHash": "
|
|
77
|
+
"baseHash": "b9a6866d03ca389af38734ffed24199505b05402",
|
|
78
78
|
"issue": 4378
|
|
79
79
|
},
|
|
80
80
|
{
|
|
@@ -136,7 +136,7 @@
|
|
|
136
136
|
"type": "patch",
|
|
137
137
|
"file": "src-win/Libraries/Components/Touchable/Touchable.win32.js",
|
|
138
138
|
"baseFile": "packages/react-native/Libraries/Components/Touchable/Touchable.js",
|
|
139
|
-
"baseHash": "
|
|
139
|
+
"baseHash": "b06bb9da5282d7559f283a7d535797a0417808a6",
|
|
140
140
|
"issue": 0
|
|
141
141
|
},
|
|
142
142
|
{
|
|
@@ -224,12 +224,6 @@
|
|
|
224
224
|
"baseHash": "453c4da8036736aefbd950bb7c90603859933f4e",
|
|
225
225
|
"issue": 5170
|
|
226
226
|
},
|
|
227
|
-
{
|
|
228
|
-
"type": "copy",
|
|
229
|
-
"file": "src-win/Libraries/DevToolsSettings/DevToolsSettingsManager.win32.js",
|
|
230
|
-
"baseFile": "packages/react-native/Libraries/DevToolsSettings/DevToolsSettingsManager.android.js",
|
|
231
|
-
"baseHash": "1c9eb481e8ed077fa650e3ea34837e2a31310366"
|
|
232
|
-
},
|
|
233
227
|
{
|
|
234
228
|
"type": "platform",
|
|
235
229
|
"file": "src-win/Libraries/Image/assetPaths.js"
|
|
@@ -337,7 +331,7 @@
|
|
|
337
331
|
"type": "derived",
|
|
338
332
|
"file": "src-win/Libraries/NativeComponent/BaseViewConfig.win32.js",
|
|
339
333
|
"baseFile": "packages/react-native/Libraries/NativeComponent/BaseViewConfig.ios.js",
|
|
340
|
-
"baseHash": "
|
|
334
|
+
"baseHash": "af602af3c3acc6521f5535f2fe14bfe08cf1b5e9"
|
|
341
335
|
},
|
|
342
336
|
{
|
|
343
337
|
"type": "copy",
|
|
@@ -529,6 +523,12 @@
|
|
|
529
523
|
"file": "src-win/src/private/specs/modules/NativePlatformConstantsWin.js",
|
|
530
524
|
"baseFile": "packages/react-native/src/private/specs/modules/NativePlatformConstantsAndroid.js",
|
|
531
525
|
"baseHash": "fa0f34a2de33b641bd63863629087644796d8b59"
|
|
526
|
+
},
|
|
527
|
+
{
|
|
528
|
+
"type": "copy",
|
|
529
|
+
"file": "src-win/src/private/reactdevtools/ReactDevToolsSettingsManager.win32.js",
|
|
530
|
+
"baseFile": "packages/react-native/src/private/reactdevtools/ReactDevToolsSettingsManager.android.js",
|
|
531
|
+
"baseHash": "df41b76dc3d2df9455fae588748261d7b0a22d01"
|
|
532
532
|
}
|
|
533
533
|
]
|
|
534
534
|
}
|
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.268",
|
|
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.77.0-nightly-
|
|
34
|
-
"@react-native/codegen": "0.77.0-nightly-
|
|
35
|
-
"@react-native/community-cli-plugin": "0.77.0-nightly-
|
|
36
|
-
"@react-native/gradle-plugin": "0.77.0-nightly-
|
|
37
|
-
"@react-native/js-polyfills": "0.77.0-nightly-
|
|
38
|
-
"@react-native/normalize-colors": "0.77.0-nightly-
|
|
39
|
-
"@react-native/virtualized-lists": "0.77.0-nightly-
|
|
33
|
+
"@react-native/assets-registry": "0.77.0-nightly-20241001-223e98cc4",
|
|
34
|
+
"@react-native/codegen": "0.77.0-nightly-20241001-223e98cc4",
|
|
35
|
+
"@react-native/community-cli-plugin": "0.77.0-nightly-20241001-223e98cc4",
|
|
36
|
+
"@react-native/gradle-plugin": "0.77.0-nightly-20241001-223e98cc4",
|
|
37
|
+
"@react-native/js-polyfills": "0.77.0-nightly-20241001-223e98cc4",
|
|
38
|
+
"@react-native/normalize-colors": "0.77.0-nightly-20241001-223e98cc4",
|
|
39
|
+
"@react-native/virtualized-lists": "0.77.0-nightly-20241001-223e98cc4",
|
|
40
40
|
"abort-controller": "^3.0.0",
|
|
41
41
|
"anser": "^1.4.9",
|
|
42
42
|
"ansi-regex": "^5.0.0",
|
|
@@ -60,7 +60,7 @@
|
|
|
60
60
|
"pretty-format": "^29.7.0",
|
|
61
61
|
"promise": "^8.3.0",
|
|
62
62
|
"react-clone-referenced-element": "^1.0.1",
|
|
63
|
-
"react-devtools-core": "^
|
|
63
|
+
"react-devtools-core": "^6.0.0",
|
|
64
64
|
"react-refresh": "^0.14.0",
|
|
65
65
|
"react-shallow-renderer": "^16.15.0",
|
|
66
66
|
"regenerator-runtime": "^0.13.2",
|
|
@@ -74,11 +74,11 @@
|
|
|
74
74
|
"devDependencies": {
|
|
75
75
|
"@babel/core": "^7.25.2",
|
|
76
76
|
"@babel/eslint-parser": "^7.25.1",
|
|
77
|
-
"@react-native/metro-config": "0.
|
|
77
|
+
"@react-native/metro-config": "0.77.0-nightly-20241001-223e98cc4",
|
|
78
78
|
"@rnw-scripts/babel-react-native-config": "0.0.0",
|
|
79
|
-
"@rnw-scripts/eslint-config": "1.2.
|
|
80
|
-
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.
|
|
81
|
-
"@rnw-scripts/just-task": "2.3.
|
|
79
|
+
"@rnw-scripts/eslint-config": "1.2.30",
|
|
80
|
+
"@rnw-scripts/jest-out-of-tree-snapshot-resolver": "^1.1.34",
|
|
81
|
+
"@rnw-scripts/just-task": "2.3.47",
|
|
82
82
|
"@rnw-scripts/metro-dev-config": "0.0.0",
|
|
83
83
|
"@rnx-kit/jest-preset": "^0.1.17",
|
|
84
84
|
"@types/node": "^18.0.0",
|
|
@@ -90,14 +90,14 @@
|
|
|
90
90
|
"just-scripts": "^1.3.3",
|
|
91
91
|
"prettier": "2.8.8",
|
|
92
92
|
"react": "19.0.0-rc-fb9a90fa48-20240614",
|
|
93
|
-
"react-native": "0.77.0-nightly-
|
|
94
|
-
"react-native-platform-override": "^1.9.
|
|
93
|
+
"react-native": "0.77.0-nightly-20241001-223e98cc4",
|
|
94
|
+
"react-native-platform-override": "^1.9.49",
|
|
95
95
|
"typescript": "5.0.4"
|
|
96
96
|
},
|
|
97
97
|
"peerDependencies": {
|
|
98
98
|
"@types/react": "^18.2.6",
|
|
99
99
|
"react": "^19.0.0-rc-fb9a90fa48-20240614",
|
|
100
|
-
"react-native": "0.77.0-nightly-
|
|
100
|
+
"react-native": "0.77.0-nightly-20241001-223e98cc4"
|
|
101
101
|
},
|
|
102
102
|
"beachball": {
|
|
103
103
|
"defaultNpmTag": "canary",
|
|
@@ -0,0 +1,20 @@
|
|
|
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
|
+
* @format
|
|
8
|
+
*/
|
|
9
|
+
|
|
10
|
+
/**
|
|
11
|
+
* The DevMenu module exposes methods for interacting with the Dev Menu in development.
|
|
12
|
+
*/
|
|
13
|
+
export interface DevMenuStatic {
|
|
14
|
+
/**
|
|
15
|
+
* Show the Dev Menu.
|
|
16
|
+
*/
|
|
17
|
+
show(): void;
|
|
18
|
+
}
|
|
19
|
+
|
|
20
|
+
export const DevMenu: DevMenuStatic;
|
|
@@ -0,0 +1,31 @@
|
|
|
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-local
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import NativeDevMenu from '../specs/modules/NativeDevMenu';
|
|
12
|
+
|
|
13
|
+
/**
|
|
14
|
+
* The DevMenu module exposes methods for interacting with the Dev Menu in development.
|
|
15
|
+
*/
|
|
16
|
+
type DevMenuStatic = {
|
|
17
|
+
/**
|
|
18
|
+
* Show the Dev Menu.
|
|
19
|
+
*/
|
|
20
|
+
show(): void,
|
|
21
|
+
};
|
|
22
|
+
|
|
23
|
+
const DevMenu: DevMenuStatic = {
|
|
24
|
+
show(): void {
|
|
25
|
+
if (__DEV__) {
|
|
26
|
+
NativeDevMenu.show?.();
|
|
27
|
+
}
|
|
28
|
+
},
|
|
29
|
+
};
|
|
30
|
+
|
|
31
|
+
module.exports = DevMenu;
|
|
@@ -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<<e161b67cb919ad7e2e67ddcb3c501adb>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -36,6 +36,7 @@ export type ReactNativeFeatureFlagsJsOnly = {
|
|
|
36
36
|
enableAnimatedPropsMemo: Getter<boolean>,
|
|
37
37
|
enableOptimisedVirtualizedCells: Getter<boolean>,
|
|
38
38
|
isLayoutAnimationEnabled: Getter<boolean>,
|
|
39
|
+
shouldSkipStateUpdatesForLoopingAnimations: Getter<boolean>,
|
|
39
40
|
shouldUseAnimatedObjectForTransform: Getter<boolean>,
|
|
40
41
|
shouldUseRemoveClippedSubviewsAsDefaultOnIOS: Getter<boolean>,
|
|
41
42
|
shouldUseSetNativePropsInFabric: Getter<boolean>,
|
|
@@ -55,13 +56,14 @@ export type ReactNativeFeatureFlags = {
|
|
|
55
56
|
destroyFabricSurfacesInReactInstanceManager: Getter<boolean>,
|
|
56
57
|
enableAlignItemsBaselineOnFabricIOS: Getter<boolean>,
|
|
57
58
|
enableAndroidLineHeightCentering: Getter<boolean>,
|
|
58
|
-
enableAndroidMixBlendModeProp: Getter<boolean>,
|
|
59
59
|
enableBackgroundStyleApplicator: Getter<boolean>,
|
|
60
|
+
enableBridgelessArchitecture: Getter<boolean>,
|
|
60
61
|
enableCleanTextInputYogaNode: Getter<boolean>,
|
|
61
62
|
enableDeletionOfUnmountedViews: Getter<boolean>,
|
|
62
63
|
enableEagerRootViewAttachment: Getter<boolean>,
|
|
63
64
|
enableEventEmitterRetentionDuringGesturesOnAndroid: Getter<boolean>,
|
|
64
65
|
enableFabricLogs: Getter<boolean>,
|
|
66
|
+
enableFabricRenderer: Getter<boolean>,
|
|
65
67
|
enableFabricRendererExclusively: Getter<boolean>,
|
|
66
68
|
enableGranularShadowTreeStateReconciliation: Getter<boolean>,
|
|
67
69
|
enableIOSViewClipToPaddingBox: Getter<boolean>,
|
|
@@ -97,8 +99,8 @@ export type ReactNativeFeatureFlags = {
|
|
|
97
99
|
useOptimizedEventBatchingOnAndroid: Getter<boolean>,
|
|
98
100
|
useRuntimeShadowNodeReferenceUpdate: Getter<boolean>,
|
|
99
101
|
useRuntimeShadowNodeReferenceUpdateOnLayout: Getter<boolean>,
|
|
100
|
-
useStateAlignmentMechanism: Getter<boolean>,
|
|
101
102
|
useTurboModuleInterop: Getter<boolean>,
|
|
103
|
+
useTurboModules: Getter<boolean>,
|
|
102
104
|
}
|
|
103
105
|
|
|
104
106
|
/**
|
|
@@ -146,6 +148,11 @@ export const enableOptimisedVirtualizedCells: Getter<boolean> = createJavaScript
|
|
|
146
148
|
*/
|
|
147
149
|
export const isLayoutAnimationEnabled: Getter<boolean> = createJavaScriptFlagGetter('isLayoutAnimationEnabled', true);
|
|
148
150
|
|
|
151
|
+
/**
|
|
152
|
+
* If the animation is within Animated.loop, we do not send state updates to React.
|
|
153
|
+
*/
|
|
154
|
+
export const shouldSkipStateUpdatesForLoopingAnimations: Getter<boolean> = createJavaScriptFlagGetter('shouldSkipStateUpdatesForLoopingAnimations', false);
|
|
155
|
+
|
|
149
156
|
/**
|
|
150
157
|
* Enables use of AnimatedObject for animating transform values.
|
|
151
158
|
*/
|
|
@@ -204,14 +211,14 @@ export const enableAlignItemsBaselineOnFabricIOS: Getter<boolean> = createNative
|
|
|
204
211
|
* When enabled, custom line height calculation will be centered from top to bottom.
|
|
205
212
|
*/
|
|
206
213
|
export const enableAndroidLineHeightCentering: Getter<boolean> = createNativeFlagGetter('enableAndroidLineHeightCentering', false);
|
|
207
|
-
/**
|
|
208
|
-
* Enables mix-blend-mode prop on Android.
|
|
209
|
-
*/
|
|
210
|
-
export const enableAndroidMixBlendModeProp: Getter<boolean> = createNativeFlagGetter('enableAndroidMixBlendModeProp', false);
|
|
211
214
|
/**
|
|
212
215
|
* Use BackgroundStyleApplicator in place of other background/border drawing code
|
|
213
216
|
*/
|
|
214
217
|
export const enableBackgroundStyleApplicator: Getter<boolean> = createNativeFlagGetter('enableBackgroundStyleApplicator', true);
|
|
218
|
+
/**
|
|
219
|
+
* Feature flag to enable the new bridgeless architecture. Note: Enabling this will force enable the following flags: `useTurboModules` & `enableFabricRenderer.
|
|
220
|
+
*/
|
|
221
|
+
export const enableBridgelessArchitecture: Getter<boolean> = createNativeFlagGetter('enableBridgelessArchitecture', false);
|
|
215
222
|
/**
|
|
216
223
|
* Clean yoga node when <TextInput /> does not change.
|
|
217
224
|
*/
|
|
@@ -232,6 +239,10 @@ export const enableEventEmitterRetentionDuringGesturesOnAndroid: Getter<boolean>
|
|
|
232
239
|
* This feature flag enables logs for Fabric.
|
|
233
240
|
*/
|
|
234
241
|
export const enableFabricLogs: Getter<boolean> = createNativeFlagGetter('enableFabricLogs', false);
|
|
242
|
+
/**
|
|
243
|
+
* Enables the use of the Fabric renderer in the whole app.
|
|
244
|
+
*/
|
|
245
|
+
export const enableFabricRenderer: Getter<boolean> = createNativeFlagGetter('enableFabricRenderer', false);
|
|
235
246
|
/**
|
|
236
247
|
* When the app is completely migrated to Fabric, set this flag to true to disable parts of Paper infrastructure that are not needed anymore but consume memory and CPU. Specifically, UIViewOperationQueue and EventDispatcherImpl will no longer work as they will not subscribe to ReactChoreographer for updates.
|
|
237
248
|
*/
|
|
@@ -372,14 +383,14 @@ export const useRuntimeShadowNodeReferenceUpdate: Getter<boolean> = createNative
|
|
|
372
383
|
* When enabled, cloning shadow nodes during layout will update the reference held by the current JS fiber tree.
|
|
373
384
|
*/
|
|
374
385
|
export const useRuntimeShadowNodeReferenceUpdateOnLayout: Getter<boolean> = createNativeFlagGetter('useRuntimeShadowNodeReferenceUpdateOnLayout', false);
|
|
375
|
-
/**
|
|
376
|
-
* When enabled, it uses optimised state reconciliation algorithm.
|
|
377
|
-
*/
|
|
378
|
-
export const useStateAlignmentMechanism: Getter<boolean> = createNativeFlagGetter('useStateAlignmentMechanism', false);
|
|
379
386
|
/**
|
|
380
387
|
* In Bridgeless mode, should legacy NativeModules use the TurboModule system?
|
|
381
388
|
*/
|
|
382
389
|
export const useTurboModuleInterop: Getter<boolean> = createNativeFlagGetter('useTurboModuleInterop', false);
|
|
390
|
+
/**
|
|
391
|
+
* When enabled, NativeModules will be executed by using the TurboModule system
|
|
392
|
+
*/
|
|
393
|
+
export const useTurboModules: Getter<boolean> = createNativeFlagGetter('useTurboModules', false);
|
|
383
394
|
|
|
384
395
|
/**
|
|
385
396
|
* Overrides the feature flags with the provided methods.
|
|
@@ -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<<cd4a2a047e3a6fdb4205efb518906462>>
|
|
8
8
|
* @flow strict
|
|
9
9
|
*/
|
|
10
10
|
|
|
@@ -30,13 +30,14 @@ export interface Spec extends TurboModule {
|
|
|
30
30
|
+destroyFabricSurfacesInReactInstanceManager?: () => boolean;
|
|
31
31
|
+enableAlignItemsBaselineOnFabricIOS?: () => boolean;
|
|
32
32
|
+enableAndroidLineHeightCentering?: () => boolean;
|
|
33
|
-
+enableAndroidMixBlendModeProp?: () => boolean;
|
|
34
33
|
+enableBackgroundStyleApplicator?: () => boolean;
|
|
34
|
+
+enableBridgelessArchitecture?: () => boolean;
|
|
35
35
|
+enableCleanTextInputYogaNode?: () => boolean;
|
|
36
36
|
+enableDeletionOfUnmountedViews?: () => boolean;
|
|
37
37
|
+enableEagerRootViewAttachment?: () => boolean;
|
|
38
38
|
+enableEventEmitterRetentionDuringGesturesOnAndroid?: () => boolean;
|
|
39
39
|
+enableFabricLogs?: () => boolean;
|
|
40
|
+
+enableFabricRenderer?: () => boolean;
|
|
40
41
|
+enableFabricRendererExclusively?: () => boolean;
|
|
41
42
|
+enableGranularShadowTreeStateReconciliation?: () => boolean;
|
|
42
43
|
+enableIOSViewClipToPaddingBox?: () => boolean;
|
|
@@ -72,8 +73,8 @@ export interface Spec extends TurboModule {
|
|
|
72
73
|
+useOptimizedEventBatchingOnAndroid?: () => boolean;
|
|
73
74
|
+useRuntimeShadowNodeReferenceUpdate?: () => boolean;
|
|
74
75
|
+useRuntimeShadowNodeReferenceUpdateOnLayout?: () => boolean;
|
|
75
|
-
+useStateAlignmentMechanism?: () => boolean;
|
|
76
76
|
+useTurboModuleInterop?: () => boolean;
|
|
77
|
+
+useTurboModules?: () => boolean;
|
|
77
78
|
}
|
|
78
79
|
|
|
79
80
|
const NativeReactNativeFeatureFlags: ?Spec = TurboModuleRegistry.get<Spec>(
|
|
@@ -0,0 +1,20 @@
|
|
|
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-local
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import NativeReactDevToolsSettingsManager from '../specs/modules/NativeReactDevToolsSettingsManager';
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
setGlobalHookSettings(settings: string) {
|
|
15
|
+
NativeReactDevToolsSettingsManager?.setGlobalHookSettings(settings);
|
|
16
|
+
},
|
|
17
|
+
getGlobalHookSettings(): ?string {
|
|
18
|
+
return NativeReactDevToolsSettingsManager?.getGlobalHookSettings();
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -0,0 +1,30 @@
|
|
|
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-local
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import Settings from '../../../Libraries/Settings/Settings';
|
|
12
|
+
|
|
13
|
+
const GLOBAL_HOOK_SETTINGS = 'ReactDevTools::HookSettings';
|
|
14
|
+
|
|
15
|
+
const ReactDevToolsSettingsManager = {
|
|
16
|
+
setGlobalHookSettings(settings: string): void {
|
|
17
|
+
Settings.set({
|
|
18
|
+
[GLOBAL_HOOK_SETTINGS]: settings,
|
|
19
|
+
});
|
|
20
|
+
},
|
|
21
|
+
getGlobalHookSettings(): ?string {
|
|
22
|
+
const value = Settings.get(GLOBAL_HOOK_SETTINGS);
|
|
23
|
+
if (typeof value === 'string') {
|
|
24
|
+
return value;
|
|
25
|
+
}
|
|
26
|
+
return null;
|
|
27
|
+
},
|
|
28
|
+
};
|
|
29
|
+
|
|
30
|
+
module.exports = ReactDevToolsSettingsManager;
|
|
@@ -0,0 +1,20 @@
|
|
|
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-local
|
|
8
|
+
* @format
|
|
9
|
+
*/
|
|
10
|
+
|
|
11
|
+
import NativeReactDevToolsSettingsManager from '../specs/modules/NativeReactDevToolsSettingsManager';
|
|
12
|
+
|
|
13
|
+
module.exports = {
|
|
14
|
+
setGlobalHookSettings(settings: string) {
|
|
15
|
+
NativeReactDevToolsSettingsManager?.setGlobalHookSettings(settings);
|
|
16
|
+
},
|
|
17
|
+
getGlobalHookSettings(): ?string {
|
|
18
|
+
return NativeReactDevToolsSettingsManager?.getGlobalHookSettings();
|
|
19
|
+
},
|
|
20
|
+
};
|
|
@@ -13,12 +13,10 @@ import type {TurboModule} from '../../../../Libraries/TurboModule/RCTExport';
|
|
|
13
13
|
import * as TurboModuleRegistry from '../../../../Libraries/TurboModule/TurboModuleRegistry';
|
|
14
14
|
|
|
15
15
|
export interface Spec extends TurboModule {
|
|
16
|
-
+
|
|
17
|
-
+
|
|
18
|
-
+setProfilingSettings?: (newProfilingSettings: string) => void;
|
|
19
|
-
+getProfilingSettings?: () => ?string;
|
|
16
|
+
+setGlobalHookSettings: (settings: string) => void;
|
|
17
|
+
+getGlobalHookSettings: () => ?string;
|
|
20
18
|
}
|
|
21
19
|
|
|
22
20
|
export default (TurboModuleRegistry.get<Spec>(
|
|
23
|
-
'
|
|
21
|
+
'ReactDevToolsSettingsManager',
|
|
24
22
|
): ?Spec);
|
|
@@ -16,7 +16,7 @@ import type {
|
|
|
16
16
|
} from './PerformanceEntry';
|
|
17
17
|
|
|
18
18
|
import {PerformanceEntry} from './PerformanceEntry';
|
|
19
|
-
import {warnNoNativePerformanceObserver} from './
|
|
19
|
+
import {warnNoNativePerformanceObserver} from './Utilities';
|
|
20
20
|
import NativePerformanceObserver from './specs/NativePerformanceObserver';
|
|
21
21
|
|
|
22
22
|
export type PerformanceEventTimingJSON = {
|
|
@@ -17,11 +17,10 @@ import type {
|
|
|
17
17
|
import type {PerformanceEntryList} from './PerformanceObserver';
|
|
18
18
|
import type {DetailType, PerformanceMarkOptions} from './UserTiming';
|
|
19
19
|
|
|
20
|
-
import warnOnce from '../../../../Libraries/Utilities/warnOnce';
|
|
21
20
|
import {EventCounts} from './EventTiming';
|
|
22
21
|
import MemoryInfo from './MemoryInfo';
|
|
23
22
|
import {ALWAYS_LOGGED_ENTRY_TYPES} from './PerformanceEntry';
|
|
24
|
-
import {warnNoNativePerformanceObserver} from './
|
|
23
|
+
import {warnNoNativePerformanceObserver} from './Utilities';
|
|
25
24
|
import {
|
|
26
25
|
performanceEntryTypeToRaw,
|
|
27
26
|
rawToPerformanceEntry,
|
|
@@ -31,6 +30,7 @@ import ReactNativeStartupTiming from './ReactNativeStartupTiming';
|
|
|
31
30
|
import NativePerformance from './specs/NativePerformance';
|
|
32
31
|
import NativePerformanceObserver from './specs/NativePerformanceObserver';
|
|
33
32
|
import {PerformanceMark, PerformanceMeasure} from './UserTiming';
|
|
33
|
+
import {warnNoNativePerformance} from './Utilities';
|
|
34
34
|
|
|
35
35
|
declare var global: {
|
|
36
36
|
// This value is defined directly via JSI, if available.
|
|
@@ -40,24 +40,6 @@ declare var global: {
|
|
|
40
40
|
const getCurrentTimeStamp: () => DOMHighResTimeStamp =
|
|
41
41
|
NativePerformance?.now ?? global.nativePerformanceNow ?? (() => Date.now());
|
|
42
42
|
|
|
43
|
-
// We want some of the performance entry types to be always logged,
|
|
44
|
-
// even if they are not currently observed - this is either to be able to
|
|
45
|
-
// retrieve them at any time via Performance.getEntries* or to refer by other entries
|
|
46
|
-
// (such as when measures may refer to marks, even if the latter are not observed)
|
|
47
|
-
if (NativePerformanceObserver?.setIsBuffered) {
|
|
48
|
-
NativePerformanceObserver?.setIsBuffered(
|
|
49
|
-
ALWAYS_LOGGED_ENTRY_TYPES.map(performanceEntryTypeToRaw),
|
|
50
|
-
true,
|
|
51
|
-
);
|
|
52
|
-
}
|
|
53
|
-
|
|
54
|
-
function warnNoNativePerformance() {
|
|
55
|
-
warnOnce(
|
|
56
|
-
'missing-native-performance',
|
|
57
|
-
'Missing native implementation of Performance',
|
|
58
|
-
);
|
|
59
|
-
}
|
|
60
|
-
|
|
61
43
|
export type PerformanceMeasureOptions = {
|
|
62
44
|
detail?: DetailType,
|
|
63
45
|
start?: DOMHighResTimeStamp,
|
|
@@ -145,7 +127,7 @@ export default class Performance {
|
|
|
145
127
|
return;
|
|
146
128
|
}
|
|
147
129
|
|
|
148
|
-
NativePerformanceObserver
|
|
130
|
+
NativePerformanceObserver.clearEntries(
|
|
149
131
|
RawPerformanceEntryTypeValues.MARK,
|
|
150
132
|
markName,
|
|
151
133
|
);
|