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

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (148) hide show
  1. package/android/src/main/java/com/onekey/nativelist/HybridNativeList.kt +14 -1
  2. package/android/src/main/java/com/onekey/nativelist/NativeListAccessoryStack.kt +245 -9
  3. package/android/src/main/java/com/onekey/nativelist/NativeListActivityDetailsView.kt +35 -7
  4. package/android/src/main/java/com/onekey/nativelist/NativeListActivityRenderer.kt +25 -3
  5. package/android/src/main/java/com/onekey/nativelist/NativeListAdapter.kt +17 -1
  6. package/android/src/main/java/com/onekey/nativelist/NativeListButtonGroupRenderer.kt +102 -0
  7. package/android/src/main/java/com/onekey/nativelist/NativeListContainerSlotAdapter.kt +12 -0
  8. package/android/src/main/java/com/onekey/nativelist/NativeListDataRowRenderer.kt +102 -7
  9. package/android/src/main/java/com/onekey/nativelist/NativeListIdentityRenderer.kt +225 -11
  10. package/android/src/main/java/com/onekey/nativelist/NativeListLeadingVisual.kt +147 -33
  11. package/android/src/main/java/com/onekey/nativelist/NativeListMarketRenderer.kt +92 -28
  12. package/android/src/main/java/com/onekey/nativelist/NativeListMessageRenderer.kt +25 -0
  13. package/android/src/main/java/com/onekey/nativelist/NativeListModels.kt +149 -3
  14. package/android/src/main/java/com/onekey/nativelist/NativeListPrimitives.kt +51 -0
  15. package/android/src/main/java/com/onekey/nativelist/NativeListRendererRegistry.kt +2 -0
  16. package/android/src/main/java/com/onekey/nativelist/NativeListRendererRowView.kt +2 -0
  17. package/android/src/main/java/com/onekey/nativelist/NativeListResolvedText.kt +3 -2
  18. package/android/src/main/java/com/onekey/nativelist/NativeListSectionHeaderRenderer.kt +69 -0
  19. package/android/src/main/java/com/onekey/nativelist/NativeListTextView.kt +55 -1
  20. package/android/src/main/java/com/onekey/nativelist/NativeListView.kt +1953 -117
  21. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListActivityHostClipPolicyTest.kt +35 -0
  22. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListIdentityTrailingAxisTest.kt +36 -0
  23. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListLeadingSlotFrameTest.kt +68 -0
  24. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListLeadingVisualClipPolicyTest.kt +44 -0
  25. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListPressPolicyTest.kt +10 -0
  26. package/docs/ROW_TEMPLATES.md +70 -11
  27. package/docs/SPEC.md +1235 -20
  28. package/docs/STYLE_SPEC.md +6 -0
  29. package/ios/HybridNativeList.swift +21 -2
  30. package/ios/NativeListAccessoryStack.swift +235 -39
  31. package/ios/NativeListActivityDetailsView.swift +30 -11
  32. package/ios/NativeListActivityRenderer.swift +8 -2
  33. package/ios/NativeListButtonGroupRenderer.swift +89 -0
  34. package/ios/NativeListDataRowRenderer.swift +155 -27
  35. package/ios/NativeListDesignAssets.swift +9 -0
  36. package/ios/NativeListIdentityRenderer.swift +239 -31
  37. package/ios/NativeListLeadingVisual.swift +119 -22
  38. package/ios/NativeListMarketRenderer.swift +113 -18
  39. package/ios/NativeListMessageRenderer.swift +34 -1
  40. package/ios/NativeListModels.swift +42 -2
  41. package/ios/NativeListRendererRegistry.swift +1 -0
  42. package/ios/NativeListResolvedText.swift +2 -1
  43. package/ios/NativeListRowHost.swift +14 -0
  44. package/ios/NativeListSectionHeaderRenderer.swift +88 -0
  45. package/ios/RNCNativeListView.swift +1052 -58
  46. package/ios/Resources/NativeListIcons.xcassets/onekey_crypto_coin_outline.imageset/Contents.json +15 -0
  47. package/ios/Resources/NativeListIcons.xcassets/onekey_crypto_coin_outline.imageset/icon.svg +4 -0
  48. package/ios/Resources/NativeListIcons.xcassets/onekey_document2.imageset/Contents.json +1 -0
  49. package/ios/Resources/NativeListIcons.xcassets/onekey_document2.imageset/icon.svg +1 -0
  50. package/ios/Resources/NativeListIcons.xcassets/onekey_dot_ver_solid.imageset/Contents.json +1 -0
  51. package/ios/Resources/NativeListIcons.xcassets/onekey_dot_ver_solid.imageset/icon.svg +1 -0
  52. package/ios/Resources/NativeListIcons.xcassets/onekey_gas_solid.imageset/Contents.json +15 -0
  53. package/ios/Resources/NativeListIcons.xcassets/onekey_gas_solid.imageset/icon.svg +3 -0
  54. package/ios/Resources/NativeListIcons.xcassets/onekey_plus_large.imageset/Contents.json +1 -0
  55. package/ios/Resources/NativeListIcons.xcassets/onekey_plus_large.imageset/icon.svg +1 -0
  56. package/ios/Resources/NativeListIcons.xcassets/onekey_refresh_ccw_outline.imageset/Contents.json +15 -0
  57. package/ios/Resources/NativeListIcons.xcassets/onekey_refresh_ccw_outline.imageset/icon.svg +3 -0
  58. package/ios/Resources/NativeListIcons.xcassets/onekey_ticket.imageset/Contents.json +1 -0
  59. package/ios/Resources/NativeListIcons.xcassets/onekey_ticket.imageset/icon.svg +1 -0
  60. package/ios/Resources/NativeListIcons.xcassets/onekey_wallet.imageset/Contents.json +1 -0
  61. package/ios/Resources/NativeListIcons.xcassets/onekey_wallet.imageset/icon.svg +1 -0
  62. package/ios/tests/NativeListAccessoryStackTests.swift +89 -0
  63. package/ios/tests/NativeListActivityPresentationTests.swift +153 -0
  64. package/ios/tests/NativeListIdentityTitleIconLayoutTests.swift +81 -0
  65. package/ios/tests/NativeListLeadingVisualPairBackdropTests.swift +50 -0
  66. package/ios/tests/NativeListLifecycleTests.swift +2789 -3
  67. package/ios/tests/NativeListMarketMetricsTests.swift +117 -0
  68. package/lib/module/NativeList.js +223 -36
  69. package/lib/module/NativeList.web.js +260 -33
  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 +1386 -81
  74. package/lib/module/web/NativeListWebEngine.js +914 -80
  75. package/lib/module/web/templates/ActivityRowRenderer.js +487 -7
  76. package/lib/module/web/templates/ButtonGroupRowRenderer.js +47 -0
  77. package/lib/module/web/templates/DataRowRenderer.js +40 -5
  78. package/lib/module/web/templates/IdentityRowRenderer.js +145 -5
  79. package/lib/module/web/templates/MarketRowRenderer.js +8 -3
  80. package/lib/module/web/templates/MarketTableRowRenderer.js +577 -0
  81. package/lib/module/web/templates/MediaTileRowRenderer.js +260 -5
  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 +8 -3
  85. package/lib/module/web/templates/SectionHeaderRowRenderer.js +70 -3
  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 +29 -1
  102. package/lib/typescript/src/NativeList.web.d.ts +2 -2
  103. package/lib/typescript/src/index.d.ts +2 -2
  104. package/lib/typescript/src/models.d.ts +196 -17
  105. package/lib/typescript/src/validation.d.ts +20 -0
  106. package/lib/typescript/src/web/NativeListWebEngine.d.ts +58 -1
  107. package/lib/typescript/src/web/templates/ActivityRowRenderer.d.ts +3 -3
  108. package/lib/typescript/src/web/templates/ButtonGroupRowRenderer.d.ts +14 -0
  109. package/lib/typescript/src/web/templates/IdentityRowRenderer.d.ts +1 -1
  110. package/lib/typescript/src/web/templates/MarketTableRowRenderer.d.ts +17 -0
  111. package/lib/typescript/src/web/templates/MediaTileRowRenderer.d.ts +3 -3
  112. package/lib/typescript/src/web/templates/MessageRowRenderer.d.ts +10 -4
  113. package/lib/typescript/src/web/templates/RowRendererRegistry.d.ts +3 -1
  114. package/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +26 -0
  115. package/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +4 -0
  116. package/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +10 -0
  117. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +20 -0
  118. package/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +14 -0
  119. package/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +12 -0
  120. package/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +2 -0
  121. package/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +43 -0
  122. package/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +4 -0
  123. package/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +4 -0
  124. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +4 -0
  125. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +6 -0
  126. package/nitrogen/generated/shared/json/NativeListConfig.json +2 -0
  127. package/package.json +3 -3
  128. package/react-native-native-list.podspec +1 -0
  129. package/src/NativeList.nitro.ts +2 -0
  130. package/src/NativeList.tsx +418 -89
  131. package/src/NativeList.types.ts +34 -1
  132. package/src/NativeList.web.tsx +417 -66
  133. package/src/index.ts +2 -0
  134. package/src/models.ts +355 -143
  135. package/src/selection.ts +1 -0
  136. package/src/validation.ts +3315 -166
  137. package/src/web/NativeListWebEngine.ts +1473 -113
  138. package/src/web/templates/ActivityRowRenderer.ts +732 -8
  139. package/src/web/templates/ButtonGroupRowRenderer.ts +58 -0
  140. package/src/web/templates/DataRowRenderer.ts +93 -20
  141. package/src/web/templates/IdentityRowRenderer.ts +217 -6
  142. package/src/web/templates/MarketRowRenderer.ts +19 -3
  143. package/src/web/templates/MarketTableRowRenderer.ts +755 -0
  144. package/src/web/templates/MediaTileRowRenderer.ts +313 -5
  145. package/src/web/templates/MessageRowRenderer.ts +23 -7
  146. package/src/web/templates/RowContainerStyle.ts +2 -0
  147. package/src/web/templates/RowRendererRegistry.ts +21 -6
  148. package/src/web/templates/SectionHeaderRowRenderer.ts +89 -5
@@ -5,12 +5,13 @@ import { applyRowContainerStyle, resetRowContainerStyle } from "./templates/RowC
5
5
  import { hasExplicitRowHeight, rowSizeModifier } from "./templates/RowElements.js";
6
6
  import { applyTextStyleToSlot, applyValueSegments } from "./templates/RowText.js";
7
7
  import { setMarketQuoteContent } from "./templates/MarketRowRenderer.js";
8
+ import { canPatchMarketTableValues, updateMarketTableValues } from "./templates/MarketTableRowRenderer.js";
8
9
  export { resolveWebMarketLayoutStyle } from "./templates/MarketRowRenderer.js";
9
10
  import { measureRailWidth } from "./templates/RailRowRenderer.js";
10
11
  import { rowRenderer, rowRendererKey, recycleRowBody } from "./templates/RowRendererRegistry.js";
11
12
  import { checkboxStateForKeys, checkboxStateForSection, isRowPressEnabled, isSelectableRow, reduceSelection, selectionStateFromSnapshot } from "../selection.js";
12
13
  import { calculateAlignedScrollOffset, resolveLocationIndex, scrollFailure, validateOffset } from "../scrolling.js";
13
- import { applyRowPatches, validateSnapshot } from "../validation.js";
14
+ import { applyValidatedRowPatches, containNativeListInput, emptyNativeListSnapshot, validateSnapshot } from "../validation.js";
14
15
  import { avatarPrefetchWindow } from "../avatarPrefetch.js";
15
16
  import { acquireNativeListAvatar, canonicalNativeListAvatarUri } from "./NativeListWebAvatarCache.js";
16
17
  const SECTION_INDEX_CONTENT_INSET = 16;
@@ -130,6 +131,7 @@ export function isWebRowReorderable(snapshot, row) {
130
131
  if (row.type === 'rail' && row.draggable) return true;
131
132
  if (row.type === 'identity' && row.draggable) return true;
132
133
  if (row.type === 'walletGroup' && row.draggable) return true;
134
+ if (row.type === 'market' && row.webTable?.draggable) return true;
133
135
  return (row.type === 'identity' || row.type === 'action') && Boolean(row.trailing?.some(accessory => accessory.kind === 'drag'));
134
136
  }
135
137
  export function moveWebReorderRow(rows, fromIndex, toIndex) {
@@ -274,7 +276,7 @@ export function computeWebListLayout(snapshot, viewportWidth, viewportHeight, co
274
276
  };
275
277
  }
276
278
  const columns = snapshot.layout.gridColumns ?? 2;
277
- const itemWidth = Math.floor((availableWidth - spacing * (columns - 1)) / columns);
279
+ const itemWidth = (availableWidth - spacing * (columns - 1)) / columns;
278
280
  let y = padding.top;
279
281
  let column = 0;
280
282
  let bandStart = y;
