react-native-windows 0.66.3 → 0.67.0-preview.3

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 (262) hide show
  1. package/.flowconfig +2 -1
  2. package/CHANGELOG.json +917 -85
  3. package/CHANGELOG.md +352 -37
  4. package/Chakra/Chakra.vcxitems +0 -1
  5. package/Chakra/Chakra.vcxitems.filters +0 -3
  6. package/Chakra/ChakraHelpers.cpp +0 -267
  7. package/Chakra/ChakraInstanceArgs.h +0 -5
  8. package/Chakra/ChakraPlatform.h +0 -4
  9. package/Chakra/ChakraTracing.cpp +0 -33
  10. package/Chakra/ChakraValue.h +0 -4
  11. package/Chakra/Utf8DebugExtensions.cpp +0 -5
  12. package/Chakra/Utf8DebugExtensions.h +0 -6
  13. package/Libraries/ActionSheetIOS/ActionSheetIOS.js +14 -1
  14. package/Libraries/ActionSheetIOS/NativeActionSheetManager.js +2 -0
  15. package/Libraries/Alert/Alert.windows.js +48 -21
  16. package/Libraries/Alert/NativeDialogManagerWindows.js +49 -0
  17. package/Libraries/Animated/AnimatedEvent.js +23 -4
  18. package/Libraries/Animated/NativeAnimatedHelper.js +2 -2
  19. package/Libraries/Animated/components/AnimatedImage.js +3 -3
  20. package/Libraries/Animated/components/AnimatedScrollView.js +3 -3
  21. package/Libraries/Animated/components/AnimatedText.js +3 -3
  22. package/Libraries/Animated/components/AnimatedView.js +1 -3
  23. package/Libraries/Animated/createAnimatedComponent.js +3 -34
  24. package/Libraries/Components/Button.js +3 -0
  25. package/Libraries/Components/Button.windows.js +70 -38
  26. package/Libraries/Components/DatePicker/DatePickerIOS.ios.js +3 -6
  27. package/Libraries/Components/DrawerAndroid/DrawerLayoutAndroid.android.js +4 -7
  28. package/Libraries/Components/Flyout/Flyout.js +3 -3
  29. package/Libraries/Components/Flyout/Flyout.js.map +1 -1
  30. package/Libraries/Components/Flyout/FlyoutProps.d.ts +4 -0
  31. package/Libraries/Components/Flyout/FlyoutProps.js.map +1 -1
  32. package/Libraries/Components/Glyph/Glyph.js +2 -2
  33. package/Libraries/Components/Glyph/Glyph.js.map +1 -1
  34. package/Libraries/Components/Keyboard/KeyboardExt.js +4 -3
  35. package/Libraries/Components/Keyboard/KeyboardExt.js.map +1 -1
  36. package/Libraries/Components/Popup/Popup.js +3 -3
  37. package/Libraries/Components/Popup/Popup.js.map +1 -1
  38. package/Libraries/Components/ScrollView/AndroidHorizontalScrollViewNativeComponent.js +1 -0
  39. package/Libraries/Components/ScrollView/ScrollView.js +17 -16
  40. package/Libraries/Components/ScrollView/ScrollViewStickyHeader.js +268 -252
  41. package/Libraries/Components/View/View.js +1 -1
  42. package/Libraries/Components/View/View.windows.js +1 -1
  43. package/Libraries/Components/View/ViewAccessibility.js +1 -1
  44. package/Libraries/Components/View/ViewAccessibility.windows.js +1 -1
  45. package/Libraries/Components/View/ViewWindows.js +1 -1
  46. package/Libraries/Components/View/ViewWindows.js.map +1 -1
  47. package/Libraries/Components/View/ViewWindowsProps.d.ts +42 -2
  48. package/Libraries/Components/View/ViewWindowsProps.js.map +1 -1
  49. package/Libraries/Core/ExceptionsManager.js +45 -80
  50. package/Libraries/Core/ExtendedError.js +0 -1
  51. package/Libraries/Core/ReactNativeVersion.js +2 -2
  52. package/Libraries/Core/setUpBatchedBridge.js +1 -1
  53. package/Libraries/Core/setUpGlobals.js +2 -4
  54. package/Libraries/Core/setUpTimers.js +2 -2
  55. package/Libraries/Image/Image.ios.js +6 -0
  56. package/Libraries/Image/Image.windows.js +6 -0
  57. package/Libraries/Image/ImageBackground.js +10 -8
  58. package/Libraries/Image/ImageProps.js +28 -0
  59. package/Libraries/LogBox/Data/LogBoxData.js +18 -19
  60. package/Libraries/LogBox/UI/LogBoxImages/alert-triangle.png +0 -0
  61. package/Libraries/LogBox/UI/LogBoxImages/chevron-left.png +0 -0
  62. package/Libraries/LogBox/UI/LogBoxImages/chevron-right.png +0 -0
  63. package/Libraries/LogBox/UI/LogBoxImages/close.png +0 -0
  64. package/Libraries/LogBox/UI/LogBoxImages/loader.png +0 -0
  65. package/Libraries/NewAppScreen/components/logo.png +0 -0
  66. package/Libraries/PermissionsAndroid/NativePermissionsAndroid.js +2 -1
  67. package/Libraries/PermissionsAndroid/PermissionsAndroid.js +2 -0
  68. package/Libraries/Pressability/Pressability.js +13 -13
  69. package/Libraries/Pressability/Pressability.windows.js +13 -13
  70. package/Libraries/Pressability/PressabilityPerformanceEventEmitter.js +1 -1
  71. package/Libraries/ReactNative/AppRegistry.js +4 -2
  72. package/Libraries/Renderer/implementations/ReactFabric-dev.fb.js +1569 -875
  73. package/Libraries/Renderer/implementations/ReactFabric-prod.fb.js +529 -319
  74. package/Libraries/Renderer/implementations/ReactFabric-profiling.fb.js +570 -362
  75. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.fb.js +1592 -891
  76. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.fb.js +521 -311
  77. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.fb.js +562 -354
  78. package/Libraries/Share/Share.js +1 -1
  79. package/Libraries/StyleSheet/normalizeColor.js +2 -2
  80. package/Libraries/Text/Text.windows.js +1 -0
  81. package/Libraries/Text/TextNativeComponent.windows.js +72 -0
  82. package/Libraries/Text/TextProps.js +1 -7
  83. package/Libraries/TurboModule/TurboModuleRegistry.js +1 -1
  84. package/Libraries/Utilities/HMRClient.js +1 -1
  85. package/Microsoft.ReactNative/ABIViewManager.cpp +10 -1
  86. package/Microsoft.ReactNative/ABIViewManager.h +3 -0
  87. package/Microsoft.ReactNative/Base/CoreNativeModules.cpp +0 -6
  88. package/Microsoft.ReactNative/IReactDispatcher.cpp +16 -1
  89. package/Microsoft.ReactNative/IViewManager.idl +25 -0
  90. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj +35 -8
  91. package/Microsoft.ReactNative/Microsoft.ReactNative.vcxproj.filters +60 -0
  92. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.cpp +3 -4
  93. package/Microsoft.ReactNative/Modules/AccessibilityInfoModule.h +3 -3
  94. package/Microsoft.ReactNative/Modules/AlertModule.cpp +57 -14
  95. package/Microsoft.ReactNative/Modules/AlertModule.h +17 -24
  96. package/Microsoft.ReactNative/Modules/Animated/InterpolationAnimatedNode.cpp +4 -2
  97. package/Microsoft.ReactNative/Modules/Animated/PropsAnimatedNode.cpp +3 -1
  98. package/Microsoft.ReactNative/Modules/AppStateModule.cpp +8 -6
  99. package/Microsoft.ReactNative/Modules/AppStateModule.h +6 -9
  100. package/Microsoft.ReactNative/Modules/DeviceInfoModule.cpp +34 -22
  101. package/Microsoft.ReactNative/Modules/DeviceInfoModule.h +8 -4
  102. package/Microsoft.ReactNative/Modules/I18nManagerModule.cpp +6 -4
  103. package/Microsoft.ReactNative/Modules/I18nManagerModule.h +3 -2
  104. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.cpp +47 -95
  105. package/Microsoft.ReactNative/Modules/ImageViewManagerModule.h +28 -17
  106. package/Microsoft.ReactNative/Modules/LinkingManagerModule.cpp +14 -4
  107. package/Microsoft.ReactNative/Modules/NativeUIManager.cpp +1 -1
  108. package/Microsoft.ReactNative/Modules/PaperUIManagerModule.cpp +82 -66
  109. package/Microsoft.ReactNative/ReactHost/ReactInstanceWin.cpp +14 -1
  110. package/Microsoft.ReactNative/ReactInstanceSettings.idl +3 -1
  111. package/Microsoft.ReactNative/ReactPointerEventArgs.cpp +37 -0
  112. package/Microsoft.ReactNative/ReactPointerEventArgs.h +28 -0
  113. package/Microsoft.ReactNative/ReactPointerEventArgs.idl +67 -0
  114. package/Microsoft.ReactNative/Utils/TextTransform.h +1 -1
  115. package/Microsoft.ReactNative/Utils/XamlIslandUtils.cpp +24 -10
  116. package/Microsoft.ReactNative/Utils/XamlIslandUtils.h +4 -2
  117. package/Microsoft.ReactNative/Version.rc +2 -19
  118. package/Microsoft.ReactNative/Views/FlyoutViewManager.cpp +57 -2
  119. package/Microsoft.ReactNative/Views/FrameworkElementTransferProperties.cpp +3 -0
  120. package/Microsoft.ReactNative/Views/FrameworkElementViewManager.cpp +7 -2
  121. package/Microsoft.ReactNative/Views/Image/ImageViewManager.cpp +16 -6
  122. package/Microsoft.ReactNative/Views/Image/ReactImage.cpp +18 -11
  123. package/Microsoft.ReactNative/Views/Image/ReactImage.h +3 -1
  124. package/Microsoft.ReactNative/Views/RawTextViewManager.cpp +4 -53
  125. package/Microsoft.ReactNative/Views/RawTextViewManager.h +0 -3
  126. package/Microsoft.ReactNative/Views/ShadowNodeBase.h +5 -0
  127. package/Microsoft.ReactNative/Views/Text/TextHighlighterVisitor.cpp +52 -0
  128. package/Microsoft.ReactNative/Views/Text/TextHighlighterVisitor.h +37 -0
  129. package/Microsoft.ReactNative/Views/Text/TextHitTestUtils.cpp +343 -0
  130. package/Microsoft.ReactNative/Views/Text/TextHitTestUtils.h +13 -0
  131. package/Microsoft.ReactNative/Views/Text/TextHitTestVisitor.cpp +76 -0
  132. package/Microsoft.ReactNative/Views/Text/TextHitTestVisitor.h +32 -0
  133. package/Microsoft.ReactNative/Views/Text/TextParentVisitor.cpp +12 -0
  134. package/Microsoft.ReactNative/Views/Text/TextParentVisitor.h +19 -0
  135. package/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.cpp +80 -0
  136. package/Microsoft.ReactNative/Views/Text/TextPropertyChangedParentVisitor.h +43 -0
  137. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.cpp +21 -0
  138. package/Microsoft.ReactNative/Views/Text/TextTransformParentVisitor.h +23 -0
  139. package/Microsoft.ReactNative/Views/Text/TextTransformVisitor.cpp +70 -0
  140. package/Microsoft.ReactNative/Views/Text/TextTransformVisitor.h +34 -0
  141. package/Microsoft.ReactNative/Views/Text/TextVisitor.cpp +56 -0
  142. package/Microsoft.ReactNative/Views/Text/TextVisitor.h +34 -0
  143. package/Microsoft.ReactNative/Views/Text/TextVisitorScope.h +35 -0
  144. package/Microsoft.ReactNative/Views/Text/TextVisitors.h +47 -0
  145. package/Microsoft.ReactNative/Views/TextViewManager.cpp +112 -103
  146. package/Microsoft.ReactNative/Views/TextViewManager.h +6 -12
  147. package/Microsoft.ReactNative/Views/TouchEventHandler.cpp +171 -129
  148. package/Microsoft.ReactNative/Views/TouchEventHandler.h +19 -15
  149. package/Microsoft.ReactNative/Views/ViewManagerBase.cpp +31 -0
  150. package/Microsoft.ReactNative/Views/ViewManagerBase.h +2 -0
  151. package/Microsoft.ReactNative/Views/ViewViewManager.cpp +0 -5
  152. package/Microsoft.ReactNative/Views/VirtualTextViewManager.cpp +21 -91
  153. package/Microsoft.ReactNative/Views/VirtualTextViewManager.h +5 -8
  154. package/Microsoft.ReactNative/XamlView.h +3 -3
  155. package/Microsoft.ReactNative/packages.config +1 -1
  156. package/Microsoft.ReactNative.Cxx/NativeModules.h +114 -0
  157. package/Microsoft.ReactNative.Cxx/VersionMacros.h +19 -0
  158. package/PropertySheets/External/Microsoft.ReactNative.Common.props +2 -0
  159. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppApp.props +1 -0
  160. package/PropertySheets/External/Microsoft.ReactNative.Uwp.CppLib.props +1 -0
  161. package/PropertySheets/Generated/PackageVersion.g.props +19 -0
  162. package/PropertySheets/PackageVersionDefinitions.props +28 -0
  163. package/PropertySheets/React.Cpp.props +2 -0
  164. package/PropertySheets/WinUI.props +1 -1
  165. package/Scripts/Microsoft.ReactNative.Managed.nuspec +1 -1
  166. package/Scripts/copyRNLibraries.js +12 -0
  167. package/Scripts/rnw-dependencies.ps1 +25 -24
  168. package/Shared/HermesSamplingProfiler.cpp +3 -21
  169. package/Shared/JSI/ChakraApi.cpp +1 -37
  170. package/Shared/JSI/ChakraApi.h +0 -4
  171. package/Shared/JSI/ChakraJsiRuntime_edgemode.cpp +1 -5
  172. package/Shared/JSI/ChakraRuntime.cpp +0 -12
  173. package/Shared/JSI/ChakraRuntimeFactory.h +0 -2
  174. package/Shared/Modules/PlatformConstantsModule.cpp +1 -15
  175. package/Shared/OInstance.cpp +6 -19
  176. package/Shared/Shared.vcxitems +0 -1
  177. package/Shared/Shared.vcxitems.filters +0 -3
  178. package/Shared/Utils.cpp +58 -0
  179. package/Shared/Utils.h +3 -0
  180. package/codegen/NativeAccessibilityInfoSpec.g.h +9 -9
  181. package/codegen/NativeAccessibilityManagerSpec.g.h +49 -21
  182. package/codegen/NativeActionSheetManagerSpec.g.h +62 -6
  183. package/codegen/NativeAlertManagerSpec.g.h +4 -4
  184. package/codegen/NativeAnimatedModuleSpec.g.h +10 -10
  185. package/codegen/NativeAnimatedTurboModuleSpec.g.h +10 -10
  186. package/codegen/NativeAppStateSpec.g.h +25 -3
  187. package/codegen/NativeAppearanceSpec.g.h +3 -3
  188. package/codegen/NativeAsyncLocalStorageSpec.g.h +66 -18
  189. package/codegen/NativeAsyncSQLiteDBStorageSpec.g.h +66 -18
  190. package/codegen/NativeBlobModuleSpec.g.h +24 -6
  191. package/codegen/NativeBugReportingSpec.g.h +3 -3
  192. package/codegen/NativeDatePickerAndroidSpec.g.h +3 -3
  193. package/codegen/NativeDevLoadingViewSpec.g.h +3 -3
  194. package/codegen/NativeDeviceInfoSpec.g.h +18 -0
  195. package/codegen/NativeDialogManagerAndroidSpec.g.h +28 -4
  196. package/codegen/NativeDialogManagerWindowsSpec.g.h +77 -0
  197. package/codegen/NativeExceptionsManagerSpec.g.h +11 -11
  198. package/codegen/NativeFileReaderModuleSpec.g.h +6 -6
  199. package/codegen/NativeFrameRateLoggerSpec.g.h +11 -3
  200. package/codegen/NativeI18nManagerSpec.g.h +20 -0
  201. package/codegen/NativeImageEditorSpec.g.h +30 -6
  202. package/codegen/NativeImageLoaderAndroidSpec.g.h +6 -6
  203. package/codegen/NativeImageLoaderIOSSpec.g.h +6 -6
  204. package/codegen/NativeImagePickerIOSSpec.g.h +28 -12
  205. package/codegen/NativeImageStoreAndroidSpec.g.h +3 -3
  206. package/codegen/NativeImageStoreIOSSpec.g.h +21 -9
  207. package/codegen/NativeIntentAndroidSpec.g.h +3 -3
  208. package/codegen/NativeJSCHeapCaptureSpec.g.h +3 -3
  209. package/codegen/NativeJSCSamplingProfilerSpec.g.h +3 -3
  210. package/codegen/NativeJSDevSupportSpec.g.h +18 -0
  211. package/codegen/NativeNetworkingAndroidSpec.g.h +6 -6
  212. package/codegen/NativeNetworkingIOSSpec.g.h +26 -6
  213. package/codegen/NativePermissionsAndroidSpec.g.h +3 -3
  214. package/codegen/NativePlatformConstantsAndroidSpec.g.h +48 -0
  215. package/codegen/NativePlatformConstantsIOSSpec.g.h +38 -0
  216. package/codegen/NativePlatformConstantsWinSpec.g.h +32 -0
  217. package/codegen/NativePushNotificationManagerIOSSpec.g.h +35 -25
  218. package/codegen/NativeRedBoxSpec.g.h +3 -3
  219. package/codegen/NativeSampleTurboModuleSpec.g.h +32 -12
  220. package/codegen/NativeSegmentFetcherSpec.g.h +6 -6
  221. package/codegen/NativeSettingsManagerSpec.g.h +22 -6
  222. package/codegen/NativeShareModuleSpec.g.h +11 -3
  223. package/codegen/NativeSourceCodeSpec.g.h +16 -0
  224. package/codegen/NativeStatusBarManagerAndroidSpec.g.h +21 -3
  225. package/codegen/NativeStatusBarManagerIOSSpec.g.h +30 -6
  226. package/codegen/NativeToastAndroidSpec.g.h +24 -0
  227. package/codegen/NativeUIManagerSpec.g.h +63 -63
  228. package/codegen/NativeVibrationSpec.g.h +3 -3
  229. package/codegen/NativeWebSocketModuleSpec.g.h +9 -3
  230. package/index.js +15 -10
  231. package/index.windows.js +15 -10
  232. package/jest/mockModal.js +31 -0
  233. package/jest/setup.js +5 -3
  234. package/just-task.js +2 -1
  235. package/package.json +23 -20
  236. package/rntypes/BatchedBridge.d.ts +23 -0
  237. package/rntypes/Devtools.d.ts +20 -0
  238. package/rntypes/LaunchScreen.d.ts +9 -0
  239. package/rntypes/globals.d.ts +496 -0
  240. package/rntypes/index.d.ts +9966 -0
  241. package/rntypes/legacy-properties.d.ts +266 -0
  242. package/template/cpp-app/proj/MyApp.vcxproj +0 -5
  243. package/template/cpp-app/src/pch.h +1 -0
  244. package/template/cpp-lib/src/pch.h +3 -0
  245. package/template/cs-app/proj/MyApp.csproj +0 -6
  246. package/typings-index.d.ts +2 -1
  247. package/typings-index.js +7 -5
  248. package/typings-index.js.map +1 -1
  249. package/Chakra/ChakraCoreDebugger.h +0 -147
  250. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.android.js +0 -87
  251. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.ios.js +0 -30
  252. package/Libraries/Components/DatePickerAndroid/DatePickerAndroid.windows.js +0 -30
  253. package/Libraries/Components/DatePickerAndroid/DatePickerAndroidTypes.js +0 -30
  254. package/Libraries/Components/StaticContainer.react.js +0 -51
  255. package/Libraries/Components/Touchable/ensurePositiveDelayProps.js +0 -25
  256. package/Libraries/Interaction/InteractionMixin.js +0 -54
  257. package/Libraries/ReactNative/queryLayoutByID.js +0 -58
  258. package/Scripts/Microsoft.ChakraCore.ARM64.nuspec +0 -50
  259. package/Scripts/Microsoft.ChakraCore.ARM64.targets +0 -15
  260. package/Shared/JSI/ChakraCoreRuntime.h +0 -59
  261. package/template/cpp-app/keys/MyApp_TemporaryKey.pfx +0 -0
  262. package/template/cs-app/keys/MyApp_TemporaryKey.pfx +0 -0
