expo-router 4.0.15 → 4.0.17

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 (40) hide show
  1. package/babel.js +17 -3
  2. package/build/fast-refresh.d.ts.map +1 -1
  3. package/build/fast-refresh.js +21 -13
  4. package/build/fast-refresh.js.map +1 -1
  5. package/build/loadStaticParamsAsync.d.ts +5 -0
  6. package/build/loadStaticParamsAsync.d.ts.map +1 -1
  7. package/build/loadStaticParamsAsync.js +16 -8
  8. package/build/loadStaticParamsAsync.js.map +1 -1
  9. package/build/rsc/middleware.js +1 -0
  10. package/build/rsc/middleware.js.map +1 -1
  11. package/build/rsc/router/create-pages.d.ts +3 -1
  12. package/build/rsc/router/create-pages.d.ts.map +1 -1
  13. package/build/rsc/router/create-pages.js +1 -1
  14. package/build/rsc/router/create-pages.js.map +1 -1
  15. package/build/rsc/router/errors.d.ts +5 -1
  16. package/build/rsc/router/errors.d.ts.map +1 -1
  17. package/build/rsc/router/errors.js +5 -1
  18. package/build/rsc/router/errors.js.map +1 -1
  19. package/build/rsc/router/expo-definedRouter.d.ts.map +1 -1
  20. package/build/rsc/router/expo-definedRouter.js +82 -15
  21. package/build/rsc/router/expo-definedRouter.js.map +1 -1
  22. package/build/rsc/router/host.d.ts.map +1 -1
  23. package/build/rsc/router/host.js +15 -5
  24. package/build/rsc/router/host.js.map +1 -1
  25. package/build/rsc/server.d.ts +1 -1
  26. package/build/rsc/server.d.ts.map +1 -1
  27. package/build/rsc/server.js +18 -34
  28. package/build/rsc/server.js.map +1 -1
  29. package/build/static/getServerManifest.d.ts +5 -0
  30. package/build/static/getServerManifest.d.ts.map +1 -1
  31. package/build/static/getServerManifest.js +17 -1
  32. package/build/static/getServerManifest.js.map +1 -1
  33. package/build/static/renderStaticContent.d.ts +1 -8
  34. package/build/static/renderStaticContent.d.ts.map +1 -1
  35. package/build/static/renderStaticContent.js +3 -19
  36. package/build/static/renderStaticContent.js.map +1 -1
  37. package/build/views/ErrorBoundary.d.ts.map +1 -1
  38. package/build/views/ErrorBoundary.js +93 -15
  39. package/build/views/ErrorBoundary.js.map +1 -1
  40. package/package.json +4 -4
