@onekeyfe/react-native-native-list 6.7.0-1 → 6.7.0-3

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 (82) hide show
  1. package/android/src/main/java/com/onekey/nativelist/HybridNativeList.kt +1 -1
  2. package/docs/SPEC.md +380 -11
  3. package/ios/HybridNativeList.swift +11 -3
  4. package/ios/RNCNativeListView.swift +10 -6
  5. package/ios/tests/NativeListLifecycleTests.swift +28 -0
  6. package/lib/module/NativeList.js +4 -2
  7. package/lib/module/NativeList.web.js +135 -29
  8. package/lib/module/ScrollEdgeEffect.js +8 -0
  9. package/lib/module/index.js +1 -0
  10. package/lib/module/validation.js +143 -34
  11. package/lib/module/web/NativeListWebEngine.js +353 -62
  12. package/lib/module/web/templates/ActivityRowRenderer.js +432 -5
  13. package/lib/module/web/templates/MarketRowRenderer.js +8 -3
  14. package/lib/module/web/templates/MarketTableRowRenderer.js +576 -0
  15. package/lib/module/web/templates/MediaTileRowRenderer.js +260 -5
  16. package/lib/module/web/templates/RowRendererRegistry.js +5 -3
  17. package/lib/module/web/templates/SectionHeaderRowRenderer.js +34 -1
  18. package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +10 -6
  19. package/lib/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +2 -2
  20. package/lib/nitrogen/generated/android/c++/JNativeListScrollEdgeEffect.hpp +61 -0
  21. package/lib/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +3 -3
  22. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +1 -1
  23. package/lib/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/NativeListScrollEdgeEffect.kt +24 -0
  24. package/lib/nitrogen/generated/ios/NativeListModule-Swift-Cxx-Umbrella.hpp +3 -0
  25. package/lib/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +8 -4
  26. package/lib/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +4 -4
  27. package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +1 -1
  28. package/lib/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +3 -3
  29. package/lib/nitrogen/generated/ios/swift/NativeListScrollEdgeEffect.swift +44 -0
  30. package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +2 -2
  31. package/lib/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +5 -2
  32. package/lib/nitrogen/generated/shared/c++/NativeListScrollEdgeEffect.hpp +80 -0
  33. package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +2 -2
  34. package/lib/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +4 -3
  35. package/lib/nitrogen/generated/shared/json/NativeListConfig.json +1 -1
  36. package/lib/typescript/src/NativeList.nitro.d.ts +2 -1
  37. package/lib/typescript/src/NativeList.types.d.ts +14 -3
  38. package/lib/typescript/src/NativeList.web.d.ts +2 -2
  39. package/lib/typescript/src/ScrollEdgeEffect.d.ts +5 -0
  40. package/lib/typescript/src/index.d.ts +1 -0
  41. package/lib/typescript/src/models.d.ts +71 -1
  42. package/lib/typescript/src/web/NativeListWebEngine.d.ts +26 -1
  43. package/lib/typescript/src/web/templates/ActivityRowRenderer.d.ts +3 -3
  44. package/lib/typescript/src/web/templates/MarketTableRowRenderer.d.ts +17 -0
  45. package/lib/typescript/src/web/templates/MediaTileRowRenderer.d.ts +3 -3
  46. package/lib/typescript/src/web/templates/MessageRowRenderer.d.ts +1 -1
  47. package/lib/typescript/src/web/templates/RowRendererRegistry.d.ts +3 -1
  48. package/nitrogen/generated/android/c++/JHybridNativeListSpec.cpp +10 -6
  49. package/nitrogen/generated/android/c++/JHybridNativeListSpec.hpp +2 -2
  50. package/nitrogen/generated/android/c++/JNativeListScrollEdgeEffect.hpp +61 -0
  51. package/nitrogen/generated/android/c++/views/JHybridNativeListStateUpdater.cpp +3 -3
  52. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/HybridNativeListSpec.kt +1 -1
  53. package/nitrogen/generated/android/kotlin/com/margelo/nitro/nativelist/NativeListScrollEdgeEffect.kt +24 -0
  54. package/nitrogen/generated/ios/NativeListModule-Swift-Cxx-Umbrella.hpp +3 -0
  55. package/nitrogen/generated/ios/c++/HybridNativeListSpecSwift.hpp +8 -4
  56. package/nitrogen/generated/ios/c++/views/HybridNativeListComponent.mm +4 -4
  57. package/nitrogen/generated/ios/swift/HybridNativeListSpec.swift +1 -1
  58. package/nitrogen/generated/ios/swift/HybridNativeListSpec_cxx.swift +3 -3
  59. package/nitrogen/generated/ios/swift/NativeListScrollEdgeEffect.swift +44 -0
  60. package/nitrogen/generated/shared/c++/HybridNativeListSpec.cpp +2 -2
  61. package/nitrogen/generated/shared/c++/HybridNativeListSpec.hpp +5 -2
  62. package/nitrogen/generated/shared/c++/NativeListScrollEdgeEffect.hpp +80 -0
  63. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.cpp +2 -2
  64. package/nitrogen/generated/shared/c++/views/HybridNativeListComponent.hpp +4 -3
  65. package/nitrogen/generated/shared/json/NativeListConfig.json +1 -1
  66. package/package.json +3 -3
  67. package/react-native-native-list.podspec +4 -1
  68. package/src/NativeList.nitro.ts +3 -1
  69. package/src/NativeList.tsx +6 -2
  70. package/src/NativeList.types.ts +15 -3
  71. package/src/NativeList.web.tsx +183 -38
  72. package/src/ScrollEdgeEffect.ts +4 -0
  73. package/src/index.ts +2 -0
  74. package/src/models.ts +93 -0
  75. package/src/validation.ts +348 -58
  76. package/src/web/NativeListWebEngine.ts +600 -95
  77. package/src/web/templates/ActivityRowRenderer.ts +656 -7
  78. package/src/web/templates/MarketRowRenderer.ts +19 -3
  79. package/src/web/templates/MarketTableRowRenderer.ts +752 -0
  80. package/src/web/templates/MediaTileRowRenderer.ts +313 -5
  81. package/src/web/templates/RowRendererRegistry.ts +10 -5
  82. package/src/web/templates/SectionHeaderRowRenderer.ts +42 -1
