@onekeyfe/react-native-native-list 6.7.0-6 → 6.7.0-61

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 (216) hide show
  1. package/README.md +312 -375
  2. package/android/src/main/java/com/onekey/nativelist/HybridNativeList.kt +14 -1
  3. package/android/src/main/java/com/onekey/nativelist/NativeListAccessoryStack.kt +250 -9
  4. package/android/src/main/java/com/onekey/nativelist/NativeListActivityDetailsView.kt +50 -13
  5. package/android/src/main/java/com/onekey/nativelist/NativeListActivityRenderer.kt +25 -3
  6. package/android/src/main/java/com/onekey/nativelist/NativeListAdapter.kt +17 -1
  7. package/android/src/main/java/com/onekey/nativelist/NativeListButtonGroupRenderer.kt +102 -0
  8. package/android/src/main/java/com/onekey/nativelist/NativeListContainerSlotAdapter.kt +12 -0
  9. package/android/src/main/java/com/onekey/nativelist/NativeListDataRowRenderer.kt +102 -7
  10. package/android/src/main/java/com/onekey/nativelist/NativeListGeneratedIcons.kt +47 -0
  11. package/android/src/main/java/com/onekey/nativelist/NativeListIdentityRenderer.kt +225 -11
  12. package/android/src/main/java/com/onekey/nativelist/NativeListLeadingVisual.kt +152 -33
  13. package/android/src/main/java/com/onekey/nativelist/NativeListMarketRenderer.kt +92 -28
  14. package/android/src/main/java/com/onekey/nativelist/NativeListMediaPlaceholderView.kt +244 -0
  15. package/android/src/main/java/com/onekey/nativelist/NativeListMediaPreviewSlot.kt +66 -31
  16. package/android/src/main/java/com/onekey/nativelist/NativeListMediaTileRenderer.kt +32 -11
  17. package/android/src/main/java/com/onekey/nativelist/NativeListMessageRenderer.kt +25 -0
  18. package/android/src/main/java/com/onekey/nativelist/NativeListModels.kt +209 -3
  19. package/android/src/main/java/com/onekey/nativelist/NativeListPrimitives.kt +120 -287
  20. package/android/src/main/java/com/onekey/nativelist/NativeListRendererRegistry.kt +2 -0
  21. package/android/src/main/java/com/onekey/nativelist/NativeListRendererRowView.kt +7 -0
  22. package/android/src/main/java/com/onekey/nativelist/NativeListResolvedText.kt +8 -3
  23. package/android/src/main/java/com/onekey/nativelist/NativeListSectionHeaderRenderer.kt +69 -0
  24. package/android/src/main/java/com/onekey/nativelist/NativeListTextView.kt +130 -1
  25. package/android/src/main/java/com/onekey/nativelist/NativeListView.kt +1978 -136
  26. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListActivityHostClipPolicyTest.kt +35 -0
  27. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListDescriptionTouchPolicyTest.kt +153 -0
  28. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListIdentityTrailingAxisTest.kt +36 -0
  29. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListLeadingSlotFrameTest.kt +68 -0
  30. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListLeadingVisualClipPolicyTest.kt +44 -0
  31. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListPressPolicyTest.kt +10 -0
  32. package/docs/ROW_TEMPLATES.md +78 -14
  33. package/docs/SPEC.md +1318 -16
  34. package/docs/STYLE_SPEC.md +18 -0
  35. package/ios/HybridNativeList.swift +21 -2
  36. package/ios/NativeListAccessoryStack.swift +237 -51
  37. package/ios/NativeListActivityDetailsView.swift +43 -16
  38. package/ios/NativeListActivityRenderer.swift +8 -2
  39. package/ios/NativeListButtonGroupRenderer.swift +89 -0
  40. package/ios/NativeListDataRowRenderer.swift +167 -30
  41. package/ios/NativeListDesignAssets.swift +13 -75
  42. package/ios/NativeListGeneratedIcons.swift +55 -0
  43. package/ios/NativeListIconBinding.swift +171 -0
  44. package/ios/NativeListIdentityRenderer.swift +256 -39
  45. package/ios/NativeListLeadingVisual.swift +127 -28
  46. package/ios/NativeListMarketRenderer.swift +120 -31
  47. package/ios/NativeListMediaPlaceholderView.swift +189 -0
  48. package/ios/NativeListMediaPreviewSlot.swift +122 -61
  49. package/ios/NativeListMediaTileRenderer.swift +15 -11
  50. package/ios/NativeListMessageRenderer.swift +34 -1
  51. package/ios/NativeListMetricCardRenderer.swift +4 -2
  52. package/ios/NativeListModels.swift +42 -2
  53. package/ios/NativeListRendererRegistry.swift +1 -0
  54. package/ios/NativeListResolvedText.swift +17 -5
  55. package/ios/NativeListRowHost.swift +14 -0
  56. package/ios/NativeListSectionHeaderRenderer.swift +100 -4
  57. package/ios/NativeListTextLabel.swift +106 -0
  58. package/ios/RNCNativeListView.swift +1097 -60
  59. package/ios/tests/NativeListAccessoryStackTests.swift +101 -0
  60. package/ios/tests/NativeListAccountSelectorLayoutTests.swift +96 -0
  61. package/ios/tests/NativeListActivityPresentationTests.swift +423 -0
  62. package/ios/tests/NativeListIdentityTitleIconLayoutTests.swift +81 -0
  63. package/ios/tests/NativeListLeadingVisualPairBackdropTests.swift +50 -0
  64. package/ios/tests/NativeListLifecycleTests.swift +2959 -4
  65. package/ios/tests/NativeListMarketMetricsTests.swift +117 -0
  66. package/ios/tests/NativeListMediaVisibilityTests.swift +41 -7
  67. package/ios/tests/NativeListSharedIconTests.swift +236 -0
  68. package/lib/module/NativeList.js +236 -38
  69. package/lib/module/NativeList.web.js +163 -45
  70. package/lib/module/index.js +1 -1
  71. package/lib/module/models.js +3 -0
  72. package/lib/module/selection.js +1 -1
  73. package/lib/module/validation.js +1263 -48
  74. package/lib/module/web/NativeListGeneratedIcons.js +31 -0
  75. package/lib/module/web/NativeListWebEngine.js +513 -275
  76. package/lib/module/web/templates/ActivityRowRenderer.js +41 -54
  77. package/lib/module/web/templates/ButtonGroupRowRenderer.js +47 -0
  78. package/lib/module/web/templates/DataRowRenderer.js +56 -5
  79. package/lib/module/web/templates/IdentityRowRenderer.js +161 -7
  80. package/lib/module/web/templates/MarketTableRowRenderer.js +36 -19
  81. package/lib/module/web/templates/MediaTileRowRenderer.js +84 -25
  82. package/lib/module/web/templates/MessageRowRenderer.js +18 -2
  83. package/lib/module/web/templates/RowContainerStyle.js +1 -0
  84. package/lib/module/web/templates/RowRendererRegistry.js +3 -0
  85. package/lib/module/web/templates/SectionHeaderRowRenderer.js +36 -2
  86. package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +26 -0
  87. package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +4 -0
  88. package/lib/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +10 -0
  89. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +20 -0
  90. package/lib/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +14 -0
  91. package/lib/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +12 -0
  92. package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +2 -0
  93. package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +43 -0
  94. package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +4 -0
  95. package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +4 -0
  96. package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +4 -0
  97. package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +6 -0
  98. package/lib/nitrogen/generated/shared/json/NativeListConfig.json +2 -0
  99. package/lib/typescript/src/NativeList.d.ts +3 -3
  100. package/lib/typescript/src/NativeList.nitro.d.ts +2 -0
  101. package/lib/typescript/src/NativeList.types.d.ts +20 -2
  102. package/lib/typescript/src/index.d.ts +2 -2
  103. package/lib/typescript/src/models.d.ts +134 -17
  104. package/lib/typescript/src/validation.d.ts +20 -0
  105. package/lib/typescript/src/web/NativeListGeneratedIcons.d.ts +2 -0
  106. package/lib/typescript/src/web/NativeListWebEngine.d.ts +32 -1
  107. package/lib/typescript/src/web/templates/ButtonGroupRowRenderer.d.ts +14 -0
  108. package/lib/typescript/src/web/templates/IdentityRowRenderer.d.ts +1 -1
  109. package/lib/typescript/src/web/templates/MessageRowRenderer.d.ts +9 -3
  110. package/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +26 -0
  111. package/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +4 -0
  112. package/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +10 -0
  113. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +20 -0
  114. package/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +14 -0
  115. package/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +12 -0
  116. package/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +2 -0
  117. package/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +43 -0
  118. package/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +4 -0
  119. package/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +4 -0
  120. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +4 -0
  121. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +6 -0
  122. package/nitrogen/generated/shared/json/NativeListConfig.json +2 -0
  123. package/package.json +16 -10
  124. package/react-native-native-list.podspec +2 -6
  125. package/scripts/generate-icons.mjs +150 -0
  126. package/scripts/generate-icons.test.mjs +288 -0
  127. package/scripts/native-list-icons.json +260 -0
  128. package/src/NativeList.nitro.ts +2 -0
  129. package/src/NativeList.tsx +439 -91
  130. package/src/NativeList.types.ts +24 -2
  131. package/src/NativeList.web.tsx +286 -88
  132. package/src/index.ts +2 -0
  133. package/src/models.ts +272 -144
  134. package/src/selection.ts +1 -0
  135. package/src/validation.ts +3041 -146
  136. package/src/web/NativeListGeneratedIcons.ts +28 -0
  137. package/src/web/NativeListWebEngine.ts +818 -343
  138. package/src/web/templates/ActivityRowRenderer.ts +71 -91
  139. package/src/web/templates/ButtonGroupRowRenderer.ts +58 -0
  140. package/src/web/templates/DataRowRenderer.ts +121 -20
  141. package/src/web/templates/IdentityRowRenderer.ts +234 -9
  142. package/src/web/templates/MarketTableRowRenderer.ts +53 -33
  143. package/src/web/templates/MediaTileRowRenderer.ts +90 -28
  144. package/src/web/templates/MessageRowRenderer.ts +23 -7
  145. package/src/web/templates/RowContainerStyle.ts +2 -0
  146. package/src/web/templates/RowRendererRegistry.ts +11 -1
  147. package/src/web/templates/SectionHeaderRowRenderer.ts +47 -4
  148. package/ios/Resources/NativeListIcons.xcassets/Contents.json +0 -1
  149. package/ios/Resources/NativeListIcons.xcassets/onekey_arrow_bottom.imageset/Contents.json +0 -1
  150. package/ios/Resources/NativeListIcons.xcassets/onekey_arrow_bottom.imageset/icon.svg +0 -1
  151. package/ios/Resources/NativeListIcons.xcassets/onekey_arrow_top.imageset/Contents.json +0 -1
  152. package/ios/Resources/NativeListIcons.xcassets/onekey_arrow_top.imageset/icon.svg +0 -1
  153. package/ios/Resources/NativeListIcons.xcassets/onekey_badge_verified_solid.imageset/Contents.json +0 -1
  154. package/ios/Resources/NativeListIcons.xcassets/onekey_badge_verified_solid.imageset/icon.svg +0 -1
  155. package/ios/Resources/NativeListIcons.xcassets/onekey_chart_trending_up.imageset/Contents.json +0 -1
  156. package/ios/Resources/NativeListIcons.xcassets/onekey_chart_trending_up.imageset/icon.svg +0 -1
  157. package/ios/Resources/NativeListIcons.xcassets/onekey_checkbox_checked.imageset/Contents.json +0 -1
  158. package/ios/Resources/NativeListIcons.xcassets/onekey_checkbox_checked.imageset/icon.svg +0 -1
  159. package/ios/Resources/NativeListIcons.xcassets/onekey_checkbox_indeterminate.imageset/Contents.json +0 -1
  160. package/ios/Resources/NativeListIcons.xcassets/onekey_checkbox_indeterminate.imageset/icon.svg +0 -1
  161. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_bottom.imageset/Contents.json +0 -1
  162. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_bottom.imageset/icon.svg +0 -1
  163. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_grabber_ver.imageset/Contents.json +0 -1
  164. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_grabber_ver.imageset/icon.svg +0 -1
  165. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_right_small.imageset/Contents.json +0 -1
  166. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_right_small.imageset/icon.svg +0 -1
  167. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_top.imageset/Contents.json +0 -1
  168. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_top.imageset/icon.svg +0 -1
  169. package/ios/Resources/NativeListIcons.xcassets/onekey_dot_hor.imageset/Contents.json +0 -1
  170. package/ios/Resources/NativeListIcons.xcassets/onekey_dot_hor.imageset/icon.svg +0 -1
  171. package/ios/Resources/NativeListIcons.xcassets/onekey_drag.imageset/Contents.json +0 -1
  172. package/ios/Resources/NativeListIcons.xcassets/onekey_drag.imageset/icon.svg +0 -1
  173. package/ios/Resources/NativeListIcons.xcassets/onekey_error_solid.imageset/Contents.json +0 -1
  174. package/ios/Resources/NativeListIcons.xcassets/onekey_error_solid.imageset/icon.svg +0 -1
  175. package/ios/Resources/NativeListIcons.xcassets/onekey_image_square_waves.imageset/Contents.json +0 -1
  176. package/ios/Resources/NativeListIcons.xcassets/onekey_image_square_waves.imageset/icon.svg +0 -1
  177. package/ios/Resources/NativeListIcons.xcassets/onekey_info_circle.imageset/Contents.json +0 -1
  178. package/ios/Resources/NativeListIcons.xcassets/onekey_info_circle.imageset/icon.svg +0 -1
  179. package/ios/Resources/NativeListIcons.xcassets/onekey_minus_circle.imageset/Contents.json +0 -1
  180. package/ios/Resources/NativeListIcons.xcassets/onekey_minus_circle.imageset/icon.svg +0 -1
  181. package/ios/Resources/NativeListIcons.xcassets/onekey_minus_circle_solid.imageset/Contents.json +0 -1
  182. package/ios/Resources/NativeListIcons.xcassets/onekey_minus_circle_solid.imageset/icon.svg +0 -1
  183. package/ios/Resources/NativeListIcons.xcassets/onekey_pencil.imageset/Contents.json +0 -1
  184. package/ios/Resources/NativeListIcons.xcassets/onekey_pencil.imageset/icon.svg +0 -1
  185. package/ios/Resources/NativeListIcons.xcassets/onekey_plus_circle.imageset/Contents.json +0 -1
  186. package/ios/Resources/NativeListIcons.xcassets/onekey_plus_circle.imageset/icon.svg +0 -1
  187. package/ios/Resources/NativeListIcons.xcassets/onekey_plus_small.imageset/Contents.json +0 -1
  188. package/ios/Resources/NativeListIcons.xcassets/onekey_plus_small.imageset/icon.svg +0 -1
  189. package/ios/Resources/NativeListIcons.xcassets/onekey_questionmark_solid.imageset/Contents.json +0 -1
  190. package/ios/Resources/NativeListIcons.xcassets/onekey_questionmark_solid.imageset/icon.svg +0 -1
  191. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_account_error_custom.imageset/Contents.json +0 -15
  192. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_account_error_custom.imageset/icon.svg +0 -14
  193. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_all_networks_solid.imageset/Contents.json +0 -15
  194. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_all_networks_solid.imageset/icon.svg +0 -12
  195. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_apple_brand.imageset/Contents.json +0 -15
  196. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_apple_brand.imageset/icon.svg +0 -6
  197. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_bot_illus.imageset/Contents.json +0 -15
  198. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_bot_illus.imageset/icon.svg +0 -15
  199. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_crossed_small_solid.imageset/Contents.json +0 -15
  200. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_crossed_small_solid.imageset/icon.svg +0 -3
  201. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_globus_outline.imageset/Contents.json +0 -15
  202. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_globus_outline.imageset/icon.svg +0 -7
  203. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_google_illus.imageset/Contents.json +0 -15
  204. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_google_illus.imageset/icon.svg +0 -18
  205. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_lock_solid.imageset/Contents.json +0 -15
  206. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_lock_solid.imageset/icon.svg +0 -7
  207. package/ios/Resources/NativeListIcons.xcassets/onekey_shield_exclamation.imageset/Contents.json +0 -1
  208. package/ios/Resources/NativeListIcons.xcassets/onekey_shield_exclamation.imageset/icon.svg +0 -1
  209. package/ios/Resources/NativeListIcons.xcassets/onekey_speaker_promote.imageset/Contents.json +0 -1
  210. package/ios/Resources/NativeListIcons.xcassets/onekey_speaker_promote.imageset/icon.svg +0 -1
  211. package/ios/Resources/NativeListIcons.xcassets/onekey_star.imageset/Contents.json +0 -1
  212. package/ios/Resources/NativeListIcons.xcassets/onekey_star.imageset/icon.svg +0 -1
  213. package/ios/Resources/NativeListIcons.xcassets/onekey_star_solid.imageset/Contents.json +0 -1
  214. package/ios/Resources/NativeListIcons.xcassets/onekey_star_solid.imageset/icon.svg +0 -1
  215. package/ios/Resources/NativeListIcons.xcassets/onekey_swap_hor.imageset/Contents.json +0 -1
  216. package/ios/Resources/NativeListIcons.xcassets/onekey_swap_hor.imageset/icon.svg +0 -1
