@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.
Files changed (142) hide show
  1. package/.flowconfig +2 -4
  2. package/CHANGELOG.json +31 -1
  3. package/CHANGELOG.md +24 -8
  4. package/Libraries/Alert/Alert.js +3 -0
  5. package/Libraries/Animated/AnimatedImplementation.js +7 -7
  6. package/Libraries/Animated/animations/Animation.js +10 -0
  7. package/Libraries/Animated/animations/TimingAnimation.js +1 -0
  8. package/Libraries/Animated/components/AnimatedScrollView.js +2 -2
  9. package/Libraries/Animated/createAnimatedComponent.js +1 -1
  10. package/Libraries/Animated/nodes/AnimatedValue.js +1 -0
  11. package/Libraries/Animated/useAnimatedProps.js +138 -6
  12. package/Libraries/BatchedBridge/NativeModules.js +2 -0
  13. package/Libraries/Blob/FileReader.js +1 -1
  14. package/Libraries/Blob/URL.js +2 -62
  15. package/Libraries/Blob/URLSearchParams.js +71 -0
  16. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +1 -1
  17. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +1 -1
  18. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +3 -0
  19. package/Libraries/Components/ScrollView/ScrollView.js +5 -5
  20. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +3 -0
  21. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +1 -1
  22. package/Libraries/Components/StatusBar/StatusBar.js +3 -1
  23. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +3 -0
  24. package/Libraries/Components/TextInput/TextInput.d.ts +32 -2
  25. package/Libraries/Components/TextInput/TextInput.js +220 -80
  26. package/Libraries/Components/TextInput/TextInput.win32.js +220 -86
  27. package/Libraries/Components/View/ReactNativeStyleAttributes.js +22 -0
  28. package/Libraries/Components/View/ReactNativeViewAttributes.js +2 -0
  29. package/Libraries/Components/View/ReactNativeViewAttributes.win32.js +2 -0
  30. package/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  31. package/Libraries/Components/View/ViewNativeComponent.js +6 -0
  32. package/Libraries/Components/View/ViewPropTypes.js +14 -0
  33. package/Libraries/Components/View/ViewPropTypes.win32.js +14 -0
  34. package/Libraries/Core/ExceptionsManager.js +2 -0
  35. package/Libraries/Core/InitializeCore.js +1 -1
  36. package/Libraries/Core/ReactFiberErrorDialog.js +3 -0
  37. package/Libraries/Core/ReactNativeVersion.js +1 -1
  38. package/Libraries/Core/setUpErrorHandling.js +7 -1
  39. package/Libraries/Core/setUpReactRefresh.js +0 -4
  40. package/Libraries/Image/AssetSourceResolver.js +28 -1
  41. package/Libraries/Image/Image.android.js +9 -14
  42. package/Libraries/Image/Image.ios.js +11 -22
  43. package/Libraries/Image/Image.win32.js +10 -21
  44. package/Libraries/Image/ImageBackground.js +1 -8
  45. package/Libraries/Image/ImageUtils.js +9 -9
  46. package/Libraries/Image/ImageViewNativeComponent.js +4 -0
  47. package/Libraries/Inspector/NetworkOverlay.js +1 -1
  48. package/Libraries/Interaction/TaskQueue.js +1 -0
  49. package/Libraries/Lists/FlatList.js +1 -1
  50. package/Libraries/Lists/SectionList.js +2 -2
  51. package/Libraries/Lists/SectionListModern.js +1 -1
  52. package/Libraries/LogBox/Data/LogBoxData.js +31 -4
  53. package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -0
  54. package/Libraries/NativeComponent/BaseViewConfig.ios.js +7 -0
  55. package/Libraries/NativeComponent/BaseViewConfig.win32.js +7 -0
  56. package/Libraries/NativeComponent/NativeComponentRegistry.js +9 -2
  57. package/Libraries/Network/XMLHttpRequest.js +4 -2
  58. package/Libraries/ReactNative/BridgelessUIManager.js +1 -0
  59. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricHostComponent.js +1 -1
  60. package/Libraries/ReactNative/ReactFabricPublicInstance/ReactFabricPublicInstance.js +5 -5
  61. package/Libraries/ReactNative/RendererImplementation.js +24 -2
  62. package/Libraries/ReactNative/getNativeComponentAttributes.js +8 -0
  63. package/Libraries/Renderer/shims/ReactNativeTypes.js +3 -1
  64. package/Libraries/StyleSheet/StyleSheet.js +1 -1
  65. package/Libraries/StyleSheet/StyleSheet.win32.js +1 -1
  66. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +57 -19
  67. package/Libraries/StyleSheet/StyleSheetTypes.js +60 -23
  68. package/Libraries/StyleSheet/processBackgroundImage.js +286 -0
  69. package/Libraries/StyleSheet/processBoxShadow.js +211 -0
  70. package/Libraries/StyleSheet/processFilter.js +24 -14
  71. package/Libraries/Text/Text.js +395 -212
  72. package/Libraries/Text/Text.win32.js +443 -245
  73. package/Libraries/Text/TextNativeComponent.js +7 -0
  74. package/Libraries/Text/TextNativeComponent.win32.js +7 -0
  75. package/Libraries/TurboModule/TurboModuleRegistry.js +13 -50
  76. package/Libraries/Types/CodegenTypes.js +3 -1
  77. package/Libraries/Utilities/HMRClient.js +1 -0
  78. package/Libraries/Utilities/Platform.android.js +1 -1
  79. package/Libraries/Utilities/Platform.d.ts +1 -1
  80. package/Libraries/Utilities/Platform.flow.js +2 -2
  81. package/Libraries/Utilities/Platform.flow.win32.js +3 -3
  82. package/Libraries/Utilities/Platform.ios.js +1 -1
  83. package/Libraries/Utilities/Platform.win32.js +1 -1
  84. package/Libraries/Utilities/ReactNativeTestTools.js +1 -1
  85. package/Libraries/WebSocket/WebSocket.js +1 -1
  86. package/Libraries/vendor/emitter/EventEmitter.js +1 -0
  87. package/flow/jest.js +2 -2
  88. package/index.js +1 -0
  89. package/index.win32.js +1 -0
  90. package/jest/mockModal.js +1 -3
  91. package/jest/mockScrollView.js +1 -1
  92. package/jest/renderer.js +2 -2
  93. package/jest/setup.js +16 -9
  94. package/overrides.json +16 -16
  95. package/package.json +15 -15
  96. package/src/private/{core/components → components}/HScrollViewNativeComponents.js +8 -8
  97. package/src/private/{core/components → components}/VScrollViewNativeComponents.js +7 -7
  98. package/src/private/{core/components → components}/useSyncOnScroll.js +2 -2
  99. package/src/private/featureflags/ReactNativeFeatureFlags.js +143 -19
  100. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +25 -5
  101. package/src/private/hooks/DebouncedEffectImplementation.js +148 -0
  102. package/src/private/hooks/useDebouncedEffect.js +23 -0
  103. package/{Libraries/Core → src/private/renderer/errorhandling}/ErrorHandlers.js +14 -4
  104. package/src/private/setup/setUpDOM.js +28 -0
  105. package/src/private/setup/setUpIntersectionObserver.js +27 -0
  106. package/src/private/setup/setUpMutationObserver.js +26 -0
  107. package/src/private/setup/setUpPerformanceObserver.js +64 -0
  108. package/src/private/specs/modules/NativeDebuggerSessionObserver.js +23 -0
  109. package/src/private/specs/modules/NativeLinkingManager.js +1 -1
  110. package/src/private/specs/modules/NativePlatformConstantsAndroid.js +1 -1
  111. package/src/private/specs/modules/NativePlatformConstantsIOS.js +1 -1
  112. package/src/private/specs/modules/NativePlatformConstantsWin.js +8 -1
  113. package/src/private/webapis/dom/nodes/ReadOnlyNode.js +6 -4
  114. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserver.js +1 -1
  115. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverEntry.js +3 -3
  116. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver}/IntersectionObserverManager.js +5 -8
  117. package/src/private/{specs/modules → webapis/intersectionobserver/specs}/NativeIntersectionObserver.js +2 -2
  118. package/{Libraries/IntersectionObserver → src/private/webapis/intersectionobserver/specs}/__mocks__/NativeIntersectionObserver.js +4 -4
  119. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserver.js +1 -1
  120. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationObserverManager.js +5 -5
  121. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver}/MutationRecord.js +4 -6
  122. package/src/private/{specs/modules → webapis/mutationobserver/specs}/NativeMutationObserver.js +2 -2
  123. package/{Libraries/MutationObserver → src/private/webapis/mutationobserver/specs}/__mocks__/NativeMutationObserver.js +5 -5
  124. package/src/private/webapis/performance/{EventCounts.js → EventTiming.js} +65 -3
  125. package/src/private/webapis/performance/LongTasks.js +39 -0
  126. package/src/private/webapis/performance/Performance.js +22 -9
  127. package/src/private/webapis/performance/PerformanceEntry.js +36 -18
  128. package/src/private/webapis/performance/PerformanceObserver.js +29 -43
  129. package/src/private/webapis/performance/RawPerformanceEntry.js +24 -1
  130. package/src/private/webapis/performance/UserTiming.js +17 -12
  131. package/src/private/webapis/performance/specs/NativePerformanceObserver.js +1 -1
  132. package/src-win/Libraries/Components/View/ViewAccessibility.d.ts +15 -0
  133. package/types/experimental.d.ts +20 -1
  134. package/Libraries/Core/setUpIntersectionObserver.js +0 -16
  135. package/Libraries/Core/setUpMutationObserver.js +0 -16
  136. package/Libraries/Core/setUpPerformanceObserver.js +0 -18
  137. package/Libraries/IntersectionObserver/NativeIntersectionObserver.js +0 -13
  138. package/Libraries/MutationObserver/NativeMutationObserver.js +0 -13
  139. package/Libraries/Text/TextOptimized.js +0 -538
  140. package/src/private/core/setUpDOM.js +0 -18
  141. package/src/private/webapis/performance/PerformanceEventTiming.js +0 -55
  142. /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, FilterPrimitive} from './StyleSheetTypes';
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
- | {'hue-rotate': number}
24
+ | {hueRotate: number}
25
25
  | {invert: number}
26
26
  | {opacity: number}
27
27
  | {saturate: number}
28
28
  | {sepia: number}
29
- | {'drop-shadow': ParsedDropShadow};
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<FilterPrimitive> | string,
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({'drop-shadow': dropShadow});
56
+ result.push({dropShadow});
53
57
  } else {
54
58
  return [];
55
59
  }
56
60
  } else {
57
- const amount = _getFilterAmount(filterName, matches[2]);
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 filterPrimitive = {};
70
+ const filterFunction = {};
61
71
  // $FlowFixMe The key will be the correct one but flow can't see that.
62
- filterPrimitive[filterName] = amount;
72
+ filterFunction[camelizedName] = amount;
63
73
  // $FlowFixMe The key will be the correct one but flow can't see that.
64
- result.push(filterPrimitive);
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 filterPrimitive of filter) {
75
- const [filterName, filterValue] = Object.entries(filterPrimitive)[0];
76
- if (filterName === 'drop-shadow') {
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({'drop-shadow': dropShadow});
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 'hue-rotate':
138
+ case 'hueRotate':
129
139
  if (filterArgAsNumber === 0) {
130
140
  return 0;
131
141
  }