@@ -52,7 +52,7 @@ class HybridNativeList(context: ThemedReactContext) : HybridNativeListSpec() {
52
52
  snapshot?.let { hostView.applySnapshot(it) }
53
53
  }
54
54
  }
55
- override var topScrollEdgeHard: Boolean = false
55
+ override var topScrollEdgeEffect: NativeListScrollEdgeEffect = NativeListScrollEdgeEffect.NONE
56
56
  override var topOverlayHeight: Double = 0.0
57
57
 
58
58
  override var snapshotJson: String = ""
package/docs/SPEC.md CHANGED
@@ -7,7 +7,7 @@ architecture and runtime evidence.
7
7
  ## Purpose and non-goals
8
8
 
9
9
  NativeList renders bounded data with fixed row templates on iOS, Android and
10
- Web. Data rows do not render arbitrary React children. Native-only named container slots
10
+ Web. Data rows do not render arbitrary React children. Named container slots
11
11
  may render React chrome outside the data-row stream. Integrators own overflow
12
12
  prevention; there is no automatic fitting or shrinking pass.
13
13
 
@@ -28,13 +28,14 @@ prevention; there is no automatic fitting or shrinking pass.
28
28
 
29
29
  ### iOS 26 fixed top scroll-edge overlay
30
30
 
31
- Standalone `NativeList` accepts optional `topScrollEdgeEffect="hard"` and
31
+ Standalone `NativeList` accepts optional
32
+ `topScrollEdgeEffect={ScrollEdgeEffect.Hard}` or `ScrollEdgeEffect.Soft` and
32
33
  `topOverlay` React content. Both are disabled by default. On iOS 26 or newer,
33
34
  the fixed overlay is a fourth native container slot, outside the row stream and
34
35
  outside the existing scrolling `listHeader`/`listEmpty`/`listFooter` slots.
35
36
  Fabric measures its height; the list owns an equal top inset on its collection
36
37
  view and binds UIKit's `UIScrollEdgeElementContainerInteraction` to that view,
37
- using the hard top edge style. The list restores its original inset and effect
38
+ using the requested top edge style. The list restores its original inset and effect
38
39
  on removal, disposal and reuse. The UI thread owns all view and UIKit state;
39
40
  there is no persistence, background-runtime state or per-frame JS callback.
40
41
  An invisible, noninteractive native label fills the overlay host so UIKit
@@ -45,6 +46,18 @@ existing layout and scrolling. Missing overlay or style changes nothing.
45
46
  Acceptance requires actual iOS 26 initial layout, long/short/empty scrolling,
46
47
  refresh and overlay replacement/removal, including dark mode.
47
48
 
49
+ `ScrollEdgeEffect` is an exported string enum (`Hard = 'hard'`, `Soft = 'soft'`);
50
+ the corresponding string literals remain valid prop values. Hard includes
51
+ UIKit's dividing line; Soft uses the gradual blurred transition. Nitro receives
52
+ an enum (`none | hard | soft`, default `none`) rather than a hard-effect boolean.
53
+ Changing Hard ↔ Soft preserves the overlay, inset, logical scroll offset and
54
+ saved original effect. Clearing the prop, removing the overlay, detaching or
55
+ disposing restores the original effect. This bridge change requires rebuilding
56
+ the matching native host. Soft selection is implemented in the wrapper and
57
+ native host. Focused JS tests cover enum forwarding and disabling; UIKit tests
58
+ cover style switching, overlay geometry and restoring the previous style.
59
+ Visual runtime acceptance remains separate from source, type and build checks.
60
+
48
61
  [README.md](../README.md) documents the snapshot, patch, selection, events and
49
62
  imperative API; [STYLE_SPEC.md](STYLE_SPEC.md) defines normalization, omitted
50
63
  style defaults and platform differences. Height precedence is
@@ -106,8 +119,9 @@ and does not create a separate accessibility target. Clearing the field, full
106
119
  rebind, recycling and disposal stop and hide the indicator; detached native views do
107
120
  not keep a visible animation. The History template's minimum content height
108
121
  increases from 16 to 20 points while loading. Explicit caller row/container
109
- heights still take precedence and must fit their padding. Web does not render
110
- this new native-only indicator; its existing section presentation is unchanged.
122
+ heights still take precedence and must fit their padding. Web History also
123
+ consumes titleLoading, using its existing section-slot geometry and the Web
124
+ History presentation described below.
111
125
 
112
126
  Acceptance requires loading → idle → loading reuse, title color updates and
113
127
  detachment on each native platform. A title's localized confirming text remains
@@ -545,8 +559,8 @@ is an opt-in native-only preview descriptor: `{ source: ImageSource, probeOrder:
545
559
  ('image' | 'video')[] }`. The order contains one or two distinct candidates.
546
560
  The caller supplies the order; the renderer never guesses asset semantics.
547
561
  When provided, media takes precedence over `image`, unless `imageState` is
548
- explicitly empty/error. Web keeps its existing `image` behavior; native callers
549
- that also target Web must supply that existing image independently.
562
+ explicitly empty/error. Web gallery media probing follows the separate Web migration contract below;
563
+ legacy Web image-only tiles retain their existing behavior.
550
564
 
