react-native-windows 0.0.0-canary.607 → 0.0.0-canary.609

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 (93) hide show
  1. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +1 -1
  2. package/Libraries/Animated/NativeAnimatedHelper.js +4 -0
  3. package/Libraries/Components/ActivityIndicator/ActivityIndicator.js +6 -4
  4. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +12 -6
  5. package/Libraries/Components/ScrollView/ScrollViewNativeComponent.js +16 -6
  6. package/Libraries/Components/ScrollView/ScrollViewViewConfig.js +1 -1
  7. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +21 -11
  8. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +11 -5
  9. package/Libraries/Components/TextInput/WindowsTextInputNativeComponent.js +1 -1
  10. package/Libraries/Components/View/ReactNativeStyleAttributes.js +4 -0
  11. package/Libraries/Components/View/ViewNativeComponent.js +23 -8
  12. package/Libraries/Core/Devtools/parseErrorStack.js +1 -1
  13. package/Libraries/Core/Devtools/parseHermesStack.js +54 -34
  14. package/Libraries/Core/ExceptionsManager.js +1 -1
  15. package/Libraries/Core/InitializeCore.js +1 -1
  16. package/Libraries/Core/ReactNativeVersion.js +1 -1
  17. package/Libraries/Image/AssetSourceResolver.js +2 -1
  18. package/Libraries/Image/ImageViewNativeComponent.js +4 -4
  19. package/Libraries/Image/TextInlineImageNativeComponent.js +1 -1
  20. package/Libraries/Inspector/ElementBox.js +2 -1
  21. package/Libraries/Inspector/Inspector.js +2 -1
  22. package/Libraries/Inspector/InspectorOverlay.js +2 -1
  23. package/Libraries/Lists/FlatList.d.ts +0 -13
  24. package/Libraries/Lists/VirtualizedList.d.ts +27 -0
  25. package/Libraries/Lists/VirtualizedList.js +92 -24
  26. package/Libraries/Lists/VirtualizedListProps.js +17 -6
  27. package/Libraries/LogBox/LogBox.js +1 -1
  28. package/Libraries/NativeComponent/BaseViewConfig.android.js +2 -2
  29. package/Libraries/NativeComponent/BaseViewConfig.ios.js +13 -9
  30. package/Libraries/NativeComponent/BaseViewConfig.windows.js +13 -9
  31. package/Libraries/Network/RCTNetworking.android.js +1 -1
  32. package/Libraries/Network/RCTNetworking.ios.js +1 -1
  33. package/Libraries/Network/RCTNetworking.windows.js +1 -1
  34. package/Libraries/Network/XMLHttpRequest.js +1 -1
  35. package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -1
  36. package/Libraries/ReactNative/requireNativeComponent.js +1 -1
  37. package/Libraries/Share/Share.js +1 -1
  38. package/Libraries/StyleSheet/PlatformColorValueTypes.ios.js +1 -1
  39. package/Libraries/StyleSheet/StyleSheet.js +2 -1
  40. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +4 -0
  41. package/Libraries/StyleSheet/StyleSheetTypes.js +62 -0
  42. package/Libraries/StyleSheet/processColor.js +1 -1
  43. package/Libraries/UTFSequence.js +1 -1
  44. package/Libraries/Utilities/Dimensions.js +1 -1
  45. package/Libraries/Utilities/HMRClient.js +12 -7
  46. package/Libraries/Utilities/LoadingView.android.js +29 -2
  47. package/Libraries/Utilities/PixelRatio.js +2 -2
  48. package/Libraries/Utilities/__mocks__/PixelRatio.js +1 -1
  49. package/Libraries/WebPerformance/NativePerformanceObserver.js +0 -1
  50. package/Libraries/WebPerformance/Performance.js +2 -2
  51. package/Libraries/WebPerformance/PerformanceEntry.js +45 -0
  52. package/Libraries/WebPerformance/PerformanceEventTiming.js +38 -0
  53. package/Libraries/WebPerformance/PerformanceObserver.js +21 -45
  54. package/Libraries/YellowBox/YellowBoxDeprecated.js +2 -1
  55. package/Microsoft.ReactNative/CompositionHwndHost.idl +3 -1
  56. package/Microsoft.ReactNative/CompositionRootView.idl +2 -0
  57. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.cpp +7 -0
  58. package/Microsoft.ReactNative/Fabric/Composition/CompositionHwndHost.h +3 -0
  59. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.cpp +125 -0
  60. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootAutomationProvider.h +44 -0
  61. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.cpp +8 -0
  62. package/Microsoft.ReactNative/Fabric/Composition/CompositionRootView.h +4 -0
  63. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +1 -1
  64. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +1 -1
  65. package/Microsoft.ReactNative.Managed/packages.lock.json +2 -2
  66. package/PropertySheets/Generated/PackageVersion.g.props +1 -1
  67. package/PropertySheets/JSEngine.props +1 -1
  68. package/ReactCommon/Yoga.cpp +54 -4
  69. package/Shared/OInstance.cpp +1 -7
  70. package/Shared/Shared.vcxitems +2 -0
  71. package/codegen/react/components/rnwcore/ComponentDescriptors.h +0 -1
  72. package/codegen/react/components/rnwcore/EventEmitters.cpp +0 -7
  73. package/codegen/react/components/rnwcore/EventEmitters.h +0 -10
  74. package/codegen/react/components/rnwcore/Props.cpp +0 -15
  75. package/codegen/react/components/rnwcore/Props.h +0 -111
  76. package/codegen/react/components/rnwcore/ShadowNodes.cpp +0 -1
  77. package/codegen/react/components/rnwcore/ShadowNodes.h +0 -11
  78. package/codegen/react/components/rnwcore/States.h +0 -15
  79. package/index.js +24 -19
  80. package/index.windows.js +24 -19
  81. package/jest/mockComponent.js +4 -2
  82. package/jest/mockNativeComponent.js +1 -1
  83. package/jest/mockScrollView.js +1 -1
  84. package/jest/setup.js +8 -5
  85. package/package.json +4 -4
  86. package/Libraries/Components/ActivityIndicator/ActivityIndicator.flow.js +0 -58
  87. package/Libraries/Components/DatePicker/DatePickerIOS.android.js +0 -47
  88. package/Libraries/Components/DatePicker/DatePickerIOS.d.ts +0 -92
  89. package/Libraries/Components/DatePicker/DatePickerIOS.flow.android.js +0 -14
  90. package/Libraries/Components/DatePicker/DatePickerIOS.flow.ios.js +0 -113
  91. package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +0 -242
  92. package/Libraries/Components/DatePicker/DatePickerIOS.windows.js +0 -47
  93. package/Libraries/Components/DatePicker/RCTDatePickerNativeComponent.js +0 -60
