@onekeyfe/react-native-native-list 3.0.158 → 3.0.159

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 (199) hide show
  1. package/README.md +21 -5
  2. package/android/build.gradle +7 -0
  3. package/android/src/main/java/com/onekey/nativelist/HybridNativeList.kt +20 -0
  4. package/android/src/main/java/com/onekey/nativelist/NativeListAccessoryStack.kt +711 -0
  5. package/android/src/main/java/com/onekey/nativelist/NativeListActionRenderer.kt +169 -0
  6. package/android/src/main/java/com/onekey/nativelist/NativeListActivityDetailsView.kt +179 -0
  7. package/android/src/main/java/com/onekey/nativelist/NativeListActivityRenderer.kt +264 -0
  8. package/android/src/main/java/com/onekey/nativelist/NativeListAdapter.kt +20 -6
  9. package/android/src/main/java/com/onekey/nativelist/NativeListContainerSlotAdapter.kt +53 -0
  10. package/android/src/main/java/com/onekey/nativelist/NativeListDataRowRenderer.kt +487 -0
  11. package/android/src/main/java/com/onekey/nativelist/NativeListEndAlignment.kt +5 -0
  12. package/android/src/main/java/com/onekey/nativelist/NativeListIdentityRenderer.kt +820 -0
  13. package/android/src/main/java/com/onekey/nativelist/NativeListImageSlot.kt +147 -0
  14. package/android/src/main/java/com/onekey/nativelist/NativeListLeadingVisual.kt +453 -0
  15. package/android/src/main/java/com/onekey/nativelist/NativeListMarketRenderer.kt +997 -0
  16. package/android/src/main/java/com/onekey/nativelist/NativeListMediaPreviewSlot.kt +268 -0
  17. package/android/src/main/java/com/onekey/nativelist/NativeListMediaTileRenderer.kt +243 -0
  18. package/android/src/main/java/com/onekey/nativelist/NativeListMessageRenderer.kt +232 -0
  19. package/android/src/main/java/com/onekey/nativelist/NativeListMetricCardRenderer.kt +551 -0
  20. package/android/src/main/java/com/onekey/nativelist/NativeListModels.kt +27 -1
  21. package/android/src/main/java/com/onekey/nativelist/NativeListPrimitives.kt +475 -0
  22. package/android/src/main/java/com/onekey/nativelist/NativeListRailRenderer.kt +143 -0
  23. package/android/src/main/java/com/onekey/nativelist/NativeListRendererRegistry.kt +42 -0
  24. package/android/src/main/java/com/onekey/nativelist/NativeListRendererRowView.kt +415 -0
  25. package/android/src/main/java/com/onekey/nativelist/NativeListResolvedText.kt +163 -0
  26. package/android/src/main/java/com/onekey/nativelist/NativeListRowHost.kt +70 -0
  27. package/android/src/main/java/com/onekey/nativelist/NativeListScrollPositionTracker.kt +59 -0
  28. package/android/src/main/java/com/onekey/nativelist/NativeListSectionHeaderRenderer.kt +763 -0
  29. package/android/src/main/java/com/onekey/nativelist/NativeListSystemRenderer.kt +464 -0
  30. package/android/src/main/java/com/onekey/nativelist/NativeListTextView.kt +25 -0
  31. package/android/src/main/java/com/onekey/nativelist/NativeListView.kt +432 -124
  32. package/android/src/main/java/com/onekey/nativelist/NativeListWalletGroupRenderer.kt +407 -0
  33. package/android/src/main/res/values/native_scroll_coordinator_ids.xml +5 -0
  34. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListEndAlignmentTest.kt +34 -0
  35. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListScrollPositionTrackerTest.kt +44 -0
  36. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListSelectorBackgroundColorTest.kt +34 -0
  37. package/docs/DESIGN.md +520 -9
  38. package/docs/MIGRATION_BASELINE.md +117 -0
  39. package/docs/ROW_TEMPLATES.md +404 -0
  40. package/docs/SPEC.md +621 -0
  41. package/docs/STYLE_SPEC.md +988 -0
  42. package/docs/images/list-capabilities.svg +39 -0
  43. package/docs/images/row-action.svg +17 -0
  44. package/docs/images/row-activity.svg +24 -0
  45. package/docs/images/row-data.svg +24 -0
  46. package/docs/images/row-identity.svg +25 -0
  47. package/docs/images/row-market.svg +23 -0
  48. package/docs/images/row-media-tile.svg +26 -0
  49. package/docs/images/row-message.svg +20 -0
  50. package/docs/images/row-metric-card.svg +33 -0
  51. package/docs/images/row-rail.svg +18 -0
  52. package/docs/images/row-section-header.svg +19 -0
  53. package/docs/images/row-style-regions.svg +30 -0
  54. package/docs/images/row-system.svg +30 -0
  55. package/docs/images/row-wallet-group.svg +26 -0
  56. package/ios/HybridNativeList.swift +30 -0
  57. package/ios/NativeListAccessoryStack.swift +680 -0
  58. package/ios/NativeListActionRenderer.swift +108 -0
  59. package/ios/NativeListActivityDetailsView.swift +291 -0
  60. package/ios/NativeListActivityRenderer.swift +201 -0
  61. package/ios/NativeListDataRowRenderer.swift +444 -0
  62. package/ios/NativeListIdentityRenderer.swift +685 -0
  63. package/ios/NativeListImageSlot.swift +140 -0
  64. package/ios/NativeListLeadingVisual.swift +372 -0
  65. package/ios/NativeListMarketRenderer.swift +698 -0
  66. package/ios/NativeListMediaPreviewSlot.swift +259 -0
  67. package/ios/NativeListMediaTileRenderer.swift +190 -0
  68. package/ios/NativeListMessageRenderer.swift +168 -0
  69. package/ios/NativeListMetricCardRenderer.swift +420 -0
  70. package/ios/NativeListModels.swift +36 -1
  71. package/ios/NativeListRailRenderer.swift +152 -0
  72. package/ios/NativeListRendererCell.swift +311 -0
  73. package/ios/NativeListRendererRegistry.swift +50 -0
  74. package/ios/NativeListResolvedText.swift +130 -0
  75. package/ios/NativeListRowHost.swift +63 -0
  76. package/ios/NativeListScrollPositionTracker.swift +30 -0
  77. package/ios/NativeListSectionHeaderRenderer.swift +734 -0
  78. package/ios/NativeListSystemRenderer.swift +568 -0
  79. package/ios/NativeListTextLabel.swift +42 -0
  80. package/ios/NativeListTextStyles.swift +236 -0
  81. package/ios/NativeListWalletGroupRenderer.swift +255 -0
  82. package/ios/RNCNativeListView.swift +282 -184
  83. package/ios/tests/NativeListActivityPresentationTests.swift +97 -0
  84. package/ios/tests/NativeListLifecycleTests.swift +241 -0
  85. package/ios/tests/NativeListMediaVisibilityTests.swift +109 -0
  86. package/ios/tests/NativeListScrollPositionTrackerTests.swift +25 -0
  87. package/lib/module/NativeList.js +56 -3
  88. package/lib/module/NativeList.web.js +5 -0
  89. package/lib/module/models.js +54 -0
  90. package/lib/module/validation.js +386 -28
  91. package/lib/module/web/NativeListWebEngine.js +148 -936
  92. package/lib/module/web/templates/ActionRowRenderer.js +97 -0
  93. package/lib/module/web/templates/ActivityRowRenderer.js +95 -0
  94. package/lib/module/web/templates/DataRowRenderer.js +145 -0
  95. package/lib/module/web/templates/IdentityRowRenderer.js +289 -0
  96. package/lib/module/web/templates/MarketRowRenderer.js +310 -0
  97. package/lib/module/web/templates/MediaTileRowRenderer.js +132 -0
  98. package/lib/module/web/templates/MessageRowRenderer.js +165 -0
  99. package/lib/module/web/templates/MetricCardRowRenderer.js +172 -0
  100. package/lib/module/web/templates/RailRowRenderer.js +98 -0
  101. package/lib/module/web/templates/RowContainerStyle.js +100 -0
  102. package/lib/module/web/templates/RowElements.js +93 -0
  103. package/lib/module/web/templates/RowRendererRegistry.js +70 -0
  104. package/lib/module/web/templates/RowText.js +121 -0
  105. package/lib/module/web/templates/RowVisual.js +43 -0
  106. package/lib/module/web/templates/SectionHeaderRowRenderer.js +146 -0
  107. package/lib/module/web/templates/SystemRowRenderer.js +161 -0
  108. package/lib/module/web/templates/WalletGroupRowRenderer.js +96 -0
  109. package/lib/nitrogen/generated/android/c++/JFunc_void_bool.hpp +75 -0
  110. package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +39 -3
  111. package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +6 -0
  112. package/lib/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +15 -0
  113. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/Func_void_bool.kt +78 -0
  114. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +26 -0
  115. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/views/HybridNativeListManager.kt +24 -9
  116. package/lib/nitrogen/generated/android/nativelistOnLoad.cpp +2 -0
  117. package/lib/nitrogen/generated/ios/NativeListModule-Swift-Cxx-Bridge.cpp +8 -0
  118. package/lib/nitrogen/generated/ios/NativeListModule-Swift-Cxx-Bridge.hpp +37 -0
  119. package/lib/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +23 -2
  120. package/lib/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +32 -0
  121. package/lib/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
  122. package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +3 -0
  123. package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +54 -0
  124. package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +6 -0
  125. package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +8 -2
  126. package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +6 -0
  127. package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +11 -2
  128. package/lib/nitrogen/generated/shared/json/NativeListConfig.json +3 -0
  129. package/lib/typescript/src/NativeList.nitro.d.ts +3 -0
  130. package/lib/typescript/src/NativeList.types.d.ts +14 -1
  131. package/lib/typescript/src/models.d.ts +199 -18
  132. package/lib/typescript/src/web/NativeListWebEngine.d.ts +18 -16
  133. package/lib/typescript/src/web/templates/ActionRowRenderer.d.ts +15 -0
  134. package/lib/typescript/src/web/templates/ActivityRowRenderer.d.ts +15 -0
  135. package/lib/typescript/src/web/templates/DataRowRenderer.d.ts +15 -0
  136. package/lib/typescript/src/web/templates/IdentityRowRenderer.d.ts +16 -0
  137. package/lib/typescript/src/web/templates/MarketRowRenderer.d.ts +30 -0
  138. package/lib/typescript/src/web/templates/MediaTileRowRenderer.d.ts +15 -0
  139. package/lib/typescript/src/web/templates/MessageRowRenderer.d.ts +44 -0
  140. package/lib/typescript/src/web/templates/MetricCardRowRenderer.d.ts +15 -0
  141. package/lib/typescript/src/web/templates/RailRowRenderer.d.ts +28 -0
  142. package/lib/typescript/src/web/templates/RowContainerStyle.d.ts +9 -0
  143. package/lib/typescript/src/web/templates/RowElements.d.ts +38 -0
  144. package/lib/typescript/src/web/templates/RowRendererRegistry.d.ts +83 -0
  145. package/lib/typescript/src/web/templates/RowText.d.ts +9 -0
  146. package/lib/typescript/src/web/templates/RowVisual.d.ts +20 -0
  147. package/lib/typescript/src/web/templates/SectionHeaderRowRenderer.d.ts +15 -0
  148. package/lib/typescript/src/web/templates/SystemRowRenderer.d.ts +16 -0
  149. package/lib/typescript/src/web/templates/WalletGroupRowRenderer.d.ts +20 -0
  150. package/nitrogen/generated/android/c++/JFunc_void_bool.hpp +75 -0
  151. package/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +39 -3
  152. package/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +6 -0
  153. package/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +15 -0
  154. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/Func_void_bool.kt +78 -0
  155. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +26 -0
  156. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/views/HybridNativeListManager.kt +24 -9
  157. package/nitrogen/generated/android/nativelistOnLoad.cpp +2 -0
  158. package/nitrogen/generated/ios/NativeListModule-Swift-Cxx-Bridge.cpp +8 -0
  159. package/nitrogen/generated/ios/NativeListModule-Swift-Cxx-Bridge.hpp +37 -0
  160. package/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +23 -2
  161. package/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +32 -0
  162. package/nitrogen/generated/ios/swift/Func_void_bool.swift +46 -0
  163. package/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +3 -0
  164. package/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +54 -0
  165. package/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +6 -0
  166. package/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +8 -2
  167. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +6 -0
  168. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +11 -2
  169. package/nitrogen/generated/shared/json/NativeListConfig.json +3 -0
  170. package/package.json +7 -6
  171. package/react-native-native-list.podspec +6 -0
  172. package/scripts/enable-container-slots.mjs +58 -0
  173. package/scripts/enable-container-slots.test.mjs +58 -0
  174. package/src/NativeList.nitro.ts +3 -0
  175. package/src/NativeList.tsx +84 -2
  176. package/src/NativeList.types.ts +14 -1
  177. package/src/NativeList.web.tsx +5 -0
  178. package/src/models.ts +320 -20
  179. package/src/validation.ts +641 -49
  180. package/src/web/NativeListWebEngine.ts +361 -1932
  181. package/src/web/templates/ActionRowRenderer.ts +123 -0
  182. package/src/web/templates/ActivityRowRenderer.ts +159 -0
  183. package/src/web/templates/DataRowRenderer.ts +212 -0
  184. package/src/web/templates/IdentityRowRenderer.ts +527 -0
  185. package/src/web/templates/MarketRowRenderer.ts +467 -0
  186. package/src/web/templates/MediaTileRowRenderer.ts +182 -0
  187. package/src/web/templates/MessageRowRenderer.ts +306 -0
  188. package/src/web/templates/MetricCardRowRenderer.ts +337 -0
  189. package/src/web/templates/RailRowRenderer.ts +136 -0
  190. package/src/web/templates/RowContainerStyle.ts +131 -0
  191. package/src/web/templates/RowElements.ts +160 -0
  192. package/src/web/templates/RowRendererRegistry.ts +111 -0
  193. package/src/web/templates/RowText.ts +181 -0
  194. package/src/web/templates/RowVisual.ts +115 -0
  195. package/src/web/templates/SectionHeaderRowRenderer.ts +243 -0
  196. package/src/web/templates/SystemRowRenderer.ts +282 -0
  197. package/src/web/templates/WalletGroupRowRenderer.ts +131 -0
  198. package/android/src/main/java/com/onekey/nativelist/NativeListRowView.kt +0 -4538
  199. package/ios/NativeListCell.swift +0 -4300
