@papyrus-sdk/ui-react-native 0.2.28 → 0.2.30
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/dist/index.d.mts +8 -1
- package/dist/index.d.ts +8 -1
- package/dist/index.js +161 -91
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +160 -91
- package/dist/index.mjs.map +1 -1
- package/package.json +1 -1
package/dist/index.d.mts
CHANGED
|
@@ -202,4 +202,11 @@ declare const MOBILE_CHROME_METRICS: {
|
|
|
202
202
|
readonly progressHorizontalOffset: 10;
|
|
203
203
|
};
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
type IconProps = {
|
|
206
|
+
size?: number;
|
|
207
|
+
color?: string;
|
|
208
|
+
strokeWidth?: number;
|
|
209
|
+
};
|
|
210
|
+
declare const IconPageNav: React.FC<IconProps>;
|
|
211
|
+
|
|
212
|
+
export { AnnotationEditor, BottomBar, CoverPreview, DocumentActionsSheet, IconPageNav, InfoSheet, MOBILE_CHROME_METRICS, MobilePerfProvider, DedicatedAndroidPdfViewer as NativePdfDocumentViewer, OverflowSheet, _default as PageRenderer, ProgressPill, ReadingShell, RightSheet, SearchOverlay, SearchResultsSheet, SettingsSheet, ToolDock, Topbar, Viewer, createPerfSession, createRunId, useMobilePerf };
|
package/dist/index.d.ts
CHANGED
|
@@ -202,4 +202,11 @@ declare const MOBILE_CHROME_METRICS: {
|
|
|
202
202
|
readonly progressHorizontalOffset: 10;
|
|
203
203
|
};
|
|
204
204
|
|
|
205
|
-
|
|
205
|
+
type IconProps = {
|
|
206
|
+
size?: number;
|
|
207
|
+
color?: string;
|
|
208
|
+
strokeWidth?: number;
|
|
209
|
+
};
|
|
210
|
+
declare const IconPageNav: React.FC<IconProps>;
|
|
211
|
+
|
|
212
|
+
export { AnnotationEditor, BottomBar, CoverPreview, DocumentActionsSheet, IconPageNav, InfoSheet, MOBILE_CHROME_METRICS, MobilePerfProvider, DedicatedAndroidPdfViewer as NativePdfDocumentViewer, OverflowSheet, _default as PageRenderer, ProgressPill, ReadingShell, RightSheet, SearchOverlay, SearchResultsSheet, SettingsSheet, ToolDock, Topbar, Viewer, createPerfSession, createRunId, useMobilePerf };
|
package/dist/index.js
CHANGED
|
@@ -22176,6 +22176,7 @@ __export(ui_react_native_exports, {
|
|
|
22176
22176
|
BottomBar: () => BottomBar_default,
|
|
22177
22177
|
CoverPreview: () => CoverPreview_default,
|
|
22178
22178
|
DocumentActionsSheet: () => DocumentActionsSheet,
|
|
22179
|
+
IconPageNav: () => IconPageNav,
|
|
22179
22180
|
InfoSheet: () => InfoSheet,
|
|
22180
22181
|
MOBILE_CHROME_METRICS: () => MOBILE_CHROME_METRICS,
|
|
22181
22182
|
MobilePerfProvider: () => MobilePerfProvider,
|
|
@@ -25938,12 +25939,17 @@ var shouldEnableViewerScrollForPageScrub = ({
|
|
|
25938
25939
|
isScrubbing
|
|
25939
25940
|
}) => viewerScrollEnabled && !isScrubbing;
|
|
25940
25941
|
var resolvePageScrubberTouchPolicy = () => ({
|
|
25941
|
-
responderTarget: "
|
|
25942
|
+
responderTarget: "track",
|
|
25942
25943
|
claimOnStart: true,
|
|
25943
25944
|
captureOnStart: true,
|
|
25944
25945
|
captureOnMove: true,
|
|
25945
25946
|
childConsumesTouch: false
|
|
25946
25947
|
});
|
|
25948
|
+
var resolvePageScrubberOverlayStyle = () => ({
|
|
25949
|
+
zIndex: 30,
|
|
25950
|
+
elevation: 30
|
|
25951
|
+
});
|
|
25952
|
+
var resolvePageScrubberPointerEvents = () => "box-only";
|
|
25947
25953
|
var resolvePageScrubberReleaseAction = ({
|
|
25948
25954
|
hasMoved,
|
|
25949
25955
|
pendingPage
|
|
@@ -26007,6 +26013,23 @@ var resolvePageScrubberPage = ({
|
|
|
26007
26013
|
Math.min(pageCount, Math.round(ratio * (pageCount - 1)) + 1)
|
|
26008
26014
|
);
|
|
26009
26015
|
};
|
|
26016
|
+
var isPageScrubberTrackYTrusted = (trackY, windowHeight) => Number.isFinite(trackY) && Number.isFinite(windowHeight) && trackY >= 0 && trackY <= windowHeight;
|
|
26017
|
+
var resolvePageScrubberGesturePosition = ({
|
|
26018
|
+
moveY,
|
|
26019
|
+
dy,
|
|
26020
|
+
trackY,
|
|
26021
|
+
windowHeight,
|
|
26022
|
+
trackHeight,
|
|
26023
|
+
thumbHeight,
|
|
26024
|
+
startThumbTop
|
|
26025
|
+
}) => {
|
|
26026
|
+
if (isPageScrubberTrackYTrusted(trackY, windowHeight)) {
|
|
26027
|
+
return moveY - trackY;
|
|
26028
|
+
}
|
|
26029
|
+
const travel = Math.max(0, trackHeight - thumbHeight);
|
|
26030
|
+
const nextThumbTop = Math.max(0, Math.min(travel, startThumbTop + dy));
|
|
26031
|
+
return nextThumbTop + thumbHeight / 2;
|
|
26032
|
+
};
|
|
26010
26033
|
|
|
26011
26034
|
// components/viewerNavigation.ts
|
|
26012
26035
|
var resolveViewerScrollTarget = (pageIndex, isDouble) => ({
|
|
@@ -26061,6 +26084,15 @@ var resolvePositiveInt = (value, fallback, min, max) => {
|
|
|
26061
26084
|
const rounded = Math.round(value);
|
|
26062
26085
|
return Math.max(min, Math.min(max, rounded));
|
|
26063
26086
|
};
|
|
26087
|
+
var scrollViewerListToOffset = (list, offset, animated) => {
|
|
26088
|
+
if (list === null) return;
|
|
26089
|
+
const nativeScrollRef = list.getNativeScrollRef?.();
|
|
26090
|
+
if (nativeScrollRef?.scrollTo) {
|
|
26091
|
+
nativeScrollRef.scrollTo({ y: offset, animated });
|
|
26092
|
+
return;
|
|
26093
|
+
}
|
|
26094
|
+
list.scrollToOffset?.({ offset, animated });
|
|
26095
|
+
};
|
|
26064
26096
|
var Viewer = ({
|
|
26065
26097
|
engine,
|
|
26066
26098
|
virtualWindowSize,
|
|
@@ -26133,6 +26165,7 @@ var Viewer = ({
|
|
|
26133
26165
|
const pendingScrollTimeoutRef = (0, import_react5.useRef)(
|
|
26134
26166
|
null
|
|
26135
26167
|
);
|
|
26168
|
+
const pendingScrollFrameRef = (0, import_react5.useRef)(null);
|
|
26136
26169
|
const pendingChromeShowTimeoutRef = (0, import_react5.useRef)(null);
|
|
26137
26170
|
const chromeVisibleRef = (0, import_react5.useRef)(mobileChromeVisible);
|
|
26138
26171
|
const lastScrollOffsetYRef = (0, import_react5.useRef)(0);
|
|
@@ -26140,6 +26173,7 @@ var Viewer = ({
|
|
|
26140
26173
|
const scrollUpAccumRef = (0, import_react5.useRef)(0);
|
|
26141
26174
|
const [layoutRevision, setLayoutRevision] = (0, import_react5.useState)(0);
|
|
26142
26175
|
const [selectionDragActive, setSelectionDragActive] = (0, import_react5.useState)(false);
|
|
26176
|
+
const [programmaticScrollActive, setProgrammaticScrollActive] = (0, import_react5.useState)(false);
|
|
26143
26177
|
const selectionDragActiveRef = (0, import_react5.useRef)(false);
|
|
26144
26178
|
const [gestureScrollLockActive, setGestureScrollLockActive] = (0, import_react5.useState)(false);
|
|
26145
26179
|
const gestureScrollLockActiveRef = (0, import_react5.useRef)(false);
|
|
@@ -26234,6 +26268,7 @@ var Viewer = ({
|
|
|
26234
26268
|
pendingScrollTargetRef.current = null;
|
|
26235
26269
|
pendingScrollAttemptsRef.current = 0;
|
|
26236
26270
|
clearPendingScrollRetry();
|
|
26271
|
+
setProgrammaticScrollActive(false);
|
|
26237
26272
|
}, [clearPendingScrollRetry]);
|
|
26238
26273
|
const clearPendingChromeShow = (0, import_react5.useCallback)(() => {
|
|
26239
26274
|
if (pendingChromeShowTimeoutRef.current) {
|
|
@@ -26288,6 +26323,10 @@ var Viewer = ({
|
|
|
26288
26323
|
cancelAnimationFrame(pinchAnchorRestoreFrameRef.current);
|
|
26289
26324
|
}
|
|
26290
26325
|
clearPendingScrollRetry();
|
|
26326
|
+
if (pendingScrollFrameRef.current !== null) {
|
|
26327
|
+
cancelAnimationFrame(pendingScrollFrameRef.current);
|
|
26328
|
+
pendingScrollFrameRef.current = null;
|
|
26329
|
+
}
|
|
26291
26330
|
clearPendingChromeShow();
|
|
26292
26331
|
},
|
|
26293
26332
|
[clearPendingChromeShow, clearPendingScrollRetry]
|
|
@@ -27141,12 +27180,20 @@ var Viewer = ({
|
|
|
27141
27180
|
(animated) => {
|
|
27142
27181
|
const target = pendingScrollTargetRef.current;
|
|
27143
27182
|
if (target === null || listRef.current === null) return;
|
|
27144
|
-
|
|
27145
|
-
|
|
27146
|
-
|
|
27183
|
+
setViewerScrollEnabledNative(true);
|
|
27184
|
+
if (pendingScrollFrameRef.current !== null) {
|
|
27185
|
+
cancelAnimationFrame(pendingScrollFrameRef.current);
|
|
27186
|
+
}
|
|
27187
|
+
pendingScrollFrameRef.current = requestAnimationFrame(() => {
|
|
27188
|
+
pendingScrollFrameRef.current = null;
|
|
27189
|
+
const nextTarget = pendingScrollTargetRef.current;
|
|
27190
|
+
const list = listRef.current;
|
|
27191
|
+
if (nextTarget === null || list === null) return;
|
|
27192
|
+
const offset = getFallbackOffsetForIndex(nextTarget.listIndex);
|
|
27193
|
+
scrollViewerListToOffset(list, offset, animated);
|
|
27147
27194
|
});
|
|
27148
27195
|
},
|
|
27149
|
-
[getFallbackOffsetForIndex]
|
|
27196
|
+
[getFallbackOffsetForIndex, setViewerScrollEnabledNative]
|
|
27150
27197
|
);
|
|
27151
27198
|
const restoreOrientationScrollOffset = (0, import_react5.useCallback)(() => {
|
|
27152
27199
|
if (pendingOrientationRestoreWidthRef.current !== windowWidth || pageCount <= 0 || isSingle || isWebView) {
|
|
@@ -27245,6 +27292,7 @@ var Viewer = ({
|
|
|
27245
27292
|
const target = resolveViewerScrollTarget(scrollToPageSignal, isDouble);
|
|
27246
27293
|
pendingScrollTargetRef.current = target;
|
|
27247
27294
|
pendingScrollAttemptsRef.current = 0;
|
|
27295
|
+
setProgrammaticScrollActive(true);
|
|
27248
27296
|
clearPendingScrollRetry();
|
|
27249
27297
|
setDocumentStateTracked(
|
|
27250
27298
|
{
|
|
@@ -27500,6 +27548,89 @@ var Viewer = ({
|
|
|
27500
27548
|
windowWidth
|
|
27501
27549
|
]
|
|
27502
27550
|
);
|
|
27551
|
+
const continuousList = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
27552
|
+
import_react_native4.FlatList,
|
|
27553
|
+
{
|
|
27554
|
+
ref: listRef,
|
|
27555
|
+
nestedScrollEnabled: true,
|
|
27556
|
+
data: isDouble ? rows : pages,
|
|
27557
|
+
style: { width: documentSurfaceWidth },
|
|
27558
|
+
initialNumToRender: FLATLIST_INITIAL_NUM_TO_RENDER,
|
|
27559
|
+
windowSize: resolvedWindowSize,
|
|
27560
|
+
maxToRenderPerBatch: resolvedMaxToRenderPerBatch,
|
|
27561
|
+
updateCellsBatchingPeriod: FLATLIST_UPDATE_CELLS_BATCHING_PERIOD,
|
|
27562
|
+
removeClippedSubviews: resolvedRemoveClippedSubviews,
|
|
27563
|
+
getItemLayout,
|
|
27564
|
+
keyExtractor,
|
|
27565
|
+
contentContainerStyle: styles4.listContent,
|
|
27566
|
+
renderItem,
|
|
27567
|
+
onViewableItemsChanged,
|
|
27568
|
+
viewabilityConfig: { itemVisiblePercentThreshold: 60 },
|
|
27569
|
+
scrollEnabled: pageScrubResolvedScrollEnabled || programmaticScrollActive,
|
|
27570
|
+
onLayout: () => {
|
|
27571
|
+
captureViewerFrame(listRef.current);
|
|
27572
|
+
restoreOrientationScrollOffset();
|
|
27573
|
+
scrollToPendingTarget(false);
|
|
27574
|
+
},
|
|
27575
|
+
onContentSizeChange: (_, height) => {
|
|
27576
|
+
viewerContentHeightRef.current = height;
|
|
27577
|
+
scrollToPendingTarget(false);
|
|
27578
|
+
},
|
|
27579
|
+
onScrollToIndexFailed: ({ index, averageItemLength }) => {
|
|
27580
|
+
const dataLength = isDouble ? rows.length : pages.length;
|
|
27581
|
+
if (index < 0 || index >= dataLength) return;
|
|
27582
|
+
const existingTarget = pendingScrollTargetRef.current;
|
|
27583
|
+
pendingScrollTargetRef.current = isDouble ? existingTarget?.listIndex === index ? existingTarget : resolveViewerScrollTarget(rows[index]?.left ?? index * 2, true) : resolveViewerScrollTarget(index, false);
|
|
27584
|
+
const offset = Math.max(0, getFallbackOffsetForIndex(index));
|
|
27585
|
+
scrollViewerListToOffset(listRef.current, offset, false);
|
|
27586
|
+
if (!isDouble) {
|
|
27587
|
+
ensurePageDimensions(index);
|
|
27588
|
+
} else {
|
|
27589
|
+
const row = rows[index];
|
|
27590
|
+
if (row) {
|
|
27591
|
+
ensurePageDimensions(row.left);
|
|
27592
|
+
if (row.right !== null) {
|
|
27593
|
+
ensurePageDimensions(row.right);
|
|
27594
|
+
}
|
|
27595
|
+
}
|
|
27596
|
+
}
|
|
27597
|
+
scheduleScrollRetry("onScrollToIndexFailed");
|
|
27598
|
+
if (perfEnabled) {
|
|
27599
|
+
logPerfEvent("Viewer", "scrollToIndexFailed", {
|
|
27600
|
+
index,
|
|
27601
|
+
averageItemLength,
|
|
27602
|
+
fallbackOffset: offset,
|
|
27603
|
+
fallbackSource: "cached-item-layout",
|
|
27604
|
+
itemCount: dataLength,
|
|
27605
|
+
retryAttempt: pendingScrollAttemptsRef.current
|
|
27606
|
+
});
|
|
27607
|
+
}
|
|
27608
|
+
},
|
|
27609
|
+
onScroll: (event) => handleViewerScroll(event, "continuous"),
|
|
27610
|
+
onScrollBeginDrag: perfEnabled ? () => {
|
|
27611
|
+
scrollMonitorRef.current.begin("continuous.beginDrag");
|
|
27612
|
+
} : void 0,
|
|
27613
|
+
onMomentumScrollBegin: perfEnabled ? () => {
|
|
27614
|
+
scrollMonitorRef.current.begin("continuous.momentumBegin");
|
|
27615
|
+
} : void 0,
|
|
27616
|
+
onScrollEndDrag: perfEnabled ? () => {
|
|
27617
|
+
scrollMonitorRef.current.end("continuous.endDrag");
|
|
27618
|
+
endViewerScroll("continuous.endDrag");
|
|
27619
|
+
sampleMemory("Viewer", "continuous.endDrag", {
|
|
27620
|
+
pageCount
|
|
27621
|
+
});
|
|
27622
|
+
} : void 0,
|
|
27623
|
+
onMomentumScrollEnd: perfEnabled ? () => {
|
|
27624
|
+
scrollMonitorRef.current.end("continuous.momentumEnd");
|
|
27625
|
+
endViewerScroll("continuous.momentumEnd");
|
|
27626
|
+
sampleMemory("Viewer", "continuous.momentumEnd", {
|
|
27627
|
+
pageCount
|
|
27628
|
+
});
|
|
27629
|
+
} : void 0,
|
|
27630
|
+
scrollEventThrottle: 16,
|
|
27631
|
+
showsVerticalScrollIndicator: false
|
|
27632
|
+
}
|
|
27633
|
+
);
|
|
27503
27634
|
if (isWebView) {
|
|
27504
27635
|
return /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_native4.View, { style: [styles4.container, isDark && styles4.containerDark], children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
27505
27636
|
WebViewViewer_default,
|
|
@@ -27534,6 +27665,7 @@ var Viewer = ({
|
|
|
27534
27665
|
{
|
|
27535
27666
|
ref: horizontalScrollRef,
|
|
27536
27667
|
horizontal: true,
|
|
27668
|
+
nestedScrollEnabled: true,
|
|
27537
27669
|
scrollEnabled: !gestureScrollLockActive && !pageScrubActive && documentSurfaceWidth > windowWidth,
|
|
27538
27670
|
showsHorizontalScrollIndicator: false,
|
|
27539
27671
|
onScroll: (event) => {
|
|
@@ -27618,101 +27750,21 @@ var Viewer = ({
|
|
|
27618
27750
|
]
|
|
27619
27751
|
}
|
|
27620
27752
|
],
|
|
27621
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
27753
|
+
children: documentSurfaceWidth > windowWidth + 1 ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
27622
27754
|
import_react_native4.ScrollView,
|
|
27623
27755
|
{
|
|
27624
27756
|
ref: horizontalScrollRef,
|
|
27625
27757
|
horizontal: true,
|
|
27626
|
-
|
|
27758
|
+
nestedScrollEnabled: true,
|
|
27759
|
+
scrollEnabled: !gestureScrollLockActive && !pageScrubActive,
|
|
27627
27760
|
showsHorizontalScrollIndicator: false,
|
|
27628
27761
|
onScroll: (event) => {
|
|
27629
27762
|
horizontalScrollOffsetRef.current = event.nativeEvent.contentOffset?.x ?? 0;
|
|
27630
27763
|
},
|
|
27631
27764
|
scrollEventThrottle: 16,
|
|
27632
|
-
children:
|
|
27633
|
-
import_react_native4.FlatList,
|
|
27634
|
-
{
|
|
27635
|
-
ref: listRef,
|
|
27636
|
-
data: isDouble ? rows : pages,
|
|
27637
|
-
style: { width: documentSurfaceWidth },
|
|
27638
|
-
initialNumToRender: FLATLIST_INITIAL_NUM_TO_RENDER,
|
|
27639
|
-
windowSize: resolvedWindowSize,
|
|
27640
|
-
maxToRenderPerBatch: resolvedMaxToRenderPerBatch,
|
|
27641
|
-
updateCellsBatchingPeriod: FLATLIST_UPDATE_CELLS_BATCHING_PERIOD,
|
|
27642
|
-
removeClippedSubviews: resolvedRemoveClippedSubviews,
|
|
27643
|
-
getItemLayout,
|
|
27644
|
-
keyExtractor,
|
|
27645
|
-
contentContainerStyle: styles4.listContent,
|
|
27646
|
-
renderItem,
|
|
27647
|
-
onViewableItemsChanged,
|
|
27648
|
-
viewabilityConfig: { itemVisiblePercentThreshold: 60 },
|
|
27649
|
-
scrollEnabled: pageScrubResolvedScrollEnabled,
|
|
27650
|
-
onLayout: () => {
|
|
27651
|
-
captureViewerFrame(listRef.current);
|
|
27652
|
-
restoreOrientationScrollOffset();
|
|
27653
|
-
scrollToPendingTarget(false);
|
|
27654
|
-
},
|
|
27655
|
-
onContentSizeChange: (_, height) => {
|
|
27656
|
-
viewerContentHeightRef.current = height;
|
|
27657
|
-
scrollToPendingTarget(false);
|
|
27658
|
-
},
|
|
27659
|
-
onScrollToIndexFailed: ({ index, averageItemLength }) => {
|
|
27660
|
-
const dataLength = isDouble ? rows.length : pages.length;
|
|
27661
|
-
if (index < 0 || index >= dataLength) return;
|
|
27662
|
-
const existingTarget = pendingScrollTargetRef.current;
|
|
27663
|
-
pendingScrollTargetRef.current = isDouble ? existingTarget?.listIndex === index ? existingTarget : resolveViewerScrollTarget(rows[index]?.left ?? index * 2, true) : resolveViewerScrollTarget(index, false);
|
|
27664
|
-
const offset = Math.max(0, getFallbackOffsetForIndex(index));
|
|
27665
|
-
listRef.current?.scrollToOffset({ offset, animated: false });
|
|
27666
|
-
if (!isDouble) {
|
|
27667
|
-
ensurePageDimensions(index);
|
|
27668
|
-
} else {
|
|
27669
|
-
const row = rows[index];
|
|
27670
|
-
if (row) {
|
|
27671
|
-
ensurePageDimensions(row.left);
|
|
27672
|
-
if (row.right !== null) {
|
|
27673
|
-
ensurePageDimensions(row.right);
|
|
27674
|
-
}
|
|
27675
|
-
}
|
|
27676
|
-
}
|
|
27677
|
-
scheduleScrollRetry("onScrollToIndexFailed");
|
|
27678
|
-
if (perfEnabled) {
|
|
27679
|
-
logPerfEvent("Viewer", "scrollToIndexFailed", {
|
|
27680
|
-
index,
|
|
27681
|
-
averageItemLength,
|
|
27682
|
-
fallbackOffset: offset,
|
|
27683
|
-
fallbackSource: "cached-item-layout",
|
|
27684
|
-
itemCount: dataLength,
|
|
27685
|
-
retryAttempt: pendingScrollAttemptsRef.current
|
|
27686
|
-
});
|
|
27687
|
-
}
|
|
27688
|
-
},
|
|
27689
|
-
onScroll: (event) => handleViewerScroll(event, "continuous"),
|
|
27690
|
-
onScrollBeginDrag: perfEnabled ? () => {
|
|
27691
|
-
scrollMonitorRef.current.begin("continuous.beginDrag");
|
|
27692
|
-
} : void 0,
|
|
27693
|
-
onMomentumScrollBegin: perfEnabled ? () => {
|
|
27694
|
-
scrollMonitorRef.current.begin("continuous.momentumBegin");
|
|
27695
|
-
} : void 0,
|
|
27696
|
-
onScrollEndDrag: perfEnabled ? () => {
|
|
27697
|
-
scrollMonitorRef.current.end("continuous.endDrag");
|
|
27698
|
-
endViewerScroll("continuous.endDrag");
|
|
27699
|
-
sampleMemory("Viewer", "continuous.endDrag", {
|
|
27700
|
-
pageCount
|
|
27701
|
-
});
|
|
27702
|
-
} : void 0,
|
|
27703
|
-
onMomentumScrollEnd: perfEnabled ? () => {
|
|
27704
|
-
scrollMonitorRef.current.end("continuous.momentumEnd");
|
|
27705
|
-
endViewerScroll("continuous.momentumEnd");
|
|
27706
|
-
sampleMemory("Viewer", "continuous.momentumEnd", {
|
|
27707
|
-
pageCount
|
|
27708
|
-
});
|
|
27709
|
-
} : void 0,
|
|
27710
|
-
scrollEventThrottle: 16,
|
|
27711
|
-
showsVerticalScrollIndicator: false
|
|
27712
|
-
}
|
|
27713
|
-
)
|
|
27765
|
+
children: continuousList
|
|
27714
27766
|
}
|
|
27715
|
-
)
|
|
27767
|
+
) : continuousList
|
|
27716
27768
|
}
|
|
27717
27769
|
) }) });
|
|
27718
27770
|
};
|
|
@@ -32083,6 +32135,8 @@ function ProgressPill({
|
|
|
32083
32135
|
const isDark = uiTheme === "dark";
|
|
32084
32136
|
const offsets = resolveMobileChromeOffsets(usePapyrusSafeAreaInsets());
|
|
32085
32137
|
const { height: windowHeight } = (0, import_react_native17.useWindowDimensions)();
|
|
32138
|
+
const windowHeightRef = (0, import_react14.useRef)(windowHeight);
|
|
32139
|
+
windowHeightRef.current = windowHeight;
|
|
32086
32140
|
const trackHeight = Math.max(
|
|
32087
32141
|
180,
|
|
32088
32142
|
Math.min(520, windowHeight - offsets.progress - offsets.bottom - 132)
|
|
@@ -32133,6 +32187,7 @@ function ProgressPill({
|
|
|
32133
32187
|
const thumbTopRef = (0, import_react14.useRef)(new import_react_native17.Animated.Value(thumbTop));
|
|
32134
32188
|
const thumbTopSnapshotRef = (0, import_react14.useRef)(thumbTop);
|
|
32135
32189
|
thumbTopSnapshotRef.current = thumbTop;
|
|
32190
|
+
const scrubStartThumbTopRef = (0, import_react14.useRef)(0);
|
|
32136
32191
|
const scrubberMetricsRef = (0, import_react14.useRef)({ trackHeight, thumbHeight, pageCount });
|
|
32137
32192
|
scrubberMetricsRef.current = { trackHeight, thumbHeight, pageCount };
|
|
32138
32193
|
(0, import_react14.useEffect)(() => {
|
|
@@ -32200,6 +32255,7 @@ function ProgressPill({
|
|
|
32200
32255
|
onScrubbingChangeRef.current?.(true);
|
|
32201
32256
|
hasMovedRef.current = false;
|
|
32202
32257
|
longPressTriggeredRef.current = false;
|
|
32258
|
+
scrubStartThumbTopRef.current = thumbTopSnapshotRef.current;
|
|
32203
32259
|
scrubNavigationControllerRef.current.begin();
|
|
32204
32260
|
pendingReleasedScrubPageRef.current = null;
|
|
32205
32261
|
setScrubPreviewPage(currentPageRef.current);
|
|
@@ -32221,7 +32277,18 @@ function ProgressPill({
|
|
|
32221
32277
|
clearTimeout(longPressTimerRef.current);
|
|
32222
32278
|
longPressTimerRef.current = null;
|
|
32223
32279
|
}
|
|
32224
|
-
|
|
32280
|
+
const { trackHeight: trackHeight2, thumbHeight: thumbHeight2 } = scrubberMetricsRef.current;
|
|
32281
|
+
scrubToPositionRef.current(
|
|
32282
|
+
resolvePageScrubberGesturePosition({
|
|
32283
|
+
moveY: gestureState.moveY,
|
|
32284
|
+
dy: gestureState.dy,
|
|
32285
|
+
trackY: trackYRef.current,
|
|
32286
|
+
windowHeight: windowHeightRef.current,
|
|
32287
|
+
trackHeight: trackHeight2,
|
|
32288
|
+
thumbHeight: thumbHeight2,
|
|
32289
|
+
startThumbTop: scrubStartThumbTopRef.current
|
|
32290
|
+
})
|
|
32291
|
+
);
|
|
32225
32292
|
},
|
|
32226
32293
|
onPanResponderRelease: () => {
|
|
32227
32294
|
if (longPressTimerRef.current !== null) {
|
|
@@ -32275,6 +32342,7 @@ function ProgressPill({
|
|
|
32275
32342
|
pointerEvents: "box-none",
|
|
32276
32343
|
style: [
|
|
32277
32344
|
styles17.frame,
|
|
32345
|
+
resolvePageScrubberOverlayStyle(),
|
|
32278
32346
|
{
|
|
32279
32347
|
top: offsets.progress,
|
|
32280
32348
|
right: offsets.right
|
|
@@ -32284,6 +32352,7 @@ function ProgressPill({
|
|
|
32284
32352
|
import_react_native17.View,
|
|
32285
32353
|
{
|
|
32286
32354
|
ref: scrubberRef,
|
|
32355
|
+
pointerEvents: resolvePageScrubberPointerEvents(),
|
|
32287
32356
|
style: [styles17.scrubber, { height: trackHeight }],
|
|
32288
32357
|
...scrubberPanHandlers,
|
|
32289
32358
|
onLayout: () => {
|
|
@@ -33044,6 +33113,7 @@ var styles20 = import_react_native20.StyleSheet.create({
|
|
|
33044
33113
|
BottomBar,
|
|
33045
33114
|
CoverPreview,
|
|
33046
33115
|
DocumentActionsSheet,
|
|
33116
|
+
IconPageNav,
|
|
33047
33117
|
InfoSheet,
|
|
33048
33118
|
MOBILE_CHROME_METRICS,
|
|
33049
33119
|
MobilePerfProvider,
|