expo-router 7.0.0-canary-20260119-70f7c28 → 7.0.0-canary-20260120-bb71700

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (67) hide show
  1. package/android/build.gradle +2 -2
  2. package/build/global-state/routing.d.ts.map +1 -1
  3. package/build/global-state/routing.js +7 -2
  4. package/build/global-state/routing.js.map +1 -1
  5. package/build/loaders/utils.d.ts +5 -2
  6. package/build/loaders/utils.d.ts.map +1 -1
  7. package/build/loaders/utils.js +8 -5
  8. package/build/loaders/utils.js.map +1 -1
  9. package/build/native-tabs/NativeTabsView.d.ts.map +1 -1
  10. package/build/native-tabs/NativeTabsView.js +6 -6
  11. package/build/native-tabs/NativeTabsView.js.map +1 -1
  12. package/build/native-tabs/appearance.d.ts +7 -7
  13. package/build/native-tabs/appearance.d.ts.map +1 -1
  14. package/build/native-tabs/appearance.js.map +1 -1
  15. package/build/native-tabs/types.d.ts +3 -3
  16. package/build/native-tabs/types.d.ts.map +1 -1
  17. package/build/native-tabs/types.js.map +1 -1
  18. package/build/native-tabs/utils/bottomAccessory.d.ts +2 -2
  19. package/build/native-tabs/utils/bottomAccessory.d.ts.map +1 -1
  20. package/build/native-tabs/utils/bottomAccessory.js.map +1 -1
  21. package/build/native-tabs/utils/icon.d.ts +2 -2
  22. package/build/native-tabs/utils/icon.d.ts.map +1 -1
  23. package/build/native-tabs/utils/icon.js.map +1 -1
  24. package/build/split-view/elements.js +3 -3
  25. package/build/split-view/elements.js.map +1 -1
  26. package/build/split-view/index.d.ts +1 -1
  27. package/build/split-view/index.d.ts.map +1 -1
  28. package/build/split-view/index.js.map +1 -1
  29. package/build/split-view/split-view.d.ts +3 -3
  30. package/build/split-view/split-view.d.ts.map +1 -1
  31. package/build/split-view/split-view.js +4 -4
  32. package/build/split-view/split-view.js.map +1 -1
  33. package/expo-module.config.json +1 -1
  34. package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.module → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.module} +7 -7
  35. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.module.md5 +1 -0
  36. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.module.sha1 +1 -0
  37. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.module.sha256 +1 -0
  38. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.module.sha512 +1 -0
  39. package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.pom → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.pom} +1 -1
  40. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.pom.md5 +1 -0
  41. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.pom.sha1 +1 -0
  42. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.pom.sha256 +1 -0
  43. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.pom.sha512 +1 -0
  44. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml +4 -4
  45. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.md5 +1 -1
  46. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha1 +1 -1
  47. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha256 +1 -1
  48. package/local-maven-repo/expo/modules/router/expo.modules.router/maven-metadata.xml.sha512 +1 -1
  49. package/package.json +11 -11
  50. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.module.md5 +0 -1
  51. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.module.sha1 +0 -1
  52. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.module.sha256 +0 -1
  53. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.module.sha512 +0 -1
  54. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.pom.md5 +0 -1
  55. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.pom.sha1 +0 -1
  56. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.pom.sha256 +0 -1
  57. package/local-maven-repo/expo/modules/router/expo.modules.router/7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.pom.sha512 +0 -1
  58. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28-sources.jar → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700-sources.jar} +0 -0
  59. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28-sources.jar.md5 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700-sources.jar.md5} +0 -0
  60. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28-sources.jar.sha1 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700-sources.jar.sha1} +0 -0
  61. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28-sources.jar.sha256 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700-sources.jar.sha256} +0 -0
  62. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28-sources.jar.sha512 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700-sources.jar.sha512} +0 -0
  63. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.aar → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.aar} +0 -0
  64. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.aar.md5 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.aar.md5} +0 -0
  65. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.aar.sha1 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.aar.sha1} +0 -0
  66. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.aar.sha256 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.aar.sha256} +0 -0
  67. /package/local-maven-repo/expo/modules/router/expo.modules.router/{7.0.0-canary-20260119-70f7c28/expo.modules.router-7.0.0-canary-20260119-70f7c28.aar.sha512 → 7.0.0-canary-20260120-bb71700/expo.modules.router-7.0.0-canary-20260120-bb71700.aar.sha512} +0 -0
@@ -4,13 +4,13 @@ plugins {
4
4
  }
5
5
 
6
6
  group = 'expo.modules.router'
7
- version = '7.0.0-canary-20260119-70f7c28'
7
+ version = '7.0.0-canary-20260120-bb71700'
8
8
 
