expo-router 5.2.0-canary-20250722-599a28f → 5.2.0-canary-20250811-5c940c0

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 (192) hide show
  1. package/_ctx.android.js +1 -1
  2. package/_ctx.ios.js +1 -1
  3. package/_ctx.web.js +1 -1
  4. package/assets/modal.module.css +12 -3
  5. package/build/ExpoRoot.d.ts.map +1 -1
  6. package/build/ExpoRoot.js +12 -2
  7. package/build/ExpoRoot.js.map +1 -1
  8. package/build/Route.d.ts +9 -0
  9. package/build/Route.d.ts.map +1 -1
  10. package/build/Route.js.map +1 -1
  11. package/build/constants.d.ts +2 -0
  12. package/build/constants.d.ts.map +1 -1
  13. package/build/constants.js +3 -1
  14. package/build/constants.js.map +1 -1
  15. package/build/doctor/index.d.ts +1 -1
  16. package/build/doctor/index.d.ts.map +1 -1
  17. package/build/doctor/index.js +4 -1
  18. package/build/doctor/index.js.map +1 -1
  19. package/build/exports.d.ts +2 -2
  20. package/build/exports.d.ts.map +1 -1
  21. package/build/exports.js +6 -6
  22. package/build/exports.js.map +1 -1
  23. package/build/fork/native-stack/createNativeStackNavigator.d.ts +2 -2
  24. package/build/fork/native-stack/createNativeStackNavigator.d.ts.map +1 -1
  25. package/build/fork/native-stack/createNativeStackNavigator.js +82 -2
  26. package/build/fork/native-stack/createNativeStackNavigator.js.map +1 -1
  27. package/build/fork/useLinking.js +2 -2
  28. package/build/fork/useLinking.js.map +1 -1
  29. package/build/getLinkingConfig.d.ts +29 -2
  30. package/build/getLinkingConfig.d.ts.map +1 -1
  31. package/build/getLinkingConfig.js +35 -4
  32. package/build/getLinkingConfig.js.map +1 -1
  33. package/build/getRoutes.d.ts.map +1 -1
  34. package/build/getRoutes.js +5 -2
  35. package/build/getRoutes.js.map +1 -1
  36. package/build/getRoutesCore.d.ts +1 -0
  37. package/build/getRoutesCore.d.ts.map +1 -1
  38. package/build/getRoutesCore.js +66 -1
  39. package/build/getRoutesCore.js.map +1 -1
  40. package/build/getRoutesSSR.d.ts.map +1 -1
  41. package/build/getRoutesSSR.js +14 -4
  42. package/build/getRoutesSSR.js.map +1 -1
  43. package/build/getServerManifest.d.ts +20 -1
  44. package/build/getServerManifest.d.ts.map +1 -1
  45. package/build/getServerManifest.js +8 -1
  46. package/build/getServerManifest.js.map +1 -1
  47. package/build/global-state/routeInfo.d.ts.map +1 -1
  48. package/build/global-state/routeInfo.js +12 -1
  49. package/build/global-state/routeInfo.js.map +1 -1
  50. package/build/global-state/router-store.d.ts.map +1 -1
  51. package/build/global-state/router-store.js +4 -0
  52. package/build/global-state/router-store.js.map +1 -1
  53. package/build/global-state/routing.d.ts +29 -1
  54. package/build/global-state/routing.d.ts.map +1 -1
  55. package/build/global-state/routing.js +78 -42
  56. package/build/global-state/routing.js.map +1 -1
  57. package/build/global-state/utils.d.ts +4 -0
  58. package/build/global-state/utils.d.ts.map +1 -0
  59. package/build/global-state/utils.js +29 -0
  60. package/build/global-state/utils.js.map +1 -0
  61. package/build/hooks.d.ts +1 -1
  62. package/build/hooks.d.ts.map +1 -1
  63. package/build/hooks.js +9 -4
  64. package/build/hooks.js.map +1 -1
  65. package/build/layouts/DrawerClient.d.ts +2 -2
  66. package/build/layouts/StackClient.d.ts +2 -2
  67. package/build/layouts/StackClient.d.ts.map +1 -1
  68. package/build/layouts/StackClient.js +11 -6
  69. package/build/layouts/StackClient.js.map +1 -1
  70. package/build/layouts/TabsClient.d.ts +3 -3
  71. package/build/layouts/withLayoutContext.d.ts.map +1 -1
  72. package/build/layouts/withLayoutContext.js +13 -0
  73. package/build/layouts/withLayoutContext.js.map +1 -1
  74. package/build/link/ExpoLink.d.ts.map +1 -1
  75. package/build/link/ExpoLink.js +3 -2
  76. package/build/link/ExpoLink.js.map +1 -1
  77. package/build/link/InternalLinkPreviewContext.d.ts +6 -0
  78. package/build/link/InternalLinkPreviewContext.d.ts.map +1 -0
  79. package/build/link/InternalLinkPreviewContext.js +6 -0
  80. package/build/link/InternalLinkPreviewContext.js.map +1 -0
  81. package/build/link/Link.d.ts +2 -67
  82. package/build/link/Link.d.ts.map +1 -1
  83. package/build/link/Link.js +5 -70
  84. package/build/link/Link.js.map +1 -1
  85. package/build/link/LinkWithPreview.d.ts +1 -46
  86. package/build/link/LinkWithPreview.d.ts.map +1 -1
  87. package/build/link/LinkWithPreview.js +20 -113
  88. package/build/link/LinkWithPreview.js.map +1 -1
  89. package/build/link/elements.d.ts +166 -0
  90. package/build/link/elements.d.ts.map +1 -0
  91. package/build/link/elements.js +172 -0
  92. package/build/link/elements.js.map +1 -0
  93. package/build/link/preview/HrefPreview.d.ts +1 -1
  94. package/build/link/preview/HrefPreview.d.ts.map +1 -1
  95. package/build/link/preview/HrefPreview.js +43 -7
  96. package/build/link/preview/HrefPreview.js.map +1 -1
  97. package/build/link/preview/LinkPreviewContext.d.ts +3 -2
  98. package/build/link/preview/LinkPreviewContext.d.ts.map +1 -1
  99. package/build/link/preview/LinkPreviewContext.js +3 -2
  100. package/build/link/preview/LinkPreviewContext.js.map +1 -1
  101. package/build/link/preview/native.d.ts +14 -6
  102. package/build/link/preview/native.d.ts.map +1 -1
  103. package/build/link/preview/native.js +5 -4
  104. package/build/link/preview/native.js.map +1 -1
  105. package/build/link/preview/useNextScreenId.d.ts +8 -1
  106. package/build/link/preview/useNextScreenId.d.ts.map +1 -1
  107. package/build/link/preview/useNextScreenId.js +37 -32
  108. package/build/link/preview/useNextScreenId.js.map +1 -1
  109. package/build/link/preview/utils.d.ts +12 -0
  110. package/build/link/preview/utils.d.ts.map +1 -0
  111. package/build/link/preview/utils.js +66 -0
  112. package/build/link/preview/utils.js.map +1 -0
  113. package/build/modal/Modal.d.ts +9 -0
  114. package/build/modal/Modal.d.ts.map +1 -1
  115. package/build/modal/Modal.js +12 -2
  116. package/build/modal/Modal.js.map +1 -1
  117. package/build/modal/ModalsRenderer.js +1 -1
  118. package/build/modal/ModalsRenderer.js.map +1 -1
  119. package/build/modal/web/ModalStackRouteDrawer.web.d.ts.map +1 -1
  120. package/build/modal/web/ModalStackRouteDrawer.web.js +0 -1
  121. package/build/modal/web/ModalStackRouteDrawer.web.js.map +1 -1
  122. package/build/native-tabs/NativeBottomTabs/NativeBottomTabsNavigator.d.ts +25 -0
  123. package/build/native-tabs/NativeBottomTabs/NativeBottomTabsNavigator.d.ts.map +1 -0
  124. package/build/native-tabs/NativeBottomTabs/NativeBottomTabsNavigator.js +27 -0
  125. package/build/native-tabs/NativeBottomTabs/NativeBottomTabsNavigator.js.map +1 -0
  126. package/build/native-tabs/NativeBottomTabs/NativeBottomTabsRouter.d.ts +3 -0
  127. package/build/native-tabs/NativeBottomTabs/NativeBottomTabsRouter.d.ts.map +1 -0
  128. package/build/native-tabs/NativeBottomTabs/NativeBottomTabsRouter.js +65 -0
  129. package/build/native-tabs/NativeBottomTabs/NativeBottomTabsRouter.js.map +1 -0
  130. package/build/native-tabs/NativeBottomTabs/NativeTabs.d.ts +7 -0
  131. package/build/native-tabs/NativeBottomTabs/NativeTabs.d.ts.map +1 -0
  132. package/build/native-tabs/NativeBottomTabs/NativeTabs.js +9 -0
  133. package/build/native-tabs/NativeBottomTabs/NativeTabs.js.map +1 -0
  134. package/build/native-tabs/NativeBottomTabs/NativeTabsView.d.ts +103 -0
  135. package/build/native-tabs/NativeBottomTabs/NativeTabsView.d.ts.map +1 -0
  136. package/build/native-tabs/NativeBottomTabs/NativeTabsView.js +69 -0
  137. package/build/native-tabs/NativeBottomTabs/NativeTabsView.js.map +1 -0
  138. package/build/native-tabs/NativeBottomTabs/TabOptions.d.ts +40 -0
  139. package/build/native-tabs/NativeBottomTabs/TabOptions.d.ts.map +1 -0
  140. package/build/native-tabs/NativeBottomTabs/TabOptions.js +103 -0
  141. package/build/native-tabs/NativeBottomTabs/TabOptions.js.map +1 -0
  142. package/build/native-tabs/NativeBottomTabs/utils.d.ts +7 -0
  143. package/build/native-tabs/NativeBottomTabs/utils.d.ts.map +1 -0
  144. package/build/native-tabs/NativeBottomTabs/utils.js +21 -0
  145. package/build/native-tabs/NativeBottomTabs/utils.js.map +1 -0
  146. package/build/native-tabs/common/elements.d.ts +59 -0
  147. package/build/native-tabs/common/elements.d.ts.map +1 -0
  148. package/build/native-tabs/common/elements.js +15 -0
  149. package/build/native-tabs/common/elements.js.map +1 -0
  150. package/build/native-tabs/index.d.ts +3 -0
  151. package/build/native-tabs/index.d.ts.map +1 -0
  152. package/build/native-tabs/index.js +10 -0
  153. package/build/native-tabs/index.js.map +1 -0
  154. package/build/routes-manifest.d.ts +42 -0
  155. package/build/routes-manifest.d.ts.map +1 -1
  156. package/build/routes-manifest.js.map +1 -1
  157. package/build/testing-library/mock-config.d.ts +18 -0
  158. package/build/testing-library/mock-config.d.ts.map +1 -1
  159. package/build/testing-library/mock-config.js +4 -1
  160. package/build/testing-library/mock-config.js.map +1 -1
  161. package/build/ui/common.d.ts.map +1 -1
  162. package/build/ui/common.js +7 -6
  163. package/build/ui/common.js.map +1 -1
  164. package/build/useNavigation.d.ts.map +1 -1
  165. package/build/useNavigation.js +8 -5
  166. package/build/useNavigation.js.map +1 -1
  167. package/build/views/NoSSR.d.ts +5 -0
  168. package/build/views/NoSSR.d.ts.map +1 -0
  169. package/build/views/NoSSR.js +22 -0
  170. package/build/views/NoSSR.js.map +1 -0
  171. package/build/views/Screen.d.ts.map +1 -1
  172. package/build/views/Screen.js +4 -1
  173. package/build/views/Screen.js.map +1 -1
  174. package/build/views/Sitemap.d.ts.map +1 -1
  175. package/build/views/Sitemap.js +75 -2
  176. package/build/views/Sitemap.js.map +1 -1
  177. package/build/views/Unmatched.d.ts.map +1 -1
  178. package/build/views/Unmatched.js +14 -4
  179. package/build/views/Unmatched.js.map +1 -1
  180. package/ios/ExpoHead.podspec +10 -1
  181. package/ios/LinkPreview/LinkPreviewNativeActionView.swift +159 -19
  182. package/ios/LinkPreview/LinkPreviewNativeModule.swift +37 -5
  183. package/ios/LinkPreview/LinkPreviewNativeNavigation.h +37 -11
  184. package/ios/LinkPreview/LinkPreviewNativeNavigation.mm +110 -87
  185. package/ios/LinkPreview/LinkPreviewNativeNavigation.swift +136 -0
  186. package/ios/LinkPreview/LinkPreviewNativePreviewView.swift +2 -0
  187. package/ios/LinkPreview/LinkPreviewNativeView.swift +70 -69
  188. package/package.json +38 -9
  189. package/plugin/build/index.d.ts +2 -0
  190. package/plugin/options.json +5 -0
  191. package/plugin/src/index.ts +2 -0
  192. package/server.d.ts +2 -1
