expo-image 2.0.1 → 2.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/CHANGELOG.md +6 -0
- package/android/build.gradle +1 -1
- package/build/Image.d.ts.map +1 -1
- package/package.json +2 -2
- package/src/Image.tsx +8 -0
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,12 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 2.0.2 — 2024-11-22
|
|
14
|
+
|
|
15
|
+
### 💡 Others
|
|
16
|
+
|
|
17
|
+
- Add a warning when `children` are passed to `Image`. ([#33139](https://github.com/expo/expo/pull/33139) by [@alanjhughes](https://github.com/alanjhughes))
|
|
18
|
+
|
|
13
19
|
## 2.0.1 — 2024-11-19
|
|
14
20
|
|
|
15
21
|
### 🐛 Bug fixes
|
package/android/build.gradle
CHANGED
|
@@ -18,7 +18,7 @@ android {
|
|
|
18
18
|
namespace "expo.modules.image"
|
|
19
19
|
defaultConfig {
|
|
20
20
|
versionCode 1
|
|
21
|
-
versionName "2.0.
|
|
21
|
+
versionName "2.0.2"
|
|
22
22
|
consumerProguardFiles("proguard-rules.pro")
|
|
23
23
|
|
|
24
24
|
buildConfigField("boolean", "ALLOW_GLIDE_LOGS", project.properties.get("EXPO_ALLOW_GLIDE_LOGS", "false"))
|
package/build/Image.d.ts.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../src/Image.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1B,OAAO,EACL,gBAAgB,EAChB,oBAAoB,EACpB,UAAU,EACV,QAAQ,EACR,WAAW,EACZ,MAAM,eAAe,CAAC;
|
|
1
|
+
{"version":3,"file":"Image.d.ts","sourceRoot":"","sources":["../src/Image.tsx"],"names":[],"mappings":"AAGA,OAAO,KAAK,MAAM,OAAO,CAAC;AAI1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AE,gBAAgB,GACzB,OAAO,CAAC,QAAQ,CAAC;IAKpB,MAAM;CA8CP"}
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-image",
|
|
3
3
|
"title": "Expo Image",
|
|
4
|
-
"version": "2.0.
|
|
4
|
+
"version": "2.0.2",
|
|
5
5
|
"description": "A cross-platform, performant image component for React Native and Expo with Web support",
|
|
6
6
|
"main": "src/index.ts",
|
|
7
7
|
"types": "build/index.d.ts",
|
|
@@ -41,5 +41,5 @@
|
|
|
41
41
|
"optional": true
|
|
42
42
|
}
|
|
43
43
|
},
|
|
44
|
-
"gitHead": "
|
|
44
|
+
"gitHead": "6cbc7c671f769d36e4294f25a9445281912e45fd"
|
|
45
45
|
}
|
package/src/Image.tsx
CHANGED
|
@@ -17,6 +17,7 @@ import { resolveContentFit, resolveContentPosition, resolveTransition } from './
|
|
|
17
17
|
import { resolveSource, resolveSources } from './utils/resolveSources';
|
|
18
18
|
|
|
19
19
|
let loggedDefaultSourceDeprecationWarning = false;
|
|
20
|
+
let loggedRenderingChildrenWarning = false;
|
|
20
21
|
|
|
21
22
|
export class Image extends React.PureComponent<ImageProps> {
|
|
22
23
|
nativeViewRef;
|
|
@@ -198,6 +199,13 @@ export class Image extends React.PureComponent<ImageProps> {
|
|
|
198
199
|
loggedDefaultSourceDeprecationWarning = true;
|
|
199
200
|
}
|
|
200
201
|
|
|
202
|
+
if (restProps.children && !loggedRenderingChildrenWarning) {
|
|
203
|
+
console.warn(
|
|
204
|
+
'The <Image> component does not support children. If you want to render content on top of the image, consider using the <ImageBackground> component or absolute positioning.'
|
|
205
|
+
);
|
|
206
|
+
loggedRenderingChildrenWarning = true;
|
|
207
|
+
}
|
|
208
|
+
|
|
201
209
|
return (
|
|
202
210
|
<ExpoImage
|
|
203
211
|
{...restProps}
|