@@ -0,0 +1,35 @@
1
+ package com.margelo.nitro.nativelist
2
+
3
+ import org.junit.Assert.assertEquals
4
+ import org.junit.Test
5
+
6
+ class NativeListActivityHostClipPolicyTest {
7
+ // One Activity row view serves legacy and rich rows and is reused across
8
+ // binds. A row with an overhanging network badge switches the host's
9
+ // clipping off, whether the badge sits on the host's visual (legacy row,
10
+ // OK-66071) or on the details view's visual (rich row, OK-66275); the next
11
+ // bind must derive clipping afresh, so a row without a badge reusing that
12
+ // view clips again instead of drawing over a neighbouring row (PR #185
13
+ // review).
14
+ @Test
15
+ fun rebindSequenceDerivesClippingFromEachBoundItem() {
16
+ data class Bind(val name: String, val rich: Boolean, val leadingOverhangs: Boolean, val clips: Boolean)
17
+
18
+ val binds = listOf(
19
+ Bind("legacy row, plain token", rich = false, leadingOverhangs = false, clips = true),
20
+ Bind("legacy row, network badge", rich = false, leadingOverhangs = true, clips = false),
21
+ Bind("rich row reusing the badge row's view", rich = true, leadingOverhangs = false, clips = true),
22
+ // The app's history rows carry `amounts`, so their badge lives on the
23
+ // details view's leading visual: a rich row with such a badge must stop
24
+ // clipping too (OK-66275).
25
+ Bind("rich row, network badge in details", rich = true, leadingOverhangs = true, clips = false),
26
+ Bind("legacy row, badge again", rich = false, leadingOverhangs = true, clips = false),
27
+ Bind("legacy row, hidden leading", rich = false, leadingOverhangs = false, clips = true),
28
+ )
29
+
30
+ assertEquals(
31
+ binds.map(Bind::clips),
32
+ binds.map { nativeListActivityHostClips(leadingOverhangs = it.leadingOverhangs) },
33
+ )
34
+ }
35
+ }
@@ -0,0 +1,153 @@
1
+ package com.margelo.nitro.nativelist
2
+
3
+ import org.junit.Assert.assertEquals
4
+ import org.junit.Assert.assertFalse
5
+ import org.junit.Assert.assertTrue
6
+ import org.junit.Test
7
+
8
+ class NativeListDescriptionTouchPolicyTest {
9
+ private fun hit(regions: List<NativeListTouchRegion>, x: Float, y: Float) = regions.any { it.contains(x, y) }
10
+
11
+ private fun run(left: Float, right: Float) = NativeListTextRun(left, right)
12
+
13
+ private fun regions(vararg lines: NativeListTextLine) = nativeListTouchableTextRegions(lines.toList(), slop = 8f)
14
+
15
+ // The description view spans the identity column, so a tap anywhere on its
16
+ // line used to open the description action. Only the text opens it now; the
17
+ // blank rest of the line belongs to the row press (OK-67219).
18
+ @Test
19
+ fun onlyTheDrawnTextTakesTouches() {
20
+ val text = regions(NativeListTextLine(top = 0f, bottom = 20f, touchable = listOf(run(0f, 60f))))
21
+
22
+ assertTrue(hit(text, 30f, 10f))
23
+ // The slop reaches into the blank on both sides of the text.
24
+ assertTrue(hit(text, 66f, 10f))
25
+ assertTrue(hit(text, -6f, 10f))
26
+ assertFalse(hit(text, 120f, 10f))
27
+ }
28
+
29
+ // The caller states where the action text starts; the text before it, a
30
+ // time for one, is not part of the action.
31
+ @Test
32
+ fun textBeforeTheStartIsNotPartOfTheAction() {
33
+ val ltr = regions(
34
+ NativeListTextLine(top = 0f, bottom = 20f, touchable = listOf(run(50f, 160f)), plain = listOf(run(0f, 50f))),
35
+ )
36
+ assertFalse(hit(ltr, 20f, 10f))
37
+ assertTrue(hit(ltr, 100f, 10f))
38
+
39
+ // Right to left the plain text sits on the right of the touchable text.
40
+ val rtl = regions(
41
+ NativeListTextLine(top = 0f, bottom = 20f, touchable = listOf(run(40f, 150f)), plain = listOf(run(150f, 200f))),
42
+ )
43
+ assertTrue(hit(rtl, 100f, 10f))
44
+ assertFalse(hit(rtl, 180f, 10f))
45
+ }
46
+
47
+ // The slop is for blank space. It must not reach into plain text beside the
48
+ // touchable text, or a prefix narrower than the slop, like the "i" of
49
+ // "iRouter", would open the action it is not part of.
50
+ @Test
51
+ fun theSlopStopsAtPlainTextBesideTheTouchableText() {
52
+ val short = regions(
53
+ NativeListTextLine(top = 0f, bottom = 20f, touchable = listOf(run(3f, 46f)), plain = listOf(run(0f, 3f))),
54
+ )
55
+ assertFalse(hit(short, 1.5f, 10f))
56
+ assertFalse(hit(short, -4f, 10f))
57
+ assertTrue(hit(short, 4f, 10f))
58
+ assertTrue(hit(short, 52f, 10f))
59
+ assertEquals(3f, short.single().left)
60
+ assertEquals(54f, short.single().right)
61
+
62
+ // Neighbouring runs read back from pixel regions may be a pixel apart.
63
+ val apart = regions(
64
+ NativeListTextLine(top = 0f, bottom = 20f, touchable = listOf(run(4f, 46f)), plain = listOf(run(0f, 3f))),
65
+ )
66
+ assertEquals(3f, apart.single().left)
67
+ }
68
+
69
+ // Mixed-direction text can split one logical suffix into several visual
70
+ // runs with plain text between them: "ABC אבג XYZ" from the last Hebrew
71
+ // letter on draws that letter left of the two plain ones. Each run is its
72
+ // own region, and the plain text between them takes no touches.
73
+ @Test
74
+ fun aSuffixSplitByMixedDirectionTextIsSeveralRuns() {
75
+ val mixed = regions(
76
+ NativeListTextLine(
77
+ top = 0f, bottom = 20f,
78
+ touchable = listOf(run(32f, 38f), run(55f, 86f)),
79
+ plain = listOf(run(0f, 32f), run(38f, 55f)),
80
+ ),
81
+ )
82
+
83
+ assertEquals(2, mixed.size)
84
+ assertFalse(hit(mixed, 16f, 10f))
85
+ assertTrue(hit(mixed, 35f, 10f))
86
+ assertFalse(hit(mixed, 46f, 10f))
87
+ assertTrue(hit(mixed, 70f, 10f))
88
+ // Only the outer edge of the last run faces blank space.
89
+ assertTrue(hit(mixed, 92f, 10f))
90
+ assertEquals(32f, mixed[0].left)
91
+ assertEquals(38f, mixed[0].right)
92
+ assertEquals(55f, mixed[1].left)
93
+ }
94
+
95
+ // A narrow row wraps the description. The time stays outside the action on
96
+ // its line, while the address is hit on both lines, also at the x the time
97
+ // occupies one line above.
98
+ @Test
99
+ fun aWrappedDescriptionKeepsTheTimeOutsideTheAction() {
100
+ val wrapped = regions(
101
+ NativeListTextLine(top = 0f, bottom = 20f, touchable = listOf(run(55f, 110f)), plain = listOf(run(0f, 55f))),
102
+ NativeListTextLine(top = 20f, bottom = 40f, touchable = listOf(run(0f, 100f))),
103
+ )
104
+ assertFalse(hit(wrapped, 20f, 10f))
105
+ assertTrue(hit(wrapped, 80f, 10f))
106
+ assertTrue(hit(wrapped, 20f, 30f))
107
+ assertFalse(hit(wrapped, 130f, 30f))
108
+
109
+ // The whole time sits on the first line: that line takes no touches at all.
110
+ val timeOnItsOwnLine = regions(
111
+ NativeListTextLine(top = 0f, bottom = 20f, touchable = emptyList(), plain = listOf(run(0f, 55f))),
112
+ NativeListTextLine(top = 20f, bottom = 40f, touchable = listOf(run(0f, 100f))),
113
+ )
114
+ assertFalse(hit(timeOnItsOwnLine, 20f, 10f))
115
+ // Nor does the address line reach up into it.
116
+ assertFalse(hit(timeOnItsOwnLine, 20f, 19f))
117
+ assertTrue(hit(timeOnItsOwnLine, 20f, 30f))
118
+ }
119
+
120
+ // A start at the end of the text leaves nothing to touch.
121
+ @Test
122
+ fun aLineWithoutTouchableTextLeavesNoRegion() {
123
+ val none = regions(NativeListTextLine(top = 0f, bottom = 20f, touchable = emptyList(), plain = listOf(run(0f, 55f))))
124
+
125
+ assertTrue(none.isEmpty())
126
+ }
127
+
128
+ // `descriptionActionStart` is a UTF-16 offset into the caller's string. It is
129
+ // kept within the text, and follows the line breaks a one-line view folds.
130
+ @Test
131
+ fun theCallersStartIsMappedOntoTheDisplayedText() {
132
+ val label = "Router • V2"
133
+ assertEquals(0, nativeListDisplayOffset(label, 0, foldsLineBreaks = false))
134
+ assertEquals(8, nativeListDisplayOffset("08:48 • $label", 8, foldsLineBreaks = false))
135
+ assertEquals(0, nativeListDisplayOffset(label, -3, foldsLineBreaks = false))
136
+ assertEquals(label.length, nativeListDisplayOffset(label, 99, foldsLineBreaks = false))
137
+ // Any safe integer arrives over JSON. One past Int range still clamps to
138
+ // the end; narrowed to Int first it would wrap to 0, the whole text.
139
+ assertEquals(label.length, nativeListDisplayOffset(label, 4_294_967_296L, foldsLineBreaks = false))
140
+ assertEquals(label.length, nativeListDisplayOffset(label, Long.MAX_VALUE, foldsLineBreaks = true))
141
+
142
+ // The emoji takes two UTF-16 units, as in the JavaScript string.
143
+ val emojiPrefix = "🕘 08:48 • "
144
+ assertEquals(11, emojiPrefix.length)
145
+ assertEquals(label, "$emojiPrefix$label".substring(nativeListDisplayOffset("$emojiPrefix$label", 11, foldsLineBreaks = false)))
146
+
147
+ val broken = "08:48\r\n• Router"
148
+ assertEquals("08:48 • Router", nativeListFoldLineBreaks(broken))
149
+ assertEquals(8, nativeListDisplayOffset(broken, 9, foldsLineBreaks = true))
150
+ assertEquals(9, nativeListDisplayOffset(broken, 9, foldsLineBreaks = false))
151
+ assertEquals(14, nativeListDisplayOffset(broken, 99, foldsLineBreaks = true))
152
+ }
153
+ }
@@ -0,0 +1,36 @@
1
+ package com.margelo.nitro.nativelist
2
+
3
+ import org.junit.Assert.assertEquals
4
+ import org.junit.Test
5
+
6
+ class NativeListIdentityTrailingAxisTest {
7
+ // Identity trailing accessories stack vertically except for the pairs iOS
8
+ // lays out side by side. The Swap token selector's `valuePair` + DotVerSolid
9
+ // menu icon was missing from the Android list, so the balance was pushed
10
+ // above the menu and clipped inside the 60dp row.
11
+ @Test
12
+ fun matchesTheSideBySidePairsOfIos() {
13
+ fun d(kind: String, name: String = "", actionKey: String = "") =
14
+ NativeListTrailingDescriptor(kind, name, actionKey)
15
+
16
+ val cases: List<Pair<List<NativeListTrailingDescriptor>, Boolean>> = listOf(
17
+ listOf(d("valuePair")) to false,
18
+ listOf(d("valuePair"), d("menu", actionKey = "menu")) to true,
19
+ listOf(d("valuePair"), d("icon", "DotVerSolid", "menu")) to true,
20
+ listOf(d("valuePair"), d("icon", "DotVerSolid")) to false,
21
+ listOf(d("valuePair"), d("icon", "InfoCircleOutline", "menu")) to false,
22
+ listOf(d("icon", "DotVerSolid", "menu"), d("valuePair")) to false,
23
+ listOf(d("valuePair"), d("chevron")) to true,
24
+ listOf(d("icon", "RefreshCcwOutline"), d("chevron")) to true,
25
+ listOf(d("icon", "RefreshCcwOutline", "refresh"), d("chevron")) to false,
26
+ listOf(d("icon", "PencilOutline", "edit"), d("icon", "DragOutline")) to true,
27
+ listOf(d("value"), d("checkbox")) to true,
28
+ listOf(d("valuePair"), d("icon", "DotVerSolid", "menu"), d("chevron")) to false,
29
+ )
30
+
31
+ assertEquals(
32
+ cases.map { it.second },
33
+ cases.map { nativeListIdentityTrailingIsHorizontal(it.first) },
34
+ )
35
+ }
36
+ }
@@ -0,0 +1,68 @@
1
+ package com.margelo.nitro.nativelist
2
+
3
+ import org.junit.Assert.assertEquals
4
+ import org.junit.Test
5
+
6
+ class NativeListLeadingSlotFrameTest {
7
+ // 40dp box, 16dp badge hanging 2dp past the frame, 2dp pair ring.
8
+ private fun frame(index: Int, count: Int, network: Int? = null, pair: Int? = null) =
9
+ nativeListLeadingSlotFrame(
10
+ index = index,
11
+ sourceCount = count,
12
+ networkIndex = network,
13
+ pairIndex = pair,
14
+ width = 40,
15
+ height = 40,
16
+ badgeSize = 16,
17
+ badgeOverhang = 2,
18
+ pairRing = 2,
19
+ )
20
+
21
+ private val full = NativeListSlotFrame(0, 0, 40, 40)
22
+ private val badge = NativeListSlotFrame(26, 26, 16, 16)
23
+ private val primary = NativeListSlotFrame(0, 0, 24, 24)
24
+ private val secondary = NativeListSlotFrame(14, 14, 24, 24)
25
+
26
+ @Test
27
+ fun loneTokenFillsTheBox() {
28
+ assertEquals(full, frame(0, 1))
29
+ }
30
+
31
+ @Test
32
+ fun tokenWithNetworkBadgeKeepsTheCornerBadge() {
33
+ assertEquals(listOf(full, badge), listOf(frame(0, 2, network = 1), frame(1, 2, network = 1)))
34
+ }
35
+
36
+ // OK-66071: the history swap rows bind [send, network, receive]. Android laid
37
+ // the receive token over the whole box, hiding the send token and the network
38
+ // badge; iOS drew it in the badge's corner slot over the badge.
39
+ @Test
40
+ fun activityPairStepsTheSecondaryToTheBottomRightUnderTheBadge() {
41
+ assertEquals(
42
+ listOf(primary, badge, secondary),
43
+ (0 until 3).map { frame(it, 3, network = 1, pair = 2) },
44
+ )
45
+ }
46
+
47
+ @Test
48
+ fun activityPairWithoutNetworkBadge() {
49
+ assertEquals(listOf(primary, secondary), listOf(frame(0, 2, pair = 1), frame(1, 2, pair = 1)))
50
+ }
51
+
52
+ @Test
53
+ fun pairMemberIsSixTenthsOfTheBox() {
54
+ assertEquals(listOf(24, 19, 29), listOf(40, 32, 48).map(::nativeListLeadingPairMemberSize))
55
+ }
56
+
57
+ @Test
58
+ fun stackedImagesStepDiagonally() {
59
+ assertEquals(
60
+ listOf(
61
+ NativeListSlotFrame(0, 5, 29, 29),
62
+ NativeListSlotFrame(6, 5, 29, 29),
63
+ NativeListSlotFrame(11, 5, 29, 29),
64
+ ),
65
+ (0 until 3).map { frame(it, 3) },
66
+ )
67
+ }
68
+ }
@@ -0,0 +1,44 @@
1
+ package com.margelo.nitro.nativelist
2
+
3
+ import org.junit.Assert.assertEquals
4
+ import org.junit.Test
5
+
6
+ class NativeListLeadingVisualClipPolicyTest {
7
+ // OK-65694: the account selector's network badge is laid out past the leading
8
+ // frame. Android clips a child to its own bounds while its parent clips
9
+ // children, so a host row must stop clipping exactly when a bound badge
10
+ // overhangs; a plain image keeps the default clipping.
11
+ @Test
12
+ fun hostStopsClippingOnlyForBadgesLaidOutPastTheFrame() {
13
+ data class Case(
14
+ val kind: String,
15
+ val sourceCount: Int = 1,
16
+ val hasCornerIcon: Boolean = false,
17
+ val overlayCount: Int = 0,
18
+ val expected: Boolean,
19
+ )
20
+
21
+ val cases = listOf(
22
+ Case(kind = "account", expected = false),
23
+ Case(kind = "account", overlayCount = 1, expected = true),
24
+ Case(kind = "wallet", overlayCount = 2, expected = true),
25
+ Case(kind = "token", sourceCount = 1, expected = false),
26
+ Case(kind = "token", sourceCount = 2, expected = true),
27
+ Case(kind = "stackedImages", sourceCount = 3, expected = false),
28
+ Case(kind = "network", hasCornerIcon = true, expected = true),
29
+ Case(kind = "icon", sourceCount = 0, expected = false),
30
+ )
31
+
32
+ assertEquals(
33
+ cases.map(Case::expected),
34
+ cases.map { case ->
35
+ nativeListLeadingVisualOverhangsFrame(
36
+ kind = case.kind,
37
+ sourceCount = case.sourceCount,
38
+ hasCornerIcon = case.hasCornerIcon,
39
+ overlayCount = case.overlayCount,
40
+ )
41
+ },
42
+ )
43
+ }
44
+ }
@@ -26,6 +26,7 @@ class NativeListPressPolicyTest {
26
26
  Case(type = "system", variant = "end", expected = false),
27
27
  Case(type = "system", variant = "spacer", expected = false),
28
28
  Case(type = "walletGroup", expected = false),
29
+ Case(type = "buttonGroup", expected = false),
29
30
  )
