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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (216) hide show
  1. package/README.md +312 -375
  2. package/android/src/main/java/com/onekey/nativelist/HybridNativeList.kt +14 -1
  3. package/android/src/main/java/com/onekey/nativelist/NativeListAccessoryStack.kt +250 -9
  4. package/android/src/main/java/com/onekey/nativelist/NativeListActivityDetailsView.kt +50 -13
  5. package/android/src/main/java/com/onekey/nativelist/NativeListActivityRenderer.kt +25 -3
  6. package/android/src/main/java/com/onekey/nativelist/NativeListAdapter.kt +17 -1
  7. package/android/src/main/java/com/onekey/nativelist/NativeListButtonGroupRenderer.kt +102 -0
  8. package/android/src/main/java/com/onekey/nativelist/NativeListContainerSlotAdapter.kt +12 -0
  9. package/android/src/main/java/com/onekey/nativelist/NativeListDataRowRenderer.kt +102 -7
  10. package/android/src/main/java/com/onekey/nativelist/NativeListGeneratedIcons.kt +47 -0
  11. package/android/src/main/java/com/onekey/nativelist/NativeListIdentityRenderer.kt +225 -11
  12. package/android/src/main/java/com/onekey/nativelist/NativeListLeadingVisual.kt +152 -33
  13. package/android/src/main/java/com/onekey/nativelist/NativeListMarketRenderer.kt +92 -28
  14. package/android/src/main/java/com/onekey/nativelist/NativeListMediaPlaceholderView.kt +244 -0
  15. package/android/src/main/java/com/onekey/nativelist/NativeListMediaPreviewSlot.kt +66 -31
  16. package/android/src/main/java/com/onekey/nativelist/NativeListMediaTileRenderer.kt +32 -11
  17. package/android/src/main/java/com/onekey/nativelist/NativeListMessageRenderer.kt +25 -0
  18. package/android/src/main/java/com/onekey/nativelist/NativeListModels.kt +209 -3
  19. package/android/src/main/java/com/onekey/nativelist/NativeListPrimitives.kt +120 -287
  20. package/android/src/main/java/com/onekey/nativelist/NativeListRendererRegistry.kt +2 -0
  21. package/android/src/main/java/com/onekey/nativelist/NativeListRendererRowView.kt +7 -0
  22. package/android/src/main/java/com/onekey/nativelist/NativeListResolvedText.kt +8 -3
  23. package/android/src/main/java/com/onekey/nativelist/NativeListSectionHeaderRenderer.kt +69 -0
  24. package/android/src/main/java/com/onekey/nativelist/NativeListTextView.kt +130 -1
  25. package/android/src/main/java/com/onekey/nativelist/NativeListView.kt +1978 -136
  26. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListActivityHostClipPolicyTest.kt +35 -0
  27. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListDescriptionTouchPolicyTest.kt +153 -0
  28. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListIdentityTrailingAxisTest.kt +36 -0
  29. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListLeadingSlotFrameTest.kt +68 -0
  30. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListLeadingVisualClipPolicyTest.kt +44 -0
  31. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListPressPolicyTest.kt +10 -0
  32. package/docs/ROW_TEMPLATES.md +78 -14
  33. package/docs/SPEC.md +1318 -16
  34. package/docs/STYLE_SPEC.md +18 -0
  35. package/ios/HybridNativeList.swift +21 -2
  36. package/ios/NativeListAccessoryStack.swift +237 -51
  37. package/ios/NativeListActivityDetailsView.swift +43 -16
  38. package/ios/NativeListActivityRenderer.swift +8 -2
  39. package/ios/NativeListButtonGroupRenderer.swift +89 -0
  40. package/ios/NativeListDataRowRenderer.swift +167 -30
  41. package/ios/NativeListDesignAssets.swift +13 -75
  42. package/ios/NativeListGeneratedIcons.swift +55 -0
  43. package/ios/NativeListIconBinding.swift +171 -0
  44. package/ios/NativeListIdentityRenderer.swift +256 -39
  45. package/ios/NativeListLeadingVisual.swift +127 -28
  46. package/ios/NativeListMarketRenderer.swift +120 -31
  47. package/ios/NativeListMediaPlaceholderView.swift +189 -0
  48. package/ios/NativeListMediaPreviewSlot.swift +122 -61
  49. package/ios/NativeListMediaTileRenderer.swift +15 -11
  50. package/ios/NativeListMessageRenderer.swift +34 -1
  51. package/ios/NativeListMetricCardRenderer.swift +4 -2
  52. package/ios/NativeListModels.swift +42 -2
  53. package/ios/NativeListRendererRegistry.swift +1 -0
  54. package/ios/NativeListResolvedText.swift +17 -5
  55. package/ios/NativeListRowHost.swift +14 -0
  56. package/ios/NativeListSectionHeaderRenderer.swift +100 -4
  57. package/ios/NativeListTextLabel.swift +106 -0
  58. package/ios/RNCNativeListView.swift +1097 -60
  59. package/ios/tests/NativeListAccessoryStackTests.swift +101 -0
  60. package/ios/tests/NativeListAccountSelectorLayoutTests.swift +96 -0
  61. package/ios/tests/NativeListActivityPresentationTests.swift +423 -0
  62. package/ios/tests/NativeListIdentityTitleIconLayoutTests.swift +81 -0
  63. package/ios/tests/NativeListLeadingVisualPairBackdropTests.swift +50 -0
  64. package/ios/tests/NativeListLifecycleTests.swift +2959 -4
  65. package/ios/tests/NativeListMarketMetricsTests.swift +117 -0
  66. package/ios/tests/NativeListMediaVisibilityTests.swift +41 -7
  67. package/ios/tests/NativeListSharedIconTests.swift +236 -0
  68. package/lib/module/NativeList.js +236 -38
  69. package/lib/module/NativeList.web.js +163 -45
  70. package/lib/module/index.js +1 -1
  71. package/lib/module/models.js +3 -0
  72. package/lib/module/selection.js +1 -1
  73. package/lib/module/validation.js +1263 -48
  74. package/lib/module/web/NativeListGeneratedIcons.js +31 -0
  75. package/lib/module/web/NativeListWebEngine.js +513 -275
  76. package/lib/module/web/templates/ActivityRowRenderer.js +41 -54
  77. package/lib/module/web/templates/ButtonGroupRowRenderer.js +47 -0
  78. package/lib/module/web/templates/DataRowRenderer.js +56 -5
  79. package/lib/module/web/templates/IdentityRowRenderer.js +161 -7
  80. package/lib/module/web/templates/MarketTableRowRenderer.js +36 -19
  81. package/lib/module/web/templates/MediaTileRowRenderer.js +84 -25
  82. package/lib/module/web/templates/MessageRowRenderer.js +18 -2
  83. package/lib/module/web/templates/RowContainerStyle.js +1 -0
  84. package/lib/module/web/templates/RowRendererRegistry.js +3 -0
  85. package/lib/module/web/templates/SectionHeaderRowRenderer.js +36 -2
  86. package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +26 -0
  87. package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +4 -0
  88. package/lib/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +10 -0
  89. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +20 -0
  90. package/lib/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +14 -0
  91. package/lib/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +12 -0
  92. package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +2 -0
  93. package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +43 -0
  94. package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +4 -0
  95. package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +4 -0
  96. package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +4 -0
  97. package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +6 -0
  98. package/lib/nitrogen/generated/shared/json/NativeListConfig.json +2 -0
  99. package/lib/typescript/src/NativeList.d.ts +3 -3
  100. package/lib/typescript/src/NativeList.nitro.d.ts +2 -0
  101. package/lib/typescript/src/NativeList.types.d.ts +20 -2
  102. package/lib/typescript/src/index.d.ts +2 -2
  103. package/lib/typescript/src/models.d.ts +134 -17
  104. package/lib/typescript/src/validation.d.ts +20 -0
  105. package/lib/typescript/src/web/NativeListGeneratedIcons.d.ts +2 -0
  106. package/lib/typescript/src/web/NativeListWebEngine.d.ts +32 -1
  107. package/lib/typescript/src/web/templates/ButtonGroupRowRenderer.d.ts +14 -0
  108. package/lib/typescript/src/web/templates/IdentityRowRenderer.d.ts +1 -1
  109. package/lib/typescript/src/web/templates/MessageRowRenderer.d.ts +9 -3
  110. package/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +26 -0
  111. package/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +4 -0
  112. package/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +10 -0
  113. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +20 -0
  114. package/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +14 -0
  115. package/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +12 -0
  116. package/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +2 -0
  117. package/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +43 -0
  118. package/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +4 -0
  119. package/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +4 -0
  120. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +4 -0
  121. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +6 -0
  122. package/nitrogen/generated/shared/json/NativeListConfig.json +2 -0
  123. package/package.json +16 -10
  124. package/react-native-native-list.podspec +2 -6
  125. package/scripts/generate-icons.mjs +150 -0
  126. package/scripts/generate-icons.test.mjs +288 -0
  127. package/scripts/native-list-icons.json +260 -0
  128. package/src/NativeList.nitro.ts +2 -0
  129. package/src/NativeList.tsx +439 -91
  130. package/src/NativeList.types.ts +24 -2
  131. package/src/NativeList.web.tsx +286 -88
  132. package/src/index.ts +2 -0
  133. package/src/models.ts +272 -144
  134. package/src/selection.ts +1 -0
  135. package/src/validation.ts +3041 -146
  136. package/src/web/NativeListGeneratedIcons.ts +28 -0
  137. package/src/web/NativeListWebEngine.ts +818 -343
  138. package/src/web/templates/ActivityRowRenderer.ts +71 -91
  139. package/src/web/templates/ButtonGroupRowRenderer.ts +58 -0
  140. package/src/web/templates/DataRowRenderer.ts +121 -20
  141. package/src/web/templates/IdentityRowRenderer.ts +234 -9
  142. package/src/web/templates/MarketTableRowRenderer.ts +53 -33
  143. package/src/web/templates/MediaTileRowRenderer.ts +90 -28
  144. package/src/web/templates/MessageRowRenderer.ts +23 -7
  145. package/src/web/templates/RowContainerStyle.ts +2 -0
  146. package/src/web/templates/RowRendererRegistry.ts +11 -1
  147. package/src/web/templates/SectionHeaderRowRenderer.ts +47 -4
  148. package/ios/Resources/NativeListIcons.xcassets/Contents.json +0 -1
  149. package/ios/Resources/NativeListIcons.xcassets/onekey_arrow_bottom.imageset/Contents.json +0 -1
  150. package/ios/Resources/NativeListIcons.xcassets/onekey_arrow_bottom.imageset/icon.svg +0 -1
  151. package/ios/Resources/NativeListIcons.xcassets/onekey_arrow_top.imageset/Contents.json +0 -1
  152. package/ios/Resources/NativeListIcons.xcassets/onekey_arrow_top.imageset/icon.svg +0 -1
  153. package/ios/Resources/NativeListIcons.xcassets/onekey_badge_verified_solid.imageset/Contents.json +0 -1
  154. package/ios/Resources/NativeListIcons.xcassets/onekey_badge_verified_solid.imageset/icon.svg +0 -1
  155. package/ios/Resources/NativeListIcons.xcassets/onekey_chart_trending_up.imageset/Contents.json +0 -1
  156. package/ios/Resources/NativeListIcons.xcassets/onekey_chart_trending_up.imageset/icon.svg +0 -1
  157. package/ios/Resources/NativeListIcons.xcassets/onekey_checkbox_checked.imageset/Contents.json +0 -1
  158. package/ios/Resources/NativeListIcons.xcassets/onekey_checkbox_checked.imageset/icon.svg +0 -1
  159. package/ios/Resources/NativeListIcons.xcassets/onekey_checkbox_indeterminate.imageset/Contents.json +0 -1
  160. package/ios/Resources/NativeListIcons.xcassets/onekey_checkbox_indeterminate.imageset/icon.svg +0 -1
  161. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_bottom.imageset/Contents.json +0 -1
  162. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_bottom.imageset/icon.svg +0 -1
  163. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_grabber_ver.imageset/Contents.json +0 -1
  164. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_grabber_ver.imageset/icon.svg +0 -1
  165. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_right_small.imageset/Contents.json +0 -1
  166. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_right_small.imageset/icon.svg +0 -1
  167. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_top.imageset/Contents.json +0 -1
  168. package/ios/Resources/NativeListIcons.xcassets/onekey_chevron_top.imageset/icon.svg +0 -1
  169. package/ios/Resources/NativeListIcons.xcassets/onekey_dot_hor.imageset/Contents.json +0 -1
  170. package/ios/Resources/NativeListIcons.xcassets/onekey_dot_hor.imageset/icon.svg +0 -1
  171. package/ios/Resources/NativeListIcons.xcassets/onekey_drag.imageset/Contents.json +0 -1
  172. package/ios/Resources/NativeListIcons.xcassets/onekey_drag.imageset/icon.svg +0 -1
  173. package/ios/Resources/NativeListIcons.xcassets/onekey_error_solid.imageset/Contents.json +0 -1
  174. package/ios/Resources/NativeListIcons.xcassets/onekey_error_solid.imageset/icon.svg +0 -1
  175. package/ios/Resources/NativeListIcons.xcassets/onekey_image_square_waves.imageset/Contents.json +0 -1
  176. package/ios/Resources/NativeListIcons.xcassets/onekey_image_square_waves.imageset/icon.svg +0 -1
  177. package/ios/Resources/NativeListIcons.xcassets/onekey_info_circle.imageset/Contents.json +0 -1
  178. package/ios/Resources/NativeListIcons.xcassets/onekey_info_circle.imageset/icon.svg +0 -1
  179. package/ios/Resources/NativeListIcons.xcassets/onekey_minus_circle.imageset/Contents.json +0 -1
  180. package/ios/Resources/NativeListIcons.xcassets/onekey_minus_circle.imageset/icon.svg +0 -1
  181. package/ios/Resources/NativeListIcons.xcassets/onekey_minus_circle_solid.imageset/Contents.json +0 -1
  182. package/ios/Resources/NativeListIcons.xcassets/onekey_minus_circle_solid.imageset/icon.svg +0 -1
  183. package/ios/Resources/NativeListIcons.xcassets/onekey_pencil.imageset/Contents.json +0 -1
  184. package/ios/Resources/NativeListIcons.xcassets/onekey_pencil.imageset/icon.svg +0 -1
  185. package/ios/Resources/NativeListIcons.xcassets/onekey_plus_circle.imageset/Contents.json +0 -1
  186. package/ios/Resources/NativeListIcons.xcassets/onekey_plus_circle.imageset/icon.svg +0 -1
  187. package/ios/Resources/NativeListIcons.xcassets/onekey_plus_small.imageset/Contents.json +0 -1
  188. package/ios/Resources/NativeListIcons.xcassets/onekey_plus_small.imageset/icon.svg +0 -1
  189. package/ios/Resources/NativeListIcons.xcassets/onekey_questionmark_solid.imageset/Contents.json +0 -1
  190. package/ios/Resources/NativeListIcons.xcassets/onekey_questionmark_solid.imageset/icon.svg +0 -1
  191. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_account_error_custom.imageset/Contents.json +0 -15
  192. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_account_error_custom.imageset/icon.svg +0 -14
  193. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_all_networks_solid.imageset/Contents.json +0 -15
  194. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_all_networks_solid.imageset/icon.svg +0 -12
  195. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_apple_brand.imageset/Contents.json +0 -15
  196. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_apple_brand.imageset/icon.svg +0 -6
  197. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_bot_illus.imageset/Contents.json +0 -15
  198. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_bot_illus.imageset/icon.svg +0 -15
  199. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_crossed_small_solid.imageset/Contents.json +0 -15
  200. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_crossed_small_solid.imageset/icon.svg +0 -3
  201. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_globus_outline.imageset/Contents.json +0 -15
  202. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_globus_outline.imageset/icon.svg +0 -7
  203. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_google_illus.imageset/Contents.json +0 -15
  204. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_google_illus.imageset/icon.svg +0 -18
  205. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_lock_solid.imageset/Contents.json +0 -15
  206. package/ios/Resources/NativeListIcons.xcassets/onekey_selector_lock_solid.imageset/icon.svg +0 -7
  207. package/ios/Resources/NativeListIcons.xcassets/onekey_shield_exclamation.imageset/Contents.json +0 -1
  208. package/ios/Resources/NativeListIcons.xcassets/onekey_shield_exclamation.imageset/icon.svg +0 -1
  209. package/ios/Resources/NativeListIcons.xcassets/onekey_speaker_promote.imageset/Contents.json +0 -1
  210. package/ios/Resources/NativeListIcons.xcassets/onekey_speaker_promote.imageset/icon.svg +0 -1
  211. package/ios/Resources/NativeListIcons.xcassets/onekey_star.imageset/Contents.json +0 -1
  212. package/ios/Resources/NativeListIcons.xcassets/onekey_star.imageset/icon.svg +0 -1
  213. package/ios/Resources/NativeListIcons.xcassets/onekey_star_solid.imageset/Contents.json +0 -1
  214. package/ios/Resources/NativeListIcons.xcassets/onekey_star_solid.imageset/icon.svg +0 -1
  215. package/ios/Resources/NativeListIcons.xcassets/onekey_swap_hor.imageset/Contents.json +0 -1
  216. package/ios/Resources/NativeListIcons.xcassets/onekey_swap_hor.imageset/icon.svg +0 -1
