@onekeyfe/react-native-pager-view 3.0.160 → 3.0.161
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/docs/SPEC.md
CHANGED
|
@@ -335,11 +335,16 @@ pager MUST NOT apply a separate refresh translation to the header. The scroll
|
|
|
335
335
|
view's inset and offset, the refresh indicator, and refresh callback ownership
|
|
336
336
|
remain unchanged. Removing the refresh inset or control preserves this alignment
|
|
337
337
|
even without a scroll-offset event. Caller inset changes update the pager
|
|
338
|
-
baseline.
|
|
339
|
-
|
|
338
|
+
baseline. The sticky tab row MUST pin against the baseline top inset; the
|
|
339
|
+
refresh control's temporary inset MUST NOT move it below the content, including
|
|
340
|
+
rapid direction reversals while the spinner is active. Detaching the header
|
|
341
|
+
restores its normal transform. This applies to RN NativeScroller and NativeList
|
|
342
|
+
pages; non-smooth and detached headers keep
|
|
340
343
|
their existing positioning. The 2026-09-30 Home Spot simulator checkpoint covers
|
|
341
|
-
|
|
342
|
-
|
|
344
|
+
shared header/content alignment and inset removal. A separate source-identical
|
|
345
|
+
local package build verified the sticky row during active-refresh vertical
|
|
346
|
+
reversals; published-package, other Home pages and physical-device acceptance
|
|
347
|
+
remain open.
|
|
343
348
|
|
|
344
349
|
## iOS shared-header hit testing
|
|
345
350
|
|
|
@@ -3046,7 +3046,11 @@ static void RNCLogNativeTabScrollBoundary(NSString *owner,
|
|
|
3046
3046
|
// moves both together, so translating the header would separate them.
|
|
3047
3047
|
_sharedHeaderHostView.transform = CGAffineTransformIdentity;
|
|
3048
3048
|
_headerView.transform = CGAffineTransformIdentity;
|
|
3049
|
-
|
|
3049
|
+
UIScrollView *scrollView = _sharedHeaderScrollView;
|
|
3050
|
+
NSNumber *appliedTop = [_appliedTopInsets objectForKey:scrollView];
|
|
3051
|
+
CGFloat refreshInset = scrollView.refreshControl != nil && appliedTop != nil
|
|
3052
|
+
? MAX(0, scrollView.contentInset.top - appliedTop.doubleValue) : 0;
|
|
3053
|
+
CGFloat pinnedTranslation = MAX(0, _currentLogicalOffset - _headerHeight - refreshInset);
|
|
3050
3054
|
CGAffineTransform stickyTransform = CGAffineTransformMakeTranslation(0, pinnedTranslation);
|
|
3051
3055
|
_stickyHeaderView.transform = stickyTransform;
|
|
3052
3056
|
_nativeTabBarView.transform = stickyTransform;
|
|
@@ -193,22 +193,27 @@
|
|
|
193
193
|
[pages addObject:page];
|
|
194
194
|
[pager attachScrollObserverForCurrentPage];
|
|
195
195
|
UIView *headerHost = [pager valueForKey:@"sharedHeaderHostView"];
|
|
196
|
+
UIView *stickyHeader = [pager valueForKey:@"stickyHeaderView"];
|
|
196
197
|
XCTAssertEqual(headerHost.superview, scroll);
|
|
197
198
|
XCTAssertEqualWithAccuracy(scroll.contentInset.top, 340, 0.001);
|
|
198
199
|
XCTAssertEqualWithAccuracy(headerHost.transform.ty, 0, 0.001);
|
|
199
200
|
|
|
200
201
|
scroll.contentOffset = CGPointMake(0, 500);
|
|
202
|
+
CGFloat baselineStickyTranslation = stickyHeader.transform.ty;
|
|
201
203
|
CGPoint offset = scroll.contentOffset;
|
|
202
204
|
scroll.contentInset = UIEdgeInsetsMake(400, 0, 0, 0);
|
|
203
205
|
XCTAssertTrue(CGPointEqualToPoint(scroll.contentOffset, offset));
|
|
204
206
|
XCTAssertEqualWithAccuracy(headerHost.transform.ty, 0, 0.001);
|
|
207
|
+
XCTAssertEqualWithAccuracy(stickyHeader.transform.ty, baselineStickyTranslation, 0.001);
|
|
205
208
|
XCTAssertEqualWithAccuracy(CGRectGetMaxY(headerHost.frame), CGRectGetMinY(content.frame), 0.001);
|
|
206
209
|
|
|
207
210
|
scroll.contentInset = UIEdgeInsetsMake(340, 0, 0, 0);
|
|
208
211
|
XCTAssertEqualWithAccuracy(headerHost.transform.ty, 0, 0.001);
|
|
212
|
+
XCTAssertEqualWithAccuracy(stickyHeader.transform.ty, baselineStickyTranslation, 0.001);
|
|
209
213
|
|
|
210
214
|
scroll.contentInset = UIEdgeInsetsMake(400, 0, 0, 0);
|
|
211
215
|
XCTAssertEqualWithAccuracy(headerHost.transform.ty, 0, 0.001);
|
|
216
|
+
XCTAssertEqualWithAccuracy(stickyHeader.transform.ty, baselineStickyTranslation, 0.001);
|
|
212
217
|
XCTAssertEqualWithAccuracy(CGRectGetMaxY(headerHost.frame), CGRectGetMinY(content.frame), 0.001);
|
|
213
218
|
scroll.refreshControl = nil;
|
|
214
219
|
XCTAssertEqualWithAccuracy(headerHost.transform.ty, 0, 0.001);
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-pager-view",
|
|
3
|
-
"version": "3.0.
|
|
3
|
+
"version": "3.0.161",
|
|
4
4
|
"description": "React Native wrapper for Android and iOS ViewPager",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
@@ -69,7 +69,7 @@
|
|
|
69
69
|
"typescript": "^5.9.2"
|
|
70
70
|
},
|
|
71
71
|
"peerDependencies": {
|
|
72
|
-
"@onekeyfe/react-native-native-logger": "3.0.
|
|
72
|
+
"@onekeyfe/react-native-native-logger": "3.0.161",
|
|
73
73
|
"react": "*",
|
|
74
74
|
"react-native": "*"
|
|
75
75
|
},
|