@@ -1 +1 @@
1
- {"version":3,"file":"renderStaticContent.js","sourceRoot":"","sources":["../../src/static/renderStaticContent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,+BAA6B;AAE7B,qDAA+E;AAC/E,6DAA+C;AAC/C,kDAA0B;AAC1B,wEAAmD;AACnD,uDAA+C;AAE/C,yDAAsD;AACtD,qCAAiC;AACjC,0CAAuC;AACvC,0EAAuE;AACvE,4CAAkD;AAClD,kCAA+B;AAC/B,oEAAiE;AAEjE,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,iCAAiC,CAAC,CAAC;AAElE,8BAAW,CAAC,iBAAiB,CAAC,KAAK,EAAE,GAAG,EAAE,CAAC,mBAAQ,CAAC,CAAC;AAErD,uDAAuD;AACvD,KAAK,UAAU,WAAW,CAAC,UAAmB,EAAE;IAC9C,MAAM,SAAS,GAAG,IAAA,qBAAS,EAAC,UAAG,EAAE;QAC/B,iBAAiB,EAAE,IAAI;QACvB,QAAQ,EAAE,KAAK;QACf,GAAG,OAAO;KACX,CAAC,CAAC;IAEH,IAAI,CAAC,SAAS,EAAE;QACd,MAAM,IAAI,KAAK,CAAC,iBAAiB,CAAC,CAAC;KACpC;IAED,6BAA6B;IAC7B,MAAM,IAAA,6CAAqB,EAAC,SAAS,CAAC,CAAC;IAEvC,OAAO,IAAA,mDAAwB,EAAC,SAAS,EAAE,KAAK,CAAC,CAAC;AACpD,CAAC;AAmFQ,kCAAW;AAjFpB,SAAS,4BAA4B;IACnC,iDAAiD;IACjD,0JAA0J;IAE1J,8FAA8F;IAC9F,yJAAyJ;IACzJ,MAAM,QAAQ,GAAG,uCAAuC,CAAC;IACzD,MAAM,CAAC,QAAQ,CAAC,GAAG,IAAI,GAAG,EAA8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,SAAS,CAAC,CAAC;IAEpD,MAAM,KAAK,GAAG,IAAI,CAAC,kBAAkB,EAAE,CAAC;IACxC,KAAK,CAAC,iCAAiC,KAAK,CAAC,MAAM,GAAG,EAAE,KAAK,CAAC,CAAC;IAC/D,qCAAqC;IACrC,4CAA4C;IAC5C,MAAM,GAAG,MAAM,CAAC,OAAO,CAAC,SAAS,EAAE,GAAG,KAAK,CAAC,IAAI,CAAC,EAAE,CAAC,SAAS,CAAC,CAAC;IAE/D,OAAO,iBAAiB,GAAG,MAAM,CAAC;AACpC,CAAC;AApDD,4CAoDC;AAED,SAAS,kCAAkC,CAAC,MAAW,EAAE,IAAY;IACnE,kBAAkB;IAClB,KAAK,MAAM,GAAG,IAAI,CAAC,OAAO,EAAE,UAAU,EAAE,MAAM,EAAE,MAAM,EAAE,QAAQ,EAAE,OAAO,CAAC,CAAC,OAAO,EAAE,EAAE;QACpF,MAAM,MAAM,GAAG,MAAM,EAAE,CAAC,GAAG,CAAC,EAAE,QAAQ,EAAE,CAAC;QACzC,IAAI,MAAM,EAAE;YACV,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,CAAC,CAAC;SAClD;KACF;IAED,aAAa;IACb,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,cAAc,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAC7E,IAAI,GAAG,IAAI,CAAC,OAAO,CAAC,QAAQ,EAAE,SAAS,MAAM,EAAE,cAAc,CAAC,QAAQ,EAAE,GAAG,CAAC,CAAC;IAE7E,OAAO,IAAI,CAAC;AACd,CAAC;AAID,yDAAsE;AAA7D,oIAAA,+BAA+B,OAAA","sourcesContent":["/**\n * Copyright © 2023 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport '@expo/metro-runtime';\n\nimport { ServerContainer, ServerContainerRef } from '@react-navigation/native';\nimport * as Font from 'expo-font/build/server';\nimport React from 'react';\nimport ReactDOMServer from 'react-dom/server.node';\nimport { AppRegistry } from 'react-native-web';\n\nimport { getRootComponent } from './getRootComponent';\nimport { ctx } from '../../_ctx';\nimport { ExpoRoot } from '../ExpoRoot';\nimport { getReactNavigationConfig } from '../getReactNavigationConfig';\nimport { getRoutes, Options } from '../getRoutes';\nimport { Head } from '../head';\nimport { loadStaticParamsAsync } from '../loadStaticParamsAsync';\n\nconst debug = require('debug')('expo:router:renderStaticContent');\n\nAppRegistry.registerComponent('App', () => ExpoRoot);\n\n/** Get the linking manifest from a Node.js process. */\nasync function getManifest(options: Options = {}) {\n const routeTree = getRoutes(ctx, {\n preserveApiRoutes: true,\n platform: 'web',\n ...options,\n });\n\n if (!routeTree) {\n throw new Error('No routes found');\n }\n\n // Evaluate all static params\n await loadStaticParamsAsync(routeTree);\n\n return getReactNavigationConfig(routeTree, false);\n}\n\nfunction resetReactNavigationContexts() {\n // https://github.com/expo/router/discussions/588\n // https://github.com/react-navigation/react-navigation/blob/9fe34b445fcb86e5666f61e144007d7540f014fa/packages/elements/src/getNamedContext.tsx#LL3C1-L4C1\n\n // React Navigation is storing providers in a global, this is fine for the first static render\n // but subsequent static renders of Stack or Tabs will cause React to throw a warning. To prevent this warning, we'll reset the globals before rendering.\n const contexts = '__react_navigation__elements_contexts';\n global[contexts] = new Map<string, React.Context<any>>();\n}\n\nexport async function getStaticContent(location: URL): Promise<string> {\n const headContext: { helmet?: any } = {};\n\n const ref = React.createRef<ServerContainerRef>();\n\n const {\n // NOTE: The `element` that's returned adds two extra Views and\n // the seemingly unused `RootTagContext.Provider`.\n element,\n getStyleElement,\n } = AppRegistry.getApplication('App', {\n initialProps: {\n location,\n context: ctx,\n wrapper: ({ children }) => (\n <Root>\n <div id=\"root\">{children}</div>\n </Root>\n ),\n },\n });\n\n const Root = getRootComponent();\n\n // Clear any existing static resources from the global scope to attempt to prevent leaking between pages.\n // This could break if pages are rendered in parallel or if fonts are loaded outside of the React tree\n Font.resetServerContext();\n\n // This MUST be run before `ReactDOMServer.renderToString` to prevent\n // \"Warning: Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.\"\n resetReactNavigationContexts();\n\n const html = await ReactDOMServer.renderToString(\n <Head.Provider context={headContext}>\n <ServerContainer ref={ref}>{element}</ServerContainer>\n </Head.Provider>\n );\n\n // Eval the CSS after the HTML is rendered so that the CSS is in the same order\n const css = ReactDOMServer.renderToStaticMarkup(getStyleElement());\n\n let output = mixHeadComponentsWithStaticResults(headContext.helmet, html);\n\n output = output.replace('</head>', `${css}</head>`);\n\n const fonts = Font.getServerResources();\n debug(`Pushing static fonts: (count: ${fonts.length})`, fonts);\n // debug('Push static fonts:', fonts)\n // Inject static fonts loaded with expo-font\n output = output.replace('</head>', `${fonts.join('')}</head>`);\n\n return '<!DOCTYPE html>' + output;\n}\n\nfunction mixHeadComponentsWithStaticResults(helmet: any, html: string) {\n // Head components\n for (const key of ['title', 'priority', 'meta', 'link', 'script', 'style'].reverse()) {\n const result = helmet?.[key]?.toString();\n if (result) {\n html = html.replace('<head>', `<head>${result}`);\n }\n }\n\n // attributes\n html = html.replace('<html ', `<html ${helmet?.htmlAttributes.toString()} `);\n html = html.replace('<body ', `<body ${helmet?.bodyAttributes.toString()} `);\n\n return html;\n}\n\n// Re-export for use in server\nexport { getManifest };\nexport { getBuildTimeServerManifestAsync } from './getServerManifest';\n"]}
1
+ {"version":3,"file":"renderStaticContent.js","sourceRoot":"","sources":["../../src/static/renderStaticContent.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA;;;;;GAKG;AACH,+BAA6B;AAE7B,qDAA+E;AAC/E,6DAA+C;AAC/C,kDAA0B;AAC1B,wEAAmD;AACnD,uDAA+C;AAE/C,yDAAsD;AACtD,qCAAiC;AACjC,0CAAuC;AACvC,kCAA+B;AAE/B,MAAM,KAAK,GAAG,OAAO,CAAC,OAAO,CAAC,CAAC,iCAAiC,CAAC,CAAC;AAElE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AE,GAAG,CAAC,CAAC;IAE7E,OAAO,IAAI,CAAC;AACd,CAAC;AAED,8BAA8B;AAC9B,yDAAmF;AAA1E,oIAAA,+BAA+B,OAAA;AAAE,gHAAA,WAAW,OAAA","sourcesContent":["/**\n * Copyright © 2023 650 Industries.\n *\n * This source code is licensed under the MIT license found in the\n * LICENSE file in the root directory of this source tree.\n */\nimport '@expo/metro-runtime';\n\nimport { ServerContainer, ServerContainerRef } from '@react-navigation/native';\nimport * as Font from 'expo-font/build/server';\nimport React from 'react';\nimport ReactDOMServer from 'react-dom/server.node';\nimport { AppRegistry } from 'react-native-web';\n\nimport { getRootComponent } from './getRootComponent';\nimport { ctx } from '../../_ctx';\nimport { ExpoRoot } from '../ExpoRoot';\nimport { Head } from '../head';\n\nconst debug = require('debug')('expo:router:renderStaticContent');\n\nAppRegistry.registerComponent('App', () => ExpoRoot);\n\nfunction resetReactNavigationContexts() {\n // https://github.com/expo/router/discussions/588\n // https://github.com/react-navigation/react-navigation/blob/9fe34b445fcb86e5666f61e144007d7540f014fa/packages/elements/src/getNamedContext.tsx#LL3C1-L4C1\n\n // React Navigation is storing providers in a global, this is fine for the first static render\n // but subsequent static renders of Stack or Tabs will cause React to throw a warning. To prevent this warning, we'll reset the globals before rendering.\n const contexts = '__react_navigation__elements_contexts';\n global[contexts] = new Map<string, React.Context<any>>();\n}\n\nexport async function getStaticContent(location: URL): Promise<string> {\n const headContext: { helmet?: any } = {};\n\n const ref = React.createRef<ServerContainerRef>();\n\n const {\n // NOTE: The `element` that's returned adds two extra Views and\n // the seemingly unused `RootTagContext.Provider`.\n element,\n getStyleElement,\n } = AppRegistry.getApplication('App', {\n initialProps: {\n location,\n context: ctx,\n wrapper: ({ children }) => (\n <Root>\n <div id=\"root\">{children}</div>\n </Root>\n ),\n },\n });\n\n const Root = getRootComponent();\n\n // Clear any existing static resources from the global scope to attempt to prevent leaking between pages.\n // This could break if pages are rendered in parallel or if fonts are loaded outside of the React tree\n Font.resetServerContext();\n\n // This MUST be run before `ReactDOMServer.renderToString` to prevent\n // \"Warning: Detected multiple renderers concurrently rendering the same context provider. This is currently unsupported.\"\n resetReactNavigationContexts();\n\n const html = await ReactDOMServer.renderToString(\n <Head.Provider context={headContext}>\n <ServerContainer ref={ref}>{element}</ServerContainer>\n </Head.Provider>\n );\n\n // Eval the CSS after the HTML is rendered so that the CSS is in the same order\n const css = ReactDOMServer.renderToStaticMarkup(getStyleElement());\n\n let output = mixHeadComponentsWithStaticResults(headContext.helmet, html);\n\n output = output.replace('</head>', `${css}</head>`);\n\n const fonts = Font.getServerResources();\n debug(`Pushing static fonts: (count: ${fonts.length})`, fonts);\n // debug('Push static fonts:', fonts)\n // Inject static fonts loaded with expo-font\n output = output.replace('</head>', `${fonts.join('')}</head>`);\n\n return '<!DOCTYPE html>' + output;\n}\n\nfunction mixHeadComponentsWithStaticResults(helmet: any, html: string) {\n // Head components\n for (const key of ['title', 'priority', 'meta', 'link', 'script', 'style'].reverse()) {\n const result = helmet?.[key]?.toString();\n if (result) {\n html = html.replace('<head>', `<head>${result}`);\n }\n }\n\n // attributes\n html = html.replace('<html ', `<html ${helmet?.htmlAttributes.toString()} `);\n html = html.replace('<body ', `<body ${helmet?.bodyAttributes.toString()} `);\n\n return html;\n}\n\n// Re-export for use in server\nexport { getBuildTimeServerManifestAsync, getManifest } from './getServerManifest';\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/views/ErrorBoundary.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AA6E3C,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,kBAAkB,+BA+CjE"}
1
+ {"version":3,"file":"ErrorBoundary.d.ts","sourceRoot":"","sources":["../../src/views/ErrorBoundary.tsx"],"names":[],"mappings":";AAQA,OAAO,EAAE,kBAAkB,EAAE,MAAM,OAAO,CAAC;AAgG3C,wBAAgB,aAAa,CAAC,EAAE,KAAK,EAAE,KAAK,EAAE,EAAE,kBAAkB,+BA6CjE"}
@@ -8,6 +8,7 @@ const react_native_1 = require("react-native");
8
8
  const react_native_safe_area_context_1 = require("react-native-safe-area-context");
9
9
  const Pressable_1 = require("./Pressable");
10
10
  const Link_1 = require("../link/Link");
11
+ const errors_1 = require("../rsc/router/errors");
11
12
  let useMetroSymbolication;
12
13
  if (process.env.NODE_ENV === 'development') {
13
14
  const { LogBoxLog, parseErrorStack } = require('@expo/metro-runtime/symbolicate');
@@ -68,30 +69,39 @@ else {
68
69
  return <react_native_1.View style={{ flex: 1 }}/>;
69
70
  };
70
71
  }
72
+ function StandardErrorView({ error }) {
73
+ return (<react_native_1.View style={{
74
+ marginBottom: 12,
75
+ gap: 4,
76
+ flexWrap: process.env.EXPO_OS === 'web' ? 'wrap' : 'nowrap',
77
+ }}>
78
+ <react_native_1.Text role="heading" aria-level={1} style={styles.title}>
79
+ Something went wrong
80
+ </react_native_1.Text>
81
+ <react_native_1.Text testID="router_error_message" role="heading" aria-level={2} style={styles.errorMessage}>
82
+ Error: {error.message}
83
+ </react_native_1.Text>
84
+ </react_native_1.View>);
85
+ }
71
86
  function ErrorBoundary({ error, retry }) {
72
87
  const logBoxLog = useMetroSymbolication(error);
73
88
  const inTabBar = (0, react_1.useContext)(bottom_tabs_1.BottomTabBarHeightContext);
74
89
  const Wrapper = inTabBar ? react_native_1.View : react_native_safe_area_context_1.SafeAreaView;
90
+ const isServerError = error instanceof errors_1.ReactServerError;
75
91
  return (<react_native_1.View style={styles.container}>
76
92
  <Wrapper style={{ flex: 1, gap: 8, maxWidth: 720, marginHorizontal: 'auto' }}>
77
- <react_native_1.View style={{
78
- marginBottom: 12,
79
- gap: 4,
80
- flexWrap: process.env.EXPO_OS === 'web' ? 'wrap' : 'nowrap',
81
- }}>
82
- <react_native_1.Text role="heading" aria-level={1} style={styles.title}>
83
- Something went wrong
84
- </react_native_1.Text>
85
- <react_native_1.Text role="heading" aria-level={2} style={styles.errorMessage}>
86
- Error: {error.message}
87
- </react_native_1.Text>
88
- </react_native_1.View>
93
+ {isServerError ? (<>
94
+ <ReactServerErrorView error={error}/>
95
+ <react_native_1.View style={{ flex: 1 }}/>
96
+ </>) : (<>
97
+ <StandardErrorView error={error}/>
98
+ <StackTrace logData={logBoxLog}/>
99
+ </>)}
89
100
 
90
- <StackTrace logData={logBoxLog}/>
91
- {process.env.NODE_ENV === 'development' && (<Link_1.Link href="/_sitemap" style={styles.link}>
101
+ {process.env.NODE_ENV === 'development' && (<Link_1.Link testID="router_error_sitemap" href="/_sitemap" style={styles.link}>
92
102
  Sitemap
93
103
  </Link_1.Link>)}
94
- <Pressable_1.Pressable onPress={retry}>
104
+ <Pressable_1.Pressable testID="router_error_retry" onPress={retry}>
95
105
  {({ hovered, pressed }) => (<react_native_1.View style={[styles.buttonInner, (hovered || pressed) && { backgroundColor: 'white' }]}>
96
106
  <react_native_1.Text style={[
97
107
  styles.buttonText,
@@ -107,6 +117,74 @@ function ErrorBoundary({ error, retry }) {
107
117
  </react_native_1.View>);
108
118
  }
109
119
  exports.ErrorBoundary = ErrorBoundary;
120
+ const COMMON_ERROR_STATUS = {
121
+ 404: 'NOT_FOUND',
122
+ 500: 'INTERNAL_SERVER_ERROR',
123
+ 503: 'SERVICE_UNAVAILABLE',
124
+ 504: 'GATEWAY_TIMEOUT',
125
+ };
126
+ // TODO: This should probably be replaced by a DOM component that loads server errors in the future.
127
+ function ReactServerErrorView({ error }) {
128
+ let title = String(error.statusCode);
129
+ title += ': ' + (COMMON_ERROR_STATUS[error.statusCode] ?? 'Server Error');
130
+ const errorId = error.headers.get('cf-ray');
131
+ const date = error.headers.get('Date');
132
+ return (<react_native_1.View style={{
133
+ padding: 12,
134
+ gap: 8,
135
+ }}>
136
+ <react_native_1.Text selectable allowFontScaling style={{
137
+ fontSize: react_native_1.Platform.select({ web: 24, default: 16 }),
138
+ fontWeight: 'bold',
139
+ marginBottom: 4,
140
+ color: 'white',
141
+ }}>
142
+ {title}
143
+ </react_native_1.Text>
144
+
145
+ {process.env.EXPO_OS === 'web' ? (<react_native_1.ScrollView style={{
146
+ borderColor: 'rgba(255,255,255,0.5)',
147
+ borderTopWidth: react_native_1.StyleSheet.hairlineWidth,
148
+ borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
149
+ maxHeight: 150,
150
+ }} contentContainerStyle={{ paddingVertical: 4 }}>
151
+ <react_native_1.Text testID="router_error_message" selectable allowFontScaling style={{
152
+ color: 'white',
153
+ }}>
154
+ {error.message}
155
+ </react_native_1.Text>
156
+ </react_native_1.ScrollView>) : (<react_native_1.TextInput testID="router_error_message" scrollEnabled multiline editable={false} allowFontScaling value={error.message} style={{
157
+ borderColor: 'rgba(255,255,255,0.5)',
158
+ borderTopWidth: react_native_1.StyleSheet.hairlineWidth,
159
+ borderBottomWidth: react_native_1.StyleSheet.hairlineWidth,
160
+ paddingVertical: 4,
161
+ maxHeight: 150,
162
+ color: 'white',
163
+ }}/>)}
164
+
165
+ <InfoRow title="Code" right={error.statusCode}/>
166
+ {errorId && <InfoRow title="ID" right={errorId}/>}
167
+ {date && <InfoRow title="Date" right={date}/>}
168
+
169
+ {error.url && (<react_native_1.Text selectable allowFontScaling style={{ fontSize: 14, opacity: 0.5, color: 'white' }}>
170
+ {error.url}
171
+ </react_native_1.Text>)}
172
+ </react_native_1.View>);
173
+ }
174
+ function InfoRow({ title, right }) {
175
+ const style = {
176
+ fontSize: 16,
177
+ color: 'white',
178
+ };
179
+ return (<react_native_1.View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>
180
+ <react_native_1.Text selectable allowFontScaling style={style}>
181
+ {title}
182
+ </react_native_1.Text>
183
+ {right && (<react_native_1.Text selectable allowFontScaling style={[style, styles.code]}>
184
+ {right}
185
+ </react_native_1.Text>)}
186
+ </react_native_1.View>);
187
+ }
110
188
  const styles = react_native_1.StyleSheet.create({
111
189
  container: {
112
190
  flex: 1,
@@ -1 +1 @@
1
- {"version":3,"file":"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ACnB,iBAAiB,EAAE,EAAE;QACrB,WAAW,EAAE,OAAO;QACpB,WAAW,EAAE,CAAC;QACd,UAAU,EAAE,CAAC;QACb,cAAc,EAAE,QAAQ;QACxB,UAAU,EAAE,QAAQ;KACrB;IACD,IAAI,EAAE;QACJ,UAAU,EAAE,uBAAQ,CAAC,MAAM,CAAC;YAC1B,OAAO,EAAE,SAAS;YAClB,GAAG,EAAE,aAAa;YAClB,OAAO,EAAE,WAAW;SACrB,CAAC;QACF,UAAU,EAAE,KAAK;KAClB;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,EAAE;KACb;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,EAAE;QACZ,YAAY,EAAE,EAAE;KACjB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,uBAAuB;QAC9B,mBAAmB,EAAE,OAAO;QAC5B,kBAAkB,EAAE,WAAW;QAC/B,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC","sourcesContent":["'use client';\nimport type { LogBoxLog } from '@expo/metro-runtime/symbolicate';\nimport { BottomTabBarHeightContext } from '@react-navigation/bottom-tabs';\nimport { ComponentType, useContext, useEffect, useState } from 'react';\nimport { StyleSheet, Text, View, Platform, ScrollView } from 'react-native';\nimport { SafeAreaView } from 'react-native-safe-area-context';\n\nimport { Pressable } from './Pressable';\nimport { ErrorBoundaryProps } from './Try';\nimport { Link } from '../link/Link';\n\nlet useMetroSymbolication: (error: Error) => LogBoxLog | null;\n\nif (process.env.NODE_ENV === 'development') {\n const { LogBoxLog, parseErrorStack } =\n require('@expo/metro-runtime/symbolicate') as typeof import('@expo/metro-runtime/symbolicate');\n useMetroSymbolication = function (error: Error) {\n const [logBoxLog, setLogBoxLog] = useState<LogBoxLog | null>(null);\n\n useEffect(() => {\n let isMounted = true;\n const stack = parseErrorStack(error.stack);\n\n const log = new LogBoxLog({\n level: 'error',\n message: {\n content: error.message,\n substitutions: [],\n },\n isComponentError: false,\n stack,\n category: error.message,\n componentStack: [],\n });\n\n log.symbolicate('stack', () => {\n if (isMounted) {\n setLogBoxLog(log);\n }\n });\n\n return () => {\n isMounted = false;\n };\n }, [error]);\n\n return logBoxLog;\n };\n} else {\n useMetroSymbolication = function () {\n return null;\n };\n}\n\nlet StackTrace: ComponentType<{ logData: LogBoxLog | null }>;\n\nif (process.env.NODE_ENV === 'development') {\n const { LogContext } = require('@expo/metro-runtime/src/error-overlay/Data/LogContext');\n const {\n LogBoxInspectorStackFrames,\n } = require('@expo/metro-runtime/src/error-overlay/overlay/LogBoxInspectorStackFrames');\n\n StackTrace = function ({ logData }: { logData: LogBoxLog | null }) {\n if (!logData?.symbolicated?.stack?.stack) {\n return null;\n }\n return (\n <ScrollView style={{ flex: 1 }}>\n <LogContext.Provider\n value={{\n isDisabled: false,\n logs: [logData],\n selectedLogIndex: 0,\n }}>\n <LogBoxInspectorStackFrames onRetry={function () {}} type=\"stack\" />\n </LogContext.Provider>\n </ScrollView>\n );\n };\n} else {\n StackTrace = function () {\n return <View style={{ flex: 1 }} />;\n };\n}\n\nexport function ErrorBoundary({ error, retry }: ErrorBoundaryProps) {\n const logBoxLog = useMetroSymbolication(error);\n const inTabBar = useContext(BottomTabBarHeightContext);\n const Wrapper = inTabBar ? View : SafeAreaView;\n\n return (\n <View style={styles.container}>\n <Wrapper style={{ flex: 1, gap: 8, maxWidth: 720, marginHorizontal: 'auto' }}>\n <View\n style={{\n marginBottom: 12,\n gap: 4,\n flexWrap: process.env.EXPO_OS === 'web' ? 'wrap' : 'nowrap',\n }}>\n <Text role=\"heading\" aria-level={1} style={styles.title}>\n Something went wrong\n </Text>\n <Text role=\"heading\" aria-level={2} style={styles.errorMessage}>\n Error: {error.message}\n </Text>\n </View>\n\n <StackTrace logData={logBoxLog} />\n {process.env.NODE_ENV === 'development' && (\n <Link href=\"/_sitemap\" style={styles.link}>\n Sitemap\n </Link>\n )}\n <Pressable onPress={retry}>\n {({ hovered, pressed }) => (\n <View\n style={[styles.buttonInner, (hovered || pressed) && { backgroundColor: 'white' }]}>\n <Text\n style={[\n styles.buttonText,\n {\n color: hovered || pressed ? 'black' : 'white',\n },\n ]}>\n Retry\n </Text>\n </View>\n )}\n </Pressable>\n </Wrapper>\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: 'black',\n padding: 24,\n alignItems: 'stretch',\n justifyContent: 'center',\n },\n title: {\n color: 'white',\n fontSize: Platform.select({ web: 32, default: 24 }),\n fontWeight: 'bold',\n },\n buttonText: {\n fontSize: 18,\n fontWeight: 'bold',\n color: 'black',\n ...Platform.select({\n web: {\n transitionDuration: '100ms',\n },\n }),\n },\n buttonInner: {\n ...Platform.select({\n web: {\n transitionDuration: '100ms',\n },\n }),\n paddingVertical: 12,\n paddingHorizontal: 24,\n borderColor: 'white',\n borderWidth: 2,\n marginLeft: 8,\n justifyContent: 'center',\n alignItems: 'center',\n },\n code: {\n fontFamily: Platform.select({\n default: 'Courier',\n ios: 'Courier New',\n android: 'monospace',\n }),\n fontWeight: '500',\n },\n errorMessage: {\n color: 'white',\n fontSize: 16,\n },\n subtitle: {\n color: 'white',\n fontSize: 14,\n marginBottom: 12,\n },\n link: {\n color: 'rgba(255,255,255,0.4)',\n textDecorationStyle: 'solid',\n textDecorationLine: 'underline',\n fontSize: 14,\n textAlign: 'center',\n },\n});\n"]}
1
+ {"version":3,"file":"ErrorBoundary.js","sourceRoot":"","sources":["../../src/views/ErrorBoundary.tsx"],"names":[],"mappings":"AAAA,YAAY,CAAC;;;;AAEb,+DAA0E;AAC1E,iCAAuE;AACvE,+CAAuF;AACvF,mFAA8D;AAE9D,2CAAwC;AAExC,uCAAoC;AACpC,iDAAwD;AAExD,IAAI,qBAAyD,CAAC;AAE9D,IAAI,OAAO,CAAC,GAAG,CAAC,QAAQ,KAAK,aAAa,EAAE;IAC1C,MAAM,EAAE,SAAS,EAAE,eAAe,EA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OAAO,EAAE,WAAW;SACrB,CAAC;QACF,UAAU,EAAE,KAAK;KAClB;IACD,YAAY,EAAE;QACZ,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,EAAE;KACb;IACD,QAAQ,EAAE;QACR,KAAK,EAAE,OAAO;QACd,QAAQ,EAAE,EAAE;QACZ,YAAY,EAAE,EAAE;KACjB;IACD,IAAI,EAAE;QACJ,KAAK,EAAE,uBAAuB;QAC9B,mBAAmB,EAAE,OAAO;QAC5B,kBAAkB,EAAE,WAAW;QAC/B,QAAQ,EAAE,EAAE;QACZ,SAAS,EAAE,QAAQ;KACpB;CACF,CAAC,CAAC","sourcesContent":["'use client';\nimport type { LogBoxLog } from '@expo/metro-runtime/symbolicate';\nimport { BottomTabBarHeightContext } from '@react-navigation/bottom-tabs';\nimport { ComponentType, useContext, useEffect, useState } from 'react';\nimport { StyleSheet, Text, View, Platform, ScrollView, TextInput } from 'react-native';\nimport { SafeAreaView } from 'react-native-safe-area-context';\n\nimport { Pressable } from './Pressable';\nimport { ErrorBoundaryProps } from './Try';\nimport { Link } from '../link/Link';\nimport { ReactServerError } from '../rsc/router/errors';\n\nlet useMetroSymbolication: (error: Error) => LogBoxLog | null;\n\nif (process.env.NODE_ENV === 'development') {\n const { LogBoxLog, parseErrorStack } =\n require('@expo/metro-runtime/symbolicate') as typeof import('@expo/metro-runtime/symbolicate');\n useMetroSymbolication = function (error: Error) {\n const [logBoxLog, setLogBoxLog] = useState<LogBoxLog | null>(null);\n\n useEffect(() => {\n let isMounted = true;\n const stack = parseErrorStack(error.stack);\n\n const log = new LogBoxLog({\n level: 'error',\n message: {\n content: error.message,\n substitutions: [],\n },\n isComponentError: false,\n stack,\n category: error.message,\n componentStack: [],\n });\n\n log.symbolicate('stack', () => {\n if (isMounted) {\n setLogBoxLog(log);\n }\n });\n\n return () => {\n isMounted = false;\n };\n }, [error]);\n\n return logBoxLog;\n };\n} else {\n useMetroSymbolication = function () {\n return null;\n };\n}\n\nlet StackTrace: ComponentType<{ logData: LogBoxLog | null }>;\n\nif (process.env.NODE_ENV === 'development') {\n const { LogContext } = require('@expo/metro-runtime/src/error-overlay/Data/LogContext');\n const {\n LogBoxInspectorStackFrames,\n } = require('@expo/metro-runtime/src/error-overlay/overlay/LogBoxInspectorStackFrames');\n\n StackTrace = function ({ logData }: { logData: LogBoxLog | null }) {\n if (!logData?.symbolicated?.stack?.stack) {\n return null;\n }\n return (\n <ScrollView style={{ flex: 1 }}>\n <LogContext.Provider\n value={{\n isDisabled: false,\n logs: [logData],\n selectedLogIndex: 0,\n }}>\n <LogBoxInspectorStackFrames onRetry={function () {}} type=\"stack\" />\n </LogContext.Provider>\n </ScrollView>\n );\n };\n} else {\n StackTrace = function () {\n return <View style={{ flex: 1 }} />;\n };\n}\n\nfunction StandardErrorView({ error }: { error: Error }) {\n return (\n <View\n style={{\n marginBottom: 12,\n gap: 4,\n flexWrap: process.env.EXPO_OS === 'web' ? 'wrap' : 'nowrap',\n }}>\n <Text role=\"heading\" aria-level={1} style={styles.title}>\n Something went wrong\n </Text>\n <Text testID=\"router_error_message\" role=\"heading\" aria-level={2} style={styles.errorMessage}>\n Error: {error.message}\n </Text>\n </View>\n );\n}\n\nexport function ErrorBoundary({ error, retry }: ErrorBoundaryProps) {\n const logBoxLog = useMetroSymbolication(error);\n const inTabBar = useContext(BottomTabBarHeightContext);\n const Wrapper = inTabBar ? View : SafeAreaView;\n\n const isServerError = error instanceof ReactServerError;\n return (\n <View style={styles.container}>\n <Wrapper style={{ flex: 1, gap: 8, maxWidth: 720, marginHorizontal: 'auto' }}>\n {isServerError ? (\n <>\n <ReactServerErrorView error={error} />\n <View style={{ flex: 1 }} />\n </>\n ) : (\n <>\n <StandardErrorView error={error} />\n <StackTrace logData={logBoxLog} />\n </>\n )}\n\n {process.env.NODE_ENV === 'development' && (\n <Link testID=\"router_error_sitemap\" href=\"/_sitemap\" style={styles.link}>\n Sitemap\n </Link>\n )}\n <Pressable testID=\"router_error_retry\" onPress={retry}>\n {({ hovered, pressed }) => (\n <View\n style={[styles.buttonInner, (hovered || pressed) && { backgroundColor: 'white' }]}>\n <Text\n style={[\n styles.buttonText,\n {\n color: hovered || pressed ? 'black' : 'white',\n },\n ]}>\n Retry\n </Text>\n </View>\n )}\n </Pressable>\n </Wrapper>\n </View>\n );\n}\n\nconst COMMON_ERROR_STATUS = {\n 404: 'NOT_FOUND',\n 500: 'INTERNAL_SERVER_ERROR',\n 503: 'SERVICE_UNAVAILABLE',\n 504: 'GATEWAY_TIMEOUT',\n};\n\n// TODO: This should probably be replaced by a DOM component that loads server errors in the future.\nfunction ReactServerErrorView({ error }: { error: ReactServerError }) {\n let title = String(error.statusCode);\n title += ': ' + (COMMON_ERROR_STATUS[error.statusCode] ?? 'Server Error');\n\n const errorId = error.headers.get('cf-ray');\n\n const date = error.headers.get('Date');\n\n return (\n <View\n style={{\n padding: 12,\n gap: 8,\n }}>\n <Text\n selectable\n allowFontScaling\n style={{\n fontSize: Platform.select({ web: 24, default: 16 }),\n fontWeight: 'bold',\n marginBottom: 4,\n color: 'white',\n }}>\n {title}\n </Text>\n\n {process.env.EXPO_OS === 'web' ? (\n <ScrollView\n style={{\n borderColor: 'rgba(255,255,255,0.5)',\n borderTopWidth: StyleSheet.hairlineWidth,\n borderBottomWidth: StyleSheet.hairlineWidth,\n maxHeight: 150,\n }}\n contentContainerStyle={{ paddingVertical: 4 }}>\n <Text\n testID=\"router_error_message\"\n selectable\n allowFontScaling\n style={{\n color: 'white',\n }}>\n {error.message}\n </Text>\n </ScrollView>\n ) : (\n <TextInput\n testID=\"router_error_message\"\n scrollEnabled\n multiline\n editable={false}\n allowFontScaling\n value={error.message}\n style={{\n borderColor: 'rgba(255,255,255,0.5)',\n borderTopWidth: StyleSheet.hairlineWidth,\n borderBottomWidth: StyleSheet.hairlineWidth,\n paddingVertical: 4,\n maxHeight: 150,\n color: 'white',\n }}\n />\n )}\n\n <InfoRow title=\"Code\" right={error.statusCode} />\n {errorId && <InfoRow title=\"ID\" right={errorId} />}\n {date && <InfoRow title=\"Date\" right={date} />}\n\n {error.url && (\n <Text selectable allowFontScaling style={{ fontSize: 14, opacity: 0.5, color: 'white' }}>\n {error.url}\n </Text>\n )}\n </View>\n );\n}\n\nfunction InfoRow({ title, right }: { title: string; right?: any }) {\n const style = {\n fontSize: 16,\n color: 'white',\n };\n\n return (\n <View style={{ flexDirection: 'row', justifyContent: 'space-between' }}>\n <Text selectable allowFontScaling style={style}>\n {title}\n </Text>\n {right && (\n <Text selectable allowFontScaling style={[style, styles.code]}>\n {right}\n </Text>\n )}\n </View>\n );\n}\n\nconst styles = StyleSheet.create({\n container: {\n flex: 1,\n backgroundColor: 'black',\n padding: 24,\n alignItems: 'stretch',\n justifyContent: 'center',\n },\n title: {\n color: 'white',\n fontSize: Platform.select({ web: 32, default: 24 }),\n fontWeight: 'bold',\n },\n buttonText: {\n fontSize: 18,\n fontWeight: 'bold',\n color: 'black',\n ...Platform.select({\n web: {\n transitionDuration: '100ms',\n },\n }),\n },\n buttonInner: {\n ...Platform.select({\n web: {\n transitionDuration: '100ms',\n },\n }),\n paddingVertical: 12,\n paddingHorizontal: 24,\n borderColor: 'white',\n borderWidth: 2,\n marginLeft: 8,\n justifyContent: 'center',\n alignItems: 'center',\n },\n code: {\n fontFamily: Platform.select({\n default: 'Courier',\n ios: 'Courier New',\n android: 'monospace',\n }),\n fontWeight: '500',\n },\n errorMessage: {\n color: 'white',\n fontSize: 16,\n },\n subtitle: {\n color: 'white',\n fontSize: 14,\n marginBottom: 12,\n },\n link: {\n color: 'rgba(255,255,255,0.4)',\n textDecorationStyle: 'solid',\n textDecorationLine: 'underline',\n fontSize: 14,\n textAlign: 'center',\n },\n});\n"]}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-router",
3
- "version": "4.0.15",
3
+ "version": "4.0.17",
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",
@@ -103,8 +103,8 @@
103
103
  "tsd": "^0.28.1"
104
104
  },
105
105
  "dependencies": {
106
- "@expo/metro-runtime": "4.0.0",
107
- "@expo/server": "^0.5.0",
106
+ "@expo/metro-runtime": "4.0.1",
107
+ "@expo/server": "^0.5.1",
108
108
  "@radix-ui/react-slot": "1.0.1",
109
109
  "@react-navigation/bottom-tabs": "^7.2.0",
110
110
  "@react-navigation/native": "^7.0.14",
@@ -117,5 +117,5 @@
117
117
  "semver": "~7.6.3",
118
118
  "server-only": "^0.0.1"
119
119
  },
120
- "gitHead": "77c3568235759947ec590f532074fa7b8399134c"
120
+ "gitHead": "0a0c6d35a691fc59c0d94675d159ac9e3dfd6f26"
121
121
  }