@office-iss/react-native-win32 0.0.0-canary.258 → 0.0.0-canary.260
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 +2 -4
- package/CHANGELOG.json +31 -1
- package/CHANGELOG.md +24 -8
- package/Libraries/Alert/Alert.js +3 -0
- package/Libraries/Animated/AnimatedImplementation.js +7 -7
- package/Libraries/Animated/animations/Animation.js +10 -0
- package/Libraries/Animated/animations/TimingAnimation.js +1 -0
- package/Libraries/Animated/components/AnimatedScrollView.js +2 -2
- package/Libraries/Animated/createAnimatedComponent.js +1 -1
- package/Libraries/Animated/nodes/AnimatedValue.js +1 -0
- package/Libraries/Animated/useAnimatedProps.js +138 -6
- 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/AndroidHorizontalScrollViewNativeComponent.js +3 -0
- package/Libraries/Components/ScrollView/ScrollView.js +5 -5
- package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +3 -0
- package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
- package/Libraries/Components/StatusBar/StatusBar.js +3 -1
- package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +3 -0
- package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
- package/Libraries/Components/TextInput/TextInput.js +220 -80
- package/Libraries/Components/TextInput/TextInput.win32.js +220 -86
- 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 +6 -0
- 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 +1 -1
- package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
- package/Libraries/Core/ReactNativeVersion.js +1 -1
- package/Libraries/Core/setUpErrorHandling.js +7 -1
- 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 +10 -21
- package/Libraries/Image/ImageBackground.js +1 -8
- package/Libraries/Image/ImageUtils.js +9 -9
- package/Libraries/Image/ImageViewNativeComponent.js +4 -0
- 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 +1 -1
- package/Libraries/LogBox/Data/LogBoxData.js +31 -4
- package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -0
- package/Libraries/NativeComponent/BaseViewConfig.ios.js +7 -0
- package/Libraries/NativeComponent/BaseViewConfig.win32.js +7 -0
- package/Libraries/NativeComponent/NativeComponentRegistry.js +9 -2
- package/Libraries/Network/XMLHttpRequest.js +4 -2
- 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 +24 -2
- package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -0
- package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -1
- package/Libraries/StyleSheet/StyleSheet.js +1 -1
- package/Libraries/StyleSheet/StyleSheet.win32.js +1 -1
- package/Libraries/StyleSheet/StyleSheetTypes.d.ts +57 -19
- package/Libraries/StyleSheet/StyleSheetTypes.js +60 -23
- package/Libraries/StyleSheet/processBackgroundImage.js +286 -0
- package/Libraries/StyleSheet/processBoxShadow.js +211 -0
- package/Libraries/StyleSheet/processFilter.js +24 -14
- package/Libraries/Text/Text.js +395 -212
- package/Libraries/Text/Text.win32.js +443 -245
- package/Libraries/Text/TextNativeComponent.js +7 -0
- package/Libraries/Text/TextNativeComponent.win32.js +7 -0
- package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
- package/Libraries/Types/CodegenTypes.js +3 -1
- package/Libraries/Utilities/HMRClient.js +1 -0
- package/Libraries/Utilities/Platform.android.js +1 -1
- package/Libraries/Utilities/Platform.d.ts +1 -1
- package/Libraries/Utilities/Platform.flow.js +2 -2
- package/Libraries/Utilities/Platform.flow.win32.js +3 -3
- package/Libraries/Utilities/Platform.ios.js +1 -1
- package/Libraries/Utilities/Platform.win32.js +1 -1
- package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
- package/Libraries/WebSocket/WebSocket.js +1 -1
- package/Libraries/vendor/emitter/EventEmitter.js +1 -0
- package/flow/jest.js +2 -2
- package/index.js +1 -0
- package/index.win32.js +1 -0
- package/jest/mockModal.js +1 -3
- package/jest/mockScrollView.js +1 -1
- package/jest/renderer.js +2 -2
- package/jest/setup.js +16 -9
- package/overrides.json +16 -16
- package/package.json +15 -15
- package/src/private/{core/components → components}/HScrollViewNativeComponents.js +8 -8
- package/src/private/{core/components → components}/VScrollViewNativeComponents.js +7 -7
- package/src/private/{core/components → components}/useSyncOnScroll.js +2 -2
- package/src/private/featureflags/ReactNativeFeatureFlags.js +143 -19
- package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +25 -5
- package/src/private/hooks/DebouncedEffectImplementation.js +148 -0
- package/src/private/hooks/useDebouncedEffect.js +23 -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/NativeDebuggerSessionObserver.js +23 -0
- package/src/private/specs/modules/NativeLinkingManager.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsAndroid.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsIOS.js +1 -1
- package/src/private/specs/modules/NativePlatformConstantsWin.js +8 -1
- package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +1 -1
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
- package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +5 -8
- 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 +1 -1
- package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +5 -5
- 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/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/Text/TextOptimized.js +0 -538
- 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
|
@@ -12,7 +12,7 @@
|
|
|
12
12
|
'use strict';
|
|
13
13
|
|
|
14
14
|
import type {ColorValue} from './StyleSheet';
|
|
15
|
-
import type {DropShadowPrimitive,
|
|
15
|
+
import type {DropShadowPrimitive, FilterFunction} from './StyleSheetTypes';
|
|
16
16
|
|
|
17
17
|
import processColor from './processColor';
|
|
18
18
|
|
|
@@ -21,12 +21,12 @@ type ParsedFilter =
|
|
|
21
21
|
| {blur: number}
|
|
22
22
|
| {contrast: number}
|
|
23
23
|
| {grayscale: number}
|
|
24
|
-
| {
|
|
24
|
+
| {hueRotate: number}
|
|
25
25
|
| {invert: number}
|
|
26
26
|
| {opacity: number}
|
|
27
27
|
| {saturate: number}
|
|
28
28
|
| {sepia: number}
|
|
29
|
-
| {
|
|
29
|
+
| {dropShadow: ParsedDropShadow};
|
|
30
30
|
|
|
31
31
|
type ParsedDropShadow = {
|
|
32
32
|
offsetX: number,
|
|
@@ -36,9 +36,13 @@ type ParsedDropShadow = {
|
|
|
36
36
|
};
|
|
37
37
|
|
|
38
38
|
export default function processFilter(
|
|
39
|
-
filter: $ReadOnlyArray<
|
|
39
|
+
filter: ?($ReadOnlyArray<FilterFunction> | string),
|
|
40
40
|
): $ReadOnlyArray<ParsedFilter> {
|
|
41
41
|
let result: Array<ParsedFilter> = [];
|
|
42
|
+
if (filter == null) {
|
|
43
|
+
return result;
|
|
44
|
+
}
|
|
45
|
+
|
|
42
46
|
if (typeof filter === 'string') {
|
|
43
47
|
// matches on functions with args like "drop-shadow(1.5)"
|
|
44
48
|
const regex = /([\w-]+)\(([^)]+)\)/g;
|
|
@@ -49,19 +53,25 @@ export default function processFilter(
|
|
|
49
53
|
if (filterName === 'drop-shadow') {
|
|
50
54
|
const dropShadow = parseDropShadow(matches[2]);
|
|
51
55
|
if (dropShadow != null) {
|
|
52
|
-
result.push({
|
|
56
|
+
result.push({dropShadow});
|
|
53
57
|
} else {
|
|
54
58
|
return [];
|
|
55
59
|
}
|
|
56
60
|
} else {
|
|
57
|
-
const
|
|
61
|
+
const camelizedName =
|
|
62
|
+
filterName === 'drop-shadow'
|
|
63
|
+
? 'dropShadow'
|
|
64
|
+
: filterName === 'hue-rotate'
|
|
65
|
+
? 'hueRotate'
|
|
66
|
+
: filterName;
|
|
67
|
+
const amount = _getFilterAmount(camelizedName, matches[2]);
|
|
58
68
|
|
|
59
69
|
if (amount != null) {
|
|
60
|
-
const
|
|
70
|
+
const filterFunction = {};
|
|
61
71
|
// $FlowFixMe The key will be the correct one but flow can't see that.
|
|
62
|
-
|
|
72
|
+
filterFunction[camelizedName] = amount;
|
|
63
73
|
// $FlowFixMe The key will be the correct one but flow can't see that.
|
|
64
|
-
result.push(
|
|
74
|
+
result.push(filterFunction);
|
|
65
75
|
} else {
|
|
66
76
|
// If any primitive is invalid then apply none of the filters. This is how
|
|
67
77
|
// web works and makes it clear that something is wrong becuase no
|
|
@@ -71,15 +81,15 @@ export default function processFilter(
|
|
|
71
81
|
}
|
|
72
82
|
}
|
|
73
83
|
} else {
|
|
74
|
-
for (const
|
|
75
|
-
const [filterName, filterValue] = Object.entries(
|
|
76
|
-
if (filterName === '
|
|
84
|
+
for (const filterFunction of filter) {
|
|
85
|
+
const [filterName, filterValue] = Object.entries(filterFunction)[0];
|
|
86
|
+
if (filterName === 'dropShadow') {
|
|
77
87
|
// $FlowFixMe
|
|
78
88
|
const dropShadow = parseDropShadow(filterValue);
|
|
79
89
|
if (dropShadow == null) {
|
|
80
90
|
return [];
|
|
81
91
|
}
|
|
82
|
-
result.push({
|
|
92
|
+
result.push({dropShadow});
|
|
83
93
|
} else {
|
|
84
94
|
const amount = _getFilterAmount(filterName, filterValue);
|
|
85
95
|
|
|
@@ -125,7 +135,7 @@ function _getFilterAmount(filterName: string, filterArgs: mixed): ?number {
|
|
|
125
135
|
switch (filterName) {
|
|
126
136
|
// Hue rotate takes some angle that can have a unit and can be
|
|
127
137
|
// negative. Additionally, 0 with no unit is allowed.
|
|
128
|
-
case '
|
|
138
|
+
case 'hueRotate':
|
|
129
139
|
if (filterArgAsNumber === 0) {
|
|
130
140
|
return 0;
|
|
131
141
|
}
|