expo-router 7.0.0-canary-20251118-4ca99d5 → 7.0.0-canary-20251119-961a032

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.
@@ -0,0 +1,21 @@
1
+ plugins {
2
+ id 'com.android.library'
3
+ id 'expo-module-gradle-plugin'
4
+ }
5
+
6
+ group = 'expo.modules.router'
7
+
8
+ android {
9
+ namespace "expo.modules.router"
10
+ defaultConfig {
11
+ versionCode 1
12
+ versionName "7.0.0-canary-20251119-961a032"
13
+ }
14
+ lintOptions {
15
+ abortOnError false
16
+ }
17
+ }
18
+
19
+ dependencies {
20
+ implementation 'com.google.android.material:material:1.13.0'
21
+ }
@@ -0,0 +1,133 @@
1
+ package expo.modules.router
2
+
3
+ import android.content.Context
4
+ import android.content.res.Configuration
5
+ import android.graphics.Color
6
+ import expo.modules.kotlin.exception.Exceptions
7
+ import expo.modules.kotlin.modules.Module
8
+ import expo.modules.kotlin.modules.ModuleDefinition
9
+ import androidx.appcompat.view.ContextThemeWrapper
10
+ import com.google.android.material.color.MaterialColors
11
+
12
+ class ExpoRouterModule : Module() {
13
+ private val context: Context
14
+ get() = appContext.reactContext ?: throw Exceptions.ReactContextLost()
15
+
16
+ override fun definition() = ModuleDefinition {
17
+ Name("ExpoRouter")
18
+
19
+ Function("Material3Color") { name: String, scheme: String ->
20
+ materialColor(name, scheme)
21
+ }
22
+
23
+ Function("Material3DynamicColor") { name: String, scheme: String ->
24
+ dynamicColor(name, scheme)
25
+ }
26
+ }
27
+
28
+ private fun materialColor(name: String, scheme: String): String? {
29
+ val scheme = if (scheme != "dark" && scheme != "light") {
30
+ getSystemScheme()
31
+ } else {
32
+ scheme
33
+ }
34
+
35
+ val theme = if (scheme == "dark") {
36
+ com.google.android.material.R.style.Theme_Material3_Dark
37
+ } else {
38
+ com.google.android.material.R.style.Theme_Material3_Light
39
+ }
40
+
41
+ return getColorFromTheme(name, theme)
42
+ }
43
+
44
+ private fun dynamicColor(name: String, scheme: String): String? {
45
+ val scheme = if (scheme != "dark" && scheme != "light") {
46
+ getSystemScheme()
47
+ } else {
48
+ scheme
49
+ }
50
+
51
+ val theme = if (scheme == "dark") {
52
+ com.google.android.material.R.style.Theme_Material3_DynamicColors_Dark
53
+ } else {
54
+ com.google.android.material.R.style.Theme_Material3_DynamicColors_Light
55
+ }
56
+
57
+ return getColorFromTheme(name, theme)
58
+ }
59
+
60
+ private fun getColorFromTheme(name: String, themeResId: Int): String? {
61
+ val wrappedContext = ContextThemeWrapper(context, themeResId)
62
+ val attr = attrMap[name.lowercase()]
63
+ ?: return null
64
+
65
+ return MaterialColors.getColorOrNull(wrappedContext, attr)?.let { colorToHex(it) }
66
+ }
67
+
68
+ private fun getSystemScheme(): String {
69
+ val currentNightMode =
70
+ context.resources.configuration.uiMode and Configuration.UI_MODE_NIGHT_MASK
71
+ return when (currentNightMode) {
72
+ Configuration.UI_MODE_NIGHT_YES -> "dark"
73
+ Configuration.UI_MODE_NIGHT_NO -> "light"
74
+ else -> "light"
75
+ }
76
+ }
77
+
78
+ companion object {
79
+ fun colorToHex(color: Int): String {
80
+ return String.format("#%02x%02x%02x", Color.red(color), Color.green(color), Color.blue(color))
81
+ }
82
+
83
+ val attrMap = mapOf(
84
+ // Some of the colors are androidx.appcompat.*
85
+ // https://github.com/material-components/material-components-android/issues/4709
86
+ "primary" to androidx.appcompat.R.attr.colorPrimary,
87
+ "onprimary" to com.google.android.material.R.attr.colorOnPrimary,
88
+ "primarycontainer" to com.google.android.material.R.attr.colorPrimaryContainer,
89
+ "onprimarycontainer" to com.google.android.material.R.attr.colorOnPrimaryContainer,
90
+ "primaryinverse" to com.google.android.material.R.attr.colorPrimaryInverse,
91
+ "primaryfixed" to com.google.android.material.R.attr.colorPrimaryFixed,
92
+ "primaryfixeddim" to com.google.android.material.R.attr.colorPrimaryFixedDim,
93
+ "onprimaryfixed" to com.google.android.material.R.attr.colorOnPrimaryFixed,
94
+ "onprimaryfixedvariant" to com.google.android.material.R.attr.colorOnPrimaryFixedVariant,
95
+ "secondary" to com.google.android.material.R.attr.colorSecondary,
96
+ "onsecondary" to com.google.android.material.R.attr.colorOnSecondary,
97
+ "secondarycontainer" to com.google.android.material.R.attr.colorSecondaryContainer,
98
+ "onsecondarycontainer" to com.google.android.material.R.attr.colorOnSecondaryContainer,
99
+ "secondaryfixed" to com.google.android.material.R.attr.colorSecondaryFixed,
100
+ "secondaryfixeddim" to com.google.android.material.R.attr.colorSecondaryFixedDim,
101
+ "onsecondaryfixed" to com.google.android.material.R.attr.colorOnSecondaryFixed,
102
+ "onsecondaryfixedvariant" to com.google.android.material.R.attr.colorOnSecondaryFixedVariant,
103
+ "tertiary" to com.google.android.material.R.attr.colorTertiary,
104
+ "ontertiary" to com.google.android.material.R.attr.colorOnTertiary,
105
+ "tertiarycontainer" to com.google.android.material.R.attr.colorTertiaryContainer,
106
+ "ontertiarycontainer" to com.google.android.material.R.attr.colorOnTertiaryContainer,
107
+ "tertiaryfixed" to com.google.android.material.R.attr.colorTertiaryFixed,
108
+ "tertiaryfixeddim" to com.google.android.material.R.attr.colorTertiaryFixedDim,
109
+ "ontertiaryfixed" to com.google.android.material.R.attr.colorOnTertiaryFixed,
110
+ "ontertiaryfixedvariant" to com.google.android.material.R.attr.colorOnTertiaryFixedVariant,
111
+ "error" to androidx.appcompat.R.attr.colorError,
112
+ "onerror" to com.google.android.material.R.attr.colorOnError,
113
+ "errorcontainer" to com.google.android.material.R.attr.colorErrorContainer,
114
+ "onerrorcontainer" to com.google.android.material.R.attr.colorOnErrorContainer,
115
+ "outline" to com.google.android.material.R.attr.colorOutline,
116
+ "outlinevariant" to com.google.android.material.R.attr.colorOutlineVariant,
117
+ "onbackground" to com.google.android.material.R.attr.colorOnBackground,
118
+ "surface" to com.google.android.material.R.attr.colorSurface,
119
+ "onsurface" to com.google.android.material.R.attr.colorOnSurface,
120
+ "surfacevariant" to com.google.android.material.R.attr.colorSurfaceVariant,
121
+ "onsurfacevariant" to com.google.android.material.R.attr.colorOnSurfaceVariant,
122
+ "surfaceinverse" to com.google.android.material.R.attr.colorSurfaceInverse,
123
+ "onsurfaceinverse" to com.google.android.material.R.attr.colorOnSurfaceInverse,
124
+ "surfacebright" to com.google.android.material.R.attr.colorSurfaceBright,
125
+ "surfacedim" to com.google.android.material.R.attr.colorSurfaceDim,
126
+ "surfacecontainer" to com.google.android.material.R.attr.colorSurfaceContainer,
127
+ "surfacecontainerlow" to com.google.android.material.R.attr.colorSurfaceContainerLow,
128
+ "surfacecontainerlowest" to com.google.android.material.R.attr.colorSurfaceContainerLowest,
129
+ "surfacecontainerhigh" to com.google.android.material.R.attr.colorSurfaceContainerHigh,
130
+ "surfacecontainerhighest" to com.google.android.material.R.attr.colorSurfaceContainerHighest
131
+ )
132
+ }
133
+ }
@@ -1 +1 @@
1
- {"version":3,"file":"routing.d.ts","sourceRoot":"","sources":["../../src/global-state/routing.ts"],"names":[],"mappings":"AAAA,OAAO,EACL,gBAAgB,EAChB,KAAK,eAAe,EACpB,YAAY,EACZ,KAAK,YAAY,EACjB,KAAK,sBAAsB,EAC3B,aAAa,EACd,MAAM,0BAA0B,CAAC;AAGlC,OAAO,EAAE,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAWvC,OAAO,EAAE,WAAW,EAAE,MAAM,0BAA0B,CAAC;AAKvD,OAAO,EAAE,IAAI,EAAE,MAAM,UAAU,CAAC;AAChC,OAAO,EAAE,eAAe,EAAE,MAAM,eAAe,CAAC;AAWhD,UAAU,UAAU;IAClB,IAAI,EAAE,aAAa,CAAC;IACpB,OAAO,EAAE;QACP,OAAO,EAAE,aAAa,CAAC;QACvB,IAAI,EAAE,MAAM,CAAC;KACd,CAAC;CACH;AAED,eAAO,MAAM,YAAY;WACV,CAAC,gBAAgB,GAAG,UAAU,CAAC,EAAE;2BACnB,IAAI;wBACX,MAAM,IAAI;;;;;;;gBASlB,gBAAgB,GAAG,UAAU;aAMhC,SAAS,CAAC,sBAAsB,CAAC,aAAa,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NAVIGATE', withAnchor, sin
282
282
  }
283
283
  const expoParams = isPreviewNavigation
284
284
  ? {
285
- __internal__expo_router_is_preview_navigation: true,
286
- __internal_expo_router_no_animation: true,
285
+ [navigationParams_1.INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME]: true,
286
+ [navigationParams_1.INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME]: true,
287
287
  }
288
288
  : {};
289
289
  const params = (0, navigationParams_1.appendInternalExpoRouterParams)(rootPayload.params, expoParams);
