agentic-mobile-kit 0.5.4 → 0.6.0
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/README.md +6 -1
- package/bin/cli.js +1 -1
- package/lib/doctor.js +26 -5
- package/lib/init.js +235 -49
- package/package.json +4 -2
- package/stacks/react-native/expo/.agents/skills/LICENSE-expo +21 -0
- package/stacks/react-native/expo/.agents/skills/THIRD_PARTY.md +11 -0
- package/stacks/react-native/expo/.agents/skills/expo-module/SKILL.md +151 -0
- package/stacks/react-native/expo/.agents/skills/expo-module/agents/openai.yaml +4 -0
- package/stacks/react-native/expo/.agents/skills/expo-module/references/config-plugin.md +90 -0
- package/stacks/react-native/expo/.agents/skills/expo-module/references/create-expo-module.md +206 -0
- package/stacks/react-native/expo/.agents/skills/expo-module/references/lifecycle.md +127 -0
- package/stacks/react-native/expo/.agents/skills/expo-module/references/module-config.md +48 -0
- package/stacks/react-native/expo/.agents/skills/expo-module/references/native-module.md +286 -0
- package/stacks/react-native/expo/.agents/skills/expo-module/references/native-view.md +171 -0
- package/stacks/react-native/expo/.agents/skills/expo-router/SKILL.md +240 -0
- package/stacks/react-native/expo/.agents/skills/expo-router/agents/openai.yaml +4 -0
- package/stacks/react-native/expo/.agents/skills/expo-router/references/form-sheet.md +253 -0
- package/stacks/react-native/expo/.agents/skills/expo-router/references/route-structure.md +229 -0
- package/stacks/react-native/expo/.agents/skills/expo-router/references/search.md +248 -0
- package/stacks/react-native/expo/.agents/skills/expo-router/references/tabs.md +433 -0
- package/stacks/react-native/expo/.agents/skills/expo-router/references/toolbar-and-headers.md +284 -0
- package/stacks/react-native/expo/.agents/skills/expo-router/references/zoom-transitions.md +158 -0
- package/stacks/react-native/expo/.agents/skills/expo-upgrade/SKILL.md +150 -0
- package/stacks/react-native/expo/.agents/skills/expo-upgrade/agents/openai.yaml +4 -0
- package/stacks/react-native/expo/.agents/skills/expo-upgrade/references/expo-av-to-audio.md +132 -0
- package/stacks/react-native/expo/.agents/skills/expo-upgrade/references/expo-av-to-video.md +160 -0
- package/stacks/react-native/expo/.agents/skills/expo-upgrade/references/native-tabs.md +124 -0
- package/stacks/react-native/expo/.agents/skills/expo-upgrade/references/new-architecture.md +79 -0
- package/stacks/react-native/expo/.agents/skills/expo-upgrade/references/react-19.md +79 -0
- package/stacks/react-native/expo/.agents/skills/expo-upgrade/references/react-compiler.md +59 -0
- package/stacks/react-native/expo/.agents/skills/expo-upgrade/references/react-navigation-to-expo-router.md +61 -0
- package/stacks/react-native/expo/.rulesync/permissions.jsonc +40 -0
- package/stacks/react-native/expo/AGENTS.md +52 -0
- package/stacks/react-native/expo/docs/ai/expo.md +35 -0
- package/stacks/react-native/expo/docs/ai/known-issues.md +32 -0
- package/stacks/react-native/template/.agents/skills/m-release/SKILL.md +5 -4
- package/stacks/react-native/template/.githooks/pre-commit +7 -2
- package/stacks/react-native/template/.github/workflows/e2e.yml +2 -0
- package/stacks/react-native/template/.github/workflows/ios.yml +3 -5
- package/stacks/react-native/template/AGENTS.md +4 -4
- package/stacks/react-native/template/codemagic.yaml +2 -1
- package/stacks/react-native/template/docs/ai/known-issues.md +12 -2
- package/stacks/react-native/template/docs/ai/react-native.md +5 -4
- package/stacks/react-native/template/scripts/ai/android-flavors.js +41 -0
- package/stacks/react-native/template/scripts/ai/case-check.js +35 -0
- package/stacks/react-native/template/scripts/ai/install-deps.sh +4 -1
- package/stacks/react-native/template/scripts/ai/ios-build.sh +10 -3
- package/stacks/react-native/template/scripts/ai/pm-run.sh +12 -0
- package/stacks/react-native/template/scripts/ai/pod-install.sh +12 -0
- package/stacks/react-native/template/scripts/ai/prebuild.sh +28 -0
- package/stacks/react-native/template/scripts/ai/release-build.sh +32 -8
- package/stacks/react-native/template/scripts/ai/release-check.js +98 -18
- package/stacks/react-native/template/scripts/ai/set-version.sh +19 -1
- package/stacks/react-native/template/scripts/ai/verify.sh +69 -16
- package/stacks/react-native/template/specs/_templates/flow.yaml +9 -0
|
@@ -0,0 +1,284 @@
|
|
|
1
|
+
# Toolbars and headers
|
|
2
|
+
|
|
3
|
+
Add native iOS toolbar items to Stack screens. Items can be placed in the header (left/right) or in a bottom toolbar area.
|
|
4
|
+
|
|
5
|
+
**Important:** iOS only. Available in Expo SDK 55+.
|
|
6
|
+
|
|
7
|
+
## Notes app example
|
|
8
|
+
|
|
9
|
+
```tsx
|
|
10
|
+
import { Stack } from "expo-router";
|
|
11
|
+
import { ScrollView } from "react-native";
|
|
12
|
+
|
|
13
|
+
export default function FoldersScreen() {
|
|
14
|
+
return (
|
|
15
|
+
<>
|
|
16
|
+
{/* ScrollView must be the first child of the screen */}
|
|
17
|
+
<ScrollView
|
|
18
|
+
style={{ flex: 1 }}
|
|
19
|
+
contentInsetAdjustmentBehavior="automatic"
|
|
20
|
+
>
|
|
21
|
+
{/* Screen content */}
|
|
22
|
+
</ScrollView>
|
|
23
|
+
<Stack.Screen.Title large>Folders</Stack.Screen.Title>
|
|
24
|
+
<Stack.SearchBar placeholder="Search" onChangeText={() => {}} />
|
|
25
|
+
{/* Header toolbar - right side */}
|
|
26
|
+
<Stack.Toolbar placement="right">
|
|
27
|
+
<Stack.Toolbar.Button icon="folder.badge.plus" onPress={() => {}} />
|
|
28
|
+
<Stack.Toolbar.Button onPress={() => {}}>Edit</Stack.Toolbar.Button>
|
|
29
|
+
</Stack.Toolbar>
|
|
30
|
+
|
|
31
|
+
{/* Bottom toolbar */}
|
|
32
|
+
<Stack.Toolbar placement="bottom">
|
|
33
|
+
<Stack.Toolbar.SearchBarSlot />
|
|
34
|
+
<Stack.Toolbar.Button
|
|
35
|
+
icon="square.and.pencil"
|
|
36
|
+
onPress={() => {}}
|
|
37
|
+
separateBackground
|
|
38
|
+
/>
|
|
39
|
+
</Stack.Toolbar>
|
|
40
|
+
</>
|
|
41
|
+
);
|
|
42
|
+
}
|
|
43
|
+
```
|
|
44
|
+
|
|
45
|
+
## Mail inbox example
|
|
46
|
+
|
|
47
|
+
```tsx
|
|
48
|
+
import { Color, Stack } from "expo-router";
|
|
49
|
+
import { useState } from "react";
|
|
50
|
+
import { ScrollView, Text, View } from "react-native";
|
|
51
|
+
|
|
52
|
+
export default function InboxScreen() {
|
|
53
|
+
const [isFilterOpen, setIsFilterOpen] = useState(false);
|
|
54
|
+
return (
|
|
55
|
+
<>
|
|
56
|
+
<ScrollView
|
|
57
|
+
style={{ flex: 1 }}
|
|
58
|
+
contentInsetAdjustmentBehavior="automatic"
|
|
59
|
+
contentContainerStyle={{ paddingHorizontal: 16 }}
|
|
60
|
+
>
|
|
61
|
+
{/* Screen content */}
|
|
62
|
+
</ScrollView>
|
|
63
|
+
<Stack.Screen options={{ headerTransparent: true }} />
|
|
64
|
+
<Stack.Screen.Title>Inbox</Stack.Screen.Title>
|
|
65
|
+
<Stack.SearchBar placeholder="Search" onChangeText={() => {}} />
|
|
66
|
+
{/* Header toolbar - right side */}
|
|
67
|
+
<Stack.Toolbar placement="right">
|
|
68
|
+
<Stack.Toolbar.Button onPress={() => {}}>Select</Stack.Toolbar.Button>
|
|
69
|
+
<Stack.Toolbar.Menu icon="ellipsis">
|
|
70
|
+
<Stack.Toolbar.Menu inline>
|
|
71
|
+
<Stack.Toolbar.Menu inline title="Sort By">
|
|
72
|
+
<Stack.Toolbar.MenuAction isOn>
|
|
73
|
+
Categories
|
|
74
|
+
</Stack.Toolbar.MenuAction>
|
|
75
|
+
<Stack.Toolbar.MenuAction>List</Stack.Toolbar.MenuAction>
|
|
76
|
+
</Stack.Toolbar.Menu>
|
|
77
|
+
<Stack.Toolbar.MenuAction icon="info.circle">
|
|
78
|
+
About categories
|
|
79
|
+
</Stack.Toolbar.MenuAction>
|
|
80
|
+
</Stack.Toolbar.Menu>
|
|
81
|
+
<Stack.Toolbar.MenuAction icon="person.circle">
|
|
82
|
+
Show Contact Photos
|
|
83
|
+
</Stack.Toolbar.MenuAction>
|
|
84
|
+
</Stack.Toolbar.Menu>
|
|
85
|
+
</Stack.Toolbar>
|
|
86
|
+
|
|
87
|
+
{/* Bottom toolbar */}
|
|
88
|
+
<Stack.Toolbar placement="bottom">
|
|
89
|
+
<Stack.Toolbar.Button
|
|
90
|
+
icon="line.3.horizontal.decrease"
|
|
91
|
+
selected={isFilterOpen}
|
|
92
|
+
onPress={() => setIsFilterOpen((prev) => !prev)}
|
|
93
|
+
/>
|
|
94
|
+
<Stack.Toolbar.View hidden={!isFilterOpen}>
|
|
95
|
+
<View style={{ width: 70, height: 32, justifyContent: "center" }}>
|
|
96
|
+
<Text style={{ fontSize: 12, fontWeight: 700 }}>Filter by</Text>
|
|
97
|
+
<Text
|
|
98
|
+
style={{
|
|
99
|
+
fontSize: 12,
|
|
100
|
+
fontWeight: 700,
|
|
101
|
+
color: Color.ios.systemBlue,
|
|
102
|
+
}}
|
|
103
|
+
>
|
|
104
|
+
Unread
|
|
105
|
+
</Text>
|
|
106
|
+
</View>
|
|
107
|
+
</Stack.Toolbar.View>
|
|
108
|
+
<Stack.Toolbar.Spacer />
|
|
109
|
+
<Stack.Toolbar.SearchBarSlot />
|
|
110
|
+
<Stack.Toolbar.Button
|
|
111
|
+
icon="square.and.pencil"
|
|
112
|
+
onPress={() => {}}
|
|
113
|
+
separateBackground
|
|
114
|
+
/>
|
|
115
|
+
</Stack.Toolbar>
|
|
116
|
+
</>
|
|
117
|
+
);
|
|
118
|
+
}
|
|
119
|
+
```
|
|
120
|
+
|
|
121
|
+
## Placement
|
|
122
|
+
|
|
123
|
+
- `"left"` - Header left
|
|
124
|
+
- `"right"` - Header right
|
|
125
|
+
- `"bottom"` (default) - Bottom toolbar
|
|
126
|
+
|
|
127
|
+
## Components
|
|
128
|
+
|
|
129
|
+
### Button
|
|
130
|
+
|
|
131
|
+
- Icon button: `<Stack.Toolbar.Button icon="star.fill" onPress={() => {}} />`
|
|
132
|
+
- Text button: `<Stack.Toolbar.Button onPress={() => {}}>Done</Stack.Toolbar.Button>`
|
|
133
|
+
|
|
134
|
+
**Props:** `icon`, `image`, `onPress`, `disabled`, `hidden`, `variant` (`"plain"` | `"done"` | `"prominent"`), `tintColor`
|
|
135
|
+
|
|
136
|
+
### Menu
|
|
137
|
+
|
|
138
|
+
Dropdown menu for grouping actions.
|
|
139
|
+
|
|
140
|
+
```tsx
|
|
141
|
+
<Stack.Toolbar.Menu icon="ellipsis">
|
|
142
|
+
<Stack.Toolbar.Menu inline>
|
|
143
|
+
<Stack.Toolbar.MenuAction>Sort by Recently Added</Stack.Toolbar.MenuAction>
|
|
144
|
+
<Stack.Toolbar.MenuAction isOn>
|
|
145
|
+
Sort by Date Captured
|
|
146
|
+
</Stack.Toolbar.MenuAction>
|
|
147
|
+
</Stack.Toolbar.Menu>
|
|
148
|
+
<Stack.Toolbar.Menu title="Filter">
|
|
149
|
+
<Stack.Toolbar.Menu inline>
|
|
150
|
+
<Stack.Toolbar.MenuAction isOn icon="square.grid.2x2">
|
|
151
|
+
All Items
|
|
152
|
+
</Stack.Toolbar.MenuAction>
|
|
153
|
+
</Stack.Toolbar.Menu>
|
|
154
|
+
<Stack.Toolbar.MenuAction icon="heart">Favorites</Stack.Toolbar.MenuAction>
|
|
155
|
+
<Stack.Toolbar.MenuAction icon="photo">Photos</Stack.Toolbar.MenuAction>
|
|
156
|
+
<Stack.Toolbar.MenuAction icon="video">Videos</Stack.Toolbar.MenuAction>
|
|
157
|
+
</Stack.Toolbar.Menu>
|
|
158
|
+
</Stack.Toolbar.Menu>
|
|
159
|
+
```
|
|
160
|
+
|
|
161
|
+
**Menu Props:** All Button props plus `title`, `inline`, `palette`, `elementSize` (`"small"` | `"medium"` | `"large"`)
|
|
162
|
+
|
|
163
|
+
**MenuAction Props:** `icon`, `onPress`, `isOn`, `destructive`, `disabled`, `subtitle`
|
|
164
|
+
|
|
165
|
+
When creating a palette with dividers, use `inline` combined with `elementSize="small"`. `palette` will not apply dividers on iOS 26.
|
|
166
|
+
|
|
167
|
+
### Spacer
|
|
168
|
+
|
|
169
|
+
```tsx
|
|
170
|
+
<Stack.Toolbar.Spacer /> // Bottom toolbar - flexible
|
|
171
|
+
<Stack.Toolbar.Spacer width={16} /> // Header - requires explicit width
|
|
172
|
+
```
|
|
173
|
+
|
|
174
|
+
### View
|
|
175
|
+
|
|
176
|
+
Embed custom React Native components. When adding a custom view make sure that there is only a single child with **explicit width and height**.
|
|
177
|
+
|
|
178
|
+
```tsx
|
|
179
|
+
<Stack.Toolbar.View>
|
|
180
|
+
<View style={{ width: 70, height: 32, justifyContent: "center" }}>
|
|
181
|
+
<Text style={{ fontSize: 12, fontWeight: 700 }}>Filter by</Text>
|
|
182
|
+
</View>
|
|
183
|
+
</Stack.Toolbar.View>
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
You can pass custom components to views as well:
|
|
187
|
+
|
|
188
|
+
```tsx
|
|
189
|
+
function CustomFilterView() {
|
|
190
|
+
return (
|
|
191
|
+
<View style={{ width: 70, height: 32, justifyContent: "center" }}>
|
|
192
|
+
<Text style={{ fontSize: 12, fontWeight: 700 }}>Filter by</Text>
|
|
193
|
+
</View>
|
|
194
|
+
);
|
|
195
|
+
}
|
|
196
|
+
...
|
|
197
|
+
<Stack.Toolbar.View>
|
|
198
|
+
<CustomFilterView />
|
|
199
|
+
</Stack.Toolbar.View>
|
|
200
|
+
```
|
|
201
|
+
|
|
202
|
+
## Recommendations
|
|
203
|
+
|
|
204
|
+
- When creating more complex headers, extract them to a single component
|
|
205
|
+
|
|
206
|
+
```tsx
|
|
207
|
+
export default function Page() {
|
|
208
|
+
return (
|
|
209
|
+
<>
|
|
210
|
+
<ScrollView>{/* Screen content */}</ScrollView>
|
|
211
|
+
<InboxHeader />
|
|
212
|
+
</>
|
|
213
|
+
);
|
|
214
|
+
}
|
|
215
|
+
|
|
216
|
+
function InboxHeader() {
|
|
217
|
+
return (
|
|
218
|
+
<>
|
|
219
|
+
<Stack.Screen.Title>Inbox</Stack.Screen.Title>
|
|
220
|
+
<Stack.SearchBar placeholder="Search" onChangeText={() => {}} />
|
|
221
|
+
<Stack.Toolbar placement="right">{/* Toolbar buttons */}</Stack.Toolbar>
|
|
222
|
+
</>
|
|
223
|
+
);
|
|
224
|
+
}
|
|
225
|
+
```
|
|
226
|
+
|
|
227
|
+
- When using `Stack.Toolbar`, make sure that all `Stack.Toolbar.*` components are wrapped inside `Stack.Toolbar` component.
|
|
228
|
+
|
|
229
|
+
This will **not work**:
|
|
230
|
+
|
|
231
|
+
```tsx
|
|
232
|
+
function Buttons() {
|
|
233
|
+
return (
|
|
234
|
+
<>
|
|
235
|
+
<Stack.Toolbar.Button icon="star.fill" onPress={() => {}} />
|
|
236
|
+
<Stack.Toolbar.Button onPress={() => {}}>Done</Stack.Toolbar.Button>
|
|
237
|
+
</>
|
|
238
|
+
);
|
|
239
|
+
}
|
|
240
|
+
|
|
241
|
+
function Page() {
|
|
242
|
+
return (
|
|
243
|
+
<>
|
|
244
|
+
<ScrollView>{/* Screen content */}</ScrollView>
|
|
245
|
+
<Stack.Toolbar placement="right">
|
|
246
|
+
<Buttons /> {/* ❌ This will NOT work */}
|
|
247
|
+
</Stack.Toolbar>
|
|
248
|
+
</>
|
|
249
|
+
);
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
This will work:
|
|
254
|
+
|
|
255
|
+
```tsx
|
|
256
|
+
function ToolbarWithButtons() {
|
|
257
|
+
return (
|
|
258
|
+
<Stack.Toolbar>
|
|
259
|
+
<Stack.Toolbar.Button icon="star.fill" onPress={() => {}} />
|
|
260
|
+
<Stack.Toolbar.Button onPress={() => {}}>Done</Stack.Toolbar.Button>
|
|
261
|
+
</Stack.Toolbar>
|
|
262
|
+
);
|
|
263
|
+
}
|
|
264
|
+
|
|
265
|
+
function Page() {
|
|
266
|
+
return (
|
|
267
|
+
<>
|
|
268
|
+
<ScrollView>{/* Screen content */}</ScrollView>
|
|
269
|
+
<ToolbarWithButtons /> {/* ✅ This will work */}
|
|
270
|
+
</>
|
|
271
|
+
);
|
|
272
|
+
}
|
|
273
|
+
```
|
|
274
|
+
|
|
275
|
+
## Limitations
|
|
276
|
+
|
|
277
|
+
- iOS only
|
|
278
|
+
- `placement="bottom"` can only be used inside screen components (not in layout files)
|
|
279
|
+
- `Stack.Toolbar.Badge` only works with `placement="left"` or `"right"`
|
|
280
|
+
- Header Spacers require explicit `width`
|
|
281
|
+
|
|
282
|
+
## Reference
|
|
283
|
+
|
|
284
|
+
Docs https://docs.expo.dev/versions/unversioned/sdk/router - read to see the full API.
|
|
@@ -0,0 +1,158 @@
|
|
|
1
|
+
# Apple Zoom Transitions
|
|
2
|
+
|
|
3
|
+
Fluid zoom transitions for navigating between screens. iOS 18+, Expo SDK 55+, Stack navigator only.
|
|
4
|
+
|
|
5
|
+
```tsx
|
|
6
|
+
import { Link } from "expo-router";
|
|
7
|
+
```
|
|
8
|
+
|
|
9
|
+
## Basic Zoom
|
|
10
|
+
|
|
11
|
+
Use `withAppleZoom` on `Link.Trigger` to zoom the entire trigger element into the destination screen:
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
<Link href="/photo" asChild>
|
|
15
|
+
<Link.Trigger withAppleZoom>
|
|
16
|
+
<Pressable>
|
|
17
|
+
<Image
|
|
18
|
+
source={{ uri: "https://example.com/thumb.jpg" }}
|
|
19
|
+
style={{ width: 120, height: 120, borderRadius: 12 }}
|
|
20
|
+
/>
|
|
21
|
+
</Pressable>
|
|
22
|
+
</Link.Trigger>
|
|
23
|
+
</Link>
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
## Targeted Zoom with `Link.AppleZoom`
|
|
27
|
+
|
|
28
|
+
Wrap only the element that should animate. Siblings outside `Link.AppleZoom` are not part of the transition:
|
|
29
|
+
|
|
30
|
+
```tsx
|
|
31
|
+
<Link href="/photo" asChild>
|
|
32
|
+
<Link.Trigger>
|
|
33
|
+
<Pressable style={{ alignItems: "center" }}>
|
|
34
|
+
<Link.AppleZoom>
|
|
35
|
+
<Image
|
|
36
|
+
source={{ uri: "https://example.com/thumb.jpg" }}
|
|
37
|
+
style={{ width: 200, aspectRatio: 4 / 3 }}
|
|
38
|
+
/>
|
|
39
|
+
</Link.AppleZoom>
|
|
40
|
+
<Text>Caption text (not zoomed)</Text>
|
|
41
|
+
</Pressable>
|
|
42
|
+
</Link.Trigger>
|
|
43
|
+
</Link>
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
`Link.AppleZoom` accepts only a single child element.
|
|
47
|
+
|
|
48
|
+
## Destination Target
|
|
49
|
+
|
|
50
|
+
Use `Link.AppleZoomTarget` on the destination screen to align the zoom animation to a specific element:
|
|
51
|
+
|
|
52
|
+
```tsx
|
|
53
|
+
// Destination screen (e.g., app/photo.tsx)
|
|
54
|
+
import { Link } from "expo-router";
|
|
55
|
+
|
|
56
|
+
export default function PhotoScreen() {
|
|
57
|
+
return (
|
|
58
|
+
<View style={{ flex: 1 }}>
|
|
59
|
+
<Link.AppleZoomTarget>
|
|
60
|
+
<Image
|
|
61
|
+
source={{ uri: "https://example.com/full.jpg" }}
|
|
62
|
+
style={{ width: "100%", aspectRatio: 4 / 3 }}
|
|
63
|
+
/>
|
|
64
|
+
</Link.AppleZoomTarget>
|
|
65
|
+
<Text>Photo details below</Text>
|
|
66
|
+
</View>
|
|
67
|
+
);
|
|
68
|
+
}
|
|
69
|
+
```
|
|
70
|
+
|
|
71
|
+
Without a target, the zoom animates to fill the entire destination screen.
|
|
72
|
+
|
|
73
|
+
## Custom Alignment Rectangle
|
|
74
|
+
|
|
75
|
+
For manual control over where the zoom lands on the destination, use `alignmentRect` instead of `Link.AppleZoomTarget`:
|
|
76
|
+
|
|
77
|
+
```tsx
|
|
78
|
+
<Link.AppleZoom alignmentRect={{ x: 0, y: 0, width: 200, height: 300 }}>
|
|
79
|
+
<Image source={{ uri: "https://example.com/thumb.jpg" }} />
|
|
80
|
+
</Link.AppleZoom>
|
|
81
|
+
```
|
|
82
|
+
|
|
83
|
+
Coordinates are in the destination screen's coordinate space. Prefer `Link.AppleZoomTarget` when possible — use `alignmentRect` only when the target element isn't available as a React component.
|
|
84
|
+
|
|
85
|
+
## Controlling Dismissal
|
|
86
|
+
|
|
87
|
+
Zoom screens support interactive dismissal gestures by default (pinch, swipe down when scrolled to top, swipe from leading edge). Use `usePreventZoomTransitionDismissal` on the destination screen to control this.
|
|
88
|
+
|
|
89
|
+
### Disable all dismissal gestures
|
|
90
|
+
|
|
91
|
+
```tsx
|
|
92
|
+
import { usePreventZoomTransitionDismissal } from "expo-router";
|
|
93
|
+
|
|
94
|
+
export default function PhotoScreen() {
|
|
95
|
+
usePreventZoomTransitionDismissal();
|
|
96
|
+
return <Image source={{ uri: "https://example.com/full.jpg" }} />;
|
|
97
|
+
}
|
|
98
|
+
```
|
|
99
|
+
|
|
100
|
+
### Restrict dismissal to a specific area
|
|
101
|
+
|
|
102
|
+
Use `unstable_dismissalBoundsRect` to prevent conflicts with scrollable content:
|
|
103
|
+
|
|
104
|
+
```tsx
|
|
105
|
+
usePreventZoomTransitionDismissal({
|
|
106
|
+
unstable_dismissalBoundsRect: {
|
|
107
|
+
minX: 0,
|
|
108
|
+
minY: 0,
|
|
109
|
+
maxX: 300,
|
|
110
|
+
maxY: 300,
|
|
111
|
+
},
|
|
112
|
+
});
|
|
113
|
+
```
|
|
114
|
+
|
|
115
|
+
This is useful when the destination contains a zoomable scroll view — the system gives that scroll view precedence over the dismiss gesture.
|
|
116
|
+
|
|
117
|
+
## Combining with Link.Preview
|
|
118
|
+
|
|
119
|
+
Zoom transitions work alongside long-press previews:
|
|
120
|
+
|
|
121
|
+
```tsx
|
|
122
|
+
<Link href="/photo" asChild>
|
|
123
|
+
<Link.Trigger withAppleZoom>
|
|
124
|
+
<Pressable>
|
|
125
|
+
<Image
|
|
126
|
+
source={{ uri: "https://example.com/thumb.jpg" }}
|
|
127
|
+
style={{ width: 120, height: 120 }}
|
|
128
|
+
/>
|
|
129
|
+
</Pressable>
|
|
130
|
+
</Link.Trigger>
|
|
131
|
+
<Link.Preview />
|
|
132
|
+
</Link>
|
|
133
|
+
```
|
|
134
|
+
|
|
135
|
+
## Best Practices
|
|
136
|
+
|
|
137
|
+
**Good use cases:**
|
|
138
|
+
- Thumbnail → full image (gallery, profile photos)
|
|
139
|
+
- Card → detail screen with similar visual content
|
|
140
|
+
- Source and destination with similar aspect ratios
|
|
141
|
+
|
|
142
|
+
**Avoid:**
|
|
143
|
+
- Skinny full-width list rows as zoom sources — the transition looks unnatural
|
|
144
|
+
- Mismatched aspect ratios between source and destination without `alignmentRect`
|
|
145
|
+
- Using zoom with sheets or popovers — only works in Stack navigator
|
|
146
|
+
- Hiding the navigation bar — known issues with header visibility during transitions
|
|
147
|
+
|
|
148
|
+
**Tips:**
|
|
149
|
+
- Always provide a close or back button — dismissal gestures are not discoverable
|
|
150
|
+
- If the destination has a zoomable scroll view, use `unstable_dismissalBoundsRect` to avoid gesture conflicts
|
|
151
|
+
- Source view doesn't need to match the tap target — only the `Link.AppleZoom` wrapped element animates
|
|
152
|
+
- When source is unavailable (e.g., scrolled off screen), the transition zooms from the center of the screen
|
|
153
|
+
|
|
154
|
+
## References
|
|
155
|
+
|
|
156
|
+
- Expo Router Zoom Transitions: https://docs.expo.dev/router/advanced/zoom-transition/
|
|
157
|
+
- Link.AppleZoom API: https://docs.expo.dev/versions/v55.0.0/sdk/router/#linkapplezoom
|
|
158
|
+
- Apple UIKit Fluid Transitions: https://developer.apple.com/documentation/uikit/enhancing-your-app-with-fluid-transitions
|
|
@@ -0,0 +1,150 @@
|
|
|
1
|
+
---
|
|
2
|
+
name: expo-upgrade
|
|
3
|
+
description: Guidelines for upgrading Expo SDK versions and fixing dependency issues
|
|
4
|
+
version: 1.0.0
|
|
5
|
+
license: MIT
|
|
6
|
+
---
|
|
7
|
+
|
|
8
|
+
## References
|
|
9
|
+
|
|
10
|
+
- ./references/react-19.md -- SDK +54: React 19 changes (useContext → use, Context.Provider → Context, forwardRef removal)
|
|
11
|
+
- ./references/new-architecture.md -- SDK +53: New Architecture migration guide
|
|
12
|
+
- ./references/react-compiler.md -- SDK +54: React Compiler setup and migration guide
|
|
13
|
+
- ./references/native-tabs.md -- SDK +55: Native tabs changes (Icon/Label/Badge now accessed via NativeTabs.Trigger.\*)
|
|
14
|
+
- ./references/expo-av-to-audio.md -- SDK +55: Migrate audio playback and recording from expo-av to expo-audio
|
|
15
|
+
- ./references/expo-av-to-video.md -- SDK +55: Migrate video playback from expo-av to expo-video
|
|
16
|
+
- ./references/react-navigation-to-expo-router.md -- SDK +56: Migrate `@react-navigation/*` imports to `expo-router` entry points (codemod + manual mapping)
|
|
17
|
+
|
|
18
|
+
## Beta/Preview Releases
|
|
19
|
+
|
|
20
|
+
Beta versions use `.preview` suffix (e.g., `55.0.0-preview.2`), published under `@next` tag.
|
|
21
|
+
|
|
22
|
+
Check if latest is beta: https://exp.host/--/api/v2/versions (look for `-preview` in `expoVersion`)
|
|
23
|
+
|
|
24
|
+
```bash
|
|
25
|
+
npx expo install expo@next --fix # install beta
|
|
26
|
+
```
|
|
27
|
+
|
|
28
|
+
## Step-by-Step Upgrade Process
|
|
29
|
+
|
|
30
|
+
> If upgrading from SDK 55 or earlier, skip SDK 56 and upgrade directly to SDK 57. Don't use `expo@57.0.8` or below. SDK 55 with Hermes V1 enabled, SDK 56, and older SDK 57 releases contain a Hermes V1 memory regression that can drastically increase memory usage when using `react-native-worklets` or `react-native-reanimated`.
|
|
31
|
+
|
|
32
|
+
1. Upgrade Expo and dependencies
|
|
33
|
+
|
|
34
|
+
```bash
|
|
35
|
+
npx expo install expo@latest
|
|
36
|
+
npx expo install --fix
|
|
37
|
+
```
|
|
38
|
+
|
|
39
|
+
2. Run diagnostics: `npx expo-doctor`
|
|
40
|
+
|
|
41
|
+
3. Clear caches and reinstall
|
|
42
|
+
|
|
43
|
+
```bash
|
|
44
|
+
npx expo export -p ios --clear
|
|
45
|
+
rm -rf node_modules .expo
|
|
46
|
+
watchman watch-del-all
|
|
47
|
+
```
|
|
48
|
+
|
|
49
|
+
## Breaking Changes Checklist
|
|
50
|
+
|
|
51
|
+
- Check for removed APIs in release notes
|
|
52
|
+
- Update import paths for moved modules
|
|
53
|
+
- Review native module changes requiring prebuild
|
|
54
|
+
- Test all camera, audio, and video features
|
|
55
|
+
- Verify navigation still works correctly
|
|
56
|
+
|
|
57
|
+
## Prebuild for Native Changes
|
|
58
|
+
|
|
59
|
+
**First check if `ios/` and `android/` directories exist in the project.** If neither directory exists, the project uses Continuous Native Generation (CNG) and native projects are regenerated at build time — skip this section and "Clear caches for bare workflow" entirely.
|
|
60
|
+
|
|
61
|
+
If upgrading requires native changes:
|
|
62
|
+
|
|
63
|
+
```bash
|
|
64
|
+
npx expo prebuild --clean
|
|
65
|
+
```
|
|
66
|
+
|
|
67
|
+
This regenerates the `ios` and `android` directories. Ensure the project is not a bare workflow app before running this command.
|
|
68
|
+
|
|
69
|
+
## Clear caches for bare workflow
|
|
70
|
+
|
|
71
|
+
These steps only apply when `ios/` and/or `android/` directories exist in the project:
|
|
72
|
+
|
|
73
|
+
- Clear the cocoapods cache for iOS: `cd ios && pod install --repo-update`
|
|
74
|
+
- Clear derived data for Xcode: `npx expo run:ios --no-build-cache`
|
|
75
|
+
- Clear the Gradle cache for Android: `cd android && ./gradlew clean`
|
|
76
|
+
|
|
77
|
+
## Housekeeping
|
|
78
|
+
|
|
79
|
+
- Review release notes for the target SDK version at https://expo.dev/changelog
|
|
80
|
+
- Update versioned docs links in agent instruction files (`AGENTS.md`). The default template links to `https://docs.expo.dev/versions/v<version>/`. Search for `docs.expo.dev/versions/` and bump each link to the new SDK version.
|
|
81
|
+
- If using Expo SDK 54 or later, ensure react-native-worklets is installed — this is required for react-native-reanimated to work.
|
|
82
|
+
- Enable React Compiler in SDK 54+ by adding `"experiments": { "reactCompiler": true }` to app.json — it's stable and recommended
|
|
83
|
+
- Delete sdkVersion from `app.json` to let Expo manage it automatically
|
|
84
|
+
- Review formerly implicit packages such as `@babel/core`, `babel-preset-expo`, and `expo-constants` individually instead of removing them wholesale. Keep any package that an installed dependency declares as a required peer.
|
|
85
|
+
- Keep `expo-constants` as a direct dependency whenever `expo-router` is installed. Expo Router imports it and declares it as a required peer; relying on a transitive copy can break native autolinking outside Expo Go.
|
|
86
|
+
- After removing any dependency, immediately run `npx expo-doctor` and restore anything it reports as a missing required peer.
|
|
87
|
+
- If the babel.config.js only contains 'babel-preset-expo', delete the file
|
|
88
|
+
- If the metro.config.js only contains expo defaults, delete the file
|
|
89
|
+
|
|
90
|
+
## Deprecated Packages
|
|
91
|
+
|
|
92
|
+
| Old Package | Replacement |
|
|
93
|
+
| -------------------- | ---------------------------------------------------- |
|
|
94
|
+
| `expo-av` | `expo-audio` and `expo-video` |
|
|
95
|
+
| `expo-permissions` | Individual package permission APIs |
|
|
96
|
+
| `@expo/vector-icons` | `expo-symbols` (for SF Symbols) |
|
|
97
|
+
| `AsyncStorage` | `expo-sqlite/localStorage/install` |
|
|
98
|
+
| `expo-app-loading` | `expo-splash-screen` |
|
|
99
|
+
| expo-linear-gradient | experimental_backgroundImage + CSS gradients in View |
|
|
100
|
+
|
|
101
|
+
When migrating deprecated packages, update all code usage before removing the old package. For expo-av, consult the migration references to convert Audio.Sound to useAudioPlayer, Audio.Recording to useAudioRecorder, and Video components to VideoView with useVideoPlayer.
|
|
102
|
+
|
|
103
|
+
## expo.install.exclude
|
|
104
|
+
|
|
105
|
+
Check if package.json has excluded packages:
|
|
106
|
+
|
|
107
|
+
```json
|
|
108
|
+
{
|
|
109
|
+
"expo": { "install": { "exclude": ["react-native-reanimated"] } }
|
|
110
|
+
}
|
|
111
|
+
```
|
|
112
|
+
|
|
113
|
+
Exclusions are often workarounds that may no longer be needed after upgrading. Review each one.
|
|
114
|
+
|
|
115
|
+
## Removing patches
|
|
116
|
+
|
|
117
|
+
Check if there are any outdated patches in the `patches/` directory. Remove them if they are no longer needed.
|
|
118
|
+
|
|
119
|
+
## Postcss
|
|
120
|
+
|
|
121
|
+
- `autoprefixer` isn't needed in SDK +53. Remove it from dependencies and check `postcss.config.js` or `postcss.config.mjs` to remove it from the plugins list.
|
|
122
|
+
- Use `postcss.config.mjs` in SDK +53.
|
|
123
|
+
|
|
124
|
+
## Metro
|
|
125
|
+
|
|
126
|
+
Remove redundant metro config options:
|
|
127
|
+
|
|
128
|
+
- resolver.unstable_enablePackageExports is enabled by default in SDK +53.
|
|
129
|
+
- `experimentalImportSupport` is enabled by default in SDK +54.
|
|
130
|
+
- `EXPO_USE_FAST_RESOLVER=1` is removed in SDK +54.
|
|
131
|
+
- cjs and mjs extensions are supported by default in SDK +50.
|
|
132
|
+
- Expo webpack is deprecated, migrate to [Expo Router and Metro web](https://docs.expo.dev/router/migrate/from-expo-webpack/).
|
|
133
|
+
|
|
134
|
+
## Hermes engine v1
|
|
135
|
+
|
|
136
|
+
Hermes V1 is the default on SDK 56 and later. SDK 55 apps using Hermes V1, all SDK 56 apps, and SDK 57 apps before `expo@57.0.9` may encounter a memory regression when importing `react-native-worklets` or `react-native-reanimated`. Upgrade directly to SDK 57 and `expo@57.0.9` or later. Do not recommend Worklets Bundle Mode as a production workaround; it is unsupported and experimental and may not work as expected.
|
|
137
|
+
|
|
138
|
+
Do not guide users to opt in to or out of Hermes V1. Changing the Hermes version from the SDK default is unsupported and has significant build and dependency-management caveats.
|
|
139
|
+
|
|
140
|
+
## New Architecture
|
|
141
|
+
|
|
142
|
+
The new architecture is enabled by default, the app.json field `"newArchEnabled": true` is no longer needed as it's the default. Expo Go only supports the new architecture as of SDK +53.
|
|
143
|
+
|
|
144
|
+
## Submitting Feedback
|
|
145
|
+
If you encounter errors, misleading or outdated information in this skill, report it so Expo can improve:
|
|
146
|
+
```bash
|
|
147
|
+
npx --yes submit-expo-feedback@latest --category skills --subject "expo-upgrade" "<actionable feedback>"
|
|
148
|
+
```
|
|
149
|
+
Only submit when you have something specific and actionable to report. Include as much relevant context as possible.
|
|
150
|
+
If an AI agent repeatedly failed or the user had to take over an Expo task, load the expo-skill-feedback skill and follow its eval-candidate flow instead of reusing the command above.
|
|
@@ -0,0 +1,4 @@
|
|
|
1
|
+
interface:
|
|
2
|
+
display_name: "Expo Upgrade"
|
|
3
|
+
short_description: "Upgrade Expo SDKs, fix dependencies, adopt React 19 / React Compiler, and migrate deprecated Expo packages"
|
|
4
|
+
default_prompt: "Use $expo-upgrade to upgrade an Expo SDK, run diagnostics, fix dependency conflicts, decide whether prebuild/cache clearing applies, and migrate away from deprecated Expo packages."
|