@onekeyfe/react-native-native-list 6.8.0-2 → 6.8.0-21

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 (56) hide show
  1. package/android/build.gradle +3 -0
  2. package/android/src/main/java/com/onekey/nativelist/NativeListAccessoryStack.kt +18 -4
  3. package/android/src/main/java/com/onekey/nativelist/NativeListIdentityRenderer.kt +70 -33
  4. package/android/src/main/java/com/onekey/nativelist/NativeListMarketRenderer.kt +3 -2
  5. package/android/src/main/java/com/onekey/nativelist/NativeListModels.kt +8 -1
  6. package/android/src/main/java/com/onekey/nativelist/NativeListRendererRowView.kt +21 -4
  7. package/android/src/main/java/com/onekey/nativelist/NativeListResolvedText.kt +24 -3
  8. package/android/src/main/java/com/onekey/nativelist/NativeListRowUpdates.kt +34 -0
  9. package/android/src/main/java/com/onekey/nativelist/NativeListSectionHeaderRenderer.kt +11 -4
  10. package/android/src/main/java/com/onekey/nativelist/NativeListView.kt +84 -9
  11. package/android/src/main/res/values/native_scroll_coordinator_ids.xml +1 -0
  12. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListIdentitySubtitleBindingTest.kt +177 -0
  13. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListIdentityTrailingAxisTest.kt +2 -0
  14. package/docs/ROW_TEMPLATES.md +3 -1
  15. package/docs/SPEC.md +165 -4
  16. package/docs/STYLE_SPEC.md +7 -1
  17. package/ios/NativeListAccessoryStack.swift +22 -0
  18. package/ios/NativeListDataRowRenderer.swift +12 -5
  19. package/ios/NativeListIdentityRenderer.swift +36 -58
  20. package/ios/NativeListLeadingVisual.swift +8 -0
  21. package/ios/NativeListMarketRenderer.swift +6 -2
  22. package/ios/NativeListModels.swift +7 -0
  23. package/ios/NativeListResolvedText.swift +9 -7
  24. package/ios/NativeListSectionHeaderRenderer.swift +9 -43
  25. package/ios/NativeListTextStyles.swift +72 -12
  26. package/ios/RNCNativeListView.swift +203 -45
  27. package/ios/tests/NativeListLifecycleTests.swift +298 -24
  28. package/lib/module/validation.js +55 -12
  29. package/lib/module/web/NativeListGeneratedIcons.js +1 -0
  30. package/lib/module/web/NativeListWebEngine.js +213 -23
  31. package/lib/module/web/templates/ActivityRowRenderer.js +1 -1
  32. package/lib/module/web/templates/DataRowRenderer.js +38 -1
  33. package/lib/module/web/templates/IdentityRowRenderer.js +12 -1
  34. package/lib/module/web/templates/MarketRowRenderer.js +2 -0
  35. package/lib/module/web/templates/MediaTileRowRenderer.js +1 -0
  36. package/lib/module/web/templates/RowElements.js +2 -2
  37. package/lib/module/web/templates/RowText.js +2 -0
  38. package/lib/typescript/src/models.d.ts +24 -1
  39. package/lib/typescript/src/web/NativeListWebEngine.d.ts +8 -1
  40. package/lib/typescript/src/web/templates/RowRendererRegistry.d.ts +6 -2
  41. package/lib/typescript/src/web/templates/RowVisual.d.ts +1 -1
  42. package/package.json +1 -1
  43. package/scripts/generate-icons.test.mjs +1 -0
  44. package/scripts/native-list-icons.json +1 -1
  45. package/src/models.ts +24 -0
  46. package/src/validation.ts +129 -5
  47. package/src/web/NativeListGeneratedIcons.ts +1 -0
  48. package/src/web/NativeListWebEngine.ts +382 -27
  49. package/src/web/templates/ActivityRowRenderer.ts +1 -1
  50. package/src/web/templates/DataRowRenderer.ts +48 -1
  51. package/src/web/templates/IdentityRowRenderer.ts +23 -1
  52. package/src/web/templates/MarketRowRenderer.ts +2 -0
  53. package/src/web/templates/MediaTileRowRenderer.ts +1 -0
  54. package/src/web/templates/RowElements.ts +3 -2
  55. package/src/web/templates/RowText.ts +6 -0
  56. package/src/web/templates/RowVisual.ts +2 -1
@@ -7,6 +7,7 @@ import android.animation.AnimatorListenerAdapter
7
7
  import android.content.Context
8
8
  import android.graphics.Canvas
9
9
  import android.graphics.Color
10
+ import android.graphics.Matrix
10
11
  import android.graphics.Paint
11
12
  import android.graphics.Path
12
13
  import android.graphics.Rect