@@ -1 +1 @@
1
- {"version":3,"file":"routing.js","sourceRoot":"","sources":["../../src/global-state/routing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAiGA,4BAEC;AAED,wBAGC;AAED,4BAEC;AAED,oBAEC;AAED,0BAMC;AAED,8BAEC;AAED,0BAEC;AAED,gCAKC;AAED,wBAMC;AAED,8BAeC;AAED,gCAmBC;AAED,8BAQC;AA0BD,wBA4CC;AAmHD,4DAwBC;AAKD,gDAwDC;AArcD,kCAAkC;AAClC,sDAAwC;AAExC,+CAAwC;AAExC,iDAAuC;AACvC,gEAMuC;AAEvC,8DAAuD;AACvD,uCAA0E;AAC1E,0CAA+C;AAC/C,0DAAoG;AAGpG,sCAAoD;AAEpD,SAAS,aAAa;IACpB,IAAI,CAAC,oBAAK,CAAC,aAAa,CAAC,OAAO,EAAE,EAAE,CAAC;QACnC,MAAM,IAAI,KAAK,CACb,gKAAgK,CACjK,CAAC;IACJ,CAAC;AACH,CAAC;AAUY,QAAA,YAAY,GAAG;IAC1B,KAAK,EAAE,EAAuC;IAC9C,WAAW,EAAE,IAAI,GAAG,EAAc;IAClC,SAAS,CAAC,QAAoB;QAC5B,oBAAY,CAAC,WAAW,CAAC,GAAG,CAAC,QAAQ,CAAC,CAAC;QACvC,OAAO,GAAG,EAAE;YACV,oBAAY,CAAC,WAAW,CAAC,MAAM,CAAC,QAAQ,CAAC,CAAC;QAC5C,C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AC,CAAC;QAElC,WAAW,GAAG,UAAU,CAAC;QACzB,eAAe,GAAG,mBAAsC,CAAC;IAC3D,CAAC;IAED,OAAO;QACL,WAAW;QACX,eAAe;QACf,gBAAgB;QAChB,gBAAgB;KACjB,CAAC;AACJ,CAAC","sourcesContent":["import {\n NavigationAction,\n type NavigationState,\n PartialRoute,\n type PartialState,\n type NavigationContainerRef,\n ParamListBase,\n} from '@react-navigation/native';\nimport { IS_DOM } from 'expo/dom';\nimport * as Linking from 'expo-linking';\nimport { type RefObject } from 'react';\nimport { Platform } from 'react-native';\n\nimport { store } from './router-store';\nimport {\n emitDomDismiss,\n emitDomDismissAll,\n emitDomGoBack,\n emitDomLinkEvent,\n emitDomSetParams,\n} from '../domComponents/emitDomEvent';\nimport { ResultState } from '../fork/getStateFromPath';\nimport { applyRedirects } from '../getRoutesRedirects';\nimport { resolveHref, resolveHrefStringWithSegments } from '../link/href';\nimport { matchDynamicName } from '../matchers';\nimport { appendInternalExpoRouterParams, type InternalExpoRouterParams } from '../navigationParams';\nimport { Href } from '../types';\nimport { SingularOptions } from '../useScreens';\nimport { shouldLinkExternally } from '../utils/url';\n\nfunction assertIsReady() {\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\ninterface LinkAction {\n type: 'ROUTER_LINK';\n payload: {\n options: LinkToOptions;\n href: string;\n };\n}\n\nexport const routingQueue = {\n queue: [] as (NavigationAction | LinkAction)[],\n subscribers: new Set<() => void>(),\n subscribe(callback: () => void) {\n routingQueue.subscribers.add(callback);\n return () => {\n routingQueue.subscribers.delete(callback);\n };\n },\n snapshot() {\n return routingQueue.queue;\n },\n add(action: NavigationAction | LinkAction) {\n routingQueue.queue.push(action);\n for (const callback of routingQueue.subscribers) {\n callback();\n }\n },\n run(ref: RefObject<NavigationContainerRef<ParamListBase> | null>) {\n // Reset the identity of the queue.\n const events = routingQueue.queue;\n routingQueue.queue = [];\n let action: NavigationAction | LinkAction | undefined;\n while ((action = events.shift())) {\n if (ref.current) {\n if (action.type === 'ROUTER_LINK') {\n const {\n payload: { href, options },\n } = action as LinkAction;\n\n action = getNavigateAction(\n href,\n options,\n options.event,\n options.withAnchor,\n options.dangerouslySingular,\n !!options.__internal__PreviewKey\n );\n if (action) {\n ref.current.dispatch(action);\n }\n } else {\n ref.current.dispatch(action);\n }\n }\n }\n },\n};\n\nexport type NavigationOptions = Omit<LinkToOptions, 'event'>;\n\nexport function navigate(url: Href, options?: NavigationOptions) {\n return linkTo(resolveHref(url), { ...options, event: 'NAVIGATE' });\n}\n\nexport function reload() {\n // TODO(EvanBacon): add `reload` support.\n throw new Error('The reload method is not implemented in the client-side router yet.');\n}\n\nexport function prefetch(href: Href, options?: NavigationOptions) {\n return linkTo(resolveHref(href), { ...options, event: 'PRELOAD' });\n}\n\nexport function push(url: Href, options?: NavigationOptions) {\n return linkTo(resolveHref(url), { ...options, event: 'PUSH' });\n}\n\nexport function dismiss(count: number = 1) {\n if (emitDomDismiss(count)) {\n return;\n }\n\n routingQueue.add({ type: 'POP', payload: { count } });\n}\n\nexport function dismissTo(href: Href, options?: NavigationOptions) {\n return linkTo(resolveHref(href), { ...options, event: 'POP_TO' });\n}\n\nexport function replace(url: Href, options?: NavigationOptions) {\n return linkTo(resolveHref(url), { ...options, event: 'REPLACE' });\n}\n\nexport function dismissAll() {\n if (emitDomDismissAll()) {\n return;\n }\n routingQueue.add({ type: 'POP_TO_TOP' });\n}\n\nexport function goBack() {\n if (emitDomGoBack()) {\n return;\n }\n assertIsReady();\n routingQueue.add({ type: 'GO_BACK' });\n}\n\nexport function canGoBack(): boolean {\n if (IS_DOM) {\n throw new Error(\n 'canGoBack imperative method is not supported. Pass the property to the DOM component instead.'\n );\n }\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 (!store.navigationRef.isReady()) {\n return false;\n }\n return store.navigationRef?.current?.canGoBack() ?? false;\n}\n\nexport function canDismiss(): boolean {\n if (IS_DOM) {\n throw new Error(\n 'canDismiss imperative method is not supported. Pass the property to the DOM component instead.'\n );\n }\n let state = store.state;\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(\n params: Record<string, undefined | string | number | (string | number)[]> = {}\n) {\n if (emitDomSetParams(params)) {\n return;\n }\n assertIsReady();\n return (store.navigationRef?.current?.setParams as any)(params);\n}\n\nexport type LinkToOptions = {\n event?: string;\n\n /**\n * Relative URL references are either relative to the directory or the document. By default, relative paths are relative to the document.\n * @see: [MDN's documentation on Resolving relative references to a URL](https://developer.mozilla.org/en-US/docs/Web/API/URL_API/Resolving_relative_references).\n */\n relativeToDirectory?: boolean;\n\n /**\n * Include the anchor when navigating to a new navigator\n */\n withAnchor?: boolean;\n\n /**\n * When navigating in a Stack, remove all screen from the history that match the singular condition\n *\n * If used with `push`, the history will be filtered even if no navigation occurs.\n */\n dangerouslySingular?: SingularOptions;\n\n __internal__PreviewKey?: string;\n};\n\nexport function linkTo(originalHref: Href, options: LinkToOptions = {}) {\n originalHref = typeof originalHref == 'string' ? originalHref : resolveHref(originalHref);\n let href: string | undefined | null = originalHref;\n\n if (emitDomLinkEvent(href, options)) {\n return;\n }\n\n if (shouldLinkExternally(href)) {\n if (href.startsWith('//') && Platform.OS !== 'web') {\n href = `https:${href}`;\n }\n\n Linking.openURL(href);\n return;\n }\n\n if (href === '..' || href === '../') {\n assertIsReady();\n const navigationRef = store.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 (!store.linking) {\n throw new Error('Attempted to link to route when no routes are present');\n }\n\n navigationRef.goBack();\n return;\n }\n\n const linkAction: LinkAction = {\n type: 'ROUTER_LINK',\n payload: {\n href,\n options,\n },\n };\n\n routingQueue.add(linkAction);\n}\n\nfunction getNavigateAction(\n baseHref: string,\n options: LinkToOptions,\n type = 'NAVIGATE',\n withAnchor?: boolean,\n singular?: SingularOptions,\n isPreviewNavigation?: boolean\n) {\n let href: string | undefined = baseHref;\n assertIsReady();\n const navigationRef = store.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 if (!store.linking) {\n throw new Error('Attempted to link to route when no routes are present');\n }\n const rootState = navigationRef.getRootState();\n\n href = resolveHrefStringWithSegments(href, store.getRouteInfo(), options);\n href = applyRedirects(href, store.redirects) ?? undefined;\n\n // If the href is undefined, it means that the redirect has already been handled the navigation\n if (!href) {\n return;\n }\n\n const state = store.linking.getStateFromPath!(href, store.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 * 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 const { actionStateRoute, navigationState } = findDivergentState(\n state,\n rootState,\n type === 'PRELOAD'\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 = getPayloadFromStateRoute(actionStateRoute || {});\n\n if (type === 'PUSH' && navigationState.type !== 'stack') {\n type = 'NAVIGATE';\n } else if (navigationState.type === 'expo-tab') {\n type = 'JUMP_TO';\n } else if (type === 'REPLACE' && navigationState.type === 'drawer') {\n type = 'JUMP_TO';\n }\n\n if (withAnchor !== undefined) {\n if (rootPayload.params.initial) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`The parameter 'initial' is a reserved parameter name in React Navigation`);\n }\n }\n /*\n * The logic for initial can seen backwards depending on your perspective\n * True: The initialRouteName is not loaded. The incoming screen is the initial screen (default)\n * False: The initialRouteName is loaded. THe incoming screen is placed after the initialRouteName\n *\n * withAnchor flips the perspective.\n * True: You want the initialRouteName to load.\n * False: You do not want the initialRouteName to load.\n */\n rootPayload.params.initial = !withAnchor;\n }\n\n const expoParams: InternalExpoRouterParams = isPreviewNavigation\n ? {\n __internal__expo_router_is_preview_navigation: true,\n __internal_expo_router_no_animation: true,\n }\n : {};\n const params = appendInternalExpoRouterParams(rootPayload.params, expoParams);\n\n return {\n type,\n target: navigationState.key,\n payload: {\n // key: rootPayload.key,\n name: rootPayload.screen,\n params,\n singular,\n },\n };\n}\n\n/**\n * React Navigation uses params to store information about the screens, rather then create new state for each level.\n * This function traverses the action state that will not be part of state and returns a payload that can be used in action.\n */\nexport function getPayloadFromStateRoute(_actionStateRoute: PartialRoute<any>) {\n const rootPayload: Record<string, any> = { params: {} };\n let payload = rootPayload;\n let params = payload.params;\n let actionStateRoute: PartialRoute<any> | undefined = _actionStateRoute;\n\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\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 return rootPayload;\n}\n\n/*\n * Traverse the state tree comparing the current state and the action state until we find where they diverge\n */\nexport function findDivergentState(\n _actionState: ResultState,\n _navigationState: NavigationState,\n // If true, look through all tabs to find the target state, rather then just the current tab\n lookThroughAllTabs: boolean = false\n) {\n let actionState: PartialState<NavigationState> | undefined = _actionState;\n let navigationState: NavigationState | undefined = _navigationState;\n let actionStateRoute: PartialRoute<any> | undefined;\n const navigationRoutes = [];\n while (actionState && navigationState) {\n actionStateRoute = actionState.routes[actionState.routes.length - 1];\n const stateRoute = (() => {\n if (navigationState.type === 'tab' && lookThroughAllTabs) {\n return (\n navigationState.routes.find((route) => route.name === actionStateRoute?.name) ||\n navigationState.routes[navigationState.index ?? 0]\n );\n }\n return navigationState.routes[navigationState.index ?? 0];\n })();\n\n const childState: PartialState<NavigationState> | undefined = 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 &&\n // @ts-expect-error: TODO(@kitten): This isn't properly typed, so the index access fails\n actionStateRoute.params?.[dynamicName.name] !== stateRoute.params?.[dynamicName.name]);\n\n if (didActionAndCurrentStateDiverge) {\n // If we are looking through all tabs, we need to add new tab id if this is the last route\n // Otherwise we wouldn't be able to change the tab\n if (navigationState.type === 'tab' && lookThroughAllTabs) {\n navigationRoutes.push(stateRoute);\n }\n break;\n }\n\n navigationRoutes.push(stateRoute);\n\n actionState = childState;\n navigationState = nextNavigationState as NavigationState;\n }\n\n return {\n actionState,\n navigationState,\n actionStateRoute,\n navigationRoutes,\n };\n}\n"]}
1
+ {"version":3,"file":"routing.js","sourceRoot":"","sources":["../../src/global-state/routing.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAsGA,4BAEC;AAED,wBAGC;AAED,4BAEC;AAED,oBAEC;AAED,0BAMC;AAED,8BAEC;AAED,0BAEC;AAED,gCAKC;AAED,wBAMC;AAED,8BAeC;AAED,gCAmBC;AAED,8BAQC;AA0BD,wBA4CC;AAmHD,4DAwB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,CAAC;QAE7C,MAAM,WAAW,GAAG,IAAA,2BAAgB,EAAC,gBAAgB,CAAC,IAAI,CAAC,CAAC;QAE5D,MAAM,+BAA+B,GACnC,gBAAgB,CAAC,IAAI,KAAK,UAAU,CAAC,IAAI;YACzC,CAAC,UAAU;YACX,CAAC,mBAAmB;YACpB,CAAC,WAAW;gBACV,wFAAwF;gBACxF,gBAAgB,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,KAAK,UAAU,CAAC,MAAM,EAAE,CAAC,WAAW,CAAC,IAAI,CAAC,CAAC,CAAC;QAE3F,IAAI,+BAA+B,EAAE,CAAC;YACpC,0FAA0F;YAC1F,kDAAkD;YAClD,IAAI,eAAe,CAAC,IAAI,KAAK,KAAK,IAAI,kBAAkB,EAAE,CAAC;gBACzD,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;YACpC,CAAC;YACD,MAAM;QACR,CAAC;QAED,gBAAgB,CAAC,IAAI,CAAC,UAAU,CAAC,CAAC;QAElC,WAAW,GAAG,UAAU,CAAC;QACzB,eAAe,GAAG,mBAAsC,CAAC;IAC3D,CAAC;IAED,OAAO;QACL,WAAW;QACX,eAAe;QACf,gBAAgB;QAChB,gBAAgB;KACjB,CAAC;AACJ,CAAC","sourcesContent":["import {\n NavigationAction,\n type NavigationState,\n PartialRoute,\n type PartialState,\n type NavigationContainerRef,\n ParamListBase,\n} from '@react-navigation/native';\nimport { IS_DOM } from 'expo/dom';\nimport * as Linking from 'expo-linking';\nimport { type RefObject } from 'react';\nimport { Platform } from 'react-native';\n\nimport { store } from './router-store';\nimport {\n emitDomDismiss,\n emitDomDismissAll,\n emitDomGoBack,\n emitDomLinkEvent,\n emitDomSetParams,\n} from '../domComponents/emitDomEvent';\nimport { ResultState } from '../fork/getStateFromPath';\nimport { applyRedirects } from '../getRoutesRedirects';\nimport { resolveHref, resolveHrefStringWithSegments } from '../link/href';\nimport { matchDynamicName } from '../matchers';\nimport {\n appendInternalExpoRouterParams,\n INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME,\n INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME,\n type InternalExpoRouterParams,\n} from '../navigationParams';\nimport { Href } from '../types';\nimport { SingularOptions } from '../useScreens';\nimport { shouldLinkExternally } from '../utils/url';\n\nfunction assertIsReady() {\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\ninterface LinkAction {\n type: 'ROUTER_LINK';\n payload: {\n options: LinkToOptions;\n href: string;\n };\n}\n\nexport const routingQueue = {\n queue: [] as (NavigationAction | LinkAction)[],\n subscribers: new Set<() => void>(),\n subscribe(callback: () => void) {\n routingQueue.subscribers.add(callback);\n return () => {\n routingQueue.subscribers.delete(callback);\n };\n },\n snapshot() {\n return routingQueue.queue;\n },\n add(action: NavigationAction | LinkAction) {\n routingQueue.queue.push(action);\n for (const callback of routingQueue.subscribers) {\n callback();\n }\n },\n run(ref: RefObject<NavigationContainerRef<ParamListBase> | null>) {\n // Reset the identity of the queue.\n const events = routingQueue.queue;\n routingQueue.queue = [];\n let action: NavigationAction | LinkAction | undefined;\n while ((action = events.shift())) {\n if (ref.current) {\n if (action.type === 'ROUTER_LINK') {\n const {\n payload: { href, options },\n } = action as LinkAction;\n\n action = getNavigateAction(\n href,\n options,\n options.event,\n options.withAnchor,\n options.dangerouslySingular,\n !!options.__internal__PreviewKey\n );\n if (action) {\n ref.current.dispatch(action);\n }\n } else {\n ref.current.dispatch(action);\n }\n }\n }\n },\n};\n\nexport type NavigationOptions = Omit<LinkToOptions, 'event'>;\n\nexport function navigate(url: Href, options?: NavigationOptions) {\n return linkTo(resolveHref(url), { ...options, event: 'NAVIGATE' });\n}\n\nexport function reload() {\n // TODO(EvanBacon): add `reload` support.\n throw new Error('The reload method is not implemented in the client-side router yet.');\n}\n\nexport function prefetch(href: Href, options?: NavigationOptions) {\n return linkTo(resolveHref(href), { ...options, event: 'PRELOAD' });\n}\n\nexport function push(url: Href, options?: NavigationOptions) {\n return linkTo(resolveHref(url), { ...options, event: 'PUSH' });\n}\n\nexport function dismiss(count: number = 1) {\n if (emitDomDismiss(count)) {\n return;\n }\n\n routingQueue.add({ type: 'POP', payload: { count } });\n}\n\nexport function dismissTo(href: Href, options?: NavigationOptions) {\n return linkTo(resolveHref(href), { ...options, event: 'POP_TO' });\n}\n\nexport function replace(url: Href, options?: NavigationOptions) {\n return linkTo(resolveHref(url), { ...options, event: 'REPLACE' });\n}\n\nexport function dismissAll() {\n if (emitDomDismissAll()) {\n return;\n }\n routingQueue.add({ type: 'POP_TO_TOP' });\n}\n\nexport function goBack() {\n if (emitDomGoBack()) {\n return;\n }\n assertIsReady();\n routingQueue.add({ type: 'GO_BACK' });\n}\n\nexport function canGoBack(): boolean {\n if (IS_DOM) {\n throw new Error(\n 'canGoBack imperative method is not supported. Pass the property to the DOM component instead.'\n );\n }\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 (!store.navigationRef.isReady()) {\n return false;\n }\n return store.navigationRef?.current?.canGoBack() ?? false;\n}\n\nexport function canDismiss(): boolean {\n if (IS_DOM) {\n throw new Error(\n 'canDismiss imperative method is not supported. Pass the property to the DOM component instead.'\n );\n }\n let state = store.state;\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(\n params: Record<string, undefined | string | number | (string | number)[]> = {}\n) {\n if (emitDomSetParams(params)) {\n return;\n }\n assertIsReady();\n return (store.navigationRef?.current?.setParams as any)(params);\n}\n\nexport type LinkToOptions = {\n event?: string;\n\n /**\n * Relative URL references are either relative to the directory or the document. By default, relative paths are relative to the document.\n * @see: [MDN's documentation on Resolving relative references to a URL](https://developer.mozilla.org/en-US/docs/Web/API/URL_API/Resolving_relative_references).\n */\n relativeToDirectory?: boolean;\n\n /**\n * Include the anchor when navigating to a new navigator\n */\n withAnchor?: boolean;\n\n /**\n * When navigating in a Stack, remove all screen from the history that match the singular condition\n *\n * If used with `push`, the history will be filtered even if no navigation occurs.\n */\n dangerouslySingular?: SingularOptions;\n\n __internal__PreviewKey?: string;\n};\n\nexport function linkTo(originalHref: Href, options: LinkToOptions = {}) {\n originalHref = typeof originalHref == 'string' ? originalHref : resolveHref(originalHref);\n let href: string | undefined | null = originalHref;\n\n if (emitDomLinkEvent(href, options)) {\n return;\n }\n\n if (shouldLinkExternally(href)) {\n if (href.startsWith('//') && Platform.OS !== 'web') {\n href = `https:${href}`;\n }\n\n Linking.openURL(href);\n return;\n }\n\n if (href === '..' || href === '../') {\n assertIsReady();\n const navigationRef = store.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 (!store.linking) {\n throw new Error('Attempted to link to route when no routes are present');\n }\n\n navigationRef.goBack();\n return;\n }\n\n const linkAction: LinkAction = {\n type: 'ROUTER_LINK',\n payload: {\n href,\n options,\n },\n };\n\n routingQueue.add(linkAction);\n}\n\nfunction getNavigateAction(\n baseHref: string,\n options: LinkToOptions,\n type = 'NAVIGATE',\n withAnchor?: boolean,\n singular?: SingularOptions,\n isPreviewNavigation?: boolean\n) {\n let href: string | undefined = baseHref;\n assertIsReady();\n const navigationRef = store.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 if (!store.linking) {\n throw new Error('Attempted to link to route when no routes are present');\n }\n const rootState = navigationRef.getRootState();\n\n href = resolveHrefStringWithSegments(href, store.getRouteInfo(), options);\n href = applyRedirects(href, store.redirects) ?? undefined;\n\n // If the href is undefined, it means that the redirect has already been handled the navigation\n if (!href) {\n return;\n }\n\n const state = store.linking.getStateFromPath!(href, store.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 * 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 const { actionStateRoute, navigationState } = findDivergentState(\n state,\n rootState,\n type === 'PRELOAD'\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 = getPayloadFromStateRoute(actionStateRoute || {});\n\n if (type === 'PUSH' && navigationState.type !== 'stack') {\n type = 'NAVIGATE';\n } else if (navigationState.type === 'expo-tab') {\n type = 'JUMP_TO';\n } else if (type === 'REPLACE' && navigationState.type === 'drawer') {\n type = 'JUMP_TO';\n }\n\n if (withAnchor !== undefined) {\n if (rootPayload.params.initial) {\n if (process.env.NODE_ENV !== 'production') {\n console.warn(`The parameter 'initial' is a reserved parameter name in React Navigation`);\n }\n }\n /*\n * The logic for initial can seen backwards depending on your perspective\n * True: The initialRouteName is not loaded. The incoming screen is the initial screen (default)\n * False: The initialRouteName is loaded. THe incoming screen is placed after the initialRouteName\n *\n * withAnchor flips the perspective.\n * True: You want the initialRouteName to load.\n * False: You do not want the initialRouteName to load.\n */\n rootPayload.params.initial = !withAnchor;\n }\n\n const expoParams: InternalExpoRouterParams = isPreviewNavigation\n ? {\n [INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME]: true,\n [INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME]: true,\n }\n : {};\n const params = appendInternalExpoRouterParams(rootPayload.params, expoParams);\n\n return {\n type,\n target: navigationState.key,\n payload: {\n // key: rootPayload.key,\n name: rootPayload.screen,\n params,\n singular,\n },\n };\n}\n\n/**\n * React Navigation uses params to store information about the screens, rather then create new state for each level.\n * This function traverses the action state that will not be part of state and returns a payload that can be used in action.\n */\nexport function getPayloadFromStateRoute(_actionStateRoute: PartialRoute<any>) {\n const rootPayload: Record<string, any> = { params: {} };\n let payload = rootPayload;\n let params = payload.params;\n let actionStateRoute: PartialRoute<any> | undefined = _actionStateRoute;\n\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\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 return rootPayload;\n}\n\n/*\n * Traverse the state tree comparing the current state and the action state until we find where they diverge\n */\nexport function findDivergentState(\n _actionState: ResultState,\n _navigationState: NavigationState,\n // If true, look through all tabs to find the target state, rather then just the current tab\n lookThroughAllTabs: boolean = false\n) {\n let actionState: PartialState<NavigationState> | undefined = _actionState;\n let navigationState: NavigationState | undefined = _navigationState;\n let actionStateRoute: PartialRoute<any> | undefined;\n const navigationRoutes = [];\n while (actionState && navigationState) {\n actionStateRoute = actionState.routes[actionState.routes.length - 1];\n const stateRoute = (() => {\n if (navigationState.type === 'tab' && lookThroughAllTabs) {\n return (\n navigationState.routes.find((route) => route.name === actionStateRoute?.name) ||\n navigationState.routes[navigationState.index ?? 0]\n );\n }\n return navigationState.routes[navigationState.index ?? 0];\n })();\n\n const childState: PartialState<NavigationState> | undefined = 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 &&\n // @ts-expect-error: TODO(@kitten): This isn't properly typed, so the index access fails\n actionStateRoute.params?.[dynamicName.name] !== stateRoute.params?.[dynamicName.name]);\n\n if (didActionAndCurrentStateDiverge) {\n // If we are looking through all tabs, we need to add new tab id if this is the last route\n // Otherwise we wouldn't be able to change the tab\n if (navigationState.type === 'tab' && lookThroughAllTabs) {\n navigationRoutes.push(stateRoute);\n }\n break;\n }\n\n navigationRoutes.push(stateRoute);\n\n actionState = childState;\n navigationState = nextNavigationState as NavigationState;\n }\n\n return {\n actionState,\n navigationState,\n actionStateRoute,\n navigationRoutes,\n };\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"StackClient.d.ts","sourceRoot":"","sources":["../../src/layouts/StackClient.tsx"],"names":[],"mappings":"AACA,OAAO,EAGL,aAAa,EAKb,WAAW,IAAI,aAAa,EAE5B,oBAAoB,EACpB,KAAK,SAAS,EACf,MAAM,0BAA0B,CAAC;AAClC,OAAO,EACL,6BAA6B,EAC7B,4BAA4B,EAC7B,MAAM,gCAAgC,CAAC;AAExC,OAAO,KAAK,EAAE,EAAY,cAAc,EAAW,MAAM,OAAO,CAAC;AAOjE,OAAO,EAGL,WAAW,EAGZ,MAAM,eAAe,CAAC;AACvB,OAAO,EAAE,SAAS,EAAE,KAAK,cAAc,EAAE,MAAM,oBAAoB,CAAC;AAOpE;;;GAGG;AACH,MAAM,MAAM,8BAA8B,GAAG,4BAA4B,GAAG;IAC1E,aAAa,CAAC,EAAE;QACd;;;WAGG;QACH,KAAK,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACxB;;;WAGG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACzB;;;WAGG;QACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAC5B;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M,GAAG,MAAM,CAAC;QACxB;;;WAGG;QACH,MAAM,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QACzB;;;WAGG;QACH,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAC5B;;;WAGG;QACH,QAAQ,CAAC,EAAE,MAAM,GAAG,MAAM,CAAC;QAC3B;;;WAGG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;QAChB;;;WAGG;QACH,iBAAiB,CAAC,EAAE,MAAM,CAAC;QAC3B;;;WAGG;QACH,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC;CACH,CAAC;AAEF,QAAA,MAAM,OAAO;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;CAKU,CAAC;AA+BxB;;;;;;;;GAQG;AACH,eAAO,MAAM,mBAAmB,EAAE,WAAW,CAAC,cAAc,CAAC,OAAO,OAAO,CAAC,CAAC,iBAAiB,CAAC,CAqT9F,CAAC;AA0FF,QAAA,MAAM,KAAK,WACD,cAAc,CAAC,OAAO,OAAO,CAAC;;;;;;;;;;CAmDvC,CAAC;AAoCF,eAAe,KAAK,CAAC;AAErB,eAAO,MAAM,WAAW,EAAE,OAAO,aAMhC,CAAC"}
@@ -59,7 +59,7 @@ function isStackAction(action) {
59
59
  const isPreviewAction = (action) => !!action.payload &&
60
60
  'params' in action.payload &&
61
61
  typeof action.payload.params === 'object' &&
62
- !!(0, navigationParams_1.getInternalExpoRouterParams)(action.payload?.params ?? undefined)['__internal__expo_router_is_preview_navigation'];
62
+ !!(0, navigationParams_1.getInternalExpoRouterParams)(action.payload?.params ?? undefined)[navigationParams_1.INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME];
63
63
  /**
64
64
  * React Navigation matches a screen by its name or a 'getID' function that uniquely identifies a screen.
65
65
  * When a screen has been uniquely identified, the Stack can only have one instance of that screen.
@@ -466,7 +466,7 @@ function disableAnimationInScreenOptions(options, condition) {
466
466
  }
467
467
  function shouldDisableAnimationBasedOnParams(route) {
468
468
  const expoParams = (0, navigationParams_1.getInternalExpoRouterParams)(route.params);
469
- return !!expoParams.__internal_expo_router_no_animation;
469
+ return !!expoParams[navigationParams_1.INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME];
470
470
  }
471
471
  exports.default = Stack;
472
472
  const StackRouter = (options) => {
@@ -1 +1 @@
1
- {"version":3,"file":"StackClient.js","sourceRoot":"","sources":["../../src/layouts/StackClient.tsx"],"names":[],"mappings":";AAAA,YAAY,CAAC;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACb,qDAYkC;AAKlC,kDAA2C;AAC3C,+CAAiE;AAEjE,2DAAwD;AACxD,gGAA6F;AAC7F,2EAA2E;AAC3E,0DAAiG;AACjG,8CAA+D;AAC/D,+CAMuB;AACvB,kDAAoE;AACpE,4CAAyC;AAIzC,MAAM,oBAAoB,GAAG,IAAA,uDAA0B,GAAE,CAAC,SAAS,CAAC;AA8CpE,MAAM,OAAO,GAAG,IAAA,qCAAiB,EAK/B,oBAAoB,CAAC,CAAC;AAUxB,SAAS,aAAa,CACpB,MAAwB;IAExB,OAAO,CACL,MAAM,CAAC,IAAI,KAAK,MAAM;QACtB,MAAM,CAAC,IAAI,KAAK,UAAU;QAC1B,MAAM,CAAC,IAAI,KAAK,KAAK;QACrB,MAAM,CAAC,IAAI,KAAK,YAAY;QAC5B,MAAM,CAAC,IAAI,KAAK,SAAS;QACzB,MAAM,CAAC,IAAI,KAAK,SAAS,CAC1B,CAAC;AACJ,CAAC;AAED,MAAM,eAAe,GAAG,CAAC,MAAwB,EAAkC,EAAE,CACnF,CAAC,CAAC,MAAM,CAAC,OAAO;IAChB,QAAQ,IAAI,MAAM,CAAC,OAAO;IAC1B,OAAO,MAAM,CAAC,OAAO,CAAC,MAAM,KAAK,QAAQ;IACzC,CAAC,CAAC,IAAA,8CAA2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AM,UAAU,GAAG,OAAO,CAAC,KAAK,CAAC,CAAC;YAClC,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;gBAC3B,OAAO;oBACL,GAAG,UAAU;oBACb,SAAS,EAAE,MAAM;iBAClB,CAAC;YACJ,CAAC;YACD,OAAO,UAAU,IAAI,EAAE,CAAC;QAC1B,CAAC,CAAC;IACJ,CAAC;IACD,OAAO,CAAC,KAAK,EAAE,EAAE;QACf,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO;gBACL,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;gBAClB,SAAS,EAAE,MAAM;aAClB,CAAC;QACJ,CAAC;QACD,OAAO,OAAO,IAAI,EAAE,CAAC;IACvB,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,mCAAmC,CAAC,KAAuC;IAClF,MAAM,UAAU,GAAG,IAAA,8CAA2B,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7D,OAAO,CAAC,CAAC,UAAU,CAAC,mCAAmC,CAAC;AAC1D,CAAC;AAED,kBAAe,KAAK,CAAC;AAEd,MAAM,WAAW,GAAyB,CAAC,OAAO,EAAE,EAAE;IAC3D,MAAM,MAAM,GAAG,IAAA,oBAAa,EAAC,OAAO,CAAC,CAAC;IACtC,OAAO;QACL,GAAG,MAAM;QACT,GAAG,IAAA,2BAAmB,EAAC,MAAM,CAAC;KAC/B,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,WAAW,eAMtB","sourcesContent":["'use client';\nimport {\n CommonNavigationAction,\n NavigationAction,\n ParamListBase,\n PartialRoute,\n PartialState,\n Route,\n RouterConfigOptions,\n StackRouter as RNStackRouter,\n StackActionType,\n StackNavigationState,\n type RouteProp,\n} from '@react-navigation/native';\nimport {\n NativeStackNavigationEventMap,\n NativeStackNavigationOptions,\n} from '@react-navigation/native-stack';\nimport { nanoid } from 'nanoid/non-secure';\nimport React, { Children, ComponentProps, useMemo } from 'react';\n\nimport { withLayoutContext } from './withLayoutContext';\nimport { createNativeStackNavigator } from '../fork/native-stack/createNativeStackNavigator';\nimport { useLinkPreviewContext } from '../link/preview/LinkPreviewContext';\nimport { getInternalExpoRouterParams, type InternalExpoRouterParams } from '../navigationParams';\nimport { SingularOptions, getSingularId } from '../useScreens';\nimport {\n type StackScreenProps,\n StackHeader,\n StackScreen,\n appendScreenStackPropsToOptions,\n isChildOfType,\n} from './stack-utils';\nimport { Protected, type ProtectedProps } from '../views/Protected';\nimport { Screen } from '../views/Screen';\n\ntype GetId = NonNullable<RouterConfigOptions['routeGetIdList'][string]>;\n\nconst NativeStackNavigator = createNativeStackNavigator().Navigator;\n\n/**\n * We extend NativeStackNavigationOptions with our custom props\n * to allow for several extra props to be used on web, like modalWidth\n */\nexport type ExtendedStackNavigationOptions = NativeStackNavigationOptions & {\n webModalStyle?: {\n /**\n * Override the width of the modal (px or percentage). Only applies on web platform.\n * @platform web\n */\n width?: number | string;\n /**\n * Override the height of the modal (px or percentage). Applies on web desktop.\n * @platform web\n */\n height?: number | string;\n /**\n * Minimum height of the desktop modal (px or percentage). Overrides the default 640px clamp.\n * @platform web\n */\n minHeight?: number | string;\n /**\n * Minimum width of the desktop modal (px or percentage). Overrides the default 580px.\n * @platform web\n */\n minWidth?: number | string;\n /**\n * Override the border of the desktop modal (any valid CSS border value, e.g. '1px solid #ccc' or 'none').\n * @platform web\n */\n border?: string;\n /**\n * Override the overlay background color (any valid CSS color or rgba/hsla value).\n * @platform web\n */\n overlayBackground?: string;\n /**\n * Override the modal shadow filter (any valid CSS filter value, e.g. 'drop-shadow(0 4px 8px rgba(0,0,0,0.1))' or 'none').\n * @platform web\n */\n shadow?: string;\n };\n};\n\nconst RNStack = withLayoutContext<\n ExtendedStackNavigationOptions,\n typeof NativeStackNavigator,\n StackNavigationState<ParamListBase>,\n NativeStackNavigationEventMap\n>(NativeStackNavigator);\n\ntype RNNavigationAction = Extract<CommonNavigationAction, { type: 'NAVIGATE' }>;\ntype RNPreloadAction = Extract<CommonNavigationAction, { type: 'PRELOAD' }>;\ntype ExpoNavigationAction = Omit<RNNavigationAction, 'payload'> & {\n payload: Omit<RNNavigationAction['payload'], 'params'> & {\n params: RNNavigationAction['payload']['params'] & InternalExpoRouterParams;\n };\n};\n\nfunction isStackAction(\n action: NavigationAction\n): action is StackActionType | RNPreloadAction | ExpoNavigationAction {\n return (\n action.type === 'PUSH' ||\n action.type === 'NAVIGATE' ||\n action.type === 'POP' ||\n action.type === 'POP_TO_TOP' ||\n action.type === 'REPLACE' ||\n action.type === 'PRELOAD'\n );\n}\n\nconst isPreviewAction = (action: NavigationAction): action is ExpoNavigationAction =>\n !!action.payload &&\n 'params' in action.payload &&\n typeof action.payload.params === 'object' &&\n !!getInternalExpoRouterParams(action.payload?.params ?? undefined)[\n '__internal__expo_router_is_preview_navigation'\n ];\n\n/**\n * React Navigation matches a screen by its name or a 'getID' function that uniquely identifies a screen.\n * When a screen has been uniquely identified, the Stack can only have one instance of that screen.\n *\n * Expo Router allows for a screen to be matched by name and path params, a 'getID' function or a singular id.\n *\n * Instead of reimplementing the entire StackRouter, we can override the getStateForAction method to handle the singular screen logic.\n *\n */\nexport const stackRouterOverride: NonNullable<ComponentProps<typeof RNStack>['UNSTABLE_router']> = (\n original\n) => {\n return {\n getStateForAction: (state, action, options) => {\n if (action.target && action.target !== state.key) {\n return null;\n }\n\n if (!isStackAction(action)) {\n return original.getStateForAction(state, action, options);\n }\n\n // The dynamic getId added to an action, `router.push('screen', { singular: true })`\n const actionSingularOptions =\n action.payload && 'singular' in action.payload\n ? (action.payload.singular as SingularOptions)\n : undefined;\n\n // Handle if 'getID' or 'singular' is set.\n function getIdFunction(): GetId | undefined {\n // Actions can be fired by the user, so we do need to validate their structure.\n if (\n !('payload' in action) ||\n !action.payload ||\n !('name' in action.payload) ||\n typeof action.payload.name !== 'string'\n ) {\n return;\n }\n\n const actionName = action.payload.name;\n\n return (\n // The dynamic singular added to an action, `router.push('screen', { singular: () => 'id' })`\n getActionSingularIdFn(actionSingularOptions, actionName) ||\n // The static getId added as a prop to `<Screen singular />` or `<Screen getId={} />`\n options.routeGetIdList[actionName]\n );\n }\n\n const { routeParamList } = options;\n\n switch (action.type) {\n case 'PUSH':\n case 'NAVIGATE': {\n if (!state.routeNames.includes(action.payload.name)) {\n return null;\n }\n\n // START FORK\n const getId = getIdFunction();\n // const getId = options.routeGetIdList[action.payload.name];\n // END FORK\n const id = getId?.({ params: action.payload.params });\n\n let route: Route<string> | undefined;\n\n if (id !== undefined) {\n route = state.routes.findLast(\n (route) =>\n route.name === action.payload.name && id === getId?.({ params: route.params })\n );\n } else if (action.type === 'NAVIGATE') {\n const currentRoute = state.routes[state.index];\n\n // If the route matches the current one, then navigate to it\n if (action.payload.name === currentRoute.name && !isPreviewAction(action)) {\n route = currentRoute;\n } else if (action.payload.pop) {\n route = state.routes.findLast((route) => route.name === action.payload.name);\n }\n }\n\n // START FORK\n if (isPreviewAction(action) && !route) {\n route = state.preloadedRoutes.find(\n (route) => route.name === action.payload.name && id === route.key\n );\n }\n // END FORK\n\n if (!route) {\n route = state.preloadedRoutes.find(\n (route) =>\n route.name === action.payload.name && id === getId?.({ params: route.params })\n );\n }\n\n let params;\n\n if (action.type === 'NAVIGATE' && action.payload.merge && route) {\n params =\n action.payload.params !== undefined ||\n routeParamList[action.payload.name] !== undefined\n ? {\n ...routeParamList[action.payload.name],\n ...route.params,\n ...action.payload.params,\n }\n : route.params;\n } else {\n params =\n routeParamList[action.payload.name] !== undefined\n ? {\n ...routeParamList[action.payload.name],\n ...action.payload.params,\n }\n : action.payload.params;\n }\n\n let routes: Route<string>[];\n\n if (route) {\n if (action.type === 'NAVIGATE' && action.payload.pop) {\n routes = [];\n\n // Get all routes until the matching one\n for (const r of state.routes) {\n if (r.key === route.key) {\n routes.push({\n ...route,\n path: action.payload.path !== undefined ? action.payload.path : route.path,\n params,\n });\n break;\n }\n\n routes.push(r);\n }\n } else {\n // START FORK\n // If there is an id, then filter out the existing route with the same id.\n // THIS ACTION IS DANGEROUS. This can cause React Native Screens to freeze\n if (id !== undefined) {\n routes = state.routes.filter((r) => r.key !== route.key);\n } else if (action.type === 'NAVIGATE' && state.routes.length > 0) {\n // The navigation action should only replace the last route if it has the same name and path params.\n const lastRoute = state.routes[state.routes.length - 1];\n if (\n getSingularId(lastRoute.name, { params: lastRoute.params }) ===\n getSingularId(route.name, { params })\n ) {\n routes = state.routes.slice(0, -1);\n } else {\n routes = [...state.routes];\n }\n } else {\n routes = [...state.routes];\n }\n\n // If the routes length is the same as the state routes length, then we are navigating to a new route.\n // Otherwise we are replacing an existing route.\n const key =\n routes.length === state.routes.length && !isPreviewAction(action)\n ? `${action.payload.name}-${nanoid()}`\n : route.key;\n\n routes.push({\n ...route,\n key,\n path:\n action.type === 'NAVIGATE' && action.payload.path !== undefined\n ? action.payload.path\n : route.path,\n params,\n });\n\n // routes = state.routes.filter((r) => r.key !== route.key);\n // routes.push({\n // ...route,\n // path:\n // action.type === 'NAVIGATE' && action.payload.path !== undefined\n // ? action.payload.path\n // : route.path,\n // params,\n // });\n // END FORK\n }\n } else {\n routes = [\n ...state.routes,\n {\n key: `${action.payload.name}-${nanoid()}`,\n name: action.payload.name,\n path: action.type === 'NAVIGATE' ? action.payload.path : undefined,\n params,\n },\n ];\n }\n\n // START FORK\n // return filterSingular(\n const result = {\n ...state,\n index: routes.length - 1,\n preloadedRoutes: state.preloadedRoutes.filter(\n (route) => routes[routes.length - 1].key !== route.key\n ),\n routes,\n };\n\n if (actionSingularOptions) {\n return filterSingular(result, getId);\n }\n\n return result;\n // return {\n // ...state,\n // index: routes.length - 1,\n // preloadedRoutes: state.preloadedRoutes.filter(\n // (route) => routes[routes.length - 1].key !== route.key\n // ),\n // routes,\n // };\n // END FORK\n }\n case 'PRELOAD': {\n // START FORK\n // This will be the case for example for protected route\n if (!state.routeNames.includes(action.payload.name)) {\n return null;\n }\n // END FORK\n const getId = options.routeGetIdList[action.payload.name];\n const id = getId?.({ params: action.payload.params });\n\n let route: Route<string> | undefined;\n\n if (id !== undefined) {\n route = state.routes.find(\n (route) =>\n route.name === action.payload.name && id === getId?.({ params: route.params })\n );\n }\n\n if (route) {\n return {\n ...state,\n routes: state.routes.map((r) => {\n if (r.key !== route?.key) {\n return r;\n }\n return {\n ...r,\n params:\n routeParamList[action.payload.name] !== undefined\n ? {\n ...routeParamList[action.payload.name],\n ...action.payload.params,\n }\n : action.payload.params,\n };\n }),\n };\n } else {\n // START FORK\n const currentPreloadedRoute: (typeof state)['preloadedRoutes'][number] = {\n key: `${action.payload.name}-${nanoid()}`,\n name: action.payload.name,\n params:\n routeParamList[action.payload.name] !== undefined\n ? {\n ...routeParamList[action.payload.name],\n ...action.payload.params,\n }\n : action.payload.params,\n };\n // END FORK\n return {\n ...state,\n // START FORK\n // Adding the current preloaded route to the beginning of the preloadedRoutes array\n // This ensures that the preloaded route will be the next one after the visible route\n // and when navigation will happen, there will be no reshuffling\n // This is a workaround for the link preview navigation issue, when screen would freeze after navigation from native side\n // and reshuffling from react-navigation\n preloadedRoutes: [currentPreloadedRoute].concat(\n state.preloadedRoutes.filter(\n (r) => r.name !== action.payload.name || id !== getId?.({ params: r.params })\n )\n ),\n // preloadedRoutes: state.preloadedRoutes\n // .filter(\n // (r) =>\n // r.name !== action.payload.name ||\n // id !== getId?.({ params: r.params })\n // )\n // .concat({\n // key: `${action.payload.name}-${nanoid()}`,\n // name: action.payload.name,\n // params:\n // routeParamList[action.payload.name] !== undefined\n // ? {\n // ...routeParamList[action.payload.name],\n // ...action.payload.params,\n // }\n // : action.payload.params,\n // }),\n // END FORK\n };\n }\n }\n default: {\n return original.getStateForAction(state, action, options);\n }\n }\n },\n };\n};\n\nfunction getActionSingularIdFn(\n actionGetId: SingularOptions | undefined,\n name: string\n): GetId | undefined {\n if (typeof actionGetId === 'function') {\n return (options) => actionGetId(name, options.params ?? {});\n } else if (actionGetId === true) {\n return (options) => getSingularId(name, options);\n }\n\n return undefined;\n}\n\n/**\n * If there is a dynamic singular on an action, then we need to filter the state to only have singular screens.\n * As multiples may have been added before we did the singular navigation.\n */\nfunction filterSingular<\n T extends\n | StackNavigationState<ParamListBase>\n | PartialState<StackNavigationState<ParamListBase>>\n | null,\n>(state: T, getId?: GetId): T {\n if (!state) {\n return state;\n }\n\n if (!state.routes) {\n return state;\n }\n\n const currentIndex = state.index || state.routes.length - 1;\n const current = state.routes[currentIndex];\n const name = current.name;\n\n const id = getId?.({ params: current.params });\n\n if (!id) {\n return state;\n }\n\n // TypeScript needs a type assertion here for the filter to work.\n let routes = state.routes as PartialRoute<Route<string, object | undefined>>[];\n routes = routes.filter((route, index) => {\n // If the route is the current route, keep it.\n if (index === currentIndex) {\n return true;\n }\n\n // Remove all other routes with the same name and id.\n return name !== route.name || id !== getId?.({ params: route.params });\n });\n\n return {\n ...state,\n index: routes.length - 1,\n routes,\n };\n}\n\nfunction mapProtectedScreen(props: ProtectedProps): ProtectedProps {\n return {\n ...props,\n children: Children.toArray(props.children)\n .map((child, index) => {\n if (isChildOfType(child, StackScreen)) {\n const options = appendScreenStackPropsToOptions({}, child.props);\n const { children, ...rest } = child.props;\n return <Screen key={child.props.name} {...rest} options={options} />;\n } else if (isChildOfType(child, Protected)) {\n return <Protected key={`${index}-${props.guard}`} {...mapProtectedScreen(child.props)} />;\n } else if (isChildOfType(child, StackHeader)) {\n // Ignore Stack.Header, because it can be used to set header options for Stack\n // and we use this function to process children of Stack, as well.\n return null;\n } else {\n if (React.isValidElement(child)) {\n console.warn(`Warning: Unknown child element passed to Stack: ${child.type}`);\n } else {\n console.warn(`Warning: Unknown child element passed to Stack: ${child}`);\n }\n }\n return null;\n })\n .filter(Boolean),\n };\n}\n\nconst Stack = Object.assign(\n (props: ComponentProps<typeof RNStack>) => {\n const { isStackAnimationDisabled } = useLinkPreviewContext();\n\n const screenOptionsWithCompositionAPIOptions = useMemo<NativeStackScreenOptions>(() => {\n const stackHeader = Children.toArray(props.children).find((child) =>\n isChildOfType(child, StackHeader)\n );\n if (stackHeader) {\n const screenStackProps: StackScreenProps = { children: stackHeader };\n const currentOptions = props.screenOptions;\n if (currentOptions) {\n if (typeof currentOptions === 'function') {\n return (...args) => {\n const options = currentOptions(...args);\n return appendScreenStackPropsToOptions(options, screenStackProps);\n };\n }\n return appendScreenStackPropsToOptions(currentOptions, screenStackProps);\n } else {\n return appendScreenStackPropsToOptions({}, screenStackProps);\n }\n } else {\n return props.screenOptions;\n }\n }, [props.screenOptions, props.children]);\n\n const screenOptions = useMemo(() => {\n const condition = isStackAnimationDisabled ? () => true : shouldDisableAnimationBasedOnParams;\n\n return disableAnimationInScreenOptions(screenOptionsWithCompositionAPIOptions, condition);\n }, [screenOptionsWithCompositionAPIOptions, isStackAnimationDisabled]);\n\n const rnChildren = useMemo(\n () => mapProtectedScreen({ guard: true, children: props.children }).children,\n [props.children]\n );\n\n return (\n <RNStack\n {...props}\n children={rnChildren}\n screenOptions={screenOptions}\n UNSTABLE_router={stackRouterOverride}\n />\n );\n },\n {\n Screen: StackScreen,\n Protected,\n Header: StackHeader,\n }\n);\n\ntype NativeStackScreenOptions = ComponentProps<typeof RNStack>['screenOptions'];\n\nfunction disableAnimationInScreenOptions(\n options: NativeStackScreenOptions | undefined,\n condition: (route: RouteProp<ParamListBase, string>) => boolean\n): NativeStackScreenOptions {\n if (options && typeof options === 'function') {\n return (props) => {\n const oldOptions = options(props);\n if (condition(props.route)) {\n return {\n ...oldOptions,\n animation: 'none',\n };\n }\n return oldOptions ?? {};\n };\n }\n return (props) => {\n if (condition(props.route)) {\n return {\n ...(options ?? {}),\n animation: 'none',\n };\n }\n return options ?? {};\n };\n}\n\nfunction shouldDisableAnimationBasedOnParams(route: RouteProp<ParamListBase, string>): boolean {\n const expoParams = getInternalExpoRouterParams(route.params);\n return !!expoParams.__internal_expo_router_no_animation;\n}\n\nexport default Stack;\n\nexport const StackRouter: typeof RNStackRouter = (options) => {\n const router = RNStackRouter(options);\n return {\n ...router,\n ...stackRouterOverride(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,EAAE;QACf,IAAI,SAAS,CAAC,KAAK,CAAC,KAAK,CAAC,EAAE,CAAC;YAC3B,OAAO;gBACL,GAAG,CAAC,OAAO,IAAI,EAAE,CAAC;gBAClB,SAAS,EAAE,MAAM;aAClB,CAAC;QACJ,CAAC;QACD,OAAO,OAAO,IAAI,EAAE,CAAC;IACvB,CAAC,CAAC;AACJ,CAAC;AAED,SAAS,mCAAmC,CAAC,KAAuC;IAClF,MAAM,UAAU,GAAG,IAAA,8CAA2B,EAAC,KAAK,CAAC,MAAM,CAAC,CAAC;IAC7D,OAAO,CAAC,CAAC,UAAU,CAAC,+DAA4C,CAAC,CAAC;AACpE,CAAC;AAED,kBAAe,KAAK,CAAC;AAEd,MAAM,WAAW,GAAyB,CAAC,OAAO,EAAE,EAAE;IAC3D,MAAM,MAAM,GAAG,IAAA,oBAAa,EAAC,OAAO,CAAC,CAAC;IACtC,OAAO;QACL,GAAG,MAAM;QACT,GAAG,IAAA,2BAAmB,EAAC,MAAM,CAAC;KAC/B,CAAC;AACJ,CAAC,CAAC;AANW,QAAA,WAAW,eAMtB","sourcesContent":["'use client';\nimport {\n CommonNavigationAction,\n NavigationAction,\n ParamListBase,\n PartialRoute,\n PartialState,\n Route,\n RouterConfigOptions,\n StackRouter as RNStackRouter,\n StackActionType,\n StackNavigationState,\n type RouteProp,\n} from '@react-navigation/native';\nimport {\n NativeStackNavigationEventMap,\n NativeStackNavigationOptions,\n} from '@react-navigation/native-stack';\nimport { nanoid } from 'nanoid/non-secure';\nimport React, { Children, ComponentProps, useMemo } from 'react';\n\nimport { withLayoutContext } from './withLayoutContext';\nimport { createNativeStackNavigator } from '../fork/native-stack/createNativeStackNavigator';\nimport { useLinkPreviewContext } from '../link/preview/LinkPreviewContext';\nimport {\n getInternalExpoRouterParams,\n INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME,\n INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME,\n type InternalExpoRouterParams,\n} from '../navigationParams';\nimport { SingularOptions, getSingularId } from '../useScreens';\nimport {\n type StackScreenProps,\n StackHeader,\n StackScreen,\n appendScreenStackPropsToOptions,\n isChildOfType,\n} from './stack-utils';\nimport { Protected, type ProtectedProps } from '../views/Protected';\nimport { Screen } from '../views/Screen';\n\ntype GetId = NonNullable<RouterConfigOptions['routeGetIdList'][string]>;\n\nconst NativeStackNavigator = createNativeStackNavigator().Navigator;\n\n/**\n * We extend NativeStackNavigationOptions with our custom props\n * to allow for several extra props to be used on web, like modalWidth\n */\nexport type ExtendedStackNavigationOptions = NativeStackNavigationOptions & {\n webModalStyle?: {\n /**\n * Override the width of the modal (px or percentage). Only applies on web platform.\n * @platform web\n */\n width?: number | string;\n /**\n * Override the height of the modal (px or percentage). Applies on web desktop.\n * @platform web\n */\n height?: number | string;\n /**\n * Minimum height of the desktop modal (px or percentage). Overrides the default 640px clamp.\n * @platform web\n */\n minHeight?: number | string;\n /**\n * Minimum width of the desktop modal (px or percentage). Overrides the default 580px.\n * @platform web\n */\n minWidth?: number | string;\n /**\n * Override the border of the desktop modal (any valid CSS border value, e.g. '1px solid #ccc' or 'none').\n * @platform web\n */\n border?: string;\n /**\n * Override the overlay background color (any valid CSS color or rgba/hsla value).\n * @platform web\n */\n overlayBackground?: string;\n /**\n * Override the modal shadow filter (any valid CSS filter value, e.g. 'drop-shadow(0 4px 8px rgba(0,0,0,0.1))' or 'none').\n * @platform web\n */\n shadow?: string;\n };\n};\n\nconst RNStack = withLayoutContext<\n ExtendedStackNavigationOptions,\n typeof NativeStackNavigator,\n StackNavigationState<ParamListBase>,\n NativeStackNavigationEventMap\n>(NativeStackNavigator);\n\ntype RNNavigationAction = Extract<CommonNavigationAction, { type: 'NAVIGATE' }>;\ntype RNPreloadAction = Extract<CommonNavigationAction, { type: 'PRELOAD' }>;\ntype ExpoNavigationAction = Omit<RNNavigationAction, 'payload'> & {\n payload: Omit<RNNavigationAction['payload'], 'params'> & {\n params: RNNavigationAction['payload']['params'] & InternalExpoRouterParams;\n };\n};\n\nfunction isStackAction(\n action: NavigationAction\n): action is StackActionType | RNPreloadAction | ExpoNavigationAction {\n return (\n action.type === 'PUSH' ||\n action.type === 'NAVIGATE' ||\n action.type === 'POP' ||\n action.type === 'POP_TO_TOP' ||\n action.type === 'REPLACE' ||\n action.type === 'PRELOAD'\n );\n}\n\nconst isPreviewAction = (action: NavigationAction): action is ExpoNavigationAction =>\n !!action.payload &&\n 'params' in action.payload &&\n typeof action.payload.params === 'object' &&\n !!getInternalExpoRouterParams(action.payload?.params ?? undefined)[\n INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME\n ];\n\n/**\n * React Navigation matches a screen by its name or a 'getID' function that uniquely identifies a screen.\n * When a screen has been uniquely identified, the Stack can only have one instance of that screen.\n *\n * Expo Router allows for a screen to be matched by name and path params, a 'getID' function or a singular id.\n *\n * Instead of reimplementing the entire StackRouter, we can override the getStateForAction method to handle the singular screen logic.\n *\n */\nexport const stackRouterOverride: NonNullable<ComponentProps<typeof RNStack>['UNSTABLE_router']> = (\n original\n) => {\n return {\n getStateForAction: (state, action, options) => {\n if (action.target && action.target !== state.key) {\n return null;\n }\n\n if (!isStackAction(action)) {\n return original.getStateForAction(state, action, options);\n }\n\n // The dynamic getId added to an action, `router.push('screen', { singular: true })`\n const actionSingularOptions =\n action.payload && 'singular' in action.payload\n ? (action.payload.singular as SingularOptions)\n : undefined;\n\n // Handle if 'getID' or 'singular' is set.\n function getIdFunction(): GetId | undefined {\n // Actions can be fired by the user, so we do need to validate their structure.\n if (\n !('payload' in action) ||\n !action.payload ||\n !('name' in action.payload) ||\n typeof action.payload.name !== 'string'\n ) {\n return;\n }\n\n const actionName = action.payload.name;\n\n return (\n // The dynamic singular added to an action, `router.push('screen', { singular: () => 'id' })`\n getActionSingularIdFn(actionSingularOptions, actionName) ||\n // The static getId added as a prop to `<Screen singular />` or `<Screen getId={} />`\n options.routeGetIdList[actionName]\n );\n }\n\n const { routeParamList } = options;\n\n switch (action.type) {\n case 'PUSH':\n case 'NAVIGATE': {\n if (!state.routeNames.includes(action.payload.name)) {\n return null;\n }\n\n // START FORK\n const getId = getIdFunction();\n // const getId = options.routeGetIdList[action.payload.name];\n // END FORK\n const id = getId?.({ params: action.payload.params });\n\n let route: Route<string> | undefined;\n\n if (id !== undefined) {\n route = state.routes.findLast(\n (route) =>\n route.name === action.payload.name && id === getId?.({ params: route.params })\n );\n } else if (action.type === 'NAVIGATE') {\n const currentRoute = state.routes[state.index];\n\n // If the route matches the current one, then navigate to it\n if (action.payload.name === currentRoute.name && !isPreviewAction(action)) {\n route = currentRoute;\n } else if (action.payload.pop) {\n route = state.routes.findLast((route) => route.name === action.payload.name);\n }\n }\n\n // START FORK\n if (isPreviewAction(action) && !route) {\n route = state.preloadedRoutes.find(\n (route) => route.name === action.payload.name && id === route.key\n );\n }\n // END FORK\n\n if (!route) {\n route = state.preloadedRoutes.find(\n (route) =>\n route.name === action.payload.name && id === getId?.({ params: route.params })\n );\n }\n\n let params;\n\n if (action.type === 'NAVIGATE' && action.payload.merge && route) {\n params =\n action.payload.params !== undefined ||\n routeParamList[action.payload.name] !== undefined\n ? {\n ...routeParamList[action.payload.name],\n ...route.params,\n ...action.payload.params,\n }\n : route.params;\n } else {\n params =\n routeParamList[action.payload.name] !== undefined\n ? {\n ...routeParamList[action.payload.name],\n ...action.payload.params,\n }\n : action.payload.params;\n }\n\n let routes: Route<string>[];\n\n if (route) {\n if (action.type === 'NAVIGATE' && action.payload.pop) {\n routes = [];\n\n // Get all routes until the matching one\n for (const r of state.routes) {\n if (r.key === route.key) {\n routes.push({\n ...route,\n path: action.payload.path !== undefined ? action.payload.path : route.path,\n params,\n });\n break;\n }\n\n routes.push(r);\n }\n } else {\n // START FORK\n // If there is an id, then filter out the existing route with the same id.\n // THIS ACTION IS DANGEROUS. This can cause React Native Screens to freeze\n if (id !== undefined) {\n routes = state.routes.filter((r) => r.key !== route.key);\n } else if (action.type === 'NAVIGATE' && state.routes.length > 0) {\n // The navigation action should only replace the last route if it has the same name and path params.\n const lastRoute = state.routes[state.routes.length - 1];\n if (\n getSingularId(lastRoute.name, { params: lastRoute.params }) ===\n getSingularId(route.name, { params })\n ) {\n routes = state.routes.slice(0, -1);\n } else {\n routes = [...state.routes];\n }\n } else {\n routes = [...state.routes];\n }\n\n // If the routes length is the same as the state routes length, then we are navigating to a new route.\n // Otherwise we are replacing an existing route.\n const key =\n routes.length === state.routes.length && !isPreviewAction(action)\n ? `${action.payload.name}-${nanoid()}`\n : route.key;\n\n routes.push({\n ...route,\n key,\n path:\n action.type === 'NAVIGATE' && action.payload.path !== undefined\n ? action.payload.path\n : route.path,\n params,\n });\n\n // routes = state.routes.filter((r) => r.key !== route.key);\n // routes.push({\n // ...route,\n // path:\n // action.type === 'NAVIGATE' && action.payload.path !== undefined\n // ? action.payload.path\n // : route.path,\n // params,\n // });\n // END FORK\n }\n } else {\n routes = [\n ...state.routes,\n {\n key: `${action.payload.name}-${nanoid()}`,\n name: action.payload.name,\n path: action.type === 'NAVIGATE' ? action.payload.path : undefined,\n params,\n },\n ];\n }\n\n // START FORK\n // return filterSingular(\n const result = {\n ...state,\n index: routes.length - 1,\n preloadedRoutes: state.preloadedRoutes.filter(\n (route) => routes[routes.length - 1].key !== route.key\n ),\n routes,\n };\n\n if (actionSingularOptions) {\n return filterSingular(result, getId);\n }\n\n return result;\n // return {\n // ...state,\n // index: routes.length - 1,\n // preloadedRoutes: state.preloadedRoutes.filter(\n // (route) => routes[routes.length - 1].key !== route.key\n // ),\n // routes,\n // };\n // END FORK\n }\n case 'PRELOAD': {\n // START FORK\n // This will be the case for example for protected route\n if (!state.routeNames.includes(action.payload.name)) {\n return null;\n }\n // END FORK\n const getId = options.routeGetIdList[action.payload.name];\n const id = getId?.({ params: action.payload.params });\n\n let route: Route<string> | undefined;\n\n if (id !== undefined) {\n route = state.routes.find(\n (route) =>\n route.name === action.payload.name && id === getId?.({ params: route.params })\n );\n }\n\n if (route) {\n return {\n ...state,\n routes: state.routes.map((r) => {\n if (r.key !== route?.key) {\n return r;\n }\n return {\n ...r,\n params:\n routeParamList[action.payload.name] !== undefined\n ? {\n ...routeParamList[action.payload.name],\n ...action.payload.params,\n }\n : action.payload.params,\n };\n }),\n };\n } else {\n // START FORK\n const currentPreloadedRoute: (typeof state)['preloadedRoutes'][number] = {\n key: `${action.payload.name}-${nanoid()}`,\n name: action.payload.name,\n params:\n routeParamList[action.payload.name] !== undefined\n ? {\n ...routeParamList[action.payload.name],\n ...action.payload.params,\n }\n : action.payload.params,\n };\n // END FORK\n return {\n ...state,\n // START FORK\n // Adding the current preloaded route to the beginning of the preloadedRoutes array\n // This ensures that the preloaded route will be the next one after the visible route\n // and when navigation will happen, there will be no reshuffling\n // This is a workaround for the link preview navigation issue, when screen would freeze after navigation from native side\n // and reshuffling from react-navigation\n preloadedRoutes: [currentPreloadedRoute].concat(\n state.preloadedRoutes.filter(\n (r) => r.name !== action.payload.name || id !== getId?.({ params: r.params })\n )\n ),\n // preloadedRoutes: state.preloadedRoutes\n // .filter(\n // (r) =>\n // r.name !== action.payload.name ||\n // id !== getId?.({ params: r.params })\n // )\n // .concat({\n // key: `${action.payload.name}-${nanoid()}`,\n // name: action.payload.name,\n // params:\n // routeParamList[action.payload.name] !== undefined\n // ? {\n // ...routeParamList[action.payload.name],\n // ...action.payload.params,\n // }\n // : action.payload.params,\n // }),\n // END FORK\n };\n }\n }\n default: {\n return original.getStateForAction(state, action, options);\n }\n }\n },\n };\n};\n\nfunction getActionSingularIdFn(\n actionGetId: SingularOptions | undefined,\n name: string\n): GetId | undefined {\n if (typeof actionGetId === 'function') {\n return (options) => actionGetId(name, options.params ?? {});\n } else if (actionGetId === true) {\n return (options) => getSingularId(name, options);\n }\n\n return undefined;\n}\n\n/**\n * If there is a dynamic singular on an action, then we need to filter the state to only have singular screens.\n * As multiples may have been added before we did the singular navigation.\n */\nfunction filterSingular<\n T extends\n | StackNavigationState<ParamListBase>\n | PartialState<StackNavigationState<ParamListBase>>\n | null,\n>(state: T, getId?: GetId): T {\n if (!state) {\n return state;\n }\n\n if (!state.routes) {\n return state;\n }\n\n const currentIndex = state.index || state.routes.length - 1;\n const current = state.routes[currentIndex];\n const name = current.name;\n\n const id = getId?.({ params: current.params });\n\n if (!id) {\n return state;\n }\n\n // TypeScript needs a type assertion here for the filter to work.\n let routes = state.routes as PartialRoute<Route<string, object | undefined>>[];\n routes = routes.filter((route, index) => {\n // If the route is the current route, keep it.\n if (index === currentIndex) {\n return true;\n }\n\n // Remove all other routes with the same name and id.\n return name !== route.name || id !== getId?.({ params: route.params });\n });\n\n return {\n ...state,\n index: routes.length - 1,\n routes,\n };\n}\n\nfunction mapProtectedScreen(props: ProtectedProps): ProtectedProps {\n return {\n ...props,\n children: Children.toArray(props.children)\n .map((child, index) => {\n if (isChildOfType(child, StackScreen)) {\n const options = appendScreenStackPropsToOptions({}, child.props);\n const { children, ...rest } = child.props;\n return <Screen key={child.props.name} {...rest} options={options} />;\n } else if (isChildOfType(child, Protected)) {\n return <Protected key={`${index}-${props.guard}`} {...mapProtectedScreen(child.props)} />;\n } else if (isChildOfType(child, StackHeader)) {\n // Ignore Stack.Header, because it can be used to set header options for Stack\n // and we use this function to process children of Stack, as well.\n return null;\n } else {\n if (React.isValidElement(child)) {\n console.warn(`Warning: Unknown child element passed to Stack: ${child.type}`);\n } else {\n console.warn(`Warning: Unknown child element passed to Stack: ${child}`);\n }\n }\n return null;\n })\n .filter(Boolean),\n };\n}\n\nconst Stack = Object.assign(\n (props: ComponentProps<typeof RNStack>) => {\n const { isStackAnimationDisabled } = useLinkPreviewContext();\n\n const screenOptionsWithCompositionAPIOptions = useMemo<NativeStackScreenOptions>(() => {\n const stackHeader = Children.toArray(props.children).find((child) =>\n isChildOfType(child, StackHeader)\n );\n if (stackHeader) {\n const screenStackProps: StackScreenProps = { children: stackHeader };\n const currentOptions = props.screenOptions;\n if (currentOptions) {\n if (typeof currentOptions === 'function') {\n return (...args) => {\n const options = currentOptions(...args);\n return appendScreenStackPropsToOptions(options, screenStackProps);\n };\n }\n return appendScreenStackPropsToOptions(currentOptions, screenStackProps);\n } else {\n return appendScreenStackPropsToOptions({}, screenStackProps);\n }\n } else {\n return props.screenOptions;\n }\n }, [props.screenOptions, props.children]);\n\n const screenOptions = useMemo(() => {\n const condition = isStackAnimationDisabled ? () => true : shouldDisableAnimationBasedOnParams;\n\n return disableAnimationInScreenOptions(screenOptionsWithCompositionAPIOptions, condition);\n }, [screenOptionsWithCompositionAPIOptions, isStackAnimationDisabled]);\n\n const rnChildren = useMemo(\n () => mapProtectedScreen({ guard: true, children: props.children }).children,\n [props.children]\n );\n\n return (\n <RNStack\n {...props}\n children={rnChildren}\n screenOptions={screenOptions}\n UNSTABLE_router={stackRouterOverride}\n />\n );\n },\n {\n Screen: StackScreen,\n Protected,\n Header: StackHeader,\n }\n);\n\ntype NativeStackScreenOptions = ComponentProps<typeof RNStack>['screenOptions'];\n\nfunction disableAnimationInScreenOptions(\n options: NativeStackScreenOptions | undefined,\n condition: (route: RouteProp<ParamListBase, string>) => boolean\n): NativeStackScreenOptions {\n if (options && typeof options === 'function') {\n return (props) => {\n const oldOptions = options(props);\n if (condition(props.route)) {\n return {\n ...oldOptions,\n animation: 'none',\n };\n }\n return oldOptions ?? {};\n };\n }\n return (props) => {\n if (condition(props.route)) {\n return {\n ...(options ?? {}),\n animation: 'none',\n };\n }\n return options ?? {};\n };\n}\n\nfunction shouldDisableAnimationBasedOnParams(route: RouteProp<ParamListBase, string>): boolean {\n const expoParams = getInternalExpoRouterParams(route.params);\n return !!expoParams[INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME];\n}\n\nexport default Stack;\n\nexport const StackRouter: typeof RNStackRouter = (options) => {\n const router = RNStackRouter(options);\n return {\n ...router,\n ...stackRouterOverride(router),\n };\n};\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NativeBottomTabsRouter.d.ts","sourceRoot":"","sources":["../../src/native-tabs/NativeBottomTabsRouter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,MAAM,EACN,aAAa,EACb,kBAAkB,EAElB,KAAK,gBAAgB,EACtB,MAAM,0BAA0B,CAAC;AAQlC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,0IAiD/D"}
1
+ {"version":3,"file":"NativeBottomTabsRouter.d.ts","sourceRoot":"","sources":["../../src/native-tabs/NativeBottomTabsRouter.tsx"],"names":[],"mappings":"AAAA,OAAO,EAEL,aAAa,EACb,MAAM,EACN,aAAa,EACb,kBAAkB,EAElB,KAAK,gBAAgB,EACtB,MAAM,0BAA0B,CAAC;AASlC,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,gBAAgB,0IAiD/D"}
@@ -24,7 +24,7 @@ function NativeBottomTabsRouter(options) {
24
24
  }
25
25
  const expoParams = (0, navigationParams_1.getInternalExpoRouterParams)(action.payload.params);
26
26
  if (route.params && 'screen' in route.params) {
27
- expoParams['__internal_expo_router_no_animation'] = true;
27
+ expoParams[navigationParams_1.INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME] = true;
28
28
  }
29
29
  const params = (0, navigationParams_1.appendInternalExpoRouterParams)(route.params, expoParams);
30
30
  return {
@@ -1 +1 @@
1
- {"version":3,"file":"NativeBottomTabsRouter.js","sourceRoot":"","sources":["../../src/native-tabs/NativeBottomTabsRouter.tsx"],"names":[],"mappings":";;AAgBA,wDAiDC;AAjED,qDAQkC;AAElC,0DAI6B;AAE7B,SAAgB,sBAAsB,CAAC,OAAyB;IAC9D,MAAM,SAAS,GAAG,IAAA,kBAAS,EAAC,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAE5C,MAAM,eAAe,GAGjB;QACF,GAAG,SAAS;QACZ,qEAAqE;QACrE,iBAAiB,EAAE,CAAC,KAAK,EAAE,MAA8C,EAAE,OAAO,EAAE,EAAE;YACpF,QAAQ,MAAM,CAAC,IAAI,EAAE,CAAC;gBACpB,KAAK,UAAU,CAAC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import {\n CommonNavigationAction,\n ParamListBase,\n Router,\n TabActionType,\n TabNavigationState,\n TabRouter,\n type TabRouterOptions,\n} from '@react-navigation/native';\n\nimport {\n appendInternalExpoRouterParams,\n getInternalExpoRouterParams,\n type InternalExpoRouterParams,\n} from '../navigationParams';\n\nexport function NativeBottomTabsRouter(options: TabRouterOptions) {\n const tabRouter = TabRouter({ ...options });\n\n const nativeTabRouter: Router<\n TabNavigationState<ParamListBase>,\n TabActionType | CommonNavigationAction\n > = {\n ...tabRouter,\n // @ts-expect-error TODO: For some reason this is not typed correctly\n getStateForAction: (state, action: TabActionType | CommonNavigationAction, options) => {\n switch (action.type) {\n case 'NAVIGATE': {\n const newStateFromNavigation = tabRouter.getStateForAction(state, action, options);\n const index = state.routes.findIndex((route) => route.name === action.payload.name);\n\n if (index === -1 || !newStateFromNavigation) {\n return newStateFromNavigation;\n }\n\n const newState = {\n ...newStateFromNavigation,\n routes: newStateFromNavigation.routes.map((route) => {\n if (route.name !== action.payload.name) {\n return route;\n }\n\n const expoParams: InternalExpoRouterParams = getInternalExpoRouterParams(\n action.payload.params\n );\n\n if (route.params && 'screen' in route.params) {\n expoParams['__internal_expo_router_no_animation'] = true;\n }\n\n const params = appendInternalExpoRouterParams(route.params, expoParams);\n return {\n ...route,\n params,\n };\n }),\n };\n return newState;\n }\n }\n return tabRouter.getStateForAction(state, action, options);\n },\n };\n\n return nativeTabRouter;\n}\n"]}
1
+ {"version":3,"file":"NativeBottomTabsRouter.js","sourceRoot":"","sources":["../../src/native-tabs/NativeBottomTabsRouter.tsx"],"names":[],"mappings":";;AAiBA,wDAiDC;AAlED,qDAQkC;AAElC,0DAK6B;AAE7B,SAAgB,sBAAsB,CAAC,OAAyB;IAC9D,MAAM,SAAS,GAAG,IAAA,kBAAS,EAAC,EAAE,GAAG,OAAO,EAAE,CAAC,CAAC;IAE5C,MAAM,eAAe,GAGjB;QACF,GAAG,SAAS;QACZ,qEAAqE;QACrE,iBAAiB,EAAE,CAAC,KAAK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AAE,MAAM,EAAE,OAAO,CAAC,CAAC;QAC7D,CAAC;KACF,CAAC;IAEF,OAAO,eAAe,CAAC;AACzB,CAAC","sourcesContent":["import {\n CommonNavigationAction,\n ParamListBase,\n Router,\n TabActionType,\n TabNavigationState,\n TabRouter,\n type TabRouterOptions,\n} from '@react-navigation/native';\n\nimport {\n appendInternalExpoRouterParams,\n getInternalExpoRouterParams,\n INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME,\n type InternalExpoRouterParams,\n} from '../navigationParams';\n\nexport function NativeBottomTabsRouter(options: TabRouterOptions) {\n const tabRouter = TabRouter({ ...options });\n\n const nativeTabRouter: Router<\n TabNavigationState<ParamListBase>,\n TabActionType | CommonNavigationAction\n > = {\n ...tabRouter,\n // @ts-expect-error TODO: For some reason this is not typed correctly\n getStateForAction: (state, action: TabActionType | CommonNavigationAction, options) => {\n switch (action.type) {\n case 'NAVIGATE': {\n const newStateFromNavigation = tabRouter.getStateForAction(state, action, options);\n const index = state.routes.findIndex((route) => route.name === action.payload.name);\n\n if (index === -1 || !newStateFromNavigation) {\n return newStateFromNavigation;\n }\n\n const newState = {\n ...newStateFromNavigation,\n routes: newStateFromNavigation.routes.map((route) => {\n if (route.name !== action.payload.name) {\n return route;\n }\n\n const expoParams: InternalExpoRouterParams = getInternalExpoRouterParams(\n action.payload.params\n );\n\n if (route.params && 'screen' in route.params) {\n expoParams[INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME] = true;\n }\n\n const params = appendInternalExpoRouterParams(route.params, expoParams);\n return {\n ...route,\n params,\n };\n }),\n };\n return newState;\n }\n }\n return tabRouter.getStateForAction(state, action, options);\n },\n };\n\n return nativeTabRouter;\n}\n"]}
@@ -1,3 +1,5 @@
1
+ export declare const INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME = "__internal_expo_router_no_animation";
2
+ export declare const INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME = "__internal__expo_router_is_preview_navigation";
1
3
  declare const internalExpoRouterParamNames: readonly ["__internal_expo_router_no_animation", "__internal__expo_router_is_preview_navigation"];
2
4
  export type InternalExpoRouterParamName = (typeof internalExpoRouterParamNames)[number];
3
5
  export type InternalExpoRouterParams = Partial<Record<InternalExpoRouterParamName, unknown>>;
@@ -1 +1 @@
1
- {"version":3,"file":"navigationParams.d.ts","sourceRoot":"","sources":["../src/navigationParams.ts"],"names":[],"mappings":"AAIA,QAAA,MAAM,4BAA4B,mGAGxB,CAAC;AAEX,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC;AACxF,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC,CAAC;AAE7F,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,EACpD,UAAU,EAAE,wBAAwB,uCAyBrC;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,GACpD,wBAAwB,CAiB1B;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GACvC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;AACpC,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,GACnD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC"}
1
+ {"version":3,"file":"navigationParams.d.ts","sourceRoot":"","sources":["../src/navigationParams.ts"],"names":[],"mappings":"AAAA,eAAO,MAAM,4CAA4C,wCAAwC,CAAC;AAClG,eAAO,MAAM,qDAAqD,kDACjB,CAAC;AAElD,QAAA,MAAM,4BAA4B,mGAGxB,CAAC;AAEX,MAAM,MAAM,2BAA2B,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC;AACxF,MAAM,MAAM,wBAAwB,GAAG,OAAO,CAAC,MAAM,CAAC,2BAA2B,EAAE,OAAO,CAAC,CAAC,CAAC;AAE7F,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,EACpD,UAAU,EAAE,wBAAwB,uCAyBrC;AAED,wBAAgB,2BAA2B,CACzC,OAAO,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,GACpD,wBAAwB,CAiB1B;AAED,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GACvC,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,CAAC;AACpC,wBAAgB,8BAA8B,CAC5C,MAAM,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,GACnD,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,GAAG,SAAS,CAAC"}
@@ -1,13 +1,14 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME = exports.INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME = void 0;
3
4
  exports.appendInternalExpoRouterParams = appendInternalExpoRouterParams;
4
5
  exports.getInternalExpoRouterParams = getInternalExpoRouterParams;
5
6
  exports.removeInternalExpoRouterParams = removeInternalExpoRouterParams;
6
- const INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME = '__internal_expo_router_no_animation';
7
- const INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME = '__internal__expo_router_is_preview_navigation';
7
+ exports.INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME = '__internal_expo_router_no_animation';
8
+ exports.INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME = '__internal__expo_router_is_preview_navigation';
8
9
  const internalExpoRouterParamNames = [
9
- INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME,
10
- INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME,
10
+ exports.INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME,
11
+ exports.INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME,
11
12
  ];
12
13
  function appendInternalExpoRouterParams(params, expoParams) {
13
14
  let newParams = {};
@@ -1 +1 @@
1
- {"version":3,"file":"navigationParams.js","sourceRoot":"","sources":["../src/navigationParams.ts"],"names":[],"mappings":";;AAYA,wEA2BC;AAED,kEAmBC;AAQD,wEAyBC;AA7FD,MAAM,4CAA4C,GAAG,qCAAqC,CAAC;AAC3F,MAAM,qDAAqD,GACzD,+CAA+C,CAAC;AAElD,MAAM,4BAA4B,GAAG;IACnC,4CAA4C;IAC5C,qDAAqD;CAC7C,CAAC;AAKX,SAAgB,8BAA8B,CAC5C,MAAoD,EACpD,UAAoC;IAEpC,IAAI,SAAS,GAA4B,EAAE,CAAC;IAC5C,wGAAwG;IACxG,qGAAqG;IACrG,sFAAsF;IACtF,wEAAwE;IACxE,IAAI,YAAY,GAA4B,EAAE,CAAC;IAC/C,IAAI,MAAM,EAAE,CAAC;QACX,SAAS,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC;QAC1B,IAAI,QAAQ,IAAI,MAAM,EAAE,CAAC;YACvB,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;gBACvD,YAAY,GAAG,MAAM,CAAC,MAAiC,C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CAAC;QACZ,OAAO,SAAS,CAAC;IACnB,CAAC;IACD,MAAM,eAAe,GACnB,QAAQ,IAAI,MAAM,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM;QACtE,CAAC,CAAC,MAAM,CAAC,WAAW,CAChB,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,MAAM,CAAC,CAAC,MAAM,CAClC,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CAAC,CAAC,4BAA4B,CAAC,QAAQ,CAAC,GAAkC,CAAC,CACtF,CACF;QACH,CAAC,CAAC,EAAE,CAAC;IACT,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAClC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAC3B,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CACR,CAAC,4BAA4B,CAAC,QAAQ,CAAC,GAAkC,CAAC;QAC1E,GAAG,KAAK,QAAQ,CACnB,CACF,CAAC;IACF,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5C,OAAO,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;IACnD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["const INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME = '__internal_expo_router_no_animation';\nconst INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME =\n '__internal__expo_router_is_preview_navigation';\n\nconst internalExpoRouterParamNames = [\n INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME,\n INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME,\n] as const;\n\nexport type InternalExpoRouterParamName = (typeof internalExpoRouterParamNames)[number];\nexport type InternalExpoRouterParams = Partial<Record<InternalExpoRouterParamName, unknown>>;\n\nexport function appendInternalExpoRouterParams(\n params: Record<string, unknown> | object | undefined,\n expoParams: InternalExpoRouterParams\n) {\n let newParams: Record<string, unknown> = {};\n // Using nested params is a workaround for the issue with the preview key not being passed to the params\n // https://github.com/Ubax/react-navigation/blob/main/packages/core/src/useNavigationBuilder.tsx#L573\n // Another solution would be to propagate the preview key in the useNavigationBuilder,\n // but that would require us to fork the @react-navigation/core package.\n let nestedParams: Record<string, unknown> = {};\n if (params) {\n newParams = { ...params };\n if ('params' in params) {\n if (typeof params.params === 'object' && params.params) {\n nestedParams = params.params as Record<string, unknown>;\n }\n }\n }\n nestedParams = { ...nestedParams, ...expoParams };\n newParams = { ...newParams, ...expoParams };\n if (Object.keys(nestedParams).length > 0) {\n newParams.params = nestedParams;\n }\n if (Object.keys(newParams).length === 0 && params === undefined) {\n return undefined;\n }\n return newParams;\n}\n\nexport function getInternalExpoRouterParams(\n _params: Record<string, unknown> | object | undefined\n): InternalExpoRouterParams {\n const expoParams: InternalExpoRouterParams = {};\n const params: Record<string, unknown> = _params ? (_params as Record<string, unknown>) : {};\n const nestedParams: Record<string, unknown> =\n 'params' in params && typeof params.params === 'object' && params.params\n ? (params.params as Record<string, unknown>)\n : {};\n\n for (const key of internalExpoRouterParamNames) {\n if (key in params) {\n expoParams[key] = params[key];\n } else if (key in nestedParams) {\n expoParams[key] = nestedParams[key];\n }\n }\n\n return expoParams;\n}\n\nexport function removeInternalExpoRouterParams(\n params: Record<string, unknown> | object\n): Record<string, unknown> | object;\nexport function removeInternalExpoRouterParams(\n params: Record<string, unknown> | object | undefined\n): Record<string, unknown> | object | undefined;\nexport function removeInternalExpoRouterParams(\n params: Record<string, unknown> | object | undefined\n): Record<string, unknown> | object | undefined {\n if (!params) {\n return undefined;\n }\n const newNestedParams =\n 'params' in params && typeof params.params === 'object' && params.params\n ? Object.fromEntries(\n Object.entries(params.params).filter(\n ([key]) => !internalExpoRouterParamNames.includes(key as InternalExpoRouterParamName)\n )\n )\n : {};\n const newParams = Object.fromEntries(\n Object.entries(params).filter(\n ([key]) =>\n !internalExpoRouterParamNames.includes(key as InternalExpoRouterParamName) &&\n key !== 'params'\n )\n );\n if (Object.keys(newNestedParams).length > 0) {\n return { ...newParams, params: newNestedParams };\n }\n return newParams;\n}\n"]}
1
+ {"version":3,"file":"navigationParams.js","sourceRoot":"","sources":["../src/navigationParams.ts"],"names":[],"mappings":";;;AAYA,wEA2BC;AAED,kEAmBC;AAQD,wEAyBC;AA7FY,QAAA,4CAA4C,GAAG,qCAAqC,CAAC;AACrF,QAAA,qDAAqD,GAChE,+CAA+C,CAAC;AAElD,MAAM,4BAA4B,GAAG;IACnC,oDAA4C;IAC5C,6DAAqD;CAC7C,CAAC;AAKX,SAAgB,8BAA8B,CAC5C,MAAoD,EACpD,UAAoC;IAEpC,IAAI,SAAS,GAA4B,EAAE,CAAC;IAC5C,wGAAwG;IACxG,qGAAqG;IACrG,sFAAsF;IACtF,wEAAwE;IACxE,IAAI,YAAY,GAA4B,EAAE,CAAC;IAC/C,IAAI,MAAM,EAAE,CAAC;QACX,SAAS,GAAG,EAAE,GAAG,MAAM,EAAE,CAAC;QAC1B,IAAI,QAAQ,IAAI,MAAM,EAAE,CAAC;YACvB,IAAI,OAAO,MAAM,CAAC,MAAM,KAAK,QAAQ,IAAI,MAAM,CAAC,MAAM,EAAE,CAAC;gBACvD,YAAY,GAAG,MAAM,CAAC,MAAiC,CAAC;YAC1D,CAAC;QACH,CAAC;IACH,CAAC;IACD,YAAY,GAAG,EAAE,GAAG,YAAY,EAAE,GAAG,UAAU,EAAE,CAAC;IAClD,SAAS,GAAG,EAAE,GAAG,SAAS,EAAE,GAAG,UAAU,EAAE,CAAC;IAC5C,IAAI,MAAM,CAAC,IAAI,CAAC,YAAY,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QACzC,SAAS,CAAC,MAAM,GAAG,YAAY,CAAC;IAClC,CAAC;IACD,IAAI,MAAM,CAAC,IAAI,CAAC,SAAS,CAAC,CAAC,MAAM,KAAK,CAAC,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,CAAC;IACT,MAAM,SAAS,GAAG,MAAM,CAAC,WAAW,CAClC,MAAM,CAAC,OAAO,CAAC,MAAM,CAAC,CAAC,MAAM,CAC3B,CAAC,CAAC,GAAG,CAAC,EAAE,EAAE,CACR,CAAC,4BAA4B,CAAC,QAAQ,CAAC,GAAkC,CAAC;QAC1E,GAAG,KAAK,QAAQ,CACnB,CACF,CAAC;IACF,IAAI,MAAM,CAAC,IAAI,CAAC,eAAe,CAAC,CAAC,MAAM,GAAG,CAAC,EAAE,CAAC;QAC5C,OAAO,EAAE,GAAG,SAAS,EAAE,MAAM,EAAE,eAAe,EAAE,CAAC;IACnD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["export const INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME = '__internal_expo_router_no_animation';\nexport const INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME =\n '__internal__expo_router_is_preview_navigation';\n\nconst internalExpoRouterParamNames = [\n INTERNAL_EXPO_ROUTER_NO_ANIMATION_PARAM_NAME,\n INTERNAL_EXPO_ROUTER_IS_PREVIEW_NAVIGATION_PARAM_NAME,\n] as const;\n\nexport type InternalExpoRouterParamName = (typeof internalExpoRouterParamNames)[number];\nexport type InternalExpoRouterParams = Partial<Record<InternalExpoRouterParamName, unknown>>;\n\nexport function appendInternalExpoRouterParams(\n params: Record<string, unknown> | object | undefined,\n expoParams: InternalExpoRouterParams\n) {\n let newParams: Record<string, unknown> = {};\n // Using nested params is a workaround for the issue with the preview key not being passed to the params\n // https://github.com/Ubax/react-navigation/blob/main/packages/core/src/useNavigationBuilder.tsx#L573\n // Another solution would be to propagate the preview key in the useNavigationBuilder,\n // but that would require us to fork the @react-navigation/core package.\n let nestedParams: Record<string, unknown> = {};\n if (params) {\n newParams = { ...params };\n if ('params' in params) {\n if (typeof params.params === 'object' && params.params) {\n nestedParams = params.params as Record<string, unknown>;\n }\n }\n }\n nestedParams = { ...nestedParams, ...expoParams };\n newParams = { ...newParams, ...expoParams };\n if (Object.keys(nestedParams).length > 0) {\n newParams.params = nestedParams;\n }\n if (Object.keys(newParams).length === 0 && params === undefined) {\n return undefined;\n }\n return newParams;\n}\n\nexport function getInternalExpoRouterParams(\n _params: Record<string, unknown> | object | undefined\n): InternalExpoRouterParams {\n const expoParams: InternalExpoRouterParams = {};\n const params: Record<string, unknown> = _params ? (_params as Record<string, unknown>) : {};\n const nestedParams: Record<string, unknown> =\n 'params' in params && typeof params.params === 'object' && params.params\n ? (params.params as Record<string, unknown>)\n : {};\n\n for (const key of internalExpoRouterParamNames) {\n if (key in params) {\n expoParams[key] = params[key];\n } else if (key in nestedParams) {\n expoParams[key] = nestedParams[key];\n }\n }\n\n return expoParams;\n}\n\nexport function removeInternalExpoRouterParams(\n params: Record<string, unknown> | object\n): Record<string, unknown> | object;\nexport function removeInternalExpoRouterParams(\n params: Record<string, unknown> | object | undefined\n): Record<string, unknown> | object | undefined;\nexport function removeInternalExpoRouterParams(\n params: Record<string, unknown> | object | undefined\n): Record<string, unknown> | object | undefined {\n if (!params) {\n return undefined;\n }\n const newNestedParams =\n 'params' in params && typeof params.params === 'object' && params.params\n ? Object.fromEntries(\n Object.entries(params.params).filter(\n ([key]) => !internalExpoRouterParamNames.includes(key as InternalExpoRouterParamName)\n )\n )\n : {};\n const newParams = Object.fromEntries(\n Object.entries(params).filter(\n ([key]) =>\n !internalExpoRouterParamNames.includes(key as InternalExpoRouterParamName) &&\n key !== 'params'\n )\n );\n if (Object.keys(newNestedParams).length > 0) {\n return { ...newParams, params: newNestedParams };\n }\n return newParams;\n}\n"]}
@@ -9,7 +9,7 @@
9
9
  "publication": {
10
10
  "groupId": "expo.modules.router",
11
11
  "artifactId": "expo.modules.router",
12
- "version": "7.0.0-canary-20251118-4ca99d5",
12
+ "version": "7.0.0-canary-20251119-961a032",
13
13
  "repository": "local-maven-repo"
14
14
  }
15
15
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-router",
3
- "version": "7.0.0-canary-20251118-4ca99d5",
3
+ "version": "7.0.0-canary-20251119-961a032",
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",
@@ -13,6 +13,7 @@
13
13
  ],
14
14
  "files": [
15
15
  "link",
16
+ "android",
16
17
  "assets",
17
18
  "build",
18
19
  "internal",
@@ -79,13 +80,13 @@
79
80
  "expo"
80
81
  ],
81
82
  "peerDependencies": {
82
- "@expo/metro-runtime": "6.2.0-canary-20251118-4ca99d5",
83
- "@expo/log-box": "0.0.13-canary-20251118-4ca99d5",
83
+ "@expo/metro-runtime": "6.2.0-canary-20251119-961a032",
84
+ "@expo/log-box": "0.0.13-canary-20251119-961a032",
84
85
  "@react-navigation/drawer": "^7.7.2",
85
86
  "@testing-library/react-native": ">= 12.0.0",
86
- "expo": "55.0.0-canary-20251118-4ca99d5",
87
- "expo-constants": "18.1.0-canary-20251118-4ca99d5",
88
- "expo-linking": "8.0.10-canary-20251118-4ca99d5",
87
+ "expo": "55.0.0-canary-20251119-961a032",
88
+ "expo-constants": "18.1.0-canary-20251119-961a032",
89
+ "expo-linking": "8.0.10-canary-20251119-961a032",
89
90
  "react": "*",
90
91
  "react-dom": "*",
91
92
  "react-native": "*",
@@ -130,8 +131,8 @@
130
131
  "react-server-dom-webpack": "~19.0.0"
131
132
  },
132
133
  "dependencies": {
133
- "@expo/metro-runtime": "6.2.0-canary-20251118-4ca99d5",
134
- "@expo/schema-utils": "0.1.8-canary-20251118-4ca99d5",
134
+ "@expo/metro-runtime": "6.2.0-canary-20251119-961a032",
135
+ "@expo/schema-utils": "0.1.8-canary-20251119-961a032",
135
136
  "@radix-ui/react-slot": "1.2.0",
136
137
  "@radix-ui/react-tabs": "^1.1.12",
137
138
  "@react-navigation/bottom-tabs": "^7.7.3",
@@ -140,7 +141,7 @@
140
141
  "client-only": "^0.0.1",
141
142
  "debug": "^4.3.4",
142
143
  "escape-string-regexp": "^4.0.0",
143
- "expo-server": "1.0.5-canary-20251118-4ca99d5",
144
+ "expo-server": "1.0.5-canary-20251119-961a032",
144
145
  "fast-deep-equal": "^3.1.3",
145
146
  "invariant": "^2.2.4",
146
147
  "nanoid": "^3.3.8",