@@ -13,7 +13,7 @@ import type {ColorValue} from '../StyleSheet/StyleSheet';
13
13
 
14
14
  import RCTActionSheetManager from './NativeActionSheetManager';
15
15
 
16
- const processColor = require('../StyleSheet/processColor');
16
+ import processColor from '../StyleSheet/processColor';
17
17
  const invariant = require('invariant');
18
18
 
19
19
  /**
@@ -391,11 +391,15 @@ const SUPPORTED_STYLES = {
391
391
  borderBottomLeftRadius: true,
392
392
  borderBottomRightRadius: true,
393
393
  borderBottomStartRadius: true,
394
+ borderEndEndRadius: true,
395
+ borderEndStartRadius: true,
394
396
  borderRadius: true,
395
397
  borderTopEndRadius: true,
396
398
  borderTopLeftRadius: true,
397
399
  borderTopRightRadius: true,
398
400
  borderTopStartRadius: true,
401
+ borderStartEndRadius: true,
402
+ borderStartStartRadius: true,
399
403
  elevation: true,
400
404
  opacity: true,
401
405
  transform: true,
@@ -10,8 +10,8 @@
10
10
  */
11
11
 
12
12
  'use strict';
13
+ import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
13
14
  import type {ViewProps} from '../View/ViewPropTypes';
14
- import type {ActivityIndicator as ActivityIndicatorType} from './ActivityIndicator.flow';
15
15
 
16
16
  import StyleSheet, {type ColorValue} from '../../StyleSheet/StyleSheet';
17
17
  import Platform from '../../Utilities/Platform';
