expo-dev-menu 56.0.11 → 56.0.12
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 +10 -0
- package/android/build.gradle +2 -2
- package/android/src/debug/java/expo/modules/devmenu/fab/FloatingActionButtonContent.kt +2 -13
- package/android/src/debug/java/expo/modules/devmenu/fab/MovableFloatingActionButton.kt +27 -5
- package/ios/DevMenuManager.swift +10 -0
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -10,6 +10,16 @@
|
|
|
10
10
|
|
|
11
11
|
### 💡 Others
|
|
12
12
|
|
|
13
|
+
## 56.0.12 — 2026-05-20
|
|
14
|
+
|
|
15
|
+
### 🎉 New features
|
|
16
|
+
|
|
17
|
+
- [iOS] Add `setShowsAtLaunch`/`getShowsAtLaunch` to `DevMenuManager` so preferences can be toggled at runtime and applied immediately. ([#XXXXX](https://github.com/expo/expo/pull/XXXXX) by [@gabrieldonadel](https://github.com/gabrieldonadel)) ([#46000](https://github.com/expo/expo/pull/46000) by [@gabrieldonadel](https://github.com/gabrieldonadel))
|
|
18
|
+
|
|
19
|
+
### 🐛 Bug fixes
|
|
20
|
+
|
|
21
|
+
- Fix FAB resizing on label disappearance ([#45869](https://github.com/expo/expo/pull/45869) by [@Wenszel](https://github.com/Wenszel))
|
|
22
|
+
|
|
13
23
|
## 56.0.11 — 2026-05-19
|
|
14
24
|
|
|
15
25
|
_This version does not introduce any user-facing changes._
|
package/android/build.gradle
CHANGED
|
@@ -12,7 +12,7 @@ apply plugin: 'expo-module-gradle-plugin'
|
|
|
12
12
|
apply plugin: 'org.jetbrains.kotlin.plugin.compose'
|
|
13
13
|
|
|
14
14
|
group = 'host.exp.exponent'
|
|
15
|
-
version = '56.0.
|
|
15
|
+
version = '56.0.12'
|
|
16
16
|
|
|
17
17
|
def hasDevLauncher = findProject(":expo-dev-launcher") != null
|
|
18
18
|
def configureInRelease = findProperty("expo.devmenu.configureInRelease") == "true"
|
|
@@ -29,7 +29,7 @@ android {
|
|
|
29
29
|
|
|
30
30
|
defaultConfig {
|
|
31
31
|
versionCode 10
|
|
32
|
-
versionName '56.0.
|
|
32
|
+
versionName '56.0.12'
|
|
33
33
|
}
|
|
34
34
|
|
|
35
35
|
buildTypes {
|
|
@@ -13,11 +13,7 @@ import androidx.compose.foundation.layout.size
|
|
|
13
13
|
import androidx.compose.foundation.shape.CircleShape
|
|
14
14
|
import androidx.compose.foundation.shape.RoundedCornerShape
|
|
15
15
|
import androidx.compose.runtime.Composable
|
|
16
|
-
import androidx.compose.runtime.LaunchedEffect
|
|
17
16
|
import androidx.compose.runtime.getValue
|
|
18
|
-
import androidx.compose.runtime.mutableStateOf
|
|
19
|
-
import androidx.compose.runtime.remember
|
|
20
|
-
import androidx.compose.runtime.setValue
|
|
21
17
|
import androidx.compose.ui.Alignment
|
|
22
18
|
import androidx.compose.ui.Modifier
|
|
23
19
|
import androidx.compose.ui.draw.drawWithContent
|
|
@@ -34,7 +30,6 @@ import androidx.compose.ui.unit.sp
|
|
|
34
30
|
import com.composeunstyled.Icon
|
|
35
31
|
import com.composeunstyled.Text
|
|
36
32
|
import expo.modules.devmenu.R
|
|
37
|
-
import kotlinx.coroutines.delay
|
|
38
33
|
|
|
39
34
|
private val FabBlue = Color(0xFF007AFF)
|
|
40
35
|
|
|
@@ -43,7 +38,8 @@ fun FloatingActionButtonContent(
|
|
|
43
38
|
modifier: Modifier = Modifier,
|
|
44
39
|
isPressed: Boolean = false,
|
|
45
40
|
isDragging: Boolean = false,
|
|
46
|
-
isIdle: Boolean = false
|
|
41
|
+
isIdle: Boolean = false,
|
|
42
|
+
showLabel: Boolean = true
|
|
47
43
|
) {
|
|
48
44
|
val scale by animateFloatAsState(
|
|
49
45
|
targetValue = if (isPressed && !isDragging) 0.9f else 1f,
|
|
@@ -60,13 +56,6 @@ fun FloatingActionButtonContent(
|
|
|
60
56
|
label = "idleSaturation"
|
|
61
57
|
)
|
|
62
58
|
|
|
63
|
-
var showLabel by remember { mutableStateOf(true) }
|
|
64
|
-
|
|
65
|
-
LaunchedEffect(Unit) {
|
|
66
|
-
delay(10_000)
|
|
67
|
-
showLabel = false
|
|
68
|
-
}
|
|
69
|
-
|
|
70
59
|
Column(
|
|
71
60
|
horizontalAlignment = Alignment.CenterHorizontally,
|
|
72
61
|
modifier = modifier
|
|
@@ -18,7 +18,10 @@ import androidx.compose.foundation.layout.safeDrawingPadding
|
|
|
18
18
|
import androidx.compose.foundation.layout.size
|
|
19
19
|
import androidx.compose.runtime.Composable
|
|
20
20
|
import androidx.compose.runtime.LaunchedEffect
|
|
21
|
+
import androidx.compose.runtime.getValue
|
|
22
|
+
import androidx.compose.runtime.mutableStateOf
|
|
21
23
|
import androidx.compose.runtime.remember
|
|
24
|
+
import androidx.compose.runtime.setValue
|
|
22
25
|
import androidx.compose.ui.Modifier
|
|
23
26
|
import androidx.compose.ui.geometry.Offset
|
|
24
27
|
import androidx.compose.ui.geometry.Rect
|
|
@@ -31,9 +34,11 @@ import androidx.compose.ui.unit.dp
|
|
|
31
34
|
import expo.modules.devmenu.compose.DevMenuState
|
|
32
35
|
import kotlinx.coroutines.CoroutineScope
|
|
33
36
|
import kotlinx.coroutines.coroutineScope
|
|
37
|
+
import kotlinx.coroutines.delay
|
|
34
38
|
import kotlinx.coroutines.launch
|
|
35
39
|
|
|
36
|
-
private val FabDefaultSize = DpSize(
|
|
40
|
+
private val FabDefaultSize = DpSize(52.dp, 94.dp)
|
|
41
|
+
private val FabContentSize = DpSize(52.dp, 52.dp)
|
|
37
42
|
private val Margin = 16.dp
|
|
38
43
|
private const val ClickDragTolerance = 40f
|
|
39
44
|
|
|
@@ -46,22 +51,38 @@ private const val ClickDragTolerance = 40f
|
|
|
46
51
|
fun MovableFloatingActionButton(
|
|
47
52
|
state: DevMenuState,
|
|
48
53
|
modifier: Modifier = Modifier,
|
|
49
|
-
fabSize: DpSize = FabDefaultSize,
|
|
50
54
|
margin: Dp = Margin,
|
|
51
55
|
onPress: () -> Unit = {}
|
|
52
56
|
) {
|
|
57
|
+
var showLabel by remember { mutableStateOf(true) }
|
|
58
|
+
|
|
59
|
+
LaunchedEffect(Unit) {
|
|
60
|
+
delay(10_000)
|
|
61
|
+
showLabel = false
|
|
62
|
+
}
|
|
63
|
+
|
|
53
64
|
BoxWithConstraints(
|
|
54
65
|
modifier = modifier
|
|
55
66
|
.safeDrawingPadding()
|
|
56
67
|
.fillMaxSize()
|
|
57
68
|
) {
|
|
58
|
-
val
|
|
69
|
+
val effectiveFabSize = if (showLabel) {
|
|
70
|
+
FabDefaultSize
|
|
71
|
+
} else {
|
|
72
|
+
FabContentSize
|
|
73
|
+
}
|
|
74
|
+
val totalFabSize = DpSize(effectiveFabSize.width + margin * 2, effectiveFabSize.height + margin * 2)
|
|
59
75
|
val totalFabSizePx = with(LocalDensity.current) {
|
|
60
76
|
Offset(totalFabSize.width.toPx(), totalFabSize.height.toPx())
|
|
61
77
|
}
|
|
78
|
+
val fabPressableSizeWithMargin = DpSize(FabContentSize.width + margin * 2, FabContentSize.height + margin * 2)
|
|
79
|
+
val fabPressableSizeWithMarginPx = with(LocalDensity.current) {
|
|
80
|
+
Offset(fabPressableSizeWithMargin.width.toPx(), fabPressableSizeWithMargin.height.toPx())
|
|
81
|
+
}
|
|
82
|
+
|
|
62
83
|
val bounds = Offset(
|
|
63
|
-
x = constraints.maxWidth -
|
|
64
|
-
y = constraints.maxHeight -
|
|
84
|
+
x = constraints.maxWidth - fabPressableSizeWithMarginPx.x,
|
|
85
|
+
y = constraints.maxHeight - fabPressableSizeWithMarginPx.y
|
|
65
86
|
)
|
|
66
87
|
|
|
67
88
|
val halfFab = Offset(totalFabSizePx.x / 2f, totalFabSizePx.y / 2f)
|
|
@@ -185,6 +206,7 @@ fun MovableFloatingActionButton(
|
|
|
185
206
|
isPressed = fab.isPressed,
|
|
186
207
|
isDragging = fab.isDragging,
|
|
187
208
|
isIdle = fab.isIdle,
|
|
209
|
+
showLabel = showLabel,
|
|
188
210
|
modifier = Modifier.fillMaxSize()
|
|
189
211
|
)
|
|
190
212
|
}
|
package/ios/DevMenuManager.swift
CHANGED
|
@@ -195,6 +195,16 @@ open class DevMenuManager: NSObject {
|
|
|
195
195
|
return DevMenuPreferences.touchGestureEnabled
|
|
196
196
|
}
|
|
197
197
|
|
|
198
|
+
@objc
|
|
199
|
+
public func setShowsAtLaunch(_ enabled: Bool) {
|
|
200
|
+
DevMenuPreferences.showsAtLaunch = enabled
|
|
201
|
+
}
|
|
202
|
+
|
|
203
|
+
@objc
|
|
204
|
+
public func getShowsAtLaunch() -> Bool {
|
|
205
|
+
return DevMenuPreferences.showsAtLaunch
|
|
206
|
+
}
|
|
207
|
+
|
|
198
208
|
@objc
|
|
199
209
|
public func setShowFloatingActionButton(_ enabled: Bool) {
|
|
200
210
|
DevMenuPreferences.showFloatingActionButton = enabled
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-dev-menu",
|
|
3
|
-
"version": "56.0.
|
|
3
|
+
"version": "56.0.12",
|
|
4
4
|
"description": "Expo/React Native module with the developer menu.",
|
|
5
5
|
"main": "build/DevMenu.js",
|
|
6
6
|
"types": "build/DevMenu.d.ts",
|
|
@@ -32,15 +32,15 @@
|
|
|
32
32
|
"@types/node": "^22.14.0",
|
|
33
33
|
"react": "19.2.3",
|
|
34
34
|
"react-native": "0.85.3",
|
|
35
|
-
"expo": "56.0.
|
|
35
|
+
"babel-preset-expo": "56.0.10",
|
|
36
36
|
"expo-module-scripts": "56.0.2",
|
|
37
|
-
"
|
|
37
|
+
"expo": "56.0.0"
|
|
38
38
|
},
|
|
39
39
|
"peerDependencies": {
|
|
40
40
|
"expo": "*",
|
|
41
41
|
"react-native": "*"
|
|
42
42
|
},
|
|
43
|
-
"gitHead": "
|
|
43
|
+
"gitHead": "c4c9867a0bcbb188e55ecaec4998e38d33108a5d",
|
|
44
44
|
"scripts": {
|
|
45
45
|
"build": "expo-module build",
|
|
46
46
|
"clean": "expo-module clean",
|