@onekeyfe/react-native-pager-view 6.7.0-4 → 6.7.0-5
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 +13 -0
- package/lib/module/index.native.js +9 -0
- package/lib/typescript/src/index.native.d.ts +13 -0
- package/package.json +6 -4
- package/src/index.native.tsx +30 -0
package/docs/SPEC.md
CHANGED
|
@@ -887,3 +887,16 @@ On active-to-inactive transition, the Web pager freezes the selected logical Rea
|
|
|
887
887
|
Valid vertical wheel, scroll keys, scrollbar drag, overlay-forwarded input, accepted NativeList commands, and explicit page-top/sticky-top commands cancel pending route intent through the existing SDK takeover path. As in the prior Web app adapter, any owner `pointerdown` or `touchstart`, including a child target, cancels only route pending; this does not newly commit or clear SDK C+B memory. Geometry-only scroll/resize/scrollend cannot cancel intent. Valid same-offset commands cancel it; invalid or stale commands do not. A matching route target takes priority over automatic tab C+B restoration. Selection of a different key, owner identity reset (including A→B→A), genuine DOM owner replacement, or removal cancels pending; a same-key index reorder preserves it. A same-commit blur and Activity/Offscreen effect disconnect captures the current route target before releasing the owner; repeated disconnects preserve an existing pending target. A temporary React ref null or Activity/Offscreen effect disconnect followed by the identical connected owner preserves the logical route target and owner generation while releasing all observers, listeners, frames, and DOM configuration during disconnect. Restoration is unavailable while disconnected; reconnect remeasures automatic chrome before applying pending. A truly removed pager instance cannot transfer its pending target to a new instance. Older queued tab/top callbacks must validate generation before writing after route restoration or cancellation. The app owns navigation focus and business tab names; the SDK never infers them from escaped React child keys.
|
|
888
888
|
|
|
889
889
|
Platform matrix: Web owns this DOM geometry, registration, route pending, and explicit Web export. iOS and Android keep native scrolling, restoration, and page coordination documented above, with no new prop, native bridge call, JS heap sharing, or process resource. The UI main runtime owns Web state; background runtimes do not deserialize it. Source/type tests establish only Web contract implementation, not browser rendering or native device behavior. Acceptance requires real Web/Desktop route blur, short content then growth, user takeover, dynamic chrome, key reset, and Home/Market scroll regressions.
|
|
890
|
+
|
|
891
|
+
## Native package entry isolation
|
|
892
|
+
|
|
893
|
+
The Native package entry exports the existing Native PagerView,
|
|
894
|
+
CollapsiblePagerView, NativeScroller, usePagerView and ScrollEdgeEffect APIs.
|
|
895
|
+
Native package resolution MUST NOT evaluate the Web pager or Web page-context
|
|
896
|
+
modules. The react-native field and conditional export resolve to a real Native
|
|
897
|
+
entry; the browser entry retains the Web runtime APIs. The generic declaration
|
|
898
|
+
entry preserves the existing shared Web value/type API for TypeScript callers.
|
|
899
|
+
This separates package initialization in the Native UI main runtime; it does not
|
|
900
|
+
add a bridge, share JS heaps with background, or change Native scroll commands.
|
|
901
|
+
Acceptance includes the actual Native dependency graph and unchanged startup
|
|
902
|
+
budgets, Web runtime/type exports, and package source/module/declaration entries.
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
import { PagerView } from "./PagerView";
|
|
4
|
+
export default PagerView;
|
|
5
|
+
export * from "./usePagerView.js";
|
|
6
|
+
export * from "./CollapsiblePagerView";
|
|
7
|
+
export * from "./NativeScroller";
|
|
8
|
+
export { ScrollEdgeEffect } from "./ScrollEdgeEffect.js";
|
|
9
|
+
//# sourceMappingURL=index.native.js.map
|
|
@@ -0,0 +1,13 @@
|
|
|
1
|
+
import type * as ReactNative from "react-native";
|
|
2
|
+
import { PagerView } from "./PagerView";
|
|
3
|
+
export default PagerView;
|
|
4
|
+
export * from "./usePagerView";
|
|
5
|
+
export * from "./CollapsiblePagerView";
|
|
6
|
+
export * from "./NativeScroller";
|
|
7
|
+
import type { OnPageScrollEventData as PagerViewOnPageScrollEventData, OnPageSelectedEventData as PagerViewOnPageSelectedEventData, OnPageScrollStateChangedEventData as PageScrollStateChangedNativeEventData, NativeProps } from "./PagerViewNativeComponent";
|
|
8
|
+
export type { PagerViewOnPageScrollEventData, PagerViewOnPageSelectedEventData, PageScrollStateChangedNativeEventData, NativeProps as PagerViewProps, };
|
|
9
|
+
export type PagerViewOnPageScrollEvent = ReactNative.NativeSyntheticEvent<PagerViewOnPageScrollEventData>;
|
|
10
|
+
export type PagerViewOnPageSelectedEvent = ReactNative.NativeSyntheticEvent<PagerViewOnPageSelectedEventData>;
|
|
11
|
+
export type PageScrollStateChangedNativeEvent = ReactNative.NativeSyntheticEvent<PageScrollStateChangedNativeEventData>;
|
|
12
|
+
export { ScrollEdgeEffect } from "./ScrollEdgeEffect";
|
|
13
|
+
//# sourceMappingURL=index.native.d.ts.map
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@onekeyfe/react-native-pager-view",
|
|
3
|
-
"version": "6.7.0-
|
|
3
|
+
"version": "6.7.0-5",
|
|
4
4
|
"description": "React Native wrapper for Android and iOS ViewPager",
|
|
5
5
|
"source": "./src/index.tsx",
|
|
6
6
|
"main": "./lib/module/index.js",
|
|
@@ -9,8 +9,9 @@
|
|
|
9
9
|
"sideEffects": false,
|
|
10
10
|
"exports": {
|
|
11
11
|
".": {
|
|
12
|
-
"source": "./src/index.tsx",
|
|
13
12
|
"types": "./lib/typescript/src/index.d.ts",
|
|
13
|
+
"react-native": "./lib/module/index.native.js",
|
|
14
|
+
"source": "./src/index.tsx",
|
|
14
15
|
"browser": "./lib/module/index.web.js",
|
|
15
16
|
"default": "./lib/module/index.js"
|
|
16
17
|
},
|
|
@@ -72,7 +73,7 @@
|
|
|
72
73
|
"typescript": "^5.9.2"
|
|
73
74
|
},
|
|
74
75
|
"peerDependencies": {
|
|
75
|
-
"@onekeyfe/react-native-native-logger": "6.7.0-
|
|
76
|
+
"@onekeyfe/react-native-native-logger": "6.7.0-5",
|
|
76
77
|
"react": "*",
|
|
77
78
|
"react-native": "*"
|
|
78
79
|
},
|
|
@@ -108,5 +109,6 @@
|
|
|
108
109
|
"RNCNativeScroller": "RNCNativeScrollerComponentView"
|
|
109
110
|
}
|
|
110
111
|
}
|
|
111
|
-
}
|
|
112
|
+
},
|
|
113
|
+
"react-native": "./lib/module/index.native.js"
|
|
112
114
|
}
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type * as ReactNative from "react-native";
|
|
2
|
+
import { PagerView } from "./PagerView";
|
|
3
|
+
export default PagerView;
|
|
4
|
+
export * from "./usePagerView";
|
|
5
|
+
export * from "./CollapsiblePagerView";
|
|
6
|
+
export * from "./NativeScroller";
|
|
7
|
+
import type {
|
|
8
|
+
OnPageScrollEventData as PagerViewOnPageScrollEventData,
|
|
9
|
+
OnPageSelectedEventData as PagerViewOnPageSelectedEventData,
|
|
10
|
+
OnPageScrollStateChangedEventData as PageScrollStateChangedNativeEventData,
|
|
11
|
+
NativeProps,
|
|
12
|
+
} from "./PagerViewNativeComponent";
|
|
13
|
+
|
|
14
|
+
export type {
|
|
15
|
+
PagerViewOnPageScrollEventData,
|
|
16
|
+
PagerViewOnPageSelectedEventData,
|
|
17
|
+
PageScrollStateChangedNativeEventData,
|
|
18
|
+
NativeProps as PagerViewProps,
|
|
19
|
+
};
|
|
20
|
+
|
|
21
|
+
export type PagerViewOnPageScrollEvent =
|
|
22
|
+
ReactNative.NativeSyntheticEvent<PagerViewOnPageScrollEventData>;
|
|
23
|
+
|
|
24
|
+
export type PagerViewOnPageSelectedEvent =
|
|
25
|
+
ReactNative.NativeSyntheticEvent<PagerViewOnPageSelectedEventData>;
|
|
26
|
+
|
|
27
|
+
export type PageScrollStateChangedNativeEvent =
|
|
28
|
+
ReactNative.NativeSyntheticEvent<PageScrollStateChangedNativeEventData>;
|
|
29
|
+
|
|
30
|
+
export { ScrollEdgeEffect } from "./ScrollEdgeEffect";
|