@symbiote-native/navigation 1.0.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 (455) hide show
  1. package/LICENSE +21 -0
  2. package/build/angular/drawer/index.d.ts +76 -0
  3. package/build/angular/drawer/index.js +508 -0
  4. package/build/angular/drawer-screen.directive.d.ts +14 -0
  5. package/build/angular/drawer-screen.directive.js +87 -0
  6. package/build/angular/index.d.ts +23 -0
  7. package/build/angular/index.js +22 -0
  8. package/build/angular/injectors/index.d.ts +13 -0
  9. package/build/angular/injectors/index.js +8 -0
  10. package/build/angular/injectors/inject-drawer-navigation.d.ts +4 -0
  11. package/build/angular/injectors/inject-drawer-navigation.js +12 -0
  12. package/build/angular/injectors/inject-focus-effect.d.ts +2 -0
  13. package/build/angular/injectors/inject-focus-effect.js +29 -0
  14. package/build/angular/injectors/inject-is-focused.d.ts +2 -0
  15. package/build/angular/injectors/inject-is-focused.js +20 -0
  16. package/build/angular/injectors/inject-navigation-state.d.ts +3 -0
  17. package/build/angular/injectors/inject-navigation-state.js +35 -0
  18. package/build/angular/injectors/inject-navigation.d.ts +7 -0
  19. package/build/angular/injectors/inject-navigation.js +16 -0
  20. package/build/angular/injectors/inject-route.d.ts +3 -0
  21. package/build/angular/injectors/inject-route.js +20 -0
  22. package/build/angular/injectors/inject-stack-navigation.d.ts +4 -0
  23. package/build/angular/injectors/inject-stack-navigation.js +15 -0
  24. package/build/angular/injectors/inject-tab-navigation.d.ts +4 -0
  25. package/build/angular/injectors/inject-tab-navigation.js +11 -0
  26. package/build/angular/linking.d.ts +3 -0
  27. package/build/angular/linking.js +43 -0
  28. package/build/angular/navigation-context.service.d.ts +13 -0
  29. package/build/angular/navigation-context.service.js +105 -0
  30. package/build/angular/navigation-scope.directive.d.ts +10 -0
  31. package/build/angular/navigation-scope.directive.js +90 -0
  32. package/build/angular/screen.directive.d.ts +22 -0
  33. package/build/angular/screen.directive.js +90 -0
  34. package/build/angular/search-bar-ref.directive.d.ts +10 -0
  35. package/build/angular/search-bar-ref.directive.js +88 -0
  36. package/build/angular/stack/index.d.ts +55 -0
  37. package/build/angular/stack/index.js +386 -0
  38. package/build/angular/tab-screen.directive.d.ts +14 -0
  39. package/build/angular/tab-screen.directive.js +87 -0
  40. package/build/angular/tabs/index.d.ts +42 -0
  41. package/build/angular/tabs/index.js +263 -0
  42. package/build/core/constants.d.ts +27 -0
  43. package/build/core/constants.js +61 -0
  44. package/build/core/drawer-options/index.d.ts +64 -0
  45. package/build/core/drawer-options/index.js +200 -0
  46. package/build/core/drawer-router-state/index.d.ts +21 -0
  47. package/build/core/drawer-router-state/index.js +40 -0
  48. package/build/core/guards.d.ts +2 -0
  49. package/build/core/guards.js +22 -0
  50. package/build/core/header-bar-buttons.d.ts +9 -0
  51. package/build/core/header-bar-buttons.js +163 -0
  52. package/build/core/index.d.ts +29 -0
  53. package/build/core/index.js +32 -0
  54. package/build/core/linking-config/index.d.ts +13 -0
  55. package/build/core/linking-config/index.js +171 -0
  56. package/build/core/navigation-events/index.d.ts +16 -0
  57. package/build/core/navigation-events/index.js +57 -0
  58. package/build/core/navigator-handles/index.d.ts +30 -0
  59. package/build/core/navigator-handles/index.js +15 -0
  60. package/build/core/navigator-props.d.ts +216 -0
  61. package/build/core/navigator-props.js +7 -0
  62. package/build/core/navigator-state/index.d.ts +36 -0
  63. package/build/core/navigator-state/index.js +81 -0
  64. package/build/core/render-drawer.d.ts +13 -0
  65. package/build/core/render-drawer.js +88 -0
  66. package/build/core/render-stack.d.ts +35 -0
  67. package/build/core/render-stack.js +294 -0
  68. package/build/core/render-tabs.d.ts +20 -0
  69. package/build/core/render-tabs.js +97 -0
  70. package/build/core/screen-options.d.ts +4 -0
  71. package/build/core/screen-options.js +133 -0
  72. package/build/core/search-bar-commands.d.ts +10 -0
  73. package/build/core/search-bar-commands.js +42 -0
  74. package/build/core/state-persistence/index.d.ts +3 -0
  75. package/build/core/state-persistence/index.js +23 -0
  76. package/build/core/tab-options.d.ts +13 -0
  77. package/build/core/tab-options.js +10 -0
  78. package/build/core/tab-router-state/index.d.ts +19 -0
  79. package/build/core/tab-router-state/index.js +51 -0
  80. package/build/react/collect-registry.d.ts +4 -0
  81. package/build/react/collect-registry.js +15 -0
  82. package/build/react/drawer/index.d.ts +29 -0
  83. package/build/react/drawer/index.js +277 -0
  84. package/build/react/drawer-screen.d.ts +14 -0
  85. package/build/react/drawer-screen.js +8 -0
  86. package/build/react/hooks/index.d.ts +12 -0
  87. package/build/react/hooks/index.js +8 -0
  88. package/build/react/hooks/use-drawer-navigation.d.ts +4 -0
  89. package/build/react/hooks/use-drawer-navigation.js +12 -0
  90. package/build/react/hooks/use-focus-effect.d.ts +2 -0
  91. package/build/react/hooks/use-focus-effect.js +29 -0
  92. package/build/react/hooks/use-is-focused.d.ts +1 -0
  93. package/build/react/hooks/use-is-focused.js +22 -0
  94. package/build/react/hooks/use-navigation-state/index.d.ts +2 -0
  95. package/build/react/hooks/use-navigation-state/index.js +39 -0
  96. package/build/react/hooks/use-navigation.d.ts +7 -0
  97. package/build/react/hooks/use-navigation.js +16 -0
  98. package/build/react/hooks/use-route.d.ts +2 -0
  99. package/build/react/hooks/use-route.js +8 -0
  100. package/build/react/hooks/use-stack-navigation.d.ts +4 -0
  101. package/build/react/hooks/use-stack-navigation.js +14 -0
  102. package/build/react/hooks/use-tab-navigation.d.ts +4 -0
  103. package/build/react/hooks/use-tab-navigation.js +12 -0
  104. package/build/react/index.d.ts +24 -0
  105. package/build/react/index.js +21 -0
  106. package/build/react/linking.d.ts +3 -0
  107. package/build/react/linking.js +47 -0
  108. package/build/react/navigation-context.d.ts +10 -0
  109. package/build/react/navigation-context.js +22 -0
  110. package/build/react/screen.d.ts +22 -0
  111. package/build/react/screen.js +7 -0
  112. package/build/react/stack/index.d.ts +13 -0
  113. package/build/react/stack/index.js +202 -0
  114. package/build/react/tab-screen.d.ts +15 -0
  115. package/build/react/tab-screen.js +8 -0
  116. package/build/react/tabs/index.d.ts +12 -0
  117. package/build/react/tabs/index.js +116 -0
  118. package/build/register.d.ts +7 -0
  119. package/build/register.js +58 -0
  120. package/build/vue/composables/index.d.ts +12 -0
  121. package/build/vue/composables/index.js +8 -0
  122. package/build/vue/composables/use-drawer-navigation.d.ts +5 -0
  123. package/build/vue/composables/use-drawer-navigation.js +15 -0
  124. package/build/vue/composables/use-focus-effect.d.ts +1 -0
  125. package/build/vue/composables/use-focus-effect.js +31 -0
  126. package/build/vue/composables/use-is-focused.d.ts +2 -0
  127. package/build/vue/composables/use-is-focused.js +28 -0
  128. package/build/vue/composables/use-navigation-state.d.ts +3 -0
  129. package/build/vue/composables/use-navigation-state.js +29 -0
  130. package/build/vue/composables/use-navigation.d.ts +8 -0
  131. package/build/vue/composables/use-navigation.js +13 -0
  132. package/build/vue/composables/use-route.d.ts +3 -0
  133. package/build/vue/composables/use-route.js +9 -0
  134. package/build/vue/composables/use-stack-navigation.d.ts +5 -0
  135. package/build/vue/composables/use-stack-navigation.js +18 -0
  136. package/build/vue/composables/use-tab-navigation.d.ts +5 -0
  137. package/build/vue/composables/use-tab-navigation.js +15 -0
  138. package/build/vue/drawer/index.d.ts +19 -0
  139. package/build/vue/drawer/index.js +390 -0
  140. package/build/vue/drawer-screen.d.ts +14 -0
  141. package/build/vue/drawer-screen.js +12 -0
  142. package/build/vue/index.d.ts +21 -0
  143. package/build/vue/index.js +19 -0
  144. package/build/vue/linking.d.ts +3 -0
  145. package/build/vue/linking.js +57 -0
  146. package/build/vue/navigation-context.d.ts +16 -0
  147. package/build/vue/navigation-context.js +65 -0
  148. package/build/vue/screen.d.ts +21 -0
  149. package/build/vue/screen.js +12 -0
  150. package/build/vue/stack/index.d.ts +9 -0
  151. package/build/vue/stack/index.js +279 -0
  152. package/build/vue/tab-screen.d.ts +14 -0
  153. package/build/vue/tab-screen.js +11 -0
  154. package/build/vue/tabs/index.d.ts +10 -0
  155. package/build/vue/tabs/index.js +209 -0
  156. package/build-ngc/angular/drawer/index.d.ts +79 -0
  157. package/build-ngc/angular/drawer/index.js +479 -0
  158. package/build-ngc/angular/drawer/index.js.map +1 -0
  159. package/build-ngc/angular/drawer-screen.directive.d.ts +17 -0
  160. package/build-ngc/angular/drawer-screen.directive.js +32 -0
  161. package/build-ngc/angular/drawer-screen.directive.js.map +1 -0
  162. package/build-ngc/angular/drawer.d.ts +79 -0
  163. package/build-ngc/angular/drawer.js +475 -0
  164. package/build-ngc/angular/drawer.js.map +1 -0
  165. package/build-ngc/angular/index.d.ts +23 -0
  166. package/build-ngc/angular/index.js +23 -0
  167. package/build-ngc/angular/index.js.map +1 -0
  168. package/build-ngc/angular/injectors/index.d.ts +13 -0
  169. package/build-ngc/angular/injectors/index.js +9 -0
  170. package/build-ngc/angular/injectors/index.js.map +1 -0
  171. package/build-ngc/angular/injectors/inject-drawer-navigation.d.ts +4 -0
  172. package/build-ngc/angular/injectors/inject-drawer-navigation.js +13 -0
  173. package/build-ngc/angular/injectors/inject-drawer-navigation.js.map +1 -0
  174. package/build-ngc/angular/injectors/inject-focus-effect.d.ts +2 -0
  175. package/build-ngc/angular/injectors/inject-focus-effect.js +30 -0
  176. package/build-ngc/angular/injectors/inject-focus-effect.js.map +1 -0
  177. package/build-ngc/angular/injectors/inject-is-focused.d.ts +2 -0
  178. package/build-ngc/angular/injectors/inject-is-focused.js +22 -0
  179. package/build-ngc/angular/injectors/inject-is-focused.js.map +1 -0
  180. package/build-ngc/angular/injectors/inject-navigation-state.d.ts +3 -0
  181. package/build-ngc/angular/injectors/inject-navigation-state.js +37 -0
  182. package/build-ngc/angular/injectors/inject-navigation-state.js.map +1 -0
  183. package/build-ngc/angular/injectors/inject-navigation.d.ts +7 -0
  184. package/build-ngc/angular/injectors/inject-navigation.js +17 -0
  185. package/build-ngc/angular/injectors/inject-navigation.js.map +1 -0
  186. package/build-ngc/angular/injectors/inject-route.d.ts +3 -0
  187. package/build-ngc/angular/injectors/inject-route.js +21 -0
  188. package/build-ngc/angular/injectors/inject-route.js.map +1 -0
  189. package/build-ngc/angular/injectors/inject-stack-navigation.d.ts +4 -0
  190. package/build-ngc/angular/injectors/inject-stack-navigation.js +16 -0
  191. package/build-ngc/angular/injectors/inject-stack-navigation.js.map +1 -0
  192. package/build-ngc/angular/injectors/inject-tab-navigation.d.ts +4 -0
  193. package/build-ngc/angular/injectors/inject-tab-navigation.js +12 -0
  194. package/build-ngc/angular/injectors/inject-tab-navigation.js.map +1 -0
  195. package/build-ngc/angular/linking.d.ts +3 -0
  196. package/build-ngc/angular/linking.js +44 -0
  197. package/build-ngc/angular/linking.js.map +1 -0
  198. package/build-ngc/angular/navigation-context.service.d.ts +16 -0
  199. package/build-ngc/angular/navigation-context.service.js +63 -0
  200. package/build-ngc/angular/navigation-context.service.js.map +1 -0
  201. package/build-ngc/angular/navigation-scope.directive.d.ts +13 -0
  202. package/build-ngc/angular/navigation-scope.directive.js +42 -0
  203. package/build-ngc/angular/navigation-scope.directive.js.map +1 -0
  204. package/build-ngc/angular/screen.directive.d.ts +25 -0
  205. package/build-ngc/angular/screen.directive.js +35 -0
  206. package/build-ngc/angular/screen.directive.js.map +1 -0
  207. package/build-ngc/angular/search-bar-ref.directive.d.ts +13 -0
  208. package/build-ngc/angular/search-bar-ref.directive.js +44 -0
  209. package/build-ngc/angular/search-bar-ref.directive.js.map +1 -0
  210. package/build-ngc/angular/stack/index.d.ts +58 -0
  211. package/build-ngc/angular/stack/index.js +406 -0
  212. package/build-ngc/angular/stack/index.js.map +1 -0
  213. package/build-ngc/angular/stack.d.ts +58 -0
  214. package/build-ngc/angular/stack.js +402 -0
  215. package/build-ngc/angular/stack.js.map +1 -0
  216. package/build-ngc/angular/tab-screen.directive.d.ts +17 -0
  217. package/build-ngc/angular/tab-screen.directive.js +32 -0
  218. package/build-ngc/angular/tab-screen.directive.js.map +1 -0
  219. package/build-ngc/angular/tabs/index.d.ts +45 -0
  220. package/build-ngc/angular/tabs/index.js +231 -0
  221. package/build-ngc/angular/tabs/index.js.map +1 -0
  222. package/build-ngc/angular/tabs.d.ts +45 -0
  223. package/build-ngc/angular/tabs.js +231 -0
  224. package/build-ngc/angular/tabs.js.map +1 -0
  225. package/build-ngc/core/constants.d.ts +27 -0
  226. package/build-ngc/core/constants.js +62 -0
  227. package/build-ngc/core/constants.js.map +1 -0
  228. package/build-ngc/core/drawer-options/index.d.ts +64 -0
  229. package/build-ngc/core/drawer-options/index.js +201 -0
  230. package/build-ngc/core/drawer-options/index.js.map +1 -0
  231. package/build-ngc/core/drawer-options.d.ts +64 -0
  232. package/build-ngc/core/drawer-options.js +201 -0
  233. package/build-ngc/core/drawer-options.js.map +1 -0
  234. package/build-ngc/core/drawer-router-state/index.d.ts +21 -0
  235. package/build-ngc/core/drawer-router-state/index.js +41 -0
  236. package/build-ngc/core/drawer-router-state/index.js.map +1 -0
  237. package/build-ngc/core/drawer-router-state.d.ts +21 -0
  238. package/build-ngc/core/drawer-router-state.js +41 -0
  239. package/build-ngc/core/drawer-router-state.js.map +1 -0
  240. package/build-ngc/core/guards.d.ts +2 -0
  241. package/build-ngc/core/guards.js +23 -0
  242. package/build-ngc/core/guards.js.map +1 -0
  243. package/build-ngc/core/header-bar-buttons.d.ts +9 -0
  244. package/build-ngc/core/header-bar-buttons.js +164 -0
  245. package/build-ngc/core/header-bar-buttons.js.map +1 -0
  246. package/build-ngc/core/href.d.ts +16 -0
  247. package/build-ngc/core/href.js +55 -0
  248. package/build-ngc/core/href.js.map +1 -0
  249. package/build-ngc/core/index.d.ts +29 -0
  250. package/build-ngc/core/index.js +33 -0
  251. package/build-ngc/core/index.js.map +1 -0
  252. package/build-ngc/core/linking-config/index.d.ts +13 -0
  253. package/build-ngc/core/linking-config/index.js +172 -0
  254. package/build-ngc/core/linking-config/index.js.map +1 -0
  255. package/build-ngc/core/linking-config.d.ts +13 -0
  256. package/build-ngc/core/linking-config.js +172 -0
  257. package/build-ngc/core/linking-config.js.map +1 -0
  258. package/build-ngc/core/navigation-events/index.d.ts +16 -0
  259. package/build-ngc/core/navigation-events/index.js +58 -0
  260. package/build-ngc/core/navigation-events/index.js.map +1 -0
  261. package/build-ngc/core/navigation-events.d.ts +16 -0
  262. package/build-ngc/core/navigation-events.js +58 -0
  263. package/build-ngc/core/navigation-events.js.map +1 -0
  264. package/build-ngc/core/navigator-handles/index.d.ts +30 -0
  265. package/build-ngc/core/navigator-handles/index.js +16 -0
  266. package/build-ngc/core/navigator-handles/index.js.map +1 -0
  267. package/build-ngc/core/navigator-handles.d.ts +30 -0
  268. package/build-ngc/core/navigator-handles.js +16 -0
  269. package/build-ngc/core/navigator-handles.js.map +1 -0
  270. package/build-ngc/core/navigator-props.d.ts +216 -0
  271. package/build-ngc/core/navigator-props.js +8 -0
  272. package/build-ngc/core/navigator-props.js.map +1 -0
  273. package/build-ngc/core/navigator-state/index.d.ts +36 -0
  274. package/build-ngc/core/navigator-state/index.js +82 -0
  275. package/build-ngc/core/navigator-state/index.js.map +1 -0
  276. package/build-ngc/core/navigator-state.d.ts +36 -0
  277. package/build-ngc/core/navigator-state.js +82 -0
  278. package/build-ngc/core/navigator-state.js.map +1 -0
  279. package/build-ngc/core/render-drawer.d.ts +13 -0
  280. package/build-ngc/core/render-drawer.js +89 -0
  281. package/build-ngc/core/render-drawer.js.map +1 -0
  282. package/build-ngc/core/render-stack.d.ts +35 -0
  283. package/build-ngc/core/render-stack.js +295 -0
  284. package/build-ngc/core/render-stack.js.map +1 -0
  285. package/build-ngc/core/render-tabs.d.ts +20 -0
  286. package/build-ngc/core/render-tabs.js +98 -0
  287. package/build-ngc/core/render-tabs.js.map +1 -0
  288. package/build-ngc/core/screen-options.d.ts +4 -0
  289. package/build-ngc/core/screen-options.js +134 -0
  290. package/build-ngc/core/screen-options.js.map +1 -0
  291. package/build-ngc/core/search-bar-commands.d.ts +10 -0
  292. package/build-ngc/core/search-bar-commands.js +43 -0
  293. package/build-ngc/core/search-bar-commands.js.map +1 -0
  294. package/build-ngc/core/search-params.d.ts +9 -0
  295. package/build-ngc/core/search-params.js +60 -0
  296. package/build-ngc/core/search-params.js.map +1 -0
  297. package/build-ngc/core/state-persistence/index.d.ts +3 -0
  298. package/build-ngc/core/state-persistence/index.js +24 -0
  299. package/build-ngc/core/state-persistence/index.js.map +1 -0
  300. package/build-ngc/core/state-persistence.d.ts +3 -0
  301. package/build-ngc/core/state-persistence.js +24 -0
  302. package/build-ngc/core/state-persistence.js.map +1 -0
  303. package/build-ngc/core/tab-options.d.ts +13 -0
  304. package/build-ngc/core/tab-options.js +11 -0
  305. package/build-ngc/core/tab-options.js.map +1 -0
  306. package/build-ngc/core/tab-router-state/index.d.ts +19 -0
  307. package/build-ngc/core/tab-router-state/index.js +52 -0
  308. package/build-ngc/core/tab-router-state/index.js.map +1 -0
  309. package/build-ngc/core/tab-router-state.d.ts +19 -0
  310. package/build-ngc/core/tab-router-state.js +52 -0
  311. package/build-ngc/core/tab-router-state.js.map +1 -0
  312. package/build-ngc/register.d.ts +7 -0
  313. package/build-ngc/register.js +59 -0
  314. package/build-ngc/register.js.map +1 -0
  315. package/codegen-specs/FullWindowOverlayNativeComponent.ts +13 -0
  316. package/codegen-specs/ModalScreenNativeComponent.ts +129 -0
  317. package/codegen-specs/NativeScreensModule.ts +8 -0
  318. package/codegen-specs/NativeScreensModule.web.ts +1 -0
  319. package/codegen-specs/ScreenContainerNativeComponent.ts +8 -0
  320. package/codegen-specs/ScreenContentWrapperNativeComponent.ts +9 -0
  321. package/codegen-specs/ScreenFooterNativeComponent.ts +6 -0
  322. package/codegen-specs/ScreenNativeComponent.ts +133 -0
  323. package/codegen-specs/ScreenNavigationContainerNativeComponent.ts +11 -0
  324. package/codegen-specs/ScreenStackHeaderConfigNativeComponent.ts +99 -0
  325. package/codegen-specs/ScreenStackHeaderSubviewNativeComponent.ts +25 -0
  326. package/codegen-specs/ScreenStackNativeComponent.ts +17 -0
  327. package/codegen-specs/SearchBarNativeComponent.ts +101 -0
  328. package/codegen-specs/codegenUtils.ts +6 -0
  329. package/codegen-specs/gamma/ScrollViewMarkerNativeComponent.ts +15 -0
  330. package/codegen-specs/gamma/modals/form-sheet/FormSheetContentWrapperNativeComponent.ts +10 -0
  331. package/codegen-specs/gamma/modals/form-sheet/FormSheetHostNativeComponent.ts +47 -0
  332. package/codegen-specs/gamma/split/SplitHostNativeComponent.ts +124 -0
  333. package/codegen-specs/gamma/split/SplitScreenNativeComponent.ts +24 -0
  334. package/codegen-specs/gamma/stack/StackHeaderConfigAndroidNativeComponent.ts +144 -0
  335. package/codegen-specs/gamma/stack/StackHeaderConfigIOSNativeComponent.ts +34 -0
  336. package/codegen-specs/gamma/stack/StackHeaderItemIOSNativeComponent.ts +47 -0
  337. package/codegen-specs/gamma/stack/StackHeaderItemSpacerIOSNativeComponent.ts +20 -0
  338. package/codegen-specs/gamma/stack/StackHeaderSubviewAndroidNativeComponent.ts +27 -0
  339. package/codegen-specs/gamma/stack/StackHostNativeComponent.ts +8 -0
  340. package/codegen-specs/gamma/stack/StackScreenNativeComponent.ts +42 -0
  341. package/codegen-specs/safe-area/SafeAreaViewNativeComponent.ts +24 -0
  342. package/codegen-specs/tabs/TabsBottomAccessoryContentNativeComponent.ts +15 -0
  343. package/codegen-specs/tabs/TabsBottomAccessoryNativeComponent.ts +19 -0
  344. package/codegen-specs/tabs/TabsHostAndroidNativeComponent.ts +69 -0
  345. package/codegen-specs/tabs/TabsHostIOSNativeComponent.ts +92 -0
  346. package/codegen-specs/tabs/TabsScreenAndroidNativeComponent.ts +112 -0
  347. package/codegen-specs/tabs/TabsScreenIOSNativeComponent.ts +171 -0
  348. package/package.json +201 -0
  349. package/react-native.config.cjs +58 -0
  350. package/src/angular/drawer/drawer.test.ts +299 -0
  351. package/src/angular/drawer/index.ts +546 -0
  352. package/src/angular/drawer-screen.directive.ts +28 -0
  353. package/src/angular/index.ts +63 -0
  354. package/src/angular/injectors/index.ts +13 -0
  355. package/src/angular/injectors/inject-drawer-navigation.ts +21 -0
  356. package/src/angular/injectors/inject-focus-effect.ts +37 -0
  357. package/src/angular/injectors/inject-is-focused.ts +28 -0
  358. package/src/angular/injectors/inject-navigation-state.ts +46 -0
  359. package/src/angular/injectors/inject-navigation.ts +26 -0
  360. package/src/angular/injectors/inject-route.ts +25 -0
  361. package/src/angular/injectors/inject-stack-navigation.ts +24 -0
  362. package/src/angular/injectors/inject-tab-navigation.ts +20 -0
  363. package/src/angular/injectors/injectors.test.ts +247 -0
  364. package/src/angular/injectors/use-typed-navigation.test.ts +229 -0
  365. package/src/angular/linking.ts +55 -0
  366. package/src/angular/navigation-context.service.ts +68 -0
  367. package/src/angular/navigation-scope.directive.ts +31 -0
  368. package/src/angular/nested-navigation.test.ts +189 -0
  369. package/src/angular/screen.directive.ts +48 -0
  370. package/src/angular/search-bar-ref.directive.ts +38 -0
  371. package/src/angular/stack/index.ts +401 -0
  372. package/src/angular/stack/stack.test.ts +419 -0
  373. package/src/angular/tab-screen.directive.ts +26 -0
  374. package/src/angular/tabs/index.ts +254 -0
  375. package/src/angular/tabs/tabs.test.ts +249 -0
  376. package/src/core/constants.ts +68 -0
  377. package/src/core/drawer-options/drawer-options.test.ts +415 -0
  378. package/src/core/drawer-options/index.ts +331 -0
  379. package/src/core/drawer-router-state/drawer-router-state.test.ts +116 -0
  380. package/src/core/drawer-router-state/index.ts +71 -0
  381. package/src/core/guards.ts +23 -0
  382. package/src/core/header-bar-buttons.ts +212 -0
  383. package/src/core/index.ts +170 -0
  384. package/src/core/linking-config/index.ts +209 -0
  385. package/src/core/linking-config/linking-config.test.ts +109 -0
  386. package/src/core/navigation-events/index.ts +94 -0
  387. package/src/core/navigation-events/navigation-events.test.ts +56 -0
  388. package/src/core/navigator-handles/index.ts +63 -0
  389. package/src/core/navigator-handles/navigator-handles.test.ts +46 -0
  390. package/src/core/navigator-props.ts +323 -0
  391. package/src/core/navigator-state/index.ts +112 -0
  392. package/src/core/navigator-state/navigator-state.test.ts +80 -0
  393. package/src/core/render-drawer.ts +123 -0
  394. package/src/core/render-stack.ts +414 -0
  395. package/src/core/render-tabs.ts +138 -0
  396. package/src/core/screen-options.ts +181 -0
  397. package/src/core/search-bar-commands.ts +57 -0
  398. package/src/core/state-persistence/index.ts +30 -0
  399. package/src/core/state-persistence/state-persistence.test.ts +42 -0
  400. package/src/core/tab-options.ts +25 -0
  401. package/src/core/tab-router-state/index.ts +75 -0
  402. package/src/core/tab-router-state/tab-router-state.test.ts +34 -0
  403. package/src/globals.d.ts +4 -0
  404. package/src/react/collect-registry.ts +19 -0
  405. package/src/react/drawer/drawer.test.tsx +472 -0
  406. package/src/react/drawer/index.ts +451 -0
  407. package/src/react/drawer-screen.ts +29 -0
  408. package/src/react/hooks/hooks.test.tsx +199 -0
  409. package/src/react/hooks/index.ts +12 -0
  410. package/src/react/hooks/use-drawer-navigation.ts +21 -0
  411. package/src/react/hooks/use-focus-effect.ts +36 -0
  412. package/src/react/hooks/use-is-focused.ts +26 -0
  413. package/src/react/hooks/use-navigation-state/index.ts +47 -0
  414. package/src/react/hooks/use-navigation-state/use-navigation-state.test.ts +85 -0
  415. package/src/react/hooks/use-navigation.ts +36 -0
  416. package/src/react/hooks/use-route.ts +11 -0
  417. package/src/react/hooks/use-stack-navigation.ts +23 -0
  418. package/src/react/hooks/use-tab-navigation.ts +21 -0
  419. package/src/react/hooks/use-typed-navigation.test.tsx +187 -0
  420. package/src/react/index.ts +52 -0
  421. package/src/react/linking.ts +59 -0
  422. package/src/react/navigation-context.ts +40 -0
  423. package/src/react/nested-navigation.test.tsx +145 -0
  424. package/src/react/screen.ts +44 -0
  425. package/src/react/stack/index.ts +323 -0
  426. package/src/react/stack/stack.test.tsx +514 -0
  427. package/src/react/tab-screen.ts +30 -0
  428. package/src/react/tabs/index.ts +204 -0
  429. package/src/react/tabs/tabs.test.tsx +256 -0
  430. package/src/register.ts +59 -0
  431. package/src/vue/composables/composables.test.ts +221 -0
  432. package/src/vue/composables/index.ts +12 -0
  433. package/src/vue/composables/use-drawer-navigation.ts +25 -0
  434. package/src/vue/composables/use-focus-effect.ts +37 -0
  435. package/src/vue/composables/use-is-focused.ts +34 -0
  436. package/src/vue/composables/use-navigation-state.ts +38 -0
  437. package/src/vue/composables/use-navigation.ts +30 -0
  438. package/src/vue/composables/use-route.ts +13 -0
  439. package/src/vue/composables/use-stack-navigation.ts +28 -0
  440. package/src/vue/composables/use-tab-navigation.ts +25 -0
  441. package/src/vue/composables/use-typed-navigation.test.ts +205 -0
  442. package/src/vue/drawer/drawer.test.ts +451 -0
  443. package/src/vue/drawer/index.ts +550 -0
  444. package/src/vue/drawer-screen.ts +32 -0
  445. package/src/vue/index.ts +70 -0
  446. package/src/vue/linking.ts +69 -0
  447. package/src/vue/navigation-context.ts +87 -0
  448. package/src/vue/nested-navigation.test.ts +155 -0
  449. package/src/vue/screen.ts +52 -0
  450. package/src/vue/stack/index.ts +376 -0
  451. package/src/vue/stack/stack.test.ts +501 -0
  452. package/src/vue/tab-screen.ts +29 -0
  453. package/src/vue/tabs/index.ts +302 -0
  454. package/src/vue/tabs/tabs.test.ts +278 -0
  455. package/symbiote-navigation.podspec +84 -0
