@office-iss/react-native-win32 0.75.1 → 0.76.0-preview.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/.eslintrc.js +11 -0
- package/.flowconfig +5 -4
- package/CHANGELOG.json +172 -40
- package/CHANGELOG.md +57 -24
- package/Libraries/Alert/Alert.js +3 -0
- package/Libraries/Animated/AnimatedEvent.js +1 -1
- package/Libraries/Animated/AnimatedImplementation.js +7 -7
- package/Libraries/Animated/NativeAnimatedAllowlist.js +111 -0
- package/Libraries/Animated/animations/Animation.js +11 -1
- package/Libraries/Animated/animations/DecayAnimation.js +1 -1
- package/Libraries/Animated/animations/SpringAnimation.js +1 -1
- package/Libraries/Animated/animations/TimingAnimation.js +2 -1
- package/Libraries/Animated/components/AnimatedScrollView.js +3 -2
- package/Libraries/Animated/createAnimatedComponent.js +10 -9
- package/Libraries/Animated/nodes/AnimatedColor.js +1 -1
- package/Libraries/Animated/nodes/AnimatedInterpolation.js +3 -2
- package/Libraries/Animated/nodes/AnimatedNode.js +42 -33
- package/Libraries/Animated/nodes/AnimatedObject.js +56 -50
- package/Libraries/Animated/nodes/AnimatedProps.js +77 -40
- package/Libraries/Animated/nodes/AnimatedStyle.js +103 -59
- package/Libraries/Animated/nodes/AnimatedTracking.js +1 -1
- package/Libraries/Animated/nodes/AnimatedTransform.js +102 -67
- package/Libraries/Animated/nodes/AnimatedValue.js +2 -1
- package/Libraries/Animated/nodes/AnimatedWithChildren.js +21 -22
- package/Libraries/Animated/useAnimatedProps.js +142 -7
- package/Libraries/BatchedBridge/NativeModules.js +2 -0
- package/Libraries/Blob/FileReader.js +1 -1
- package/Libraries/Blob/URL.js +2 -62
- package/Libraries/Blob/URLSearchParams.js +71 -0
- package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
- package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
- package/Libraries/Components/ScrollView/ScrollView.js +131 -169
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +3 -1
- package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
- package/Libraries/Components/TextInput/TextInput.js +230 -94
- package/Libraries/Components/TextInput/TextInput.win32.js +230 -100
- package/Libraries/Components/View/ReactNativeStyleAttributes.js +22 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
- package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +2 -0
- package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
- package/Libraries/Components/View/ViewNativeComponent.js +0 -1
- package/Libraries/Components/View/ViewPropTypes.js +14 -0
- package/Libraries/Components/View/ViewPropTypes.win32.js +14 -0
- package/Libraries/Core/ExceptionsManager.js +2 -0
- package/Libraries/Core/InitializeCore.js +3 -1
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
- package/Libraries/Core/ReactNativeVersion.js +4 -4
- package/Libraries/Core/ReactNativeVersionCheck.win32.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +7 -1
- package/Libraries/Core/setUpGlobals.js +1 -0
- package/Libraries/Core/setUpReactRefresh.js +0 -4
- package/Libraries/Image/AssetSourceResolver.js +28 -1
- package/Libraries/Image/Image.android.js +9 -14
- package/Libraries/Image/Image.ios.js +11 -22
- package/Libraries/Image/Image.win32.js +11 -24
- package/Libraries/Image/ImageBackground.js +1 -8
- package/Libraries/Image/ImageUtils.js +9 -9
- package/Libraries/Image/ImageViewNativeComponent.js +1 -0
- package/Libraries/Inspector/Inspector.js +3 -2
- package/Libraries/Inspector/Inspector.win32.js +3 -2
- package/Libraries/Inspector/InspectorPanel.js +16 -10
- package/Libraries/Inspector/NetworkOverlay.js +1 -1
- package/Libraries/Interaction/TaskQueue.js +1 -0
- package/Libraries/Lists/FlatList.js +1 -1
- package/Libraries/Lists/SectionList.js +2 -2
- package/Libraries/Lists/SectionListModern.js +3 -3
- package/Libraries/LogBox/Data/LogBoxData.js +24 -3
- package/Libraries/LogBox/LogBoxNotificationContainer.js +3 -2
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.js +9 -8
- package/Libraries/LogBox/UI/LogBoxInspectorHeader.win32.js +9 -29
- package/Libraries/Modal/Modal.js +0 -1
- package/Libraries/NativeComponent/BaseViewConfig.android.js +8 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +7 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +7 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +22 -22
- package/Libraries/NativeComponent/StaticViewConfigValidator.js +0 -21
- package/Libraries/Network/XMLHttpRequest.js +4 -2
- package/Libraries/ReactNative/AppContainer-dev.js +1 -5
- package/Libraries/ReactNative/AppContainer-prod.js +1 -5
- package/Libraries/ReactNative/AppContainer.js +0 -1
- package/Libraries/ReactNative/AppRegistry.js +0 -6
- package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
- package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
- package/Libraries/ReactNative/RendererImplementation.js +26 -4
- package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -0
- package/Libraries/ReactNative/renderApplication.js +0 -2
- package/Libraries/Renderer/shims/ReactNativeTypes.js +11 -4
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.win32.js +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +74 -15
- package/Libraries/StyleSheet/StyleSheetTypes.js +60 -5
- package/Libraries/StyleSheet/processBackgroundImage.js +384 -0
- package/Libraries/StyleSheet/processBoxShadow.js +211 -0
- package/Libraries/StyleSheet/processFilter.js +231 -42
- package/Libraries/Text/Text.js +394 -196
- package/Libraries/Text/Text.win32.js +442 -229
- package/Libraries/Text/TextNativeComponent.js +2 -1
- package/Libraries/Text/TextNativeComponent.win32.js +1 -1
- package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
- package/Libraries/Types/CodegenTypes.js +3 -1
- package/Libraries/Utilities/Appearance.js +108 -84
- package/Libraries/Utilities/DevLoadingView.js +2 -4
- package/Libraries/Utilities/HMRClient.js +2 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/Utilities/createPerformanceLogger.js +0 -9
- package/Libraries/Utilities/stringifyViewConfig.js +22 -0
- package/Libraries/Utilities/useColorScheme.js +3 -3
- package/Libraries/WebSocket/WebSocket.js +1 -1
- package/Libraries/promiseRejectionTrackingOptions.js +1 -1
- package/Libraries/vendor/emitter/EventEmitter.js +6 -5
- package/flow/jest.js +2 -2
- package/index.js +3 -1
- package/index.win32.js +3 -1
- package/jest/mockComponent.js +4 -1
- package/jest/mockModal.js +1 -3
- package/jest/mockScrollView.js +1 -1
- package/jest/renderer.js +2 -2
- package/jest/setup.js +16 -13
- package/jest.config.js +1 -2
- package/overrides.json +22 -22
- package/package.json +27 -26
- package/src/private/animated/NativeAnimatedHelper.js +438 -0
- package/src/private/animated/NativeAnimatedHelper.win32.js +440 -0
- package/src/private/animated/NativeAnimatedValidation.js +64 -0
- package/src/private/components/HScrollViewNativeComponents.js +56 -0
- package/src/private/components/SafeAreaView_INTERNAL_DO_NOT_USE.js +27 -0
- package/src/private/components/VScrollViewNativeComponents.js +48 -0
- package/src/private/components/useSyncOnScroll.js +48 -0
- package/src/private/featureflags/ReactNativeFeatureFlags.js +166 -16
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +29 -5
- package/src/private/fusebox/FuseboxSessionObserver.js +42 -0
- package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +14 -4
- package/src/private/setup/setUpDOM.js +28 -0
- package/src/private/setup/setUpIntersectionObserver.js +27 -0
- package/src/private/setup/setUpMutationObserver.js +26 -0
- package/src/private/setup/setUpPerformanceObserver.js +64 -0
- package/src/private/specs/modules/NativeAppearance.js +3 -3
- package/src/private/specs/modules/NativeLinkingManager.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsWin.js +7 -0
- package/src/private/specs/modules/NativeSampleTurboModule.js +14 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +5 -3
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +14 -17
- package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +5 -3
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +24 -15
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
- package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
- package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
- package/src/private/webapis/performance/LongTasks.js +39 -0
- package/src/private/webapis/performance/Performance.js +22 -9
- package/src/private/webapis/performance/PerformanceEntry.js +36 -18
- package/src/private/webapis/performance/PerformanceObserver.js +29 -43
- package/src/private/webapis/performance/RawPerformanceEntry.js +24 -1
- package/src/private/webapis/performance/UserTiming.js +17 -12
- package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
- package/src-win/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
- package/types/experimental.d.ts +20 -1
- package/Libraries/Animated/NativeAnimatedHelper.js +0 -615
- package/Libraries/Animated/NativeAnimatedHelper.win32.js +0 -617
- package/Libraries/Core/setUpIntersectionObserver.js +0 -16
- package/Libraries/Core/setUpMutationObserver.js +0 -16
- package/Libraries/Core/setUpPerformanceObserver.js +0 -18
- package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
- package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
- package/Libraries/Utilities/verifyComponentAttributeEquivalence.js +0 -135
- package/src/private/core/setUpDOM.js +0 -18
- package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
- /package/src/private/{core → styles}/composeStyles.js +0 -0
|
@@ -166,9 +166,17 @@ const validAttributesForNonEventProps = {
|
|
|
166
166
|
backgroundColor: {process: require('../StyleSheet/processColor').default},
|
|
167
167
|
transform: true,
|
|
168
168
|
transformOrigin: true,
|
|
169
|
+
experimental_backgroundImage: {
|
|
170
|
+
process: require('../StyleSheet/processBackgroundImage').default,
|
|
171
|
+
},
|
|
172
|
+
experimental_boxShadow: {
|
|
173
|
+
process: require('../StyleSheet/processBoxShadow').default,
|
|
174
|
+
},
|
|
169
175
|
experimental_filter: {
|
|
170
176
|
process: require('../StyleSheet/processFilter').default,
|
|
171
177
|
},
|
|
178
|
+
experimental_mixBlendMode: true,
|
|
179
|
+
isolation: true,
|
|
172
180
|
opacity: true,
|
|
173
181
|
elevation: true,
|
|
174
182
|
shadowColor: {process: require('../StyleSheet/processColor').default},
|
|
@@ -193,6 +193,8 @@ const validAttributesForNonEventProps = {
|
|
|
193
193
|
accessibilityViewIsModal: true,
|
|
194
194
|
accessibilityElementsHidden: true,
|
|
195
195
|
accessibilityIgnoresInvertColors: true,
|
|
196
|
+
accessibilityShowsLargeContentViewer: true,
|
|
197
|
+
accessibilityLargeContentTitle: true,
|
|
196
198
|
testID: true,
|
|
197
199
|
backgroundColor: {process: require('../StyleSheet/processColor').default},
|
|
198
200
|
backfaceVisibility: true,
|
|
@@ -223,6 +225,11 @@ const validAttributesForNonEventProps = {
|
|
|
223
225
|
experimental_filter: {
|
|
224
226
|
process: require('../StyleSheet/processFilter').default,
|
|
225
227
|
},
|
|
228
|
+
experimental_boxShadow: {
|
|
229
|
+
process: require('../StyleSheet/processBoxShadow').default,
|
|
230
|
+
},
|
|
231
|
+
experimental_mixBlendMode: true,
|
|
232
|
+
isolation: true,
|
|
226
233
|
|
|
227
234
|
borderTopWidth: true,
|
|
228
235
|
borderTopColor: {process: require('../StyleSheet/processColor').default},
|
|
@@ -193,6 +193,8 @@ const validAttributesForNonEventProps = {
|
|
|
193
193
|
accessibilityViewIsModal: true,
|
|
194
194
|
accessibilityElementsHidden: true,
|
|
195
195
|
accessibilityIgnoresInvertColors: true,
|
|
196
|
+
accessibilityShowsLargeContentViewer: true,
|
|
197
|
+
accessibilityLargeContentTitle: true,
|
|
196
198
|
testID: true,
|
|
197
199
|
backgroundColor: {process: require('../StyleSheet/processColor').default},
|
|
198
200
|
backfaceVisibility: true,
|
|
@@ -223,6 +225,11 @@ const validAttributesForNonEventProps = {
|
|
|
223
225
|
experimental_filter: {
|
|
224
226
|
process: require('../StyleSheet/processFilter').default,
|
|
225
227
|
},
|
|
228
|
+
experimental_boxShadow: {
|
|
229
|
+
process: require('../StyleSheet/processBoxShadow').default,
|
|
230
|
+
},
|
|
231
|
+
experimental_mixBlendMode: true,
|
|
232
|
+
isolation: true,
|
|
226
233
|
|
|
227
234
|
borderTopWidth: true,
|
|
228
235
|
borderTopColor: {process: require('../StyleSheet/processColor').default},
|
|
@@ -11,12 +11,12 @@
|
|
|
11
11
|
import type {
|
|
12
12
|
HostComponent,
|
|
13
13
|
PartialViewConfig,
|
|
14
|
+
ViewConfig,
|
|
14
15
|
} from '../Renderer/shims/ReactNativeTypes';
|
|
15
16
|
|
|
16
17
|
import getNativeComponentAttributes from '../ReactNative/getNativeComponentAttributes';
|
|
17
18
|
import UIManager from '../ReactNative/UIManager';
|
|
18
19
|
import * as ReactNativeViewConfigRegistry from '../Renderer/shims/ReactNativeViewConfigRegistry';
|
|
19
|
-
import verifyComponentAttributeEquivalence from '../Utilities/verifyComponentAttributeEquivalence';
|
|
20
20
|
import * as StaticViewConfigValidator from './StaticViewConfigValidator';
|
|
21
21
|
import {createViewConfig} from './ViewConfig';
|
|
22
22
|
import invariant from 'invariant';
|
|
@@ -34,7 +34,6 @@ let getRuntimeConfig;
|
|
|
34
34
|
export function setRuntimeConfigProvider(
|
|
35
35
|
runtimeConfigProvider: (name: string) => ?{
|
|
36
36
|
native: boolean,
|
|
37
|
-
strict: boolean,
|
|
38
37
|
verify: boolean,
|
|
39
38
|
},
|
|
40
39
|
): void {
|
|
@@ -54,13 +53,12 @@ export function get<Config>(
|
|
|
54
53
|
viewConfigProvider: () => PartialViewConfig,
|
|
55
54
|
): HostComponent<Config> {
|
|
56
55
|
ReactNativeViewConfigRegistry.register(name, () => {
|
|
57
|
-
const {native,
|
|
56
|
+
const {native, verify} = getRuntimeConfig?.(name) ?? {
|
|
58
57
|
native: !global.RN$Bridgeless,
|
|
59
|
-
strict: false,
|
|
60
58
|
verify: false,
|
|
61
59
|
};
|
|
62
60
|
|
|
63
|
-
let viewConfig;
|
|
61
|
+
let viewConfig: ViewConfig;
|
|
64
62
|
if (native) {
|
|
65
63
|
viewConfig =
|
|
66
64
|
getNativeComponentAttributes(name) ??
|
|
@@ -81,27 +79,29 @@ export function get<Config>(
|
|
|
81
79
|
const nativeViewConfig = native
|
|
82
80
|
? viewConfig
|
|
83
81
|
: getNativeComponentAttributes(name);
|
|
84
|
-
|
|
82
|
+
|
|
83
|
+
if (nativeViewConfig == null) {
|
|
84
|
+
// Defer to static view config if native view config is missing.
|
|
85
|
+
return viewConfig;
|
|
86
|
+
}
|
|
87
|
+
|
|
88
|
+
const staticViewConfig: ViewConfig = native
|
|
85
89
|
? createViewConfig(viewConfigProvider())
|
|
86
90
|
: viewConfig;
|
|
87
91
|
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
|
|
91
|
-
|
|
92
|
-
|
|
92
|
+
const validationOutput = StaticViewConfigValidator.validate(
|
|
93
|
+
name,
|
|
94
|
+
nativeViewConfig,
|
|
95
|
+
staticViewConfig,
|
|
96
|
+
);
|
|
97
|
+
|
|
98
|
+
if (validationOutput.type === 'invalid') {
|
|
99
|
+
console.error(
|
|
100
|
+
StaticViewConfigValidator.stringifyValidationResult(
|
|
101
|
+
name,
|
|
102
|
+
validationOutput,
|
|
103
|
+
),
|
|
93
104
|
);
|
|
94
|
-
|
|
95
|
-
if (validationOutput.type === 'invalid') {
|
|
96
|
-
console.error(
|
|
97
|
-
StaticViewConfigValidator.stringifyValidationResult(
|
|
98
|
-
name,
|
|
99
|
-
validationOutput,
|
|
100
|
-
),
|
|
101
|
-
);
|
|
102
|
-
}
|
|
103
|
-
} else {
|
|
104
|
-
verifyComponentAttributeEquivalence(nativeViewConfig, staticViewConfig);
|
|
105
105
|
}
|
|
106
106
|
}
|
|
107
107
|
|
|
@@ -22,11 +22,6 @@ export type Difference =
|
|
|
22
22
|
path: Array<string>,
|
|
23
23
|
nativeValue: mixed,
|
|
24
24
|
staticValue: mixed,
|
|
25
|
-
}
|
|
26
|
-
| {
|
|
27
|
-
type: 'unexpected',
|
|
28
|
-
path: Array<string>,
|
|
29
|
-
staticValue: mixed,
|
|
30
25
|
};
|
|
31
26
|
|
|
32
27
|
export type ValidationResult = ValidResult | InvalidResult;
|
|
@@ -90,8 +85,6 @@ export function stringifyValidationResult(
|
|
|
90
85
|
return `- '${path.join('.')}' is missing.`;
|
|
91
86
|
case 'unequal':
|
|
92
87
|
return `- '${path.join('.')}' is the wrong value.`;
|
|
93
|
-
case 'unexpected':
|
|
94
|
-
return `- '${path.join('.')}' is present but not expected to be.`;
|
|
95
88
|
}
|
|
96
89
|
}),
|
|
97
90
|
'',
|
|
@@ -145,20 +138,6 @@ function accumulateDifferences(
|
|
|
145
138
|
});
|
|
146
139
|
}
|
|
147
140
|
}
|
|
148
|
-
|
|
149
|
-
for (const staticKey in staticObject) {
|
|
150
|
-
if (
|
|
151
|
-
!nativeObject.hasOwnProperty(staticKey) &&
|
|
152
|
-
// $FlowFixMe[invalid-computed-prop]
|
|
153
|
-
!isIgnored(staticObject[staticKey])
|
|
154
|
-
) {
|
|
155
|
-
differences.push({
|
|
156
|
-
path: [...path, staticKey],
|
|
157
|
-
type: 'unexpected',
|
|
158
|
-
staticValue: staticObject[staticKey],
|
|
159
|
-
});
|
|
160
|
-
}
|
|
161
|
-
}
|
|
162
141
|
}
|
|
163
142
|
|
|
164
143
|
function ifObject(value: mixed): ?{...} {
|
|
@@ -78,7 +78,9 @@ const REQUEST_EVENTS = [
|
|
|
78
78
|
|
|
79
79
|
const XHR_EVENTS = REQUEST_EVENTS.concat('readystatechange');
|
|
80
80
|
|
|
81
|
-
class XMLHttpRequestEventTarget extends (EventTarget(
|
|
81
|
+
class XMLHttpRequestEventTarget extends (EventTarget(
|
|
82
|
+
...REQUEST_EVENTS,
|
|
83
|
+
): typeof EventTarget) {
|
|
82
84
|
onload: ?Function;
|
|
83
85
|
onloadstart: ?Function;
|
|
84
86
|
onprogress: ?Function;
|
|
@@ -91,7 +93,7 @@ class XMLHttpRequestEventTarget extends (EventTarget(...REQUEST_EVENTS): any) {
|
|
|
91
93
|
/**
|
|
92
94
|
* Shared base for platform-specific XMLHttpRequest implementations.
|
|
93
95
|
*/
|
|
94
|
-
class XMLHttpRequest extends (EventTarget(...XHR_EVENTS):
|
|
96
|
+
class XMLHttpRequest extends (EventTarget(...XHR_EVENTS): typeof EventTarget) {
|
|
95
97
|
static UNSENT: number = UNSENT;
|
|
96
98
|
static OPENED: number = OPENED;
|
|
97
99
|
static HEADERS_RECEIVED: number = HEADERS_RECEIVED;
|
|
@@ -90,7 +90,6 @@ const AppContainer = ({
|
|
|
90
90
|
internal_excludeInspector = false,
|
|
91
91
|
internal_excludeLogBox = false,
|
|
92
92
|
rootTag,
|
|
93
|
-
showArchitectureIndicator,
|
|
94
93
|
WrapperComponent,
|
|
95
94
|
rootViewStyle,
|
|
96
95
|
}: Props): React.Node => {
|
|
@@ -150,10 +149,7 @@ const AppContainer = ({
|
|
|
150
149
|
|
|
151
150
|
if (WrapperComponent != null) {
|
|
152
151
|
innerView = (
|
|
153
|
-
<WrapperComponent
|
|
154
|
-
initialProps={initialProps}
|
|
155
|
-
fabric={fabric === true}
|
|
156
|
-
showArchitectureIndicator={showArchitectureIndicator === true}>
|
|
152
|
+
<WrapperComponent initialProps={initialProps} fabric={fabric === true}>
|
|
157
153
|
{innerView}
|
|
158
154
|
</WrapperComponent>
|
|
159
155
|
);
|
|
@@ -21,7 +21,6 @@ const AppContainer = ({
|
|
|
21
21
|
fabric,
|
|
22
22
|
initialProps,
|
|
23
23
|
rootTag,
|
|
24
|
-
showArchitectureIndicator,
|
|
25
24
|
WrapperComponent,
|
|
26
25
|
rootViewStyle,
|
|
27
26
|
}: Props): React.Node => {
|
|
@@ -29,10 +28,7 @@ const AppContainer = ({
|
|
|
29
28
|
|
|
30
29
|
if (WrapperComponent != null) {
|
|
31
30
|
innerView = (
|
|
32
|
-
<WrapperComponent
|
|
33
|
-
initialProps={initialProps}
|
|
34
|
-
fabric={fabric === true}
|
|
35
|
-
showArchitectureIndicator={showArchitectureIndicator === true}>
|
|
31
|
+
<WrapperComponent initialProps={initialProps} fabric={fabric === true}>
|
|
36
32
|
{innerView}
|
|
37
33
|
</WrapperComponent>
|
|
38
34
|
);
|
|
@@ -18,7 +18,6 @@ export type Props = $ReadOnly<{|
|
|
|
18
18
|
fabric?: boolean,
|
|
19
19
|
rootTag: number | RootTag,
|
|
20
20
|
initialProps?: {...},
|
|
21
|
-
showArchitectureIndicator?: boolean,
|
|
22
21
|
WrapperComponent?: ?React.ComponentType<any>,
|
|
23
22
|
rootViewStyle?: ?ViewStyleProp,
|
|
24
23
|
internal_excludeLogBox?: boolean,
|
|
@@ -73,7 +73,6 @@ let componentProviderInstrumentationHook: ComponentProviderInstrumentationHook =
|
|
|
73
73
|
|
|
74
74
|
let wrapperComponentProvider: ?WrapperComponentProvider;
|
|
75
75
|
let rootViewStyleProvider: ?RootViewStyleProvider;
|
|
76
|
-
let showArchitectureIndicator = false;
|
|
77
76
|
|
|
78
77
|
/**
|
|
79
78
|
* `AppRegistry` is the JavaScript entry point to running all React Native apps.
|
|
@@ -89,10 +88,6 @@ const AppRegistry = {
|
|
|
89
88
|
rootViewStyleProvider = provider;
|
|
90
89
|
},
|
|
91
90
|
|
|
92
|
-
enableArchitectureIndicator(enabled: boolean): void {
|
|
93
|
-
showArchitectureIndicator = enabled;
|
|
94
|
-
},
|
|
95
|
-
|
|
96
91
|
registerConfig(config: Array<AppConfig>): void {
|
|
97
92
|
config.forEach(appConfig => {
|
|
98
93
|
if (appConfig.run) {
|
|
@@ -139,7 +134,6 @@ const AppRegistry = {
|
|
|
139
134
|
wrapperComponentProvider && wrapperComponentProvider(appParameters),
|
|
140
135
|
rootViewStyleProvider && rootViewStyleProvider(appParameters),
|
|
141
136
|
appParameters.fabric,
|
|
142
|
-
showArchitectureIndicator,
|
|
143
137
|
scopedPerformanceLogger,
|
|
144
138
|
appKey === 'LogBox', // is logbox
|
|
145
139
|
appKey,
|
|
@@ -20,7 +20,7 @@ import type {
|
|
|
20
20
|
import type {ElementRef} from 'react';
|
|
21
21
|
|
|
22
22
|
import TextInputState from '../../Components/TextInput/TextInputState';
|
|
23
|
-
import {getNodeFromInternalInstanceHandle} from '../../
|
|
23
|
+
import {getNodeFromInternalInstanceHandle} from '../../ReactNative/RendererProxy';
|
|
24
24
|
import {getFabricUIManager} from '../FabricUIManager';
|
|
25
25
|
import {create} from './ReactNativeAttributePayload';
|
|
26
26
|
import warnForStyleProps from './warnForStyleProps';
|
|
@@ -15,7 +15,7 @@
|
|
|
15
15
|
|
|
16
16
|
import type ReactNativeElement from '../../../src/private/webapis/dom/nodes/ReactNativeElement';
|
|
17
17
|
import type ReadOnlyText from '../../../src/private/webapis/dom/nodes/ReadOnlyText';
|
|
18
|
-
import typeof
|
|
18
|
+
import typeof * as RendererProxyT from '../../ReactNative/RendererProxy';
|
|
19
19
|
import type {
|
|
20
20
|
InternalInstanceHandle,
|
|
21
21
|
Node,
|
|
@@ -32,7 +32,7 @@ let PublicInstanceClass:
|
|
|
32
32
|
let ReadOnlyTextClass: Class<ReadOnlyText>;
|
|
33
33
|
|
|
34
34
|
// Lazy loaded to avoid evaluating the module when using the legacy renderer.
|
|
35
|
-
let
|
|
35
|
+
let RendererProxy: RendererProxyT;
|
|
36
36
|
|
|
37
37
|
export function createPublicInstance(
|
|
38
38
|
tag: number,
|
|
@@ -78,10 +78,10 @@ export function getNodeFromPublicInstance(
|
|
|
78
78
|
return null;
|
|
79
79
|
}
|
|
80
80
|
|
|
81
|
-
if (
|
|
82
|
-
|
|
81
|
+
if (RendererProxy == null) {
|
|
82
|
+
RendererProxy = require('../../ReactNative/RendererProxy');
|
|
83
83
|
}
|
|
84
|
-
return
|
|
84
|
+
return RendererProxy.getNodeFromInternalInstanceHandle(
|
|
85
85
|
publicInstance.__internalInstanceHandle,
|
|
86
86
|
);
|
|
87
87
|
}
|
|
@@ -8,15 +8,19 @@
|
|
|
8
8
|
* @flow strict-local
|
|
9
9
|
*/
|
|
10
10
|
|
|
11
|
-
import type {
|
|
11
|
+
import type {
|
|
12
|
+
HostComponent,
|
|
13
|
+
InternalInstanceHandle,
|
|
14
|
+
Node,
|
|
15
|
+
} from '../Renderer/shims/ReactNativeTypes';
|
|
12
16
|
import type ReactFabricHostComponent from './ReactFabricPublicInstance/ReactFabricHostComponent';
|
|
13
|
-
import type {
|
|
17
|
+
import type {ElementRef, ElementType} from 'react';
|
|
14
18
|
|
|
15
19
|
import {
|
|
16
20
|
onCaughtError,
|
|
17
21
|
onRecoverableError,
|
|
18
22
|
onUncaughtError,
|
|
19
|
-
} from '
|
|
23
|
+
} from '../../src/private/renderer/errorhandling/ErrorHandlers';
|
|
20
24
|
import {type RootTag} from './RootTag';
|
|
21
25
|
export function renderElement({
|
|
22
26
|
element,
|
|
@@ -24,7 +28,7 @@ export function renderElement({
|
|
|
24
28
|
useFabric,
|
|
25
29
|
useConcurrentRoot,
|
|
26
30
|
}: {
|
|
27
|
-
element:
|
|
31
|
+
element: React.MixedElement,
|
|
28
32
|
rootTag: number,
|
|
29
33
|
useFabric: boolean,
|
|
30
34
|
useConcurrentRoot: boolean,
|
|
@@ -139,3 +143,21 @@ export function isChildPublicInstance(
|
|
|
139
143
|
childInstance,
|
|
140
144
|
);
|
|
141
145
|
}
|
|
146
|
+
|
|
147
|
+
export function getNodeFromInternalInstanceHandle(
|
|
148
|
+
internalInstanceHandle: InternalInstanceHandle,
|
|
149
|
+
): ?Node {
|
|
150
|
+
// This is only available in Fabric
|
|
151
|
+
return require('../Renderer/shims/ReactFabric').getNodeFromInternalInstanceHandle(
|
|
152
|
+
internalInstanceHandle,
|
|
153
|
+
);
|
|
154
|
+
}
|
|
155
|
+
|
|
156
|
+
export function getPublicInstanceFromInternalInstanceHandle(
|
|
157
|
+
internalInstanceHandle: InternalInstanceHandle,
|
|
158
|
+
): mixed /*PublicInstance | PublicTextInstance | null*/ {
|
|
159
|
+
// This is only available in Fabric
|
|
160
|
+
return require('../Renderer/shims/ReactFabric').getPublicInstanceFromInternalInstanceHandle(
|
|
161
|
+
internalInstanceHandle,
|
|
162
|
+
);
|
|
163
|
+
}
|
|
@@ -10,8 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
'use strict';
|
|
12
12
|
|
|
13
|
+
import processBoxShadow from '../StyleSheet/processBoxShadow';
|
|
14
|
+
|
|
13
15
|
const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
|
|
14
16
|
const resolveAssetSource = require('../Image/resolveAssetSource');
|
|
17
|
+
const processBackgroundImage =
|
|
18
|
+
require('../StyleSheet/processBackgroundImage').default;
|
|
15
19
|
const processColor = require('../StyleSheet/processColor').default;
|
|
16
20
|
const processColorArray = require('../StyleSheet/processColorArray');
|
|
17
21
|
const processFilter = require('../StyleSheet/processFilter').default;
|
|
@@ -191,8 +195,12 @@ function getProcessorForType(typeName: string): ?(nextProp: any) => any {
|
|
|
191
195
|
return processColorArray;
|
|
192
196
|
case 'Filter':
|
|
193
197
|
return processFilter;
|
|
198
|
+
case 'BackgroundImage':
|
|
199
|
+
return processBackgroundImage;
|
|
194
200
|
case 'ImageSource':
|
|
195
201
|
return resolveAssetSource;
|
|
202
|
+
case 'BoxShadow':
|
|
203
|
+
return processBoxShadow;
|
|
196
204
|
}
|
|
197
205
|
return null;
|
|
198
206
|
}
|
|
@@ -35,7 +35,6 @@ export default function renderApplication<Props: Object>(
|
|
|
35
35
|
WrapperComponent?: ?React.ComponentType<any>,
|
|
36
36
|
rootViewStyle?: ?ViewStyleProp,
|
|
37
37
|
fabric?: boolean,
|
|
38
|
-
showArchitectureIndicator?: boolean,
|
|
39
38
|
scopedPerformanceLogger?: IPerformanceLogger,
|
|
40
39
|
isLogBox?: boolean,
|
|
41
40
|
debugName?: string,
|
|
@@ -52,7 +51,6 @@ export default function renderApplication<Props: Object>(
|
|
|
52
51
|
<AppContainer
|
|
53
52
|
rootTag={rootTag}
|
|
54
53
|
fabric={fabric}
|
|
55
|
-
showArchitectureIndicator={showArchitectureIndicator}
|
|
56
54
|
WrapperComponent={WrapperComponent}
|
|
57
55
|
rootViewStyle={rootViewStyle}
|
|
58
56
|
initialProps={initialProps ?? Object.freeze({})}
|
|
@@ -7,10 +7,15 @@
|
|
|
7
7
|
* @noformat
|
|
8
8
|
* @nolint
|
|
9
9
|
* @flow strict
|
|
10
|
-
* @generated SignedSource<<
|
|
10
|
+
* @generated SignedSource<<89361333bb6b688486e35849a9c669a6>>
|
|
11
11
|
*/
|
|
12
12
|
|
|
13
|
-
import type {
|
|
13
|
+
import type {
|
|
14
|
+
ElementRef,
|
|
15
|
+
ElementType,
|
|
16
|
+
MixedElement,
|
|
17
|
+
AbstractComponent,
|
|
18
|
+
} from 'react';
|
|
14
19
|
|
|
15
20
|
export type MeasureOnSuccessCallback = (
|
|
16
21
|
x: number,
|
|
@@ -86,6 +91,7 @@ export type ViewConfig = $ReadOnly<{
|
|
|
86
91
|
}>,
|
|
87
92
|
...
|
|
88
93
|
}>,
|
|
94
|
+
supportsRawText?: boolean,
|
|
89
95
|
uiViewClassName: string,
|
|
90
96
|
validAttributes: AttributeConfiguration,
|
|
91
97
|
}>;
|
|
@@ -93,6 +99,7 @@ export type ViewConfig = $ReadOnly<{
|
|
|
93
99
|
export type PartialViewConfig = $ReadOnly<{
|
|
94
100
|
bubblingEventTypes?: $PropertyType<ViewConfig, 'bubblingEventTypes'>,
|
|
95
101
|
directEventTypes?: $PropertyType<ViewConfig, 'directEventTypes'>,
|
|
102
|
+
supportsRawText?: boolean,
|
|
96
103
|
uiViewClassName: string,
|
|
97
104
|
validAttributes?: PartialAttributeConfiguration,
|
|
98
105
|
}>;
|
|
@@ -220,7 +227,7 @@ export type ReactNativeType = {
|
|
|
220
227
|
eventType: string,
|
|
221
228
|
): void,
|
|
222
229
|
render(
|
|
223
|
-
element:
|
|
230
|
+
element: MixedElement,
|
|
224
231
|
containerTag: number,
|
|
225
232
|
callback: ?() => void,
|
|
226
233
|
options: ?RenderRootOptions,
|
|
@@ -255,7 +262,7 @@ export type ReactFabricType = {
|
|
|
255
262
|
eventType: string,
|
|
256
263
|
): void,
|
|
257
264
|
render(
|
|
258
|
-
element:
|
|
265
|
+
element: MixedElement,
|
|
259
266
|
containerTag: number,
|
|
260
267
|
callback: ?() => void,
|
|
261
268
|
concurrentRoot: ?boolean,
|
|
@@ -23,7 +23,7 @@ import type {
|
|
|
23
23
|
____ViewStyleProp_Internal,
|
|
24
24
|
} from './StyleSheetTypes';
|
|
25
25
|
|
|
26
|
-
import composeStyles from '../../src/private/
|
|
26
|
+
import composeStyles from '../../src/private/styles/composeStyles';
|
|
27
27
|
|
|
28
28
|
const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
|
|
29
29
|
const PixelRatio = require('../Utilities/PixelRatio').default;
|
|
@@ -23,7 +23,7 @@ import type {
|
|
|
23
23
|
____ViewStyleProp_Internal,
|
|
24
24
|
} from './StyleSheetTypes';
|
|
25
25
|
|
|
26
|
-
import composeStyles from '../../src/private/
|
|
26
|
+
import composeStyles from '../../src/private/styles/composeStyles';
|
|
27
27
|
|
|
28
28
|
const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
|
|
29
29
|
const PixelRatio = require('../Utilities/PixelRatio').default;
|
|
@@ -182,21 +182,23 @@ type MaximumOneOf<T, K extends keyof T = keyof T> = K extends keyof T
|
|
|
182
182
|
|
|
183
183
|
export interface TransformsStyle {
|
|
184
184
|
transform?:
|
|
185
|
-
|
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
190
|
-
|
|
191
|
-
|
|
192
|
-
|
|
193
|
-
|
|
194
|
-
|
|
195
|
-
|
|
196
|
-
|
|
197
|
-
|
|
198
|
-
|
|
199
|
-
|
|
185
|
+
| Readonly<
|
|
186
|
+
MaximumOneOf<
|
|
187
|
+
PerspectiveTransform &
|
|
188
|
+
RotateTransform &
|
|
189
|
+
RotateXTransform &
|
|
190
|
+
RotateYTransform &
|
|
191
|
+
RotateZTransform &
|
|
192
|
+
ScaleTransform &
|
|
193
|
+
ScaleXTransform &
|
|
194
|
+
ScaleYTransform &
|
|
195
|
+
TranslateXTransform &
|
|
196
|
+
TranslateYTransform &
|
|
197
|
+
SkewXTransform &
|
|
198
|
+
SkewYTransform &
|
|
199
|
+
MatrixTransform
|
|
200
|
+
>[]
|
|
201
|
+
>
|
|
200
202
|
| string
|
|
201
203
|
| undefined;
|
|
202
204
|
transformOrigin?: Array<string | number> | string | undefined;
|
|
@@ -227,6 +229,62 @@ export interface TransformsStyle {
|
|
|
227
229
|
translateY?: AnimatableNumericValue | undefined;
|
|
228
230
|
}
|
|
229
231
|
|
|
232
|
+
export type FilterFunction =
|
|
233
|
+
| {brightness: number | string}
|
|
234
|
+
| {blur: number | string}
|
|
235
|
+
| {contrast: number | string}
|
|
236
|
+
| {grayscale: number | string}
|
|
237
|
+
| {hueRotate: number | string}
|
|
238
|
+
| {invert: number | string}
|
|
239
|
+
| {opacity: number | string}
|
|
240
|
+
| {saturate: number | string}
|
|
241
|
+
| {sepia: number | string}
|
|
242
|
+
| {dropShadow: DropShadowPrimitive | string};
|
|
243
|
+
|
|
244
|
+
export type DropShadowPrimitive = {
|
|
245
|
+
offsetX: number | string;
|
|
246
|
+
offsetY: number | string;
|
|
247
|
+
standardDeviation?: number | string | undefined;
|
|
248
|
+
color?: ColorValue | number | undefined;
|
|
249
|
+
};
|
|
250
|
+
|
|
251
|
+
export type BoxShadowPrimitive = {
|
|
252
|
+
offsetX: number | string;
|
|
253
|
+
offsetY: number | string;
|
|
254
|
+
color?: string | undefined;
|
|
255
|
+
blurRadius?: ColorValue | number | undefined;
|
|
256
|
+
spreadDistance?: number | string | undefined;
|
|
257
|
+
inset?: boolean | undefined;
|
|
258
|
+
};
|
|
259
|
+
|
|
260
|
+
export type BlendMode =
|
|
261
|
+
| 'normal'
|
|
262
|
+
| 'multiply'
|
|
263
|
+
| 'screen'
|
|
264
|
+
| 'overlay'
|
|
265
|
+
| 'darken'
|
|
266
|
+
| 'lighten'
|
|
267
|
+
| 'color-dodge'
|
|
268
|
+
| 'color-burn'
|
|
269
|
+
| 'hard-light'
|
|
270
|
+
| 'soft-light'
|
|
271
|
+
| 'difference'
|
|
272
|
+
| 'exclusion'
|
|
273
|
+
| 'hue'
|
|
274
|
+
| 'saturation'
|
|
275
|
+
| 'color'
|
|
276
|
+
| 'luminosity';
|
|
277
|
+
|
|
278
|
+
export type GradientValue = {
|
|
279
|
+
type: 'linearGradient';
|
|
280
|
+
// Angle or direction enums
|
|
281
|
+
direction?: string | undefined;
|
|
282
|
+
colorStops: ReadonlyArray<{
|
|
283
|
+
color: ColorValue;
|
|
284
|
+
positions?: ReadonlyArray<string[]> | undefined;
|
|
285
|
+
}>;
|
|
286
|
+
};
|
|
287
|
+
|
|
230
288
|
/**
|
|
231
289
|
* @see https://reactnative.dev/docs/view#style
|
|
232
290
|
*/
|
|
@@ -276,6 +334,7 @@ export interface ViewStyle extends FlexStyle, ShadowStyleIOS, TransformsStyle {
|
|
|
276
334
|
* Controls whether the View can be the target of touch events.
|
|
277
335
|
*/
|
|
278
336
|
pointerEvents?: 'box-none' | 'none' | 'box-only' | 'auto' | undefined;
|
|
337
|
+
isolation?: 'auto' | 'isolate' | undefined;
|
|
279
338
|
cursor?: CursorValue | undefined;
|
|
280
339
|
}
|
|
281
340
|
|