551
565
  Image uses the shared OneKeyImage lifecycle. Video uses a paused, muted AVPlayer
552
566
  on iOS and Media3 ExoPlayer on Android, preserving the native Video source
@@ -606,8 +620,8 @@ leaked audio/player resources. Static API checks do not prove these cases.
606
620
  `listHeader`, `listEmpty` and `listFooter` accept React nodes on iOS and Android
607
621
  vertical lists only. They are optional and default to absent. They are common
608
622
  container capabilities, not row templates, and MUST NOT be used for per-item
609
- rendering. Horizontal orientation with any supplied slot is rejected. Web ignores
610
- these new native-only props; existing Web lists and callers retain their behavior.
623
+ rendering. Horizontal orientation with any supplied slot is rejected. Web container slots follow the separate Web parent-scrolling contract below;
624
+ the native placement and lifecycle described in this section remain unchanged.
611
625
 
612
626
  The order is header, data rows (or empty slot when there are no data rows), footer.
613
627
  On iOS, after the laid-out vertical content shrinks, an offset beyond the new
@@ -722,8 +736,8 @@ visible title/description/status lines, the description measured at the identity
722
736
  column's actual width (stacked or table, including the fee column), fee height and the
723
737
  footer-action button height. Android sizes the row to its content. The existing height override contract still applies. RTL follows
724
738
  semantic leading/trailing anchors. Clearing rich fields returns to the legacy
725
- renderer, and removing amount lines recycles their visual slots. Web rendering
726
- remains unchanged; rich fields are native-only until a separate Web migration.
739
+ renderer, and removing amount lines recycles their visual slots. Web rich presentation follows the separate Web migration contract below;
740
+ legacy Activity rows without rich fields retain their existing behavior.
727
741
 
728
742
  Acceptance: 1/2/6/32 lines, changed keys/order, paired icons and network overlays,