@@ -416,18 +418,21 @@ export function webMarketImageBindDeltaForPatches(patches) {
416
418
 
417
419
  // OneKey patch: selector names must shrink before the sidebar clips their contents.
418
420
  export const WEB_LIST_CSS = `
421
+ .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}
422
+
419
423
  [data-native-list-selector="walletSidebar"] .ok-native-list-title{max-width:100%;min-width:0}
420
- .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-family:var(--nl-font-regular);font-synthesis:none}
424
+ .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)}
421
425
  .ok-native-list-viewport-frame{position:relative;flex:1;min-width:0;min-height:0;overflow:hidden}
422
426
  .ok-native-list-viewport{position:absolute;inset:0;overflow:auto;overscroll-behavior:contain;-webkit-overflow-scrolling:touch;scrollbar-gutter:stable}
423
427
  .ok-native-list-content{position:relative;min-width:100%;min-height:100%}
424
428
  .ok-native-list-item{position:absolute;left:0;top:0;box-sizing:border-box;contain:layout paint style;outline:none}
429
+ .ok-native-list-item[data-native-list-media-gallery="true"]{pointer-events:none}.ok-native-list-item[data-native-list-media-gallery="true"]>.ok-native-list-media{pointer-events:auto}
425
430
  .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}
426
431
  .ok-native-list-item[data-table-alternate="true"]>.ok-native-list-row{background:var(--nl-bg)}
427
432
  .ok-native-list-item[data-native-list-selected="true"]>.ok-native-list-row{background:var(--nl-selected)}
428
433
  .ok-native-list-item[data-native-list-disabled="true"]>.ok-native-list-row{cursor:default}
429
434
  .ok-native-list-item[data-native-list-row-press-enabled="true"]>.ok-native-list-row{cursor:pointer}
430
- .ok-native-list-item[data-native-list-row-press-enabled="true"]:hover>.ok-native-list-row{background:var(--nl-pressed)}
435
+ .ok-native-list-item[data-native-list-row-press-enabled="true"]:hover>.ok-native-list-row{background:var(--nl-hover)}
431
436
  .ok-native-list-item[data-native-list-row-press-enabled="true"]:active>.ok-native-list-row{background:var(--nl-pressed)}
432
437
  .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)}
433
438
  .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)}
@@ -446,7 +451,7 @@ export const WEB_LIST_CSS = `
446
451
  .ok-native-list-item[data-native-list-dragging="true"]>.ok-native-list-row>*{visibility:hidden}
447
452
  .ok-native-list-item[data-native-list-dragging="true"]>.ok-native-list-wallet-group{border-color:transparent;background:var(--nl-pressed)}
448
453
  .ok-native-list-item[data-native-list-dragging="true"]>.ok-native-list-wallet-group>*{visibility:hidden}
449
- .ok-native-list-reorder-preview{position:fixed;left:0;top:0;z-index:100001;pointer-events:none;overflow:hidden;border-radius:12px;box-shadow:0 4px 24px rgba(0,0,0,.12);transform-origin:center;will-change:transform;font-synthesis:none;font-family:var(--nl-font-regular)}
454
+ .ok-native-list-reorder-preview{position:fixed;left:0;top:0;z-index:100001;pointer-events:none;overflow:hidden;border-radius:12px;box-shadow:0 4px 24px rgba(0,0,0,.12);transform-origin:center;will-change:transform;font-family:var(--nl-font-regular);font-synthesis:none}
450
455
  .ok-native-list-reorder-preview>.ok-native-list-row{background:var(--nl-pressed);cursor:grabbing}
451
456
  .ok-native-list-reorder-preview[data-native-list-selected="true"]>.ok-native-list-row{background:var(--nl-selected)}
452
457
  .ok-native-list-reorder-count{position:absolute;right:4px;bottom:4px;display:flex;align-items:center;justify-content:center;box-sizing:border-box;min-width:24px;height:24px;padding:0 6px;border:1px solid var(--nl-row);border-radius:12px;background:var(--nl-inverse);color:var(--nl-inverse-text);font-size:12px;line-height:22px;font-weight:600;font-family:var(--nl-font-semibold)}
@@ -458,30 +463,41 @@ export const WEB_LIST_CSS = `
458
463
  .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)}
459
464
  .ok-native-list-item[data-group-position="single"]>.ok-native-list-row{border-radius:var(--nl-group-radius,12px)}
460
465
  .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}
466
+ .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:pointer}.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}
467
+ .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}
468
+ .ok-native-list-icon-button.ok-native-list-tertiary-icon:focus-visible:not(:disabled){outline:2px solid var(--nl-accent)}
469
+ .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}
461
470
  .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)}
462
- .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;font-family:var(--nl-font-semibold);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.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)}
471
+ .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)}
463
472
  .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}
464
- .ok-native-list-value{font-size:14px;line-height:20px;font-weight:500;font-family:var(--nl-font-medium);white-space:nowrap}.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}
465
- .ok-native-list-action-button{appearance:none;border:0;background:transparent;padding:2px;color:var(--nl-accent);font:600 12px/16px var(--nl-font-semibold);cursor:pointer}.ok-native-list-action-button[data-tone="danger"]{color:var(--nl-negative)}.ok-native-list-action-button:disabled{opacity:.5;cursor:default}
466
- .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;font-family:var(--nl-font-semibold);overflow:hidden}.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}
467
- .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;font-family:var(--nl-font-medium);cursor:pointer}.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)}}
468
- .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}
469
- .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;font-family:var(--nl-font-bold);color:var(--nl-secondary);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.ok-native-list-section[data-variant="summary"] .ok-native-list-section-title{font-size:16px;font-weight:500;font-family:var(--nl-font-medium);color:var(--nl-primary)}.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}.ok-native-list-section-value{margin-left:auto}
470
- .ok-native-list-action-row{justify-content:space-between;padding:0 16px}.ok-native-list-action-title{font-size:15px;font-weight:600;font-family:var(--nl-font-semibold);color:var(--nl-accent)}.ok-native-list-action-title[data-tone="danger"]{color:var(--nl-negative)}
473
+ .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}
474
+ .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}
475
+ .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}
476
+ .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)}}
477
+ .ok-native-list-icon-button.ok-native-list-decorative-refresh{min-width:16px;width:16px;height:16px}
478
+ .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}
479
+ .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)}
480
+ .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}
481
+ .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)}
482
+ .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}
471
483
  .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)}
472
484
  .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}
473
- .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;font-family:var(--nl-font-medium);white-space:nowrap}
474
- .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;font-family:var(--nl-font-medium);white-space:nowrap;overflow:hidden;text-overflow:ellipsis}.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%;font:18px/20px var(--nl-font-regular);cursor:pointer}
485
+ .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)}
486
+ .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)}
475
487
  .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)}
476
- .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;font-family:var(--nl-font-medium);white-space:nowrap}.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}
477
- .ok-native-list-market{padding:12px 20px;gap:14px}.ok-native-list-market>.ok-native-list-visual{width:32px;height:32px;flex-basis:32px}.ok-native-list-market[data-variant="stock"]>.ok-native-list-visual{width:40px;height:40px;flex-basis:40px}.ok-native-list-market>.ok-native-list-visual>.ok-native-list-visual-main{width:100%;height:100%}.ok-native-list-market-main{display:flex;flex:1;min-width:0;flex-direction:column;justify-content:center}.ok-native-list-market-title-line{display:flex;align-items:center;min-width:0;gap:4px}.ok-native-list-market-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--nl-primary);font-size:16px;line-height:24px;font-weight:500;font-family:var(--nl-font-medium)}.ok-native-list-market-subtitle{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--nl-secondary);font-size:14px;line-height:20px;font-weight:400;font-family:var(--nl-font-regular)}.ok-native-list-market-badge{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;box-sizing:border-box;max-width:72px;height:18px;padding:0 5px;border:0;border-radius:4px;background:var(--nl-strong);color:var(--nl-secondary);font:500 11px/18px var(--nl-font-medium);overflow:hidden;white-space:nowrap}.ok-native-list-market-badge img{width:14px;height:14px;object-fit:contain}.ok-native-list-market-trailing{display:flex;flex:0 0 auto;align-items:center;gap:8px}.ok-native-list-market-price{max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;color:var(--nl-primary);font-size:16px;line-height:24px;font-weight:500;font-family:var(--nl-font-medium);font-variant-numeric:tabular-nums}.ok-native-list-market-change{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:80px;height:32px;border-radius:8px;color:#fff;background:#8d8d8d;font-size:14px;line-height:20px;font-weight:500;font-family:var(--nl-font-medium);font-variant-numeric:tabular-nums;white-space:nowrap}.ok-native-list-market-change[data-tone="positive"]{background:var(--nl-positive)}.ok-native-list-market-change[data-tone="negative"]{background:var(--nl-negative)}
488
+ .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}
489
+ .ok-native-list-item[data-native-list-row-press-enabled="true"]:active>.ok-native-list-history{background:var(--nl-selected)}
490
+ .ok-native-list-root[data-native-list-parent-scroll="true"] .ok-native-list-item[data-native-list-row-press-enabled="true"]:active>.ok-native-list-market:not([data-variant="stock"]){opacity:.8}
491
+ .ok-native-list-root[data-native-list-parent-scroll="true"] .ok-native-list-item[data-native-list-row-press-enabled="true"]:active>.ok-native-list-market[data-variant="stock"]{background:var(--nl-selected)}
492
+ .ok-native-list-market-table .ok-native-list-visual-fallback>svg{width:28px;height:28px}
493
+ .ok-native-list-market{padding:12px 20px;gap:14px}.ok-native-list-market>.ok-native-list-visual{width:32px;height:32px;flex-basis:32px}.ok-native-list-market[data-variant="stock"]>.ok-native-list-visual{width:40px;height:40px;flex-basis:40px}.ok-native-list-market>.ok-native-list-visual>.ok-native-list-visual-main{width:100%;height:100%}.ok-native-list-market-main{display:flex;flex:1;min-width:0;flex-direction:column;justify-content:center}.ok-native-list-market-title-line{display:flex;align-items:center;min-width:0;gap:4px}.ok-native-list-market-title{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--nl-primary);font-size:16px;line-height:24px;font-weight:500;font-family:var(--nl-font-medium)}.ok-native-list-market-subtitle{min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:var(--nl-secondary);font-size:14px;line-height:20px;font-weight:400;font-family:var(--nl-font-regular)}.ok-native-list-market-badge{display:inline-flex;flex:0 0 auto;align-items:center;justify-content:center;box-sizing:border-box;max-width:72px;height:18px;padding:0 5px;border:0;border-radius:4px;background:var(--nl-strong);color:var(--nl-secondary);overflow:hidden;white-space:nowrap;font:500 11px/18px var(--nl-font-medium);font-variant-numeric:tabular-nums}.ok-native-list-market-badge img{width:14px;height:14px;object-fit:contain}.ok-native-list-market-trailing{display:flex;flex:0 0 auto;align-items:center;gap:8px}.ok-native-list-market-price{max-width:112px;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;text-align:right;color:var(--nl-primary);font-size:16px;line-height:24px;font-weight:500;font-variant-numeric:tabular-nums;font-family:var(--nl-font-medium)}.ok-native-list-market-change{display:flex;align-items:center;justify-content:center;box-sizing:border-box;width:80px;height:32px;border-radius:8px;color:#fff;background:#8d8d8d;font-size:14px;line-height:20px;font-weight:500;font-variant-numeric:tabular-nums;white-space:nowrap;font-family:var(--nl-font-medium)}.ok-native-list-market-change[data-tone="positive"]{background:var(--nl-positive)}.ok-native-list-market-change[data-tone="negative"]{background:var(--nl-negative)}
478
494
  .ok-native-list-market-badge>svg,.ok-native-list-market-badge>.ok-native-list-market-badge-icon>svg{display:block;width:16px;height:16px;flex:0 0 16px}.ok-native-list-system[data-native-list-presentation="market"]{box-sizing:border-box;padding:12px 20px}.ok-native-list-system[data-native-list-presentation="market"]>.ok-native-list-spinner{width:32px;height:32px}
479
- .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;font-family:var(--nl-font-semibold);opacity:0;pointer-events:none;transition:opacity .15s ease,transform .15s ease}.ok-native-list-index-preview[data-visible="true"]{opacity:1;transform:translateY(-50%) scale(1)}
495
+ .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)}
480
496
  .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}
481
497
  @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)}}
482
- .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-synthesis:none;font-family:var(--nl-font-regular)}.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-family:inherit;font-size:10px;font-weight:400;font-family:var(--nl-font-regular);line-height:1;cursor:pointer;opacity:.5;transition:opacity .15s ease}.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}
498
+ .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}
483
499
  .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)}
484
- .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;font-family:var(--nl-font-medium);color:var(--nl-primary)}.ok-native-list-warning-message{font-weight:400;font-family:var(--nl-font-regular);color:var(--nl-secondary)}
500
+ .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)}
485
501
  .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. */
486
502
  .ok-native-list-checkbox[data-selector="networkSelector"]{padding:0;border-radius:4px;border-color:var(--nl-checkbox-border,var(--nl-separator));background:var(--nl-checkbox-icon,var(--nl-inverse-text))}
487
503
  .ok-native-list-checkbox[data-selector="networkSelector"]::after{display:none}
@@ -493,7 +509,7 @@ export const WEB_LIST_CSS = `
493
509
  /* OneKey patch: selected group members use the same primary title color as standalone wallets. */
494
510
  .ok-native-list-wallet-member[data-native-list-selected="true"]>.ok-native-list-wallet-row[data-native-list-selector="walletSidebar"] .ok-native-list-title{color:var(--nl-primary)}
495
511
  .ok-native-list-wallet-row[data-native-list-selector="walletSidebar"] .ok-native-list-wallet-badges{height:18px}
496
- .ok-native-list-wallet-row[data-native-list-selector="walletSidebar"] .ok-native-list-wallet-badges>.ok-native-list-badge{font-size:11px;line-height:14px;font-weight:400;font-family:var(--nl-font-regular);height:18px;padding:2px 6px;border-radius:4px;background:var(--nl-subdued);color:var(--nl-secondary)}
512
+ .ok-native-list-wallet-row[data-native-list-selector="walletSidebar"] .ok-native-list-wallet-badges>.ok-native-list-badge{font-size:11px;line-height:14px;font-weight:400;height:18px;padding:2px 6px;border-radius:4px;background:var(--nl-subdued);color:var(--nl-secondary);font-family:var(--nl-font-regular)}
497
513
  .ok-native-list-wallet-row[data-native-list-selector="walletSidebar"] .ok-native-list-wallet-badges>.ok-native-list-badge[data-tone="warning"]{background:var(--nl-caution-background);color:var(--nl-caution)}
498
514
  .ok-native-list-account-row[data-native-list-selector="accountSelector"] .ok-native-list-accessories>.ok-native-list-icon-button{box-sizing:border-box;flex:0 0 38px;width:38px;height:38px;margin:-7px;padding:7px}
499
515
  .ok-native-list-account-row[data-native-list-selector="accountSelector"] .ok-native-list-accessories>.ok-native-list-icon-button[data-native-list-action]:not([data-native-list-account-control="createAddress"]):hover{background:var(--nl-strong);border-radius:50%}
@@ -512,6 +528,7 @@ export const WEB_LIST_CSS = `
512
528
  .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)}
513
529
  .ok-native-list-root [data-nl-container-border="true"]{position:relative}
514
530
  .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}
531
+ .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}
515
532
  .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)}
516
533
  `;
517
534
  function createElement(document, tag, className, text) {
@@ -552,10 +569,12 @@ function disposeWebImageRetries(element) {
552
569
  function configureWebImageRetry(image, source, initialUri) {
553
570
  const fallbackUri = source.fallbackUri ? safeImageUri(source.fallbackUri) : undefined;
554
571
  const retryLimit = Number.isFinite(source.retryTimes) ? Math.max(0, Math.floor(source.retryTimes ?? 0)) : 0;
555
- if (!fallbackUri && retryLimit === 0) return;
572
+ const orderedFallbacks = source.fallbackUris;
573
+ if (!fallbackUri && retryLimit === 0 && orderedFallbacks === undefined) return;
556
574
  const view = image.ownerDocument.defaultView;
557
575
  let currentUri = initialUri;
558
576
  let usedFallback = false;
577
+ let fallbackIndex = 0;
559
578
  let retryCount = 0;
560
579
  let retryTimer;
561
580
  let disposed = false;
@@ -568,7 +587,20 @@ function configureWebImageRetry(image, source, initialUri) {
568
587
  event.stopImmediatePropagation();
569
588
  return;
570
589
  }
571
- if (fallbackUri && !usedFallback && fallbackUri !== currentUri) {
590
+ if (orderedFallbacks !== undefined && retryCount >= retryLimit) {
591
+ if (fallbackIndex >= orderedFallbacks.length) return;
592
+ let nextUri;
593
+ while (!nextUri && fallbackIndex < orderedFallbacks.length) {
594
+ nextUri = safeImageUri(orderedFallbacks[fallbackIndex++]);
595
+ }
596
+ if (!nextUri) return;
597
+ event.stopImmediatePropagation();
598
+ retryCount = 0;
599
+ currentUri = nextUri;
600
+ image.src = currentUri;
601
+ return;
602
+ }
603
+ if (orderedFallbacks === undefined && fallbackUri && !usedFallback && fallbackUri !== currentUri) {
572
604
  event.stopImmediatePropagation();
573
605
  usedFallback = true;
574
606
  currentUri = fallbackUri;
@@ -599,6 +631,12 @@ function configureWebAvatar(image, source, uri) {
599
631
  configureWebImageRetry(image, source, resolvedUri);
600
632
  image.src = resolvedUri;
601
633
  }, () => {
634
+ if (source.fallbackUris !== undefined) {
635
+ configureWebImageRetry(image, source, uri);
636
+ const ImageEvent = image.ownerDocument.defaultView?.Event;
637
+ if (ImageEvent) image.dispatchEvent(new ImageEvent('error'));
638
+ return;
639
+ }
602
640
  const fallbackUri = source.fallbackUri ? safeImageUri(source.fallbackUri) : undefined;
603
641
  if (fallbackUri) {
604
642
  configureWebImageRetry(image, source, fallbackUri);
@@ -688,6 +726,98 @@ function paintSelectorImageBackground(image, frame, inset = 0) {
688
726
 
689
727
  // OneKey patch: use source SVG paths for selector actions and wallet provider marks.
690
728
  const selectorIcons = {
729
+ RefreshCcwOutline: {
730
+ viewBox: '0 0 24 24',
731
+ paths: [{
732
+ d: 'M5 12a7 7 0 0 0 7 7 7.15 7.15 0 0 0 4.955-2h-2.943v-2h6v6h-2v-2.257A9.148 9.148 0 0 1 12 21a9 9 0 0 1-9-9v-1h2v1Zm1-6.754A9.148 9.148 0 0 1 12 3a9 9 0 0 1 9 9v1h-2v-1a7 7 0 0 0-7-7 7.15 7.15 0 0 0-4.955 2H10v2H4V3h2v2.246Z',
733
+ fill: 'currentColor',
734
+ fillRule: 'nonzero',
735
+ opacity: 1
736
+ }]
737
+ },
738
+ DotVerSolid: {
739
+ viewBox: '0 0 24 24',
740
+ paths: [{
741
+ d: 'M14 18v4h-4v-4zm0-4h-4v-4h4zm0-8h-4V2h4z',
742
+ fill: 'currentColor',
743
+ fillRule: 'nonzero',
744
+ opacity: 1
745
+ }]
746
+ },
747
+ Document2Outline: {
748
+ viewBox: '0 0 24 24',
749
+ paths: [{
750
+ d: 'M12 16H8v-2h4zm4-4H8v-2h8zm0-4H8V6h8z',
751
+ fill: 'currentColor',
752
+ fillRule: 'nonzero',
753
+ opacity: 1
754
+ }, {
755
+ d: 'M20 22H4V2h16zM6 20h12V4H6z',
756
+ fill: 'currentColor',
757
+ fillRule: 'evenodd',
758
+ opacity: 1
759
+ }]
760
+ },
761
+ WalletOutline: {
762
+ viewBox: '0 0 24 24',
763
+ paths: [{
764
+ d: 'M15.5 13.25a1.25 1.25 0 1 1 0 2.5 1.25 1.25 0 0 1 0-2.5',
765
+ fill: 'currentColor',
766
+ fillRule: 'nonzero',
767
+ opacity: 1
768
+ }, {
769
+ d: 'M17 8h4v13H7a4 4 0 0 1-4-4V6.5A3.5 3.5 0 0 1 6.5 3H17zM5 17a2 2 0 0 0 2 2h12v-9H6.5c-.537 0-1.045-.12-1.5-.337zM6.5 5a1.5 1.5 0 1 0 0 3H15V5z',
770
+ fill: 'currentColor',
771
+ fillRule: 'evenodd',
772
+ opacity: 1
773
+ }]
774
+ },
775
+ PlusLargeOutline: {
776
+ viewBox: '0 0 24 24',
777
+ paths: [{
778
+ d: 'M13 11h8v2h-8v8h-2v-8H3v-2h8V3h2z',
779
+ fill: 'currentColor',
780
+ fillRule: 'nonzero',
781
+ opacity: 1
782
+ }]
783
+ },
784
+ TicketOutline: {
785
+ viewBox: '0 0 24 24',
786
+ paths: [{
787
+ d: 'M16 17.01h-2V15h2v2.01Zm0-4h-2V11h2v2.01Zm0-4h-2V7h2v2.01Z',
788
+ fill: 'currentColor',
789
+ fillRule: 'nonzero',
790
+ opacity: 1
791
+ }, {
792
+ d: 'm22 9.927-.629.252c-1.661.665-1.661 2.977 0 3.642l.629.252V20H2v-5.927l.629-.252c1.661-.665 1.661-2.977 0-3.642L2 9.927V4h20v5.927ZM4 8.636c2.5 1.52 2.499 5.207 0 6.727V18h16v-2.637c-2.499-1.52-2.5-5.208 0-6.727V6H4v2.636Z',
793
+ fill: 'currentColor',
794
+ fillRule: 'evenodd',
795
+ opacity: 1
796
+ }]
797
+ },
798
+ GasSolid: {
799
+ viewBox: '0 0 24 24',
800
+ paths: [{
801
+ d: 'M15 9h4v7h1V8.414L17.586 6 19 4.586l3 3V18h-5v-7h-2v8h1v2H2v-2h1V3h12zM6 9v2h6V9z',
802
+ fill: 'currentColor',
803
+ fillRule: 'evenodd',
804
+ opacity: 1
805
+ }]
806
+ },
807
+ CryptoCoinOutline: {
808
+ viewBox: '0 0 24 24',
809
+ paths: [{
810
+ 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',
811
+ fill: 'currentColor',
812
+ fillRule: 'nonzero',
813
+ opacity: 1
814
+ }, {
815
+ 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',
816
+ fill: 'currentColor',
817
+ fillRule: 'evenodd',
818
+ opacity: 1
819
+ }]
820
+ },
691
821
  GlobusOutline: {
692
822
  viewBox: '0 0 24 24',
693
823
  paths: [{
@@ -918,6 +1048,7 @@ function applySelectorIcon(element, name) {
918
1048
  }
919
1049
  function iconGlyph(name) {
920
1050
  const normalized = name.toLocaleLowerCase();
1051
+ if (normalized === 'dotversolid') return '⋮';
921
1052
  if (normalized.includes('chevron')) {
922
1053
  if (normalized.includes('top')) return '⌃';
923
1054
  if (normalized.includes('bottom')) return '⌄';
@@ -965,6 +1096,8 @@ function createVisual(context, visual, selectorPresentation) {
965
1096
  const showsSourcePlaceholder = !!source && source.loadingStrategy !== undefined && source.loadingStrategy !== 'none';
966
1097
  frame.style.background = showsSourcePlaceholder ? 'var(--nl-strong)' : visualBackground;
967
1098
  const fallbackIcon = 'fallbackIcon' in visual ? visual.fallbackIcon : undefined;
1099
+ const fallbackBackground = fallbackIcon?.backgroundColor ?? 'var(--nl-strong)';
1100
+ if (!source && fallbackIcon?.backgroundColor) frame.style.background = fallbackBackground;
968
1101
  const handlesSourceFallback = showsSourcePlaceholder && (fallbackIcon !== undefined || 'fallbackText' in visual);
969
1102
  const image = source ? createImage(context, source) : undefined;
970
1103
  if (image) {
@@ -978,6 +1111,24 @@ function createVisual(context, visual, selectorPresentation) {
978
1111
  if (image.complete && image.naturalWidth > 0) restoreBackground();
979
1112
  }
980
1113
  if (selectorPresentation) paintSelectorImageBackground(image, frame);
1114
+ if (source?.loadingStrategy === 'skeleton' && !(image.complete && image.naturalWidth > 0)) {
1115
+ const skeleton = createElement(context.document, 'span', 'ok-native-list-image-skeleton');
1116
+ const background = resolvedTheme(context.snapshot).background;
1117
+ const rgb = /^#([0-9a-f]{6})/i.exec(background)?.[1];
1118
+ if (rgb) {
1119
+ const red = Number.parseInt(rgb.slice(0, 2), 16);
1120
+ const green = Number.parseInt(rgb.slice(2, 4), 16);
1121
+ const blue = Number.parseInt(rgb.slice(4, 6), 16);
1122
+ if (red * 299 + green * 587 + blue * 114 < 128_000) skeleton.dataset.dark = 'true';
1123
+ }
1124
+ frame.appendChild(skeleton);
1125
+ image.addEventListener('load', () => skeleton.remove(), {
1126
+ once: true
1127
+ });
1128
+ image.addEventListener('error', () => skeleton.remove(), {
1129
+ once: true
1130
+ });
1131
+ }
981
1132
  } else if (!source || showsSourcePlaceholder) {
982
1133
  frame.appendChild(createElement(context.document, 'span', 'ok-native-list-visual-fallback', 'fallbackText' in visual ? visual.fallbackText ?? '' : ''));
983
1134
  }
@@ -1001,10 +1152,19 @@ function createVisual(context, visual, selectorPresentation) {
1001
1152
  }
1002
1153
  frame.querySelector('.ok-native-list-visual-fallback:not(.ok-native-list-visual-corner)')?.remove();
1003
1154
  const fallback = createElement(context.document, 'span', 'ok-native-list-visual-fallback', fallbackIcon ? undefined : 'fallbackText' in visual ? visual.fallbackText ?? '' : '');
1155
+ if ('fallbackTextColor' in visual && visual.fallbackTextColor && !fallbackIcon) fallback.style.color = visual.fallbackTextColor;
1004
1156
  if (fallbackIcon) {
1005
1157
  applySelectorIcon(fallback, fallbackIcon.name);
1006
1158
  if (fallbackIcon.tintColor) fallback.style.color = fallbackIcon.tintColor;
1159
+ if (fallbackIcon.size) {
1160
+ const svg = fallback.querySelector('svg');
1161
+ if (svg) {
1162
+ svg.style.width = `${fallbackIcon.size}px`;
1163
+ svg.style.height = `${fallbackIcon.size}px`;
1164
+ }
1165
+ }
1007
1166
  }
1167
+ if (fallbackIcon?.backgroundColor) frame.style.background = fallbackBackground;else fallback.style.backgroundColor = 'var(--nl-image-fallback-background, transparent)';
1008
1168
  frame.prepend(fallback);
1009
1169
  };
1010
1170
  if (image) image.addEventListener('error', showFallback, {
@@ -1014,6 +1174,9 @@ function createVisual(context, visual, selectorPresentation) {
1014
1174
  if ('borderStyle' in visual && visual.borderStyle === 'dashed') {
1015
1175
  frame.style.border = '2px dashed ' + (visual.borderColor ?? 'var(--nl-disabled)');
1016
1176
  frame.style.boxSizing = 'border-box';
1177
+ } else if ('borderColor' in visual && visual.borderColor) {
1178
+ frame.style.border = '1px solid ' + visual.borderColor;
1179
+ frame.style.boxSizing = 'border-box';
1017
1180
  }
1018
1181
  if ('overlays' in visual) visual.overlays?.forEach(overlay => {
1019
1182
  const corner = createElement(context.document, 'span', 'ok-native-list-visual-overlay', overlay.text);
@@ -1027,6 +1190,12 @@ function createVisual(context, visual, selectorPresentation) {
1027
1190
  corner.style.lineHeight = '16px';
1028
1191
  applyTextWeight(corner, '400');
1029
1192
  }
1193
+ if (overlay.fontWeight) applyTextWeight(corner, {
1194
+ regular: 400,
1195
+ medium: 500,
1196
+ semibold: 600,
1197
+ bold: 700
1198
+ }[overlay.fontWeight]);
1030
1199
  if (isWalletText || overlay.width !== undefined || overlay.height !== undefined) corner.style.borderRadius = '9999px';
1031
1200
  const offsetX = String(-(overlay.offsetX ?? overlay.offset ?? 2)) + 'px';
1032
1201
  const offsetY = String(-(overlay.offsetY ?? overlay.offset ?? 2)) + 'px';
@@ -1042,7 +1211,20 @@ function createVisual(context, visual, selectorPresentation) {
1042
1211
  if (overlay.image) {
1043
1212
  const overlayImage = createImage(context, overlay.image);
1044
1213
  if (overlayImage) {
1214
+ if ((overlay.padding ?? 0) > 0 && (overlay.width ?? size) === (overlay.height ?? size)) overlayImage.style.borderRadius = '50%';
1045
1215
  corner.appendChild(overlayImage);
1216
+ if (overlay.fallbackIcon) {
1217
+ overlayImage.addEventListener('error', () => {
1218
+ disposeWebImageRetries(overlayImage);
1219
+ overlayImage.remove();
1220
+ const glyph = createElement(context.document, 'span', 'ok-native-list-overlay-fallback');
1221
+ applySelectorIcon(glyph, overlay.fallbackIcon.name);
1222
+ if (overlay.fallbackIcon?.tintColor) glyph.style.color = overlay.fallbackIcon.tintColor;
1223
+ corner.appendChild(glyph);
1224
+ }, {
1225
+ once: true
1226
+ });
1227
+ }
1046
1228
  if (selectorPresentation) paintSelectorImageBackground(overlayImage, corner, overlay.padding ?? 0);
1047
1229
  }
1048
1230
  } else if (overlay.name) applySelectorIcon(corner, overlay.name);
@@ -1122,7 +1304,23 @@ function markActionAnchorSource(element, source, slot) {
1122
1304
 
1123
1305
  // OneKey patch: the compact zero-count digits share the amount baseline.
1124
1306
 
1125
- function createAccessory(context, rowKey, accessory, slot) {
1307
+ function createAccessory(context, rowKey, accessory, slot, rowDisabled) {
1308
+ if (accessory.kind === 'button') {
1309
+ const element = createElement(context.document, 'button', 'ok-native-list-trailing-button', accessory.label);
1310
+ element.type = 'button';
1311
+ element.disabled = Boolean(rowDisabled || accessory.disabled);
1312
+ element.setAttribute('aria-disabled', String(element.disabled));
1313
+ element.setAttribute('aria-label', accessory.accessibilityLabel ?? accessory.label);
1314
+ setData(element, 'testid', accessory.testID);
1315
+ setData(element, 'nativeListAction', accessory.actionKey);
1316
+ markActionAnchorSource(element, 'trailingAccessory', slot);
1317
+ if (accessory.textColor) element.style.setProperty('--nl-button-text', accessory.textColor);
1318
+ if (accessory.backgroundColor) element.style.setProperty('--nl-button-bg', accessory.backgroundColor);
1319
+ if (accessory.pressedBackgroundColor) element.style.setProperty('--nl-button-pressed', accessory.pressedBackgroundColor);
1320
+ if (accessory.hoverBackgroundColor) element.style.setProperty('--nl-button-hover', accessory.hoverBackgroundColor);
1321
+ if (accessory.focusRingColor) element.style.setProperty('--nl-button-focus', accessory.focusRingColor);
1322
+ return element;
1323
+ }
1126
1324
  if (accessory.kind === 'checkbox') {
1127
1325
  const element = createCheckbox(context, rowKey, accessory);
1128
1326
  markActionAnchorSource(element, 'trailingAccessory', slot);
@@ -1131,8 +1329,19 @@ function createAccessory(context, rowKey, accessory, slot) {
1131
1329
  if (accessory.kind === 'icon') {
1132
1330
  const element = createIconAction(context, accessory.name, accessory.actionKey, accessory.disabled, accessory.tintColor);
1133
1331
  markActionAnchorSource(element, 'trailingAccessory', slot);
1332
+ if (accessory.name === 'RefreshCcwOutline' && !accessory.actionKey) {
1333
+ element.classList.add('ok-native-list-decorative-refresh');
1334
+ const glyph = element.querySelector('svg');
1335
+ glyph?.setAttribute('width', '16');
1336
+ glyph?.setAttribute('height', '16');
1337
+ }
1338
+ if (accessory.buttonStyle === 'tertiary') {
1339
+ element.classList.add('ok-native-list-tertiary-icon');
1340
+ setData(element, 'nativeListAnchorInset', 7);
1341
+ }
1134
1342
  setData(element, 'testid', accessory.testID);
1135
1343
  if (accessory.hoverActionKey) setData(element, 'nativeListHoverAction', accessory.hoverActionKey);
1344
+ if (accessory.hoverActionKey && accessory.buttonStyle === 'tertiary') setData(element, 'nativeListIconHelp', true);
1136
1345
  if (accessory.accessibilityLabel) element.setAttribute('aria-label', accessory.accessibilityLabel);
1137
1346
  const row = context.snapshot.rows[context.itemIndex];
1138
1347
  if (row && 'presentation' in row && row.presentation === 'accountSelector') {
@@ -1165,8 +1374,27 @@ function createAccessory(context, rowKey, accessory, slot) {
1165
1374
  {
1166
1375
  const primary = createElement(context.document, 'span', undefined, accessory.primary);
1167
1376
  primary.style.color = toneColor(accessory.primaryTone, 'primary');
1377
+ applyValueSegments(primary, accessory.primaryTextSegments, 16, 20, 500);
1378
+ if (accessory.primaryFontWeight === 'medium') applyTextWeight(primary, 500);
1379
+ if (accessory.primaryHelp) {
1380
+ const help = accessory.primaryHelp;
1381
+ primary.tabIndex = 0;
1382
+ primary.setAttribute('role', 'button');
1383
+ if (help.presentation === 'tooltip') {
1384
+ setData(primary, 'nativeListHoverAction', help.actionKey);
1385
+ setData(primary, 'nativeListIconHelp', true);
1386
+ } else {
1387
+ setData(primary, 'nativeListAction', help.actionKey);
1388
+ }
1389
+ if (help.underline === 'dashed') {
1390
+ primary.style.textDecoration = 'underline dashed';
1391
+ primary.style.textUnderlineOffset = '4px';
1392
+ }
1393
+ markActionAnchorSource(primary, 'trailingAccessory', slot);
1394
+ }
1168
1395
  const secondary = createElement(context.document, 'span', 'ok-native-list-secondary', accessory.secondary);
1169
1396
  secondary.style.color = toneColor(accessory.secondaryTone, 'secondary');
1397
+ applyValueSegments(secondary, accessory.secondaryTextSegments, 14, 20, 400);
1170
1398
  element.replaceChildren(primary, '\n', secondary);
1171
1399
  element.classList.add('ok-native-list-amounts');
1172
1400
  break;
@@ -1194,10 +1422,10 @@ function createAccessory(context, rowKey, accessory, slot) {
1194
1422
  if (actionKey) markActionAnchorSource(element, 'trailingAccessory', slot);
1195
1423
  return element;
1196
1424
  }
1197
- function rendererPrimitives(context) {
1425
+ function rendererPrimitives(context, rowDisabled) {
1198
1426
  return {
1199
1427
  background: resolvedTheme(context.snapshot).background,
1200
- accessory: (key, descriptor, slot) => createAccessory(context, key, descriptor, slot),
1428
+ accessory: (key, descriptor, slot) => createAccessory(context, key, descriptor, slot, rowDisabled),
1201
1429
  visual: (source, presentation) => createVisual(context, source, presentation),
1202
1430
  thumbnail: source => createImage(context, source, 'ok-native-list-thumbnail'),
1203
1431
  textStyle: applyTextStyleToSlot,
@@ -1207,7 +1435,7 @@ function rendererPrimitives(context) {
1207
1435
  };
1208
1436
  }
1209
1437
  export function createRowBody(context, row) {
1210
- return rowRenderer(row).create(context.document, rendererPrimitives(context));
1438
+ return rowRenderer(row).create(context.document, rendererPrimitives(context, Boolean(row.disabled)));
1211
1439
  }
1212
1440
  export class NativeListWebEngine {
1213
1441
  rows = [];
@@ -1225,11 +1453,13 @@ export class NativeListWebEngine {
1225
1453
  rail: [],
1226
1454
  mediaTile: [],
1227
1455
  action: [],
1456
+ buttonGroup: [],
1228
1457
  system: [],
1229
1458
  activity: [],
1230
1459
  dataRow: [],
1231
1460
  metricCard: [],
1232
1461
  market: [],
1462
+ marketTable: [],
1233
1463
  identity: [],
1234
1464
  sectionHeader: []
1235
1465
  };
@@ -1250,36 +1480,60 @@ export class NativeListWebEngine {
1250
1480
  lastViewportWidth = -1;
1251
1481
  lastViewportHeight = -1;
1252
1482
  destroyed = false;
1483
+ hasAppliedSnapshot = false;
1484
+ structuralRevision = 0;
1485
+ structuralAnimations = [];
1486
+ structuralScrollInterrupted = false;
1487
+ reactFooterHeight = 0;
1488
+ structuralFooterCompensation = 0;
1489
+ structuralFooterExpansion = 0;
1490
+ structuralFooterFromHeight = 0;
1491
+ structuralProgress = 0;
1492
+ structuralPrefixTransition = false;
1253
1493
  sectionIndexAlignStart = false;
1254
1494
  // Renderers report intrinsic height after browser text wrapping.
1255
1495
  measuredRendererHeights = new Map();
1256
1496
  notifyScrollCommandAccepted() {
1257
1497
  if (this.destroyed) return;
1258
- const EventConstructor = this.viewport.ownerDocument.defaultView?.Event;
1259
- if (EventConstructor) this.viewport.dispatchEvent(new EventConstructor('ok-native-list-scroll-command-accepted'));
1498
+ const owner = this.externalScrollHost ?? this.viewport;
1499
+ const EventConstructor = owner.ownerDocument.defaultView?.Event;
1500
+ if (EventConstructor) owner.dispatchEvent(new EventConstructor('ok-native-list-scroll-command-accepted'));
1260
1501
  }
1261
1502
  handlePagerScrollCommandCancel = event => {
1262
- if (this.destroyed || event.target !== this.viewport) return;
1503
+ const owner = this.externalScrollHost ?? this.viewport;
1504
+ if (this.destroyed || event.target !== owner) return;
1263
1505
  this.pendingScroll = undefined;
1264
- this.viewport.scrollTo({
1265
- left: this.viewport.scrollLeft,
1266
- top: this.viewport.scrollTop,
1506
+ const options = {
1507
+ left: owner.scrollLeft,
1508
+ top: owner.scrollTop,
1267
1509
  behavior: 'instant'
1268
- });
1510
+ };
1511
+ if (this.externalScrollHost) {
1512
+ const scrollTo = owner.ownerDocument.defaultView?.Element.prototype.scrollTo ?? owner.scrollTo;
1513
+ scrollTo.call(owner, options);
1514
+ } else this.viewport.scrollTo(options);
1269
1515
  };
1270
- constructor(host, snapshot, callbacks, virtualizationEnabled = true, sectionIndexContainer, fontFamiliesJson = '{}') {
1516
+ constructor(host, snapshot, callbacks, virtualizationEnabled = true, sectionIndexContainer, fontFamiliesJson = '{}', scrollOptions = {}) {
1517
+ if (scrollOptions.scrollHost && (!(scrollOptions.scrollHost instanceof host.ownerDocument.defaultView.HTMLElement) || !scrollOptions.scrollHost.contains(host))) throw new Error('webScrollHost must be an ancestor HTMLElement in the same document');
1518
+ this.ownsRefresh = scrollOptions.ownsRefresh === true;
1519
+ if (scrollOptions.scrollHost && snapshot.layout.orientation === 'horizontal') throw new Error('External scrolling supports vertical lists only');
1520
+ this.externalScrollHost = scrollOptions.scrollHost;
1521
+ this.contentBounds = scrollOptions.contentBounds;
1522
+ this.externalStickyInset = this.validateStickyInset(scrollOptions.stickyInset);
1271
1523
  this.document = host.ownerDocument;
1272
- this.snapshot = validateSnapshot(snapshot);
1524
+ this.snapshot = containNativeListInput(() => validateSnapshot(snapshot)) ?? emptyNativeListSnapshot();
1273
1525
  this.callbacks = callbacks;
1274
1526
  this.virtualizationEnabled = virtualizationEnabled;
1275
1527
  this.sectionIndexContainer = sectionIndexContainer ?? undefined;
1276
1528
  this.previousHostPosition = host.style.position;
1277
1529
  if (!host.style.position) host.style.position = 'relative';
1278
1530
  this.root = createElement(this.document, 'div', 'ok-native-list-root');
1531
+ setData(this.root, 'nativeListParentScroll', !!this.externalScrollHost);
1279
1532
  const style = this.document.createElement('style');
1280
1533
  style.textContent = WEB_LIST_CSS;
1281
1534
  this.viewportFrame = createElement(this.document, 'div', 'ok-native-list-viewport-frame');
1282
1535
  this.viewport = createElement(this.document, 'div', 'ok-native-list-viewport');
1536
+ this.pullTarget = this.externalScrollHost && this.ownsRefresh ? this.externalScrollHost : this.viewport;
1283
1537
  this.viewport.setAttribute('role', 'list');
1284
1538
  this.content = createElement(this.document, 'div', 'ok-native-list-content');
1285
1539
  this.footer = createElement(this.document, 'div', 'ok-native-list-footer');
@@ -1300,18 +1554,51 @@ export class NativeListWebEngine {
1300
1554
  this.viewportFrame.append(this.viewport, this.sticky, this.indexRail, this.refreshIndicator);
1301
1555
  this.root.append(style, this.viewportFrame, this.footer);
1302
1556
  host.appendChild(this.root);
1303
- this.viewport.addEventListener('ok-collapsible-pager-cancel-scroll-command', this.handlePagerScrollCommandCancel);
1557
+ if (this.externalScrollHost) {
1558
+ Object.assign(this.root.style, {
1559
+ position: 'relative',
1560
+ inset: 'auto',
1561
+ overflow: 'visible',
1562
+ flex: 'none'
1563
+ });
1564
+ Object.assign(this.viewportFrame.style, {
1565
+ overflow: 'visible',
1566
+ flex: 'none'
1567
+ });
1568
+ Object.assign(this.viewport.style, {
1569
+ position: 'relative',
1570
+ inset: 'auto',
1571
+ overflow: 'visible',
1572
+ scrollbarGutter: 'auto'
1573
+ });
1574
+ this.content.style.minHeight = '0';
1575
+ this.externalScrollHost.addEventListener('scroll', this.handleExternalScroll, {
1576
+ passive: true,
1577
+ capture: true
1578
+ });
1579
+ }
1580
+ (this.externalScrollHost ?? this.viewport).addEventListener('ok-collapsible-pager-cancel-scroll-command', this.handlePagerScrollCommandCancel);
1581
+ for (const event of ['wheel', 'pointerdown', 'touchstart']) (this.externalScrollHost ?? this.viewport).addEventListener(event, this.handleStructuralUserScroll, {
1582
+ passive: true
1583
+ });
1304
1584
  this.viewport.addEventListener('scroll', this.handleScroll, {
1305
1585
  passive: true
1306
1586
  });
1307
- this.viewport.addEventListener('ok-collapsible-pager-insets-changed', this.handleCollapsiblePagerInsetsChanged);
1587
+ (this.externalScrollHost ?? this.viewport).addEventListener('ok-collapsible-pager-insets-changed', this.handleCollapsiblePagerInsetsChanged);
1308
1588
  this.root.addEventListener('click', this.handleClick);
1589
+ this.root.addEventListener('contextmenu', this.handleMarketContextMenu);
1309
1590
  this.root.addEventListener('pointerdown', this.handleMarketPointerDown);
1310
1591
  this.root.addEventListener('pointermove', this.handleMarketPointerMove);
1592
+ this.root.addEventListener('touchmove', this.handleMarketTouchMove, {
1593
+ passive: true
1594
+ });
1311
1595
  this.root.addEventListener('pointerup', this.handleMarketPointerEnd);
1312
1596
  this.root.addEventListener('pointercancel', this.handleMarketPointerEnd);
1313
1597
  // OneKey patch: preserve web tooltip hover for section titles.
1314
1598
  this.root.addEventListener('pointerover', this.handleTitlePointerOver);
1599
+ this.root.addEventListener('pointerdown', this.handleIconHelpPointerDown);
1600
+ this.root.addEventListener('focusin', this.handleTitlePointerOver);
1601
+ this.root.addEventListener('focusout', this.handleTitlePointerOut);
1315
1602
  this.root.addEventListener('pointerout', this.handleTitlePointerOut);
1316
1603
  this.root.addEventListener('keydown', this.handleKeyDown);
1317
1604
  this.viewport.addEventListener('pointerdown', this.handleReorderPointerDown, {
@@ -1334,24 +1621,67 @@ export class NativeListWebEngine {
1334
1621
  this.indexRail.addEventListener('pointerup', this.handleIndexPointerEnd);
1335
1622
  this.indexRail.addEventListener('pointercancel', this.handleIndexPointerEnd);
1336
1623
  this.indexRail.addEventListener('click', this.handleIndexClick);
1337
- this.viewport.addEventListener('pointerdown', this.handlePullStart, {
1624
+ this.pullTarget.addEventListener('pointerdown', this.handlePullStart, {
1338
1625
  passive: true
1339
1626
  });
1340
- this.viewport.addEventListener('pointermove', this.handlePullMove, {
1627
+ this.pullTarget.addEventListener('pointermove', this.handlePullMove, {
1341
1628
  passive: false
1342
1629
  });
1343
- this.viewport.addEventListener('pointerup', this.handlePullEnd);
1344
- this.viewport.addEventListener('pointercancel', this.handlePullEnd);
1630
+ this.pullTarget.addEventListener('pointerup', this.handlePullEnd);
1631
+ this.pullTarget.addEventListener('pointercancel', this.handlePullEnd);
1345
1632
  const ResizeObserverConstructor = this.document.defaultView?.ResizeObserver;
1346
1633
  if (ResizeObserverConstructor) {
1347
1634
  this.resizeObserver = new ResizeObserverConstructor(() => this.recomputeLayout());
1348
1635
  this.resizeObserver.observe(this.viewport);
1636
+ if (this.externalScrollHost) {
1637
+ this.resizeObserver.observe(this.externalScrollHost);
1638
+ let ancestor = host;
1639
+ while (ancestor && ancestor !== this.externalScrollHost) {
1640
+ this.resizeObserver.observe(ancestor);
1641
+ for (const sibling of ancestor.parentElement?.children ?? []) {
1642
+ if (sibling instanceof this.document.defaultView.HTMLElement) this.resizeObserver.observe(sibling);
1643
+ }
1644
+ ancestor = ancestor.parentElement;
1645
+ }
1646
+ }
1349
1647
  } else {
1350
1648
  this.document.defaultView?.addEventListener('resize', this.handleWindowResize);
1351
1649
  }
1650
+ this.document.fonts?.addEventListener('loadingdone', this.handleWindowResize);
1352
1651
  this.observeSectionIndexTransforms();
1353
1652
  this.applyFontFamilies(fontFamiliesJson);
1354
- this.applySnapshot(this.snapshot);
1653
+ this.applyValidatedSnapshot(this.snapshot);
1654
+ }
1655
+ validateStickyInset(value = 0) {
1656
+ if (!Number.isFinite(value) || value < 0) throw new Error('webStickyInset must be finite and non-negative');
1657
+ return value;
1658
+ }
1659
+ setStickyInset(value = 0) {
1660
+ const next = this.validateStickyInset(value);
1661
+ if (next === this.externalStickyInset) return;
1662
+ this.externalStickyInset = next;
1663
+ this.recomputeLayout();
1664
+ }
1665
+ externalGeometry() {
1666
+ return this.externalGeometryCache ??= this.readExternalGeometry();
1667
+ }
1668
+ readExternalGeometry() {
1669
+ const host = this.externalScrollHost;
1670
+ const hostRect = host.getBoundingClientRect();
1671
+ const bodyRect = this.viewport.getBoundingClientRect();
1672
+ const boundsRect = (this.contentBounds ?? this.root).getBoundingClientRect();
1673
+ const top = hostRect.top + host.clientTop + this.externalStickyInset;
1674
+ const bottom = hostRect.top + host.clientTop + host.clientHeight;
1675
+ return {
1676
+ origin: bodyRect.top - hostRect.top - host.clientTop + host.scrollTop,
1677
+ containerOrigin: boundsRect.top - hostRect.top - host.clientTop + host.scrollTop,
1678
+ end: boundsRect.bottom - hostRect.top - host.clientTop + host.scrollTop,
1679
+ top,
1680
+ bottom,
1681
+ offset: top - bodyRect.top,
1682
+ viewportLength: Math.max(0, bottom - top),
1683
+ visible: bodyRect.width > 0 && bodyRect.right > hostRect.left && bodyRect.left < hostRect.right && host.clientHeight > 0 && boundsRect.bottom > top && boundsRect.top < bottom
1684
+ };
1355
1685
  }
1356
1686
  fontFamiliesJson = '{}';
1357
1687
  applyFontFamilies(json) {
@@ -1384,19 +1714,315 @@ export class NativeListWebEngine {
1384
1714
  this.renderWindow();
1385
1715
  }
1386
1716
  applySnapshot(snapshot) {
1387
- const validated = validateSnapshot(snapshot);
1717
+ const validated = containNativeListInput(() => {
1718
+ const next = validateSnapshot(snapshot);
1719
+ if (this.externalScrollHost && next.layout.orientation === 'horizontal') throw new Error('External scrolling supports vertical lists only');
1720
+ return next;
1721
+ });
1722
+ if (!validated) return;
1723
+ this.applyValidatedSnapshot(validated);
1724
+ }
1725
+ applyValidatedSnapshot(validated) {
1726
+ this.pressedHelpElement = undefined;
1388
1727
  this.invalidateActionAnchor('snapshot');
1389
- this.setSnapshot(validated);
1728
+ const transition = validated.structuralTransition;
1729
+ const isNewTransition = transition !== undefined && transition.id !== this.lastStructuralTransitionId;
1730
+ if (transition) this.lastStructuralTransitionId = transition.id;
1731
+ const nextRows = effectiveRows(validated);
1732
+ const changedKeys = this.rows.length !== nextRows.length || this.rows.some((row, index) => row.key !== nextRows[index]?.key);
1733
+ const incompatibleActivePrefix = this.structuralPrefixTransition && (validated.layout.kind !== this.snapshot.layout.kind || validated.layout.orientation !== this.snapshot.layout.orientation || nextRows.some((row, index) => row.height !== this.rows[index]?.height || row.style?.container?.height !== this.rows[index]?.style?.container?.height));
1734
+ const shouldAnimate = this.hasAppliedSnapshot && isNewTransition && changedKeys && (this.snapshot.layout.kind === 'linear' || this.snapshot.layout.kind === 'table') && this.snapshot.layout.orientation !== 'horizontal' && (validated.layout.kind === 'linear' || validated.layout.kind === 'table') && validated.layout.orientation !== 'horizontal' && (transition?.durationMs ?? 220) > 0 && !this.document.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)').matches;
1735
+ if (shouldAnimate && transition) this.applyStructuralSnapshot(validated, transition);else {
1736
+ if (isNewTransition || changedKeys || incompatibleActivePrefix) this.cancelStructuralAnimation();
1737
+ this.setSnapshot(validated);
1738
+ }
1739
+ this.hasAppliedSnapshot = true;
1740
+ }
1741
+ cancelStructuralAnimation() {
1742
+ this.structuralRevision += 1;
1743
+ if (this.structuralFrame !== undefined) this.document.defaultView?.cancelAnimationFrame(this.structuralFrame);
1744
+ if (this.structuralFinish !== undefined) this.document.defaultView?.clearTimeout(this.structuralFinish);
1745
+ this.structuralFrame = undefined;
1746
+ this.structuralFinish = undefined;
1747
+ this.structuralAnimations.forEach(animation => animation.cancel());
1748
+ this.structuralAnimations = [];
1749
+ if (this.structuralTail) {
1750
+ disposeWebImageRetries(this.structuralTail.layer);
1751
+ this.structuralTail.layer.remove();
1752
+ this.structuralTail = undefined;
1753
+ }
1754
+ if (this.structuralContentOverflow !== undefined) {
1755
+ this.content.style.overflow = this.structuralContentOverflow;
1756
+ this.structuralContentOverflow = undefined;
1757
+ }
1758
+ this.structuralPrefixTransition = false;
1759
+ if (this.structuralFooterElement && this.structuralFooterStyles) {
1760
+ this.structuralFooterElement.style.marginBottom = this.structuralFooterStyles.marginBottom;
1761
+ this.structuralFooterElement.style.transform = this.structuralFooterStyles.transform;
1762
+ this.structuralFooterElement.style.clipPath = this.structuralFooterStyles.clipPath;
1763
+ }
1764
+ this.structuralFooterElement = undefined;
1765
+ this.structuralFooterStyles = undefined;
1766
+ this.structuralScrollInterrupted = false;
1767
+ this.structuralRenderedHeight = undefined;
1768
+ this.structuralTargetHeight = undefined;
1769
+ this.structuralFooterCompensation = 0;
1770
+ this.structuralFooterExpansion = 0;
1771
+ this.structuralProgress = 0;
1772
+ const owner = this.externalScrollHost ?? this.viewport;
1773
+ if (this.structuralAnchorStyles) {
1774
+ owner.style.overflowAnchor = this.structuralAnchorStyles.owner;
1775
+ this.content.style.overflowAnchor = this.structuralAnchorStyles.content;
1776
+ this.structuralAnchorStyles = undefined;
1777
+ }
1778
+ }
1779
+ handleStructuralUserScroll = event => {
1780
+ if (event.type === 'pointerdown' && event.target !== (this.externalScrollHost ?? this.viewport) && event.pointerType !== 'touch') return;
1781
+ this.structuralScrollInterrupted = true;
1782
+ if (this.structuralPrefixTransition) {
1783
+ this.cancelStructuralAnimation();
1784
+ this.recomputeLayout();
1785
+ }
1786
+ };
1787
+ updateStructuralTailWindow() {
1788
+ const tail = this.structuralTail;
1789
+ if (!tail) return;
1790
+ const visible = visibleWebLayoutItems(tail.layout, this.currentOffset(), this.viewportLength(), this.viewportLength() * OVERSCAN_VIEWPORTS).filter(item => item.index >= tail.firstIndex);
1791
+ const desired = new Set(visible.map(item => item.index));
1792
+ tail.mounted.forEach((element, index) => {
1793
+ if (desired.has(index)) return;
1794
+ disposeWebImageRetries(element);
1795
+ element.remove();
1796
+ tail.mounted.delete(index);
1797
+ });
1798
+ visible.forEach(item => {
1799
+ if (tail.mounted.has(item.index)) return;
1800
+ const row = tail.rows[item.index];
1801
+ if (!row) return;
1802
+ const element = createElement(this.document, 'div', 'ok-native-list-item');
1803
+ element.setAttribute('aria-hidden', 'true');
1804
+ element.style.pointerEvents = 'none';
1805
+ element.style.opacity = String((row.style?.container?.opacity ?? row.opacity ?? 1) * (row.disabled ? 0.5 : 1));
1806
+ const body = createRowBody({
1807
+ document: this.document,
1808
+ snapshot: tail.snapshot,
1809
+ selectedKeys: selectionStateFromSnapshot(tail.snapshot).selectedKeys,
1810
+ itemIndex: item.index
1811
+ }, row);
1812
+ applyRowStyle(body, row);
1813
+ element.append(body);
1814
+ this.positionElement(element, item);
1815
+ tail.layer.append(element);
1816
+ tail.mounted.set(item.index, element);
1817
+ });
1818
+ }
1819
+ writeStructuralHeight(height) {
1820
+ if (this.externalScrollHost) this.writeExternalHeight(height);else this.content.style.height = `${height}px`;
1821
+ }
1822
+ reactFooterElement() {
1823
+ return this.contentBounds?.querySelector('[data-testid="native-list-footer-slot"]');
1824
+ }
1825
+ readReactFooterHeight() {
1826
+ return this.reactFooterElement()?.getBoundingClientRect().height ?? 0;
1827
+ }
1828
+ applyStructuralFooterVisual(progress) {
1829
+ const footer = this.structuralFooterElement;
1830
+ if (!footer || this.structuralFooterExpansion <= 0) return;
1831
+ const hidden = this.structuralFooterExpansion * (1 - progress);
1832
+ footer.style.marginBottom = `${-hidden}px`;
1833
+ footer.style.transform = `translateY(${-hidden}px)`;
1834
+ footer.style.clipPath = `inset(${hidden}px 0 0 0)`;
1835
+ }
1836
+ applyStructuralSnapshot(next, transition) {
1837
+ const owner = this.externalScrollHost ?? this.viewport;
1838
+ const oldOffset = owner.scrollTop;
1839
+ const oldScrollHeight = owner.scrollHeight;
1840
+ const oldHeight = this.structuralRenderedHeight ?? (this.content.getBoundingClientRect().height || this.layout.contentHeight);
1841
+ const nextFooterHeight = this.readReactFooterHeight();
1842
+ const oldFooterHeight = this.structuralRenderedHeight === undefined ? this.reactFooterHeight : this.structuralFooterFromHeight + (this.reactFooterHeight - this.structuralFooterFromHeight) * this.structuralProgress;
1843
+ const footerDifference = oldFooterHeight - nextFooterHeight;
1844
+ const startHeight = oldHeight + Math.max(0, footerDifference);
1845
+ const oldSnapshot = this.snapshot;
1846
+ const oldRows = this.rows;
1847
+ const oldLayout = this.layout;
1848
+ const oldItems = oldLayout.items;
1849
+ const nextRows = effectiveRows(next);
1850
+ const prefixCount = Math.min(oldRows.length, nextRows.length);
1851
+ const prefixTailChange = oldSnapshot.layout.kind === next.layout.kind && oldSnapshot.layout.orientation === next.layout.orientation && oldRows.length !== nextRows.length && oldRows.slice(0, prefixCount).every((row, index) => row.key === nextRows[index]?.key);
1852
+ const oldPositions = new Map();
1853
+ this.mounted.forEach((element, index) => {
1854
+ const row = this.rows[index];
1855
+ if (row) oldPositions.set(row.key, element.getBoundingClientRect().top);
1856
+ });
1857
+ const nextKeys = new Set(effectiveRows(next).map(row => row.key));
1858
+ const visibleOffset = this.currentOffset();
1859
+ const visibleSurvivor = oldItems.find(item => item.y + item.height > visibleOffset && nextKeys.has(item.key));
1860
+ const anchor = visibleSurvivor;
1861
+ this.cancelStructuralAnimation();
1862
+ this.structuralScrollInterrupted = false;
1863
+ this.structuralAnchorStyles = {
1864
+ owner: owner.style.overflowAnchor,
1865
+ content: this.content.style.overflowAnchor
1866
+ };
1867
+ owner.style.overflowAnchor = 'none';
1868
+ this.content.style.overflowAnchor = 'none';
1869
+ this.structuralContentOverflow = this.content.style.overflow;
1870
+ if (prefixTailChange) this.content.style.overflow = 'clip';
1871
+ this.structuralRenderedHeight = startHeight;
1872
+ this.structuralFooterFromHeight = oldFooterHeight;
1873
+ this.structuralFooterCompensation = Math.max(0, footerDifference);
1874
+ this.structuralFooterExpansion = Math.max(0, -footerDifference);
1875
+ this.structuralProgress = 0;
1876
+ this.reactFooterHeight = nextFooterHeight;
1877
+ this.structuralFooterElement = this.reactFooterElement() ?? undefined;
1878
+ if (this.structuralFooterElement) {
1879
+ const style = this.structuralFooterElement.style;
1880
+ this.structuralFooterStyles = {
1881
+ marginBottom: style.marginBottom,
1882
+ transform: style.transform,
1883
+ clipPath: style.clipPath
1884
+ };
1885
+ this.applyStructuralFooterVisual(0);
1886
+ }
1887
+ this.setSnapshot(next);
1888
+ const newHeight = this.layout.contentHeight;
1889
+ this.structuralTargetHeight = newHeight;
1890
+ const stablePrefixGeometry = prefixTailChange && oldItems.length === oldRows.length && this.layout.items.length === nextRows.length && oldItems.slice(0, prefixCount).every((item, index) => {
1891
+ const nextItem = this.layout.items[index];
1892
+ return nextItem?.y === item.y && nextItem?.height === item.height && nextItem?.width === item.width;
1893
+ });
1894
+ if (!stablePrefixGeometry) {
1895
+ this.content.style.overflow = this.structuralContentOverflow;
1896
+ this.structuralContentOverflow = undefined;
1897
+ } else {
1898
+ this.structuralPrefixTransition = true;
1899
+ }
1900
+ if (stablePrefixGeometry && nextRows.length < oldRows.length) {
1901
+ const layer = createElement(this.document, 'div', 'ok-native-list-structural-tail');
1902
+ layer.setAttribute('aria-hidden', 'true');
1903
+ layer.setAttribute('inert', '');
1904
+ Object.assign(layer.style, {
1905
+ position: 'absolute',
1906
+ inset: '0',
1907
+ pointerEvents: 'none'
1908
+ });
1909
+ this.content.append(layer);
1910
+ this.structuralTail = {
1911
+ snapshot: oldSnapshot,
1912
+ rows: oldRows,
1913
+ layout: oldLayout,
1914
+ firstIndex: prefixCount,
1915
+ layer,
1916
+ mounted: new Map()
1917
+ };
1918
+ this.updateStructuralTailWindow();
1919
+ }
1920
+ const nextAnchor = anchor && this.layout.items.find(item => item.key === anchor.key);
1921
+ const delta = nextAnchor && anchor ? nextAnchor.y - anchor.y : 0;
1922
+ let finalScrollHeight = oldScrollHeight + newHeight - oldHeight;
1923
+ if (stablePrefixGeometry && this.externalScrollHost) {
1924
+ const beforeMeasure = owner.scrollTop;
1925
+ const tailLayer = this.structuralTail?.layer;
1926
+ if (tailLayer) tailLayer.style.display = 'none';
1927
+ this.writeStructuralHeight(newHeight);
1928
+ this.applyStructuralFooterVisual(1);
1929
+ finalScrollHeight = owner.scrollHeight;
1930
+ this.writeStructuralHeight(startHeight);
1931
+ this.applyStructuralFooterVisual(0);
1932
+ if (tailLayer) tailLayer.style.display = '';
1933
+ owner.scrollTop = beforeMeasure;
1934
+ }
1935
+ const finalMaxOffset = Math.max(0, finalScrollHeight - owner.clientHeight);
1936
+ let targetOffset = Math.max(0, Math.min(oldOffset + delta, finalMaxOffset));
1937
+ if (!visibleSurvivor && transition.anchorKey && !(stablePrefixGeometry && nextRows.length > oldRows.length)) {
1938
+ const fallback = this.layout.items.find(item => item.key === transition.anchorKey);
1939
+ if (fallback) {
1940
+ const pagerStickyInset = Number.parseFloat(this.externalScrollHost?.style.getPropertyValue('--ok-collapsible-pager-sticky-inset') ?? '');
1941
+ const effectiveStickyInset = Math.max(this.externalStickyInset, Number.isFinite(pagerStickyInset) ? pagerStickyInset : 0);
1942
+ const fallbackTop = this.externalScrollHost ? this.externalGeometry().origin + fallback.y - effectiveStickyInset : resolveWebCollapsiblePagerRawOffset(Math.max(0, fallback.y - this.collapsiblePagerInsets().sticky), this.collapsiblePagerInsets().header);
1943
+ if (stablePrefixGeometry && this.externalScrollHost && this.reactFooterHeight > 0) {
1944
+ const footerTop = this.externalGeometry().origin + newHeight;
1945
+ const footerStart = Math.max(0, footerTop + this.reactFooterHeight - owner.clientHeight);
1946
+ const footerEnd = Math.max(0, footerTop - effectiveStickyInset);
1947
+ const nearestVisibleOffset = footerStart <= footerEnd ? Math.max(footerStart, Math.min(oldOffset, footerEnd)) : footerEnd;
1948
+ targetOffset = Math.max(0, Math.min(nearestVisibleOffset, finalMaxOffset));
1949
+ } else {
1950
+ targetOffset = Math.min(targetOffset, Math.max(0, fallbackTop));
1951
+ }
1952
+ }
1953
+ }
1954
+ const duration = transition.durationMs ?? 220;
1955
+ const easing = 'cubic-bezier(0.42, 0, 0.58, 1)';
1956
+ this.mounted.forEach((element, index) => {
1957
+ const row = this.rows[index];
1958
+ const previousTop = row && oldPositions.get(row.key);
1959
+ if (previousTop === undefined || typeof element.animate !== 'function') return;
1960
+ const offset = previousTop - element.getBoundingClientRect().top;
1961
+ if (Math.abs(offset) < 0.5) return;
1962
+ this.structuralAnimations.push(element.animate([{
1963
+ transform: `translateY(${offset}px)`
1964
+ }, {
1965
+ transform: 'translateY(0)'
1966
+ }], {
1967
+ duration,
1968
+ easing
1969
+ }));
1970
+ });
1971
+ const startedAt = this.document.defaultView?.performance.now() ?? Date.now();
1972
+ const revision = this.structuralRevision;
1973
+ const finish = () => {
1974
+ if (this.destroyed || revision !== this.structuralRevision) return;
1975
+ const ownsScroll = !this.structuralScrollInterrupted;
1976
+ this.cancelStructuralAnimation();
1977
+ this.recomputeLayout();
1978
+ if (stablePrefixGeometry && ownsScroll) {
1979
+ owner.scrollTop = Math.max(0, Math.min(targetOffset, owner.scrollHeight - owner.clientHeight));
1980
+ }
1981
+ };
1982
+ const step = time => {
1983
+ if (this.destroyed || revision !== this.structuralRevision) return;
1984
+ if (this.structuralPrefixTransition && this.document.defaultView?.matchMedia?.('(prefers-reduced-motion: reduce)').matches) {
1985
+ finish();
1986
+ return;
1987
+ }
1988
+ const progress = Math.min(1, (time - startedAt) / duration);
1989
+ const eased = progress * progress * (3 - 2 * progress);
1990
+ this.structuralProgress = eased;
1991
+ const renderedHeight = oldHeight + ((this.structuralTargetHeight ?? newHeight) - oldHeight) * eased + this.structuralFooterCompensation * (1 - eased);
1992
+ this.structuralRenderedHeight = renderedHeight;
1993
+ this.writeStructuralHeight(renderedHeight);
1994
+ this.applyStructuralFooterVisual(eased);
1995
+ if (!this.structuralScrollInterrupted) owner.scrollTop = oldOffset + (targetOffset - oldOffset) * eased;
1996
+ this.externalGeometryCache = undefined;
1997
+ this.updateStructuralTailWindow();
1998
+ if (progress < 1) this.structuralFrame = this.document.defaultView?.requestAnimationFrame(step);
1999
+ };
2000
+ this.structuralFrame = this.document.defaultView?.requestAnimationFrame(step);
2001
+ this.structuralFinish = this.document.defaultView?.setTimeout(finish, duration + 40);
2002
+ }
2003
+ currentContentHeight() {
2004
+ return this.layout.contentHeight;
2005
+ }
2006
+ currentSnapshot() {
2007
+ return this.snapshot;
1390
2008
  }
1391
2009
  applyPatches(patches) {
1392
- if (patches.length === 0) return;
1393
- const next = applyRowPatches(this.snapshot, patches);
2010
+ const accepted = containNativeListInput(() => applyValidatedRowPatches(this.snapshot, patches));
2011
+ if (!accepted || accepted.patches.length === 0) return;
2012
+ patches = accepted.patches;
2013
+ const next = accepted.snapshot;
1394
2014
  const selection = new Set(this.selectedKeys);
1395
2015
  patches.forEach(patch => {
1396
2016
  const selected = 'selected' in patch.changes ? patch.changes.selected : undefined;
1397
- if (selected === true) selection.add(patch.key);else if (selected === false) selection.delete(patch.key);
2017
+ if (selected === true) selection.add(patch.key);else if (selected === false || selected === null) selection.delete(patch.key);
1398
2018
  });
1399
- if (webMarketImageBindDeltaForPatches(patches) === 0) {
2019
+ const tableValuesOnly = patches.every(patch => {
2020
+ const index = this.rows.findIndex(row => row.key === patch.key);
2021
+ const before = this.rows[index],
2022
+ after = next.rows[index];
2023
+ return patch.type === 'market' && before?.type === 'market' && after?.type === 'market' && Object.keys(patch.changes).every(key => MARKET_QUOTE_PATCH_FIELDS.has(key) || key === 'webTable') && canPatchMarketTableValues(before, after);
2024
+ });
2025
+ if (webMarketImageBindDeltaForPatches(patches) === 0 || tableValuesOnly) {
1400
2026
  this.snapshot = next;
1401
2027
  this.rows = effectiveRows(next);
1402
2028
  this.selectedKeys = selection;
@@ -1405,11 +2031,11 @@ export class NativeListWebEngine {
1405
2031
  const row = this.rows[index];
1406
2032
  const element = this.mounted.get(index);
1407
2033
  if (row?.type === 'market' && element) {
1408
- setMarketQuoteContent(element, row);
2034
+ if (row.webTable) updateMarketTableValues(element, row);else setMarketQuoteContent(element, row);
1409
2035
  element.dataset.renderSignature = webRowRenderSignature(row);
1410
2036
  }
1411
2037
  if (row?.type === 'market' && this.sticky.dataset.nativeListRowKey === row.key) {
1412
- setMarketQuoteContent(this.sticky, row);
2038
+ if (row.webTable) updateMarketTableValues(this.sticky, row);else setMarketQuoteContent(this.sticky, row);
1413
2039
  this.sticky.dataset.renderSignature = webRowRenderSignature(row);
1414
2040
  }
1415
2041
  });
@@ -1479,7 +2105,10 @@ export class NativeListWebEngine {
1479
2105
  };
1480
2106
  return;
1481
2107
  }
1482
- this.scrollToAbsoluteOffset(offset, animated);
2108
+ if (this.externalScrollHost) {
2109
+ const geometry = this.externalGeometry();
2110
+ this.writeExternalOffset(geometry.containerOrigin + offset, animated);
2111
+ } else this.scrollToAbsoluteOffset(offset, animated);
1483
2112
  }
1484
2113
  scrollToEnd(animated) {
1485
2114
  this.notifyScrollCommandAccepted();
@@ -1490,7 +2119,10 @@ export class NativeListWebEngine {
1490
2119
  };
1491
2120
  return;
1492
2121
  }
1493
- this.scrollToAbsoluteOffset(Math.max(0, this.contentLength() - this.viewportLength()), animated);
2122
+ if (this.externalScrollHost) {
2123
+ const geometry = this.externalGeometry();
2124
+ this.writeExternalOffset(geometry.end - this.externalScrollHost.clientHeight, animated);
2125
+ } else this.scrollToAbsoluteOffset(Math.max(0, this.contentLength() - this.viewportLength()), animated);
1494
2126
  }
1495
2127
  scrollToLocation(params, scroll) {
1496
2128
  const index = resolveLocationIndex(this.snapshot.rows, params);
@@ -1533,25 +2165,35 @@ export class NativeListWebEngine {
1533
2165
  }
1534
2166
  destroy() {
1535
2167
  if (this.destroyed) return;
2168
+ this.cancelStructuralAnimation();
2169
+ this.pressedHelpElement = undefined;
1536
2170
  this.invalidateActionAnchor('destroy');
1537
2171
  this.destroyed = true;
1538
2172
  if (this.frameHandle !== undefined) this.cancelFrame(this.frameHandle);
1539
2173
  if (this.sectionIndexTransformFrame !== undefined) this.cancelFrame(this.sectionIndexTransformFrame);
1540
2174
  if (this.reorderMovementTimer !== undefined) this.document.defaultView?.clearTimeout(this.reorderMovementTimer);
1541
2175
  this.resizeObserver?.disconnect();
2176
+ this.externalScrollHost?.removeEventListener('scroll', this.handleExternalScroll, true);
2177
+ this.document.fonts?.removeEventListener('loadingdone', this.handleWindowResize);
1542
2178
  this.sectionIndexTransformObserver?.disconnect();
1543
2179
  this.document.defaultView?.removeEventListener('resize', this.handleWindowResize);
1544
2180
  this.pendingScroll = undefined;
1545
- this.viewport.removeEventListener('ok-collapsible-pager-cancel-scroll-command', this.handlePagerScrollCommandCancel);
2181
+ (this.externalScrollHost ?? this.viewport).removeEventListener('ok-collapsible-pager-cancel-scroll-command', this.handlePagerScrollCommandCancel);
2182
+ for (const event of ['wheel', 'pointerdown', 'touchstart']) (this.externalScrollHost ?? this.viewport).removeEventListener(event, this.handleStructuralUserScroll);
1546
2183
  this.viewport.removeEventListener('scroll', this.handleScroll);
1547
- this.viewport.removeEventListener('ok-collapsible-pager-insets-changed', this.handleCollapsiblePagerInsetsChanged);
2184
+ (this.externalScrollHost ?? this.viewport).removeEventListener('ok-collapsible-pager-insets-changed', this.handleCollapsiblePagerInsetsChanged);
1548
2185
  this.root.removeEventListener('click', this.handleClick);
2186
+ this.root.removeEventListener('contextmenu', this.handleMarketContextMenu);
1549
2187
  this.cancelMarketPointer();
1550
2188
  this.root.removeEventListener('pointerdown', this.handleMarketPointerDown);
1551
2189
  this.root.removeEventListener('pointermove', this.handleMarketPointerMove);
2190
+ this.root.removeEventListener('touchmove', this.handleMarketTouchMove);
1552
2191
  this.root.removeEventListener('pointerup', this.handleMarketPointerEnd);
1553
2192
  this.root.removeEventListener('pointercancel', this.handleMarketPointerEnd);
1554
2193
  this.root.removeEventListener('pointerover', this.handleTitlePointerOver);
2194
+ this.root.removeEventListener('pointerdown', this.handleIconHelpPointerDown);
2195
+ this.root.removeEventListener('focusin', this.handleTitlePointerOver);
2196
+ this.root.removeEventListener('focusout', this.handleTitlePointerOut);
1555
2197
  this.root.removeEventListener('pointerout', this.handleTitlePointerOut);
1556
2198
  this.root.removeEventListener('keydown', this.handleKeyDown);
1557
2199
  this.cancelPointerReorder(true);
@@ -1567,10 +2209,10 @@ export class NativeListWebEngine {
1567
2209
  this.indexRail.removeEventListener('pointerup', this.handleIndexPointerEnd);
1568
2210
  this.indexRail.removeEventListener('pointercancel', this.handleIndexPointerEnd);
1569
2211
  this.indexRail.removeEventListener('click', this.handleIndexClick);
1570
- this.viewport.removeEventListener('pointerdown', this.handlePullStart);
1571
- this.viewport.removeEventListener('pointermove', this.handlePullMove);
1572
- this.viewport.removeEventListener('pointerup', this.handlePullEnd);
1573
- this.viewport.removeEventListener('pointercancel', this.handlePullEnd);
2212
+ this.pullTarget.removeEventListener('pointerdown', this.handlePullStart);
2213
+ this.pullTarget.removeEventListener('pointermove', this.handlePullMove);
2214
+ this.pullTarget.removeEventListener('pointerup', this.handlePullEnd);
2215
+ this.pullTarget.removeEventListener('pointercancel', this.handlePullEnd);
1574
2216
  const host = this.root.parentElement;
1575
2217
  disposeWebImageRetries(this.root);
1576
2218
  Object.values(this.pool).forEach(elements => elements.forEach(disposeWebImageRetries));
@@ -1588,6 +2230,7 @@ export class NativeListWebEngine {
1588
2230
  }
1589
2231
  setSnapshot(snapshot, selectedKeys) {
1590
2232
  this.cancelMarketPointer();
2233
+ this.pressedHelpElement = undefined;
1591
2234
  this.measuredRendererHeights.clear();
1592
2235
  this.snapshot = snapshot;
1593
2236
  this.rows = effectiveRows(snapshot);
@@ -1605,8 +2248,10 @@ export class NativeListWebEngine {
1605
2248
  '--nl-row': theme.rowBackground,
1606
2249
  '--nl-selected': theme.rowSelectedBackground,
1607
2250
  '--nl-pressed': theme.rowPressedBackground,
2251
+ '--nl-hover': theme.rowHoverBackground ?? theme.rowPressedBackground,
1608
2252
  '--nl-subdued': theme.subduedBackground,
1609
2253
  '--nl-strong': theme.strongBackground,
2254
+ '--nl-image-fallback-background': theme.imageFallbackBackground ?? 'transparent',
1610
2255
  '--nl-primary': theme.primaryText,
1611
2256
  '--nl-secondary': theme.secondaryText,
1612
2257
  '--nl-disabled': theme.disabledText,
@@ -1620,6 +2265,7 @@ export class NativeListWebEngine {
1620
2265
  '--nl-separator': theme.separator,
1621
2266
  '--nl-accent': theme.accent,
1622
2267
  '--nl-positive': theme.positive,
2268
+ '--nl-success-background': theme.successBackground,
1623
2269
  '--nl-negative': theme.negative,
1624
2270
  '--nl-critical': theme.criticalBackground,
1625
2271
  '--nl-inverse': theme.inverseBackground,
@@ -1653,8 +2299,61 @@ export class NativeListWebEngine {
1653
2299
  if (value === undefined) this.root.style.removeProperty(name);else this.root.style.setProperty(name, value);
1654
2300
  });
1655
2301
  }
2302
+ computeLayout(viewportWidth, viewportHeight) {
2303
+ const measuredSnapshot = {
2304
+ ...this.snapshot,
2305
+ rows: this.snapshot.rows.map(row => row.style?.container?.height === undefined && row.height === undefined && this.measuredRendererHeights.get(row.key)?.signature === webRowRenderSignature(row) ? {
2306
+ ...row,
2307
+ height: this.measuredRendererHeights.get(row.key).height
2308
+ } : row)
2309
+ };
2310
+ let layout = computeWebListLayout(measuredSnapshot, viewportWidth, viewportHeight, this.reorderCompactKey);
2311
+ if (this.externalScrollHost) {
2312
+ const padding = paddingValues(this.snapshot);
2313
+ layout = {
2314
+ ...layout,
2315
+ contentHeight: Math.max(padding.top, ...layout.items.map(item => item.y + item.height)) + padding.bottom
2316
+ };
2317
+ }
2318
+ return layout;
2319
+ }
2320
+ writeExternalHeight(height) {
2321
+ const value = String(height) + 'px';
2322
+ this.content.style.height = value;
2323
+ this.viewport.style.height = value;
2324
+ this.viewportFrame.style.height = value;
2325
+ this.root.style.height = value;
2326
+ }
1656
2327
  recomputeLayout = () => {
1657
2328
  if (this.destroyed) return;
2329
+ if (this.structuralPrefixTransition && this.lastViewportWidth > 0 && this.viewport.clientWidth > 0 && this.viewport.clientWidth !== this.lastViewportWidth) this.cancelStructuralAnimation();
2330
+ if (this.structuralRenderedHeight === undefined) this.reactFooterHeight = this.readReactFooterHeight();else {
2331
+ const nextFooterHeight = this.readReactFooterHeight();
2332
+ const footerDelta = this.reactFooterHeight - nextFooterHeight;
2333
+ if (footerDelta !== 0) {
2334
+ this.reactFooterHeight = nextFooterHeight;
2335
+ const priorCompensation = this.structuralFooterCompensation;
2336
+ const difference = this.structuralFooterFromHeight - nextFooterHeight;
2337
+ this.structuralFooterCompensation = Math.max(0, difference);
2338
+ this.structuralFooterExpansion = Math.max(0, -difference);
2339
+ this.structuralRenderedHeight += (this.structuralFooterCompensation - priorCompensation) * (1 - this.structuralProgress);
2340
+ this.applyStructuralFooterVisual(this.structuralProgress);
2341
+ }
2342
+ }
2343
+ const cachedWidth = this.lastViewportWidth;
2344
+ const cachedHeight = this.lastViewportHeight;
2345
+ const precomputedLayout = this.externalScrollHost && cachedWidth > 0 && cachedHeight > 0 ? this.computeLayout(cachedWidth, cachedHeight) : undefined;
2346
+ if (precomputedLayout && this.structuralRenderedHeight === undefined) {
2347
+ // Commit appended row extent before measuring React-owned slot changes.
2348
+ this.writeExternalHeight(Math.max(this.layout.contentHeight, precomputedLayout.contentHeight));
2349
+ }
2350
+ this.externalGeometryCache = undefined;
2351
+ if (this.externalScrollHost) {
2352
+ const geometry = this.externalGeometry();
2353
+ const previousOrigin = this.externalOrigin;
2354
+ this.externalOrigin = geometry.origin;
2355
+ if (previousOrigin !== undefined && geometry.origin !== previousOrigin && this.externalScrollHost.scrollTop > previousOrigin && geometry.visible) this.externalScrollHost.scrollTop += geometry.origin - previousOrigin;
2356
+ }
1658
2357
  const viewportWidth = this.viewport.clientWidth;
1659
2358
  const viewportHeight = this.snapshot.layout.orientation === 'horizontal' ? this.viewport.clientHeight : this.verticalScrollMetrics().viewportLength;
1660
2359
  const stickyInset = this.snapshot.layout.orientation === 'horizontal' ? 0 : this.collapsiblePagerInsets().sticky;
@@ -1672,16 +2371,15 @@ export class NativeListWebEngine {
1672
2371
  this.lastViewportWidth = viewportWidth;
1673
2372
  this.lastViewportHeight = viewportHeight;
1674
2373
  const previousHorizontal = this.layout.horizontal;
1675
- const measuredSnapshot = {
1676
- ...this.snapshot,
1677
- rows: this.snapshot.rows.map(row => row.style?.container?.height === undefined && row.height === undefined && this.measuredRendererHeights.get(row.key)?.signature === webRowRenderSignature(row) ? {
1678
- ...row,
1679
- height: this.measuredRendererHeights.get(row.key).height
1680
- } : row)
1681
- };
1682
- this.layout = computeWebListLayout(measuredSnapshot, viewportWidth, viewportHeight, this.reorderCompactKey);
2374
+ this.layout = precomputedLayout && viewportWidth === cachedWidth && viewportHeight === cachedHeight ? precomputedLayout : this.computeLayout(viewportWidth, viewportHeight);
1683
2375
  this.content.style.width = String(this.layout.contentWidth) + 'px';
1684
- this.content.style.height = String(this.layout.contentHeight) + 'px';
2376
+ const renderedHeight = this.structuralRenderedHeight ?? this.layout.contentHeight;
2377
+ this.content.style.height = String(renderedHeight) + 'px';
2378
+ if (this.externalScrollHost) {
2379
+ this.writeExternalHeight(renderedHeight);
2380
+ this.externalGeometryCache = undefined;
2381
+ }
2382
+ if (this.structuralRenderedHeight !== undefined) this.structuralTargetHeight = this.layout.contentHeight;
1685
2383
  this.renderSectionIndex(this.viewport.clientHeight <= 0 ? DEFAULT_VIEWPORT_HEIGHT : Math.max(1, viewportHeight), stickyInset);
1686
2384
  if (previousHorizontal !== this.layout.horizontal) {
1687
2385
  this.viewport.scrollLeft = 0;
@@ -1691,6 +2389,11 @@ export class NativeListWebEngine {
1691
2389
  this.performPendingScroll();
1692
2390
  };
1693
2391
  updateAvatarWindow() {
2392
+ if (this.externalScrollHost && !this.externalGeometry().visible) {
2393
+ this.avatarLeases.forEach(lease => lease());
2394
+ this.avatarLeases.clear();
2395
+ return;
2396
+ }
1694
2397
  const offset = this.currentOffset();
1695
2398
  if (offset !== this.avatarOffset) this.avatarDirection = Math.sign(offset - this.avatarOffset);
1696
2399
  this.avatarOffset = offset;
@@ -1729,7 +2432,7 @@ export class NativeListWebEngine {
1729
2432
  renderWindow() {
1730
2433
  this.updateAvatarWindow();
1731
2434
  const viewportLength = this.viewportLength();
1732
- const visible = webLayoutItemsForMount(this.layout, this.currentOffset(), viewportLength, this.virtualizationEnabled, viewportLength * OVERSCAN_VIEWPORTS);
2435
+ const visible = this.externalScrollHost && !this.externalGeometry().visible ? [] : webLayoutItemsForMount(this.layout, this.currentOffset(), viewportLength, this.virtualizationEnabled, viewportLength * OVERSCAN_VIEWPORTS);
1733
2436
  const desired = new Set(visible.map(item => item.index));
1734
2437
  this.mounted.forEach((element, index) => {
1735
2438
  const nextRow = this.rows[index];
@@ -1784,6 +2487,7 @@ export class NativeListWebEngine {
1784
2487
  }
1785
2488
  this.updateVisibleSelection();
1786
2489
  this.updateVisibleState();
2490
+ this.updateStructuralTailWindow();
1787
2491
  }
1788
2492
  positionElement(element, item) {
1789
2493
  element.style.transform = 'translate3d(' + String(item.x) + 'px,' + String(item.y) + 'px,0)';
@@ -1799,6 +2503,7 @@ export class NativeListWebEngine {
1799
2503
  const bindingEpoch = String(++this.bindingEpochCounter);
1800
2504
  element.className = overlay ? 'ok-native-list-item ok-native-list-sticky' : 'ok-native-list-item';
1801
2505
  setData(element, 'nativeListRowKey', row.key);
2506
+ setData(element, 'nativeListMediaGallery', row.type === 'mediaTile' && row.variant === 'gallery' ? 'true' : undefined);
1802
2507
  setData(element, 'nativeListBindingEpoch', bindingEpoch);
1803
2508
  setData(element, 'nativeListRowIndex', index);
1804
2509
  setData(element, 'nativeListDisabled', Boolean(row.disabled));
@@ -1828,7 +2533,7 @@ export class NativeListWebEngine {
1828
2533
  const body = reusableBody ?? createRowBody(context, row);
1829
2534
  if (reusableBody) {
1830
2535
  resetRowContainerStyle(body);
1831
- registered.bind(body, rendererPrimitives(context));
2536
+ registered.bind(body, rendererPrimitives(context, Boolean(row.disabled)));
1832
2537
  }
1833
2538
  // OneKey patch: explicit selector fields preserve original page geometry.
1834
2539
  element.style.contain = row.backgroundFullWidth ? 'layout style' : '';
@@ -2075,7 +2780,7 @@ export class NativeListWebEngine {
2075
2780
  if (!Number.isNaN(stickyIndex)) update(this.sticky, this.rows[stickyIndex]);
2076
2781
  }
2077
2782
  updateVisibleState() {
2078
- const visible = visibleWebLayoutItems(this.layout, this.currentOffset(), this.viewportLength());
2783
+ const visible = this.externalScrollHost && !this.externalGeometry().visible ? [] : visibleWebLayoutItems(this.layout, this.currentOffset(), this.viewportLength());
2079
2784
  const first = visible[0];
2080
2785
  const last = visible.at(-1);
2081
2786
  const signature = String(first?.index ?? -1) + ':' + String(last?.index ?? -1) + ':' + (first?.key ?? '') + ':' + (last?.key ?? '');
@@ -2126,6 +2831,7 @@ export class NativeListWebEngine {
2126
2831
  this.sticky.style.right = 'auto';
2127
2832
  this.sticky.style.width = String(item.width) + 'px';
2128
2833
  this.sticky.style.height = String(item.height) + 'px';
2834
+ if (this.externalScrollHost) this.sticky.style.top = String(Math.max(0, this.currentOffset())) + 'px';
2129
2835
  let nextIndex = -1;
2130
2836
  for (let cursor = index + 1; cursor < this.rows.length; cursor += 1) {
2131
2837
  const candidate = this.rows[cursor];
@@ -2146,7 +2852,7 @@ export class NativeListWebEngine {
2146
2852
  this.indexRail.querySelectorAll('[data-section-key]').forEach(button => setData(button, 'active', button.dataset.sectionKey === activeKey));
2147
2853
  }
2148
2854
  checkEndReached(lastVisibleIndex) {
2149
- if (!this.snapshot.capabilities?.loadMore || this.reachedGeneration === this.snapshot.generation || this.rows.length === 0) return;
2855
+ if (this.externalScrollHost && !this.externalGeometry().visible || !this.snapshot.capabilities?.loadMore || this.reachedGeneration === this.snapshot.generation || this.rows.length === 0) return;
2150
2856
  const threshold = Math.max(1, Math.ceil(this.rows.length * (this.snapshot.capabilities.endReachedThreshold ?? 0.2)));
2151
2857
  if (lastVisibleIndex < this.rows.length - threshold) return;
2152
2858
  this.reachedGeneration = this.snapshot.generation;
@@ -2160,6 +2866,7 @@ export class NativeListWebEngine {
2160
2866
  this.callbacks.onScrollToIndexFailed?.(scrollFailure(this.rows, index, reason, average));
2161
2867
  }
2162
2868
  canScroll() {
2869
+ if (this.externalScrollHost) return this.viewport.clientWidth > 0 && this.externalScrollHost.clientHeight > 0;
2163
2870
  const viewportLength = this.layout.horizontal ? this.viewport.clientWidth : this.viewport.clientHeight;
2164
2871
  return viewportLength > 0 && this.layout.items.length > 0;
2165
2872
  }
@@ -2167,16 +2874,25 @@ export class NativeListWebEngine {
2167
2874
  if (this.layout.horizontal) {
2168
2875
  return this.viewport.clientWidth || DEFAULT_VIEWPORT_WIDTH;
2169
2876
  }
2877
+ if (this.externalScrollHost) return this.externalGeometry().viewportLength;
2170
2878
  if (this.viewport.clientHeight <= 0) return DEFAULT_VIEWPORT_HEIGHT;
2171
2879
  return Math.max(1, this.verticalScrollMetrics().viewportLength);
2172
2880
  }
2173
2881
  contentLength() {
2882
+ if (this.externalScrollHost) {
2883
+ const geometry = this.externalGeometry();
2884
+ return Math.max(this.layout.contentHeight, geometry.end - geometry.origin);
2885
+ }
2174
2886
  return this.layout.horizontal ? this.layout.contentWidth : this.layout.contentHeight;
2175
2887
  }
2176
2888
  currentOffset() {
2177
2889
  return this.layout.horizontal ? this.viewport.scrollLeft : this.verticalScrollMetrics().offset;
2178
2890
  }
2179
2891
  collapsiblePagerInsets() {
2892
+ if (this.externalScrollHost) return {
2893
+ header: 0,
2894
+ sticky: this.externalStickyInset
2895
+ };
2180
2896
  const readInset = name => {
2181
2897
  const parsed = Number.parseFloat(this.viewport.style.getPropertyValue(name));
2182
2898
  return Number.isFinite(parsed) ? Math.max(0, parsed) : 0;
@@ -2187,13 +2903,29 @@ export class NativeListWebEngine {
2187
2903
  };
2188
2904
  }
2189
2905
  verticalScrollMetrics() {
2906
+ if (this.externalScrollHost) return this.externalGeometry();
2190
2907
  const insets = this.collapsiblePagerInsets();
2191
2908
  return resolveWebCollapsiblePagerScrollMetrics(this.viewport.scrollTop, this.viewport.clientHeight, insets.header, insets.sticky);
2192
2909
  }
2193
2910
  handleCollapsiblePagerInsetsChanged = () => {
2194
2911
  this.recomputeLayout();
2195
2912
  };
2913
+ writeExternalOffset(rawOffset, animated) {
2914
+ this.externalGeometryCache = undefined;
2915
+ const host = this.externalScrollHost;
2916
+ const scrollTo = host.ownerDocument.defaultView?.Element.prototype.scrollTo ?? host.scrollTo;
2917
+ scrollTo.call(host, {
2918
+ top: Math.max(0, Math.min(host.scrollHeight - host.clientHeight, rawOffset)),
2919
+ behavior: animated ? 'smooth' : 'auto'
2920
+ });
2921
+ this.scheduleFrame();
2922
+ }
2196
2923
  scrollToAbsoluteOffset(offset, animated) {
2924
+ if (this.externalScrollHost) {
2925
+ const geometry = this.externalGeometry();
2926
+ this.writeExternalOffset(geometry.origin + offset - this.externalStickyInset, animated);
2927
+ return;
2928
+ }
2197
2929
  const resolved = Math.min(Math.max(0, offset), Math.max(0, this.contentLength() - this.viewportLength()));
2198
2930
  const rawOffset = this.layout.horizontal ? resolved : resolveWebCollapsiblePagerRawOffset(resolved, this.collapsiblePagerInsets().header);
2199
2931
  this.viewport.scrollTo(this.layout.horizontal ? {
@@ -2242,13 +2974,16 @@ export class NativeListWebEngine {
2242
2974
  this.renderFooter();
2243
2975
  this.callbacks.onSelectionDelta?.(result.delta);
2244
2976
  }
2245
- emitRowAction(row, actionKey, actionElement, rowElement) {
2977
+ emitRowAction(row, actionKey, actionElement, rowElement, windowPoint) {
2246
2978
  const anchor = actionElement && rowElement ? this.createActionAnchor(actionElement, rowElement) : undefined;
2247
2979
  this.callbacks.onRowAction?.({
2248
2980
  rowKey: row.key,
2249
2981
  actionKey,
2250
2982
  sectionKey: row.sectionKey,
2251
- anchor
2983
+ anchor,
2984
+ ...(windowPoint && Number.isFinite(windowPoint.x) && Number.isFinite(windowPoint.y) ? {
2985
+ windowPoint
2986
+ } : {})
2252
2987
  });
2253
2988
  }
2254
2989
  createActionAnchor(actionElement, rowElement, sourceOverride) {
@@ -2280,6 +3015,7 @@ export class NativeListWebEngine {
2280
3015
  return anchor.actionElement.isConnected && anchor.rowElement.isConnected && anchor.rowElement.contains(anchor.actionElement) && anchor.rowElement.dataset.nativeListBindingEpoch === anchor.bindingEpoch;
2281
3016
  }
2282
3017
  invalidateActionAnchorForElement(element) {
3018
+ if (this.pressedHelpElement && element.contains(this.pressedHelpElement)) this.pressedHelpElement = undefined;
2283
3019
  const anchor = this.actionAnchor;
2284
3020
  if (anchor && (element === anchor.rowElement || element.contains(anchor.actionElement))) {
2285
3021
  this.invalidateActionAnchor('rebind');
@@ -2329,27 +3065,52 @@ export class NativeListWebEngine {
2329
3065
  this.document.defaultView?.clearTimeout(state.timer);
2330
3066
  this.marketPointer = undefined;
2331
3067
  }
3068
+ handleMarketContextMenu = event => {
3069
+ if (!(event.target instanceof Element) || event.target.closest('[data-native-list-action]')) return;
3070
+ const element = event.target.closest('[data-native-list-row-key]');
3071
+ const row = this.rowAtElement(element);
3072
+ if (row?.type !== 'market' || !row.webTable?.contextMenuActionKey || !element || !isRowPressEnabled(row)) return;
3073
+ event.preventDefault();
3074
+ this.cancelMarketPointer();
3075
+ markActionAnchorSource(element, 'row');
3076
+ const rect = element.getBoundingClientRect();
3077
+ this.emitRowAction(row, row.webTable.contextMenuActionKey, element, element, event.clientX || event.clientY ? {
3078
+ x: event.clientX,
3079
+ y: event.clientY
3080
+ } : {
3081
+ x: rect.left + rect.width / 2,
3082
+ y: rect.top + rect.height / 2
3083
+ });
3084
+ };
2332
3085
  handleMarketPointerDown = event => {
2333
3086
  if (event.button !== 0 || !(event.target instanceof Element)) return;
2334
3087
  this.marketLongPressFired = false;
2335
3088
  if (event.target.closest('[data-native-list-action]')) return;
2336
3089
  const rowElement = event.target.closest('[data-native-list-row-key]');
2337
3090
  const row = this.rowAtElement(rowElement);
2338
- if (row?.type !== 'market' || !isRowPressEnabled(row)) return;
3091
+ if (row?.type !== 'market' && row?.type !== 'identity' || !isRowPressEnabled(row)) return;
2339
3092
  this.cancelMarketPointer();
2340
- if (row.pressInActionKey) this.emitRowAction(row, row.pressInActionKey, rowElement ?? undefined, rowElement ?? undefined);
3093
+ if (row.type === 'market' && row.pressInActionKey) this.emitRowAction(row, row.pressInActionKey, rowElement ?? undefined, rowElement ?? undefined);
2341
3094
  if (!row.longPressActionKey || !rowElement) return;
2342
3095
  markActionAnchorSource(rowElement, 'row');
3096
+ const bindingEpoch = rowElement.dataset.nativeListBindingEpoch;
2343
3097
  const timer = this.document.defaultView?.setTimeout(() => {
2344
3098
  const current = this.marketPointer;
2345
3099
  if (!current || current.pointerId !== event.pointerId) return;
3100
+ const currentRow = this.rowAtElement(rowElement);
2346
3101
  this.marketPointer = undefined;
3102
+ if (!rowElement.isConnected || rowElement.dataset.nativeListBindingEpoch !== bindingEpoch || currentRow?.key !== row.key || currentRow.type !== 'market' && currentRow.type !== 'identity' || !isRowPressEnabled(currentRow) || !currentRow.longPressActionKey) return;
2347
3103
  this.marketLongPressFired = true;
2348
- this.emitRowAction(row, row.longPressActionKey, rowElement, rowElement);
3104
+ this.emitRowAction(currentRow, currentRow.longPressActionKey, rowElement, rowElement, {
3105
+ x: event.clientX,
3106
+ y: event.clientY
3107
+ });
2349
3108
  }, MARKET_LONG_PRESS_MS);
2350
3109
  if (timer === undefined) return;
2351
3110
  this.marketPointer = {
2352
3111
  pointerId: event.pointerId,
3112
+ pointerType: event.pointerType,
3113
+ compact: row.type === 'identity' || !row.webTable,
2353
3114
  rowKey: row.key,
2354
3115
  startX: event.clientX,
2355
3116
  startY: event.clientY,
@@ -2359,7 +3120,21 @@ export class NativeListWebEngine {
2359
3120
  handleMarketPointerMove = event => {
2360
3121
  const state = this.marketPointer;
2361
3122
  if (!state || state.pointerId !== event.pointerId) return;
2362
- if (Math.abs(event.clientX - state.startX) > MARKET_MOVE_CANCEL_PX || Math.abs(event.clientY - state.startY) > MARKET_MOVE_CANCEL_PX) this.cancelMarketPointer();
3123
+ if (state.compact && state.pointerType === 'touch') return;
3124
+ const row = this.rows.find(item => item.key === state.rowKey);
3125
+ const threshold = row?.type === 'market' && !row.webTable ? 3 : MARKET_MOVE_CANCEL_PX;
3126
+ if (Math.abs(event.clientX - state.startX) > threshold || Math.abs(event.clientY - state.startY) > threshold) this.cancelMarketPointer();
3127
+ };
3128
+ handleMarketTouchMove = event => {
3129
+ const state = this.marketPointer;
3130
+ if (!state?.compact || state.pointerType !== 'touch' || !(event.target instanceof Element) || event.target.closest('[data-native-list-row-key]')?.dataset.nativeListRowKey !== state.rowKey) return;
3131
+ if (event.touches.length > 1) {
3132
+ this.cancelMarketPointer();
3133
+ return;
3134
+ }
3135
+ const touch = event.touches[0] ?? event.changedTouches[0];
3136
+ if (!touch || !Number.isFinite(touch.clientX) || !Number.isFinite(touch.clientY)) return;
3137
+ if (Math.abs(touch.clientX - state.startX) > 3 || Math.abs(touch.clientY - state.startY) > 3) this.cancelMarketPointer();
2363
3138
  };
2364
3139
  handleMarketPointerEnd = event => {
2365
3140
  if (this.marketPointer?.pointerId === event.pointerId) this.cancelMarketPointer();
@@ -2371,6 +3146,14 @@ export class NativeListWebEngine {
2371
3146
  if (!(target instanceof Element)) return;
2372
3147
  const action = target.closest('[data-native-list-hover-action]');
2373
3148
  if (!action || event.relatedTarget instanceof Node && action.contains(event.relatedTarget)) return;
3149
+ if (action.dataset.nativeListIconHelp === 'true') {
3150
+ if (event.type === 'pointerover' && event.pointerType === 'touch') return;
3151
+ if (this.pressedHelpElement === action) return;
3152
+ }
3153
+ if (action.classList.contains('ok-native-list-market-subtitle-prefix') && action.scrollWidth <= action.clientWidth + 1) return;
3154
+ this.emitHoverAction(action);
3155
+ };
3156
+ emitHoverAction(action) {
2374
3157
  const rowElement = action.closest('[data-native-list-row-key]');
2375
3158
  const row = this.rowAtElement(rowElement);
2376
3159
  const memberKey = action.closest('[data-native-list-group-member-key]')?.dataset.nativeListGroupMemberKey;
@@ -2379,12 +3162,26 @@ export class NativeListWebEngine {
2379
3162
  // Legacy Web: hover checks only the resolved source (the member for a
2380
3163
  // WalletGroup), not the enclosing row's `disabled`.
2381
3164
  if (sourceRow && !sourceRow.disabled && actionKey) this.emitRowAction(sourceRow, actionKey, action, rowElement ?? undefined);
3165
+ }
3166
+ handleIconHelpPointerDown = event => {
3167
+ const target = event.target;
3168
+ if (!(target instanceof Element)) return;
3169
+ const action = target.closest('[data-native-list-icon-help="true"]');
3170
+ if (!action) return;
3171
+ if (event.pointerType === 'touch') {
3172
+ if (this.actionAnchor?.actionElement === action && this.actionAnchor.open) this.invalidateActionAnchor('pointerLeave');else this.emitHoverAction(action);
3173
+ } else {
3174
+ this.pressedHelpElement = action;
3175
+ if (this.actionAnchor?.actionElement === action) this.invalidateActionAnchor('pointerLeave');
3176
+ }
2382
3177
  };
2383
3178
  handleTitlePointerOut = event => {
2384
3179
  const target = event.target;
2385
3180
  if (!(target instanceof Element)) return;
2386
3181
  const action = target.closest('[data-native-list-hover-action]');
2387
3182
  if (!action || event.relatedTarget instanceof Node && action.contains(event.relatedTarget)) return;
3183
+ if (action.dataset.nativeListIconHelp === 'true' && event.type === 'pointerout' && event.pointerType === 'touch') return;
3184
+ if (event.type === 'pointerout' && this.pressedHelpElement === action) this.pressedHelpElement = undefined;
2388
3185
  if (this.actionAnchor?.actionElement === action) this.invalidateActionAnchor('pointerLeave');
2389
3186
  };
2390
3187
  handleClick = event => {
@@ -2396,6 +3193,11 @@ export class NativeListWebEngine {
2396
3193
  }
2397
3194
  const target = event.target;
2398
3195
  if (!(target instanceof Element)) return;
3196
+ if (target.closest('[data-native-list-icon-help="true"]')) {
3197
+ event.preventDefault();
3198
+ event.stopPropagation();
3199
+ return;
3200
+ }
2399
3201
  const rowElement = target.closest('[data-native-list-row-key]');
2400
3202
  const row = this.rowAtElement(rowElement);
2401
3203
  if (!row || row.disabled) return;
@@ -2407,6 +3209,8 @@ export class NativeListWebEngine {
2407
3209
  // member press is blocked by `isRowPressEnabled` in `handleRowPress`.
2408
3210
  const action = target.closest('[data-native-list-action]');
2409
3211
  if (action) {
3212
+ if (action.tagName === 'BUTTON' && action.hasAttribute('disabled')) return;
3213
+ if (action.classList.contains('ok-native-list-trailing-button')) event.stopPropagation();
2410
3214
  const scope = action.dataset.selectionScope;
2411
3215
  if (scope === 'row') this.activateSelection({
2412
3216
  scope: 'row'
@@ -2421,6 +3225,11 @@ export class NativeListWebEngine {
2421
3225
  this.handleRowPress(sourceRow, rowElement ?? undefined, memberElement ?? rowElement ?? undefined);
2422
3226
  };
2423
3227
  handleKeyDown = event => {
3228
+ if ((event.key === 'Enter' || event.key === ' ') && event.target instanceof HTMLElement && event.target.matches('[role="button"][data-native-list-hover-action]')) {
3229
+ event.preventDefault();
3230
+ if (this.actionAnchor?.actionElement !== event.target || !this.actionAnchor.open) this.emitHoverAction(event.target);
3231
+ return;
3232
+ }
2424
3233
  // OneKey patch: non-button title help supports keyboard activation.
2425
3234
  if ((event.key === 'Enter' || event.key === ' ') && event.target instanceof HTMLElement && event.target.matches('[role="button"][data-native-list-action]')) {
2426
3235
  event.preventDefault();
@@ -2516,7 +3325,13 @@ export class NativeListWebEngine {
2516
3325
  preventScroll: true
2517
3326
  });
2518
3327
  }
3328
+ handleExternalScroll = event => {
3329
+ const target = event.target;
3330
+ if (target === this.externalScrollHost || target instanceof Element && target !== this.root && this.externalScrollHost?.contains(target) && target.contains(this.root)) this.handleScroll();
3331
+ };
2519
3332
  handleScroll = () => {
3333
+ this.externalGeometryCache = undefined;
3334
+ this.pressedHelpElement = undefined;
2520
3335
  this.cancelMarketPointer();
2521
3336
  this.invalidateActionAnchor('scroll');
2522
3337
  this.scheduleFrame();
@@ -2530,6 +3345,8 @@ export class NativeListWebEngine {
2530
3345
  if (this.frameHandle !== undefined || this.destroyed) return;
2531
3346
  this.frameHandle = this.requestFrame(() => {
2532
3347
  this.frameHandle = undefined;
3348
+ this.externalGeometryCache = undefined;
3349
+ if (this.externalScrollHost) this.externalOrigin = this.externalGeometry().origin;
2533
3350
  if (this.virtualizationEnabled) this.renderWindow();else {
2534
3351
  this.updateAvatarWindow();
2535
3352
  this.updateVisibleState();
@@ -2592,7 +3409,7 @@ export class NativeListWebEngine {
2592
3409
  this.selectIndexPosition(entry.position);
2593
3410
  };
2594
3411
  handlePullStart = event => {
2595
- if (this.pointerReorder?.pointerId === event.pointerId || !this.snapshot.capabilities?.pullToRefresh || this.viewport.scrollTop > 0 || event.pointerType !== 'touch' && event.pointerType !== 'pen') return;
3412
+ if (this.pointerReorder?.pointerId === event.pointerId || !this.snapshot.capabilities?.pullToRefresh || !!this.externalScrollHost && !this.ownsRefresh || this.pullTarget.scrollTop > 0 || event.pointerType !== 'touch' && event.pointerType !== 'pen') return;
2596
3413
  this.pullStartY = event.clientY;
2597
3414
  this.pullDistance = 0;
2598
3415
  };
@@ -2668,6 +3485,7 @@ export class NativeListWebEngine {
2668
3485
  if (this.pointerReorder !== state) return;
2669
3486
  this.clearReorderLongPress(state);
2670
3487
  state.active = true;
3488
+ this.cancelMarketPointer();
2671
3489
  state.activatedAt = Date.now();
2672
3490
  state.viewportRect = this.reorderViewportRect();
2673
3491
  this.captureReorderPointer(state);
@@ -2744,6 +3562,10 @@ export class NativeListWebEngine {
2744
3562
  this.cancelPointerReorder(true);
2745
3563
  };
2746
3564
  setCurrentOffset(offset) {
3565
+ if (this.externalScrollHost) {
3566
+ this.scrollToAbsoluteOffset(offset, false);
3567
+ return;
3568
+ }
2747
3569
  const maximum = Math.max(0, this.contentLength() - this.viewportLength());
2748
3570
  const next = Math.max(0, Math.min(maximum, offset));
2749
3571
  if (this.layout.horizontal) this.viewport.scrollLeft = next;else {
@@ -2801,7 +3623,7 @@ export class NativeListWebEngine {
2801
3623
  const viewportRect = this.viewport.getBoundingClientRect();
2802
3624
  const insets = this.collapsiblePagerInsets();
2803
3625
  const left = viewportRect.left + destinationLayout.x - this.viewport.scrollLeft;
2804
- const top = viewportRect.top + destinationLayout.y + insets.header + insets.sticky - this.viewport.scrollTop;
3626
+ const top = this.externalScrollHost ? viewportRect.top + destinationLayout.y : viewportRect.top + destinationLayout.y + insets.header + insets.sticky - this.viewport.scrollTop;
2805
3627
  this.reorderPreview.getBoundingClientRect();
2806
3628
  this.reorderPreview.style.transition = 'transform ' + String(REORDER_DROP_TRANSITION_MS) + 'ms ' + WEB_REORDER_ANIMATION.dropTimingFunction + ', box-shadow ' + String(REORDER_DROP_TRANSITION_MS) + 'ms ' + WEB_REORDER_ANIMATION.dropTimingFunction;
2807
3629
  this.reorderPreview.style.boxShadow = 'none';
@@ -2851,6 +3673,18 @@ export class NativeListWebEngine {
2851
3673
  this.reorderPreview.style.transform = 'translate3d(' + String(x) + 'px,' + String(y) + 'px,0)';
2852
3674
  }
2853
3675
  reorderViewportRect() {
3676
+ if (this.externalScrollHost) {
3677
+ const geometry = this.externalGeometry();
3678
+ const body = this.viewport.getBoundingClientRect();
3679
+ return {
3680
+ left: body.left,
3681
+ right: body.right,
3682
+ width: body.width,
3683
+ top: geometry.top,
3684
+ bottom: geometry.bottom,
3685
+ height: geometry.viewportLength
3686
+ };
3687
+ }
2854
3688
  const {
2855
3689
  left,
2856
3690
  top,