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

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 (144) 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 +7 -4
  4. package/android/src/main/java/com/onekey/nativelist/NativeListActivityRenderer.kt +29 -3
  5. package/android/src/main/java/com/onekey/nativelist/NativeListButtonGroupRenderer.kt +102 -0
  6. package/android/src/main/java/com/onekey/nativelist/NativeListContainerSlotAdapter.kt +12 -0
  7. package/android/src/main/java/com/onekey/nativelist/NativeListDataRowRenderer.kt +87 -7
  8. package/android/src/main/java/com/onekey/nativelist/NativeListIdentityRenderer.kt +193 -10
  9. package/android/src/main/java/com/onekey/nativelist/NativeListLeadingVisual.kt +147 -33
  10. package/android/src/main/java/com/onekey/nativelist/NativeListMessageRenderer.kt +25 -0
  11. package/android/src/main/java/com/onekey/nativelist/NativeListModels.kt +145 -2
  12. package/android/src/main/java/com/onekey/nativelist/NativeListPrimitives.kt +51 -0
  13. package/android/src/main/java/com/onekey/nativelist/NativeListRendererRegistry.kt +2 -0
  14. package/android/src/main/java/com/onekey/nativelist/NativeListRendererRowView.kt +2 -0
  15. package/android/src/main/java/com/onekey/nativelist/NativeListResolvedText.kt +3 -2
  16. package/android/src/main/java/com/onekey/nativelist/NativeListSectionHeaderRenderer.kt +69 -0
  17. package/android/src/main/java/com/onekey/nativelist/NativeListTextView.kt +55 -1
  18. package/android/src/main/java/com/onekey/nativelist/NativeListView.kt +1920 -109
  19. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListActivityHostClipPolicyTest.kt +29 -0
  20. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListIdentityTrailingAxisTest.kt +36 -0
  21. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListLeadingSlotFrameTest.kt +68 -0
  22. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListLeadingVisualClipPolicyTest.kt +44 -0
  23. package/android/src/test/java/com/margelo/nitro/nativelist/NativeListPressPolicyTest.kt +10 -0
  24. package/docs/ROW_TEMPLATES.md +60 -9
  25. package/docs/SPEC.md +1004 -17
  26. package/docs/STYLE_SPEC.md +6 -0
  27. package/ios/HybridNativeList.swift +21 -2
  28. package/ios/NativeListAccessoryStack.swift +235 -39
  29. package/ios/NativeListActivityDetailsView.swift +18 -8
  30. package/ios/NativeListActivityRenderer.swift +8 -2
  31. package/ios/NativeListButtonGroupRenderer.swift +89 -0
  32. package/ios/NativeListDataRowRenderer.swift +155 -27
  33. package/ios/NativeListDesignAssets.swift +9 -0
  34. package/ios/NativeListIdentityRenderer.swift +191 -30
  35. package/ios/NativeListLeadingVisual.swift +119 -22
  36. package/ios/NativeListMessageRenderer.swift +34 -1
  37. package/ios/NativeListModels.swift +42 -2
  38. package/ios/NativeListRendererRegistry.swift +1 -0
  39. package/ios/NativeListResolvedText.swift +2 -1
  40. package/ios/NativeListRowHost.swift +14 -0
  41. package/ios/NativeListSectionHeaderRenderer.swift +88 -0
  42. package/ios/RNCNativeListView.swift +1031 -55
  43. package/ios/Resources/NativeListIcons.xcassets/onekey_crypto_coin_outline.imageset/Contents.json +15 -0
  44. package/ios/Resources/NativeListIcons.xcassets/onekey_crypto_coin_outline.imageset/icon.svg +4 -0
  45. package/ios/Resources/NativeListIcons.xcassets/onekey_document2.imageset/Contents.json +1 -0
  46. package/ios/Resources/NativeListIcons.xcassets/onekey_document2.imageset/icon.svg +1 -0
  47. package/ios/Resources/NativeListIcons.xcassets/onekey_dot_ver_solid.imageset/Contents.json +1 -0
  48. package/ios/Resources/NativeListIcons.xcassets/onekey_dot_ver_solid.imageset/icon.svg +1 -0
  49. package/ios/Resources/NativeListIcons.xcassets/onekey_gas_solid.imageset/Contents.json +15 -0
  50. package/ios/Resources/NativeListIcons.xcassets/onekey_gas_solid.imageset/icon.svg +3 -0
  51. package/ios/Resources/NativeListIcons.xcassets/onekey_plus_large.imageset/Contents.json +1 -0
  52. package/ios/Resources/NativeListIcons.xcassets/onekey_plus_large.imageset/icon.svg +1 -0
  53. package/ios/Resources/NativeListIcons.xcassets/onekey_refresh_ccw_outline.imageset/Contents.json +15 -0
  54. package/ios/Resources/NativeListIcons.xcassets/onekey_refresh_ccw_outline.imageset/icon.svg +3 -0
  55. package/ios/Resources/NativeListIcons.xcassets/onekey_ticket.imageset/Contents.json +1 -0
  56. package/ios/Resources/NativeListIcons.xcassets/onekey_ticket.imageset/icon.svg +1 -0
  57. package/ios/Resources/NativeListIcons.xcassets/onekey_wallet.imageset/Contents.json +1 -0
  58. package/ios/Resources/NativeListIcons.xcassets/onekey_wallet.imageset/icon.svg +1 -0
  59. package/ios/tests/NativeListAccessoryStackTests.swift +89 -0
  60. package/ios/tests/NativeListActivityPresentationTests.swift +56 -0
  61. package/ios/tests/NativeListIdentityTitleIconLayoutTests.swift +81 -0
  62. package/ios/tests/NativeListLeadingVisualPairBackdropTests.swift +50 -0
  63. package/ios/tests/NativeListLifecycleTests.swift +2720 -3
  64. package/lib/module/NativeList.js +200 -32
  65. package/lib/module/NativeList.web.js +262 -32
  66. package/lib/module/index.js +1 -1
  67. package/lib/module/models.js +1 -0
  68. package/lib/module/selection.js +1 -1
  69. package/lib/module/validation.js +776 -52
  70. package/lib/module/web/NativeListWebEngine.js +919 -79
  71. package/lib/module/web/templates/ActivityRowRenderer.js +487 -7
  72. package/lib/module/web/templates/ButtonGroupRowRenderer.js +47 -0
  73. package/lib/module/web/templates/DataRowRenderer.js +40 -5
  74. package/lib/module/web/templates/IdentityRowRenderer.js +90 -4
  75. package/lib/module/web/templates/MarketRowRenderer.js +8 -3
  76. package/lib/module/web/templates/MarketTableRowRenderer.js +577 -0
  77. package/lib/module/web/templates/MediaTileRowRenderer.js +260 -5
  78. package/lib/module/web/templates/MessageRowRenderer.js +18 -2
  79. package/lib/module/web/templates/RowContainerStyle.js +1 -0
  80. package/lib/module/web/templates/RowRendererRegistry.js +8 -3
  81. package/lib/module/web/templates/SectionHeaderRowRenderer.js +70 -3
  82. package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +26 -0
  83. package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +4 -0
  84. package/lib/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +10 -0
  85. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +20 -0
  86. package/lib/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +14 -0
  87. package/lib/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +12 -0
  88. package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +2 -0
  89. package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +43 -0
  90. package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +4 -0
  91. package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +4 -0
  92. package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +4 -0
  93. package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +6 -0
  94. package/lib/nitrogen/generated/shared/json/NativeListConfig.json +2 -0
  95. package/lib/typescript/src/NativeList.d.ts +3 -3
  96. package/lib/typescript/src/NativeList.nitro.d.ts +2 -0
  97. package/lib/typescript/src/NativeList.types.d.ts +29 -1
  98. package/lib/typescript/src/NativeList.web.d.ts +2 -2
  99. package/lib/typescript/src/index.d.ts +2 -2
  100. package/lib/typescript/src/models.d.ts +176 -10
  101. package/lib/typescript/src/validation.d.ts +15 -0
  102. package/lib/typescript/src/web/NativeListWebEngine.d.ts +58 -1
  103. package/lib/typescript/src/web/templates/ActivityRowRenderer.d.ts +3 -3
  104. package/lib/typescript/src/web/templates/ButtonGroupRowRenderer.d.ts +14 -0
  105. package/lib/typescript/src/web/templates/IdentityRowRenderer.d.ts +1 -1
  106. package/lib/typescript/src/web/templates/MarketTableRowRenderer.d.ts +17 -0
  107. package/lib/typescript/src/web/templates/MediaTileRowRenderer.d.ts +3 -3
  108. package/lib/typescript/src/web/templates/MessageRowRenderer.d.ts +10 -4
  109. package/lib/typescript/src/web/templates/RowRendererRegistry.d.ts +3 -1
  110. package/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +26 -0
  111. package/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +4 -0
  112. package/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +10 -0
  113. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +20 -0
  114. package/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +14 -0
  115. package/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +12 -0
  116. package/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +2 -0
  117. package/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +43 -0
  118. package/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +4 -0
  119. package/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +4 -0
  120. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +4 -0
  121. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +6 -0
  122. package/nitrogen/generated/shared/json/NativeListConfig.json +2 -0
  123. package/package.json +3 -3
  124. package/react-native-native-list.podspec +1 -0
  125. package/src/NativeList.nitro.ts +2 -0
  126. package/src/NativeList.tsx +391 -82
  127. package/src/NativeList.types.ts +34 -1
  128. package/src/NativeList.web.tsx +420 -65
  129. package/src/index.ts +2 -0
  130. package/src/models.ts +210 -3
  131. package/src/selection.ts +1 -0
  132. package/src/validation.ts +1635 -76
  133. package/src/web/NativeListWebEngine.ts +1476 -112
  134. package/src/web/templates/ActivityRowRenderer.ts +732 -8
  135. package/src/web/templates/ButtonGroupRowRenderer.ts +58 -0
  136. package/src/web/templates/DataRowRenderer.ts +93 -20
  137. package/src/web/templates/IdentityRowRenderer.ts +150 -5
  138. package/src/web/templates/MarketRowRenderer.ts +19 -3
  139. package/src/web/templates/MarketTableRowRenderer.ts +755 -0
  140. package/src/web/templates/MediaTileRowRenderer.ts +313 -5
  141. package/src/web/templates/MessageRowRenderer.ts +23 -7
  142. package/src/web/templates/RowContainerStyle.ts +2 -0
  143. package/src/web/templates/RowRendererRegistry.ts +21 -6
  144. package/src/web/templates/SectionHeaderRowRenderer.ts +89 -5
