@react-navigation/core 7.18.0 → 7.20.0

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 (78) hide show
  1. package/lib/module/StaticNavigation.js.map +1 -1
  2. package/lib/module/useNavigationBuilder.js +11 -8
  3. package/lib/module/useNavigationBuilder.js.map +1 -1
  4. package/lib/typescript/src/BaseNavigationContainer.d.ts +1 -1
  5. package/lib/typescript/src/BaseNavigationContainer.d.ts.map +1 -1
  6. package/lib/typescript/src/Group.d.ts +1 -1
  7. package/lib/typescript/src/Group.d.ts.map +1 -1
  8. package/lib/typescript/src/NavigationBuilderContext.d.ts +1 -1
  9. package/lib/typescript/src/NavigationBuilderContext.d.ts.map +1 -1
  10. package/lib/typescript/src/NavigationContainerRefContext.d.ts +1 -1
  11. package/lib/typescript/src/NavigationContainerRefContext.d.ts.map +1 -1
  12. package/lib/typescript/src/NavigationContext.d.ts +1 -1
  13. package/lib/typescript/src/NavigationContext.d.ts.map +1 -1
  14. package/lib/typescript/src/NavigationHelpersContext.d.ts +1 -1
  15. package/lib/typescript/src/NavigationHelpersContext.d.ts.map +1 -1
  16. package/lib/typescript/src/NavigationProvider.d.ts +1 -1
  17. package/lib/typescript/src/NavigationProvider.d.ts.map +1 -1
  18. package/lib/typescript/src/SceneView.d.ts +1 -1
  19. package/lib/typescript/src/SceneView.d.ts.map +1 -1
  20. package/lib/typescript/src/Screen.d.ts +1 -1
  21. package/lib/typescript/src/Screen.d.ts.map +1 -1
  22. package/lib/typescript/src/StaticNavigation.d.ts +3 -4
  23. package/lib/typescript/src/StaticNavigation.d.ts.map +1 -1
  24. package/lib/typescript/src/createNavigationContainerRef.d.ts +1 -1
  25. package/lib/typescript/src/createNavigationContainerRef.d.ts.map +1 -1
  26. package/lib/typescript/src/getActionFromState.d.ts +1 -1
  27. package/lib/typescript/src/getActionFromState.d.ts.map +1 -1
  28. package/lib/typescript/src/getPathFromState.d.ts +1 -1
  29. package/lib/typescript/src/getPathFromState.d.ts.map +1 -1
  30. package/lib/typescript/src/getStateFromPath.d.ts +1 -1
  31. package/lib/typescript/src/getStateFromPath.d.ts.map +1 -1
  32. package/lib/typescript/src/index.d.ts +34 -34
  33. package/lib/typescript/src/index.d.ts.map +1 -1
  34. package/lib/typescript/src/types.d.ts +2 -0
  35. package/lib/typescript/src/types.d.ts.map +1 -1
  36. package/lib/typescript/src/useChildListeners.d.ts +3 -3
  37. package/lib/typescript/src/useChildListeners.d.ts.map +1 -1
  38. package/lib/typescript/src/useCurrentRender.d.ts +1 -1
  39. package/lib/typescript/src/useCurrentRender.d.ts.map +1 -1
  40. package/lib/typescript/src/useDescriptors.d.ts +7 -7
  41. package/lib/typescript/src/useDescriptors.d.ts.map +1 -1
  42. package/lib/typescript/src/useEventEmitter.d.ts +1 -1
  43. package/lib/typescript/src/useEventEmitter.d.ts.map +1 -1
  44. package/lib/typescript/src/useFocusEvents.d.ts +2 -2
  45. package/lib/typescript/src/useFocusEvents.d.ts.map +1 -1
  46. package/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts +2 -2
  47. package/lib/typescript/src/useFocusedListenersChildrenAdapter.d.ts.map +1 -1
  48. package/lib/typescript/src/useKeyedChildListeners.d.ts +3 -3
  49. package/lib/typescript/src/useKeyedChildListeners.d.ts.map +1 -1
  50. package/lib/typescript/src/useNavigation.d.ts +1 -1
  51. package/lib/typescript/src/useNavigation.d.ts.map +1 -1
  52. package/lib/typescript/src/useNavigationBuilder.d.ts +11 -11
  53. package/lib/typescript/src/useNavigationBuilder.d.ts.map +1 -1
  54. package/lib/typescript/src/useNavigationCache.d.ts +4 -4
  55. package/lib/typescript/src/useNavigationCache.d.ts.map +1 -1
  56. package/lib/typescript/src/useNavigationContainerRef.d.ts +1 -1
  57. package/lib/typescript/src/useNavigationContainerRef.d.ts.map +1 -1
  58. package/lib/typescript/src/useNavigationHelpers.d.ts +3 -3
  59. package/lib/typescript/src/useNavigationHelpers.d.ts.map +1 -1
  60. package/lib/typescript/src/useOnAction.d.ts +3 -3
  61. package/lib/typescript/src/useOnAction.d.ts.map +1 -1
  62. package/lib/typescript/src/useOnGetState.d.ts +1 -1
  63. package/lib/typescript/src/useOnGetState.d.ts.map +1 -1
  64. package/lib/typescript/src/useOnPreventRemove.d.ts +3 -3
  65. package/lib/typescript/src/useOnPreventRemove.d.ts.map +1 -1
  66. package/lib/typescript/src/useOptionsGetters.d.ts +1 -1
  67. package/lib/typescript/src/useOptionsGetters.d.ts.map +1 -1
  68. package/lib/typescript/src/usePreventRemoveContext.d.ts +1 -1
  69. package/lib/typescript/src/useRoute.d.ts +1 -1
  70. package/lib/typescript/src/useRoute.d.ts.map +1 -1
  71. package/lib/typescript/src/useRouteCache.d.ts +1 -1
  72. package/lib/typescript/src/useRouteCache.d.ts.map +1 -1
  73. package/lib/typescript/src/useStateForPath.d.ts +1 -1
  74. package/lib/typescript/src/useStateForPath.d.ts.map +1 -1
  75. package/package.json +4 -4
  76. package/src/StaticNavigation.tsx +1 -3
  77. package/src/types.tsx +2 -0
  78. package/src/useNavigationBuilder.tsx +10 -7
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@react-navigation/core",
3
3
  "description": "Core utilities for building navigators",