@@ -21,7 +21,7 @@ export type Props = ViewProps;
21
21
  * supports layout with flexbox, style, some touch handling, and accessibility
22
22
  * controls.
23
23
  *
24
- * @see https://reactnative.dev/docs/view.html
24
+ * @see https://reactnative.dev/docs/view
25
25
  */
26
26
  const View: React.AbstractComponent<
27
27
  ViewProps,
@@ -25,7 +25,7 @@ export type Props = ViewProps;
25
25
  * supports layout with flexbox, style, some touch handling, and accessibility
26
26
  * controls.
27
27
  *
28
- * @see https://reactnative.dev/docs/view.html
28
+ * @see https://reactnative.dev/docs/view
29
29
  */
30
30
  const View: React.AbstractComponent<
31
31
  ViewProps,
@@ -85,5 +85,5 @@ export type AccessibilityValue = $ReadOnly<{|
85
85
  /**
86
86
  * A textual description of this component's value. (will override minimum, current, and maximum if set)
87
87
  */
88
- text?: string,
88
+ text?: Stringish,
89
89
  |}>;
@@ -122,5 +122,5 @@ export type AccessibilityValue = $ReadOnly<{|
122
122
  /**
123
123
  * A textual description of this component's value. (will override minimum, current, and maximum if set)
124
124
  */
125
- text?: string,
125
+ text?: Stringish,
126
126
  |}>;