package/src/models.ts CHANGED
@@ -25,6 +25,8 @@ export type ImageSource = Readonly<{
25
25
  loadingStrategy?: ImageLoadingStrategy;
26
26
  // OneKey patch: fallbackUri is Web-only; retryTimes opts all platforms into terminal retries.
27
27
  fallbackUri?: string;
28
+ /** Web-only ordered continuation; retries each source before advancing. */
29
+ fallbackUris?: readonly string[];
28
30
  retryTimes?: number;
29
31
  }>;
30
32
 
@@ -183,6 +185,7 @@ export const ROW_BOX_STYLE_KEYS_BY_TYPE = {
183
185
  'trailingGap',
184
186
  'image',
185
187
  ],
188
+ buttonGroup: [],
186
189
  system: ['horizontalPadding', 'verticalPadding', 'lineGap'],
187
190
  } as const;
188
191
 
@@ -199,6 +202,7 @@ type TemplateBoxStyle<T extends keyof typeof ROW_BOX_STYLE_KEYS_BY_TYPE> = Pick<
199
202
  */
200
203
  export type IdentityRowStyle = TemplateBoxStyle<'identity'> &
201
204
  Readonly<{
205
+ leadingContentMaxWidthRatio?: number;
202
206
  title?: NativeListTextStyle;
203
207
  subtitle?: NativeListTextStyle;
204
208
  tertiary?: NativeListTextStyle;
@@ -277,8 +281,16 @@ export type SectionHeaderRowStyle = TemplateBoxStyle<'sectionHeader'> &
277
281
  title?: NativeListTextStyle;
278
282
  subtitle?: NativeListTextStyle;
279
283
  value?: NativeListTextStyle;
284
+ valuePlacement?: 'afterTitle';
285
+ titleDecoration?: 'none' | 'dashed';
280
286
  }>;