@@ -1,3 +1,5 @@
1
+ import { createNamedIcon } from '@onekeyfe/react-native-image/icon/dom';
2
+ import { nativeListGeneratedIcons as selectorIcons } from './NativeListGeneratedIcons';
1
3
  import { applyTextWeight } from './templates/RowText';
2
4
  import {
3
5
  applyRowContainerStyle,
@@ -60,7 +62,12 @@ import {
60
62
  validateOffset,
61
63
  type NormalizedPositionScroll,
62
64
  } from '../scrolling';
63
- import { applyRowPatches, validateSnapshot } from '../validation';
65
+ import {
66
+ applyValidatedRowPatches,
67
+ containNativeListInput,
68
+ emptyNativeListSnapshot,
69
+ validateSnapshot,
70
+ } from '../validation';
64
71
  import { avatarPrefetchWindow } from '../avatarPrefetch';
65
72
  import {
66
73
  acquireNativeListAvatar,
@@ -92,8 +99,6 @@ export const WEB_REORDER_ANIMATION = {
92
99
  const REORDER_TOUCH_LONG_PRESS_MS = 120;
93
100
  const MARKET_LONG_PRESS_MS = 800;
94
101
  const MARKET_MOVE_CANCEL_PX = 10;
95
- export const WEB_MARKET_VERIFIED_PATH =
96
- 'M9.483 11.458v3.5h-1v-3.5z M10.467 2.698a2.03 2.03 0 0 1 3.065 0l1.358 1.564a.03.03 0 0 0 .028.01l2.046-.325a2.03 2.03 0 0 1 2.347 1.971l.037 2.07q0 .016.014.026l1.776 1.066a2.03 2.03 0 0 1 .532 3.019l-1.304 1.609a.03.03 0 0 0-.005.03l.675 1.956a2.03 2.03 0 0 1-1.533 2.656l-2.033.394a.03.03 0 0 0-.023.019l-.741 1.933a2.03 2.03 0 0 1-2.88 1.05l-1.811-1.006a.03.03 0 0 0-.03 0l-1.811 1.005a2.03 2.03 0 0 1-2.88-1.049l-.742-1.933a.03.03 0 0 0-.023-.019l-2.033-.394a2.03 2.03 0 0 1-1.532-2.656l.675-1.957a.03.03 0 0 0-.005-.029l-1.304-1.61a2.03 2.03 0 0 1 .532-3.018l1.776-1.066a.03.03 0 0 0 .014-.026l.035-2.07a2.03 2.03 0 0 1 2.349-1.97l2.045.324a.03.03 0 0 0 .028-.01zm1.516 3.76a.5.5 0 0 0-.447.276l-1.861 3.724H8.483a1 1 0 0 0-1 1v3.5a1 1 0 0 0 1 1h6.692a2 2 0 0 0 1.981-1.73l.341-2.5a2 2 0 0 0-1.982-2.27h-1.939l.197-1.269a1.5 1.5 0 0 0-1.481-1.731z';
97
102
  const REORDER_MOUSE_MOVE_THRESHOLD_PX = 5;
98
103
  const REORDER_EDGE_RATIO = 0.25;
99
104
  const REORDER_MAX_SPEED_ZONE_RATIO = 0.05;
@@ -413,6 +418,15 @@ function effectiveRows(snapshot: NativeListSnapshot): readonly RowModel[] {
413
418
  return snapshot.emptyState ? [snapshot.emptyState] : [];
414
419
  }
415
420
 
421
+ function isDarkBackground(color: string | undefined) {
422
+ const rgb = color ? /^#([0-9a-f]{6})/i.exec(color)?.[1] : undefined;
423
+ if (!rgb) return false;
424
+ const red = Number.parseInt(rgb.slice(0, 2), 16);
425
+ const green = Number.parseInt(rgb.slice(2, 4), 16);
426
+ const blue = Number.parseInt(rgb.slice(4, 6), 16);
427
+ return red * 299 + green * 587 + blue * 114 < 128_000;
428
+ }
429
+
416
430
  function resolvedTheme(snapshot: NativeListSnapshot): NativeListTheme {
417
431
  return { ...defaultTheme, ...snapshot.theme };
418
432
  }
@@ -795,7 +809,7 @@ export const WEB_LIST_CSS = `
795
809
  .ok-native-list-table-secondary{display:block;min-width:0;overflow:clip}.ok-native-list-table-secondary-track{display:flex;flex-direction:column;transition:transform 100ms ease}.ok-native-list-market-table:focus-within .ok-native-list-table-secondary[data-has-hover="true"]>.ok-native-list-table-secondary-track{transform:translateY(calc(-1 * var(--nl-table-secondary-height)))}@media(hover:hover){.ok-native-list-market-table:hover .ok-native-list-table-secondary[data-has-hover="true"]>.ok-native-list-table-secondary-track{transform:translateY(calc(-1 * var(--nl-table-secondary-height)))}}.ok-native-list-market-table button:focus-visible{outline:2px solid var(--nl-accent);outline-offset:1px}.ok-native-list-market-table button:hover{opacity:.75}.ok-native-list-market-table button:active{opacity:.5}
796
810
 
797
811
  [data-native-list-selector="walletSidebar"] .ok-native-list-title{max-width:100%;min-width:0}
798
- .ok-native-list-root{--nl-bg:#f7f7f7;--nl-row:#fff;--nl-selected:#eaf2ff;--nl-pressed:#e8e8e8;--nl-subdued:#f9f9f9;--nl-strong:#0000000f;--nl-primary:#111;--nl-secondary:#6b7280;--nl-disabled:#8d8d8d;--nl-icon:#111;--nl-icon-subdued:#8d8d8d;--nl-separator:#e5e7eb;--nl-accent:#2f6bff;--nl-positive:#15803d;--nl-negative:#dc2626;--nl-critical:#feecec;--nl-inverse:#202020;--nl-inverse-text:#fcfcfc;--nl-info:#0d74ce;position:absolute;inset:0;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:var(--nl-bg);color:var(--nl-primary);font-synthesis:none;font-family:var(--nl-font-regular)}
812
+ .ok-native-list-root{--nl-bg:#f7f7f7;--nl-row:#fff;--nl-selected:#eaf2ff;--nl-pressed:#e8e8e8;--nl-hover:#e8e8e8;--nl-subdued:#f9f9f9;--nl-strong:#0000000f;--nl-primary:#111;--nl-secondary:#6b7280;--nl-disabled:#8d8d8d;--nl-icon:#111;--nl-icon-subdued:#8d8d8d;--nl-separator:#e5e7eb;--nl-accent:#2f6bff;--nl-positive:#15803d;--nl-negative:#dc2626;--nl-critical:#feecec;--nl-inverse:#202020;--nl-inverse-text:#fcfcfc;--nl-info:#0d74ce;position:absolute;inset:0;display:flex;flex-direction:column;min-width:0;min-height:0;overflow:hidden;background:var(--nl-bg);color:var(--nl-primary);font-synthesis:none;font-family:var(--nl-font-regular)}
799
813
  .ok-native-list-viewport-frame{position:relative;flex:1;min-width:0;min-height:0;overflow:hidden}
800
814
  .ok-native-list-viewport{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}
801
815
  .ok-native-list-content{position:relative;min-width:100%;min-height:100%}
@@ -804,9 +818,7 @@ export const WEB_LIST_CSS = `
804
818
  .ok-native-list-row{width:100%;height:100%;box-sizing:border-box;display:flex;align-items:center;gap:12px;overflow:hidden;background:var(--nl-row);color:var(--nl-primary);cursor:default;user-select:none;-webkit-user-select:none}
805
819
  .ok-native-list-item[data-table-alternate="true"]>.ok-native-list-row{background:var(--nl-bg)}
806
820
  .ok-native-list-item[data-native-list-selected="true"]>.ok-native-list-row{background:var(--nl-selected)}
807
- .ok-native-list-item[data-native-list-disabled="true"]>.ok-native-list-row{cursor:default}
808
- .ok-native-list-item[data-native-list-row-press-enabled="true"]>.ok-native-list-row{cursor:pointer}
809
- .ok-native-list-item[data-native-list-row-press-enabled="true"]:hover>.ok-native-list-row{background:var(--nl-pressed)}
821
+ .ok-native-list-item[data-native-list-row-press-enabled="true"]:hover>.ok-native-list-row{background:var(--nl-hover)}
810
822
  .ok-native-list-item[data-native-list-row-press-enabled="true"]:active>.ok-native-list-row{background:var(--nl-pressed)}
811
823
  .ok-native-list-item[data-native-list-row-press-enabled="true"]:not([data-native-list-selected="true"]):hover>.ok-native-list-wallet-row{background:var(--nl-strong)}
812
824
  .ok-native-list-item[data-native-list-row-press-enabled="true"]:not([data-native-list-selected="true"]):active>.ok-native-list-wallet-row{background:var(--nl-pressed)}
@@ -837,20 +849,27 @@ export const WEB_LIST_CSS = `
837
849
  .ok-native-list-item[data-group-position="last"]>.ok-native-list-row{border-radius:0 0 var(--nl-group-radius,12px) var(--nl-group-radius,12px)}
838
850
  .ok-native-list-item[data-group-position="single"]>.ok-native-list-row{border-radius:var(--nl-group-radius,12px)}
839
851
  .ok-native-list-standard{padding:8px 12px}.ok-native-list-network-row{padding:0 12px}.ok-native-list-wallet-row{padding:4px 8px;flex-direction:column;justify-content:center;gap:4px}.ok-native-list-account-row{padding:4px 12px;gap:8px}
852
+ .ok-native-list-trailing-button{appearance:none;box-sizing:border-box;flex:0 0 auto;padding:4px 10px;border:1px solid transparent;border-radius:9999px;background:var(--nl-button-bg,var(--nl-strong));color:var(--nl-button-text,var(--nl-primary));font:500 14px/20px var(--nl-font-medium);white-space:nowrap;cursor:default}.ok-native-list-trailing-button:hover:not(:disabled){background:var(--nl-button-hover,var(--nl-strong))}.ok-native-list-trailing-button:active:not(:disabled){background:var(--nl-button-pressed,var(--nl-pressed))}.ok-native-list-trailing-button:focus-visible{outline:2px solid var(--nl-button-focus,var(--nl-accent))}.ok-native-list-trailing-button:disabled{opacity:.4;cursor:default}
853
+ .ok-native-list-icon-button.ok-native-list-tertiary-icon{box-sizing:border-box;flex:0 0 38px;width:38px;height:38px;margin:-7px;padding:6px;border:1px solid transparent;border-radius:9999px;color:var(--nl-icon-subdued);background:transparent}.ok-native-list-icon-button.ok-native-list-tertiary-icon:hover:not(:disabled){background:var(--nl-hover)}.ok-native-list-icon-button.ok-native-list-tertiary-icon:active:not(:disabled){background:var(--nl-pressed)}.ok-native-list-icon-button.ok-native-list-tertiary-icon:disabled{opacity:.4;cursor:default}
854
+ .ok-native-list-icon-button.ok-native-list-tertiary-icon:focus-visible:not(:disabled){outline:2px solid var(--nl-accent)}
855
+ .ok-native-list-identity-title-icon{flex:0 0 20px;width:20px;height:20px;display:inline-flex;align-items:center;justify-content:center;color:var(--nl-icon);font-size:20px}.ok-native-list-identity-title-text{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}
840
856
  .ok-native-list-account-row .ok-native-list-visual,.ok-native-list-account-action-row .ok-native-list-visual{width:32px;height:32px;flex-basis:32px}.ok-native-list-account-row .ok-native-list-visual>img,.ok-native-list-account-row .ok-native-list-visual-main,.ok-native-list-account-action-row .ok-native-list-visual>img,.ok-native-list-account-action-row .ok-native-list-visual-main{width:32px;height:32px}.ok-native-list-account-row .ok-native-list-visual>.ok-native-list-visual-corner{width:20px;height:20px;padding:2px}.ok-native-list-account-action-row .ok-native-list-visual{border-radius:8px!important}.ok-native-list-wallet-row .ok-native-list-title{color:var(--nl-secondary);font-size:12px;line-height:16px;font-weight:400;font-family:var(--nl-font-regular)}.ok-native-list-item[data-native-list-selected="true"]>.ok-native-list-wallet-row .ok-native-list-title{color:var(--nl-primary)}.ok-native-list-account-row .ok-native-list-title{font-size:16px;line-height:20px;font-weight:400;font-family:var(--nl-font-regular)}.ok-native-list-account-row .ok-native-list-secondary{font-size:14px;line-height:20px;font-weight:400;font-family:var(--nl-font-regular)}
841
857
  .ok-native-list-flex{display:flex;flex:1;min-width:0;flex-direction:column;justify-content:center}.ok-native-list-title{font-size:15px;line-height:20px;font-weight:600;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--nl-font-semibold)}.ok-native-list-secondary{font-size:13px;line-height:18px;color:var(--nl-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ok-native-list-tertiary{color:var(--nl-secondary)}.ok-native-list-info{color:var(--nl-info)}
842
858
  .ok-native-list-identity-row .ok-native-list-title,.ok-native-list-identity-row .ok-native-list-amounts>span:first-child{font-size:16px;line-height:20px}.ok-native-list-identity-row .ok-native-list-secondary{font-size:14px;line-height:20px}
843
859
  .ok-native-list-value{font-size:14px;line-height:20px;font-weight:500;white-space:nowrap;font-family:var(--nl-font-medium)}.ok-native-list-time{font-size:11px;line-height:16px;color:var(--nl-secondary);align-self:flex-start}.ok-native-list-amounts{display:flex;flex-direction:column;align-items:flex-end;min-width:0}.ok-native-list-actions{display:flex;gap:16px;margin-top:6px}
844
860
  .ok-native-list-action-button{appearance:none;border:0;background:transparent;padding:2px;color:var(--nl-accent);cursor:pointer;font:600 12px/16px var(--nl-font-semibold)}.ok-native-list-action-button[data-tone="danger"]{color:var(--nl-negative)}.ok-native-list-action-button:disabled{opacity:.5;cursor:default}
845
- .ok-native-list-visual{position:relative;flex:0 0 40px;width:40px;height:40px;border-radius:20px;overflow:visible;background:var(--nl-strong)}.ok-native-list-visual>img,.ok-native-list-visual-main{display:block;width:40px;height:40px;border-radius:inherit;object-fit:cover}.ok-native-list-visual-fallback{display:flex;width:100%;height:100%;align-items:center;justify-content:center;border-radius:inherit;color:var(--nl-primary);font-size:15px;font-weight:600;overflow:hidden;font-family:var(--nl-font-semibold)}.ok-native-list-visual>.ok-native-list-visual-corner{position:absolute;right:-4px;bottom:-4px;width:18px;height:18px;padding:2px;border-radius:50%;background:var(--nl-row);object-fit:cover}.ok-native-list-stacked{display:flex;align-items:center;width:48px;flex-basis:48px}.ok-native-list-stacked img{width:28px;height:28px;border:2px solid var(--nl-row);border-radius:50%;object-fit:cover;margin-left:-10px}.ok-native-list-stacked img:first-child{margin-left:0}
861
+ .ok-native-list-visual{position:relative;flex:0 0 40px;width:40px;height:40px;border-radius:20px;overflow:visible;background:var(--nl-strong)}.ok-native-list-visual>img,.ok-native-list-visual-main{display:block;width:40px;height:40px;border-radius:inherit;object-fit:cover}.ok-native-list-visual-fallback{display:flex;width:100%;height:100%;align-items:center;justify-content:center;border-radius:inherit;color:var(--nl-primary);font-size:15px;font-weight:600;overflow:hidden;font-family:var(--nl-font-semibold)}.ok-native-list-image-skeleton{position:absolute;inset:0;border-radius:inherit;pointer-events:none;animation:ok-native-list-skeleton-light 1.5s linear infinite alternate}.ok-native-list-image-skeleton[data-dark="true"]{animation-name:ok-native-list-skeleton-dark}@keyframes ok-native-list-skeleton-light{0%{background-color:#fafafa}100%{background-color:#cdcdcd}}@keyframes ok-native-list-skeleton-dark{0%{background-color:#111111}100%{background-color:#333333}}@media(prefers-reduced-motion:reduce){.ok-native-list-image-skeleton{animation:none;background-color:var(--nl-strong)}}.ok-native-list-visual>.ok-native-list-visual-corner{position:absolute;right:-4px;bottom:-4px;width:18px;height:18px;padding:2px;border-radius:50%;background:var(--nl-row);object-fit:cover}.ok-native-list-stacked{display:flex;align-items:center;width:48px;flex-basis:48px}.ok-native-list-stacked img{width:28px;height:28px;border:2px solid var(--nl-row);border-radius:50%;object-fit:cover;margin-left:-10px}.ok-native-list-stacked img:first-child{margin-left:0}
846
862
  .ok-native-list-accessories{display:flex;align-items:center;gap:10px;min-width:0}.ok-native-list-accessory{font-size:14px;color:var(--nl-primary);white-space:nowrap}.ok-native-list-accessory-secondary{color:var(--nl-secondary)}.ok-native-list-icon-button{display:inline-flex;align-items:center;justify-content:center;min-width:24px;height:24px;border:0;background:transparent;color:var(--nl-icon);font-size:20px;line-height:1;font-weight:500;cursor:pointer;font-family:var(--nl-font-medium)}.ok-native-list-checkbox{display:inline-flex;align-items:center;justify-content:center;box-sizing:border-box;width:20px;height:20px;border:2px solid color-mix(in srgb,var(--nl-primary) 19%,transparent);border-radius:5px;background:var(--nl-row);cursor:pointer}.ok-native-list-checkbox[data-state="checked"],.ok-native-list-checkbox[data-state="indeterminate"]{border-color:transparent;background:var(--nl-primary)}.ok-native-list-checkbox[data-state="checked"]::after{content:"";width:6px;height:10px;margin-top:-2px;border-right:2px solid var(--nl-row);border-bottom:2px solid var(--nl-row);transform:rotate(45deg)}.ok-native-list-checkbox[data-state="indeterminate"]::after{content:"";width:8px;height:2px;border-radius:1px;background:var(--nl-row)}.ok-native-list-spinner{width:16px;height:16px;border:2px solid var(--nl-separator);border-top-color:var(--nl-primary);border-radius:50%;animation:ok-native-list-spin .8s linear infinite}@keyframes ok-native-list-spin{to{transform:rotate(360deg)}}
847
- .ok-native-list-badge{display:inline-flex;align-items:center;max-width:100%;height:18px;padding:0 5px;border-radius:5px;background:color-mix(in srgb,var(--nl-accent) 12%,transparent);color:var(--nl-accent);font-size:11px;line-height:18px;white-space:nowrap}.ok-native-list-badge[data-tone="danger"]{background:var(--nl-critical);color:var(--nl-negative)}.ok-native-list-badges{display:inline-flex;gap:4px;margin-left:6px;vertical-align:middle}
863
+ .ok-native-list-icon-button.ok-native-list-decorative-refresh{min-width:16px;width:16px;height:16px}
864
+ .ok-native-list-badge{display:inline-flex;align-items:center;max-width:100%;height:18px;padding:0 5px;border-radius:5px;background:color-mix(in srgb,var(--nl-accent) 12%,transparent);color:var(--nl-accent);font-size:11px;line-height:18px;white-space:nowrap}.ok-native-list-badge[data-tone="danger"]{background:var(--nl-critical);color:var(--nl-negative)}.ok-native-list-badge[data-tone="success"]{background:var(--nl-success-background,color-mix(in srgb,var(--nl-positive) 12%,transparent));color:var(--nl-positive)}.ok-native-list-section>.ok-native-list-badge[data-tone="success"]{box-sizing:border-box;height:20px;padding:2px 8px;border-radius:4px;font:500 12px/16px var(--nl-font-medium)}.ok-native-list-badges{display:inline-flex;gap:4px;margin-left:6px;vertical-align:middle}
865
+ .ok-native-list-identity-row .ok-native-list-badge[data-tone="neutral"]{height:20px;box-sizing:border-box;padding:2px 8px;border-radius:4px;background:var(--nl-strong);color:var(--nl-secondary);font-size:12px;line-height:16px;font-weight:500;font-family:var(--nl-font-medium)}
848
866
  .ok-native-list-section{padding:0 8px;background:var(--nl-bg);gap:8px}.ok-native-list-section[data-variant="summary"]{padding:0 20px}.ok-native-list-section[data-variant="gallery"]{padding:0 12px}.ok-native-list-section[data-variant="history"]{padding:0 8px}.ok-native-list-section-title{font-size:13px;line-height:18px;font-weight:700;color:var(--nl-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--nl-font-bold)}.ok-native-list-section[data-variant="summary"] .ok-native-list-section-title{font-size:16px;font-weight:500;color:var(--nl-primary);font-family:var(--nl-font-medium)}.ok-native-list-section[data-variant="gallery"] .ok-native-list-section-title{font-size:16px;color:var(--nl-primary)}.ok-native-list-section[data-variant="history"] .ok-native-list-section-title{font-size:12px;line-height:16px;letter-spacing:0.8px}.ok-native-list-section-value{margin-left:auto}
849
867
  .ok-native-list-action-row{justify-content:space-between;padding:0 16px}.ok-native-list-action-title{font-size:15px;font-weight:600;color:var(--nl-accent);font-family:var(--nl-font-semibold)}.ok-native-list-action-title[data-tone="danger"]{color:var(--nl-negative)}
868
+ .ok-native-list-button-group{padding:0;gap:10px;overflow:visible}.ok-native-list-block-button{position:relative;display:flex;flex:1 1 0;min-width:0;min-height:48px;align-items:center;justify-content:center;gap:8px;padding:12px 8px;border:1px solid color-mix(in srgb,var(--nl-info) 35%,transparent);border-radius:12px;background:transparent;color:var(--nl-info);font:500 14px/20px var(--nl-font-medium);cursor:pointer}.ok-native-list-block-button>span:not(.ok-native-list-spinner){min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.ok-native-list-block-button>.ok-native-list-spinner{position:static;flex:0 0 20px;width:20px;height:20px;border-top-color:var(--nl-info)}.ok-native-list-block-button:hover:not(:disabled){background:color-mix(in srgb,var(--nl-info) 10%,transparent);border-color:var(--nl-info)}.ok-native-list-block-button:active:not(:disabled){background:color-mix(in srgb,var(--nl-info) 17%,transparent)}.ok-native-list-block-button:focus-visible{outline:2px solid var(--nl-info);outline-offset:1px}.ok-native-list-block-button:disabled{opacity:.4;cursor:default}
850
869
  .ok-native-list-account-action-row{justify-content:flex-start;gap:12px;padding:0 12px}.ok-native-list-account-action-row .ok-native-list-action-title{color:var(--nl-secondary);font-size:16px;line-height:24px;font-weight:400;font-family:var(--nl-font-regular)}
851
870
  .ok-native-list-system{justify-content:center;padding:8px 12px;background:var(--nl-bg);color:var(--nl-secondary);cursor:default}.ok-native-list-system[data-variant="retry"],.ok-native-list-system[data-variant="noMatch"],.ok-native-list-system[data-variant="end"]{justify-content:flex-start}.ok-native-list-system[data-variant="retry"]{cursor:pointer}
852
871
  .ok-native-list-rail{padding:4px;gap:6px;border-radius:8px}.ok-native-list-rail .ok-native-list-visual{width:20px;height:20px;flex-basis:20px}.ok-native-list-rail .ok-native-list-visual>img,.ok-native-list-rail .ok-native-list-visual-main{width:20px;height:20px}.ok-native-list-rail-title{font-size:12px;font-weight:500;white-space:nowrap;font-family:var(--nl-font-medium)}
853
- .ok-native-list-media{display:block;padding:0 5px;background:transparent;border-radius:16px}.ok-native-list-media-image{display:block;width:100%;aspect-ratio:1;border-radius:10px;background:var(--nl-strong);object-fit:cover}.ok-native-list-media-image[data-state="empty"]{background:transparent}.ok-native-list-media-image[data-state="error"]{display:flex;align-items:center;justify-content:center;color:var(--nl-icon-subdued);font-size:24px}.ok-native-list-media-meta{padding-top:7px}.ok-native-list-media-subtitle-row{display:flex;align-items:center;gap:6px}.ok-native-list-media-subtitle{flex:1;min-width:0;font-size:12px;color:var(--nl-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ok-native-list-media-network{width:14px;height:14px;border-radius:50%}.ok-native-list-media-title{font-size:16px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--nl-font-medium)}.ok-native-list-media-close{position:absolute;right:9px;top:4px;border:0;background:color-mix(in srgb,var(--nl-inverse) 72%,transparent);color:var(--nl-inverse-text);width:24px;height:24px;border-radius:50%;cursor:pointer;font:18px/20px var(--nl-font-regular)}
872
+ .ok-native-list-media{display:block;padding:0 5px;background:transparent;border-radius:16px}.ok-native-list-media-image{display:block;width:100%;aspect-ratio:1;border-radius:10px;background:var(--nl-strong);object-fit:cover}.ok-native-list-media-image[data-state="empty"]{background:transparent}.ok-native-list-media-image[data-state="error"]{display:flex;align-items:center;justify-content:center;color:var(--nl-icon-subdued);font-size:24px}.ok-native-list-media-meta{padding-top:7px}.ok-native-list-media-subtitle-row{display:flex;align-items:center;gap:6px}.ok-native-list-media-subtitle{flex:1;min-width:0;font-size:12px;color:var(--nl-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ok-native-list-media-network{width:14px;height:14px;border-radius:50%}.ok-native-list-media-title{font-size:16px;font-weight:500;white-space:nowrap;overflow:hidden;text-overflow:ellipsis;font-family:var(--nl-font-medium)}.ok-native-list-media-fallback{position:absolute;inset:0;overflow:hidden;border-radius:10px;background:var(--nl-strong);color:color-mix(in srgb,var(--nl-disabled) 70%,transparent)}.ok-native-list-media-fallback::after{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 1px color-mix(in srgb,var(--nl-separator) 60%,transparent);pointer-events:none}.ok-native-list-media-sheen,.ok-native-list-media-hatch,.ok-native-list-media-glyph{position:absolute;inset:0;pointer-events:none}.ok-native-list-media-glyph{display:none;align-items:center;justify-content:center}.ok-native-list-media-glyph svg{width:28%;max-width:44px;height:auto}.ok-native-list-media-fallback[data-state="loading"] .ok-native-list-media-glyph[data-glyph="loading"],.ok-native-list-media-fallback[data-state="failed"] .ok-native-list-media-glyph[data-glyph="failed"]{display:flex}.ok-native-list-media-sheen{display:none;overflow:hidden}.ok-native-list-media-fallback[data-state="loading"] .ok-native-list-media-sheen{display:block}.ok-native-list-media-sheen::before{content:"";position:absolute;top:-50%;bottom:-50%;left:0;width:60%;background:linear-gradient(100deg,transparent 0%,var(--nl-media-shine,rgba(255,255,255,.75)) 50%,transparent 100%);transform:translateX(-135%) skewX(-12deg);animation:ok-native-list-media-sweep 1.6s cubic-bezier(.4,0,.2,1) infinite;animation-delay:var(--nl-media-sweep-delay,0s)}@keyframes ok-native-list-media-sweep{0%{transform:translateX(-135%) skewX(-12deg)}70%,100%{transform:translateX(220%) skewX(-12deg)}}.ok-native-list-media-hatch{display:none;background-image:repeating-linear-gradient(135deg,color-mix(in srgb,var(--nl-primary) 4.5%,transparent) 0 1px,transparent 1px 7px);-webkit-mask-image:radial-gradient(circle at 50% 50%,transparent 0 22%,#000 70%);mask-image:radial-gradient(circle at 50% 50%,transparent 0 22%,#000 70%)}.ok-native-list-media-fallback[data-state="failed"] .ok-native-list-media-hatch{display:block}@media(prefers-reduced-motion:reduce){.ok-native-list-media-sheen::before{animation:none;transform:translateX(60%) skewX(-12deg);opacity:.6}}.ok-native-list-media-close{position:absolute;right:9px;top:4px;border:0;background:color-mix(in srgb,var(--nl-inverse) 72%,transparent);color:var(--nl-inverse-text);width:24px;height:24px;border-radius:50%;cursor:pointer;font:18px/20px var(--nl-font-regular)}
854
873
  .ok-native-list-metric{display:flex;flex-direction:column;align-items:flex-start;padding:12px;border-radius:12px;gap:5px;background:var(--nl-row)}.ok-native-list-metric-value{font-size:22px;line-height:28px;font-weight:700;font-family:var(--nl-font-bold)}.ok-native-list-composite{display:flex;flex-direction:column;align-items:stretch;padding:14px;border-radius:12px;gap:12px;background:var(--nl-subdued)}.ok-native-list-composite-heading{font-size:14px;letter-spacing:1px;color:var(--nl-secondary)}.ok-native-list-composite-row{display:flex;gap:12px}.ok-native-list-composite-cell{flex:1;min-width:0}.ok-native-list-composite-cell[data-shaded="true"]{padding:10px;border-radius:10px;background:color-mix(in srgb,var(--nl-primary) 5%,transparent)}.ok-native-list-composite-value{font-size:18px;font-weight:600;font-family:var(--nl-font-semibold)}.ok-native-list-divider{height:1px;background:var(--nl-separator)}.ok-native-list-progress{height:4px;border-radius:2px;overflow:hidden;background:var(--nl-negative)}.ok-native-list-progress>span{display:block;height:100%;border-radius:2px;background:var(--nl-positive)}
855
874
  .ok-native-list-data{padding:6px 12px}.ok-native-list-index{flex:0 0 28px;color:var(--nl-secondary);font-size:13px}.ok-native-list-favorite{flex:0 0 24px;color:var(--nl-icon-subdued);font-size:22px}.ok-native-list-favorite[data-active="true"]{color:var(--nl-accent)}.ok-native-list-data-cell{display:flex;flex-direction:column;min-width:0}.ok-native-list-data-cell[data-align="center"]{align-items:center}.ok-native-list-data-cell[data-align="end"]{align-items:flex-end}.ok-native-list-data-primary{display:flex;align-items:center;gap:5px;max-width:100%;font-size:16px;font-weight:500;white-space:nowrap;font-family:var(--nl-font-medium)}.ok-native-list-unread{width:7px;height:7px;flex:0 0 7px;border-radius:50%;background:var(--nl-accent)}.ok-native-list-thumbnail{width:64px;height:64px;border-radius:10px;object-fit:cover}
856
875
  .ok-native-list-item[data-native-list-row-press-enabled="true"]:active>.ok-native-list-history{background:var(--nl-selected)}
@@ -862,7 +881,7 @@ export const WEB_LIST_CSS = `
862
881
  .ok-native-list-index-preview{position:absolute;z-index:8;right:40px;top:50%;display:flex;width:48px;height:48px;align-items:center;justify-content:center;transform:translateY(-50%) scale(.92);border-radius:14px;background:var(--nl-inverse);color:var(--nl-inverse-text);font-size:22px;font-weight:600;opacity:0;pointer-events:none;transition:opacity .15s ease,transform .15s ease;font-family:var(--nl-font-semibold)}.ok-native-list-index-preview[data-visible="true"]{opacity:1;transform:translateY(-50%) scale(1)}
863
882
  .ok-native-list-row.ok-native-list-market-skeleton{padding:12px 20px;gap:0}.ok-native-list-skeleton-left{display:flex;align-items:center;gap:12px;flex:1}.ok-native-list-skeleton-text{display:flex;flex-direction:column;gap:4px}.ok-native-list-skeleton-right{display:flex;align-items:center;gap:8px}.ok-native-list-skeleton-mark{display:block;flex-shrink:0;border-radius:8px;animation:ok-native-list-skeleton 1.5s linear infinite alternate}@keyframes ok-native-list-skeleton{from{background-color:var(--nl-skeleton-base)}to{background-color:var(--nl-skeleton-highlight)}}.ok-native-list-market-spinner{display:block;width:20px;height:20px;flex-shrink:0;color:var(--nl-icon);animation:ok-native-list-spin .75s linear infinite}
864
883
  @media (prefers-reduced-motion:reduce){.ok-native-list-index-preview,.ok-native-list-refresh{transition:none}.ok-native-list-spinner,.ok-native-list-market-spinner{animation:none}.ok-native-list-skeleton-mark{animation:none;background:var(--nl-skeleton-base)}}
865
- .ok-native-list-footer{flex:0 0 auto;min-height:0}.ok-native-list-sticky{position:absolute;z-index:4;left:0;right:0;top:0;pointer-events:auto;box-shadow:0 1px 0 var(--nl-separator)}.ok-native-list-viewport-frame:has(>.ok-native-list-index-rail:not([hidden]))>.ok-native-list-viewport,.ok-native-list-viewport-frame[data-section-index-visible="true"]>.ok-native-list-viewport{scrollbar-width:none}.ok-native-list-viewport-frame:has(>.ok-native-list-index-rail:not([hidden]))>.ok-native-list-viewport::-webkit-scrollbar,.ok-native-list-viewport-frame[data-section-index-visible="true"]>.ok-native-list-viewport::-webkit-scrollbar{display:none}.ok-native-list-index-rail{position:absolute;z-index:6;top:0;right:0;bottom:0;width:${SECTION_INDEX_RAIL_WIDTH}px;touch-action:none;cursor:pointer;font-family:var(--nl-font-regular);font-synthesis:none}.ok-native-list-index-rail[hidden]{display:none}.ok-native-list-index-button{appearance:none;position:absolute;left:15px;display:flex;width:14px;height:14px;align-items:center;justify-content:center;padding:0;transform:translateY(-50%);border:0;border-radius:7px;background:transparent;color:var(--nl-disabled);font-size:10px;font-weight:400;line-height:1;cursor:pointer;opacity:.5;transition:opacity .15s ease;font-family:var(--nl-font-regular)}.ok-native-list-index-rail:hover .ok-native-list-index-button,.ok-native-list-index-rail:focus-within .ok-native-list-index-button,.ok-native-list-index-button[data-active="true"]{opacity:1}.ok-native-list-index-button[data-active="true"]{background:var(--nl-positive);color:var(--nl-inverse-text);font-weight:500;font-family:var(--nl-font-medium)}.ok-native-list-index-button:focus-visible{outline:2px solid var(--nl-positive);outline-offset:1px}
884
+ .ok-native-list-footer{flex:0 0 auto;min-height:0}.ok-native-list-sticky{position:absolute;z-index:4;left:0;right:0;top:0;pointer-events:auto}.ok-native-list-viewport-frame:has(>.ok-native-list-index-rail:not([hidden]))>.ok-native-list-viewport,.ok-native-list-viewport-frame[data-section-index-visible="true"]>.ok-native-list-viewport{scrollbar-width:none}.ok-native-list-viewport-frame:has(>.ok-native-list-index-rail:not([hidden]))>.ok-native-list-viewport::-webkit-scrollbar,.ok-native-list-viewport-frame[data-section-index-visible="true"]>.ok-native-list-viewport::-webkit-scrollbar{display:none}.ok-native-list-index-rail{position:absolute;z-index:6;top:0;right:0;bottom:0;width:${SECTION_INDEX_RAIL_WIDTH}px;touch-action:none;cursor:pointer;font-family:var(--nl-font-regular);font-synthesis:none}.ok-native-list-index-rail[hidden]{display:none}.ok-native-list-index-button{appearance:none;position:absolute;left:15px;display:flex;width:14px;height:14px;align-items:center;justify-content:center;padding:0;transform:translateY(-50%);border:0;border-radius:7px;background:transparent;color:var(--nl-disabled);font-size:10px;font-weight:400;line-height:1;cursor:pointer;opacity:.5;transition:opacity .15s ease;font-family:var(--nl-font-regular)}.ok-native-list-index-rail:hover .ok-native-list-index-button,.ok-native-list-index-rail:focus-within .ok-native-list-index-button,.ok-native-list-index-button[data-active="true"]{opacity:1}.ok-native-list-index-button[data-active="true"]{background:var(--nl-positive);color:var(--nl-inverse-text);font-weight:500;font-family:var(--nl-font-medium)}.ok-native-list-index-button:focus-visible{outline:2px solid var(--nl-positive);outline-offset:1px}
866
885
  .ok-native-list-refresh{position:absolute;z-index:7;left:50%;top:8px;display:flex;align-items:center;gap:6px;padding:6px 10px;border-radius:999px;background:var(--nl-inverse);color:var(--nl-inverse-text);font-size:12px;opacity:0;transform:translate(-50%,-16px);transition:opacity .15s ease,transform .15s ease;pointer-events:none}.ok-native-list-refresh[data-visible="true"]{opacity:1;transform:translate(-50%,0)}
867
886
  .ok-native-list-warning{height:auto;display:flex;flex-direction:column;align-items:stretch;gap:4px;padding:14px 12px;border-top:1px solid;border-bottom:1px solid;box-sizing:border-box;cursor:default}.ok-native-list-warning-title,.ok-native-list-warning-message{font-size:14px;line-height:20px;white-space:normal;overflow-wrap:anywhere}.ok-native-list-warning-title{font-weight:500;color:var(--nl-primary);font-family:var(--nl-font-medium)}.ok-native-list-warning-message{font-weight:400;color:var(--nl-secondary);font-family:var(--nl-font-regular)}
868
887
  .ok-native-list-subtitle-segments{display:flex;align-items:center;min-width:0;max-width:100%;height:20px}.ok-native-list-subtitle-segments>.ok-native-list-secondary{flex:0 1 auto;min-width:0}.ok-native-list-subtitle-dot{flex:0 0 4px;width:4px;height:4px;margin:0 6px;border-radius:50%;background:var(--nl-disabled)}.ok-native-list-wallet-row>.ok-native-list-flex{flex:0 1 auto;width:100%;align-items:center}.ok-native-list-wallet-badges{display:flex;gap:4px;justify-content:center;margin-top:4px;height:20px;max-width:100%}.ok-native-list-wallet-badges>.ok-native-list-badge{background:var(--nl-strong);color:var(--nl-secondary);font-size:12px;line-height:16px;height:20px;box-sizing:border-box;padding:2px 4px}.ok-native-list-visual-overlay{position:absolute;display:flex;align-items:center;justify-content:center;box-sizing:border-box;border-radius:50%;overflow:hidden;line-height:1;font-size:10px}.ok-native-list-visual-overlay img,.ok-native-list-visual-overlay svg{width:100%;height:100%;object-fit:contain}/* OneKey patch: selector controls follow their original semantic colors and geometry. */
@@ -895,6 +914,7 @@ export const WEB_LIST_CSS = `
895
914
  .ok-native-list-root .ok-native-list-item>[data-nl-container-background="true"],.ok-native-list-root .ok-native-list-wallet-member>[data-nl-container-background="true"]{background:var(--nl-container-background)}
896
915
  .ok-native-list-root [data-nl-container-border="true"]{position:relative}
897
916
  .ok-native-list-root [data-nl-container-border="true"]::before{content:"";position:absolute;inset:0;border-radius:inherit;box-shadow:inset 0 0 0 var(--nl-container-border-width) var(--nl-container-border-color);z-index:2;pointer-events:none}
917
+ .ok-native-list-root [data-nl-inline-warning="true"][data-nl-container-border="true"]::before{box-shadow:none;border-block:var(--nl-container-border-width) solid var(--nl-container-border-color);border-inline:0;border-radius:0}
898
918
  .ok-native-list-root .ok-native-list-item[data-native-list-row-press-enabled="true"]:hover>[data-nl-container-background="true"],.ok-native-list-root .ok-native-list-item[data-native-list-row-press-enabled="true"]:active>[data-nl-container-background="true"],.ok-native-list-root .ok-native-list-wallet-member:hover>[data-nl-container-background="true"],.ok-native-list-root .ok-native-list-wallet-member:active>[data-nl-container-background="true"]{background:var(--nl-pressed)}
899
919
  `;
900
920
 
@@ -1166,316 +1186,31 @@ function paintSelectorImageBackground(
1166
1186
  if (image.complete && image.naturalWidth > 0) update();
1167
1187
  }
1168
1188
 
1169
- // OneKey patch: use source SVG paths for selector actions and wallet provider marks.
1170
- const selectorIcons: Readonly<
1171
- Record<
1172
- string,
1173
- Readonly<{
1174
- viewBox: string;
1175
- paths: readonly Readonly<{
1176
- d: string;
1177
- fill: string;
1178
- fillRule: string;
1179
- opacity: number;
1180
- }>[];
1181
- }>
1182
- >
1183
- > = {
1184
- CryptoCoinOutline: {
1185
- viewBox: '0 0 24 24',
1186
- paths: [
1187
- {
1188
- d: 'M11 16.387a4.5 4.5 0 0 1 0-8.775V6h2v1.613a4.5 4.5 0 0 1 2.856 2.067l-1.712 1.032a2.5 2.5 0 1 0 0 2.576l1.712 1.032A4.5 4.5 0 0 1 13 16.386V18h-2z',
1189
- fill: 'currentColor',
1190
- fillRule: 'nonzero',
1191
- opacity: 1,
1192
- },
1193
- {
1194
- d: 'M22 12c0 5.523-4.477 10-10 10S2 17.523 2 12 6.477 2 12 2s10 4.477 10 10m-2 0a8 8 0 1 0-16 0 8 8 0 0 0 16 0',
1195
- fill: 'currentColor',
1196
- fillRule: 'evenodd',
1197
- opacity: 1,
1198
- },
1199
- ],
1200
- },
1201
- GlobusOutline: {
1202
- viewBox: '0 0 24 24',
1203
- paths: [
1204
- {
1205
- d: 'M12 2c5.185 0 9.448 3.947 9.95 9H22v2h-.05c-.502 5.053-4.765 9-9.95 9s-9.448-3.947-9.95-9H2v-2h.05C2.552 5.947 6.815 2 12 2M9.523 13c.09 1.982.438 3.726.934 5.002.29.746.612 1.282.917 1.614.304.331.517.384.626.384s.322-.053.626-.384c.305-.332.627-.868.917-1.614.496-1.276.845-3.02.934-5.002zm-5.459 0a8 8 0 0 0 4.8 6.36 10 10 0 0 1-.271-.633C7.994 17.187 7.61 15.189 7.52 13zm12.416 0c-.09 2.189-.474 4.187-1.073 5.727a10 10 0 0 1-.271.633 8 8 0 0 0 4.8-6.36zM8.863 4.639A8 8 0 0 0 4.064 11h3.457c.09-2.189.473-4.187 1.072-5.727q.127-.327.27-.634M12 4c-.109 0-.322.053-.626.384-.305.332-.627.868-.917 1.614-.496 1.276-.844 3.02-.934 5.002h4.954c-.09-1.982-.438-3.726-.934-5.002-.29-.746-.612-1.282-.917-1.614C12.322 4.053 12.109 4 12 4m3.136.639q.144.307.271.634c.599 1.54.982 3.538 1.073 5.727h3.456a8 8 0 0 0-4.8-6.361',
1206
- fill: 'currentColor',
1207
- fillRule: 'evenodd',
1208
- opacity: 1.0,
1209
- },
1210
- ],
1211
- },
1212
- LockSolid: {
1213
- viewBox: '0 0 24 24',
1214
- paths: [
1215
- {
1216
- d: 'M12 2a5 5 0 0 1 5 5v2h3v13H4V9h3V7a5 5 0 0 1 5-5m-1 11v5h2v-5zm1-9a3 3 0 0 0-3 3v2h6V7a3 3 0 0 0-3-3',
1217
- fill: 'currentColor',
1218
- fillRule: 'evenodd',
1219
- opacity: 1.0,
1220
- },
1221
- ],
1222
- },
1223
- GoogleIllus: {
1224
- viewBox: '0 0 24 24',
1225
- paths: [
1226
- {
1227
- d: 'M22.56 12.25c0-.78-.07-1.53-.2-2.25H12v4.26h5.92c-.26 1.37-1.04 2.53-2.21 3.31v2.77h3.57c2.08-1.92 3.28-4.74 3.28-8.09',
1228
- fill: '#4285F4',
1229
- fillRule: 'nonzero',
1230
- opacity: 1.0,
1231
- },
1232
- {
1233
- d: 'M12 23c2.97 0 5.46-.98 7.28-2.66l-3.57-2.77c-.98.66-2.23 1.06-3.71 1.06-2.86 0-5.29-1.93-6.16-4.53H2.18v2.84C3.99 20.53 7.7 23 12 23',
1234
- fill: '#34A853',
1235
- fillRule: 'nonzero',
1236
- opacity: 1.0,
1237
- },
1238
- {
1239
- d: 'M5.84 14.09c-.22-.66-.35-1.36-.35-2.09s.13-1.43.35-2.09V7.07H2.18C1.43 8.55 1 10.22 1 12s.43 3.45 1.18 4.93l2.85-2.22z',
1240
- fill: '#FBBC05',
1241
- fillRule: 'nonzero',
1242
- opacity: 1.0,
1243
- },
1244
- {
1245
- d: 'M12 5.38c1.62 0 3.06.56 4.21 1.64l3.15-3.15C17.45 2.09 14.97 1 12 1 7.7 1 3.99 3.47 2.18 7.07l3.66 2.84c.87-2.6 3.3-4.53 6.16-4.53',
1246
- fill: '#EA4335',
1247
- fillRule: 'nonzero',
1248
- opacity: 1.0,
1249
- },
1250
- ],
1251
- },
1252
- AppleBrand: {
1253
- viewBox: '0 0 16 20',
1254
- paths: [
1255
- {
1256
- d: 'M11.67.834c.117 1.074-.315 2.153-.955 2.928-.64.773-1.692 1.378-2.718 1.298-.14-1.054.38-2.151.971-2.836C9.63 1.45 10.746.872 11.67.834M14.994 7.093c-.176.108-1.992 1.224-1.972 3.482.025 2.769 2.428 3.693 2.46 3.705l-.004.015a10.1 10.1 0 0 1-1.264 2.593c-.764 1.116-1.556 2.229-2.806 2.254-.598.011-1-.162-1.416-.343-.437-.19-.891-.386-1.609-.386-.751 0-1.226.203-1.683.398-.397.169-.78.333-1.32.354-1.208.047-2.124-1.207-2.895-2.32C.909 14.57-.294 10.414 1.322 7.612c.803-1.395 2.237-2.275 3.794-2.298.671-.014 1.32.244 1.89.47.434.172.821.326 1.135.326.282 0 .659-.149 1.099-.323.692-.273 1.539-.607 2.41-.518.599.026 2.276.24 3.354 1.818z',
1257
- fill: 'currentColor',
1258
- fillRule: 'nonzero',
1259
- opacity: 1.0,
1260
- },
1261
- ],
1262
- },
1263
- BotIllus: {
1264
- viewBox: '0 0 24 24',
1265
- paths: [
1266
- {
1267
- d: 'M11 2a1 1 0 1 1 2 0v1.8l1.6 1.6a1 1 0 1 1-1.4 1.4L12 5.6l-1.2 1.2a1 1 0 0 1-1.4-1.4L11 3.8z',
1268
- fill: '#8897A5',
1269
- fillRule: 'nonzero',
1270
- opacity: 1.0,
1271
- },
1272
- {
1273
- d: 'M8.0 6.0h8.0a5.0 5.0 0 0 1 5.0 5.0v4.0a5.0 5.0 0 0 1 -5.0 5.0h-8.0a5.0 5.0 0 0 1 -5.0 -5.0v-4.0a5.0 5.0 0 0 1 5.0 -5.0z',
1274
- fill: '#3FA9F5',
1275
- fillRule: 'nonzero',
1276
- opacity: 1.0,
1277
- },
1278
- {
1279
- d: 'M3.0 10.0h0.0a1.5 1.5 0 0 1 1.5 1.5v3.0a1.5 1.5 0 0 1 -1.5 1.5h0.0a1.5 1.5 0 0 1 -1.5 -1.5v-3.0a1.5 1.5 0 0 1 1.5 -1.5z',
1280
- fill: '#8897A5',
1281
- fillRule: 'nonzero',
1282
- opacity: 1.0,
1283
- },
1284
- {
1285
- d: 'M21.0 10.0h0.0a1.5 1.5 0 0 1 1.5 1.5v3.0a1.5 1.5 0 0 1 -1.5 1.5h0.0a1.5 1.5 0 0 1 -1.5 -1.5v-3.0a1.5 1.5 0 0 1 1.5 -1.5z',
1286
- fill: '#8897A5',
1287
- fillRule: 'nonzero',
1288
- opacity: 1.0,
1289
- },
1290
- {
1291
- d: 'M7.5 12.0a1.5 1.5 0 1 0 3.0 0a1.5 1.5 0 1 0 -3.0 0',
1292
- fill: '#10243E',
1293
- fillRule: 'nonzero',
1294
- opacity: 1.0,
1295
- },
1296
- {
1297
- d: 'M13.5 12.0a1.5 1.5 0 1 0 3.0 0a1.5 1.5 0 1 0 -3.0 0',
1298
- fill: '#10243E',
1299
- fillRule: 'nonzero',
1300
- opacity: 1.0,
1301
- },
1302
- {
1303
- d: 'M8.5 15.4c.9.8 2.08 1.2 3.5 1.2s2.6-.4 3.5-1.2c.24-.2.6-.18.8.06.2.23.17.6-.06.8-1.14.98-2.58 1.46-4.24 1.46s-3.1-.48-4.24-1.46a.58.58 0 0 1-.06-.8c.2-.24.56-.26.8-.06',
1304
- fill: '#10243E',
1305
- fillRule: 'nonzero',
1306
- opacity: 1.0,
1307
- },
1308
- ],
1309
- },
1310
- AllNetworksSolid: {
1311
- viewBox: '0 0 24 24',
1312
- paths: [
1313
- {
1314
- d: 'M15.333 13.998a1.335 1.335 0 1 1 0 2.67 1.335 1.335 0 0 1 0-2.67',
1315
- fill: 'currentColor',
1316
- fillRule: 'nonzero',
1317
- opacity: 1.0,
1318
- },
1319
- {
1320
- d: 'M12 0c6.627 0 12 5.373 12 12s-5.373 12-12 12S0 18.627 0 12 5.373 0 12 0M8 12.668A2 2 0 0 0 6 14.666V16c0 1.103.895 1.997 1.998 1.998h1.334A2 2 0 0 0 11.33 16v-1.334a2 2 0 0 0-1.998-1.998zm7.333 0a2.665 2.665 0 1 0 0 5.33 2.665 2.665 0 0 0 0-5.33M7.999 6.001A2 2 0 0 0 6.001 8v1.334c0 1.103.895 1.998 1.998 1.998h1.334a2 2 0 0 0 1.998-1.998V7.999a2 2 0 0 0-1.998-1.998zm6.667 0A2 2 0 0 0 12.668 8v1.334c0 1.103.895 1.998 1.998 1.998H16a2 2 0 0 0 1.998-1.998V7.999A2 2 0 0 0 16 6.001z',
1321
- fill: 'currentColor',
1322
- fillRule: 'evenodd',
1323
- opacity: 1.0,
1324
- },
1325
- ],
1326
- },
1327
- CrossedSmallSolid: {
1328
- viewBox: '0 0 24 24',
1329
- paths: [
1330
- {
1331
- d: 'M17.87 8.25 14.12 12l3.75 3.75-2.12 2.121-3.75-3.75-3.75 3.75-2.121-2.121L9.879 12l-3.75-3.75 2.12-2.121L12 9.879l3.75-3.75 2.122 2.121Z',
1332
- fill: 'currentColor',
1333
- fillRule: 'nonzero',
1334
- opacity: 1.0,
1335
- },
1336
- ],
1337
- },
1338
- AccountErrorCustom: {
1339
- viewBox: '0 0 18 18',
1340
- paths: [
1341
- {
1342
- d: 'M12.5 12.75a1.25 1.25 0 1 0 0-2.5 1.25 1.25 0 0 0 0 2.5',
1343
- fill: '#000',
1344
- fillRule: 'nonzero',
1345
- opacity: 0.447,
1346
- },
1347
- {
1348
- d: 'M0 3.5A3.5 3.5 0 0 1 3.5 0h8.088A2.41 2.41 0 0 1 14 2.412V5h1a3 3 0 0 1 3 3v7a3 3 0 0 1-3 3H4a4 4 0 0 1-4-4zm2 3.163V14a2 2 0 0 0 2 2h11a1 1 0 0 0 1-1V8a1 1 0 0 0-1-1H3.5c-.537 0-1.045-.12-1.5-.337M2 3.5A1.5 1.5 0 0 0 3.5 5H12V2.412A.41.41 0 0 0 11.588 2H3.5A1.5 1.5 0 0 0 2 3.5',
1349
- fill: '#000',
1350
- fillRule: 'evenodd',
1351
- opacity: 0.447,
1352
- },
1353
- ],
1354
- },
1355
- PlusSmallOutline: {
1356
- viewBox: '0 0 24 24',
1357
- paths: [
1358
- {
1359
- d: 'M13 11h5v2h-5v5h-2v-5H6v-2h5V6h2z',
1360
- fill: 'currentColor',
1361
- fillRule: 'nonzero',
1362
- opacity: 1.0,
1363
- },
1364
- ],
1365
- },
1366
- DotHorOutline: {
1367
- viewBox: '0 0 24 24',
1368
- paths: [
1369
- {
1370
- d: 'M6 14H2v-4h4zm8 0h-4v-4h4zm8 0h-4v-4h4z',
1371
- fill: 'currentColor',
1372
- fillRule: 'nonzero',
1373
- opacity: 1.0,
1374
- },
1375
- ],
1376
- },
1377
- ChevronRightSmallOutline: {
1378
- viewBox: '0 0 24 24',
1379
- paths: [
1380
- {
1381
- d: 'M15.414 12 10 17.414 8.586 16l4-4-4-4L10 6.586z',
1382
- fill: 'currentColor',
1383
- fillRule: 'nonzero',
1384
- opacity: 1.0,
1385
- },
1386
- ],
1387
- },
1388
- DragOutline: {
1389
- viewBox: '0 0 24 24',
1390
- paths: [
1391
- {
1392
- d: 'M11 21H7v-4h4zm6 0h-4v-4h4zm-6-7H7v-4h4zm6 0h-4v-4h4zm-6-7H7V3h4zm6 0h-4V3h4z',
1393
- fill: 'currentColor',
1394
- fillRule: 'nonzero',
1395
- opacity: 1.0,
1396
- },
1397
- ],
1398
- },
1399
- PencilOutline: {
1400
- viewBox: '0 0 24 24',
1401
- paths: [
1402
- {
1403
- d: 'M22.414 7.5 7.914 22H2v-5.914l14.5-14.5zM4 16.914V20h3.086l9.5-9.5L13.5 7.414zM14.914 6 18 9.086 19.586 7.5 16.5 4.414z',
1404
- fill: 'currentColor',
1405
- fillRule: 'evenodd',
1406
- opacity: 1.0,
1407
- },
1408
- ],
1409
- },
1410
- CheckboxCheckedCustom: {
1411
- viewBox: '0 0 16 16',
1412
- paths: [
1413
- {
1414
- d: 'M12.204 5.043a1 1 0 0 1 0 1.414l-4.5 4.5a1 1 0 0 1-1.414 0l-2-2a1 1 0 1 1 1.414-1.414l1.293 1.293 3.793-3.793a1 1 0 0 1 1.414 0',
1415
- fill: 'currentColor',
1416
- fillRule: 'evenodd',
1417
- opacity: 1.0,
1418
- },
1419
- ],
1420
- },
1421
- CheckboxIndeterminateCustom: {
1422
- viewBox: '0 0 16 16',
1423
- paths: [
1424
- {
1425
- d: 'M4 8a1 1 0 0 1 1-1h6a1 1 0 0 1 0 2H5a1 1 0 0 1-1-1',
1426
- fill: 'currentColor',
1427
- fillRule: 'evenodd',
1428
- opacity: 1.0,
1429
- },
1430
- ],
1431
- },
1432
- Circle: {
1433
- viewBox: '0 0 24 24',
1434
- paths: [
1435
- {
1436
- d: 'M0 12a12 12 0 1 0 24 0a12 12 0 1 0 -24 0',
1437
- fill: 'currentColor',
1438
- fillRule: 'nonzero',
1439
- opacity: 1,
1440
- },
1441
- ],
1442
- },
1443
- BadgeVerifiedSolid: {
1444
- viewBox: '0 0 24 24',
1445
- paths: [
1446
- {
1447
- d: WEB_MARKET_VERIFIED_PATH,
1448
- fill: 'currentColor',
1449
- fillRule: 'evenodd',
1450
- opacity: 1,
1451
- },
1452
- ],
1453
- },
1454
- };
1455
1189
  function applySelectorIcon(element: HTMLElement, name: string) {
1456
- const icon = selectorIcons[name];
1457
- if (!icon) return;
1458
- element.textContent = '';
1459
- const svg = element.ownerDocument.createElementNS(
1460
- 'http://www.w3.org/2000/svg',
1461
- 'svg'
1462
- );
1463
- svg.setAttribute('viewBox', icon.viewBox);
1464
- svg.setAttribute('width', '24');
1465
- svg.setAttribute('height', '24');
1466
- svg.setAttribute('aria-hidden', 'true');
1467
- icon.paths.forEach((path) => {
1468
- const child = element.ownerDocument.createElementNS(
1190
+ const canonical = selectorIcons[name];
1191
+ if (!canonical) return;
1192
+ if (canonical === 'Circle') {
1193
+ const svg = element.ownerDocument.createElementNS(
1469
1194
  'http://www.w3.org/2000/svg',
1470
- 'path'
1195
+ 'svg'
1471
1196
  );
1472
- child.setAttribute('d', path.d);
1473
- child.setAttribute('fill', path.fill);
1474
- child.setAttribute('fill-rule', path.fillRule);
1475
- child.setAttribute('fill-opacity', String(path.opacity));
1476
- svg.appendChild(child);
1477
- });
1478
- element.appendChild(svg);
1197
+ svg.setAttribute('viewBox', '0 0 24 24');
1198
+ svg.setAttribute('width', '24');
1199
+ svg.setAttribute('height', '24');
1200
+ svg.setAttribute('aria-hidden', 'true');
1201
+ const circle = element.ownerDocument.createElementNS(
1202
+ 'http://www.w3.org/2000/svg',
1203
+ 'circle'
1204
+ );
1205
+ circle.setAttribute('cx', '12');
1206
+ circle.setAttribute('cy', '12');
1207
+ circle.setAttribute('r', '12');
1208
+ circle.setAttribute('fill', 'currentColor');
1209
+ svg.append(circle);
1210
+ element.replaceChildren(svg);
1211
+ return;
1212
+ }
1213
+ element.replaceChildren(createNamedIcon(element.ownerDocument, canonical));
1479
1214
  }
1480
1215
 
1481
1216
  function iconGlyph(name: string): string {
@@ -1557,6 +1292,10 @@ function createVisual(
1557
1292
  : visualBackground;
1558
1293
  const fallbackIcon =
1559
1294
  'fallbackIcon' in visual ? visual.fallbackIcon : undefined;
1295
+ const fallbackBackground =
1296
+ fallbackIcon?.backgroundColor ?? 'var(--nl-strong)';
1297
+ if (!source && fallbackIcon?.backgroundColor)
1298
+ frame.style.background = fallbackBackground;
1560
1299
  const handlesSourceFallback =
1561
1300
  showsSourcePlaceholder &&
1562
1301
  (fallbackIcon !== undefined || 'fallbackText' in visual);
@@ -1572,6 +1311,21 @@ function createVisual(
1572
1311
  if (image.complete && image.naturalWidth > 0) restoreBackground();
1573
1312
  }
1574
1313
  if (selectorPresentation) paintSelectorImageBackground(image, frame);
1314
+ if (
1315
+ source?.loadingStrategy === 'skeleton' &&
1316
+ !(image.complete && image.naturalWidth > 0)
1317
+ ) {
1318
+ const skeleton = createElement(
1319
+ context.document,
1320
+ 'span',
1321
+ 'ok-native-list-image-skeleton'
1322
+ );
1323
+ if (isDarkBackground(resolvedTheme(context.snapshot).background))
1324
+ skeleton.dataset.dark = 'true';
1325
+ frame.appendChild(skeleton);
1326
+ image.addEventListener('load', () => skeleton.remove(), { once: true });
1327
+ image.addEventListener('error', () => skeleton.remove(), { once: true });
1328
+ }
1575
1329
  } else if (!source || showsSourcePlaceholder) {
1576
1330
  frame.appendChild(
1577
1331
  createElement(
@@ -1626,13 +1380,29 @@ function createVisual(
1626
1380
  ? visual.fallbackText ?? ''
1627
1381
  : ''
1628
1382
  );
1383
+ if (
1384
+ 'fallbackTextColor' in visual &&
1385
+ visual.fallbackTextColor &&
1386
+ !fallbackIcon
1387
+ )
1388
+ fallback.style.color = visual.fallbackTextColor;
1629
1389
  if (fallbackIcon) {
1630
1390
  applySelectorIcon(fallback, fallbackIcon.name);
1631
1391
  if (fallbackIcon.tintColor)
1632
1392
  fallback.style.color = fallbackIcon.tintColor;
1393
+ if (fallbackIcon.size) {
1394
+ const svg = fallback.querySelector<SVGElement>('svg');
1395
+ if (svg) {
1396
+ svg.style.width = `${fallbackIcon.size}px`;
1397
+ svg.style.height = `${fallbackIcon.size}px`;
1398
+ }
1399
+ }
1633
1400
  }
1634
- fallback.style.backgroundColor =
1635
- 'var(--nl-image-fallback-background, transparent)';
1401
+ if (fallbackIcon?.backgroundColor)
1402
+ frame.style.background = fallbackBackground;
1403
+ else
1404
+ fallback.style.backgroundColor =
1405
+ 'var(--nl-image-fallback-background, transparent)';
1636
1406
  frame.prepend(fallback);
1637
1407
  };
1638
1408
  if (image) image.addEventListener('error', showFallback, { once: true });
@@ -1642,6 +1412,9 @@ function createVisual(
1642
1412
  frame.style.border =
1643
1413
  '2px dashed ' + (visual.borderColor ?? 'var(--nl-disabled)');
1644
1414
  frame.style.boxSizing = 'border-box';
1415
+ } else if ('borderColor' in visual && visual.borderColor) {
1416
+ frame.style.border = '1px solid ' + visual.borderColor;
1417
+ frame.style.boxSizing = 'border-box';
1645
1418
  }
1646
1419
  if ('overlays' in visual)
1647
1420
  visual.overlays?.forEach((overlay) => {
@@ -1671,6 +1444,16 @@ function createVisual(
1671
1444
  corner.style.lineHeight = '16px';
1672
1445
  applyTextWeight(corner, '400');
1673
1446
  }
1447
+ if (overlay.fontWeight)
1448
+ applyTextWeight(
1449
+ corner,
1450
+ {
1451
+ regular: 400,
1452
+ medium: 500,
1453
+ semibold: 600,
1454
+ bold: 700,
1455
+ }[overlay.fontWeight]
1456
+ );
1674
1457
  if (
1675
1458
  isWalletText ||
1676
1459
  overlay.width !== undefined ||
@@ -1691,7 +1474,31 @@ function createVisual(
1691
1474
  if (overlay.image) {
1692
1475
  const overlayImage = createImage(context, overlay.image);
1693
1476
  if (overlayImage) {
1477
+ if (
1478
+ (overlay.padding ?? 0) > 0 &&
1479
+ (overlay.width ?? size) === (overlay.height ?? size)
1480
+ )
1481
+ overlayImage.style.borderRadius = '50%';
1694
1482
  corner.appendChild(overlayImage);
1483
+ if (overlay.fallbackIcon) {
1484
+ overlayImage.addEventListener(
1485
+ 'error',
1486
+ () => {
1487
+ disposeWebImageRetries(overlayImage);
1488
+ overlayImage.remove();
1489
+ const glyph = createElement(
1490
+ context.document,
1491
+ 'span',
1492
+ 'ok-native-list-overlay-fallback'
1493
+ );
1494
+ applySelectorIcon(glyph, overlay.fallbackIcon!.name);
1495
+ if (overlay.fallbackIcon?.tintColor)
1496
+ glyph.style.color = overlay.fallbackIcon.tintColor;
1497
+ corner.appendChild(glyph);
1498
+ },
1499
+ { once: true }
1500
+ );
1501
+ }
1695
1502
  if (selectorPresentation)
1696
1503
  paintSelectorImageBackground(
1697
1504
  overlayImage,
@@ -1834,6 +1641,7 @@ function createIconAction(
1834
1641
  if (element.tagName === 'BUTTON') {
1835
1642
  element.setAttribute('type', 'button');
1836
1643
  element.toggleAttribute('disabled', Boolean(disabled));
1644
+ if (name === 'DotVerSolid') element.setAttribute('aria-label', '⋮');
1837
1645
  }
1838
1646
  applySelectorIcon(element, name);
1839
1647
  if (actionKey) setData(element, 'nativeListAction', actionKey);
@@ -1856,8 +1664,44 @@ function createAccessory(
1856
1664
  context: RenderContext,
1857
1665
  rowKey: string,
1858
1666
  accessory: TrailingAccessory,
1859
- slot: number
1667
+ slot: number,
1668
+ rowDisabled: boolean
1860
1669
  ): HTMLElement {
1670
+ if (accessory.kind === 'button') {
1671
+ const element = createElement(
1672
+ context.document,
1673
+ 'button',
1674
+ 'ok-native-list-trailing-button',
1675
+ accessory.label
1676
+ ) as HTMLButtonElement;
1677
+ element.type = 'button';
1678
+ element.disabled = Boolean(rowDisabled || accessory.disabled);
1679
+ element.setAttribute('aria-disabled', String(element.disabled));
1680
+ element.setAttribute(
1681
+ 'aria-label',
1682
+ accessory.accessibilityLabel ?? accessory.label
1683
+ );
1684
+ setData(element, 'testid', accessory.testID);
1685
+ setData(element, 'nativeListAction', accessory.actionKey);
1686
+ markActionAnchorSource(element, 'trailingAccessory', slot);
1687
+ if (accessory.textColor)
1688
+ element.style.setProperty('--nl-button-text', accessory.textColor);
1689
+ if (accessory.backgroundColor)
1690
+ element.style.setProperty('--nl-button-bg', accessory.backgroundColor);
1691
+ if (accessory.pressedBackgroundColor)
1692
+ element.style.setProperty(
1693
+ '--nl-button-pressed',
1694
+ accessory.pressedBackgroundColor
1695
+ );
1696
+ if (accessory.hoverBackgroundColor)
1697
+ element.style.setProperty(
1698
+ '--nl-button-hover',
1699
+ accessory.hoverBackgroundColor
1700
+ );
1701
+ if (accessory.focusRingColor)
1702
+ element.style.setProperty('--nl-button-focus', accessory.focusRingColor);
1703
+ return element;
1704
+ }
1861
1705
  if (accessory.kind === 'checkbox') {
1862
1706
  const element = createCheckbox(context, rowKey, accessory);
1863
1707
  markActionAnchorSource(element, 'trailingAccessory', slot);
@@ -1872,9 +1716,21 @@ function createAccessory(
1872
1716
  accessory.tintColor
1873
1717
  );
1874
1718
  markActionAnchorSource(element, 'trailingAccessory', slot);
1719
+ if (accessory.name === 'RefreshCcwOutline' && !accessory.actionKey) {
1720
+ element.classList.add('ok-native-list-decorative-refresh');
1721
+ const glyph = element.querySelector('svg');
1722
+ glyph?.setAttribute('width', '16');
1723
+ glyph?.setAttribute('height', '16');
1724
+ }
1725
+ if (accessory.buttonStyle === 'tertiary') {
1726
+ element.classList.add('ok-native-list-tertiary-icon');
1727
+ setData(element, 'nativeListAnchorInset', 7);
1728
+ }
1875
1729
  setData(element, 'testid', accessory.testID);
1876
1730
  if (accessory.hoverActionKey)
1877
1731
  setData(element, 'nativeListHoverAction', accessory.hoverActionKey);
1732
+ if (accessory.hoverActionKey && accessory.buttonStyle === 'tertiary')
1733
+ setData(element, 'nativeListIconHelp', true);
1878
1734
  if (accessory.accessibilityLabel)
1879
1735
  element.setAttribute('aria-label', accessory.accessibilityLabel);
1880
1736
  const row = context.snapshot.rows[context.itemIndex];
@@ -1922,6 +1778,25 @@ function createAccessory(
1922
1778
  accessory.primary
1923
1779
  );
1924
1780
  primary.style.color = toneColor(accessory.primaryTone, 'primary');
1781
+ applyValueSegments(primary, accessory.primaryTextSegments, 16, 20, 500);
1782
+ if (accessory.primaryFontWeight === 'medium')
1783
+ applyTextWeight(primary, 500);
1784
+ if (accessory.primaryHelp) {
1785
+ const help = accessory.primaryHelp;
1786
+ primary.tabIndex = 0;
1787
+ primary.setAttribute('role', 'button');
1788
+ if (help.presentation === 'tooltip') {
1789
+ setData(primary, 'nativeListHoverAction', help.actionKey);
1790
+ setData(primary, 'nativeListIconHelp', true);
1791
+ } else {
1792
+ setData(primary, 'nativeListAction', help.actionKey);
1793
+ }
1794
+ if (help.underline === 'dashed') {
1795
+ primary.style.textDecoration = 'underline dashed';
1796
+ primary.style.textUnderlineOffset = '4px';
1797
+ }
1798
+ markActionAnchorSource(primary, 'trailingAccessory', slot);
1799
+ }
1925
1800
  const secondary = createElement(
1926
1801
  context.document,
1927
1802
  'span',
@@ -1929,6 +1804,13 @@ function createAccessory(
1929
1804
  accessory.secondary
1930
1805
  );
1931
1806
  secondary.style.color = toneColor(accessory.secondaryTone, 'secondary');
1807
+ applyValueSegments(
1808
+ secondary,
1809
+ accessory.secondaryTextSegments,
1810
+ 14,
1811
+ 20,
1812
+ 400
1813
+ );
1932
1814
  element.replaceChildren(primary, '\n', secondary);
1933
1815
  element.classList.add('ok-native-list-amounts');
1934
1816
  break;
@@ -1957,11 +1839,11 @@ function createAccessory(
1957
1839
  return element;
1958
1840
  }
1959
1841
 
1960
- function rendererPrimitives(context: RenderContext) {
1842
+ function rendererPrimitives(context: RenderContext, rowDisabled: boolean) {
1961
1843
  return {
1962
1844
  background: resolvedTheme(context.snapshot).background,
1963
1845
  accessory: (key: string, descriptor: TrailingAccessory, slot: number) =>
1964
- createAccessory(context, key, descriptor, slot),
1846
+ createAccessory(context, key, descriptor, slot, rowDisabled),
1965
1847
  visual: (source: LeadingVisual | undefined, presentation?: string) =>
1966
1848
  createVisual(context, source, presentation),
1967
1849
  thumbnail: (source: ImageSource) =>
@@ -1982,7 +1864,10 @@ export function createRowBody(
1982
1864
  context: RenderContext,
1983
1865
  row: RowModel
1984
1866
  ): HTMLElement {
1985
- return rowRenderer(row).create(context.document, rendererPrimitives(context));
1867
+ return rowRenderer(row).create(
1868
+ context.document,
1869
+ rendererPrimitives(context, Boolean(row.disabled))
1870
+ );
1986
1871
  }
1987
1872
 
1988
1873
  export type NativeListWebScrollOptions = Readonly<{
@@ -2031,6 +1916,7 @@ export class NativeListWebEngine {
2031
1916
  rail: [],
2032
1917
  mediaTile: [],
2033
1918
  action: [],
1919
+ buttonGroup: [],
2034
1920
  system: [],
2035
1921
  activity: [],
2036
1922
  dataRow: [],
@@ -2074,6 +1960,7 @@ export class NativeListWebEngine {
2074
1960
  private pullDistance = 0;
2075
1961
  private virtualizationEnabled: boolean;
2076
1962
  private actionAnchor: WebActionAnchorRecord | undefined;
1963
+ private pressedHelpElement: HTMLElement | undefined;
2077
1964
  private readonly actionAnchorInstanceId = String(
2078
1965
  ++webNativeListInstanceCounter
2079
1966
  );
@@ -2094,6 +1981,39 @@ export class NativeListWebEngine {
2094
1981
  private lastViewportWidth = -1;
2095
1982
  private lastViewportHeight = -1;
2096
1983
  private destroyed = false;
1984
+ private hasAppliedSnapshot = false;
1985
+ private lastStructuralTransitionId: string | undefined;
1986
+ private structuralFrame: number | undefined;
1987
+ private structuralFinish: number | undefined;
1988
+ private structuralRevision = 0;
1989
+ private structuralAnimations: Animation[] = [];
1990
+ private structuralScrollInterrupted = false;
1991
+ private structuralRenderedHeight: number | undefined;
1992
+ private structuralTargetHeight: number | undefined;
1993
+ private reactFooterHeight = 0;
1994
+ private structuralFooterCompensation = 0;
1995
+ private structuralFooterExpansion = 0;
1996
+ private structuralFooterFromHeight = 0;
1997
+ private structuralFooterElement: HTMLElement | undefined;
1998
+ private structuralFooterStyles:
1999
+ | { marginBottom: string; transform: string; clipPath: string }
2000
+ | undefined;
2001
+ private structuralProgress = 0;
2002
+ private structuralAnchorStyles:
2003
+ | { owner: string; content: string }
2004
+ | undefined;
2005
+ private structuralContentOverflow: string | undefined;
2006
+ private structuralPrefixTransition = false;
2007
+ private structuralTail:
2008
+ | {
2009
+ snapshot: NativeListSnapshot;
2010
+ rows: readonly RowModel[];
2011
+ layout: WebListLayout;
2012
+ firstIndex: number;
2013
+ layer: HTMLElement;
2014
+ mounted: Map<number, HTMLElement>;
2015
+ }
2016
+ | undefined;
2097
2017
  private sectionIndexAlignStart = false;
2098
2018
  // Renderers report intrinsic height after browser text wrapping.
2099
2019
  private measuredRendererHeights = new Map<
@@ -2160,7 +2080,9 @@ export class NativeListWebEngine {
2160
2080
  scrollOptions.stickyInset
2161
2081
  );
2162
2082
  this.document = host.ownerDocument;
2163
- this.snapshot = validateSnapshot(snapshot);
2083
+ this.snapshot =
2084
+ containNativeListInput(() => validateSnapshot(snapshot)) ??
2085
+ emptyNativeListSnapshot();
2164
2086
  this.callbacks = callbacks;
2165
2087
  this.virtualizationEnabled = virtualizationEnabled;
2166
2088
  this.sectionIndexContainer = sectionIndexContainer ?? undefined;
@@ -2263,6 +2185,12 @@ export class NativeListWebEngine {
2263
2185
  'ok-collapsible-pager-cancel-scroll-command',
2264
2186
  this.handlePagerScrollCommandCancel
2265
2187
  );
2188
+ for (const event of ['wheel', 'pointerdown', 'touchstart'])
2189
+ (this.externalScrollHost ?? this.viewport).addEventListener(
2190
+ event,
2191
+ this.handleStructuralUserScroll,
2192
+ { passive: true }
2193
+ );
2266
2194
  this.viewport.addEventListener('scroll', this.handleScroll, {
2267
2195
  passive: true,
2268
2196
  });
@@ -2281,6 +2209,7 @@ export class NativeListWebEngine {
2281
2209
  this.root.addEventListener('pointercancel', this.handleMarketPointerEnd);
2282
2210
  // OneKey patch: preserve web tooltip hover for section titles.
2283
2211
  this.root.addEventListener('pointerover', this.handleTitlePointerOver);
2212
+ this.root.addEventListener('pointerdown', this.handleIconHelpPointerDown);
2284
2213
  this.root.addEventListener('focusin', this.handleTitlePointerOver);
2285
2214
  this.root.addEventListener('focusout', this.handleTitlePointerOut);
2286
2215
  this.root.addEventListener('pointerout', this.handleTitlePointerOut);
@@ -2357,7 +2286,7 @@ export class NativeListWebEngine {
2357
2286
  );
2358
2287
  this.observeSectionIndexTransforms();
2359
2288
  this.applyFontFamilies(fontFamiliesJson);
2360
- this.applySnapshot(this.snapshot);
2289
+ this.applyValidatedSnapshot(this.snapshot);
2361
2290
  }
2362
2291
 
2363
2292
  private validateStickyInset(value = 0): number {
@@ -2442,14 +2371,442 @@ export class NativeListWebEngine {
2442
2371
  }
2443
2372
 
2444
2373
  applySnapshot(snapshot: NativeListSnapshot) {
2445
- const validated = validateSnapshot(snapshot);
2374
+ const validated = containNativeListInput(() => {
2375
+ const next = validateSnapshot(snapshot);
2376
+ if (this.externalScrollHost && next.layout.orientation === 'horizontal')
2377
+ throw new Error('External scrolling supports vertical lists only');
2378
+ return next;
2379
+ });
2380
+ if (!validated) return;
2381
+ this.applyValidatedSnapshot(validated);
2382
+ }
2383
+
2384
+ private applyValidatedSnapshot(validated: NativeListSnapshot) {
2385
+ this.pressedHelpElement = undefined;
2386
+ this.invalidateActionAnchor('snapshot');
2387
+ const transition = validated.structuralTransition;
2388
+ const isNewTransition =
2389
+ transition !== undefined &&
2390
+ transition.id !== this.lastStructuralTransitionId;
2391
+ if (transition) this.lastStructuralTransitionId = transition.id;
2392
+ const nextRows = effectiveRows(validated);
2393
+ const changedKeys =
2394
+ this.rows.length !== nextRows.length ||
2395
+ this.rows.some((row, index) => row.key !== nextRows[index]?.key);
2396
+ const incompatibleActivePrefix =
2397
+ this.structuralPrefixTransition &&
2398
+ (validated.layout.kind !== this.snapshot.layout.kind ||
2399
+ validated.layout.orientation !== this.snapshot.layout.orientation ||
2400
+ nextRows.some(
2401
+ (row, index) =>
2402
+ row.height !== this.rows[index]?.height ||
2403
+ row.style?.container?.height !==
2404
+ this.rows[index]?.style?.container?.height
2405
+ ));
2406
+ const shouldAnimate =
2407
+ this.hasAppliedSnapshot &&
2408
+ isNewTransition &&
2409
+ changedKeys &&
2410
+ (this.snapshot.layout.kind === 'linear' ||
2411
+ this.snapshot.layout.kind === 'table') &&
2412
+ this.snapshot.layout.orientation !== 'horizontal' &&
2413
+ (validated.layout.kind === 'linear' ||
2414
+ validated.layout.kind === 'table') &&
2415
+ validated.layout.orientation !== 'horizontal' &&
2416
+ (transition?.durationMs ?? 220) > 0 &&
2417
+ !this.document.defaultView?.matchMedia?.(
2418
+ '(prefers-reduced-motion: reduce)'
2419
+ ).matches;
2420
+ if (shouldAnimate && transition)
2421
+ this.applyStructuralSnapshot(validated, transition);
2422
+ else {
2423
+ if (isNewTransition || changedKeys || incompatibleActivePrefix)
2424
+ this.cancelStructuralAnimation();
2425
+ this.setSnapshot(validated);
2426
+ }
2427
+ this.hasAppliedSnapshot = true;
2428
+ }
2429
+
2430
+ private cancelStructuralAnimation() {
2431
+ this.structuralRevision += 1;
2432
+ if (this.structuralFrame !== undefined)
2433
+ this.document.defaultView?.cancelAnimationFrame(this.structuralFrame);
2434
+ if (this.structuralFinish !== undefined)
2435
+ this.document.defaultView?.clearTimeout(this.structuralFinish);
2436
+ this.structuralFrame = undefined;
2437
+ this.structuralFinish = undefined;
2438
+ this.structuralAnimations.forEach((animation) => animation.cancel());
2439
+ this.structuralAnimations = [];
2440
+ if (this.structuralTail) {
2441
+ disposeWebImageRetries(this.structuralTail.layer);
2442
+ this.structuralTail.layer.remove();
2443
+ this.structuralTail = undefined;
2444
+ }
2445
+ if (this.structuralContentOverflow !== undefined) {
2446
+ this.content.style.overflow = this.structuralContentOverflow;
2447
+ this.structuralContentOverflow = undefined;
2448
+ }
2449
+ this.structuralPrefixTransition = false;
2450
+ if (this.structuralFooterElement && this.structuralFooterStyles) {
2451
+ this.structuralFooterElement.style.marginBottom =
2452
+ this.structuralFooterStyles.marginBottom;
2453
+ this.structuralFooterElement.style.transform =
2454
+ this.structuralFooterStyles.transform;
2455
+ this.structuralFooterElement.style.clipPath =
2456
+ this.structuralFooterStyles.clipPath;
2457
+ }
2458
+ this.structuralFooterElement = undefined;
2459
+ this.structuralFooterStyles = undefined;
2460
+ this.structuralScrollInterrupted = false;
2461
+ this.structuralRenderedHeight = undefined;
2462
+ this.structuralTargetHeight = undefined;
2463
+ this.structuralFooterCompensation = 0;
2464
+ this.structuralFooterExpansion = 0;
2465
+ this.structuralProgress = 0;
2466
+ const owner = this.externalScrollHost ?? this.viewport;
2467
+ if (this.structuralAnchorStyles) {
2468
+ owner.style.overflowAnchor = this.structuralAnchorStyles.owner;
2469
+ this.content.style.overflowAnchor = this.structuralAnchorStyles.content;
2470
+ this.structuralAnchorStyles = undefined;
2471
+ }
2472
+ }
2473
+
2474
+ private handleStructuralUserScroll = (event: Event) => {
2446
2475
  if (
2447
- this.externalScrollHost &&
2448
- validated.layout.orientation === 'horizontal'
2476
+ event.type === 'pointerdown' &&
2477
+ event.target !== (this.externalScrollHost ?? this.viewport) &&
2478
+ (event as PointerEvent).pointerType !== 'touch'
2449
2479
  )
2450
- throw new Error('External scrolling supports vertical lists only');
2451
- this.invalidateActionAnchor('snapshot');
2452
- this.setSnapshot(validated);
2480
+ return;
2481
+ this.structuralScrollInterrupted = true;
2482
+ if (this.structuralPrefixTransition) {
2483
+ this.cancelStructuralAnimation();
2484
+ this.recomputeLayout();
2485
+ }
2486
+ };
2487
+
2488
+ private updateStructuralTailWindow() {
2489
+ const tail = this.structuralTail;
2490
+ if (!tail) return;
2491
+ const visible = visibleWebLayoutItems(
2492
+ tail.layout,
2493
+ this.currentOffset(),
2494
+ this.viewportLength(),
2495
+ this.viewportLength() * OVERSCAN_VIEWPORTS
2496
+ ).filter((item) => item.index >= tail.firstIndex);
2497
+ const desired = new Set(visible.map((item) => item.index));
2498
+ tail.mounted.forEach((element, index) => {
2499
+ if (desired.has(index)) return;
2500
+ disposeWebImageRetries(element);
2501
+ element.remove();
2502
+ tail.mounted.delete(index);
2503
+ });
2504
+ visible.forEach((item) => {
2505
+ if (tail.mounted.has(item.index)) return;
2506
+ const row = tail.rows[item.index];
2507
+ if (!row) return;
2508
+ const element = createElement(
2509
+ this.document,
2510
+ 'div',
2511
+ 'ok-native-list-item'
2512
+ );
2513
+ element.setAttribute('aria-hidden', 'true');
2514
+ element.style.pointerEvents = 'none';
2515
+ element.style.opacity = String(
2516
+ (row.style?.container?.opacity ?? row.opacity ?? 1) *
2517
+ (row.disabled ? 0.5 : 1)
2518
+ );
2519
+ const body = createRowBody(
2520
+ {
2521
+ document: this.document,
2522
+ snapshot: tail.snapshot,
2523
+ selectedKeys: selectionStateFromSnapshot(tail.snapshot).selectedKeys,
2524
+ itemIndex: item.index,
2525
+ },
2526
+ row
2527
+ );
2528
+ applyRowStyle(body, row);
2529
+ element.append(body);
2530
+ this.positionElement(element, item);
2531
+ tail.layer.append(element);
2532
+ tail.mounted.set(item.index, element);
2533
+ });
2534
+ }
2535
+
2536
+ private writeStructuralHeight(height: number) {
2537
+ if (this.externalScrollHost) this.writeExternalHeight(height);
2538
+ else this.content.style.height = `${height}px`;
2539
+ }
2540
+
2541
+ private reactFooterElement() {
2542
+ return this.contentBounds?.querySelector<HTMLElement>(
2543
+ '[data-testid="native-list-footer-slot"]'
2544
+ );
2545
+ }
2546
+
2547
+ private readReactFooterHeight() {
2548
+ return this.reactFooterElement()?.getBoundingClientRect().height ?? 0;
2549
+ }
2550
+
2551
+ private applyStructuralFooterVisual(progress: number) {
2552
+ const footer = this.structuralFooterElement;
2553
+ if (!footer || this.structuralFooterExpansion <= 0) return;
2554
+ const hidden = this.structuralFooterExpansion * (1 - progress);
2555
+ footer.style.marginBottom = `${-hidden}px`;
2556
+ footer.style.transform = `translateY(${-hidden}px)`;
2557
+ footer.style.clipPath = `inset(${hidden}px 0 0 0)`;
2558
+ }
2559
+
2560
+ private applyStructuralSnapshot(
2561
+ next: NativeListSnapshot,
2562
+ transition: NonNullable<NativeListSnapshot['structuralTransition']>
2563
+ ) {
2564
+ const owner = this.externalScrollHost ?? this.viewport;
2565
+ const oldOffset = owner.scrollTop;
2566
+ const oldScrollHeight = owner.scrollHeight;
2567
+ const oldHeight =
2568
+ this.structuralRenderedHeight ??
2569
+ (this.content.getBoundingClientRect().height ||
2570
+ this.layout.contentHeight);
2571
+ const nextFooterHeight = this.readReactFooterHeight();
2572
+ const oldFooterHeight =
2573
+ this.structuralRenderedHeight === undefined
2574
+ ? this.reactFooterHeight
2575
+ : this.structuralFooterFromHeight +
2576
+ (this.reactFooterHeight - this.structuralFooterFromHeight) *
2577
+ this.structuralProgress;
2578
+ const footerDifference = oldFooterHeight - nextFooterHeight;
2579
+ const startHeight = oldHeight + Math.max(0, footerDifference);
2580
+ const oldSnapshot = this.snapshot;
2581
+ const oldRows = this.rows;
2582
+ const oldLayout = this.layout;
2583
+ const oldItems = oldLayout.items;
2584
+ const nextRows = effectiveRows(next);
2585
+ const prefixCount = Math.min(oldRows.length, nextRows.length);
2586
+ const prefixTailChange =
2587
+ oldSnapshot.layout.kind === next.layout.kind &&
2588
+ oldSnapshot.layout.orientation === next.layout.orientation &&
2589
+ oldRows.length !== nextRows.length &&
2590
+ oldRows
2591
+ .slice(0, prefixCount)
2592
+ .every((row, index) => row.key === nextRows[index]?.key);
2593
+ const oldPositions = new Map<string, number>();
2594
+ this.mounted.forEach((element, index) => {
2595
+ const row = this.rows[index];
2596
+ if (row) oldPositions.set(row.key, element.getBoundingClientRect().top);
2597
+ });
2598
+ const nextKeys = new Set(effectiveRows(next).map((row) => row.key));
2599
+ const visibleOffset = this.currentOffset();
2600
+ const visibleSurvivor = oldItems.find(
2601
+ (item) => item.y + item.height > visibleOffset && nextKeys.has(item.key)
2602
+ );
2603
+ const anchor = visibleSurvivor;
2604
+ this.cancelStructuralAnimation();
2605
+ this.structuralScrollInterrupted = false;
2606
+ this.structuralAnchorStyles = {
2607
+ owner: owner.style.overflowAnchor,
2608
+ content: this.content.style.overflowAnchor,
2609
+ };
2610
+ owner.style.overflowAnchor = 'none';
2611
+ this.content.style.overflowAnchor = 'none';
2612
+ this.structuralContentOverflow = this.content.style.overflow;
2613
+ if (prefixTailChange) this.content.style.overflow = 'clip';
2614
+ this.structuralRenderedHeight = startHeight;
2615
+ this.structuralFooterFromHeight = oldFooterHeight;
2616
+ this.structuralFooterCompensation = Math.max(0, footerDifference);
2617
+ this.structuralFooterExpansion = Math.max(0, -footerDifference);
2618
+ this.structuralProgress = 0;
2619
+ this.reactFooterHeight = nextFooterHeight;
2620
+ this.structuralFooterElement = this.reactFooterElement() ?? undefined;
2621
+ if (this.structuralFooterElement) {
2622
+ const style = this.structuralFooterElement.style;
2623
+ this.structuralFooterStyles = {
2624
+ marginBottom: style.marginBottom,
2625
+ transform: style.transform,
2626
+ clipPath: style.clipPath,
2627
+ };
2628
+ this.applyStructuralFooterVisual(0);
2629
+ }
2630
+ this.setSnapshot(next);
2631
+ const newHeight = this.layout.contentHeight;
2632
+ this.structuralTargetHeight = newHeight;
2633
+ const stablePrefixGeometry =
2634
+ prefixTailChange &&
2635
+ oldItems.length === oldRows.length &&
2636
+ this.layout.items.length === nextRows.length &&
2637
+ oldItems.slice(0, prefixCount).every((item, index) => {
2638
+ const nextItem = this.layout.items[index];
2639
+ return (
2640
+ nextItem?.y === item.y &&
2641
+ nextItem?.height === item.height &&
2642
+ nextItem?.width === item.width
2643
+ );
2644
+ });
2645
+ if (!stablePrefixGeometry) {
2646
+ this.content.style.overflow = this.structuralContentOverflow;
2647
+ this.structuralContentOverflow = undefined;
2648
+ } else {
2649
+ this.structuralPrefixTransition = true;
2650
+ }
2651
+ if (stablePrefixGeometry && nextRows.length < oldRows.length) {
2652
+ const layer = createElement(
2653
+ this.document,
2654
+ 'div',
2655
+ 'ok-native-list-structural-tail'
2656
+ );
2657
+ layer.setAttribute('aria-hidden', 'true');
2658
+ layer.setAttribute('inert', '');
2659
+ Object.assign(layer.style, {
2660
+ position: 'absolute',
2661
+ inset: '0',
2662
+ pointerEvents: 'none',
2663
+ });
2664
+ this.content.append(layer);
2665
+ this.structuralTail = {
2666
+ snapshot: oldSnapshot,
2667
+ rows: oldRows,
2668
+ layout: oldLayout,
2669
+ firstIndex: prefixCount,
2670
+ layer,
2671
+ mounted: new Map(),
2672
+ };
2673
+ this.updateStructuralTailWindow();
2674
+ }
2675
+ const nextAnchor =
2676
+ anchor && this.layout.items.find((item) => item.key === anchor.key);
2677
+ const delta = nextAnchor && anchor ? nextAnchor.y - anchor.y : 0;
2678
+ let finalScrollHeight = oldScrollHeight + newHeight - oldHeight;
2679
+ if (stablePrefixGeometry && this.externalScrollHost) {
2680
+ const beforeMeasure = owner.scrollTop;
2681
+ const tailLayer = this.structuralTail?.layer;
2682
+ if (tailLayer) tailLayer.style.display = 'none';
2683
+ this.writeStructuralHeight(newHeight);
2684
+ this.applyStructuralFooterVisual(1);
2685
+ finalScrollHeight = owner.scrollHeight;
2686
+ this.writeStructuralHeight(startHeight);
2687
+ this.applyStructuralFooterVisual(0);
2688
+ if (tailLayer) tailLayer.style.display = '';
2689
+ owner.scrollTop = beforeMeasure;
2690
+ }
2691
+ const finalMaxOffset = Math.max(0, finalScrollHeight - owner.clientHeight);
2692
+ let targetOffset = Math.max(0, Math.min(oldOffset + delta, finalMaxOffset));
2693
+ if (
2694
+ !visibleSurvivor &&
2695
+ transition.anchorKey &&
2696
+ !(stablePrefixGeometry && nextRows.length > oldRows.length)
2697
+ ) {
2698
+ const fallback = this.layout.items.find(
2699
+ (item) => item.key === transition.anchorKey
2700
+ );
2701
+ if (fallback) {
2702
+ const pagerStickyInset = Number.parseFloat(
2703
+ this.externalScrollHost?.style.getPropertyValue(
2704
+ '--ok-collapsible-pager-sticky-inset'
2705
+ ) ?? ''
2706
+ );
2707
+ const effectiveStickyInset = Math.max(
2708
+ this.externalStickyInset,
2709
+ Number.isFinite(pagerStickyInset) ? pagerStickyInset : 0
2710
+ );
2711
+ const fallbackTop = this.externalScrollHost
2712
+ ? this.externalGeometry().origin + fallback.y - effectiveStickyInset
2713
+ : resolveWebCollapsiblePagerRawOffset(
2714
+ Math.max(0, fallback.y - this.collapsiblePagerInsets().sticky),
2715
+ this.collapsiblePagerInsets().header
2716
+ );
2717
+ if (
2718
+ stablePrefixGeometry &&
2719
+ this.externalScrollHost &&
2720
+ this.reactFooterHeight > 0
2721
+ ) {
2722
+ const footerTop = this.externalGeometry().origin + newHeight;
2723
+ const footerStart = Math.max(
2724
+ 0,
2725
+ footerTop + this.reactFooterHeight - owner.clientHeight
2726
+ );
2727
+ const footerEnd = Math.max(0, footerTop - effectiveStickyInset);
2728
+ const nearestVisibleOffset =
2729
+ footerStart <= footerEnd
2730
+ ? Math.max(footerStart, Math.min(oldOffset, footerEnd))
2731
+ : footerEnd;
2732
+ targetOffset = Math.max(
2733
+ 0,
2734
+ Math.min(nearestVisibleOffset, finalMaxOffset)
2735
+ );
2736
+ } else {
2737
+ targetOffset = Math.min(targetOffset, Math.max(0, fallbackTop));
2738
+ }
2739
+ }
2740
+ }
2741
+ const duration = transition.durationMs ?? 220;
2742
+ const easing = 'cubic-bezier(0.42, 0, 0.58, 1)';
2743
+ this.mounted.forEach((element, index) => {
2744
+ const row = this.rows[index];
2745
+ const previousTop = row && oldPositions.get(row.key);
2746
+ if (previousTop === undefined || typeof element.animate !== 'function')
2747
+ return;
2748
+ const offset = previousTop - element.getBoundingClientRect().top;
2749
+ if (Math.abs(offset) < 0.5) return;
2750
+ this.structuralAnimations.push(
2751
+ element.animate(
2752
+ [
2753
+ { transform: `translateY(${offset}px)` },
2754
+ { transform: 'translateY(0)' },
2755
+ ],
2756
+ { duration, easing }
2757
+ )
2758
+ );
2759
+ });
2760
+ const startedAt =
2761
+ this.document.defaultView?.performance.now() ?? Date.now();
2762
+ const revision = this.structuralRevision;
2763
+ const finish = () => {
2764
+ if (this.destroyed || revision !== this.structuralRevision) return;
2765
+ const ownsScroll = !this.structuralScrollInterrupted;
2766
+ this.cancelStructuralAnimation();
2767
+ this.recomputeLayout();
2768
+ if (stablePrefixGeometry && ownsScroll) {
2769
+ owner.scrollTop = Math.max(
2770
+ 0,
2771
+ Math.min(targetOffset, owner.scrollHeight - owner.clientHeight)
2772
+ );
2773
+ }
2774
+ };
2775
+ const step = (time: number) => {
2776
+ if (this.destroyed || revision !== this.structuralRevision) return;
2777
+ if (
2778
+ this.structuralPrefixTransition &&
2779
+ this.document.defaultView?.matchMedia?.(
2780
+ '(prefers-reduced-motion: reduce)'
2781
+ ).matches
2782
+ ) {
2783
+ finish();
2784
+ return;
2785
+ }
2786
+ const progress = Math.min(1, (time - startedAt) / duration);
2787
+ const eased = progress * progress * (3 - 2 * progress);
2788
+ this.structuralProgress = eased;
2789
+ const renderedHeight =
2790
+ oldHeight +
2791
+ ((this.structuralTargetHeight ?? newHeight) - oldHeight) * eased +
2792
+ this.structuralFooterCompensation * (1 - eased);
2793
+ this.structuralRenderedHeight = renderedHeight;
2794
+ this.writeStructuralHeight(renderedHeight);
2795
+ this.applyStructuralFooterVisual(eased);
2796
+ if (!this.structuralScrollInterrupted)
2797
+ owner.scrollTop = oldOffset + (targetOffset - oldOffset) * eased;
2798
+ this.externalGeometryCache = undefined;
2799
+ this.updateStructuralTailWindow();
2800
+ if (progress < 1)
2801
+ this.structuralFrame =
2802
+ this.document.defaultView?.requestAnimationFrame(step);
2803
+ };
2804
+ this.structuralFrame =
2805
+ this.document.defaultView?.requestAnimationFrame(step);
2806
+ this.structuralFinish = this.document.defaultView?.setTimeout(
2807
+ finish,
2808
+ duration + 40
2809
+ );
2453
2810
  }
2454
2811
 
2455
2812
  currentContentHeight(): number {
@@ -2461,14 +2818,19 @@ export class NativeListWebEngine {
2461
2818
  }
2462
2819
 
2463
2820
  applyPatches(patches: readonly RowPatch[]) {
2464
- if (patches.length === 0) return;
2465
- const next = applyRowPatches(this.snapshot, patches);
2821
+ const accepted = containNativeListInput(() =>
2822
+ applyValidatedRowPatches(this.snapshot, patches)
2823
+ );
2824
+ if (!accepted || accepted.patches.length === 0) return;
2825
+ patches = accepted.patches;
2826
+ const next = accepted.snapshot;
2466
2827
  const selection = new Set(this.selectedKeys);
2467
2828
  patches.forEach((patch) => {
2468
2829
  const selected =
2469
2830
  'selected' in patch.changes ? patch.changes.selected : undefined;
2470
2831
  if (selected === true) selection.add(patch.key);
2471
- else if (selected === false) selection.delete(patch.key);
2832
+ else if (selected === false || selected === null)
2833
+ selection.delete(patch.key);
2472
2834
  });
2473
2835
  const tableValuesOnly = patches.every((patch) => {
2474
2836
  const index = this.rows.findIndex((row) => row.key === patch.key);
@@ -2646,6 +3008,8 @@ export class NativeListWebEngine {
2646
3008
 
2647
3009
  destroy() {
2648
3010
  if (this.destroyed) return;
3011
+ this.cancelStructuralAnimation();
3012
+ this.pressedHelpElement = undefined;
2649
3013
  this.invalidateActionAnchor('destroy');
2650
3014
  this.destroyed = true;
2651
3015
  if (this.frameHandle !== undefined) this.cancelFrame(this.frameHandle);
@@ -2673,6 +3037,11 @@ export class NativeListWebEngine {
2673
3037
  'ok-collapsible-pager-cancel-scroll-command',
2674
3038
  this.handlePagerScrollCommandCancel
2675
3039
  );
3040
+ for (const event of ['wheel', 'pointerdown', 'touchstart'])
3041
+ (this.externalScrollHost ?? this.viewport).removeEventListener(
3042
+ event,
3043
+ this.handleStructuralUserScroll
3044
+ );
2676
3045
  this.viewport.removeEventListener('scroll', this.handleScroll);
2677
3046
  (this.externalScrollHost ?? this.viewport).removeEventListener(
2678
3047
  'ok-collapsible-pager-insets-changed',
@@ -2687,6 +3056,10 @@ export class NativeListWebEngine {
2687
3056
  this.root.removeEventListener('pointerup', this.handleMarketPointerEnd);
2688
3057
  this.root.removeEventListener('pointercancel', this.handleMarketPointerEnd);
2689
3058
  this.root.removeEventListener('pointerover', this.handleTitlePointerOver);
3059
+ this.root.removeEventListener(
3060
+ 'pointerdown',
3061
+ this.handleIconHelpPointerDown
3062
+ );
2690
3063
  this.root.removeEventListener('focusin', this.handleTitlePointerOver);
2691
3064
  this.root.removeEventListener('focusout', this.handleTitlePointerOut);
2692
3065
  this.root.removeEventListener('pointerout', this.handleTitlePointerOut);
@@ -2749,6 +3122,7 @@ export class NativeListWebEngine {
2749
3122
  selectedKeys?: ReadonlySet<string>
2750
3123
  ) {
2751
3124
  this.cancelMarketPointer();
3125
+ this.pressedHelpElement = undefined;
2752
3126
  this.measuredRendererHeights.clear();
2753
3127
  this.snapshot = snapshot;
2754
3128
  this.rows = effectiveRows(snapshot);
@@ -2769,6 +3143,7 @@ export class NativeListWebEngine {
2769
3143
  '--nl-row': theme.rowBackground,
2770
3144
  '--nl-selected': theme.rowSelectedBackground,
2771
3145
  '--nl-pressed': theme.rowPressedBackground,
3146
+ '--nl-hover': theme.rowHoverBackground ?? theme.rowPressedBackground,
2772
3147
  '--nl-subdued': theme.subduedBackground,
2773
3148
  '--nl-strong': theme.strongBackground,
2774
3149
  '--nl-image-fallback-background':
@@ -2786,11 +3161,15 @@ export class NativeListWebEngine {
2786
3161
  '--nl-separator': theme.separator,
2787
3162
  '--nl-accent': theme.accent,
2788
3163
  '--nl-positive': theme.positive,
3164
+ '--nl-success-background': theme.successBackground,
2789
3165
  '--nl-negative': theme.negative,
2790
3166
  '--nl-critical': theme.criticalBackground,
2791
3167
  '--nl-inverse': theme.inverseBackground,
2792
3168
  '--nl-inverse-text': theme.inverseText,
2793
3169
  '--nl-info': theme.info,
3170
+ '--nl-media-shine': isDarkBackground(theme.background)
3171
+ ? 'rgba(255,255,255,0.07)'
3172
+ : 'rgba(255,255,255,0.75)',
2794
3173
  };
2795
3174
  Object.entries(values).forEach(([name, value]) => {
2796
3175
  if (!value) return;
@@ -2873,13 +3252,37 @@ export class NativeListWebEngine {
2873
3252
 
2874
3253
  private recomputeLayout = () => {
2875
3254
  if (this.destroyed) return;
3255
+ if (
3256
+ this.structuralPrefixTransition &&
3257
+ this.lastViewportWidth > 0 &&
3258
+ this.viewport.clientWidth > 0 &&
3259
+ this.viewport.clientWidth !== this.lastViewportWidth
3260
+ )
3261
+ this.cancelStructuralAnimation();
3262
+ if (this.structuralRenderedHeight === undefined)
3263
+ this.reactFooterHeight = this.readReactFooterHeight();
3264
+ else {
3265
+ const nextFooterHeight = this.readReactFooterHeight();
3266
+ const footerDelta = this.reactFooterHeight - nextFooterHeight;
3267
+ if (footerDelta !== 0) {
3268
+ this.reactFooterHeight = nextFooterHeight;
3269
+ const priorCompensation = this.structuralFooterCompensation;
3270
+ const difference = this.structuralFooterFromHeight - nextFooterHeight;
3271
+ this.structuralFooterCompensation = Math.max(0, difference);
3272
+ this.structuralFooterExpansion = Math.max(0, -difference);
3273
+ this.structuralRenderedHeight +=
3274
+ (this.structuralFooterCompensation - priorCompensation) *
3275
+ (1 - this.structuralProgress);
3276
+ this.applyStructuralFooterVisual(this.structuralProgress);
3277
+ }
3278
+ }
2876
3279
  const cachedWidth = this.lastViewportWidth;
2877
3280
  const cachedHeight = this.lastViewportHeight;
2878
3281
  const precomputedLayout =
2879
3282
  this.externalScrollHost && cachedWidth > 0 && cachedHeight > 0
2880
3283
  ? this.computeLayout(cachedWidth, cachedHeight)
2881
3284
  : undefined;
2882
- if (precomputedLayout) {
3285
+ if (precomputedLayout && this.structuralRenderedHeight === undefined) {
2883
3286
  // Commit appended row extent before measuring React-owned slot changes.
2884
3287
  this.writeExternalHeight(
2885
3288
  Math.max(this.layout.contentHeight, precomputedLayout.contentHeight)
@@ -2932,11 +3335,15 @@ export class NativeListWebEngine {
2932
3335
  ? precomputedLayout
2933
3336
  : this.computeLayout(viewportWidth, viewportHeight);
2934
3337
  this.content.style.width = String(this.layout.contentWidth) + 'px';
2935
- this.content.style.height = String(this.layout.contentHeight) + 'px';
3338
+ const renderedHeight =
3339
+ this.structuralRenderedHeight ?? this.layout.contentHeight;
3340
+ this.content.style.height = String(renderedHeight) + 'px';
2936
3341
  if (this.externalScrollHost) {
2937
- this.writeExternalHeight(this.layout.contentHeight);
3342
+ this.writeExternalHeight(renderedHeight);
2938
3343
  this.externalGeometryCache = undefined;
2939
3344
  }
3345
+ if (this.structuralRenderedHeight !== undefined)
3346
+ this.structuralTargetHeight = this.layout.contentHeight;
2940
3347
  this.renderSectionIndex(
2941
3348
  this.viewport.clientHeight <= 0
2942
3349
  ? DEFAULT_VIEWPORT_HEIGHT
@@ -3097,6 +3504,7 @@ export class NativeListWebEngine {
3097
3504
  }
3098
3505
  this.updateVisibleSelection();
3099
3506
  this.updateVisibleState();
3507
+ this.updateStructuralTailWindow();
3100
3508
  }
3101
3509
 
3102
3510
  private positionElement(element: HTMLElement, item: WebLayoutItem) {
@@ -3175,7 +3583,7 @@ export class NativeListWebEngine {
3175
3583
  const body = reusableBody ?? createRowBody(context, row);
3176
3584
  if (reusableBody) {
3177
3585
  resetRowContainerStyle(body);
3178
- registered.bind(body, rendererPrimitives(context));
3586
+ registered.bind(body, rendererPrimitives(context, Boolean(row.disabled)));
3179
3587
  }
3180
3588
  // OneKey patch: explicit selector fields preserve original page geometry.
3181
3589
  element.style.contain = row.backgroundFullWidth ? 'layout style' : '';
@@ -3967,6 +4375,8 @@ export class NativeListWebEngine {
3967
4375
  }
3968
4376
 
3969
4377
  private invalidateActionAnchorForElement(element: HTMLElement) {
4378
+ if (this.pressedHelpElement && element.contains(this.pressedHelpElement))
4379
+ this.pressedHelpElement = undefined;
3970
4380
  const anchor = this.actionAnchor;
3971
4381
  if (
3972
4382
  anchor &&
@@ -4079,9 +4489,13 @@ export class NativeListWebEngine {
4079
4489
  '[data-native-list-row-key]'
4080
4490
  );
4081
4491
  const row = this.rowAtElement(rowElement);
4082
- if (row?.type !== 'market' || !isRowPressEnabled(row)) return;
4492
+ if (
4493
+ (row?.type !== 'market' && row?.type !== 'identity') ||
4494
+ !isRowPressEnabled(row)
4495
+ )
4496
+ return;
4083
4497
  this.cancelMarketPointer();
4084
- if (row.pressInActionKey)
4498
+ if (row.type === 'market' && row.pressInActionKey)
4085
4499
  this.emitRowAction(
4086
4500
  row,
4087
4501
  row.pressInActionKey,
@@ -4100,7 +4514,7 @@ export class NativeListWebEngine {
4100
4514
  !rowElement.isConnected ||
4101
4515
  rowElement.dataset.nativeListBindingEpoch !== bindingEpoch ||
4102
4516
  currentRow?.key !== row.key ||
4103
- currentRow.type !== 'market' ||
4517
+ (currentRow.type !== 'market' && currentRow.type !== 'identity') ||
4104
4518
  !isRowPressEnabled(currentRow) ||
4105
4519
  !currentRow.longPressActionKey
4106
4520
  )
@@ -4118,7 +4532,7 @@ export class NativeListWebEngine {
4118
4532
  this.marketPointer = {
4119
4533
  pointerId: event.pointerId,
4120
4534
  pointerType: event.pointerType,
4121
- compact: !row.webTable,
4535
+ compact: row.type === 'identity' || !row.webTable,
4122
4536
  rowKey: row.key,
4123
4537
  startX: event.clientX,
4124
4538
  startY: event.clientY,
@@ -4186,11 +4600,23 @@ export class NativeListWebEngine {
4186
4600
  action.contains(event.relatedTarget))
4187
4601
  )
4188
4602
  return;
4603
+ if (action.dataset.nativeListIconHelp === 'true') {
4604
+ if (
4605
+ event.type === 'pointerover' &&
4606
+ (event as PointerEvent).pointerType === 'touch'
4607
+ )
4608
+ return;
4609
+ if (this.pressedHelpElement === action) return;
4610
+ }
4189
4611
  if (
4190
4612
  action.classList.contains('ok-native-list-market-subtitle-prefix') &&
4191
4613
  action.scrollWidth <= action.clientWidth + 1
4192
4614
  )
4193
4615
  return;
4616
+ this.emitHoverAction(action);
4617
+ };
4618
+
4619
+ private emitHoverAction(action: HTMLElement) {
4194
4620
  const rowElement = action.closest<HTMLElement>(
4195
4621
  '[data-native-list-row-key]'
4196
4622
  );
@@ -4212,6 +4638,24 @@ export class NativeListWebEngine {
4212
4638
  // WalletGroup), not the enclosing row's `disabled`.
4213
4639
  if (sourceRow && !sourceRow.disabled && actionKey)
4214
4640
  this.emitRowAction(sourceRow, actionKey, action, rowElement ?? undefined);
4641
+ }
4642
+
4643
+ private handleIconHelpPointerDown = (event: PointerEvent) => {
4644
+ const target = event.target;
4645
+ if (!(target instanceof Element)) return;
4646
+ const action = target.closest<HTMLElement>(
4647
+ '[data-native-list-icon-help="true"]'
4648
+ );
4649
+ if (!action) return;
4650
+ if (event.pointerType === 'touch') {
4651
+ if (this.actionAnchor?.actionElement === action && this.actionAnchor.open)
4652
+ this.invalidateActionAnchor('pointerLeave');
4653
+ else this.emitHoverAction(action);
4654
+ } else {
4655
+ this.pressedHelpElement = action;
4656
+ if (this.actionAnchor?.actionElement === action)
4657
+ this.invalidateActionAnchor('pointerLeave');
4658
+ }
4215
4659
  };
4216
4660
 
4217
4661
  private handleTitlePointerOut = (event: PointerEvent | FocusEvent) => {
@@ -4226,6 +4670,14 @@ export class NativeListWebEngine {
4226
4670
  action.contains(event.relatedTarget))
4227
4671
  )
4228
4672
  return;
4673
+ if (
4674
+ action.dataset.nativeListIconHelp === 'true' &&
4675
+ event.type === 'pointerout' &&
4676
+ (event as PointerEvent).pointerType === 'touch'
4677
+ )
4678
+ return;
4679
+ if (event.type === 'pointerout' && this.pressedHelpElement === action)
4680
+ this.pressedHelpElement = undefined;
4229
4681
  if (this.actionAnchor?.actionElement === action)
4230
4682
  this.invalidateActionAnchor('pointerLeave');
4231
4683
  };
@@ -4239,6 +4691,11 @@ export class NativeListWebEngine {
4239
4691
  }
4240
4692
  const target = event.target;
4241
4693
  if (!(target instanceof Element)) return;
4694
+ if (target.closest('[data-native-list-icon-help="true"]')) {
4695
+ event.preventDefault();
4696
+ event.stopPropagation();
4697
+ return;
4698
+ }
4242
4699
  const rowElement = target.closest<HTMLElement>(
4243
4700
  '[data-native-list-row-key]'
4244
4701
  );
@@ -4259,6 +4716,10 @@ export class NativeListWebEngine {
4259
4716
  // member press is blocked by `isRowPressEnabled` in `handleRowPress`.
4260
4717
  const action = target.closest<HTMLElement>('[data-native-list-action]');
4261
4718
  if (action) {
4719
+ if (action.tagName === 'BUTTON' && action.hasAttribute('disabled'))
4720
+ return;
4721
+ if (action.classList.contains('ok-native-list-trailing-button'))
4722
+ event.stopPropagation();
4262
4723
  const scope = action.dataset.selectionScope;
4263
4724
  if (scope === 'row') this.activateSelection({ scope: 'row' }, row);
4264
4725
  else if (scope === 'section' && action.dataset.selectionKey)
@@ -4284,6 +4745,19 @@ export class NativeListWebEngine {
4284
4745
  };
4285
4746
 
4286
4747
  private handleKeyDown = (event: KeyboardEvent) => {
4748
+ if (
4749
+ (event.key === 'Enter' || event.key === ' ') &&
4750
+ event.target instanceof HTMLElement &&
4751
+ event.target.matches('[role="button"][data-native-list-hover-action]')
4752
+ ) {
4753
+ event.preventDefault();
4754
+ if (
4755
+ this.actionAnchor?.actionElement !== event.target ||
4756
+ !this.actionAnchor.open
4757
+ )
4758
+ this.emitHoverAction(event.target);
4759
+ return;
4760
+ }
4287
4761
  // OneKey patch: non-button title help supports keyboard activation.
4288
4762
  if (
4289
4763
  (event.key === 'Enter' || event.key === ' ') &&
@@ -4421,6 +4895,7 @@ export class NativeListWebEngine {
4421
4895
 
4422
4896
  private handleScroll = () => {
4423
4897
  this.externalGeometryCache = undefined;
4898
+ this.pressedHelpElement = undefined;
4424
4899
  this.cancelMarketPointer();
4425
4900
  this.invalidateActionAnchor('scroll');
4426
4901
  this.scheduleFrame();