@office-iss/react-native-win32 0.0.0-canary.292 → 0.0.0-canary.294

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 (123) hide show
  1. package/.flowconfig +8 -1
  2. package/CHANGELOG.json +58 -1
  3. package/CHANGELOG.md +22 -4
  4. package/IntegrationTests/ImageCachePolicyTest.js +1 -1
  5. package/IntegrationTests/LayoutEventsTest.js +1 -4
  6. package/Libraries/Animated/AnimatedExports.js.flow +126 -0
  7. package/Libraries/Animated/AnimatedImplementation.js +0 -121
  8. package/Libraries/Animated/animations/Animation.js +8 -4
  9. package/Libraries/Animated/nodes/AnimatedNode.js +2 -2
  10. package/Libraries/Animated/nodes/AnimatedValue.js +8 -4
  11. package/Libraries/BatchedBridge/NativeModules.js +2 -0
  12. package/Libraries/Blob/BlobManager.js +1 -0
  13. package/Libraries/Blob/URL.js +13 -1
  14. package/Libraries/Components/Pressable/Pressable.js +4 -1
  15. package/Libraries/Components/Pressable/Pressable.win32.js +4 -1
  16. package/Libraries/Components/ScrollView/ScrollView.d.ts +2 -2
  17. package/Libraries/Components/ScrollView/ScrollView.js +1 -0
  18. package/Libraries/Components/Switch/Switch.js +7 -3
  19. package/Libraries/Components/TextInput/AndroidTextInputNativeComponent.js +1 -0
  20. package/Libraries/Components/TextInput/RCTTextInputViewConfig.js +1 -0
  21. package/Libraries/Components/TextInput/TextInput.flow.js +25 -0
  22. package/Libraries/Components/TextInput/TextInput.flow.win32.js +25 -1
  23. package/Libraries/Components/TextInput/TextInput.js +3 -0
  24. package/Libraries/Components/TextInput/TextInput.win32.js +2 -0
  25. package/Libraries/Components/View/View.js +18 -21
  26. package/Libraries/Components/View/View.win32.js +21 -24
  27. package/Libraries/Components/View/ViewAccessibility.js +16 -0
  28. package/Libraries/Core/ReactNativeVersion.js +1 -1
  29. package/Libraries/Core/setUpReactDevTools.js +5 -5
  30. package/Libraries/Image/ImageProps.js +2 -3
  31. package/Libraries/Image/ImageSource.js +3 -1
  32. package/Libraries/Image/ImageSourceUtils.js +4 -2
  33. package/Libraries/Lists/FlatList.d.ts +2 -2
  34. package/Libraries/Lists/SectionListModern.js +1 -2
  35. package/Libraries/LogBox/Data/LogBoxData.js +1 -1
  36. package/Libraries/NativeComponent/BaseViewConfig.android.js +1 -0
  37. package/Libraries/NativeComponent/BaseViewConfig.ios.js +1 -0
  38. package/Libraries/NativeModules/specs/NativeDevMenu.js +2 -2
  39. package/Libraries/ReactNative/AppContainer-dev.js +3 -2
  40. package/Libraries/ReactNative/FabricUIManager.js +10 -0
  41. package/Libraries/ReactNative/RendererImplementation.js +6 -5
  42. package/Libraries/ReactNative/getNativeComponentAttributes.js +1 -0
  43. package/Libraries/ReactNative/renderApplication.js +9 -0
  44. package/Libraries/ReactPrivate/ReactNativePrivateInterface.js.flow +51 -0
  45. package/Libraries/Renderer/implementations/ReactFabric-dev.js +4840 -4748
  46. package/Libraries/Renderer/implementations/ReactFabric-prod.js +4947 -4829
  47. package/Libraries/Renderer/implementations/ReactFabric-profiling.js +3998 -3888
  48. package/Libraries/Renderer/implementations/ReactNativeRenderer-dev.js +5005 -4948
  49. package/Libraries/Renderer/implementations/ReactNativeRenderer-prod.js +2744 -2652
  50. package/Libraries/Renderer/implementations/ReactNativeRenderer-profiling.js +5020 -4933
  51. package/Libraries/Settings/Settings.ios.js +1 -0
  52. package/Libraries/StyleSheet/StyleSheetTypes.d.ts +1 -1
  53. package/Libraries/StyleSheet/StyleSheetTypes.js +47 -3
  54. package/Libraries/StyleSheet/processBackgroundImage.js +670 -214
  55. package/Libraries/Text/TextNativeComponent.js +0 -4
  56. package/Libraries/Text/TextNativeComponent.win32.js +0 -4
  57. package/index.js +1 -288
  58. package/index.win32.js +3 -292
  59. package/overrides.json +14 -14
  60. package/package.json +20 -20
  61. package/src/private/{devmenu → devsupport/devmenu}/DevMenu.js +1 -1
  62. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BorderBox.js +2 -2
  63. package/src/private/{inspector → devsupport/devmenu/elementinspector}/BoxInspector.js +5 -4
  64. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementBox.js +7 -5
  65. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ElementProperties.js +10 -9
  66. package/src/private/{inspector → devsupport/devmenu/elementinspector}/Inspector.js +13 -11
  67. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorOverlay.js +4 -3
  68. package/src/private/{inspector → devsupport/devmenu/elementinspector}/InspectorPanel.js +8 -7
  69. package/src/private/{inspector → devsupport/devmenu/elementinspector}/NetworkOverlay.js +9 -8
  70. package/src/private/{inspector → devsupport/devmenu/elementinspector}/ReactDevToolsOverlay.js +7 -7
  71. package/src/private/{inspector → devsupport/devmenu/elementinspector}/StyleInspector.js +6 -5
  72. package/src/private/{inspector → devsupport/devmenu/elementinspector}/XHRInterceptor.js +2 -2
  73. package/src/private/{inspector → devsupport/devmenu/elementinspector}/getInspectorDataForViewAtPoint.js +2 -2
  74. package/src/private/{inspector → devsupport/devmenu/elementinspector}/resolveBoxStyle.js +1 -1
  75. package/src/private/{inspector → devsupport/devmenu/perfmonitor}/PerformanceOverlay.js +5 -4
  76. package/src/private/{specs_DEPRECATED/modules → devsupport/devmenu/specs}/NativeDevMenu.js +2 -2
  77. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.android.js +1 -1
  78. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.ios.js +1 -1
  79. package/src/private/{debugging → devsupport/rndevtools}/ReactDevToolsSettingsManager.win32.js +1 -1
  80. package/src/private/{debugging → devsupport/rndevtools}/setUpFuseboxReactDevToolsDispatcher.js +1 -1
  81. package/src/private/{fusebox → devsupport/rndevtools}/specs/NativeReactDevToolsRuntimeSettingsModule.js +2 -2
  82. package/src/private/{specs_DEPRECATED/modules → devsupport/rndevtools/specs}/NativeReactDevToolsSettingsManager.js +2 -2
  83. package/src/private/featureflags/ReactNativeFeatureFlags.js +48 -18
  84. package/src/private/featureflags/specs/NativeReactNativeFeatureFlags.js +11 -5
  85. package/src/private/renderer/errorhandling/ErrorHandlers.js +2 -2
  86. package/src/private/specs_DEPRECATED/modules/NativeAnimatedModule.js +1 -1
  87. package/src/private/specs_DEPRECATED/modules/NativeAnimatedTurboModule.js +1 -1
  88. package/src/private/specs_DEPRECATED/modules/NativeSampleTurboModule.js +3 -0
  89. package/src/private/types/HostInstance.js +2 -2
  90. package/src/private/webapis/performance/PerformanceEntry.js +6 -1
  91. package/src/private/webapis/performance/internals/RawPerformanceEntry.js +3 -0
  92. package/src/private/webapis/performance/specs/NativePerformance.js +10 -1
  93. package/types/index.d.ts +1 -2
  94. package/types/public/ReactNativeTypes.d.ts +2 -2
  95. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestConfig.js +0 -38
  96. package/Libraries/BatchedBridge/__mocks__/MessageQueueTestModule.js +0 -22
  97. package/Libraries/Blob/__mocks__/BlobModule.js +0 -16
  98. package/Libraries/Blob/__mocks__/FileReaderModule.js +0 -20
  99. package/Libraries/Components/RefreshControl/__mocks__/RefreshControlMock.js +0 -32
  100. package/Libraries/Core/__mocks__/ErrorUtils.js +0 -33
  101. package/Libraries/Core/__mocks__/NativeExceptionsManager.js +0 -19
  102. package/Libraries/EventEmitter/__mocks__/NativeEventEmitter.js +0 -49
  103. package/Libraries/Lists/__flowtests__/FlatList-flowtest.js +0 -118
  104. package/Libraries/Lists/__flowtests__/SectionList-flowtest.js +0 -134
  105. package/Libraries/NewAppScreen/components/Colors.js +0 -19
  106. package/Libraries/NewAppScreen/components/DebugInstructions.js +0 -39
  107. package/Libraries/NewAppScreen/components/Header.js +0 -75
  108. package/Libraries/NewAppScreen/components/HermesBadge.js +0 -51
  109. package/Libraries/NewAppScreen/components/LearnMoreLinks.js +0 -146
  110. package/Libraries/NewAppScreen/components/ReloadInstructions.js +0 -37
  111. package/Libraries/NewAppScreen/components/logo.png +0 -0
  112. package/Libraries/NewAppScreen/index.js +0 -25
  113. package/Libraries/StyleSheet/__flowtests__/StyleSheet-flowtest.js +0 -58
  114. package/Libraries/Utilities/__mocks__/BackHandler.js +0 -45
  115. package/Libraries/Utilities/__mocks__/GlobalPerformanceLogger.js +0 -16
  116. package/Libraries/Utilities/__mocks__/PixelRatio.js +0 -25
  117. package/Libraries/__flowtests__/ReactNativeTypes-flowtest.js +0 -30
  118. package/Libraries/vendor/emitter/__flowtests__/EventEmitter-flowtest.js +0 -81
  119. package/jest/__tests__/setup-test.js +0 -18
  120. package/src/private/webapis/performance/specs/__mocks__/NativePerformanceMock.js +0 -267
  121. package/types/modules/LaunchScreen.d.ts +0 -26
  122. /package/src/private/{devmenu → devsupport/devmenu}/DevMenu.d.ts +0 -0
  123. /package/src/private/{debugging → devsupport/rndevtools}/FuseboxSessionObserver.js +0 -0
