expo-dev-menu 7.0.0 → 7.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 CHANGED
@@ -10,6 +10,16 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 7.0.2 — 2025-08-16
14
+
15
+ ### 🐛 Bug fixes
16
+
17
+ - [ios] Prevent crash when getting app icon. ([#38888](https://github.com/expo/expo/pull/38888) by [@douglowder](https://github.com/douglowder))
18
+
19
+ ## 7.0.1 — 2025-08-15
20
+
21
+ _This version does not introduce any user-facing changes._
22
+
13
23
  ## 7.0.0 — 2025-08-13
14
24
 
15
25
  ### 🎉 New features
@@ -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 = '7.0.0'
15
+ version = '7.0.2'
16
16
 
17
17
  expoModule {
18
18
  canBePublished false
@@ -22,7 +22,7 @@ android {
22
22
  namespace "expo.modules.devmenu"
23
23
  defaultConfig {
24
24
  versionCode 10
25
- versionName '7.0.0'
25
+ versionName '7.0.2'
26
26
  }
27
27
  buildFeatures {
28
28
  compose true
@@ -69,7 +69,7 @@ dependencies {
69
69
  implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-core:1.3.7'
70
70
  implementation 'org.jetbrains.kotlinx:kotlinx-coroutines-android:1.3.5'
71
71
 
72
- def composeVersion = "1.8.2"
72
+ def composeVersion = "1.9.0"
73
73
 
74
74
  implementation "androidx.compose.foundation:foundation-android:$composeVersion"
75
75
  implementation "androidx.compose.ui:ui:$composeVersion"
@@ -7,7 +7,12 @@ import io.github.lukmccall.colors.gray
7
7
  import io.github.lukmccall.colors.yellow
8
8
 
9
9
  class Colors(private val pallet: RadixPallet<Color>) {
10
- inner class Text {
10
+ data class Button(
11
+ val foreground: Color,
12
+ val background: Color
13
+ )
14
+
15
+ inner class Text internal constructor() {
11
16
  val default = pallet.gray.`12`
12
17
  val secondary = pallet.gray.`11`
13
18
  val tertiary = pallet.gray.`10`
@@ -17,7 +22,7 @@ class Colors(private val pallet: RadixPallet<Color>) {
17
22
  val warning = pallet.yellow.`11`
18
23
  }
19
24
 
20
- inner class Background {
25
+ inner class Background internal constructor() {
21
26
  val default = if (pallet.isDark) {
22
27
  pallet.gray.`1`
23
28
  } else {
@@ -28,24 +33,39 @@ class Colors(private val pallet: RadixPallet<Color>) {
28
33
  val element = pallet.gray.`3`
29
34
 
30
35
  val warning = pallet.yellow.`3`
36
+ val info = pallet.blue.`3`
31
37
  }
32
38
 
33
- inner class Icon {
39
+ inner class Icon internal constructor() {
34
40
  val default = pallet.gray.`11`
35
41
  val secondary = pallet.gray.`10`
36
42
  val tertiary = pallet.gray.`9`
37
43
  val quaternary = pallet.gray.`8`
38
44
 
39
45
  val warning = pallet.yellow.`11`
46
+ val info = pallet.blue.`10`
40
47
  }
41
48
 
42
- inner class Border {
49
+ inner class Border internal constructor() {
43
50
  val default = pallet.gray.`7`
51
+ val secondary = pallet.gray.`6`
44
52
  val error = pallet.gray.`6`
45
53
  }
46
54
 
55
+ inner class Buttons internal constructor() {
56
+ val primary = Button(
57
+ foreground = Color.White,
58
+ background = if (pallet.isDark) {
59
+ pallet.blue.`8`
60
+ } else {
61
+ pallet.blue.`10`
62
+ }
63
+ )
64
+ }
65
+
47
66
  val text = Text()
48
67
  val background = Background()
49
68
  val icon = Icon()
50
69
  val border = Border()
70
+ val buttons = Buttons()
51
71
  }
@@ -15,6 +15,7 @@ object Typography {
15
15
  )
16
16
 
17
17
  val mono = FontFamily(
18
+ Font(R.font.jetbrains_mono_light, FontWeight.Light),
18
19
  Font(R.font.jetbrains_mono_regular, FontWeight.Normal),
19
20
  Font(R.font.jetbrains_mono_medium, FontWeight.Medium)
20
21
  )
@@ -28,4 +29,10 @@ object Typography {
28
29
  val lg = TextStyle(
29
30
  fontSize = 16.sp
30
31
  )
32
+ val xl = TextStyle(
33
+ fontSize = 18.sp
34
+ )
35
+ val xxl = TextStyle(
36
+ fontSize = 20.sp
37
+ )
31
38
  }
@@ -20,7 +20,7 @@ import androidx.compose.runtime.getValue
20
20
  @Composable
21
21
  fun Modifier.pulseEffect(
22
22
  initialScale: Float = 1f,
23
- targetScale: Float = 1.5f,
23
+ targetScale: Float = 2f,
24
24
  brush: Brush = SolidColor(Color.Companion.Black.copy(alpha = 0.3f)),
25
25
  shape: Shape = CircleShape,
26
26
  animationSpect: DurationBasedAnimationSpec<Float> = tween(durationMillis = 1200)
@@ -19,9 +19,10 @@ import expo.modules.devmenu.compose.theme.Theme
19
19
  fun NewText(
20
20
  text: String,
21
21
  style: TextStyle? = null,
22
- color: Color? = null,
22
+ color: Color = NewAppTheme.colors.text.default,
23
23
  maxLines: Int = Int.MAX_VALUE,
24
24
  softWrap: Boolean = true,
25
+ overflow: TextOverflow = TextOverflow.Clip,
25
26
  modifier: Modifier = Modifier
26
27
  ) {
27
28
  BasicText(
@@ -29,11 +30,35 @@ fun NewText(
29
30
  maxLines = maxLines,
30
31
  softWrap = softWrap,
31
32
  style = NewAppTheme.font.md.merge(
32
- color = color ?: NewAppTheme.colors.text.default,
33
+ color = color,
33
34
  fontFamily = NewAppTheme.font.inter,
34
35
  fontWeight = FontWeight.Normal
35
36
  ).merge(style),
36
- overflow = TextOverflow.Visible,
37
+ overflow = overflow,
38
+ modifier = modifier
39
+ )
40
+ }
41
+
42
+ @Composable
43
+ fun NewText(
44
+ text: AnnotatedString,
45
+ style: TextStyle? = null,
46
+ color: Color = NewAppTheme.colors.text.default,
47
+ maxLines: Int = Int.MAX_VALUE,
48
+ softWrap: Boolean = true,
49
+ overflow: TextOverflow = TextOverflow.Clip,
50
+ modifier: Modifier = Modifier
51
+ ) {
52
+ BasicText(
53
+ text,
54
+ maxLines = maxLines,
55
+ softWrap = softWrap,
56
+ style = NewAppTheme.font.md.merge(
57
+ color = color,
58
+ fontFamily = NewAppTheme.font.inter,
59
+ fontWeight = FontWeight.Normal
60
+ ).merge(style),
61
+ overflow = overflow,
37
62
  modifier = modifier
38
63
  )
39
64
  }
@@ -15,7 +15,7 @@ import androidx.compose.ui.draw.clip
15
15
  import androidx.compose.ui.graphics.Color
16
16
  import androidx.compose.ui.unit.dp
17
17
  import com.composeunstyled.ToggleSwitch
18
- import expo.modules.devmenu.compose.fromHex
18
+ import expo.modules.devmenu.compose.newtheme.NewAppTheme
19
19
  import expo.modules.devmenu.compose.theme.Theme
20
20
 
21
21
  @Composable
@@ -25,9 +25,13 @@ fun ToggleSwitch(
25
25
  ) {
26
26
  val animatedBackgroundColor by animateColorAsState(
27
27
  if (isToggled) {
28
- Color.fromHex("#34C759")
28
+ Color(0xFF34C759)
29
29
  } else {
30
- Color.fromHex("#E9E9EB")
30
+ if (NewAppTheme.isDarkTheme) {
31
+ Color(0xFF464646)
32
+ } else {
33
+ Color(0xFFE9E9EB)
34
+ }
31
35
  }
32
36
  )
33
37
 
@@ -13,6 +13,7 @@ import androidx.compose.ui.graphics.Color
13
13
  import androidx.compose.ui.graphics.painter.Painter
14
14
  import androidx.compose.ui.res.painterResource
15
15
  import androidx.compose.ui.tooling.preview.Preview
16
+ import androidx.compose.ui.unit.Dp
16
17
  import com.composeunstyled.Button
17
18
  import expo.modules.devmenu.R
18
19
  import expo.modules.devmenu.compose.newtheme.NewAppTheme
@@ -32,13 +33,15 @@ fun NewMenuButton(
32
33
  content: NewMenuButtonComposable? = null,
33
34
  rightComponent: NewMenuButtonComposable? = null,
34
35
  withSurface: Boolean = true,
36
+ enabled: Boolean = true,
37
+ spacedBy: Dp = NewAppTheme.spacing.`2`,
35
38
  onClick: () -> Unit = {}
36
39
  ) {
37
40
  val contentComponent = @Composable {
38
- Button(onClick = onClick) {
41
+ Button(onClick = onClick, enabled = enabled) {
39
42
  Row(
40
43
  verticalAlignment = Alignment.CenterVertically,
41
- horizontalArrangement = Arrangement.spacedBy(NewAppTheme.spacing.`2`),
44
+ horizontalArrangement = Arrangement.spacedBy(spacedBy),
42
45
  modifier = Modifier
43
46
  .background(NewAppTheme.colors.background.subtle)
44
47
  .padding(NewAppTheme.spacing.`3`)
@@ -64,7 +64,12 @@
64
64
  +(NSString *)getAppIcon
65
65
  {
66
66
  NSString *appIcon = @"";
67
- NSString *appIconName = [[[[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIcons"] objectForKey:@"CFBundlePrimaryIcon"] objectForKey:@"CFBundleIconFiles"] lastObject];
67
+ NSString *appIconName = nil;
68
+ // For some projects, the CFBundlePrimaryIcon value can be a string, leading to a crash
69
+ // We wrap this in a try/catch to prevent the crash
70
+ @try {
71
+ appIconName = [[[[[[NSBundle mainBundle] infoDictionary] objectForKey:@"CFBundleIcons"] objectForKey:@"CFBundlePrimaryIcon"] objectForKey:@"CFBundleIconFiles"] lastObject];
72
+ } @catch(NSException *_e) {}
68
73
 
69
74
  if (appIconName != nil) {
70
75
  NSString *resourcePath = [[NSBundle mainBundle] resourcePath];
@@ -27,7 +27,7 @@ struct CustomItems: View {
27
27
  .padding()
28
28
  }
29
29
  #if !os(tvOS)
30
- .background(Color(.systemGroupedBackground))
30
+ .background(Color(.secondarySystemBackground))
31
31
  #endif
32
32
  .clipShape(RoundedRectangle(cornerRadius: 12))
33
33
  }
@@ -92,7 +92,6 @@ class DevMenuViewModel: ObservableObject {
92
92
 
93
93
  func toggleFastRefresh() {
94
94
  devMenuManager.toggleFastRefresh()
95
- devMenuManager.closeMenu()
96
95
  loadDevSettings()
97
96
  }
98
97
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-dev-menu",
3
- "version": "7.0.0",
3
+ "version": "7.0.2",
4
4
  "description": "Expo/React Native module with the developer menu.",
5
5
  "main": "build/DevMenu.js",
6
6
  "types": "build/DevMenu.d.ts",
@@ -38,12 +38,11 @@
38
38
  "devDependencies": {
39
39
  "@apollo/client": "^3.4.10",
40
40
  "@babel/preset-typescript": "^7.7.4",
41
- "@testing-library/jest-native": "^4.0.4",
42
- "@testing-library/react-native": "^13.1.0",
41
+ "@testing-library/react-native": "^13.2.0",
43
42
  "babel-plugin-module-resolver": "^5.0.0",
44
- "babel-preset-expo": "~14.0.0",
45
- "expo-dev-client-components": "3.0.0",
46
- "expo-module-scripts": "^5.0.0",
43
+ "babel-preset-expo": "~14.0.2",
44
+ "expo-dev-client-components": "3.0.2",
45
+ "expo-module-scripts": "^5.0.2",
47
46
  "fuse.js": "^6.4.6",
48
47
  "react": "19.1.0",
49
48
  "react-native": "0.81.0",
@@ -53,5 +52,5 @@
53
52
  "peerDependencies": {
54
53
  "expo": "*"
55
54
  },
56
- "gitHead": "cb7062e2c17d1fb09522834aaaac0e19b766df62"
55
+ "gitHead": "eaa9b645058cf2233fbb27bb21a19bc605c90a88"
57
56
  }