9
9
  android {
10
10
  namespace "expo.modules.router"
11
11
  defaultConfig {
12
12
  versionCode 1
13
- versionName "7.0.0-canary-20260119-70f7c28"
13
+ versionName "7.0.0-canary-20260120-bb71700"
14
14
  }
15
15
  lintOptions {
16
16
  abortOnError false
@@ -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;AAUvD,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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;;;;;;EAoDpC"}
@@ -263,7 +263,7 @@ function getNavigateAction(baseHref, options, type = 'NAVIGATE', withAnchor, sin
263
263
  else if (type === 'REPLACE' && navigationState.type === 'drawer') {
264
264
  type = 'JUMP_TO';
265
265
  }
266
- if (withAnchor !== undefined) {
266
+ if (withAnchor) {
267
267
  if (rootPayload.params.initial) {
268
268
  if (process.env.NODE_ENV !== 'production') {
269
269
  console.warn(`The parameter 'initial' is a reserved parameter name in React Navigation`);
@@ -278,7 +278,12 @@ function getNavigateAction(baseHref, options, type = 'NAVIGATE', withAnchor, sin
278
278
  * True: You want the initialRouteName to load.
279
279
  * False: You do not want the initialRouteName to load.
280
280
  */
281
- rootPayload.params.initial = !withAnchor;
281
+ // Set initial on root and all nested params so anchors are loaded at every level
282
+ let currentParams = rootPayload.params;
283
+ while (currentParams) {
284
+ currentParams.initial = !withAnchor;
285
+ currentParams = currentParams.params;
286
+ }
282
287
  }
283
288
  const expoParams = isPreviewNavigation
284
289
  ? {
@@ -1 +1 @@
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,4DAwBC;AAKD,gDAwDC;AA1cD,kCAAkC;AAClC,sDAAwC;AAExC,+CAAwC;AAExC,iDAAuC;AACvC,gEAMuC;AAEvC,8DAAuD;AACvD,uCAA0E;AAC1E,0CAA+C;AAC/C,0DAK6B;AAG7B,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;AAC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AE,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
+ {"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;AAwHD,4DAwBC;AAKD,gDAwDC;AA/cD,kCAAkC;AAClC,sDAAwC;AAExC,+CAAwC;AAExC,iDAAuC;AACvC,gEAMuC;AAEvC,8DAAuD;AACvD,uCAA0E;AAC1E,0CAA+C;AAC/C,0DAK6B;AAG7B,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,CAAC,CAAC;IACJ,CAAC;IACD,QAAQ;QACN,OAAO,oBAAY,CAAC,KAAK,CAAC;IAC5B,CAAC;IACD,GAAG,CAAC,MAAqC;QACvC,oBAAY,CAAC,KAAK,CAAC,IAAI,CAAC,MAA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C,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) {\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 // Set initial on root and all nested params so anchors are loaded at every level\n let currentParams = rootPayload.params;\n while (currentParams) {\n currentParams.initial = !withAnchor;\n currentParams = currentParams.params;\n }\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"]}
@@ -6,13 +6,16 @@
6
6
  * getLoaderModulePath(`/about`) // `/_expo/loaders/about`
7
7
  * getLoaderModulePath(`/posts/1`) // `/_expo/loaders/posts/1`
8
8
  */
9
- export declare function getLoaderModulePath(pathname: string): string;
9
+ export declare function getLoaderModulePath(routePath: string): string;
10
10
  /**
11
11
  * Fetches and parses a loader module from the given route path.
12
12
  * This works in all environments including:
13
- * 1. Development with Metro dev server (see `LoaderModuleMiddleware`)
13
+ * 1. Development with Metro dev server
14
14
  * 2. Production with static files (SSG)
15
15
  * 3. SSR environments
16
+ *
17
+ * @see import('packages/@expo/cli/src/start/server/metro/createServerRouteMiddleware.ts').createRouteHandlerMiddleware
18
+ * @see import('packages/expo-server/src/vendor/environment/common.ts').createEnvironment
16
19
  */
17
20
  export declare function fetchLoaderModule(routePath: string): Promise<any>;
18
21
  //# sourceMappingURL=utils.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/loaders/utils.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,QAAQ,EAAE,MAAM,GAAG,MAAM,CAM5D;AAED;;;;;;GAMG;AACH,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAiBvE"}
1
+ {"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../src/loaders/utils.ts"],"names":[],"mappings":"AAEA;;;;;;;GAOG;AACH,wBAAgB,mBAAmB,CAAC,SAAS,EAAE,MAAM,GAAG,MAAM,CAM7D;AAED;;;;;;;;;GASG;AACH,wBAAsB,iBAAiB,CAAC,SAAS,EAAE,MAAM,GAAG,OAAO,CAAC,GAAG,CAAC,CAiBvE"}
@@ -11,18 +11,21 @@ const url_1 = require("../utils/url");
11
11
  * getLoaderModulePath(`/about`) // `/_expo/loaders/about`
12
12
  * getLoaderModulePath(`/posts/1`) // `/_expo/loaders/posts/1`
13
13
  */
14
- function getLoaderModulePath(pathname) {
15
- const urlPath = (0, url_1.parseUrlUsingCustomBase)(pathname).pathname;
16
- const normalizedPath = urlPath === '/' ? '/' : urlPath.replace(/\/$/, '');
14
+ function getLoaderModulePath(routePath) {
15
+ const { pathname, search } = (0, url_1.parseUrlUsingCustomBase)(routePath);
16
+ const normalizedPath = pathname === '/' ? '/' : pathname.replace(/\/$/, '');
17
17
  const pathSegment = normalizedPath === '/' ? '/index' : normalizedPath;
18
- return `/_expo/loaders${pathSegment}`;
18
+ return `/_expo/loaders${pathSegment}${search}`;
19
19
  }
20
20
  /**
21
21
  * Fetches and parses a loader module from the given route path.
22
22
  * This works in all environments including:
23
- * 1. Development with Metro dev server (see `LoaderModuleMiddleware`)
23
+ * 1. Development with Metro dev server
24
24
  * 2. Production with static files (SSG)
25
25
  * 3. SSR environments
26
+ *
27
+ * @see import('packages/@expo/cli/src/start/server/metro/createServerRouteMiddleware.ts').createRouteHandlerMiddleware
28
+ * @see import('packages/expo-server/src/vendor/environment/common.ts').createEnvironment
26
29
  */
27
30
  async function fetchLoaderModule(routePath) {
28
31
  const loaderPath = getLoaderModulePath(routePath);
@@ -1 +1 @@
1
- {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/loaders/utils.ts"],"names":[],"mappings":";;AAUA,kDAMC;AASD,8CAiBC;AA1CD,sCAAuD;AAEvD;;;;;;;GAOG;AACH,SAAgB,mBAAmB,CAAC,QAAgB;IAClD,MAAM,OAAO,GAAG,IAAA,6BAAuB,EAAC,QAAQ,CAAC,CAAC,QAAQ,CAAC;IAC3D,MAAM,cAAc,GAAG,OAAO,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,OAAO,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC1E,MAAM,WAAW,GAAG,cAAc,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC;IAEvE,OAAO,iBAAiB,WAAW,EAAE,CAAC;AACxC,CAAC;AAED;;;;;;GAMG;AACI,KAAK,UAAU,iBAAiB,CAAC,SAAiB;IACvD,MAAM,UAAU,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAElD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,UAAU,EAAE;QACvC,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;SAC3B;KACF,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,gCAAgC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,IAAI,CAAC;QACH,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,gCAAgC,KAAK,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC","sourcesContent":["import { parseUrlUsingCustomBase } from '../utils/url';\n\n/**\n * Convert a route's pathname to a loader module path.\n *\n * @example\n * getLoaderModulePath(`/`); // `/_expo/loaders/index`\n * getLoaderModulePath(`/about`) // `/_expo/loaders/about`\n * getLoaderModulePath(`/posts/1`) // `/_expo/loaders/posts/1`\n */\nexport function getLoaderModulePath(pathname: string): string {\n const urlPath = parseUrlUsingCustomBase(pathname).pathname;\n const normalizedPath = urlPath === '/' ? '/' : urlPath.replace(/\\/$/, '');\n const pathSegment = normalizedPath === '/' ? '/index' : normalizedPath;\n\n return `/_expo/loaders${pathSegment}`;\n}\n\n/**\n * Fetches and parses a loader module from the given route path.\n * This works in all environments including:\n * 1. Development with Metro dev server (see `LoaderModuleMiddleware`)\n * 2. Production with static files (SSG)\n * 3. SSR environments\n */\nexport async function fetchLoaderModule(routePath: string): Promise<any> {\n const loaderPath = getLoaderModulePath(routePath);\n\n const response = await fetch(loaderPath, {\n headers: {\n Accept: 'application/json',\n },\n });\n if (!response.ok) {\n throw new Error(`Failed to fetch loader data: ${response.status}`);\n }\n\n try {\n return await response.json();\n } catch (error) {\n throw new Error(`Failed to parse loader data: ${error}`);\n }\n}\n"]}
1
+ {"version":3,"file":"utils.js","sourceRoot":"","sources":["../../src/loaders/utils.ts"],"names":[],"mappings":";;AAUA,kDAMC;AAYD,8CAiBC;AA7CD,sCAAuD;AAEvD;;;;;;;GAOG;AACH,SAAgB,mBAAmB,CAAC,SAAiB;IACnD,MAAM,EAAE,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAA,6BAAuB,EAAC,SAAS,CAAC,CAAC;IAChE,MAAM,cAAc,GAAG,QAAQ,KAAK,GAAG,CAAC,CAAC,CAAC,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,OAAO,CAAC,KAAK,EAAE,EAAE,CAAC,CAAC;IAC5E,MAAM,WAAW,GAAG,cAAc,KAAK,GAAG,CAAC,CAAC,CAAC,QAAQ,CAAC,CAAC,CAAC,cAAc,CAAC;IAEvE,OAAO,iBAAiB,WAAW,GAAG,MAAM,EAAE,CAAC;AACjD,CAAC;AAED;;;;;;;;;GASG;AACI,KAAK,UAAU,iBAAiB,CAAC,SAAiB;IACvD,MAAM,UAAU,GAAG,mBAAmB,CAAC,SAAS,CAAC,CAAC;IAElD,MAAM,QAAQ,GAAG,MAAM,KAAK,CAAC,UAAU,EAAE;QACvC,OAAO,EAAE;YACP,MAAM,EAAE,kBAAkB;SAC3B;KACF,CAAC,CAAC;IACH,IAAI,CAAC,QAAQ,CAAC,EAAE,EAAE,CAAC;QACjB,MAAM,IAAI,KAAK,CAAC,gCAAgC,QAAQ,CAAC,MAAM,EAAE,CAAC,CAAC;IACrE,CAAC;IAED,IAAI,CAAC;QACH,OAAO,MAAM,QAAQ,CAAC,IAAI,EAAE,CAAC;IAC/B,CAAC;IAAC,OAAO,KAAK,EAAE,CAAC;QACf,MAAM,IAAI,KAAK,CAAC,gCAAgC,KAAK,EAAE,CAAC,CAAC;IAC3D,CAAC;AACH,CAAC","sourcesContent":["import { parseUrlUsingCustomBase } from '../utils/url';\n\n/**\n * Convert a route's pathname to a loader module path.\n *\n * @example\n * getLoaderModulePath(`/`); // `/_expo/loaders/index`\n * getLoaderModulePath(`/about`) // `/_expo/loaders/about`\n * getLoaderModulePath(`/posts/1`) // `/_expo/loaders/posts/1`\n */\nexport function getLoaderModulePath(routePath: string): string {\n const { pathname, search } = parseUrlUsingCustomBase(routePath);\n const normalizedPath = pathname === '/' ? '/' : pathname.replace(/\\/$/, '');\n const pathSegment = normalizedPath === '/' ? '/index' : normalizedPath;\n\n return `/_expo/loaders${pathSegment}${search}`;\n}\n\n/**\n * Fetches and parses a loader module from the given route path.\n * This works in all environments including:\n * 1. Development with Metro dev server\n * 2. Production with static files (SSG)\n * 3. SSR environments\n *\n * @see import('packages/@expo/cli/src/start/server/metro/createServerRouteMiddleware.ts').createRouteHandlerMiddleware\n * @see import('packages/expo-server/src/vendor/environment/common.ts').createEnvironment\n */\nexport async function fetchLoaderModule(routePath: string): Promise<any> {\n const loaderPath = getLoaderModulePath(routePath);\n\n const response = await fetch(loaderPath, {\n headers: {\n Accept: 'application/json',\n },\n });\n if (!response.ok) {\n throw new Error(`Failed to fetch loader data: ${response.status}`);\n }\n\n try {\n return await response.json();\n } catch (error) {\n throw new Error(`Failed to parse loader data: ${error}`);\n }\n}\n"]}
@@ -1 +1 @@
1
- {"version":3,"file":"NativeTabsView.d.ts","sourceRoot":"","sources":["../../src/native-tabs/NativeTabsView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAgBzD,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,SAAS,CAAC;AASjB,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBAyHxD"}
1
+ {"version":3,"file":"NativeTabsView.d.ts","sourceRoot":"","sources":["../../src/native-tabs/NativeTabsView.tsx"],"names":[],"mappings":"AACA,OAAO,KAAoC,MAAM,OAAO,CAAC;AAWzD,OAAO,EAIL,KAAK,mBAAmB,EACzB,MAAM,SAAS,CAAC;AASjB,wBAAgB,cAAc,CAAC,KAAK,EAAE,mBAAmB,qBAyHxD"}
@@ -82,7 +82,7 @@ function NativeTabsView(props) {
82
82
  indicatorColor: color_1.Color.android.dynamic.secondaryContainer,
83
83
  }
84
84
  : undefined;
85
- return (<BottomTabsWrapper
85
+ return (<TabsHostWrapper
86
86
  // #region android props
87
87
  tabBarItemTitleFontColor={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontColor ??
88
88
  androidMaterialDefaults?.inactiveColor} tabBarItemTitleFontFamily={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontFamily} tabBarItemTitleFontSize={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontSize} tabBarItemTitleFontSizeActive={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontSize} tabBarItemTitleFontWeight={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontWeight} tabBarItemTitleFontStyle={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontStyle} tabBarItemIconColor={currentTabAppearance?.stacked?.normal?.tabBarItemIconColor ??
@@ -102,7 +102,7 @@ function NativeTabsView(props) {
102
102
  props.onTabChange(tabKey);
103
103
  }}>
104
104
  {children}
105
- </BottomTabsWrapper>);
105
+ </TabsHostWrapper>);
106
106
  }
107
107
  function Screen(props) {
108
108
  const { routeKey, name, options, isFocused, standardAppearance, scrollEdgeAppearance, badgeTextColor, contentRenderer, } = props;
@@ -125,13 +125,13 @@ function Screen(props) {
125
125
  collapsable={false} style={{ flex: 1 }} edges={{ bottom: true }}>
126
126
  {content}
127
127
  </experimental_1.SafeAreaView>) : (content);
128
- return (<react_native_screens_1.BottomTabsScreen {...options} overrideScrollViewContentInsetAdjustmentBehavior={!options.disableAutomaticContentInsets} tabBarItemBadgeBackgroundColor={standardAppearance.stacked?.normal?.tabBarItemBadgeBackgroundColor} tabBarItemBadgeTextColor={badgeTextColor} standardAppearance={standardAppearance} scrollEdgeAppearance={scrollEdgeAppearance} icon={(0, icon_1.convertOptionsIconToRNScreensPropsIcon)(icon)} selectedIcon={(0, icon_1.convertOptionsIconToIOSPropsIcon)(selectedIcon)} title={title} freezeContents={false} systemItem={options.role} {...options.nativeProps} tabKey={routeKey} isFocused={isFocused}>
128
+ return (<react_native_screens_1.Tabs.Screen {...options} overrideScrollViewContentInsetAdjustmentBehavior={!options.disableAutomaticContentInsets} tabBarItemBadgeBackgroundColor={standardAppearance.stacked?.normal?.tabBarItemBadgeBackgroundColor} tabBarItemBadgeTextColor={badgeTextColor} standardAppearance={standardAppearance} scrollEdgeAppearance={scrollEdgeAppearance} icon={(0, icon_1.convertOptionsIconToRNScreensPropsIcon)(icon)} selectedIcon={(0, icon_1.convertOptionsIconToIOSPropsIcon)(selectedIcon)} title={title} freezeContents={false} systemItem={options.role} {...options.nativeProps} tabKey={routeKey} isFocused={isFocused}>
129
129
  {wrappedContent}
130
- </react_native_screens_1.BottomTabsScreen>);
130
+ </react_native_screens_1.Tabs.Screen>);
131
131
  }
132
132
  const supportedTabBarMinimizeBehaviorsSet = new Set(types_1.SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS);
133
133
  const supportedTabBarItemLabelVisibilityModesSet = new Set(types_1.SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES);
134
- function BottomTabsWrapper(props) {
134
+ function TabsHostWrapper(props) {
135
135
  let { tabBarMinimizeBehavior, tabBarItemLabelVisibilityMode, ...rest } = props;
136
136
  if (tabBarMinimizeBehavior && !supportedTabBarMinimizeBehaviorsSet.has(tabBarMinimizeBehavior)) {
137
137
  console.warn(`Unsupported minimizeBehavior: ${tabBarMinimizeBehavior}. Supported values are: ${types_1.SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS.map((behavior) => `"${behavior}"`).join(', ')}`);
@@ -142,6 +142,6 @@ function BottomTabsWrapper(props) {
142
142
  console.warn(`Unsupported labelVisibilityMode: ${tabBarItemLabelVisibilityMode}. Supported values are: ${types_1.SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES.map((mode) => `"${mode}"`).join(', ')}`);
143
143
  tabBarItemLabelVisibilityMode = undefined;
144
144
  }
145
- return (<react_native_screens_1.BottomTabs tabBarItemLabelVisibilityMode={tabBarItemLabelVisibilityMode} tabBarMinimizeBehavior={tabBarMinimizeBehavior} {...rest}/>);
145
+ return (<react_native_screens_1.Tabs.Host tabBarItemLabelVisibilityMode={tabBarItemLabelVisibilityMode} tabBarMinimizeBehavior={tabBarMinimizeBehavior} {...rest}/>);
146
146
  }
147
147
  //# sourceMappingURL=NativeTabsView.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"NativeTabsView.js","sourceRoot":"","sources":["../../src/native-tabs/NativeTabsView.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA+BA,wCAyHC;AAxJD,qDAAoD;AACpD,+CAAyD;AACzD,+CAAqD;AACrD,+DAK8B;AAC9B,oEAAiE;AAEjE,6CAGsB;AACtB,oCAAiC;AACjC,gDAA8D;AAC9D,mCAKiB;AACjB,uCAIsB;AACtB,gDAAwD;AACxD,6DAA0F;AAE1F,SAAgB,cAAc,CAAC,KAA0B;IACvD,MAAM,EACJ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,IAAI,EACJ,gBAAgB,EAChB,kBAAkB,GACnB,GAAG,KAAK,CAAC;IAEV,MAAM,oBAAoB,GAAG,IAAA,wBAAgB,EAAC,YAAY,CAAC,CAAC;IAC5D,8DAA8D;IAC9D,oFAAoF;IACpF,wFAAwF;IACxF,2BAA2B;IAC3B,MAAM,4BAA4B,GAChC,oBAAoB,GAAG,IAAI,CAAC,MAAM,CAAC,CAAC,CAAC,oBAAoB,CAAC,CAAC,CAAC,YAAY,CAAC;IAE3E,MAAM,WAAW,GAAG,IAAI,CAAC,GAAG,CAAC,CAAC,GAAG,EAAE,EAAE,CAAC,CAAC;QACrC,kBAAkB,EAAE,IAAA,gDAAmC,EAAC,GAAG,CAAC,OAAO,CAAC;QACpE,oBAAoB,EAAE,IAAA,kDAAqC,EAAC,GAAG,CAA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G,CAAC,6BAA6B,CAAC,EAC9E,CAAC;QACD,OAAO,CAAC,IAAI,CACV,oCAAoC,6BAA6B,2BAA2B,qDAA6C,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAClL,CAAC;QACF,6BAA6B,GAAG,SAAS,CAAC;IAC5C,CAAC;IAED,OAAO,CACL,CAAC,iCAAU,CACT,6BAA6B,CAAC,CAAC,6BAA6B,CAAC,CAC7D,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,CAC/C,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport React, { useDeferredValue, useMemo } from 'react';\nimport { View, type ColorValue } from 'react-native';\nimport {\n BottomTabs,\n BottomTabsScreen,\n type BottomTabsProps,\n type BottomTabsScreenAppearance,\n} from 'react-native-screens';\nimport { SafeAreaView } from 'react-native-screens/experimental';\n\nimport {\n createScrollEdgeAppearanceFromOptions,\n createStandardAppearanceFromOptions,\n} from './appearance';\nimport { Color } from '../color';\nimport { NativeTabsBottomAccessory } from './common/elements';\nimport {\n SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES,\n SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS,\n type NativeTabOptions,\n type NativeTabsViewProps,\n} from './types';\nimport {\n convertOptionsIconToRNScreensPropsIcon,\n convertOptionsIconToIOSPropsIcon,\n useAwaitedScreensIcon,\n} from './utils/icon';\nimport { getFirstChildOfType } from '../utils/children';\nimport { useBottomAccessoryFunctionFromBottomAccessories } from './utils/bottomAccessory';\n\nexport function NativeTabsView(props: NativeTabsViewProps) {\n const {\n minimizeBehavior,\n disableIndicator,\n focusedIndex,\n tabs,\n sidebarAdaptable,\n nonTriggerChildren,\n } = props;\n\n const deferredFocusedIndex = useDeferredValue(focusedIndex);\n // We need to check if the deferred index is not out of bounds\n // This can happen when the focused index is the last tab, and user removes that tab\n // In that case the deferred index will still point to the last tab, but after re-render\n // it will be out of bounds\n const inBoundsDeferredFocusedIndex =\n deferredFocusedIndex < tabs.length ? deferredFocusedIndex : focusedIndex;\n\n const appearances = tabs.map((tab) => ({\n standardAppearance: createStandardAppearanceFromOptions(tab.options),\n scrollEdgeAppearance: createScrollEdgeAppearanceFromOptions(tab.options),\n }));\n\n const options = tabs.map((tab) => tab.options);\n\n const bottomAccessory = useMemo(\n () => getFirstChildOfType(nonTriggerChildren, NativeTabsBottomAccessory),\n [nonTriggerChildren]\n );\n\n const bottomAccessoryFn = useBottomAccessoryFunctionFromBottomAccessories(bottomAccessory);\n\n const children = tabs.map((tab, index) => {\n const isFocused = index === inBoundsDeferredFocusedIndex;\n\n return (\n <Screen\n key={tab.routeKey}\n routeKey={tab.routeKey}\n name={tab.name}\n options={tab.options}\n isFocused={isFocused}\n standardAppearance={appearances[index].standardAppearance}\n scrollEdgeAppearance={appearances[index].scrollEdgeAppearance}\n badgeTextColor={tab.options.badgeTextColor}\n contentRenderer={tab.contentRenderer}\n />\n );\n });\n\n const currentTabAppearance = appearances[inBoundsDeferredFocusedIndex]?.standardAppearance;\n const tabBarControllerMode: BottomTabsProps['tabBarControllerMode'] = sidebarAdaptable\n ? 'tabSidebar'\n : sidebarAdaptable === false\n ? 'tabBar'\n : 'automatic';\n\n // Material Design 3 dynamic color defaults for Android\n const androidMaterialDefaults =\n process.env.EXPO_OS === 'android'\n ? {\n inactiveColor: Color.android.dynamic.onSurfaceVariant,\n activeIconColor: Color.android.dynamic.onSecondaryContainer,\n activeLabelColor: Color.android.dynamic.onSurface,\n backgroundColor: Color.android.dynamic.surfaceContainer,\n rippleColor: Color.android.dynamic.primary,\n indicatorColor: Color.android.dynamic.secondaryContainer,\n }\n : undefined;\n\n return (\n <BottomTabsWrapper\n // #region android props\n tabBarItemTitleFontColor={\n currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontColor ??\n androidMaterialDefaults?.inactiveColor\n }\n tabBarItemTitleFontFamily={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontFamily}\n tabBarItemTitleFontSize={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontSize}\n tabBarItemTitleFontSizeActive={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontSize}\n tabBarItemTitleFontWeight={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontWeight}\n tabBarItemTitleFontStyle={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontStyle}\n tabBarItemIconColor={\n currentTabAppearance?.stacked?.normal?.tabBarItemIconColor ??\n androidMaterialDefaults?.inactiveColor\n }\n tabBarBackgroundColor={\n currentTabAppearance?.tabBarBackgroundColor ?? androidMaterialDefaults?.backgroundColor\n }\n tabBarItemRippleColor={props.rippleColor ?? androidMaterialDefaults?.rippleColor}\n tabBarItemLabelVisibilityMode={props.labelVisibilityMode}\n tabBarItemIconColorActive={\n currentTabAppearance?.stacked?.selected?.tabBarItemIconColor ??\n props?.tintColor ??\n androidMaterialDefaults?.activeIconColor\n }\n tabBarItemTitleFontColorActive={\n currentTabAppearance?.stacked?.selected?.tabBarItemTitleFontColor ??\n props?.tintColor ??\n androidMaterialDefaults?.activeLabelColor\n }\n // tabBarItemTitleFontSizeActive={activeStyle?.fontSize}\n tabBarItemActiveIndicatorColor={\n options[inBoundsDeferredFocusedIndex]?.indicatorColor ??\n androidMaterialDefaults?.indicatorColor\n }\n tabBarItemActiveIndicatorEnabled={!disableIndicator}\n // #endregion\n // #region iOS props\n tabBarTintColor={props?.tintColor}\n tabBarMinimizeBehavior={minimizeBehavior}\n tabBarControllerMode={tabBarControllerMode}\n bottomAccessory={bottomAccessoryFn}\n tabBarHidden={props.hidden}\n // #endregion\n onNativeFocusChange={({ nativeEvent: { tabKey } }) => {\n props.onTabChange(tabKey);\n }}>\n {children}\n </BottomTabsWrapper>\n );\n}\n\nfunction Screen(props: {\n routeKey: string;\n name: string;\n isFocused: boolean;\n options: NativeTabOptions;\n standardAppearance: BottomTabsScreenAppearance;\n scrollEdgeAppearance: BottomTabsScreenAppearance;\n badgeTextColor: ColorValue | undefined;\n contentRenderer: () => React.ReactNode;\n}) {\n const {\n routeKey,\n name,\n options,\n isFocused,\n standardAppearance,\n scrollEdgeAppearance,\n badgeTextColor,\n contentRenderer,\n } = props;\n const title = options.title ?? name;\n\n // We need to await the icon, as VectorIcon will load asynchronously\n const icon = useAwaitedScreensIcon(options.icon);\n const selectedIcon = useAwaitedScreensIcon(options.selectedIcon);\n const { colors } = useTheme();\n\n const content = (\n <View\n // https://github.com/software-mansion/react-native-screens/issues/2662#issuecomment-2757735088\n collapsable={false}\n style={[\n { backgroundColor: colors.background },\n options.contentStyle,\n { flex: 1, position: 'relative', overflow: 'hidden' },\n ]}>\n {contentRenderer()}\n </View>\n );\n const wrappedContent =\n process.env.EXPO_OS === 'android' && !options.disableAutomaticContentInsets ? (\n <SafeAreaView\n // https://github.com/software-mansion/react-native-screens/issues/2662#issuecomment-2757735088\n collapsable={false}\n style={{ flex: 1 }}\n edges={{ bottom: true }}>\n {content}\n </SafeAreaView>\n ) : (\n content\n );\n\n return (\n <BottomTabsScreen\n {...options}\n overrideScrollViewContentInsetAdjustmentBehavior={!options.disableAutomaticContentInsets}\n tabBarItemBadgeBackgroundColor={\n standardAppearance.stacked?.normal?.tabBarItemBadgeBackgroundColor\n }\n tabBarItemBadgeTextColor={badgeTextColor}\n standardAppearance={standardAppearance}\n scrollEdgeAppearance={scrollEdgeAppearance}\n icon={convertOptionsIconToRNScreensPropsIcon(icon)}\n selectedIcon={convertOptionsIconToIOSPropsIcon(selectedIcon)}\n title={title}\n freezeContents={false}\n systemItem={options.role}\n {...options.nativeProps}\n tabKey={routeKey}\n isFocused={isFocused}>\n {wrappedContent}\n </BottomTabsScreen>\n );\n}\n\nconst supportedTabBarMinimizeBehaviorsSet = new Set<string>(SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS);\nconst supportedTabBarItemLabelVisibilityModesSet = new Set<string>(\n SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES\n);\n\nfunction BottomTabsWrapper(props: BottomTabsProps) {\n let { tabBarMinimizeBehavior, tabBarItemLabelVisibilityMode, ...rest } = props;\n if (tabBarMinimizeBehavior && !supportedTabBarMinimizeBehaviorsSet.has(tabBarMinimizeBehavior)) {\n console.warn(\n `Unsupported minimizeBehavior: ${tabBarMinimizeBehavior}. Supported values are: ${SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS.map((behavior) => `\"${behavior}\"`).join(', ')}`\n );\n tabBarMinimizeBehavior = undefined;\n }\n if (\n tabBarItemLabelVisibilityMode &&\n !supportedTabBarItemLabelVisibilityModesSet.has(tabBarItemLabelVisibilityMode)\n ) {\n console.warn(\n `Unsupported labelVisibilityMode: ${tabBarItemLabelVisibilityMode}. Supported values are: ${SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES.map((mode) => `\"${mode}\"`).join(', ')}`\n );\n tabBarItemLabelVisibilityMode = undefined;\n }\n\n return (\n <BottomTabs\n tabBarItemLabelVisibilityMode={tabBarItemLabelVisibilityMode}\n tabBarMinimizeBehavior={tabBarMinimizeBehavior}\n {...rest}\n />\n );\n}\n"]}
1
+ {"version":3,"file":"NativeTabsView.js","sourceRoot":"","sources":["../../src/native-tabs/NativeTabsView.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AA0BA,wCAyHC;AAnJD,qDAAoD;AACpD,+CAAyD;AACzD,+CAAqD;AACrD,+DAA2F;AAC3F,oEAAiE;AAEjE,6CAGsB;AACtB,oCAAiC;AACjC,gDAA8D;AAC9D,mCAKiB;AACjB,uCAIsB;AACtB,gDAAwD;AACxD,6DAA0F;AAE1F,SAAgB,cAAc,CAAC,KAA0B;IACvD,MAAM,EACJ,gBAAgB,EAChB,gBAAgB,EAChB,YAAY,EACZ,IAAI,EACJ,gBAAgB,EAChB,kBAAkB,GACnB,GAAG,KAAK,CAAC;IAE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;IAC3C,IAAI,EAAE,sBAAsB,EAAE,6BAA6B,EAAE,GAAG,IAAI,EAAE,GAAG,KAAK,CAAC;IAC/E,IAAI,sBAAsB,IAAI,CAAC,mCAAmC,CAAC,GAAG,CAAC,sBAAsB,CAAC,EAAE,CAAC;QAC/F,OAAO,CAAC,IAAI,CACV,iCAAiC,sBAAsB,2BAA2B,4CAAoC,CAAC,GAAG,CAAC,CAAC,QAAQ,EAAE,EAAE,CAAC,IAAI,QAAQ,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACvK,CAAC;QACF,sBAAsB,GAAG,SAAS,CAAC;IACrC,CAAC;IACD,IACE,6BAA6B;QAC7B,CAAC,0CAA0C,CAAC,GAAG,CAAC,6BAA6B,CAAC,EAC9E,CAAC;QACD,OAAO,CAAC,IAAI,CACV,oCAAoC,6BAA6B,2BAA2B,qDAA6C,CAAC,GAAG,CAAC,CAAC,IAAI,EAAE,EAAE,CAAC,IAAI,IAAI,GAAG,CAAC,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CAClL,CAAC;QACF,6BAA6B,GAAG,SAAS,CAAC;IAC5C,CAAC;IAED,OAAO,CACL,CAAC,2BAAI,CAAC,IAAI,CACR,6BAA6B,CAAC,CAAC,6BAA6B,CAAC,CAC7D,sBAAsB,CAAC,CAAC,sBAAsB,CAAC,CAC/C,IAAI,IAAI,CAAC,EACT,CACH,CAAC;AACJ,CAAC","sourcesContent":["import { useTheme } from '@react-navigation/native';\nimport React, { useDeferredValue, useMemo } from 'react';\nimport { View, type ColorValue } from 'react-native';\nimport { Tabs, type TabsHostProps, type TabsScreenAppearance } from 'react-native-screens';\nimport { SafeAreaView } from 'react-native-screens/experimental';\n\nimport {\n createScrollEdgeAppearanceFromOptions,\n createStandardAppearanceFromOptions,\n} from './appearance';\nimport { Color } from '../color';\nimport { NativeTabsBottomAccessory } from './common/elements';\nimport {\n SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES,\n SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS,\n type NativeTabOptions,\n type NativeTabsViewProps,\n} from './types';\nimport {\n convertOptionsIconToRNScreensPropsIcon,\n convertOptionsIconToIOSPropsIcon,\n useAwaitedScreensIcon,\n} from './utils/icon';\nimport { getFirstChildOfType } from '../utils/children';\nimport { useBottomAccessoryFunctionFromBottomAccessories } from './utils/bottomAccessory';\n\nexport function NativeTabsView(props: NativeTabsViewProps) {\n const {\n minimizeBehavior,\n disableIndicator,\n focusedIndex,\n tabs,\n sidebarAdaptable,\n nonTriggerChildren,\n } = props;\n\n const deferredFocusedIndex = useDeferredValue(focusedIndex);\n // We need to check if the deferred index is not out of bounds\n // This can happen when the focused index is the last tab, and user removes that tab\n // In that case the deferred index will still point to the last tab, but after re-render\n // it will be out of bounds\n const inBoundsDeferredFocusedIndex =\n deferredFocusedIndex < tabs.length ? deferredFocusedIndex : focusedIndex;\n\n const appearances = tabs.map((tab) => ({\n standardAppearance: createStandardAppearanceFromOptions(tab.options),\n scrollEdgeAppearance: createScrollEdgeAppearanceFromOptions(tab.options),\n }));\n\n const options = tabs.map((tab) => tab.options);\n\n const bottomAccessory = useMemo(\n () => getFirstChildOfType(nonTriggerChildren, NativeTabsBottomAccessory),\n [nonTriggerChildren]\n );\n\n const bottomAccessoryFn = useBottomAccessoryFunctionFromBottomAccessories(bottomAccessory);\n\n const children = tabs.map((tab, index) => {\n const isFocused = index === inBoundsDeferredFocusedIndex;\n\n return (\n <Screen\n key={tab.routeKey}\n routeKey={tab.routeKey}\n name={tab.name}\n options={tab.options}\n isFocused={isFocused}\n standardAppearance={appearances[index].standardAppearance}\n scrollEdgeAppearance={appearances[index].scrollEdgeAppearance}\n badgeTextColor={tab.options.badgeTextColor}\n contentRenderer={tab.contentRenderer}\n />\n );\n });\n\n const currentTabAppearance = appearances[inBoundsDeferredFocusedIndex]?.standardAppearance;\n const tabBarControllerMode: TabsHostProps['tabBarControllerMode'] = sidebarAdaptable\n ? 'tabSidebar'\n : sidebarAdaptable === false\n ? 'tabBar'\n : 'automatic';\n\n // Material Design 3 dynamic color defaults for Android\n const androidMaterialDefaults =\n process.env.EXPO_OS === 'android'\n ? {\n inactiveColor: Color.android.dynamic.onSurfaceVariant,\n activeIconColor: Color.android.dynamic.onSecondaryContainer,\n activeLabelColor: Color.android.dynamic.onSurface,\n backgroundColor: Color.android.dynamic.surfaceContainer,\n rippleColor: Color.android.dynamic.primary,\n indicatorColor: Color.android.dynamic.secondaryContainer,\n }\n : undefined;\n\n return (\n <TabsHostWrapper\n // #region android props\n tabBarItemTitleFontColor={\n currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontColor ??\n androidMaterialDefaults?.inactiveColor\n }\n tabBarItemTitleFontFamily={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontFamily}\n tabBarItemTitleFontSize={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontSize}\n tabBarItemTitleFontSizeActive={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontSize}\n tabBarItemTitleFontWeight={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontWeight}\n tabBarItemTitleFontStyle={currentTabAppearance?.stacked?.normal?.tabBarItemTitleFontStyle}\n tabBarItemIconColor={\n currentTabAppearance?.stacked?.normal?.tabBarItemIconColor ??\n androidMaterialDefaults?.inactiveColor\n }\n tabBarBackgroundColor={\n currentTabAppearance?.tabBarBackgroundColor ?? androidMaterialDefaults?.backgroundColor\n }\n tabBarItemRippleColor={props.rippleColor ?? androidMaterialDefaults?.rippleColor}\n tabBarItemLabelVisibilityMode={props.labelVisibilityMode}\n tabBarItemIconColorActive={\n currentTabAppearance?.stacked?.selected?.tabBarItemIconColor ??\n props?.tintColor ??\n androidMaterialDefaults?.activeIconColor\n }\n tabBarItemTitleFontColorActive={\n currentTabAppearance?.stacked?.selected?.tabBarItemTitleFontColor ??\n props?.tintColor ??\n androidMaterialDefaults?.activeLabelColor\n }\n // tabBarItemTitleFontSizeActive={activeStyle?.fontSize}\n tabBarItemActiveIndicatorColor={\n options[inBoundsDeferredFocusedIndex]?.indicatorColor ??\n androidMaterialDefaults?.indicatorColor\n }\n tabBarItemActiveIndicatorEnabled={!disableIndicator}\n // #endregion\n // #region iOS props\n tabBarTintColor={props?.tintColor}\n tabBarMinimizeBehavior={minimizeBehavior}\n tabBarControllerMode={tabBarControllerMode}\n bottomAccessory={bottomAccessoryFn}\n tabBarHidden={props.hidden}\n // #endregion\n onNativeFocusChange={({ nativeEvent: { tabKey } }) => {\n props.onTabChange(tabKey);\n }}>\n {children}\n </TabsHostWrapper>\n );\n}\n\nfunction Screen(props: {\n routeKey: string;\n name: string;\n isFocused: boolean;\n options: NativeTabOptions;\n standardAppearance: TabsScreenAppearance;\n scrollEdgeAppearance: TabsScreenAppearance;\n badgeTextColor: ColorValue | undefined;\n contentRenderer: () => React.ReactNode;\n}) {\n const {\n routeKey,\n name,\n options,\n isFocused,\n standardAppearance,\n scrollEdgeAppearance,\n badgeTextColor,\n contentRenderer,\n } = props;\n const title = options.title ?? name;\n\n // We need to await the icon, as VectorIcon will load asynchronously\n const icon = useAwaitedScreensIcon(options.icon);\n const selectedIcon = useAwaitedScreensIcon(options.selectedIcon);\n const { colors } = useTheme();\n\n const content = (\n <View\n // https://github.com/software-mansion/react-native-screens/issues/2662#issuecomment-2757735088\n collapsable={false}\n style={[\n { backgroundColor: colors.background },\n options.contentStyle,\n { flex: 1, position: 'relative', overflow: 'hidden' },\n ]}>\n {contentRenderer()}\n </View>\n );\n const wrappedContent =\n process.env.EXPO_OS === 'android' && !options.disableAutomaticContentInsets ? (\n <SafeAreaView\n // https://github.com/software-mansion/react-native-screens/issues/2662#issuecomment-2757735088\n collapsable={false}\n style={{ flex: 1 }}\n edges={{ bottom: true }}>\n {content}\n </SafeAreaView>\n ) : (\n content\n );\n\n return (\n <Tabs.Screen\n {...options}\n overrideScrollViewContentInsetAdjustmentBehavior={!options.disableAutomaticContentInsets}\n tabBarItemBadgeBackgroundColor={\n standardAppearance.stacked?.normal?.tabBarItemBadgeBackgroundColor\n }\n tabBarItemBadgeTextColor={badgeTextColor}\n standardAppearance={standardAppearance}\n scrollEdgeAppearance={scrollEdgeAppearance}\n icon={convertOptionsIconToRNScreensPropsIcon(icon)}\n selectedIcon={convertOptionsIconToIOSPropsIcon(selectedIcon)}\n title={title}\n freezeContents={false}\n systemItem={options.role}\n {...options.nativeProps}\n tabKey={routeKey}\n isFocused={isFocused}>\n {wrappedContent}\n </Tabs.Screen>\n );\n}\n\nconst supportedTabBarMinimizeBehaviorsSet = new Set<string>(SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS);\nconst supportedTabBarItemLabelVisibilityModesSet = new Set<string>(\n SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES\n);\n\nfunction TabsHostWrapper(props: TabsHostProps) {\n let { tabBarMinimizeBehavior, tabBarItemLabelVisibilityMode, ...rest } = props;\n if (tabBarMinimizeBehavior && !supportedTabBarMinimizeBehaviorsSet.has(tabBarMinimizeBehavior)) {\n console.warn(\n `Unsupported minimizeBehavior: ${tabBarMinimizeBehavior}. Supported values are: ${SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS.map((behavior) => `\"${behavior}\"`).join(', ')}`\n );\n tabBarMinimizeBehavior = undefined;\n }\n if (\n tabBarItemLabelVisibilityMode &&\n !supportedTabBarItemLabelVisibilityModesSet.has(tabBarItemLabelVisibilityMode)\n ) {\n console.warn(\n `Unsupported labelVisibilityMode: ${tabBarItemLabelVisibilityMode}. Supported values are: ${SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES.map((mode) => `\"${mode}\"`).join(', ')}`\n );\n tabBarItemLabelVisibilityMode = undefined;\n }\n\n return (\n <Tabs.Host\n tabBarItemLabelVisibilityMode={tabBarItemLabelVisibilityMode}\n tabBarMinimizeBehavior={tabBarMinimizeBehavior}\n {...rest}\n />\n );\n}\n"]}
@@ -1,8 +1,8 @@
1
1
  import type { ColorValue } from 'react-native';
2
- import type { BottomTabsScreenAppearance, BottomTabsScreenItemStateAppearance } from 'react-native-screens';
2
+ import type { TabsScreenAppearance, TabsScreenItemStateAppearance } from 'react-native-screens';
3
3
  import { type NativeTabOptions, type NativeTabsBlurEffect, type NativeTabsLabelStyle } from './types';
4
- export declare function createStandardAppearanceFromOptions(options: NativeTabOptions): BottomTabsScreenAppearance;
5
- export declare function createScrollEdgeAppearanceFromOptions(options: NativeTabOptions): BottomTabsScreenAppearance;
4
+ export declare function createStandardAppearanceFromOptions(options: NativeTabOptions): TabsScreenAppearance;
5
+ export declare function createScrollEdgeAppearanceFromOptions(options: NativeTabOptions): TabsScreenAppearance;
6
6
  export interface AppearanceStyle extends NativeTabsLabelStyle {
7
7
  iconColor?: ColorValue;
8
8
  backgroundColor?: ColorValue | null;
@@ -14,8 +14,8 @@ export interface AppearanceStyle extends NativeTabsLabelStyle {
14
14
  vertical?: number;
15
15
  };
16
16
  }
17
- export declare function appendSelectedStyleToAppearance(selectedStyle: AppearanceStyle, appearance: BottomTabsScreenAppearance): BottomTabsScreenAppearance;
18
- export declare function appendStyleToAppearance(style: AppearanceStyle, appearance: BottomTabsScreenAppearance, states: ('selected' | 'focused' | 'disabled' | 'normal')[]): BottomTabsScreenAppearance;
19
- export declare function convertStyleToAppearance(style: AppearanceStyle | undefined): BottomTabsScreenAppearance;
20
- export declare function convertStyleToItemStateAppearance(style: AppearanceStyle | undefined): BottomTabsScreenItemStateAppearance;
17
+ export declare function appendSelectedStyleToAppearance(selectedStyle: AppearanceStyle, appearance: TabsScreenAppearance): TabsScreenAppearance;
18
+ export declare function appendStyleToAppearance(style: AppearanceStyle, appearance: TabsScreenAppearance, states: ('selected' | 'focused' | 'disabled' | 'normal')[]): TabsScreenAppearance;
19
+ export declare function convertStyleToAppearance(style: AppearanceStyle | undefined): TabsScreenAppearance;
20
+ export declare function convertStyleToItemStateAppearance(style: AppearanceStyle | undefined): TabsScreenItemStateAppearance;
21
21
  //# sourceMappingURL=appearance.d.ts.map
@@ -1 +1 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AAG,EAAE,EAAE;QAC9F,IAAI,eAAe,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;YACvC,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC;AACzB,CAAC","sourcesContent":["import type { ColorValue } from 'react-native';\nimport type {\n BottomTabsScreenAppearance,\n BottomTabsScreenItemAppearance,\n BottomTabsScreenItemStateAppearance,\n} from 'react-native-screens';\n\nimport {\n SUPPORTED_BLUR_EFFECTS,\n type NativeTabOptions,\n type NativeTabsBlurEffect,\n type NativeTabsLabelStyle,\n} from './types';\nimport { convertFontWeightToStringFontWeight } from '../utils/style';\n\nconst supportedBlurEffectsSet = new Set<string>(SUPPORTED_BLUR_EFFECTS);\n\nexport function createStandardAppearanceFromOptions(\n options: NativeTabOptions\n): BottomTabsScreenAppearance {\n let blurEffect = options.blurEffect;\n if (blurEffect && !supportedBlurEffectsSet.has(blurEffect)) {\n console.warn(\n `Unsupported blurEffect: ${blurEffect}. Supported values are: ${SUPPORTED_BLUR_EFFECTS.map(\n (effect) => `\"${effect}\"`\n ).join(', ')}`\n );\n blurEffect = undefined;\n }\n const appearance = appendStyleToAppearance(\n {\n ...options.labelStyle,\n iconColor: options.iconColor,\n backgroundColor: options.backgroundColor,\n blurEffect,\n badgeBackgroundColor: options.badgeBackgroundColor,\n titlePositionAdjustment: options.titlePositionAdjustment,\n shadowColor: options.shadowColor,\n },\n {},\n ['normal', 'focused', 'selected']\n );\n return appendSelectedStyleToAppearance(\n {\n ...(options.selectedLabelStyle ?? {}),\n iconColor: options.selectedIconColor,\n badgeBackgroundColor: options.selectedBadgeBackgroundColor,\n titlePositionAdjustment: options.selectedTitlePositionAdjustment,\n },\n appearance\n );\n}\n\nexport function createScrollEdgeAppearanceFromOptions(\n options: NativeTabOptions\n): BottomTabsScreenAppearance {\n let blurEffect = options.disableTransparentOnScrollEdge ? options.blurEffect : 'none';\n if (blurEffect && !supportedBlurEffectsSet.has(blurEffect)) {\n console.warn(\n `Unsupported blurEffect: ${blurEffect}. Supported values are: ${SUPPORTED_BLUR_EFFECTS.map(\n (effect) => `\"${effect}\"`\n ).join(', ')}`\n );\n blurEffect = undefined;\n }\n const appearance = appendStyleToAppearance(\n {\n ...options.labelStyle,\n iconColor: options.iconColor,\n blurEffect,\n backgroundColor: options.disableTransparentOnScrollEdge ? options.backgroundColor : null,\n shadowColor: options.disableTransparentOnScrollEdge ? options.shadowColor : 'transparent',\n badgeBackgroundColor: options.badgeBackgroundColor,\n titlePositionAdjustment: options.titlePositionAdjustment,\n },\n {},\n ['normal', 'focused', 'selected']\n );\n return appendSelectedStyleToAppearance(\n {\n ...(options.selectedLabelStyle ?? {}),\n iconColor: options.selectedIconColor,\n badgeBackgroundColor: options.selectedBadgeBackgroundColor,\n titlePositionAdjustment: options.selectedTitlePositionAdjustment,\n },\n appearance\n );\n}\n\nexport interface AppearanceStyle extends NativeTabsLabelStyle {\n iconColor?: ColorValue;\n backgroundColor?: ColorValue | null;\n blurEffect?: NativeTabsBlurEffect;\n badgeBackgroundColor?: ColorValue;\n shadowColor?: ColorValue;\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n}\n\nexport function appendSelectedStyleToAppearance(\n selectedStyle: AppearanceStyle,\n appearance: BottomTabsScreenAppearance\n): BottomTabsScreenAppearance {\n return appendStyleToAppearance(selectedStyle, appearance, ['selected', 'focused']);\n}\n\nconst EMPTY_APPEARANCE_ITEM: BottomTabsScreenItemAppearance = {\n normal: {},\n selected: {},\n focused: {},\n disabled: {},\n};\n\nexport function appendStyleToAppearance(\n style: AppearanceStyle,\n appearance: BottomTabsScreenAppearance,\n states: ('selected' | 'focused' | 'disabled' | 'normal')[]\n): BottomTabsScreenAppearance {\n const baseItemAppearance =\n appearance.stacked || appearance.inline || appearance.compactInline || {};\n\n const styleAppearance = convertStyleToAppearance(style);\n const newAppearances = states.map((state) => ({\n key: state,\n appearance: {\n ...baseItemAppearance.normal,\n ...baseItemAppearance[state],\n ...styleAppearance.stacked?.normal,\n },\n }));\n\n const itemAppearance: BottomTabsScreenItemAppearance = {\n ...EMPTY_APPEARANCE_ITEM,\n ...baseItemAppearance,\n ...Object.fromEntries(newAppearances.map(({ key, appearance }) => [key, appearance])),\n };\n return {\n stacked: itemAppearance,\n inline: itemAppearance,\n compactInline: itemAppearance,\n tabBarBackgroundColor:\n style.backgroundColor === null\n ? undefined\n : (style.backgroundColor ?? appearance.tabBarBackgroundColor),\n tabBarBlurEffect: styleAppearance.tabBarBlurEffect ?? appearance.tabBarBlurEffect,\n tabBarShadowColor: styleAppearance.tabBarShadowColor ?? appearance.tabBarShadowColor,\n };\n}\n\nexport function convertStyleToAppearance(\n style: AppearanceStyle | undefined\n): BottomTabsScreenAppearance {\n if (!style) {\n return {};\n }\n const stateAppearance = convertStyleToItemStateAppearance(style);\n const itemAppearance: BottomTabsScreenItemAppearance = {\n normal: stateAppearance,\n selected: stateAppearance,\n focused: stateAppearance,\n disabled: {},\n };\n return {\n inline: itemAppearance,\n stacked: itemAppearance,\n compactInline: itemAppearance,\n tabBarBackgroundColor: style?.backgroundColor ?? undefined,\n tabBarBlurEffect: style?.blurEffect,\n tabBarShadowColor: style?.shadowColor,\n };\n}\n\nexport function convertStyleToItemStateAppearance(\n style: AppearanceStyle | undefined\n): BottomTabsScreenItemStateAppearance {\n if (!style) {\n return {};\n }\n const stateAppearance: BottomTabsScreenItemStateAppearance = {\n tabBarItemBadgeBackgroundColor: style.badgeBackgroundColor,\n tabBarItemTitlePositionAdjustment: style.titlePositionAdjustment,\n tabBarItemIconColor: style.iconColor,\n tabBarItemTitleFontFamily: style.fontFamily,\n tabBarItemTitleFontSize: style.fontSize,\n tabBarItemTitleFontWeight: convertFontWeightToStringFontWeight(style.fontWeight),\n tabBarItemTitleFontStyle: style.fontStyle,\n tabBarItemTitleFontColor: style.color,\n };\n\n (Object.keys(stateAppearance) as (keyof BottomTabsScreenItemStateAppearance)[]).forEach((key) => {\n if (stateAppearance[key] === undefined) {\n delete stateAppearance[key];\n }\n });\n\n return stateAppearance;\n}\n"]}
1
+ {"version":3,"file":"appearance.js","sourceRoot":"","sources":["../../src/native-tabs/appearance.ts"],"names":[],"mappings":";;AAiBA,kFAkCC;AAED,sFAkCC;AAcD,0EAKC;AASD,0DAkCC;AAED,4DAmBC;AAED,8EAwBC;AA7LD,mCAKiB;AACjB,0CAAqE;AAErE,MAAM,uBAAuB,GAAG,IAAI,GAAG,CAAS,8BAAsB,CAAC,CAAC;AAExE,SAAgB,mCAAmC,CACjD,OAAyB;IAEzB,IAAI,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;IACpC,IAAI,UAAU,IAAI,CAAC,uBAAuB,CAAC,GAAG,CAAC,UAAU,CAAC,EAAE,CAAC;QAC3D,OAAO,CAAC,IAAI,CACV,2BAA2B,UAAU,2BAA2B,8BAAsB,CAAC,GAAG,CACxF,CAAC,MAAM,EAAE,EAAE,CAAC,IAAI,MAAM,GAAG,CAC1B,CAAC,IAAI,CAAC,IAAI,CAAC,EAAE,CACf,CAAC;QACF,UAAU,GAAG,SAAS,CAAC;IACzB,CAAC;IACD,MAAM,UAAU,GAAG,uBAAuB,CACxC;QACE,GAAG,OAAO,CAAC,UAAU;QACrB,SAAS,EAAE,OAAO,CAAC,SAAS;QAC5B,eAAe,EAAE,OAAO,CAAC,eAAe;QACxC,UAAU;QACV,oBAAoB,EAAE,OAAO,CAAC,oBAAoB;QAClD,uBAAuB,EAAE,OAAO,CAAC,uBAAuB;QACxD,WAAW,EAAE,OAAO,CAAC,WAAW;KACjC,EACD,EAAE,EACF,CAAC,QAAQ,EAAE,SAAS,EAAE,UAAU,CAAC,CAClC,CAAC;IACF,OAAO,+BAA+B,CACpC;QACE,GAAG,CAAC,OAAO,CAAC,kBAAkB,IAAI,EAAE,CAAC;QACrC,SAAS,EAAE,OAAO,CAAC,iBAAiB;QACpC,oBAAoB,EAAE,OAAO,CAAC,4BAA4B;Q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AI,CAAC,eAAe,CAA6C,CAAC,OAAO,CAAC,CAAC,GAAG,EAAE,EAAE;QACxF,IAAI,eAAe,CAAC,GAAG,CAAC,KAAK,SAAS,EAAE,CAAC;YACvC,OAAO,eAAe,CAAC,GAAG,CAAC,CAAC;QAC9B,CAAC;IACH,CAAC,CAAC,CAAC;IAEH,OAAO,eAAe,CAAC;AACzB,CAAC","sourcesContent":["import type { ColorValue } from 'react-native';\nimport type {\n TabsScreenAppearance,\n TabsScreenItemAppearance,\n TabsScreenItemStateAppearance,\n} from 'react-native-screens';\n\nimport {\n SUPPORTED_BLUR_EFFECTS,\n type NativeTabOptions,\n type NativeTabsBlurEffect,\n type NativeTabsLabelStyle,\n} from './types';\nimport { convertFontWeightToStringFontWeight } from '../utils/style';\n\nconst supportedBlurEffectsSet = new Set<string>(SUPPORTED_BLUR_EFFECTS);\n\nexport function createStandardAppearanceFromOptions(\n options: NativeTabOptions\n): TabsScreenAppearance {\n let blurEffect = options.blurEffect;\n if (blurEffect && !supportedBlurEffectsSet.has(blurEffect)) {\n console.warn(\n `Unsupported blurEffect: ${blurEffect}. Supported values are: ${SUPPORTED_BLUR_EFFECTS.map(\n (effect) => `\"${effect}\"`\n ).join(', ')}`\n );\n blurEffect = undefined;\n }\n const appearance = appendStyleToAppearance(\n {\n ...options.labelStyle,\n iconColor: options.iconColor,\n backgroundColor: options.backgroundColor,\n blurEffect,\n badgeBackgroundColor: options.badgeBackgroundColor,\n titlePositionAdjustment: options.titlePositionAdjustment,\n shadowColor: options.shadowColor,\n },\n {},\n ['normal', 'focused', 'selected']\n );\n return appendSelectedStyleToAppearance(\n {\n ...(options.selectedLabelStyle ?? {}),\n iconColor: options.selectedIconColor,\n badgeBackgroundColor: options.selectedBadgeBackgroundColor,\n titlePositionAdjustment: options.selectedTitlePositionAdjustment,\n },\n appearance\n );\n}\n\nexport function createScrollEdgeAppearanceFromOptions(\n options: NativeTabOptions\n): TabsScreenAppearance {\n let blurEffect = options.disableTransparentOnScrollEdge ? options.blurEffect : 'none';\n if (blurEffect && !supportedBlurEffectsSet.has(blurEffect)) {\n console.warn(\n `Unsupported blurEffect: ${blurEffect}. Supported values are: ${SUPPORTED_BLUR_EFFECTS.map(\n (effect) => `\"${effect}\"`\n ).join(', ')}`\n );\n blurEffect = undefined;\n }\n const appearance = appendStyleToAppearance(\n {\n ...options.labelStyle,\n iconColor: options.iconColor,\n blurEffect,\n backgroundColor: options.disableTransparentOnScrollEdge ? options.backgroundColor : null,\n shadowColor: options.disableTransparentOnScrollEdge ? options.shadowColor : 'transparent',\n badgeBackgroundColor: options.badgeBackgroundColor,\n titlePositionAdjustment: options.titlePositionAdjustment,\n },\n {},\n ['normal', 'focused', 'selected']\n );\n return appendSelectedStyleToAppearance(\n {\n ...(options.selectedLabelStyle ?? {}),\n iconColor: options.selectedIconColor,\n badgeBackgroundColor: options.selectedBadgeBackgroundColor,\n titlePositionAdjustment: options.selectedTitlePositionAdjustment,\n },\n appearance\n );\n}\n\nexport interface AppearanceStyle extends NativeTabsLabelStyle {\n iconColor?: ColorValue;\n backgroundColor?: ColorValue | null;\n blurEffect?: NativeTabsBlurEffect;\n badgeBackgroundColor?: ColorValue;\n shadowColor?: ColorValue;\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n}\n\nexport function appendSelectedStyleToAppearance(\n selectedStyle: AppearanceStyle,\n appearance: TabsScreenAppearance\n): TabsScreenAppearance {\n return appendStyleToAppearance(selectedStyle, appearance, ['selected', 'focused']);\n}\n\nconst EMPTY_APPEARANCE_ITEM: TabsScreenItemAppearance = {\n normal: {},\n selected: {},\n focused: {},\n disabled: {},\n};\n\nexport function appendStyleToAppearance(\n style: AppearanceStyle,\n appearance: TabsScreenAppearance,\n states: ('selected' | 'focused' | 'disabled' | 'normal')[]\n): TabsScreenAppearance {\n const baseItemAppearance =\n appearance.stacked || appearance.inline || appearance.compactInline || {};\n\n const styleAppearance = convertStyleToAppearance(style);\n const newAppearances = states.map((state) => ({\n key: state,\n appearance: {\n ...baseItemAppearance.normal,\n ...baseItemAppearance[state],\n ...styleAppearance.stacked?.normal,\n },\n }));\n\n const itemAppearance: TabsScreenItemAppearance = {\n ...EMPTY_APPEARANCE_ITEM,\n ...baseItemAppearance,\n ...Object.fromEntries(newAppearances.map(({ key, appearance }) => [key, appearance])),\n };\n return {\n stacked: itemAppearance,\n inline: itemAppearance,\n compactInline: itemAppearance,\n tabBarBackgroundColor:\n style.backgroundColor === null\n ? undefined\n : (style.backgroundColor ?? appearance.tabBarBackgroundColor),\n tabBarBlurEffect: styleAppearance.tabBarBlurEffect ?? appearance.tabBarBlurEffect,\n tabBarShadowColor: styleAppearance.tabBarShadowColor ?? appearance.tabBarShadowColor,\n };\n}\n\nexport function convertStyleToAppearance(style: AppearanceStyle | undefined): TabsScreenAppearance {\n if (!style) {\n return {};\n }\n const stateAppearance = convertStyleToItemStateAppearance(style);\n const itemAppearance: TabsScreenItemAppearance = {\n normal: stateAppearance,\n selected: stateAppearance,\n focused: stateAppearance,\n disabled: {},\n };\n return {\n inline: itemAppearance,\n stacked: itemAppearance,\n compactInline: itemAppearance,\n tabBarBackgroundColor: style?.backgroundColor ?? undefined,\n tabBarBlurEffect: style?.blurEffect,\n tabBarShadowColor: style?.shadowColor,\n };\n}\n\nexport function convertStyleToItemStateAppearance(\n style: AppearanceStyle | undefined\n): TabsScreenItemStateAppearance {\n if (!style) {\n return {};\n }\n const stateAppearance: TabsScreenItemStateAppearance = {\n tabBarItemBadgeBackgroundColor: style.badgeBackgroundColor,\n tabBarItemTitlePositionAdjustment: style.titlePositionAdjustment,\n tabBarItemIconColor: style.iconColor,\n tabBarItemTitleFontFamily: style.fontFamily,\n tabBarItemTitleFontSize: style.fontSize,\n tabBarItemTitleFontWeight: convertFontWeightToStringFontWeight(style.fontWeight),\n tabBarItemTitleFontStyle: style.fontStyle,\n tabBarItemTitleFontColor: style.color,\n };\n\n (Object.keys(stateAppearance) as (keyof TabsScreenItemStateAppearance)[]).forEach((key) => {\n if (stateAppearance[key] === undefined) {\n delete stateAppearance[key];\n }\n });\n\n return stateAppearance;\n}\n"]}
@@ -1,9 +1,9 @@
1
1
  import type { DefaultRouterOptions } from '@react-navigation/native';
2
2
  import type { PropsWithChildren } from 'react';
3
3
  import type { ColorValue, ImageSourcePropType, StyleProp, TextStyle, ViewStyle } from 'react-native';
4
- import type { BottomTabsScreenProps } from 'react-native-screens';
4
+ import type { TabsScreenProps } from 'react-native-screens';
5
5
  import type { SFSymbol } from 'sf-symbols-typescript';
6
- export type NativeScreenProps = Partial<Omit<BottomTabsScreenProps, 'tabKey' | 'isFocused'>>;
6
+ export type NativeScreenProps = Partial<Omit<TabsScreenProps, 'tabKey' | 'isFocused'>>;
7
7
  export interface NativeTabOptions extends DefaultRouterOptions {
8
8
  icon?: SymbolOrImageSource;
9
9
  selectedIcon?: SymbolOrImageSource;
@@ -31,7 +31,7 @@ export interface NativeTabOptions extends DefaultRouterOptions {
31
31
  };
32
32
  indicatorColor?: ColorValue;
33
33
  hidden?: boolean;
34
- specialEffects?: BottomTabsScreenProps['specialEffects'];
34
+ specialEffects?: TabsScreenProps['specialEffects'];
35
35
  nativeProps?: NativeScreenProps;
36
36
  disableAutomaticContentInsets?: boolean;
37
37
  contentStyle?: Pick<ViewStyle, 'backgroundColor' | 'experimental_backgroundImage' | 'padding' | 'paddingTop' | 'paddingBottom' | 'paddingLeft' | 'paddingRight' | 'paddingBlock' | 'paddingBlockEnd' | 'paddingBlockStart' | 'paddingInline' | 'paddingInlineEnd' | 'paddingInlineStart' | 'paddingEnd' | 'paddingHorizontal' | 'paddingVertical' | 'paddingStart' | 'alignContent' | 'alignItems' | 'justifyContent' | 'flexDirection' | 'gap'>;
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/native-tabs/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,0BAA0B,CAAC;AACrE,OAAO,KAAK,EAAE,iBAAiB,E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;AAExD,MAAM,WAAW,qBAAqB;IACpC;;;;;;OAMG;IACH,IAAI,CAAC,EAAE,MAAM,CAAC;IACd;;;;OAIG;IACH,MAAM,CAAC,EAAE,OAAO,CAAC;IACjB;;;;;;;;;;OAUG;IACH,oBAAoB,CAAC,EAAE,iBAAiB,CAAC;IACzC;;;;;OAKG;IACH,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B;;;;;OAKG;IACH,kBAAkB,CAAC,EAAE,OAAO,CAAC;IAC7B;;;;OAIG;IACH,QAAQ,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC;IAC3B;;;;;;;;;;OAUG;IACH,IAAI,CAAC,EAAE,wBAAwB,CAAC;IAChC;;;;;;;;;;;;;;;OAeG;IACH,6BAA6B,CAAC,EAAE,OAAO,CAAC;IACxC;;;;OAIG;IACH,YAAY,CAAC,EAAE,gBAAgB,CAAC,cAAc,CAAC,CAAC;CACjD;AAED,QAAA,MAAM,4BAA4B,0JAaxB,CAAC;AAEX,MAAM,MAAM,wBAAwB,GAAG,CAAC,OAAO,4BAA4B,CAAC,CAAC,MAAM,CAAC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/native-tabs/types.ts"],"names":[],"mappings":";;;AAsGa,QAAA,sBAAsB,GAAG;IACpC,MAAM;IACN,eAAe;IACf,YAAY;IACZ,OAAO;IACP,MAAM;IACN,SAAS;IACT,WAAW;IACX,yBAAyB;IACzB,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;IACrB,sBAAsB;IACtB,8BAA8B;IAC9B,yBAAyB;IACzB,qBAAqB;IACrB,0BAA0B;IAC1B,2BAA2B;IAC3B,6BAA6B;IAC7B,wBAAwB;IACxB,oBAAoB;IACpB,yBAAyB;IACzB,0BAA0B;CAClB,CAAC;AA2KE,QAAA,6CAA6C,GAAG;IAC3D,MAAM;IACN,UAAU;IACV,SAAS;IACT,WAAW;CACH,CAAC;AAUE,QAAA,oCAAoC,GAAG;IAClD,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;CACJ,CAAC;AA8FX,MAAM,4BAA4B,GAAG;IACnC,WAAW;IACX,UAAU;IACV,WAAW;IACX,WAAW;IACX,UAAU;IACV,SAAS;IACT,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC","sourcesContent":["import type { DefaultRouterOptions } from '@react-navigation/native';\nimport type { PropsWithChildren } from 'react';\nimport type {\n ColorValue,\n ImageSourcePropType,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native';\nimport type { BottomTabsScreenProps } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nexport type NativeScreenProps = Partial<Omit<BottomTabsScreenProps, 'tabKey' | 'isFocused'>>;\n\nexport interface NativeTabOptions extends DefaultRouterOptions {\n icon?: SymbolOrImageSource;\n selectedIcon?: SymbolOrImageSource;\n title?: string;\n badgeValue?: string;\n selectedLabelStyle?: NativeTabsLabelStyle;\n labelStyle?: NativeTabsLabelStyle;\n role?: NativeTabsTabBarItemRole;\n selectedIconColor?: ColorValue;\n selectedBadgeBackgroundColor?: ColorValue;\n badgeBackgroundColor?: ColorValue;\n badgeTextColor?: ColorValue;\n backgroundColor?: ColorValue;\n blurEffect?: NativeTabsBlurEffect;\n shadowColor?: ColorValue;\n iconColor?: ColorValue;\n disableTransparentOnScrollEdge?: boolean;\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n selectedTitlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n indicatorColor?: ColorValue;\n hidden?: boolean;\n specialEffects?: BottomTabsScreenProps['specialEffects'];\n nativeProps?: NativeScreenProps;\n disableAutomaticContentInsets?: boolean;\n contentStyle?: Pick<\n ViewStyle,\n | 'backgroundColor'\n | 'experimental_backgroundImage'\n | 'padding'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingBlock'\n | 'paddingBlockEnd'\n | 'paddingBlockStart'\n | 'paddingInline'\n | 'paddingInlineEnd'\n | 'paddingInlineStart'\n | 'paddingEnd'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingStart'\n | 'alignContent'\n | 'alignItems'\n | 'justifyContent'\n | 'flexDirection'\n | 'gap'\n >;\n}\n\nexport type SymbolOrImageSource =\n | {\n /**\n * The name of the SF Symbol to use as an icon.\n * @platform iOS\n */\n sf?: SFSymbol;\n /**\n * The name of the drawable resource to use as an icon.\n * @platform android\n */\n drawable?: string;\n }\n | {\n /**\n * The image source to use as an icon.\n */\n src?: ImageSourcePropType | Promise<ImageSourcePropType | null>;\n /**\n * Controls how the icon is rendered on iOS.\n * @platform ios\n * @default 'template'\n */\n renderingMode?: 'template' | 'original';\n };\n\nexport type NativeTabsLabelStyle = Pick<\n TextStyle,\n 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'color'\n>;\n\nexport const SUPPORTED_BLUR_EFFECTS = [\n 'none',\n 'systemDefault',\n 'extraLight',\n 'light',\n 'dark',\n 'regular',\n 'prominent',\n 'systemUltraThinMaterial',\n 'systemThinMaterial',\n 'systemMaterial',\n 'systemThickMaterial',\n 'systemChromeMaterial',\n 'systemUltraThinMaterialLight',\n 'systemThinMaterialLight',\n 'systemMaterialLight',\n 'systemThickMaterialLight',\n 'systemChromeMaterialLight',\n 'systemUltraThinMaterialDark',\n 'systemThinMaterialDark',\n 'systemMaterialDark',\n 'systemThickMaterialDark',\n 'systemChromeMaterialDark',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiblureffect/style)\n */\nexport type NativeTabsBlurEffect = (typeof SUPPORTED_BLUR_EFFECTS)[number];\n\nexport interface NativeTabsProps extends PropsWithChildren {\n // #region common props\n /**\n * The style of the every tab label in the tab bar.\n */\n labelStyle?:\n | StyleProp<NativeTabsLabelStyle>\n | {\n default?: StyleProp<NativeTabsLabelStyle>;\n selected?: StyleProp<NativeTabsLabelStyle>;\n };\n /**\n * The color of every tab icon in the tab bar.\n */\n iconColor?: ColorValue | { default?: ColorValue; selected?: ColorValue };\n /**\n * The tint color of the tab icon.\n *\n * Can be overridden by icon color and label color for each tab individually.\n */\n tintColor?: ColorValue;\n /**\n * The background color of the tab bar.\n */\n backgroundColor?: ColorValue;\n /**\n * The background color of every badge in the tab bar.\n */\n badgeBackgroundColor?: ColorValue;\n /**\n * When set to `true`, hides the tab bar.\n *\n * @default false\n */\n hidden?: boolean;\n // #endregion common props\n // #region iOS props\n /**\n * Specifies the minimize behavior for the tab bar.\n *\n * Available starting from iOS 26.\n *\n * The following values are currently supported:\n *\n * - `automatic` - resolves to the system default minimize behavior\n * - `never` - the tab bar does not minimize\n * - `onScrollDown` - the tab bar minimizes when scrolling down and\n * expands when scrolling back up\n * - `onScrollUp` - the tab bar minimizes when scrolling up and expands\n * when scrolling back down\n *\n * @see The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior).\n *\n * @default automatic\n *\n * @platform iOS 26+\n */\n minimizeBehavior?: NativeTabsTabBarMinimizeBehavior;\n /**\n * The blur effect applied to the tab bar.\n *\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * The color of the shadow.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uibarappearance/shadowcolor)\n *\n * @platform iOS\n */\n shadowColor?: ColorValue;\n /**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/titlepositionadjustment)\n *\n * @platform iOS\n */\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * When set to `true`, enables the sidebarAdaptable tab bar style on iPadOS and macOS. This prop has no effect on iPhone.\n *\n * @platform iOS 18+\n */\n sidebarAdaptable?: boolean;\n // #endregion iOS props\n // #region android props\n /**\n * Disables the active indicator for the tab bar.\n *\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * The behavior when navigating back with the back button.\n *\n * @platform android\n */\n backBehavior?: 'none' | 'initialRoute' | 'history';\n /**\n * The visibility mode of the tab item label.\n *\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * The color of the ripple effect when the tab is pressed.\n *\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * The color of the tab indicator.\n *\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n /**\n * The color of the badge text.\n *\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n // #endregion android props\n}\n\nexport interface InternalNativeTabsProps extends NativeTabsProps {\n nonTriggerChildren?: React.ReactNode;\n}\nexport interface NativeTabsViewProps\n extends Omit<\n InternalNativeTabsProps,\n | 'labelStyle'\n | 'iconColor'\n | 'backgroundColor'\n | 'badgeBackgroundColor'\n | 'blurEffect'\n | 'indicatorColor'\n | 'badgeTextColor'\n > {\n focusedIndex: number;\n tabs: NativeTabsViewTabItem[];\n onTabChange: (tabKey: string) => void;\n}\n\nexport interface NativeTabsViewTabItem {\n options: NativeTabOptions;\n routeKey: string;\n name: string;\n contentRenderer: () => React.ReactNode;\n}\n\nexport const SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES = [\n 'auto',\n 'selected',\n 'labeled',\n 'unlabeled',\n] as const;\n\n/**\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\nexport type NativeTabsTabBarItemLabelVisibilityMode =\n (typeof SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES)[number];\n\nexport const SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS = [\n 'automatic',\n 'never',\n 'onScrollDown',\n 'onScrollUp',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior)\n *\n * @platform iOS 26\n */\nexport type NativeTabsTabBarMinimizeBehavior =\n (typeof SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS)[number];\n\nexport interface NativeTabTriggerProps {\n /**\n * The name of the route.\n *\n * This is required when used inside a Layout component.\n *\n * When used in a route it has no effect.\n */\n name?: string;\n /**\n * If true, the tab will be hidden from the tab bar.\n *\n * > **Note**: Marking a tab as `hidden` means it cannot be navigated to in any way.\n */\n hidden?: boolean;\n /**\n * Props passed to the underlying native tab screen implementation.\n * Use this to configure props not directly exposed by Expo Router, but available in `react-native-screens`.\n *\n * > **Note**: This will override any other props set by Expo Router and may lead to unexpected behavior.\n *\n * > **Note**: This is an unstable API and may change or be removed in minor versions.\n *\n * @platform android\n * @platform iOS\n */\n unstable_nativeProps?: NativeScreenProps;\n /**\n * If true, the tab will not pop stack to the root when selected again.\n *\n * @default false\n * @platform iOS\n */\n disablePopToTop?: boolean;\n /**\n * If true, the tab will not scroll to the top when selected again.\n * @default false\n *\n * @platform iOS\n */\n disableScrollToTop?: boolean;\n /**\n * The children of the trigger.\n *\n * Use `Icon`, `Label`, and `Badge` components to customize the tab.\n */\n children?: React.ReactNode;\n /**\n * System-provided tab bar item with predefined icon and title\n *\n * Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with\n * standard iOS styling and localized titles. Custom `icon` or `selectedIcon`\n * properties will override the system icon, but the system-defined title cannot\n * be customized.\n *\n * @see The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem).\n * @platform ios\n */\n role?: NativeTabsTabBarItemRole;\n /**\n * The default behavior differs between iOS and Android.\n *\n * On **Android**, the content of a native tabs screen is automatically wrapped in a `SafeAreaView`,\n * and the **bottom** inset is applied. Other insets must be handled manually.\n *\n * On **iOS**, the first scroll view nested inside a native tabs screen has\n * [automatic content inset adjustment](https://reactnative.dev/docs/scrollview#contentinsetadjustmentbehavior-ios) enabled\n *\n * When this property is set to `true`, automatic content inset adjustment is disabled for the screen\n * and must be managed manually. You can use `SafeAreaView` from `react-native-screens/experimental`\n * to handle safe area insets.\n *\n * @platform android\n * @platform ios\n */\n disableAutomaticContentInsets?: boolean;\n /**\n * The style applied to the content of the tab\n *\n * Note: Only certain style properties are supported.\n */\n contentStyle?: NativeTabOptions['contentStyle'];\n}\n\nconst SUPPORTED_TAB_BAR_ITEM_ROLES = [\n 'bookmarks',\n 'contacts',\n 'downloads',\n 'favorites',\n 'featured',\n 'history',\n 'more',\n 'mostRecent',\n 'mostViewed',\n 'recents',\n 'search',\n 'topRated',\n] as const;\n\nexport type NativeTabsTabBarItemRole = (typeof SUPPORTED_TAB_BAR_ITEM_ROLES)[number];\n"]}
1
+ {"version":3,"file":"types.js","sourceRoot":"","sources":["../../src/native-tabs/types.ts"],"names":[],"mappings":";;;AAsGa,QAAA,sBAAsB,GAAG;IACpC,MAAM;IACN,eAAe;IACf,YAAY;IACZ,OAAO;IACP,MAAM;IACN,SAAS;IACT,WAAW;IACX,yBAAyB;IACzB,oBAAoB;IACpB,gBAAgB;IAChB,qBAAqB;IACrB,sBAAsB;IACtB,8BAA8B;IAC9B,yBAAyB;IACzB,qBAAqB;IACrB,0BAA0B;IAC1B,2BAA2B;IAC3B,6BAA6B;IAC7B,wBAAwB;IACxB,oBAAoB;IACpB,yBAAyB;IACzB,0BAA0B;CAClB,CAAC;AA2KE,QAAA,6CAA6C,GAAG;IAC3D,MAAM;IACN,UAAU;IACV,SAAS;IACT,WAAW;CACH,CAAC;AAUE,QAAA,oCAAoC,GAAG;IAClD,WAAW;IACX,OAAO;IACP,cAAc;IACd,YAAY;CACJ,CAAC;AA8FX,MAAM,4BAA4B,GAAG;IACnC,WAAW;IACX,UAAU;IACV,WAAW;IACX,WAAW;IACX,UAAU;IACV,SAAS;IACT,MAAM;IACN,YAAY;IACZ,YAAY;IACZ,SAAS;IACT,QAAQ;IACR,UAAU;CACF,CAAC","sourcesContent":["import type { DefaultRouterOptions } from '@react-navigation/native';\nimport type { PropsWithChildren } from 'react';\nimport type {\n ColorValue,\n ImageSourcePropType,\n StyleProp,\n TextStyle,\n ViewStyle,\n} from 'react-native';\nimport type { TabsScreenProps } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nexport type NativeScreenProps = Partial<Omit<TabsScreenProps, 'tabKey' | 'isFocused'>>;\n\nexport interface NativeTabOptions extends DefaultRouterOptions {\n icon?: SymbolOrImageSource;\n selectedIcon?: SymbolOrImageSource;\n title?: string;\n badgeValue?: string;\n selectedLabelStyle?: NativeTabsLabelStyle;\n labelStyle?: NativeTabsLabelStyle;\n role?: NativeTabsTabBarItemRole;\n selectedIconColor?: ColorValue;\n selectedBadgeBackgroundColor?: ColorValue;\n badgeBackgroundColor?: ColorValue;\n badgeTextColor?: ColorValue;\n backgroundColor?: ColorValue;\n blurEffect?: NativeTabsBlurEffect;\n shadowColor?: ColorValue;\n iconColor?: ColorValue;\n disableTransparentOnScrollEdge?: boolean;\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n selectedTitlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n indicatorColor?: ColorValue;\n hidden?: boolean;\n specialEffects?: TabsScreenProps['specialEffects'];\n nativeProps?: NativeScreenProps;\n disableAutomaticContentInsets?: boolean;\n contentStyle?: Pick<\n ViewStyle,\n | 'backgroundColor'\n | 'experimental_backgroundImage'\n | 'padding'\n | 'paddingTop'\n | 'paddingBottom'\n | 'paddingLeft'\n | 'paddingRight'\n | 'paddingBlock'\n | 'paddingBlockEnd'\n | 'paddingBlockStart'\n | 'paddingInline'\n | 'paddingInlineEnd'\n | 'paddingInlineStart'\n | 'paddingEnd'\n | 'paddingHorizontal'\n | 'paddingVertical'\n | 'paddingStart'\n | 'alignContent'\n | 'alignItems'\n | 'justifyContent'\n | 'flexDirection'\n | 'gap'\n >;\n}\n\nexport type SymbolOrImageSource =\n | {\n /**\n * The name of the SF Symbol to use as an icon.\n * @platform iOS\n */\n sf?: SFSymbol;\n /**\n * The name of the drawable resource to use as an icon.\n * @platform android\n */\n drawable?: string;\n }\n | {\n /**\n * The image source to use as an icon.\n */\n src?: ImageSourcePropType | Promise<ImageSourcePropType | null>;\n /**\n * Controls how the icon is rendered on iOS.\n * @platform ios\n * @default 'template'\n */\n renderingMode?: 'template' | 'original';\n };\n\nexport type NativeTabsLabelStyle = Pick<\n TextStyle,\n 'fontFamily' | 'fontSize' | 'fontStyle' | 'fontWeight' | 'color'\n>;\n\nexport const SUPPORTED_BLUR_EFFECTS = [\n 'none',\n 'systemDefault',\n 'extraLight',\n 'light',\n 'dark',\n 'regular',\n 'prominent',\n 'systemUltraThinMaterial',\n 'systemThinMaterial',\n 'systemMaterial',\n 'systemThickMaterial',\n 'systemChromeMaterial',\n 'systemUltraThinMaterialLight',\n 'systemThinMaterialLight',\n 'systemMaterialLight',\n 'systemThickMaterialLight',\n 'systemChromeMaterialLight',\n 'systemUltraThinMaterialDark',\n 'systemThinMaterialDark',\n 'systemMaterialDark',\n 'systemThickMaterialDark',\n 'systemChromeMaterialDark',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uiblureffect/style)\n */\nexport type NativeTabsBlurEffect = (typeof SUPPORTED_BLUR_EFFECTS)[number];\n\nexport interface NativeTabsProps extends PropsWithChildren {\n // #region common props\n /**\n * The style of the every tab label in the tab bar.\n */\n labelStyle?:\n | StyleProp<NativeTabsLabelStyle>\n | {\n default?: StyleProp<NativeTabsLabelStyle>;\n selected?: StyleProp<NativeTabsLabelStyle>;\n };\n /**\n * The color of every tab icon in the tab bar.\n */\n iconColor?: ColorValue | { default?: ColorValue; selected?: ColorValue };\n /**\n * The tint color of the tab icon.\n *\n * Can be overridden by icon color and label color for each tab individually.\n */\n tintColor?: ColorValue;\n /**\n * The background color of the tab bar.\n */\n backgroundColor?: ColorValue;\n /**\n * The background color of every badge in the tab bar.\n */\n badgeBackgroundColor?: ColorValue;\n /**\n * When set to `true`, hides the tab bar.\n *\n * @default false\n */\n hidden?: boolean;\n // #endregion common props\n // #region iOS props\n /**\n * Specifies the minimize behavior for the tab bar.\n *\n * Available starting from iOS 26.\n *\n * The following values are currently supported:\n *\n * - `automatic` - resolves to the system default minimize behavior\n * - `never` - the tab bar does not minimize\n * - `onScrollDown` - the tab bar minimizes when scrolling down and\n * expands when scrolling back up\n * - `onScrollUp` - the tab bar minimizes when scrolling up and expands\n * when scrolling back down\n *\n * @see The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior).\n *\n * @default automatic\n *\n * @platform iOS 26+\n */\n minimizeBehavior?: NativeTabsTabBarMinimizeBehavior;\n /**\n * The blur effect applied to the tab bar.\n *\n * @platform iOS\n */\n blurEffect?: NativeTabsBlurEffect;\n /**\n * The color of the shadow.\n *\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uibarappearance/shadowcolor)\n *\n * @platform iOS\n */\n shadowColor?: ColorValue;\n /**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/titlepositionadjustment)\n *\n * @platform iOS\n */\n titlePositionAdjustment?: {\n horizontal?: number;\n vertical?: number;\n };\n /**\n * When set to `true`, the tab bar will not become transparent when scrolled to the edge.\n *\n * @platform iOS\n */\n disableTransparentOnScrollEdge?: boolean;\n /**\n * When set to `true`, enables the sidebarAdaptable tab bar style on iPadOS and macOS. This prop has no effect on iPhone.\n *\n * @platform iOS 18+\n */\n sidebarAdaptable?: boolean;\n // #endregion iOS props\n // #region android props\n /**\n * Disables the active indicator for the tab bar.\n *\n * @platform android\n */\n disableIndicator?: boolean;\n /**\n * The behavior when navigating back with the back button.\n *\n * @platform android\n */\n backBehavior?: 'none' | 'initialRoute' | 'history';\n /**\n * The visibility mode of the tab item label.\n *\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\n labelVisibilityMode?: NativeTabsTabBarItemLabelVisibilityMode;\n /**\n * The color of the ripple effect when the tab is pressed.\n *\n * @platform android\n */\n rippleColor?: ColorValue;\n /**\n * The color of the tab indicator.\n *\n * @platform android\n * @platform web\n */\n indicatorColor?: ColorValue;\n /**\n * The color of the badge text.\n *\n * @platform android\n * @platform web\n */\n badgeTextColor?: ColorValue;\n // #endregion android props\n}\n\nexport interface InternalNativeTabsProps extends NativeTabsProps {\n nonTriggerChildren?: React.ReactNode;\n}\nexport interface NativeTabsViewProps\n extends Omit<\n InternalNativeTabsProps,\n | 'labelStyle'\n | 'iconColor'\n | 'backgroundColor'\n | 'badgeBackgroundColor'\n | 'blurEffect'\n | 'indicatorColor'\n | 'badgeTextColor'\n > {\n focusedIndex: number;\n tabs: NativeTabsViewTabItem[];\n onTabChange: (tabKey: string) => void;\n}\n\nexport interface NativeTabsViewTabItem {\n options: NativeTabOptions;\n routeKey: string;\n name: string;\n contentRenderer: () => React.ReactNode;\n}\n\nexport const SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES = [\n 'auto',\n 'selected',\n 'labeled',\n 'unlabeled',\n] as const;\n\n/**\n * @see [Material Components documentation](https://github.com/material-components/material-components-android/blob/master/docs/components/BottomNavigation.md#making-navigation-bar-accessible)\n *\n * @platform android\n */\nexport type NativeTabsTabBarItemLabelVisibilityMode =\n (typeof SUPPORTED_TAB_BAR_ITEM_LABEL_VISIBILITY_MODES)[number];\n\nexport const SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS = [\n 'automatic',\n 'never',\n 'onScrollDown',\n 'onScrollUp',\n] as const;\n\n/**\n * @see [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbarcontroller/minimizebehavior)\n *\n * @platform iOS 26\n */\nexport type NativeTabsTabBarMinimizeBehavior =\n (typeof SUPPORTED_TAB_BAR_MINIMIZE_BEHAVIORS)[number];\n\nexport interface NativeTabTriggerProps {\n /**\n * The name of the route.\n *\n * This is required when used inside a Layout component.\n *\n * When used in a route it has no effect.\n */\n name?: string;\n /**\n * If true, the tab will be hidden from the tab bar.\n *\n * > **Note**: Marking a tab as `hidden` means it cannot be navigated to in any way.\n */\n hidden?: boolean;\n /**\n * Props passed to the underlying native tab screen implementation.\n * Use this to configure props not directly exposed by Expo Router, but available in `react-native-screens`.\n *\n * > **Note**: This will override any other props set by Expo Router and may lead to unexpected behavior.\n *\n * > **Note**: This is an unstable API and may change or be removed in minor versions.\n *\n * @platform android\n * @platform iOS\n */\n unstable_nativeProps?: NativeScreenProps;\n /**\n * If true, the tab will not pop stack to the root when selected again.\n *\n * @default false\n * @platform iOS\n */\n disablePopToTop?: boolean;\n /**\n * If true, the tab will not scroll to the top when selected again.\n * @default false\n *\n * @platform iOS\n */\n disableScrollToTop?: boolean;\n /**\n * The children of the trigger.\n *\n * Use `Icon`, `Label`, and `Badge` components to customize the tab.\n */\n children?: React.ReactNode;\n /**\n * System-provided tab bar item with predefined icon and title\n *\n * Uses Apple's built-in tab bar items (e.g., bookmarks, contacts, downloads) with\n * standard iOS styling and localized titles. Custom `icon` or `selectedIcon`\n * properties will override the system icon, but the system-defined title cannot\n * be customized.\n *\n * @see The supported values correspond to the official [Apple documentation](https://developer.apple.com/documentation/uikit/uitabbaritem/systemitem).\n * @platform ios\n */\n role?: NativeTabsTabBarItemRole;\n /**\n * The default behavior differs between iOS and Android.\n *\n * On **Android**, the content of a native tabs screen is automatically wrapped in a `SafeAreaView`,\n * and the **bottom** inset is applied. Other insets must be handled manually.\n *\n * On **iOS**, the first scroll view nested inside a native tabs screen has\n * [automatic content inset adjustment](https://reactnative.dev/docs/scrollview#contentinsetadjustmentbehavior-ios) enabled\n *\n * When this property is set to `true`, automatic content inset adjustment is disabled for the screen\n * and must be managed manually. You can use `SafeAreaView` from `react-native-screens/experimental`\n * to handle safe area insets.\n *\n * @platform android\n * @platform ios\n */\n disableAutomaticContentInsets?: boolean;\n /**\n * The style applied to the content of the tab\n *\n * Note: Only certain style properties are supported.\n */\n contentStyle?: NativeTabOptions['contentStyle'];\n}\n\nconst SUPPORTED_TAB_BAR_ITEM_ROLES = [\n 'bookmarks',\n 'contacts',\n 'downloads',\n 'favorites',\n 'featured',\n 'history',\n 'more',\n 'mostRecent',\n 'mostViewed',\n 'recents',\n 'search',\n 'topRated',\n] as const;\n\nexport type NativeTabsTabBarItemRole = (typeof SUPPORTED_TAB_BAR_ITEM_ROLES)[number];\n"]}
@@ -1,9 +1,9 @@
1
1
  import { type ReactElement } from 'react';
2
- import type { BottomAccessoryFn } from 'react-native-screens';
2
+ import type { TabAccessoryComponentFactory } from 'react-native-screens';
3
3
  import type { NativeTabsBottomAccessoryProps } from '../common/elements';
4
4
  /**
5
5
  * Converts `<NativeTabs.BottomAccessory>` component into a function,
6
6
  * which can be used by `react-native-screens` to render the accessory.
7
7
  */
8
- export declare function useBottomAccessoryFunctionFromBottomAccessories(bottomAccessory: ReactElement<NativeTabsBottomAccessoryProps, string | React.JSXElementConstructor<any>> | undefined): BottomAccessoryFn | undefined;
8
+ export declare function useBottomAccessoryFunctionFromBottomAccessories(bottomAccessory: ReactElement<NativeTabsBottomAccessoryProps, string | React.JSXElementConstructor<any>> | undefined): TabAccessoryComponentFactory | undefined;
9
9
  //# sourceMappingURL=bottomAccessory.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"bottomAccessory.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/utils/bottomAccessory.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAE9D,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAGzE;;;GAGG;AACH,wBAAgB,+CAA+C,CAC7D,eAAe,EACX,YAAY,CAAC,8BAA8B,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GACvF,SAAS,GACZ,iBAAiB,GAAG,SAAS,CAY/B"}
1
+ {"version":3,"file":"bottomAccessory.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/utils/bottomAccessory.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAW,KAAK,YAAY,EAAE,MAAM,OAAO,CAAC;AACnD,OAAO,KAAK,EAAE,4BAA4B,EAAE,MAAM,sBAAsB,CAAC;AAEzE,OAAO,KAAK,EAAE,8BAA8B,EAAE,MAAM,oBAAoB,CAAC;AAGzE;;;GAGG;AACH,wBAAgB,+CAA+C,CAC7D,eAAe,EACX,YAAY,CAAC,8BAA8B,EAAE,MAAM,GAAG,KAAK,CAAC,qBAAqB,CAAC,GAAG,CAAC,CAAC,GACvF,SAAS,GACZ,4BAA4B,GAAG,SAAS,CAY1C"}
@@ -1 +1 @@
1
- {"version":3,"file":"bottomAccessory.js","sourceRoot":"","sources":["../../../src/native-tabs/utils/bottomAccessory.tsx"],"names":[],"mappings":";;AAUA,0GAgBC;AA1BD,iCAAmD;AAInD,oCAA2D;AAE3D;;;GAGG;AACH,SAAgB,+CAA+C,CAC7D,eAEa;IAEb,OAAO,IAAA,eAAO,EACZ,GAAG,EAAE,CACH,eAAe;QACb,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CACf,CAAC,uCAA+B,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAClD;cAAA,CAAC,eAAe,CAAC,KAAK,CAAC,QAAQ,CACjC;YAAA,EAAE,uCAA+B,CAAC,CACnC;QACH,CAAC,CAAC,SAAS,EACf,CAAC,eAAe,CAAC,CAClB,CAAC;AACJ,CAAC","sourcesContent":["import { useMemo, type ReactElement } from 'react';\nimport type { BottomAccessoryFn } from 'react-native-screens';\n\nimport type { NativeTabsBottomAccessoryProps } from '../common/elements';\nimport { BottomAccessoryPlacementContext } from '../hooks';\n\n/**\n * Converts `<NativeTabs.BottomAccessory>` component into a function,\n * which can be used by `react-native-screens` to render the accessory.\n */\nexport function useBottomAccessoryFunctionFromBottomAccessories(\n bottomAccessory:\n | ReactElement<NativeTabsBottomAccessoryProps, string | React.JSXElementConstructor<any>>\n | undefined\n): BottomAccessoryFn | undefined {\n return useMemo<BottomAccessoryFn | undefined>(\n () =>\n bottomAccessory\n ? (environment) => (\n <BottomAccessoryPlacementContext value={environment}>\n {bottomAccessory.props.children}\n </BottomAccessoryPlacementContext>\n )\n : undefined,\n [bottomAccessory]\n );\n}\n"]}
1
+ {"version":3,"file":"bottomAccessory.js","sourceRoot":"","sources":["../../../src/native-tabs/utils/bottomAccessory.tsx"],"names":[],"mappings":";;AAUA,0GAgBC;AA1BD,iCAAmD;AAInD,oCAA2D;AAE3D;;;GAGG;AACH,SAAgB,+CAA+C,CAC7D,eAEa;IAEb,OAAO,IAAA,eAAO,EACZ,GAAG,EAAE,CACH,eAAe;QACb,CAAC,CAAC,CAAC,WAAW,EAAE,EAAE,CAAC,CACf,CAAC,uCAA+B,CAAC,KAAK,CAAC,CAAC,WAAW,CAAC,CAClD;cAAA,CAAC,eAAe,CAAC,KAAK,CAAC,QAAQ,CACjC;YAAA,EAAE,uCAA+B,CAAC,CACnC;QACH,CAAC,CAAC,SAAS,EACf,CAAC,eAAe,CAAC,CAClB,CAAC;AACJ,CAAC","sourcesContent":["import { useMemo, type ReactElement } from 'react';\nimport type { TabAccessoryComponentFactory } from 'react-native-screens';\n\nimport type { NativeTabsBottomAccessoryProps } from '../common/elements';\nimport { BottomAccessoryPlacementContext } from '../hooks';\n\n/**\n * Converts `<NativeTabs.BottomAccessory>` component into a function,\n * which can be used by `react-native-screens` to render the accessory.\n */\nexport function useBottomAccessoryFunctionFromBottomAccessories(\n bottomAccessory:\n | ReactElement<NativeTabsBottomAccessoryProps, string | React.JSXElementConstructor<any>>\n | undefined\n): TabAccessoryComponentFactory | undefined {\n return useMemo<TabAccessoryComponentFactory | undefined>(\n () =>\n bottomAccessory\n ? (environment) => (\n <BottomAccessoryPlacementContext value={environment}>\n {bottomAccessory.props.children}\n </BottomAccessoryPlacementContext>\n )\n : undefined,\n [bottomAccessory]\n );\n}\n"]}
@@ -1,5 +1,5 @@
1
1
  import type { ColorValue, ImageSourcePropType } from 'react-native';
2
- import type { BottomTabsScreenProps, PlatformIconAndroid, PlatformIconIOS } from 'react-native-screens';
2
+ import type { TabsScreenProps, PlatformIconAndroid, PlatformIconIOS } from 'react-native-screens';
3
3
  import type { SFSymbol } from 'sf-symbols-typescript';
4
4
  import type { NativeTabOptions, NativeTabsProps } from '../types';
5
5
  export declare function convertIconColorPropToObject(iconColor: NativeTabsProps['iconColor']): {
@@ -20,7 +20,7 @@ export declare function useAwaitedScreensIcon(icon: NativeTabOptions['icon']): {
20
20
  src?: ImageSourcePropType;
21
21
  renderingMode?: "template" | "original";
22
22
  } | undefined;
23
- export declare function convertOptionsIconToRNScreensPropsIcon(icon: AwaitedIcon | undefined): BottomTabsScreenProps['icon'];
23
+ export declare function convertOptionsIconToRNScreensPropsIcon(icon: AwaitedIcon | undefined): TabsScreenProps['icon'];
24
24
  export declare function convertOptionsIconToIOSPropsIcon(icon: AwaitedIcon | undefined): PlatformIconIOS | undefined;
25
25
  export declare function convertOptionsIconToAndroidPropsIcon(icon: AwaitedIcon): PlatformIconAndroid | undefined;
26
26
  export declare function convertComponentSrcToImageSource(src: React.ReactElement): {
@@ -1 +1 @@
1
- {"version":3,"file":"icon.d.ts","sourceRoot":"","sources":["../../../src/native-tabs/utils/icon.ts"],"names":[],"mappings":"AACA,OAAO,KAAK,EAAE,UAAU,EAAE,mBAAmB,EAAE,MAAM,cAAc,CAAC;AACpE,OAAO,KAAK,EACV,qBAAqB,EACrB,mBAAmB,EACnB,eAAe,EAChB,MAAM,sBAAsB,CAAC;AAC9B,OAAO,KAAK,EAAE,QAAQ,EAAE,MAAM,uBAAuB,CAAC;AAItD,OAAO,KAAK,EAAE,gBAAgB,EAAE,eAAe,EAAE,MAAM,UAAU,CAAC;AAElE,wBAAgB,4BAA4B,CAAC,SAAS,EAAE,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,CAAC,KAAK,CAAC;QACxB,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,CAAC;IACvE,CAAC;SAAM,IAAI,IAAA,wBAAa,EAAC,GAAG,EAAE,uCAA4B,CAAC,EAAE,CAAC;QAC5D,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;IACrC,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import { useEffect, useMemo, useState } from 'react';\nimport type { ColorValue, ImageSourcePropType } from 'react-native';\nimport type {\n BottomTabsScreenProps,\n PlatformIconAndroid,\n PlatformIconIOS,\n} from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport { isChildOfType } from '../../utils/children';\nimport { NativeTabsTriggerPromiseIcon, NativeTabsTriggerVectorIcon } from '../common/elements';\nimport type { NativeTabOptions, NativeTabsProps } from '../types';\n\nexport function convertIconColorPropToObject(iconColor: NativeTabsProps['iconColor']): {\n default?: ColorValue;\n selected?: ColorValue;\n} {\n if (iconColor) {\n if (typeof iconColor === 'object' && ('default' in iconColor || 'selected' in iconColor)) {\n return iconColor;\n }\n return {\n default: iconColor as ColorValue,\n };\n }\n return {};\n}\n\ntype AwaitedIcon =\n | {\n sf?: SFSymbol;\n drawable?: string;\n }\n | {\n src?: ImageSourcePropType;\n renderingMode?: 'template' | 'original';\n };\n\nexport function useAwaitedScreensIcon(icon: NativeTabOptions['icon']) {\n const src = icon && typeof icon === 'object' && 'src' in icon ? icon.src : undefined;\n const [awaitedIcon, setAwaitedIcon] = useState<AwaitedIcon | undefined>(undefined);\n\n useEffect(() => {\n const loadIcon = async () => {\n if (src && src instanceof Promise) {\n const awaitedSrc = await src;\n if (awaitedSrc) {\n const currentAwaitedIcon = { src: awaitedSrc };\n setAwaitedIcon(currentAwaitedIcon);\n }\n }\n };\n loadIcon();\n // Checking `src` rather then icon here, to avoid unnecessary re-renders\n // The icon object can be recreated, while src should stay the same\n // In this case as we control `VectorIcon`, it will only change if `family` or `name` props change\n // So we should be safe with promise resolving\n }, [src]);\n\n return useMemo(() => (isAwaitedIcon(icon) ? icon : awaitedIcon), [awaitedIcon, icon]);\n}\n\nfunction isAwaitedIcon(icon: NativeTabOptions['icon']): icon is AwaitedIcon {\n return !icon || !('src' in icon && icon.src instanceof Promise);\n}\n\nexport function convertOptionsIconToRNScreensPropsIcon(\n icon: AwaitedIcon | undefined\n): BottomTabsScreenProps['icon'] {\n if (!icon) {\n return undefined;\n }\n return {\n ios: convertOptionsIconToIOSPropsIcon(icon),\n android: convertOptionsIconToAndroidPropsIcon(icon),\n };\n}\n\nexport function convertOptionsIconToIOSPropsIcon(\n icon: AwaitedIcon | undefined\n): PlatformIconIOS | undefined {\n if (icon && 'sf' in icon && icon.sf) {\n return {\n type: 'sfSymbol',\n name: icon.sf,\n };\n }\n if (icon && 'src' in icon && icon.src) {\n if (icon.renderingMode === 'original') {\n return { type: 'imageSource', imageSource: icon.src };\n }\n return { type: 'templateSource', templateSource: icon.src };\n }\n return undefined;\n}\n\nexport function convertOptionsIconToAndroidPropsIcon(\n icon: AwaitedIcon\n): PlatformIconAndroid | undefined {\n if (icon && 'drawable' in icon && icon.drawable) {\n return {\n type: 'drawableResource',\n name: icon.drawable,\n };\n }\n if (icon && 'src' in icon && icon.src) {\n return { type: 'imageSource', imageSource: icon.src };\n }\n return undefined;\n}\n\nexport function convertComponentSrcToImageSource(src: React.ReactElement) {\n if (isChildOfType(src, NativeTabsTriggerVectorIcon)) {\n const props = src.props;\n return { src: props.family.getImageSource(props.name, 24, 'white') };\n } else if (isChildOfType(src, NativeTabsTriggerPromiseIcon)) {\n return { src: src.props.loader() };\n } else {\n console.warn('Only VectorIcon is supported as a React element in Icon.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;IAEjB,IAAI,IAAI,IAAI,UAAU,IAAI,IAAI,IAAI,IAAI,CAAC,QAAQ,EAAE,CAAC;QAChD,OAAO;YACL,IAAI,EAAE,kBAAkB;YACxB,IAAI,EAAE,IAAI,CAAC,QAAQ;SACpB,CAAC;IACJ,CAAC;IACD,IAAI,IAAI,IAAI,KAAK,IAAI,IAAI,IAAI,IAAI,CAAC,GAAG,EAAE,CAAC;QACtC,OAAO,EAAE,IAAI,EAAE,aAAa,EAAE,WAAW,EAAE,IAAI,CAAC,GAAG,EAAE,CAAC;IACxD,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC;AAED,SAAgB,gCAAgC,CAAC,GAAuB;IACtE,IAAI,IAAA,wBAAa,EAAC,GAAG,EAAE,sCAA2B,CAAC,EAAE,CAAC;QACpD,MAAM,KAAK,GAAG,GAAG,CAAC,KAAK,CAAC;QACxB,OAAO,EAAE,GAAG,EAAE,KAAK,CAAC,MAAM,CAAC,cAAc,CAAC,KAAK,CAAC,IAAI,EAAE,EAAE,EAAE,OAAO,CAAC,EAAE,CAAC;IACvE,CAAC;SAAM,IAAI,IAAA,wBAAa,EAAC,GAAG,EAAE,uCAA4B,CAAC,EAAE,CAAC;QAC5D,OAAO,EAAE,GAAG,EAAE,GAAG,CAAC,KAAK,CAAC,MAAM,EAAE,EAAE,CAAC;IACrC,CAAC;SAAM,CAAC;QACN,OAAO,CAAC,IAAI,CAAC,6DAA6D,CAAC,CAAC;IAC9E,CAAC;IACD,OAAO,SAAS,CAAC;AACnB,CAAC","sourcesContent":["import { useEffect, useMemo, useState } from 'react';\nimport type { ColorValue, ImageSourcePropType } from 'react-native';\nimport type { TabsScreenProps, PlatformIconAndroid, PlatformIconIOS } from 'react-native-screens';\nimport type { SFSymbol } from 'sf-symbols-typescript';\n\nimport { isChildOfType } from '../../utils/children';\nimport { NativeTabsTriggerPromiseIcon, NativeTabsTriggerVectorIcon } from '../common/elements';\nimport type { NativeTabOptions, NativeTabsProps } from '../types';\n\nexport function convertIconColorPropToObject(iconColor: NativeTabsProps['iconColor']): {\n default?: ColorValue;\n selected?: ColorValue;\n} {\n if (iconColor) {\n if (typeof iconColor === 'object' && ('default' in iconColor || 'selected' in iconColor)) {\n return iconColor;\n }\n return {\n default: iconColor as ColorValue,\n };\n }\n return {};\n}\n\ntype AwaitedIcon =\n | {\n sf?: SFSymbol;\n drawable?: string;\n }\n | {\n src?: ImageSourcePropType;\n renderingMode?: 'template' | 'original';\n };\n\nexport function useAwaitedScreensIcon(icon: NativeTabOptions['icon']) {\n const src = icon && typeof icon === 'object' && 'src' in icon ? icon.src : undefined;\n const [awaitedIcon, setAwaitedIcon] = useState<AwaitedIcon | undefined>(undefined);\n\n useEffect(() => {\n const loadIcon = async () => {\n if (src && src instanceof Promise) {\n const awaitedSrc = await src;\n if (awaitedSrc) {\n const currentAwaitedIcon = { src: awaitedSrc };\n setAwaitedIcon(currentAwaitedIcon);\n }\n }\n };\n loadIcon();\n // Checking `src` rather then icon here, to avoid unnecessary re-renders\n // The icon object can be recreated, while src should stay the same\n // In this case as we control `VectorIcon`, it will only change if `family` or `name` props change\n // So we should be safe with promise resolving\n }, [src]);\n\n return useMemo(() => (isAwaitedIcon(icon) ? icon : awaitedIcon), [awaitedIcon, icon]);\n}\n\nfunction isAwaitedIcon(icon: NativeTabOptions['icon']): icon is AwaitedIcon {\n return !icon || !('src' in icon && icon.src instanceof Promise);\n}\n\nexport function convertOptionsIconToRNScreensPropsIcon(\n icon: AwaitedIcon | undefined\n): TabsScreenProps['icon'] {\n if (!icon) {\n return undefined;\n }\n return {\n ios: convertOptionsIconToIOSPropsIcon(icon),\n android: convertOptionsIconToAndroidPropsIcon(icon),\n };\n}\n\nexport function convertOptionsIconToIOSPropsIcon(\n icon: AwaitedIcon | undefined\n): PlatformIconIOS | undefined {\n if (icon && 'sf' in icon && icon.sf) {\n return {\n type: 'sfSymbol',\n name: icon.sf,\n };\n }\n if (icon && 'src' in icon && icon.src) {\n if (icon.renderingMode === 'original') {\n return { type: 'imageSource', imageSource: icon.src };\n }\n return { type: 'templateSource', templateSource: icon.src };\n }\n return undefined;\n}\n\nexport function convertOptionsIconToAndroidPropsIcon(\n icon: AwaitedIcon\n): PlatformIconAndroid | undefined {\n if (icon && 'drawable' in icon && icon.drawable) {\n return {\n type: 'drawableResource',\n name: icon.drawable,\n };\n }\n if (icon && 'src' in icon && icon.src) {\n return { type: 'imageSource', imageSource: icon.src };\n }\n return undefined;\n}\n\nexport function convertComponentSrcToImageSource(src: React.ReactElement) {\n if (isChildOfType(src, NativeTabsTriggerVectorIcon)) {\n const props = src.props;\n return { src: props.family.getImageSource(props.name, 24, 'white') };\n } else if (isChildOfType(src, NativeTabsTriggerPromiseIcon)) {\n return { src: src.props.loader() };\n } else {\n console.warn('Only VectorIcon is supported as a React element in Icon.src');\n }\n return undefined;\n}\n"]}
@@ -5,14 +5,14 @@ exports.SplitViewInspector = SplitViewInspector;
5
5
  const react_native_safe_area_context_1 = require("react-native-safe-area-context");
6
6
  const experimental_1 = require("react-native-screens/experimental");
7
7
  function SplitViewColumn(props) {
8
- return (<experimental_1.SplitViewScreen.Column>
8
+ return (<experimental_1.Split.Column>
9
9
  <react_native_safe_area_context_1.SafeAreaProvider>{props.children}</react_native_safe_area_context_1.SafeAreaProvider>
10
- </experimental_1.SplitViewScreen.Column>);
10
+ </experimental_1.Split.Column>);
11
11
  }
12
12
  /**
13
13
  * @platform iOS 26+
14
14
  */
15
15
  function SplitViewInspector(props) {
16
- return <experimental_1.SplitViewScreen.Inspector>{props.children}</experimental_1.SplitViewScreen.Inspector>;
16
+ return <experimental_1.Split.Inspector>{props.children}</experimental_1.Split.Inspector>;
17
17
  }
18
18
  //# sourceMappingURL=elements.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/split-view/elements.tsx"],"names":[],"mappings":";;AAOA,0CAMC;AAKD,gDAEC;AApBD,mFAAkE;AAClE,oEAAoE;AAMpE,SAAgB,eAAe,CAAC,KAA2B;IACzD,OAAO,CACL,CAAC,8BAAe,CAAC,MAAM,CACrB;MAAA,CAAC,iDAAgB,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,iDAAgB,CACtD;IAAA,EAAE,8BAAe,CAAC,MAAM,CAAC,CAC1B,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,KAA2B;IAC5D,OAAO,CAAC,8BAAe,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,8BAAe,CAAC,SAAS,CAAC,CAAC;AACjF,CAAC","sourcesContent":["import { SafeAreaProvider } from 'react-native-safe-area-context';\nimport { SplitViewScreen } from 'react-native-screens/experimental';\n\nexport interface SplitViewColumnProps {\n children?: React.ReactNode;\n}\n\nexport function SplitViewColumn(props: SplitViewColumnProps) {\n return (\n <SplitViewScreen.Column>\n <SafeAreaProvider>{props.children}</SafeAreaProvider>\n </SplitViewScreen.Column>\n );\n}\n\n/**\n * @platform iOS 26+\n */\nexport function SplitViewInspector(props: SplitViewColumnProps) {\n return <SplitViewScreen.Inspector>{props.children}</SplitViewScreen.Inspector>;\n}\n"]}
1
+ {"version":3,"file":"elements.js","sourceRoot":"","sources":["../../src/split-view/elements.tsx"],"names":[],"mappings":";;AAOA,0CAMC;AAKD,gDAEC;AApBD,mFAAkE;AAClE,oEAA0D;AAM1D,SAAgB,eAAe,CAAC,KAA2B;IACzD,OAAO,CACL,CAAC,oBAAK,CAAC,MAAM,CACX;MAAA,CAAC,iDAAgB,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,iDAAgB,CACtD;IAAA,EAAE,oBAAK,CAAC,MAAM,CAAC,CAChB,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,SAAgB,kBAAkB,CAAC,KAA2B;IAC5D,OAAO,CAAC,oBAAK,CAAC,SAAS,CAAC,CAAC,KAAK,CAAC,QAAQ,CAAC,EAAE,oBAAK,CAAC,SAAS,CAAC,CAAC;AAC7D,CAAC","sourcesContent":["import { SafeAreaProvider } from 'react-native-safe-area-context';\nimport { Split } from 'react-native-screens/experimental';\n\nexport interface SplitViewColumnProps {\n children?: React.ReactNode;\n}\n\nexport function SplitViewColumn(props: SplitViewColumnProps) {\n return (\n <Split.Column>\n <SafeAreaProvider>{props.children}</SafeAreaProvider>\n </Split.Column>\n );\n}\n\n/**\n * @platform iOS 26+\n */\nexport function SplitViewInspector(props: SplitViewColumnProps) {\n return <Split.Inspector>{props.children}</Split.Inspector>;\n}\n"]}
@@ -1,4 +1,4 @@
1
1
  export { SplitView, SplitViewProps } from './split-view';
2
2
  export * from './elements';
3
- export { type SplitViewHostProps } from 'react-native-screens/experimental';
3
+ export { type SplitHostProps } from 'react-native-screens/experimental';
4
4
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/split-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,KAAK,kBAAkB,EAAE,MAAM,mCAAmC,CAAC"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../src/split-view/index.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACzD,cAAc,YAAY,CAAC;AAC3B,OAAO,EAAE,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/split-view/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyD;AAAhD,uGAAA,SAAS,OAAA;AAClB,6CAA2B","sourcesContent":["export { SplitView, SplitViewProps } from './split-view';\nexport * from './elements';\nexport { type SplitViewHostProps } from 'react-native-screens/experimental';\n"]}
1
+ {"version":3,"file":"index.js","sourceRoot":"","sources":["../../src/split-view/index.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;AAAA,2CAAyD;AAAhD,uGAAA,SAAS,OAAA;AAClB,6CAA2B","sourcesContent":["export { SplitView, SplitViewProps } from './split-view';\nexport * from './elements';\nexport { type SplitHostProps } from 'react-native-screens/experimental';\n"]}
@@ -1,10 +1,10 @@
1
1
  import React, { type ReactNode } from 'react';
2
- import { type SplitViewHostProps } from 'react-native-screens/experimental';
2
+ import { type SplitHostProps } from 'react-native-screens/experimental';
3
3
  import { SplitViewColumn, SplitViewInspector } from './elements';
4
4
  /**
5
- * For full list of supported props, see [`SplitViewHostProps`](https://github.com/software-mansion/react-native-screens/blob/main/src/components/gamma/split-view/SplitViewHost.types.ts#L124)
5
+ * For full list of supported props, see [`SplitHostProps`](http://github.com/software-mansion/react-native-screens/blob/main/src/components/gamma/split/SplitHost.types.ts#L117)
6
6
  */
7
- export interface SplitViewProps extends Omit<SplitViewHostProps, 'children'> {
7
+ export interface SplitViewProps extends Omit<SplitHostProps, 'children'> {
8
8
  children?: ReactNode;
9
9
  }
10
10
  declare function SplitViewNavigator({ children, ...splitViewHostProps }: SplitViewProps): React.JSX.Element;
@@ -1 +1 @@
1
- {"version":3,"file":"split-view.d.ts","sourceRoot":"","sources":["../../src/split-view/split-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClF,OAAO,EAGL,KAAK,kBAAkB,EACxB,MAAM,mCAAmC,CAAC;AAE3C,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMjE;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,kBAAkB,EAAE,UAAU,CAAC;IAC1E,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE,EAAE,cAAc,qBA0D9E;AAED,eAAO,MAAM,SAAS;;;CAGpB,CAAC"}
1
+ {"version":3,"file":"split-view.d.ts","sourceRoot":"","sources":["../../src/split-view/split-view.tsx"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,EAAsC,KAAK,SAAS,EAAE,MAAM,OAAO,CAAC;AAClF,OAAO,EAAS,KAAK,cAAc,EAAE,MAAM,mCAAmC,CAAC;AAE/E,OAAO,EAAE,eAAe,EAAE,kBAAkB,EAAE,MAAM,YAAY,CAAC;AAMjE;;GAEG;AACH,MAAM,WAAW,cAAe,SAAQ,IAAI,CAAC,cAAc,EAAE,UAAU,CAAC;IACtE,QAAQ,CAAC,EAAE,SAAS,CAAC;CACtB;AAED,iBAAS,kBAAkB,CAAC,EAAE,QAAQ,EAAE,GAAG,kBAAkB,EAAE,EAAE,cAAc,qBA0D9E;AAED,eAAO,MAAM,SAAS;;;CAGpB,CAAC"}
@@ -71,13 +71,13 @@ function SplitViewNavigator({ children, ...splitViewHostProps }) {
71
71
  return <Navigator_1.Slot />;
72
72
  }
73
73
  // The key is needed, because number of columns cannot be changed dynamically
74
- return (<experimental_1.SplitViewHost key={numberOfSidebars + numberOfInspectors} {...splitViewHostProps}>
74
+ return (<experimental_1.Split.Host key={numberOfSidebars + numberOfInspectors} {...splitViewHostProps}>
75
75
  {columnChildren}
76
- <experimental_1.SplitViewScreen.Column>
76
+ <experimental_1.Split.Column>
77
77
  <WrappedSlot />
78
- </experimental_1.SplitViewScreen.Column>
78
+ </experimental_1.Split.Column>
79
79
  {inspectorChildren}
80
- </experimental_1.SplitViewHost>);
80
+ </experimental_1.Split.Host>);
81
81
  }
82
82
  exports.SplitView = Object.assign(SplitViewNavigator, {
83
83
  Column: elements_1.SplitViewColumn,
@@ -1 +1 @@
1
- {"version":3,"file":"split-view.js","sourceRoot":"","sources":["../../src/split-view/split-view.tsx"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,+CAAkF;AAClF,oEAI2C;AAE3C,yCAAiE;AACjE,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AiB,CAAC,MAAM,CAAC;IAEpD,IAAI,gBAAgB,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAC;QACjF,OAAO,CAAC,IAAI,CACV,uGAAuG,CACxG,CAAC;IACJ,CAAC;IAED,IAAI,gBAAgB,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IAED,IAAI,gBAAgB,GAAG,kBAAkB,KAAK,CAAC,EAAE,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;QAChF,OAAO,CAAC,gBAAI,CAAC,AAAD,EAAG,CAAC;IAClB,CAAC;IAED,6EAA6E;IAC7E,OAAO,CACL,CAAC,4BAAa,CAAC,GAAG,CAAC,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,CAAC,IAAI,kBAAkB,CAAC,CAChF;MAAA,CAAC,cAAc,CACf;MAAA,CAAC,8BAAe,CAAC,MAAM,CACrB;QAAA,CAAC,WAAW,CAAC,AAAD,EACd;MAAA,EAAE,8BAAe,CAAC,MAAM,CACxB;MAAA,CAAC,iBAAiB,CACpB;IAAA,EAAE,4BAAa,CAAC,CACjB,CAAC;AACJ,CAAC;AAEY,QAAA,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE;IACzD,MAAM,EAAE,0BAAe;IACvB,SAAS,EAAE,6BAAkB;CAC9B,CAAC,CAAC","sourcesContent":["import React, { createContext, isValidElement, use, type ReactNode } from 'react';\nimport {\n SplitViewHost,\n SplitViewScreen,\n type SplitViewHostProps,\n} from 'react-native-screens/experimental';\n\nimport { SplitViewColumn, SplitViewInspector } from './elements';\nimport { IsWithinLayoutContext } from '../layouts/IsWithinLayoutContext';\nimport { Slot } from '../views/Navigator';\n\nconst IsWithinSplitViewContext = createContext(false);\n\n/**\n * For full list of supported props, see [`SplitViewHostProps`](https://github.com/software-mansion/react-native-screens/blob/main/src/components/gamma/split-view/SplitViewHost.types.ts#L124)\n */\nexport interface SplitViewProps extends Omit<SplitViewHostProps, 'children'> {\n children?: ReactNode;\n}\n\nfunction SplitViewNavigator({ children, ...splitViewHostProps }: SplitViewProps) {\n if (use(IsWithinSplitViewContext)) {\n throw new Error('There can only be one SplitView in the navigation hierarchy.');\n }\n\n // TODO: Add better way of detecting if SplitView is rendered inside Native navigator.\n if (use(IsWithinLayoutContext)) {\n throw new Error('SplitView cannot be used inside another navigator, except for Slot.');\n }\n\n if (process.env.EXPO_OS !== 'ios') {\n console.warn(\n 'SplitView is only supported on iOS. The SplitView will behave like a Slot navigator on other platforms.'\n );\n return <Slot />;\n }\n\n const WrappedSlot = () => (\n <IsWithinLayoutContext value>\n <Slot />\n </IsWithinLayoutContext>\n );\n\n const allChildrenArray = React.Children.toArray(children);\n const columnChildren = allChildrenArray.filter(\n (child) => isValidElement(child) && child.type === SplitViewColumn\n );\n const inspectorChildren = allChildrenArray.filter(\n (child) => isValidElement(child) && child.type === SplitViewInspector\n );\n const numberOfSidebars = columnChildren.length;\n const numberOfInspectors = inspectorChildren.length;\n\n if (allChildrenArray.length !== columnChildren.length + inspectorChildren.length) {\n console.warn(\n 'Only SplitView.Column and SplitView.Inspector components are allowed as direct children of SplitView.'\n );\n }\n\n if (numberOfSidebars > 2) {\n throw new Error('There can only be two SplitView.Column in the SplitView.');\n }\n\n if (numberOfSidebars + numberOfInspectors === 0) {\n console.warn('No SplitView.Column and SplitView.Inspector found in SplitView.');\n return <Slot />;\n }\n\n // The key is needed, because number of columns cannot be changed dynamically\n return (\n <SplitViewHost key={numberOfSidebars + numberOfInspectors} {...splitViewHostProps}>\n {columnChildren}\n <SplitViewScreen.Column>\n <WrappedSlot />\n </SplitViewScreen.Column>\n {inspectorChildren}\n </SplitViewHost>\n );\n}\n\nexport const SplitView = Object.assign(SplitViewNavigator, {\n Column: SplitViewColumn,\n Inspector: SplitViewInspector,\n});\n"]}
1
+ {"version":3,"file":"split-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AC,KAAK,CAAC,IAAI,KAAK,CAAC,IAAI,KAAK,6BAAkB,CACtE,CAAC;IACF,MAAM,gBAAgB,GAAG,cAAc,CAAC,MAAM,CAAC;IAC/C,MAAM,kBAAkB,GAAG,iBAAiB,CAAC,MAAM,CAAC;IAEpD,IAAI,gBAAgB,CAAC,MAAM,KAAK,cAAc,CAAC,MAAM,GAAG,iBAAiB,CAAC,MAAM,EAAE,CAAC;QACjF,OAAO,CAAC,IAAI,CACV,uGAAuG,CACxG,CAAC;IACJ,CAAC;IAED,IAAI,gBAAgB,GAAG,CAAC,EAAE,CAAC;QACzB,MAAM,IAAI,KAAK,CAAC,0DAA0D,CAAC,CAAC;IAC9E,CAAC;IAED,IAAI,gBAAgB,GAAG,kBAAkB,KAAK,CAAC,EAAE,CAAC;QAChD,OAAO,CAAC,IAAI,CAAC,iEAAiE,CAAC,CAAC;QAChF,OAAO,CAAC,gBAAI,CAAC,AAAD,EAAG,CAAC;IAClB,CAAC;IAED,6EAA6E;IAC7E,OAAO,CACL,CAAC,oBAAK,CAAC,IAAI,CAAC,GAAG,CAAC,CAAC,gBAAgB,GAAG,kBAAkB,CAAC,CAAC,IAAI,kBAAkB,CAAC,CAC7E;MAAA,CAAC,cAAc,CACf;MAAA,CAAC,oBAAK,CAAC,MAAM,CACX;QAAA,CAAC,WAAW,CAAC,AAAD,EACd;MAAA,EAAE,oBAAK,CAAC,MAAM,CACd;MAAA,CAAC,iBAAiB,CACpB;IAAA,EAAE,oBAAK,CAAC,IAAI,CAAC,CACd,CAAC;AACJ,CAAC;AAEY,QAAA,SAAS,GAAG,MAAM,CAAC,MAAM,CAAC,kBAAkB,EAAE;IACzD,MAAM,EAAE,0BAAe;IACvB,SAAS,EAAE,6BAAkB;CAC9B,CAAC,CAAC","sourcesContent":["import React, { createContext, isValidElement, use, type ReactNode } from 'react';\nimport { Split, type SplitHostProps } from 'react-native-screens/experimental';\n\nimport { SplitViewColumn, SplitViewInspector } from './elements';\nimport { IsWithinLayoutContext } from '../layouts/IsWithinLayoutContext';\nimport { Slot } from '../views/Navigator';\n\nconst IsWithinSplitViewContext = createContext(false);\n\n/**\n * For full list of supported props, see [`SplitHostProps`](http://github.com/software-mansion/react-native-screens/blob/main/src/components/gamma/split/SplitHost.types.ts#L117)\n */\nexport interface SplitViewProps extends Omit<SplitHostProps, 'children'> {\n children?: ReactNode;\n}\n\nfunction SplitViewNavigator({ children, ...splitViewHostProps }: SplitViewProps) {\n if (use(IsWithinSplitViewContext)) {\n throw new Error('There can only be one SplitView in the navigation hierarchy.');\n }\n\n // TODO: Add better way of detecting if SplitView is rendered inside Native navigator.\n if (use(IsWithinLayoutContext)) {\n throw new Error('SplitView cannot be used inside another navigator, except for Slot.');\n }\n\n if (process.env.EXPO_OS !== 'ios') {\n console.warn(\n 'SplitView is only supported on iOS. The SplitView will behave like a Slot navigator on other platforms.'\n );\n return <Slot />;\n }\n\n const WrappedSlot = () => (\n <IsWithinLayoutContext value>\n <Slot />\n </IsWithinLayoutContext>\n );\n\n const allChildrenArray = React.Children.toArray(children);\n const columnChildren = allChildrenArray.filter(\n (child) => isValidElement(child) && child.type === SplitViewColumn\n );\n const inspectorChildren = allChildrenArray.filter(\n (child) => isValidElement(child) && child.type === SplitViewInspector\n );\n const numberOfSidebars = columnChildren.length;\n const numberOfInspectors = inspectorChildren.length;\n\n if (allChildrenArray.length !== columnChildren.length + inspectorChildren.length) {\n console.warn(\n 'Only SplitView.Column and SplitView.Inspector components are allowed as direct children of SplitView.'\n );\n }\n\n if (numberOfSidebars > 2) {\n throw new Error('There can only be two SplitView.Column in the SplitView.');\n }\n\n if (numberOfSidebars + numberOfInspectors === 0) {\n console.warn('No SplitView.Column and SplitView.Inspector found in SplitView.');\n return <Slot />;\n }\n\n // The key is needed, because number of columns cannot be changed dynamically\n return (\n <Split.Host key={numberOfSidebars + numberOfInspectors} {...splitViewHostProps}>\n {columnChildren}\n <Split.Column>\n <WrappedSlot />\n </Split.Column>\n {inspectorChildren}\n </Split.Host>\n );\n}\n\nexport const SplitView = Object.assign(SplitViewNavigator, {\n Column: SplitViewColumn,\n Inspector: SplitViewInspector,\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-20260119-70f7c28",
12
+ "version": "7.0.0-canary-20260120-bb71700",
13
13
  "repository": "local-maven-repo"
14
14
  }
15
15
  }
@@ -3,7 +3,7 @@
3
3
  "component": {
4
4
  "group": "expo.modules.router",
5
5
  "module": "expo.modules.router",
6
- "version": "7.0.0-canary-20260119-70f7c28",
6
+ "version": "7.0.0-canary-20260120-bb71700",
7
7
  "attributes": {
8
8
  "org.gradle.status": "release"
9
9
  }
@@ -24,8 +24,8 @@
24
24
  },
25
25
  "files": [
26
26
  {
27
- "name": "expo.modules.router-7.0.0-canary-20260119-70f7c28.aar",
28
- "url": "expo.modules.router-7.0.0-canary-20260119-70f7c28.aar",
27
+ "name": "expo.modules.router-7.0.0-canary-20260120-bb71700.aar",
28
+ "url": "expo.modules.router-7.0.0-canary-20260120-bb71700.aar",
29
29
  "size": 13665,
30
30
  "sha512": "0c996832cda246cbf02acf875f7c3add8610a0e5e7c466bbe5fa2f073a6a644933eec90d1bff2a7fac7fd3c0c5bdae8a695373cebdec4f9853ce116658960554",
31
31
  "sha256": "054876f9b960d2ed5b7762c66b32c7e994f942c05013456f5e41e1fe6c71ee54",
@@ -60,8 +60,8 @@
60
60
  ],
61
61
  "files": [
62
62
  {
63
- "name": "expo.modules.router-7.0.0-canary-20260119-70f7c28.aar",
64
- "url": "expo.modules.router-7.0.0-canary-20260119-70f7c28.aar",
63
+ "name": "expo.modules.router-7.0.0-canary-20260120-bb71700.aar",
64
+ "url": "expo.modules.router-7.0.0-canary-20260120-bb71700.aar",
65
65
  "size": 13665,
66
66
  "sha512": "0c996832cda246cbf02acf875f7c3add8610a0e5e7c466bbe5fa2f073a6a644933eec90d1bff2a7fac7fd3c0c5bdae8a695373cebdec4f9853ce116658960554",
67
67
  "sha256": "054876f9b960d2ed5b7762c66b32c7e994f942c05013456f5e41e1fe6c71ee54",
@@ -80,8 +80,8 @@
80
80
  },
81
81
  "files": [
82
82
  {
83
- "name": "expo.modules.router-7.0.0-canary-20260119-70f7c28-sources.jar",
84
- "url": "expo.modules.router-7.0.0-canary-20260119-70f7c28-sources.jar",
83
+ "name": "expo.modules.router-7.0.0-canary-20260120-bb71700-sources.jar",
84
+ "url": "expo.modules.router-7.0.0-canary-20260120-bb71700-sources.jar",
85
85
  "size": 2318,
86
86
  "sha512": "9864add8e93e3c0a9a9c930aaed67016b15054c3fafd59a0bd3a5402d7cdc5827be84c22c2c137f3e5acb4e39270d9bfb9ca3fe11234458d4f2e0d4c78747f48",
87
87
  "sha256": "d5dff6259e86de721fc0f07fe740a5e18088e19b76738719b0a6f94caef06224",
@@ -0,0 +1 @@
1
+ 781d9a4fb6292459a31a24a76a62e6a93530c60893be6aa45dad8dd101b83a46a30630b77315b8823c7a2451e1693d78a975367748ff979015dc2e87714f85a8
@@ -9,7 +9,7 @@
9
9
  <modelVersion>4.0.0</modelVersion>
10
10
  <groupId>expo.modules.router</groupId>
11
11
  <artifactId>expo.modules.router</artifactId>
12
- <version>7.0.0-canary-20260119-70f7c28</version>
12
+ <version>7.0.0-canary-20260120-bb71700</version>
13
13
  <packaging>aar</packaging>
14
14
  <name>expo.modules.router</name>
15
15
  <url>https://github.com/expo/expo</url>
@@ -0,0 +1 @@
1
+ 2ab5984c1d82a502655b4d6984a91040121d117a866a1fc67d30610308f0c83637797e3167d8330381321b9f4511dd1f80380818b3362dc33ce8dc997c429de8
@@ -3,11 +3,11 @@
3
3
  <groupId>expo.modules.router</groupId>
4
4
  <artifactId>expo.modules.router</artifactId>
5
5
  <versioning>
6
- <latest>7.0.0-canary-20260119-70f7c28</latest>
7
- <release>7.0.0-canary-20260119-70f7c28</release>
6
+ <latest>7.0.0-canary-20260120-bb71700</latest>
7
+ <release>7.0.0-canary-20260120-bb71700</release>
8
8
  <versions>
9
- <version>7.0.0-canary-20260119-70f7c28</version>
9
+ <version>7.0.0-canary-20260120-bb71700</version>
10
10
  </versions>
11
- <lastUpdated>20260119134313</lastUpdated>
11
+ <lastUpdated>20260120151821</lastUpdated>
12
12
  </versioning>
13
13
  </metadata>
@@ -1 +1 @@
1
- 609239af60bbb7ce594939852a879b05
1
+ a0332781e978afa80bf339c2ecc02212
@@ -1 +1 @@
1
- 94bc4f09fd24accb81eb17f5e0858f1d5d1ef957
1
+ 59a4980ee61c139122a45b20fd61fe20ed73220c
@@ -1 +1 @@
1
- 3a0f2cc7f88630222bd33993b0555389c1ee8fb374d2398d3c307d3208aea3b9
1
+ f0a74b8aa5fbe0335bffd05180c1ecd32d3ee3c0331a9ca7ad8694e600fc604a
@@ -1 +1 @@
1
- 5b8f5b544667f8921d46a0dd1b7c4c6085e41b34c897e5261dca770cc4b7ad13a9df87dd37c67bd5cc4cc1036b7986996234c16f0fa3b96a9bf92834eb6e0a87
1
+ 7fea6195f62fc7a34548d6210714d22b4e50706a19379420f1023a5f06e019f60b2d6f898df71f6016754b0a8c2828116fae171e3ea85c918b2f818e2a6860ea
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "expo-router",
3
- "version": "7.0.0-canary-20260119-70f7c28",
3
+ "version": "7.0.0-canary-20260120-bb71700",
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",
@@ -81,13 +81,13 @@
81
81
  "expo"
82
82
  ],
83
83
  "peerDependencies": {
84
- "@expo/metro-runtime": "6.2.0-canary-20260119-70f7c28",
85
- "@expo/log-box": "0.0.13-canary-20260119-70f7c28",
84
+ "@expo/metro-runtime": "6.2.0-canary-20260120-bb71700",
85
+ "@expo/log-box": "0.0.13-canary-20260120-bb71700",
86
86
  "@react-navigation/drawer": "^7.7.2",
87
87
  "@testing-library/react-native": ">= 12.0.0",
88
- "expo": "55.0.0-canary-20260119-70f7c28",
89
- "expo-constants": "18.1.0-canary-20260119-70f7c28",
90
- "expo-linking": "8.0.12-canary-20260119-70f7c28",
88
+ "expo": "55.0.0-canary-20260120-bb71700",
89
+ "expo-constants": "18.1.0-canary-20260120-bb71700",
90
+ "expo-linking": "8.0.12-canary-20260120-bb71700",
91
91
  "react": "*",
92
92
  "react-dom": "*",
93
93
  "react-native": "*",
@@ -132,8 +132,8 @@
132
132
  "react-server-dom-webpack": "~19.0.3"
133
133
  },
134
134
  "dependencies": {
135
- "@expo/metro-runtime": "6.2.0-canary-20260119-70f7c28",
136
- "@expo/schema-utils": "0.1.9-canary-20260119-70f7c28",
135
+ "@expo/metro-runtime": "6.2.0-canary-20260120-bb71700",
136
+ "@expo/schema-utils": "0.1.9-canary-20260120-bb71700",
137
137
  "@radix-ui/react-slot": "1.2.0",
138
138
  "@radix-ui/react-tabs": "^1.1.12",
139
139
  "@react-navigation/bottom-tabs": "^7.7.3",
@@ -142,9 +142,9 @@
142
142
  "client-only": "^0.0.1",
143
143
  "debug": "^4.3.4",
144
144
  "escape-string-regexp": "^4.0.0",
145
- "expo-image": "3.1.0-canary-20260119-70f7c28",
146
- "expo-server": "1.1.0-canary-20260119-70f7c28",
147
- "expo-symbols": "1.1.0-canary-20260119-70f7c28",
145
+ "expo-image": "3.1.0-canary-20260120-bb71700",
146
+ "expo-server": "1.1.0-canary-20260120-bb71700",
147
+ "expo-symbols": "1.1.0-canary-20260120-bb71700",
148
148
  "fast-deep-equal": "^3.1.3",
149
149
  "invariant": "^2.2.4",
150
150
  "nanoid": "^3.3.8",
@@ -1 +0,0 @@
1
- a55d5da6929e191fac4d4e1f694ed277eea559c7ec184330404dca31ae0f5556491140098f4149400d813b0d1ce1dea9285c617c79784929d77e93736337b2b0
@@ -1 +0,0 @@
1
- db9186302bc8a06aaec1661211f7750b6db4b7bc6b99361a40b1e59688fbc05847b005859de4d51c55a4dc3c5f2ed00377286501fbf0ce60137372be356dce11