@@ -2791,6 +2792,7 @@ class NativeListView(
2791
2792
  previous.selectionMode != next.selectionMode ||
2792
2793
  previous.rowPressToggles != next.rowPressToggles ||
2793
2794
  previous.reorderable != next.reorderable ||
2795
+ previous.reorderFromHandleOnly != next.reorderFromHandleOnly ||
2794
2796
  previous.pullToRefresh != next.pullToRefresh ||
2795
2797
  previous.refreshTriggerDistance != next.refreshTriggerDistance ||
2796
2798
  previous.refreshing != next.refreshing ||
@@ -4537,18 +4539,35 @@ class NativeListView(
4537
4539
  reorderTouchHandler = handler
4538
4540
  val movementLimit = dp(REORDER_ALLOWABLE_MOVEMENT_DP).toFloat()
4539
4541
  reorderTouchListener = object : RecyclerView.SimpleOnItemTouchListener() {
4540
- private var candidate: RecyclerView.ViewHolder? = null
4542
+ private var candidate: NativeListViewHolder? = null
4543
+ private var candidateItem: NativeListItem? = null
4544
+ private var candidateHandle: View? = null
4545
+ private var candidateBindingEpoch = 0L
4546
+ private var rawDownX = 0f
4547
+ private var rawDownY = 0f
4541
4548
  private var downX = 0f
4542
4549
  private var downY = 0f
4543
4550
  private var dragStarted = false
4544
4551
  private val startDrag = Runnable {
4545
4552
  val holder = candidate ?: return@Runnable
4546
- val position = holder.bindingAdapterPosition
4547
- val item = adapter.itemAt(position) ?: return@Runnable
4548
- if (!item.isReorderable) return@Runnable
4549
- if (item.type != "walletGroup" && recyclerView.isLayoutRequested) {
4553
+ val original = candidateItem ?: return@Runnable
4554
+ if (original.type != "walletGroup" && recyclerView.isLayoutRequested) {
4550
4555
  relayoutRecyclerViewImmediately()
4551
4556
  }
4557
+ val item = adapter.itemAt(holder.bindingAdapterPosition) ?: return@Runnable
4558
+ val acceptedIndex = acceptedKeyIndex?.get(original.key) ?: return@Runnable
4559
+ val current = config ?: return@Runnable
4560
+ val accepted = current.items.getOrNull(acceptedIndex) ?: return@Runnable
4561
+ if (item.key != original.key || accepted.key != original.key || !accepted.isReorderable)
4562
+ return@Runnable
4563
+ val handle = candidateHandle
4564
+ if (handle != null) {
4565
+ val controlled = current.selectionMode == "single" || current.selectionMode == "multiple"
4566
+ if (holder.rowView.bindingEpoch != candidateBindingEpoch ||
4567
+ (accepted.content != original.content && !isStableSelectionUpdate(original, accepted, controlled)) ||
4568
+ findReorderHandle(holder.itemView, rawDownX, rawDownY) !== handle
4569
+ ) return@Runnable
4570
+ }
4552
4571
  dragStarted = true
4553
4572
  beginDrag(holder)
4554
4573
  }
@@ -4562,6 +4581,8 @@ class NativeListView(
4562
4581
  private fun cancelPending() {
4563
4582
  handler.removeCallbacks(startDrag)
4564
4583
  candidate = null
4584
+ candidateItem = null
4585
+ candidateHandle = null
4565
4586
  }
4566
4587
 
4567
4588
  override fun onInterceptTouchEvent(recyclerView: RecyclerView, event: MotionEvent): Boolean {
@@ -4572,11 +4593,14 @@ class NativeListView(
4572
4593
  dragStarted = false
4573
4594
  downX = event.x
4574
4595
  downY = event.y
4596
+ rawDownX = event.rawX
4597
+ rawDownY = event.rawY
4575
4598
  val child = recyclerView.findChildViewUnder(event.x, event.y)
4576
4599
  candidate = child
4577
4600
  ?.let(recyclerView::getChildViewHolder)
4578
4601
  // Container-slot holders report binding position 0 in their own adapter.
4579
- ?.takeIf { holder -> holder is NativeListViewHolder && holder.bindingAdapter === adapter }
4602
+ ?.let { it as? NativeListViewHolder }
4603
+ ?.takeIf { holder -> holder.bindingAdapter === adapter }
4580
4604
  ?.takeIf { holder ->
4581
4605
  adapter.itemAt(holder.bindingAdapterPosition)?.let { item ->
4582
4606
  // OneKey patch: any wallet group member can initiate the group drag.
@@ -4586,10 +4610,14 @@ class NativeListView(
4586
4610
  // item.type != "walletGroup" ||
4587
4611
  // event.rawY in holderLocation[1].toFloat()..(holderLocation[1] + dp(68)).toFloat()
4588
4612
  // )
4613
+ candidateItem = item
4614
+ if (config?.reorderFromHandleOnly == true) {
4615
+ candidateHandle = findReorderHandle(holder.itemView, rawDownX, rawDownY)
4616
+ if (candidateHandle == null) return@let false
4617
+ candidateBindingEpoch = holder.rowView.bindingEpoch
4618
+ }
4589
4619
  item.isReorderable &&
4590
- (holder as? NativeListViewHolder)?.rowView?.canStartWalletGroupReorder(
4591
- event.y - holder.itemView.top,
4592
- ) != false
4620
+ holder.rowView.canStartWalletGroupReorder(event.y - holder.itemView.top)
4593
4621
  } == true
4594
4622
  }
4595
4623
  if (candidate != null) handler.postDelayed(startDrag, REORDER_LONG_PRESS_MS)
@@ -4607,6 +4635,53 @@ class NativeListView(
4607
4635
  }.also(recyclerView::addOnItemTouchListener)
4608
4636
  }
4609
4637
 
4638
+ /** Find the visible trailing handle whose button frame contains the initial press. */
4639
+ private fun findReorderHandle(root: View, rawX: Float, rawY: Float): View? {
4640
+ if (root.visibility != View.VISIBLE) return null
4641
+ if (root.getTag(R.id.onekey_native_list_reorder_handle) == true) {
4642
+ return root.takeIf { reorderHandleContainsScreenPoint(it, rawX, rawY) }
4643
+ }
4644
+ if (root is ViewGroup) {
4645
+ for (index in 0 until root.childCount) {
4646
+ findReorderHandle(root.getChildAt(index), rawX, rawY)?.let { return it }
4647
+ }
4648
+ }
4649
+ return null
4650
+ }
4651
+
4652
+ private fun reorderHandleContainsScreenPoint(handle: View, rawX: Float, rawY: Float): Boolean {
4653
+ val localToScreen = Matrix()
4654
+ var view = handle
4655
+ while (true) {
4656
+ val parent = view.parent as? View ?: break
4657
+ localToScreen.postConcat(view.matrix)
4658
+ localToScreen.postTranslate(
4659
+ (view.left - parent.scrollX).toFloat(),
4660
+ (view.top - parent.scrollY).toFloat(),
4661
+ )
4662
+ view = parent
4663
+ }
4664
+
4665
+ // The top-level View's screen origin already includes its transform and
4666
+ // the window offset. Subtract its mapped origin to apply the matrix once.
4667
+ val screenOrigin = IntArray(2)
4668
+ view.getLocationOnScreen(screenOrigin)
4669
+ val mappedOrigin = floatArrayOf(0f, 0f)
4670
+ view.matrix.mapPoints(mappedOrigin)
4671
+ localToScreen.postConcat(view.matrix)
4672
+ localToScreen.postTranslate(
4673
+ screenOrigin[0] - mappedOrigin[0],
4674
+ screenOrigin[1] - mappedOrigin[1],
4675
+ )
4676
+
4677
+ val screenToLocal = Matrix()
4678
+ if (!localToScreen.invert(screenToLocal)) return false
4679
+ val point = floatArrayOf(rawX, rawY)
4680
+ screenToLocal.mapPoints(point)
4681
+ return point[0] >= 0f && point[0] < handle.width &&
4682
+ point[1] >= 0f && point[1] < handle.height
4683
+ }
4684
+
4610
4685
  private fun prepareDisplacedReorderAnimation(view: View, helper: ItemTouchHelper) {
4611
4686
  val previousX = view.x
4612
4687
  val previousY = view.y
@@ -4,4 +4,5 @@
4
4
  <item name="onekey_native_scroll_coordinator_refresh_inset" type="id" />
5
5
  <item name="onekey_native_scroll_coordinator_command_listener" type="id" />
6
6
  <item name="onekey_native_scroll_coordinator_command_cancel_listener" type="id" />
7
+ <item name="onekey_native_list_reorder_handle" type="id" />
7
8
  </resources>
@@ -0,0 +1,177 @@
1
+ package com.margelo.nitro.nativelist
2
+
3
+ import android.app.Activity
4
+ import android.view.View
5
+ import android.view.ViewGroup
6
+ import android.widget.FrameLayout
7
+ import android.widget.TextView
8
+ import com.facebook.react.bridge.BridgeReactContext
9
+ import com.facebook.react.uimanager.ThemedReactContext
10
+ import org.json.JSONArray
11
+ import org.json.JSONObject
12
+ import org.junit.After
13
+ import org.junit.Assert.assertEquals
14
+ import org.junit.Assert.assertFalse
15
+ import org.junit.Assert.assertNull
16
+ import org.junit.Assert.assertSame
17
+ import org.junit.Assert.assertTrue
18
+ import org.junit.Before
19
+ import org.junit.Test
20
+ import org.junit.runner.RunWith
21
+ import org.robolectric.Robolectric
22
+ import org.robolectric.RobolectricTestRunner
23
+ import org.robolectric.annotation.Config
24
+
25
+ @RunWith(RobolectricTestRunner::class)
26
+ @Config(sdk = [34])
27
+ class NativeListIdentitySubtitleBindingTest {
28
+ private val controller = Robolectric.buildActivity(Activity::class.java)
29
+ private lateinit var row: NativeListIdentityRowView
30
+ private val checkboxState: (NativeListItem, NativeSelectionTarget?, String) -> String =
31
+ { _, _, fallback -> fallback }
32
+
33
+ @Before
34
+ fun setUp() {
35
+ val activity = controller.setup().visible().get()
36
+ val context = ThemedReactContext(BridgeReactContext(activity.application), activity, "test", 1)
37
+ row = NativeListIdentityRowView(context, NativeListFonts())
38
+ activity.setContentView(FrameLayout(activity).apply { addView(row) })
39
+ }
40
+
41
+ @After
42
+ fun tearDown() {
43
+ row.dispose()
44
+ controller.pause().stop().destroy()
45
+ }
46
+
47
+ @Test
48
+ fun longerPlainBalanceRemeasuresTheExistingLabelWithoutDetachingAvatar() {
49
+ bind(account("--"))
50
+ measureRow()
51
+ val balance = requireNotNull(label("--"))
52
+ val originalWidth = balance.measuredWidth
53
+ assertTrue(originalWidth > 0)
54
+ assertFalse(balance.isLayoutRequested)
55
+ val originalEpoch = row.bindingEpoch
56
+ val avatarDetachments = watchAvatarDetachments()
57
+
58
+ val updated = account("12345678.90")
59
+ bind(updated)
60
+ assertTrue(balance.isLayoutRequested)
61
+ measureRow()
62
+
63
+ assertSame(balance, label("12345678.90"))
64
+ assertTrue(balance.measuredWidth > originalWidth)
65
+ assertSame(updated, row.tag)
66
+ assertEquals("Account, 12345678.90", row.contentDescription)
67
+ assertEquals(originalEpoch, row.bindingEpoch)
68
+ assertEquals(0, avatarDetachments())
69
+ }
70
+
71
+ @Test
72
+ fun selectionEchoThenBalanceKeepsTheSubtitleAndAvatarAttached() {
73
+ bind(account("--", checkbox = "unchecked"))
74
+ val balance = requireNotNull(label("--"))
75
+ val originalEpoch = row.bindingEpoch
76
+ val avatarDetachments = watchAvatarDetachments()
77
+ val checkbox = descendants(row).filterIsInstance<OneKeyCheckboxView>().single()
78
+
79
+ row.bindSelection(
80
+ account("--", selected = true, checkbox = "checked"), null, "linear", 0, true, checkboxState,
81
+ )
82
+ assertEquals("CheckboxCheckedCustom", checkbox.iconName)
83
+ bind(account("12.34", selected = true, checkbox = "checked"))
84
+
85
+ assertSame(balance, label("12.34"))
86
+ assertEquals("CheckboxCheckedCustom", checkbox.iconName)
87
+ assertEquals(originalEpoch, row.bindingEpoch)
88
+ assertEquals(0, avatarDetachments())
89
+ }
90
+
91
+ @Test
92
+ fun subtitleUpdateUsesRenderedContentAfterSelectionHasAdvancedTheModel() {
93
+ bind(account("--", showAction = true))
94
+ val originalEpoch = row.bindingEpoch
95
+ val previousAction = requireNotNull(label("Manage"))
96
+
97
+ row.bindSelection(account("--", selected = true), null, "linear", 0, true, checkboxState)
98
+ assertSame(previousAction, label("Manage"))
99
+ bind(account("12.34", selected = true))
100
+
101
+ assertNull(label("Manage"))
102
+ assertEquals("12.34", label("12.34")?.text.toString())
103
+ assertTrue(row.bindingEpoch > originalEpoch)
104
+ }
105
+
106
+ @Test
107
+ fun formattedBalanceUpdateReusesTheLabelAndClearsOldSpansOnPlainText() {
108
+ bind(account("--"))
109
+ val balance = requireNotNull(label("--"))
110
+ val originalEpoch = row.bindingEpoch
111
+ bind(account("0.0004", formatted = true))
112
+ assertSame(balance, label("0.04"))
113
+ bind(account("1.23"))
114
+ assertSame(balance, label("1.23"))
115
+ assertEquals(originalEpoch, row.bindingEpoch)
116
+ }
117
+
118
+ private fun bind(item: NativeListItem) {
119
+ row.bind(
120
+ item, null, "linear", "vertical", 0, item.json.optBoolean("selected"), checkboxState,
121
+ useSourceScale = false,
122
+ )
123
+ }
124
+
125
+ private fun measureRow() {
126
+ row.measure(
127
+ View.MeasureSpec.makeMeasureSpec(640, View.MeasureSpec.EXACTLY),
128
+ View.MeasureSpec.makeMeasureSpec(0, View.MeasureSpec.UNSPECIFIED),
129
+ )
130
+ row.layout(0, 0, row.measuredWidth, row.measuredHeight)
131
+ }
132
+
133
+ private fun account(
134
+ balance: String,
135
+ showAction: Boolean = false,
136
+ formatted: Boolean = false,
137
+ selected: Boolean = false,
138
+ checkbox: String? = null,
139
+ ): NativeListItem {
140
+ val json = JSONObject("""
141
+ {"key":"account","type":"identity","presentation":"accountSelector","title":"Account",
142
+ "leading":{"kind":"account","fallbackText":"AC"},
143
+ "subtitleSegments":[{"text":"$balance"},{"text":"0x1234","separatorBefore":true}]}
144
+ """).put("accessibilityLabel", "Account, $balance").put("selected", selected)
145
+ if (showAction) {
146
+ json.put("trailing", JSONArray("""[{"kind":"button","label":"Manage","actionKey":"manage"}]"""))
147
+ }
148
+ if (checkbox != null) {
149
+ json.put("trailing", JSONArray().put(JSONObject().put("kind", "checkbox").put("state", checkbox)))
150
+ }
151
+ if (formatted) {
152
+ json.getJSONArray("subtitleSegments").getJSONObject(0)
153
+ .put("textSegments", JSONArray("""[{"text":"0.0"},{"text":"4","style":"subscript"}]"""))
154
+ }
155
+ return NativeListItem.parse(json)
156
+ }
157
+
158
+ private fun label(text: String): TextView? =
159
+ descendants(row).filterIsInstance<TextView>().singleOrNull { it.text.toString() == text && it.visibility == View.VISIBLE }
160
+
161
+ private fun watchAvatarDetachments(): () -> Int {
162
+ val avatar = descendants(row).single { it is NativeListLeadingVisual }
163
+ var detachments = 0
164
+ avatar.addOnAttachStateChangeListener(object : View.OnAttachStateChangeListener {
165
+ override fun onViewAttachedToWindow(view: View) = Unit
166
+ override fun onViewDetachedFromWindow(view: View) { detachments++ }
167
+ })
168
+ return { detachments }
169
+ }
170
+
171
+ private fun descendants(view: View): Sequence<View> = sequence {
172
+ yield(view)
173
+ if (view is ViewGroup) {
174
+ for (index in 0 until view.childCount) yieldAll(descendants(view.getChildAt(index)))
175
+ }
176
+ }
177
+ }
@@ -24,6 +24,8 @@ class NativeListIdentityTrailingAxisTest {
24
24
  listOf(d("icon", "RefreshCcwOutline"), d("chevron")) to true,
25
25
  listOf(d("icon", "RefreshCcwOutline", "refresh"), d("chevron")) to false,
26
26
  listOf(d("icon", "PencilOutline", "edit"), d("icon", "DragOutline")) to true,
27
+ listOf(d("icon", "PencilOutline", "edit"), d("drag")) to true,
28
+ listOf(d("icon", "InfoCircleOutline", "edit"), d("drag")) to false,
27
29
  listOf(d("value"), d("checkbox")) to true,
28
30
  listOf(d("valuePair"), d("icon", "DotVerSolid", "menu"), d("chevron")) to false,
29
31
  )
@@ -257,7 +257,9 @@ stacked (phone) table (wide)
257
257
  view. Container, padding, image, `leadingGap` and `index` styles keep the
258
258
  legacy text layout.
259
259
  - *Web:* `secondaryLeadingText` precedes the primary text on the same line,
260
- badges follow it, and secondary text is directly below.
260
+ badges follow it, and secondary text is directly below. An optional
261
+ `webLeadingBadge` on a column is a passive label at the start of that line,
262
+ truncated at half of the column width; iOS and Android ignore it.
261
263
  - Table layout uses the column view on every platform (Android unstyled:
262
264
  the fixed legacy column geometry above).
263
265
  - **Style isolation:** primary and secondary text use independent style targets in
package/docs/SPEC.md CHANGED
@@ -116,6 +116,17 @@ Status: implemented in local source for the Select Address and Swap selectors;
116
116
  native device and broader Web runtime verification remain pending. These fields travel in snapshot/patch JSON
117
117
  and do not change the Nitro ABI.
118
118
 
119
+ Snapshot and patch validation requires a boolean for `collapseEmptyTrailing`;
120
+ a patch with `null` restores the default. Automatic height uses the same
121
+ trailing geometry, font features and tracking as the rendered text.
122
+
123
+ An `identity` row may set `collapseEmptyTrailing: true`: when it has no trailing
124
+ accessories, iOS drops the (empty) trailing column and its 12-point gap so the
125
+ text column reaches the row's trailing padding, as a React Native `ListItem`
126
+ without children does. Omission keeps the legacy iOS reservation. Android and
127
+ Web already give an empty trailing column no width or gap, so the flag does not
128
+ change them.
129
+
119
130
  An `identity` row may opt into `subtitleLines: 0`, meaning the complete subtitle
120
131
  wraps at its measured text-column width without a line cap. Existing omitted,
121
132
  one-line and two-line behavior stays unchanged. An identity row with
@@ -181,16 +192,27 @@ ambiguous sources, invalid metadata and stale output. Stable sorting emits no
181
192
  machine paths or timestamps. Frozen tests compare exact registry key sets;
182
193
  this does not prove that every application-computed name is registered.
183
194
 
184
- The closed manifest contains 43 names with iOS 42, Android 41 and Web 25
195
+ The closed manifest contains 43 names with iOS 42, Android 41 and Web 26
185
196
  registry entries (including DotVerSolid). Document2Outline, WalletOutline and
186
197
  PlusLargeOutline are registered on all three platforms; TicketOutline also
187
- retains Web and adds native coverage. These main-line names use image-owned
198
+ retains Web and adds native coverage. InfoCircleOutline is registered on Web as
199
+ well as native, so a Web data-column `titleIcon` draws the host artwork rather
200
+ than the text glyph. These main-line names use image-owned
188
201
  canonical SVGs, not duplicate NativeList paths or asset catalogs.
189
202
  Existing Activity ten-name and Market/Media private call sites resolve canonical
190
203
  names through the same DOM helper; their previous coverage does not expand.
191
204
  Image preserves raw path order, fill rules, fixed colors, opacity and viewBoxes.
192
205
  NativeList retains its layout, button bounds, actions and snapshot interfaces.
193
206
 
207
+ The registries are aliases and native geometry, not a whitelist. iOS and Android
208
+ already resolve any other name through image's `OneKeyNamedSVG` catalog. Web now
209
+ does the same: a name missing from the Web registry is passed to
210
+ `createNamedIcon` unchanged, so every host-catalog icon (for example
211
+ `DeleteOutline`, `MinusCircleSolid`) renders as artwork on all three platforms.
212
+ Only a name the host catalog also lacks keeps the legacy text glyph. The
213
+ trailing `drag` accessory renders the `DragOutline` artwork on Web instead of
214
+ `≡` when the host provides it.
215
+
194
216
  Focused SDK fixture acceptance covers native attached lifecycle/rebinding,
195
217
  legacy iOS asset comparisons, shared alpha semantics and real Web/Electron
196
218
  source/lib consumers. This is not full App, balance, transaction or signed
@@ -200,7 +222,8 @@ Identity trailing accessories stack vertically, except for the pairs every
200
222
  platform lays out side by side: `value` + `checkbox`, `valuePair` + `menu`,
201
223
  `valuePair` + an `icon` named `DotVerSolid` whose `actionKey` is `menu`,
202
224
  `valuePair` + `chevron`, a `RefreshCcwOutline` icon without an action key +
203
- `chevron`, and `PencilOutline` + `DragOutline` icons. iOS decides this in
225
+ `chevron`, and a `PencilOutline` icon followed by a `DragOutline` icon or a
226
+ `drag` accessory. iOS decides this in
204
227
  `configureTrailingStack`; Android in `nativeListIdentityTrailingIsHorizontal`
205
228
  (JVM test `NativeListIdentityTrailingAxisTest`). The `valuePair` + menu-icon
206
229
  pair is the Swap token selector's balance column and row menu; stacking it
@@ -442,7 +465,13 @@ existing appearance.
442
465
 
443
466
  Identity leading visuals consume the existing `borderColor` as a one-point/dp
444
467
  solid bitmap border when supplied without `borderStyle: 'dashed'`; omission or
445
- a dashed style clears the solid border on every bind.
468
+ a dashed style clears the solid border on every bind. An optional `borderWidth`
469
+ (`0 < width <= 4` logical units, default 1) sets that solid border's width; a
470
+ host hairline (`StyleSheet.hairlineWidth`) draws one physical pixel on iOS and
471
+ Android (rounded up to at least one pixel) and a fractional CSS border on Web.
472
+ Web insets the main image into the bordered frame's content box, as iOS and
473
+ Android do, and a sized `fallbackIcon` keeps its requested size there instead
474
+ of shrinking to the content box.
446
475
  The image is inset by that border width. An overlay may optionally set
447
476
  `fontWeight` to one of the existing text weight names
448
477
  (`regular | medium | semibold | bold`). This changes only overlay text;
@@ -515,6 +544,20 @@ migration itself does not change any other protocol field.
515
544
 
516
545
  ## Lifecycle and concurrency
517
546
 
547
+ ### Android account-selector subtitle updates
548
+
549
+ An already bound `identity` row with `presentation: 'accountSelector'` updates
550
+ its existing subtitle labels in place when only their text, formatted text
551
+ segments, tone, or the row's accessibility label changes. The same avatar
552
+ view and its active or completed request stay in place. Selection and
553
+ accessibility reflect the accepted row, and the updated labels are remeasured
554
+ to allocate their new widths. The comparison uses the last rendered content
555
+ even when a newer selection callback has arrived. Row selection and existing
556
+ checkbox state are applied separately and do not require a rebuild. A
557
+ different key, subtitle slot structure, other row content, or binding inputs
558
+ (such as theme or layout) uses the normal binding path. Recycling still
559
+ releases the row's image work.
560
+
518
561
  ### Updates before native host binding
519
562
 
520
563
  Status: implemented in local source, unreleased. The delayed-host regression fails
@@ -551,6 +594,38 @@ image that already loaded. Common container styling clears what it wrote on the
551
594
  next bind, including properties it set on template children. UI mutation remains on the platform
552
595
  UI thread; [DESIGN.md](DESIGN.md) describes update and event ownership.
553
596
 
597
+ ### iOS cell requests during snapshot replacement
598
+
599
+ Status: implemented, unreleased. On iOS 17.5 and 26.0, a focused UIKit fixture
600
+ reproduced the assertion on version 6.7.0-62 and completed the same layout
601
+ with the fix. Three focused UIKit tests passed on both runtimes, including
602
+ fixed-footer action routing. Consuming-app acceptance of the fix remains
603
+ pending.
604
+
605
+ When a snapshot removes rows, UIKit may request cells from its outgoing
606
+ snapshot while the new logical rows are already active. The iOS host MUST
607
+ provide a valid reusable cell for such requests. Until UIKit completes the
608
+ removal, the host retains only the removed row descriptors needed for pending
609
+ snapshot applications. These descriptors are presentation-only and cannot
610
+ emit actions, expose accessibility elements, or become selectable. Repeated
611
+ updates must preserve the descriptors still needed by in-flight applications
612
+ and must release them on completion or host disposal. A request with no
613
+ available descriptor receives an inert empty cell. The accepted snapshot,
614
+ patch validation, row identity, and structural-transition behavior retain
615
+ their existing contracts.
616
+
617
+ The action and interaction restrictions apply to the presenting collection
618
+ row. Its top-level key determines whether its actions can be delivered,
619
+ including actions whose payload comes from a child renderer. The fixed footer
620
+ is a separate host and retains its normal interaction, even when it shares a
621
+ key with a retiring row.
622
+
623
+ Conformance scrolls an unmaterialized outgoing row into UIKit's viewport
624
+ during removal and checks its renderer, inert state, and the binding of the
625
+ first filtered row. It also covers fixed-footer actions with a shared key
626
+ during a structural transition. A separate consuming-app check covers address
627
+ input in the Send recipient picker.
628
+
554
629
  ### Android vertical-drag React touch cancellation
555
630
 
556
631
  Status: implemented; four real Android MotionEvent/JSTouchDispatcher regressions
@@ -591,6 +666,90 @@ and one native end, a tap produces touch-end, and cancellation/removal followed
591
666
  by reuse leaves the next tap functional. This proves native touch delivery, not
592
667
  execution of a JavaScript press handler or physical-device gesture feel.
593
668
 
669
+ ### Handle-only reorder activation
670
+
671
+ `capabilities.reorderActivation` selects where a reorder may start. `row`
672
+ (default, also when omitted) keeps the existing behavior: a long press anywhere
673
+ on a reorderable row. `handle` restricts the start to the row's trailing `drag`
674
+ accessory; a long press elsewhere on the row is an ordinary press or long press
675
+ and never begins a reorder. Development and production reject any other value
676
+ and retain the currently accepted snapshot.
677
+
678
+ - **Gesture:** iOS and Android keep their reorder long-press duration (200 ms)
679
+ and movement tolerance. Web keeps its touch long press and mouse drag
680
+ threshold; only the pointer-down target is narrowed.
681
+ - **Hit area:** the visible `drag` accessory. Android accepts its 24dp glyph
682
+ slot plus 7dp on each side (its actual 38dp button frame). Android maps
683
+ the screen press into the handle's local coordinates at press and at
684
+ recognition, accounting for transforms and scrolling between ancestors.
685
+ iOS also uses the button frame. Recognition remains tied to the row and handle that
686
+ received the initial touch, even if the finger moves across a row boundary.
687
+ A removed handle or a recycled binding cancels a pending start and keeps
688
+ accepted data updates. An iOS or Android selection echo that retains the row
689
+ binding and its handle preserves the pending press.
690
+ - **Eligibility:** row reorder eligibility (`draggable`, a `drag` accessory,
691
+ `disabled`) is unchanged. A row without a `drag` accessory cannot start a
692
+ reorder in `handle` mode.
693
+ - **Accessory:** a `drag` without an action swallows a short tap on iOS and
694
+ passes it to the row on Android and Web. In Web handle mode a `drag` with
695
+ an `actionKey` can start a reorder and still emits its action on a short
696
+ tap. A recognized reorder suppresses the click generated by that press,
697
+ including release after cancellation. Overlapping pointer sequences retain
698
+ their own suppression until a matching click or new press with that pointer
699
+ ID, native cancellation, or 500 ms after release. A click without a pointer ID
700
+ matches the most recent release at the same action or row and client position
701
+ (within one CSS pixel), using the input type when the browser supplies it.
702
+ For a press and release on different elements, the match uses their nearest
703
+ shared ancestor as the click target. Releases outside the list cannot replace
704
+ that match. A new short tap or
705
+ keyboard activation can still emit the action. Icons beside the handle keep
706
+ their own actions.
707
+ Callers can use `pressDisabled` to disable row opening.
708
+ - **Web cursor:** in `handle` mode the row keeps the default cursor and the
709
+ handle shows `grab`.
710
+ - **Handle appearance:** every platform tints the `DragOutline` glyph
711
+ `iconSubdued`, matching `ListItem.IconButton`; Web centers it in a 24-point
712
+ box so it lines up with neighbouring icon buttons instead of the text line.
713
+ iOS and Android draw the handle as a medium tertiary button (38-point frame,
714
+ glyph inset 7), like the source `IconButton`, so a `PencilOutline` + `drag`
715
+ pair keeps 24 points between glyph slots (Android gives the second frame a
716
+ 17dp start margin after its m=-7); Web applies the same 24-point gap.
717
+ - **Tertiary text gap:** when the first trailing accessory is a tertiary icon,
718
+ the text column ends 12 points before its glyph slot, as `ListItem` lays it
719
+ out. iOS absorbs the button's m=-7 on the text side (it clipped 9 points
720
+ early), Android adds the 12dp end margin the -7 had eaten (text ran into the
721
+ button), and Web already does this through CSS margins.
722
+ - **Leading action geometry:** an identity `leadingAction` reproduces
723
+ `ListItem.IconButton` (medium tertiary: 6-point padding plus a 1-point
724
+ border, m=-7) on all three platforms, so its glyph sits on a 24-point slot at
725
+ the 12-point row padding and the leading visual starts at 48. iOS and Android
726
+ use a 36-point frame with a 6-point inset and 6-point following gap; Web
727
+ applies the tertiary icon frame and reports the inner glyph slot's window
728
+ rect, including any ancestor transform. Web icon buttons use an explicit
729
+ accessibility label where supplied and otherwise retain their fallback
730
+ glyph as a name even when host SVG artwork is present.
731
+
732
+ - **Enclosing pans (iOS):** once a reorder has started, the list disables the
733
+ enabled `UIPanGestureRecognizer`s of its ancestors (for example a sheet's
734
+ dismiss pan or a pager) and restores them when the reorder finishes, is
735
+ cancelled by a structural update, or the list is torn down. Before the long
736
+ press is recognized those pans behave as before, so a quick pull still drags
737
+ the sheet. This applies to both activation modes. The NativeOverlay page
738
+ sheet combines temporary suppression with the current `dismissOnPanDown`
739
+ setting, including prop changes during the drag.
740
+
741
+ Toggling `reorderActivation` or `reorderable` cancels pending and active
742
+ pointer reorder without emitting a reorder event. An accepted full Web
743
+ snapshot supersedes a provisional reorder; accepted row patches retain their
744
+ content even if a gesture is cancelled. Web keyboard sorting remains available
745
+ from the focused row if it has a rendered handle in `handle` mode. The
746
+ capability travels in snapshot JSON; the Nitro ABI is unchanged.
747
+
748
+ Leading visual `borderWidth` supports values in (0, 4]. Development rejects
749
+ out-of-range widths; production discards the invalid width in full snapshots
750
+ and patches so the border uses its existing default of 1. Production also
751
+ discards invalid tracking and digit-spacing overrides so template defaults apply.
752
+
594
753
  ### Android reorder cancellation
595
754
 
596
755
  Status: implemented; three real Android View/callback regressions verified on
@@ -2431,6 +2590,8 @@ acceptance or a performance improvement.
2431
2590
 
2432
2591
  `DataColumn.titleIcon` and `secondaryTitleIcon` reuse `IdentityRow.titleIcon` after the primary column text. They preserve native-asset and receipt-token symbols in the desktop asset column. Web `hoverActionKey` uses the same anchored help action as Identity rows; absent icons leave the existing column layout unchanged.
2433
2592
 
2593
+ `DataColumn.webLeadingBadge?: { text: string; textColor: string; backgroundColor: string }` is an optional Web-only passive label on the primary line, placed before `secondaryLeadingText` and the primary text. The caller supplies the visible text and both colors: `text` is non-blank and within the 4096-character text limit, both colors are required `#RRGGBB` or `#RRGGBBAA` values, and no other key is accepted. The label is a 12/16 regular pill (2 by 6 padding, radius 4) that receives no pointer events and has no action, hover target, tone or style slot. While it is present the primary line spans its column, keeps the column's start, center or end alignment and uses an 8-unit gap in place of `titleBadgeGap`. The label is capped at half of the column width, padding included, and truncates with an ellipsis at that cap; the primary text keeps the remaining width and truncates after it, so neither leaves the column. A label that fits is drawn at its intrinsic width. Row height and measurement do not change. Development validation rejects a malformed badge in a snapshot and in a row patch that replaces `columns`; production drops the badge, strips undeclared keys and keeps the row. iOS and Android ignore the field, so a caller that needs the same signal there uses `titleIcon`. A column without the field renders as before. `validation.test.ts` covers the validation rules and `DataRowWebParity.test.ts` the element order, declared layout styles and row reuse in jsdom, which performs no layout. A scoped Chrome 157 measurement of the compiled renderer with `WEB_LIST_CSS` used four-column table rows 1000, 560 and 420 CSS pixels wide, all three alignments and labels of 10, 15 and 63 characters: the label stayed inside its column at no more than half of its width and the primary value kept a visible width in every case, and a label that fits kept the geometry it had without the cap. This is not app-host runtime acceptance.
2594
+
2434
2595
  `IdentityRow.titleSuffixes?: readonly { text: string; tone: 'secondary' | 'disabled'; maxWidth?: number }[]` supports up to three plain 12/16 labels on the title line. Each suffix truncates independently at its optional maximum width. This preserves Recent recipient EVM, network, and relative-time metadata without using background badges; rows without suffixes keep their present title layout.
2435
2596
 
2436
2597
  ### Web slot-list scroll ownership
@@ -234,7 +234,7 @@ meaning is defined in the [catalog](ROW_TEMPLATES.md).
234
234
 
235
235
  Every text role listed below accepts the same `NativeListTextStyle`:
236
236
  `token`, `fontSize`, `fontWeight`, `color`, `lineHeight`, `lines`, `truncate`,
237
- `alignment`, `verticalAlignment`, `offsetY`.
237
+ `alignment`, `verticalAlignment`, `offsetY`, `letterSpacing`, `tabularNumbers`.
238
238
  Weights are `regular | medium | semibold | bold`; line counts are `1 | 2 | 3`;
239
239
  `start | center | end` alignment follows layout direction on all three
240
240
  platforms (`end` is the left edge in RTL). Colors must be
@@ -363,6 +363,8 @@ style: {
363
363
  | `alignment` | Horizontal `start / center / end` inside the text region, respecting direction |
364
364
  | `verticalAlignment` | `top / center / bottom` for the complete text block inside its allocated text region; no effect without spare height |
365
365
  | `offsetY` | `-8…8` logical units of optical translation; does not change measurement, sibling spacing or hit areas |
366
+ | `letterSpacing` | `-4…10` logical units between glyphs. iOS sets `.kern`, so an explicit `0` also turns off pair kerning, matching React Native `letterSpacing: 0`; Android converts to em of the current text size and adds `'kern' 0`, matching React Native text there too; Web sets CSS `letter-spacing`. Omission keeps each platform's existing tracking |
367
+ | `tabularNumbers` | `true` draws equal-width digits, as the App's `SizableText` does by default: iOS swaps each run to the monospaced-number font feature, Android sets `tnum`, Web sets `font-variant-numeric: tabular-nums`. `false` explicitly selects proportional digits. Omission keeps each template's current digits, including selector defaults |
366
368
 
367
369
  Single-line text does not wrap; explicit CR/LF line breaks become spaces (CRLF is
368
370
  one break). Multi-line text wraps naturally, preserves explicit breaks, and
@@ -570,6 +572,10 @@ model fields, whatever the renderer's internal view names are.
570
572
  | table layout | `$bodyXs` | 11 regular / 14 | sp(11) regular / dp(14) | — |
571
573
  | `value` | `$bodyLg` | 16 / 24 | sp(16) medium / dp(24) | 14px / 20px / 500 **≠** |
572
574
 
575
+ Android history titles keep their default tracking when `style.title` omits
576
+ `letterSpacing`. Web network selector success badges inherit tabular numerals
577
+ from the section, independently of explicit digit styles on the title or value.
578
+
573
579
  ### action
574
580
 
575
581
  | Key | Default | iOS | Android | Web |