package/.flowconfig CHANGED
@@ -5,6 +5,9 @@
5
5
  .*/*[.]macos.js
6
6
  .*/*[.]windesktop.js
7
7
 
8
+ ; Ignore fb_internal modules
9
+ <PROJECT_ROOT>/packages/react-native/src/fb_internal/.*
10
+
8
11
  ; These modules have base components and win32 versions.
9
12
  ; Ideally we'd delete the base versions of files that had .win32 overrides as part of the
10
13
  ; initRNLibraries build step
@@ -39,6 +42,10 @@
39
42
  <PROJECT_ROOT>/Libraries/LogBox/UI/LogBoxInspectorReactFrames.js
40
43
  <PROJECT_ROOT>/Libraries/LogBox/UI/LogBoxStyle.js
41
44
 
45
+ <PROJECT_ROOT>/IntegrationTests/ImageCachePolicyTest.js
46
+ <PROJECT_ROOT>/IntegrationTests/LayoutEventsTest.js
47
+ <PROJECT_ROOT>/IntegrationTests/IntegrationTestsApp.js
48
+
42
49
  ; Ignore react-native files in node_modules since they are copied into project root
43
50
  .*/node_modules/react-native/.*
44
51
 
@@ -167,4 +174,4 @@ untyped-import
167
174
  untyped-type-import
