Skip to content

Commit 1236f5d

Browse files
authored
Merge branch 'expo:main' into main
2 parents 8fd4ddd + 1dc151e commit 1236f5d

File tree

317 files changed

+5262
-2004
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

317 files changed

+5262
-2004
lines changed

.github/workflows/ios-unit-tests.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -70,6 +70,9 @@ jobs:
7070
- name: 🥥 Install CocoaPods in `apps/native-tests/ios`
7171
if: steps.expo-caches.outputs.bare-expo-pods-hit != 'true'
7272
run: pod install
73+
env:
74+
RCT_USE_PREBUILT_RNCORE: 1
75+
RCT_USE_RN_DEP: 1
7376
working-directory: apps/native-tests/ios
7477
- name: 🧪 Run native iOS unit tests
7578
timeout-minutes: 60

.github/workflows/test-suite.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -68,6 +68,9 @@ jobs:
6868
- name: 🥥 Install pods in apps/bare-expo/ios
6969
if: steps.expo-caches.outputs.ios-pods-hit != 'true'
7070
run: pod install
71+
env:
72+
RCT_USE_PREBUILT_RNCORE: 1
73+
RCT_USE_RN_DEP: 1
7174
working-directory: apps/bare-expo/ios
7275
- name: 🏗️ Build iOS project
7376
run: ./scripts/start-ios-e2e-test.js --build

apps/bare-expo/ios/Podfile.lock

