expo-router 4.0.0-preview.11 → 4.0.0-preview.13
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/build/ExpoRoot.js +2 -2
- package/build/ExpoRoot.js.map +1 -1
- package/build/exports.d.ts +1 -1
- package/build/exports.d.ts.map +1 -1
- package/build/exports.js +24 -2
- package/build/exports.js.map +1 -1
- package/build/fast-refresh.d.ts.map +1 -1
- package/build/fast-refresh.js.map +1 -1
- package/build/getRoutesCore.d.ts +1 -0
- package/build/getRoutesCore.d.ts.map +1 -1
- package/build/getRoutesCore.js +3 -1
- package/build/getRoutesCore.js.map +1 -1
- package/build/global-state/router-store.d.ts.map +1 -1
- package/build/global-state/router-store.js +1 -2
- package/build/global-state/router-store.js.map +1 -1
- package/build/head/url.d.ts +1 -0
- package/build/head/url.d.ts.map +1 -1
- package/build/head/url.js +21 -4
- package/build/head/url.js.map +1 -1
- package/build/hooks.d.ts +90 -38
- package/build/hooks.d.ts.map +1 -1
- package/build/hooks.js +46 -39
- package/build/hooks.js.map +1 -1
- package/build/imperative-api.d.ts +58 -15
- package/build/imperative-api.d.ts.map +1 -1
- package/build/imperative-api.js.map +1 -1
- package/build/layouts/Drawer.d.ts +2 -142
- package/build/layouts/Drawer.d.ts.map +1 -1
- package/build/layouts/Drawer.js +8 -5
- package/build/layouts/Drawer.js.map +1 -1
- package/build/layouts/DrawerClient.d.ts +144 -0
- package/build/layouts/DrawerClient.d.ts.map +1 -0
- package/build/layouts/DrawerClient.js +10 -0
- package/build/layouts/DrawerClient.js.map +1 -0
- package/build/layouts/Stack.d.ts +2 -126
- package/build/layouts/Stack.d.ts.map +1 -1
- package/build/layouts/Stack.js +8 -6
- package/build/layouts/Stack.js.map +1 -1
- package/build/layouts/StackClient.d.ts +128 -0
- package/build/layouts/StackClient.d.ts.map +1 -0
- package/build/layouts/StackClient.js +10 -0
- package/build/layouts/StackClient.js.map +1 -0
- package/build/layouts/Tabs.d.ts +2 -134
- package/build/layouts/Tabs.d.ts.map +1 -1
- package/build/layouts/Tabs.js +5 -37
- package/build/layouts/Tabs.js.map +1 -1
- package/build/layouts/TabsClient.d.ts +136 -0
- package/build/layouts/TabsClient.d.ts.map +1 -0
- package/build/layouts/TabsClient.js +44 -0
- package/build/layouts/TabsClient.js.map +1 -0
- package/build/layouts/withLayoutContext.d.ts +4 -1
- package/build/layouts/withLayoutContext.d.ts.map +1 -1
- package/build/layouts/withLayoutContext.js +4 -1
- package/build/layouts/withLayoutContext.js.map +1 -1
- package/build/link/Link.d.ts +48 -4
- package/build/link/Link.d.ts.map +1 -1
- package/build/link/Link.js +47 -3
- package/build/link/Link.js.map +1 -1
- package/build/link/href.d.ts +1 -1
- package/build/link/href.d.ts.map +1 -1
- package/build/link/href.js.map +1 -1
- package/build/link/useLinkHooks.d.ts +122 -29
- package/build/link/useLinkHooks.d.ts.map +1 -1
- package/build/link/useLinkHooks.js.map +1 -1
- package/build/renderRootComponent.d.ts.map +1 -1
- package/build/renderRootComponent.js +1 -2
- package/build/renderRootComponent.js.map +1 -1
- package/build/rsc/exports.d.ts +3 -1
- package/build/rsc/exports.d.ts.map +1 -1
- package/build/rsc/exports.js +3 -1
- package/build/rsc/exports.js.map +1 -1
- package/build/rsc/middleware.d.ts +1 -1
- package/build/rsc/middleware.d.ts.map +1 -1
- package/build/rsc/middleware.js +2 -1
- package/build/rsc/middleware.js.map +1 -1
- package/build/rsc/router/client.d.ts +2 -2
- package/build/rsc/router/client.d.ts.map +1 -1
- package/build/rsc/router/client.js.map +1 -1
- package/build/rsc/router/host.d.ts.map +1 -1
- package/build/rsc/router/host.js +20 -15
- package/build/rsc/router/host.js.map +1 -1
- package/build/rsc/rsc-renderer.d.ts +1 -1
- package/build/rsc/rsc-renderer.d.ts.map +1 -1
- package/build/rsc/rsc-renderer.js +1 -1
- package/build/rsc/rsc-renderer.js.map +1 -1
- package/build/rsc/server.d.ts +3 -0
- package/build/rsc/server.d.ts.map +1 -1
- package/build/rsc/server.js +19 -1
- package/build/rsc/server.js.map +1 -1
- package/build/testing-library/context-stubs.d.ts.map +1 -1
- package/build/testing-library/context-stubs.js +3 -1
- package/build/testing-library/context-stubs.js.map +1 -1
- package/build/testing-library/mocks.js +14 -13
- package/build/testing-library/mocks.js.map +1 -1
- package/build/typed-routes/generate.d.ts +5 -1
- package/build/typed-routes/generate.d.ts.map +1 -1
- package/build/typed-routes/generate.js +129 -64
- package/build/typed-routes/generate.js.map +1 -1
- package/build/typed-routes/index.d.ts +5 -0
- package/build/typed-routes/index.d.ts.map +1 -1
- package/build/typed-routes/index.js +8 -3
- package/build/typed-routes/index.js.map +1 -1
- package/build/typed-routes/testSetup.d.ts +1 -1
- package/build/typed-routes/testSetup.d.ts.map +1 -1
- package/build/typed-routes/testSetup.js +29 -17
- package/build/typed-routes/testSetup.js.map +1 -1
- package/build/typed-routes/types.d.ts +43 -145
- package/build/typed-routes/types.d.ts.map +1 -1
- package/build/typed-routes/types.js.map +1 -1
- package/build/types.d.ts +33 -0
- package/build/types.d.ts.map +1 -1
- package/build/types.js.map +1 -1
- package/build/ui/TabContext.d.ts +158 -1
- package/build/ui/TabContext.d.ts.map +1 -1
- package/build/ui/TabContext.js +25 -1
- package/build/ui/TabContext.js.map +1 -1
- package/build/ui/TabList.d.ts +17 -1
- package/build/ui/TabList.d.ts.map +1 -1
- package/build/ui/TabList.js +16 -0
- package/build/ui/TabList.js.map +1 -1
- package/build/ui/TabSlot.d.ts +55 -5
- package/build/ui/TabSlot.d.ts.map +1 -1
- package/build/ui/TabSlot.js +38 -14
- package/build/ui/TabSlot.js.map +1 -1
- package/build/ui/TabTrigger.d.ts +65 -70
- package/build/ui/TabTrigger.d.ts.map +1 -1
- package/build/ui/TabTrigger.js +25 -1
- package/build/ui/TabTrigger.js.map +1 -1
- package/build/ui/Tabs.d.ts +89 -132
- package/build/ui/Tabs.d.ts.map +1 -1
- package/build/ui/Tabs.js +53 -8
- package/build/ui/Tabs.js.map +1 -1
- package/build/ui/common.d.ts +3 -3
- package/build/ui/common.d.ts.map +1 -1
- package/build/ui/common.js.map +1 -1
- package/build/useFocusEffect.d.ts +15 -6
- package/build/useFocusEffect.d.ts.map +1 -1
- package/build/useFocusEffect.js +15 -6
- package/build/useFocusEffect.js.map +1 -1
- package/build/useNavigation.d.ts +11 -5
- package/build/useNavigation.d.ts.map +1 -1
- package/build/useNavigation.js +11 -5
- package/build/useNavigation.js.map +1 -1
- package/build/utils/splash.d.ts +6 -0
- package/build/utils/splash.d.ts.map +1 -0
- package/build/utils/splash.js +51 -0
- package/build/utils/splash.js.map +1 -0
- package/build/views/Navigator.d.ts +6 -5
- package/build/views/Navigator.d.ts.map +1 -1
- package/build/views/Navigator.js +6 -5
- package/build/views/Navigator.js.map +1 -1
- package/build/views/Splash.d.ts +1 -1
- package/build/views/Splash.d.ts.map +1 -1
- package/build/views/Splash.js +3 -13
- package/build/views/Splash.js.map +1 -1
- package/build/views/Try.d.ts +1 -1
- package/build/views/Try.d.ts.map +1 -1
- package/build/views/Try.js +1 -1
- package/build/views/Try.js.map +1 -1
- package/entry-classic.js +0 -6
- package/package.json +3 -5
- package/plugin/build/index.d.ts +2 -0
- package/plugin/options.json +74 -73
- package/rsc/entry.js +0 -6
- package/rsc/headers.d.ts +3 -0
- package/rsc/headers.js +5 -0
- package/build/rsc/runtime.d.ts +0 -9
- package/build/rsc/runtime.d.ts.map +0 -1
- package/build/rsc/runtime.js +0 -36
- package/build/rsc/runtime.js.map +0 -1
- package/virtual-client-boundaries.js +0 -1
package/plugin/options.json
CHANGED
|
@@ -1,81 +1,82 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
"development",
|
|
13
|
-
"production"
|
|
14
|
-
]
|
|
15
|
-
},
|
|
16
|
-
{
|
|
17
|
-
"type": "boolean"
|
|
18
|
-
}
|
|
19
|
-
]
|
|
2
|
+
"title": "expo-router config plugin options",
|
|
3
|
+
"$schema": "http://json-schema.org/draft-07/schema#",
|
|
4
|
+
"$ref": "#/definitions/Props",
|
|
5
|
+
"definitions": {
|
|
6
|
+
"AsyncRouteOption": {
|
|
7
|
+
"description": "Should Async Routes be enabled. `production` is currently web-only and will be disabled on native.",
|
|
8
|
+
"oneOf": [
|
|
9
|
+
{
|
|
10
|
+
"type": "string",
|
|
11
|
+
"enum": ["development", "production"]
|
|
20
12
|
},
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
13
|
+
{
|
|
14
|
+
"type": "boolean"
|
|
15
|
+
}
|
|
16
|
+
]
|
|
17
|
+
},
|
|
18
|
+
"Props": {
|
|
19
|
+
"type": "object",
|
|
20
|
+
"properties": {
|
|
21
|
+
"origin": {
|
|
22
|
+
"description": "Production origin URL where assets in the public folder are hosted. The fetch function is polyfilled to support relative requests from this origin in production, development origin is inferred using the Expo CLI development server.",
|
|
23
|
+
"oneOf": [
|
|
24
|
+
{
|
|
25
|
+
"type": "string"
|
|
26
|
+
},
|
|
27
|
+
{
|
|
28
|
+
"type": "boolean"
|
|
29
|
+
}
|
|
30
|
+
]
|
|
31
|
+
},
|
|
32
|
+
"headOrigin": {
|
|
33
|
+
"description": "A more specific origin URL used in the `expo-router/head` module for iOS handoff. Defaults to `origin`.",
|
|
34
|
+
"type": "string"
|
|
35
|
+
},
|
|
36
|
+
"root": {
|
|
37
|
+
"description": "Changes the routes directory from `app` to another value. Defaults to `app`. Avoid using this property.",
|
|
38
|
+
"type": "string"
|
|
39
|
+
},
|
|
40
|
+
"platformRoutes": {
|
|
41
|
+
"description": "Enable or disable platform-specific routes. Defaults to `true`.",
|
|
42
|
+
"type": "boolean"
|
|
43
|
+
},
|
|
44
|
+
"sitemap": {
|
|
45
|
+
"description": "Enable or disable automatically generated routes. Defaults to `true`.",
|
|
46
|
+
"type": "boolean"
|
|
47
|
+
},
|
|
48
|
+
"asyncRoutes": {
|
|
49
|
+
"description": "Should Async Routes be enabled. `production` is currently web-only and will be disabled on native.",
|
|
50
|
+
"oneOf": [
|
|
51
|
+
{
|
|
52
|
+
"$ref": "#/definitions/AsyncRouteOption"
|
|
53
|
+
},
|
|
54
|
+
{
|
|
55
|
+
"type": "object",
|
|
56
|
+
"properties": {
|
|
57
|
+
"ios": {
|
|
58
|
+
"$ref": "#/definitions/AsyncRouteOption"
|
|
42
59
|
},
|
|
43
|
-
"
|
|
44
|
-
|
|
45
|
-
"type": "boolean"
|
|
60
|
+
"android": {
|
|
61
|
+
"$ref": "#/definitions/AsyncRouteOption"
|
|
46
62
|
},
|
|
47
|
-
"
|
|
48
|
-
|
|
49
|
-
"type": "boolean"
|
|
63
|
+
"web": {
|
|
64
|
+
"$ref": "#/definitions/AsyncRouteOption"
|
|
50
65
|
},
|
|
51
|
-
"
|
|
52
|
-
|
|
53
|
-
"oneOf": [
|
|
54
|
-
{
|
|
55
|
-
"$ref": "#/definitions/AsyncRouteOption"
|
|
56
|
-
},
|
|
57
|
-
{
|
|
58
|
-
"type": "object",
|
|
59
|
-
"properties": {
|
|
60
|
-
"ios": {
|
|
61
|
-
"$ref": "#/definitions/AsyncRouteOption"
|
|
62
|
-
},
|
|
63
|
-
"android": {
|
|
64
|
-
"$ref": "#/definitions/AsyncRouteOption"
|
|
65
|
-
},
|
|
66
|
-
"web": {
|
|
67
|
-
"$ref": "#/definitions/AsyncRouteOption"
|
|
68
|
-
},
|
|
69
|
-
"default": {
|
|
70
|
-
"$ref": "#/definitions/AsyncRouteOption"
|
|
71
|
-
}
|
|
72
|
-
},
|
|
73
|
-
"additionalProperties": true
|
|
74
|
-
}
|
|
75
|
-
]
|
|
66
|
+
"default": {
|
|
67
|
+
"$ref": "#/definitions/AsyncRouteOption"
|
|
76
68
|
}
|
|
77
|
-
|
|
78
|
-
|
|
69
|
+
},
|
|
70
|
+
"additionalProperties": true
|
|
71
|
+
}
|
|
72
|
+
]
|
|
73
|
+
},
|
|
74
|
+
"partialRouteTypes": {
|
|
75
|
+
"description": "Enable or disable partial route type generation. Defaults to `true`.",
|
|
76
|
+
"type": "boolean"
|
|
79
77
|
}
|
|
78
|
+
},
|
|
79
|
+
"additionalProperties": false
|
|
80
80
|
}
|
|
81
|
-
}
|
|
81
|
+
}
|
|
82
|
+
}
|
package/rsc/entry.js
CHANGED
|
@@ -9,12 +9,6 @@
|
|
|
9
9
|
// on web.
|
|
10
10
|
import '@expo/metro-runtime';
|
|
11
11
|
|
|
12
|
-
// Hook for the virtual client modules.
|
|
13
|
-
// TODO: Remove this in favor of the webpack runtime one.
|
|
14
|
-
import 'expo-router/virtual-client-boundaries';
|
|
15
|
-
// Add server component support.
|
|
16
|
-
import 'expo-router/build/rsc/runtime';
|
|
17
|
-
|
|
18
12
|
import { renderRootComponent } from 'expo-router/build/renderRootComponent';
|
|
19
13
|
import { App } from 'expo-router/build/rsc/entry';
|
|
20
14
|
|
package/rsc/headers.d.ts
ADDED
package/rsc/headers.js
ADDED
package/build/rsc/runtime.d.ts
DELETED
|
@@ -1,9 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright © 2024 650 Industries.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
declare let __METRO_GLOBAL_PREFIX__: string;
|
|
8
|
-
declare const disableReactNativeMissingModuleHandling: boolean;
|
|
9
|
-
//# sourceMappingURL=runtime.d.ts.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.d.ts","sourceRoot":"","sources":["../../src/rsc/runtime.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH,OAAO,CAAC,IAAI,uBAAuB,EAAE,MAAM,CAAC;AAI5C,QAAA,MAAM,uCAAuC,SACiC,CAAC"}
|
package/build/rsc/runtime.js
DELETED
|
@@ -1,36 +0,0 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright © 2024 650 Industries.
|
|
3
|
-
*
|
|
4
|
-
* This source code is licensed under the MIT license found in the
|
|
5
|
-
* LICENSE file in the root directory of this source tree.
|
|
6
|
-
*/
|
|
7
|
-
// React Native's error handling is full of bugs which cause the app to crash in production.
|
|
8
|
-
// We'll disable their handling in production native builds to ensure missing modules are shown to the user.
|
|
9
|
-
const disableReactNativeMissingModuleHandling = !__DEV__ && (process.env.EXPO_OS !== 'web' || typeof window === 'undefined');
|
|
10
|
-
globalThis.__webpack_chunk_load__ = (id) => {
|
|
11
|
-
return global[`${__METRO_GLOBAL_PREFIX__}__loadBundleAsync`](id);
|
|
12
|
-
};
|
|
13
|
-
globalThis.__webpack_require__ = (id) => {
|
|
14
|
-
// This logic can be tested by running a production iOS build without virtual client boundaries. This will result in all split chunks being missing and
|
|
15
|
-
// errors being thrown on RSC load.
|
|
16
|
-
// @ts-expect-error: Not on type
|
|
17
|
-
const original = ErrorUtils.reportFatalError;
|
|
18
|
-
if (disableReactNativeMissingModuleHandling) {
|
|
19
|
-
// @ts-expect-error: Not on type
|
|
20
|
-
ErrorUtils.reportFatalError = (err) => {
|
|
21
|
-
// Throw the error so the __r function exits as expected. The error will then be caught by the nearest error boundary.
|
|
22
|
-
throw err;
|
|
23
|
-
};
|
|
24
|
-
}
|
|
25
|
-
try {
|
|
26
|
-
return global[`${__METRO_GLOBAL_PREFIX__}__r`](id);
|
|
27
|
-
}
|
|
28
|
-
finally {
|
|
29
|
-
// Restore the original error handling.
|
|
30
|
-
if (disableReactNativeMissingModuleHandling) {
|
|
31
|
-
// @ts-expect-error: Not on type
|
|
32
|
-
ErrorUtils.reportFatalError = original;
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
};
|
|
36
|
-
//# sourceMappingURL=runtime.js.map
|
package/build/rsc/runtime.js.map
DELETED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"runtime.js","sourceRoot":"","sources":["../../src/rsc/runtime.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAIH,4FAA4F;AAC5F,4GAA4G;AAC5G,MAAM,uCAAuC,GAC3C,CAAC,OAAO,IAAI,CAAC,OAAO,CAAC,GAAG,CAAC,OAAO,KAAK,KAAK,IAAI,OAAO,MAAM,KAAK,WAAW,CAAC,CAAC;AAE/E,UAAU,CAAC,sBAAsB,GAAG,CAAC,EAAU,EAAE,EAAE;IACjD,OAAO,MAAM,CAAC,GAAG,uBAAuB,mBAAmB,CAAC,CAAC,EAAE,CAAC,CAAC;AACnE,CAAC,CAAC;AAEF,UAAU,CAAC,mBAAmB,GAAG,CAAC,EAAU,EAAE,EAAE;IAC9C,uJAAuJ;IACvJ,mCAAmC;IAEnC,gCAAgC;IAChC,MAAM,QAAQ,GAAG,UAAU,CAAC,gBAAgB,CAAC;IAC7C,IAAI,uCAAuC,EAAE;QAC3C,gCAAgC;QAChC,UAAU,CAAC,gBAAgB,GAAG,CAAC,GAAG,EAAE,EAAE;YACpC,sHAAsH;YACtH,MAAM,GAAG,CAAC;QACZ,CAAC,CAAC;KACH;IACD,IAAI;QACF,OAAO,MAAM,CAAC,GAAG,uBAAuB,KAAK,CAAC,CAAC,EAAE,CAAC,CAAC;KACpD;YAAS;QACR,uCAAuC;QACvC,IAAI,uCAAuC,EAAE;YAC3C,gCAAgC;YAChC,UAAU,CAAC,gBAAgB,GAAG,QAAQ,CAAC;SACxC;KACF;AACH,CAAC,CAAC","sourcesContent":["/**\n * Copyright © 2024 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 */\n\ndeclare let __METRO_GLOBAL_PREFIX__: string;\n\n// React Native's error handling is full of bugs which cause the app to crash in production.\n// We'll disable their handling in production native builds to ensure missing modules are shown to the user.\nconst disableReactNativeMissingModuleHandling =\n !__DEV__ && (process.env.EXPO_OS !== 'web' || typeof window === 'undefined');\n\nglobalThis.__webpack_chunk_load__ = (id: string) => {\n return global[`${__METRO_GLOBAL_PREFIX__}__loadBundleAsync`](id);\n};\n\nglobalThis.__webpack_require__ = (id: string) => {\n // This logic can be tested by running a production iOS build without virtual client boundaries. This will result in all split chunks being missing and\n // errors being thrown on RSC load.\n\n // @ts-expect-error: Not on type\n const original = ErrorUtils.reportFatalError;\n if (disableReactNativeMissingModuleHandling) {\n // @ts-expect-error: Not on type\n ErrorUtils.reportFatalError = (err) => {\n // Throw the error so the __r function exits as expected. The error will then be caught by the nearest error boundary.\n throw err;\n };\n }\n try {\n return global[`${__METRO_GLOBAL_PREFIX__}__r`](id);\n } finally {\n // Restore the original error handling.\n if (disableReactNativeMissingModuleHandling) {\n // @ts-expect-error: Not on type\n ErrorUtils.reportFatalError = original;\n }\n }\n};\n"]}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
// The contents of this file are added in Metro.
|