expo-widgets 58.0.1 → 58.0.3

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,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 58.0.3 — 2026-09-16
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
17
+ ## 58.0.2 — 2026-09-15
18
+
19
+ ### 🎉 New features
20
+
21
+ - [Android] Add support for the `Image` component. ([#50116](https://github.com/expo/expo/pull/50116) by [@jakex7](https://github.com/jakex7))
22
+
13
23
  ## 58.0.1 — 2026-09-14
14
24
 
15
25
  ### 🎉 New features
@@ -6,7 +6,7 @@ plugins {
6
6
  }
7
7
 
8
8
  group = 'expo.modules.widgets'
9
- version = '58.0.1'
9
+ version = '58.0.3'
10
10
 
11
11
  def expoWidgetsPackageDirFile = project.projectDir.parentFile
12
12
  def expoWidgetsPackageDir = expoWidgetsPackageDirFile.absolutePath
@@ -39,7 +39,7 @@ android {
39
39
  namespace "expo.modules.widgets"
40
40
  defaultConfig {
41
41
  versionCode 1
42
- versionName '58.0.1'
42
+ versionName '58.0.3'
43
43
 
44
44
  externalNativeBuild {
45
45
  cmake {
@@ -1,7 +1,11 @@
1
+ @file:SuppressLint("RestrictedApi")
2
+
1
3
  package expo.modules.widgets
2
4
 
5
+ import android.annotation.SuppressLint
3
6
  import android.content.Context
4
7
  import android.graphics.Color as AndroidColor
8
+ import androidx.compose.ui.unit.DpSize
5
9
  import androidx.compose.ui.unit.TextUnit
6
10
  import androidx.compose.ui.unit.dp
7
11
  import androidx.compose.ui.unit.sp
@@ -22,6 +26,8 @@ import expo.modules.ui.FillMaxHeightParams
22
26
  import expo.modules.ui.FillMaxSizeParams
23
27
  import expo.modules.ui.FillMaxWidthParams
24
28
  import expo.modules.ui.HeightParams
29
+ import expo.modules.ui.graphics.ImageSource
30
+ import expo.modules.ui.image.ImageContentScale
25
31
  import expo.modules.ui.LayoutProps
26
32
  import expo.modules.ui.LinearProgressIndicatorProps
27
33
  import expo.modules.ui.LoadingIndicatorProps
@@ -54,6 +60,9 @@ import expo.modules.ui.convertibles.VerticalArrangementDefault
54
60
  import androidx.compose.ui.graphics.Color
55
61
  import androidx.glance.Emittable
56
62
  import androidx.glance.EmittableButton
63
+ import androidx.glance.EmittableImage
64
+ import androidx.glance.ImageProvider
65
+ import androidx.glance.TintColorFilterParams
57
66
  import androidx.glance.GlanceModifier
58
67
  import androidx.glance.action.clickable
59
68
  import androidx.glance.appwidget.CheckboxDefaults
@@ -67,6 +76,7 @@ import androidx.glance.appwidget.RadioButtonDefaults
67
76
  import androidx.glance.appwidget.SwitchDefaults
68
77
  import androidx.glance.background
69
78
  import androidx.glance.layout.Alignment
79
+ import androidx.glance.layout.ContentScale
70
80
  import androidx.glance.layout.EmittableBox
71
81
  import androidx.glance.layout.EmittableColumn
72
82
  import androidx.glance.layout.EmittableRow
@@ -80,6 +90,8 @@ import androidx.glance.layout.size
80
90
  import androidx.glance.layout.width
81
91
  import androidx.glance.layout.wrapContentHeight
82
92
  import androidx.glance.layout.wrapContentWidth
93
+ import androidx.glance.semantics.contentDescription
94
+ import androidx.glance.semantics.semantics
83
95
  import androidx.glance.text.EmittableText
84
96
  import androidx.glance.text.FontStyle
85
97
  import androidx.glance.text.FontWeight
@@ -92,6 +104,7 @@ import androidx.glance.appwidget.lazy.EmittableLazyColumn
92
104
  import androidx.glance.appwidget.lazy.EmittableLazyListItem
93
105
  import androidx.glance.appwidget.lazy.ReservedItemIdRangeEnd
94
106
  import io.github.jakex7.peek.glance.determinateCircularProgressIndicatorEmittable
107
+ import kotlin.math.roundToInt
95
108
 
96
109
  private val DefaultCheckedColor = ColorProvider(Color(0xff6750a4))
97
110
  private val DefaultUncheckedColor = ColorProvider(Color(0xff79747e))
@@ -99,13 +112,14 @@ private val DefaultCheckedTrackColor = ColorProvider(Color(0xffe8def8))
99
112
  private val DefaultUncheckedTrackColor = ColorProvider(Color(0xffe7e0ec))
100
113
 
101
114
  private class WidgetConverterContext(
102
- override val applicationContext: Context
115
+ override val applicationContext: Context,
116
+ val widgetSize: DpSize
103
117
  ) : ConverterContext {
104
118
  override val runtime: Runtime? = null
105
119
  }
106
120
 
107
- internal fun ReadableMap.toPeekRoot(context: Context, source: String): Emittable {
108
- val converterContext = WidgetConverterContext(context)
121
+ internal fun ReadableMap.toPeekRoot(context: Context, source: String, size: DpSize): Emittable {
122
+ val converterContext = WidgetConverterContext(context, size)
109
123
  return EmittableColumn().also { root ->
110
124
  root.children += toPeekNodes(converterContext, source)
111
125
  }
@@ -120,12 +134,13 @@ private fun createErrorText(message: String): EmittableText {
120
134
  }
121
135
  }
122
136
 
123
- private fun ReadableMap.toPeekNodes(converterContext: ConverterContext, source: String): List<Emittable> {
137
+ private fun ReadableMap.toPeekNodes(converterContext: WidgetConverterContext, source: String): List<Emittable> {
124
138
  return when (typeName()) {
125
139
  "BoxView" -> listOf(toPeekBox(converterContext, source))
126
140
  "CheckboxView" -> listOf(toPeekCheckBox(converterContext))
127
141
  "CircularProgressIndicatorView" -> listOf(toPeekCircularProgress(converterContext))
128
142
  "ColumnView" -> listOf(toPeekColumn(converterContext, source))
143
+ "ImageView" -> listOf(toPeekImage(converterContext))
129
144
  "LazyColumnView" -> listOf(toPeekLazyColumn(converterContext, source))
130
145
  "LinearProgressIndicatorView" -> listOf(toPeekLinearProgress(converterContext))
131
146
  "LoadingIndicatorView" -> listOf(toPeekLoadingIndicator(converterContext))
@@ -143,7 +158,7 @@ private fun ReadableMap.toPeekNodes(converterContext: ConverterContext, source:
143
158
  }
144
159
  }
145
160
 
146
- private fun ReadableMap.toPeekBox(converterContext: ConverterContext, source: String): EmittableBox {
161
+ private fun ReadableMap.toPeekBox(converterContext: WidgetConverterContext, source: String): EmittableBox {
147
162
  val props = props<LayoutProps>(converterContext)
148
163
  return EmittableBox().also {
149
164
  it.modifier = props.modifiers.toPeekModifier(converterContext)
@@ -152,7 +167,7 @@ private fun ReadableMap.toPeekBox(converterContext: ConverterContext, source: St
152
167
  }
153
168
  }
154
169
 
155
- private fun ReadableMap.toPeekRow(converterContext: ConverterContext, source: String): EmittableRow {
170
+ private fun ReadableMap.toPeekRow(converterContext: WidgetConverterContext, source: String): EmittableRow {
156
171
  val props = props<LayoutProps>(converterContext)
157
172
  return EmittableRow().also {
158
173
  it.modifier = props.modifiers.toPeekModifier(converterContext)
@@ -162,7 +177,7 @@ private fun ReadableMap.toPeekRow(converterContext: ConverterContext, source: St
162
177
  }
163
178
  }
164
179
 
165
- private fun ReadableMap.toPeekColumn(converterContext: ConverterContext, source: String): EmittableColumn {
180
+ private fun ReadableMap.toPeekColumn(converterContext: WidgetConverterContext, source: String): EmittableColumn {
166
181
  val props = props<LayoutProps>(converterContext)
167
182
  return EmittableColumn().also {
168
183
  it.modifier = props.modifiers.toPeekModifier(converterContext)
@@ -172,7 +187,7 @@ private fun ReadableMap.toPeekColumn(converterContext: ConverterContext, source:
172
187
  }
173
188
  }
174
189
 
175
- private fun ReadableMap.toPeekLazyColumn(converterContext: ConverterContext, source: String): EmittableLazyColumn {
190
+ private fun ReadableMap.toPeekLazyColumn(converterContext: WidgetConverterContext, source: String): EmittableLazyColumn {
176
191
  val props = props<LayoutProps>(converterContext)
177
192
  val alignment = props.toPeekHorizontalAlignment()
178
193
  return EmittableLazyColumn().also { lazyColumn ->
@@ -214,7 +229,68 @@ private fun ReadableMap.toPeekText(converterContext: ConverterContext): Emittabl
214
229
  }
215
230
  }
216
231
 
217
- private fun ReadableMap.toPeekButton(converterContext: ConverterContext, source: String): Emittable {
232
+ private fun ReadableMap.toPeekImage(converterContext: WidgetConverterContext): Emittable {
233
+ val props = props<WidgetImageProps>(converterContext)
234
+ val source = props.source
235
+ ?: return createErrorText("Image has no source. Pass source={{ uri }} with a drawable resource name or a file URI.")
236
+ val provider = runCatching {
237
+ loadWidgetImage(converterContext.applicationContext, source, props.imageTarget(converterContext))
238
+ }.getOrElse { error ->
239
+ return createErrorText(error.message ?: "Image '${source.uri}' could not be loaded.")
240
+ }
241
+
242
+ return EmittableImage().also {
243
+ it.provider = provider
244
+ it.modifier = props.imageModifier(converterContext)
245
+ it.contentScale = props.contentScale.toGlanceContentScale()
246
+ it.colorFilterParams = props.tint.toGlanceColorProvider()?.let(::TintColorFilterParams)
247
+ it.alpha = props.alpha.coerceIn(0f, 1f)
248
+ }
249
+ }
250
+
251
+ private fun WidgetImageProps.imageModifier(converterContext: ConverterContext): GlanceModifier {
252
+ val modifier = modifiers.toPeekModifier(converterContext)
253
+ val description = contentDescription ?: return modifier
254
+ return modifier.semantics { contentDescription = description }
255
+ }
256
+
257
+ private fun WidgetImageProps.imageTarget(converterContext: WidgetConverterContext): WidgetImageTarget {
258
+ val metrics = converterContext.applicationContext.resources.displayMetrics
259
+ var widthDp = converterContext.widgetSize.width.value.takeIf { it.isFinite() && it > 0f }
260
+ ?: (metrics.widthPixels / metrics.density)
261
+ var heightDp = converterContext.widgetSize.height.value.takeIf { it.isFinite() && it > 0f }
262
+ ?: (metrics.heightPixels / metrics.density)
263
+
264
+ for (modifier in modifiers) {
265
+ when (modifier["\$type"]?.asString()) {
266
+ "size" -> modifier.asRecord<SizeParams>(converterContext)?.let {
267
+ widthDp = it.width.toFloat()
268
+ heightDp = it.height.toFloat()
269
+ }
270
+
271
+ "width" -> modifier.asRecord<WidthParams>(converterContext)?.let { widthDp = it.width.toFloat() }
272
+ "height" -> modifier.asRecord<HeightParams>(converterContext)?.let { heightDp = it.height.toFloat() }
273
+ }
274
+ }
275
+
276
+ return WidgetImageTarget(
277
+ widthPx = (widthDp * metrics.density).roundToInt().coerceAtLeast(1),
278
+ heightPx = (heightDp * metrics.density).roundToInt().coerceAtLeast(1)
279
+ )
280
+ }
281
+
282
+ private fun ImageContentScale.toGlanceContentScale(): ContentScale {
283
+ return when (this) {
284
+ ImageContentScale.FIT -> ContentScale.Fit
285
+ ImageContentScale.CROP -> ContentScale.Crop
286
+ ImageContentScale.FILL_BOUNDS -> ContentScale.FillBounds
287
+ // RemoteViews only offers fit, crop and stretch, so the remaining scales map to the nearest one.
288
+ ImageContentScale.INSIDE, ImageContentScale.NONE -> ContentScale.Fit
289
+ ImageContentScale.FILL_WIDTH, ImageContentScale.FILL_HEIGHT -> ContentScale.Crop
290
+ }
291
+ }
292
+
293
+ private fun ReadableMap.toPeekButton(converterContext: WidgetConverterContext, source: String): Emittable {
218
294
  val props = props<WidgetButtonProps>(converterContext)
219
295
  val children = children()
220
296
  val action =
@@ -603,3 +679,13 @@ internal data class WidgetButtonProps(
603
679
  val modifiers: ModifierList = emptyList(),
604
680
  val target: String? = null
605
681
  ) : ComposeProps
682
+
683
+ @OptimizedComposeProps
684
+ internal data class WidgetImageProps(
685
+ val source: ImageSource? = null,
686
+ val contentScale: ImageContentScale = ImageContentScale.FIT,
687
+ val contentDescription: String? = null,
688
+ val tint: AndroidColor? = null,
689
+ val alpha: Float = 1f,
690
+ val modifiers: ModifierList = emptyList()
691
+ ) : ComposeProps
@@ -1,5 +1,7 @@
1
+ @file:SuppressLint("RestrictedApi")
1
2
  package expo.modules.widgets
2
3
 
4
+ import android.annotation.SuppressLint
3
5
  import android.content.Context
4
6
  import android.os.Bundle
5
7
  import androidx.compose.ui.unit.DpSize
@@ -26,6 +28,6 @@ internal class ExpoWidgetsPeekWidget(
26
28
  val environment = getWidgetEnvironment(appContext)
27
29
  val node = evaluateLayout(appContext, layout, props, environment)
28
30
 
29
- return node.toPeekRoot(appContext, widgetName)
31
+ return node.toPeekRoot(appContext, widgetName, size)
30
32
  }
31
33
  }
@@ -0,0 +1,159 @@
1
+ @file:SuppressLint("RestrictedApi")
2
+
3
+ package expo.modules.widgets
4
+
5
+ import android.annotation.SuppressLint
6
+ import android.content.Context
7
+ import android.graphics.Bitmap
8
+ import android.graphics.BitmapFactory
9
+ import android.graphics.ImageDecoder
10
+ import android.graphics.Matrix
11
+ import android.media.ExifInterface
12
+ import android.net.Uri
13
+ import android.os.Build
14
+ import androidx.glance.ImageProvider
15
+ import com.facebook.react.views.imagehelper.ResourceDrawableIdHelper
16
+ import expo.modules.ui.graphics.ImageSource
17
+ import java.io.FileNotFoundException
18
+ import java.io.InputStream
19
+ import kotlin.math.max
20
+
21
+ internal data class WidgetImageTarget(val widthPx: Int, val heightPx: Int)
22
+
23
+ // RemoteViews rejects a widget update whose bitmaps exceed its memory budget.
24
+ private const val MAX_WIDGET_IMAGE_PIXELS = 1_048_576L
25
+ private const val MAX_WIDGET_IMAGE_DIMENSION_PX = 2048
26
+
27
+ internal fun loadWidgetImage(context: Context, source: ImageSource, target: WidgetImageTarget): ImageProvider {
28
+ val uri = Uri.parse(source.uri)
29
+ return when (uri.scheme) {
30
+ null -> ImageProvider(resolveDrawableId(context, source.uri))
31
+ "file", "content", "android.resource" -> ImageProvider(decodeBitmap(context, uri, target))
32
+ "http", "https" -> throw IllegalArgumentException(
33
+ "Remote images are not supported in widgets ('${source.uri}'). Download the image to widgetsDirectory from the app and pass its file URI."
34
+ )
35
+
36
+ else -> throw IllegalArgumentException(
37
+ "Image URI scheme '${uri.scheme}' is not supported in widgets ('${source.uri}'). Pass a drawable resource name or a file URI."
38
+ )
39
+ }
40
+ }
41
+
42
+ private fun resolveDrawableId(context: Context, name: String): Int {
43
+ val resourceId = ResourceDrawableIdHelper.getResourceDrawableId(context, name)
44
+ require(resourceId > 0) {
45
+ "Image resource '$name' was not found in the app's drawables. Add it to the app's res/drawable directory or pass a file URI."
46
+ }
47
+ return resourceId
48
+ }
49
+
50
+ private fun decodeBitmap(context: Context, uri: Uri, target: WidgetImageTarget): Bitmap {
51
+ return runCatching {
52
+ if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.P) {
53
+ ImageDecoder.decodeBitmap(ImageDecoder.createSource(context.contentResolver, uri)) { decoder, info, _ ->
54
+ decoder.allocator = ImageDecoder.ALLOCATOR_SOFTWARE
55
+ decoder.setTargetSampleSize(calculateInSampleSize(info.size.width, info.size.height, target))
56
+ }
57
+ } else {
58
+ decodeWithBitmapFactory(context, uri, target)
59
+ }
60
+ }.getOrElse { error ->
61
+ throw IllegalArgumentException(
62
+ if (error is FileNotFoundException) {
63
+ "Image '$uri' does not exist. Copy the image to widgetsDirectory before updating the widget."
64
+ } else {
65
+ "Image '$uri' could not be decoded. Widgets support bitmap formats such as PNG, JPEG and WebP."
66
+ },
67
+ error
68
+ )
69
+ }
70
+ }
71
+
72
+ private fun decodeWithBitmapFactory(context: Context, uri: Uri, target: WidgetImageTarget): Bitmap {
73
+ val open: () -> InputStream = {
74
+ context.contentResolver.openInputStream(uri) ?: throw FileNotFoundException(uri.toString())
75
+ }
76
+ val orientation = open().use { input ->
77
+ runCatching {
78
+ ExifInterface(input).getAttributeInt(ExifInterface.TAG_ORIENTATION, ExifInterface.ORIENTATION_NORMAL)
79
+ }.getOrDefault(ExifInterface.ORIENTATION_NORMAL)
80
+ }
81
+ val bounds = BitmapFactory.Options().apply { inJustDecodeBounds = true }
82
+ open().use { input -> BitmapFactory.decodeStream(input, null, bounds) }
83
+ require(bounds.outWidth > 0 && bounds.outHeight > 0) { "Image '$uri' has no decodable bounds." }
84
+
85
+ val swapsDimensions = orientation.swapsDimensions()
86
+ val options = BitmapFactory.Options().apply {
87
+ inSampleSize = calculateInSampleSize(
88
+ sourceWidth = if (swapsDimensions) {
89
+ bounds.outHeight
90
+ } else {
91
+ bounds.outWidth
92
+ },
93
+ sourceHeight = if (swapsDimensions) {
94
+ bounds.outWidth
95
+ } else {
96
+ bounds.outHeight
97
+ },
98
+ target = target
99
+ )
100
+ }
101
+ val bitmap = requireNotNull(open().use { input -> BitmapFactory.decodeStream(input, null, options) }) {
102
+ "Image '$uri' could not be decoded."
103
+ }
104
+ return bitmap.applyExifOrientation(orientation)
105
+ }
106
+
107
+ private fun calculateInSampleSize(sourceWidth: Int, sourceHeight: Int, target: WidgetImageTarget): Int {
108
+ val targetWidth = target.widthPx.coerceAtLeast(1)
109
+ val targetHeight = target.heightPx.coerceAtLeast(1)
110
+ var sampleSize = 1
111
+ while (sourceWidth / (sampleSize * 2) >= targetWidth && sourceHeight / (sampleSize * 2) >= targetHeight) {
112
+ sampleSize *= 2
113
+ }
114
+ while (
115
+ (sourceWidth.toLong() / sampleSize) * (sourceHeight.toLong() / sampleSize) > MAX_WIDGET_IMAGE_PIXELS ||
116
+ max(sourceWidth, sourceHeight) / sampleSize > MAX_WIDGET_IMAGE_DIMENSION_PX
117
+ ) {
118
+ sampleSize *= 2
119
+ }
120
+ return sampleSize
121
+ }
122
+
123
+ private fun Bitmap.applyExifOrientation(orientation: Int): Bitmap {
124
+ val matrix = Matrix()
125
+ when (orientation) {
126
+ ExifInterface.ORIENTATION_FLIP_HORIZONTAL -> matrix.setScale(-1f, 1f)
127
+ ExifInterface.ORIENTATION_ROTATE_180 -> matrix.setRotate(180f)
128
+ ExifInterface.ORIENTATION_FLIP_VERTICAL -> {
129
+ matrix.setRotate(180f)
130
+ matrix.postScale(-1f, 1f)
131
+ }
132
+
133
+ ExifInterface.ORIENTATION_TRANSPOSE -> {
134
+ matrix.setRotate(90f)
135
+ matrix.postScale(-1f, 1f)
136
+ }
137
+
138
+ ExifInterface.ORIENTATION_ROTATE_90 -> matrix.setRotate(90f)
139
+ ExifInterface.ORIENTATION_TRANSVERSE -> {
140
+ matrix.setRotate(-90f)
141
+ matrix.postScale(-1f, 1f)
142
+ }
143
+
144
+ ExifInterface.ORIENTATION_ROTATE_270 -> matrix.setRotate(-90f)
145
+ else -> return this
146
+ }
147
+ return Bitmap.createBitmap(this, 0, 0, width, height, matrix, true).also { oriented ->
148
+ if (oriented !== this) {
149
+ recycle()
150
+ }
151
+ }
152
+ }
153
+
154
+ private fun Int.swapsDimensions(): Boolean {
155
+ return this == ExifInterface.ORIENTATION_TRANSPOSE ||
156
+ this == ExifInterface.ORIENTATION_ROTATE_90 ||
157
+ this == ExifInterface.ORIENTATION_TRANSVERSE ||
158
+ this == ExifInterface.ORIENTATION_ROTATE_270
159
+ }
package/bundle/index.ts CHANGED
@@ -102,10 +102,10 @@ const __expoWidgetHandlePress = function (
102
102
  };
103
103
 
104
104
  Object.assign(globalThis, {
105
- ...uiGlobals,
106
- ...jsxRuntime,
107
- ...React,
108
105
  ...ReactNative,
106
+ ...React,
107
+ ...jsxRuntime,
108
+ ...uiGlobals,
109
109
  React,
110
110
  __expoWidgetRender,
111
111
  __expoWidgetHandlePress,
@@ -2,10 +2,30 @@ export const PlatformColor = (...names: string[]) => {
2
2
  return { semantic: names };
3
3
  };
4
4
 
5
- export const Image = {
6
- resolveAssetSource: {},
5
+ type ResolvedImageSource = {
6
+ uri: string;
7
+ width?: number;
8
+ height?: number;
9
+ scale?: number;
7
10
  };
8
11
 
12
+ function resolveAssetSource(source: unknown): ResolvedImageSource | null {
13
+ if (source == null) {
14
+ return null;
15
+ }
16
+ if (typeof source === 'object' && typeof (source as ResolvedImageSource).uri === 'string') {
17
+ return source as ResolvedImageSource;
18
+ }
19
+ if (typeof source === 'number') {
20
+ throw new Error(
21
+ 'Bundled require() image sources are not supported inside widgets. Copy the image to widgetsDirectory and pass source={{ uri }} instead.'
22
+ );
23
+ }
24
+ throw new Error('Widget Image source must be an object containing a uri string.');
25
+ }
26
+
27
+ export const Image = { resolveAssetSource };
28
+
9
29
  export const useColorScheme = (): 'light' | 'dark' | null => {
10
30
  return (globalThis.__expoWidgetEnvironment?.colorScheme as 'light' | 'dark' | undefined) ?? null;
11
31
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-widgets",
3
- "version": "58.0.1",
3
+ "version": "58.0.3",
4
4
  "description": "Widgets.",
5
5
  "keywords": [
6
6
  "expo",
@@ -28,14 +28,14 @@
28
28
  },
29
29
  "dependencies": {
30
30
  "@expo/plist": "^0.9.0",
31
- "@expo/ui": "~58.0.1"
31
+ "@expo/ui": "~58.0.3"
32
32
  },
33
33
  "devDependencies": {
34
34
  "@expo/spawn-async": "^1.8.0",
35
35
  "@types/jest": "^29.2.1",
36
36
  "@types/node": "^22.14.0",
37
37
  "@types/react": "~19.2.0",
38
- "expo": "58.0.0-preview.1",
38
+ "expo": "58.0.0-preview.3",
39
39
  "expo-module-scripts": "56.0.3",
40
40
  "react-native": "0.88.0-rc.0",
41
41
  "resolve-workspace-root": "^2.0.0"
@@ -45,7 +45,7 @@
45
45
  "react": "*",
46
46
  "react-native": "*"
47
47
  },
48
- "gitHead": "e4b50c311af4e076b49a532ba2dca72546783e46",
48
+ "gitHead": "917a61b581baeb852aa4fe331da2c1395d824351",
49
49
  "scripts": {
50
50
  "build": "pnpm run build:lib && pnpm run build:plugin",
51
51
  "build:lib": "expo-build src",
package/.npmignore DELETED
@@ -1,19 +0,0 @@
1
- # @generated by expo-module-scripts
2
-
3
- # Exclude all top-level hidden directories by convention
4
- /.*/
5
-
6
- # Exclude tarballs generated by `npm pack`
7
- /*.tgz
8
-
9
- __mocks__
10
- __tests__
11
- __rsc_tests__
12
-
13
- /e2e
14
- /e2e-cli
15
- /babel.config.js
16
- /oxlint.config.mjs
17
- /android/src/androidTest/
18
- /android/src/test/
19
- /ios/Tests
package/.tsbuildinfo DELETED
@@ -1 +0,0 @@
1
- {"version":"6.0.3"}
@@ -1,262 +0,0 @@
1
-
2
- # Created by https://www.gitignore.io/api/java,maven,gradle,android,intellij,androidstudio
3
-
4
- ### Android ###
5
- # Built application files
6
- *.apk
7
- *.ap_
8
-
9
- # Files for the ART/Dalvik VM
10
- *.dex
11
-
12
- # Java class files
13
- *.class
14
-
15
- # Generated files
16
- bin/
17
- gen/
18
- out/
19
-
20
- # Gradle files
21
- .gradle/
22
- build/
23
-
24
- # Local configuration file (sdk path, etc)
25
- local.properties
26
-
27
- # Proguard folder generated by Eclipse
28
- proguard/
29
-
30
- # Log Files
31
- *.log
32
-
33
- # Android Studio Navigation editor temp files
34
- .navigation/
35
-
36
- # Android Studio captures folder
37
- captures/
38
-
39
- # Intellij
40
- *.iml
41
- .idea/workspace.xml
42
- .idea/tasks.xml
43
- .idea/gradle.xml
44
- .idea/dictionaries
45
- .idea/libraries
46
-
47
- # External native build folder generated in Android Studio 2.2 and later
48
- .externalNativeBuild
49
- .cxx/
50
-
51
- # Freeline
52
- freeline.py
53
- freeline/
54
- freeline_project_description.json
55
-
56
- ### Android Patch ###
57
- gen-external-apklibs
58
-
59
- ### AndroidStudio ###
60
- # Covers files to be ignored for android development using Android Studio.
61
-
62
- # Built application files
63
-
64
- # Files for the ART/Dalvik VM
65
-
66
- # Java class files
67
-
68
- # Generated files
69
-
70
- # Gradle files
71
- .gradle
72
-
73
- # Signing files
74
- .signing/
75
-
76
- # Local configuration file (sdk path, etc)
77
-
78
- # Proguard folder generated by Eclipse
79
-
80
- # Log Files
81
-
82
- # Android Studio
83
- /*/build/
84
- /*/local.properties
85
- /*/out
86
- /*/*/build
87
- /*/*/production
88
- *.ipr
89
- *~
90
- *.swp
91
-
92
- # Android Patch
93
-
94
- # External native build folder generated in Android Studio 2.2 and later
95
-
96
- # NDK
97
- obj/
98
-
99
- # IntelliJ IDEA
100
- *.iws
101
- /out/
102
-
103
- # User-specific configurations
104
- .idea/libraries/
105
- .idea/.name
106
- .idea/compiler.xml
107
- .idea/copyright/profiles_settings.xml
108
- .idea/encodings.xml
109
- .idea/misc.xml
110
- .idea/modules.xml
111
- .idea/scopes/scope_settings.xml
112
- .idea/vcs.xml
113
- .idea/jsLibraryMappings.xml
114
- .idea/datasources.xml
115
- .idea/dataSources.ids
116
- .idea/sqlDataSources.xml
117
- .idea/dynamic.xml
118
- .idea/uiDesigner.xml
119
-
120
- # OS-specific files
121
- .DS_Store
122
- .DS_Store?
123
- ._*
124
- .Spotlight-V100
125
- .Trashes
126
- ehthumbs.db
127
- Thumbs.db
128
-
129
- # Legacy Eclipse project files
130
- .classpath
131
- .project
132
- .cproject
133
- .settings/
134
-
135
- # Mobile Tools for Java (J2ME)
136
- .mtj.tmp/
137
-
138
- # Package Files #
139
- *.war
140
- *.ear
141
-
142
- # virtual machine crash logs (Reference: http://www.java.com/en/download/help/error_hotspot.xml)
143
- hs_err_pid*
144
-
145
- ## Plugin-specific files:
146
-
147
- # mpeltonen/sbt-idea plugin
148
- .idea_modules/
149
-
150
- # JIRA plugin
151
- atlassian-ide-plugin.xml
152
-
153
- # Mongo Explorer plugin
154
- .idea/mongoSettings.xml
155
-
156
- ### AndroidStudio Patch ###
157
-
158
- !/gradle/wrapper/gradle-wrapper.jar
159
-
160
- ### Intellij ###
161
- # Covers JetBrains IDEs: IntelliJ, RubyMine, PhpStorm, AppCode, PyCharm, CLion, Android Studio and Webstorm
162
- # Reference: https://intellij-support.jetbrains.com/hc/en-us/articles/206544839
163
-
164
- # User-specific stuff:
165
- .idea/**/workspace.xml
166
- .idea/**/tasks.xml
167
-
168
- # Sensitive or high-churn files:
169
- .idea/**/dataSources/
170
- .idea/**/dataSources.ids
171
- .idea/**/dataSources.xml
172
- .idea/**/dataSources.local.xml
173
- .idea/**/sqlDataSources.xml
174
- .idea/**/dynamic.xml
175
- .idea/**/uiDesigner.xml
176
-
177
- # Gradle:
178
- .idea/**/gradle.xml
179
- .idea/**/libraries
180
-
181
- # CMake
182
- cmake-build-debug/
183
-
184
- # Mongo Explorer plugin:
185
- .idea/**/mongoSettings.xml
186
-
187
- ## File-based project format:
188
-
189
- ## Plugin-specific files:
190
-
191
- # IntelliJ
192
-
193
- # mpeltonen/sbt-idea plugin
194
-
195
- # JIRA plugin
196
-
197
- # Cursive Clojure plugin
198
- .idea/replstate.xml
199
-
200
- # Ruby plugin and RubyMine
201
- /.rakeTasks
202
-
203
- ### Intellij Patch ###
204
- # Comment Reason: https://github.com/joeblau/gitignore.io/issues/186#issuecomment-215987721
205
-
206
- # *.iml
207
- # modules.xml
208
- # .idea/misc.xml
209
- # *.ipr
210
-
211
- # Sonarlint plugin
212
- .idea/sonarlint
213
-
214
- ### Java ###
215
- # Compiled class file
216
-
217
- # Log file
218
-
219
- # BlueJ files
220
- *.ctxt
221
-
222
- # Mobile Tools for Java (J2ME)
223
-
224
- # Package Files #
225
- *.jar
226
- *.zip
227
- *.tar.gz
228
- *.rar
229
-
230
- # virtual machine crash logs, see http://www.java.com/en/download/help/error_hotspot.xml
231
-
232
- ### Maven ###
233
- target/
234
- pom.xml.tag
235
- pom.xml.releaseBackup
236
- pom.xml.versionsBackup
237
- pom.xml.next
238
- release.properties
239
- dependency-reduced-pom.xml
240
- buildNumber.properties
241
- .mvn/timing.properties
242
-
243
- # Avoid ignoring Maven wrapper jar file (.jar files are usually ignored)
244
- !/.mvn/wrapper/maven-wrapper.jar
245
-
246
- ### Gradle ###
247
- **/build/
248
-
249
- # Ignore Gradle GUI config
250
- gradle-app.setting
251
-
252
- # Avoid ignoring Gradle wrapper jar file (.jar files are usually ignored)
253
- !gradle-wrapper.jar
254
-
255
- # Cache of project
256
- .gradletasknamecache
257
-
258
- # # Work around https://youtrack.jetbrains.com/issue/IDEA-116898
259
- # gradle/wrapper/gradle-wrapper.properties
260
-
261
-
262
- # End of https://www.gitignore.io/api/java,maven,gradle,android,intellij,androidstudio
package/bundle/.gitignore DELETED
@@ -1 +0,0 @@
1
- build/
package/jest.config.js DELETED
@@ -1,16 +0,0 @@
1
- // `bundle` tests are plain Node-targeted TS (hand-written JSX runtime stub, not real JSX), so
2
- // they run on the CLI preset in place of the default `src` projects; `plugin` runs as its own
3
- // project — so a single `jest` invocation covers the whole package.
4
- const { watchPlugins, prettierPath, ...cliPreset } = require('expo-module-scripts/jest-preset-cli');
5
-
6
- module.exports = require('expo-module-scripts/createCompositeJestPreset')(__dirname, ['plugin'], {
7
- srcProjects: [
8
- {
9
- ...cliPreset,
10
- displayName: 'bundle',
11
- clearMocks: true,
12
- rootDir: __dirname,
13
- roots: ['bundle'],
14
- },
15
- ],
16
- });
@@ -1 +0,0 @@
1
- {"version":"6.0.3"}
@@ -1,10 +0,0 @@
1
- {
2
- "extends": "expo-module-scripts/tsconfig.plugin",
3
- "compilerOptions": {
4
- "composite": true,
5
- "rootDir": "./src",
6
- "noEmit": true,
7
- "types": ["node", "jest"]
8
- },
9
- "include": ["./src"]
10
- }
@@ -1 +0,0 @@
1
- {"root":["./src/index.ts","./src/withwidgets.ts","./src/android/resourcenames.ts","./src/android/withandroidwidgetfiles.ts","./src/android/withandroidwidgetmanifest.ts","./src/android/withandroidwidgets.ts","./src/ios/withappgroupentitlements.ts","./src/ios/withappinfoplist.ts","./src/ios/witheasconfig.ts","./src/ios/withioswarning.ts","./src/ios/withioswidgets.ts","./src/ios/withpodslinking.ts","./src/ios/withpushnotifications.ts","./src/ios/withwidgetsourcefiles.ts","./src/ios/xcode/addbuildphases.ts","./src/ios/xcode/addpbxgroup.ts","./src/ios/xcode/addproductfile.ts","./src/ios/xcode/addtargetdependency.ts","./src/ios/xcode/addtopbxnativetargetsection.ts","./src/ios/xcode/addtopbxprojectsection.ts","./src/ios/xcode/addxcconfigurationlist.ts","./src/ios/xcode/withtargetxcodeproject.ts","./src/types/widgetconfig.type.ts","./src/types/widgetfamily.type.ts"],"version":"6.0.3"}
package/tsconfig.all.json DELETED
@@ -1,11 +0,0 @@
1
- {
2
- "files": [],
3
- "references": [
4
- {
5
- "path": "./tsconfig.json"
6
- },
7
- {
8
- "path": "./plugin"
9
- }
10
- ]
11
- }
package/tsconfig.json DELETED
@@ -1,10 +0,0 @@
1
- // @generated by expo-module-scripts
2
- {
3
- "extends": "expo-module-scripts/tsconfig.base",
4
- "compilerOptions": {
5
- "composite": true,
6
- "rootDir": "./src",
7
- "noEmit": true
8
- },
9
- "include": ["./src"]
10
- }