Lines changed: 18 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -3571,7 +3571,7 @@ PODS:
35713571
- RNWorklets
35723572
- SocketRocket
35733573
- Yoga
3574-
- RNScreens (4.12.0):
3574+
- RNScreens (4.14.0-nightly-20250803-1df3db25a):
35753575
- boost
35763576
- DoubleConversion
35773577
- fast_float
@@ -3598,10 +3598,10 @@ PODS:
35983598
- ReactCodegen
35993599
- ReactCommon/turbomodule/bridging
36003600
- ReactCommon/turbomodule/core
3601-
- RNScreens/common (= 4.12.0)
3601+
- RNScreens/common (= 4.14.0-nightly-20250803-1df3db25a)
36023602
- SocketRocket
36033603
- Yoga
3604-
- RNScreens/common (4.12.0):
3604+
- RNScreens/common (4.14.0-nightly-20250803-1df3db25a):
36053605
- boost
36063606
- DoubleConversion
36073607
- fast_float
@@ -3687,7 +3687,7 @@ PODS:
36873687
- ReactCommon/turbomodule/core
36883688
- SocketRocket
36893689
- Yoga
3690-
- RNWorklets (0.4.0):
3690+
- RNWorklets (0.4.1):
36913691
- boost
36923692
- DoubleConversion
36933693
- fast_float
@@ -3713,10 +3713,10 @@ PODS:
37133713
- ReactCodegen
37143714
- ReactCommon/turbomodule/bridging
37153715
- ReactCommon/turbomodule/core
3716-
- RNWorklets/worklets (= 0.4.0)
3716+
- RNWorklets/worklets (= 0.4.1)
37173717
- SocketRocket
37183718
- Yoga
3719-
- RNWorklets/worklets (0.4.0):
3719+
- RNWorklets/worklets (0.4.1):
37203720
- boost
37213721
- DoubleConversion
37223722
- fast_float
@@ -3742,10 +3742,10 @@ PODS:
37423742
- ReactCodegen
37433743
- ReactCommon/turbomodule/bridging
37443744
- ReactCommon/turbomodule/core
3745-
- RNWorklets/worklets/apple (= 0.4.0)
3745+
- RNWorklets/worklets/apple (= 0.4.1)
37463746
- SocketRocket
37473747
- Yoga
3748-
- RNWorklets/worklets/apple (0.4.0):
3748+
- RNWorklets/worklets/apple (0.4.1):
37493749
- boost
37503750
- DoubleConversion
37513751
- fast_float
@@ -4419,7 +4419,7 @@ SPEC CHECKSUMS:
44194419
EXApplication: 2da4660569e086f4f18722758b52d7e7792631ab
44204420
EXAV: 0809cbb31eba2111d5413f2dbb547ba9727478ee
44214421
EXConstants: 72e8e04dc4d7d97c74a618d44753ea4a7437a2b6
4422-
EXImageLoader: ab4fcf9240cf3636a83c00e3fc5229d692899428
4422+
EXImageLoader: d2b81b29509ee86ad8bdf0d2cc9ff5d86051d68b
44234423
EXJSONUtils: 1d3e4590438c3ee593684186007028a14b3686cd
44244424
EXManifests: bf76658edfbfa3e3fb67f940ade98d7803490789
44254425
EXNotifications: f0f1c97d04f06c51ea073d7b2396431e5611c1ea
@@ -4428,12 +4428,12 @@ SPEC CHECKSUMS:
44284428
expo-dev-launcher: 01965720c5f143534dd1367131a2a6aba8012993
44294429
expo-dev-menu: a22e83e35c8c902609ff7328142e9c95ed939e03
44304430
expo-dev-menu-interface: e4289a7d41317f5d727949a95e3d94553d3ba056
4431-
ExpoAppIntegrity: 4730a3328b6261297db919772d6f08af72850bee
4431+
ExpoAppIntegrity: 3dc8bc7a3a7e056cbed75af112969e52e7f45e66
44324432
ExpoAppleAuthentication: 69a48d4633024124a33fda650dba706c216d6c76
44334433
ExpoAsset: b5bfc6425d1e9a09e8e1368646b98fe5ae7ed074
44344434
ExpoAudio: f6bcc6868e643e6fa74b6e20fd7d20ecc89b4e28
44354435
ExpoBackgroundFetch: 76c48b3cd9a4ee46e5267614a30fac804de6f33e
4436-
ExpoBackgroundTask: 9296d983f3d612359419e015ded65ebe9de30ba2
4436+
ExpoBackgroundTask: 63e54818a257ad36aeff7e04ef67598e68c18fbb
44374437
ExpoBattery: 6229d981d12dffb00c9e8e48181162729febb541
44384438
ExpoBlur: 5d95f7ca771a0f3b9618466525dd68e46dc95f3a
44394439
ExpoBrightness: 05e750736f8886dcf235212b0caf85b0f605fc88
@@ -4451,9 +4451,9 @@ SPEC CHECKSUMS:
44514451
ExpoGL: 8f7f43291e400621ef9aeb7af347816c2051ddc7
44524452
ExpoHaptics: 581bbb680c566b8afef68fd50f1efb883972b150
44534453
ExpoImage: 736d4bf4e14437d0e0c7dafdd3aa169c17d447a7
4454-
ExpoImageManipulator: 8d088059bf4f6287edb451925cc280b0d12b7627
4454+
ExpoImageManipulator: d889b5a58e217657dd5ef4fbc23441f2be12463e
44554455
ExpoImagePicker: 235489a513df4c70c402f2a49a47fdd94053d63d
4456-
ExpoInsights: c4d32540336dbe7c2094794f721c9024fa33558f
4456+
ExpoInsights: a349f1545051a3693da28d7c719e3c81586e2349
44574457
ExpoKeepAwake: 95037f8576ba678db79cbf558b933400c81997a7
44584458
ExpoLinearGradient: 110244a240361e3351756225e5fcc4c6c07f5431
44594459
ExpoLinking: 5d151d4a497d7e375308602f0a89b4e8acf7b5f8
@@ -4484,10 +4484,10 @@ SPEC CHECKSUMS:
44844484
ExpoTrackingTransparency: 37880a2e6f317c938f1b50cd05c094571e317ba5
44854485
ExpoUI: 3aa8b32e10230a7b2aca7b3e8199f4e2461c3267
44864486
ExpoVideo: 0e9cd59d0bd301e0f33a8fa7b0e3f1a497f60f81
4487-
ExpoVideoThumbnails: 1381bba1a0ef61c80d6f3eae6e0ffcc198de648b
4487+
ExpoVideoThumbnails: 78229366987270a271cd57e2cda857003e32ebda
44884488
ExpoWebBrowser: 41dc1db6ed9185a3b80a9f917ba3c62dafd22eec
44894489
EXStructuredHeaders: 1c799cb91e8057e0671610635e5b2109fa295114
4490-
EXTaskManager: 0128b9f39a088b0c762d8d1c42017e6d44200b29
4490+
EXTaskManager: d767bbb4ea832f4b7781244bcc8e01c94d27aa60
44914491
EXUpdates: bb5eb316f5d056510304948fcbff908e2b6bb9af
44924492
EXUpdatesInterface: d6c802a2d1d11867523d03a95397957f9ba3d1c7
44934493
fast_float: b32c788ed9c6a8c584d114d0047beda9664e7cc6
@@ -4582,15 +4582,15 @@ SPEC CHECKSUMS:
45824582
RNFlashList: 3b0c6a34ba86318f897ff55ff7482b7e8ae18996
45834583
RNGestureHandler: f47ece8192844e594954cd8477b15a0e1a9fd874
45844584
RNReanimated: bc92d92315bde5372395f9f9b96e44bde14ea612
4585-
RNScreens: c0f1e602f1c663c721a8faf7a10f48b9823e45f5
4585+
RNScreens: fc90db67db667de4fa6caf1355d679e04fe4c30f
45864586
RNSVG: 8d87cff016edf1b6ca409ed39804101836d75e90
4587-
RNWorklets: cdcb3e4f5e9aea5b946974d0f95e40d01d651033
4587+
RNWorklets: f0b4bfd581c55f18a8bea9beae9cef26650c8cda
45884588
SDWebImage: f84b0feeb08d2d11e6a9b843cb06d75ebf5b8868
45894589
SDWebImageAVIFCoder: 00310d246aab3232ce77f1d8f0076f8c4b021d90
45904590
SDWebImageSVGCoder: 15a300a97ec1c8ac958f009c02220ac0402e936c
45914591
SDWebImageWebPCoder: e38c0a70396191361d60c092933e22c20d5b1380
45924592
SocketRocket: d4aabe649be1e368d1318fdf28a022d714d65748
4593-
UMAppLoader: 55159b69750129faa7a51c493cb8ea55a7b64eb9
4593+
UMAppLoader: 90857e24b6b31ef0c87ade0688c6c4ca08d6201b
45944594
Yoga: 15c07d37869e68f295849c2af164cea21957f345
45954595
ZXingObjC: 8898711ab495761b2dbbdec76d90164a6d7e14c5
45964596