@@ -18,5 +18,5 @@ const react_native_1 = require("react-native");
18
18
  * Prop type: {@link IViewWindowsProps}.
19
19
  *
20
20
  */
21
- exports.ViewWindows = react_1.default.forwardRef((props, ref) => (react_1.default.createElement(react_native_1.View, Object.assign({ ref: ref }, props))));
21
+ exports.ViewWindows = react_1.default.forwardRef((props, ref) => (react_1.default.createElement(react_native_1.View, { ref: ref, ...props })));
22
22
  //# sourceMappingURL=ViewWindows.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"ViewWindows.js","sourceRoot":"","sources":["../../../src/Libraries/Components/View/ViewWindows.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAGH,kDAA0B;AAC1B,+CAAkC;AAOlC;;;;;;GAMG;AACU,QAAA,WAAW,GAAG,eAAK,CAAC,UAAU,CACzC,CAAC,KAAwB,EAAE,GAAmB,EAAE,EAAE,CAAC,CACjD,8BAAC,mBAAI,kBAAC,GAAG,EAAE,GAAG,IAAM,KAAK,EAAI,CAC9B,CACiB,CAAC","sourcesContent":["/**\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n * @format\n */\n\nimport {IViewWindowsProps} from './ViewWindowsProps';\nimport React from 'react';\nimport {View} from 'react-native';\n\ntype ViewWindowsType = React.ForwardRefExoticComponent<\n IViewWindowsProps & React.RefAttributes<View>\n> &\n View;\n\n/**\n * Same as {@link https://facebook.github.io/react-native/docs/view | react-native's View}, but with extra Windows specific functionality\n *\n * @remarks\n * Prop type: {@link IViewWindowsProps}.\n *\n */\nexport const ViewWindows = React.forwardRef(\n (props: IViewWindowsProps, ref: React.Ref<any>) => (\n <View ref={ref} {...props} />\n ),\n) as ViewWindowsType;\n\nexport type ViewWindows = ViewWindowsType;\n"]}
