@ohos-ports/react-native-navigation 8.9.0-beta.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 (597) hide show
  1. package/LICENSE +21 -0
  2. package/README.md +37 -0
  3. package/lib/android/app/src/main/java/com/reactnativenavigation/viewcontrollers/statusbar/StatusBarPresenter.kt +212 -0
  4. package/lib/module/ARCHITECTURE.md +331 -0
  5. package/lib/module/Mock/Application.js +33 -0
  6. package/lib/module/Mock/Application.js.map +1 -0
  7. package/lib/module/Mock/ComponentProps.js +4 -0
  8. package/lib/module/Mock/ComponentProps.js.map +1 -0
  9. package/lib/module/Mock/Components/BottomTabs.js +16 -0
  10. package/lib/module/Mock/Components/BottomTabs.js.map +1 -0
  11. package/lib/module/Mock/Components/ComponentScreen.js +101 -0
  12. package/lib/module/Mock/Components/ComponentScreen.js.map +1 -0
  13. package/lib/module/Mock/Components/LayoutComponent.js +50 -0
  14. package/lib/module/Mock/Components/LayoutComponent.js.map +1 -0
  15. package/lib/module/Mock/Components/Modals.js +22 -0
  16. package/lib/module/Mock/Components/Modals.js.map +1 -0
  17. package/lib/module/Mock/Components/NavigationButton.js +72 -0
  18. package/lib/module/Mock/Components/NavigationButton.js.map +1 -0
  19. package/lib/module/Mock/Components/Overlays.js +23 -0
  20. package/lib/module/Mock/Components/Overlays.js.map +1 -0
  21. package/lib/module/Mock/Components/SideMenu.js +29 -0
  22. package/lib/module/Mock/Components/SideMenu.js.map +1 -0
  23. package/lib/module/Mock/Components/Stack.js +18 -0
  24. package/lib/module/Mock/Components/Stack.js.map +1 -0
  25. package/lib/module/Mock/Components/TopBar.js +81 -0
  26. package/lib/module/Mock/Components/TopBar.js.map +1 -0
  27. package/lib/module/Mock/Layouts/BottomTabsNode.js +30 -0
  28. package/lib/module/Mock/Layouts/BottomTabsNode.js.map +1 -0
  29. package/lib/module/Mock/Layouts/ComponentNode.js +102 -0
  30. package/lib/module/Mock/Layouts/ComponentNode.js.map +1 -0
  31. package/lib/module/Mock/Layouts/LayoutNodeFactory.js +28 -0
  32. package/lib/module/Mock/Layouts/LayoutNodeFactory.js.map +1 -0
  33. package/lib/module/Mock/Layouts/Node.js +14 -0
  34. package/lib/module/Mock/Layouts/Node.js.map +1 -0
  35. package/lib/module/Mock/Layouts/ParentNode.js +66 -0
  36. package/lib/module/Mock/Layouts/ParentNode.js.map +1 -0
  37. package/lib/module/Mock/Layouts/SideMenu.js +72 -0
  38. package/lib/module/Mock/Layouts/SideMenu.js.map +1 -0
  39. package/lib/module/Mock/Layouts/StackNode.js +12 -0
  40. package/lib/module/Mock/Layouts/StackNode.js.map +1 -0
  41. package/lib/module/Mock/Stores/EventsStore.js +53 -0
  42. package/lib/module/Mock/Stores/EventsStore.js.map +1 -0
  43. package/lib/module/Mock/Stores/LayoutStore.js +176 -0
  44. package/lib/module/Mock/Stores/LayoutStore.js.map +1 -0
  45. package/lib/module/Mock/actions/layoutActions.js +19 -0
  46. package/lib/module/Mock/actions/layoutActions.js.map +1 -0
  47. package/lib/module/Mock/connect.js +8 -0
  48. package/lib/module/Mock/connect.js.map +1 -0
  49. package/lib/module/Mock/constants.js +5 -0
  50. package/lib/module/Mock/constants.js.map +1 -0
  51. package/lib/module/Mock/index.js +20 -0
  52. package/lib/module/Mock/index.js.map +1 -0
  53. package/lib/module/Mock/mocks/AppRegistryService.js +6 -0
  54. package/lib/module/Mock/mocks/AppRegistryService.js.map +1 -0
  55. package/lib/module/Mock/mocks/NativeCommandsSender.js +146 -0
  56. package/lib/module/Mock/mocks/NativeCommandsSender.js.map +1 -0
  57. package/lib/module/Mock/mocks/NativeEventsReceiver.js +103 -0
  58. package/lib/module/Mock/mocks/NativeEventsReceiver.js.map +1 -0
  59. package/lib/module/Navigation.js +250 -0
  60. package/lib/module/Navigation.js.map +1 -0
  61. package/lib/module/NavigationDelegate.js +210 -0
  62. package/lib/module/NavigationDelegate.js.map +1 -0
  63. package/lib/module/adapters/AndroidCustomRowForwarder.js +75 -0
  64. package/lib/module/adapters/AndroidCustomRowForwarder.js.map +1 -0
  65. package/lib/module/adapters/AppRegistryService.js +9 -0
  66. package/lib/module/adapters/AppRegistryService.js.map +1 -0
  67. package/lib/module/adapters/AssetResolver.js +9 -0
  68. package/lib/module/adapters/AssetResolver.js.map +1 -0
  69. package/lib/module/adapters/ColorService.js +9 -0
  70. package/lib/module/adapters/ColorService.js.map +1 -0
  71. package/lib/module/adapters/Constants.js +19 -0
  72. package/lib/module/adapters/Constants.js.map +1 -0
  73. package/lib/module/adapters/NativeCommandsSender.js +60 -0
  74. package/lib/module/adapters/NativeCommandsSender.js.map +1 -0
  75. package/lib/module/adapters/NativeEventsReceiver.js +65 -0
  76. package/lib/module/adapters/NativeEventsReceiver.js.map +1 -0
  77. package/lib/module/adapters/NativeEventsReceiver.mock.js +6 -0
  78. package/lib/module/adapters/NativeEventsReceiver.mock.js.map +1 -0
  79. package/lib/module/adapters/NativeRNNTurboEventEmitter.js +7 -0
  80. package/lib/module/adapters/NativeRNNTurboEventEmitter.js.map +1 -0
  81. package/lib/module/adapters/NativeRNNTurboModule.js +6 -0
  82. package/lib/module/adapters/NativeRNNTurboModule.js.map +1 -0
  83. package/lib/module/adapters/TouchablePreview.js +115 -0
  84. package/lib/module/adapters/TouchablePreview.js.map +1 -0
  85. package/lib/module/adapters/UniqueIdProvider.js +9 -0
  86. package/lib/module/adapters/UniqueIdProvider.js.map +1 -0
  87. package/lib/module/commands/Commands.js +241 -0
  88. package/lib/module/commands/Commands.js.map +1 -0
  89. package/lib/module/commands/Commands.test.js +759 -0
  90. package/lib/module/commands/Commands.test.js.map +1 -0
  91. package/lib/module/commands/Deprecations.js +66 -0
  92. package/lib/module/commands/Deprecations.js.map +1 -0
  93. package/lib/module/commands/LayoutTreeCrawler.js +32 -0
  94. package/lib/module/commands/LayoutTreeCrawler.js.map +1 -0
  95. package/lib/module/commands/LayoutTreeCrawler.test.js +82 -0
  96. package/lib/module/commands/LayoutTreeCrawler.test.js.map +1 -0
  97. package/lib/module/commands/LayoutTreeParser.js +130 -0
  98. package/lib/module/commands/LayoutTreeParser.js.map +1 -0
  99. package/lib/module/commands/LayoutTreeParser.test.js +359 -0
  100. package/lib/module/commands/LayoutTreeParser.test.js.map +1 -0
  101. package/lib/module/commands/LayoutType.js +16 -0
  102. package/lib/module/commands/LayoutType.js.map +1 -0
  103. package/lib/module/commands/LayoutType.test.js +12 -0
  104. package/lib/module/commands/LayoutType.test.js.map +1 -0
  105. package/lib/module/commands/OptionsCrawler.js +72 -0
  106. package/lib/module/commands/OptionsCrawler.js.map +1 -0
  107. package/lib/module/commands/OptionsCrawler.test.js +351 -0
  108. package/lib/module/commands/OptionsCrawler.test.js.map +1 -0
  109. package/lib/module/commands/OptionsProcessor.js +300 -0
  110. package/lib/module/commands/OptionsProcessor.js.map +1 -0
  111. package/lib/module/commands/OptionsProcessor.test.js +1234 -0
  112. package/lib/module/commands/OptionsProcessor.test.js.map +1 -0
  113. package/lib/module/components/ComponentRegistry.js +25 -0
  114. package/lib/module/components/ComponentRegistry.js.map +1 -0
  115. package/lib/module/components/ComponentRegistry.test.js +57 -0
  116. package/lib/module/components/ComponentRegistry.test.js.map +1 -0
  117. package/lib/module/components/ComponentWrapper.js +80 -0
  118. package/lib/module/components/ComponentWrapper.js.map +1 -0
  119. package/lib/module/components/ComponentWrapper.test.js +333 -0
  120. package/lib/module/components/ComponentWrapper.test.js.map +1 -0
  121. package/lib/module/components/Modal.js +125 -0
  122. package/lib/module/components/Modal.js.map +1 -0
  123. package/lib/module/components/Store.js +71 -0
  124. package/lib/module/components/Store.js.map +1 -0
  125. package/lib/module/components/Store.test.js +148 -0
  126. package/lib/module/components/Store.test.js.map +1 -0
  127. package/lib/module/events/CommandsObserver.js +19 -0
  128. package/lib/module/events/CommandsObserver.js.map +1 -0
  129. package/lib/module/events/CommandsObserver.test.js +43 -0
  130. package/lib/module/events/CommandsObserver.test.js.map +1 -0
  131. package/lib/module/events/ComponentEventsObserver.js +94 -0
  132. package/lib/module/events/ComponentEventsObserver.js.map +1 -0
  133. package/lib/module/events/ComponentEventsObserver.test.js +391 -0
  134. package/lib/module/events/ComponentEventsObserver.test.js.map +1 -0
  135. package/lib/module/events/EventsRegistry.js +64 -0
  136. package/lib/module/events/EventsRegistry.js.map +1 -0
  137. package/lib/module/events/EventsRegistry.test.js +131 -0
  138. package/lib/module/events/EventsRegistry.test.js.map +1 -0
  139. package/lib/module/index.js +22 -0
  140. package/lib/module/index.js.map +1 -0
  141. package/lib/module/interfaces/CommandName.js +22 -0
  142. package/lib/module/interfaces/CommandName.js.map +1 -0
  143. package/lib/module/interfaces/ComponentEvents.js +2 -0
  144. package/lib/module/interfaces/ComponentEvents.js.map +1 -0
  145. package/lib/module/interfaces/EventSubscription.js +2 -0
  146. package/lib/module/interfaces/EventSubscription.js.map +1 -0
  147. package/lib/module/interfaces/Events.js +2 -0
  148. package/lib/module/interfaces/Events.js.map +1 -0
  149. package/lib/module/interfaces/Layout.js +4 -0
  150. package/lib/module/interfaces/Layout.js.map +1 -0
  151. package/lib/module/interfaces/NavigationComponent.js +21 -0
  152. package/lib/module/interfaces/NavigationComponent.js.map +1 -0
  153. package/lib/module/interfaces/NavigationComponentListener.js +4 -0
  154. package/lib/module/interfaces/NavigationComponentListener.js.map +1 -0
  155. package/lib/module/interfaces/NavigationComponentProps.js +2 -0
  156. package/lib/module/interfaces/NavigationComponentProps.js.map +1 -0
  157. package/lib/module/interfaces/NavigationFunctionComponent.js +4 -0
  158. package/lib/module/interfaces/NavigationFunctionComponent.js.map +1 -0
  159. package/lib/module/interfaces/Options.js +47 -0
  160. package/lib/module/interfaces/Options.js.map +1 -0
  161. package/lib/module/interfaces/ProcessorSubscription.js +2 -0
  162. package/lib/module/interfaces/ProcessorSubscription.js.map +1 -0
  163. package/lib/module/interfaces/Processors.js +4 -0
  164. package/lib/module/interfaces/Processors.js.map +1 -0
  165. package/lib/module/linking/DeferredLinkQueue.js +52 -0
  166. package/lib/module/linking/DeferredLinkQueue.js.map +1 -0
  167. package/lib/module/linking/DeferredLinkQueue.test.js +54 -0
  168. package/lib/module/linking/DeferredLinkQueue.test.js.map +1 -0
  169. package/lib/module/linking/LinkingHandler.js +139 -0
  170. package/lib/module/linking/LinkingHandler.js.map +1 -0
  171. package/lib/module/linking/LinkingHandler.test.js +384 -0
  172. package/lib/module/linking/LinkingHandler.test.js.map +1 -0
  173. package/lib/module/linking/ModalLayoutBuilder.js +56 -0
  174. package/lib/module/linking/ModalLayoutBuilder.js.map +1 -0
  175. package/lib/module/linking/ModalLayoutBuilder.test.js +154 -0
  176. package/lib/module/linking/ModalLayoutBuilder.test.js.map +1 -0
  177. package/lib/module/linking/RouteMatcher.js +104 -0
  178. package/lib/module/linking/RouteMatcher.js.map +1 -0
  179. package/lib/module/linking/RouteMatcher.test.js +164 -0
  180. package/lib/module/linking/RouteMatcher.test.js.map +1 -0
  181. package/lib/module/linking/URLParser.js +56 -0
  182. package/lib/module/linking/URLParser.js.map +1 -0
  183. package/lib/module/linking/URLParser.test.js +100 -0
  184. package/lib/module/linking/URLParser.test.js.map +1 -0
  185. package/lib/module/linking/types.js +4 -0
  186. package/lib/module/linking/types.js.map +1 -0
  187. package/lib/module/package.json +1 -0
  188. package/lib/module/processors/LayoutProcessor.js +15 -0
  189. package/lib/module/processors/LayoutProcessor.js.map +1 -0
  190. package/lib/module/processors/LayoutProcessor.test.js +53 -0
  191. package/lib/module/processors/LayoutProcessor.test.js.map +1 -0
  192. package/lib/module/processors/LayoutProcessorsStore.js +18 -0
  193. package/lib/module/processors/LayoutProcessorsStore.js.map +1 -0
  194. package/lib/module/processors/LayoutProcessorsStore.test.js +31 -0
  195. package/lib/module/processors/LayoutProcessorsStore.test.js.map +1 -0
  196. package/lib/module/processors/OptionProcessorsStore.js +19 -0
  197. package/lib/module/processors/OptionProcessorsStore.js.map +1 -0
  198. package/lib/module/processors/OptionProcessorsStore.test.js +31 -0
  199. package/lib/module/processors/OptionProcessorsStore.test.js.map +1 -0
  200. package/lib/module/types.js +2 -0
  201. package/lib/module/types.js.map +1 -0
  202. package/lib/typescript/Mock/Application.d.ts +30 -0
  203. package/lib/typescript/Mock/Application.d.ts.map +1 -0
  204. package/lib/typescript/Mock/ComponentProps.d.ts +6 -0
  205. package/lib/typescript/Mock/ComponentProps.d.ts.map +1 -0
  206. package/lib/typescript/Mock/Components/BottomTabs.d.ts +47 -0
  207. package/lib/typescript/Mock/Components/BottomTabs.d.ts.map +1 -0
  208. package/lib/typescript/Mock/Components/ComponentScreen.d.ts +29 -0
  209. package/lib/typescript/Mock/Components/ComponentScreen.d.ts.map +1 -0
  210. package/lib/typescript/Mock/Components/LayoutComponent.d.ts +47 -0
  211. package/lib/typescript/Mock/Components/LayoutComponent.d.ts.map +1 -0
  212. package/lib/typescript/Mock/Components/Modals.d.ts +47 -0
  213. package/lib/typescript/Mock/Components/Modals.d.ts.map +1 -0
  214. package/lib/typescript/Mock/Components/NavigationButton.d.ts +58 -0
  215. package/lib/typescript/Mock/Components/NavigationButton.d.ts.map +1 -0
  216. package/lib/typescript/Mock/Components/Overlays.d.ts +47 -0
  217. package/lib/typescript/Mock/Components/Overlays.d.ts.map +1 -0
  218. package/lib/typescript/Mock/Components/SideMenu.d.ts +179 -0
  219. package/lib/typescript/Mock/Components/SideMenu.d.ts.map +1 -0
  220. package/lib/typescript/Mock/Components/Stack.d.ts +47 -0
  221. package/lib/typescript/Mock/Components/Stack.d.ts.map +1 -0
  222. package/lib/typescript/Mock/Components/TopBar.d.ts +37 -0
  223. package/lib/typescript/Mock/Components/TopBar.d.ts.map +1 -0
  224. package/lib/typescript/Mock/Layouts/BottomTabsNode.d.ts +9 -0
  225. package/lib/typescript/Mock/Layouts/BottomTabsNode.d.ts.map +1 -0
  226. package/lib/typescript/Mock/Layouts/ComponentNode.d.ts +16 -0
  227. package/lib/typescript/Mock/Layouts/ComponentNode.d.ts.map +1 -0
  228. package/lib/typescript/Mock/Layouts/LayoutNodeFactory.d.ts +9 -0
  229. package/lib/typescript/Mock/Layouts/LayoutNodeFactory.d.ts.map +1 -0
  230. package/lib/typescript/Mock/Layouts/Node.d.ts +16 -0
  231. package/lib/typescript/Mock/Layouts/Node.d.ts.map +1 -0
  232. package/lib/typescript/Mock/Layouts/ParentNode.d.ts +21 -0
  233. package/lib/typescript/Mock/Layouts/ParentNode.d.ts.map +1 -0
  234. package/lib/typescript/Mock/Layouts/SideMenu.d.ts +32 -0
  235. package/lib/typescript/Mock/Layouts/SideMenu.d.ts.map +1 -0
  236. package/lib/typescript/Mock/Layouts/StackNode.d.ts +6 -0
  237. package/lib/typescript/Mock/Layouts/StackNode.d.ts.map +1 -0
  238. package/lib/typescript/Mock/Stores/EventsStore.d.ts +22 -0
  239. package/lib/typescript/Mock/Stores/EventsStore.d.ts.map +1 -0
  240. package/lib/typescript/Mock/Stores/LayoutStore.d.ts +2 -0
  241. package/lib/typescript/Mock/Stores/LayoutStore.d.ts.map +1 -0
  242. package/lib/typescript/Mock/actions/layoutActions.d.ts +6 -0
  243. package/lib/typescript/Mock/actions/layoutActions.d.ts.map +1 -0
  244. package/lib/typescript/Mock/connect.d.ts +2 -0
  245. package/lib/typescript/Mock/connect.d.ts.map +1 -0
  246. package/lib/typescript/Mock/constants.d.ts +3 -0
  247. package/lib/typescript/Mock/constants.d.ts.map +1 -0
  248. package/lib/typescript/Mock/index.d.ts +4 -0
  249. package/lib/typescript/Mock/index.d.ts.map +1 -0
  250. package/lib/typescript/Mock/mocks/AppRegistryService.d.ts +5 -0
  251. package/lib/typescript/Mock/mocks/AppRegistryService.d.ts.map +1 -0
  252. package/lib/typescript/Mock/mocks/NativeCommandsSender.d.ts +28 -0
  253. package/lib/typescript/Mock/mocks/NativeCommandsSender.d.ts.map +1 -0
  254. package/lib/typescript/Mock/mocks/NativeEventsReceiver.d.ts +21 -0
  255. package/lib/typescript/Mock/mocks/NativeEventsReceiver.d.ts.map +1 -0
  256. package/lib/typescript/Navigation.d.ts +152 -0
  257. package/lib/typescript/Navigation.d.ts.map +1 -0
  258. package/lib/typescript/NavigationDelegate.d.ts +128 -0
  259. package/lib/typescript/NavigationDelegate.d.ts.map +1 -0
  260. package/lib/typescript/adapters/AndroidCustomRowForwarder.d.ts +23 -0
  261. package/lib/typescript/adapters/AndroidCustomRowForwarder.d.ts.map +1 -0
  262. package/lib/typescript/adapters/AppRegistryService.d.ts +5 -0
  263. package/lib/typescript/adapters/AppRegistryService.d.ts.map +1 -0
  264. package/lib/typescript/adapters/AssetResolver.d.ts +5 -0
  265. package/lib/typescript/adapters/AssetResolver.d.ts.map +1 -0
  266. package/lib/typescript/adapters/ColorService.d.ts +4 -0
  267. package/lib/typescript/adapters/ColorService.d.ts.map +1 -0
  268. package/lib/typescript/adapters/Constants.d.ts +17 -0
  269. package/lib/typescript/adapters/Constants.d.ts.map +1 -0
  270. package/lib/typescript/adapters/NativeCommandsSender.d.ts +62 -0
  271. package/lib/typescript/adapters/NativeCommandsSender.d.ts.map +1 -0
  272. package/lib/typescript/adapters/NativeEventsReceiver.d.ts +23 -0
  273. package/lib/typescript/adapters/NativeEventsReceiver.d.ts.map +1 -0
  274. package/lib/typescript/adapters/NativeEventsReceiver.mock.d.ts +2 -0
  275. package/lib/typescript/adapters/NativeEventsReceiver.mock.d.ts.map +1 -0
  276. package/lib/typescript/adapters/NativeRNNTurboEventEmitter.d.ts +8 -0
  277. package/lib/typescript/adapters/NativeRNNTurboEventEmitter.d.ts.map +1 -0
  278. package/lib/typescript/adapters/NativeRNNTurboModule.d.ts +28 -0
  279. package/lib/typescript/adapters/NativeRNNTurboModule.d.ts.map +1 -0
  280. package/lib/typescript/adapters/TouchablePreview.d.ts +44 -0
  281. package/lib/typescript/adapters/TouchablePreview.d.ts.map +1 -0
  282. package/lib/typescript/adapters/UniqueIdProvider.d.ts +4 -0
  283. package/lib/typescript/adapters/UniqueIdProvider.d.ts.map +1 -0
  284. package/lib/typescript/commands/Commands.d.ts +41 -0
  285. package/lib/typescript/commands/Commands.d.ts.map +1 -0
  286. package/lib/typescript/commands/Commands.test.d.ts +2 -0
  287. package/lib/typescript/commands/Commands.test.d.ts.map +1 -0
  288. package/lib/typescript/commands/Deprecations.d.ts +10 -0
  289. package/lib/typescript/commands/Deprecations.d.ts.map +1 -0
  290. package/lib/typescript/commands/LayoutTreeCrawler.d.ts +25 -0
  291. package/lib/typescript/commands/LayoutTreeCrawler.d.ts.map +1 -0
  292. package/lib/typescript/commands/LayoutTreeCrawler.test.d.ts +2 -0
  293. package/lib/typescript/commands/LayoutTreeCrawler.test.d.ts.map +1 -0
  294. package/lib/typescript/commands/LayoutTreeParser.d.ts +17 -0
  295. package/lib/typescript/commands/LayoutTreeParser.d.ts.map +1 -0
  296. package/lib/typescript/commands/LayoutTreeParser.test.d.ts +2 -0
  297. package/lib/typescript/commands/LayoutTreeParser.test.d.ts.map +1 -0
  298. package/lib/typescript/commands/LayoutType.d.ts +13 -0
  299. package/lib/typescript/commands/LayoutType.d.ts.map +1 -0
  300. package/lib/typescript/commands/LayoutType.test.d.ts +2 -0
  301. package/lib/typescript/commands/LayoutType.test.d.ts.map +1 -0
  302. package/lib/typescript/commands/OptionsCrawler.d.ts +20 -0
  303. package/lib/typescript/commands/OptionsCrawler.d.ts.map +1 -0
  304. package/lib/typescript/commands/OptionsCrawler.test.d.ts +2 -0
  305. package/lib/typescript/commands/OptionsCrawler.test.d.ts.map +1 -0
  306. package/lib/typescript/commands/OptionsProcessor.d.ts +40 -0
  307. package/lib/typescript/commands/OptionsProcessor.d.ts.map +1 -0
  308. package/lib/typescript/commands/OptionsProcessor.test.d.ts +2 -0
  309. package/lib/typescript/commands/OptionsProcessor.test.d.ts.map +1 -0
  310. package/lib/typescript/components/ComponentRegistry.d.ts +14 -0
  311. package/lib/typescript/components/ComponentRegistry.d.ts.map +1 -0
  312. package/lib/typescript/components/ComponentRegistry.test.d.ts +2 -0
  313. package/lib/typescript/components/ComponentRegistry.test.d.ts.map +1 -0
  314. package/lib/typescript/components/ComponentWrapper.d.ts +13 -0
  315. package/lib/typescript/components/ComponentWrapper.d.ts.map +1 -0
  316. package/lib/typescript/components/ComponentWrapper.test.d.ts +2 -0
  317. package/lib/typescript/components/ComponentWrapper.test.d.ts.map +1 -0
  318. package/lib/typescript/components/Modal.d.ts +21 -0
  319. package/lib/typescript/components/Modal.d.ts.map +1 -0
  320. package/lib/typescript/components/Store.d.ts +27 -0
  321. package/lib/typescript/components/Store.d.ts.map +1 -0
  322. package/lib/typescript/components/Store.test.d.ts +2 -0
  323. package/lib/typescript/components/Store.test.d.ts.map +1 -0
  324. package/lib/typescript/events/CommandsObserver.d.ts +11 -0
  325. package/lib/typescript/events/CommandsObserver.d.ts.map +1 -0
  326. package/lib/typescript/events/CommandsObserver.test.d.ts +2 -0
  327. package/lib/typescript/events/CommandsObserver.test.d.ts.map +1 -0
  328. package/lib/typescript/events/ComponentEventsObserver.d.ts +29 -0
  329. package/lib/typescript/events/ComponentEventsObserver.d.ts.map +1 -0
  330. package/lib/typescript/events/ComponentEventsObserver.test.d.ts +2 -0
  331. package/lib/typescript/events/ComponentEventsObserver.test.d.ts.map +1 -0
  332. package/lib/typescript/events/EventsRegistry.d.ts +34 -0
  333. package/lib/typescript/events/EventsRegistry.d.ts.map +1 -0
  334. package/lib/typescript/events/EventsRegistry.test.d.ts +2 -0
  335. package/lib/typescript/events/EventsRegistry.test.d.ts.map +1 -0
  336. package/lib/typescript/index.d.ts +19 -0
  337. package/lib/typescript/index.d.ts.map +1 -0
  338. package/lib/typescript/interfaces/CommandName.d.ts +19 -0
  339. package/lib/typescript/interfaces/CommandName.d.ts.map +1 -0
  340. package/lib/typescript/interfaces/ComponentEvents.d.ts +43 -0
  341. package/lib/typescript/interfaces/ComponentEvents.d.ts.map +1 -0
  342. package/lib/typescript/interfaces/EventSubscription.d.ts +4 -0
  343. package/lib/typescript/interfaces/EventSubscription.d.ts.map +1 -0
  344. package/lib/typescript/interfaces/Events.d.ts +16 -0
  345. package/lib/typescript/interfaces/Events.d.ts.map +1 -0
  346. package/lib/typescript/interfaces/Layout.d.ts +190 -0
  347. package/lib/typescript/interfaces/Layout.d.ts.map +1 -0
  348. package/lib/typescript/interfaces/NavigationComponent.d.ts +22 -0
  349. package/lib/typescript/interfaces/NavigationComponent.d.ts.map +1 -0
  350. package/lib/typescript/interfaces/NavigationComponentListener.d.ts +14 -0
  351. package/lib/typescript/interfaces/NavigationComponentListener.d.ts.map +1 -0
  352. package/lib/typescript/interfaces/NavigationComponentProps.d.ts +11 -0
  353. package/lib/typescript/interfaces/NavigationComponentProps.d.ts.map +1 -0
  354. package/lib/typescript/interfaces/NavigationFunctionComponent.d.ts +7 -0
  355. package/lib/typescript/interfaces/NavigationFunctionComponent.d.ts.map +1 -0
  356. package/lib/typescript/interfaces/Options.d.ts +1738 -0
  357. package/lib/typescript/interfaces/Options.d.ts.map +1 -0
  358. package/lib/typescript/interfaces/ProcessorSubscription.d.ts +4 -0
  359. package/lib/typescript/interfaces/ProcessorSubscription.d.ts.map +1 -0
  360. package/lib/typescript/interfaces/Processors.d.ts +9 -0
  361. package/lib/typescript/interfaces/Processors.d.ts.map +1 -0
  362. package/lib/typescript/linking/DeferredLinkQueue.d.ts +26 -0
  363. package/lib/typescript/linking/DeferredLinkQueue.d.ts.map +1 -0
  364. package/lib/typescript/linking/DeferredLinkQueue.test.d.ts +2 -0
  365. package/lib/typescript/linking/DeferredLinkQueue.test.d.ts.map +1 -0
  366. package/lib/typescript/linking/LinkingHandler.d.ts +71 -0
  367. package/lib/typescript/linking/LinkingHandler.d.ts.map +1 -0
  368. package/lib/typescript/linking/LinkingHandler.test.d.ts +2 -0
  369. package/lib/typescript/linking/LinkingHandler.test.d.ts.map +1 -0
  370. package/lib/typescript/linking/ModalLayoutBuilder.d.ts +21 -0
  371. package/lib/typescript/linking/ModalLayoutBuilder.d.ts.map +1 -0
  372. package/lib/typescript/linking/ModalLayoutBuilder.test.d.ts +2 -0
  373. package/lib/typescript/linking/ModalLayoutBuilder.test.d.ts.map +1 -0
  374. package/lib/typescript/linking/RouteMatcher.d.ts +23 -0
  375. package/lib/typescript/linking/RouteMatcher.d.ts.map +1 -0
  376. package/lib/typescript/linking/RouteMatcher.test.d.ts +2 -0
  377. package/lib/typescript/linking/RouteMatcher.test.d.ts.map +1 -0
  378. package/lib/typescript/linking/URLParser.d.ts +16 -0
  379. package/lib/typescript/linking/URLParser.d.ts.map +1 -0
  380. package/lib/typescript/linking/URLParser.test.d.ts +2 -0
  381. package/lib/typescript/linking/URLParser.test.d.ts.map +1 -0
  382. package/lib/typescript/linking/types.d.ts +107 -0
  383. package/lib/typescript/linking/types.d.ts.map +1 -0
  384. package/lib/typescript/package.json +1 -0
  385. package/lib/typescript/processors/LayoutProcessor.d.ts +9 -0
  386. package/lib/typescript/processors/LayoutProcessor.d.ts.map +1 -0
  387. package/lib/typescript/processors/LayoutProcessor.test.d.ts +2 -0
  388. package/lib/typescript/processors/LayoutProcessor.test.d.ts.map +1 -0
  389. package/lib/typescript/processors/LayoutProcessorsStore.d.ts +9 -0
  390. package/lib/typescript/processors/LayoutProcessorsStore.d.ts.map +1 -0
  391. package/lib/typescript/processors/LayoutProcessorsStore.test.d.ts +2 -0
  392. package/lib/typescript/processors/LayoutProcessorsStore.test.d.ts.map +1 -0
  393. package/lib/typescript/processors/OptionProcessorsStore.d.ts +9 -0
  394. package/lib/typescript/processors/OptionProcessorsStore.d.ts.map +1 -0
  395. package/lib/typescript/processors/OptionProcessorsStore.test.d.ts +2 -0
  396. package/lib/typescript/processors/OptionProcessorsStore.test.d.ts.map +1 -0
  397. package/lib/typescript/types.d.ts +5 -0
  398. package/lib/typescript/types.d.ts.map +1 -0
  399. package/lib/typescript/typescript/Mock/Application.d.ts +30 -0
  400. package/lib/typescript/typescript/Mock/Application.d.ts.map +1 -0
  401. package/lib/typescript/typescript/Mock/ComponentProps.d.ts +6 -0
  402. package/lib/typescript/typescript/Mock/ComponentProps.d.ts.map +1 -0
  403. package/lib/typescript/typescript/Mock/Components/BottomTabs.d.ts +47 -0
  404. package/lib/typescript/typescript/Mock/Components/BottomTabs.d.ts.map +1 -0
  405. package/lib/typescript/typescript/Mock/Components/ComponentScreen.d.ts +29 -0
  406. package/lib/typescript/typescript/Mock/Components/ComponentScreen.d.ts.map +1 -0
  407. package/lib/typescript/typescript/Mock/Components/LayoutComponent.d.ts +47 -0
  408. package/lib/typescript/typescript/Mock/Components/LayoutComponent.d.ts.map +1 -0
  409. package/lib/typescript/typescript/Mock/Components/Modals.d.ts +47 -0
  410. package/lib/typescript/typescript/Mock/Components/Modals.d.ts.map +1 -0
  411. package/lib/typescript/typescript/Mock/Components/NavigationButton.d.ts +58 -0
  412. package/lib/typescript/typescript/Mock/Components/NavigationButton.d.ts.map +1 -0
  413. package/lib/typescript/typescript/Mock/Components/Overlays.d.ts +47 -0
  414. package/lib/typescript/typescript/Mock/Components/Overlays.d.ts.map +1 -0
  415. package/lib/typescript/typescript/Mock/Components/SideMenu.d.ts +179 -0
  416. package/lib/typescript/typescript/Mock/Components/SideMenu.d.ts.map +1 -0
  417. package/lib/typescript/typescript/Mock/Components/Stack.d.ts +47 -0
  418. package/lib/typescript/typescript/Mock/Components/Stack.d.ts.map +1 -0
  419. package/lib/typescript/typescript/Mock/Components/TopBar.d.ts +37 -0
  420. package/lib/typescript/typescript/Mock/Components/TopBar.d.ts.map +1 -0
  421. package/lib/typescript/typescript/Mock/Layouts/BottomTabsNode.d.ts +9 -0
  422. package/lib/typescript/typescript/Mock/Layouts/BottomTabsNode.d.ts.map +1 -0
  423. package/lib/typescript/typescript/Mock/Layouts/ComponentNode.d.ts +16 -0
  424. package/lib/typescript/typescript/Mock/Layouts/ComponentNode.d.ts.map +1 -0
  425. package/lib/typescript/typescript/Mock/Layouts/LayoutNodeFactory.d.ts +9 -0
  426. package/lib/typescript/typescript/Mock/Layouts/LayoutNodeFactory.d.ts.map +1 -0
  427. package/lib/typescript/typescript/Mock/Layouts/Node.d.ts +16 -0
  428. package/lib/typescript/typescript/Mock/Layouts/Node.d.ts.map +1 -0
  429. package/lib/typescript/typescript/Mock/Layouts/ParentNode.d.ts +21 -0
  430. package/lib/typescript/typescript/Mock/Layouts/ParentNode.d.ts.map +1 -0
  431. package/lib/typescript/typescript/Mock/Layouts/SideMenu.d.ts +32 -0
  432. package/lib/typescript/typescript/Mock/Layouts/SideMenu.d.ts.map +1 -0
  433. package/lib/typescript/typescript/Mock/Layouts/StackNode.d.ts +6 -0
  434. package/lib/typescript/typescript/Mock/Layouts/StackNode.d.ts.map +1 -0
  435. package/lib/typescript/typescript/Mock/Stores/EventsStore.d.ts +22 -0
  436. package/lib/typescript/typescript/Mock/Stores/EventsStore.d.ts.map +1 -0
  437. package/lib/typescript/typescript/Mock/Stores/LayoutStore.d.ts +2 -0
  438. package/lib/typescript/typescript/Mock/Stores/LayoutStore.d.ts.map +1 -0
  439. package/lib/typescript/typescript/Mock/actions/layoutActions.d.ts +6 -0
  440. package/lib/typescript/typescript/Mock/actions/layoutActions.d.ts.map +1 -0
  441. package/lib/typescript/typescript/Mock/connect.d.ts +2 -0
  442. package/lib/typescript/typescript/Mock/connect.d.ts.map +1 -0
  443. package/lib/typescript/typescript/Mock/constants.d.ts +3 -0
  444. package/lib/typescript/typescript/Mock/constants.d.ts.map +1 -0
  445. package/lib/typescript/typescript/Mock/index.d.ts +4 -0
  446. package/lib/typescript/typescript/Mock/index.d.ts.map +1 -0
  447. package/lib/typescript/typescript/Mock/mocks/AppRegistryService.d.ts +5 -0
  448. package/lib/typescript/typescript/Mock/mocks/AppRegistryService.d.ts.map +1 -0
  449. package/lib/typescript/typescript/Mock/mocks/NativeCommandsSender.d.ts +28 -0
  450. package/lib/typescript/typescript/Mock/mocks/NativeCommandsSender.d.ts.map +1 -0
  451. package/lib/typescript/typescript/Mock/mocks/NativeEventsReceiver.d.ts +21 -0
  452. package/lib/typescript/typescript/Mock/mocks/NativeEventsReceiver.d.ts.map +1 -0
  453. package/lib/typescript/typescript/Navigation.d.ts +152 -0
  454. package/lib/typescript/typescript/Navigation.d.ts.map +1 -0
  455. package/lib/typescript/typescript/NavigationDelegate.d.ts +128 -0
  456. package/lib/typescript/typescript/NavigationDelegate.d.ts.map +1 -0
  457. package/lib/typescript/typescript/adapters/AndroidCustomRowForwarder.d.ts +23 -0
  458. package/lib/typescript/typescript/adapters/AndroidCustomRowForwarder.d.ts.map +1 -0
  459. package/lib/typescript/typescript/adapters/AppRegistryService.d.ts +5 -0
  460. package/lib/typescript/typescript/adapters/AppRegistryService.d.ts.map +1 -0
  461. package/lib/typescript/typescript/adapters/AssetResolver.d.ts +5 -0
  462. package/lib/typescript/typescript/adapters/AssetResolver.d.ts.map +1 -0
  463. package/lib/typescript/typescript/adapters/ColorService.d.ts +4 -0
  464. package/lib/typescript/typescript/adapters/ColorService.d.ts.map +1 -0
  465. package/lib/typescript/typescript/adapters/Constants.d.ts +17 -0
  466. package/lib/typescript/typescript/adapters/Constants.d.ts.map +1 -0
  467. package/lib/typescript/typescript/adapters/NativeCommandsSender.d.ts +62 -0
  468. package/lib/typescript/typescript/adapters/NativeCommandsSender.d.ts.map +1 -0
  469. package/lib/typescript/typescript/adapters/NativeEventsReceiver.d.ts +23 -0
  470. package/lib/typescript/typescript/adapters/NativeEventsReceiver.d.ts.map +1 -0
  471. package/lib/typescript/typescript/adapters/NativeEventsReceiver.mock.d.ts +2 -0
  472. package/lib/typescript/typescript/adapters/NativeEventsReceiver.mock.d.ts.map +1 -0
  473. package/lib/typescript/typescript/adapters/NativeRNNTurboEventEmitter.d.ts +8 -0
  474. package/lib/typescript/typescript/adapters/NativeRNNTurboEventEmitter.d.ts.map +1 -0
  475. package/lib/typescript/typescript/adapters/NativeRNNTurboModule.d.ts +28 -0
  476. package/lib/typescript/typescript/adapters/NativeRNNTurboModule.d.ts.map +1 -0
  477. package/lib/typescript/typescript/adapters/TouchablePreview.d.ts +44 -0
  478. package/lib/typescript/typescript/adapters/TouchablePreview.d.ts.map +1 -0
  479. package/lib/typescript/typescript/adapters/UniqueIdProvider.d.ts +4 -0
  480. package/lib/typescript/typescript/adapters/UniqueIdProvider.d.ts.map +1 -0
  481. package/lib/typescript/typescript/commands/Commands.d.ts +41 -0
  482. package/lib/typescript/typescript/commands/Commands.d.ts.map +1 -0
  483. package/lib/typescript/typescript/commands/Commands.test.d.ts +2 -0
  484. package/lib/typescript/typescript/commands/Commands.test.d.ts.map +1 -0
  485. package/lib/typescript/typescript/commands/Deprecations.d.ts +10 -0
  486. package/lib/typescript/typescript/commands/Deprecations.d.ts.map +1 -0
  487. package/lib/typescript/typescript/commands/LayoutTreeCrawler.d.ts +25 -0
  488. package/lib/typescript/typescript/commands/LayoutTreeCrawler.d.ts.map +1 -0
  489. package/lib/typescript/typescript/commands/LayoutTreeCrawler.test.d.ts +2 -0
  490. package/lib/typescript/typescript/commands/LayoutTreeCrawler.test.d.ts.map +1 -0
  491. package/lib/typescript/typescript/commands/LayoutTreeParser.d.ts +17 -0
  492. package/lib/typescript/typescript/commands/LayoutTreeParser.d.ts.map +1 -0
  493. package/lib/typescript/typescript/commands/LayoutTreeParser.test.d.ts +2 -0
  494. package/lib/typescript/typescript/commands/LayoutTreeParser.test.d.ts.map +1 -0
  495. package/lib/typescript/typescript/commands/LayoutType.d.ts +13 -0
  496. package/lib/typescript/typescript/commands/LayoutType.d.ts.map +1 -0
  497. package/lib/typescript/typescript/commands/LayoutType.test.d.ts +2 -0
  498. package/lib/typescript/typescript/commands/LayoutType.test.d.ts.map +1 -0
  499. package/lib/typescript/typescript/commands/OptionsCrawler.d.ts +20 -0
  500. package/lib/typescript/typescript/commands/OptionsCrawler.d.ts.map +1 -0
  501. package/lib/typescript/typescript/commands/OptionsCrawler.test.d.ts +2 -0
  502. package/lib/typescript/typescript/commands/OptionsCrawler.test.d.ts.map +1 -0
  503. package/lib/typescript/typescript/commands/OptionsProcessor.d.ts +40 -0
  504. package/lib/typescript/typescript/commands/OptionsProcessor.d.ts.map +1 -0
  505. package/lib/typescript/typescript/commands/OptionsProcessor.test.d.ts +2 -0
  506. package/lib/typescript/typescript/commands/OptionsProcessor.test.d.ts.map +1 -0
  507. package/lib/typescript/typescript/components/ComponentRegistry.d.ts +14 -0
  508. package/lib/typescript/typescript/components/ComponentRegistry.d.ts.map +1 -0
  509. package/lib/typescript/typescript/components/ComponentRegistry.test.d.ts +2 -0
  510. package/lib/typescript/typescript/components/ComponentRegistry.test.d.ts.map +1 -0
  511. package/lib/typescript/typescript/components/ComponentWrapper.d.ts +13 -0
  512. package/lib/typescript/typescript/components/ComponentWrapper.d.ts.map +1 -0
  513. package/lib/typescript/typescript/components/ComponentWrapper.test.d.ts +2 -0
  514. package/lib/typescript/typescript/components/ComponentWrapper.test.d.ts.map +1 -0
  515. package/lib/typescript/typescript/components/Modal.d.ts +21 -0
  516. package/lib/typescript/typescript/components/Modal.d.ts.map +1 -0
  517. package/lib/typescript/typescript/components/Store.d.ts +27 -0
  518. package/lib/typescript/typescript/components/Store.d.ts.map +1 -0
  519. package/lib/typescript/typescript/components/Store.test.d.ts +2 -0
  520. package/lib/typescript/typescript/components/Store.test.d.ts.map +1 -0
  521. package/lib/typescript/typescript/events/CommandsObserver.d.ts +11 -0
  522. package/lib/typescript/typescript/events/CommandsObserver.d.ts.map +1 -0
  523. package/lib/typescript/typescript/events/CommandsObserver.test.d.ts +2 -0
  524. package/lib/typescript/typescript/events/CommandsObserver.test.d.ts.map +1 -0
  525. package/lib/typescript/typescript/events/ComponentEventsObserver.d.ts +29 -0
  526. package/lib/typescript/typescript/events/ComponentEventsObserver.d.ts.map +1 -0
  527. package/lib/typescript/typescript/events/ComponentEventsObserver.test.d.ts +2 -0
  528. package/lib/typescript/typescript/events/ComponentEventsObserver.test.d.ts.map +1 -0
  529. package/lib/typescript/typescript/events/EventsRegistry.d.ts +34 -0
  530. package/lib/typescript/typescript/events/EventsRegistry.d.ts.map +1 -0
  531. package/lib/typescript/typescript/events/EventsRegistry.test.d.ts +2 -0
  532. package/lib/typescript/typescript/events/EventsRegistry.test.d.ts.map +1 -0
  533. package/lib/typescript/typescript/index.d.ts +19 -0
  534. package/lib/typescript/typescript/index.d.ts.map +1 -0
  535. package/lib/typescript/typescript/interfaces/CommandName.d.ts +19 -0
  536. package/lib/typescript/typescript/interfaces/CommandName.d.ts.map +1 -0
  537. package/lib/typescript/typescript/interfaces/ComponentEvents.d.ts +43 -0
  538. package/lib/typescript/typescript/interfaces/ComponentEvents.d.ts.map +1 -0
  539. package/lib/typescript/typescript/interfaces/EventSubscription.d.ts +4 -0
  540. package/lib/typescript/typescript/interfaces/EventSubscription.d.ts.map +1 -0
  541. package/lib/typescript/typescript/interfaces/Events.d.ts +16 -0
  542. package/lib/typescript/typescript/interfaces/Events.d.ts.map +1 -0
  543. package/lib/typescript/typescript/interfaces/Layout.d.ts +190 -0
  544. package/lib/typescript/typescript/interfaces/Layout.d.ts.map +1 -0
  545. package/lib/typescript/typescript/interfaces/NavigationComponent.d.ts +22 -0
  546. package/lib/typescript/typescript/interfaces/NavigationComponent.d.ts.map +1 -0
  547. package/lib/typescript/typescript/interfaces/NavigationComponentListener.d.ts +14 -0
  548. package/lib/typescript/typescript/interfaces/NavigationComponentListener.d.ts.map +1 -0
  549. package/lib/typescript/typescript/interfaces/NavigationComponentProps.d.ts +11 -0
  550. package/lib/typescript/typescript/interfaces/NavigationComponentProps.d.ts.map +1 -0
  551. package/lib/typescript/typescript/interfaces/NavigationFunctionComponent.d.ts +7 -0
  552. package/lib/typescript/typescript/interfaces/NavigationFunctionComponent.d.ts.map +1 -0
  553. package/lib/typescript/typescript/interfaces/Options.d.ts +1738 -0
  554. package/lib/typescript/typescript/interfaces/Options.d.ts.map +1 -0
  555. package/lib/typescript/typescript/interfaces/ProcessorSubscription.d.ts +4 -0
  556. package/lib/typescript/typescript/interfaces/ProcessorSubscription.d.ts.map +1 -0
  557. package/lib/typescript/typescript/interfaces/Processors.d.ts +9 -0
  558. package/lib/typescript/typescript/interfaces/Processors.d.ts.map +1 -0
  559. package/lib/typescript/typescript/linking/DeferredLinkQueue.d.ts +26 -0
  560. package/lib/typescript/typescript/linking/DeferredLinkQueue.d.ts.map +1 -0
  561. package/lib/typescript/typescript/linking/DeferredLinkQueue.test.d.ts +2 -0
  562. package/lib/typescript/typescript/linking/DeferredLinkQueue.test.d.ts.map +1 -0
  563. package/lib/typescript/typescript/linking/LinkingHandler.d.ts +71 -0
  564. package/lib/typescript/typescript/linking/LinkingHandler.d.ts.map +1 -0
  565. package/lib/typescript/typescript/linking/LinkingHandler.test.d.ts +2 -0
  566. package/lib/typescript/typescript/linking/LinkingHandler.test.d.ts.map +1 -0
  567. package/lib/typescript/typescript/linking/ModalLayoutBuilder.d.ts +21 -0
  568. package/lib/typescript/typescript/linking/ModalLayoutBuilder.d.ts.map +1 -0
  569. package/lib/typescript/typescript/linking/ModalLayoutBuilder.test.d.ts +2 -0
  570. package/lib/typescript/typescript/linking/ModalLayoutBuilder.test.d.ts.map +1 -0
  571. package/lib/typescript/typescript/linking/RouteMatcher.d.ts +23 -0
  572. package/lib/typescript/typescript/linking/RouteMatcher.d.ts.map +1 -0
  573. package/lib/typescript/typescript/linking/RouteMatcher.test.d.ts +2 -0
  574. package/lib/typescript/typescript/linking/RouteMatcher.test.d.ts.map +1 -0
  575. package/lib/typescript/typescript/linking/URLParser.d.ts +16 -0
  576. package/lib/typescript/typescript/linking/URLParser.d.ts.map +1 -0
  577. package/lib/typescript/typescript/linking/URLParser.test.d.ts +2 -0
  578. package/lib/typescript/typescript/linking/URLParser.test.d.ts.map +1 -0
  579. package/lib/typescript/typescript/linking/types.d.ts +107 -0
  580. package/lib/typescript/typescript/linking/types.d.ts.map +1 -0
  581. package/lib/typescript/typescript/package.json +1 -0
  582. package/lib/typescript/typescript/processors/LayoutProcessor.d.ts +9 -0
  583. package/lib/typescript/typescript/processors/LayoutProcessor.d.ts.map +1 -0
  584. package/lib/typescript/typescript/processors/LayoutProcessor.test.d.ts +2 -0
  585. package/lib/typescript/typescript/processors/LayoutProcessor.test.d.ts.map +1 -0
  586. package/lib/typescript/typescript/processors/LayoutProcessorsStore.d.ts +9 -0
  587. package/lib/typescript/typescript/processors/LayoutProcessorsStore.d.ts.map +1 -0
  588. package/lib/typescript/typescript/processors/LayoutProcessorsStore.test.d.ts +2 -0
  589. package/lib/typescript/typescript/processors/LayoutProcessorsStore.test.d.ts.map +1 -0
  590. package/lib/typescript/typescript/processors/OptionProcessorsStore.d.ts +9 -0
  591. package/lib/typescript/typescript/processors/OptionProcessorsStore.d.ts.map +1 -0
  592. package/lib/typescript/typescript/processors/OptionProcessorsStore.test.d.ts +2 -0
  593. package/lib/typescript/typescript/processors/OptionProcessorsStore.test.d.ts.map +1 -0
  594. package/lib/typescript/typescript/types.d.ts +5 -0
  595. package/lib/typescript/typescript/types.d.ts.map +1 -0
  596. package/package.json +56 -0
  597. package/scripts/setup-esm-shim.js +102 -0