281
287
 
288
+ export type RowTextHelp = Readonly<{
289
+ actionKey: string;
290
+ presentation: 'tooltip' | 'popover';
291
+ underline?: 'dashed';
292
+ }>;
293
+
282
294
  export type ActionRowStyle = TemplateBoxStyle<'action'> &
283
295
  Readonly<{
284
296
  title?: NativeListTextStyle;
@@ -342,19 +354,27 @@ export type VisualOverlay = Readonly<{
342
354
  offsetX?: number;
343
355
  offsetY?: number;
344
356
  image?: ImageSource;
357
+ fallbackIcon?: Readonly<{ name: string; tintColor?: string }>;
345
358
  name?: string;
346
359
  text?: string;
360
+ fontWeight?: NativeListTextStyle['fontWeight'];
347
361
  tintColor?: string;
348
362
  backgroundColor?: string;
349
363
  }>;
350
364
 
351
365
  type VisualWithImage = Readonly<{
352
- fallbackIcon?: Readonly<{ name: string; tintColor?: string }>;
366
+ fallbackIcon?: Readonly<{
367
+ name: string;
368
+ tintColor?: string;
369
+ size?: number;
370
+ backgroundColor?: string;
371
+ }>;
353
372
  overlays?: readonly VisualOverlay[];
354
373
  borderStyle?: 'dashed';
355
374
  borderColor?: string;
356
375
  image?: ImageSource;
357
376
  fallbackText?: string;
377
+ fallbackTextColor?: string;
358
378
  backgroundColor?: string;
359
379
  shape?: 'circle' | 'rounded' | 'square';
360
380
  cornerIcon?: Readonly<{
@@ -406,9 +426,26 @@ export type TrailingAccessory =
406
426
  kind: 'valuePair';
407
427
  primary: string;
408
428
  secondary: string;
429
+ primaryFontWeight?: 'medium';
430
+ primaryHelp?: RowTextHelp;
431
+ primaryTextSegments?: readonly ValueTextSegment[];
432
+ secondaryTextSegments?: readonly ValueTextSegment[];
409
433
  primaryTone?: TextTone;
410
434
  secondaryTone?: TextTone;
411
435
  }>
436
+ | Readonly<{
437
+ kind: 'button';
438
+ label: string;
439
+ actionKey: string;
440
+ disabled?: boolean;
441
+ testID?: string;
442
+ accessibilityLabel?: string;
443
+ textColor?: string;
444
+ backgroundColor?: string;
445
+ pressedBackgroundColor?: string;
446
+ hoverBackgroundColor?: string;
447
+ focusRingColor?: string;
448
+ }>
412
449
  | Readonly<{
413
450
  kind: 'checkbox';
414
451
  state: CheckboxState;
@@ -436,6 +473,7 @@ export type TrailingAccessory =
436
473
  kind: 'icon';
437
474
  name: string;
438
475
  tintColor?: string;
476
+ buttonStyle?: 'tertiary';
439
477
  disabled?: boolean;
440
478
  actionKey?: string;
441
479
  testID?: string;
@@ -478,6 +516,10 @@ export type RowBase = Readonly<{
478
516
  export type IdentityRow = RowBase &
479
517
  Readonly<{
480
518
  type: 'identity';
519
+ /** Opt in to content-based height; explicit row/container height still wins. */
520
+ contentHeight?: 'auto';
521
+ /** Emits a row action instead of a press after a successful long press. */
522
+ longPressActionKey?: string;
481
523
  // OneKey patch: UTF-16 ranges match Fuse indices and native attributed strings.
482
524
  titleMatch?: readonly Readonly<{ start: number; end: number }>[];
483
525
  titleActionKey?: string;
@@ -487,11 +529,27 @@ export type IdentityRow = RowBase &
487
529
  leading: LeadingVisual;
488
530
  leadingAction?: Extract<TrailingAccessory, { kind: 'icon' }>;
489
531
  title: string;
532
+ /** Plain 12/16 labels beside the title, preserving independent tones. */
533
+ titleSuffixes?: readonly Readonly<{
534
+ text: string;
535
+ tone: 'secondary' | 'disabled';
536
+ maxWidth?: number;
537
+ }>[];
538
+ titleIcon?: Readonly<{
539
+ name: string;
540
+ tintColor?: string;
541
+ accessibilityLabel?: string;
542
+ /** Web-only anchored help from this icon; does not add a click action. */
543
+ hoverActionKey?: string;
544
+ }>;
545
+ /** Web-only additional help icon after titleIcon. */
546
+ secondaryTitleIcon?: IdentityRow['titleIcon'];
490
547
  subtitle?: string;
491
548
  tertiary?: string;
492
549
  tertiaryTone?: 'secondary' | 'info';
493
550
  titleLines?: 1 | 2;
494
- subtitleLines?: 1 | 2;
551
+ /** Zero displays the complete subtitle. */
552
+ subtitleLines?: 0 | 1 | 2;
495
553
  badges?: readonly BadgeModel[];
496
554
  trailing?: readonly TrailingAccessory[];
497
555
  draggable?: boolean;
@@ -532,6 +590,7 @@ export type ActivityRow = RowBase &
532
590
  Readonly<{
533
591
  type: 'activity';
534
592
  leading: LeadingVisual;
593
+ hideLeading?: boolean;
535
594
  secondaryLeading?: LeadingVisual;
536
595
  title: string;
537
596
  description?: string;
@@ -557,11 +616,14 @@ export type ActivityRow = RowBase &
557
616
  export type MessageRow = RowBase &
558
617
  Readonly<{
559
618
  type: 'message';
619
+ /** Draws only top and bottom container borders when a border is supplied. */
620
+ presentation?: 'inlineWarning';
560
621
  unread?: boolean;
561
622
  leading?: LeadingVisual;
562
623
  title: string;
563
624
  body: string;
564
- bodyLines?: 1 | 2 | 3;
625
+ /** Zero displays the complete body. */
626
+ bodyLines?: 0 | 1 | 2 | 3;
565
627
  time: string;
566
628
  thumbnail?: ImageSource;
567
629
  style?: MessageRowStyle;
@@ -570,8 +632,12 @@ export type MessageRow = RowBase &
570
632
  export type DataColumn = Readonly<{
571
633
  key: string;
572
634
  text: string;
635
+ textSegments?: readonly ValueTextSegment[];
636
+ titleIcon?: IdentityRow['titleIcon'];
637
+ secondaryTitleIcon?: IdentityRow['titleIcon'];
573
638
  secondaryLeadingText?: string;
574
639
  secondaryText?: string;
640
+ secondaryTextSegments?: readonly ValueTextSegment[];
575
641
  weight?: 1 | 2 | 3;
576
642
  alignment?: 'start' | 'center' | 'end';
577
643
  tone?: 'primary' | 'secondary' | 'positive' | 'negative';
@@ -583,6 +649,7 @@ export type DataRow = RowBase &
583
649
  type: 'dataRow';
584
650
  leading?: LeadingVisual;
585
651
  columns: readonly DataColumn[];
652
+ trailing?: readonly TrailingAccessory[];
586
653
  checkbox?: Extract<TrailingAccessory, { kind: 'checkbox' }>;
587
654
  index?: number;
588
655
  badge?: BadgeModel;
@@ -592,11 +659,95 @@ export type DataRow = RowBase &
592
659
  style?: DataRowStyle;
593
660
  }>;
594
661
 
662
+ export type WebMarketTableColumn = Readonly<{
663
+ key: string;
664
+ width?: number;
665
+ minWidth?: number;
666
+ flex?: number;
667
+ alignment?: 'start' | 'center' | 'end';
668
+ paddingStart?: number;
669
+ paddingEnd?: number;
670
+ }>;
671
+
672
+ export type WebMarketTableText = Readonly<{
673
+ text: string;
674
+ segments?: readonly ValueTextSegment[];
675
+ tone?: TextTone;
676
+ style?: Pick<
677
+ NativeListTextStyle,
678
+ 'fontSize' | 'fontWeight' | 'lineHeight' | 'color'
679
+ >;
680
+ }>;
681
+
682
+ export type WebMarketTableCell = Readonly<{ key: string }> &
683
+ (
684
+ | Readonly<{
685
+ kind: 'favorite';
686
+ active: boolean;
687
+ disabled?: boolean;
688
+ testID?: string;
689
+ hoverActionKey?: string;
690
+ actionKey: string;
691
+ accessibilityLabel: string;
692
+ }>
693
+ | Readonly<{
694
+ kind: 'asset';
695
+ leading: LeadingVisual;
696
+ title: WebMarketTableText;
697
+ secondary?: readonly WebMarketTableText[];
698
+ lineGap?: number;
699
+ secondaryBadges?: readonly Pick<
700
+ MarketBadgeModel,
701
+ 'key' | 'text' | 'style'
702
+ >[];
703
+ hoverImages?: readonly (ImageSource | null)[];
704
+ hoverSecondary?: readonly WebMarketTableText[];
705
+ hoverActionKey?: string;
706
+ hoverActionLabel?: string;
707
+ badges?: readonly Pick<
708
+ MarketBadgeModel,
709
+ | 'key'
710
+ | 'text'
711
+ | 'iconName'
712
+ | 'icon'
713
+ | 'textColor'
714
+ | 'backgroundColor'
715
+ | 'actionKey'
716
+ | 'accessibilityLabel'
717
+ | 'style'
718
+ >[];
719
+ }>
720
+ | Readonly<{
721
+ kind: 'text';
722
+ primary: readonly WebMarketTableText[];
723
+ partGap?: number;
724
+ secondary?: readonly WebMarketTableText[];
725
+ }>
726
+ | Readonly<{
727
+ kind: 'sparkline';
728
+ points: readonly number[];
729
+ width: number;
730
+ height: number;
731
+ strokeColor: string;
732
+ fillColor: string;
733
+ }>
734
+ );
735
+
736
+ export type WebMarketTablePresentation = Readonly<{
737
+ draggable?: boolean;
738
+ contextMenuActionKey?: string;
739
+ testID?: string;
740
+ columns: readonly WebMarketTableColumn[];
741
+ cells: readonly WebMarketTableCell[];
742
+ }>;
743
+
595
744
  /** Native Market quote row. All values are already localized/formatted strings. */
596
745
  export type MarketRow = RowBase &
597
746
  Readonly<{
598
747
  type: 'market';
599
748
  variant: 'token' | 'stock' | 'perp';
749
+ /** Web-only bounded table presentation; native reads the ordinary Market fields. */
750
+ webTable?: WebMarketTablePresentation;
600
751
  leadingAction?: Extract<TrailingAccessory, { kind: 'icon' }>;
601
752
  leading: LeadingVisual;
602
753
  title: string;
@@ -604,6 +755,8 @@ export type MarketRow = RowBase &
604
755
  /** OneKey patch: localized name shrinks independently of the volume. */
605
756
  subtitlePrefix?: Readonly<{
606
757
  text: string;
758
+ /** Web-only anchored help for a truncated name. */
759
+ hoverActionKey?: string;
607
760
  gap?: number;
608
761
  maxWidth?: number;
609
762
  style?: MarketTextStyle;
@@ -678,9 +831,11 @@ export type SectionHeaderRow = RowBase &
678
831
  indexTitle?: string;
679
832
  variant?: 'summary' | 'gallery' | 'history';
680
833
  title: string;
834
+ leadingBadge?: BadgeModel;
681
835
  titleLoading?: boolean;
682
836
  subtitle?: string;
683
837
  value?: string;
838
+ valueHelp?: RowTextHelp;
684
839
  valueActionKey?: string;
685
840
  titleIcon?: Extract<TrailingAccessory, { kind: 'icon' }>;
686
841
  valueIcon?: Extract<TrailingAccessory, { kind: 'icon' }>;
@@ -701,6 +856,21 @@ export type ActionRow = RowBase &
701
856
  style?: ActionRowStyle;
702
857
  }>;
703
858
 
859
+ export type ButtonGroupRow = RowBase &
860
+ Readonly<{
861
+ type: 'buttonGroup';
862
+ buttons: readonly Readonly<{
863
+ key: string;
864
+ label: string;
865
+ actionKey: string;
866
+ disabled?: boolean;
867
+ loading?: boolean;
868
+ testID?: string;
869
+ accessibilityLabel?: string;
870
+ }>[];
871
+ style?: TemplateBoxStyle<'buttonGroup'>;
872
+ }>;
873
+
704
874
  export type SystemRow = RowBase &
705
875
  Readonly<{ style?: SystemRowStyle }> &
706
876
  (
@@ -753,6 +923,7 @@ export type RowModel =
753
923
  | MetricCardRow
754
924
  | SectionHeaderRow
755
925
  | ActionRow
926
+ | ButtonGroupRow
756
927
  | SystemRow;
757
928
 
758
929
  export type NativeListTheme = Readonly<{
@@ -765,8 +936,12 @@ export type NativeListTheme = Readonly<{
765
936
  rowBackground: string;
766
937
  rowSelectedBackground: string;
767
938
  rowPressedBackground?: string;
939
+ /** Web-only enabled-row hover color; defaults to rowPressedBackground. */
940
+ rowHoverBackground?: string;
768
941
  subduedBackground?: string;
769
942
  strongBackground?: string;
943
+ /** Web-only background for a displayed declared image fallback. */
944
+ imageFallbackBackground?: string;
770
945
  primaryText: string;
771
946
  secondaryText: string;
772
947
  disabledText?: string;
@@ -775,6 +950,8 @@ export type NativeListTheme = Readonly<{
775
950
  separator: string;
776
951
  accent: string;
777
952
  positive: string;
953
+ /** Optional exact background for the success tone of section leading badges. */
954
+ successBackground?: string;
778
955
  negative: string;
779
956
  criticalBackground?: string;
780
957
  inverseBackground?: string;
@@ -821,6 +998,16 @@ export type NativeListListStyle = Readonly<{
821
998
  export type NativeListSnapshot = Readonly<{
822
999
  schemaVersion: 1;
823
1000
  generation: number;
1001
+ /** One-shot animation for a user-initiated row-key insertion or removal. */
1002
+ structuralTransition?: Readonly<{
1003
+ id: string;
1004
+ durationMs?: number;
1005
+ anchorKey?: string;
1006
+ }>;
1007
+ disclosure?: Readonly<{
1008
+ expanded: boolean;
1009
+ expandedTrailingInset?: number;
1010
+ }>;
824
1011
  layout: Readonly<{
825
1012
  kind: NativeListLayout;
826
1013
  orientation?: NativeListOrientation;
@@ -878,7 +1065,13 @@ export type RowPatch =
878
1065
  IdentityRow,
879
1066
  | CommonPatchFields
880
1067
  | 'title'
1068
+ | 'titleSuffixes'
1069
+ | 'titleIcon'
1070
+ | 'secondaryTitleIcon'
881
1071
  | 'subtitle'
1072
+ | 'subtitleLines'
1073
+ | 'contentHeight'
1074
+ | 'longPressActionKey'
882
1075
  | 'tertiary'
883
1076
  | 'tertiaryTone'
884
1077
  | 'badges'
@@ -920,6 +1113,7 @@ export type RowPatch =
920
1113
  | 'primaryAmount'
921
1114
  | 'secondaryAmount'
922
1115
  | 'leading'
1116
+ | 'hideLeading'
923
1117
  | 'secondaryLeading'
924
1118
  | 'footerActions'
925
1119
  >
@@ -936,6 +1130,7 @@ export type RowPatch =
936
1130
  | 'title'
937
1131
  | 'body'
938
1132
  | 'bodyLines'
1133
+ | 'presentation'
939
1134
  | 'time'
940
1135
  | 'thumbnail'
941
1136
  >
@@ -950,6 +1145,7 @@ export type RowPatch =
950
1145
  | CommonPatchFields
951
1146
  | 'leading'
952
1147
  | 'columns'
1148
+ | 'trailing'
953
1149
  | 'checkbox'
954
1150
  | 'index'
955
1151
  | 'badge'
@@ -979,6 +1175,7 @@ export type RowPatch =
979
1175
  | 'pressInActionKey'
980
1176
  | 'longPressActionKey'
981
1177
  | 'diagnostics'
1178
+ | 'webTable'
982
1179
  | 'style'
983
1180
  >
984
1181
  >;
@@ -1033,6 +1230,8 @@ export type RowPatch =
1033
1230
  | 'title'
1034
1231
  | 'subtitle'
1035
1232
  | 'value'
1233
+ | 'valueHelp'
1234
+ | 'leadingBadge'
1036
1235
  | 'valueActionKey'
1037
1236
  | 'titleActionKey'
1038
1237
  | 'titleActionOnHover'
@@ -1057,6 +1256,11 @@ export type RowPatch =
1057
1256
  >
1058
1257
  >;
1059
1258
  }>
1259
+ | Readonly<{
1260
+ type: 'buttonGroup';
1261
+ key: string;
1262
+ changes: Partial<Pick<ButtonGroupRow, CommonPatchFields | 'buttons'>>;
1263
+ }>
1060
1264
  | Readonly<{
1061
1265
  type: 'system';
1062
1266
  key: string;
@@ -1073,6 +1277,7 @@ export type NativeListActionSource =
1073
1277
  | 'leadingAction'
1074
1278
  | 'trailingAccessory'
1075
1279
  | 'footerAction'
1280
+ | 'buttonGroup'
1076
1281
  | 'description'
1077
1282
  | 'mediaClose';
1078
1283
 
@@ -1097,6 +1302,8 @@ export type NativeListActionAnchor = Readonly<{
1097
1302
  }>;
1098
1303
 
1099
1304
  export type RowActionEvent = Readonly<{
1305
+ /** Web-only client/window CSS pixel pointer location. */
1306
+ windowPoint?: Readonly<{ x: number; y: number }>;
1100
1307
  rowKey?: string;
1101
1308
  actionKey: string;
1102
1309
  sectionKey?: string;
package/src/selection.ts CHANGED
@@ -39,6 +39,7 @@ export function isRowPressEnabled(row: RowModel): boolean {
39
39
  return (
40
40
  !row.disabled &&
41
41
  !row.pressDisabled &&
42
+ row.type !== 'buttonGroup' &&
42
43
  (row.type !== 'system' || row.variant === 'retry')
43
44
  );
44
45
  }