apps/bare-expo/package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,10 +69,10 @@
6969
"react-native-gesture-handler": "~2.26.0",
7070
"react-native-keyboard-controller": "^1.18.2",
7171
"react-native-pager-view": "6.8.1",
72-
"react-native-worklets": "0.4.0",
72+
"react-native-worklets": "0.4.1",
7373
"react-native-reanimated": "4.0.1",
7474
"react-native-safe-area-context": "5.5.2",
75-
"react-native-screens": "4.12.0",
75+
"react-native-screens": "4.14.0-nightly-20250803-1df3db25a",
7676
"react-native-svg": "15.12.1",
7777
"react-native-view-shot": "4.0.3",
7878
"react-native-webview": "13.15.0",

apps/expo-go/android/expoview/src/main/java/host/exp/exponent/experience/ExperienceActivity.kt

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -52,6 +52,7 @@ import host.exp.exponent.kernel.Kernel.KernelStartedRunningEvent
5252
import host.exp.exponent.kernel.KernelConstants
5353
import host.exp.exponent.kernel.KernelConstants.ExperienceOptions
5454
import host.exp.exponent.kernel.KernelProvider
55+
import host.exp.exponent.kernel.fab.ExperienceFabView
5556
import host.exp.exponent.notifications.ExponentNotification
5657
import host.exp.exponent.notifications.ExponentNotificationManager
5758
import host.exp.exponent.notifications.NotificationConstants
@@ -106,6 +107,9 @@ open class ExperienceActivity : BaseExperienceActivity(), StartReactInstanceDele
106107

107108
@Inject
108109
lateinit var devMenuManager: DevMenuManager
110+
private val floatingActionButton: ExperienceFabView by lazy {
111+
ExperienceFabView(this)
112+
}
109113