package/docs/SPEC.md ADDED
@@ -0,0 +1,621 @@
1
+ # NativeList contract
2
+
3
+ This is the entry point for the package's behavioral contract. The linked
4
+ documents are part of this spec; implementation status is separate from target
5
+ architecture and runtime evidence.
6
+
7
+ ## Purpose and non-goals
8
+
9
+ NativeList renders bounded data with fixed row templates on iOS, Android and
10
+ Web. Data rows do not render arbitrary React children. Native-only named container slots
11
+ may render React chrome outside the data-row stream. Integrators own overflow
12
+ prevention; there is no automatic fitting or shrinking pass.
13
+
14
+ ## Definitions and ownership
15
+
16
+ - `rowTemplate` defines structure, semantic fields and supported variants.
17
+ [ROW_TEMPLATES.md](ROW_TEMPLATES.md) defines and illustrates every template.
18
+ - `rowStyle` adjusts the template's named text, image, spacing and container
19
+ properties. It can set row height but cannot replace the template structure.
20
+ [STYLE_SPEC.md](STYLE_SPEC.md) defines the common property vocabulary.
21
+ - The list owns placement, sections, scrolling, indexed bar, selection and
22
+ reorder. These capabilities do not belong to individual row templates.
23
+ - The renderer owns template views, defaults, binding and measurement. A shared
24
+ host owns row appearance, events and binding invalidation. This ownership is a
25
+ migration target, not a claim that the current native hosts are already split.
26
+
27
+ ## Public API and defaults
28
+
29
+ [README.md](../README.md) documents the snapshot, patch, selection, events and
30
+ imperative API; [STYLE_SPEC.md](STYLE_SPEC.md) defines normalization, omitted
31
+ style defaults and platform differences. Height precedence is
32
+ `style.container.height` → `row.height` → template measurement/default.
33
+ Removing a style restores the current template's defaults, not the previous
34
+ row's appearance. Selector presentations (`accountSelector`, `networkSelector`,
35
+ `walletSidebar`) use their explicit-height geometry whenever either
36
+ `style.container.height` or `row.height` is set.
37
+
38
+ The row style surface (`row.style`, including `style.container`) and
39
+ `snapshot.listStyle` are **new public TypeScript/JSON protocol in this change**;
40
+ they travel inside the existing `snapshotJson` string, so the Nitro schema is
41
+ unchanged. Validation of that surface is strict: undeclared or unknown nested
42
+ keys are rejected (see Failures below and STYLE_SPEC.md §2). The renderer
43
+ migration itself does not change any other protocol field.
44
+
45
+ ## Lifecycle and concurrency
46
+
47
+ Full binding must work without a preceding recycle callback, including
48
+ style set/change/clear and content A → B. A binding epoch invalidates stale
49
+ image callbacks and action anchors. Recycling/disposal releases pending work
50
+ through the existing image/host lifecycle. Image loading visibility belongs to
51
+ the image lifecycle: restoring template defaults on rebind must never hide an
52
+ image that already loaded. Common container styling clears what it wrote on the
53
+ next bind, including properties it set on template children. UI mutation remains on the platform
54
+ UI thread; [DESIGN.md](DESIGN.md) describes update and event ownership.
55
+
56
+ ### Native section title loading indicator
57
+
58
+ Status: implemented source; simulator rendering acceptance pending.
59
+ On iOS and Android, `sectionHeader.titleLoading` defaults to `false`. When
60
+ `true`, a 20-point native indeterminate indicator precedes the section heading
61
+ with an 8-point gap and inherits the resolved title color. It emits no action
62
+ and does not create a separate accessibility target. Clearing the field, full
63
+ rebind, recycling and disposal stop and hide the indicator; detached native views do
64
+ not keep a visible animation. The History template's minimum content height
65
+ increases from 16 to 20 points while loading. Explicit caller row/container
66
+ heights still take precedence and must fit their padding. Web does not render
67
+ this new native-only indicator; its existing section presentation is unchanged.
68
+
69
+ Acceptance requires loading → idle → loading reuse, title color updates and
70
+ detachment on each native platform. A title's localized confirming text remains
71
+ caller-owned; the renderer does not infer transaction status.
72
+
73
+ ## Data, cache and identity
74
+
75
+ `row.key` identifies data; renderer reuse identity describes compatible view
76
+ structure. Content, styles, height and placement must not enter reuse identity.
77
+ All twelve templates have their own renderer family: Message, Rail, MediaTile,
78
+ Action, System, Activity, DataRow, MetricCard, Market, Identity, SectionHeader and
79
+ WalletGroup. Same-key family changes must replace the incompatible host. OneKeyImage owns image caches; NativeList owns row/slot binding identity.
80
+
81
+ ## Platform contract
82
+
83
+ All platforms expose the same bounded style properties and public semantics.
84
+ Existing geometry/typography differences are recorded in
85
+ [STYLE_SPEC.md](STYLE_SPEC.md); structural extraction must not silently change
86
+ them. iOS uses UICollectionView, Android RecyclerView, and Web a windowed DOM
87
+ engine. See [DESIGN.md](DESIGN.md) for their current ownership boundaries.
88
+
89
+ ## Failures, fallback and limits
90
+
91
+ Snapshot validation rejects malformed/duplicate-key input without partial
92
+ application. Template field/array bounds and image fallback behavior are defined
93
+ in [ROW_TEMPLATES.md](ROW_TEMPLATES.md), [README.md](../README.md) and
94
+ [DESIGN.md](DESIGN.md). This change adds the style surface's limits, defined in
95
+ [STYLE_SPEC.md](STYLE_SPEC.md) §3.3/§4/§5: numeric bounds, `#RRGGBB`/`#RRGGBBAA`
96
+ colors (including `listStyle.separator.color`), `groupCornerRadius` `0…40`, and
97
+ rejection of any undeclared or unknown nested style key by `validateSnapshot`
98
+ and `validatePatches`, where extra keys used to be ignored. It adds no retry
99
+ policy or automatic layout correction.
100
+
101
+ ## Performance and resources
102
+
103
+ Snapshots and patches cross the bridge in batches. Visible rows use platform
104
+ recycling/windowing; shared primitives own image cancellation. All twelve templates use dedicated lightweight native hosts and persistent Web
105
+ bodies. WalletGroup composes the migrated Identity member hosts.
106
+ None allocates the legacy native tree. This structural change is
107
+ not a measured scrolling-performance result; performance claims still need a
108
+ separate workload and measurements.
109
+
110
+ ## Conformance and six-stage migration
111
+
112
+ | Stage | Current status | Exit condition |
113
+ | --- | --- | --- |
114
+ | 1. Baseline | Complete: [implicit keys, defaults, special updates and acceptance baseline](MIGRATION_BASELINE.md) inventoried | Preserve each existing rule or explicitly migrate its caller |
115
+ | 2. Message pilot | Complete: registered lightweight native hosts, persistent Web body, resolved styling/measurement and lifecycle acceptance | Lightweight native hosts, resolved styling/measurement, update classification and lifecycle acceptance |
116
+ | 3. Simple templates | Complete (7/7): Rail, MediaTile, Action, System, Activity, DataRow and MetricCard migrated on all three platforms | Migrate mediaTile, rail, action, system, activity, dataRow and metricCard; remove each old dispatch/reset path |
117
+ | 4. Complex templates | Complete (3/3): Market, Identity and SectionHeader migrated on all three platforms | Migrate Market, Identity and SectionHeader while preserving quote, selection and header behavior |
118
+ | 5. WalletGroup | Complete: registered composites and independent keyed Identity members on all three platforms | Independent member renderers; verify member events/styles, compact dragging and height restoration |
119
+ | 6. Cleanup | Complete: obsolete hosts/maps/fallback pools and audited key styling removed | Remove migrated key inference and global style maps; container no longer manipulates template internals |
120
+
121
+ The closed internal registry selects all twelve renderers by template type.
122
+ No supported template dispatches to the legacy native tree. WalletGroup owns
123
+ composition and compact appearance; its members use independent Identity
124
+ renderers. Legacy native classes, global style maps and fallback registry entries
125
+ are removed, including footer initialization. Web preserves compatible bodies and
126
+ unchanged member image elements across rebinding.
127
+
128
+ Message resolves text/spacing/image inputs from data/theme/styles, classifies
129
+ updates as unchanged, content/style, assets or replacement, and binds/measures
130
+ using those resolved values. Image slots retain an unchanged effective request;
131
+ source/row/slot or image-request-option changes invalidate old callbacks and
132
+ retries. Image request epochs are independent of row action-anchor epochs, so
133
+ text-only updates preserve in-flight images. Legacy Message binding, slot-map
134
+ and measurement branches have been removed. Stage 6 also removes the audited Android separator-key
135
+ compatibility policy; the explicit separator field controls visibility.
136
+
137
+ Message intrinsic measurement now uses its actual resolved view metrics rather
138
+ than the historical estimator-only defaults listed in MIGRATION_BASELINE.md.
139
+ This can change **automatic** Message heights; explicit row/container heights
140
+ and unstyled drawing defaults remain unchanged. Native measurement accounts
141
+ for the allocated column width, line limits, gaps and optional images. Web uses
142
+ the same resolved geometry with a conservative text estimate, then corrects the
143
+ visible intrinsic height from its rendered DOM; it does not auto-fit content.
144
+
145
+ Source boundaries and dated runtime evidence are in the incremental migration
146
+ section of [DESIGN.md](DESIGN.md). Acceptance covers style set/change/clear,
147
+ binding without recycle, same-key template changes, image add/remove, scrolling
148
+ away/back, explicit height restoration and fixed-footer placement. Unit/type
149
+ checks are not native runtime verification, and Message acceptance does not
150
+ complete the remaining stages.
151
+
152
+ Stage 3 extends the closed registry one template at a time. Migrated templates
153
+ own their view trees and semantic styles; native templates share the Message
154
+ host's appearance/event lifecycle and bounded image primitives, not a legacy
155
+ view tree. Preserve existing default geometry, variant behavior, actions,
156
+ selection echo and platform differences. Horizontal sizing belongs to each
157
+ renderer and must use its resolved text/image/spacing inputs. A style change
158
+ must invalidate horizontal placement when its measured width changes. Fixed
159
+ template height defaults remain defaults, not automatic content fitting.
160
+ DataRow keeps the inventoried `asset`-column Web badge behavior until a separate
161
+ caller migration; this extraction does not change which column owns badges.
162
+
163
+ Rail owns its title/badge/status views and leading visual. Shared native hosts
164
+ own appearance, action-anchor epochs, selection routing and reuse invalidation;
165
+ Web uses the same primitive interface for Message and Rail. Legacy Rail bind,
166
+ style-slot, reset and width branches have been removed. Horizontal measurement
167
+ now responds to explicit fonts, image dimensions, padding and gaps while
168
+ retaining the existing default width allowances and platform limits. Text-only
169
+ rebinding preserves unchanged image requests; clearing styles restores defaults.
170
+ All seven stage 3 templates are now migrated; dated acceptance for each is recorded in DESIGN.md.
171
+
172
+ MediaTile owns its picture, network indicator, title/subtitle, badge and close
173
+ control. Its legacy bind/style/reset allocation paths are removed. Images retain
174
+ unchanged requests across content/style updates; close events use the shared
175
+ host epoch with `mediaClose` source. Grid and horizontal allocation remain
176
+ container-owned. Default iOS grid height stays width + 48, including existing
177
+ compression when a close control is present; explicit container heights let the
178
+ caller allocate more room. No overflow fitting is added.
179
+
180
+ Action owns its title, optional icon and bounded accessory controls. Native
181
+ checkbox presentation can update without rebinding the title/icon; all actions
182
+ carry the shared host epoch and preserve the original account-control anchor
183
+ inset. Fixed footers now also resolve their host through the closed registry
184
+ and replace it when their renderer family changes. Placement and gesture
185
+ routing remain list-owned.
186
+
187
+ MetricCard owns standard, activity and performance variants. Its existing
188
+ per-platform measurement, badge colors, composite spacing and progress layout
189
+ remain template defaults. Standard-card styles address title/value/subtitle/trend;
190
+ composite cards expose the heading slot and keep metric internals fixed as
191
+ defined in STYLE_SPEC.md. Image slots retain unchanged requests across rebinding
192
+ and reset when a source disappears or its slot identity changes.
193
+
194
+ All six stages are complete. Stages 4–6 and their acceptance scopes are recorded
195
+ below; the baseline inventory explicitly identifies two retained compatibility
196
+ policies outside renderer selection/style mapping.
197
+ No migrated simple template dispatches through a legacy binder.
198
+
199
+ ### Stage 4 acceptance scope
200
+
201
+ Market, Identity and SectionHeader move to dedicated registered renderers on all
202
+ three platforms. This stage preserves existing defaults and implicit-key
203
+ compatibility recorded in MIGRATION_BASELINE.md. It adds no style fields beyond
204
+ the style surface this change introduces.
205
+ Market owns quote-only binding and its platform row interactions; Identity owns
206
+ selection presentation; SectionHeader owns stable summary updates and measurement.
207
+ Sticky placement and header/footer routing stay in the list container.
208
+ Acceptance includes variant changes on the same key, styled → unstyled rebinding,
209
+ unchanged image requests, partial updates with current action context, selection,
210
+ scroll/recycle, and shared footer/sticky-header behavior.
211
+
212
+ Each complex renderer now owns its view tree, defaults, semantic style slots and
213
+ measurement. Native hosts share bounded leading/image/accessory primitives. Web
214
+ retains the compatible body and unchanged image elements; loaded image state is
215
+ not reset when geometry is restored. Quote and summary updates keep the latest
216
+ row model for subsequent action/selection dispatch. Stage 4 introduces no public
217
+ API or Nitro schema beyond the style surface described above. Stage 5 below also replaces the native WalletGroup composite tree. Stage 6 below removes the
218
+ obsolete native classes and maps.
219
+
220
+ Stage 4 validation: package typecheck and all 161 tests in five suites pass;
221
+ focused lint has zero errors and two existing shadowing warnings. iOS Debug
222
+ build/link and Android Debug APK plus seven unit tests pass. Both dedicated
223
+ native simulators and headed Chrome exercised the acceptance cases above.
224
+ The section fixture additionally verified imperative scroll pinning and active
225
+ index updates after the container fixes. Stages 5 and 6 acceptance follow below. This is not a performance signoff.
226
+
227
+ ### Stage 5 ownership and acceptance
228
+
229
+ WalletGroup owns only member composition, measurement and compact presentation.
230
+ Each member uses the registered Identity renderer and retains its own key, style,
231
+ selection, action origin and binding lifetime. Group styles never cascade into
232
+ members. Rebinding reconciles by member key; removed members are recycled
233
+ immediately, so retention is bounded by the current member count (plus one
234
+ compact parent on native). Recycling releases every member and compact parent.
235
+
236
+ Acceptance covers member press/accessory routing, disabled and pressDisabled
237
+ members, selection-only changes, style set/change/clear, member reorder/removal,
238
+ family replacement and reuse. The compact drag allocation is 68 on iOS and Web;
239
+ Android keeps its legacy `max(68, parent member height + 2 × group vertical
240
+ inset)` (for example 94 for a badged parent with an explicit height).
241
+ `+N` counts children whose draggable is not false. Only `draggable: false`
242
+ prevents a member from initiating group drag; a disabled member can still start
243
+ it (legacy behavior on all three platforms). Drop/cancel restore the
244
+ resolved group height and all configured member/container styles. Reorder
245
+ orchestration stays in the list container. Existing platform defaults stay
246
+ unchanged. Verify on the dedicated external-drive simulators and headed Web.
247
+
248
+ Stage 5 runtime verification: iOS and Android member press/menu actions carry
249
+ the member key and current action origin, including after content updates.
250
+ Both platforms verified selected/disabled members, style set/clear, member
251
+ removal/reordering, same-key family replacement, empty/repopulation, scrolling
252
+ and the shared fixed footer. Real member/parent drags move the group atomically;
253
+ excluded members do not start dragging. Default 274-point and styled 340-point
254
+ fixture heights restore after drop. iOS also verified a no-op long press;
255
+ Android verified touch cancellation; Web verified Escape cancellation.
256
+
257
+ All 163 package tests and typecheck pass; focused lint has zero errors (two
258
+ existing warnings). iOS Debug build/link, Android Debug APK and seven Android
259
+ unit tests pass. Headed Chrome includes a 390px viewport and in-drag captures.
260
+ Native simulator captures, action payloads and iOS recordings are stored with
261
+ the stage 5 harness in the external validation runtime. These are standalone
262
+ NativeList checks, not a consumer-app release or scrolling-performance signoff.
263
+
264
+ ### Stage 6 cleanup and acceptance
265
+
266
+ The native monoliths and global style-slot maps are deleted. Their still-used
267
+ fonts, icons, layout helpers, action origins and controls remain shared primitives.
268
+ All twelve registry families are explicit. JavaScript validation rejects an
269
+ unknown row type before serialization. If one still reaches native code, iOS
270
+ keeps its legacy behavior: an empty 56-point placeholder row with shared chrome
271
+ and a single log message. Android rejects the snapshot while parsing it. Footer initialization uses a registered Action host.
272
+ Web has no legacy pool or warning-specific container measurement path; template
273
+ renderers own selector typography, System warning DOM measurement and
274
+ WalletGroup compact-preview lookup.
275
+
276
+ The consumer audit in MIGRATION_BASELINE.md allows removal of history-key header
277
+ inference, Android token-section typography inference, and separator-key exceptions.
278
+ Callers choose `variant`, `style` and `separator` explicitly. Market pagination-tail
279
+ recognition and the existing Web DataRow `asset` badge column are deliberately
280
+ retained under the separately documented migration boundaries.
281
+
282
+ Validation covers same-key cycling through twelve templates, style set/clear,
283
+ ordinary/history-named/explicit-history headers, explicit 30-unit token headers,
284
+ Action/System footer replacement and callbacks, scrolling/reuse and WalletGroup
285
+ member actions and compact dragging. Source/type checks and runtime evidence
286
+ are recorded separately in DESIGN.md. This completes the architecture migration;
287
+ it does not add automatic overflow fitting or claim a performance benchmark.
288
+
289
+ ### Web legacy-default audit (2026-09-24)
290
+
291
+ The renderer structure is retained; these legacy Web defaults are restored
292
+ inside it. MetricCard/System default restoration keeps image loading visibility
293
+ (a loaded image stays visible after content or style rebinding). WalletGroup
294
+ measurement keeps the legacy member sum, 12-unit gaps and the 1px border pair
295
+ (budgeted only when the parent member carries `height`, like native's 1-unit
296
+ inset); `style.verticalPadding` replaces that inset instead of adding to it, and
297
+ the rendered padding matches the measurement (the border supplies the first
298
+ unit). walletSidebar members keep their legacy 68/92 presets, which never
299
+ applied the `size` adjustment. The shared container pass records its own inline
300
+ writes and the engine (and WalletGroup, per member) undoes them before the
301
+ renderer rebinds, so alignment set on template children does not leak into a
302
+ reused, unstyled row and a renderer value equal to the previous container value
303
+ is never reverted. DataRow measurement is layout-aware again (table rows
304
+ without secondary text are 48) and linear columns keep the legacy structure:
305
+ secondary leading text inline before the primary text, secondary text directly
306
+ below. Selector geometry follows either explicit height field. A disabled
307
+ WalletGroup member can start the group drag and emit its own actions again
308
+ while its member press stays blocked; title-help hover checks only the resolved
309
+ member. Every System retry (Market or not) is message-only with a row-press
310
+ action, as in the legacy engine. Text styling no longer reads computed style, so
311
+ attached and detached rows style identically.
312
+
313
+ Review round 3 (2026-09-24). Web: a Market subscript run keeps the legacy
314
+ `ceil(0.6 × fontSize)` size on a `fontSize` line box when the field has an
315
+ explicit `fontSize`, and iOS/Android again draw it at `ceil(0.6 × fontSize)` on the
316
+ field's own line height (legacy on each platform);
317
+ an automatic-height System warning is laid out at its rendered border-box
318
+ height again; System and MetricCard rebuild their text when a text style
319
+ changes, so clearing `lines`/`offsetY` restores the original text and removes
320
+ the layout wrapper; a reused visual restores `margin-bottom`, so a cleared
321
+ walletSidebar `leadingGap` leaves no residue. iOS and Android gate every
322
+ selector explicit-height geometry on `style.container.height ?? row.height`
323
+ (Android's list-wide source scale stays keyed on `row.height` only); Android
324
+ rebinds the fixed footer on a `listStyle`-only snapshot.
325
+ Validation: package typecheck and 180 tests pass (jsdom/unit level); this is
326
+ not new rendered browser or native device evidence.
327
+
328
+ ### Platform interaction and appearance differences (legacy, retained)
329
+
330
+ These are pre-existing platform behaviors recorded after the 2026-09-24 native
331
+ audit; they are not new in this change.
332
+
333
+ - **Disabled rows and actions.** iOS blocks every action on a disabled row
334
+ (cell interaction off plus an action-emission guard). Android blocks text
335
+ accessories (radio, switch, `⋮` menu), checkboxes, Activity footer buttons and
336
+ System Retry, but still emits trailing/leading icon actions, Market badges,
337
+ media close, title help and WalletGroup member actions; a disabled group does
338
+ not block its members' actions on Android. Web (legacy) blocks row press and
339
+ click actions on a disabled row or disabled WalletGroup. A disabled member
340
+ inside an enabled group still emits its own actions, but its member press is
341
+ blocked.
342
+ - **Web hover actions.** Web only: a title marked `titleActionOnHover` or an icon
343
+ accessory with `hoverActionKey` emits that action with an anchor on
344
+ `pointerover` (not on moves inside the element) and invalidates the anchor
345
+ with reason `pointerLeave` on `pointerout`. The check is the resolved source's
346
+ `disabled` only: a WalletGroup member's own flag, never the group's, so a
347
+ member of a disabled group still emits its hover action (legacy). Native has
348
+ no hover; the same keys fire on tap.
349
+ - **System retry.** Android and iOS show a literal "Retry" button on non-Market
350
+ retry rows and read `actionText` only for the Market retry. Web keeps its
351
+ legacy rendering for every presentation: a retry row shows only its message
352
+ and the row press (click, Enter or Space) emits `actionKey` with a `row`
353
+ anchor; no retry button is drawn. `actionText` and `style.actionText` are
354
+ accepted by validation and have no Web target (native only).
355
+ - **Pressed corners.** Native pressed feedback ignores `groupPosition` and uses
356
+ 12 on all corners; templates with their own resting radius keep it (Rail 8,
357
+ MediaTile 16). iOS walletSidebar identity rows use 20; Android has no
358
+ wallet-sidebar exception (12). Web changes only the pressed background and
359
+ keeps the resting (group or template) radius.
360
+ - **WalletGroup row appearance.** The group's row-level `backgroundColor` is
361
+ ignored on iOS and Android (legacy), in both the resting and the
362
+ `backgroundFullWidth` fill: the group fill is
363
+ `style.container.backgroundColor` or the theme `subduedBackground`. Web
364
+ (legacy) applies it inline over the group fill. Use
365
+ `style.container.backgroundColor` for a cross-platform group fill.
366
+ - **WalletGroup height.** iOS and Android (legacy) ignore the group's
367
+ `row.height`: `style.container.height` wins, otherwise the height comes from
368
+ the members. Web (legacy) honors `row.height` for a WalletGroup like any other
369
+ row.
370
+ - **Text direction.** `start`/`end` text alignment follows the layout direction
371
+ on all platforms. On iOS a runtime layout-direction change re-resolves it:
372
+ visible rows and the fixed footer rebind immediately, offscreen rows on reuse.
373
+ - **Separator inset.** Identity rows default to a 60-unit inset and other
374
+ templates to 12 on native; Web defaults to 0 (STYLE_SPEC §6.2).
375
+ - **DataRow linear layout.** See ROW_TEMPLATES.md: native unstyled linear rows
376
+ keep the legacy single-label column.
377
+
378
+ ## Native scroll-position thresholds and tablet grids
379
+
380
+ Status: Source implemented; native runtime acceptance pending. These additions are native
381
+ only. Existing Web rendering and caller behavior are unchanged.
382
+
383
+ - `scrollPositionThresholds?: { start: number; end: number; enabled?: boolean }`
384
+ observes the list's logical distance from its content start, in logical pixels.
385
+ `start` and `end` must be finite, nonnegative, and `start < end`. Omitted or
386
+ `enabled: false` disables observation.
387
+ - `onScrollPositionThresholdChange({ isBeyondThreshold })` reports initial state
388
+ after enabling/configuration changes, then only hysteresis transitions: enter
389
+ when distance >= end, leave when distance <= start. No per-frame JS events.
390
+ Replacing the JS callback takes effect on the next event; disabling emits no event.
391
+ Configuration updates reset hysteresis before recomputing current position.
392
+ - iOS uses contentOffset + contentInset, excluding overscroll below zero. Android
393
+ accumulates consumed child scroll distance and, after every layout pass or
394
+ zero-delta scroll, re-derives it from the measured extents above the first laid-out
395
+ item (see Android ancestor scroll distance). Parent-pager header contributions are
396
+ tracked separately.
397
+ - `layout.gridColumns` accepts integers 2 through 7 on native. Native parsers
398
+ clamp malformed external JSON to 1 through 7 as before; public JS validation
399
+ rejects invalid requested counts. Grid geometry remains container-owned.
400
+
401
+ Required acceptance: disabled/enable lifecycle, both equality boundaries,
402
+ oscillation inside the band, programmatic scroll, page/identity replacement,
403
+ refresh and header insets, grid 6/7 layout/rotation, and no stale callbacks after
404
+ disposal. Unit checks prove transition semantics, not rendered behavior.
405
+
406
+ ## Native media preview probing
407
+
408
+ Status: Source implemented; native runtime acceptance pending. `mediaTile.media`
409
+ is an opt-in native-only preview descriptor: `{ source: ImageSource, probeOrder:
410
+ ('image' | 'video')[] }`. The order contains one or two distinct candidates.
411
+ The caller supplies the order; the renderer never guesses asset semantics.
412
+ When provided, media takes precedence over `image`, unless `imageState` is
413
+ explicitly empty/error. Web keeps its existing `image` behavior; native callers
414
+ that also target Web must supply that existing image independently.
415
+
416
+ Image uses the shared OneKeyImage lifecycle. Video uses a paused, muted AVPlayer
417
+ on iOS and Media3 ExoPlayer on Android, preserving the native Video source
418
+ families including streaming media instead of approximating them with a frame
419
+ extractor. Video defaults to contain; an explicit image fit may select cover.
420
+ There are no controls or video touch targets; the row owns press interaction.
421
+ Android preserves a black letterbox and iOS a transparent one, matching the
422
+ existing native Video views. No code calls play or requests audio focus.
423
+
424
+ A failed candidate advances once; exhaustion displays the existing error
425
+ placeholder. New source/row identity resets probing; binding, candidate and
426
+ player generations reject stale callbacks, including A→B→A. Text-only updates
427
+ preserve the current request. On Android, terminal image/player completion is
428
+ posted to the next UI queue turn before advancing probes or notifying the row;
429
+ it MUST NOT clear or rebind a Glide request inside its terminal listener.
430
+ Posted work rechecks binding/candidate generations, and player callbacks also
431
+ recheck the player generation. Recycling removes queued completion work before
432
+ releasing resources. This repairs the image-to-video fallback crash without
433
+ changing probe order or the terminal result contract; native runtime regression
434
+ acceptance is still required. A tile owns at most one native player. On iOS,
435
+ eligibility requires intersection with the window and every clipping/scroll
436
+ ancestor viewport; native scroll, bounds, layer transform/position and visibility
437
+ observations release retained offscreen pager pages. A player lives only until
438
+ its first rendered frame is copied (Android TextureView bitmap, iOS
439
+ AVPlayerItemVideoOutput pixel buffer); the tile then shows that still frame with the
440
+ same fit and letterbox and releases the player and its viewport observers. If no frame
441
+ can be copied after a few frames, the paused player stays attached. Detach,
442
+ background, invisibility and recycle release a player still awaiting its first frame;
443
+ reattachment rebuilds its retained source while remaining paused. The still frame is
444
+ kept across detach and same-identity rebinding and dropped on recycle or identity
445
+ change. Android observes native global scroll/layout and
446
+ pre-draw geometry (including property animations), checking ancestor alpha and
447
+ getGlobalVisibleRect before allocating a player. These observers do not schedule
448
+ frames or emit JavaScript events.
449
+ Live player count is bounded by intersecting native video tiles that have not yet
450
+ captured a frame, including partially visible tiles; there is no numeric cap that
451
+ blanks visible iPad cells. Per-draw (Android) and ancestor-layer KVO (iOS) viewport
452
+ observation exists only while a tile awaits its first frame. iOS requests
453
+ one second of forward buffer; AVFoundation treats this as an advisory preference,
454
+ not a hard byte limit. Android uses a 250–1000 ms forward buffer, zero back buffer
455
+ and a 2 MiB target allocator; Media3 may exceed a target by allocation granularity.
456
+ These are per-player buffer targets, not hard total-process memory limits.
457
+ Platform decoder/surface overhead is additional. No
458
+ process-wide player cache or NativeList media disk cache is introduced. Source headers are never
459
+ logged. Android uses Media3 1.4.1 (matching native Video's default), including
460
+ HLS/DASH, UI and OkHttp data source; the existing root media3Version override is
461
+ honored. Cookie handling uses the React Native cookie store without replacing
462
+ the global HTTP client's cookie jar.
463
+
464
+ Required runtime cases: image→video, video→image, exhaustion, file/HTTP/HLS,
465
+ non-square fit, silent paused initial frame, same-source text update, quick
466
+ A→B→A reuse, detach/background and return, row tap, grid resize, and absence of
467
+ leaked audio/player resources. Static API checks do not prove these cases.
468
+
469
+ ## Native container slots (source implementation, runtime verification pending)
470
+
471
+ `listHeader`, `listEmpty` and `listFooter` accept React nodes on iOS and Android
472
+ vertical lists only. They are optional and default to absent. They are common
473
+ container capabilities, not row templates, and MUST NOT be used for per-item
474
+ rendering. Horizontal orientation with any supplied slot is rejected. Web ignores
475
+ these new native-only props; existing Web lists and callers retain their behavior.
476
+
477
+ The order is header, data rows (or empty slot when there are no data rows), footer.
478
+ On iOS, after the laid-out vertical content shrinks, an offset beyond the new
479
+ bottom is corrected to the current adjusted-inset-aware maximum. In-range offsets
480
+ and negative pull overscroll remain unchanged. Correction waits until active
481
+ dragging, deceleration and refresh finish; it is not an unconditional layout or
482
+ snapshot reset to the top. The native content-offset change remains observable to
483
+ ancestor pager coordinators so their saved logical offsets stay synchronized.
484
+ Recycling/disposal cancels deferred correction. Runtime acceptance includes a
485
+ scrolled retained-page round trip followed by empty content with scrolling slots.
486
+
487
+ Slots scroll with the native list. `fixedFooter` remains a separate fixed native
488
+ row descriptor. `scrollToEnd` aligns the final scrolling slot bottom with the
489
+ viewport end, including footer/empty/header-only slots taller than the viewport. Callers using `listEmpty` MUST omit `snapshot.emptyState`, whose
490
+ existing native descriptor becomes a data item. Horizontal content padding applies
491
+ to slots as well as data rows: every platform places a slot root exactly
492
+ `contentPaddingHorizontal ?? contentPadding` logical units from each edge, the same
493
+ width React lays it out at. Android's narrow-screen row scale and section-index gutter
494
+ apply to data rows only. Slot React trees own their internal layout and
495
+ business actions; NativeList owns their scroll placement and lifecycle.
496
+
497
+ The wrapper mounts exactly three non-collapsible slot roots and reports measured
498
+ heights through `containerSlotHeightsJson` in header/empty/footer order. Native
499
+ validates three finite, non-negative heights. Slot updates MUST NOT alter data-row
500
+ keys or public row indices. No per-scroll-frame JS position updates are used.
501
+ iOS mounts each slot root inside a list-owned host view in UICollectionView and
502
+ reserves native layout space. The host owns the slot's vertical position and clips to
503
+ the reported height, so React frame updates cannot move a slot out of place and a slot
504
+ whose height has not been reported yet (or has just grown) never draws over rows.
505
+ Android uses ConcatAdapter with three single-item slot adapters around the existing
506
+ data adapter; adapter binding indices stay local while layout-manager positions
507
+ are explicitly translated. Slots span all grid columns, do not select/reorder,
508
+ and do not emit row actions, visible-row indices, or image-prefetch work.
509
+
510
+ Fabric mount/unmount ownership remains explicit even when RecyclerView detaches a
511
+ slot holder. The native manager retains at most three roots until Fabric unmount;
512
+ recycling detaches slot content without disposing its React tree. Unmount removes
513
+ that exact view. Native list disposal MUST NOT dispatch pending row/slot events.
514
+ The generated Nitro 0.37 leaf managers require deterministic child-forwarding
515
+ customization: `scripts/enable-container-slots.mjs` runs after nitrogen and rejects
516
+ unexpected generator output. Generated files are never maintained by hand.
517
+
518
+ Acceptance requires both platforms: dynamic header height, empty/nonempty changes,
519
+ scrolling footer with pagination, grid full-span slots, scrolling from interactive
520
+ slot content, refresh from header/empty, row-index scroll APIs, reuse/unmount, and
521
+ rapid account changes. Source/type checks do not establish this runtime acceptance.
522
+
523
+
524
+ ## Refresh trigger distance
525
+
526
+ Optional `snapshot.capabilities.refreshTriggerDistance` is a positive finite
527
+ logical-pixel distance. Omission preserves the platform control's default.
528
+ iOS adds a release-trigger fallback based on the deepest normalized overscroll
529
+ (contentOffset plus contentInset.top); the fallback and UIRefreshControl emit
530
+ at most one refresh action per drag. Android passes the distance to
531
+ SwipeRefreshLayout's native trigger setting. These native controls differ in
532
+ rubber-band/drag scaling, so equal values do not promise equal finger travel.
533
+ The caller continues to own refreshing state, completion, and optional haptic feedback.
534
+ On native, the row-less `nativeList.refresh` bridge envelope is container-owned:
535
+ the JS wrapper consumes it and invokes only `onRefresh`, when supplied. It MUST
536
+ NOT also invoke the public `onRowAction`, even when `onRefresh` is absent.
537
+ An actual row action carrying a `rowKey` remains a row action, including one
538
+ whose caller-defined action key matches this internal name. Web retains its
539
+ legacy dual notification behavior; this native correction does not change Web.
540
+ The container does not emit a second haptic for the release fallback. The fallback is
541
+ inactive unless pull-to-refresh is enabled; no product-specific threshold is
542
+ hardcoded into the module.
543
+
544
+ ## Android refresh foreground geometry
545
+
546
+ Status: implemented; NFT/History Home placement verified on Android on 2026-09-28.
547
+ The refresh container publishes its actual coordinator-added indicator inset in
548
+ physical pixels under the native View tag
549
+ `onekey_native_scroll_coordinator_refresh_inset`. Zero means no added inset;
550
+ the value MUST match the offset actually applied by the existing controller,
551
+ including all ancestor padding contributions. A coordinating outer Pager can
552
+ subtract this metadata once when drawing the native indicator above shared
553
+ headers. This metadata does not change refresh trigger distance, callback,
554
+ refreshing state, ordinary-list placement or row templates. It introduces no
555
+ JavaScript API or dependency on Pager classes. The value follows changes to the
556
+ applied inset and remains valid while that inset is retained across detach.
557
+
558
+ ## Native rich activity presentation
559
+
560
+ Status: Source implemented; native runtime acceptance pending. Optional `amounts`
561
+ supersedes legacy `primaryAmount`/`secondaryAmount` only on native. It accepts at
562
+ most 32 keyed lines, each with formatted text, optional leading visual, tone,
563
+ secondary text and subscript text segments. Segments are caller-formatted and
564
+ never interpreted as numbers by NativeList. Omission preserves the legacy tree.
565
+
566
+ `presentation: stacked` places the amount lines after the identity column and
567
+ right-aligns them; `table` uses equal identity/amount columns, left-aligns amount
568
+ lines and adds an optional trailing fee column. Fee supports label, primary and
569
+ secondary text with their own segments; `hidden` preserves its column width
570
+ while hiding its contents. Up to four uniquely keyed title badges use declared
571
+ tones. `descriptionActionKey` makes only the description emit that action with
572
+ source `description`; footer actions retain their existing source/keys and
573
+ disabled behavior. All actions use the current host binding epoch.
574
+
575
+ Rich rows measure the declared line/visual metrics; there is no six-line native
576
+ truncation. iOS automatic height mirrors the rendered stacks: `lineGap` between the
577
+ visible title/description/status lines, the description measured at the identity
578
+ column's actual width (stacked or table, including the fee column), fee height and the
579
+ footer-action button height. Android sizes the row to its content. The existing height override contract still applies. RTL follows
580
+ semantic leading/trailing anchors. Clearing rich fields returns to the legacy
581
+ renderer, and removing amount lines recycles their visual slots. Web rendering
582
+ remains unchanged; rich fields are native-only until a separate Web migration.
583
+
584
+ Acceptance: 1/2/6/32 lines, changed keys/order, paired icons and network overlays,
585
+ small-number segments in amounts/fiat/fee (ceil(0.6 × parent font size), unchanged
586
+ baseline, matching NumberSizeableText), badge tone/clear, hidden fee, disabled
587
+ actions, description anchors, dark/RTL/font scaling and explicit/automatic height.
588
+
589
+
590
+ ### Android ancestor scroll distance
591
+
592
+ Threshold hysteresis combines the primary RecyclerView's actual consumed scroll
593
+ with all native ancestor header contributions. CollapsiblePagerView publishes
594
+ weak-owner contributions through the namespaced View-tag protocol documented in
595
+ its SPEC.md; no pager dependency or product semantics are required. Absence is
596
+ zero. NativeList owns one native listener, registers it on attach, and removes
597
+ only its own listener on detach. Header-only scrolling therefore crosses the
598
+ same logical Home threshold as iOS normalized content scrolling, without a JS
599
+ scroll-frame event. Changes to the listener or public callbacks do not replace
600
+ native resource ownership.
601
+
602
+ Child distance uses actual onScrolled dy while scrolling continuously. Programmatic
603
+ jumps (scrollToIndex/Key/End/Offset), anchor restores and inserts or height changes
604
+ above the viewport report no dy, so every layout pass and zero-delta scroll re-derives
605
+ the distance as the extent of all grid lines before the first laid-out item plus its
606
+ offset from the padded top. Extents are those actually laid out (recorded per row key,
607
+ including rows a jump lays out and leaves offscreen, pruned to the current rows); a row
608
+ that was never laid out uses its explicit height, else the mean laid-out row extent.
609
+ Slots use their reported heights. The result is exact once every item above the
610
+ viewport has been laid out and an estimate only across never-laid-out rows; it does not
611
+ use RecyclerView's average-height scrollbar estimate. Runtime acceptance for distant
612
+ jumps remains pending.
613
+
614
+
615
+ ### Container follow-up verification
616
+
617
+ The pure Android end-alignment policy has four focused JVM tests: tall footer,
618
+ tall empty slot with viewport padding, animated decorated-bottom correction,
619
+ and short footer. These validate geometry, not actual RecyclerView animation or
620
+ Fabric lifecycle. Native simulator acceptance remains required. The iOS fallback
621
+ retains one refresh action per drag and leaves haptic feedback to its caller.