4
- "version": "7.18.0",
4
+ "version": "7.20.0",
5
5
  "keywords": [
6
6
  "react",
7
7
  "react-native",
@@ -40,7 +40,7 @@
40
40
  "clean": "del lib"
41
41
  },
42
42
  "dependencies": {
43
- "@react-navigation/routers": "^7.5.5",
43
+ "@react-navigation/routers": "^7.6.0",
44
44
  "escape-string-regexp": "^4.0.0",
45
45
  "fast-deep-equal": "^3.1.3",
46
46
  "nanoid": "^3.3.11",
@@ -58,7 +58,7 @@
58
58
  "del-cli": "^6.0.0",
59
59
  "immer": "^10.1.1",
60
60
  "react": "19.1.0",
61
- "react-native-builder-bob": "^0.40.17",
61
+ "react-native-builder-bob": "^0.42.1",
62
62
  "react-test-renderer": "19.1.0",
63
63
  "typescript": "^5.9.2"
64
64
  },
@@ -83,5 +83,5 @@
83
83
  ]
84
84
  ]
85
85
  },
86
- "gitHead": "a1039139c8dfc1fdf7ceef96640eaa6ee9c4a411"
86
+ "gitHead": "d1f2a06597d7f2ae490d09b7ecc4f3531e5efc46"
87
87
  }
@@ -36,10 +36,8 @@ type StaticRouteConfig<
36
36
  > &
37
37
  RouteConfigComponent<ParamList, RouteName>;
38
38
 
39
- declare const StaticScreenConfigSymbol: unique symbol;
40
-
41
39
  type StaticScreenConfigBrand = {
42
- readonly [StaticScreenConfigSymbol]: true;
40
+ readonly __reactNavigationStaticScreenConfig: true;
43
41
  };
44
42
 
45
43
  type UnknownToUndefined<T> = unknown extends T ? undefined : T;
package/src/types.tsx CHANGED
@@ -427,6 +427,8 @@ type NavigationHelpersCommon<
427
427
  /**
428
428
  * Navigate to a route in current navigation tree.
429
429
  *
430
+ * @deprecated Use `navigate(name, params, options)` instead.
431
+ *
430
432
  * @param options.name Name of the route to navigate to.
431
433
  * @param [options.params] Params object for the route.
432
434
  * @param [options.path] Path to associate the route with (e.g. for deep links).
@@ -691,13 +691,16 @@ export function useNavigationBuilder<
691
691
  }
692
692
  } else {
693
693
  // If the route was updated with new screen name and/or params, we should navigate there
694
- action = CommonActions.navigate({
695
- name: route.params.screen,
696
- params: route.params.params,
697
- path: route.params.path,
698
- merge: route.params.merge,
699
- pop: route.params.pop,
700
- });
694
+ action = {
695
+ type: 'NAVIGATE',
696
+ payload: {
697
+ name: route.params.screen,
698
+ params: route.params.params,
699
+ path: route.params.path,
700
+ merge: route.params.merge,
701
+ pop: route.params.pop,
702
+ },
703
+ } as const;
701
704
  }
702
705
  }
703
706