expo-dev-launcher 6.0.6 → 6.0.7

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.
Files changed (21) hide show
  1. package/CHANGELOG.md +4 -0
  2. package/android/build.gradle +2 -2
  3. package/android/src/debug/java/expo/modules/devlauncher/compose/BindingView.kt +3 -5
  4. package/android/src/debug/java/expo/modules/devlauncher/compose/primitives/Accordion.kt +1 -2
  5. package/android/src/debug/java/expo/modules/devlauncher/compose/primitives/CircularProgressBar.kt +6 -13
  6. package/android/src/debug/java/expo/modules/devlauncher/compose/routes/DevelopmentServers.kt +3 -1
  7. package/android/src/debug/java/expo/modules/devlauncher/compose/screens/BranchScreen.kt +1 -2
  8. package/android/src/debug/java/expo/modules/devlauncher/compose/screens/BranchesScreen.kt +1 -2
  9. package/android/src/debug/java/expo/modules/devlauncher/compose/screens/ErrorScreen.kt +24 -15
  10. package/android/src/debug/java/expo/modules/devlauncher/compose/screens/HomeScreen.kt +5 -49
  11. package/android/src/debug/java/expo/modules/devlauncher/compose/screens/SettingsScreen.kt +8 -103
  12. package/android/src/debug/java/expo/modules/devlauncher/compose/ui/ActionButton.kt +0 -29
  13. package/android/src/debug/java/expo/modules/devlauncher/compose/ui/AppHeader.kt +4 -6
  14. package/android/src/debug/java/expo/modules/devlauncher/compose/ui/AppLoadingErrorDialog.kt +33 -20
  15. package/android/src/debug/java/expo/modules/devlauncher/compose/ui/FetchDevelopmentServersButton.kt +12 -5
  16. package/android/src/debug/java/expo/modules/devlauncher/compose/ui/RunningAppCard.kt +1 -2
  17. package/package.json +3 -3
  18. package/android/src/debug/java/expo/modules/devlauncher/compose/ui/ProfileLayout.kt +0 -53
  19. package/android/src/debug/java/expo/modules/devlauncher/compose/ui/ScreenHeaderContainer.kt +0 -25
  20. package/android/src/debug/java/expo/modules/devlauncher/compose/ui/SectionHeader.kt +0 -20
  21. /package/android/src/debug/java/expo/modules/devlauncher/compose/primitives/{Asyncimage.kt → AsyncImage.kt} +0 -0
package/CHANGELOG.md CHANGED
@@ -10,6 +10,10 @@
10
10
 
11
11
  ### 💡 Others
12
12
 
13
+ ## 6.0.7 — 2025-08-28
14
+
15
+ _This version does not introduce any user-facing changes._
16
+
13
17
  ## 6.0.6 — 2025-08-27
14
18
 
15
19
  _This version does not introduce any user-facing changes._
@@ -20,13 +20,13 @@ expoModule {
20
20
  }
21
21
 
22
22
  group = "host.exp.exponent"
23
- version = "6.0.6"
23
+ version = "6.0.7"
24
24
 
