react-native 0.82.0-nightly-20250830-d3574313c → 0.82.0-nightly-20250901-544f3b345

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 (25) hide show
  1. package/Libraries/Core/ReactNativeVersion.js +1 -1
  2. package/Libraries/StyleSheet/StyleSheet.d.ts +7 -22
  3. package/Libraries/StyleSheet/StyleSheetExports.js +2 -8
  4. package/Libraries/StyleSheet/StyleSheetExports.js.flow +11 -18
  5. package/React/Base/RCTVersion.m +1 -1
  6. package/ReactAndroid/api/ReactAndroid.api +7 -0
  7. package/ReactAndroid/gradle.properties +1 -1
  8. package/ReactAndroid/src/main/java/com/facebook/react/modules/systeminfo/ReactNativeVersion.kt +1 -1
  9. package/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageResizeMethod.kt +22 -1
  10. package/ReactAndroid/src/main/java/com/facebook/react/views/image/ImageResizeMode.kt +13 -0
  11. package/ReactAndroid/src/main/java/com/facebook/react/views/image/ReactImageManager.kt +1 -11
  12. package/ReactCommon/cxxreact/ReactNativeVersion.h +1 -1
  13. package/ReactCommon/react/renderer/components/image/ImageShadowNode.cpp +5 -2
  14. package/ReactCommon/react/renderer/components/unimplementedview/UnimplementedViewShadowNode.cpp +1 -0
  15. package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageFetcher.cpp +42 -3
  16. package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/ImageFetcher.h +21 -3
  17. package/ReactCommon/react/renderer/imagemanager/platform/android/react/renderer/imagemanager/conversions.h +3 -20
  18. package/ReactCommon/react/renderer/imagemanager/primitives.h +7 -7
  19. package/ReactCommon/react/renderer/scheduler/Scheduler.cpp +33 -0
  20. package/ReactCommon/react/renderer/uimanager/UIManagerCommitHook.h +11 -0
  21. package/package.json +8 -8
  22. package/sdks/hermesc/osx-bin/hermes +0 -0
  23. package/sdks/hermesc/osx-bin/hermesc +0 -0
  24. package/sdks/hermesc/win64-bin/hermesc.exe +0 -0
  25. package/types_generated/Libraries/StyleSheet/StyleSheetExports.d.ts +11 -19