@@ -1,10 +1,20 @@
1
1
  import ExpoModulesCore
2
2
 
3
- class NativeLinkPreviewView: ExpoView, UIContextMenuInteractionDelegate, LinkPreviewModalDismissible {
3
+ class NativeLinkPreviewView: ExpoView, UIContextMenuInteractionDelegate,
4
+ LinkPreviewModalDismissible, LinkPreviewMenuUpdatable {
4
5
  private var trigger: NativeLinkPreviewTrigger?
5
6
  private var preview: NativeLinkPreviewContentView?
6
7
  private var interaction: UIContextMenuInteraction?
7
- private var nextScreenId: String?
8
+ var nextScreenId: String? {
9
+ didSet {
10
+ performUpdateOfPreloadedView()
11
+ }
12
+ }
13
+ var tabPath: TabPathPayload? {
14
+ didSet {
15
+ performUpdateOfPreloadedView()
16
+ }
17
+ }
8
18
  private var actions: [LinkPreviewNativeActionView] = []
9
19
 
10
20
  private let linkPreviewNativeNavigation = LinkPreviewNativeNavigation()
@@ -15,7 +25,6 @@ class NativeLinkPreviewView: ExpoView, UIContextMenuInteractionDelegate, LinkPre
15
25
  let onDidPreviewOpen = EventDispatcher()
16
26
  let onPreviewWillClose = EventDispatcher()
17
27
  let onPreviewDidClose = EventDispatcher()
18
- let onActionSelected = EventDispatcher()
19
28
 
20
29
  required init(appContext: AppContext? = nil) {
21
30
  super.init(appContext: appContext)
@@ -30,55 +39,62 @@ class NativeLinkPreviewView: ExpoView, UIContextMenuInteractionDelegate, LinkPre
30
39
 
31
40
  // MARK: - Props
32
41
 
33
- func setNextScreenId(_ screenId: String) {
34
- self.nextScreenId = screenId
35
- linkPreviewNativeNavigation.updatePreloadedView(screenId, with: self)
42
+ func performUpdateOfPreloadedView() {
43
+ if nextScreenId == nil || tabPath?.path.isEmpty != false {
44
+ return
45
+ }
46
+ print("Perform update \(nextScreenId) \(tabPath) \(self)")
47
+ linkPreviewNativeNavigation.updatePreloadedView(
48
+ screenId: nextScreenId, tabPath: tabPath, responder: self)
36
49
  }
37
50
 
38
51
  // MARK: - Children
39
-
40
- override func mountChildComponentView(_ childComponentView: UIView, index: Int) {
41
- if let triggerView = childComponentView as? NativeLinkPreviewTrigger {
42
- trigger = triggerView
43
- if let interaction = self.interaction, self.preview != nil {
44
- trigger?.addInteraction(interaction)
45
- }
46
- super.mountChildComponentView(childComponentView, index: index)
47
- } else if let previewView = childComponentView as? NativeLinkPreviewContentView {
48
- preview = previewView
49
- if let interaction = self.interaction, let trigger = self.trigger {
50
- trigger.addInteraction(interaction)
52
+ #if RCT_NEW_ARCH_ENABLED
53
+ override func mountChildComponentView(_ childComponentView: UIView, index: Int) {
54
+ if let triggerView = childComponentView as? NativeLinkPreviewTrigger {
55
+ trigger = triggerView
56
+ if let interaction = self.interaction {
57
+ triggerView.addInteraction(interaction)
58
+ }
59
+ super.mountChildComponentView(childComponentView, index: index)
60
+ } else if let previewView = childComponentView as? NativeLinkPreviewContentView {
61
+ preview = previewView
62
+ if let interaction = self.interaction, let trigger = self.trigger {
63
+ trigger.addInteraction(interaction)
64
+ }
65
+ } else if let actionView = childComponentView as? LinkPreviewNativeActionView {
66
+ actionView.parentMenuUpdatable = self
67
+ actions.append(actionView)
68
+ } else {
69
+ print(
70
+ "ExpoRouter: Unknown child component view (\(childComponentView)) mounted to NativeLinkPreviewView"
71
+ )
51
72
  }
52
- } else if let actionView = childComponentView as? LinkPreviewNativeActionView {
53
- actions.append(actionView)
54
- } else {
55
- print(
56
- "ExpoRouter: Unknown child component view (\(childComponentView)) mounted to NativeLinkPreviewView"
57
- )
58
73
  }
59
- }
60
74
 
61
- override func unmountChildComponentView(_ child: UIView, index: Int) {
62
- if child is NativeLinkPreviewTrigger {
63
- if let interaction = self.interaction {
64
- trigger?.removeInteraction(interaction)
75
+ override func unmountChildComponentView(_ child: UIView, index: Int) {
76
+ if child is NativeLinkPreviewTrigger {
77
+ if let interaction = self.interaction {
78
+ trigger?.removeInteraction(interaction)
79
+ }
80
+ trigger = nil
81
+ super.unmountChildComponentView(child, index: index)
82
+ } else if child is NativeLinkPreviewContentView {
83
+ preview = nil
84
+ if let interaction = self.interaction {
85
+ trigger?.removeInteraction(interaction)
86
+ }
87
+ } else if let actionView = child as? LinkPreviewNativeActionView {
88
+ actions.removeAll(where: {
89
+ $0 == actionView
90
+ })
91
+ } else {
92
+ print(
93
+ "ExpoRouter: Unknown child component view (\(child)) unmounted from NativeLinkPreviewView"
94
+ )
65
95
  }
66
- trigger = nil
67
- super.unmountChildComponentView(child, index: index)
68
- } else if child is NativeLinkPreviewContentView {
69
- preview = nil
70
- if let interaction = self.interaction {
71
- trigger?.removeInteraction(interaction)
72
- }
73
- } else if let actionView = child as? LinkPreviewNativeActionView {
74
- actions.removeAll(where: {
75
- $0 == actionView
76
- })
77
- } else {
78
- print(
79
- "ExpoRouter: Unknown child component view (\(child)) unmounted from NativeLinkPreviewView")
80
96
  }
81
- }
97
+ #endif
82
98
 
83
99
  // MARK: - UIContextMenuInteractionDelegate
84
100
 
@@ -153,9 +169,9 @@ class NativeLinkPreviewView: ExpoView, UIContextMenuInteractionDelegate, LinkPre
153
169
 
154
170
  // MARK: - Context Menu Helpers
155
171
 
156
- private func createPreviewViewController() -> UIViewController {
172
+ private func createPreviewViewController() -> UIViewController? {
157
173
  guard let preview = preview else {
158
- return UIViewController()
174
+ return nil
159
175
  }
160
176
 
161
177
  let vc = PreviewViewController(linkPreviewNativePreview: preview)
@@ -166,38 +182,23 @@ class NativeLinkPreviewView: ExpoView, UIContextMenuInteractionDelegate, LinkPre
166
182
  return vc
167
183
  }
168
184
 
185
+ func updateMenu() {
186
+ self.interaction?.updateVisibleMenu { _ in
187
+ self.createContextMenu()
188
+ }
189
+ }
190
+
169
191
  private func createContextMenu() -> UIMenu {
170
- if actions.count == 1, let menu = convertActionViewToUiAction(actions[0]) as? UIMenu {
192
+ if actions.count == 1, let menu = actions[0].uiAction as? UIMenu {
171
193
  return menu
172
194
  }
173
195
  return UIMenu(
174
196
  title: "",
175
197
  children: actions.map { action in
176
- self.convertActionViewToUiAction(action)
198
+ action.uiAction
177
199
  }
178
200
  )
179
201
  }
180
-
181
- private func convertActionViewToUiAction(_ action: LinkPreviewNativeActionView) -> UIMenuElement {
182
- if !action.subActions.isEmpty {
183
- let subActions = action.subActions.map { subAction in
184
- self.convertActionViewToUiAction(subAction)
185
- }
186
- return UIMenu(
187
- title: action.title,
188
- image: action.icon.flatMap { UIImage(systemName: $0) },
189
- children: subActions
190
- )
191
- }
192
- return UIAction(
193
- title: action.title,
194
- image: action.icon.flatMap { UIImage(systemName: $0) }
195
- ) { _ in
196
- self.onActionSelected([
197
- "id": action.id
198
- ])
199
- }
200
- }
201
202
  }
202
203
 
203
204
  class PreviewViewController: UIViewController {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-router",
3
- "version": "5.2.0-canary-20250722-599a28f",
3
+ "version": "5.2.0-canary-20250811-5c940c0",
4
4
  "description": "Expo Router is a file-based router for React Native and web applications.",
5
5
  "author": "650 Industries, Inc.",
6
6
  "license": "MIT",
@@ -76,22 +76,45 @@
76
76
  ],
77
77
  "peerDependencies": {
78
78
  "@react-navigation/drawer": "^7.3.9",
79
- "expo": "54.0.0-canary-20250722-599a28f",
80
- "expo-constants": "17.1.8-canary-20250722-599a28f",
81
- "expo-linking": "7.1.8-canary-20250722-599a28f",
79
+ "@testing-library/jest-native": ">= 5.0.0",
80
+ "@testing-library/react-native": ">= 12.0.0",
81
+ "expo": "54.0.0-canary-20250811-5c940c0",
82
+ "expo-constants": "17.1.8-canary-20250811-5c940c0",
83
+ "expo-linking": "7.1.8-canary-20250811-5c940c0",
84
+ "react": "*",
85
+ "react-dom": "*",
86
+ "react-native": "*",
87
+ "react-native-gesture-handler": "*",
82
88
  "react-native-reanimated": "*",
83
- "react-native-safe-area-context": "*",
84
- "react-native-screens": "*"
89
+ "react-native-safe-area-context": ">= 4.0.0",
90
+ "react-native-screens": "*",
91
+ "react-native-web": "*",
92
+ "react-server-dom-webpack": ">= 19.0.0"
85
93
  },
86
94
  "peerDependenciesMeta": {
95
+ "react-dom": {
96
+ "optional": true
97
+ },
98
+ "react-native-gesture-handler": {
99
+ "optional": true
100
+ },
87
101
  "react-native-reanimated": {
88
102
  "optional": true
89
103
  },
104
+ "react-native-web": {
105
+ "optional": true
106
+ },
107
+ "react-server-dom-webpack": {
108
+ "optional": true
109
+ },
90
110
  "@react-navigation/drawer": {
91
111
  "optional": true
92
112
  },
93
113
  "@testing-library/jest-native": {
94
114
  "optional": true
115
+ },
116
+ "@testing-library/react-native": {
117
+ "optional": true
95
118
  }
96
119
  },
97
120
  "devDependencies": {
@@ -105,21 +128,27 @@
105
128
  "tsd": "^0.28.1"
106
129
  },
107
130
  "dependencies": {
108
- "@expo/metro-runtime": "6.0.0-canary-20250722-599a28f",
109
- "@expo/server": "0.6.4-canary-20250722-599a28f",
131
+ "@expo/metro-runtime": "6.0.0-canary-20250811-5c940c0",
132
+ "@expo/server": "0.7.0-canary-20250811-5c940c0",
110
133
  "@radix-ui/react-slot": "1.2.0",
111
134
  "@react-navigation/bottom-tabs": "^7.3.10",
112
135
  "@react-navigation/native": "^7.1.6",
113
136
  "@react-navigation/native-stack": "^7.3.10",
114
137
  "client-only": "^0.0.1",
138
+ "debug": "^4.3.4",
139
+ "escape-string-regexp": "^4.0.0",
140
+ "fast-deep-equal": "^3.1.3",
115
141
  "invariant": "^2.2.4",
142
+ "nanoid": "^3.3.8",
116
143
  "react-fast-compare": "^3.2.2",
117
144
  "react-native-is-edge-to-edge": "^1.1.6",
145
+ "query-string": "^7.1.3",
118
146
  "schema-utils": "^4.0.1",
119
147
  "semver": "~7.6.3",
120
148
  "server-only": "^0.0.1",
121
149
  "sf-symbols-typescript": "^2.1.0",
122
150
  "shallowequal": "^1.1.0",
123
- "vaul": "^0.9.0"
151
+ "use-latest-callback": "^0.2.1",
152
+ "vaul": "^1.1.2"
124
153
  }
125
154
  }
@@ -17,5 +17,7 @@ declare const withRouter: ConfigPlugin<{
17
17
  sitemap?: boolean;
18
18
  /** Generate partial typed routes */
19
19
  partialTypedGroups?: boolean;
20
+ /** Enable experimental server middleware support with a `+middleware.ts` file. Requires `web.output: 'server'` to be set in app config. */
21
+ unstable_useServerMiddleware?: boolean;
20
22
  } | void>;
21
23
  export default withRouter;
@@ -135,6 +135,11 @@
135
135
  }
136
136
  }
137
137
  }
138
+ },
139
+ "unstable_useServerMiddleware": {
140
+ "description": "Enable experimental server middleware support with a `+middleware.ts` file. Requires `web.output: 'server'` to be set in app config.",
141
+ "type": "boolean",
142
+ "default": false
138
143
  }
139
144
  },
140
145
  "additionalProperties": false
@@ -37,6 +37,8 @@ const withRouter: ConfigPlugin<
37
37
  sitemap?: boolean;
38
38
  /** Generate partial typed routes */
39
39
  partialTypedGroups?: boolean;
40
+ /** Enable experimental server middleware support with a `+middleware.ts` file. Requires `web.output: 'server'` to be set in app config. */
41
+ unstable_useServerMiddleware?: boolean;
40
42
  } | void
41
43
  > = (config, _props) => {
42
44
  const props = _props || {};
package/server.d.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { ExpoRequest, ExpoResponse } from '@expo/server/build/environment';
1
+ import { ExpoRequest, ExpoResponse } from '@expo/server';
2
+ export { MiddlewareFunction } from '@expo/server/build/types';
2
3
 
3
4
  export type RequestHandler = (
4
5
  request: Request,