react-native-fast-image 9.0.1 → 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/dist/index.cjs.js +1 -2
- package/dist/index.d.ts +4 -3
- package/dist/index.js +1 -2
- package/package.json +1 -1
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(
|
|
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.
|
|
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.
|
|
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(
|
|
236
|
+
}, /* @__PURE__ */ React.createElement(FastImageComponent, {
|
|
238
237
|
...props,
|
|
239
238
|
importantForAccessibility,
|
|
240
239
|
style: [StyleSheet.absoluteFill, imageStyle],
|