expo-image 1.10.0 → 1.10.1

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 CHANGED
@@ -10,6 +10,10 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 1.10.1 — 2023-12-19
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
13
17
  ## 1.10.0 — 2023-12-12
14
18
 
15
19
  ### 🎉 New features
package/README.md CHANGED
@@ -21,34 +21,44 @@ A cross-platform, performant image component for React Native and Expo.
21
21
 
22
22
  ## Supported image formats
23
23
 
24
- | Format | Android | iOS | Web |
25
- | :--------: | :-----: | :-: | :-----------------------------------------------: |
26
- | WebP | ✅ | ✅ | [~96% adoption](https://caniuse.com/webp) |
27
- | PNG / APNG | ✅ | ✅ | / ✅ [~96% adoption](https://caniuse.com/apng) |
28
- | AVIF | ✅ | ✅ | ⏳ [~79% adoption](https://caniuse.com/avif) |
29
- | HEIC | ✅ | ✅ | ❌ [not adopted yet](https://caniuse.com/heif) |
30
- | JPEG | ✅ | ✅ | |
31
- | GIF | ✅ | ✅ | |
32
- | SVG | ✅ | ✅ | |
33
- | ICO | ✅ | ✅ | |
34
- | ICNS | ❌ | ✅ | |
24
+ | Format | Android | iOS | Web |
25
+ | :--------: | :-----: | :-: | :--------------------------------------------: |
26
+ | WebP | ✅ | ✅ | |
27
+ | PNG / APNG | ✅ | ✅ | |
28
+ | AVIF | ✅ | ✅ | ⏳ [~87% adoption](https://caniuse.com/avif) |
29
+ | HEIC | ✅ | ✅ | ❌ [not adopted yet](https://caniuse.com/heif) |
30
+ | JPEG | ✅ | ✅ | |
31
+ | GIF | ✅ | ✅ | |
32
+ | SVG | ✅ | ✅ | |
33
+ | ICO | ✅ | ✅ | |
34
+ | ICNS | ❌ | ✅ | |
35
35
 
36
36
  # API documentation
37
37
 
38
- - [Documentation for the latest release](https://docs.expo.dev/versions/unversioned/sdk/image/)
38
+ - [Documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/image/)
39
39
 
40
- # Installation
40
+ # Installation in managed Expo projects
41
41
 
42
- > Currently `expo-image` can be used only with [development builds](https://docs.expo.dev/develop/development-builds/introduction/), in Expo Go, and bare React Native apps with [configured Expo modules](https://docs.expo.dev/bare/installing-expo-modules/).
43
- > It is not available with Snack yet.
42
+ For [managed](https://docs.expo.dev/archive/managed-vs-bare/) Expo projects, follow the installation instructions in the [API documentation for the latest stable release](https://docs.expo.dev/versions/latest/sdk/image/).
44
43
 
45
- Add the package to your dependencies with the following commands:
44
+ # Installation in bare React Native projects
45
+
46
+ For bare React Native projects, you must ensure that you have [installed and configured the `expo` package](https://docs.expo.dev/bare/installing-expo-modules/) before continuing.
47
+
48
+ ### Add the package to your npm dependencies
46
49
 
47
50
  ```
48
51
  npx expo install expo-image
49
- npx pod-install
50
52
  ```
51
53
 
54
+ ### Configure for iOS
55
+
56
+ Run `npx pod-install` after installing the npm package.
57
+
58
+ ### Configure for Android
59
+
60
+ No additional setup necessary.
61
+
52
62
  # Contributing
53
63
 
54
64
  Contributions are very welcome! Please refer to guidelines described in the [contributing guide](https://github.com/expo/expo#contributing).
@@ -67,7 +67,7 @@ android {
67
67
  namespace "expo.modules.image"
68
68
  defaultConfig {
69
69
  versionCode 1
70
- versionName "1.10.0"
70
+ versionName "1.10.1"
71
71
  consumerProguardFiles("proguard-rules.pro")
72
72
 
73
73
  buildConfigField("boolean", "ALLOW_GLIDE_LOGS", project.properties.get("EXPO_ALLOW_GLIDE_LOGS", "false"))
@@ -30,7 +30,7 @@ import kotlin.math.max
30
30
  * of implementing the transition between bitmaps.
31
31
  */
32
32
  class ImageViewWrapperTarget(
33
- private val imageViewHolder: WeakReference<ExpoImageViewWrapper>,
33
+ private val imageViewHolder: WeakReference<ExpoImageViewWrapper>
34
34
  ) : Target<Drawable> {
35
35
  /**
36
36
  * Whether the target has a main, non-placeholder source
@@ -15,11 +15,22 @@ import expo.modules.image.ifYogaUndefinedUse
15
15
 
16
16
  class OutlineProvider(private val mContext: Context) : ViewOutlineProvider() {
17
17
  enum class BorderRadiusConfig {
18
- ALL, TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT, BOTTOM_LEFT, TOP_START, TOP_END, BOTTOM_START, BOTTOM_END
18
+ ALL,
19
+ TOP_LEFT,
20
+ TOP_RIGHT,
21
+ BOTTOM_RIGHT,
22
+ BOTTOM_LEFT,
23
+ TOP_START,
24
+ TOP_END,
25
+ BOTTOM_START,
26
+ BOTTOM_END
19
27
  }
20
28
 
21
29
  enum class CornerRadius {
22
- TOP_LEFT, TOP_RIGHT, BOTTOM_RIGHT, BOTTOM_LEFT
30
+ TOP_LEFT,
31
+ TOP_RIGHT,
32
+ BOTTOM_RIGHT,
33
+ BOTTOM_LEFT
23
34
  }
24
35
 
25
36
  private var mLayoutDirection = View.LAYOUT_DIRECTION_LTR
@@ -96,10 +96,12 @@ object ThumbhashDecoder {
96
96
  hash[2] = (header24 shr 16).toByte()
97
97
  hash[3] = header16.toByte()
98
98
  hash[4] = (header16 shr 8).toByte()
99
- if (hasAlpha) hash[5] = (
100
- Math.round(15.0f * a_channel!!.dc)
101
- or (Math.round(15.0f * a_channel.scale) shl 4)
102
- ).toByte()
99
+ if (hasAlpha) {
100
+ hash[5] = (
101
+ Math.round(15.0f * a_channel!!.dc)
102
+ or (Math.round(15.0f * a_channel.scale) shl 4)
103
+ ).toByte()
104
+ }
103
105
 
104
106
  // Write the varying factors
105
107
  var ac_index = 0
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expo-image",
3
3
  "title": "Expo Image",
4
- "version": "1.10.0",
4
+ "version": "1.10.1",
5
5
  "description": "A cross-platform, performant image component for React Native and Expo with Web support",
6
6
  "main": "build/index.js",
7
7
  "types": "build/index.d.ts",
@@ -35,5 +35,5 @@
35
35
  "peerDependencies": {
36
36
  "expo": "*"
37
37
  },
38
- "gitHead": "6aca7ce098ddc667776a3d7cf612adbb985e264a"
38
+ "gitHead": "43f1b4f8a5a9bca649e4e7ca6e4155482a162431"
39
39
  }