110114
private val devBundleDownloadProgressListener: DevBundleDownloadProgressListener =
111115
object : DevBundleDownloadProgressListener {
@@ -330,6 +334,7 @@ open class ExperienceActivity : BaseExperienceActivity(), StartReactInstanceDele
330334
override fun onDoneLoading() {
331335
reactSurface?.view?.let {
332336
setReactRootView(it)
337+
addReactViewToContentContainer(floatingActionButton)
333338
}
334339
}
335340

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
package host.exp.exponent.kernel.fab
2+
3+
import androidx.annotation.DrawableRes
4+
import androidx.compose.foundation.Image
5+
import androidx.compose.runtime.Composable
6+
import androidx.compose.runtime.remember
7+
import androidx.compose.ui.Modifier
8+
import androidx.compose.ui.graphics.Color
9+
import androidx.compose.ui.graphics.ColorFilter
10+
import androidx.compose.ui.graphics.painter.Painter
11+
import androidx.compose.ui.res.painterResource
12+
13+
@Composable
14+
fun Icon(
15+
painter: Painter,
16+
contentDescription: String?,
17+
modifier: Modifier = Modifier,
18+
tint: Color
19+
) {
20+
val colorFilter = remember(tint) {
21+
if (tint == Color.Unspecified) null else ColorFilter.tint(tint)
22+
}
23+
Image(painter, contentDescription, modifier, colorFilter = colorFilter)
24+
}
25+
26+
@Composable
27+
fun DayNightIcon(
28+
@DrawableRes id: Int,
29+
contentDescription: String?,
30+
modifier: Modifier = Modifier
31+
) {
32+
DayNightIcon(
33+
painter = painterResource(id),
34+
contentDescription = contentDescription,
35+
modifier = modifier
36+
)
37+
}
38+
39+
@Composable
40+
fun DayNightIcon(
41+
painter: Painter,
42+
contentDescription: String?,
43+
modifier: Modifier = Modifier
44+
) {
45+
Icon(
46+
painter = painter,
47+
contentDescription = contentDescription,
48+
modifier = modifier,
49+
tint = Theme.colors.icon.default
50+
)
51+
}
Lines changed: 32 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,32 @@
1+
package host.exp.exponent.kernel.fab
2+
3+
import android.annotation.SuppressLint
4+
import android.widget.LinearLayout
5+
import androidx.compose.ui.platform.ComposeView
6+
import expo.modules.devmenu.fab.ComposeMovableFloatingActionButton
7+
import host.exp.exponent.experience.ExperienceActivity
8+
9+
@SuppressLint("ViewConstructor")
10+
class ExperienceFabView(
11+
context: ExperienceActivity
12+
) : LinearLayout(context) {
13+
init {
14+
addView(
15+
ComposeView(context).apply {
16+
setContent {
17+
FabTheme {
18+
ComposeMovableFloatingActionButton(
19+
context = context,
20+
onRefreshPress = {
21+
context.devMenuManager.reloadApp()
22+
},
23+
onOpenMenuPress = {
24+
context.toggleDevMenu()
25+
}
26+
)
27+
}
28+
}
29+
}
30+
)
31+
}
32+
}
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
package expo.modules.devmenu.fab
2+
3+
import java.util.LinkedList
4+
5+
/**
6+
* Velocity tracker to calculate the rate of change of a 2D position
7+
* over a specific time window.
8+
*
9+
* @param timeFrameMillis Timeframe duration of the points for velocity calculation.
10+
* Positions older than this will be discarded.
11+
*/
12+
internal class ExpoVelocityTracker(private val timeFrameMillis: Long = 100L) {
13+
data class PointF(val x: Float, val y: Float)
14+
private data class PositionSnapshot(val point: PointF, val timestamp: Long)
15+
16+
private val positions = LinkedList<PositionSnapshot>()
17+
18+
fun registerPosition(x: Float, y: Float) {
19+
val snapshot = PositionSnapshot(PointF(x, y), System.currentTimeMillis())
20+
positions.add(snapshot)
21+
pruneOldPositions()
22+
}
23+
24+
/**
25+
* Calculates the average velocity in pixels per second between the oldest and newest
26+
* data points within the defined `timeFrameMillis`.
27+
*/
28+
fun calculateVelocity(): PointF {
29+
pruneOldPositions()
30+
31+
if (positions.size < 2) {
32+
return PointF(0f, 0f)
33+
}
34+
35+
val first = positions.first()
36+
val last = positions.last()
37+
38+
val deltaTimeSeconds = (last.timestamp - first.timestamp) / 1000.0f
39+
40+
if (deltaTimeSeconds == 0f) {
41+
return PointF(0f, 0f)
42+
}
43+
44+
val deltaX = last.point.x - first.point.x
45+
val deltaY = last.point.y - first.point.y
46+
47+
val velocityX = deltaX / deltaTimeSeconds
48+
val velocityY = deltaY / deltaTimeSeconds
49+
50+
return PointF(velocityX, velocityY)
51+
}
52+
53+
private fun pruneOldPositions() {
54+
val currentTime = System.currentTimeMillis()
55+
val cutoffTime = currentTime - timeFrameMillis
56+
57+
while (positions.isNotEmpty() && positions.first().timestamp < cutoffTime) {
58+
positions.pollFirst()
59+
}
60+
}
61+
62+
fun clear() {
63+
positions.clear()
64+
}
65+
}

0 commit comments

Comments
 (0)