react-native 0.87.0-rc.0 → 0.87.0-rc.1
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/Libraries/Core/InitializeCore.js +1 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js +5 -116
- package/Libraries/ReactPrivate/ReactNativePrivateInterface.js.flow +5 -31
- package/React/Base/RCTVersion.m +1 -1
- package/ReactAndroid/gradle.properties +1 -1
- package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
- package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
- package/index.js +15 -3
- package/index.js.flow +0 -2
- package/package.json +24 -28
- package/src/asset-registry.js +1 -1
- package/src/react-private-interface.js +145 -0
- package/src/react-private-interface.js.flow +48 -0
- package/src/setup-env.js +22 -0
- package/src/unstable-internals-do-not-use.d.ts +214 -0
- package/src/unstable-internals-do-not-use.js +76 -0
- package/types_generated/Libraries/ReactPrivate/ReactNativePrivateInterface.d.ts +6 -21
- package/types_generated/index.d.ts +1 -2
- package/types_generated/src/private/renderer/events/dispatchNativeEvent.d.ts +26 -0
- package/types_generated/src/react-private-interface.d.ts +33 -0
- package/jest-preset.js +0 -26
- package/rn-get-polyfills.js +0 -13
- package/types/tsconfig.json +0 -17
- package/types_generated/Libraries/Components/Touchable/Touchable.d.ts +0 -261
- package/types_generated/tsconfig.test.json +0 -17
|
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
|
|
|
29
29
|
static major: number = 0;
|
|
30
30
|
static minor: number = 87;
|
|
31
31
|
static patch: number = 0;
|
|
32
|
-
static prerelease: string | null = 'rc.
|
|
32
|
+
static prerelease: string | null = 'rc.1';
|
|
33
33
|
|
|
34
34
|
static getVersionString(): string {
|
|
35
35
|
return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
|
|
@@ -8,124 +8,13 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import typeof
|
|
12
|
-
import typeof CustomEvent from '../../src/private/webapis/dom/events/CustomEvent';
|
|
13
|
-
import typeof BatchedBridge from '../BatchedBridge/BatchedBridge';
|
|
14
|
-
import typeof legacySendAccessibilityEvent from '../Components/AccessibilityInfo/legacySendAccessibilityEvent';
|
|
15
|
-
import typeof TextInputState from '../Components/TextInput/TextInputState';
|
|
16
|
-
import typeof ExceptionsManager from '../Core/ExceptionsManager';
|
|
17
|
-
import typeof RawEventEmitter from '../Core/RawEventEmitter';
|
|
18
|
-
import typeof ReactFiberErrorDialog from '../Core/ReactFiberErrorDialog';
|
|
19
|
-
import typeof RCTEventEmitter from '../EventEmitter/RCTEventEmitter';
|
|
20
|
-
import typeof {
|
|
21
|
-
createPublicInstance,
|
|
22
|
-
createPublicRootInstance,
|
|
23
|
-
createPublicTextInstance,
|
|
24
|
-
getInternalInstanceHandleFromPublicInstance,
|
|
25
|
-
getNativeTagFromPublicInstance,
|
|
26
|
-
getNodeFromPublicInstance,
|
|
27
|
-
} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
|
|
28
|
-
import typeof {
|
|
29
|
-
create as createAttributePayload,
|
|
30
|
-
diff as diffAttributePayloads,
|
|
31
|
-
} from '../ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload';
|
|
32
|
-
import typeof UIManager from '../ReactNative/UIManager';
|
|
33
|
-
import typeof * as ReactNativeViewConfigRegistry from '../Renderer/shims/ReactNativeViewConfigRegistry';
|
|
34
|
-
import typeof flattenStyle from '../StyleSheet/flattenStyle';
|
|
35
|
-
import type {DangerouslyImpreciseStyleProp} from '../StyleSheet/StyleSheet';
|
|
36
|
-
import typeof deepFreezeAndThrowOnMutationInDev from '../Utilities/deepFreezeAndThrowOnMutationInDev';
|
|
37
|
-
import typeof deepDiffer from '../Utilities/differ/deepDiffer';
|
|
38
|
-
import typeof Platform from '../Utilities/Platform';
|
|
11
|
+
import typeof {createPublicTextInstance} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
|
|
39
12
|
|
|
40
13
|
export type {PublicRootInstance} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
|
|
41
14
|
export type PublicTextInstance = ReturnType<createPublicTextInstance>;
|
|
42
15
|
|
|
43
|
-
|
|
16
|
+
/**
|
|
17
|
+
* @deprecated Since 0.88. Use 'react-native/react-private-interface' instead.
|
|
18
|
+
*/
|
|
44
19
|
// eslint-disable-next-line @react-native/monorepo/no-commonjs-exports
|
|
45
|
-
module.exports =
|
|
46
|
-
get BatchedBridge(): BatchedBridge {
|
|
47
|
-
return require('../BatchedBridge/BatchedBridge').default;
|
|
48
|
-
},
|
|
49
|
-
get ExceptionsManager(): ExceptionsManager {
|
|
50
|
-
return require('../Core/ExceptionsManager').default;
|
|
51
|
-
},
|
|
52
|
-
get Platform(): Platform {
|
|
53
|
-
return require('../Utilities/Platform').default;
|
|
54
|
-
},
|
|
55
|
-
get RCTEventEmitter(): RCTEventEmitter {
|
|
56
|
-
return require('../EventEmitter/RCTEventEmitter').default;
|
|
57
|
-
},
|
|
58
|
-
get ReactNativeViewConfigRegistry(): ReactNativeViewConfigRegistry {
|
|
59
|
-
return require('../Renderer/shims/ReactNativeViewConfigRegistry');
|
|
60
|
-
},
|
|
61
|
-
get TextInputState(): TextInputState {
|
|
62
|
-
return require('../Components/TextInput/TextInputState').default;
|
|
63
|
-
},
|
|
64
|
-
get UIManager(): UIManager {
|
|
65
|
-
return require('../ReactNative/UIManager').default;
|
|
66
|
-
},
|
|
67
|
-
// TODO: Remove when React has migrated to `createAttributePayload` and `diffAttributePayloads`
|
|
68
|
-
get deepDiffer(): deepDiffer {
|
|
69
|
-
return require('../Utilities/differ/deepDiffer').default;
|
|
70
|
-
},
|
|
71
|
-
get deepFreezeAndThrowOnMutationInDev(): deepFreezeAndThrowOnMutationInDev<
|
|
72
|
-
{...} | Array<unknown>,
|
|
73
|
-
> {
|
|
74
|
-
return require('../Utilities/deepFreezeAndThrowOnMutationInDev').default;
|
|
75
|
-
},
|
|
76
|
-
// TODO: Remove when React has migrated to `createAttributePayload` and `diffAttributePayloads`
|
|
77
|
-
get flattenStyle(): flattenStyle<DangerouslyImpreciseStyleProp> {
|
|
78
|
-
// $FlowFixMe[underconstrained-implicit-instantiation]
|
|
79
|
-
// $FlowFixMe[incompatible-type]
|
|
80
|
-
return require('../StyleSheet/flattenStyle').default;
|
|
81
|
-
},
|
|
82
|
-
get ReactFiberErrorDialog(): ReactFiberErrorDialog {
|
|
83
|
-
return require('../Core/ReactFiberErrorDialog').default;
|
|
84
|
-
},
|
|
85
|
-
get legacySendAccessibilityEvent(): legacySendAccessibilityEvent {
|
|
86
|
-
return require('../Components/AccessibilityInfo/legacySendAccessibilityEvent')
|
|
87
|
-
.default;
|
|
88
|
-
},
|
|
89
|
-
get RawEventEmitter(): RawEventEmitter {
|
|
90
|
-
return require('../Core/RawEventEmitter').default;
|
|
91
|
-
},
|
|
92
|
-
get CustomEvent(): CustomEvent {
|
|
93
|
-
return require('../../src/private/webapis/dom/events/CustomEvent').default;
|
|
94
|
-
},
|
|
95
|
-
get createAttributePayload(): createAttributePayload {
|
|
96
|
-
return require('../ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload')
|
|
97
|
-
.create;
|
|
98
|
-
},
|
|
99
|
-
get diffAttributePayloads(): diffAttributePayloads {
|
|
100
|
-
return require('../ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload')
|
|
101
|
-
.diff;
|
|
102
|
-
},
|
|
103
|
-
get createPublicRootInstance(): createPublicRootInstance {
|
|
104
|
-
return require('../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
|
|
105
|
-
.createPublicRootInstance;
|
|
106
|
-
},
|
|
107
|
-
get createPublicInstance(): createPublicInstance {
|
|
108
|
-
return require('../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
|
|
109
|
-
.createPublicInstance;
|
|
110
|
-
},
|
|
111
|
-
get createPublicTextInstance(): createPublicTextInstance {
|
|
112
|
-
return require('../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
|
|
113
|
-
.createPublicTextInstance;
|
|
114
|
-
},
|
|
115
|
-
get getNativeTagFromPublicInstance(): getNativeTagFromPublicInstance {
|
|
116
|
-
return require('../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
|
|
117
|
-
.getNativeTagFromPublicInstance;
|
|
118
|
-
},
|
|
119
|
-
get getNodeFromPublicInstance(): getNodeFromPublicInstance {
|
|
120
|
-
return require('../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
|
|
121
|
-
.getNodeFromPublicInstance;
|
|
122
|
-
},
|
|
123
|
-
get getInternalInstanceHandleFromPublicInstance(): getInternalInstanceHandleFromPublicInstance {
|
|
124
|
-
return require('../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
|
|
125
|
-
.getInternalInstanceHandleFromPublicInstance;
|
|
126
|
-
},
|
|
127
|
-
get dispatchNativeEvent(): dispatchNativeEvent {
|
|
128
|
-
return require('../../src/private/renderer/events/dispatchNativeEvent')
|
|
129
|
-
.default;
|
|
130
|
-
},
|
|
131
|
-
};
|
|
20
|
+
module.exports = require('../../src/react-private-interface');
|
|
@@ -8,34 +8,8 @@
|
|
|
8
8
|
* @format
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
export type
|
|
15
|
-
|
|
16
|
-
export {default as BatchedBridge} from '../BatchedBridge/BatchedBridge';
|
|
17
|
-
export {default as ExceptionsManager} from '../Core/ExceptionsManager';
|
|
18
|
-
export {default as Platform} from '../Utilities/Platform';
|
|
19
|
-
export {default as RCTEventEmitter} from '../EventEmitter/RCTEventEmitter';
|
|
20
|
-
export * as ReactNativeViewConfigRegistry from '../Renderer/shims/ReactNativeViewConfigRegistry';
|
|
21
|
-
export {default as TextInputState} from '../Components/TextInput/TextInputState';
|
|
22
|
-
export {default as UIManager} from '../ReactNative/UIManager';
|
|
23
|
-
export {default as deepDiffer} from '../Utilities/differ/deepDiffer';
|
|
24
|
-
export {default as deepFreezeAndThrowOnMutationInDev} from '../Utilities/deepFreezeAndThrowOnMutationInDev';
|
|
25
|
-
export {default as flattenStyle} from '../StyleSheet/flattenStyle';
|
|
26
|
-
export {default as ReactFiberErrorDialog} from '../Core/ReactFiberErrorDialog';
|
|
27
|
-
export {default as legacySendAccessibilityEvent} from '../Components/AccessibilityInfo/legacySendAccessibilityEvent';
|
|
28
|
-
export {default as RawEventEmitter} from '../Core/RawEventEmitter';
|
|
29
|
-
export {default as CustomEvent} from '../../src/private/webapis/dom/events/CustomEvent';
|
|
30
|
-
export {
|
|
31
|
-
create as createAttributePayload,
|
|
32
|
-
diff as diffAttributePayloads,
|
|
33
|
-
} from '../ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload';
|
|
34
|
-
export {
|
|
35
|
-
createPublicRootInstance,
|
|
36
|
-
createPublicInstance,
|
|
37
|
-
createPublicTextInstance,
|
|
38
|
-
getNativeTagFromPublicInstance,
|
|
39
|
-
getNodeFromPublicInstance,
|
|
40
|
-
getInternalInstanceHandleFromPublicInstance,
|
|
41
|
-
} from '../ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
|
|
11
|
+
/**
|
|
12
|
+
* @deprecated Since 0.88. Use 'react-native/react-private-interface' instead.
|
|
13
|
+
*/
|
|
14
|
+
export type * from '../../src/react-private-interface';
|
|
15
|
+
export * from '../../src/react-private-interface';
|
package/React/Base/RCTVersion.m
CHANGED
package/index.js
CHANGED
|
@@ -149,9 +149,6 @@ module.exports = {
|
|
|
149
149
|
get TextInput() {
|
|
150
150
|
return require('./Libraries/Components/TextInput/TextInput').default;
|
|
151
151
|
},
|
|
152
|
-
get Touchable() {
|
|
153
|
-
return require('./Libraries/Components/Touchable/Touchable').default;
|
|
154
|
-
},
|
|
155
152
|
get TouchableHighlight() {
|
|
156
153
|
return require('./Libraries/Components/Touchable/TouchableHighlight')
|
|
157
154
|
.default;
|
|
@@ -412,6 +409,21 @@ module.exports = {
|
|
|
412
409
|
// #endregion
|
|
413
410
|
} as ReactNativePublicAPI;
|
|
414
411
|
|
|
412
|
+
// `Touchable` has been removed from the public API types, but remains
|
|
413
|
+
// re-exported at runtime here because of a hanging `react-native-svg` call
|
|
414
|
+
// site (fbsource).
|
|
415
|
+
// TODO(huntie): Remove this re-export once `react-native-svg` is updated.
|
|
416
|
+
/* $FlowFixMe[prop-missing] This is intentional: `Touchable` is a value-only
|
|
417
|
+
* re-export that is absent from the public API types. */
|
|
418
|
+
/* $FlowFixMe[invalid-export] This is intentional: `Touchable` is a value-only
|
|
419
|
+
* re-export that is absent from the public API types. */
|
|
420
|
+
Object.defineProperty(module.exports, 'Touchable', {
|
|
421
|
+
configurable: true,
|
|
422
|
+
get() {
|
|
423
|
+
return require('./Libraries/Components/Touchable/Touchable').default;
|
|
424
|
+
},
|
|
425
|
+
});
|
|
426
|
+
|
|
415
427
|
if (__DEV__) {
|
|
416
428
|
/* $FlowFixMe[prop-missing] This is intentional: Flow will error when
|
|
417
429
|
* attempting to access InteractionManager. */
|
package/index.js.flow
CHANGED
|
@@ -175,8 +175,6 @@ export type {
|
|
|
175
175
|
} from './Libraries/Components/TextInput/TextInput';
|
|
176
176
|
export {default as TextInput} from './Libraries/Components/TextInput/TextInput';
|
|
177
177
|
|
|
178
|
-
export {default as Touchable} from './Libraries/Components/Touchable/Touchable';
|
|
179
|
-
|
|
180
178
|
export type {
|
|
181
179
|
TouchableHighlightInstance,
|
|
182
180
|
TouchableHighlightProps,
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "react-native",
|
|
3
|
-
"version": "0.87.0-rc.
|
|
3
|
+
"version": "0.87.0-rc.1",
|
|
4
4
|
"description": "A framework for building native apps using React",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"repository": {
|
|
@@ -27,33 +27,36 @@
|
|
|
27
27
|
"react-native": "cli.js"
|
|
28
28
|
},
|
|
29
29
|
"main": "./index.js",
|
|
30
|
-
"types": "types",
|
|
31
30
|
"exports": {
|
|
32
31
|
".": {
|
|
33
|
-
"react-native-
|
|
34
|
-
"types": "./
|
|
32
|
+
"react-native-legacy-deep-imports": "./types/index.d.ts",
|
|
33
|
+
"types": "./types_generated/index.d.ts",
|
|
35
34
|
"default": "./index.js"
|
|
36
35
|
},
|
|
37
36
|
"./Libraries/*": {
|
|
38
|
-
"react-native-
|
|
39
|
-
"types":
|
|
37
|
+
"react-native-legacy-deep-imports": "./Libraries/*.d.ts",
|
|
38
|
+
"types": null,
|
|
40
39
|
"default": "./Libraries/*.js"
|
|
41
40
|
},
|
|
42
41
|
"./Libraries/*.js": {
|
|
43
|
-
"
|
|
42
|
+
"types": null,
|
|
44
43
|
"default": "./Libraries/*.js"
|
|
45
44
|
},
|
|
46
45
|
"./scripts/*": "./scripts/*",
|
|
47
|
-
"./src/*": {
|
|
48
|
-
"types": null,
|
|
49
|
-
"default": "./src/*.js"
|
|
50
|
-
},
|
|
51
46
|
"./asset-registry": {
|
|
52
47
|
"types": null,
|
|
53
48
|
"default": "./src/asset-registry.js"
|
|
54
49
|
},
|
|
55
|
-
"./
|
|
56
|
-
|
|
50
|
+
"./react-private-interface": {
|
|
51
|
+
"types": null,
|
|
52
|
+
"default": "./src/react-private-interface.js"
|
|
53
|
+
},
|
|
54
|
+
"./setup-env": "./src/setup-env.js",
|
|
55
|
+
"./unstable-internals-do-not-use": {
|
|
56
|
+
"react-native-unstable-internals": "./src/unstable-internals-do-not-use.d.ts",
|
|
57
|
+
"types": null,
|
|
58
|
+
"default": "./src/unstable-internals-do-not-use.js"
|
|
59
|
+
},
|
|
57
60
|
"./src/fb_internal/*": "./src/fb_internal/*",
|
|
58
61
|
"./package.json": "./package.json"
|
|
59
62
|
},
|
|
@@ -69,7 +72,6 @@
|
|
|
69
72
|
"gradle/libs.versions.toml",
|
|
70
73
|
"index.js",
|
|
71
74
|
"index.js.flow",
|
|
72
|
-
"jest-preset.js",
|
|
73
75
|
"Libraries",
|
|
74
76
|
"LICENSE",
|
|
75
77
|
"React-Core.podspec",
|
|
@@ -90,7 +92,6 @@
|
|
|
90
92
|
"ReactApple",
|
|
91
93
|
"ReactCommon",
|
|
92
94
|
"README.md",
|
|
93
|
-
"rn-get-polyfills.js",
|
|
94
95
|
"scripts/replace-rncore-version.js",
|
|
95
96
|
"scripts/bundle.js",
|
|
96
97
|
"scripts/cocoapods",
|
|
@@ -136,26 +137,21 @@
|
|
|
136
137
|
"featureflags": "node ./scripts/featureflags/index.js"
|
|
137
138
|
},
|
|
138
139
|
"peerDependencies": {
|
|
139
|
-
"@react-native/jest-preset": "0.87.0-rc.0",
|
|
140
140
|
"@types/react": "^19.1.1",
|
|
141
141
|
"react": "^19.2.3"
|
|
142
142
|
},
|
|
143
143
|
"peerDependenciesMeta": {
|
|
144
144
|
"@types/react": {
|
|
145
145
|
"optional": true
|
|
146
|
-
},
|
|
147
|
-
"@react-native/jest-preset": {
|
|
148
|
-
"optional": true
|
|
149
146
|
}
|
|
150
147
|
},
|
|
151
148
|
"dependencies": {
|
|
152
|
-
"@react-native/asset-utils": "0.87.0-rc.
|
|
153
|
-
"@react-native/codegen": "0.87.0-rc.
|
|
154
|
-
"@react-native/community-cli-plugin": "0.87.0-rc.
|
|
155
|
-
"@react-native/gradle-plugin": "0.87.0-rc.
|
|
156
|
-
"@react-native/
|
|
157
|
-
"@react-native/
|
|
158
|
-
"@react-native/virtualized-lists": "0.87.0-rc.0",
|
|
149
|
+
"@react-native/asset-utils": "0.87.0-rc.1",
|
|
150
|
+
"@react-native/codegen": "0.87.0-rc.1",
|
|
151
|
+
"@react-native/community-cli-plugin": "0.87.0-rc.1",
|
|
152
|
+
"@react-native/gradle-plugin": "0.87.0-rc.1",
|
|
153
|
+
"@react-native/normalize-colors": "0.87.0-rc.1",
|
|
154
|
+
"@react-native/virtualized-lists": "0.87.0-rc.1",
|
|
159
155
|
"anser": "^1.4.9",
|
|
160
156
|
"ansi-regex": "^5.0.0",
|
|
161
157
|
"babel-plugin-syntax-hermes-parser": "0.36.1",
|
|
@@ -165,8 +161,8 @@
|
|
|
165
161
|
"hermes-compiler": "250829098.0.15",
|
|
166
162
|
"invariant": "^2.2.4",
|
|
167
163
|
"memoize-one": "^5.0.0",
|
|
168
|
-
"metro-runtime": "^0.
|
|
169
|
-
"metro-source-map": "^0.
|
|
164
|
+
"metro-runtime": "^0.87.0",
|
|
165
|
+
"metro-source-map": "^0.87.0",
|
|
170
166
|
"nullthrows": "^1.1.1",
|
|
171
167
|
"pretty-format": "^29.7.0",
|
|
172
168
|
"promise": "^8.3.0",
|
package/src/asset-registry.js
CHANGED
|
@@ -11,7 +11,7 @@
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
13
|
// ----------------------------------------------------------------------------
|
|
14
|
-
//
|
|
14
|
+
// react-native/asset-registry
|
|
15
15
|
//
|
|
16
16
|
// This is an untyped secondary entry point intended to be referenced from
|
|
17
17
|
// Metro's `transformer.assetRegistryPath` config option. This entry point may
|
|
@@ -0,0 +1,145 @@
|
|
|
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
|
+
'use strict';
|
|
12
|
+
|
|
13
|
+
// ----------------------------------------------------------------------------
|
|
14
|
+
// react-native/react-private-interface
|
|
15
|
+
//
|
|
16
|
+
// This is a private entry point allowing React to require React Native
|
|
17
|
+
// internals (previously, Libaries/ReactNativePrivateInterface.js).
|
|
18
|
+
//
|
|
19
|
+
// These APIs should ONLY be used by first party React internals and are not
|
|
20
|
+
// part of our public API.
|
|
21
|
+
//
|
|
22
|
+
// IMPORTANT: Keep this file in sync with react-private-interface.js.flow.
|
|
23
|
+
// ----------------------------------------------------------------------------
|
|
24
|
+
|
|
25
|
+
import typeof BatchedBridge from '../Libraries/BatchedBridge/BatchedBridge';
|
|
26
|
+
import typeof legacySendAccessibilityEvent from '../Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent';
|
|
27
|
+
import typeof TextInputState from '../Libraries/Components/TextInput/TextInputState';
|
|
28
|
+
import typeof ExceptionsManager from '../Libraries/Core/ExceptionsManager';
|
|
29
|
+
import typeof RawEventEmitter from '../Libraries/Core/RawEventEmitter';
|
|
30
|
+
import typeof ReactFiberErrorDialog from '../Libraries/Core/ReactFiberErrorDialog';
|
|
31
|
+
import typeof RCTEventEmitter from '../Libraries/EventEmitter/RCTEventEmitter';
|
|
32
|
+
import typeof {
|
|
33
|
+
createPublicInstance,
|
|
34
|
+
createPublicRootInstance,
|
|
35
|
+
createPublicTextInstance,
|
|
36
|
+
getInternalInstanceHandleFromPublicInstance,
|
|
37
|
+
getNativeTagFromPublicInstance,
|
|
38
|
+
getNodeFromPublicInstance,
|
|
39
|
+
} from '../Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
|
|
40
|
+
import typeof {
|
|
41
|
+
create as createAttributePayload,
|
|
42
|
+
diff as diffAttributePayloads,
|
|
43
|
+
} from '../Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload';
|
|
44
|
+
import typeof UIManager from '../Libraries/ReactNative/UIManager';
|
|
45
|
+
import typeof * as ReactNativeViewConfigRegistry from '../Libraries/Renderer/shims/ReactNativeViewConfigRegistry';
|
|
46
|
+
import typeof flattenStyle from '../Libraries/StyleSheet/flattenStyle';
|
|
47
|
+
import type {DangerouslyImpreciseStyleProp} from '../Libraries/StyleSheet/StyleSheet';
|
|
48
|
+
import typeof deepFreezeAndThrowOnMutationInDev from '../Libraries/Utilities/deepFreezeAndThrowOnMutationInDev';
|
|
49
|
+
import typeof deepDiffer from '../Libraries/Utilities/differ/deepDiffer';
|
|
50
|
+
import typeof Platform from '../Libraries/Utilities/Platform';
|
|
51
|
+
import typeof dispatchNativeEvent from './private/renderer/events/dispatchNativeEvent';
|
|
52
|
+
import typeof CustomEvent from './private/webapis/dom/events/CustomEvent';
|
|
53
|
+
|
|
54
|
+
export type {PublicRootInstance} from '../Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
|
|
55
|
+
export type PublicTextInstance = ReturnType<createPublicTextInstance>;
|
|
56
|
+
|
|
57
|
+
// flowlint unsafe-getters-setters:off
|
|
58
|
+
// eslint-disable-next-line @react-native/monorepo/no-commonjs-exports
|
|
59
|
+
module.exports = {
|
|
60
|
+
get BatchedBridge(): BatchedBridge {
|
|
61
|
+
return require('../Libraries/BatchedBridge/BatchedBridge').default;
|
|
62
|
+
},
|
|
63
|
+
get ExceptionsManager(): ExceptionsManager {
|
|
64
|
+
return require('../Libraries/Core/ExceptionsManager').default;
|
|
65
|
+
},
|
|
66
|
+
get Platform(): Platform {
|
|
67
|
+
return require('../Libraries/Utilities/Platform').default;
|
|
68
|
+
},
|
|
69
|
+
get RCTEventEmitter(): RCTEventEmitter {
|
|
70
|
+
return require('../Libraries/EventEmitter/RCTEventEmitter').default;
|
|
71
|
+
},
|
|
72
|
+
get ReactNativeViewConfigRegistry(): ReactNativeViewConfigRegistry {
|
|
73
|
+
return require('../Libraries/Renderer/shims/ReactNativeViewConfigRegistry');
|
|
74
|
+
},
|
|
75
|
+
get TextInputState(): TextInputState {
|
|
76
|
+
return require('../Libraries/Components/TextInput/TextInputState').default;
|
|
77
|
+
},
|
|
78
|
+
get UIManager(): UIManager {
|
|
79
|
+
return require('../Libraries/ReactNative/UIManager').default;
|
|
80
|
+
},
|
|
81
|
+
// TODO: Remove when React has migrated to `createAttributePayload` and `diffAttributePayloads`
|
|
82
|
+
get deepDiffer(): deepDiffer {
|
|
83
|
+
return require('../Libraries/Utilities/differ/deepDiffer').default;
|
|
84
|
+
},
|
|
85
|
+
get deepFreezeAndThrowOnMutationInDev(): deepFreezeAndThrowOnMutationInDev<
|
|
86
|
+
{...} | Array<unknown>,
|
|
87
|
+
> {
|
|
88
|
+
return require('../Libraries/Utilities/deepFreezeAndThrowOnMutationInDev')
|
|
89
|
+
.default;
|
|
90
|
+
},
|
|
91
|
+
// TODO: Remove when React has migrated to `createAttributePayload` and `diffAttributePayloads`
|
|
92
|
+
get flattenStyle(): flattenStyle<DangerouslyImpreciseStyleProp> {
|
|
93
|
+
// $FlowFixMe[underconstrained-implicit-instantiation]
|
|
94
|
+
// $FlowFixMe[incompatible-type]
|
|
95
|
+
return require('../Libraries/StyleSheet/flattenStyle').default;
|
|
96
|
+
},
|
|
97
|
+
get ReactFiberErrorDialog(): ReactFiberErrorDialog {
|
|
98
|
+
return require('../Libraries/Core/ReactFiberErrorDialog').default;
|
|
99
|
+
},
|
|
100
|
+
get legacySendAccessibilityEvent(): legacySendAccessibilityEvent {
|
|
101
|
+
return require('../Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent')
|
|
102
|
+
.default;
|
|
103
|
+
},
|
|
104
|
+
get RawEventEmitter(): RawEventEmitter {
|
|
105
|
+
return require('../Libraries/Core/RawEventEmitter').default;
|
|
106
|
+
},
|
|
107
|
+
get CustomEvent(): CustomEvent {
|
|
108
|
+
return require('./private/webapis/dom/events/CustomEvent').default;
|
|
109
|
+
},
|
|
110
|
+
get createAttributePayload(): createAttributePayload {
|
|
111
|
+
return require('../Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload')
|
|
112
|
+
.create;
|
|
113
|
+
},
|
|
114
|
+
get diffAttributePayloads(): diffAttributePayloads {
|
|
115
|
+
return require('../Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload')
|
|
116
|
+
.diff;
|
|
117
|
+
},
|
|
118
|
+
get createPublicRootInstance(): createPublicRootInstance {
|
|
119
|
+
return require('../Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
|
|
120
|
+
.createPublicRootInstance;
|
|
121
|
+
},
|
|
122
|
+
get createPublicInstance(): createPublicInstance {
|
|
123
|
+
return require('../Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
|
|
124
|
+
.createPublicInstance;
|
|
125
|
+
},
|
|
126
|
+
get createPublicTextInstance(): createPublicTextInstance {
|
|
127
|
+
return require('../Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
|
|
128
|
+
.createPublicTextInstance;
|
|
129
|
+
},
|
|
130
|
+
get getNativeTagFromPublicInstance(): getNativeTagFromPublicInstance {
|
|
131
|
+
return require('../Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
|
|
132
|
+
.getNativeTagFromPublicInstance;
|
|
133
|
+
},
|
|
134
|
+
get getNodeFromPublicInstance(): getNodeFromPublicInstance {
|
|
135
|
+
return require('../Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
|
|
136
|
+
.getNodeFromPublicInstance;
|
|
137
|
+
},
|
|
138
|
+
get getInternalInstanceHandleFromPublicInstance(): getInternalInstanceHandleFromPublicInstance {
|
|
139
|
+
return require('../Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance')
|
|
140
|
+
.getInternalInstanceHandleFromPublicInstance;
|
|
141
|
+
},
|
|
142
|
+
get dispatchNativeEvent(): dispatchNativeEvent {
|
|
143
|
+
return require('./private/renderer/events/dispatchNativeEvent').default;
|
|
144
|
+
},
|
|
145
|
+
};
|
|
@@ -0,0 +1,48 @@
|
|
|
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
|
+
// ----------------------------------------------------------------------------
|
|
12
|
+
// Types entry point for react-native/react-private-interface
|
|
13
|
+
//
|
|
14
|
+
// IMPORTANT: Keep this file in sync with react-private-interface.js.
|
|
15
|
+
// ----------------------------------------------------------------------------
|
|
16
|
+
|
|
17
|
+
import typeof {createPublicTextInstance as createPublicTextInstanceT} from '../Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
|
|
18
|
+
|
|
19
|
+
export type {PublicRootInstance} from '../Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
|
|
20
|
+
export type PublicTextInstance = ReturnType<createPublicTextInstanceT>;
|
|
21
|
+
|
|
22
|
+
export {default as BatchedBridge} from '../Libraries/BatchedBridge/BatchedBridge';
|
|
23
|
+
export {default as ExceptionsManager} from '../Libraries/Core/ExceptionsManager';
|
|
24
|
+
export {default as Platform} from '../Libraries/Utilities/Platform';
|
|
25
|
+
export {default as RCTEventEmitter} from '../Libraries/EventEmitter/RCTEventEmitter';
|
|
26
|
+
export * as ReactNativeViewConfigRegistry from '../Libraries/Renderer/shims/ReactNativeViewConfigRegistry';
|
|
27
|
+
export {default as TextInputState} from '../Libraries/Components/TextInput/TextInputState';
|
|
28
|
+
export {default as UIManager} from '../Libraries/ReactNative/UIManager';
|
|
29
|
+
export {default as deepDiffer} from '../Libraries/Utilities/differ/deepDiffer';
|
|
30
|
+
export {default as deepFreezeAndThrowOnMutationInDev} from '../Libraries/Utilities/deepFreezeAndThrowOnMutationInDev';
|
|
31
|
+
export {default as flattenStyle} from '../Libraries/StyleSheet/flattenStyle';
|
|
32
|
+
export {default as ReactFiberErrorDialog} from '../Libraries/Core/ReactFiberErrorDialog';
|
|
33
|
+
export {default as legacySendAccessibilityEvent} from '../Libraries/Components/AccessibilityInfo/legacySendAccessibilityEvent';
|
|
34
|
+
export {default as RawEventEmitter} from '../Libraries/Core/RawEventEmitter';
|
|
35
|
+
export {default as CustomEvent} from './private/webapis/dom/events/CustomEvent';
|
|
36
|
+
export {
|
|
37
|
+
create as createAttributePayload,
|
|
38
|
+
diff as diffAttributePayloads,
|
|
39
|
+
} from '../Libraries/ReactNative/ReactFabricPublicInstance/ReactNativeAttributePayload';
|
|
40
|
+
export {
|
|
41
|
+
createPublicRootInstance,
|
|
42
|
+
createPublicInstance,
|
|
43
|
+
createPublicTextInstance,
|
|
44
|
+
getNativeTagFromPublicInstance,
|
|
45
|
+
getNodeFromPublicInstance,
|
|
46
|
+
getInternalInstanceHandleFromPublicInstance,
|
|
47
|
+
} from '../Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance';
|
|
48
|
+
export {default as dispatchNativeEvent} from './private/renderer/events/dispatchNativeEvent';
|
package/src/setup-env.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
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
|
+
'use strict';
|
|
12
|
+
'use client';
|
|
13
|
+
|
|
14
|
+
// ----------------------------------------------------------------------------
|
|
15
|
+
// react-native/setup-env
|
|
16
|
+
//
|
|
17
|
+
// Side-effectful module that sets up the core React Native JavaScript
|
|
18
|
+
// environment. This includes global timers (`setTimeout` etc), the global
|
|
19
|
+
// `console` object, and hooks for printing stack traces with source maps.
|
|
20
|
+
// ----------------------------------------------------------------------------
|
|
21
|
+
|
|
22
|
+
require('./private/setup/setUpDefaultReactNativeEnvironment').default();
|