@@ -0,0 +1,351 @@
1
+ "use strict";
2
+
3
+ import * as React from 'react';
4
+ import { Store } from "../components/Store.js";
5
+ import { mock, instance, when, anything } from 'ts-mockito';
6
+ import { OptionsCrawler } from "./OptionsCrawler.js";
7
+ import { UniqueIdProvider } from "../adapters/UniqueIdProvider.js";
8
+ describe('OptionsCrawler', () => {
9
+ let uut;
10
+ let mockedStore;
11
+ let mockedUniqueIdProvider;
12
+ beforeEach(() => {
13
+ mockedStore = mock(Store);
14
+ mockedUniqueIdProvider = mock(UniqueIdProvider);
15
+ when(mockedUniqueIdProvider.generate(anything())).thenCall(prefix => `${prefix}+UNIQUE_ID`);
16
+ const uniqueIdProvider = instance(mockedUniqueIdProvider);
17
+ uut = new OptionsCrawler(instance(mockedStore), uniqueIdProvider);
18
+ });
19
+ it('Components: injects options object', () => {
20
+ when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
21
+ static options = {
22
+ popGesture: true
23
+ };
24
+ });
25
+ const layout = {
26
+ component: {
27
+ id: 'testId',
28
+ name: 'theComponentName'
29
+ }
30
+ };
31
+ uut.crawl(layout);
32
+ expect(layout.component.options).toEqual({
33
+ popGesture: true
34
+ });
35
+ });
36
+ it('Components: injects options from original component class static property', () => {
37
+ when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
38
+ static options() {
39
+ return {
40
+ popGesture: true
41
+ };
42
+ }
43
+ });
44
+ const layout = {
45
+ component: {
46
+ id: 'testId',
47
+ name: 'theComponentName'
48
+ }
49
+ };
50
+ uut.crawl(layout);
51
+ expect(layout.component.options).toEqual({
52
+ popGesture: true
53
+ });
54
+ });
55
+ it('ExternalComponent: does nothing as there is no React component for external component', () => {
56
+ const layout = {
57
+ externalComponent: {
58
+ id: 'testId',
59
+ name: 'theComponentName'
60
+ }
61
+ };
62
+ uut.crawl(layout);
63
+ expect(layout.externalComponent.options).toEqual(undefined);
64
+ });
65
+ it('ExternalComponent: merge options with passed options', () => {
66
+ const layout = {
67
+ externalComponent: {
68
+ id: 'testId',
69
+ name: 'theComponentName',
70
+ options: {
71
+ popGesture: false
72
+ }
73
+ }
74
+ };
75
+ uut.crawl(layout);
76
+ expect(layout.externalComponent.options).toEqual({
77
+ popGesture: false
78
+ });
79
+ });
80
+ it('Stack: injects options from original component class static property', () => {
81
+ when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
82
+ static options() {
83
+ return {
84
+ popGesture: true
85
+ };
86
+ }
87
+ });
88
+ const layout = {
89
+ stack: {
90
+ children: [{
91
+ component: {
92
+ id: 'testId',
93
+ name: 'theComponentName'
94
+ }
95
+ }]
96
+ }
97
+ };
98
+ uut.crawl(layout);
99
+ expect(layout.stack.children[0].component.options).toEqual({
100
+ popGesture: true
101
+ });
102
+ });
103
+ it('SideMenu: injects options from original component class static property', () => {
104
+ when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
105
+ static options() {
106
+ return {
107
+ popGesture: true
108
+ };
109
+ }
110
+ });
111
+ const layout = {
112
+ sideMenu: {
113
+ left: {
114
+ component: {
115
+ id: 'testId',
116
+ name: 'theComponentName'
117
+ }
118
+ },
119
+ center: {
120
+ component: {
121
+ id: 'testId',
122
+ name: 'theComponentName'
123
+ }
124
+ },
125
+ right: {
126
+ component: {
127
+ id: 'testId',
128
+ name: 'theComponentName'
129
+ }
130
+ }
131
+ }
132
+ };
133
+ uut.crawl(layout);
134
+ expect(layout.sideMenu.center.component.options).toEqual({
135
+ popGesture: true
136
+ });
137
+ expect(layout.sideMenu.left.component.options).toEqual({
138
+ popGesture: true
139
+ });
140
+ expect(layout.sideMenu.right.component.options).toEqual({
141
+ popGesture: true
142
+ });
143
+ });
144
+ it('SplitView: injects options from original component class static property', () => {
145
+ when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
146
+ static options() {
147
+ return {
148
+ popGesture: true
149
+ };
150
+ }
151
+ });
152
+ const layout = {
153
+ splitView: {
154
+ master: {
155
+ component: {
156
+ id: 'testId',
157
+ name: 'theComponentName'
158
+ }
159
+ },
160
+ detail: {
161
+ component: {
162
+ id: 'testId',
163
+ name: 'theComponentName'
164
+ }
165
+ }
166
+ }
167
+ };
168
+ uut.crawl(layout);
169
+ expect(layout.splitView.master.component.options).toEqual({
170
+ popGesture: true
171
+ });
172
+ expect(layout.splitView.detail.component.options).toEqual({
173
+ popGesture: true
174
+ });
175
+ });
176
+ it('BottomTabs: injects options from original component class static property', () => {
177
+ when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
178
+ static options() {
179
+ return {
180
+ popGesture: true
181
+ };
182
+ }
183
+ });
184
+ const layout = {
185
+ bottomTabs: {
186
+ children: [{
187
+ component: {
188
+ id: 'testId',
189
+ name: 'theComponentName'
190
+ }
191
+ }, {
192
+ component: {
193
+ id: 'testId',
194
+ name: 'theComponentName'
195
+ }
196
+ }]
197
+ }
198
+ };
199
+ uut.crawl(layout);
200
+ expect(layout.bottomTabs.children[0].component.options).toEqual({
201
+ popGesture: true
202
+ });
203
+ expect(layout.bottomTabs.children[1].component.options).toEqual({
204
+ popGesture: true
205
+ });
206
+ });
207
+ it('TopTabs: injects options from original component class static property', () => {
208
+ when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
209
+ static options() {
210
+ return {
211
+ popGesture: true
212
+ };
213
+ }
214
+ });
215
+ const layout = {
216
+ topTabs: {
217
+ children: [{
218
+ component: {
219
+ id: 'testId',
220
+ name: 'theComponentName'
221
+ }
222
+ }, {
223
+ component: {
224
+ id: 'testId',
225
+ name: 'theComponentName'
226
+ }
227
+ }]
228
+ }
229
+ };
230
+ uut.crawl(layout);
231
+ expect(layout.topTabs.children[0].component.options).toEqual({
232
+ popGesture: true
233
+ });
234
+ expect(layout.topTabs.children[1].component.options).toEqual({
235
+ popGesture: true
236
+ });
237
+ });
238
+ it('Components: merges options from component class static property with passed options, favoring passed options', () => {
239
+ when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
240
+ static options() {
241
+ return {
242
+ topBar: {
243
+ title: {
244
+ text: 'this gets overriden'
245
+ },
246
+ subtitle: {
247
+ text: 'exists only in static'
248
+ }
249
+ }
250
+ };
251
+ }
252
+ });
253
+ const node = {
254
+ component: {
255
+ id: 'testId',
256
+ name: 'theComponentName',
257
+ options: {
258
+ topBar: {
259
+ title: {
260
+ text: 'exists only in passed'
261
+ }
262
+ }
263
+ }
264
+ }
265
+ };
266
+ uut.crawl(node);
267
+ expect(node.component.options).toEqual({
268
+ topBar: {
269
+ title: {
270
+ text: 'exists only in passed'
271
+ },
272
+ subtitle: {
273
+ text: 'exists only in static'
274
+ }
275
+ }
276
+ });
277
+ });
278
+ it('Components: options default obj', () => {
279
+ when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {});
280
+ const node = {
281
+ component: {
282
+ name: 'theComponentName',
283
+ options: {},
284
+ id: 'testId'
285
+ },
286
+ children: []
287
+ };
288
+ uut.crawl(node);
289
+ expect(node.component.options).toEqual({});
290
+ });
291
+ it('Components: should generate component id', () => {
292
+ let componentIdInProps = '';
293
+ when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
294
+ static options(props) {
295
+ componentIdInProps = props.componentId;
296
+ }
297
+ });
298
+ const node = {
299
+ component: {
300
+ name: 'theComponentName',
301
+ options: {},
302
+ id: undefined
303
+ },
304
+ children: []
305
+ };
306
+ uut.crawl(node);
307
+ expect(componentIdInProps).toEqual('Component+UNIQUE_ID');
308
+ });
309
+ it('componentId is included in props passed to options generator', () => {
310
+ let componentIdInProps = '';
311
+ when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
312
+ static options(props) {
313
+ componentIdInProps = props.componentId;
314
+ return {};
315
+ }
316
+ });
317
+ const node = {
318
+ component: {
319
+ id: 'testId',
320
+ name: 'theComponentName',
321
+ passProps: {
322
+ someProp: 'here'
323
+ }
324
+ }
325
+ };
326
+ uut.crawl(node);
327
+ expect(componentIdInProps).toEqual('testId');
328
+ });
329
+ it('componentId does not override componentId in passProps', () => {
330
+ let componentIdInProps = '';
331
+ when(mockedStore.getComponentClassForName('theComponentName')).thenReturn(() => class extends React.Component {
332
+ static options(props) {
333
+ componentIdInProps = props.componentId;
334
+ return {};
335
+ }
336
+ });
337
+ const node = {
338
+ component: {
339
+ id: 'testId',
340
+ name: 'theComponentName',
341
+ passProps: {
342
+ someProp: 'here',
343
+ componentId: 'compIdFromPassProps'
344
+ }
345
+ }
346
+ };
347
+ uut.crawl(node);
348
+ expect(componentIdInProps).toEqual('compIdFromPassProps');
349
+ });
350
+ });
351
+ //# sourceMappingURL=OptionsCrawler.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"names":["React","Store","mock","instance","when","anything","OptionsCrawler","UniqueIdProvider","describe","uut","mockedStore","mockedUniqueIdProvider","beforeEach","generate","thenCall","prefix","uniqueIdProvider","it","getComponentClassForName","thenReturn","Component","options","popGesture","layout","component","id","name","crawl","expect","toEqual","externalComponent","undefined","stack","children","sideMenu","left","center","right","splitView","master","detail","bottomTabs","topTabs","topBar","title","text","subtitle","node","componentIdInProps","props","componentId","passProps","someProp"],"sourceRo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E;QACTC,EAAE,EAAE,QAAQ;QACZC,IAAI,EAAE,kBAAkB;QACxByB,SAAS,EAAE;UACTC,QAAQ,EAAE,MAAM;UAChBF,WAAW,EAAE;QACf;MACF;IACF,CAAC;IACDzC,GAAG,CAACkB,KAAK,CAACoB,IAAI,CAAC;IACfnB,MAAM,CAACoB,kBAAkB,CAAC,CAACnB,OAAO,CAAC,qBAAqB,CAAC;EAC3D,CAAC,CAAC;AACJ,CAAC,CAAC","ignoreList":[]}
@@ -0,0 +1,300 @@
1
+ "use strict";
2
+
3
+ import clone from 'lodash/clone.js';
4
+ import isEqual from 'lodash/isEqual.js';
5
+ import isObject from 'lodash/isObject.js';
6
+ import isArray from 'lodash/isArray.js';
7
+ import isString from 'lodash/isString.js';
8
+ import endsWith from 'lodash/endsWith.js';
9
+ import forEach from 'lodash/forEach.js';
10
+ import has from 'lodash/has.js';
11
+ import { Platform, DynamicColorIOS } from 'react-native';
12
+ export class OptionsProcessor {
13
+ constructor(store, uniqueIdProvider, optionProcessorsRegistry, colorService, assetService, deprecations) {
14
+ this.store = store;
15
+ this.uniqueIdProvider = uniqueIdProvider;
16
+ this.optionProcessorsRegistry = optionProcessorsRegistry;
17
+ this.colorService = colorService;
18
+ this.assetService = assetService;
19
+ this.deprecations = deprecations;
20
+ }
21
+ processOptions(commandName, options, props) {
22
+ if (options) {
23
+ this.processObject(options, clone(options), (key, parentOptions) => {
24
+ this.deprecations.onProcessOptions(key, parentOptions, commandName);
25
+ this.deprecations.checkForDeprecatedOptions(parentOptions);
26
+ }, commandName, props);
27
+ }
28
+ }
29
+ processDefaultOptions(options, commandName) {
30
+ this.processObject(options, clone(options), (key, parentOptions) => {
31
+ this.deprecations.onProcessDefaultOptions(key, parentOptions);
32
+ }, commandName);
33
+ }
34
+ processObject(objectToProcess, parentOptions, onProcess, commandName, props, parentPath) {
35
+ forEach(objectToProcess, (value, key) => {
36
+ const objectPath = this.resolveObjectPath(key, parentPath);
37
+ this.processWithRegisteredProcessor(key, value, objectToProcess, objectPath, commandName, props);
38
+ this.processColor(key, value, objectToProcess);
39
+ if (!value) {
40
+ return;
41
+ }
42
+ this.processComponent(key, value, objectToProcess);
43
+ this.processImage(key, value, objectToProcess);
44
+ this.processButtonsPassProps(key, value);
45
+ this.processSearchBar(key, value, objectToProcess);
46
+ this.processInterpolation(key, value, objectToProcess);
47
+ this.processAnimation(key, value, objectToProcess);
48
+ onProcess(key, parentOptions);
49
+ const processedValue = objectToProcess[key];
50
+ if (!isEqual(key, 'passProps') && (isObject(processedValue) || isArray(processedValue))) {
51
+ this.processObject(processedValue, parentOptions, onProcess, commandName, props, objectPath);
52
+ }
53
+ });
54
+ }
55
+ resolveObjectPath(key, path) {
56
+ if (!path) path = key;else path += `.${key}`;
57
+ return path;
58
+ }
59
+ processColor(key, value, options) {
60
+ if ((isEqual(key, 'color') || endsWith(key, 'Color')) && !isEqual(key, 'bkgColor')) {
61
+ if (Platform.OS === 'ios') this.processColorIOS(key, value, options);else this.processColorAndroid(key, value, options);
62
+ }
63
+ }
64
+ processColorIOS(key, value, options) {
65
+ if (value !== undefined) {
66
+ if (value === null) {
67
+ options[key] = 'NoColor';
68
+ } else if (value instanceof Object) {
69
+ if ('semantic' in value) {
70
+ options[key] = value;
71
+ } else if ('dynamic' in value) {
72
+ options[key] = DynamicColorIOS({
73
+ light: this.colorService.toNativeColor(value.dynamic.light),
74
+ dark: this.colorService.toNativeColor(value.dynamic.dark)
75
+ });
76
+ } else {
77
+ options[key] = DynamicColorIOS({
78
+ light: this.colorService.toNativeColor(value.light),
79
+ dark: this.colorService.toNativeColor(value.dark)
80
+ });
81
+ }
82
+ } else {
83
+ options[key] = this.colorService.toNativeColor(value);
84
+ }
85
+ }
86
+ }
87
+ processColorAndroid(key, value, options) {
88
+ if (value !== undefined) {
89
+ const newColorObj = {
90
+ dark: 'NoColor',
91
+ light: 'NoColor'
92
+ };
93
+ if (value === null) {
94
+ options[key] = newColorObj;
95
+ } else if (value instanceof Object) {
96
+ if ('semantic' in value || 'resource_paths' in value) {
97
+ options[key] = value;
98
+ return;
99
+ } else {
100
+ for (let keyColor in value) {
101
+ newColorObj[keyColor] = this.colorService.toNativeColor(value[keyColor]);
102
+ }
103
+ options[key] = newColorObj;
104
+ }
105
+ } else {
106
+ let parsedColor = this.colorService.toNativeColor(value);
107
+ newColorObj.light = parsedColor;
108
+ newColorObj.dark = parsedColor;
109
+ options[key] = newColorObj;
110
+ }
111
+ }
112
+ }
113
+ processWithRegisteredProcessor(key, value, options, path, commandName, passProps) {
114
+ const registeredProcessors = this.optionProcessorsRegistry.getProcessors(path);
115
+ if (registeredProcessors) {
116
+ registeredProcessors.forEach(processor => {
117
+ options[key] = processor(value, commandName, passProps);
118
+ });
119
+ }
120
+ }
121
+ processImage(key, value, options) {
122
+ if (isEqual(key, 'icon') || isEqual(key, 'image') || endsWith(key, 'Icon') || endsWith(key, 'Image')) {
123
+ options[key] = isString(value) ? value : this.assetService.resolveFromRequire(value);
124
+ }
125
+ }
126
+ processButtonsPassProps(key, value) {
127
+ if (endsWith(key, 'Buttons')) {
128
+ forEach(value, button => {
129
+ if (button.passProps && button.id) {
130
+ this.store.setPendingProps(button.id, button.passProps);
131
+ button.passProps = undefined;
132
+ }
133
+ });
134
+ }
135
+ }
136
+ processComponent(key, value, options) {
137
+ if (isEqual(key, 'component')) {
138
+ value.componentId = value.id ? value.id : this.uniqueIdProvider.generate('CustomComponent');
139
+ this.store.ensureClassForName(value.name);
140
+ if (value.passProps) {
141
+ this.store.setPendingProps(value.componentId, value.passProps);
142
+ }
143
+ options[key].passProps = undefined;
144
+ }
145
+ }
146
+ processSearchBar(key, value, options) {
147
+ if (key !== 'searchBar') {
148
+ return;
149
+ }
150
+ const deprecatedSearchBarOptions = {
151
+ visible: false,
152
+ hideOnScroll: options.searchBarHiddenWhenScrolling ?? false,
153
+ hideTopBarOnFocus: options.hideNavBarOnFocusSearchBar ?? false,
154
+ obscuresBackgroundDuringPresentation: false,
155
+ backgroundColor: options.searchBarBackgroundColor,
156
+ tintColor: options.searchBarTintColor,
157
+ placeholder: options.searchBarPlaceholder ?? ''
158
+ };
159
+ if (typeof value === 'boolean') {
160
+ // Deprecated
161
+ this.deprecations.onProcessOptions(key, options, '');
162
+ options[key] = {
163
+ ...deprecatedSearchBarOptions,
164
+ visible: value
165
+ };
166
+ } else {
167
+ options[key] = {
168
+ ...deprecatedSearchBarOptions,
169
+ ...value
170
+ };
171
+ }
172
+ }
173
+ processInterpolation(key, value, options) {
174
+ if (isEqual(key, 'interpolation')) {
175
+ if (typeof value === 'string') {
176
+ this.deprecations.onProcessOptions(key, options, '');
177
+ options[key] = {
178
+ type: options[key]
179
+ };
180
+ }
181
+ }
182
+ }
183
+ processAnimation(key, value, options) {
184
+ this.processSetRootAnimation(key, value, options);
185
+ this.processPush(key, value, options);
186
+ this.processPop(key, value, options);
187
+ this.processSetStackRoot(key, value, options);
188
+ this.processShowModal(key, value, options);
189
+ this.processDismissModal(key, value, options);
190
+ }
191
+ processSetStackRoot(key, animation, parentOptions) {
192
+ if (key !== 'setStackRoot') return;
193
+ if (this.isNewStackAnimationApi(animation)) return;
194
+ this.convertDeprecatedViewAnimationApiToNewStackAnimationApi(animation, parentOptions);
195
+ }
196
+ isNewStackAnimationApi(animation) {
197
+ return has(animation, 'content') || has(animation, 'topBar') || has(animation, 'bottomTabs');
198
+ }
199
+ convertDeprecatedViewAnimationApiToNewStackAnimationApi(animation, parentOptions) {
200
+ if (!has(animation, 'content.enter') && !has(animation, 'content.exit')) {
201
+ parentOptions.setStackRoot = {
202
+ content: {
203
+ enter: animation
204
+ }
205
+ };
206
+ if (has(animation, 'enabled')) {
207
+ parentOptions.setStackRoot.enabled = animation.enabled;
208
+ }
209
+ if (has(animation, 'waitForRender')) {
210
+ parentOptions.setStackRoot.waitForRender = animation.waitForRender;
211
+ }
212
+ }
213
+ }
214
+ processPop(key, animation, parentOptions) {
215
+ if (key !== 'pop') return;
216
+ if (animation.content && !has(animation, 'content.enter') && !has(animation, 'content.exit')) {
217
+ parentOptions.pop.content = {
218
+ exit: animation.content
219
+ };
220
+ }
221
+ if (animation.topBar && !has(animation, 'topBar.enter') && !has(animation, 'topBar.exit')) {
222
+ parentOptions.pop.topBar = {
223
+ exit: animation.topBar
224
+ };
225
+ }
226
+ if (animation.bottomTabs && !has(animation, 'bottomTabs.enter') && !has(animation, 'bottomTabs.exit')) {
227
+ parentOptions.pop.bottomTabs = {
228
+ exit: animation.bottomTabs
229
+ };
230
+ }
231
+ }
232
+ processSetRootAnimation(key, animation, parentOptions) {
233
+ if (key !== 'setRoot') return;
234
+ if (Platform.OS === 'android' && !('enter' in animation)) {
235
+ parentOptions.setRoot = {
236
+ enter: animation
237
+ };
238
+ } else if (Platform.OS === 'ios' && 'enter' in animation) {
239
+ parentOptions.setRoot = animation;
240
+ }
241
+ }
242
+ processShowModal(key, animation, parentOptions) {
243
+ if (key !== 'showModal') return;
244
+ if (!('enter' in animation)) {
245
+ const elementTransitions = animation.elementTransitions;
246
+ const sharedElementTransitions = animation.sharedElementTransitions;
247
+ const enter = {
248
+ ...animation
249
+ };
250
+ delete enter.sharedElementTransitions;
251
+ delete enter.elementTransitions;
252
+ parentOptions.showModal = {
253
+ enter,
254
+ sharedElementTransitions,
255
+ elementTransitions
256
+ };
257
+ }
258
+ }
259
+ processDismissModal(key, animation, parentOptions) {
260
+ if (key !== 'dismissModal') return;
261
+ if (!('exit' in animation)) {
262
+ const elementTransitions = animation.elementTransitions;
263
+ const sharedElementTransitions = animation.sharedElementTransitions;
264
+ const exit = {
265
+ ...animation
266
+ };
267
+ delete exit.sharedElementTransitions;
268
+ delete exit.elementTransitions;
269
+ parentOptions.dismissModal = {
270
+ exit,
271
+ sharedElementTransitions,
272
+ elementTransitions
273
+ };
274
+ }
275
+ }
276
+ processPush(key, animation, parentOptions) {
277
+ if (key !== 'push') return;
278
+ if (animation.content && !has(animation, 'content.enter') && !has(animation, 'content.exit')) {
279
+ parentOptions.push.content = {
280
+ enter: animation.content
281
+ };
282
+ }
283
+ if (animation.topBar && !has(animation, 'topBar.enter') && !has(animation, 'topBar.exit')) {
284
+ parentOptions.push.topBar = {
285
+ enter: animation.topBar
286
+ };
287
+ }
288
+ if (animation.statusBar && !has(animation, 'statusBar.enter') && !has(animation, 'statusBar.exit')) {
289
+ parentOptions.push.statusBar = {
290
+ enter: animation.statusBar
291
+ };
292
+ }
293
+ if (animation.bottomTabs && !has(animation, 'bottomTabs.enter') && !has(animation, 'bottomTabs.exit')) {
294
+ parentOptions.push.bottomTabs = {
295
+ enter: animation.bottomTabs
296
+ };
297
+ }
298
+ }
299
+ }
300
+ //# sourceMappingURL=OptionsProcessor.js.map