react-native-fast-image 9.0.0 → 9.0.2

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.
package/README.md CHANGED
@@ -57,7 +57,7 @@ See [Formats](docs/formats.md) for the versions of iOS and Android each format n
57
57
 
58
58
  ## Installation
59
59
 
60
- Works with React Native 0.65 and later (iOS 13 and later, Android `minSdkVersion` 21 and later), with the New Architecture (through React Native's interop layer) and the legacy architecture, and with Expo. It's tested on React Native 0.87 with the New Architecture, 0.73 with the legacy architecture, and Expo SDK 57. A native New Architecture component is planned for a future major version.
60
+ Works with React Native 0.65 and later (iOS 13 and later, Android `minSdkVersion` 21 and later), with the New Architecture (through React Native's interop layer) and the legacy architecture, with Expo, and on tvOS with [React Native tvOS](https://github.com/react-native-tvos/react-native-tvos). It's tested on React Native 0.87 with the New Architecture, 0.73 with the legacy architecture, Expo SDK 57, and React Native tvOS 0.87. A native New Architecture component is planned for a future major version.
61
61
 
62
62
  ```bash
63
63
  npm install react-native-fast-image
package/dist/index.cjs.js CHANGED
@@ -248,7 +248,6 @@ const styles = react_native.StyleSheet.create({
248
248
  },
249
249
  imageContainer: { overflow: "hidden" }
250
250
  });
251
- const FastImageWithRef = FastImageComponent;
252
251
  /**
253
252
  * An image with content on top of it, like React Native's `ImageBackground`: a
254
253
  * view that the image fills, with the children on top. Use it rather than
@@ -261,7 +260,7 @@ const FastImageBackground = (0, react.forwardRef)(({ style, imageStyle, imageRef
261
260
  importantForAccessibility,
262
261
  style,
263
262
  ref
264
- }, /* @__PURE__ */ react.default.createElement(FastImageWithRef, {
263
+ }, /* @__PURE__ */ react.default.createElement(FastImageComponent, {
265
264
  ...props,
266
265
  importantForAccessibility,
267
266
  style: [react_native.StyleSheet.absoluteFill, imageStyle],
package/dist/index.d.ts CHANGED
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ColorValue, StyleProp, ViewStyle, ImageRequireSource, AccessibilityProps, ViewProps } from 'react-native';
2
+ import { ColorValue, View, StyleProp, ViewStyle, ImageRequireSource, AccessibilityProps, ViewProps } from 'react-native';
3
3
  import { cacheControl, priority, resizeMode } from './constants';
4
4
  /** How the image fits the view: see [`resizeMode`](#resizemode). */
5
5
  export type ResizeMode = 'contain' | 'cover' | 'stretch' | 'center' | 'repeat';
@@ -499,6 +499,7 @@ export interface FastImageProps extends AccessibilityProps, ViewProps {
499
499
  */
500
500
  children?: React.ReactNode;
501
501
  }
502
+ type ViewRef = React.ElementRef<typeof View>;
502
503
  /** A preloaded source that loaded (and is now cached). */
503
504
  export interface PreloadSuccess {
504
505
  /** The source's uri. */
@@ -556,7 +557,7 @@ export interface FastImageStaticProperties {
556
557
  */
557
558
  configureCache: (limits?: CacheLimits) => Promise<CacheState>;
558
559
  }
559
- declare const FastImage: React.ComponentType<FastImageProps> & FastImageStaticProperties;
560
+ declare const FastImage: React.ForwardRefExoticComponent<FastImageProps & React.RefAttributes<ViewRef>> & FastImageStaticProperties;
560
561
  export interface FastImageBackgroundProps extends Omit<FastImageProps, 'style' | 'children'> {
561
562
  /** The container's style; the image fills it. */
562
563
  style?: StyleProp<ViewStyle>;
@@ -574,5 +575,5 @@ export interface FastImageBackgroundProps extends Omit<FastImageProps, 'style' |
574
575
  * (the image will be a single native view). The other props go to the image;
575
576
  * the ref is the view's.
576
577
  */
577
- export declare const FastImageBackground: React.ComponentType<FastImageBackgroundProps>;
578
+ export declare const FastImageBackground: React.ForwardRefExoticComponent<FastImageBackgroundProps & React.RefAttributes<ViewRef>>;
578
579
  export default FastImage;
package/dist/index.js CHANGED
@@ -221,7 +221,6 @@ const styles = StyleSheet.create({
221
221
  },
222
222
  imageContainer: { overflow: "hidden" }
223
223
  });
224
- const FastImageWithRef = FastImageComponent;
225
224
  /**
226
225
  * An image with content on top of it, like React Native's `ImageBackground`: a
227
226
  * view that the image fills, with the children on top. Use it rather than
@@ -234,7 +233,7 @@ const FastImageBackground = forwardRef(({ style, imageStyle, imageRef, children,
234
233
  importantForAccessibility,
235
234
  style,
236
235
  ref
237
- }, /* @__PURE__ */ React.createElement(FastImageWithRef, {
236
+ }, /* @__PURE__ */ React.createElement(FastImageComponent, {
238
237
  ...props,
239
238
  importantForAccessibility,
240
239
  style: [StyleSheet.absoluteFill, imageStyle],
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "react-native-fast-image",
3
- "version": "9.0.0",
3
+ "version": "9.0.2",
4
4
  "description": "FastImage, performant React Native image component.",
5
5
  "keywords": [
6
6
  "cache",
@@ -69,6 +69,6 @@
69
69
  },
70
70
  "peerDependencies": {
71
71
  "react": "^17 || ^18 || ^19",
72
- "react-native": ">=0.65.0"
72
+ "react-native": "*"
73
73
  }
74
74
  }