@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,133 @@
1
+ 'use client';
2
+
3
+ import { codegenNativeComponent } from 'react-native';
4
+ import type { CodegenTypes as CT, ViewProps, ColorValue } from 'react-native';
5
+
6
+ // eslint-disable-next-line @typescript-eslint/ban-types
7
+ type ScreenEvent = Readonly<{}>;
8
+
9
+ type ScreenDismissedEvent = Readonly<{
10
+ dismissCount: CT.Int32;
11
+ }>;
12
+
13
+ type TransitionProgressEvent = Readonly<{
14
+ progress: CT.Double;
15
+ closing: CT.Int32;
16
+ goingForward: CT.Int32;
17
+ }>;
18
+
19
+ type HeaderHeightChangeEvent = Readonly<{
20
+ headerHeight: CT.Double;
21
+ }>;
22
+
23
+ type SheetDetentChangedEvent = Readonly<{
24
+ index: CT.Int32;
25
+ isStable: boolean;
26
+ }>;
27
+
28
+ type GestureResponseDistanceType = Readonly<{
29
+ start: CT.Float;
30
+ end: CT.Float;
31
+ top: CT.Float;
32
+ bottom: CT.Float;
33
+ }>;
34
+
35
+ type StackPresentation =
36
+ | 'push'
37
+ | 'modal'
38
+ | 'transparentModal'
39
+ | 'fullScreenModal'
40
+ | 'formSheet'
41
+ | 'pageSheet'
42
+ | 'containedModal'
43
+ | 'containedTransparentModal';
44
+
45
+ type StackAnimation =
46
+ | 'default'
47
+ | 'flip'
48
+ | 'simple_push'
49
+ | 'none'
50
+ | 'fade'
51
+ | 'slide_from_right'
52
+ | 'slide_from_left'
53
+ | 'slide_from_bottom'
54
+ | 'fade_from_bottom'
55
+ | 'ios_from_right'
56
+ | 'ios_from_left';
57
+
58
+ type SwipeDirection = 'vertical' | 'horizontal';
59
+
60
+ type ReplaceAnimation = 'pop' | 'push';
61
+
62
+ type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
63
+
64
+ type OptionalBoolean = 'undefined' | 'false' | 'true';
65
+
66
+ export interface NativeProps extends ViewProps {
67
+ onAppear?: CT.DirectEventHandler<ScreenEvent> | undefined;
68
+ onDisappear?: CT.DirectEventHandler<ScreenEvent> | undefined;
69
+ onDismissed?: CT.DirectEventHandler<ScreenDismissedEvent> | undefined;
70
+ onNativeDismissCancelled?:
71
+ | CT.DirectEventHandler<ScreenDismissedEvent>
72
+ | undefined;
73
+ onWillAppear?: CT.DirectEventHandler<ScreenEvent> | undefined;
74
+ onWillDisappear?: CT.DirectEventHandler<ScreenEvent> | undefined;
75
+ onHeaderHeightChange?:
76
+ | CT.DirectEventHandler<HeaderHeightChangeEvent>
77
+ | undefined;
78
+ onTransitionProgress?:
79
+ | CT.DirectEventHandler<TransitionProgressEvent>
80
+ | undefined;
81
+ onGestureCancel?: CT.DirectEventHandler<ScreenEvent> | undefined;
82
+ onHeaderBackButtonClicked?: CT.DirectEventHandler<ScreenEvent> | undefined;
83
+ onSheetDetentChanged?:
84
+ | CT.DirectEventHandler<SheetDetentChangedEvent>
85
+ | undefined;
86
+ screenId?: CT.WithDefault<string, ''>;
87
+ sheetAllowedDetents?: number[] | undefined;
88
+ sheetLargestUndimmedDetent?: CT.WithDefault<CT.Int32, -1>;
89
+ sheetGrabberVisible?: CT.WithDefault<boolean, false>;
90
+ sheetCornerRadius?: CT.WithDefault<CT.Float, -1.0>;
91
+ sheetExpandsWhenScrolledToEdge?: CT.WithDefault<boolean, false>;
92
+ sheetInitialDetent?: CT.WithDefault<CT.Int32, 0>;
93
+ sheetElevation?: CT.WithDefault<CT.Int32, 24>;
94
+ sheetShouldOverflowTopInset?: CT.WithDefault<boolean, false>;
95
+ sheetDefaultResizeAnimationEnabled?: CT.WithDefault<boolean, true>;
96
+ customAnimationOnSwipe?: boolean | undefined;
97
+ fullScreenSwipeEnabled?: CT.WithDefault<OptionalBoolean, 'undefined'>;
98
+ fullScreenSwipeShadowEnabled?: CT.WithDefault<boolean, true>;
99
+ homeIndicatorHidden?: boolean | undefined;
100
+ preventNativeDismiss?: boolean | undefined;
101
+ gestureEnabled?: CT.WithDefault<boolean, true>;
102
+ statusBarColor?: ColorValue | undefined;
103
+ statusBarHidden?: boolean | undefined;
104
+ screenOrientation?: string | undefined;
105
+ statusBarAnimation?: string | undefined;
106
+ statusBarStyle?: string | undefined;
107
+ statusBarTranslucent?: boolean | undefined;
108
+ gestureResponseDistance?: GestureResponseDistanceType | undefined;
109
+ stackPresentation?: CT.WithDefault<StackPresentation, 'push'>;
110
+ stackAnimation?: CT.WithDefault<StackAnimation, 'default'>;
111
+ transitionDuration?: CT.WithDefault<CT.Int32, 500>;
112
+ replaceAnimation?: CT.WithDefault<ReplaceAnimation, 'pop'>;
113
+ swipeDirection?: CT.WithDefault<SwipeDirection, 'horizontal'>;
114
+ hideKeyboardOnSwipe?: boolean | undefined;
115
+ activityState?: CT.WithDefault<CT.Float, -1.0>;
116
+ navigationBarColor?: ColorValue | undefined;
117
+ navigationBarTranslucent?: boolean | undefined;
118
+ navigationBarHidden?: boolean | undefined;
119
+ nativeBackButtonDismissalEnabled?: boolean | undefined;
120
+ bottomScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
121
+ leftScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
122
+ rightScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
123
+ topScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
124
+ synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, true>;
125
+ androidResetScreenShadowStateOnOrientationChangeEnabled?: CT.WithDefault<
126
+ boolean,
127
+ true
128
+ >;
129
+ }
130
+
131
+ export default codegenNativeComponent<NativeProps>('RNSScreen', {
132
+ interfaceOnly: true,
133
+ });
@@ -0,0 +1,11 @@
1
+ 'use client';
2
+
3
+ import { codegenNativeComponent } from 'react-native';
4
+ import type { ViewProps } from 'react-native';
5
+
6
+ interface NativeProps extends ViewProps {}
7
+
8
+ export default codegenNativeComponent<NativeProps>(
9
+ 'RNSScreenNavigationContainer',
10
+ {},
11
+ );
@@ -0,0 +1,99 @@
1
+ 'use client';
2
+
3
+ import { codegenNativeComponent } from 'react-native';
4
+ import type { CodegenTypes as CT, ViewProps, ColorValue } from 'react-native';
5
+
6
+ type DirectionType = 'rtl' | 'ltr';
7
+
8
+ // eslint-disable-next-line @typescript-eslint/ban-types
9
+ type OnAttachedEvent = Readonly<{}>;
10
+ // eslint-disable-next-line @typescript-eslint/ban-types
11
+ type OnDetachedEvent = Readonly<{}>;
12
+
13
+ type OnPressHeaderBarButtonItemEvent = Readonly<{ buttonId: string }>;
14
+ type OnPressHeaderBarButtonMenuItemEvent = Readonly<{ menuId: string }>;
15
+
16
+ type BackButtonDisplayMode = 'minimal' | 'default' | 'generic';
17
+
18
+ type BlurEffect =
19
+ | 'none'
20
+ | 'extraLight'
21
+ | 'light'
22
+ | 'dark'
23
+ | 'regular'
24
+ | 'prominent'
25
+ | 'systemUltraThinMaterial'
26
+ | 'systemThinMaterial'
27
+ | 'systemMaterial'
28
+ | 'systemThickMaterial'
29
+ | 'systemChromeMaterial'
30
+ | 'systemUltraThinMaterialLight'
31
+ | 'systemThinMaterialLight'
32
+ | 'systemMaterialLight'
33
+ | 'systemThickMaterialLight'
34
+ | 'systemChromeMaterialLight'
35
+ | 'systemUltraThinMaterialDark'
36
+ | 'systemThinMaterialDark'
37
+ | 'systemMaterialDark'
38
+ | 'systemThickMaterialDark'
39
+ | 'systemChromeMaterialDark';
40
+
41
+ type UserInterfaceStyle = 'unspecified' | 'light' | 'dark';
42
+
43
+ export interface NativeProps extends ViewProps {
44
+ onAttached?: CT.DirectEventHandler<OnAttachedEvent> | undefined;
45
+ onDetached?: CT.DirectEventHandler<OnDetachedEvent> | undefined;
46
+ backgroundColor?: ColorValue | undefined;
47
+ backTitle?: string | undefined;
48
+ backTitleFontFamily?: string | undefined;
49
+ backTitleFontSize?: CT.Int32 | undefined;
50
+ backTitleVisible?: CT.WithDefault<boolean, 'true'>;
51
+ color?: ColorValue | undefined;
52
+ direction?: CT.WithDefault<DirectionType, 'ltr'>;
53
+ hidden?: boolean | undefined;
54
+ hideShadow?: boolean | undefined;
55
+ largeTitle?: boolean | undefined;
56
+ largeTitleFontFamily?: string | undefined;
57
+ largeTitleFontSize?: CT.Int32 | undefined;
58
+ largeTitleFontWeight?: string | undefined;
59
+ largeTitleBackgroundColor?: ColorValue | undefined;
60
+ largeTitleHideShadow?: boolean | undefined;
61
+ largeTitleColor?: ColorValue | undefined;
62
+ translucent?: boolean | undefined;
63
+ title?: string | undefined;
64
+ titleFontFamily?: string | undefined;
65
+ titleFontSize?: CT.Int32 | undefined;
66
+ titleFontWeight?: string | undefined;
67
+ titleColor?: ColorValue | undefined;
68
+ disableBackButtonMenu?: boolean | undefined;
69
+ backButtonDisplayMode?: CT.WithDefault<BackButtonDisplayMode, 'default'>;
70
+ hideBackButton?: boolean | undefined;
71
+ backButtonInCustomView?: boolean | undefined;
72
+ blurEffect?: CT.WithDefault<BlurEffect, 'none'>;
73
+ // TODO: implement this props on iOS
74
+ topInsetEnabled?: boolean | undefined;
75
+ headerLeftBarButtonItems?: CT.UnsafeMixed[] | undefined;
76
+ headerRightBarButtonItems?: CT.UnsafeMixed[] | undefined;
77
+ onPressHeaderBarButtonItem?:
78
+ | CT.DirectEventHandler<OnPressHeaderBarButtonItemEvent>
79
+ | undefined;
80
+ onPressHeaderBarButtonMenuItem?:
81
+ | CT.DirectEventHandler<OnPressHeaderBarButtonMenuItemEvent>
82
+ | undefined;
83
+ synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, true>;
84
+
85
+ // Experimental
86
+ userInterfaceStyle?: CT.WithDefault<UserInterfaceStyle, 'unspecified'>;
87
+ consumeTopInset?: boolean | undefined;
88
+ consumeLeftInset?: boolean | undefined;
89
+ consumeRightInset?: boolean | undefined;
90
+ consumeBottomInset?: boolean | undefined;
91
+ legacyTopInsetBehavior?: boolean | undefined;
92
+ }
93
+
94
+ export default codegenNativeComponent<NativeProps>(
95
+ 'RNSScreenStackHeaderConfig',
96
+ {
97
+ interfaceOnly: true,
98
+ },
99
+ );
@@ -0,0 +1,25 @@
1
+ 'use client';
2
+
3
+ import { codegenNativeComponent } from 'react-native';
4
+ import type { CodegenTypes as CT, ViewProps } from 'react-native';
5
+
6
+ export type HeaderSubviewTypes =
7
+ | 'back'
8
+ | 'right'
9
+ | 'left'
10
+ | 'title'
11
+ | 'center'
12
+ | 'searchBar';
13
+
14
+ export interface NativeProps extends ViewProps {
15
+ type?: CT.WithDefault<HeaderSubviewTypes, 'left'>;
16
+ hidesSharedBackground?: boolean | undefined;
17
+ synchronousShadowStateUpdatesEnabled?: CT.WithDefault<boolean, true>;
18
+ }
19
+
20
+ export default codegenNativeComponent<NativeProps>(
21
+ 'RNSScreenStackHeaderSubview',
22
+ {
23
+ interfaceOnly: true,
24
+ },
25
+ );
@@ -0,0 +1,17 @@
1
+ 'use client';
2
+
3
+ import { codegenNativeComponent } from 'react-native';
4
+ import type { CodegenTypes as CT, ViewProps, ColorValue } from 'react-native';
5
+
6
+ // eslint-disable-next-line @typescript-eslint/ban-types
7
+ type FinishTransitioningEvent = Readonly<{}>;
8
+
9
+ export interface NativeProps extends ViewProps {
10
+ nativeContainerBackgroundColor?: ColorValue | undefined;
11
+
12
+ onFinishTransitioning?:
13
+ | CT.DirectEventHandler<FinishTransitioningEvent>
14
+ | undefined;
15
+ }
16
+
17
+ export default codegenNativeComponent<NativeProps>('RNSScreenStack', {});
@@ -0,0 +1,101 @@
1
+ 'use client';
2
+
3
+ import { codegenNativeCommands, codegenNativeComponent } from 'react-native';
4
+ import type {
5
+ CodegenTypes as CT,
6
+ ViewProps,
7
+ ColorValue,
8
+ HostComponent,
9
+ } from 'react-native';
10
+
11
+ // eslint-disable-next-line @typescript-eslint/ban-types
12
+ export type SearchBarEvent = Readonly<{}>;
13
+
14
+ export type SearchButtonPressedEvent = Readonly<{
15
+ text?: string | undefined;
16
+ }>;
17
+
18
+ export type ChangeTextEvent = Readonly<{
19
+ text?: string | undefined;
20
+ }>;
21
+
22
+ type SearchBarPlacement =
23
+ | 'automatic'
24
+ | 'inline' // deprecated starting from iOS 26
25
+ | 'stacked'
26
+ | 'integrated'
27
+ | 'integratedButton'
28
+ | 'integratedCentered';
29
+
30
+ type AutoCapitalizeType =
31
+ | 'systemDefault'
32
+ | 'none'
33
+ | 'words'
34
+ | 'sentences'
35
+ | 'characters';
36
+
37
+ type OptionalBoolean = 'undefined' | 'false' | 'true';
38
+
39
+ export interface NativeProps extends ViewProps {
40
+ onSearchFocus?: CT.DirectEventHandler<SearchBarEvent> | null | undefined;
41
+ onSearchBlur?: CT.DirectEventHandler<SearchBarEvent> | null | undefined;
42
+ onSearchButtonPress?:
43
+ | CT.DirectEventHandler<SearchButtonPressedEvent>
44
+ | null
45
+ | undefined;
46
+ onCancelButtonPress?:
47
+ | CT.DirectEventHandler<SearchBarEvent>
48
+ | null
49
+ | undefined;
50
+ onChangeText?: CT.DirectEventHandler<ChangeTextEvent> | null | undefined;
51
+ hideWhenScrolling?: CT.WithDefault<boolean, true>;
52
+ autoCapitalize?: CT.WithDefault<AutoCapitalizeType, 'systemDefault'>;
53
+ placeholder?: string | undefined;
54
+ placement?: CT.WithDefault<SearchBarPlacement, 'automatic'>;
55
+ allowToolbarIntegration?: CT.WithDefault<boolean, true>;
56
+ obscureBackground?: CT.WithDefault<OptionalBoolean, 'undefined'>;
57
+ hideNavigationBar?: CT.WithDefault<OptionalBoolean, 'undefined'>;
58
+ cancelButtonText?: string | undefined;
59
+ // TODO: implement these on iOS
60
+ barTintColor?: ColorValue | undefined;
61
+ tintColor?: ColorValue | undefined;
62
+ textColor?: ColorValue | undefined;
63
+
64
+ // Android only
65
+ autoFocus?: CT.WithDefault<boolean, false>;
66
+ disableBackButtonOverride?: boolean | undefined;
67
+ // TODO: consider creating enum here
68
+ inputType?: string | undefined;
69
+ onClose?: CT.DirectEventHandler<SearchBarEvent> | null | undefined;
70
+ onOpen?: CT.DirectEventHandler<SearchBarEvent> | null | undefined;
71
+ hintTextColor?: ColorValue | undefined;
72
+ headerIconColor?: ColorValue | undefined;
73
+ shouldShowHintSearchIcon?: CT.WithDefault<boolean, true>;
74
+ }
75
+
76
+ type ComponentType = HostComponent<NativeProps>;
77
+
78
+ interface NativeCommands {
79
+ blur: (viewRef: React.ElementRef<ComponentType>) => void;
80
+ focus: (viewRef: React.ElementRef<ComponentType>) => void;
81
+ clearText: (viewRef: React.ElementRef<ComponentType>) => void;
82
+ toggleCancelButton: (
83
+ viewRef: React.ElementRef<ComponentType>,
84
+ flag: boolean,
85
+ ) => void;
86
+ setText: (viewRef: React.ElementRef<ComponentType>, text: string) => void;
87
+ cancelSearch: (viewRef: React.ElementRef<ComponentType>) => void;
88
+ }
89
+
90
+ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
91
+ supportedCommands: [
92
+ 'blur',
93
+ 'focus',
94
+ 'clearText',
95
+ 'toggleCancelButton',
96
+ 'setText',
97
+ 'cancelSearch',
98
+ ],
99
+ });
100
+
101
+ export default codegenNativeComponent<NativeProps>('RNSSearchBar', {});
@@ -0,0 +1,6 @@
1
+ // copied from https://github.com/software-mansion/react-native-svg/blob/be06e84ec4809a8071f18f9824ffbe61424ee80d/src/fabric/codegenUtils.ts
2
+
3
+ // codegen will generate folly::dynamic in place of this type, but it's not exported by RN
4
+ // since codegen doesn't really follow imports, this way we can trick it into generating the correct type
5
+ // while keeping typescript happy
6
+ export type UnsafeMixed<T> = T;
@@ -0,0 +1,15 @@
1
+ 'use client';
2
+
3
+ import type { CodegenTypes as CT, ViewProps } from 'react-native';
4
+ import { codegenNativeComponent } from 'react-native';
5
+
6
+ type ScrollEdgeEffect = 'automatic' | 'hard' | 'soft' | 'hidden';
7
+
8
+ interface NativeProps extends ViewProps {
9
+ leftScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
10
+ topScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
11
+ rightScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
12
+ bottomScrollEdgeEffect?: CT.WithDefault<ScrollEdgeEffect, 'automatic'>;
13
+ }
14
+
15
+ export default codegenNativeComponent<NativeProps>('RNSScrollViewMarker');
@@ -0,0 +1,10 @@
1
+ 'use client';
2
+
3
+ import type { ViewProps } from 'react-native';
4
+ import { codegenNativeComponent } from 'react-native';
5
+
6
+ interface NativeProps extends ViewProps {}
7
+
8
+ export default codegenNativeComponent<NativeProps>(
9
+ 'RNSFormSheetContentWrapper',
10
+ );
@@ -0,0 +1,47 @@
1
+ 'use client';
2
+
3
+ import type { CodegenTypes as CT, ColorValue, ViewProps } from 'react-native';
4
+ import { codegenNativeComponent } from 'react-native';
5
+
6
+ // eslint-disable-next-line @typescript-eslint/ban-types
7
+ type GenericEmptyEvent = Readonly<{}>;
8
+
9
+ type DetentChangedEvent = Readonly<{
10
+ index: CT.Int32;
11
+ }>;
12
+
13
+ interface NativeProps extends ViewProps {
14
+ // General
15
+ isOpen?: CT.WithDefault<boolean, false>;
16
+ detents?: CT.Double[] | undefined;
17
+ prefersGrabberVisible?: CT.WithDefault<boolean, false>;
18
+ preferredCornerRadius?: CT.WithDefault<CT.Float, -1.0>;
19
+ largestUndimmedDetentIndex?: CT.WithDefault<CT.Int32, -1>;
20
+ initialDetentIndex?: CT.WithDefault<CT.Int32, 0>;
21
+ prefersScrollingExpandsWhenScrolledToEdge?: CT.WithDefault<boolean, true>;
22
+ preventNativeDismiss?: CT.WithDefault<boolean, false>;
23
+ nativeContainerBackgroundColor?: ColorValue | undefined;
24
+ // Events
25
+ onWillAppear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
26
+ onDidAppear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
27
+ onWillDisappear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
28
+ onDidDisappear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
29
+ onDismiss?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
30
+ onNativeDismiss?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
31
+ onNativeDismissPrevented?:
32
+ | CT.DirectEventHandler<GenericEmptyEvent>
33
+ | undefined;
34
+ onDetentChanged?: CT.DirectEventHandler<DetentChangedEvent> | undefined;
35
+
36
+ // Workaround helper that triggers a synchronous event to flush a pending
37
+ // shadow-node state update in the current event beat. Mirrors iOS's
38
+ // `EventQueue::UpdateMode::unstable_Immediate`, which Android does not expose
39
+ // to Java/Kotlin as of now.
40
+ // TODO: Remove when a synchronous state update API is exposed on Android.
41
+ // https://github.com/facebook/react-native/pull/56311
42
+ onSyncFlush?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
43
+ }
44
+
45
+ export default codegenNativeComponent<NativeProps>('RNSFormSheetHost', {
46
+ interfaceOnly: true,
47
+ });
@@ -0,0 +1,124 @@
1
+ 'use client';
2
+
3
+ import type {
4
+ CodegenTypes as CT,
5
+ ViewProps,
6
+ HostComponent,
7
+ } from 'react-native';
8
+ import { codegenNativeCommands, codegenNativeComponent } from 'react-native';
9
+
10
+ // eslint-disable-next-line @typescript-eslint/ban-types
11
+ type GenericEmptyEvent = Readonly<{}>;
12
+
13
+ type DisplayModeWillChangeEvent = {
14
+ currentDisplayMode: string;
15
+ nextDisplayMode: string;
16
+ };
17
+
18
+ type SplitViewDisplayModeButtonVisibility = 'always' | 'automatic' | 'never';
19
+
20
+ type SplitViewSplitBehavior = 'automatic' | 'displace' | 'overlay' | 'tile';
21
+
22
+ type SplitViewPrimaryEdge = 'leading' | 'trailing';
23
+
24
+ type SplitViewDisplayMode =
25
+ | 'automatic'
26
+ | 'secondaryOnly'
27
+ | 'oneBesideSecondary'
28
+ | 'oneOverSecondary'
29
+ | 'twoBesideSecondary'
30
+ | 'twoOverSecondary'
31
+ | 'twoDisplaceSecondary';
32
+
33
+ type SplitViewOrientation =
34
+ | 'inherit'
35
+ | 'all'
36
+ | 'allButUpsideDown'
37
+ | 'portrait'
38
+ | 'portraitUp'
39
+ | 'portraitDown'
40
+ | 'landscape'
41
+ | 'landscapeLeft'
42
+ | 'landscapeRight';
43
+
44
+ type SplitViewColorScheme = 'inherit' | 'light' | 'dark';
45
+
46
+ type SplitViewPrimaryBackgroundStyle = 'default' | 'none' | 'sidebar';
47
+
48
+ type SplitViewTopColumnForCollapsing =
49
+ | 'default'
50
+ | 'primary'
51
+ | 'supplementary'
52
+ | 'secondary';
53
+
54
+ interface ColumnMetrics {
55
+ minimumPrimaryColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
56
+ maximumPrimaryColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
57
+ preferredPrimaryColumnWidthOrFraction?: CT.WithDefault<CT.Float, -1.0>;
58
+ minimumSupplementaryColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
59
+ maximumSupplementaryColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
60
+ preferredSupplementaryColumnWidthOrFraction?: CT.WithDefault<CT.Float, -1.0>;
61
+
62
+ // iOS 26 only
63
+ minimumSecondaryColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
64
+ preferredSecondaryColumnWidthOrFraction?: CT.WithDefault<CT.Float, -1.0>;
65
+ minimumInspectorColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
66
+ maximumInspectorColumnWidth?: CT.WithDefault<CT.Float, -1.0>;
67
+ preferredInspectorColumnWidthOrFraction?: CT.WithDefault<CT.Float, -1.0>;
68
+ }
69
+
70
+ interface NativeProps extends ViewProps {
71
+ // Appearance
72
+
73
+ preferredDisplayMode?: CT.WithDefault<SplitViewDisplayMode, 'automatic'>;
74
+ preferredSplitBehavior?: CT.WithDefault<SplitViewSplitBehavior, 'automatic'>;
75
+ primaryEdge?: CT.WithDefault<SplitViewPrimaryEdge, 'leading'>;
76
+ showSecondaryToggleButton?: CT.WithDefault<boolean, false>;
77
+ displayModeButtonVisibility?: CT.WithDefault<
78
+ SplitViewDisplayModeButtonVisibility,
79
+ 'automatic'
80
+ >;
81
+ columnMetrics?: ColumnMetrics | undefined;
82
+ orientation?: CT.WithDefault<SplitViewOrientation, 'inherit'>;
83
+ colorScheme?: CT.WithDefault<SplitViewColorScheme, 'inherit'>;
84
+ primaryBackgroundStyle?: CT.WithDefault<
85
+ SplitViewPrimaryBackgroundStyle,
86
+ 'default'
87
+ >;
88
+
89
+ // Behavior
90
+
91
+ topColumnForCollapsing?: CT.WithDefault<
92
+ SplitViewTopColumnForCollapsing,
93
+ 'default'
94
+ >;
95
+
96
+ // Interactions
97
+
98
+ presentsWithGesture?: CT.WithDefault<boolean, true>;
99
+ showInspector?: CT.WithDefault<boolean, false>;
100
+
101
+ // Custom events
102
+
103
+ onCollapse?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
104
+ onDisplayModeWillChange?:
105
+ | CT.DirectEventHandler<DisplayModeWillChangeEvent>
106
+ | undefined;
107
+ onExpand?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
108
+ onInspectorHide?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
109
+ }
110
+
111
+ type ComponentType = HostComponent<NativeProps>;
112
+
113
+ interface NativeCommands {
114
+ showColumn: (
115
+ viewRef: React.ElementRef<ComponentType>,
116
+ column: string,
117
+ ) => void;
118
+ }
119
+
120
+ export const Commands: NativeCommands = codegenNativeCommands<NativeCommands>({
121
+ supportedCommands: ['showColumn'],
122
+ });
123
+
124
+ export default codegenNativeComponent<NativeProps>('RNSSplitHost', {});
@@ -0,0 +1,24 @@
1
+ 'use client';
2
+
3
+ import type { CodegenTypes as CT, ViewProps } from 'react-native';
4
+ import { codegenNativeComponent } from 'react-native';
5
+
6
+ // eslint-disable-next-line @typescript-eslint/ban-types
7
+ type GenericEmptyEvent = Readonly<{}>;
8
+
9
+ type SplitScreenColumnType = 'column' | 'inspector';
10
+
11
+ interface NativeProps extends ViewProps {
12
+ // Config
13
+ columnType?: CT.WithDefault<SplitScreenColumnType, 'column'>;
14
+
15
+ // Events
16
+ onWillAppear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
17
+ onDidAppear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
18
+ onWillDisappear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
19
+ onDidDisappear?: CT.DirectEventHandler<GenericEmptyEvent> | undefined;
20
+ }
21
+
22
+ export default codegenNativeComponent<NativeProps>('RNSSplitScreen', {
23
+ interfaceOnly: true,
24
+ });