@@ -184,8 +184,10 @@ const ActivityIndicator = (
184
184
  ```
185
185
  */
186
186
 
187
- const ActivityIndicatorWithRef: ActivityIndicatorType =
188
- React.forwardRef(ActivityIndicator);
187
+ const ActivityIndicatorWithRef: React.AbstractComponent<
188
+ Props,
189
+ HostComponent<mixed>,
190
+ > = React.forwardRef(ActivityIndicator);
189
191
  ActivityIndicatorWithRef.displayName = 'ActivityIndicator';
190
192
 
191
193
  const styles = StyleSheet.create({
@@ -203,4 +205,4 @@ const styles = StyleSheet.create({
203
205
  },
204
206
  });
205
207
 
206
- module.exports = ActivityIndicatorWithRef;
208
+ export default ActivityIndicatorWithRef;
@@ -23,7 +23,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
23
23
  validAttributes: {
24
24
  decelerationRate: true,
25
25
  disableIntervalMomentum: true,
26
- endFillColor: {process: require('../../StyleSheet/processColor')},
26
+ endFillColor: {process: require('../../StyleSheet/processColor').default},
27
27
  fadingEdgeLength: true,
28
28
  nestedScrollEnabled: true,
29
29
  overScrollMode: true,
@@ -43,14 +43,20 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
43
43
  borderBottomRightRadius: true,
44
44
  borderRadius: true,
45
45
  borderStyle: true,
46
- borderRightColor: {process: require('../../StyleSheet/processColor')},
47
- borderColor: {process: require('../../StyleSheet/processColor')},
48
- borderBottomColor: {process: require('../../StyleSheet/processColor')},
46
+ borderRightColor: {
47
+ process: require('../../StyleSheet/processColor').default,
48
+ },
49
+ borderColor: {process: require('../../StyleSheet/processColor').default},
50
+ borderBottomColor: {
51
+ process: require('../../StyleSheet/processColor').default,
52
+ },
49
53
  borderTopLeftRadius: true,
50
- borderTopColor: {process: require('../../StyleSheet/processColor')},
54
+ borderTopColor: {process: require('../../StyleSheet/processColor').default},
51
55
  removeClippedSubviews: true,
52
56
  borderTopRightRadius: true,
53
- borderLeftColor: {process: require('../../StyleSheet/processColor')},
57
+ borderLeftColor: {
58
+ process: require('../../StyleSheet/processColor').default,
59
+ },
54
60
  pointerEvents: true,
55
61
  },
56
62
  };
@@ -60,21 +60,31 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
60
60
  borderRadius: true,
61
61
  nestedScrollEnabled: true,
62
62
  borderStyle: true,
63
- borderRightColor: {process: require('../../StyleSheet/processColor')},
64
- borderColor: {process: require('../../StyleSheet/processColor')},
63
+ borderRightColor: {
64
+ process: require('../../StyleSheet/processColor').default,
65
+ },
66
+ borderColor: {
67
+ process: require('../../StyleSheet/processColor').default,
68
+ },
65
69
  borderBottomColor: {
66
- process: require('../../StyleSheet/processColor'),
70
+ process: require('../../StyleSheet/processColor').default,
67
71
  },
68
72
  persistentScrollbar: true,
69
- endFillColor: {process: require('../../StyleSheet/processColor')},
73
+ endFillColor: {
74
+ process: require('../../StyleSheet/processColor').default,
75
+ },
70
76
  fadingEdgeLength: true,
71
77
  overScrollMode: true,
72
78
  borderTopLeftRadius: true,
73
79
  scrollPerfTag: true,
74
- borderTopColor: {process: require('../../StyleSheet/processColor')},
80
+ borderTopColor: {
81
+ process: require('../../StyleSheet/processColor').default,
82
+ },
75
83
  removeClippedSubviews: true,
76
84
  borderTopRightRadius: true,
77
- borderLeftColor: {process: require('../../StyleSheet/processColor')},
85
+ borderLeftColor: {
86
+ process: require('../../StyleSheet/processColor').default,
87
+ },
78
88
  pointerEvents: true,
79
89
  },
80
90
  }
@@ -41,7 +41,7 @@ const ScrollViewViewConfig = {
41
41
  directionalLockEnabled: true,
42
42
  disableIntervalMomentum: true,
43
43
  endFillColor: {
44
- process: require('../../StyleSheet/processColor'),
44
+ process: require('../../StyleSheet/processColor').default,
45
45
  },
46
46
  fadingEdgeLength: true,
47
47
  indicatorStyle: true,
@@ -677,35 +677,39 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
677
677
  placeholder: true,
678
678
  inlineImagePadding: true,
679
679
  contextMenuHidden: true,
680
- textShadowColor: {process: require('../../StyleSheet/processColor')},
680
+ textShadowColor: {
681
+ process: require('../../StyleSheet/processColor').default,
682
+ },
681
683
  maxLength: true,
682
684
  selectTextOnFocus: true,
683
685
  textShadowRadius: true,
684
686
  underlineColorAndroid: {
685
- process: require('../../StyleSheet/processColor'),
687
+ process: require('../../StyleSheet/processColor').default,
686
688
  },
687
689
  textDecorationLine: true,
688
690
  submitBehavior: true,
689
691
  textAlignVertical: true,
690
692
  fontStyle: true,
691
693
  textShadowOffset: true,
692
- selectionColor: {process: require('../../StyleSheet/processColor')},
694
+ selectionColor: {process: require('../../StyleSheet/processColor').default},
693
695
  selection: true,
694
- placeholderTextColor: {process: require('../../StyleSheet/processColor')},
696
+ placeholderTextColor: {
697
+ process: require('../../StyleSheet/processColor').default,
698
+ },
695
699
  importantForAutofill: true,
696
700
  lineHeight: true,
697
701
  textTransform: true,
698
702
  returnKeyType: true,
699
703
  keyboardType: true,
700
704
  multiline: true,
701
- color: {process: require('../../StyleSheet/processColor')},
705
+ color: {process: require('../../StyleSheet/processColor').default},
702
706
  autoComplete: true,
703
707
  numberOfLines: true,
704
708
  letterSpacing: true,
705
709
  returnKeyLabel: true,
706
710
  fontSize: true,
707
711
  onKeyPress: true,
708
- cursorColor: {process: require('../../StyleSheet/processColor')},
712
+ cursorColor: {process: require('../../StyleSheet/processColor').default},
709
713
  text: true,
710
714
  showSoftInputOnFocus: true,
711
715
  textAlign: true,
@@ -727,16 +731,22 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
727
731
  editable: true,
728
732
  fontVariant: true,
729
733
  borderBottomRightRadius: true,
730
- borderBottomColor: {process: require('../../StyleSheet/processColor')},
734
+ borderBottomColor: {
735
+ process: require('../../StyleSheet/processColor').default,
736
+ },
731
737
  borderRadius: true,
732
- borderRightColor: {process: require('../../StyleSheet/processColor')},
733
- borderColor: {process: require('../../StyleSheet/processColor')},
738
+ borderRightColor: {
739
+ process: require('../../StyleSheet/processColor').default,
740
+ },
741
+ borderColor: {process: require('../../StyleSheet/processColor').default},
734
742
  borderTopRightRadius: true,
735
743
  borderStyle: true,
736
744
  borderBottomLeftRadius: true,
737
- borderLeftColor: {process: require('../../StyleSheet/processColor')},
745
+ borderLeftColor: {
746
+ process: require('../../StyleSheet/processColor').default,
747
+ },
738
748
  borderTopLeftRadius: true,
739
- borderTopColor: {process: require('../../StyleSheet/processColor')},
749
+ borderTopColor: {process: require('../../StyleSheet/processColor').default},
740
750
  },
741
751
  };
742
752
 
@@ -116,15 +116,21 @@ const RCTTextInputViewConfig = {
116
116
  textShadowRadius: true,
117
117
  letterSpacing: true,
118
118
  textDecorationStyle: true,
119
- textDecorationColor: {process: require('../../StyleSheet/processColor')},
120
- color: {process: require('../../StyleSheet/processColor')},
119
+ textDecorationColor: {
120
+ process: require('../../StyleSheet/processColor').default,
121
+ },
122
+ color: {process: require('../../StyleSheet/processColor').default},
121
123
  maxFontSizeMultiplier: true,
122
- textShadowColor: {process: require('../../StyleSheet/processColor')},
124
+ textShadowColor: {
125
+ process: require('../../StyleSheet/processColor').default,
126
+ },
123
127
  editable: true,
124
128
  inputAccessoryViewID: true,
125
129
  caretHidden: true,
126
130
  enablesReturnKeyAutomatically: true,
127
- placeholderTextColor: {process: require('../../StyleSheet/processColor')},
131
+ placeholderTextColor: {
132
+ process: require('../../StyleSheet/processColor').default,
133
+ },
128
134
  clearButtonMode: true,
129
135
  keyboardType: true,
130
136
  selection: true,
@@ -132,7 +138,7 @@ const RCTTextInputViewConfig = {
132
138
  submitBehavior: true,
133
139
  mostRecentEventCount: true,
134
140
  scrollEnabled: true,
135
- selectionColor: {process: require('../../StyleSheet/processColor')},
141
+ selectionColor: {process: require('../../StyleSheet/processColor').default},
136
142
  contextMenuHidden: true,
137
143
  secureTextEntry: true,
138
144
  placeholder: true,
@@ -5,7 +5,7 @@
5
5
 
6
6
  import type {HostComponent} from '../../Renderer/shims/ReactNativeTypes';
7
7
 
8
- const requireNativeComponent = require('../../ReactNative/requireNativeComponent');
8
+ import requireNativeComponent from '../../ReactNative/requireNativeComponent';
9
9
  import codegenNativeCommands from '../../Utilities/codegenNativeCommands';
10
10
  import type {TextInputNativeCommands} from './TextInputNativeCommands';
11
11
  type NativeType = HostComponent<mixed>;
@@ -125,10 +125,14 @@ const ReactNativeStyleAttributes: {[string]: AnyAttributeType, ...} = {
125
125
  borderColor: colorAttributes,
126
126
  borderCurve: true,
127
127
  borderEndColor: colorAttributes,
128
+ borderEndEndRadius: true,
129
+ borderEndStartRadius: true,
128
130
  borderLeftColor: colorAttributes,
129
131
  borderRadius: true,
130
132
  borderRightColor: colorAttributes,
131
133
  borderStartColor: colorAttributes,
134
+ borderStartEndRadius: true,
135
+ borderStartStartRadius: true,
132
136
  borderStyle: true,
133
137
  borderTopColor: colorAttributes,
134
138
  borderTopEndRadius: true,
@@ -45,7 +45,10 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
45
45
  borderTopEndRadius: true,
46
46
  borderBottomStartRadius: true,
47
47
  borderBottomEndRadius: true,
48
-
48
+ borderEndEndRadius: true,
49
+ borderEndStartRadius: true,
50
+ borderStartEndRadius: true,
51
+ borderStartStartRadius: true,
49
52
  borderStyle: true,
50
53
  hitSlop: true,
51
54
  pointerEvents: true,
@@ -61,15 +64,27 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
61
64
  borderStartWidth: true,
62
65
  borderEndWidth: true,
63
66
 
64
- borderColor: {process: require('../../StyleSheet/processColor')},
65
- borderLeftColor: {process: require('../../StyleSheet/processColor')},
66
- borderRightColor: {process: require('../../StyleSheet/processColor')},
67
- borderTopColor: {process: require('../../StyleSheet/processColor')},
67
+ borderColor: {
68
+ process: require('../../StyleSheet/processColor').default,
69
+ },
70
+ borderLeftColor: {
71
+ process: require('../../StyleSheet/processColor').default,
72
+ },
73
+ borderRightColor: {
74
+ process: require('../../StyleSheet/processColor').default,
75
+ },
76
+ borderTopColor: {
77
+ process: require('../../StyleSheet/processColor').default,
78
+ },
68
79
  borderBottomColor: {
69
- process: require('../../StyleSheet/processColor'),
80
+ process: require('../../StyleSheet/processColor').default,
81
+ },
82
+ borderStartColor: {
83
+ process: require('../../StyleSheet/processColor').default,
84
+ },
85
+ borderEndColor: {
86
+ process: require('../../StyleSheet/processColor').default,
70
87
  },
71
- borderStartColor: {process: require('../../StyleSheet/processColor')},
72
- borderEndColor: {process: require('../../StyleSheet/processColor')},
73
88
 
74
89
  focusable: true,
75
90
  overflow: true,
@@ -22,7 +22,7 @@ function convertHermesStack(stack: HermesParsedStack): Array<StackFrame> {
22
22
  continue;
23
23
  }
24
24
  const {location, functionName} = entry;
25
- if (location.type === 'NATIVE') {
25
+ if (location.type === 'NATIVE' || location.type === 'INTERNAL_BYTECODE') {
26
26
  continue;
27
27
  }
28
28
  frames.push({
@@ -10,46 +10,54 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- type HermesStackLocationNative = {|
14
- +type: 'NATIVE',
15
- |};
13
+ type HermesStackLocationNative = $ReadOnly<{
14
+ type: 'NATIVE',
15
+ }>;
16
16
 
17
- type HermesStackLocationSource = {|
18
- +type: 'SOURCE',
19
- +sourceUrl: string,
20
- +line1Based: number,
21
- +column1Based: number,
22
- |};
17
+ type HermesStackLocationSource = $ReadOnly<{
18
+ type: 'SOURCE',
19
+ sourceUrl: string,
20
+ line1Based: number,
21
+ column1Based: number,
22
+ }>;
23
23
 
24
- type HermesStackLocationBytecode = {|
25
- +type: 'BYTECODE',
26
- +sourceUrl: string,
27
- +line1Based: number,
28
- +virtualOffset0Based: number,
29
- |};
24
+ type HermesStackLocationInternalBytecode = $ReadOnly<{
25
+ type: 'INTERNAL_BYTECODE',
26
+ sourceUrl: string,
27
+ line1Based: number,
28
+ virtualOffset0Based: number,
29
+ }>;
30
+
31
+ type HermesStackLocationBytecode = $ReadOnly<{
32
+ type: 'BYTECODE',
33
+ sourceUrl: string,
34
+ line1Based: number,
35
+ virtualOffset0Based: number,
36
+ }>;
30
37
 
31
38
  type HermesStackLocation =
32
39
  | HermesStackLocationNative
33
40
  | HermesStackLocationSource
41
+ | HermesStackLocationInternalBytecode
34
42
  | HermesStackLocationBytecode;
35
43
 
36
- type HermesStackEntryFrame = {|
37
- +type: 'FRAME',
38
- +location: HermesStackLocation,
39
- +functionName: string,
40
- |};
44
+ type HermesStackEntryFrame = $ReadOnly<{
45
+ type: 'FRAME',
46
+ location: HermesStackLocation,
47
+ functionName: string,
48
+ }>;
41
49
 
42
- type HermesStackEntrySkipped = {|
43
- +type: 'SKIPPED',
44
- +count: number,
45
- |};
50
+ type HermesStackEntrySkipped = $ReadOnly<{
51
+ type: 'SKIPPED',
52
+ count: number,
53
+ }>;
46
54
 
47
55
  type HermesStackEntry = HermesStackEntryFrame | HermesStackEntrySkipped;
48
56
 
49
- export type HermesParsedStack = {|
50
- +message: string,
51
- +entries: $ReadOnlyArray<HermesStackEntry>,
52
- |};
57
+ export type HermesParsedStack = $ReadOnly<{
58
+ message: string,
59
+ entries: $ReadOnlyArray<HermesStackEntry>,
60
+ }>;
53
61
 
54
62
  // Capturing groups:
55
63
  // 1. function name
@@ -65,6 +73,11 @@ const RE_FRAME =
65
73
  // 1. count of skipped frames
66
74
  const RE_SKIPPED = /^ {4}... skipping (\d+) frames$/;
67
75
 
76
+ function isInternalBytecodeSourceUrl(sourceUrl: string): boolean {
77
+ // See https://github.com/facebook/hermes/blob/3332fa020cae0bab751f648db7c94e1d687eeec7/lib/VM/Runtime.cpp#L1100
78
+ return sourceUrl === 'InternalBytecode.js';
79
+ }
80
+
68
81
  function parseLine(line: string): ?HermesStackEntry {
69
82
  const asFrame = line.match(RE_FRAME);
70
83
  if (asFrame) {
@@ -75,12 +88,19 @@ function parseLine(line: string): ?HermesStackEntry {
75
88
  asFrame[2] === 'native'
76
89
  ? {type: 'NATIVE'}
77
90
  : asFrame[3] === 'address at '
78
- ? {
79
- type: 'BYTECODE',
80
- sourceUrl: asFrame[4],
81
- line1Based: Number.parseInt(asFrame[5], 10),
82
- virtualOffset0Based: Number.parseInt(asFrame[6], 10),
83
- }
91
+ ? isInternalBytecodeSourceUrl(asFrame[4])
92
+ ? {
93
+ type: 'INTERNAL_BYTECODE',
94
+ sourceUrl: asFrame[4],
95
+ line1Based: Number.parseInt(asFrame[5], 10),
96
+ virtualOffset0Based: Number.parseInt(asFrame[6], 10),
97
+ }
98
+ : {
99
+ type: 'BYTECODE',
100
+ sourceUrl: asFrame[4],
101
+ line1Based: Number.parseInt(asFrame[5], 10),
102
+ virtualOffset0Based: Number.parseInt(asFrame[6], 10),
103
+ }
84
104
  : {
85
105
  type: 'SOURCE',
86
106
  sourceUrl: asFrame[4],
@@ -103,7 +103,7 @@ function reportException(
103
103
  }
104
104
 
105
105
  if (__DEV__) {
106
- const LogBox = require('../LogBox/LogBox');
106
+ const LogBox = require('../LogBox/LogBox').default;
107
107
  LogBox.addException({
108
108
  ...data,
109
109
  isComponentError: !!e.isComponentError,
@@ -40,7 +40,7 @@ require('./setUpSegmentFetcher');
40
40
  if (__DEV__) {
41
41
  require('./checkNativeVersion');
42
42
  require('./setUpDeveloperTools');
43
- require('../LogBox/LogBox').install();
43
+ require('../LogBox/LogBox').default.install();
44
44
  }
45
45
 
46
46
  require('../ReactNative/AppRegistry');
@@ -13,5 +13,5 @@ exports.version = {
13
13
  major: 0,
14
14
  minor: 0,
15
15
  patch: 0,
16
- prerelease: '20221228-2020-ad953f6f4',
16
+ prerelease: '20230111-2023-573734f4e',
17
17
  };
@@ -20,7 +20,8 @@ export type ResolvedAssetSource = {|
20
20
 
21
21
  import type {PackagerAsset} from '@react-native/assets-registry/registry';
22
22
 
23
- const PixelRatio = require('../Utilities/PixelRatio');
23
+ import PixelRatio from '../Utilities/PixelRatio';
24
+
24
25
  const Platform = require('../Utilities/Platform');
25
26
  const {pickScale} = require('./AssetUtils');
26
27
  const {
@@ -71,7 +71,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
71
71
  internal_analyticTag: true,
72
72
  resizeMode: true,
73
73
  tintColor: {
74
- process: require('../StyleSheet/processColor'),
74
+ process: require('../StyleSheet/processColor').default,
75
75
  },
76
76
  borderBottomLeftRadius: true,
77
77
  borderTopLeftRadius: true,
@@ -82,10 +82,10 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
82
82
  shouldNotifyLoadEvents: true,
83
83
  defaultSrc: true,
84
84
  overlayColor: {
85
- process: require('../StyleSheet/processColor'),
85
+ process: require('../StyleSheet/processColor').default,
86
86
  },
87
87
  borderColor: {
88
- process: require('../StyleSheet/processColor'),
88
+ process: require('../StyleSheet/processColor').default,
89
89
  },
90
90
  accessible: true,
91
91
  progressiveRenderingEnabled: true,
@@ -130,7 +130,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig =
130
130
  resizeMode: true,
131
131
  source: true,
132
132
  tintColor: {
133
- process: require('../StyleSheet/processColor'),
133
+ process: require('../StyleSheet/processColor').default,
134
134
  },
135
135
  ...ConditionallyIgnoredEventHandlers({
136
136
  onLoadStart: true,
@@ -36,7 +36,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
36
36
  resizeMode: true,
37
37
  src: true,
38
38
  tintColor: {
39
- process: require('../StyleSheet/processColor'),
39
+ process: require('../StyleSheet/processColor').default,
40
40
  },
41
41
  headers: true,
42
42
  },
@@ -10,10 +10,11 @@
10
10
 
11
11
  'use strict';
12
12
 
13
+ import Dimensions from '../Utilities/Dimensions';
14
+
13
15
  const View = require('../Components/View/View');
14
16
  const flattenStyle = require('../StyleSheet/flattenStyle');
15
17
  const StyleSheet = require('../StyleSheet/StyleSheet');
16
- const Dimensions = require('../Utilities/Dimensions');
17
18
  const BorderBox = require('./BorderBox');
18
19
  const resolveBoxStyle = require('./resolveBoxStyle');
19
20
  const React = require('react');
@@ -13,12 +13,13 @@
13
13
  import type {TouchedViewDataAtPoint} from '../Renderer/shims/ReactNativeTypes';
14
14
  import type {HostRef} from './getInspectorDataForViewAtPoint';
15
15
 
16
+ import Dimensions from '../Utilities/Dimensions';
17
+
16
18
  const ReactNativeStyleAttributes = require('../Components/View/ReactNativeStyleAttributes');
17
19
  const View = require('../Components/View/View');
18
20
  const PressabilityDebug = require('../Pressability/PressabilityDebug');
19
21
  const {findNodeHandle} = require('../ReactNative/RendererProxy');
20
22
  const StyleSheet = require('../StyleSheet/StyleSheet');
21
- const Dimensions = require('../Utilities/Dimensions');
22
23
  const Platform = require('../Utilities/Platform');
23
24
  const getInspectorDataForViewAtPoint = require('./getInspectorDataForViewAtPoint');
24
25
  const InspectorOverlay = require('./InspectorOverlay');
@@ -13,9 +13,10 @@
13
13
  import type {ViewStyleProp} from '../StyleSheet/StyleSheet';
14
14
  import type {PressEvent} from '../Types/CoreEventTypes';
15
15
 
16
+ import Dimensions from '../Utilities/Dimensions';
17
+
16
18
  const View = require('../Components/View/View');
17
19
  const StyleSheet = require('../StyleSheet/StyleSheet');
18
- const Dimensions = require('../Utilities/Dimensions');
19
20
  const ElementBox = require('./ElementBox');
20
21
  const React = require('react');
21
22
 
@@ -104,19 +104,6 @@ export interface FlatListProps<ItemT> extends VirtualizedListProps<ItemT> {
104
104
  */
105
105
  numColumns?: number | undefined;
106
106
 
107
- /**
108
- * Called once when the scroll position gets within onEndReachedThreshold of the rendered content.
109
- */
110
- onEndReached?: ((info: {distanceFromEnd: number}) => void) | null | undefined;
111
-
112
- /**
113
- * How far from the end (in units of visible length of the list) the bottom edge of the
114
- * list must be from the end of the content to trigger the `onEndReached` callback.
115
- * Thus a value of 0.5 will trigger `onEndReached` when the end of the content is
116
- * within half the visible length of the list.
117
- */
118
- onEndReachedThreshold?: number | null | undefined;
119
-
120
107
  /**
121
108
  * If provided, a standard RefreshControl will be added for "Pull to Refresh" functionality.
122
109
  * Make sure to also set the refreshing prop correctly.
@@ -262,8 +262,18 @@ export interface VirtualizedListWithoutRenderItemProps<ItemT>
262
262
  */
263
263
  maxToRenderPerBatch?: number | undefined;
264
264
 
265
+ /**
266
+ * Called once when the scroll position gets within within `onEndReachedThreshold`
267
+ * from the logical end of the list.
268
+ */
265
269
  onEndReached?: ((info: {distanceFromEnd: number}) => void) | null | undefined;
266
270
 
271
+ /**
272
+ * How far from the end (in units of visible length of the list) the trailing edge of the
273
+ * list must be from the end of the content to trigger the `onEndReached` callback.
274
+ * Thus, a value of 0.5 will trigger `onEndReached` when the end of the content is
275
+ * within half the visible length of the list.
276
+ */
267
277
  onEndReachedThreshold?: number | null | undefined;
268
278
 
269
279
  onLayout?: ((event: LayoutChangeEvent) => void) | undefined;
@@ -287,6 +297,23 @@ export interface VirtualizedListWithoutRenderItemProps<ItemT>
287
297
  }) => void)
288
298
  | undefined;
289
299
 
300
+ /**
301
+ * Called once when the scroll position gets within within `onStartReachedThreshold`
302
+ * from the logical start of the list.
303
+ */
304
+ onStartReached?:
305
+ | ((info: {distanceFromStart: number}) => void)
306
+ | null
307
+ | undefined;
308
+
309
+ /**
310
+ * How far from the start (in units of visible length of the list) the leading edge of the
311
+ * list must be from the start of the content to trigger the `onStartReached` callback.
312
+ * Thus, a value of 0.5 will trigger `onStartReached` when the start of the content is
313
+ * within half the visible length of the list.
314
+ */
315
+ onStartReachedThreshold?: number | null | undefined;
316
+
290
317
  /**
291
318
  * Called when the viewability of rows changes, as defined by the
292
319
  * `viewabilityConfig` prop.