react-native-acoustic-connect 19.0.9 → 19.0.28

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 (378) hide show
  1. package/CHANGELOG.md +91 -0
  2. package/ConnectConfig.example.json +1 -1
  3. package/README.md +390 -1
  4. package/android/build.gradle +86 -3
  5. package/android/config.gradle +137 -13
  6. package/android/src/main/assets/ConnectAdvancedConfig.json +1 -1
  7. package/android/src/main/java/com/acousticconnectrn/HybridAcousticConnectRN.kt +407 -34
  8. package/app.plugin.js +2 -2
  9. package/ios/AcousticConnectRNConfig.json +2 -2
  10. package/ios/ConnectRNParsing.swift +229 -0
  11. package/ios/HybridAcousticConnectRN.swift +290 -30
  12. package/lib/commonjs/TLTRN.js +116 -3
  13. package/lib/commonjs/TLTRN.js.map +1 -1
  14. package/lib/commonjs/components/Connect.js +145 -27
  15. package/lib/commonjs/components/Connect.js.map +1 -1
  16. package/lib/commonjs/index.js +3 -0
  17. package/lib/commonjs/index.js.map +1 -1
  18. package/lib/module/TLTRN.js +116 -3
  19. package/lib/module/TLTRN.js.map +1 -1
  20. package/lib/module/components/Connect.js +146 -28
  21. package/lib/module/components/Connect.js.map +1 -1
  22. package/lib/module/index.js +5 -0
  23. package/lib/module/index.js.map +1 -1
  24. package/lib/typescript/src/TLTRN.d.ts +85 -1
  25. package/lib/typescript/src/TLTRN.d.ts.map +1 -1
  26. package/lib/typescript/src/components/Connect.d.ts.map +1 -1
  27. package/lib/typescript/src/index.d.ts +1 -0
  28. package/lib/typescript/src/index.d.ts.map +1 -1
  29. package/lib/typescript/src/specs/react-native-acoustic-connect.nitro.d.ts +178 -10
  30. package/lib/typescript/src/specs/react-native-acoustic-connect.nitro.d.ts.map +1 -1
  31. package/nitrogen/generated/android/c++/JHybridAcousticConnectRNSpec.cpp +5 -9
  32. package/nitrogen/generated/android/c++/JHybridAcousticConnectRNSpec.hpp +1 -1
  33. package/nitrogen/generated/android/kotlin/com/margelo/nitro/acousticconnectrn/HybridAcousticConnectRNSpec.kt +2 -1
  34. package/nitrogen/generated/ios/AcousticConnectRN-Swift-Cxx-Umbrella.hpp +1 -0
  35. package/nitrogen/generated/ios/c++/HybridAcousticConnectRNSpecSwift.hpp +2 -1
  36. package/nitrogen/generated/ios/swift/HybridAcousticConnectRNSpec.swift +1 -1
  37. package/nitrogen/generated/ios/swift/HybridAcousticConnectRNSpec_cxx.swift +2 -25
  38. package/nitrogen/generated/shared/c++/HybridAcousticConnectRNSpec.hpp +2 -1
  39. package/package.json +4 -7
  40. package/plugin/build/withConnectAndroidConfig.d.ts +2 -2
  41. package/plugin/build/withConnectAndroidConfig.js +2 -2
  42. package/plugin/build/withConnectIosSigning.d.ts +1 -1
  43. package/plugin/build/withConnectIosSigning.js +1 -1
  44. package/plugin/src/withConnectAndroidConfig.ts +2 -2
  45. package/plugin/src/withConnectIosSigning.ts +1 -1
  46. package/scripts/gradleParser.js +1 -1
  47. package/src/TLTRN.ts +125 -4
  48. package/src/components/Connect.tsx +150 -27
  49. package/src/index.ts +5 -0
  50. package/src/specs/react-native-acoustic-connect.nitro.ts +180 -10
  51. package/Examples/SampleUI/.bundle/config +0 -2
  52. package/Examples/SampleUI/.detoxrc.js +0 -83
  53. package/Examples/SampleUI/.eslintrc.js +0 -4
  54. package/Examples/SampleUI/.prettierrc.js +0 -7
  55. package/Examples/SampleUI/.watchmanconfig +0 -1
  56. package/Examples/SampleUI/App.js +0 -1
  57. package/Examples/SampleUI/Gemfile +0 -10
  58. package/Examples/SampleUI/Gemfile.lock +0 -121
  59. package/Examples/SampleUI/README.md +0 -79
  60. package/Examples/SampleUI/__tests__/App.test.tsx +0 -17
  61. package/Examples/SampleUI/android/app/build.gradle +0 -129
  62. package/Examples/SampleUI/android/app/debug.keystore +0 -0
  63. package/Examples/SampleUI/android/app/proguard-rules.pro +0 -10
  64. package/Examples/SampleUI/android/app/src/debug/AndroidManifest.xml +0 -9
  65. package/Examples/SampleUI/android/app/src/main/AndroidManifest.xml +0 -31
  66. package/Examples/SampleUI/android/app/src/main/java/com/sampleui/MainActivity.kt +0 -30
  67. package/Examples/SampleUI/android/app/src/main/java/com/sampleui/MainApplication.kt +0 -53
  68. package/Examples/SampleUI/android/app/src/main/res/drawable/rn_edit_text_material.xml +0 -37
  69. package/Examples/SampleUI/android/app/src/main/res/mipmap-hdpi/ic_launcher.png +0 -0
  70. package/Examples/SampleUI/android/app/src/main/res/mipmap-hdpi/ic_launcher_round.png +0 -0
  71. package/Examples/SampleUI/android/app/src/main/res/mipmap-mdpi/ic_launcher.png +0 -0
  72. package/Examples/SampleUI/android/app/src/main/res/mipmap-mdpi/ic_launcher_round.png +0 -0
  73. package/Examples/SampleUI/android/app/src/main/res/mipmap-xhdpi/ic_launcher.png +0 -0
  74. package/Examples/SampleUI/android/app/src/main/res/mipmap-xhdpi/ic_launcher_round.png +0 -0
  75. package/Examples/SampleUI/android/app/src/main/res/mipmap-xxhdpi/ic_launcher.png +0 -0
  76. package/Examples/SampleUI/android/app/src/main/res/mipmap-xxhdpi/ic_launcher_round.png +0 -0
  77. package/Examples/SampleUI/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher.png +0 -0
  78. package/Examples/SampleUI/android/app/src/main/res/mipmap-xxxhdpi/ic_launcher_round.png +0 -0
  79. package/Examples/SampleUI/android/app/src/main/res/values/strings.xml +0 -3
  80. package/Examples/SampleUI/android/app/src/main/res/values/styles.xml +0 -9
  81. package/Examples/SampleUI/android/build.gradle +0 -21
  82. package/Examples/SampleUI/android/gradle/wrapper/gradle-wrapper.jar +0 -0
  83. package/Examples/SampleUI/android/gradle/wrapper/gradle-wrapper.properties +0 -7
  84. package/Examples/SampleUI/android/gradle.properties +0 -39
  85. package/Examples/SampleUI/android/gradlew +0 -252
  86. package/Examples/SampleUI/android/gradlew.bat +0 -94
  87. package/Examples/SampleUI/android/settings.gradle +0 -21
  88. package/Examples/SampleUI/app.json +0 -51
  89. package/Examples/SampleUI/assets/fonts/Abel-Regular.ttf +0 -0
  90. package/Examples/SampleUI/assets/fonts/NotoSans-Regular.ttf +0 -0
  91. package/Examples/SampleUI/assets/images/android-icon.png +0 -0
  92. package/Examples/SampleUI/assets/images/artist-1.jpg +0 -0
  93. package/Examples/SampleUI/assets/images/artist-2.jpg +0 -0
  94. package/Examples/SampleUI/assets/images/avatar.png +0 -0
  95. package/Examples/SampleUI/assets/images/beach.jpg +0 -0
  96. package/Examples/SampleUI/assets/images/bridge.jpg +0 -0
  97. package/Examples/SampleUI/assets/images/chameleon.jpg +0 -0
  98. package/Examples/SampleUI/assets/images/city.jpg +0 -0
  99. package/Examples/SampleUI/assets/images/email-icon.png +0 -0
  100. package/Examples/SampleUI/assets/images/favorite.png +0 -0
  101. package/Examples/SampleUI/assets/images/forest.jpg +0 -0
  102. package/Examples/SampleUI/assets/images/paper-icon.png +0 -0
  103. package/Examples/SampleUI/assets/images/players-2.jpg +0 -0
  104. package/Examples/SampleUI/assets/images/players.jpg +0 -0
  105. package/Examples/SampleUI/assets/images/restaurant-1.jpg +0 -0
  106. package/Examples/SampleUI/assets/images/restaurant-2.jpg +0 -0
  107. package/Examples/SampleUI/assets/images/song-1.jpg +0 -0
  108. package/Examples/SampleUI/assets/images/song-2.jpg +0 -0
  109. package/Examples/SampleUI/assets/images/splash.png +0 -0
  110. package/Examples/SampleUI/assets/images/strawberries.jpg +0 -0
  111. package/Examples/SampleUI/assets/images/wrecked-ship.jpg +0 -0
  112. package/Examples/SampleUI/assets/styles/fonts.css +0 -47
  113. package/Examples/SampleUI/babel.config.js +0 -22
  114. package/Examples/SampleUI/index.js +0 -9
  115. package/Examples/SampleUI/ios/.xcode.env +0 -11
  116. package/Examples/SampleUI/ios/Podfile +0 -71
  117. package/Examples/SampleUI/ios/Podfile.lock +0 -2276
  118. package/Examples/SampleUI/ios/SampleUI/AppDelegate.h +0 -7
  119. package/Examples/SampleUI/ios/SampleUI/AppDelegate.mm +0 -31
  120. package/Examples/SampleUI/ios/SampleUI/Images.xcassets/AppIcon.appiconset/Contents.json +0 -53
  121. package/Examples/SampleUI/ios/SampleUI/Images.xcassets/Contents.json +0 -6
  122. package/Examples/SampleUI/ios/SampleUI/Info.plist +0 -52
  123. package/Examples/SampleUI/ios/SampleUI/LaunchScreen.storyboard +0 -47
  124. package/Examples/SampleUI/ios/SampleUI/PrivacyInfo.xcprivacy +0 -48
  125. package/Examples/SampleUI/ios/SampleUI/main.m +0 -10
  126. package/Examples/SampleUI/ios/SampleUI.xcodeproj/project.pbxproj +0 -785
  127. package/Examples/SampleUI/ios/SampleUI.xcodeproj/xcshareddata/xcschemes/SampleUI.xcscheme +0 -105
  128. package/Examples/SampleUI/ios/SampleUI.xcworkspace/contents.xcworkspacedata +0 -10
  129. package/Examples/SampleUI/ios/SampleUITests/Info.plist +0 -24
  130. package/Examples/SampleUI/ios/SampleUITests/SampleUITests.m +0 -66
  131. package/Examples/SampleUI/jest.config.js +0 -3
  132. package/Examples/SampleUI/metro.config.js +0 -54
  133. package/Examples/SampleUI/package.json +0 -65
  134. package/Examples/SampleUI/scripts/integration-test-android.sh +0 -292
  135. package/Examples/SampleUI/src/DrawerItems.tsx +0 -322
  136. package/Examples/SampleUI/src/ExampleList.tsx +0 -175
  137. package/Examples/SampleUI/src/Examples/ActivityIndicatorExample.tsx +0 -73
  138. package/Examples/SampleUI/src/Examples/AnimatedFABExample/AnimatedFABExample.tsx +0 -220
  139. package/Examples/SampleUI/src/Examples/AnimatedFABExample/CustomFAB.tsx +0 -70
  140. package/Examples/SampleUI/src/Examples/AnimatedFABExample/CustomFABControls.tsx +0 -146
  141. package/Examples/SampleUI/src/Examples/AnimatedFABExample/index.ts +0 -1
  142. package/Examples/SampleUI/src/Examples/AppbarExample.tsx +0 -263
  143. package/Examples/SampleUI/src/Examples/AvatarExample.tsx +0 -76
  144. package/Examples/SampleUI/src/Examples/BadgeExample.tsx +0 -97
  145. package/Examples/SampleUI/src/Examples/BannerExample.tsx +0 -152
  146. package/Examples/SampleUI/src/Examples/BottomNavigationBarExample.tsx +0 -94
  147. package/Examples/SampleUI/src/Examples/BottomNavigationExample.tsx +0 -205
  148. package/Examples/SampleUI/src/Examples/ButtonExample.tsx +0 -405
  149. package/Examples/SampleUI/src/Examples/CardExample.tsx +0 -245
  150. package/Examples/SampleUI/src/Examples/CheckboxExample.tsx +0 -87
  151. package/Examples/SampleUI/src/Examples/CheckboxItemExample.tsx +0 -72
  152. package/Examples/SampleUI/src/Examples/ChipExample.tsx +0 -432
  153. package/Examples/SampleUI/src/Examples/DataTableExample.tsx +0 -128
  154. package/Examples/SampleUI/src/Examples/DialogExample.tsx +0 -217
  155. package/Examples/SampleUI/src/Examples/Dialogs/DialogTextComponent.tsx +0 -31
  156. package/Examples/SampleUI/src/Examples/Dialogs/DialogTrackingTest.tsx +0 -307
  157. package/Examples/SampleUI/src/Examples/Dialogs/DialogWithCustomColors.tsx +0 -57
  158. package/Examples/SampleUI/src/Examples/Dialogs/DialogWithDismissableBackButton.tsx +0 -38
  159. package/Examples/SampleUI/src/Examples/Dialogs/DialogWithIcon.tsx +0 -42
  160. package/Examples/SampleUI/src/Examples/Dialogs/DialogWithLoadingIndicator.tsx +0 -48
  161. package/Examples/SampleUI/src/Examples/Dialogs/DialogWithLongText.tsx +0 -81
  162. package/Examples/SampleUI/src/Examples/Dialogs/DialogWithRadioBtns.tsx +0 -111
  163. package/Examples/SampleUI/src/Examples/Dialogs/UndismissableDialog.tsx +0 -30
  164. package/Examples/SampleUI/src/Examples/Dialogs/index.tsx +0 -44
  165. package/Examples/SampleUI/src/Examples/DividerExample.tsx +0 -30
  166. package/Examples/SampleUI/src/Examples/FABExample.tsx +0 -226
  167. package/Examples/SampleUI/src/Examples/IconButtonExample.tsx +0 -230
  168. package/Examples/SampleUI/src/Examples/IconExample.tsx +0 -50
  169. package/Examples/SampleUI/src/Examples/ListAccordionExample.tsx +0 -65
  170. package/Examples/SampleUI/src/Examples/ListAccordionGroupExample.tsx +0 -80
  171. package/Examples/SampleUI/src/Examples/ListItemExample.tsx +0 -310
  172. package/Examples/SampleUI/src/Examples/ListSectionExample.tsx +0 -159
  173. package/Examples/SampleUI/src/Examples/MaterialBottomTabNavigatorExample.tsx +0 -87
  174. package/Examples/SampleUI/src/Examples/MenuExample.tsx +0 -211
  175. package/Examples/SampleUI/src/Examples/ProgressBarExample.tsx +0 -142
  176. package/Examples/SampleUI/src/Examples/RadioButtonExample.tsx +0 -104
  177. package/Examples/SampleUI/src/Examples/RadioButtonGroupExample.tsx +0 -67
  178. package/Examples/SampleUI/src/Examples/RadioButtonItemExample.tsx +0 -77
  179. package/Examples/SampleUI/src/Examples/SearchbarExample.tsx +0 -249
  180. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonCustomColorCheck.tsx +0 -93
  181. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonDefault.tsx +0 -49
  182. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonDisabled.tsx +0 -47
  183. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonMultiselect.tsx +0 -50
  184. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonMultiselectIcons.tsx +0 -49
  185. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonMultiselectRealCase.tsx +0 -114
  186. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonOnlyIcons.tsx +0 -40
  187. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonOnlyIconsWithCheck.tsx +0 -43
  188. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonRealCase.tsx +0 -97
  189. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonWithDensity.tsx +0 -47
  190. package/Examples/SampleUI/src/Examples/SegmentedButtons/SegmentedButtonWithSelectedCheck.tsx +0 -52
  191. package/Examples/SampleUI/src/Examples/SegmentedButtons/index.ts +0 -9
  192. package/Examples/SampleUI/src/Examples/SegmentedButtonsExample.tsx +0 -57
  193. package/Examples/SampleUI/src/Examples/SnackbarExample.tsx +0 -141
  194. package/Examples/SampleUI/src/Examples/SurfaceExample.tsx +0 -130
  195. package/Examples/SampleUI/src/Examples/SwitchExample.tsx +0 -105
  196. package/Examples/SampleUI/src/Examples/TeamDetails.tsx +0 -291
  197. package/Examples/SampleUI/src/Examples/TeamsList.tsx +0 -57
  198. package/Examples/SampleUI/src/Examples/TextExample.tsx +0 -132
  199. package/Examples/SampleUI/src/Examples/TextInputExample.tsx +0 -914
  200. package/Examples/SampleUI/src/Examples/ThemeExample.tsx +0 -41
  201. package/Examples/SampleUI/src/Examples/ThemingWithReactNavigation.tsx +0 -75
  202. package/Examples/SampleUI/src/Examples/ToggleButtonExample.tsx +0 -128
  203. package/Examples/SampleUI/src/Examples/TooltipExample.tsx +0 -191
  204. package/Examples/SampleUI/src/Examples/TouchableRippleExample.tsx +0 -37
  205. package/Examples/SampleUI/src/RootNavigator.tsx +0 -95
  206. package/Examples/SampleUI/src/ScreenWrapper.tsx +0 -67
  207. package/Examples/SampleUI/src/components/ActivityIndicator.tsx +0 -254
  208. package/Examples/SampleUI/src/components/Appbar/Appbar.tsx +0 -364
  209. package/Examples/SampleUI/src/components/Appbar/AppbarAction.tsx +0 -132
  210. package/Examples/SampleUI/src/components/Appbar/AppbarBackAction.tsx +0 -77
  211. package/Examples/SampleUI/src/components/Appbar/AppbarBackIcon.tsx +0 -52
  212. package/Examples/SampleUI/src/components/Appbar/AppbarContent.tsx +0 -249
  213. package/Examples/SampleUI/src/components/Appbar/AppbarHeader.tsx +0 -174
  214. package/Examples/SampleUI/src/components/Appbar/index.ts +0 -22
  215. package/Examples/SampleUI/src/components/Appbar/utils.ts +0 -188
  216. package/Examples/SampleUI/src/components/Avatar/Avatar.tsx +0 -8
  217. package/Examples/SampleUI/src/components/Avatar/AvatarIcon.tsx +0 -87
  218. package/Examples/SampleUI/src/components/Avatar/AvatarImage.tsx +0 -128
  219. package/Examples/SampleUI/src/components/Avatar/AvatarText.tsx +0 -127
  220. package/Examples/SampleUI/src/components/Badge.tsx +0 -138
  221. package/Examples/SampleUI/src/components/Banner.tsx +0 -302
  222. package/Examples/SampleUI/src/components/BottomNavigation/BottomNavigation.tsx +0 -643
  223. package/Examples/SampleUI/src/components/BottomNavigation/BottomNavigationBar.tsx +0 -1039
  224. package/Examples/SampleUI/src/components/BottomNavigation/BottomNavigationRouteScreen.tsx +0 -31
  225. package/Examples/SampleUI/src/components/BottomNavigation/utils.ts +0 -70
  226. package/Examples/SampleUI/src/components/Button/Button.tsx +0 -503
  227. package/Examples/SampleUI/src/components/Button/utils.tsx +0 -272
  228. package/Examples/SampleUI/src/components/Card/Card.tsx +0 -373
  229. package/Examples/SampleUI/src/components/Card/CardActions.tsx +0 -74
  230. package/Examples/SampleUI/src/components/Card/CardContent.tsx +0 -99
  231. package/Examples/SampleUI/src/components/Card/CardCover.tsx +0 -96
  232. package/Examples/SampleUI/src/components/Card/CardTitle.tsx +0 -236
  233. package/Examples/SampleUI/src/components/Card/utils.tsx +0 -110
  234. package/Examples/SampleUI/src/components/Checkbox/Checkbox.tsx +0 -78
  235. package/Examples/SampleUI/src/components/Checkbox/CheckboxAndroid.tsx +0 -180
  236. package/Examples/SampleUI/src/components/Checkbox/CheckboxIOS.tsx +0 -104
  237. package/Examples/SampleUI/src/components/Checkbox/CheckboxItem.tsx +0 -236
  238. package/Examples/SampleUI/src/components/Checkbox/index.ts +0 -19
  239. package/Examples/SampleUI/src/components/Checkbox/utils.ts +0 -183
  240. package/Examples/SampleUI/src/components/Chip/Chip.tsx +0 -513
  241. package/Examples/SampleUI/src/components/Chip/helpers.tsx +0 -322
  242. package/Examples/SampleUI/src/components/CrossFadeIcon.tsx +0 -140
  243. package/Examples/SampleUI/src/components/DataTable/DataTable.tsx +0 -138
  244. package/Examples/SampleUI/src/components/DataTable/DataTableCell.tsx +0 -132
  245. package/Examples/SampleUI/src/components/DataTable/DataTableHeader.tsx +0 -82
  246. package/Examples/SampleUI/src/components/DataTable/DataTablePagination.tsx +0 -407
  247. package/Examples/SampleUI/src/components/DataTable/DataTableRow.tsx +0 -107
  248. package/Examples/SampleUI/src/components/DataTable/DataTableTitle.tsx +0 -208
  249. package/Examples/SampleUI/src/components/Dialog/Dialog.tsx +0 -191
  250. package/Examples/SampleUI/src/components/Dialog/DialogActions.tsx +0 -94
  251. package/Examples/SampleUI/src/components/Dialog/DialogContent.tsx +0 -54
  252. package/Examples/SampleUI/src/components/Dialog/DialogIcon.tsx +0 -100
  253. package/Examples/SampleUI/src/components/Dialog/DialogScrollArea.tsx +0 -88
  254. package/Examples/SampleUI/src/components/Dialog/DialogTitle.tsx +0 -94
  255. package/Examples/SampleUI/src/components/Divider.tsx +0 -102
  256. package/Examples/SampleUI/src/components/Drawer/Drawer.tsx +0 -8
  257. package/Examples/SampleUI/src/components/Drawer/DrawerCollapsedItem.tsx +0 -282
  258. package/Examples/SampleUI/src/components/Drawer/DrawerItem.tsx +0 -209
  259. package/Examples/SampleUI/src/components/Drawer/DrawerSection.tsx +0 -138
  260. package/Examples/SampleUI/src/components/FAB/AnimatedFAB.tsx +0 -619
  261. package/Examples/SampleUI/src/components/FAB/FAB.tsx +0 -371
  262. package/Examples/SampleUI/src/components/FAB/FABGroup.tsx +0 -532
  263. package/Examples/SampleUI/src/components/FAB/index.ts +0 -13
  264. package/Examples/SampleUI/src/components/FAB/utils.ts +0 -474
  265. package/Examples/SampleUI/src/components/HelperText/HelperText.tsx +0 -168
  266. package/Examples/SampleUI/src/components/HelperText/utils.ts +0 -30
  267. package/Examples/SampleUI/src/components/Icon.tsx +0 -170
  268. package/Examples/SampleUI/src/components/IconButton/IconButton.tsx +0 -234
  269. package/Examples/SampleUI/src/components/IconButton/utils.ts +0 -190
  270. package/Examples/SampleUI/src/components/List/List.tsx +0 -20
  271. package/Examples/SampleUI/src/components/List/ListAccordion.tsx +0 -391
  272. package/Examples/SampleUI/src/components/List/ListAccordionGroup.tsx +0 -88
  273. package/Examples/SampleUI/src/components/List/ListIcon.tsx +0 -79
  274. package/Examples/SampleUI/src/components/List/ListImage.tsx +0 -89
  275. package/Examples/SampleUI/src/components/List/ListItem.tsx +0 -313
  276. package/Examples/SampleUI/src/components/List/ListSection.tsx +0 -87
  277. package/Examples/SampleUI/src/components/List/ListSubheader.tsx +0 -79
  278. package/Examples/SampleUI/src/components/List/utils.ts +0 -113
  279. package/Examples/SampleUI/src/components/MaterialCommunityIcon.tsx +0 -121
  280. package/Examples/SampleUI/src/components/Menu/Menu.tsx +0 -711
  281. package/Examples/SampleUI/src/components/Menu/MenuItem.tsx +0 -257
  282. package/Examples/SampleUI/src/components/Menu/utils.ts +0 -110
  283. package/Examples/SampleUI/src/components/Modal.tsx +0 -245
  284. package/Examples/SampleUI/src/components/Portal/Portal.tsx +0 -69
  285. package/Examples/SampleUI/src/components/Portal/PortalConsumer.tsx +0 -44
  286. package/Examples/SampleUI/src/components/Portal/PortalHost.tsx +0 -143
  287. package/Examples/SampleUI/src/components/Portal/PortalManager.tsx +0 -54
  288. package/Examples/SampleUI/src/components/ProgressBar.tsx +0 -292
  289. package/Examples/SampleUI/src/components/RadioButton/RadioButton.tsx +0 -86
  290. package/Examples/SampleUI/src/components/RadioButton/RadioButtonAndroid.tsx +0 -202
  291. package/Examples/SampleUI/src/components/RadioButton/RadioButtonGroup.tsx +0 -67
  292. package/Examples/SampleUI/src/components/RadioButton/RadioButtonIOS.tsx +0 -130
  293. package/Examples/SampleUI/src/components/RadioButton/RadioButtonItem.tsx +0 -268
  294. package/Examples/SampleUI/src/components/RadioButton/index.ts +0 -22
  295. package/Examples/SampleUI/src/components/RadioButton/utils.ts +0 -37
  296. package/Examples/SampleUI/src/components/Searchbar.tsx +0 -459
  297. package/Examples/SampleUI/src/components/SegmentedButtons/SegmentedButtonItem.tsx +0 -271
  298. package/Examples/SampleUI/src/components/SegmentedButtons/SegmentedButtons.tsx +0 -197
  299. package/Examples/SampleUI/src/components/SegmentedButtons/utils.ts +0 -179
  300. package/Examples/SampleUI/src/components/Snackbar.tsx +0 -430
  301. package/Examples/SampleUI/src/components/Surface.tsx +0 -376
  302. package/Examples/SampleUI/src/components/Switch/Switch.tsx +0 -108
  303. package/Examples/SampleUI/src/components/Switch/utils.ts +0 -113
  304. package/Examples/SampleUI/src/components/TextInput/Addons/Outline.tsx +0 -64
  305. package/Examples/SampleUI/src/components/TextInput/Addons/Underline.tsx +0 -78
  306. package/Examples/SampleUI/src/components/TextInput/Adornment/TextInputAdornment.tsx +0 -208
  307. package/Examples/SampleUI/src/components/TextInput/Adornment/TextInputAffix.tsx +0 -212
  308. package/Examples/SampleUI/src/components/TextInput/Adornment/TextInputIcon.tsx +0 -195
  309. package/Examples/SampleUI/src/components/TextInput/Adornment/enums.tsx +0 -12
  310. package/Examples/SampleUI/src/components/TextInput/Adornment/types.tsx +0 -11
  311. package/Examples/SampleUI/src/components/TextInput/Adornment/utils.ts +0 -48
  312. package/Examples/SampleUI/src/components/TextInput/Label/InputLabel.tsx +0 -217
  313. package/Examples/SampleUI/src/components/TextInput/Label/LabelBackground.tsx +0 -100
  314. package/Examples/SampleUI/src/components/TextInput/TextInput.tsx +0 -572
  315. package/Examples/SampleUI/src/components/TextInput/TextInputFlat.tsx +0 -475
  316. package/Examples/SampleUI/src/components/TextInput/TextInputOutlined.tsx +0 -450
  317. package/Examples/SampleUI/src/components/TextInput/constants.tsx +0 -48
  318. package/Examples/SampleUI/src/components/TextInput/helpers.tsx +0 -612
  319. package/Examples/SampleUI/src/components/TextInput/types.tsx +0 -155
  320. package/Examples/SampleUI/src/components/ToggleButton/ToggleButton.tsx +0 -187
  321. package/Examples/SampleUI/src/components/ToggleButton/ToggleButtonGroup.tsx +0 -72
  322. package/Examples/SampleUI/src/components/ToggleButton/ToggleButtonRow.tsx +0 -107
  323. package/Examples/SampleUI/src/components/ToggleButton/index.ts +0 -16
  324. package/Examples/SampleUI/src/components/ToggleButton/utils.ts +0 -26
  325. package/Examples/SampleUI/src/components/Tooltip/Tooltip.tsx +0 -249
  326. package/Examples/SampleUI/src/components/Tooltip/utils.ts +0 -129
  327. package/Examples/SampleUI/src/components/TouchableRipple/Pressable.tsx +0 -41
  328. package/Examples/SampleUI/src/components/TouchableRipple/TouchableRipple.native.tsx +0 -145
  329. package/Examples/SampleUI/src/components/TouchableRipple/TouchableRipple.tsx +0 -317
  330. package/Examples/SampleUI/src/components/TouchableRipple/utils.ts +0 -66
  331. package/Examples/SampleUI/src/components/Typography/AnimatedText.tsx +0 -107
  332. package/Examples/SampleUI/src/components/Typography/Text.tsx +0 -184
  333. package/Examples/SampleUI/src/components/Typography/types.tsx +0 -5
  334. package/Examples/SampleUI/src/components/Typography/v2/Caption.tsx +0 -50
  335. package/Examples/SampleUI/src/components/Typography/v2/Headline.tsx +0 -52
  336. package/Examples/SampleUI/src/components/Typography/v2/Paragraph.tsx +0 -49
  337. package/Examples/SampleUI/src/components/Typography/v2/StyledText.tsx +0 -56
  338. package/Examples/SampleUI/src/components/Typography/v2/Subheading.tsx +0 -50
  339. package/Examples/SampleUI/src/components/Typography/v2/Text.tsx +0 -62
  340. package/Examples/SampleUI/src/components/Typography/v2/Title.tsx +0 -49
  341. package/Examples/SampleUI/src/components/Typography/v2/index.ts +0 -5
  342. package/Examples/SampleUI/src/core/PaperProvider.tsx +0 -122
  343. package/Examples/SampleUI/src/core/SafeAreaProviderCompat.tsx +0 -65
  344. package/Examples/SampleUI/src/core/settings.tsx +0 -23
  345. package/Examples/SampleUI/src/core/theming.tsx +0 -170
  346. package/Examples/SampleUI/src/index.native.tsx +0 -285
  347. package/Examples/SampleUI/src/index.tsx +0 -226
  348. package/Examples/SampleUI/src/react-navigation/index.tsx +0 -19
  349. package/Examples/SampleUI/src/react-navigation/navigators/createMaterialBottomTabNavigator.tsx +0 -72
  350. package/Examples/SampleUI/src/react-navigation/types.tsx +0 -126
  351. package/Examples/SampleUI/src/react-navigation/views/MaterialBottomTabView.tsx +0 -140
  352. package/Examples/SampleUI/src/styles/__tests__/fonts.test.js +0 -290
  353. package/Examples/SampleUI/src/styles/fonts.tsx +0 -143
  354. package/Examples/SampleUI/src/styles/overlay.tsx +0 -70
  355. package/Examples/SampleUI/src/styles/shadow.tsx +0 -109
  356. package/Examples/SampleUI/src/styles/themes/index.ts +0 -4
  357. package/Examples/SampleUI/src/styles/themes/v2/DarkTheme.tsx +0 -30
  358. package/Examples/SampleUI/src/styles/themes/v2/LightTheme.tsx +0 -30
  359. package/Examples/SampleUI/src/styles/themes/v2/colors.tsx +0 -277
  360. package/Examples/SampleUI/src/styles/themes/v3/DarkTheme.tsx +0 -66
  361. package/Examples/SampleUI/src/styles/themes/v3/LightTheme.tsx +0 -69
  362. package/Examples/SampleUI/src/styles/themes/v3/tokens.tsx +0 -230
  363. package/Examples/SampleUI/src/utils/BackHandler/BackHandler.native.tsx +0 -3
  364. package/Examples/SampleUI/src/utils/BackHandler/BackHandler.tsx +0 -11
  365. package/Examples/SampleUI/src/utils/addEventListener.tsx +0 -56
  366. package/Examples/SampleUI/src/utils/forwardRef.tsx +0 -23
  367. package/Examples/SampleUI/src/utils/getContrastingColor.tsx +0 -15
  368. package/Examples/SampleUI/src/utils/hasTouchHandler.tsx +0 -23
  369. package/Examples/SampleUI/src/utils/roundLayoutSize.ts +0 -2
  370. package/Examples/SampleUI/src/utils/splitStyles.ts +0 -60
  371. package/Examples/SampleUI/src/utils/useAnimatedValue.tsx +0 -9
  372. package/Examples/SampleUI/src/utils/useAnimatedValueArray.tsx +0 -13
  373. package/Examples/SampleUI/src/utils/useIsKeyboardShown.tsx +0 -55
  374. package/Examples/SampleUI/src/utils/useLayout.tsx +0 -29
  375. package/Examples/SampleUI/src/utils/useLazyRef.tsx +0 -11
  376. package/Examples/SampleUI/tsconfig.json +0 -3
  377. package/Examples/SampleUI/utils/index.ts +0 -1426
  378. package/cli/__tests__/doctor.test.mjs +0 -88
