expo-router 3.5.4 → 3.5.5
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/_ctx.android.js +1 -1
- package/build/global-state/routing.js +9 -4
- package/build/global-state/routing.js.map +1 -1
- package/build/head/ExpoHead.d.ts +1 -1
- package/build/head/ExpoHead.d.ts.map +1 -1
- package/build/head/ExpoHead.js +3 -3
- package/build/head/ExpoHead.js.map +1 -1
- package/package.json +3 -3
package/_ctx.android.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
export const ctx = require.context(
|
|
2
2
|
process.env.EXPO_ROUTER_APP_ROOT,
|
|
3
3
|
true,
|
|
4
|
-
/^(?:\.\/)(?!(?:(?:(?:.*\+api)|(?:\+html)))\.[tj]sx?$).*(?:\.ios|\.web)
|
|
4
|
+
/^(?:\.\/)(?!(?:(?:(?:.*\+api)|(?:\+html)))\.[tj]sx?$).*(?:\.ios|\.web)?\.[tj]sx?$/,
|
|
5
5
|
process.env.EXPO_ROUTER_IMPORT_MODE
|
|
6
6
|
);
|
|
@@ -160,7 +160,6 @@ function getNavigateAction(actionState, navigationState, type = 'NAVIGATE') {
|
|
|
160
160
|
* - /1/page -> /2/anotherPage needs to target the /[id] navigator
|
|
161
161
|
*
|
|
162
162
|
* Other parameters such as search params and hash are not evaluated.
|
|
163
|
-
*
|
|
164
163
|
*/
|
|
165
164
|
let actionStateRoute;
|
|
166
165
|
// Traverse the state tree comparing the current state and the action state until we find where they diverge
|
|
@@ -189,12 +188,18 @@ function getNavigateAction(actionState, navigationState, type = 'NAVIGATE') {
|
|
|
189
188
|
let params = payload.params;
|
|
190
189
|
// The root level of payload is a bit weird, its params are in the child object
|
|
191
190
|
while (actionStateRoute) {
|
|
192
|
-
Object.assign(params, { ...actionStateRoute.params });
|
|
191
|
+
Object.assign(params, { ...payload.params, ...actionStateRoute.params });
|
|
192
|
+
// Assign the screen name to the payload
|
|
193
193
|
payload.screen = actionStateRoute.name;
|
|
194
|
-
|
|
195
|
-
payload.params
|
|
194
|
+
// Merge the params, ensuring that we create a new object
|
|
195
|
+
payload.params = { ...params };
|
|
196
|
+
// Params don't include the screen, thats a separate attribute
|
|
197
|
+
delete payload.params['screen'];
|
|
198
|
+
// Continue down the payload tree
|
|
199
|
+
// Initially these values are separate, but React Nav merges them after the first layer
|
|
196
200
|
payload = payload.params;
|
|
197
201
|
params = payload;
|
|
202
|
+
actionStateRoute = actionStateRoute.state?.routes[actionStateRoute.state?.routes.length - 1];
|
|
198
203
|
}
|
|
199
204
|
// Expo Router uses only three actions, but these don't directly translate to all navigator actions
|
|
200
205
|
if (type === 'PUSH') {
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../src/global-state/routing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAA4F;AAC5F,sDAAwC;AACxC,kDAA2C;AAK3C,uCAA2C;AAC3C,uCAAuC;AACvC,0CAA+C;AAC/C,sCAAoD;AAEpD,SAAS,aAAa,CAAC,KAAkB;IACvC,IAAI,CAAC,KAAK,CAAC,aAAa,CAAC,OAAO,EAAE,EAAE;QAClC,MAAM,IAAI,KAAK,CACb,gKAAgK,CACjK,CAAC;KACH;AACH,CAAC;AAED,SAAgB,QAAQ,CAAoB,GAAoB;IAC9D,OAAO,IAAI,CAAC,MAAM,CAAC,IAAA,kBAAW,EAAC,GAAG,CAAC,EAAE,UAAU,CAAC,CAAC;AACnD,CAAC;AAFD,4BAEC;AAED,SAAgB,IAAI,CAAoB,GAAoB;IAC1D,OAAO,IAAI,CAAC,MAAM,CAAC,IAAA,kBAAW,EAAC,GAAG,CAAC,EAAE,MAAM,CAAC,CAAC;AAC/C,CAAC;AAFD,oBAEC;AAED,SAAgB,OAAO,CAAoB,KAAc;IACvD,IAAI,CAAC,aAAa,EAAE,QAAQ,CAAC,qBAAY,CAAC,GAAG,CAAC,KAAK,CAAC,CAAC,CAAC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OAAO,CAAC,MAAM,CAAC;QACzB,MAAM,GAAG,OAAO,CAAC;KAClB;IAED,mGAAmG;IACnG,IAAI,IAAI,KAAK,MAAM,EAAE;QACnB,8FAA8F;QAC9F,IAAI,GAAG,UAAU,CAAC;QAElB;;;;;;;;;;;;;WAaG;QACH,IAAI,eAAe,CAAC,IAAI,KAAK,OAAO,EAAE;YACpC,WAAW,CAAC,GAAG,GAAG,GAAG,WAAW,CAAC,IAAI,IAAI,IAAA,mBAAM,GAAE,EAAE,CAAC,CAAC,yJAAyJ;SAC/M;KACF;IAED,IAAI,IAAI,KAAK,SAAS,IAAI,eAAe,CAAC,IAAI,KAAK,KAAK,EAAE;QACxD,IAAI,GAAG,SAAS,CAAC;KAClB;IAED,OAAO;QACL,IAAI;QACJ,MAAM,EAAE,eAAe,CAAC,GAAG;QAC3B,OAAO,EAAE;YACP,GAAG,EAAE,WAAW,CAAC,GAAG;YACpB,IAAI,EAAE,WAAW,CAAC,MAAM;YACxB,MAAM,EAAE,WAAW,CAAC,MAAM;SAC3B;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { StackActions, type NavigationState, PartialRoute } from '@react-navigation/native';\nimport * as Linking from 'expo-linking';\nimport { nanoid } from 'nanoid/non-secure';\n\nimport { type RouterStore } from './router-store';\nimport { ExpoRouter } from '../../types/expo-router';\nimport { ResultState } from '../fork/getStateFromPath';\nimport { resolveHref } from '../link/href';\nimport { resolve } from '../link/path';\nimport { matchDynamicName } from '../matchers';\nimport { shouldLinkExternally } from '../utils/url';\n\nfunction assertIsReady(store: RouterStore) {\n if (!store.navigationRef.isReady()) {\n throw new Error(\n 'Attempted to navigate before mounting the Root Layout component. Ensure the Root Layout component is rendering a Slot, or other navigator on the first render.'\n );\n }\n}\n\nexport function navigate(this: RouterStore, url: ExpoRouter.Href) {\n return this.linkTo(resolveHref(url), 'NAVIGATE');\n}\n\nexport function push(this: RouterStore, url: ExpoRouter.Href) {\n return this.linkTo(resolveHref(url), 'PUSH');\n}\n\nexport function dismiss(this: RouterStore, count?: number) {\n this.navigationRef?.dispatch(StackActions.pop(count));\n}\n\nexport function replace(this: RouterStore, url: ExpoRouter.Href) {\n return this.linkTo(resolveHref(url), 'REPLACE');\n}\n\nexport function dismissAll(this: RouterStore) {\n this.navigationRef?.dispatch(StackActions.popToTop());\n}\n\nexport function goBack(this: RouterStore) {\n assertIsReady(this);\n this.navigationRef?.current?.goBack();\n}\n\nexport function canGoBack(this: RouterStore): boolean {\n // Return a default value here if the navigation hasn't mounted yet.\n // This can happen if the user calls `canGoBack` from the Root Layout route\n // before mounting a navigator. This behavior exists due to React Navigation being dynamically\n // constructed at runtime. We can get rid of this in the future if we use\n // the static configuration internally.\n if (!this.navigationRef.isReady()) {\n return false;\n }\n return this.navigationRef?.current?.canGoBack() ?? false;\n}\n\nexport function canDismiss(this: RouterStore): boolean {\n let state = this.rootState;\n\n // Keep traversing down the state tree until we find a stack navigator that we can pop\n while (state) {\n if (state.type === 'stack' && state.routes.length > 1) {\n return true;\n }\n if (state.index === undefined) return false;\n\n state = state.routes?.[state.index]?.state as any;\n }\n\n return false;\n}\n\nexport function setParams(this: RouterStore, params: Record<string, string | number> = {}) {\n assertIsReady(this);\n return (this.navigationRef?.current?.setParams as any)(params);\n}\n\nexport function linkTo(this: RouterStore, href: string, event?: string) {\n if (shouldLinkExternally(href)) {\n Linking.openURL(href);\n return;\n }\n\n assertIsReady(this);\n const navigationRef = this.navigationRef.current;\n\n if (navigationRef == null) {\n throw new Error(\n \"Couldn't find a navigation object. Is your component inside NavigationContainer?\"\n );\n }\n\n if (!this.linking) {\n throw new Error('Attempted to link to route when no routes are present');\n }\n\n if (href === '..' || href === '../') {\n navigationRef.goBack();\n return;\n }\n\n const rootState = navigationRef.getRootState();\n\n if (href.startsWith('.')) {\n // Resolve base path by merging the current segments with the params\n let base =\n this.routeInfo?.segments\n ?.map((segment) => {\n if (!segment.startsWith('[')) return segment;\n\n if (segment.startsWith('[...')) {\n segment = segment.slice(4, -1);\n const params = this.routeInfo?.params?.[segment];\n if (Array.isArray(params)) {\n return params.join('/');\n } else {\n return params?.split(',')?.join('/') ?? '';\n }\n } else {\n segment = segment.slice(1, -1);\n return this.routeInfo?.params?.[segment];\n }\n })\n .filter(Boolean)\n .join('/') ?? '/';\n\n if (!this.routeInfo?.isIndex) {\n base += '/..';\n }\n\n href = resolve(base, href);\n }\n\n const state = this.linking.getStateFromPath!(href, this.linking.config);\n\n if (!state || state.routes.length === 0) {\n console.error('Could not generate a valid navigation state for the given path: ' + href);\n return;\n }\n\n return navigationRef.dispatch(getNavigateAction(state, rootState, event));\n}\n\nfunction getNavigateAction(\n actionState: ResultState,\n navigationState: NavigationState,\n type = 'NAVIGATE'\n) {\n /**\n * We need to find the deepest navigator where the action and current state diverge, If they do not diverge, the\n * lowest navigator is the target.\n *\n * By default React Navigation will target the current navigator, but this doesn't work for all actions\n * For example:\n * - /deeply/nested/route -> /top-level-route the target needs to be the top-level navigator\n * - /stack/nestedStack/page -> /stack1/nestedStack/other-page needs to target the nestedStack navigator\n *\n * This matching needs to done by comparing the route names and the dynamic path, for example\n * - /1/page -> /2/anotherPage needs to target the /[id] navigator\n *\n * Other parameters such as search params and hash are not evaluated.\n *\n */\n let actionStateRoute: PartialRoute<any> | undefined;\n\n // Traverse the state tree comparing the current state and the action state until we find where they diverge\n while (actionState && navigationState) {\n const stateRoute = navigationState.routes[navigationState.index];\n\n actionStateRoute = actionState.routes[actionState.routes.length - 1];\n\n const childState = actionStateRoute.state;\n const nextNavigationState = stateRoute.state;\n\n const dynamicName = matchDynamicName(actionStateRoute.name);\n\n const didActionAndCurrentStateDiverge =\n actionStateRoute.name !== stateRoute.name ||\n !childState ||\n !nextNavigationState ||\n (dynamicName && actionStateRoute.params?.[dynamicName] !== stateRoute.params?.[dynamicName]);\n\n if (didActionAndCurrentStateDiverge) {\n break;\n }\n\n actionState = childState;\n navigationState = nextNavigationState as NavigationState;\n }\n\n /*\n * We found the target navigator, but the payload is in the incorrect format\n * We need to convert the action state to a payload that can be dispatched\n */\n const rootPayload: Record<string, any> = { params: {} };\n let payload = rootPayload;\n let params = payload.params;\n\n // The root level of payload is a bit weird, its params are in the child object\n while (actionStateRoute) {\n Object.assign(params, { ...actionStateRoute.params });\n payload.screen = actionStateRoute.name;\n\n actionStateRoute = actionStateRoute.state?.routes[actionStateRoute.state?.routes.length - 1];\n\n payload.params ??= {};\n payload = payload.params;\n params = payload;\n }\n\n // Expo Router uses only three actions, but these don't directly translate to all navigator actions\n if (type === 'PUSH') {\n // Only stack navigators have a push action, and even then we want to use NAVIGATE (see below)\n type = 'NAVIGATE';\n\n /*\n * The StackAction.PUSH does not work correctly with Expo Router.\n *\n * Expo Router provides a getId() function for every route, altering how React Navigation handles stack routing.\n * Ordinarily, PUSH always adds a new screen to the stack. However, with getId() present, it navigates to the screen with the matching ID instead (by moving the screen to the top of the stack)\n * When you try and push to a screen with the same ID, no navigation will occur\n * Refer to: https://github.com/react-navigation/react-navigation/blob/13d4aa270b301faf07960b4cd861ffc91e9b2c46/packages/routers/src/StackRouter.tsx#L279-L290\n *\n * Expo Router needs to retain the default behavior of PUSH, consistently adding new screens to the stack, even if their IDs are identical.\n *\n * To resolve this issue, we switch to using a NAVIGATE action with a new key. In the navigate action, screens are matched by either key or getId() function.\n * By generating a unique new key, we ensure that the screen is always pushed onto the stack.\n *\n */\n if (navigationState.type === 'stack') {\n rootPayload.key = `${rootPayload.name}-${nanoid()}`; // @see https://github.com/react-navigation/react-navigation/blob/13d4aa270b301faf07960b4cd861ffc91e9b2c46/packages/routers/src/StackRouter.tsx#L406-L407\n }\n }\n\n if (type === 'REPLACE' && navigationState.type === 'tab') {\n type = 'JUMP_TO';\n }\n\n return {\n type,\n target: navigationState.key,\n payload: {\n key: rootPayload.key,\n name: rootPayload.screen,\n params: rootPayload.params,\n },\n };\n}\n"]}
|
|
1
|
+
{"version":3,"file":"routing.js","sourceRoot":"","sources":["../../src/global-state/routing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;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,IAAI,IAAI,KAAK,SAAS,IAAI,eAAe,CAAC,IAAI,KAAK,KAAK,EAAE;QACxD,IAAI,GAAG,SAAS,CAAC;KAClB;IAED,OAAO;QACL,IAAI;QACJ,MAAM,EAAE,eAAe,CAAC,GAAG;QAC3B,OAAO,EAAE;YACP,GAAG,EAAE,WAAW,CAAC,GAAG;YACpB,IAAI,EAAE,WAAW,CAAC,MAAM;YACxB,MAAM,EAAE,WAAW,CAAC,MAAM;SAC3B;KACF,CAAC;AACJ,CAAC","sourcesContent":["import { StackActions, type NavigationState, PartialRoute } from '@react-navigation/native';\nimport * as Linking from 'expo-linking';\nimport { nanoid } from 'nanoid/non-secure';\n\nimport { type RouterStore } from './router-store';\nimport { ExpoRouter } from '../../types/expo-router';\nimport { ResultState } from '../fork/getStateFromPath';\nimport { resolveHref } from '../link/href';\nimport { resolve } from '../link/path';\nimport { matchDynamicName } from '../matchers';\nimport { shouldLinkExternally } from '../utils/url';\n\nfunction assertIsReady(store: RouterStore) {\n if (!store.navigationRef.isReady()) {\n throw new Error(\n 'Attempted to navigate before mounting the Root Layout component. Ensure the Root Layout component is rendering a Slot, or other navigator on the first render.'\n );\n }\n}\n\nexport function navigate(this: RouterStore, url: ExpoRouter.Href) {\n return this.linkTo(resolveHref(url), 'NAVIGATE');\n}\n\nexport function push(this: RouterStore, url: ExpoRouter.Href) {\n return this.linkTo(resolveHref(url), 'PUSH');\n}\n\nexport function dismiss(this: RouterStore, count?: number) {\n this.navigationRef?.dispatch(StackActions.pop(count));\n}\n\nexport function replace(this: RouterStore, url: ExpoRouter.Href) {\n return this.linkTo(resolveHref(url), 'REPLACE');\n}\n\nexport function dismissAll(this: RouterStore) {\n this.navigationRef?.dispatch(StackActions.popToTop());\n}\n\nexport function goBack(this: RouterStore) {\n assertIsReady(this);\n this.navigationRef?.current?.goBack();\n}\n\nexport function canGoBack(this: RouterStore): boolean {\n // Return a default value here if the navigation hasn't mounted yet.\n // This can happen if the user calls `canGoBack` from the Root Layout route\n // before mounting a navigator. This behavior exists due to React Navigation being dynamically\n // constructed at runtime. We can get rid of this in the future if we use\n // the static configuration internally.\n if (!this.navigationRef.isReady()) {\n return false;\n }\n return this.navigationRef?.current?.canGoBack() ?? false;\n}\n\nexport function canDismiss(this: RouterStore): boolean {\n let state = this.rootState;\n\n // Keep traversing down the state tree until we find a stack navigator that we can pop\n while (state) {\n if (state.type === 'stack' && state.routes.length > 1) {\n return true;\n }\n if (state.index === undefined) return false;\n\n state = state.routes?.[state.index]?.state as any;\n }\n\n return false;\n}\n\nexport function setParams(this: RouterStore, params: Record<string, string | number> = {}) {\n assertIsReady(this);\n return (this.navigationRef?.current?.setParams as any)(params);\n}\n\nexport function linkTo(this: RouterStore, href: string, event?: string) {\n if (shouldLinkExternally(href)) {\n Linking.openURL(href);\n return;\n }\n\n assertIsReady(this);\n const navigationRef = this.navigationRef.current;\n\n if (navigationRef == null) {\n throw new Error(\n \"Couldn't find a navigation object. Is your component inside NavigationContainer?\"\n );\n }\n\n if (!this.linking) {\n throw new Error('Attempted to link to route when no routes are present');\n }\n\n if (href === '..' || href === '../') {\n navigationRef.goBack();\n return;\n }\n\n const rootState = navigationRef.getRootState();\n\n if (href.startsWith('.')) {\n // Resolve base path by merging the current segments with the params\n let base =\n this.routeInfo?.segments\n ?.map((segment) => {\n if (!segment.startsWith('[')) return segment;\n\n if (segment.startsWith('[...')) {\n segment = segment.slice(4, -1);\n const params = this.routeInfo?.params?.[segment];\n if (Array.isArray(params)) {\n return params.join('/');\n } else {\n return params?.split(',')?.join('/') ?? '';\n }\n } else {\n segment = segment.slice(1, -1);\n return this.routeInfo?.params?.[segment];\n }\n })\n .filter(Boolean)\n .join('/') ?? '/';\n\n if (!this.routeInfo?.isIndex) {\n base += '/..';\n }\n\n href = resolve(base, href);\n }\n\n const state = this.linking.getStateFromPath!(href, this.linking.config);\n\n if (!state || state.routes.length === 0) {\n console.error('Could not generate a valid navigation state for the given path: ' + href);\n return;\n }\n\n return navigationRef.dispatch(getNavigateAction(state, rootState, event));\n}\n\nfunction getNavigateAction(\n actionState: ResultState,\n navigationState: NavigationState,\n type = 'NAVIGATE'\n) {\n /**\n * We need to find the deepest navigator where the action and current state diverge, If they do not diverge, the\n * lowest navigator is the target.\n *\n * By default React Navigation will target the current navigator, but this doesn't work for all actions\n * For example:\n * - /deeply/nested/route -> /top-level-route the target needs to be the top-level navigator\n * - /stack/nestedStack/page -> /stack1/nestedStack/other-page needs to target the nestedStack navigator\n *\n * This matching needs to done by comparing the route names and the dynamic path, for example\n * - /1/page -> /2/anotherPage needs to target the /[id] navigator\n *\n * Other parameters such as search params and hash are not evaluated.\n */\n let actionStateRoute: PartialRoute<any> | undefined;\n\n // Traverse the state tree comparing the current state and the action state until we find where they diverge\n while (actionState && navigationState) {\n const stateRoute = navigationState.routes[navigationState.index];\n\n actionStateRoute = actionState.routes[actionState.routes.length - 1];\n\n const childState = actionStateRoute.state;\n const nextNavigationState = stateRoute.state;\n\n const dynamicName = matchDynamicName(actionStateRoute.name);\n\n const didActionAndCurrentStateDiverge =\n actionStateRoute.name !== stateRoute.name ||\n !childState ||\n !nextNavigationState ||\n (dynamicName && actionStateRoute.params?.[dynamicName] !== stateRoute.params?.[dynamicName]);\n\n if (didActionAndCurrentStateDiverge) {\n break;\n }\n\n actionState = childState;\n navigationState = nextNavigationState as NavigationState;\n }\n\n /*\n * We found the target navigator, but the payload is in the incorrect format\n * We need to convert the action state to a payload that can be dispatched\n */\n const rootPayload: Record<string, any> = { params: {} };\n let payload = rootPayload;\n let params = payload.params;\n\n // The root level of payload is a bit weird, its params are in the child object\n while (actionStateRoute) {\n Object.assign(params, { ...payload.params, ...actionStateRoute.params });\n // Assign the screen name to the payload\n payload.screen = actionStateRoute.name;\n // Merge the params, ensuring that we create a new object\n payload.params = { ...params };\n // Params don't include the screen, thats a separate attribute\n delete payload.params['screen'];\n\n // Continue down the payload tree\n // Initially these values are separate, but React Nav merges them after the first layer\n payload = payload.params;\n params = payload;\n\n actionStateRoute = actionStateRoute.state?.routes[actionStateRoute.state?.routes.length - 1];\n }\n\n // Expo Router uses only three actions, but these don't directly translate to all navigator actions\n if (type === 'PUSH') {\n // Only stack navigators have a push action, and even then we want to use NAVIGATE (see below)\n type = 'NAVIGATE';\n\n /*\n * The StackAction.PUSH does not work correctly with Expo Router.\n *\n * Expo Router provides a getId() function for every route, altering how React Navigation handles stack routing.\n * Ordinarily, PUSH always adds a new screen to the stack. However, with getId() present, it navigates to the screen with the matching ID instead (by moving the screen to the top of the stack)\n * When you try and push to a screen with the same ID, no navigation will occur\n * Refer to: https://github.com/react-navigation/react-navigation/blob/13d4aa270b301faf07960b4cd861ffc91e9b2c46/packages/routers/src/StackRouter.tsx#L279-L290\n *\n * Expo Router needs to retain the default behavior of PUSH, consistently adding new screens to the stack, even if their IDs are identical.\n *\n * To resolve this issue, we switch to using a NAVIGATE action with a new key. In the navigate action, screens are matched by either key or getId() function.\n * By generating a unique new key, we ensure that the screen is always pushed onto the stack.\n *\n */\n if (navigationState.type === 'stack') {\n rootPayload.key = `${rootPayload.name}-${nanoid()}`; // @see https://github.com/react-navigation/react-navigation/blob/13d4aa270b301faf07960b4cd861ffc91e9b2c46/packages/routers/src/StackRouter.tsx#L406-L407\n }\n }\n\n if (type === 'REPLACE' && navigationState.type === 'tab') {\n type = 'JUMP_TO';\n }\n\n return {\n type,\n target: navigationState.key,\n payload: {\n key: rootPayload.key,\n name: rootPayload.screen,\n params: rootPayload.params,\n },\n };\n}\n"]}
|
package/build/head/ExpoHead.d.ts
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoHead.d.ts","sourceRoot":"","sources":["../../src/head/ExpoHead.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAU,cAAc,EAAE,MAAM,
|
|
1
|
+
{"version":3,"file":"ExpoHead.d.ts","sourceRoot":"","sources":["../../src/head/ExpoHead.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,MAAM,OAAO,CAAC;AAC1B,OAAO,EAAU,cAAc,EAAE,MAAM,2BAA2B,CAAC;AAEnE,eAAO,MAAM,IAAI,EAAE,KAAK,CAAC,EAAE,CAAC;IAAE,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CAAE,CAAC,GAAG;IAC5D,QAAQ,EAAE,OAAO,cAAc,CAAC;CAGjC,CAAC"}
|
package/build/head/ExpoHead.js
CHANGED
|
@@ -5,10 +5,10 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
6
|
exports.Head = void 0;
|
|
7
7
|
const react_1 = __importDefault(require("react"));
|
|
8
|
-
const
|
|
8
|
+
const react_native_helmet_async_1 = require("react-native-helmet-async");
|
|
9
9
|
const Head = ({ children }) => {
|
|
10
|
-
return <
|
|
10
|
+
return <react_native_helmet_async_1.Helmet>{children}</react_native_helmet_async_1.Helmet>;
|
|
11
11
|
};
|
|
12
12
|
exports.Head = Head;
|
|
13
|
-
exports.Head.Provider =
|
|
13
|
+
exports.Head.Provider = react_native_helmet_async_1.HelmetProvider;
|
|
14
14
|
//# sourceMappingURL=ExpoHead.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"ExpoHead.js","sourceRoot":"","sources":["../../src/head/ExpoHead.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,
|
|
1
|
+
{"version":3,"file":"ExpoHead.js","sourceRoot":"","sources":["../../src/head/ExpoHead.tsx"],"names":[],"mappings":";;;;;;AAAA,kDAA0B;AAC1B,yEAAmE;AAE5D,MAAM,IAAI,GAEb,CAAC,EAAE,QAAQ,EAAsB,EAAE,EAAE;IACvC,OAAO,CAAC,kCAAM,CAAC,CAAC,QAAQ,CAAC,EAAE,kCAAM,CAAC,CAAC;AACrC,CAAC,CAAC;AAJW,QAAA,IAAI,QAIf;AAEF,YAAI,CAAC,QAAQ,GAAG,0CAAc,CAAC","sourcesContent":["import React from 'react';\nimport { Helmet, HelmetProvider } from 'react-native-helmet-async';\n\nexport const Head: React.FC<{ children?: React.ReactNode }> & {\n Provider: typeof HelmetProvider;\n} = ({ children }: { children?: any }) => {\n return <Helmet>{children}</Helmet>;\n};\n\nHead.Provider = HelmetProvider;\n"]}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "expo-router",
|
|
3
|
-
"version": "3.5.
|
|
3
|
+
"version": "3.5.5",
|
|
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",
|
|
@@ -99,8 +99,8 @@
|
|
|
99
99
|
"@react-navigation/native": "~6.1.6",
|
|
100
100
|
"@react-navigation/native-stack": "~6.9.12",
|
|
101
101
|
"expo-splash-screen": "0.27.2",
|
|
102
|
-
"react-helmet-async": "
|
|
102
|
+
"react-native-helmet-async": "2.0.4",
|
|
103
103
|
"schema-utils": "^4.0.1"
|
|
104
104
|
},
|
|
105
|
-
"gitHead": "
|
|
105
|
+
"gitHead": "4a7cf0d0baf6dfc595d93f604945d2142e705a36"
|
|
106
106
|
}
|