168
175
 
169
176
  [version]
170
- ^0.267.0
177
+ ^0.269.1
package/CHANGELOG.json CHANGED
@@ -2,7 +2,64 @@
2
2
  "name": "@office-iss/react-native-win32",
3
3
  "entries": [
4
4
  {
5
- "date": "Thu, 03 Jul 2025 05:23:40 GMT",
5
+ "date": "Sat, 26 Jul 2025 05:25:35 GMT",
6
+ "version": "0.0.0-canary.294",
7
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.294",
8
+ "comments": {
9
+ "prerelease": [
10
+ {
11
+ "author": "54227869+anupriya13@users.noreply.github.com",
12
+ "package": "@office-iss/react-native-win32",
13
+ "commit": "d27755fed3d7f5451f73a8ba5b2027bc4023ea83",
14
+ "comment": "Integrate RN Nightly Build 0.80.0-nightly-20250506-3ac16dd6a"
15
+ }
16
+ ]
17
+ }
18
+ },
19
+ {
20
+ "date": "Fri, 18 Jul 2025 05:27:00 GMT",
21
+ "version": "0.0.0-canary.293",
22
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.293",
23
+ "comments": {
24
+ "none": [
25
+ {
26
+ "author": "chpurrer@meta.com",
27
+ "package": "@office-iss/react-native-win32",
28
+ "commit": "af04d4d517f95d7773e4744edf2cef42fa0870c8",
29
+ "comment": "[react-native-windows] Use new LongLivedObject.h header namespace"
30
+ }
31
+ ]
32
+ }
33
+ },
34
+ {
35
+ "date": "Thu, 17 Jul 2025 05:27:00 GMT",
36
+ "version": "0.0.0-canary.293",
37
+ "tag": "@office-iss/react-native-win32_v0.0.0-canary.293",
38
+ "comments": {
39
+ "prerelease": [
40
+ {
41
+ "author": "10109130+sharath2727@users.noreply.github.com",
42
+ "package": "@office-iss/react-native-win32",
43
+ "commit": "b4ad43a0d79d39aae1c1ecf91d3a0089c0e334ec",
44
+ "comment": "Integrate RN Nightly Build 0.80.0-nightly-20250428-9efcdc091"
45
+ },
46
+ {
47
+ "author": "beachball",
48
+ "package": "@office-iss/react-native-win32",
49
+ "comment": "Bump @rnw-scripts/just-task to v2.3.54",
50
+ "commit": "not available"
51
+ },
52
+ {
53
+ "author": "beachball",
54
+ "package": "@office-iss/react-native-win32",
55
+ "comment": "Bump react-native-platform-override to v1.9.56",
56
+ "commit": "not available"
57
+ }
58
+ ]
59
+ }
60
+ },
61
+ {
62
+ "date": "Thu, 03 Jul 2025 05:24:24 GMT",
6
63
  "version": "0.0.0-canary.292",
7
64
  "tag": "@office-iss/react-native-win32_v0.0.0-canary.292",
8
65
  "comments": {
package/CHANGELOG.md CHANGED
@@ -1,17 +1,35 @@
1
1
  # Change Log - @office-iss/react-native-win32
2
2
 
3
- <!-- This log was last generated on Thu, 03 Jul 2025 05:23:40 GMT and should not be manually modified. -->
3
+ <!-- This log was last generated on Sat, 26 Jul 2025 05:25:35 GMT and should not be manually modified. -->
4
4
 
5
5
  <!-- Start content -->
6
6
 
7
- ## 0.0.0-canary.292
7
+ ## 0.0.0-canary.294
8
8
 
9
- Thu, 03 Jul 2025 05:23:40 GMT
9
+ Sat, 26 Jul 2025 05:25:35 GMT
10
10
 
11
11
  ### Changes
12
12
 
13
- - intergrate rn 0.80.0-nightly-20250414-70cdf12c4 (satkh@microsoft.com)
13
+ - Integrate RN Nightly Build 0.80.0-nightly-20250506-3ac16dd6a (54227869+anupriya13@users.noreply.github.com)
14
14
 
15
+ ## 0.0.0-canary.293
16
+
17
+ Thu, 17 Jul 2025 05:27:00 GMT
18
+
19
+ ### Changes
20
+
21
+ - Integrate RN Nightly Build 0.80.0-nightly-20250428-9efcdc091 (10109130+sharath2727@users.noreply.github.com)
22
+ - Bump @rnw-scripts/just-task to v2.3.54
23
+ - Bump react-native-platform-override to v1.9.56
24
+
25
+ ## 0.0.0-canary.292
26
+
27
+ Thu, 03 Jul 2025 05:24:24 GMT
28
+
29
+ ### Changes
30
+
31
+ - intergrate rn 0.80.0-nightly-20250414-70cdf12c4 (satkh@microsoft.com)
32
+
15
33
  ## 0.0.0-canary.291
16
34
 
17
35
  Sat, 21 Jun 2025 05:21:48 GMT
@@ -10,7 +10,7 @@
10
10
 
11
11
  'use strict';
12
12
 
13
- import type {ImageURISource} from 'react-native/Libraries/Image/ImageSource';
13
+ import type {ImageURISource} from 'react-native';
14
14
 
15
15
  import * as React from 'react';
16
16
  import {useEffect, useState} from 'react';
@@ -10,11 +10,8 @@
10
10
 
11
11
  'use strict';
12
12
 
13
+ import type {LayoutChangeEvent, LayoutRectangle} from 'react-native';
13
14
  import type {ViewStyleProp} from 'react-native/Libraries/StyleSheet/StyleSheet';
14
- import type {
15
- LayoutChangeEvent,
16
- LayoutRectangle,
17
- } from 'react-native/Libraries/Types/CoreEventTypes';
18
15
 
19
16
  const React = require('react');
20
17
  const ReactNative = require('react-native');
@@ -40,23 +40,149 @@ export type {default as AnimatedSubtraction} from './nodes/AnimatedSubtraction';
40
40
  export type {WithAnimatedValue} from './createAnimatedComponent';
41
41
  export type {AnimatedComponentType as AnimatedComponent} from './createAnimatedComponent';
42
42
 
43
+ /**
44
+ * Creates a new Animated value composed from two Animated values added
45
+ * together.
46
+ *
47
+ * See https://reactnative.dev/docs/animated#add
48
+ */
43
49
  export const add = AnimatedImplementation.add;
50
+
51
+ /**
52
+ * Imperative API to attach an animated value to an event on a view. Prefer
53
+ * using `Animated.event` with `useNativeDrive: true` if possible.
54
+ *
55
+ * See https://reactnative.dev/docs/animated#attachnativeevent
56
+ */
44
57
  export const attachNativeEvent = AnimatedImplementation.attachNativeEvent;
58
+
59
+ /**
60
+ * Make any React component Animatable. Used to create `Animated.View`, etc.
61
+ *
62
+ * See https://reactnative.dev/docs/animated#createanimatedcomponent
63
+ */
45
64
  export const createAnimatedComponent =
46
65
  AnimatedImplementation.createAnimatedComponent;
66
+
67
+ /**
68
+ * Animates a value from an initial velocity to zero based on a decay
69
+ * coefficient.
70
+ *
71
+ * See https://reactnative.dev/docs/animated#decay
72
+ */
47
73
  export const decay = AnimatedImplementation.decay;
74
+
75
+ /**
76
+ * Starts an animation after the given delay.
77
+ *
78
+ * See https://reactnative.dev/docs/animated#delay
79
+ */
48
80
  export const delay = AnimatedImplementation.delay;
81
+
82
+ /**
83
+ * Create a new Animated value that is limited between 2 values. It uses the
84
+ * difference between the last value so even if the value is far from the
85
+ * bounds it will start changing when the value starts getting closer again.
86
+ *
87
+ * See https://reactnative.dev/docs/animated#diffclamp
88
+ */
49
89
  export const diffClamp = AnimatedImplementation.diffClamp;
90
+
91
+ /**
92
+ * Creates a new Animated value composed by dividing the first Animated value
93
+ * by the second Animated value.
94
+ *
95
+ * See https://reactnative.dev/docs/animated#divide
96
+ */
50
97
  export const divide = AnimatedImplementation.divide;
98
+
99
+ /**
100
+ * Takes an array of mappings and extracts values from each arg accordingly,
101
+ * then calls `setValue` on the mapped outputs.
102
+ *
103
+ * See https://reactnative.dev/docs/animated#event
104
+ */
51
105
  export const event = AnimatedImplementation.event;
106
+
107
+ /**
108
+ * Advanced imperative API for snooping on animated events that are passed in
109
+ * through props. Use values directly where possible.
110
+ *
111
+ * See https://reactnative.dev/docs/animated#forkevent
112
+ */
52
113
  export const forkEvent = AnimatedImplementation.forkEvent;
114
+
115
+ /**
116
+ * Loops a given animation continuously, so that each time it reaches the
117
+ * end, it resets and begins again from the start.
118
+ *
119
+ * See https://reactnative.dev/docs/animated#loop
120
+ */
53
121
  export const loop = AnimatedImplementation.loop;
122
+
123
+ /**
124
+ * Creates a new Animated value that is the (non-negative) modulo of the
125
+ * provided Animated value.
126
+ *
127
+ * See https://reactnative.dev/docs/animated#modulo
128
+ */
54
129
  export const modulo = AnimatedImplementation.modulo;
130
+
131
+ /**
132
+ * Creates a new Animated value composed from two Animated values multiplied
133
+ * together.
134
+ *
135
+ * See https://reactnative.dev/docs/animated#multiply
136
+ */
55
137
  export const multiply = AnimatedImplementation.multiply;
138
+
139
+ /**
140
+ * Starts an array of animations all at the same time. By default, if one
141
+ * of the animations is stopped, they will all be stopped. You can override
142
+ * this with the `stopTogether` flag.
143
+ *
144
+ * See https://reactnative.dev/docs/animated#parallel
145
+ */
56
146
  export const parallel = AnimatedImplementation.parallel;
147
+
148
+ /**
149
+ * Starts an array of animations in order, waiting for each to complete
150
+ * before starting the next. If the current running animation is stopped, no
151
+ * following animations will be started.
152
+ *
153
+ * See https://reactnative.dev/docs/animated#sequence
154
+ */
57
155
  export const sequence = AnimatedImplementation.sequence;
156
+
157
+ /**
158
+ * Animates a value according to an analytical spring model based on
159
+ * damped harmonic oscillation.
160
+ *
161
+ * See https://reactnative.dev/docs/animated#spring
162
+ */
58
163
  export const spring = AnimatedImplementation.spring;
164
+
165
+ /**
166
+ * Array of animations may run in parallel (overlap), but are started in
167
+ * sequence with successive delays. Nice for doing trailing effects.
168
+ *
169
+ * See https://reactnative.dev/docs/animated#stagger
170
+ */
59
171
  export const stagger = AnimatedImplementation.stagger;
172
+
173
+ /**
174
+ * Creates a new Animated value composed by subtracting the second Animated
175
+ * value from the first Animated value.
176
+ *
177
+ * See https://reactnative.dev/docs/animated#subtract
178
+ */
60
179
  export const subtract = AnimatedImplementation.subtract;
180
+
181
+ /**
182
+ * Animates a value along a timed easing curve. The Easing module has tons of
183
+ * predefined curves, or you can use your own function.
184
+ *
185
+ * See https://reactnative.dev/docs/animated#timing
186
+ */
61
187
  export const timing = AnimatedImplementation.timing;
62
188
  export const unforkEvent = AnimatedImplementation.unforkEvent;
@@ -606,144 +606,23 @@ export default {
606
606
  * See https://reactnative.dev/docs/animated#node
607
607
  */
608
608
  Node: AnimatedNode,
609
-
610
- /**
611
- * Animates a value from an initial velocity to zero based on a decay
612
- * coefficient.
613
- *
614
- * See https://reactnative.dev/docs/animated#decay
615
- */
616
609
  decay,
617
- /**
618
- * Animates a value along a timed easing curve. The Easing module has tons of
619
- * predefined curves, or you can use your own function.
620
- *
621
- * See https://reactnative.dev/docs/animated#timing
622
- */
623
610
  timing,
624
- /**
625
- * Animates a value according to an analytical spring model based on
626
- * damped harmonic oscillation.
627
- *
628
- * See https://reactnative.dev/docs/animated#spring
629
- */
630
611
  spring,
631
-
632
- /**
633
- * Creates a new Animated value composed from two Animated values added
634
- * together.
635
- *
636
- * See https://reactnative.dev/docs/animated#add
637
- */
638
612
  add,
639
-
640
- /**
641
- * Creates a new Animated value composed by subtracting the second Animated
642
- * value from the first Animated value.
643
- *
644
- * See https://reactnative.dev/docs/animated#subtract
645
- */
646
613
  subtract,
647
-
648
- /**
649
- * Creates a new Animated value composed by dividing the first Animated value
650
- * by the second Animated value.
651
- *
652
- * See https://reactnative.dev/docs/animated#divide
653
- */
654
614
  divide,
655
-
656
- /**
657
- * Creates a new Animated value composed from two Animated values multiplied
658
- * together.
659
- *
660
- * See https://reactnative.dev/docs/animated#multiply
661
- */
662
615
  multiply,
663
-
664
- /**
665
- * Creates a new Animated value that is the (non-negative) modulo of the
666
- * provided Animated value.
667
- *
668
- * See https://reactnative.dev/docs/animated#modulo
669
- */
670
616
  modulo,
671
-
672
- /**
673
- * Create a new Animated value that is limited between 2 values. It uses the
674
- * difference between the last value so even if the value is far from the
675
- * bounds it will start changing when the value starts getting closer again.
676
- *
677
- * See https://reactnative.dev/docs/animated#diffclamp
678
- */
679
617
  diffClamp,
680
-
681
- /**
682
- * Starts an animation after the given delay.
683
- *
684
- * See https://reactnative.dev/docs/animated#delay
685
- */
686
618
  delay,
687
- /**
688
- * Starts an array of animations in order, waiting for each to complete
689
- * before starting the next. If the current running animation is stopped, no
690
- * following animations will be started.
691
- *
692
- * See https://reactnative.dev/docs/animated#sequence
693
- */
694
619
  sequence,
695
- /**
696
- * Starts an array of animations all at the same time. By default, if one
697
- * of the animations is stopped, they will all be stopped. You can override
698
- * this with the `stopTogether` flag.
699
- *
700
- * See https://reactnative.dev/docs/animated#parallel
701
- */
702
620
  parallel,
703
- /**
704
- * Array of animations may run in parallel (overlap), but are started in
705
- * sequence with successive delays. Nice for doing trailing effects.
706
- *
707
- * See https://reactnative.dev/docs/animated#stagger
708
- */
709
621
  stagger,
710
- /**
711
- * Loops a given animation continuously, so that each time it reaches the
712
- * end, it resets and begins again from the start.
713
- *
714
- * See https://reactnative.dev/docs/animated#loop
715
- */
716
622
  loop,
717
-
718
- /**
719
- * Takes an array of mappings and extracts values from each arg accordingly,
720
- * then calls `setValue` on the mapped outputs.
721
- *
722
- * See https://reactnative.dev/docs/animated#event
723
- */
724
623
  event,
725
-
726
- /**
727
- * Make any React component Animatable. Used to create `Animated.View`, etc.
728
- *
729
- * See https://reactnative.dev/docs/animated#createanimatedcomponent
730
- */
731
624
  createAnimatedComponent,
732
-
733
- /**
734
- * Imperative API to attach an animated value to an event on a view. Prefer
735
- * using `Animated.event` with `useNativeDrive: true` if possible.
736
- *
737
- * See https://reactnative.dev/docs/animated#attachnativeevent
738
- */
739
625
  attachNativeEvent,
740
-
741
- /**
742
- * Advanced imperative API for snooping on animated events that are passed in
743
- * through props. Use values directly where possible.
744
- *
745
- * See https://reactnative.dev/docs/animated#forkevent
746
- */
747
626
  forkEvent,
748
627
  unforkEvent,
749
628
 
@@ -13,10 +13,14 @@ import type AnimatedNode from '../nodes/AnimatedNode';
13
13
  import type AnimatedValue from '../nodes/AnimatedValue';
14
14
 
15
15
  import NativeAnimatedHelper from '../../../src/private/animated/NativeAnimatedHelper';
16
- import * as ReactNativeFeatureFlags from '../../../src/private/featureflags/ReactNativeFeatureFlags';
17
16
  import AnimatedProps from '../nodes/AnimatedProps';
18
17
 
19
- export type EndResult = {finished: boolean, value?: number, ...};
18
+ export type EndResult = {
19
+ finished: boolean,
20
+ value?: number,
21
+ offset?: number,
22
+ ...
23
+ };
20
24
  export type EndCallback = (result: EndResult) => void;
21
25
 
22
26
  export type AnimationConfig = $ReadOnly<{
@@ -141,9 +145,9 @@ export default class Animation {
141
145
  // When using natively driven animations, once the animation completes,
142
146
  // we need to ensure that the JS side nodes are synced with the updated
143
147
  // values.
144
- const {value} = result;
148
+ const {value, offset} = result;
145
149
  if (value != null) {
146
- animatedValue.__onAnimatedValueUpdateReceived(value);
150
+ animatedValue.__onAnimatedValueUpdateReceived(value, offset);
147
151
 
148
152
  if (this.__isLooping === true) {
149
153
  return;
@@ -112,8 +112,8 @@ export default class AnimatedNode {
112
112
  return this.#listeners.size > 0;
113
113
  }
114
114
 
115
- __onAnimatedValueUpdateReceived(value: number): void {
116
- this.__callListeners(value);
115
+ __onAnimatedValueUpdateReceived(value: number, offset: number): void {
116
+ this.__callListeners(value + offset);
117
117
  }
118
118
 
119
119
  __callListeners(value: number): void {
@@ -52,7 +52,6 @@ const NativeAnimatedAPI = NativeAnimatedHelper.API;
52
52
  * transform which can receive values from multiple parents.
53
53
  */
54
54
  export function flushValue(rootNode: AnimatedNode): void {
55
- // eslint-disable-next-line func-call-spacing
56
55
  const leaves = new Set<{update: () => void, ...}>();
57
56
  function findAnimatedStyles(node: AnimatedNode) {
58
57
  // $FlowFixMe[prop-missing]
@@ -169,7 +168,7 @@ export default class AnimatedValue extends AnimatedWithChildren {
169
168
  'onAnimatedValueUpdate',
170
169
  data => {
171
170
  if (data.tag === nativeTag) {
172
- this.__onAnimatedValueUpdateReceived(data.value);
171
+ this.__onAnimatedValueUpdateReceived(data.value, data.offset);
173
172
  }
174
173
  },
175
174
  );
@@ -247,7 +246,9 @@ export default class AnimatedValue extends AnimatedWithChildren {
247
246
  this._offset += this._value;
248
247
  this._value = 0;
249
248
  if (this.__isNative) {
250
- NativeAnimatedAPI.extractAnimatedNodeOffset(this.__getNativeTag());
249
+ _executeAsAnimatedBatch(this.__getNativeTag().toString(), () =>
250
+ NativeAnimatedAPI.extractAnimatedNodeOffset(this.__getNativeTag()),
251
+ );
251
252
  }
252
253
  }
253
254
 
@@ -287,8 +288,11 @@ export default class AnimatedValue extends AnimatedWithChildren {
287
288
  }
288
289
  }
289
290
 
290
- __onAnimatedValueUpdateReceived(value: number): void {
291
+ __onAnimatedValueUpdateReceived(value: number, offset?: number): void {
291
292
  this._updateValue(value, false /*flush*/);
293
+ if (offset != null) {
294
+ this._offset = offset;
295
+ }
292
296
  }
293
297
 
294
298
  /**
@@ -65,6 +65,7 @@ function genModule(
65
65
  module[methodName] = genMethod(moduleID, methodID, methodType);
66
66
  });
67
67
 
68
+ // $FlowFixMe[unsafe-object-assign]
68
69
  Object.assign(module, constants);
69
70
 
70
71
  if (module.getConstants == null) {
@@ -173,6 +174,7 @@ function updateErrorWithErrorData(
173
174
  /* $FlowFixMe[class-object-subtyping] added when improving typing for this
174
175
  * parameters */
175
176
  // $FlowFixMe[incompatible-return]
177
+ // $FlowFixMe[unsafe-object-assign]
176
178
  return Object.assign(error, errorData || {});
177
179
  }
178
180
 
@@ -110,6 +110,7 @@ class BlobManager {
110
110
  static createFromOptions(options: BlobData): Blob {
111
111
  BlobRegistry.register(options.blobId);
112
112
  // $FlowFixMe[prop-missing]
113
+ // $FlowFixMe[unsafe-object-assign]
113
114
  return Object.assign(Object.create(Blob.prototype), {
114
115
  data:
115
116
  // Reuse the collector instance when creating from an existing blob.
@@ -81,7 +81,19 @@ export class URL {
81
81
  let baseUrl = null;
82
82
  if (!base || validateBaseUrl(url)) {
83
83
  this._url = url;
84
- if (!this._url.endsWith('/')) {
84
+ if (this._url.includes('#')) {
85
+ const split = this._url.split('#');
86
+ const beforeHash = split[0];
87
+ const website = beforeHash.split('://')[1];
88
+ if (!website.includes('/')) {
89
+ this._url = split.join('/#');
90
+ }
91
+ }
92
+
93
+ if (
94
+ !this._url.endsWith('/') &&
95
+ !(this._url.includes('?') || this._url.includes('#'))
96
+ ) {
85
97
  this._url += '/';
86
98
  }
87
99
  } else {
@@ -152,7 +152,10 @@ type PressableBaseProps = $ReadOnly<{
152
152
  }>;
153
153
 
154
154
  export type PressableProps = $ReadOnly<{
155
- ...ViewProps,
155
+ // Pressability may override `onMouseEnter` and `onMouseLeave` to
156
+ // implement `onHoverIn` and `onHoverOut` in a platform-agnostic way.
157
+ // Hover events should be used instead of mouse events.
158
+ ...Omit<ViewProps, 'onMouseEnter' | 'onMouseLeave'>,
156
159
  ...PressableBaseProps,
157
160
  }>;
158
161
 
@@ -198,7 +198,10 @@ type PressableBaseProps = $ReadOnly<{
198
198
  }>;
199
199
 
200
200
  export type PressableProps = $ReadOnly<{
201
- ...ViewProps,
201
+ // Pressability may override `onMouseEnter` and `onMouseLeave` to
202
+ // implement `onHoverIn` and `onHoverOut` in a platform-agnostic way.
203
+ // Hover events should be used instead of mouse events.
204
+ ...Omit<ViewProps, 'onMouseEnter' | 'onMouseLeave'>,
202
205
  ...PressableBaseProps,
203
206
  }>;
204
207
 
@@ -365,7 +365,7 @@ export interface ScrollViewPropsIOS {
365
365
 
366
366
  /**
367
367
  * When true the scroll view bounces when it reaches the end of the
368
- * content if the content is larger then the scroll view along the axis of
368
+ * content if the content is larger than the scroll view along the axis of
369
369
  * the scroll direction. When false it disables all bouncing even if
370
370
  * the `alwaysBounce*` props are true. The default value is true.
371
371
  */
@@ -869,7 +869,7 @@ export class ScrollView extends ScrollViewBase {
869
869
  * This function sends props straight to native. They will not participate in
870
870
  * future diff process - this means that if you do not include them in the
871
871
  * next render, they will remain active (see [Direct
872
- * Manipulation](https://reactnative.dev/docs/direct-manipulation)).
872
+ * Manipulation](https://reactnative.dev/docs/the-new-architecture/direct-manipulation-new-architecture)).
873
873
  */
874
874
  setNativeProps(nativeProps: object): void;
875
875
  }
@@ -1165,6 +1165,7 @@ class ScrollView extends React.Component<ScrollViewProps, ScrollViewState> {
1165
1165
  // they are callable from the ref.
1166
1166
 
1167
1167
  // $FlowFixMe[prop-missing] - Known issue with appending custom methods.
1168
+ // $FlowFixMe[unsafe-object-assign]
1168
1169
  const publicInstance: PublicScrollViewInstance = Object.assign(
1169
1170
  nativeInstance,
1170
1171
  {
@@ -22,6 +22,7 @@ import SwitchNativeComponent, {
22
22
  Commands as SwitchCommands,
23
23
  } from './SwitchNativeComponent';
24
24
  import * as React from 'react';
25
+ import {useLayoutEffect, useRef, useState} from 'react';
25
26
 
26
27
  export type SwitchPropsIOS = {
27
28
  /**
@@ -179,13 +180,16 @@ const Switch: component(
179
180
  const trackColorForFalse = trackColor?.false;
180
181
  const trackColorForTrue = trackColor?.true;
181
182
 
182
- const nativeSwitchRef = React.useRef<React.ElementRef<
183
+ const nativeSwitchRef = useRef<React.ElementRef<
183
184
  typeof SwitchNativeComponent | typeof AndroidSwitchNativeComponent,
184
185
  > | null>(null);
185
186
 
186
187
  const ref = useMergeRefs(nativeSwitchRef, forwardedRef);
187
188
 
188
- const [native, setNative] = React.useState({value: (null: ?boolean)});
189
+ // We wrap the native state in an object to force the layout-effect
190
+ // below to re-run whenever we get an update from native, even if it's
191
+ // not different from the previous native state.
192
+ const [native, setNative] = useState({value: (null: ?boolean)});
189
193
 
190
194
  const handleChange = (event: SwitchChangeEvent) => {
191
195
  // $FlowFixMe[unused-promise]
@@ -195,7 +199,7 @@ const Switch: component(
195
199
  setNative({value: event.nativeEvent.value});
196
200
  };
197
201
 
198
- React.useLayoutEffect(() => {
202
+ useLayoutEffect(() => {
199
203
  // This is necessary in case native updates the switch and JS decides
200
204
  // that the update should be ignored and we should stick with the value
201
205
  // that we have in JS.
@@ -658,6 +658,7 @@ export const __INTERNAL_VIEW_CONFIG: PartialViewConfig = {
658
658
  },
659
659
  },
660
660
  validAttributes: {
661
+ acceptDragAndDropTypes: true,
661
662
  maxFontSizeMultiplier: true,
662
663
  adjustsFontSizeToFit: true,
663
664
  minimumFontScale: true,