729
743
  small-number segments in amounts/fiat/fee (ceil(0.6 × parent font size), unchanged
@@ -808,3 +822,358 @@ The consumer Gradle project compiles the actual NativeListView and passes all
808
822
  seven Kotlin alignment tests; SwiftPM compiles the shipping helper and passes
809
823
  all seven geometry tests. These are local unit/build checks, not a new
810
824
  combined-package application or physical-device acceptance run.
825
+
826
+
827
+ ## Web parent scrolling and React container slots
828
+
829
+ Status: implemented. Focused DOM/wrapper tests and controlled consuming
830
+ Home/Market Web and Electron checks cover parent ownership, slots, host
831
+ replacement, hidden tabs, and the migrated touch/reorder interactions. These
832
+ checks do not establish native runtime or complete performance acceptance.
833
+
834
+ `webScrollHost` is Web-only: omitted preserves the existing owned viewport;
835
+ `null` defers initialization until the parent host is ready; an element opts
836
+ into that explicit parent as the sole vertical scroll owner. `webStickyInset`
837
+ is a non-negative finite CSS-pixel inset, default zero. Native ignores both.
838
+ External horizontal list orientation is rejected. The host is never inferred
839
+ from class names. Its replacement disposes the old engine and exact observers,
840
+ listeners, pending commands and anchors before the next host is attached.
841
+
842
+ On Web, listHeader/listEmpty/listFooter are React-owned siblings around the
843
+ engine-owned row host. They remain normal scrolling content, never row models;
844
+ empty replaces the body only when there are no rows. listEmpty takes precedence
845
+ over snapshot.emptyState. Grid slots span the list's complete width and reserve
846
+ their actual intrinsic height. The wrapper owns an internal scroll viewport when
847
+ slots are used without an external parent; the slot-free internal path retains
848
+ its existing structure. No ReactDOM dependency or arbitrary row children exist.
849
+
850
+ The engine reads list-local width, row-host origin, host viewport intersection,
851
+ sticky inset and complete wrapper bounds together. Row-index/key scrolling is
852
+ relative to the data body; scrollToOffset starts at the complete container,
853
+ including its header, and scrollToEnd includes the final footer. End reached
854
+ is based on visible data-row indices, before footer content, as existing lists.
855
+ Hidden/zero-sized or fully offscreen lists emit no end-reached event. Resize,
856
+ slot and ancestor layout changes remeasure origin. Increasing content before a
857
+ visible row preserves that row's screen position while the parent is scrolled.
858
+ No React state updates run on scroll frames. External refresh gestures remain
859
+ owned by the parent control; only internal mode handles its own pull gesture.
860
+
861
+ The explicit external host captures scroll events from itself and descendant
862
+ scroll containers that are ancestors of the list root. Horizontal pager movement
863
+ therefore invalidates cached viewport intersection and restores visible rows on
864
+ the next scheduled frame. Scrolls within unrelated slots or list descendants do
865
+ not invalidate this list. Destroy removes the same capture listener; no second
866
+ vertical owner or scroll-position correction is introduced.
867
+
868
+ Required acceptance: unchanged slot-free internal behavior; parent content on
869
+ both sides and sticky inset; dynamic header/footer; empty to populated; grid
870
+ last row; all imperative alignments; null/ready/replaced host; hidden/visible;
871
+ unmount cleanup, mouse/touch scroll and drag autoscroll. Type/helper results do
872
+ not establish rendered product, native or performance acceptance.
873
+
874
+
875
+ ## Web Market table presentation
876
+
877
+ Status: implemented on the 6.7.0-1 source baseline. Package unit/type/build
878
+ checks and controlled Web/shared consumer backfill checks passed; consuming
879
+ Home/Market Web and Electron checks cover the migrated presentation. No native
880
+ runtime or completed performance acceptance is claimed.
881
+
882
+ MarketRow.webTable is an optional Web-only serializable presentation. It does
883
+ not change DataRow's 2..4-column contract or add a row type/native renderer.
884
+ Native parsers retain row dictionaries/JSON and read known fields; they ignore
885
+ webTable. Mobile callers continue emitting their existing Market snapshots
886
+ without this field, preserving their serialized shape. Shared validation checks
887
+ the complete declared extension on both platforms. No arbitrary React cells,
888
+ HTML, scripts or product formatting runs inside NativeList.
889
+
890
+ The presentation declares 1..12 unique keyed columns and one matching keyed
891
+ cell per column. Width/minWidth (0..4096 CSS px), flex (0..16), semantic alignment
892
+ and leading/trailing padding (0..64) are explicit. Presentation cell kinds are
893
+ favorite, asset, text and sparkline. Favorite has its own action/accessible
894
+ label/pressed state; asset uses existing leading image primitives, title/badges
895
+ and a secondary line optionally replaced on row hover/focus; text accepts at
896
+ most eight caller-formatted primary/secondary text parts with existing small
897
+ number segments and typography; sparkline accepts at most256 finite numeric
898
+ samples, explicit size and colors. Unknown fields are rejected. Table rows use
899
+ an explicit row/container height. Text is single-line with ellipsis; no automatic
900
+ multiline geometry or business numeric interpretation exists.
901
+
902
+ The consumer derives mobile fields and table cells from the same domain row.
903
+ A quote transaction changes its formatted scalar fields and table cells together.
904
+ A legacy scalar-only price/change patch on a table row is rejected unless it
905
+ also supplies its corresponding table presentation, preventing hidden/visible
906
+ values from diverging. Stable-column/same-image patches update only changed
907
+ cells, preserving body/avatar identity and avoiding geometry reads/layout.
908
+ Changes to column structure, image/badge/action identity invalidate anchors and
909
+ use normal rebind/layout. Header and body take widths from the same consumer
910
+ column calculation; React retains sorting/header/filter portals.
911
+
912
+ The Web registry separately pools market and marketTable presentations while
913
+ both retain type:market. Row keys, revisions, anchor epochs and event dispatch
914
+ remain common. Cell actions use data-native-list-action; favorite/copy/badge
915
+ buttons do not activate the row. Recycling clears actions, title/aria, hover
916
+ and styles and disposes image leases. The SDK emits copy action data; application
917
+ copyText/logging remains consumer-owned. Sparklines use bounded numeric drawing,
918
+ not arbitrary SVG/HTML input.
919
+
920
+ Acceptance: every cell kind, dynamic formatting, hover/focus/keyboard actions,
921
+ row/presentation recycling, strict validation, native dictionary safe-ignore,
922
+ header/body geometry, 100 quote ticks preserving nodes with zero geometry reads,
923
+ then a real complex Market table before expanding to all five families.
924
+
925
+
926
+ ### Web grid fractional column geometry
927
+
928
+ Status: implemented; fractional geometry verified in focused DOM/browser and
929
+ controlled consuming NFT backfill checks.
930
+ Web grid columns divide
931
+ available CSS width without flooring each cell. With non-integral division,
932
+ all column edges and width-derived tile heights retain the fractional value;
933
+ the final column reaches the content edge without accumulating discarded
934
+ pixels. Item spacing, horizontal padding and structural full-span rows retain
935
+ their existing meanings. Native rounding is unchanged. Known app Web consumers
936
+ are the migrated NFT grid and developer gallery; external SDK consumers are not
937
+ claimed audited. Required geometry coverage: 2/3/4/6/7 columns, divisible and
938
+ fractional widths, spacing, padding, row height and structural/footer boundaries.
939
+
940
+ Table column width is the CSS base width. When flex is supplied, it grows with
941
+ `flex-basis:auto`, matching the consumer's existing fixed-base React column;
942
+ without flex, width remains fixed. Pausing a Web parent-host list retains only
943
+ its last row-host height in normal flow while releasing row DOM/avatar leases.
944
+ The wrapper preserves the engine's successfully patched snapshot for host
945
+ reconstruction; inactive patches merge into one latest snapshot, with no
946
+ retained batch queue. A rejected imperative snapshot never replaces that state.
947
+
948
+ Stock asset cells additionally declare lineGap (0...8, default4), up to three
949
+ secondaryBadges limited to the existing Market badge key/text/style subset, and up to four hoverImages
950
+ using ImageSource. Secondary badges precede the company name. Hover logos follow
951
+ the variant-count text at16 CSS px with a1px page-background ring and4px overlap,
952
+ matching the consumer's existing finite logo group. Geometry/badge/image changes
953
+ use normal rebind and release replaced image leases; price-only updates retain
954
+ these nodes. No native caller emits these Web-only fields.
955
+
956
+ Web gallery media preserves the consuming NFT card presentation: healthy image
957
+ and exhausted fallback surfaces have a10px radius, while a healthy video surface
958
+ has square corners. The image/video frame uses the list page background; only
959
+ the exhausted fallback surface uses the strong background. Rebinding the same
960
+ video key retains square corners, and failed-video fallback to an image restores
961
+ the image radius. This is Web renderer behavior; native media presentation and
962
+ probe-order contracts are unchanged.
963
+
964
+ Gallery pointer activation follows the actual media-card body; extra grid row
965
+ height reserved between cards does not enlarge its pointer hit area. Keyboard
966
+ row activation remains supported through the normal row keyboard handler.
967
+
968
+ When React listEmpty owns an empty list, content bottom padding follows that
969
+ empty slot instead of advancing its origin. Header/top padding retain their
970
+ positions, and populated row/footer padding semantics remain unchanged.
971
+
972
+ Text cells may declare partGap (0...8 CSS px, default2) for their caller-formatted
973
+ inline parts. Favorite cells may declare hoverActionKey; hover/focus emits this
974
+ anchored help action, while click/Enter/Space emits actionKey. No browser title
975
+ bubble is added. Pointer leave/focus departure invalidate help anchors. Existing
976
+ Market badge styles apply to table title pills and their title gap is4px.
977
+
978
+ Web table title badges accept only declared key/text/iconName/icon/colors/action/
979
+ accessibility/style fields. The unused native tone field is not accepted in this
980
+ presentation. Inline icon sources use image primitives and release on recycling.
981
+
982
+
983
+ ### Web Market watchlist actions and reorder
984
+
985
+ Only a market row with `webTable.draggable:true` and list capability
986
+ `reorderable:true` joins existing Web reorder. Other Market rows and native
987
+ reorder semantics are unchanged. `webTable.contextMenuActionKey` declares a
988
+ bounded row context-menu action; right click is prevented only for such rows,
989
+ and nested cell actions retain ownership. Context menu and Market long press
990
+ may emit `RowActionEvent.windowPoint`, finite client/window CSS pixel coordinates.
991
+ Keyboard-triggered context menus use the row anchor rectangle when pointer
992
+ coordinates are unavailable. Anchors retain binding epoch validation and are
993
+ invalidated on scroll/rebind/layout/destroy; consumers close their menu on that
994
+ invalidation. Compact Market mouse/pen long press cancels after 3px of pointer
995
+ movement; touch follows actual touchmove as specified below. Table rows retain
996
+ the 10px pointer threshold.
997
+ Gallery, wallet and other row reorder eligibility stays unchanged. A gesture
998
+ that activates row reorder cancels pending Market long press and suppresses its
999
+ subsequent row navigation.
1000
+
1001
+ Compact Web Market network corners honor the declared ImageSource dimensions
1002
+ (default 16px), with the existing corner padding outside the image. Native image
1003
+ rendering is unchanged. Consumer Web presentation permits its original SVG image
1004
+ sources without changing default native mapper output.
1005
+
1006
+
1007
+ ### Web ordered image fallback sources
1008
+
1009
+ ImageSource.fallbackUris is an optional Web-only ordered continuation after uri.
1010
+ It retains the complete caller-provided sequence (no truncation or deduplication).
1011
+ An empty/unusable continuation terminates in the declared visual fallback, like
1012
+ an empty current source in the existing Web Image.WithFallbackSources. Each URI
1013
+ uses its declared retryTimes before proceeding; Market Web callers pass the
1014
+ existing ImageV2 default of one retry per source. This array path does not change
1015
+ legacy fallbackUri switching/retry order when fallbackUris is absent. Native
1016
+ callers do not emit this field. Validation requires an array of serializable
1017
+ strings. Rebind identity includes the complete array; quote-only changes retain
1018
+ the image node, while a changed chain rebinds and cancels previous retries.
1019
+ Recycling/destroy disposes listeners, retry timers and avatar subscriptions.
1020
+ Required coverage: one/two/three+ sources, first two fail/third succeeds, terminal
1021
+ failure, empty continuation, chain replacement/cancel and legacy fallbackUri.
1022
+
1023
+ Enhanced Web History section titles retain the consumer headingXs 0.8px letter
1024
+ spacing; hover uses rowPressedBackground and pointer-active enhanced History
1025
+ uses rowSelectedBackground. Other Activity presentations are unchanged.
1026
+
1027
+ Parent-scroll compact Market rows retain the consumer's pointer states: ordinary
1028
+ token/perp cards use active opacity0.8, stock cards active selected background.
1029
+ Consumers supply the page background as hover color. New table image fallbacks
1030
+ use a28px icon in the40px image frame; compact32px frames retain24px icons.
1031
+ These styles do not change legacy internally scrolling Market rows.
1032
+
1033
+ The optional theme.imageFallbackBackground is consumed by Web only when a
1034
+ declared visual fallback is displayed; unset leaves the existing transparent
1035
+ fallback over its original frame. It never changes healthy image backgrounds,
1036
+ Stock tags or hover logo slots. Native callers do not emit it. HoverImages may
1037
+ contain explicit null entries to preserve the original16px empty round logo
1038
+ slots, including their ring/overlap/order; non-null entries remain ImageSource
1039
+ and the existing four-slot limit stays unchanged.
1040
+
1041
+ Compact Market subtitlePrefix preserves intrinsic text width with flex-shrink
1042
+ and its existing maxWidth cap; it does not grow short names to that cap.
1043
+ Its optional Web-only hoverActionKey requests anchored help only when the
1044
+ actual prefix text is truncated (scrollWidth > clientWidth + 1). The consumer
1045
+ owns the existing tooltip content/presentation. Pointer/focus departure, scroll,
1046
+ rebind and destroy invalidate its existing anchor. Text, cap or action identity
1047
+ changes use normal rebind; unchanged quote updates preserve that node/focus.
1048
+ Native callers do not emit this field and native renderers ignore it.
1049
+
1050
+
1051
+ ### Host-provided Web fonts
1052
+
1053
+ configureNativeListFonts and NativeListFontFamilies retain the source baseline
1054
+ public API and validation. In the historical controlled 3.0.177 consumer
1055
+ backfill, only Web was backported:
1056
+ empty configuration uses system families; each supplied regular/medium/semibold/
1057
+ bold name belongs to fonts already loaded by the UI host. Hosts load fonts
1058
+ before configuring the mapping; the historical consumer supplied Roobert for
1059
+ all four weights. The SDK registers no fonts. That controlled backfill retained
1060
+ the 3.0.177 native wrapper and native platform font behavior.
1061
+ Web roots, section rails, reorder previews and all finite row text presentations
1062
+ select the family matching their existing numeric weight; layout and numeric
1063
+ weights are unchanged. A live configuration change invalidates active anchors,
1064
+ cancels reorder, clears measurement caches and remeasures; the same configuration
1065
+ is a no-op. A paused/null host initializes with the latest configuration.
1066
+ The 6.7.0-1 source integration preserves its existing native font policy/API.
1067
+
1068
+ Market Web badge text uses tabular numeric glyphs, matching the consuming
1069
+ Market text style for leverage/provider labels. This rule is limited to the
1070
+ Market badge renderer class; generic Activity/time badge typography is unchanged.
1071
+
1072
+ React prop snapshots commit in the layout phase alongside React-owned slots.
1073
+ For an external host with cached viewport dimensions, recomputation calculates
1074
+ and expands the normal-flow row extent before geometry reads, avoiding an append
1075
+ plus footer-removal intermediate clamp. The calculated layout is reused when
1076
+ viewport dimensions are unchanged; changed dimensions receive a fresh layout.
1077
+ Final measured layout owns legitimate shrinking; no scroll restoration offset
1078
+ or retained minimum-height state is added. First creation without cached geometry
1079
+ and imperative snapshot acceptance retain their existing contracts.
1080
+
1081
+ Web gallery media fit consumes the existing ImageSource.contentFit values:
1082
+ cover/contain/fill map directly to CSS object-fit and center maps to none.
1083
+ When omitted, a video uses contain and an image uses cover, preserving the
1084
+ consuming Web NFT defaults. Failed-video transitions resolve the image default
1085
+ again rather than retaining video fit. Native fit/probe contracts are unchanged.
1086
+
1087
+
1088
+ ### Source integration status (2026-10-16)
1089
+
1090
+ The Web migration was integrated onto source 655789b01 (6.7.0-1), preserving
1091
+ its native font resolver, iOS 26 overlay, package metadata and native implementation.
1092
+ The PR rebases that source onto main dd0d77af3, whose independent desktop Windows
1093
+ release changes do not overlap this package. The consuming PR targets 3.0.180;
1094
+ its reproducible patch and dependency verification are separate from the
1095
+ historical 3.0.177 backfill evidence below.
1096
+ The prior 3.0.178 source integration was an intermediate validated checkpoint.
1097
+ Controlled Web/shared consumer backfill was verified against 3.0.177 while
1098
+ retaining that version's native wrapper, binary boundary and native type
1099
+ declarations. This historical backfill is separate from consumer dependency
1100
+ updates.
1101
+ Merged package tests/typecheck/build and controlled consumer backfill smoke
1102
+ passed. The final Web-focused suite passed 89 checks; broader package checks
1103
+ and consuming Web/Electron presentation checks are recorded separately. Pending
1104
+ remote-row display and the real business hook/controller navigation contract
1105
+ were verified with explicit auxiliary fixtures/stub boundaries; no real eligible
1106
+ account SendReplaceTx confirmation page, signing, or broadcast was exercised.
1107
+ The consumer backfill does not establish native runtime acceptance of this
1108
+ merged package. Final performance sampling was stopped at the user's request
1109
+ and is partial evidence, not a completed performance signoff.
1110
+
1111
+ ### Desktop/Web Market asset parity
1112
+
1113
+ The Web table asset renderer consumes the existing leading visual backgroundColor
1114
+ and borderColor descriptors without changing the schema or native primitives.
1115
+ Its token frame remains40 CSS px including an optional1px solid border; the main
1116
+ bitmap fills the content box (38px with border,40px without). Overlay visuals
1117
+ remain outside that frame and fallback surfaces retain their existing color/icon
1118
+ contract. Theme/leading changes rebind the visual and clear old border styles.
1119
+ The address-copy revealed line uses a2px text-to-action gap, while Stock hover
1120
+ logo groups retain their4px gap and overlap geometry. No other text-part gaps
1121
+ change. Regression acceptance includes Dark/Light recycled visuals, preserved
1122
+ network overlays, independent copy actions and Stock hover group spacing.
1123
+
1124
+ Gallery collection subtitles retain an 8px trailing text inset whether or not
1125
+ a network thumbnail is present. The subtitle uses border-box sizing and its row
1126
+ has no extra gap, preserving the same 8px separation with a thumbnail and the
1127
+ legacy truncation width without one. Legacy MediaTile/native rendering is
1128
+ unchanged.
1129
+
1130
+ Compact Market touch long-press cancellation follows actual `touchmove`
1131
+ events and valid touch coordinates beyond the existing 3px stationary limit.
1132
+ Pointer-only micro-movement within browser tap tolerance does not prematurely
1133
+ cancel a touch long-press. Pointer cancellation and real ancestor scrolling
1134
+ still cancel it; mouse, pen and table pointer thresholds remain unchanged.
1135
+ The passive touch listener is removed when the engine is destroyed.
1136
+
1137
+ Table secondary-line pointer hover is enabled only when the primary input
1138
+ reports `(hover: hover)`, matching the consuming Web row's hover media rule.
1139
+ Touch capability alone does not disable hover. Existing focus-within reveal
1140
+ remains available to keyboard navigation; no input-modality configuration or
1141
+ native behavior is introduced.
1142
+
1143
+ The declared table asset background remains on its outer token frame during
1144
+ source loading, matching the consumer's Token wrapper. The existing image
1145
+ placeholder/retry path and fallback span are unchanged; only the fallback span
1146
+ uses the fallback background. A solid frame border does not move external
1147
+ overlays: their primitive-generated edge positions are shifted outward by the
1148
+ 1px border once per new visual, preserving the caller's unbordered outer-anchor
1149
+ geometry. No shift is accumulated during same-visual quote patches.
1150
+
1151
+ Table secondary-line clipping uses `overflow: clip` so keyboard focus cannot
1152
+ scroll the two-line reveal viewport in addition to its existing transform.
1153
+ Focus-within and primary-hover reveal behavior remain unchanged; no scroll
1154
+ position writes or global overflow policy are introduced.
1155
+
1156
+ Web history section headers consume the existing titleLoading flag with the
1157
+ original20px spinner,8px title gap and heading casing. The declared32/52px
1158
+ section slots remain unchanged; the pending title content retains its original
1159
+ 4px intrinsic overflow. Explicit60px stacked history content fills its stated
1160
+ row height; ordinary history rows retain their existing trailing spacing.
1161
+
1162
+ Web enhanced History badges preserve the existing small Badge geometry (8px horizontal padding, 4px radius, medium text). Warning backgrounds consume the declared cautionBackground theme value with the prior fallback when absent. Native rendering is unchanged.
1163
+
1164
+
1165
+ ### Web external parent-scroll commands
1166
+
1167
+ When a caller supplies webScrollHost, scroll commands use the DOM scrollTo method from that element's document realm. React Native Web may decorate a NativeScroller node with a differently shaped React Native scrollTo method; the DOM host contract must not invoke that method with DOM options. The native/ref APIs and internally owned NativeList viewport keep their existing behavior.
1168
+
1169
+ Existing Pager command-accepted/cancel notifications use the actual external scroll owner when supplied, otherwise the internally owned viewport. A list command cancels queued Pager restoration/top work; a Pager top command cancels a pending list command and stops motion on that same owner. Listener target guards and destruction removal must match. No new public method, event name or native behavior is introduced.
1170
+
1171
+
1172
+ ### Web Pager inset notifications
1173
+
1174
+ An externally hosted list listens for the existing Pager inset notification on
1175
+ its actual scroll owner, matching the notification target and removing the same
1176
+ listener on destroy. It measures the new content origin before Pager restores
1177
+ its C+B offset; a later ResizeObserver must not add that inset a second time.
1178
+ Ordinary subsequent slot-height changes retain the existing content-anchor
1179
+ compensation. Standalone lists continue listening on their own viewport.
@@ -43,19 +43,27 @@ final class HybridNativeList: HybridNativeListSpec {
43
43
  didSet { if fontFamiliesJson != oldValue { fontsChanged = true } }
44
44
  }
45
45
 
46
- var topScrollEdgeHard = false {
46
+ var topScrollEdgeEffect: NativeListScrollEdgeEffect = .none {
47
47
  didSet {
48
48
  runOnMain { [weak self] in
49
- self?.hostView?.setTopScrollEdge(hard: self?.topScrollEdgeHard ?? false,
49
+ self?.hostView?.setTopScrollEdge(effect: self?.topEdgeStyle ?? .none,
50
50
  overlayHeight: CGFloat(self?.topOverlayHeight ?? 0))
51
51
  }
52
52
  }
53
53
  }
54
54
 
55
+ private var topEdgeStyle: NativeListTopScrollEdgeEffect {
56
+ switch topScrollEdgeEffect {
57
+ case .none: return .none
58
+ case .hard: return .hard
59
+ case .soft: return .soft
60
+ }
61
+ }
62
+
55
63
  var topOverlayHeight: Double = 0 {
56
64
  didSet {
57
65
  runOnMain { [weak self] in
58
- self?.hostView?.setTopScrollEdge(hard: self?.topScrollEdgeHard ?? false,
66
+ self?.hostView?.setTopScrollEdge(effect: self?.topEdgeStyle ?? .none,
59
67
  overlayHeight: CGFloat(self?.topOverlayHeight ?? 0))
60
68
  }
61
69
  }
@@ -3,6 +3,10 @@ import CoreFoundation
3
3
  import UIKit
4
4
  import UniformTypeIdentifiers
5
5
 
6
+ enum NativeListTopScrollEdgeEffect {
7
+ case none, hard, soft
8
+ }
9
+
6
10
  final class NativeListView: UIView {
7
11
  private var fonts = NativeListFontFamilies()
8
12
 
@@ -36,7 +40,7 @@ final class NativeListView: UIView {
36
40
  private var topEdgeInteraction: UIInteraction?
37
41
  private var topEdgeMarker: UILabel?
38
42
  private var originalTopEdgeStyle: AnyObject?
39
- private var topScrollEdgeHard = false
43
+ private var topScrollEdgeEffect: NativeListTopScrollEdgeEffect = .none
40
44
  private var requestedTopOverlayHeight: CGFloat = 0
41
45
  private var appliedTopOverlayInset: CGFloat = 0
42
46
 
@@ -78,8 +82,8 @@ final class NativeListView: UIView {
78
82
  }
79
83
  }
80
84
 
81
- func setTopScrollEdge(hard: Bool, overlayHeight: CGFloat) {
82
- topScrollEdgeHard = hard
85
+ func setTopScrollEdge(effect: NativeListTopScrollEdgeEffect, overlayHeight: CGFloat) {
86
+ topScrollEdgeEffect = effect
83
87
  requestedTopOverlayHeight = overlayHeight.isFinite ? max(0, overlayHeight) : 0
84
88
  updateTopScrollEdge()
85
89
  setNeedsLayout()
@@ -87,7 +91,7 @@ final class NativeListView: UIView {
87
91
 
88
92
  private func updateTopScrollEdge() {
89
93
  if #available(iOS 26.0, *) {
90
- let hasOverlay = topScrollEdgeHard && topOverlayContent != nil
94
+ let hasOverlay = topScrollEdgeEffect != .none && topOverlayContent != nil
91
95
  let enabled = hasOverlay && window != nil
92
96
  let nextInset = hasOverlay ? requestedTopOverlayHeight : 0
93
97
  if nextInset != appliedTopOverlayInset {
@@ -134,7 +138,7 @@ final class NativeListView: UIView {
134
138
  }
135
139
  originalTopEdgeStyle = nil
136
140
  }
137
- if enabled { collectionView.topEdgeEffect.style = .hard }
141
+ if enabled { collectionView.topEdgeEffect.style = topScrollEdgeEffect == .soft ? .soft : .hard }
138
142
  }
139
143
  }
140
144
 
@@ -2107,7 +2111,7 @@ final class NativeListView: UIView {
2107
2111
 
2108
2112
  func dispose() {
2109
2113
  guard !disposed else { return }
2110
- setTopScrollEdge(hard: false, overlayHeight: 0)
2114
+ setTopScrollEdge(effect: .none, overlayHeight: 0)
2111
2115
  disposed = true
2112
2116
 
2113
2117
  disposeActionAnchor()
@@ -4,6 +4,34 @@ import XCTest
4
4
 
5
5
  @MainActor
6
6
  final class NativeListLifecycleTests: XCTestCase {
7
+ func testScrollEdgeStylesPreserveOverlayGeometryAndRestoreOriginalStyle() throws {
8
+ guard #available(iOS 26.0, *) else {
9
+ throw XCTSkip("Scroll-edge styles require iOS 26 or newer")
10
+ }
11
+ let view = try makeScrollingList()
12
+ let window = UIWindow(frame: view.frame)
13
+ window.addSubview(view)
14
+ let list = try XCTUnwrap(view.subviews.compactMap { $0 as? UICollectionView }.first)
15
+ let originalStyle = list.topEdgeEffect.style
16
+ let originalInset = list.contentInset.top
17
+ let overlay = UIView(frame: CGRect(x: 0, y: 0, width: 320, height: 64))
18
+ view.mountContainerSlot(overlay, atIndex: 3)
19
+ view.setTopScrollEdge(effect: .hard, overlayHeight: 64)
20
+ XCTAssertEqual(list.topEdgeEffect.style, .hard)
21
+ XCTAssertEqual(list.contentInset.top, originalInset + 64, accuracy: 0.01)
22
+ let offset = list.contentOffset
23
+ view.setTopScrollEdge(effect: .soft, overlayHeight: 64)
24
+ XCTAssertEqual(list.topEdgeEffect.style, .soft)
25
+ XCTAssertEqual(list.contentInset.top, originalInset + 64, accuracy: 0.01)
26
+ XCTAssertEqual(list.contentOffset, offset)
27
+ XCTAssertNotNil(overlay.superview)
28
+ view.setTopScrollEdge(effect: .none, overlayHeight: 0)
29
+ XCTAssertEqual(list.topEdgeEffect.style, originalStyle)
30
+ XCTAssertEqual(list.contentInset.top, originalInset, accuracy: 0.01)
31
+ view.unmountContainerSlot(overlay)
32
+ view.removeFromSuperview()
33
+ }
34
+
7
35
  func testInvalidCommandsPreserveAcceptedAnimationCompletion() throws {
8
36
  for invalid in 0..<3 {
9
37
  let view = try makeScrollingList()
@@ -35,6 +35,8 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
35
35
  topScrollEdgeEffect,
36
36
  scrollPositionThresholds,
37
37
  webVirtualizationEnabled: _webVirtualizationEnabled,
38
+ webScrollHost: _webScrollHost,
39
+ webStickyInset: _webStickyInset,
38
40
  webSectionIndexContainerRef: _webSectionIndexContainerRef,
39
41
  keyboardDismissMode = 'none',
40
42
  keyboardShouldPersistTaps = 'never',
@@ -56,7 +58,7 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
56
58
  const fontFamiliesJson = useNativeListFontFamiliesJson();
57
59
  const [slotHeights, setSlotHeights] = useState([0, 0, 0]);
58
60
  const [topOverlayHeight, setTopOverlayHeight] = useState(0);
59
- const hasTopOverlay = Platform?.OS === 'ios' && parseInt(String(Platform.Version), 10) >= 26 && topScrollEdgeEffect === 'hard' && topOverlay != null;
61
+ const hasTopOverlay = Platform?.OS === 'ios' && parseInt(String(Platform.Version), 10) >= 26 && (topScrollEdgeEffect === 'hard' || topScrollEdgeEffect === 'soft') && topOverlay != null;
60
62
  const containerSlotHeightsJson = JSON.stringify(slotHeights);
61
63
  const slotInset = snapshot.layout.contentPaddingHorizontal ?? snapshot.layout.contentPadding ?? 0;
62
64
  if (snapshot.layout.orientation === 'horizontal' && (listHeader || listEmpty || listFooter)) {
@@ -325,7 +327,7 @@ export const NativeList = /*#__PURE__*/forwardRef(function NativeList({
325
327
  fontFamiliesJson: fontFamiliesJson,
326
328
  snapshotJson: snapshotJson,
327
329
  containerSlotHeightsJson: containerSlotHeightsJson,
328
- topScrollEdgeHard: hasTopOverlay,
330
+ topScrollEdgeEffect: hasTopOverlay ? topScrollEdgeEffect ?? 'none' : 'none',
329
331
  topOverlayHeight: hasTopOverlay ? topOverlayHeight : 0,
330
332
  scrollPositionThresholdsJson: scrollPositionThresholdsJson,
331
333
  keyboardDismissMode: keyboardDismissMode,