@@ -10,7 +10,7 @@
10
10
  * prohibited.
11
11
  ********************************************************************************************/
12
12
  import React, { useCallback, useEffect, useRef, useState } from "react";
13
- import { View, StyleSheet, Platform } from "react-native";
13
+ import { View, StyleSheet } from "react-native";
14
14
  // Use type-only import for LayoutChangeEvent
15
15
  import TLTRN from '../TLTRN';
16
16
  import { jsx as _jsx } from "react/jsx-runtime";
@@ -56,14 +56,13 @@ const Connect = ({
56
56
  // ref is usable, then flip `navReady` to subscribe. The direct-child case
57
57
  // resolves on the first synchronous check (no polling, no warning). If the
58
58
  // ref never attaches within the grace window we warn once, as before.
59
- // See CA-144314.
60
59
  useEffect(() => {
61
60
  // Reset readiness whenever the resolved ref changes. Without this, a
62
61
  // `navigationRef` prop swap leaves `navReady` stale-true, so the
63
62
  // subscription effect below re-runs and attaches `addListener` to the
64
63
  // old container (whose `.current` is still non-null mid-transition)
65
64
  // before the new ref is validated. Resetting forces re-validation
66
- // through `isUsable()` before tracking re-enables. See CA-144314.
65
+ // through `isUsable()` before tracking re-enables.
67
66
  setNavReady(false);
68
67
  const isUsable = () => !!navigation && !!navigation.current && typeof navigation.current.addListener === "function" && typeof navigation.current.getCurrentRoute === "function";
69
68
  if (isUsable()) {
@@ -99,13 +98,28 @@ const Connect = ({
99
98
 
100
99
  // Listen for the 'state' event to track navigation state changes
101
100
  const unsubscribeState = navigation.current.addListener("state", () => {
102
- currentRoute.current = extractName(navigation) || navigation.current.getCurrentRoute()?.name;
103
- if (Platform.OS === "ios" && currentRoute && currentRoute.current) {
104
- TLTRN.logScreenViewPageName(currentRoute.current);
105
- } else if (Platform.OS === "android") {
106
- TLTRN.logScreenViewPageName(currentRoute.current);
107
- TLTRN.logScreenLayout(currentRoute.current);
101
+ // extractName resolves the focused route through the nested
102
+ // navigators itself, so there is no outer-level fallback to chain
103
+ // here — one used to be appended, which reported the tab name for
104
+ // every push inside that tab.
105
+ currentRoute.current = extractName(navigation);
106
+
107
+ // Both platforms take the same path. iOS used to be excluded from
108
+ // the layout call, which left the wrapper with no layout trigger
109
+ // at all there: the one remaining bridge caller was TLTRN's
110
+ // render-settle timer, so a plain navigation captured nothing.
111
+ if (!currentRoute.current) {
112
+ return;
108
113
  }
114
+ TLTRN.logScreenViewPageName(currentRoute.current);
115
+ // Deliberately no delay argument. TLTRN then sends its
116
+ // "use the configured CaptureLayoutDelay" sentinel, so the capture
117
+ // is deferred past the transition. Passing 0 would select the
118
+ // native synchronous overload instead, which captures on the
119
+ // calling thread at the *start* of the transition — React
120
+ // Navigation fires 'state' before the animation runs — and makes
121
+ // CaptureLayoutDelay inert.
122
+ TLTRN.logScreenLayout(currentRoute.current);
109
123
  });
110
124
 
111
125
  // Cleanup listeners when the component unmounts or dependencies change
@@ -114,11 +128,9 @@ const Connect = ({
114
128
  };
115
129
  }, [navReady, navigation]);
116
130
  const onStartShouldSetResponderCapture = useCallback(event => {
117
- if (navigation?.current?.getCurrentRoute) {
118
- currentRoute.current = extractName(navigation) || navigation.current.getCurrentRoute()?.name;
119
- if (currentRoute.current) {
120
- TLTRN.logScreenViewPageName(currentRoute.current);
121
- }
131
+ currentRoute.current = extractName(navigation);
132
+ if (currentRoute.current) {
133
+ TLTRN.logScreenViewPageName(currentRoute.current);
122
134
  }
123
135
  TLTRN.logClickEvent(event);
124
136
  return false; // Must remain false so events bubble to the host app's handlers
@@ -128,13 +140,19 @@ const Connect = ({
128
140
  return false;
129
141
  }
130
142
  initial.current = true;
131
- if (navigation?.current?.getCurrentRoute) {
132
- currentRoute.current = navigation.current.getCurrentRoute()?.name;
133
- if (Platform.OS === "ios" && currentRoute.current) {
134
- TLTRN.logScreenViewPageName(currentRoute.current);
135
- } else if (Platform.OS === "android") {
136
- TLTRN.logScreenLayout(currentRoute.current);
137
- }
143
+
144
+ // Resolved through extractName like the other two triggers. This site
145
+ // used to read `getCurrentRoute()?.name` directly, so a `params.name`
146
+ // override was honoured on navigation but silently ignored for the
147
+ // first-paint screen — the same screen reported under two names.
148
+ currentRoute.current = extractName(navigation);
149
+ // Same unification as the 'state' listener above: the split sent
150
+ // only a screenview on iOS and only a layout on Android, so
151
+ // neither platform got both from the first-paint trigger. No delay
152
+ // argument, for the reason given there.
153
+ if (currentRoute.current) {
154
+ TLTRN.logScreenViewPageName(currentRoute.current);
155
+ TLTRN.logScreenLayout(currentRoute.current);
138
156
  }
139
157
  return true;
140
158
  }, [navigation]);
@@ -147,15 +165,115 @@ const Connect = ({
147
165
  }) : children
148
166
  });
149
167
  };
168
+
169
+ /**
170
+ * Walks a React Navigation state down to the deepest **focused** route.
171
+ *
172
+ * Nested navigators are the default architecture of production RN apps: a tab
173
+ * navigator whose tabs each hold a stack. The container's root state then
174
+ * describes only the outer level, and the route that the user is actually
175
+ * looking at lives in `routes[index].state`, recursively. Reading the outer
176
+ * level alone reports the *tab* name for every push inside that tab, so screen
177
+ * changes below the first level are invisible to analytics and replay.
178
+ *
179
+ * `index` can legitimately be absent on a partial/rehydrated state, in which
180
+ * case React Navigation treats the last route as focused — matched here.
181
+ *
182
+ * A depth cap guards against a malformed state whose nesting cycles; 32 is far
183
+ * past any real navigator tree.
184
+ */
185
+ function findFocusedRoute(state) {
186
+ let current = state;
187
+ let depth = 0;
188
+ while (current?.routes?.length && depth++ < 32) {
189
+ const index = current.index ?? current.routes.length - 1;
190
+ const route = current.routes[index];
191
+ if (!route?.state?.routes?.length) {
192
+ return route;
193
+ }
194
+ current = route.state;
195
+ }
196
+ return undefined;
197
+ }
198
+
199
+ /**
200
+ * Containers already reported by {@link warnExtractNameFailed}.
201
+ *
202
+ * Keyed by the container itself, so a ref that throws on every navigation
203
+ * produces one line rather than one per transition, while a genuinely
204
+ * different container still gets its own. A `WeakSet` holds no strong
205
+ * reference, so remembering a container cannot keep it alive.
206
+ */
207
+ const extractNameErrorReported = new WeakSet();
208
+
209
+ /**
210
+ * Reports, once per container, that resolving the current route threw.
211
+ *
212
+ * A throw here is expected and harmless during teardown, which is why
213
+ * ``extractName`` swallows it. A ref that keeps throwing is a different
214
+ * matter: every screen view goes unnamed, and without a line here that looks
215
+ * exactly like a ref that never attached. One warning separates the two
216
+ * without flooding a listener that fires per navigation.
217
+ */
218
+ function warnExtractNameFailed(container, error) {
219
+ if (typeof container === "object" && container !== null) {
220
+ if (extractNameErrorReported.has(container)) {
221
+ return;
222
+ }
223
+ extractNameErrorReported.add(container);
224
+ }
225
+ console.warn("Connect: could not resolve the current route — the navigation container ref threw. " + "Screen views stay unnamed while this persists (harmless if the container is unmounting). " + "Cause:", error);
226
+ }
227
+
228
+ /**
229
+ * The screen name to report for the navigation container's current position.
230
+ *
231
+ * Resolution order:
232
+ *
233
+ * 1. The focused route resolved from `getRootState()` by ``findFocusedRoute``.
234
+ * Taking the state and walking it here — rather than trusting a single
235
+ * accessor — keeps the wrapper correct regardless of whether the host app's
236
+ * navigation library resolves nesting inside `getCurrentRoute()`, and works
237
+ * for a custom container ref that exposes state but not that helper.
238
+ * 2. `getCurrentRoute()`, for refs that expose no `getRootState`.
239
+ *
240
+ * Either way `params.name` wins over the route's own `name` when the host app
241
+ * supplies it — the documented override for giving a route a human-readable
242
+ * analytics name. Only a non-empty string counts, so `params: { name: '' }`
243
+ * falls through to the route name instead of blanking the screenview.
244
+ *
245
+ * Returns `""` when nothing resolves, which both callers treat as "skip".
246
+ */
150
247
  function extractName(navigation) {
151
- const routeParams = navigation?.current?.getCurrentRoute?.()?.params;
152
- if (routeParams) {
153
- const {
154
- name
155
- } = routeParams;
156
- return name ? name : navigation.current?.getCurrentRoute()?.name || "";
248
+ const container = navigation?.current;
249
+ if (!container) {
250
+ return "";
251
+ }
252
+ let route;
253
+ try {
254
+ route = findFocusedRoute(container.getRootState?.());
255
+ } catch (error) {
256
+ // A container mid-teardown can throw out of getRootState(). Screen
257
+ // naming is not worth taking the host app's navigation down for.
258
+ warnExtractNameFailed(container, error);
259
+ route = undefined;
260
+ }
261
+ if (!route) {
262
+ try {
263
+ route = container.getCurrentRoute?.();
264
+ } catch (error) {
265
+ warnExtractNameFailed(container, error);
266
+ route = undefined;
267
+ }
268
+ }
269
+ if (!route) {
270
+ return "";
271
+ }
272
+ const overridden = route.params?.name;
273
+ if (typeof overridden === "string" && overridden.length > 0) {
274
+ return overridden;
157
275
  }
158
- return "";
276
+ return typeof route.name === "string" ? route.name : "";
159
277
  }
160
278
  export default Connect;
161
279
  const styles = StyleSheet.create({
@@ -1 +1 @@
1
- {"version":3,"names":["React","useCallback","useEffect","useRef","useState","View","StyleSheet","Platform","TLTRN","jsx","_jsx","Connect","children","captureKeyboardEvents","captureDialogEvents","navigationRef","child","childProvidedRef","props","ref","internalRef","navigation","shouldInjectRef","isValidElement","currentRoute","undefined","initial","navReady","setNavReady","interceptKeyboardEvents","interceptDialogEvents","isUsable","current","addListener","getCurrentRoute","attempts","POLL_INTERVAL_MS","MAX_ATTEMPTS","timer","poll","console","warn","setTimeout","clearTimeout","unsubscribeState","extractName","name","OS","logScreenViewPageName","logScreenLayout","onStartShouldSetResponderCapture","event","logClickEvent","onLayout","_event","style","styles","connect_main","cloneElement","routeParams","params","create","flex"],"sourceRoot":"../../../src","sources":["components/Connect.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ,QAAQ,OAAO;AACvE,SAASC,IAAI,EAAEC,UAAU,EAAEC,QAAQ,QAAQ,cAAc;AACF;AACvD,OAAOC,KAAK,MAAM,UAAU;AAAC,SAAAC,GAAA,IAAAC,IAAA;AAoB7B,MAAMC,OAA+B,GAAGA,CAAC;EACrCC,QAAQ;EACRC,qBAAqB;EACrBC,mBAAmB,GAAG,KAAK;EAC3BC;AACJ,CAAC,KAAK;EACF,MAAMC,KAAK,GAAGJ,QAAe;EAC7B;EACA;EACA;EACA,MAAMK,gBAAgB,GAAGD,KAAK,EAAEE,KAAK,EAAEC,GAAG,IAAIH,KAAK,EAAEG,GAAG;EACxD,MAAMC,WAAW,GAAGjB,MAAM,CAAM,IAAI,CAAC;;EAErC;EACA;EACA;EACA;EACA,MAAMkB,UAAU,GAAGN,aAAa,IAAIE,gBAAgB,IAAIG,WAAW;EACnE,M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YAAY,CAAC1C,KAAK,EAA6B;MAAEG,GAAG,EAAEC;IAAY,CAAC,CAAC,GAC1ER;EAAQ,CACZ,CAAC;AAEf,CAAC;AAED,SAASiC,WAAWA,CAACxB,UAAe,EAAU;EAC1C,MAAMsC,WAAW,GAAGtC,UAAU,EAAEW,OAAO,EAAEE,eAAe,GAAG,CAAC,EAAE0B,MAAM;EACpE,IAAID,WAAW,EAAE;IACb,MAAM;MAAEb;IAAK,CAAC,GAAGa,WAAW;IAC5B,OAAOb,IAAI,GAAGA,IAAI,GAAGzB,UAAU,CAACW,OAAO,EAAEE,eAAe,CAAC,CAAC,EAAEY,IAAI,IAAI,EAAE;EAC1E;EACA,OAAO,EAAE;AACb;AAEA,eAAenC,OAAO;AAEtB,MAAM6C,MAAM,GAAGlD,UAAU,CAACuD,MAAM,CAAC;EAC7BJ,YAAY,EAAE;IACVK,IAAI,EAAE;EACV;AACJ,CAAC,CAAC","ignoreList":[]}
1
+ {"version":3,"names":["React","useCallback","useEffect","useRef","useState","View","StyleSheet","TLTRN","jsx","_jsx","Connect","children","captureKeyboardEvents","captureDialogEvents","navigationRef","child","childProvidedRef","props","ref","internalRef","navigation","shouldInjectRef","isValidElement","currentRoute","undefined","initial","navReady","setNavReady","interceptKeyboardEvents","interceptDialogEvents","isUsable","current","addListener","getCurrentRoute","attempts","POLL_INTERVAL_MS","MAX_ATTEMPTS","timer","poll","console","warn","setTimeout","clearTimeout","unsubscribeState","extractName","logScreenViewPageName","logScreenLayout","onStartShouldSetResponderCapture","event","logClickEvent","onLayout","_event","style","styles","connect_main","cloneElement","findFocusedRoute","state","depth","routes","length","index","route","extractNameErrorReported","WeakSet","warnExtractNameFailed","container","error","has","add","getRootState","overridden","params","name","create","flex"],"sourceRoot":"../../../src","sources":["components/Connect.tsx"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA,OAAOA,KAAK,IAAIC,WAAW,EAAEC,SAAS,EAAEC,MAAM,EAAEC,QAAQ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to load the native HybridObject. This almost ' + 'always means a `react-native-nitro-modules` version mismatch: this SDK is ' + 'built against the exact version declared in its peerDependencies, so your ' + 'app must resolve that same version (check `npm ls react-native-nitro-modules`). ' + `Original error: ${String(error)}`);
36
36
  }
37
37
  export { Connect, TLTRN, KeyboardListener, DialogListener, useDialogTracking, DialogDebugger, withAcousticAutoDialog };
38
+
39
+ // Re-exported so callers can name a `logSignal` payload without importing
40
+ // from `react-native-nitro-modules` — the spec aliases nitro's AnyMap only
41
+ // because that is the one type nitrogen accepts for arbitrary JSON.
42
+
38
43
  export default AcousticConnectRN;
39
44
  //# sourceMappingURL=index.js.map
@@ -1 +1 @@
1
- {"version":3,"names":["NitroModules","Connect","KeyboardListener","DialogListener","useDialogTracking","withAcousticAutoDialog","DialogDebugger","TLTRN","AcousticConnectRN","createHybridObject","error","Error","String"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,4BAA4B;AAEzD,OAAOC,OAAO,MAAM,sBAAsB;AAC1C,OAAOC,gBAAgB,MAAM,0BAA0B;AACvD,OAAOC,cAAc,MAAM,wBAAwB;AACnD,OAAOC,iBAAiB,MAAM,2BAA2B;AACzD,SAASC,sBAAsB,QAAQ,gCAAgC;AACvE,OAAOC,cAAc,MAAM,wBAAwB;AACnD,OAAOC,KAAK,MAAM,SAAS;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,iBAAwC;AAC5C,IAAI;EACFA,iBAAiB,GAAGR,YAAY,CAACS,kBAAkB,CAAwB,mBAAmB,CAAC;AACjG,CAAC,CAAC,OAAOC,KAAK,EAAE;EACd,MAAM,IAAIC,KAAK,CACb,0EAA0E,GACxE,4EAA4E,GAC5E,4EAA4E,GAC5E,kFAAkF,GAClF,mBAAmBC,MAAM,CAACF,KAAK,CAAC,EACpC,CAAC;AACH;AAEA,SAAST,OAAO,EAAEM,KAAK,EAAEL,gBAAgB,EAAEC,cAAc,EAAEC,iBAAiB,EAAEE,cAAc,EAAED,sBAAsB;AACpH,eAAeG,iBAAiB","ignoreList":[]}
1
+ {"version":3,"names":["NitroModules","Connect","KeyboardListener","DialogListener","useDialogTracking","withAcousticAutoDialog","DialogDebugger","TLTRN","AcousticConnectRN","createHybridObject","error","Error","String"],"sourceRoot":"../../src","sources":["index.ts"],"mappings":";;AAAA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;AACA;;AAEA,SAASA,YAAY,QAAQ,4BAA4B;AAEzD,OAAOC,OAAO,MAAM,sBAAsB;AAC1C,OAAOC,gBAAgB,MAAM,0BAA0B;AACvD,OAAOC,cAAc,MAAM,wBAAwB;AACnD,OAAOC,iBAAiB,MAAM,2BAA2B;AACzD,SAASC,sBAAsB,QAAQ,gCAAgC;AACvE,OAAOC,cAAc,MAAM,wBAAwB;AACnD,OAAOC,KAAK,MAAM,SAAS;;AAE3B;AACA;AACA;AACA;AACA;AACA;AACA,IAAIC,iBAAwC;AAC5C,IAAI;EACFA,iBAAiB,GAAGR,YAAY,CAACS,kBAAkB,CAAwB,mBAAmB,CAAC;AACjG,CAAC,CAAC,OAAOC,KAAK,EAAE;EACd,MAAM,IAAIC,KAAK,CACb,0EAA0E,GACxE,4EAA4E,GAC5E,4EAA4E,GAC5E,kFAAkF,GAClF,mBAAmBC,MAAM,CAACF,KAAK,CAAC,EACpC,CAAC;AACH;AAEA,SAAST,OAAO,EAAEM,KAAK,EAAEL,gBAAgB,EAAEC,cAAc,EAAEC,iBAAiB,EAAEE,cAAc,EAAED,sBAAsB;;AAEpH;AACA;AACA;;AAEA,eAAeG,iBAAiB","ignoreList":[]}
@@ -35,13 +35,97 @@ declare class TLTRN {
35
35
  static interceptKeyboardEvents: (enable: boolean) => void;
36
36
  static logScreenViewPageName: (name: string | undefined) => boolean;
37
37
  static logScreenViewContextLoad: (name: string, prevName: string) => boolean;
38
- static logScreenLayout: (name: string | undefined) => boolean;
38
+ /**
39
+ * Sentinel for the native `delay` argument meaning "use the
40
+ * `CaptureLayoutDelay` configured for this screen". Both bridges resolve it
41
+ * from the layout config; anything >= 0 is an explicit delay in
42
+ * milliseconds.
43
+ */
44
+ static USE_CONFIGURED_CAPTURE_DELAY: number;
45
+ /**
46
+ * Captures the layout of the current screen.
47
+ *
48
+ * @param name Screen name to associate with the capture.
49
+ * @param delayMs Milliseconds to wait before capturing. Omit it to use the
50
+ * `CaptureLayoutDelay` from `ConnectConfig.json` — that is the setting to
51
+ * reach for when a screen transition animation is still running and the
52
+ * capture would otherwise catch a half-rendered screen. Pass `0` to
53
+ * capture immediately.
54
+ *
55
+ * Passing no delay used to send a hardcoded `0`, which made
56
+ * `CaptureLayoutDelay` inert for React Native apps and fired the capture at
57
+ * the *start* of the transition rather than after it.
58
+ *
59
+ * @returns With no `delayMs` — the normal case — only that the capture was
60
+ * **scheduled**, not that it produced a layout message. The native
61
+ * deferred overload dispatches and returns immediately, so anything that
62
+ * goes wrong once it runs (no view controller resolved, layout capture
63
+ * gated off by config) cannot be reflected here; those surface in logcat
64
+ * / os_log instead. Pass `0` and the value describes the capture itself,
65
+ * at the cost of capturing mid-transition.
66
+ */
67
+ static logScreenLayout: (name: string | undefined, delayMs?: number) => boolean;
39
68
  static logClickEvent: (event: any) => Promise<boolean>;
40
69
  static logTextChangeEvent: (target: number, controlId: string, text: string, _ariaLabel: string) => Promise<boolean>;
70
+ /**
71
+ * Keys already warned about, so a call site inside a render or a list loop
72
+ * warns once rather than on every pass.
73
+ */
74
+ static warnedNestedValueSites: Set<string>;
75
+ /**
76
+ * Cap on {@link warnedNestedValueSites}.
77
+ *
78
+ * The site key includes the nested keys' names, so a payload built from an
79
+ * API response — per-record ids, timestamps — makes every call a distinct
80
+ * site, and the set would then grow for the life of the session. By the
81
+ * hundredth distinct shape the warning has made its point, so it stops
82
+ * instead of accumulating: bounded memory matters more than warning about
83
+ * shape 101.
84
+ */
85
+ static WARNED_NESTED_VALUE_SITES_MAX: number;
86
+ /**
87
+ * Warns when a flat-values payload carries a nested object or array.
88
+ *
89
+ * `logCustomEvent`/`logDialogCustomEvent` are typed for flat scalars, but
90
+ * TypeScript types are erased at runtime: a payload built from an API
91
+ * response, widened through `any`, or passed from untyped JS reaches the
92
+ * bridge with its nesting intact. Both platforms then reshape it silently —
93
+ * Android's SDK chain is typed `HashMap<String, String>` end to end, so a
94
+ * nested value is stringified into whatever its `toString()` yields — and
95
+ * the call still returns `true`. `logSignal` is the API that carries nested
96
+ * JSON on both platforms.
97
+ *
98
+ * Warning only: the payload is passed through untouched, so this changes no
99
+ * behaviour and cannot break a caller who is relying on today's reshaping.
100
+ *
101
+ * @param api Name of the calling API, for the message.
102
+ * @param values The payload about to cross the bridge.
103
+ */
104
+ static warnOnNestedValues: (api: string, values: Record<string, unknown>) => void;
105
+ /**
106
+ * Logs a custom event.
107
+ *
108
+ * @param eventName Event name, as it appears in the posted JSON.
109
+ * @param values Flat key/value pairs. Nested objects and arrays are NOT
110
+ * supported here and are reshaped by the native SDKs — use `logSignal`
111
+ * for nested JSON.
112
+ * @param level Monitoring level for this event.
113
+ * @returns Whether the native SDK **accepted the event for delivery** —
114
+ * not whether the collector received it. The event is queued locally and
115
+ * posted later, so no return value from this call can attest to delivery;
116
+ * a `true` here means only that the SDK took the event. A `false` is also
117
+ * logged natively (logcat / os_log) so the rejection is visible.
118
+ */
41
119
  static logCustomEvent: (eventName: string, values: Record<string, string | number | boolean>, level: number) => Promise<boolean>;
42
120
  static logDialogShowEvent: (dialogId: string, dialogTitle: string, dialogType: string) => Promise<boolean>;
43
121
  static logDialogDismissEvent: (dialogId: string, dismissReason: string) => Promise<boolean>;
44
122
  static logDialogButtonClickEvent: (dialogId: string, buttonText: string, buttonIndex: number) => Promise<boolean>;
123
+ /**
124
+ * Logs a custom event tied to a dialog.
125
+ *
126
+ * Same flat-values contract and same return-value meaning as
127
+ * {@link logCustomEvent} — it routes to the same native API.
128
+ */
45
129
  static logDialogCustomEvent: (dialogId: string, eventName: string, values: Record<string, string | number | boolean>) => Promise<boolean>;
46
130
  static eventListenerRegistered: boolean;
47
131
  static eventListenerUnsubscribe: (() => void) | null;
@@ -1 +1 @@
1
- {"version":3,"file":"TLTRN.d.ts","sourceRoot":"","sources":["../../../src/TLTRN.ts"],"names":[],"mappings":"AAAA;;;;;;;;6FAQ6F;;AAmC7F,cAAM,KAAK;IACT,MAAM,CAAC,aAAa,SACgD;IACpE,MAAM,CAAC,uBAAuB,SAAK;IACnC,MAAM,CAAC,eAAe,SAAK;IAC3B,MAAM,CAAC,iBAAiB,SAAK;IAC7B,MAAM,CAAC,SAAS,SAAK;IACrB,MAAM,CAAC,cAAc,SAAK;IAC1B,MAAM,CAAC,kBAAkB,SAAK;IAC9B,MAAM,CAAC,aAAa,SAAK;IACzB,MAAM,CAAC,YAAY,UAAS;IAE5B,MAAM,CAAC,OAAO;;;;QAIZ;;WAEG;;QAKH;;WAEG;;MAQH;IAEF,MAAM,CAAC,IAAI,yBAA0B,MAAM,4BAA4B,OAAO,UAQ5E;IAEF,MAAM,CAAC,uBAAuB,WAAY,OAAO,UAE/C;IAEF,MAAM,CAAC,qBAAqB,SAAU,MAAM,GAAG,SAAS,aAQtD;IAEF,MAAM,CAAC,wBAAwB,SAAU,MAAM,YAAY,MAAM,aAQ/D;IAEF,MAAM,CAAC,eAAe,SAAU,MAAM,GAAG,SAAS,aAShD;IAEF,MAAM,CAAC,aAAa,UAAiB,GAAG,sBA+BtC;IAEF,MAAM,CAAC,kBAAkB,WAAkB,MAAM,aAAa,MAAM,QAAQ,MAAM,cAAc,MAAM,sBAYpG;IAEF,MAAM,CAAC,cAAc,cAAqB,MAAM,UAAU,OAAO,MAAM,EAAE,MAAM,GAAG,MAAM,GAAG,OAAO,CAAC,SAAS,MAAM,sBAQhH;IAGF,MAAM,CAAC,kBAAkB,aAAoB,MAAM,eAAe,MAAM,cAAc,MAAM,sBAQ1F;IAEF,MAAM,CAAC,qBAAqB,aAAoB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Z;CACH;AAGD,eAAe,KAAK,CAAC"}
@@ -1 +1 @@
1
- {"version":3,"file":"Connect.d.ts","sourceRoot":"","sources":["../../../../src/components/Connect.tsx"],"names":[],"mappings":"AAAA;;;;;;;;6FAQ6F;AAC7F,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,YAAY;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;CACxC;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA8JnC,CAAC;AAWF,eAAe,OAAO,CAAC"}
1
+ {"version":3,"file":"Connect.d.ts","sourceRoot":"","sources":["../../../../src/components/Connect.tsx"],"names":[],"mappings":"AAAA;;;;;;;;6FAQ6F;AAC7F,OAAO,KAAmD,MAAM,OAAO,CAAC;AAKxE,UAAU,YAAY;IAClB,QAAQ,EAAE,KAAK,CAAC,SAAS,CAAC;IAC1B,qBAAqB,EAAE,OAAO,CAAC;IAC/B,mBAAmB,CAAC,EAAE,OAAO,CAAC;IAC9B;;;;;;;;;;OAUG;IACH,aAAa,CAAC,EAAE,KAAK,CAAC,SAAS,CAAC,GAAG,CAAC,CAAC;CACxC;AAED,QAAA,MAAM,OAAO,EAAE,KAAK,CAAC,EAAE,CAAC,YAAY,CA6KnC,CAAC;AAuHF,eAAe,OAAO,CAAC"}
@@ -20,5 +20,6 @@ import DialogDebugger from './utils/DialogDebugger';
20
20
  import TLTRN from './TLTRN';
21
21
  declare let AcousticConnectRN: AcousticConnectRNSpec;
22
22
  export { Connect, TLTRN, KeyboardListener, DialogListener, useDialogTracking, DialogDebugger, withAcousticAutoDialog };
23
+ export type { SignalValues } from './specs/react-native-acoustic-connect.nitro';
23
24
  export default AcousticConnectRN;
24
25
  //# sourceMappingURL=index.d.ts.map
@@ -1 +1 @@
1
- {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;6FAW6F;AAG7F,OAAO,KAAK,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AAC7G,OAAO,OAAO,MAAM,sBAAsB,CAAA;AAC1C,OAAO,gBAAgB,MAAM,0BAA0B,CAAA;AACvD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,iBAAiB,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,KAAK,MAAM,SAAS,CAAA;AAQ3B,QAAA,IAAI,iBAAiB,EAAE,qBAAqB,CAAA;AAa5C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,sBAAsB,EAAE,CAAA;AACtH,eAAe,iBAAiB,CAAA"}
1
+ {"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../src/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;6FAW6F;AAG7F,OAAO,KAAK,EAAE,iBAAiB,IAAI,qBAAqB,EAAE,MAAM,6CAA6C,CAAA;AAC7G,OAAO,OAAO,MAAM,sBAAsB,CAAA;AAC1C,OAAO,gBAAgB,MAAM,0BAA0B,CAAA;AACvD,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,iBAAiB,MAAM,2BAA2B,CAAA;AACzD,OAAO,EAAE,sBAAsB,EAAE,MAAM,gCAAgC,CAAA;AACvE,OAAO,cAAc,MAAM,wBAAwB,CAAA;AACnD,OAAO,KAAK,MAAM,SAAS,CAAA;AAQ3B,QAAA,IAAI,iBAAiB,EAAE,qBAAqB,CAAA;AAa5C,OAAO,EAAE,OAAO,EAAE,KAAK,EAAE,gBAAgB,EAAE,cAAc,EAAE,iBAAiB,EAAE,cAAc,EAAE,sBAAsB,EAAE,CAAA;AAKtH,YAAY,EAAE,YAAY,EAAE,MAAM,6CAA6C,CAAA;AAC/E,eAAe,iBAAiB,CAAA"}
@@ -1,8 +1,33 @@
1
- import { type HybridObject } from 'react-native-nitro-modules';
1
+ import { type AnyMap, type HybridObject } from 'react-native-nitro-modules';
2
2
  export type KeyValueObject = {
3
3
  placeholder: string;
4
4
  [key: string]: unknown;
5
5
  };
6
+ /**
7
+ * Payload accepted by {@link AcousticConnectRN.logSignal} — any JSON-shaped
8
+ * object. Nested objects and arrays are allowed, so this is a superset of a
9
+ * flat `Record<string, string | number | boolean>`.
10
+ *
11
+ * You do not need this type to call `logSignal`: an object literal is enough.
12
+ * It exists for the times you want to name the payload — a helper parameter, a
13
+ * shared constant — and is re-exported from the package root so you never have
14
+ * to reach into `react-native-nitro-modules` for it:
15
+ *
16
+ * ```ts
17
+ * import AcousticConnectRN, { type SignalValues } from 'react-native-acoustic-connect-beta'
18
+ *
19
+ * const payload: SignalValues = { signalContent: { signalType: 'pageview' } }
20
+ * AcousticConnectRN.logSignal(payload, 1)
21
+ * ```
22
+ *
23
+ * @remarks
24
+ * Aliases nitro's `AnyMap`, which is the only way to express arbitrary JSON in
25
+ * a Nitro spec — a hand-rolled recursive type is rejected by nitrogen, which
26
+ * tries to generate a struct for it. Nitrogen resolves the alias, so the
27
+ * generated native bindings are identical either way; the indirection exists
28
+ * purely to keep a third-party type name off our public API.
29
+ */
30
+ export type SignalValues = AnyMap;
6
31
  export type ConnectMonitoringLevelType = 'Ignore' | 'CellularAndWiFi' | 'WiFi';
7
32
  /**
8
33
  * Structured error describing an APNs / permission failure.
@@ -107,8 +132,86 @@ export interface AcousticConnectRN extends HybridObject<{
107
132
  getBooleanConfigItemForKey(theDefault: boolean, key: string, moduleName: string): boolean;
108
133
  getStringItemForKey(theDefault: string, key: string, moduleName: string): string | null | undefined;
109
134
  getNumberItemForKey(theDefault: number, key: string, moduleName: string): number;
135
+ /**
136
+ * Logs a named custom event with a flat set of key/value pairs.
137
+ *
138
+ * `values` is deliberately **flat** (scalars only), unlike
139
+ * {@link logSignal}. The Android SDK's custom-event path is typed
140
+ * `HashMap<String, String>` end to end (`Connect.logCustomEvent` →
141
+ * `Tealeaf.logCustomEvent`), so there is no native route for nested
142
+ * JSON. Widening this signature would compile but silently drop the
143
+ * nesting on Android while preserving it on iOS — a cross-platform
144
+ * divergence worse than the restriction. Use {@link logSignal} when the
145
+ * payload needs structure.
146
+ *
147
+ * @param eventName Event name; appears in the posted JSON.
148
+ * @param values Flat key/value pairs to attach to the event.
149
+ * @param level Monitoring level for this event.
150
+ * @returns `true` if the SDK **accepted the event for delivery** — not
151
+ * that the collector received it. Events are queued on device and posted
152
+ * in batches later, so nothing this call can return attests to delivery
153
+ * or to server-side acceptance. A `false` means the SDK rejected the
154
+ * event outright and nothing was queued; the bridge also logs that to
155
+ * logcat / os_log so it is visible without inspecting the return value.
156
+ */
110
157
  logCustomEvent(eventName: string, values: Record<string, string | number | boolean>, level: number): boolean;
111
- logSignal(values: Record<string, string | number | boolean>, level: number): boolean;
158
+ /**
159
+ * Logs a signal payload.
160
+ *
161
+ * `values` accepts **arbitrary JSON** — nested objects and arrays, not
162
+ * just scalars — because both native SDKs embed the payload verbatim:
163
+ * iOS `CTSignalMessage` gates only on `NSJSONSerialization
164
+ * isValidJSONObject:`, and Android `Connect.logSignal` takes an untyped
165
+ * `HashMap<String, Any?>`. The bridge converts the map to each
166
+ * platform's JSON representation without flattening or reshaping it.
167
+ *
168
+ * Scalar-only callers are unaffected: {@link SignalValues} is a superset
169
+ * of `Record<string, string | number | boolean>`.
170
+ *
171
+ * @param values Signal payload. Objects, arrays, strings, numbers,
172
+ * booleans and `null` are all carried through.
173
+ * @param level Monitoring level for this signal.
174
+ * @returns `true` if the SDK **accepted the signal for delivery** — not
175
+ * that the collector received it, and not that it passed server-side
176
+ * schema validation. Signals are queued on device and posted later, so
177
+ * nothing this call can return attests to delivery. A `false` means the
178
+ * SDK rejected it and nothing was queued; the bridge logs that to
179
+ * logcat / os_log.
180
+ *
181
+ * @remarks
182
+ * **Android version boundary — top-level numbers.** The Android SDK's
183
+ * `JsonUtil.getHashValues` gained a `Number` branch in Connect Android
184
+ * **11.0.24-beta**, so from that version a top-level numeric value is
185
+ * carried. Earlier versions serialised only `String`, `Boolean`,
186
+ * `JSONObject`, `JSONArray` and `byte[]` at the top level of the signal
187
+ * map and dropped a top-level number. Numbers nested *inside* an object
188
+ * or array were never affected, because the bridge builds those
189
+ * `JSONObject`/`JSONArray` values itself, and iOS has always carried
190
+ * top-level numbers normally. Both versions sit inside the
191
+ * `[11.0.11, 12.0.0)` range this package accepts, so nest the number if
192
+ * your integration pins a Connect Android version below 11.0.24-beta.
193
+ *
194
+ * @example Nested payload
195
+ * ```ts
196
+ * import AcousticConnectRN from 'react-native-acoustic-connect-beta'
197
+ *
198
+ * AcousticConnectRN.logSignal(
199
+ * {
200
+ * signalContent: {
201
+ * signalType: 'pageview',
202
+ * url: 'https://app.example.com/dashboard',
203
+ * pageCategory: 'dashboard',
204
+ * },
205
+ * audience: [
206
+ * { name: 'Account Name', value: 'Acme Corp' },
207
+ * { name: 'Account ID', value: '4815162342' },
208
+ * ],
209
+ * },
210
+ * 1
211
+ * )
212
+ * ```
213
+ */
214
+ logSignal(values: SignalValues, level: number): boolean;
112
215
  logExceptionEvent(message: string, stackInfo: string, unhandled: boolean): boolean;
113
216
  logLocation(): boolean;
114
217
  logLocationWithLatitudeLongitude(latitude: number, longitude: number, level: number): boolean;
@@ -117,10 +220,36 @@ export interface AcousticConnectRN extends HybridObject<{
117
220
  setCurrentScreenName(logicalPageName: string): boolean;
118
221
  logScreenViewContextLoad(logicalPageName: string | null | undefined, referrer: string | null | undefined): boolean;
119
222
  logScreenViewContextUnload(logicalPageName: string | null | undefined, referrer: string | null | undefined): boolean;
223
+ /**
224
+ * Captures the layout of the current screen.
225
+ *
226
+ * @param name Screen name to associate with the capture.
227
+ * @param delay Milliseconds to wait before capturing — the same unit as
228
+ * `CaptureLayoutDelay` in the layout config, on both platforms. A
229
+ * negative value means "use the `CaptureLayoutDelay` configured for this
230
+ * screen"; `0` captures immediately.
231
+ *
232
+ * Prefer `TLTRN.logScreenLayout`, which defaults to the configured delay.
233
+ *
234
+ * @returns For a `delay` of `0`, whether the capture itself succeeded. For
235
+ * any positive or configured delay, only that the capture was
236
+ * **scheduled** — the native deferred overload dispatches and returns
237
+ * immediately, so a `true` says nothing about what the capture found
238
+ * when it eventually ran. Failures after that point (no view controller
239
+ * resolved, config gating the capture off) surface in logcat / os_log,
240
+ * not here.
241
+ */
120
242
  logScreenLayout(name: string, delay: number): boolean;
121
243
  logDialogShowEvent(dialogId: string, dialogTitle: string, dialogType: string): boolean;
122
244
  logDialogDismissEvent(dialogId: string, dismissReason: string): boolean;
123
245
  logDialogButtonClickEvent(dialogId: string, buttonText: string, buttonIndex: number): boolean;
246
+ /**
247
+ * Logs a custom event against a tracked dialog.
248
+ *
249
+ * `values` is flat for the same reason as {@link logCustomEvent} — this
250
+ * routes to the native custom-event API, whose Android path carries string
251
+ * values only.
252
+ */
124
253
  logDialogCustomEvent(dialogId: string, eventName: string, values: Record<string, string | number | boolean>): boolean;
125
254
  /**
126
255
  * Logs a user identity so the current device/session can be associated with
@@ -143,23 +272,62 @@ export interface AcousticConnectRN extends HybridObject<{
143
272
  * `'loggedIn'` when omitted (identity logging typically marks a sign-in),
144
273
  * overriding the native SDKs' own `'pageView'` default.
145
274
  * @param additionalParameters Optional extra key/value pairs merged into the
146
- * signal payload. Only when omitted (`undefined`) does the bridge supply
147
- * the default `{ registrationMethod: 'email' }`; an explicitly-provided
148
- * map is used as-is, so passing an empty `{}` sends no extra parameters
149
- * (the default is not merged in). A `'url'` entry is honoured uniformly on
150
- * both platforms: on Android it is routed to the SDK's explicit `url`
151
- * parameter, on iOS it rides inside the parameter map (where the native
152
- * API expects it).
275
+ * signal payload. Only when omitted (`undefined`) does the bridge supply a
276
+ * default, and that default follows the resolved `signalType` — see
277
+ * **Required method attribute** below. An explicitly-provided map is used
278
+ * as-is, so passing an empty `{}` sends no extra parameters (the default is
279
+ * not merged in). A `'url'` entry is honoured uniformly on both platforms:
280
+ * on Android it is routed to the SDK's explicit `url` parameter, on iOS it
281
+ * rides inside the parameter map (where the native API expects it).
153
282
  * @returns A promise resolving to `true` if the identity signal was
154
283
  * dispatched, `false` otherwise (including the blank-identifier case).
155
284
  * Never rejects.
156
285
  *
157
- * @example
286
+ * ### Required method attribute
287
+ *
288
+ * Identity signals must carry a *method* attribute, and the key Connect
289
+ * requires depends on the signal type:
290
+ *
291
+ * | `signalType` | Required attribute |
292
+ * | -------------------- | -------------------- |
293
+ * | `'loggedIn'` | `loginMethod` |
294
+ * | `'accountRegistered'`| `registrationMethod` |
295
+ *
296
+ * Send the wrong key and the signal fails schema validation and is
297
+ * discarded server-side — while this promise still resolves `true`, because
298
+ * the native SDKs report only that the signal was queued. If you pass
299
+ * `additionalParameters` explicitly, you own supplying the right key.
300
+ *
301
+ * @example Sign-in — `loginMethod` is required
158
302
  * ```ts
159
303
  * import AcousticConnectRN from 'react-native-acoustic-connect-beta'
160
304
  *
305
+ * await AcousticConnectRN.logIdentity('Email', 'user@example.com', 'loggedIn', {
306
+ * loginMethod: 'sso',
307
+ * })
308
+ *
309
+ * // Omitting both arguments is equivalent to the above with
310
+ * // `{ loginMethod: 'email' }` — the bridge defaults to a `loggedIn` signal.
161
311
  * await AcousticConnectRN.logIdentity('Email', 'user@example.com')
162
312
  * ```
313
+ *
314
+ * @example Registration — `registrationMethod` is required
315
+ * ```ts
316
+ * await AcousticConnectRN.logIdentity(
317
+ * 'Email',
318
+ * 'user@example.com',
319
+ * 'accountRegistered',
320
+ * { registrationMethod: 'email' }
321
+ * )
322
+ * ```
323
+ *
324
+ * @returns `true` if the SDK **accepted the identity signal for
325
+ * delivery**. It does not mean the signal reached the collector, and it
326
+ * does not mean the collector kept it — a schema-invalid signal (the
327
+ * wrong method key above) is discarded server-side after resolving
328
+ * `true` here. Never rejects. A `false` means the SDK rejected the call
329
+ * locally, e.g. a blank identifier; the bridge logs that to logcat /
330
+ * os_log.
163
331
  */
164
332
  logIdentity(identifierName: string, identifierValue: string, signalType?: string, additionalParameters?: Record<string, string>): Promise<boolean>;
165
333
  /**