25
25
  android {
26
26
  namespace "expo.modules.devlauncher"
27
27
  defaultConfig {
28
28
  versionCode 9
29
- versionName "6.0.6"
29
+ versionName "6.0.7"
30
30
  }
31
31
 
32
32
  buildTypes {
@@ -3,17 +3,15 @@ package expo.modules.devlauncher.compose
3
3
  import android.content.Context
4
4
  import android.widget.LinearLayout
5
5
  import androidx.compose.ui.platform.ComposeView
6
- import expo.modules.devmenu.compose.theme.AppTheme
6
+ import expo.modules.devmenu.compose.newtheme.AppTheme
7
7
 
8
8
  class BindingView(context: Context) : LinearLayout(context) {
9
9
  init {
10
10
  addView(
11
11
  ComposeView(context).apply {
12
12
  setContent {
13
- expo.modules.devmenu.compose.newtheme.AppTheme {
14
- AppTheme {
15
- DevLauncherBottomTabsNavigator()
16
- }
13
+ AppTheme {
14
+ DevLauncherBottomTabsNavigator()
17
15
  }
18
16
  }
19
17
  }
@@ -28,7 +28,6 @@ import expo.modules.devmenu.compose.newtheme.NewAppTheme
28
28
  import expo.modules.devmenu.compose.primitives.NewText
29
29
  import expo.modules.devmenu.compose.primitives.RoundedSurface
30
30
  import expo.modules.devmenu.compose.primitives.Spacer
31
- import expo.modules.devmenu.compose.primitives.Text
32
31
 
33
32
  @Composable
34
33
  fun Accordion(
@@ -95,6 +94,6 @@ fun Accordion(
95
94
  @Preview(showBackground = true, heightDp = 200, widthDp = 300)
96
95
  fun AccordionVariantPreview() {
97
96
  Accordion(text = "Enter URL manually") {
98
- Text("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac nisl interdum, mattis purus a, consequat ipsum. Aliquam sem mauris, egestas a elit a, lacinia efficitur nisi. Maecenas scelerisque erat nisi, ac interdum mauris volutpat vel. Proin sed lectus at purus interdum porta. Ut mollis feugiat dignissim.")
97
+ NewText("Lorem ipsum dolor sit amet, consectetur adipiscing elit. Sed ac nisl interdum, mattis purus a, consequat ipsum. Aliquam sem mauris, egestas a elit a, lacinia efficitur nisi. Maecenas scelerisque erat nisi, ac interdum mauris volutpat vel. Proin sed lectus at purus interdum porta. Ut mollis feugiat dignissim.")
99
98
  }
100
99
  }
@@ -17,8 +17,10 @@ import androidx.compose.ui.graphics.drawscope.withTransform
17
17
  import androidx.compose.ui.tooling.preview.Preview
18
18
  import androidx.compose.ui.unit.Dp
19
19
  import androidx.compose.ui.unit.dp
20
- import expo.modules.devmenu.compose.theme.Pallet
21
- import expo.modules.devmenu.compose.theme.Theme
20
+ import expo.modules.devmenu.compose.newtheme.NewAppTheme
21
+ import io.github.lukmccall.colors.blue
22
+ import io.github.lukmccall.colors.gray
23
+
22
24
  import kotlin.time.Duration
23
25
  import kotlin.time.Duration.Companion.seconds
24
26
 
@@ -29,17 +31,8 @@ fun CircularProgressBar(
29
31
  strokeWidth: Dp = size / 8,
30
32
  duration: Duration = 1.seconds
31
33
  ) {
32
- val backgroundColor = if (Theme.isDarkTheme) {
33
- Pallet.Dark.Gray.gray300
34
- } else {
35
- Pallet.Light.Gray.gray300
36
- }
37
-
38
- val progressColor = if (Theme.isDarkTheme) {
39
- Pallet.Dark.Blue.blue500
40
- } else {
41
- Pallet.Light.Blue.blue500
42
- }
34
+ val backgroundColor = NewAppTheme.pallet.gray.`3`
35
+ val progressColor = NewAppTheme.pallet.blue.`5`
43
36
 
44
37
  val transition = rememberInfiniteTransition(label = "infiniteSpinningTransition")
45
38
 
@@ -28,7 +28,9 @@ fun DevelopmentServersRoute(
28
28
  fontWeight = FontWeight.SemiBold,
29
29
  textAlign = TextAlign.Center
30
30
  ),
31
- modifier = Modifier.padding(vertical = NewAppTheme.spacing.`4`).fillMaxWidth()
31
+ modifier = Modifier
32
+ .padding(vertical = NewAppTheme.spacing.`4`)
33
+ .fillMaxWidth()
32
34
  )
33
35
 
34
36
  Spacer(NewAppTheme.spacing.`3`)
@@ -41,7 +41,6 @@ import expo.modules.devmenu.compose.primitives.Divider
41
41
  import expo.modules.devmenu.compose.primitives.NewText
42
42
  import expo.modules.devmenu.compose.primitives.RoundedSurface
43
43
  import expo.modules.devmenu.compose.primitives.Spacer
44
- import expo.modules.devmenu.compose.theme.Theme
45
44
 
46
45
  @Composable
47
46
  fun BranchScreen(
@@ -200,7 +199,7 @@ fun BranchScreen(
200
199
  verticalAlignment = Alignment.CenterVertically
201
200
  ) {
202
201
  CircularProgressBar(
203
- size = Theme.sizing.icon.large
202
+ size = 44.dp
204
203
  )
205
204
  }
206
205
  }
@@ -44,7 +44,6 @@ import expo.modules.devmenu.compose.newtheme.NewAppTheme
44
44
  import expo.modules.devmenu.compose.primitives.NewText
45
45
  import expo.modules.devmenu.compose.primitives.RoundedSurface
46
46
  import expo.modules.devmenu.compose.primitives.Spacer
47
- import expo.modules.devmenu.compose.theme.Theme
48
47
  import kotlin.time.ExperimentalTime
49
48
 
50
49
  @Composable
@@ -287,7 +286,7 @@ fun BranchesScreen(
287
286
  verticalAlignment = Alignment.CenterVertically
288
287
  ) {
289
288
  CircularProgressBar(
290
- size = Theme.sizing.icon.large
289
+ size = 44.dp
291
290
  )
292
291
  }
293
292
  }
@@ -8,13 +8,13 @@ import androidx.compose.foundation.layout.padding
8
8
  import androidx.compose.foundation.layout.statusBarsPadding
9
9
  import androidx.compose.runtime.Composable
10
10
  import androidx.compose.ui.Modifier
11
+ import androidx.compose.ui.text.font.FontWeight
11
12
  import androidx.compose.ui.tooling.preview.Preview
12
13
  import expo.modules.devlauncher.compose.models.ErrorAction
13
14
  import expo.modules.devlauncher.compose.ui.ActionButton
14
- import expo.modules.devmenu.compose.primitives.Heading
15
+ import expo.modules.devmenu.compose.newtheme.NewAppTheme
16
+ import expo.modules.devmenu.compose.primitives.NewText
15
17
  import expo.modules.devmenu.compose.primitives.Spacer
16
- import expo.modules.devmenu.compose.primitives.Text
17
- import expo.modules.devmenu.compose.theme.Theme
18
18
 
19
19
  @Composable
20
20
  fun ErrorScreen(
@@ -23,18 +23,23 @@ fun ErrorScreen(
23
23
  ) {
24
24
  Column(
25
25
  modifier = Modifier
26
- .background(Theme.colors.background.secondary)
26
+ .background(NewAppTheme.colors.background.subtle)
27
27
  .fillMaxSize()
28
28
  .statusBarsPadding()
29
29
  ) {
30
- Column(modifier = Modifier.padding(horizontal = Theme.spacing.small)) {
31
- Spacer(Theme.spacing.medium)
32
- Heading("There was a problem loading the project.")
30
+ Column(modifier = Modifier.padding(horizontal = NewAppTheme.spacing.`2`)) {
31
+ Spacer(NewAppTheme.spacing.`3`)
32
+ NewText(
33
+ "There was a problem loading the project.",
34
+ style = NewAppTheme.font.lg.merge(
35
+ fontWeight = FontWeight.SemiBold
36
+ )
37
+ )
33
38
 
34
- Spacer(Theme.spacing.medium)
35
- Text("This development build encountered the following error.")
39
+ Spacer(NewAppTheme.spacing.`3`)
40
+ NewText("This development build encountered the following error.")
36
41
 
37
- Spacer(Theme.spacing.medium)
42
+ Spacer(NewAppTheme.spacing.`3`)
38
43
  }
39
44
 
40
45
  StackTrace(
@@ -45,23 +50,27 @@ fun ErrorScreen(
45
50
 
46
51
  Column(
47
52
  modifier = Modifier
48
- .background(Theme.colors.background.default)
49
- .padding(Theme.spacing.medium)
53
+ .background(NewAppTheme.colors.background.default)
54
+ .padding(NewAppTheme.spacing.`3`)
50
55
  .navigationBarsPadding()
51
56
  ) {
52
57
  ActionButton(
53
58
  "Reload",
54
- style = Theme.colors.button.tertiary,
59
+ foreground = NewAppTheme.colors.buttons.tertiary.foreground,
60
+ background = NewAppTheme.colors.buttons.tertiary.background,
61
+ modifier = Modifier.padding(vertical = NewAppTheme.spacing.`2`),
55
62
  onClick = {
56
63
  onAction(ErrorAction.Reload)
57
64
  }
58
65
  )
59
66
 
60
- Spacer(Theme.spacing.small)
67
+ Spacer(NewAppTheme.spacing.`2`)
61
68
 
62
69
  ActionButton(
63
70
  "Go To Home",
64
- style = Theme.colors.button.secondary,
71
+ foreground = NewAppTheme.colors.buttons.secondary.foreground,
72
+ background = NewAppTheme.colors.buttons.secondary.background,
73
+ modifier = Modifier.padding(vertical = NewAppTheme.spacing.`2`),
65
74
  onClick = {
66
75
  onAction(ErrorAction.GoToHome)
67
76
  }
@@ -1,6 +1,5 @@
1
1
  package expo.modules.devlauncher.compose.screens
2
2
 
3
- import androidx.compose.foundation.clickable
4
3
  import androidx.compose.foundation.layout.Arrangement
5
4
  import androidx.compose.foundation.layout.Column
6
5
  import androidx.compose.foundation.layout.Row
@@ -11,7 +10,6 @@ import androidx.compose.foundation.verticalScroll
11
10
  import androidx.compose.runtime.Composable
12
11
  import androidx.compose.runtime.LaunchedEffect
13
12
  import androidx.compose.ui.Modifier
14
- import androidx.compose.ui.text.font.FontWeight
15
13
  import androidx.compose.ui.tooling.preview.Preview
16
14
  import com.composables.core.rememberDialogState
17
15
  import com.composeunstyled.Button
@@ -28,8 +26,8 @@ import expo.modules.devlauncher.launcher.DevLauncherAppEntry
28
26
  import expo.modules.devlauncher.launcher.errors.DevLauncherErrorInstance
29
27
  import expo.modules.devlauncher.services.PackagerInfo
30
28
  import expo.modules.devmenu.compose.newtheme.NewAppTheme
31
- import expo.modules.devmenu.compose.primitives.NewText
32
29
  import expo.modules.devmenu.compose.primitives.Spacer
30
+ import expo.modules.devmenu.compose.ui.Section
33
31
  import expo.modules.devmenu.compose.ui.Warning
34
32
  import kotlin.time.ExperimentalTime
35
33
 
@@ -107,30 +105,9 @@ fun HomeScreen(
107
105
  horizontalArrangement = Arrangement.SpaceBetween,
108
106
  modifier = Modifier.fillMaxWidth()
109
107
  ) {
110
- NewText(
111
- "DEVELOPMENT SERVERS",
112
- style = NewAppTheme.font.sm.merge(
113
- fontWeight = FontWeight.Medium,
114
- fontFamily = NewAppTheme.font.mono
115
- ),
116
- color = NewAppTheme.colors.text.quaternary
117
- )
108
+ Section.Header("DEVELOPMENT SERVERS")
118
109
 
119
- NewText(
120
- "INFO",
121
- style = NewAppTheme.font.sm.merge(
122
- fontWeight = FontWeight.Medium,
123
- fontFamily = NewAppTheme.font.mono
124
- ),
125
- color = NewAppTheme.colors.text.link,
126
- modifier = Modifier.clickable(
127
- interactionSource = null,
128
- indication = null,
129
- onClick = {
130
- onDevServersClick()
131
- }
132
- )
133
- )
110
+ Section.Button("INFO", onDevServersClick)
134
111
  }
135
112
 
136
113
  Spacer(NewAppTheme.spacing.`3`)
@@ -170,30 +147,9 @@ fun HomeScreen(
170
147
  horizontalArrangement = Arrangement.SpaceBetween,
171
148
  modifier = Modifier.fillMaxWidth()
172
149
  ) {
173
- NewText(
174
- "RECENTLY OPENED",
175
- style = NewAppTheme.font.sm.merge(
176
- fontWeight = FontWeight.Medium,
177
- fontFamily = NewAppTheme.font.mono
178
- ),
179
- color = NewAppTheme.colors.text.quaternary
180
- )
150
+ Section.Header("RECENTLY OPENED")
181
151
 
182
- NewText(
183
- "RESET",
184
- style = NewAppTheme.font.sm.merge(
185
- fontWeight = FontWeight.Medium,
186
- fontFamily = NewAppTheme.font.mono
187
- ),
188
- color = NewAppTheme.colors.text.link,
189
- modifier = Modifier.clickable(
190
- interactionSource = null,
191
- indication = null,
192
- onClick = {
193
- onAction(HomeAction.ResetRecentlyOpenedApps)
194
- }
195
- )
196
- )
152
+ Section.Button("RESET", { onAction(HomeAction.ResetRecentlyOpenedApps) })
197
153
  }
198
154
 
199
155
  Spacer(NewAppTheme.spacing.`3`)
@@ -2,7 +2,6 @@ package expo.modules.devlauncher.compose.screens
2
2
 
3
3
  import androidx.compose.foundation.layout.Arrangement
4
4
  import androidx.compose.foundation.layout.Column
5
- import androidx.compose.foundation.layout.Row
6
5
  import androidx.compose.foundation.layout.fillMaxWidth
7
6
  import androidx.compose.foundation.layout.padding
8
7
  import androidx.compose.foundation.layout.size
@@ -10,14 +9,11 @@ import androidx.compose.foundation.layout.statusBarsPadding
10
9
  import androidx.compose.runtime.Composable
11
10
  import androidx.compose.ui.Alignment
12
11
  import androidx.compose.ui.Modifier
13
- import androidx.compose.ui.platform.LocalContext
14
12
  import androidx.compose.ui.res.painterResource
15
- import androidx.compose.ui.text.TextStyle
16
13
  import androidx.compose.ui.text.font.FontWeight
17
14
  import androidx.compose.ui.tooling.preview.Preview
18
15
  import androidx.compose.ui.unit.dp
19
16
  import androidx.compose.ui.unit.sp
20
- import com.composeunstyled.Button
21
17
  import com.composeunstyled.Icon
22
18
  import expo.modules.devlauncher.R
23
19
  import expo.modules.devlauncher.compose.DefaultScreenContainer
@@ -31,15 +27,14 @@ import expo.modules.devmenu.compose.primitives.RoundedSurface
31
27
  import expo.modules.devmenu.compose.primitives.Spacer
32
28
  import expo.modules.devmenu.compose.primitives.ToggleSwitch
33
29
  import expo.modules.devmenu.compose.ui.NewMenuButton
34
- import expo.modules.devmenu.compose.utils.copyToClipboard
30
+ import expo.modules.devmenu.compose.ui.Section
31
+ import expo.modules.devmenu.compose.ui.SystemSection
35
32
 
36
33
  @Composable
37
34
  fun SettingsScreen(
38
35
  state: SettingsState = SettingsState(),
39
36
  onAction: (SettingsAction) -> Unit = {}
40
37
  ) {
41
- val context = LocalContext.current
42
-
43
38
  Column(
44
39
  modifier = Modifier
45
40
  .statusBarsPadding()
@@ -90,14 +85,7 @@ fun SettingsScreen(
90
85
 
91
86
  Spacer(NewAppTheme.spacing.`6`)
92
87
 
93
- NewText(
94
- "MENU GESTURES",
95
- style = NewAppTheme.font.sm.merge(
96
- fontWeight = FontWeight.Medium,
97
- fontFamily = NewAppTheme.font.mono
98
- ),
99
- color = NewAppTheme.colors.text.quaternary
100
- )
88
+ Section.Header("MENU GESTURES")
101
89
 
102
90
  Spacer(NewAppTheme.spacing.`3`)
103
91
 
@@ -196,95 +184,12 @@ fun SettingsScreen(
196
184
 
197
185
  Spacer(NewAppTheme.spacing.`6`)
198
186
 
199
- NewText(
200
- "SYSTEM",
201
- style = TextStyle(
202
- fontSize = NewAppTheme.font.sm.fontSize,
203
- fontFamily = NewAppTheme.font.mono,
204
- fontWeight = FontWeight.Medium,
205
- color = NewAppTheme.colors.text.quaternary
206
- )
207
- )
208
-
209
- Spacer(NewAppTheme.spacing.`3`)
210
-
211
- Divider(
212
- thickness = 0.5.dp,
213
- color = NewAppTheme.colors.border.default
187
+ val info = state.applicationInfo
188
+ SystemSection(
189
+ appVersion = info?.appVersion,
190
+ runtimeVersion = (info as? ApplicationInfo.Updates)?.runtimeVersion,
191
+ fullDataProvider = { info?.toJson() ?: "No application info available" }
214
192
  )
215
-
216
- Row(
217
- horizontalArrangement = Arrangement.SpaceBetween,
218
- modifier = Modifier
219
- .fillMaxWidth()
220
- .padding(vertical = 12.dp)
221
- ) {
222
- NewText(
223
- "Version",
224
- color = NewAppTheme.colors.text.secondary
225
- )
226
-
227
- NewText(
228
- state.applicationInfo?.appVersion ?: "N/A",
229
- color = NewAppTheme.colors.text.secondary
230
- )
231
- }
232
-
233
- Divider(
234
- thickness = 0.5.dp,
235
- color = NewAppTheme.colors.border.default
236
- )
237
-
238
- Row(
239
- horizontalArrangement = Arrangement.SpaceBetween,
240
- modifier = Modifier
241
- .fillMaxWidth()
242
- .padding(vertical = 12.dp)
243
- ) {
244
- NewText(
245
- "Runtime version",
246
- color = NewAppTheme.colors.text.secondary
247
- )
248
-
249
- val runtimeVersion = (state.applicationInfo as? ApplicationInfo.Updates)?.runtimeVersion
250
- NewText(
251
- runtimeVersion ?: "N/A",
252
- color = NewAppTheme.colors.text.secondary
253
- )
254
- }
255
-
256
- Divider(
257
- thickness = 0.5.dp,
258
- color = NewAppTheme.colors.border.default
259
- )
260
-
261
- Button(onClick = {
262
- copyToClipboard(
263
- context,
264
- label = "Copy system info",
265
- text = state.applicationInfo?.toJson() ?: "No application info available"
266
- )
267
- }) {
268
- Row(
269
- horizontalArrangement = Arrangement.SpaceBetween,
270
- modifier = Modifier
271
- .fillMaxWidth()
272
- .padding(vertical = 12.dp)
273
- ) {
274
- NewText(
275
- "Copy system info",
276
- color = NewAppTheme.colors.text.link,
277
- style = NewAppTheme.font.sm
278
- )
279
- Icon(
280
- painter = painterResource(expo.modules.devmenu.R.drawable.copy),
281
- contentDescription = "Copy system info",
282
- tint = NewAppTheme.colors.text.link,
283
- modifier = Modifier
284
- .size(12.dp)
285
- )
286
- }
287
- }
288
193
  }
289
194
  }
290
195
 
@@ -2,7 +2,6 @@ package expo.modules.devlauncher.compose.ui
2
2
 
3
3
  import androidx.compose.foundation.layout.Box
4
4
  import androidx.compose.foundation.layout.fillMaxWidth
5
- import androidx.compose.foundation.layout.padding
6
5
  import androidx.compose.foundation.shape.RoundedCornerShape
7
6
  import androidx.compose.runtime.Composable
8
7
  import androidx.compose.ui.Alignment
@@ -15,34 +14,6 @@ import com.composeunstyled.Button
15
14
  import expo.modules.devmenu.compose.newtheme.NewAppTheme
16
15
  import expo.modules.devmenu.compose.primitives.NewText
17
16
  import expo.modules.devmenu.compose.ripple.ripple
18
- import expo.modules.devmenu.compose.theme.ButtonStyle
19
- import expo.modules.devmenu.compose.theme.Theme
20
-
21
- @Composable
22
- fun ActionButton(
23
- text: String,
24
- style: ButtonStyle,
25
- onClick: () -> Unit = {}
26
- ) {
27
- Button(
28
- onClick = onClick,
29
- shape = RoundedCornerShape(NewAppTheme.borderRadius.xl),
30
- backgroundColor = style.background,
31
- indication = ripple(color = style.foreground)
32
- ) {
33
- Box(
34
- contentAlignment = Alignment.Companion.Center,
35
- modifier = Modifier.Companion
36
- .padding(vertical = Theme.spacing.small)
37
- .fillMaxWidth()
38
- ) {
39
- NewText(
40
- text,
41
- color = style.foreground
42
- )
43
- }
44
- }
45
- }
46
17
 
47
18
  @Composable
48
19
  fun ActionButton(
@@ -131,10 +131,8 @@ fun AppHeader(
131
131
  @Composable
132
132
  @Preview(showBackground = true, widthDp = 300)
133
133
  fun AppHeaderPreview() {
134
- ScreenHeaderContainer {
135
- AppHeader(
136
- appName = "BareExpo",
137
- modifier = Modifier.padding(NewAppTheme.spacing.`4`)
138
- )
139
- }
134
+ AppHeader(
135
+ appName = "BareExpo",
136
+ modifier = Modifier.padding(NewAppTheme.spacing.`4`)
137
+ )
140
138
  }
@@ -1,15 +1,20 @@
1
1
  package expo.modules.devlauncher.compose.ui
2
2
 
3
3
  import androidx.compose.foundation.background
4
+ import androidx.compose.foundation.layout.Arrangement
4
5
  import androidx.compose.foundation.layout.Column
5
6
  import androidx.compose.foundation.layout.Row
6
7
  import androidx.compose.foundation.layout.displayCutoutPadding
8
+ import androidx.compose.foundation.layout.fillMaxWidth
7
9
  import androidx.compose.foundation.layout.padding
8
10
  import androidx.compose.foundation.layout.systemBarsPadding
9
11
  import androidx.compose.foundation.shape.RoundedCornerShape
10
12
  import androidx.compose.runtime.Composable
13
+ import androidx.compose.ui.Alignment
11
14
  import androidx.compose.ui.Modifier
12
15
  import androidx.compose.ui.draw.clip
16
+ import androidx.compose.ui.res.painterResource
17
+ import androidx.compose.ui.text.font.FontWeight
13
18
  import androidx.compose.ui.tooling.preview.Preview
14
19
  import androidx.compose.ui.unit.dp
15
20
  import com.composables.core.Dialog
@@ -18,13 +23,12 @@ import com.composables.core.DialogState
18
23
  import com.composables.core.Scrim
19
24
  import com.composables.core.rememberDialogState
20
25
  import com.composeunstyled.Button
26
+ import com.composeunstyled.Icon
21
27
  import com.composeunstyled.Text
22
28
  import expo.modules.devlauncher.R
23
- import expo.modules.devmenu.compose.primitives.DayNighIcon
29
+ import expo.modules.devmenu.compose.newtheme.NewAppTheme
24
30
  import expo.modules.devmenu.compose.primitives.Divider
25
- import expo.modules.devmenu.compose.primitives.Heading
26
- import expo.modules.devmenu.compose.primitives.RowLayout
27
- import expo.modules.devmenu.compose.theme.Theme
31
+ import expo.modules.devmenu.compose.primitives.NewText
28
32
 
29
33
  @Composable
30
34
  fun AppLoadingErrorDialog(
@@ -38,30 +42,39 @@ fun AppLoadingErrorDialog(
38
42
  modifier = Modifier
39
43
  .displayCutoutPadding()
40
44
  .systemBarsPadding()
41
- .padding(horizontal = Theme.spacing.medium)
45
+ .padding(horizontal = NewAppTheme.spacing.`3`)
42
46
  .clip(RoundedCornerShape(12.dp))
43
- .background(Theme.colors.background.default)
47
+ .background(NewAppTheme.colors.background.default)
44
48
  ) {
45
49
  Column {
46
- RowLayout(
47
- rightComponent = {
48
- Button(onClick = {
49
- dialogState.visible = false
50
- }) {
51
- DayNighIcon(
52
- id = R.drawable.x_icon,
53
- contentDescription = "Close dialog"
54
- )
55
- }
56
- },
57
- modifier = Modifier.padding(Theme.spacing.medium)
50
+ Row(
51
+ verticalAlignment = Alignment.CenterVertically,
52
+ horizontalArrangement = Arrangement.SpaceBetween,
53
+ modifier = Modifier
54
+ .fillMaxWidth()
55
+ .padding(NewAppTheme.spacing.`3`)
58
56
  ) {
59
- Heading("Error loading app")
57
+ NewText(
58
+ "Error loading app",
59
+ style = NewAppTheme.font.lg.merge(
60
+ fontWeight = FontWeight.SemiBold
61
+ )
62
+ )
63
+
64
+ Button(onClick = {
65
+ dialogState.visible = false
66
+ }) {
67
+ Icon(
68
+ painter = painterResource(R.drawable.x_icon),
69
+ contentDescription = "Close dialog",
70
+ tint = NewAppTheme.colors.icon.tertiary
71
+ )
72
+ }
60
73
  }
61
74
 
62
75
  Divider()
63
76
 
64
- Row(modifier = Modifier.padding(Theme.spacing.medium)) {
77
+ Row(modifier = Modifier.padding(NewAppTheme.spacing.`3`)) {
65
78
  Text(currentError ?: "No error message available.")
66
79
  }
67
80
  }
@@ -32,11 +32,8 @@ import kotlin.time.Instant
32
32
 
33
33
  @Composable
34
34
  @OptIn(ExperimentalTime::class)
35
- fun FetchDevelopmentServersButton(
36
- isFetching: Boolean,
37
- onAction: (HomeAction) -> Unit
38
- ) {
39
- // Users might spam the button, so after debouncing we need to get the current state.
35
+ private fun rememberIsFetchingState(isFetching: Boolean): Boolean {
36
+ // Users might spam the button, so after debouncing we need to get the current state.
40
37
  // We can't use `isFetching` directly in the `LaunchedEffect` as it would be captured in the lambda.
41
38
  var getCurrentState by remember { mutableStateOf({ isFetching }) }
42
39
  var isFetchingUIState by remember { mutableStateOf(isFetching) }
@@ -67,6 +64,16 @@ fun FetchDevelopmentServersButton(
67
64
  isFetchingUIState = getCurrentState()
68
65
  }
69
66
 
67
+ return isFetchingUIState
68
+ }
69
+
70
+ @Composable
71
+ fun FetchDevelopmentServersButton(
72
+ isFetching: Boolean,
73
+ onAction: (HomeAction) -> Unit
74
+ ) {
75
+ val isFetchingUIState = rememberIsFetchingState(isFetching)
76
+
70
77
  RoundedSurface(
71
78
  color = NewAppTheme.colors.background.element,
72
79
  borderRadius = NewAppTheme.borderRadius.xl
@@ -25,7 +25,6 @@ import expo.modules.devmenu.compose.newtheme.NewAppTheme
25
25
  import expo.modules.devmenu.compose.primitives.NewText
26
26
  import expo.modules.devmenu.compose.primitives.RoundedSurface
27
27
  import expo.modules.devmenu.compose.primitives.pulseEffect
28
- import expo.modules.devmenu.compose.theme.Theme
29
28
 
30
29
  @Composable
31
30
  fun RunningAppCard(
@@ -55,7 +54,7 @@ fun RunningAppCard(
55
54
  val dotColor = Color.fromHex("#34C759")
56
55
  Box(
57
56
  modifier = Modifier
58
- .size(Theme.spacing.small)
57
+ .size(12.dp)
59
58
  .drawBehind {
60
59
  drawCircle(dotColor)
61
60
  }
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "expo-dev-launcher",
3
3
  "title": "Expo Development Launcher",
4
- "version": "6.0.6",
4
+ "version": "6.0.7",
5
5
  "description": "Pre-release version of the Expo development launcher package for testing.",
6
6
  "repository": {
7
7
  "type": "git",
@@ -15,11 +15,11 @@
15
15
  "license": "MIT",
16
16
  "homepage": "https://docs.expo.dev",
17
17
  "dependencies": {
18
- "expo-dev-menu": "7.0.5",
18
+ "expo-dev-menu": "7.0.6",
19
19
  "expo-manifests": "~1.0.5"
20
20
  },
21
21
  "peerDependencies": {
22
22
  "expo": "*"
23
23
  },
24
- "gitHead": "48faa7b9a9f93a7660cb80aa118c7f6bf0aeff38"
24
+ "gitHead": "5e15f3a5d68bc213ad36d59113d725fdea4f3411"
25
25
  }
@@ -1,53 +0,0 @@
1
- package expo.modules.devlauncher.compose.ui
2
-
3
- import androidx.compose.foundation.layout.Arrangement
4
- import androidx.compose.foundation.layout.Column
5
- import androidx.compose.foundation.layout.Row
6
- import androidx.compose.foundation.layout.fillMaxWidth
7
- import androidx.compose.foundation.layout.padding
8
- import androidx.compose.foundation.layout.size
9
- import androidx.compose.runtime.Composable
10
- import androidx.compose.ui.Alignment
11
- import androidx.compose.ui.Modifier
12
- import androidx.compose.ui.graphics.Color
13
- import androidx.compose.ui.unit.dp
14
- import com.composeunstyled.Button
15
- import expo.modules.devlauncher.R
16
- import expo.modules.devmenu.compose.primitives.DayNighIcon
17
- import expo.modules.devmenu.compose.primitives.Heading
18
- import expo.modules.devmenu.compose.primitives.RoundedSurface
19
- import expo.modules.devmenu.compose.primitives.Spacer
20
- import expo.modules.devmenu.compose.theme.Theme
21
-
22
- @Composable
23
- fun ProfileLayout(
24
- onClose: () -> Unit = {},
25
- content: @Composable () -> Unit
26
- ) {
27
- Column(
28
- modifier = Modifier
29
- .padding(horizontal = 12.dp)
30
- .padding(top = 12.dp)
31
- ) {
32
- Row(
33
- verticalAlignment = Alignment.CenterVertically,
34
- horizontalArrangement = Arrangement.SpaceBetween,
35
- modifier = Modifier.fillMaxWidth()
36
- ) {
37
- Heading("Account", fontSize = Theme.typography.size22)
38
- RoundedSurface(color = Color.Unspecified) {
39
- Button(onClick = onClose) {
40
- DayNighIcon(
41
- id = R.drawable.x_icon,
42
- contentDescription = "Close",
43
- modifier = Modifier.size(Theme.sizing.icon.small)
44
- )
45
- }
46
- }
47
- }
48
-
49
- Spacer(Theme.spacing.large)
50
-
51
- content()
52
- }
53
- }
@@ -1,25 +0,0 @@
1
- package expo.modules.devlauncher.compose.ui
2
-
3
- import androidx.compose.foundation.layout.Row
4
- import androidx.compose.foundation.layout.RowScope
5
- import androidx.compose.foundation.layout.fillMaxWidth
6
- import androidx.compose.foundation.layout.statusBarsPadding
7
- import androidx.compose.runtime.Composable
8
- import androidx.compose.ui.Alignment
9
- import androidx.compose.ui.Modifier
10
-
11
- @Composable
12
- fun ScreenHeaderContainer(
13
- modifier: Modifier = Modifier,
14
- content: @Composable RowScope.() -> Unit
15
- ) {
16
- Row(
17
- verticalAlignment = Alignment.Companion.CenterVertically,
18
- modifier = Modifier
19
- .fillMaxWidth()
20
- .statusBarsPadding()
21
- .then(modifier)
22
- ) {
23
- content()
24
- }
25
- }
@@ -1,20 +0,0 @@
1
- package expo.modules.devlauncher.compose.ui
2
-
3
- import androidx.compose.runtime.Composable
4
- import expo.modules.devmenu.compose.primitives.Heading
5
- import expo.modules.devmenu.compose.primitives.RowLayout
6
- import expo.modules.devmenu.compose.theme.Theme
7
-
8
- @Composable
9
- fun SectionHeader(
10
- title: String,
11
- leftIcon: @Composable (() -> Unit)? = null,
12
- rightIcon: @Composable (() -> Unit)? = null
13
- ) {
14
- RowLayout(
15
- rightComponent = rightIcon,
16
- leftComponent = leftIcon
17
- ) {
18
- Heading(title, color = Theme.colors.text.secondary)
19
- }
20
- }