@@ -0,0 +1,87 @@
1
+ // [symbioteDrawerScreen]: Drawer's twin of screen.directive.ts's ScreenDirective - a declarative
2
+ // marker read via @ContentChildren to build the static name -> {component, options} registry, then
3
+ // Drawer mounts the FOCUSED route's component. Mirrors react/drawer-screen.ts (Drawer's twin) and
4
+ // tab-screen.directive.ts (the closer sibling - both are fixed-route-list, no-push navigators).
5
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
6
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
7
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
8
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
9
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
10
+ var _, done = false;
11
+ for (var i = decorators.length - 1; i >= 0; i--) {
12
+ var context = {};
13
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
14
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
15
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
16
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
17
+ if (kind === "accessor") {
18
+ if (result === void 0) continue;
19
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
20
+ if (_ = accept(result.get)) descriptor.get = _;
21
+ if (_ = accept(result.set)) descriptor.set = _;
22
+ if (_ = accept(result.init)) initializers.unshift(_);
23
+ }
24
+ else if (_ = accept(result)) {
25
+ if (kind === "field") initializers.unshift(_);
26
+ else descriptor[key] = _;
27
+ }
28
+ }
29
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
30
+ done = true;
31
+ };
32
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
33
+ var useValue = arguments.length > 2;
34
+ for (var i = 0; i < initializers.length; i++) {
35
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
36
+ }
37
+ return useValue ? value : void 0;
38
+ };
39
+ import { Directive, Input } from '@angular/core';
40
+ let DrawerScreenDirective = (() => {
41
+ let _classDecorators = [Directive({
42
+ selector: 'ng-template[symbioteDrawerScreen]',
43
+ standalone: true,
44
+ })];
45
+ let _classDescriptor;
46
+ let _classExtraInitializers = [];
47
+ let _classThis;
48
+ let _name_decorators;
49
+ let _name_initializers = [];
50
+ let _name_extraInitializers = [];
51
+ let _component_decorators;
52
+ let _component_initializers = [];
53
+ let _component_extraInitializers = [];
54
+ let _options_decorators;
55
+ let _options_initializers = [];
56
+ let _options_extraInitializers = [];
57
+ let _initialParams_decorators;
58
+ let _initialParams_initializers = [];
59
+ let _initialParams_extraInitializers = [];
60
+ var DrawerScreenDirective = class {
61
+ static { _classThis = this; }
62
+ static {
63
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
64
+ _name_decorators = [Input({ required: true })];
65
+ _component_decorators = [Input({ required: true })];
66
+ _options_decorators = [Input()];
67
+ _initialParams_decorators = [Input()];
68
+ __esDecorate(null, null, _name_decorators, { kind: "field", name: "name", static: false, private: false, access: { has: obj => "name" in obj, get: obj => obj.name, set: (obj, value) => { obj.name = value; } }, metadata: _metadata }, _name_initializers, _name_extraInitializers);
69
+ __esDecorate(null, null, _component_decorators, { kind: "field", name: "component", static: false, private: false, access: { has: obj => "component" in obj, get: obj => obj.component, set: (obj, value) => { obj.component = value; } }, metadata: _metadata }, _component_initializers, _component_extraInitializers);
70
+ __esDecorate(null, null, _options_decorators, { kind: "field", name: "options", static: false, private: false, access: { has: obj => "options" in obj, get: obj => obj.options, set: (obj, value) => { obj.options = value; } }, metadata: _metadata }, _options_initializers, _options_extraInitializers);
71
+ __esDecorate(null, null, _initialParams_decorators, { kind: "field", name: "initialParams", static: false, private: false, access: { has: obj => "initialParams" in obj, get: obj => obj.initialParams, set: (obj, value) => { obj.initialParams = value; } }, metadata: _metadata }, _initialParams_initializers, _initialParams_extraInitializers);
72
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
73
+ DrawerScreenDirective = _classThis = _classDescriptor.value;
74
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
75
+ __runInitializers(_classThis, _classExtraInitializers);
76
+ }
77
+ name = __runInitializers(this, _name_initializers, void 0);
78
+ component = (__runInitializers(this, _name_extraInitializers), __runInitializers(this, _component_initializers, void 0));
79
+ options = (__runInitializers(this, _component_extraInitializers), __runInitializers(this, _options_initializers, void 0));
80
+ initialParams = (__runInitializers(this, _options_extraInitializers), __runInitializers(this, _initialParams_initializers, void 0));
81
+ constructor() {
82
+ __runInitializers(this, _initialParams_extraInitializers);
83
+ }
84
+ };
85
+ return DrawerScreenDirective = _classThis;
86
+ })();
87
+ export { DrawerScreenDirective };
@@ -0,0 +1,23 @@
1
+ import '../register';
2
+ export { Stack } from './stack';
3
+ export type { INavigatorHandle } from './stack';
4
+ export { ScreenDirective } from './screen.directive';
5
+ export type { IAngularScreenOptions, IAngularSearchBarOptions, IScreenOptionsArgs, IScreenOptionsResolver, } from './screen.directive';
6
+ export type { IScreenOptions, IStackAnimation, IStackPresentation } from '../core';
7
+ export { injectNavigation, injectStackNavigation, injectTabNavigation, injectDrawerNavigation, injectRoute, injectIsFocused, injectFocusEffect, injectNavigationState, } from './injectors';
8
+ export type { INavigationHandle, IStackNavigationHandle, ITabNavigationHandle, IDrawerNavigationHandle, IFocusEffectCallback, } from './injectors';
9
+ export { NavigationContextService } from './navigation-context.service';
10
+ export type { IAnyNavigatorHandle } from './navigation-context.service';
11
+ export { NavigationScopeDirective } from './navigation-scope.directive';
12
+ export { injectLinkingIntegration } from './linking';
13
+ export type { ILinkingConfig, IScreenLinkingConfig } from '../core';
14
+ export { Tab } from './tabs';
15
+ export type { ITabNavigatorHandle } from './tabs';
16
+ export { TabScreenDirective } from './tab-screen.directive';
17
+ export type { ITabScreenOptionsArgs, ITabScreenOptionsResolver } from './tab-screen.directive';
18
+ export type { ITabOptions, ITabBarIcon } from '../core';
19
+ export { Drawer } from './drawer';
20
+ export type { IDrawerNavigatorHandle, IDrawerDescriptorMap, IDrawerContentContext } from './drawer';
21
+ export { DrawerScreenDirective } from './drawer-screen.directive';
22
+ export type { IDrawerScreenOptionsArgs, IDrawerScreenOptionsResolver, } from './drawer-screen.directive';
23
+ export type { IDrawerOptions, IDrawerScreenOptions, IDrawerType, IDrawerPosition } from '../core';
@@ -0,0 +1,22 @@
1
+ // @symbiote-native/navigation/angular: the Angular native-stack navigator over
2
+ // react-native-screens' native view primitives. Importing this barrel first registers the native
3
+ // views' ViewConfigs (../register, a side-effect import of the three codegen specs - never
4
+ // react-native-screens' own React components), then exposes Stack/Tab/Drawer with their Screen
5
+ // directives and navigator handles. Mirrors react/index.ts's barrel shape.
6
+ import '../register';
7
+ export { Stack } from './stack/index.js';
8
+ export { ScreenDirective } from './screen.directive.js';
9
+ export { injectNavigation, injectStackNavigation, injectTabNavigation, injectDrawerNavigation, injectRoute, injectIsFocused, injectFocusEffect, injectNavigationState, } from './injectors/index.js';
10
+ export { NavigationContextService } from './navigation-context.service.js';
11
+ export { NavigationScopeDirective } from './navigation-scope.directive.js';
12
+ export { injectLinkingIntegration } from './linking.js';
13
+ // Tab: the bottom-tabs navigator, a PURE-JS UI (no react-native-screens views involved, so no
14
+ // extra ViewConfig registration is needed beyond the ../register import above).
15
+ export { Tab } from './tabs/index.js';
16
+ export { TabScreenDirective } from './tab-screen.directive.js';
17
+ // Drawer: the swipeable drawer navigator, a PURE-JS UI (PanResponder + Animated, no
18
+ // react-native-screens views involved, so no extra ViewConfig registration is needed beyond the
19
+ // ../register import above). See drawer.ts's header for the feasibility note re:
20
+ // react-native-gesture-handler / react-native-reanimated parity gaps.
21
+ export { Drawer } from './drawer/index.js';
22
+ export { DrawerScreenDirective } from './drawer-screen.directive.js';
@@ -0,0 +1,13 @@
1
+ export { injectNavigation } from './inject-navigation';
2
+ export type { INavigationHandle } from './inject-navigation';
3
+ export { injectStackNavigation } from './inject-stack-navigation';
4
+ export type { IStackNavigationHandle } from './inject-stack-navigation';
5
+ export { injectTabNavigation } from './inject-tab-navigation';
6
+ export type { ITabNavigationHandle } from './inject-tab-navigation';
7
+ export { injectDrawerNavigation } from './inject-drawer-navigation';
8
+ export type { IDrawerNavigationHandle } from './inject-drawer-navigation';
9
+ export { injectRoute } from './inject-route';
10
+ export { injectIsFocused } from './inject-is-focused';
11
+ export { injectFocusEffect } from './inject-focus-effect';
12
+ export type { IFocusEffectCallback } from './inject-focus-effect';
13
+ export { injectNavigationState } from './inject-navigation-state';
@@ -0,0 +1,8 @@
1
+ export { injectNavigation } from './inject-navigation.js';
2
+ export { injectStackNavigation } from './inject-stack-navigation.js';
3
+ export { injectTabNavigation } from './inject-tab-navigation.js';
4
+ export { injectDrawerNavigation } from './inject-drawer-navigation.js';
5
+ export { injectRoute } from './inject-route.js';
6
+ export { injectIsFocused } from './inject-is-focused.js';
7
+ export { injectFocusEffect } from './inject-focus-effect.js';
8
+ export { injectNavigationState } from './inject-navigation-state.js';
@@ -0,0 +1,4 @@
1
+ import type { IDrawerNavigatorHandle } from '../../core';
2
+ import type { INavigationHandle } from './inject-navigation';
3
+ export type IDrawerNavigationHandle = IDrawerNavigatorHandle & Pick<INavigationHandle, 'addListener' | 'getParent'>;
4
+ export declare function injectDrawerNavigation(): IDrawerNavigationHandle;
@@ -0,0 +1,12 @@
1
+ // Twin of inject-stack-navigation.ts, narrowing to a Drawer handle instead.
2
+ import { isDrawerNavigatorHandle } from '../../core/index.js';
3
+ import { injectNavigation } from './inject-navigation.js';
4
+ export function injectDrawerNavigation() {
5
+ const navigation = injectNavigation();
6
+ if (!isDrawerNavigatorHandle(navigation)) {
7
+ throw new Error('injectDrawerNavigation() was called from a component whose nearest navigator is not a ' +
8
+ 'Drawer. Use injectNavigation() instead if this component can render under more than one ' +
9
+ 'navigator kind.');
10
+ }
11
+ return navigation;
12
+ }
@@ -0,0 +1,2 @@
1
+ export type IFocusEffectCallback = () => (() => void) | void;
2
+ export declare function injectFocusEffect(effect: IFocusEffectCallback): void;
@@ -0,0 +1,29 @@
1
+ // Angular injection function: runs `effect` while the route is focused and runs its own returned
2
+ // cleanup on blur - exactly a plain effect's contract, just re-armed on every focus/blur pair
3
+ // instead of once on construction - mirrors @react-navigation's useFocusEffect. Named `effect` for
4
+ // API parity with the React/Vue twins, NOT Angular's own `effect()` reactive primitive (this
5
+ // callback re-runs on focus/blur events, not on a signal dependency change) - callers should keep
6
+ // `effect` referentially stable across calls they don't intend to change (this function is called
7
+ // once per component construction, nothing here re-subscribes automatically otherwise).
8
+ import { DestroyRef, inject } from '@angular/core';
9
+ import { NAVIGATION_EVENT_BLUR, NAVIGATION_EVENT_FOCUS } from '../../core/index.js';
10
+ import { requireNavigationContext } from '../navigation-context.service.js';
11
+ export function injectFocusEffect(effect) {
12
+ const context = requireNavigationContext('injectFocusEffect');
13
+ const destroyRef = inject(DestroyRef);
14
+ let cleanup;
15
+ const runEffect = () => {
16
+ cleanup = effect();
17
+ };
18
+ const runCleanup = () => {
19
+ cleanup?.();
20
+ cleanup = undefined;
21
+ };
22
+ const unsubscribeFocus = context.emitter.addListener(NAVIGATION_EVENT_FOCUS, runEffect);
23
+ const unsubscribeBlur = context.emitter.addListener(NAVIGATION_EVENT_BLUR, runCleanup);
24
+ destroyRef.onDestroy(() => {
25
+ unsubscribeFocus();
26
+ unsubscribeBlur();
27
+ runCleanup();
28
+ });
29
+ }
@@ -0,0 +1,2 @@
1
+ import { type Signal } from '@angular/core';
2
+ export declare function injectIsFocused(): Signal<boolean>;
@@ -0,0 +1,20 @@
1
+ // Angular injection function: subscribes to the route's focus/blur pair and returns a Signal of
2
+ // whether it's currently focused - mirrors @react-navigation's useIsFocused. Starts `false` rather
3
+ // than guessing from stack position: a route's emitter only fires 'focus' once the navigator's own
4
+ // appear/mount signal lands (Stack: RNSScreen's native onAppear; Tab/Drawer: the synthesized
5
+ // mount-time emit), so a screen genuinely isn't focused yet at the instant it's constructed.
6
+ import { DestroyRef, inject, signal } from '@angular/core';
7
+ import { NAVIGATION_EVENT_BLUR, NAVIGATION_EVENT_FOCUS } from '../../core/index.js';
8
+ import { requireNavigationContext } from '../navigation-context.service.js';
9
+ export function injectIsFocused() {
10
+ const context = requireNavigationContext('injectIsFocused');
11
+ const destroyRef = inject(DestroyRef);
12
+ const isFocused = signal(false);
13
+ const unsubscribeFocus = context.emitter.addListener(NAVIGATION_EVENT_FOCUS, () => isFocused.set(true));
14
+ const unsubscribeBlur = context.emitter.addListener(NAVIGATION_EVENT_BLUR, () => isFocused.set(false));
15
+ destroyRef.onDestroy(() => {
16
+ unsubscribeFocus();
17
+ unsubscribeBlur();
18
+ });
19
+ return isFocused.asReadonly();
20
+ }
@@ -0,0 +1,3 @@
1
+ import { type Signal } from '@angular/core';
2
+ import type { INavigatorState } from '../../core';
3
+ export declare function injectNavigationState<TResult>(selector: (state: INavigatorState) => TResult): Signal<TResult>;
@@ -0,0 +1,35 @@
1
+ // Angular injection function: subscribes to the router's `state` broadcast (stack.ts's `dispatch`
2
+ // re-emits the full INavigatorState to every route's emitter after each change) and returns a
3
+ // Signal of `selector(state)`, updating only when the emitted state changes - mirrors
4
+ // @react-navigation's useNavigationState. The reducer/dispatch machinery it selects over lives in
5
+ // core/navigator-state.ts; this function only wires the subscription.
6
+ //
7
+ // Seeded from a single-route snapshot ({ routes: [route] }) rather than left undefined: the real
8
+ // broadcast lands after the FIRST dispatch, so a selector reading e.g. `state.routes.at(-1)?.name`
9
+ // still resolves correctly before any navigation action for the common single-route case, closing
10
+ // the same async gap injectIsFocused documents.
11
+ import { DestroyRef, inject, signal } from '@angular/core';
12
+ import { NAVIGATION_EVENT_STATE } from '../../core/index.js';
13
+ import { requireNavigationContext } from '../navigation-context.service.js';
14
+ function isRecord(value) {
15
+ return typeof value === 'object' && value !== null;
16
+ }
17
+ function isNavigatorState(value) {
18
+ return isRecord(value) && Array.isArray(value.routes);
19
+ }
20
+ export function injectNavigationState(selector) {
21
+ const context = requireNavigationContext('injectNavigationState');
22
+ const destroyRef = inject(DestroyRef);
23
+ const route = context.route();
24
+ if (route === undefined) {
25
+ throw new Error("injectNavigationState: no route has been assigned to this screen's navigation scope yet");
26
+ }
27
+ const result = signal(selector({ routes: [route] }));
28
+ const unsubscribe = context.emitter.addListener(NAVIGATION_EVENT_STATE, (state) => {
29
+ if (!isNavigatorState(state))
30
+ return;
31
+ result.set(selector(state));
32
+ });
33
+ destroyRef.onDestroy(unsubscribe);
34
+ return result.asReadonly();
35
+ }
@@ -0,0 +1,7 @@
1
+ import type { INavigationEventListener, INavigationEventName } from '../../core';
2
+ import { type IAnyNavigatorHandle } from '../navigation-context.service';
3
+ export type INavigationHandle = IAnyNavigatorHandle & {
4
+ addListener: (event: INavigationEventName, listener: INavigationEventListener) => () => void;
5
+ getParent: () => IAnyNavigatorHandle | undefined;
6
+ };
7
+ export declare function injectNavigation(): INavigationHandle;
@@ -0,0 +1,16 @@
1
+ // Angular injection function (calls `inject()`, so it must run in an injection context - a
2
+ // component/directive constructor or field initializer, same requirement `inject()` itself has).
3
+ // Returns the current screen's navigator handle (push/pop/replace/... for a Stack screen,
4
+ // jumpTo/setParams for a Tab screen, openDrawer/... for a Drawer screen) plus addListener bound to
5
+ // that route's own emitter - mirrors @react-navigation's `navigation.addListener('focus', cb)`
6
+ // surface. All pub/sub logic lives in ../../core/navigation-events; this function only reads
7
+ // NavigationContextService and binds identity.
8
+ import { requireNavigationContext } from '../navigation-context.service.js';
9
+ export function injectNavigation() {
10
+ const context = requireNavigationContext('injectNavigation');
11
+ return {
12
+ ...context.navigation,
13
+ addListener: context.emitter.addListener,
14
+ getParent: () => context.parent?.navigation,
15
+ };
16
+ }
@@ -0,0 +1,3 @@
1
+ import { type Signal } from '@angular/core';
2
+ import type { IRoute } from '../../core';
3
+ export declare function injectRoute(): Signal<IRoute<unknown>>;
@@ -0,0 +1,20 @@
1
+ // Angular injection function: returns the current screen's route as a live Signal - mirrors
2
+ // @react-navigation's useRoute, reactive rather than a one-shot read because a setParams call
3
+ // swaps in a new route object (same key) while the screen stays mounted (see
4
+ // navigation-context.service.ts's comment on why `route` is a signal there). Zero logic of its
5
+ // own beyond that signal read.
6
+ import { computed } from '@angular/core';
7
+ import { requireNavigationContext } from '../navigation-context.service.js';
8
+ export function injectRoute() {
9
+ const context = requireNavigationContext('injectRoute');
10
+ // A `computed` (not the raw context.route signal) so the return type narrows to
11
+ // `IRoute<unknown>` structurally - NavigationScopeDirective always assigns a route before any
12
+ // content (and therefore any injectRoute() caller) exists, so this only ever throws on misuse.
13
+ return computed(() => {
14
+ const current = context.route();
15
+ if (current === undefined) {
16
+ throw new Error("injectRoute: no route has been assigned to this screen's navigation scope yet");
17
+ }
18
+ return current;
19
+ });
20
+ }
@@ -0,0 +1,4 @@
1
+ import type { INavigatorHandle } from '../../core';
2
+ import type { INavigationHandle } from './inject-navigation';
3
+ export type IStackNavigationHandle = INavigatorHandle & Pick<INavigationHandle, 'addListener' | 'getParent'>;
4
+ export declare function injectStackNavigation(): IStackNavigationHandle;
@@ -0,0 +1,15 @@
1
+ // injectNavigation() returns a union (IAnyNavigatorHandle) since it doesn't know which navigator
2
+ // mounted the calling component. When a component genuinely knows it only ever renders under a
3
+ // Stack, this injector narrows that union ONCE, here, so call sites never write their own
4
+ // 'push' in navigation check. Angular twin of react/hooks/use-stack-navigation.ts.
5
+ import { isStackNavigatorHandle } from '../../core/index.js';
6
+ import { injectNavigation } from './inject-navigation.js';
7
+ export function injectStackNavigation() {
8
+ const navigation = injectNavigation();
9
+ if (!isStackNavigatorHandle(navigation)) {
10
+ throw new Error('injectStackNavigation() was called from a component whose nearest navigator is not a ' +
11
+ 'Stack. Use injectNavigation() instead if this component can render under more than one ' +
12
+ 'navigator kind.');
13
+ }
14
+ return navigation;
15
+ }
@@ -0,0 +1,4 @@
1
+ import type { ITabNavigatorHandle } from '../../core';
2
+ import type { INavigationHandle } from './inject-navigation';
3
+ export type ITabNavigationHandle = ITabNavigatorHandle & Pick<INavigationHandle, 'addListener' | 'getParent'>;
4
+ export declare function injectTabNavigation(): ITabNavigationHandle;
@@ -0,0 +1,11 @@
1
+ // Twin of inject-stack-navigation.ts, narrowing to a Tab handle instead.
2
+ import { isTabNavigatorHandle } from '../../core/index.js';
3
+ import { injectNavigation } from './inject-navigation.js';
4
+ export function injectTabNavigation() {
5
+ const navigation = injectNavigation();
6
+ if (!isTabNavigatorHandle(navigation)) {
7
+ throw new Error('injectTabNavigation() was called from a component whose nearest navigator is not a Tab. ' +
8
+ 'Use injectNavigation() instead if this component can render under more than one navigator kind.');
9
+ }
10
+ return navigation;
11
+ }
@@ -0,0 +1,3 @@
1
+ import type { ILinkingConfig } from '../core';
2
+ import type { INavigatorHandle } from './stack';
3
+ export declare function injectLinkingIntegration(config: ILinkingConfig, navigatorHandle: INavigatorHandle): void;
@@ -0,0 +1,43 @@
1
+ // injectLinkingIntegration: wires the framework-agnostic linking config (../core's
2
+ // resolveRouteFromUrl) onto an existing Stack's INavigatorHandle. Deliberately NOT called from
3
+ // inside stack.ts - app code owns the wiring (call this from the component hosting `<Stack #nav>`,
4
+ // passing `nav` itself, since Stack now implements INavigatorHandle directly), the same
5
+ // top-level-prop shape @react-navigation keeps `linking` in on NavigationContainer rather than
6
+ // baking it into the router itself. Mirrors react/linking.ts's useLinkingIntegration; Angular
7
+ // needs none of its `configRef`/`handleRef` staleness workaround - this function runs its
8
+ // subscription ONCE per call (the natural `inject()` call-site convention), and Stack's methods
9
+ // already read live `this` state off the component instance, so there is no stale-closure risk to
10
+ // guard against here.
11
+ import { DestroyRef, inject } from '@angular/core';
12
+ import { Linking, dlog } from '@symbiote-native/engine';
13
+ import { resolveRouteFromUrl } from '../core/index.js';
14
+ export function injectLinkingIntegration(config, navigatorHandle) {
15
+ const destroyRef = inject(DestroyRef);
16
+ function applyRoute(url, dispatch) {
17
+ const route = resolveRouteFromUrl(config, url);
18
+ if (route === null) {
19
+ dlog(`injectLinkingIntegration: no route resolved for "${url}"`);
20
+ return;
21
+ }
22
+ dispatch(route.name, route.params);
23
+ }
24
+ let cancelled = false;
25
+ Linking.getInitialURL()
26
+ .then(url => {
27
+ if (cancelled || url === null)
28
+ return;
29
+ dlog(`injectLinkingIntegration: initial URL "${url}"`);
30
+ applyRoute(url, navigatorHandle.replace);
31
+ })
32
+ .catch((error) => {
33
+ dlog(`injectLinkingIntegration: getInitialURL failed: ${String(error)}`);
34
+ });
35
+ const subscription = Linking.addEventListener('url', (event) => {
36
+ dlog(`injectLinkingIntegration: url event "${event.url}"`);
37
+ applyRoute(event.url, navigatorHandle.push);
38
+ });
39
+ destroyRef.onDestroy(() => {
40
+ cancelled = true;
41
+ subscription.remove();
42
+ });
43
+ }
@@ -0,0 +1,13 @@
1
+ import { type Signal } from '@angular/core';
2
+ import type { INavigationEmitter, IRoute, IAnyNavigatorHandle } from '../core';
3
+ export type { IAnyNavigatorHandle } from '../core';
4
+ export declare class NavigationContextService {
5
+ private readonly ambientParent;
6
+ private readonly routeSignal;
7
+ readonly route: Signal<IRoute<unknown> | undefined>;
8
+ navigation: IAnyNavigatorHandle;
9
+ emitter: INavigationEmitter;
10
+ get parent(): NavigationContextService | undefined;
11
+ setRoute(route: IRoute<unknown>): void;
12
+ }
13
+ export declare function requireNavigationContext(injectorName: string): NavigationContextService;
@@ -0,0 +1,105 @@
1
+ // The lifecycle half of the framework-agnostic emitter (../core/navigation-events), Angular's
2
+ // twin of react/navigation-context.ts's NavigationContext. React re-scopes a plain Context per
3
+ // screen via NavigationContext.Provider; Angular's equivalent of "nearest-provider lookup" is
4
+ // hierarchical DI - NavigationScopeDirective (./navigation-scope.directive) re-`providers: [...]`
5
+ // a fresh NavigationContextService instance per route, and this service's own constructor injects
6
+ // its PARENT instance (`@Optional() @SkipSelf()`), which Angular resolves to the nearest ANCESTOR
7
+ // provider automatically - the exact `parent` linked list react/navigation-context.ts builds by
8
+ // hand via `ambientContext`. A screen nested inside e.g. a Stack-screen-renders-a-Tab composition
9
+ // reaches the enclosing Stack the same way a React screen does: one hop up `parent`.
10
+ //
11
+ // Every navigator kind a screen might be rendered under; consumers narrow the union themselves
12
+ // ('push' in handle picks out a Stack handle) - mirrors react/navigation-context.ts's
13
+ // IAnyNavigatorHandle exactly, minus the React-specific import cycle avoidance (Angular's `inject`
14
+ // resolves this service by TOKEN, so no circular value import exists here at all - only the
15
+ // type-only imports below, erased at compile time).
16
+ var __esDecorate = (this && this.__esDecorate) || function (ctor, descriptorIn, decorators, contextIn, initializers, extraInitializers) {
17
+ function accept(f) { if (f !== void 0 && typeof f !== "function") throw new TypeError("Function expected"); return f; }
18
+ var kind = contextIn.kind, key = kind === "getter" ? "get" : kind === "setter" ? "set" : "value";
19
+ var target = !descriptorIn && ctor ? contextIn["static"] ? ctor : ctor.prototype : null;
20
+ var descriptor = descriptorIn || (target ? Object.getOwnPropertyDescriptor(target, contextIn.name) : {});
21
+ var _, done = false;
22
+ for (var i = decorators.length - 1; i >= 0; i--) {
23
+ var context = {};
24
+ for (var p in contextIn) context[p] = p === "access" ? {} : contextIn[p];
25
+ for (var p in contextIn.access) context.access[p] = contextIn.access[p];
26
+ context.addInitializer = function (f) { if (done) throw new TypeError("Cannot add initializers after decoration has completed"); extraInitializers.push(accept(f || null)); };
27
+ var result = (0, decorators[i])(kind === "accessor" ? { get: descriptor.get, set: descriptor.set } : descriptor[key], context);
28
+ if (kind === "accessor") {
29
+ if (result === void 0) continue;
30
+ if (result === null || typeof result !== "object") throw new TypeError("Object expected");
31
+ if (_ = accept(result.get)) descriptor.get = _;
32
+ if (_ = accept(result.set)) descriptor.set = _;
33
+ if (_ = accept(result.init)) initializers.unshift(_);
34
+ }
35
+ else if (_ = accept(result)) {
36
+ if (kind === "field") initializers.unshift(_);
37
+ else descriptor[key] = _;
38
+ }
39
+ }
40
+ if (target) Object.defineProperty(target, contextIn.name, descriptor);
41
+ done = true;
42
+ };
43
+ var __runInitializers = (this && this.__runInitializers) || function (thisArg, initializers, value) {
44
+ var useValue = arguments.length > 2;
45
+ for (var i = 0; i < initializers.length; i++) {
46
+ value = useValue ? initializers[i].call(thisArg, value) : initializers[i].call(thisArg);
47
+ }
48
+ return useValue ? value : void 0;
49
+ };
50
+ import { Injectable, inject, signal } from '@angular/core';
51
+ // NOT `providedIn: 'root'` - deliberately component-scoped (see CLAUDE.md's design note for this
52
+ // package): every NavigationScopeDirective usage re-provides this token, so DI naturally mints one
53
+ // instance per route/screen, exactly like a fresh React Context value per screen.
54
+ let NavigationContextService = (() => {
55
+ let _classDecorators = [Injectable()];
56
+ let _classDescriptor;
57
+ let _classExtraInitializers = [];
58
+ let _classThis;
59
+ var NavigationContextService = class {
60
+ static { _classThis = this; }
61
+ static {
62
+ const _metadata = typeof Symbol === "function" && Symbol.metadata ? Object.create(null) : void 0;
63
+ __esDecorate(null, _classDescriptor = { value: _classThis }, _classDecorators, { kind: "class", name: _classThis.name, metadata: _metadata }, null, _classExtraInitializers);
64
+ NavigationContextService = _classThis = _classDescriptor.value;
65
+ if (_metadata) Object.defineProperty(_classThis, Symbol.metadata, { enumerable: true, configurable: true, writable: true, value: _metadata });
66
+ __runInitializers(_classThis, _classExtraInitializers);
67
+ }
68
+ ambientParent = inject(NavigationContextService, {
69
+ optional: true,
70
+ skipSelf: true,
71
+ });
72
+ // `route` is the one field that legitimately changes over a mounted screen's lifetime (a
73
+ // setParams call swaps in a new route OBJECT with the same key/name) while the screen itself
74
+ // stays mounted - a plain field would go stale the moment a consumer reads it once (e.g. in a
75
+ // constructor, the natural `inject()` call site). A signal lets `injectRoute()`
76
+ // (./injectors/inject-route) hand back a live, reactive value with zero per-consumer
77
+ // subscription plumbing, matching this
78
+ // package's zoneless/signals-first convention. `navigation`/`emitter` are stable for a screen's
79
+ // whole lifetime, so they stay plain fields - no reactivity needed there.
80
+ routeSignal = signal(undefined);
81
+ route = this.routeSignal.asReadonly();
82
+ navigation;
83
+ emitter;
84
+ get parent() {
85
+ return this.ambientParent ?? undefined;
86
+ }
87
+ setRoute(route) {
88
+ this.routeSignal.set(route);
89
+ }
90
+ };
91
+ return NavigationContextService = _classThis;
92
+ })();
93
+ export { NavigationContextService };
94
+ // Every injectX function (./injectors/*) opens with the same optional-inject-then-throw guard;
95
+ // this centralizes it so the "must be used within a screen rendered by..." message stays
96
+ // identical everywhere instead of six independently-typed copies. Must be called from an
97
+ // injection context, same requirement `inject()` itself has - every call site is the first line
98
+ // of an injectX function, which callers already only invoke from their own injection context.
99
+ export function requireNavigationContext(injectorName) {
100
+ const context = inject(NavigationContextService, { optional: true });
101
+ if (!context) {
102
+ throw new Error(`${injectorName} must be used within a screen rendered by <Stack>, <Tab>, or <Drawer>`);
103
+ }
104
+ return context;
105
+ }
@@ -0,0 +1,10 @@
1
+ import { type OnChanges } from '@angular/core';
2
+ import type { INavigationEmitter, IRoute } from '../core';
3
+ import { type IAnyNavigatorHandle } from './navigation-context.service';
4
+ export declare class NavigationScopeDirective implements OnChanges {
5
+ route: IRoute<unknown>;
6
+ navigation: IAnyNavigatorHandle;
7
+ emitter: INavigationEmitter;
8
+ private readonly context;
9
+ ngOnChanges(): void;
10
+ }