@@ -29,7 +29,7 @@ export default class ReactNativeVersion {
29
29
  static major: number = 0;
30
30
  static minor: number = 82;
31
31
  static patch: number = 0;
32
- static prerelease: string | null = 'nightly-20250830-d3574313c';
32
+ static prerelease: string | null = 'nightly-20250901-544f3b345';
33
33
 
34
34
  static getVersionString(): string {
35
35
  return `${this.major}.${this.minor}.${this.patch}${this.prerelease != null ? `-${this.prerelease}` : ''}`;
@@ -17,13 +17,7 @@ export interface StyleSheetProperties {
17
17
  type Falsy = undefined | null | false | '';
18
18
  interface RecursiveArray<T>
19
19
  extends Array<T | ReadonlyArray<T> | RecursiveArray<T>> {}
20
- /** Keep a brand of 'T' so that calls to `StyleSheet.flatten` can take `RegisteredStyle<T>` and return `T`. */
21
- type RegisteredStyle<T> = number & {__registeredStyleBrand: T};
22
- export type StyleProp<T> =
23
- | T
24
- | RegisteredStyle<T>
25
- | RecursiveArray<T | RegisteredStyle<T> | Falsy>
26
- | Falsy;
20
+ export type StyleProp<T> = T | RecursiveArray<T | Falsy> | Falsy;
27
21
 
28
22
  type OpaqueColorValue = symbol & {__TYPE__: 'Color'};
29
23
  export type ColorValue = string | OpaqueColorValue;
@@ -127,24 +121,15 @@ export namespace StyleSheet {
127
121
  bottom: 0;
128
122
  }
129
123
 
130
- /**
131
- * Sometimes you may want `absoluteFill` but with a couple tweaks - `absoluteFillObject` can be
132
- * used to create a customized entry in a `StyleSheet`, e.g.:
133
- *
134
- * const styles = StyleSheet.create({
135
- * wrapper: {
136
- * ...StyleSheet.absoluteFillObject,
137
- * top: 10,
138
- * backgroundColor: 'transparent',
139
- * },
140
- * });
141
- */
142
- export const absoluteFillObject: AbsoluteFillStyle;
143
-
144
124
  /**
145
125
  * A very common pattern is to create overlays with position absolute and zero positioning,
146
126
  * so `absoluteFill` can be used for convenience and to reduce duplication of these repeated
147
127
  * styles.
148
128
  */
149
- export const absoluteFill: RegisteredStyle<AbsoluteFillStyle>;
129
+ export const absoluteFill: AbsoluteFillStyle;
130
+
131
+ /**
132
+ * @deprecated Use `StyleSheet.absoluteFill`.
133
+ */
134
+ export const absoluteFillObject: AbsoluteFillStyle;
150
135
  }
@@ -24,13 +24,7 @@ if (hairlineWidth === 0) {
24
24
  hairlineWidth = 1 / PixelRatio.get();
25
25
  }
26
26
 
27
- const absoluteFill: {
28
- +bottom: 0,
29
- +left: 0,
30
- +position: 'absolute',
31
- +right: 0,
32
- +top: 0,
33
- } = {
27
+ const absoluteFill = {
34
28
  position: 'absolute',
35
29
  left: 0,
36
30
  right: 0,
@@ -108,7 +102,7 @@ export default {
108
102
  * so `absoluteFill` can be used for convenience and to reduce duplication of these repeated
109
103
  * styles.
110
104
  */
111
- absoluteFill: (absoluteFill: any), // TODO: This should be updated after we fix downstream Flow sites.
105
+ absoluteFill,
112
106
 
113
107
  /**
114
108
  * Sometimes you may want `absoluteFill` but with a couple tweaks - `absoluteFillObject` can be
@@ -13,6 +13,14 @@ import type {____Styles_Internal} from './StyleSheetTypes';
13
13
  import composeStyles from '../../src/private/styles/composeStyles';
14
14
  import flattenStyle from './flattenStyle';
15
15
 
16
+ type AbsoluteFillStyle = $ReadOnly<{
17
+ position: 'absolute',
18
+ left: 0,
19
+ right: 0,
20
+ top: 0,
21
+ bottom: 0,
22
+ }>;
23
+
16
24
  /**
17
25
  * This is defined as the width of a thin line on the platform. It can be
18
26
  * used as the thickness of a border or division between two elements.
@@ -37,27 +45,12 @@ declare export const hairlineWidth: number;
37
45
  * so `absoluteFill` can be used for convenience and to reduce duplication of these repeated
38
46
  * styles.
39
47
  */
40
- declare export const absoluteFill: any;
48
+ declare export const absoluteFill: AbsoluteFillStyle;
41
49
 
42
50
  /**
43
- * Sometimes you may want `absoluteFill` but with a couple tweaks - `absoluteFillObject` can be
44
- * used to create a customized entry in a `StyleSheet`, e.g.:
45
- *
46
- * const styles = StyleSheet.create({
47
- * wrapper: {
48
- * ...StyleSheet.absoluteFillObject,
49
- * top: 10,
50
- * backgroundColor: 'transparent',
51
- * },
52
- * });
51
+ * @deprecated Use `StyleSheet.absoluteFill`.
53
52
  */
54
- declare export const absoluteFillObject: {
55
- +bottom: 0,
56
- +left: 0,
57
- +position: 'absolute',
58
- +right: 0,
59
- +top: 0,
60
- };
53
+ declare export const absoluteFillObject: AbsoluteFillStyle;
61
54
 
62
55
  /**
63
56
  * Combines two styles such that style2 will override any styles in style1.
@@ -24,7 +24,7 @@ NSDictionary* RCTGetReactNativeVersion(void)
24
24
  RCTVersionMajor: @(0),
25
25
  RCTVersionMinor: @(82),
26
26
  RCTVersionPatch: @(0),
27
- RCTVersionPrerelease: @"nightly-20250830-d3574313c",
27
+ RCTVersionPrerelease: @"nightly-20250901-544f3b345",
28
28
  };
29
29
  });
30
30
  return __rnVersion;
@@ -5353,18 +5353,25 @@ public final class com/facebook/react/views/image/ImageLoadEvent$Companion {
5353
5353
 
5354
5354
  public final class com/facebook/react/views/image/ImageResizeMethod : java/lang/Enum {
5355
5355
  public static final field AUTO Lcom/facebook/react/views/image/ImageResizeMethod;
5356
+ public static final field Companion Lcom/facebook/react/views/image/ImageResizeMethod$Companion;
5356
5357
  public static final field NONE Lcom/facebook/react/views/image/ImageResizeMethod;
5357
5358
  public static final field RESIZE Lcom/facebook/react/views/image/ImageResizeMethod;
5358
5359
  public static final field SCALE Lcom/facebook/react/views/image/ImageResizeMethod;
5359
5360
  public static fun getEntries ()Lkotlin/enums/EnumEntries;
5361
+ public static final fun parse (Ljava/lang/String;)Lcom/facebook/react/views/image/ImageResizeMethod;
5360
5362
  public static fun valueOf (Ljava/lang/String;)Lcom/facebook/react/views/image/ImageResizeMethod;
5361
5363
  public static fun values ()[Lcom/facebook/react/views/image/ImageResizeMethod;
5362
5364
  }
5363
5365
 
5366
+ public final class com/facebook/react/views/image/ImageResizeMethod$Companion {
5367
+ public final fun parse (Ljava/lang/String;)Lcom/facebook/react/views/image/ImageResizeMethod;
5368
+ }
5369
+
5364
5370
  public final class com/facebook/react/views/image/ImageResizeMode {
5365
5371
  public static final field INSTANCE Lcom/facebook/react/views/image/ImageResizeMode;
5366
5372
  public static final fun defaultTileMode ()Landroid/graphics/Shader$TileMode;
5367
5373
  public static final fun defaultValue ()Lcom/facebook/drawee/drawable/ScalingUtils$ScaleType;
5374
+ public final synthetic fun fromInt (I)Ljava/lang/String;
5368
5375
  public static final fun toScaleType (Ljava/lang/String;)Lcom/facebook/drawee/drawable/ScalingUtils$ScaleType;
5369
5376
  public static final fun toTileMode (Ljava/lang/String;)Landroid/graphics/Shader$TileMode;
5370
5377
  }
@@ -1,4 +1,4 @@
1
- VERSION_NAME=0.82.0-nightly-20250830-d3574313c
1
+ VERSION_NAME=0.82.0-nightly-20250901-544f3b345
2
2
  react.internal.publishingGroup=com.facebook.react
3
3
 
4
4
  android.useAndroidX=true
@@ -15,6 +15,6 @@ public object ReactNativeVersion {
15
15
  "major" to 0,
16
16
  "minor" to 82,
17
17
  "patch" to 0,
18
- "prerelease" to "nightly-20250830-d3574313c"
18
+ "prerelease" to "nightly-20250901-544f3b345"
19
19
  )
20
20
  }
@@ -7,9 +7,30 @@
7
7
 
8
8
  package com.facebook.react.views.image
9
9
 
10
+ import com.facebook.common.logging.FLog
11
+ import com.facebook.react.common.ReactConstants
12
+
10
13
  public enum class ImageResizeMethod {
11
14
  AUTO,
12
15
  RESIZE,
13
16
  SCALE,
14
- NONE,
17
+ NONE;
18
+
19
+ public companion object {
20
+ @JvmStatic
21
+ public fun parse(resizeMethod: String?): ImageResizeMethod {
22
+ return when (resizeMethod) {
23
+ null,
24
+ "",
25
+ "auto" -> ImageResizeMethod.AUTO
26
+ "resize" -> ImageResizeMethod.RESIZE
27
+ "scale" -> ImageResizeMethod.SCALE
28
+ "none" -> ImageResizeMethod.NONE
29
+ else -> {
30
+ FLog.w(ReactConstants.TAG, "Invalid resize method: '$resizeMethod'")
31
+ ImageResizeMethod.AUTO
32
+ }
33
+ }
34
+ }
35
+ }
15
36
  }
@@ -21,6 +21,19 @@ public object ImageResizeMode {
21
21
  private const val RESIZE_MODE_REPEAT = "repeat"
22
22
  private const val RESIZE_MODE_NONE = "none"
23
23
 
24
+ @JvmSynthetic
25
+ public fun fromInt(resizeMode: Int): String {
26
+ return when (resizeMode) {
27
+ 0 -> RESIZE_MODE_COVER
28
+ 1 -> RESIZE_MODE_CONTAIN
29
+ 2 -> RESIZE_MODE_STRETCH
30
+ 3 -> RESIZE_MODE_CENTER
31
+ 4 -> RESIZE_MODE_REPEAT
32
+ 5 -> RESIZE_MODE_NONE
33
+ else -> RESIZE_MODE_NONE
34
+ }
35
+ }
36
+
24
37
  /** Converts JS resize modes into `ScalingUtils.ScaleType`. See `ImageResizeMode.js`. */
25
38
  @JvmStatic
26
39
  public fun toScaleType(resizeModeValue: String?): ScalingUtils.ScaleType {
@@ -188,17 +188,7 @@ public constructor(
188
188
 
189
189
  @ReactProp(name = ViewProps.RESIZE_METHOD)
190
190
  public fun setResizeMethod(view: ReactImageView, resizeMethod: String?) {
191
- when (resizeMethod) {
192
- null,
193
- "auto" -> view.setResizeMethod(ImageResizeMethod.AUTO)
194
- "resize" -> view.setResizeMethod(ImageResizeMethod.RESIZE)
195
- "scale" -> view.setResizeMethod(ImageResizeMethod.SCALE)
196
- "none" -> view.setResizeMethod(ImageResizeMethod.NONE)
197
- else -> {
198
- view.setResizeMethod(ImageResizeMethod.AUTO)
199
- FLog.w(ReactConstants.TAG, "Invalid resize method: '$resizeMethod'")
200
- }
201
- }
191
+ view.setResizeMethod(ImageResizeMethod.parse(resizeMethod))
202
192
  }
203
193
 
204
194
  @ReactProp(name = "resizeMultiplier")
@@ -22,7 +22,7 @@ constexpr struct {
22
22
  int32_t Major = 0;
23
23
  int32_t Minor = 82;
24
24
  int32_t Patch = 0;
25
- std::string_view Prerelease = "nightly-20250830-d3574313c";
25
+ std::string_view Prerelease = "nightly-20250901-544f3b345";
26
26
  } ReactNativeVersion;
27
27
 
28
28
  } // namespace facebook::react
@@ -5,13 +5,15 @@
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  */
7
7
 
8
+ #include "ImageState.h"
9
+
8
10
  #include <cstdlib>
9
11
  #include <limits>
10
12
 
13
+ #include <react/featureflags/ReactNativeFeatureFlags.h>
11
14
  #include <react/renderer/components/image/ImageShadowNode.h>
12
15
  #include <react/renderer/core/LayoutContext.h>
13
16
  #include <react/renderer/imagemanager/ImageRequestParams.h>
14
- #include "ImageState.h"
15
17
 
16
18
  namespace facebook::react {
17
19
 
@@ -28,7 +30,8 @@ void ImageShadowNode::setImageManager(
28
30
  // layout, if the image source was changed we have to initiate the image
29
31
  // request now since there is no guarantee that layout will run for the shadow
30
32
  // node at a later time.
31
- if (getIsLayoutClean()) {
33
+ if (getIsLayoutClean() ||
34
+ ReactNativeFeatureFlags::enableImagePrefetchingAndroid()) {
32
35
  auto sources = getConcreteProps().sources;
33
36
  auto layoutMetric = getLayoutMetrics();
34
37
  if (sources.size() <= 1 ||
@@ -9,6 +9,7 @@
9
9
 
10
10
  namespace facebook::react {
11
11
 
12
+ // NOLINTNEXTLINE(facebook-hte-CArray,modernize-avoid-c-arrays)
12
13
  const char UnimplementedViewComponentName[] = "UnimplementedView";
13
14
 
14
15
  } // namespace facebook::react
@@ -7,11 +7,38 @@
7
7
 
8
8
  #include "ImageFetcher.h"
9
9
 
10
+ #include <glog/logging.h>
10
11
  #include <react/common/mapbuffer/JReadableMapBuffer.h>
11
12
  #include <react/renderer/imagemanager/conversions.h>
12
13
 
13
14
  namespace facebook::react {
14
15
 
16
+ ImageFetcher::ImageFetcher(
17
+ std::shared_ptr<const ContextContainer> contextContainer)
18
+ : contextContainer_(std::move(contextContainer)) {
19
+ if (contextContainer_ != nullptr) {
20
+ if (auto uiManagerCommitHookManager =
21
+ contextContainer_
22
+ ->find<std::shared_ptr<UIManagerCommitHookManager>>(
23
+ std::string(UIManagerCommitHookManagerKey));
24
+ uiManagerCommitHookManager.has_value()) {
25
+ (*uiManagerCommitHookManager)->registerCommitHook(*this);
26
+ }
27
+ }
28
+ }
29
+
30
+ ImageFetcher::~ImageFetcher() {
31
+ if (contextContainer_ != nullptr) {
32
+ if (auto uiManagerCommitHookManager =
33
+ contextContainer_
34
+ ->find<std::shared_ptr<UIManagerCommitHookManager>>(
35
+ std::string(UIManagerCommitHookManagerKey));
36
+ uiManagerCommitHookManager.has_value()) {
37
+ (*uiManagerCommitHookManager)->unregisterCommitHook(*this);
38
+ }
39
+ }
40
+ }
41
+
15
42
  ImageRequest ImageFetcher::requestImage(
16
43
  const ImageSource& imageSource,
17
44
  SurfaceId surfaceId,
@@ -23,6 +50,20 @@ ImageRequest ImageFetcher::requestImage(
23
50
  .imageRequestParams = imageRequestParams,
24
51
  .tag = tag});
25
52
 
53
+ auto telemetry = std::make_shared<ImageTelemetry>(surfaceId);
54
+
55
+ return {imageSource, telemetry};
56
+ }
57
+
58
+ RootShadowNode::Unshared ImageFetcher::shadowTreeWillCommit(
59
+ const ShadowTree& /*shadowTree*/,
60
+ const RootShadowNode::Shared& /*oldRootShadowNode*/,
61
+ const RootShadowNode::Unshared& newRootShadowNode,
62
+ const ShadowTree::CommitOptions& /*commitOptions*/) noexcept {
63
+ if (items_.empty()) {
64
+ return newRootShadowNode;
65
+ }
66
+
26
67
  auto fabricUIManager_ =
27
68
  contextContainer_->at<jni::global_ref<jobject>>("FabricUIManager");
28
69
  static auto prefetchResources =
@@ -35,9 +76,7 @@ ImageRequest ImageFetcher::requestImage(
35
76
  items_.clear();
36
77
  prefetchResources(fabricUIManager_, "RCTImageView", readableMapBuffer.get());
37
78
 
38
- auto telemetry = std::make_shared<ImageTelemetry>(surfaceId);
39
-
40
- return {imageSource, telemetry};
79
+ return newRootShadowNode;
41
80
  }
42
81
 
43
82
  } // namespace facebook::react
@@ -7,16 +7,23 @@
7
7
 
8
8
  #pragma once
9
9
 
10
+ #include <react/featureflags/ReactNativeFeatureFlags.h>
10
11
  #include <react/renderer/imagemanager/ImageRequest.h>
11
12
  #include <react/renderer/imagemanager/ImageRequestParams.h>
13
+ #include <react/renderer/mounting/ShadowTree.h>
14
+ #include <react/renderer/uimanager/UIManagerCommitHook.h>
12
15
  #include <react/utils/ContextContainer.h>
13
16
 
14
17
  namespace facebook::react {
15
18
 
16
- class ImageFetcher {
19
+ class ImageFetcher : public UIManagerCommitHook {
17
20
  public:
18
- ImageFetcher(std::shared_ptr<const ContextContainer> contextContainer)
19
- : contextContainer_(std::move(contextContainer)) {}
21
+ ImageFetcher(std::shared_ptr<const ContextContainer> contextContainer);
22
+ ~ImageFetcher() override;
23
+ ImageFetcher(const ImageFetcher&) = delete;
24
+ ImageFetcher& operator=(const ImageFetcher&) = delete;
25
+ ImageFetcher(ImageFetcher&&) = delete;
26
+ ImageFetcher& operator=(ImageFetcher&&) = delete;
20
27
 
21
28
  ImageRequest requestImage(
22
29
  const ImageSource& imageSource,
@@ -24,6 +31,17 @@ class ImageFetcher {
24
31
  const ImageRequestParams& imageRequestParams,
25
32
  Tag tag);
26
33
 
34
+ void commitHookWasRegistered(const UIManager& uiManager) noexcept override {}
35
+
36
+ void commitHookWasUnregistered(const UIManager& uiManager) noexcept override {
37
+ }
38
+
39
+ RootShadowNode::Unshared shadowTreeWillCommit(
40
+ const ShadowTree& shadowTree,
41
+ const RootShadowNode::Shared& oldRootShadowNode,
42
+ const RootShadowNode::Unshared& newRootShadowNode,
43
+ const ShadowTree::CommitOptions& commitOptions) noexcept override;
44
+
27
45
  private:
28
46
  std::vector<ImageRequestItem> items_;
29
47
  std::shared_ptr<const ContextContainer> contextContainer_;
@@ -12,30 +12,13 @@
12
12
  #include <react/renderer/imagemanager/primitives.h>
13
13
  #include <react/renderer/mapbuffer/MapBuffer.h>
14
14
  #include <react/renderer/mapbuffer/MapBufferBuilder.h>
15
- #include <string>
15
+ #include <react/utils/to_underlying.h>
16
16
  #include <vector>
17
17
 
18
18
  namespace facebook::react {
19
19
 
20
20
  namespace {
21
21
 
22
- inline std::string toString(const ImageResizeMode& value) {
23
- switch (value) {
24
- case ImageResizeMode::Cover:
25
- return "cover";
26
- case ImageResizeMode::Contain:
27
- return "contain";
28
- case ImageResizeMode::Stretch:
29
- return "stretch";
30
- case ImageResizeMode::Center:
31
- return "center";
32
- case ImageResizeMode::Repeat:
33
- return "repeat";
34
- case ImageResizeMode::None:
35
- return "none";
36
- }
37
- }
38
-
39
22
  constexpr MapBuffer::Key IS_KEY_URI = 0;
40
23
  constexpr MapBuffer::Key IS_KEY_DEFAULT_SRC = 1;
41
24
  constexpr MapBuffer::Key IS_KEY_RESIZE_MODE = 2;
@@ -68,8 +51,8 @@ inline void serializeImageRequestParams(
68
51
  MapBufferBuilder& builder,
69
52
  const ImageRequestParams& imageRequestParams) {
70
53
  builder.putString(IS_KEY_DEFAULT_SRC, imageRequestParams.defaultSource.uri);
71
- builder.putString(
72
- IS_KEY_RESIZE_MODE, toString(imageRequestParams.resizeMode));
54
+ builder.putInt(
55
+ IS_KEY_RESIZE_MODE, to_underlying(imageRequestParams.resizeMode));
73
56
  builder.putString(IS_KEY_RESIZE_METHOD, imageRequestParams.resizeMethod);
74
57
  builder.putInt(
75
58
  IS_KEY_BLUR_RADIUS, static_cast<int32_t>(imageRequestParams.blurRadius));
@@ -162,13 +162,13 @@ inline folly::dynamic toDynamic(const ImageSource& imageSource) {
162
162
 
163
163
  using ImageSources = std::vector<ImageSource>;
164
164
 
165
- enum class ImageResizeMode {
166
- Cover,
167
- Contain,
168
- Stretch,
169
- Center,
170
- Repeat,
171
- None,
165
+ enum class ImageResizeMode : int8_t {
166
+ Cover = 0,
167
+ Contain = 1,
168
+ Stretch = 2,
169
+ Center = 3,
170
+ Repeat = 4,
171
+ None = 5,
172
172
  };
173
173
 
174
174
  class ImageErrorInfo {
@@ -24,6 +24,33 @@
24
24
 
25
25
  namespace facebook::react {
26
26
 
27
+ namespace {
28
+
29
+ class UIManagerCommitHookManagerImpl : public UIManagerCommitHookManager {
30
+ public:
31
+ explicit UIManagerCommitHookManagerImpl(std::weak_ptr<UIManager> uiManager)
32
+ : uiManager_(std::move(uiManager)) {}
33
+
34
+ ~UIManagerCommitHookManagerImpl() override = default;
35
+
36
+ void registerCommitHook(UIManagerCommitHook& commitHook) override {
37
+ if (auto uiManager = uiManager_.lock()) {
38
+ uiManager->registerCommitHook(commitHook);
39
+ }
40
+ }
41
+
42
+ void unregisterCommitHook(UIManagerCommitHook& commitHook) override {
43
+ if (auto uiManager = uiManager_.lock()) {
44
+ uiManager->unregisterCommitHook(commitHook);
45
+ }
46
+ }
47
+
48
+ private:
49
+ std::weak_ptr<UIManager> uiManager_;
50
+ };
51
+
52
+ } // namespace
53
+
27
54
  Scheduler::Scheduler(
28
55
  const SchedulerToolbox& schedulerToolbox,
29
56
  UIManagerAnimationDelegate* animationDelegate,
@@ -49,6 +76,12 @@ Scheduler::Scheduler(
49
76
 
50
77
  auto uiManager =
51
78
  std::make_shared<UIManager>(runtimeExecutor_, contextContainer_);
79
+ if (ReactNativeFeatureFlags::enableImagePrefetchingAndroid()) {
80
+ contextContainer_->insert(
81
+ std::string(UIManagerCommitHookManagerKey),
82
+ std::make_shared<UIManagerCommitHookManagerImpl>(uiManager));
83
+ }
84
+
52
85
  auto eventOwnerBox = std::make_shared<EventBeat::OwnerBox>();
53
86
  eventOwnerBox->owner = eventDispatcher_;
54
87
 
@@ -57,4 +57,15 @@ class UIManagerCommitHook {
57
57
  virtual ~UIManagerCommitHook() noexcept = default;
58
58
  };
59
59
 
60
+ constexpr std::string_view UIManagerCommitHookManagerKey =
61
+ "UIManagerCommitHookManager";
62
+
63
+ class UIManagerCommitHookManager {
64
+ public:
65
+ virtual ~UIManagerCommitHookManager() = default;
66
+
67
+ virtual void registerCommitHook(UIManagerCommitHook& commitHook) = 0;
68
+ virtual void unregisterCommitHook(UIManagerCommitHook& commitHook) = 0;
69
+ };
70
+
60
71
  } // namespace facebook::react
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native",
3
- "version": "0.82.0-nightly-20250830-d3574313c",
3
+ "version": "0.82.0-nightly-20250901-544f3b345",
4
4
  "description": "A framework for building native apps using React",
5
5
  "license": "MIT",
6
6
  "repository": {
@@ -162,13 +162,13 @@
162
162
  },
163
163
  "dependencies": {
164
164
  "@jest/create-cache-key-function": "^29.7.0",
165
- "@react-native/assets-registry": "0.82.0-nightly-20250830-d3574313c",
166
- "@react-native/codegen": "0.82.0-nightly-20250830-d3574313c",
167
- "@react-native/community-cli-plugin": "0.82.0-nightly-20250830-d3574313c",
168
- "@react-native/gradle-plugin": "0.82.0-nightly-20250830-d3574313c",
169
- "@react-native/js-polyfills": "0.82.0-nightly-20250830-d3574313c",
170
- "@react-native/normalize-colors": "0.82.0-nightly-20250830-d3574313c",
171
- "@react-native/virtualized-lists": "0.82.0-nightly-20250830-d3574313c",
165
+ "@react-native/assets-registry": "0.82.0-nightly-20250901-544f3b345",
166
+ "@react-native/codegen": "0.82.0-nightly-20250901-544f3b345",
167
+ "@react-native/community-cli-plugin": "0.82.0-nightly-20250901-544f3b345",
168
+ "@react-native/gradle-plugin": "0.82.0-nightly-20250901-544f3b345",
169
+ "@react-native/js-polyfills": "0.82.0-nightly-20250901-544f3b345",
170
+ "@react-native/normalize-colors": "0.82.0-nightly-20250901-544f3b345",
171
+ "@react-native/virtualized-lists": "0.82.0-nightly-20250901-544f3b345",
172
172
  "abort-controller": "^3.0.0",
173
173
  "anser": "^1.4.9",
174
174
  "ansi-regex": "^5.0.0",
Binary file
Binary file
Binary file
@@ -4,7 +4,7 @@
4
4
  * This source code is licensed under the MIT license found in the
5
5
  * LICENSE file in the root directory of this source tree.
6
6
  *
7
- * @generated SignedSource<<fa831320ee8a4fd99924a41ae55ed5d1>>
7
+ * @generated SignedSource<<53dded6b44a9c0b6117e4070e148b1e5>>
8
8
  *
9
9
  * This file was translated from Flow by scripts/js-api/build-types/index.js.
10
10
  * Original file: packages/react-native/Libraries/StyleSheet/StyleSheetExports.js.flow
@@ -13,6 +13,13 @@
13
13
  import type { ____Styles_Internal } from "./StyleSheetTypes";
14
14
  import composeStyles from "../../src/private/styles/composeStyles";
15
15
  import flattenStyle from "./flattenStyle";
16
+ type AbsoluteFillStyle = Readonly<{
17
+ position: "absolute";
18
+ left: 0;
19
+ right: 0;
20
+ top: 0;
21
+ bottom: 0;
22
+ }>;
16
23
  /**
17
24
  * This is defined as the width of a thin line on the platform. It can be
18
25
  * used as the thickness of a border or division between two elements.
@@ -37,27 +44,12 @@ export declare type hairlineWidth = typeof hairlineWidth;
37
44
  * so `absoluteFill` can be used for convenience and to reduce duplication of these repeated
38
45
  * styles.
39
46
  */
40
- export declare const absoluteFill: any;
47
+ export declare const absoluteFill: AbsoluteFillStyle;
41
48
  export declare type absoluteFill = typeof absoluteFill;
42
49
  /**
43
- * Sometimes you may want `absoluteFill` but with a couple tweaks - `absoluteFillObject` can be
44
- * used to create a customized entry in a `StyleSheet`, e.g.:
45
- *
46
- * const styles = StyleSheet.create({
47
- * wrapper: {
48
- * ...StyleSheet.absoluteFillObject,
49
- * top: 10,
50
- * backgroundColor: 'transparent',
51
- * },
52
- * });
50
+ * @deprecated Use `StyleSheet.absoluteFill`.
53
51
  */
54
- export declare const absoluteFillObject: {
55
- readonly bottom: 0;
56
- readonly left: 0;
57
- readonly position: "absolute";
58
- readonly right: 0;
59
- readonly top: 0;
60
- };
52
+ export declare const absoluteFillObject: AbsoluteFillStyle;
61
53
  export declare type absoluteFillObject = typeof absoluteFillObject;
62
54
  /**
63
55
  * Combines two styles such that style2 will override any styles in style1.