1
+ {"version":3,"file":"ViewWindows.js","sourceRoot":"","sources":["../../../src/Libraries/Components/View/ViewWindows.tsx"],"names":[],"mappings":";AAAA;;;;GAIG;;;;;;AAGH,kDAA0B;AAC1B,+CAAkC;AAOlC;;;;;;GAMG;AACU,QAAA,WAAW,GAAG,eAAK,CAAC,UAAU,CACzC,CAAC,KAAwB,EAAE,GAAmB,EAAE,EAAE,CAAC,CACjD,8BAAC,mBAAI,IAAC,GAAG,EAAE,GAAG,KAAM,KAAK,GAAI,CAC9B,CACiB,CAAC","sourcesContent":["/**\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n * @format\n */\n\nimport {IViewWindowsProps} from './ViewWindowsProps';\nimport React from 'react';\nimport {View} from 'react-native';\n\ntype ViewWindowsType = React.ForwardRefExoticComponent<\n IViewWindowsProps & React.RefAttributes<View>\n> &\n View;\n\n/**\n * Same as {@link https://facebook.github.io/react-native/docs/view | react-native's View}, but with extra Windows specific functionality\n *\n * @remarks\n * Prop type: {@link IViewWindowsProps}.\n *\n */\nexport const ViewWindows = React.forwardRef(\n (props: IViewWindowsProps, ref: React.Ref<any>) => (\n <View ref={ref} {...props} />\n ),\n) as ViewWindowsType;\n\nexport type ViewWindows = ViewWindowsType;\n"]}
@@ -4,7 +4,28 @@
4
4
  * @format
5
5
  */
6
6
  import { IKeyboardProps } from '../Keyboard/KeyboardExtProps';
7
- import { ViewProps } from 'react-native';
7
+ import { NativeSyntheticEvent, ViewProps } from 'react-native';
8
+ export declare type INativeMouseEvent = {
9
+ target: number;
10
+ identifier: number;
11
+ pageX: number;
12
+ pageY: number;
13
+ locationX: number;
14
+ locationY: number;
15
+ timestamp: number;
16
+ pointerType: string;
17
+ force: number;
18
+ isLeftButton: boolean;
19
+ isRightButton: boolean;
20
+ isMiddleButton: boolean;
21
+ isBarrelButtonPressed: boolean;
22
+ isHorizontalScrollWheel: boolean;
23
+ isEraser: boolean;
24
+ shiftKey: boolean;
25
+ ctrlKey: boolean;
26
+ altKey: boolean;
27
+ };
28
+ export declare type IMouseEvent = NativeSyntheticEvent<INativeMouseEvent>;
8
29
  /**
9
30
  * @remarks
10
31
  * Props type for ViewWindows component
@@ -25,5 +46,24 @@ export interface IViewWindowsProps extends IKeyboardProps, ViewProps {
25
46
  * See https://github.com/ReactWindows/discussions-and-proposals/blob/harinik-accessibility/proposals/0000-accessibilityapis-lists.md
26
47
  */