30
31
 
31
32
  assertEquals(
@@ -40,4 +41,13 @@ class NativeListPressPolicyTest {
40
41
  },
41
42
  )
42
43
  }
44
+
45
+ // OK-65494: a row value such as a network balance is part of the row's hit
46
+ // area; only a text accessory with an action key handles its own tap.
47
+ @Test
48
+ fun trailingTextOwnsItsTapOnlyWithAnAction() {
49
+ assertEquals(false, isNativeListTrailingTextClickable(null))
50
+ assertEquals(false, isNativeListTrailingTextClickable(""))
51
+ assertEquals(true, isNativeListTrailingTextClickable("network.edit"))
52
+ }
43
53
  }
@@ -1,6 +1,6 @@
1
1
  # NativeList row template catalog
2
2
 
3
- This catalog defines the **12 types in `RowModel`** on the consolidated spec
3
+ This catalog defines the **13 types in `RowModel`** on the consolidated spec
4
4
  branch. Each template owns a fixed internal structure. Its `style` customizes
5
5
  named fields inside that structure; it does not define a new layout or enable a
6
6
  list feature. See [STYLE_SPEC.md](STYLE_SPEC.md) for tokens, numeric bounds,
@@ -34,6 +34,7 @@ template the owner of sections or the indexed bar.
34
34
  | [metricCard](#metriccard) | KPI or portfolio summary | Label/value card or named composite metrics arrangement |
35
35
  | [sectionHeader](#sectionheader) | Structural section heading | Header text + optional summary value/controls |
36
36
  | [action](#action) | A row-level command | Label + optional icon/value/controls |
37
+ | [buttonGroup](#buttongroup) | DeFi position actions | One or more equal-width info-outline buttons |
37
38
  | [system](#system) | Loading, retry, warning, empty/end or spacer | Variant-specific bounded status content |
38
39
 
39
40
  The style roles below form the shared configurable contract on Web, iOS and
@@ -53,7 +54,23 @@ separately from source implementation in STYLE_SPEC §9.
53
54
 
54
55
  - **Use:** an identifiable asset, account, wallet, network or setting.
55
56
  - **Required data:** `leading`, `title`; optional `subtitle`, `tertiary`, `badges`,
56
- `trailing`, `leadingAction`, match ranges and structured subtitle segments.
57
+ `trailing`, `leadingAction`, `titleIcon`, Web-only `secondaryTitleIcon`, match ranges and structured subtitle segments.
58
+ - **Static title icon:** optional 20-point icon immediately after the title with
59
+ a 4-point gap. It has no click action; an optional Web `hoverActionKey`
60
+ emits an icon-anchored tooltip request on hover or touch. A trailing `button` is the fixed small
61
+ secondary text action and uses the normal accessory event slot.
62
+ - **Title image:** optional `titleImage` renders a circular image after the title
63
+ icons and before suffixes/badges. Its `ImageSource` dimensions must be square,
64
+ 1...40 logical units. Optional Web `hoverActionKey` uses the existing anchored
65
+ help event; native keeps the image decorative for touch. See SPEC.md.
66
+ - **Second Web help icon:** `secondaryTitleIcon` uses the same descriptor after
67
+ `titleIcon`; each glyph has its own hover/touch anchor. Native ignores it.
68
+ - **Decorative refresh:** a trailing `RefreshCcwOutline` without `actionKey`
69
+ occupies a 16-point frame and leaves row press with the row.
70
+ - **Web neutral badge:** generic Identity rows with an explicit `tone: 'neutral'`
71
+ use a 20-pixel pill with 12/16 medium text, 8-pixel horizontal and 2-pixel
72
+ vertical padding, and the strong/subdued theme colors. Omitted tone and
73
+ selector presentations keep their existing badge defaults.
57
74
  - **Variants:** default horizontal row; `accountSelector` and `networkSelector`
58
75
  preserve selector control geometry; `walletSidebar` uses a compact, centered
59
76
  wallet presentation. A variant is explicit model data, never inferred from font size.
@@ -63,11 +80,25 @@ separately from source implementation in STYLE_SPEC §9.
63
80
  and 12 for other templates (Web 0).
64
81
  - **Platform default:** without `subtitleLines` or `style.subtitle.lines`, the
65
82
  subtitle shows one line on iOS and Web but two on Android (STYLE_SPEC §6.2).
83
+ - **Recipient opt-in:** `subtitleLines: 0` allows the whole subtitle to wrap;
84
+ `contentHeight: 'auto'` sizes the identity row to that content. Both are
85
+ explicit so existing selector rows retain their geometry. Optional
86
+ `longPressActionKey` emits a row action and suppresses the tap for that gesture.
66
87
  - **Text style roles:** `title`, `subtitle`, `tertiary`, `badge`, `value`,
67
88
  `valueSecondary`. The last two refer to value accessories in `trailing`; `badge`
68
89
  refers to badge text. `value`/`valueSecondary` select the first/second value
69
90
  accessory, ignoring intervening controls. A `valuePair` is one accessory, so
70
- its style applies to both text runs. They are semantic roles, not extra top-level data fields.
91
+ its style applies to both text runs. Optional `primaryTextSegments` and
92
+ `secondaryTextSegments` use the existing subscript run shape per line; missing
93
+ or empty arrays retain the required fallback string. They are semantic roles,
94
+ not extra top-level data fields.
95
+ - **Primary value weight:** optional `valuePair.primaryFontWeight: 'medium'`
96
+ styles only the first line. The second line remains regular; omission keeps
97
+ each platform's existing value-pair typography.
98
+ - **Primary value help:** optional `primaryHelp` on a `valuePair` targets only
99
+ its first line. `presentation` explicitly selects Web Tooltip or cross-platform
100
+ Popover behavior; native Tooltip has no press target. Optional dashed underline
101
+ is visual only. Missing help retains the original passive value pair.
71
102
  - **Layout boundary:** reserve visual and accessory slots; text compresses within
72
103
  its own column. Styling cannot move a checkbox/menu into the title column,
73
104
  reorder accessories or convert a horizontal row into the sidebar presentation.
@@ -132,7 +163,7 @@ separately from source implementation in STYLE_SPEC §9.
132
163
  ![Activity: leading visual and description, trailing amounts, optional actions within the row](images/row-activity.svg)
133
164
 
134
165
  - **Use:** a transaction/activity record with amounts and optional commands.
135
- - **Required data:** `leading`, `title`; optional `secondaryLeading`,
166
+ - **Required data:** `leading`, `title`; optional `hideLeading`, `secondaryLeading`,
136
167
  `description`, `status`, `primaryAmount`, `secondaryAmount`, `footerActions`.
137
168
  At most three footer actions are accepted, each with a unique key.
138
169
  - **Text style roles:** `title`, `description`, `status`, `primaryAmount`,
@@ -140,17 +171,28 @@ separately from source implementation in STYLE_SPEC §9.
140
171
  - **Layout boundary:** amounts remain in the amount column, description stays
141
172
  in its text region, actions stay in the row's action area. Adding actions is a
142
173
  model/height choice, not a typography trick.
174
+ - **Leading visibility:** `hideLeading: true` removes the main visual, its
175
+ accessibility content and its width plus gap. The title and footer actions
176
+ start at the row content inset. The required `leading` model remains valid;
177
+ omitted or `false` retains the existing visual and spacing.
143
178
  - **Common-capability boundary:** `footerActions` are inside this activity row.
144
179
  The list footer is independently configured through the container.
145
180
 
146
181
  - **Native rich amounts:** optional `amounts` replaces the legacy two strings,
147
182
  with at most 32 unique keyed entries. Each entry supports a leading visual,
148
183
  tone, primary/secondary text and subscript segments. The title supports at
149
- most four keyed badges. `descriptionActionKey` emits a description action.
150
- `presentation: 'table'` allocates equal identity/amount columns and an
151
- optional fee column; `stacked` keeps right-aligned amounts beside identity.
152
- `fee.hidden` reserves its column while hiding its content. These native
153
- additions do not change the Web renderer.
184
+ most four keyed badges. `descriptionActionKey` emits a description action on
185
+ the description text from `descriptionActionStart` on (a UTF-16 offset the
186
+ caller supplies; default `0`, the whole text). The text before it and the
187
+ rest of the line stay with the row press.
188
+ `presentation: 'table'` allocates identity (including the leading visual and
189
+ its gap), amounts and optional fee in a stable `1:1:0.6` ratio after column
190
+ gaps. Without fee, identity and amounts have equal widths. Amount content
191
+ stays start-aligned; native fee content stays end-aligned, while Web retains its
192
+ existing start alignment. Fee text length and leading visibility do not move
193
+ the amount column. `stacked` keeps right-aligned amounts beside identity.
194
+ `fee.hidden` reserves its column while hiding its content. The Web rich
195
+ Activity renderer uses these fields and the same `hideLeading` visibility.
154
196
 
155
197
  ```text
156
198
  stacked (phone) table (wide)
@@ -169,11 +211,14 @@ stacked (phone) table (wide)
169
211
 
170
212
  - **Use:** a notification or message preview.
171
213
  - **Required data:** `title`, `body`, `time`; optional `leading`, `thumbnail`,
172
- `unread`. `bodyLines` is the legacy fallback for one, two or three body lines.
214
+ `unread`. `bodyLines` is the legacy fallback for one, two or three body lines;
215
+ zero opts into unlimited body wrapping and natural height.
173
216
  - **Text style roles:** `title`, `body`, `time`. `style.body.lines` accepts one, two or three and takes precedence over `bodyLines`.
174
217
  - **Layout boundary:** time and thumbnail keep their allocated regions; body
175
- text wraps/truncates within the message area. Styling cannot displace the
176
- timestamp, grow over the next row, or turn the preview into unbounded content.
218
+ text wraps/truncates within the message area. Unlimited wrapping is explicit
219
+ and remains bounded by the row's 4096-character text limit. The optional
220
+ `inlineWarning` presentation draws requested top/bottom container borders
221
+ across the row width without side borders or rounded corners.
177
222
  - **Current divergence:** leading-image size and body typography differ across
178
223
  platforms. Larger line boxes need explicit height and visual verification.
179
224
 
@@ -249,8 +294,10 @@ stacked (phone) table (wide)
249
294
  supplies one or two distinct `image`/`video` candidates. It takes precedence
250
295
  over `image`; explicit `imageState: empty | error` still suppresses loading.
251
296
  A video candidate uses a muted paused native player, with no playback/controls or
252
- touch target. Detail playback remains caller-owned. Failure advances once to
253
- the next candidate, then displays the standard error placeholder. The same
297
+ touch target. Detail playback remains caller-owned. While loading the slot
298
+ shows a synchronized sheen placeholder; failure advances once to the next
299
+ candidate, then shows the hatched failed placeholder (SPEC: Media loading
300
+ and failure placeholders). The same
254
301
  media box and caption diagram apply; this adds no new layout region.
255
302
  Web keeps the existing `image` field and does not execute media probing.
256
303
  - **Native lifetime:** request identity includes row key, full source, fit,
@@ -309,6 +356,11 @@ chrome and emits no row action. Omission preserves existing rendering.
309
356
  icons/actions, checkbox, `sticky`, `indexTitle`. Variants: default, `summary`,
310
357
  `gallery`, `history`; `presentation: 'networkSelector'` is also available.
311
358
  - **Text style roles:** `title`, `subtitle`, `value`.
359
+ - **DeFi position fields:** optional `leadingBadge` precedes the title.
360
+ `style.valuePlacement: 'afterTitle'` keeps a short value beside the title;
361
+ `style.titleDecoration` explicitly selects plain or dashed title text.
362
+ `valueHelp` uses the same explicit presentation and underline contract as
363
+ `valuePair.primaryHelp`. Omission keeps the original heading behavior.
312
364
  - **Layout boundary:** preserve heading/value/control regions. `summary` does
313
365
  not accept a checkbox and is not sticky. Pinning and index-entry generation are
314
366
  container behavior, not a text-style property.
@@ -333,6 +385,18 @@ chrome and emits no row action. Omission preserves existing rendering.
333
385
  `rows`, `fixedFooter` or `emptyState`. The container decides placement and
334
386
  visibility; the action template only renders its content.
335
387
 
388
+ ## buttonGroup
389
+
390
+ - **Use:** the full-width DeFi position actions within the list's data stream.
391
+ - **Required data:** a nonempty `buttons` array. Every entry has a unique
392
+ `key`, `label` and `actionKey`; optional `disabled`, `loading`, `testID` and
393
+ `accessibilityLabel` retain one control per entry.
394
+ - **Fixed structure:** equal-width medium info-outline buttons with 10-point
395
+ gaps, 12-point vertical button padding and 12-point radius. Loading retains
396
+ width and disables only its button. Row disable blocks all actions.
397
+ - **Action boundary:** each button emits its own action and anchor slot; the row
398
+ has no independent press action. The SDK never resolves DeFi permissions.
399
+
336
400
  ## system
337
401
 
338
402
  ![System variants: loading indicator, retry message and action, warning, no-match/end text and explicit spacer](images/row-system.svg)