@onekeyfe/react-native-pager-view 6.7.0-alpha.466 → 6.8.0-2
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.
- package/README.md +159 -136
- package/android/src/main/java/com/reactnativepagerview/CollapsiblePagerHost.kt +21 -7
- package/android/src/main/java/com/reactnativepagerview/CollapsiblePagerNativeHeaders.kt +86 -14
- package/android/src/main/java/com/reactnativepagerview/CollapsiblePagerViewManager.kt +1 -1
- package/docs/SPEC.md +124 -1
- package/ios/RNCCollapsiblePagerViewComponentView.mm +356 -19
- package/ios/tests/RNCCollapsiblePagerFirstFrameTests.mm +166 -5
- package/lib/module/CollapsiblePagerView.js +6 -1
- package/lib/module/CollapsiblePagerView.web.js +132 -11
- package/lib/typescript/src/CollapsiblePagerView.d.ts +21 -1
- package/lib/typescript/src/CollapsiblePagerView.web.d.ts +8 -0
- package/package.json +1 -1
- package/src/CollapsiblePagerView.tsx +30 -1
- package/src/CollapsiblePagerView.web.tsx +110 -9
package/docs/SPEC.md
CHANGED
|
@@ -164,6 +164,40 @@ diagnostic compilation and strict-input installation are separate build evidence
|
|
|
164
164
|
Market's equal-height secondary display-owner change is an independent consumer
|
|
165
165
|
companion, not a new SDK public guarantee or JS/native same-frame contract.
|
|
166
166
|
|
|
167
|
+
### iOS 27 pinned stand-in transition edges
|
|
168
|
+
|
|
169
|
+
Status: Implemented; iOS 27 simulator runtime verified for Wallet Home Spot ↔ History.
|
|
170
|
+
|
|
171
|
+
While a local smooth Hard pager's sticky header is pinned (`headerOffset >= headerHeight`),
|
|
172
|
+
every page participating in a horizontal transition keeps the Hard material behind the
|
|
173
|
+
fixed overlay and sticky header. An incoming page whose vertical list cannot render that
|
|
174
|
+
material itself — not mounted yet, not in the pager's window, laid out below the bars, or
|
|
175
|
+
resting at its top edge — receives a stand-in: an empty, noninteractive `UIScrollView`
|
|
176
|
+
placed at the page's origin in the container, sized to the overlay + sticky boundary and
|
|
177
|
+
offset past its top edge, with owned transparent top/sticky element hosts bound to it.
|
|
178
|
+
The stand-in draws only UIKit's Hard material; it carries no snapshot of header or page
|
|
179
|
+
content, and the page itself stays masked above the boundary. A page whose own list is
|
|
180
|
+
scrolled past its top and covers the bars keeps using its own temporary interactions.
|
|
181
|
+
When the header is not pinned no stand-in is created and the page keeps the previous
|
|
182
|
+
temporary interaction on its own list. The stand-in and its hosts live in the pager
|
|
183
|
+
container, so every scroll-edge mask update recomputes their frames from the current page
|
|
184
|
+
origin, page width and overlay + sticky boundary; they are hidden while that geometry is
|
|
185
|
+
empty. Release, completion and recycle
|
|
186
|
+
remove the stand-in with its owned hosts.
|
|
187
|
+
|
|
188
|
+
The fixed boundary separator covers stay in place for the whole transition, falling back to
|
|
189
|
+
the shared overlay and sticky hosts while no settled owner exists, so the Hard dividing line
|
|
190
|
+
does not flash between detach and reattach. On completion the settled page's normal owner is
|
|
191
|
+
attached before the previous transition owner's interactions are removed on the next run
|
|
192
|
+
loop. When a drag returns to its source and the source's adopted interaction still targets
|
|
193
|
+
the settled list on the shared overlay host, that interaction becomes the settled owner
|
|
194
|
+
again instead of being replaced, so the source keeps its material after cancellation.
|
|
195
|
+
|
|
196
|
+
Verified on an iOS 27 simulator: repeated half-drag cancellations followed by a full
|
|
197
|
+
Spot → History → Spot swipe, with frame-by-frame checks showing no black band, no hairline
|
|
198
|
+
flash and no header content above the boundary. Perps/DeFi/NFT pages and non-pinned
|
|
199
|
+
horizontal drags were not exercised at runtime.
|
|
200
|
+
|
|
167
201
|
### iOS 27 external-overlay interactive ownership
|
|
168
202
|
|
|
169
203
|
Status: Implemented in iOS source; runtime acceptance is reported separately.
|
|
@@ -193,6 +227,13 @@ When C = D, selection restores the destination's saved B. When C < D, effectiveB
|
|
|
193
227
|
is zero while the previous saved B remains suspended. Horizontal selection by
|
|
194
228
|
tap, swipe or an existing programmatic command MUST preserve C throughout.
|
|
195
229
|
|
|
230
|
+
On iOS, a fresh page with no saved body offset and fully expanded shared header
|
|
231
|
+
aligns its raw offset to the newly applied negative top inset even while viewport
|
|
232
|
+
or content size is zero. The full restore remains pending until geometry is ready.
|
|
233
|
+
Deferred identity release and pages with retained body/header offsets keep their
|
|
234
|
+
existing restoration path. This prevents painting a new list at raw offset zero
|
|
235
|
+
before its first content measurement; it does not gate business-data insertion.
|
|
236
|
+
|
|
196
237
|
Alignment, prefetch, replacement, inset changes and pending restoration MUST NOT
|
|
197
238
|
commit new B. Actual consumed vertical scrolling takes over the visible body
|
|
198
239
|
position; reaching full collapse during that gesture MUST NOT resurrect the old
|
|
@@ -264,6 +305,22 @@ intent. Real vertical consumption, a newer valid command, or owner detachment
|
|
|
264
305
|
releases the target. Existing NativeList and NativeScroller public coordinates
|
|
265
306
|
are unchanged. The same page-top/sticky-top destinations are available without smooth-header mode.
|
|
266
307
|
|
|
308
|
+
On Android, `CollapsiblePagerHost.tryScrollToTop(target, animated)` and
|
|
309
|
+
`isAwayFromPageTop()` are public and kept from minification because
|
|
310
|
+
`react-native-bottom-tabs` calls them by name on a tab double press, as neither
|
|
311
|
+
package depends on the other. `tryScrollToTop` returns true only after the
|
|
312
|
+
existing page-top command accepts a stable, attached current owner; invalid
|
|
313
|
+
targets, horizontal transitions, restoration and missing/stale owners return
|
|
314
|
+
false without queueing a command. Acceptance does not mean animation completion.
|
|
315
|
+
`isAwayFromPageTop` is true while the header offset is above zero, whatever the
|
|
316
|
+
body offset. iOS exposes the same `tryScrollToTop:animated:` Boolean result and
|
|
317
|
+
`isAwayFromPageTop` selector. Renaming either breaks that caller silently.
|
|
318
|
+
The existing Fabric `scrollToTop` command remains void on both platforms and
|
|
319
|
+
uses the same acceptance path; JavaScript commands and public refs are unchanged.
|
|
320
|
+
BottomTabs and Pager native sources must ship together for this entry point.
|
|
321
|
+
The acceptance-returning entry point is implemented in source; runtime
|
|
322
|
+
acceptance during horizontal transitions and owner loss remains pending.
|
|
323
|
+
|
|
267
324
|
## Current-page partial header command
|
|
268
325
|
|
|
269
326
|
`scrollHeaderBy(delta: number)` moves the current page's shared collapsible
|
|
@@ -1038,6 +1095,24 @@ Status: implemented and verified by production-native UIKit regressions on
|
|
|
1038
1095
|
iOS 27.1 for footer insertion, explicit-sibling priority and nested-pager
|
|
1039
1096
|
delegation. Full App and physical-device visual acceptance are reported separately.
|
|
1040
1097
|
|
|
1098
|
+
A NativeOverlay host is a discovery boundary on iOS as well. Overlay content
|
|
1099
|
+
(popover, sheet, dialog) stays mounted inside its host view until the overlay
|
|
1100
|
+
window presents it, and the host can sit anywhere in a page's subtree, including
|
|
1101
|
+
beside the page's NativeList. Scroll views inside a host belong to the overlay:
|
|
1102
|
+
they MUST NOT be resolved as the page's vertical scroll owner or receive its
|
|
1103
|
+
insets, logical offsets or shared header. Without this boundary a staged sheet's
|
|
1104
|
+
Fabric scroll view outranks a NativeList sibling, takes the collapsed-header
|
|
1105
|
+
offset, and the sheet opens scrolled past its content. The host is recognised by
|
|
1106
|
+
its component class; discovery is unchanged when the overlay package is absent,
|
|
1107
|
+
and a scroll view outside a host keeps its existing priority. Android owner
|
|
1108
|
+
discovery is not changed by this boundary.
|
|
1109
|
+
|
|
1110
|
+
Status: implemented on iOS. Verified in the OneKey app on an iPhone SE (3rd
|
|
1111
|
+
generation) simulator, iOS 26.5: with the Home header collapsed, a popover opened
|
|
1112
|
+
from the History list showed an empty body before this boundary and its content
|
|
1113
|
+
from the first frame after it. A UIKit regression covers the boundary; Android
|
|
1114
|
+
was not inspected beyond the absence of the symptom.
|
|
1115
|
+
|
|
1041
1116
|
When the active scroll owner is removed before its replacement becomes usable,
|
|
1042
1117
|
the pager MUST retain bounded recovery (at most 12 retries per recovery round,
|
|
1043
1118
|
spaced 100 ms apart). Clearing the completed mount's reattachment flag MUST NOT
|
|
@@ -1054,7 +1129,11 @@ header attachment remain deferred until selection settles. Cancelling the drag
|
|
|
1054
1129
|
on the same page MUST retain the reopened recovery round. Empty transactions,
|
|
1055
1130
|
removals and inserts outside the current page MUST NOT reopen the budget. Owned
|
|
1056
1131
|
`NativeScroller` and `NativeList` hosts additionally emit push readiness
|
|
1057
|
-
notifications when their scroll views attach and obtain positive bounds
|
|
1132
|
+
notifications when their vertical scroll views attach and obtain positive bounds
|
|
1133
|
+
and resolve as the page's eligible vertical scroll owner so initial first-layout
|
|
1134
|
+
attachment (while a coalesced slot/layout reconcile is still pending on the main
|
|
1135
|
+
queue or a verified vertical `NativeList` becomes ready before the current page
|
|
1136
|
+
has an observed owner) and late
|
|
1058
1137
|
replacements recover immediately even without another Fabric insertion or after
|
|
1059
1138
|
the retry budget expires; static pages with neither an unready scroll host nor a
|
|
1060
1139
|
released scroll owner do not schedule retry timers.
|
|
@@ -1483,3 +1562,47 @@ commit checks passed 9/9; unrelated postinstall noble patch and Web notification
|
|
|
1483
1562
|
external-image warnings remain separately recorded. Alpha.445 failed Pod
|
|
1484
1563
|
integration and was not reused. SDK iOS CI ran on iOS 26.5: iOS-27-only incoming
|
|
1485
1564
|
lifecycle cases remained skipped; no local SDK UIKit execution is claimed.
|
|
1565
|
+
|
|
1566
|
+
## Pill tabs and centered content band
|
|
1567
|
+
|
|
1568
|
+
`nativeTabBar.style.variant` also accepts `"pill"` on iOS, Android and Web. It
|
|
1569
|
+
lets wide/desktop consumers replace a JS pill tab bar with the native one, so
|
|
1570
|
+
every platform draws Home tabs from the same config.
|
|
1571
|
+
|
|
1572
|
+
- Items keep intrinsic-width labels (medium face, `fontSize` default 16) with
|
|
1573
|
+
`itemPaddingHorizontal` on each side (default 14; text keeps 10, underline and
|
|
1574
|
+
segmented keep 8). Each item is `height - 2 * contentPaddingVertical` tall and
|
|
1575
|
+
vertically inset by `contentPaddingVertical`.
|
|
1576
|
+
- One rounded background (`indicatorColor`, radius = half its height) sits
|
|
1577
|
+
behind the selected item and follows pager progress. Between two items, the
|
|
1578
|
+
leading edge eases out and the trailing edge eases in, so the pill stretches
|
|
1579
|
+
toward the target before it contracts. Label colors blend from
|
|
1580
|
+
`inactiveTextColor` to `activeTextColor` with the same progress rules as the
|
|
1581
|
+
text variant. With `controlled: true`, programmatic page changes drive the same
|
|
1582
|
+
progress animation as the text variant does.
|
|
1583
|
+
- Pill geometry is always taken from the current item frames (iOS and Android
|
|
1584
|
+
layout passes; Web reads live button boxes on every sync and observes item and
|
|
1585
|
+
list resizes). No size is cached per index, so items that only move when the
|
|
1586
|
+
item list changes still get their own offset and width.
|
|
1587
|
+
- Web only: unselected items use `itemHoverBackgroundColor` and
|
|
1588
|
+
`itemPressedBackgroundColor` for hover / pressed feedback. When the pill
|
|
1589
|
+
changes target without pager progress (Web pages switch instantly), it moves
|
|
1590
|
+
with a 220 ms CSS transition; it does not animate on first placement.
|
|
1591
|
+
Native items have no hover or pressed fill.
|
|
1592
|
+
|
|
1593
|
+
`style.contentMaxWidth` (all variants, all three platforms) caps the width of the
|
|
1594
|
+
tab row together with the toolbar slot and centers that band in the bar. The bar
|
|
1595
|
+
background still covers the full width. Values that are missing, not positive,
|
|
1596
|
+
or at least the bar width leave the existing full-width layout unchanged.
|
|
1597
|
+
|
|
1598
|
+
`style.indicatorAnimationEnabled` (pill only, default true) turns the motion
|
|
1599
|
+
off. When false, the pill sits on the selected item (controlled `selectedKey`,
|
|
1600
|
+
otherwise the rounded pager position) on every update, label colors switch
|
|
1601
|
+
between active and inactive without blending, the Web CSS transition is
|
|
1602
|
+
skipped, and programmatic page changes no longer drive progress frames for the
|
|
1603
|
+
tab bar. Swiping the pages still moves the pages; only the tab bar snaps.
|
|
1604
|
+
|
|
1605
|
+
`itemPaddingHorizontal`, `itemHoverBackgroundColor`, `itemPressedBackgroundColor`,
|
|
1606
|
+
`contentMaxWidth` and `indicatorAnimationEnabled` travel to native code inside the existing
|
|
1607
|
+
`nativeTabBarConfig` JSON (colors through `processColor`), so the codegen props
|
|
1608
|
+
and native component schema stay the same. Existing variants keep their defaults.
|