27
48
  accessibilitySetSize?: number;
28
- focusable?: boolean;
49
+ /**
50
+ * Specifies the Tooltip for the view
51
+ */
52
+ tooltip?: string;
53
+ /**
54
+ * Indicates the TabIndex to use for this view
55
+ */
56
+ tabIndex?: number;
57
+ /**
58
+ * Specifies if the control should show System focus visuals
59
+ */
60
+ enableFocusRing?: boolean;
61
+ /**
62
+ * Event fired when the mouse leaves the view
63
+ */
64
+ onMouseLeave?: (args: IMouseEvent) => void;
65
+ /**
66
+ * Event fired when the mouse enters the view
67
+ */
68
+ onMouseEnter?: (args: IMouseEvent) => void;
29
69
  }
@@ -1 +1 @@
1
- {"version":3,"file":"ViewWindowsProps.js","sourceRoot":"","sources":["../../../src/Libraries/Components/View/ViewWindowsProps.ts"],"names":[],"mappings":";AAAA;;;;GAIG","sourcesContent":["/**\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n * @format\n */\n\nimport {IKeyboardProps} from '../Keyboard/KeyboardExtProps';\nimport {ViewProps} from 'react-native';\n\n/**\n * @remarks\n * Props type for ViewWindows component\n *\n * Extends: {@link IKeyboardProps} and {@link https://facebook.github.io/react-native/docs/view | react-native's ViewProps}\n */\nexport interface IViewWindowsProps extends IKeyboardProps, ViewProps {\n children?: any;\n\n /**\n * Indicates to accessibility services that the UI Component is within a set and has the given numbered position.\n *\n * See https://github.com/ReactWindows/discussions-and-proposals/blob/harinik-accessibility/proposals/0000-accessibilityapis-lists.md\n */\n accessibilityPosInSet?: number;\n\n /**\n * Indicates to accessibility services that the UI Component is within a set with the given size.\n *\n * See https://github.com/ReactWindows/discussions-and-proposals/blob/harinik-accessibility/proposals/0000-accessibilityapis-lists.md\n */\n accessibilitySetSize?: number;\n focusable?: boolean;\n}\n"]}
1
+ {"version":3,"file":"ViewWindowsProps.js","sourceRoot":"","sources":["../../../src/Libraries/Components/View/ViewWindowsProps.ts"],"names":[],"mappings":";AAAA;;;;GAIG","sourcesContent":["/**\n * Copyright (c) Microsoft Corporation.\n * Licensed under the MIT License.\n * @format\n */\n\nimport {IKeyboardProps} from '../Keyboard/KeyboardExtProps';\nimport {NativeSyntheticEvent, ViewProps} from 'react-native';\n\nexport type INativeMouseEvent = {\n target: number;\n identifier: number;\n pageX: number;\n pageY: number;\n locationX: number;\n locationY: number;\n timestamp: number;\n pointerType: string;\n force: number;\n isLeftButton: boolean;\n isRightButton: boolean;\n isMiddleButton: boolean;\n isBarrelButtonPressed: boolean;\n isHorizontalScrollWheel: boolean;\n isEraser: boolean;\n shiftKey: boolean;\n ctrlKey: boolean;\n altKey: boolean;\n};\n\nexport type IMouseEvent = NativeSyntheticEvent<INativeMouseEvent>;\n\n/**\n * @remarks\n * Props type for ViewWindows component\n *\n * Extends: {@link IKeyboardProps} and {@link https://facebook.github.io/react-native/docs/view | react-native's ViewProps}\n */\nexport interface IViewWindowsProps extends IKeyboardProps, ViewProps {\n children?: any;\n\n /**\n * Indicates to accessibility services that the UI Component is within a set and has the given numbered position.\n *\n * See https://github.com/ReactWindows/discussions-and-proposals/blob/harinik-accessibility/proposals/0000-accessibilityapis-lists.md\n */\n accessibilityPosInSet?: number;\n\n /**\n * Indicates to accessibility services that the UI Component is within a set with the given size.\n *\n * See https://github.com/ReactWindows/discussions-and-proposals/blob/harinik-accessibility/proposals/0000-accessibilityapis-lists.md\n */\n accessibilitySetSize?: number;\n\n /**\n * Specifies the Tooltip for the view\n */\n tooltip?: string;\n\n /**\n * Indicates the TabIndex to use for this view\n */\n tabIndex?: number;\n\n /**\n * Specifies if the control should show System focus visuals\n */\n enableFocusRing?: boolean;\n\n /**\n * Event fired when the mouse leaves the view\n */\n onMouseLeave?: (args: IMouseEvent) => void;\n\n /**\n * Event fired when the mouse enters the view\n */\n onMouseEnter?: (args: IMouseEvent) => void;\n}\n"]}
@@ -56,92 +56,57 @@ function reportException(
56
56
  isFatal: boolean,
57
57
  reportToConsole: boolean, // only true when coming from handleException; the error has not yet been logged
58
58
  ) {
59
- const NativeExceptionsManager = require('./NativeExceptionsManager').default;
60
- if (NativeExceptionsManager) {
61
- const parseErrorStack = require('./Devtools/parseErrorStack');
62
- const stack = parseErrorStack(e?.stack);
63
- const currentExceptionID = ++exceptionID;
64
- const originalMessage = e.message || '';
65
- let message = originalMessage;
66
- if (e.componentStack != null) {
67
- message += `\n\nThis error is located at:${e.componentStack}`;
68
- }
69
- const namePrefix = e.name == null || e.name === '' ? '' : `${e.name}: `;
70
-
71
- if (!message.startsWith(namePrefix)) {
72
- message = namePrefix + message;
73
- }
74
-
75
- message =
76
- e.jsEngine == null ? message : `${message}, js engine: ${e.jsEngine}`;
59
+ const parseErrorStack = require('./Devtools/parseErrorStack');
60
+ const stack = parseErrorStack(e?.stack);
61
+ const currentExceptionID = ++exceptionID;
62
+ const originalMessage = e.message || '';
63
+ let message = originalMessage;
64
+ if (e.componentStack != null) {
65
+ message += `\n\nThis error is located at:${e.componentStack}`;
66
+ }
67
+ const namePrefix = e.name == null || e.name === '' ? '' : `${e.name}: `;
77
68
 
78
- const isHandledByLogBox =
79
- e.forceRedbox !== true && !global.RN$Bridgeless && !global.RN$Express;
69
+ if (!message.startsWith(namePrefix)) {
70
+ message = namePrefix + message;
71
+ }
80
72
 
81
- const data = preprocessException({
82
- message,
83
- originalMessage: message === originalMessage ? null : originalMessage,
84
- name: e.name == null || e.name === '' ? null : e.name,
85
- componentStack:
86
- typeof e.componentStack === 'string' ? e.componentStack : null,
87
- stack,
88
- id: currentExceptionID,
89
- isFatal,
90
- extraData: {
91
- jsEngine: e.jsEngine,
92
- rawStack: e.stack,
73
+ message =
74
+ e.jsEngine == null ? message : `${message}, js engine: ${e.jsEngine}`;
75
+
76
+ const data = preprocessException({
77
+ message,
78
+ originalMessage: message === originalMessage ? null : originalMessage,
79
+ name: e.name == null || e.name === '' ? null : e.name,
80
+ componentStack:
81
+ typeof e.componentStack === 'string' ? e.componentStack : null,
82
+ stack,
83
+ id: currentExceptionID,
84
+ isFatal,
85
+ extraData: {
86
+ jsEngine: e.jsEngine,
87
+ rawStack: e.stack,
88
+ },
89
+ });
90
+
91
+ if (reportToConsole) {
92
+ // we feed back into console.error, to make sure any methods that are
93
+ // monkey patched on top of console.error are called when coming from
94
+ // handleException
95
+ console.error(data.message);
96
+ }
93
97
 
94
- // Hack to hide native redboxes when in the LogBox experiment.
95
- // This is intentionally untyped and stuffed here, because it is temporary.
96
- suppressRedBox: isHandledByLogBox,
97
- },
98
+ if (__DEV__) {
99
+ const LogBox = require('../LogBox/LogBox');
100
+ LogBox.addException({
101
+ ...data,
102
+ isComponentError: !!e.isComponentError,
98
103
  });
99
-
100
- if (reportToConsole) {
101
- // we feed back into console.error, to make sure any methods that are
102
- // monkey patched on top of console.error are called when coming from
103
- // handleException
104
- console.error(data.message);
105
- }
106
-
107
- if (__DEV__ && isHandledByLogBox) {
108
- const LogBox = require('../LogBox/LogBox');
109
- LogBox.addException({
110
- ...data,
111
- isComponentError: !!e.isComponentError,
112
- });
113
- }
114
-
115
- if (isFatal || e.type !== 'warn') {
104
+ } else if (isFatal || e.type !== 'warn') {
105
+ const NativeExceptionsManager = require('./NativeExceptionsManager')
106
+ .default;
107
+ if (NativeExceptionsManager) {
116
108
  NativeExceptionsManager.reportException(data);
117
-
118
- if (__DEV__ && !global.RN$Express) {
119
- if (e.preventSymbolication === true) {
120
- return;
121
- }
122
- const symbolicateStackTrace = require('./Devtools/symbolicateStackTrace');
123
- symbolicateStackTrace(stack)
124
- .then(({stack: prettyStack}) => {
125
- if (prettyStack) {
126
- NativeExceptionsManager.updateExceptionMessage(
127
- data.message,
128
- prettyStack,
129
- currentExceptionID,
130
- );
131
- } else {
132
- throw new Error('The stack is null');
133
- }
134
- })
135
- .catch(error => {
136
- console.log('Unable to symbolicate stack trace: ' + error.message);
137
- });
138
- }
139
109
  }
140
- } else if (reportToConsole) {
141
- // we feed back into console.error, to make sure any methods that are
142
- // monkey patched on top of console.error are called when coming from
143
- // handleException
144
- console.error(e);
145
110
  }
146
111
  }
147
112
 
@@ -12,7 +12,6 @@ export type ExtendedError = Error & {
12
12
  jsEngine?: string,
13
13
  preventSymbolication?: boolean,
14
14
  componentStack?: string,
15
- forceRedbox?: boolean,
16
15
  isComponentError?: boolean,
17
16
  type?: string,
18
17
  ...
@@ -11,7 +11,7 @@
11
11
 
12
12
  exports.version = {
13
13
  major: 0,
14
- minor: 66,
14
+ minor: 67,
15
15
  patch: 0,
16
- prerelease: null,
16
+ prerelease: 'rc.1',
17
17
  };
@@ -11,7 +11,7 @@
11
11
  'use strict';
12
12
 
13
13
  let registerModule;
14
- if (global.RN$Bridgeless && global.RN$registerCallableModule) {
14
+ if (global.RN$Bridgeless === true && global.RN$registerCallableModule) {
15
15
  registerModule = global.RN$registerCallableModule;
16
16
  } else {
17
17
  const BatchedBridge = require('../BatchedBridge/BatchedBridge');
@@ -14,15 +14,13 @@
14
14
  * Sets up global variables for React Native.
15
15
  * You can use this module directly, or just require InitializeCore.
16
16
  */
17
- if (global.GLOBAL === undefined) {
18
- global.GLOBAL = global;
19
- }
20
-
21
17
  if (global.window === undefined) {
18
+ // $FlowFixMe[cannot-write]
22
19
  global.window = global;
23
20
  }
24
21
 
25
22
  if (global.self === undefined) {
23
+ // $FlowFixMe[cannot-write]
26
24
  global.self = global;
27
25
  }
28
26
 
@@ -28,7 +28,7 @@ const hasNativePromise = isNativeFunction(Promise);
28
28
  const hasPromiseQueuedToJSVM = hasNativePromise || hasHermesPromiseQueuedToJSVM;
29
29
 
30
30
  // In bridgeless mode, timers are host functions installed from cpp.
31
- if (!global.RN$Bridgeless) {
31
+ if (global.RN$Bridgeless !== true) {
32
32
  /**
33
33
  * Set up timers.
34
34
  * You can use this module directly, or just require InitializeCore.
@@ -65,7 +65,7 @@ if (hasPromiseQueuedToJSVM) {
65
65
  // When promise was polyfilled hence is queued to the RN microtask queue,
66
66
  // we polyfill the immediate APIs as aliases to the ReactNativeMicrotask APIs.
67
67
  // Note that in bridgeless mode, immediate APIs are installed from cpp.
68
- if (!global.RN$Bridgeless) {
68
+ if (global.RN$Bridgeless !== true) {
69
69
  polyfillGlobal(
70
70
  'setImmediate',
71
71
  () => require('./Timers/JSTimers').queueReactNativeMicrotask,
@@ -12,6 +12,7 @@ import DeprecatedImagePropType from '../DeprecatedPropTypes/DeprecatedImagePropT
12
12
  import * as React from 'react';
13
13
  import StyleSheet from '../StyleSheet/StyleSheet';
14
14
 
15
+ import ImageInjection from './ImageInjection';
15
16
  import ImageAnalyticsTagContext from './ImageAnalyticsTagContext';
16
17
  import flattenStyle from '../StyleSheet/flattenStyle';
17
18
  import resolveAssetSource from './resolveAssetSource';
@@ -168,6 +169,11 @@ Image = React.forwardRef<
168
169
  ImagePropsType,
169
170
  React.ElementRef<typeof ImageViewNativeComponent>,
170
171
  >(Image);
172
+
173
+ if (ImageInjection.unstable_createImageComponent != null) {
174
+ Image = ImageInjection.unstable_createImageComponent(Image);
175
+ }
176
+
171
177
  Image.displayName = 'Image';
172
178
 
173
179
  /**
@@ -12,6 +12,7 @@ import DeprecatedImagePropType from '../DeprecatedPropTypes/DeprecatedImagePropT
12
12
  import * as React from 'react';
13
13
  import StyleSheet from '../StyleSheet/StyleSheet';
14
14
 
15
+ import ImageInjection from './ImageInjection';
15
16
  import ImageAnalyticsTagContext from './ImageAnalyticsTagContext';
16
17
  import flattenStyle from '../StyleSheet/flattenStyle';
17
18
  import resolveAssetSource from './resolveAssetSource';
@@ -184,6 +185,11 @@ Image = React.forwardRef<
184
185
  ImagePropsType,
185
186
  React.ElementRef<typeof ImageViewNativeComponent>,
186
187
  >(Image);
188
+
189
+ if (ImageInjection.unstable_createImageComponent != null) {
190
+ Image = ImageInjection.unstable_createImageComponent(Image);
191
+ }
192
+
187
193
  Image.displayName = 'Image';
188
194
 
189
195
  /**
@@ -10,10 +10,12 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- const Image = require('./Image');
14
- const React = require('react');
15
- const StyleSheet = require('../StyleSheet/StyleSheet');
16
- const View = require('../Components/View/View');
13
+ import Image from './Image';
14
+ import * as React from 'react';
15
+ import StyleSheet from '../StyleSheet/StyleSheet';
16
+ import flattenStyle from '../StyleSheet/flattenStyle';
17
+ import View from '../Components/View/View';
18
+ import type {ImageBackgroundProps} from './ImageProps';
17
19
 
18
20
  /**
19
21
  * Very simple drop-in replacement for <Image> which supports nesting views.
@@ -39,7 +41,7 @@ const View = require('../Components/View/View');
39
41
  * AppRegistry.registerComponent('DisplayAnImageBackground', () => DisplayAnImageBackground);
40
42
  * ```
41
43
  */
42
- class ImageBackground extends React.Component<$FlowFixMeProps> {
44
+ class ImageBackground extends React.Component<ImageBackgroundProps> {
43
45
  setNativeProps(props: Object) {
44
46
  // Work-around flow
45
47
  const viewRef = this._viewRef;
@@ -56,7 +58,7 @@ class ImageBackground extends React.Component<$FlowFixMeProps> {
56
58
 
57
59
  render(): React.Node {
58
60
  const {children, style, imageStyle, imageRef, ...props} = this.props;
59
-
61
+ const flattenedStyle = flattenStyle(style);
60
62
  return (
61
63
  <View
62
64
  accessibilityIgnoresInvertColors={true}
@@ -74,8 +76,8 @@ class ImageBackground extends React.Component<$FlowFixMeProps> {
74
76
  // So, we have to proxy/reapply these styles explicitly for actual <Image> component.
75
77
  // This workaround should be removed after implementing proper support of
76
78
  // intrinsic content size of the <Image>.
77
- width: style?.width,
78
- height: style?.height,
79
+ width: flattenedStyle?.width,
80
+ height: flattenedStyle?.height,
79
81
  },
80
82
  imageStyle,
81
83
  ]}
@@ -15,6 +15,8 @@ import type {EdgeInsetsProp} from '../StyleSheet/EdgeInsetsPropType';
15
15
  import type {ImageSource} from './ImageSource';
16
16
  import type {ViewStyleProp, ImageStyleProp} from '../StyleSheet/StyleSheet';
17
17
  import type {ViewProps} from '../Components/View/ViewPropTypes';
18
+ import type {Node, Ref} from 'react';
19
+ import typeof Image from './Image';
18
20
 
19
21
  export type ImageLoadEvent = SyntheticEvent<
20
22
  $ReadOnly<{|
@@ -171,3 +173,29 @@ export type ImageProps = {|
171
173
  src?: empty,
172
174
  children?: empty,
173
175
  |};
176
+
177
+ export type ImageBackgroundProps = $ReadOnly<{|
178
+ ...ImageProps,
179
+ children?: Node,
180
+
181
+ /**
182
+ * Style applied to the outer View component
183
+ *
184
+ * See https://reactnative.dev/docs/imagebackground#style
185
+ */
186
+ style?: ?ViewStyleProp,
187
+
188
+ /**
189
+ * Style applied to the inner Image component
190
+ *
191
+ * See https://reactnative.dev/docs/imagebackground#imagestyle
192
+ */
193
+ imageStyle?: ?ImageStyleProp,
194
+
195
+ /**
196
+ * Allows to set a reference to the inner Image component
197
+ *
198
+ * See https://reactnative.dev/docs/imagebackground#imageref
199
+ */
200
+ imageRef?: Ref<Image>,
201
+ |}>;
@@ -100,7 +100,6 @@ export function reportLogBoxError(
100
100
  ): void {
101
101
  const ExceptionsManager = require('../../Core/ExceptionsManager');
102
102
 
103
- error.forceRedbox = true;
104
103
  error.message = `${LOGBOX_ERROR_MESSAGE}\n\n${error.message}`;
105
104
  if (componentStack != null) {
106
105
  error.componentStack = componentStack;
@@ -320,40 +319,40 @@ export function checkWarningFilter(format: string): WarningInfo {
320
319
  return warningFilter(format);
321
320
  }
322
321
 
322
+ export function getIgnorePatterns(): $ReadOnlyArray<IgnorePattern> {
323
+ return Array.from(ignorePatterns);
324
+ }
325
+
323
326
  export function addIgnorePatterns(
324
327
  patterns: $ReadOnlyArray<IgnorePattern>,
325
328
  ): void {
329
+ const existingSize = ignorePatterns.size;
326
330
  // The same pattern may be added multiple times, but adding a new pattern
327
331
  // can be expensive so let's find only the ones that are new.
328
- const newPatterns = patterns.filter((pattern: IgnorePattern) => {
332
+ patterns.forEach((pattern: IgnorePattern) => {
329
333
  if (pattern instanceof RegExp) {
330
- for (const existingPattern of ignorePatterns.entries()) {
334
+ for (const existingPattern of ignorePatterns) {
331
335
  if (
332
336
  existingPattern instanceof RegExp &&
333
337
  existingPattern.toString() === pattern.toString()
334
338
  ) {
335
- return false;
339
+ return;
336
340
  }
337
341
  }
338
- return true;
342
+ ignorePatterns.add(pattern);
339
343
  }
340
- return !ignorePatterns.has(pattern);
344
+ ignorePatterns.add(pattern);
341
345
  });
342
-
343
- if (newPatterns.length === 0) {
346
+ if (ignorePatterns.size === existingSize) {
344
347
  return;
345
348
  }
346
- for (const pattern of newPatterns) {
347
- ignorePatterns.add(pattern);
348
-
349
- // We need to recheck all of the existing logs.
350
- // This allows adding an ignore pattern anywhere in the codebase.
351
- // Without this, if you ignore a pattern after the a log is created,
352
- // then we would keep showing the log.
353
- logs = new Set(
354
- Array.from(logs).filter(log => !isMessageIgnored(log.message.content)),
355
- );
356
- }
349
+ // We need to recheck all of the existing logs.
350
+ // This allows adding an ignore pattern anywhere in the codebase.
351
+ // Without this, if you ignore a pattern after the a log is created,
352
+ // then we would keep showing the log.
353
+ logs = new Set(
354
+ Array.from(logs).filter(log => !isMessageIgnored(log.message.content)),
355
+ );
357
356
  handleUpdate();
358
357
  }
359
358
 
@@ -44,7 +44,8 @@ export type PermissionType =
44
44
  | 'android.permission.WRITE_EXTERNAL_STORAGE'
45
45
  | 'android.permission.BLUETOOTH_CONNECT'
46
46
  | 'android.permission.BLUETOOTH_SCAN'
47
- | 'android.permission.BLUETOOTH_ADVERTISE';
47
+ | 'android.permission.BLUETOOTH_ADVERTISE'
48
+ | 'android.permission.ACCESS_MEDIA_LOCATION';
48
49
  */
49
50
 
50
51
  export interface Spec extends TurboModule {
@@ -62,6 +62,7 @@ const PERMISSIONS = Object.freeze({
62
62
  BLUETOOTH_CONNECT: 'android.permission.BLUETOOTH_CONNECT',
63
63
  BLUETOOTH_SCAN: 'android.permission.BLUETOOTH_SCAN',
64
64
  BLUETOOTH_ADVERTISE: 'android.permission.BLUETOOTH_ADVERTISE',
65
+ ACCESS_MEDIA_LOCATION: 'android.permission.ACCESS_MEDIA_LOCATION',
65
66
  });
66
67
 
67
68
  /**
@@ -75,6 +76,7 @@ class PermissionsAndroid {
75
76
  ACCESS_BACKGROUND_LOCATION: string,
76
77
  ACCESS_COARSE_LOCATION: string,
77
78
  ACCESS_FINE_LOCATION: string,
79
+ ACCESS_MEDIA_LOCATION: string,
78
80
  ADD_VOICEMAIL: string,
79
81
  BLUETOOTH_ADVERTISE: string,
80
82
  BLUETOOTH_CONNECT: string,
@@ -608,6 +608,19 @@ export default class Pressability {
608
608
  * and stores the new state. Validates the transition as well.
609
609
  */
610
610
  _receiveSignal(signal: TouchSignal, event: PressEvent): void {
611
+ // Especially on iOS, not all events have timestamps associated.
612
+ // For telemetry purposes, this doesn't matter too much, as long as *some* do.
613
+ // Since the native timestamp is integral for logging telemetry, just skip
614
+ // events if they don't have a timestamp attached.
615
+ if (event.nativeEvent.timestamp != null) {
616
+ PressabilityPerformanceEventEmitter.emitEvent(() => {
617
+ return {
618
+ signal,
619
+ nativeTimestamp: event.nativeEvent.timestamp,
620
+ };
621
+ });
622
+ }
623
+
611
624
  const prevState = this._touchState;
612
625
  const nextState = Transitions[prevState]?.[signal];
613
626
  if (this._responderID == null && signal === 'RESPONDER_RELEASE') {
@@ -623,19 +636,6 @@ export default class Pressability {
623
636
  : '<<host component>>',
624
637
  );
625
638
  if (prevState !== nextState) {
626
- // Especially on iOS, not all events have timestamps associated.
627
- // For telemetry purposes, this doesn't matter too much, as long as *some* do.
628
- // Since the native timestamp is integral for logging telemetry, just skip
629
- // events if they don't have a timestamp attached.
630
- if (event.nativeEvent.timestamp != null) {
631
- PressabilityPerformanceEventEmitter.emitEvent(() => {
632
- return {
633
- signal,
634
- touchDelayMs: Date.now() - event.nativeEvent.timestamp,
635
- };
636
- });
637
- }
638
-
639
639
  this._performTransitionSideEffects(prevState, nextState, signal, event);
640
640
  this._touchState = nextState;
641
641
  }
@@ -689,6 +689,19 @@ export default class Pressability {
689
689
  * and stores the new state. Validates the transition as well.
690
690
  */
691
691
  _receiveSignal(signal: TouchSignal, event: PressEvent): void {
692
+ // Especially on iOS, not all events have timestamps associated.
693
+ // For telemetry purposes, this doesn't matter too much, as long as *some* do.
694
+ // Since the native timestamp is integral for logging telemetry, just skip
695
+ // events if they don't have a timestamp attached.
696
+ if (event.nativeEvent.timestamp != null) {
697
+ PressabilityPerformanceEventEmitter.emitEvent(() => {
698
+ return {
699
+ signal,
700
+ nativeTimestamp: event.nativeEvent.timestamp,
701
+ };
702
+ });
703
+ }
704
+
692
705
  const prevState = this._touchState;
693
706
  const nextState = Transitions[prevState]?.[signal];
694
707
  if (this._responderID == null && signal === 'RESPONDER_RELEASE') {
@@ -704,19 +717,6 @@ export default class Pressability {
704
717
  : '<<host component>>',
705
718
  );
706
719
  if (prevState !== nextState) {
707
- // Especially on iOS, not all events have timestamps associated.
708
- // For telemetry purposes, this doesn't matter too much, as long as *some* do.
709
- // Since the native timestamp is integral for logging telemetry, just skip
710
- // events if they don't have a timestamp attached.
711
- if (event.nativeEvent.timestamp != null) {
712
- PressabilityPerformanceEventEmitter.emitEvent(() => {
713
- return {
714
- signal,
715
- touchDelayMs: Date.now() - event.nativeEvent.timestamp,
716
- };
717
- });
718
- }
719
-
720
720
  this._performTransitionSideEffects(prevState, nextState, signal, event);
721
721
  this._touchState = nextState;
722
722
  }