@papyrus-sdk/ui-react-native 0.2.18-beta.8 → 0.2.18
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 +2 -2
- package/dist/index.js +675 -635
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +677 -636
- package/dist/index.mjs.map +1 -1
- package/package.json +5 -8
package/dist/index.mjs
CHANGED
|
@@ -27041,18 +27041,13 @@ import { useCallback as useCallback4, useEffect as useEffect7, useMemo as useMem
|
|
|
27041
27041
|
import {
|
|
27042
27042
|
Dimensions,
|
|
27043
27043
|
Platform as Platform3,
|
|
27044
|
-
Pressable as
|
|
27045
|
-
StyleSheet as
|
|
27046
|
-
Text as
|
|
27044
|
+
Pressable as Pressable7,
|
|
27045
|
+
StyleSheet as StyleSheet9,
|
|
27046
|
+
Text as Text5,
|
|
27047
27047
|
UIManager,
|
|
27048
|
-
View as
|
|
27048
|
+
View as View9,
|
|
27049
27049
|
findNodeHandle as findNodeHandle2
|
|
27050
27050
|
} from "react-native";
|
|
27051
|
-
import BottomSheet, {
|
|
27052
|
-
BottomSheetBackdrop,
|
|
27053
|
-
BottomSheetFlatList,
|
|
27054
|
-
BottomSheetScrollView
|
|
27055
|
-
} from "@gorhom/bottom-sheet";
|
|
27056
27051
|
import { useViewerStore as useViewerStore7 } from "@papyrus-sdk/core";
|
|
27057
27052
|
import { PapyrusPageView as PapyrusPageView2 } from "@papyrus-sdk/engine-native";
|
|
27058
27053
|
|
|
@@ -27062,8 +27057,150 @@ var resolveRightSheetHeight = ({
|
|
|
27062
27057
|
showingNotes
|
|
27063
27058
|
}) => showingNotes ? Math.min(440, windowHeight * 0.56) : Math.min(640, windowHeight * 0.72);
|
|
27064
27059
|
|
|
27065
|
-
// components/
|
|
27060
|
+
// components/NativeSheet.tsx
|
|
27061
|
+
import {
|
|
27062
|
+
FlatList as FlatList2,
|
|
27063
|
+
Modal as Modal2,
|
|
27064
|
+
Pressable as Pressable6,
|
|
27065
|
+
ScrollView as ScrollView3,
|
|
27066
|
+
StyleSheet as StyleSheet8,
|
|
27067
|
+
Text as Text4,
|
|
27068
|
+
View as View8
|
|
27069
|
+
} from "react-native";
|
|
27066
27070
|
import { jsx as jsx9, jsxs as jsxs9 } from "react/jsx-runtime";
|
|
27071
|
+
function NativeSheet({
|
|
27072
|
+
visible,
|
|
27073
|
+
onClose,
|
|
27074
|
+
children,
|
|
27075
|
+
isDark,
|
|
27076
|
+
maxHeight,
|
|
27077
|
+
title,
|
|
27078
|
+
closeAccessibilityLabel = "Close sheet",
|
|
27079
|
+
showHeader = false,
|
|
27080
|
+
sheetStyle
|
|
27081
|
+
}) {
|
|
27082
|
+
return /* @__PURE__ */ jsx9(
|
|
27083
|
+
Modal2,
|
|
27084
|
+
{
|
|
27085
|
+
animationType: "fade",
|
|
27086
|
+
transparent: true,
|
|
27087
|
+
visible,
|
|
27088
|
+
onRequestClose: onClose,
|
|
27089
|
+
children: /* @__PURE__ */ jsxs9(View8, { style: styles8.root, children: [
|
|
27090
|
+
/* @__PURE__ */ jsx9(
|
|
27091
|
+
Pressable6,
|
|
27092
|
+
{
|
|
27093
|
+
accessibilityRole: "button",
|
|
27094
|
+
accessibilityLabel: closeAccessibilityLabel,
|
|
27095
|
+
style: styles8.backdrop,
|
|
27096
|
+
onPress: onClose
|
|
27097
|
+
}
|
|
27098
|
+
),
|
|
27099
|
+
/* @__PURE__ */ jsxs9(
|
|
27100
|
+
View8,
|
|
27101
|
+
{
|
|
27102
|
+
style: [
|
|
27103
|
+
styles8.sheet,
|
|
27104
|
+
isDark && styles8.sheetDark,
|
|
27105
|
+
maxHeight ? { maxHeight } : null,
|
|
27106
|
+
sheetStyle
|
|
27107
|
+
],
|
|
27108
|
+
children: [
|
|
27109
|
+
showHeader ? /* @__PURE__ */ jsxs9(View8, { style: styles8.header, children: [
|
|
27110
|
+
/* @__PURE__ */ jsx9(
|
|
27111
|
+
Pressable6,
|
|
27112
|
+
{
|
|
27113
|
+
onPress: onClose,
|
|
27114
|
+
style: [
|
|
27115
|
+
styles8.closeButton,
|
|
27116
|
+
isDark && styles8.closeButtonDark
|
|
27117
|
+
],
|
|
27118
|
+
accessibilityLabel: closeAccessibilityLabel,
|
|
27119
|
+
children: /* @__PURE__ */ jsx9(IconClose, { size: 18, color: isDark ? "#f8fafc" : "#111827" })
|
|
27120
|
+
}
|
|
27121
|
+
),
|
|
27122
|
+
/* @__PURE__ */ jsx9(
|
|
27123
|
+
Text4,
|
|
27124
|
+
{
|
|
27125
|
+
style: [styles8.title, isDark && styles8.titleDark],
|
|
27126
|
+
numberOfLines: 1,
|
|
27127
|
+
children: title
|
|
27128
|
+
}
|
|
27129
|
+
),
|
|
27130
|
+
/* @__PURE__ */ jsx9(View8, { style: styles8.headerSpacer })
|
|
27131
|
+
] }) : null,
|
|
27132
|
+
children
|
|
27133
|
+
]
|
|
27134
|
+
}
|
|
27135
|
+
)
|
|
27136
|
+
] })
|
|
27137
|
+
}
|
|
27138
|
+
);
|
|
27139
|
+
}
|
|
27140
|
+
function NativeSheetScrollView(props) {
|
|
27141
|
+
return /* @__PURE__ */ jsx9(ScrollView3, { ...props });
|
|
27142
|
+
}
|
|
27143
|
+
function NativeSheetFlatList(props) {
|
|
27144
|
+
return /* @__PURE__ */ jsx9(FlatList2, { ...props });
|
|
27145
|
+
}
|
|
27146
|
+
var styles8 = StyleSheet8.create({
|
|
27147
|
+
root: {
|
|
27148
|
+
flex: 1,
|
|
27149
|
+
justifyContent: "flex-end"
|
|
27150
|
+
},
|
|
27151
|
+
backdrop: {
|
|
27152
|
+
...StyleSheet8.absoluteFillObject,
|
|
27153
|
+
backgroundColor: "rgba(0, 0, 0, 0.4)"
|
|
27154
|
+
},
|
|
27155
|
+
sheet: {
|
|
27156
|
+
maxHeight: "78%",
|
|
27157
|
+
width: "100%",
|
|
27158
|
+
borderTopLeftRadius: 24,
|
|
27159
|
+
borderTopRightRadius: 24,
|
|
27160
|
+
borderTopWidth: 1,
|
|
27161
|
+
borderTopColor: "#e5e7eb",
|
|
27162
|
+
backgroundColor: "#ffffff"
|
|
27163
|
+
},
|
|
27164
|
+
sheetDark: {
|
|
27165
|
+
borderTopColor: "#1f2937",
|
|
27166
|
+
backgroundColor: "#0f1115"
|
|
27167
|
+
},
|
|
27168
|
+
header: {
|
|
27169
|
+
flexDirection: "row",
|
|
27170
|
+
alignItems: "center",
|
|
27171
|
+
justifyContent: "space-between",
|
|
27172
|
+
paddingHorizontal: 16,
|
|
27173
|
+
paddingTop: 16,
|
|
27174
|
+
paddingBottom: 14
|
|
27175
|
+
},
|
|
27176
|
+
headerSpacer: {
|
|
27177
|
+
width: 42
|
|
27178
|
+
},
|
|
27179
|
+
closeButton: {
|
|
27180
|
+
width: 42,
|
|
27181
|
+
height: 42,
|
|
27182
|
+
borderRadius: 21,
|
|
27183
|
+
alignItems: "center",
|
|
27184
|
+
justifyContent: "center",
|
|
27185
|
+
backgroundColor: "#f1f5f9"
|
|
27186
|
+
},
|
|
27187
|
+
closeButtonDark: {
|
|
27188
|
+
backgroundColor: "#111827"
|
|
27189
|
+
},
|
|
27190
|
+
title: {
|
|
27191
|
+
flex: 1,
|
|
27192
|
+
textAlign: "center",
|
|
27193
|
+
fontSize: 18,
|
|
27194
|
+
fontWeight: "800",
|
|
27195
|
+
color: "#111827"
|
|
27196
|
+
},
|
|
27197
|
+
titleDark: {
|
|
27198
|
+
color: "#f8fafc"
|
|
27199
|
+
}
|
|
27200
|
+
});
|
|
27201
|
+
|
|
27202
|
+
// components/RightSheet.tsx
|
|
27203
|
+
import { jsx as jsx10, jsxs as jsxs10 } from "react/jsx-runtime";
|
|
27067
27204
|
var THUMBNAILS_INITIAL_NUM_TO_RENDER = 4;
|
|
27068
27205
|
var THUMBNAILS_WINDOW_SIZE = 5;
|
|
27069
27206
|
var THUMBNAILS_MAX_TO_RENDER_PER_BATCH = 6;
|
|
@@ -27118,36 +27255,36 @@ var PageThumbnail = ({
|
|
|
27118
27255
|
setLayoutReady(true);
|
|
27119
27256
|
}
|
|
27120
27257
|
};
|
|
27121
|
-
return /* @__PURE__ */
|
|
27122
|
-
|
|
27258
|
+
return /* @__PURE__ */ jsxs10(
|
|
27259
|
+
Pressable7,
|
|
27123
27260
|
{
|
|
27124
27261
|
onPress,
|
|
27125
27262
|
style: [
|
|
27126
|
-
|
|
27263
|
+
styles9.thumbCard,
|
|
27127
27264
|
{ width: cardWidth },
|
|
27128
|
-
isDark &&
|
|
27129
|
-
isActive &&
|
|
27265
|
+
isDark && styles9.thumbCardDark,
|
|
27266
|
+
isActive && styles9.thumbCardActive,
|
|
27130
27267
|
isActive && { borderColor: accentColor }
|
|
27131
27268
|
],
|
|
27132
27269
|
children: [
|
|
27133
|
-
/* @__PURE__ */
|
|
27134
|
-
|
|
27270
|
+
/* @__PURE__ */ jsx10(
|
|
27271
|
+
View9,
|
|
27135
27272
|
{
|
|
27136
27273
|
onLayout: handleLayout,
|
|
27137
|
-
style: [
|
|
27138
|
-
children: useNativePreview && shouldRenderPreview ? /* @__PURE__ */
|
|
27139
|
-
|
|
27274
|
+
style: [styles9.thumbFrame, { width: frameWidth, height: frameHeight }],
|
|
27275
|
+
children: useNativePreview && shouldRenderPreview ? /* @__PURE__ */ jsx10(PapyrusPageView2, { ref: viewRef, style: styles9.thumbView }) : /* @__PURE__ */ jsx10(View9, { style: [styles9.thumbFallback, isDark && styles9.thumbFallbackDark], children: /* @__PURE__ */ jsx10(
|
|
27276
|
+
Text5,
|
|
27140
27277
|
{
|
|
27141
27278
|
style: [
|
|
27142
|
-
|
|
27143
|
-
isDark &&
|
|
27279
|
+
styles9.thumbFallbackText,
|
|
27280
|
+
isDark && styles9.thumbFallbackTextDark
|
|
27144
27281
|
],
|
|
27145
27282
|
children: pageIndex + 1
|
|
27146
27283
|
}
|
|
27147
27284
|
) })
|
|
27148
27285
|
}
|
|
27149
27286
|
),
|
|
27150
|
-
/* @__PURE__ */
|
|
27287
|
+
/* @__PURE__ */ jsx10(Text5, { style: [styles9.thumbLabel, isDark && styles9.thumbLabelDark], children: pageIndex + 1 })
|
|
27151
27288
|
]
|
|
27152
27289
|
}
|
|
27153
27290
|
);
|
|
@@ -27155,21 +27292,21 @@ var PageThumbnail = ({
|
|
|
27155
27292
|
var OutlineNode = ({ item, depth = 0, isDark, onSelect, untitledLabel }) => {
|
|
27156
27293
|
const hasChildren = item.children && item.children.length > 0;
|
|
27157
27294
|
const isClickable = item.pageIndex >= 0;
|
|
27158
|
-
return /* @__PURE__ */
|
|
27159
|
-
/* @__PURE__ */
|
|
27160
|
-
|
|
27295
|
+
return /* @__PURE__ */ jsxs10(View9, { children: [
|
|
27296
|
+
/* @__PURE__ */ jsx10(
|
|
27297
|
+
Pressable7,
|
|
27161
27298
|
{
|
|
27162
27299
|
onPress: () => {
|
|
27163
27300
|
if (isClickable) onSelect(item.pageIndex);
|
|
27164
27301
|
},
|
|
27165
|
-
style: [
|
|
27166
|
-
children: /* @__PURE__ */
|
|
27167
|
-
|
|
27302
|
+
style: [styles9.outlineRow, { paddingLeft: 12 + depth * 12 }],
|
|
27303
|
+
children: /* @__PURE__ */ jsx10(
|
|
27304
|
+
Text5,
|
|
27168
27305
|
{
|
|
27169
27306
|
style: [
|
|
27170
|
-
|
|
27171
|
-
isDark &&
|
|
27172
|
-
!isClickable &&
|
|
27307
|
+
styles9.outlineText,
|
|
27308
|
+
isDark && styles9.outlineTextDark,
|
|
27309
|
+
!isClickable && styles9.outlineTextMuted
|
|
27173
27310
|
],
|
|
27174
27311
|
numberOfLines: 2,
|
|
27175
27312
|
children: item.title || untitledLabel
|
|
@@ -27177,7 +27314,7 @@ var OutlineNode = ({ item, depth = 0, isDark, onSelect, untitledLabel }) => {
|
|
|
27177
27314
|
)
|
|
27178
27315
|
}
|
|
27179
27316
|
),
|
|
27180
|
-
hasChildren ? item.children.map((child, index) => /* @__PURE__ */
|
|
27317
|
+
hasChildren ? item.children.map((child, index) => /* @__PURE__ */ jsx10(
|
|
27181
27318
|
OutlineNode,
|
|
27182
27319
|
{
|
|
27183
27320
|
item: child,
|
|
@@ -27222,7 +27359,6 @@ var RightSheet = ({
|
|
|
27222
27359
|
windowHeight: Dimensions.get("window").height,
|
|
27223
27360
|
showingNotes
|
|
27224
27361
|
});
|
|
27225
|
-
const snapPoints = useMemo5(() => [sheetHeight], [sheetHeight]);
|
|
27226
27362
|
const windowWidth = Dimensions.get("window").width;
|
|
27227
27363
|
const gridGutter = 12;
|
|
27228
27364
|
const gridPadding = 16;
|
|
@@ -27390,7 +27526,7 @@ var RightSheet = ({
|
|
|
27390
27526
|
const renderThumbnailItem = useCallback4(
|
|
27391
27527
|
({ item }) => {
|
|
27392
27528
|
const shouldRenderPreview = useNativePreview && (visibleThumbnailPages.has(item) || item < resolvedThumbsPrewarmCount || Math.abs(item + 1 - currentPage) <= 1);
|
|
27393
|
-
return /* @__PURE__ */
|
|
27529
|
+
return /* @__PURE__ */ jsx10(
|
|
27394
27530
|
PageThumbnail,
|
|
27395
27531
|
{
|
|
27396
27532
|
engine,
|
|
@@ -27423,89 +27559,72 @@ var RightSheet = ({
|
|
|
27423
27559
|
zoom
|
|
27424
27560
|
]
|
|
27425
27561
|
);
|
|
27426
|
-
const renderBackdrop = useCallback4(
|
|
27427
|
-
(props) => /* @__PURE__ */ jsx9(
|
|
27428
|
-
BottomSheetBackdrop,
|
|
27429
|
-
{
|
|
27430
|
-
...props,
|
|
27431
|
-
appearsOnIndex: 0,
|
|
27432
|
-
disappearsOnIndex: -1,
|
|
27433
|
-
opacity: 0.4,
|
|
27434
|
-
pressBehavior: "close"
|
|
27435
|
-
}
|
|
27436
|
-
),
|
|
27437
|
-
[]
|
|
27438
|
-
);
|
|
27439
27562
|
if (!sidebarRightOpen) return null;
|
|
27440
|
-
return /* @__PURE__ */
|
|
27441
|
-
|
|
27563
|
+
return /* @__PURE__ */ jsx10(
|
|
27564
|
+
NativeSheet,
|
|
27442
27565
|
{
|
|
27443
|
-
|
|
27444
|
-
snapPoints,
|
|
27445
|
-
enablePanDownToClose: true,
|
|
27566
|
+
visible: sidebarRightOpen,
|
|
27446
27567
|
onClose: closeSheet,
|
|
27447
|
-
|
|
27448
|
-
|
|
27449
|
-
|
|
27450
|
-
|
|
27451
|
-
|
|
27452
|
-
|
|
27453
|
-
|
|
27454
|
-
!showingNotes ? /* @__PURE__ */ jsx9(
|
|
27455
|
-
Pressable6,
|
|
27568
|
+
isDark,
|
|
27569
|
+
maxHeight: sheetHeight,
|
|
27570
|
+
children: /* @__PURE__ */ jsxs10(View9, { style: styles9.sheet, children: [
|
|
27571
|
+
/* @__PURE__ */ jsxs10(View9, { style: styles9.header, children: [
|
|
27572
|
+
/* @__PURE__ */ jsx10(Text5, { style: [styles9.sheetTitle, isDark && styles9.sheetTitleDark], children: showingNotes ? t.notes : navigationTitle }),
|
|
27573
|
+
!showingNotes ? /* @__PURE__ */ jsx10(
|
|
27574
|
+
Pressable7,
|
|
27456
27575
|
{
|
|
27457
27576
|
onPress: showingProgress ? void 0 : onOpenPageJump,
|
|
27458
27577
|
disabled: showingProgress || pageCount <= 0,
|
|
27459
|
-
style:
|
|
27578
|
+
style: styles9.pageStatusHit,
|
|
27460
27579
|
accessibilityLabel: "Open page jump",
|
|
27461
|
-
children: /* @__PURE__ */
|
|
27580
|
+
children: /* @__PURE__ */ jsx10(Text5, { style: [styles9.pageStatus, isDark && styles9.pageStatusDark], children: showingProgress ? `${Math.round(currentPage / Math.max(pageCount, 1) * 100)}%` : `${currentPage}/${pageCount}` })
|
|
27462
27581
|
}
|
|
27463
27582
|
) : null
|
|
27464
27583
|
] }),
|
|
27465
|
-
!showingNotes ? /* @__PURE__ */
|
|
27466
|
-
!showingProgress ? /* @__PURE__ */
|
|
27467
|
-
supportsThumbnails ? /* @__PURE__ */
|
|
27468
|
-
|
|
27584
|
+
!showingNotes ? /* @__PURE__ */ jsxs10(View9, { style: styles9.pagesContent, children: [
|
|
27585
|
+
!showingProgress ? /* @__PURE__ */ jsx10(View9, { style: styles9.pageHeader, children: /* @__PURE__ */ jsxs10(View9, { style: [styles9.segmented, isDark && styles9.segmentedDark], children: [
|
|
27586
|
+
supportsThumbnails ? /* @__PURE__ */ jsx10(
|
|
27587
|
+
Pressable7,
|
|
27469
27588
|
{
|
|
27470
27589
|
onPress: () => setPagesMode("thumbnails"),
|
|
27471
27590
|
style: [
|
|
27472
|
-
|
|
27473
|
-
pagesMode === "thumbnails" &&
|
|
27591
|
+
styles9.segmentButton,
|
|
27592
|
+
pagesMode === "thumbnails" && styles9.segmentButtonActive,
|
|
27474
27593
|
pagesMode === "thumbnails" && {
|
|
27475
27594
|
backgroundColor: accentColor
|
|
27476
27595
|
}
|
|
27477
27596
|
],
|
|
27478
|
-
children: /* @__PURE__ */
|
|
27479
|
-
|
|
27597
|
+
children: /* @__PURE__ */ jsx10(
|
|
27598
|
+
Text5,
|
|
27480
27599
|
{
|
|
27481
27600
|
style: [
|
|
27482
|
-
|
|
27483
|
-
isDark &&
|
|
27484
|
-
pagesMode === "thumbnails" &&
|
|
27601
|
+
styles9.segmentText,
|
|
27602
|
+
isDark && styles9.segmentTextDark,
|
|
27603
|
+
pagesMode === "thumbnails" && styles9.segmentTextActive
|
|
27485
27604
|
],
|
|
27486
27605
|
children: thumbnailLabel
|
|
27487
27606
|
}
|
|
27488
27607
|
)
|
|
27489
27608
|
}
|
|
27490
27609
|
) : null,
|
|
27491
|
-
/* @__PURE__ */
|
|
27492
|
-
|
|
27610
|
+
/* @__PURE__ */ jsx10(
|
|
27611
|
+
Pressable7,
|
|
27493
27612
|
{
|
|
27494
27613
|
onPress: () => setPagesMode("summary"),
|
|
27495
27614
|
style: [
|
|
27496
|
-
|
|
27497
|
-
pagesMode === "summary" &&
|
|
27615
|
+
styles9.segmentButton,
|
|
27616
|
+
pagesMode === "summary" && styles9.segmentButtonActive,
|
|
27498
27617
|
pagesMode === "summary" && {
|
|
27499
27618
|
backgroundColor: accentColor
|
|
27500
27619
|
}
|
|
27501
27620
|
],
|
|
27502
|
-
children: /* @__PURE__ */
|
|
27503
|
-
|
|
27621
|
+
children: /* @__PURE__ */ jsx10(
|
|
27622
|
+
Text5,
|
|
27504
27623
|
{
|
|
27505
27624
|
style: [
|
|
27506
|
-
|
|
27507
|
-
isDark &&
|
|
27508
|
-
pagesMode === "summary" &&
|
|
27625
|
+
styles9.segmentText,
|
|
27626
|
+
isDark && styles9.segmentTextDark,
|
|
27627
|
+
pagesMode === "summary" && styles9.segmentTextActive
|
|
27509
27628
|
],
|
|
27510
27629
|
children: summaryLabel
|
|
27511
27630
|
}
|
|
@@ -27513,14 +27632,14 @@ var RightSheet = ({
|
|
|
27513
27632
|
}
|
|
27514
27633
|
)
|
|
27515
27634
|
] }) }) : null,
|
|
27516
|
-
supportsThumbnails && !showingProgress && pagesMode === "thumbnails" ? /* @__PURE__ */
|
|
27517
|
-
|
|
27635
|
+
supportsThumbnails && !showingProgress && pagesMode === "thumbnails" ? /* @__PURE__ */ jsx10(
|
|
27636
|
+
NativeSheetFlatList,
|
|
27518
27637
|
{
|
|
27519
27638
|
data: pages,
|
|
27520
27639
|
keyExtractor: (item) => `thumb-${item}`,
|
|
27521
27640
|
numColumns: 2,
|
|
27522
|
-
contentContainerStyle:
|
|
27523
|
-
columnWrapperStyle:
|
|
27641
|
+
contentContainerStyle: styles9.thumbGrid,
|
|
27642
|
+
columnWrapperStyle: styles9.thumbRow,
|
|
27524
27643
|
showsVerticalScrollIndicator: false,
|
|
27525
27644
|
initialNumToRender: normalizedThumbsInitialCount,
|
|
27526
27645
|
windowSize: THUMBNAILS_WINDOW_SIZE,
|
|
@@ -27531,29 +27650,29 @@ var RightSheet = ({
|
|
|
27531
27650
|
onViewableItemsChanged: onThumbnailsViewableItemsChanged,
|
|
27532
27651
|
renderItem: renderThumbnailItem
|
|
27533
27652
|
}
|
|
27534
|
-
) : showingProgress ? /* @__PURE__ */
|
|
27535
|
-
|
|
27653
|
+
) : showingProgress ? /* @__PURE__ */ jsx10(
|
|
27654
|
+
NativeSheetScrollView,
|
|
27536
27655
|
{
|
|
27537
|
-
contentContainerStyle:
|
|
27656
|
+
contentContainerStyle: styles9.summaryContent,
|
|
27538
27657
|
showsVerticalScrollIndicator: false,
|
|
27539
27658
|
children: progressEntries.map((entry) => {
|
|
27540
27659
|
const isActive = entry.pageIndex + 1 === currentPage;
|
|
27541
|
-
return /* @__PURE__ */
|
|
27542
|
-
|
|
27660
|
+
return /* @__PURE__ */ jsxs10(
|
|
27661
|
+
Pressable7,
|
|
27543
27662
|
{
|
|
27544
27663
|
onPress: () => jumpToPage(entry.pageIndex),
|
|
27545
27664
|
style: [
|
|
27546
|
-
|
|
27547
|
-
isDark &&
|
|
27665
|
+
styles9.progressRow,
|
|
27666
|
+
isDark && styles9.progressRowDark,
|
|
27548
27667
|
isActive && { borderColor: accentColor }
|
|
27549
27668
|
],
|
|
27550
27669
|
children: [
|
|
27551
|
-
/* @__PURE__ */
|
|
27552
|
-
|
|
27670
|
+
/* @__PURE__ */ jsxs10(
|
|
27671
|
+
Text5,
|
|
27553
27672
|
{
|
|
27554
27673
|
style: [
|
|
27555
|
-
|
|
27556
|
-
isDark &&
|
|
27674
|
+
styles9.progressLabel,
|
|
27675
|
+
isDark && styles9.progressLabelDark
|
|
27557
27676
|
],
|
|
27558
27677
|
children: [
|
|
27559
27678
|
entry.percent,
|
|
@@ -27561,12 +27680,12 @@ var RightSheet = ({
|
|
|
27561
27680
|
]
|
|
27562
27681
|
}
|
|
27563
27682
|
),
|
|
27564
|
-
/* @__PURE__ */
|
|
27565
|
-
|
|
27683
|
+
/* @__PURE__ */ jsxs10(
|
|
27684
|
+
Text5,
|
|
27566
27685
|
{
|
|
27567
27686
|
style: [
|
|
27568
|
-
|
|
27569
|
-
isDark &&
|
|
27687
|
+
styles9.progressMeta,
|
|
27688
|
+
isDark && styles9.progressMetaDark
|
|
27570
27689
|
],
|
|
27571
27690
|
children: [
|
|
27572
27691
|
t.page,
|
|
@@ -27581,12 +27700,12 @@ var RightSheet = ({
|
|
|
27581
27700
|
);
|
|
27582
27701
|
})
|
|
27583
27702
|
}
|
|
27584
|
-
) : /* @__PURE__ */
|
|
27585
|
-
|
|
27703
|
+
) : /* @__PURE__ */ jsx10(
|
|
27704
|
+
NativeSheetScrollView,
|
|
27586
27705
|
{
|
|
27587
|
-
contentContainerStyle:
|
|
27706
|
+
contentContainerStyle: styles9.summaryContent,
|
|
27588
27707
|
showsVerticalScrollIndicator: false,
|
|
27589
|
-
children: outline.length === 0 ? /* @__PURE__ */
|
|
27708
|
+
children: outline.length === 0 ? /* @__PURE__ */ jsx10(Text5, { style: [styles9.emptyText, isDark && styles9.emptyTextDark], children: t.noSummary }) : outline.map((item, index) => /* @__PURE__ */ jsx10(
|
|
27590
27709
|
OutlineNode,
|
|
27591
27710
|
{
|
|
27592
27711
|
item,
|
|
@@ -27598,32 +27717,32 @@ var RightSheet = ({
|
|
|
27598
27717
|
))
|
|
27599
27718
|
}
|
|
27600
27719
|
)
|
|
27601
|
-
] }) : /* @__PURE__ */
|
|
27602
|
-
|
|
27720
|
+
] }) : /* @__PURE__ */ jsx10(
|
|
27721
|
+
NativeSheetScrollView,
|
|
27603
27722
|
{
|
|
27604
|
-
contentContainerStyle:
|
|
27723
|
+
contentContainerStyle: styles9.content,
|
|
27605
27724
|
showsVerticalScrollIndicator: false,
|
|
27606
|
-
children: annotations.length === 0 ? /* @__PURE__ */
|
|
27607
|
-
|
|
27725
|
+
children: annotations.length === 0 ? /* @__PURE__ */ jsx10(Text5, { style: [styles9.emptyText, isDark && styles9.emptyTextDark], children: t.noAnnotations }) : /* @__PURE__ */ jsx10(View9, { children: annotations.map((ann) => /* @__PURE__ */ jsxs10(
|
|
27726
|
+
Pressable7,
|
|
27608
27727
|
{
|
|
27609
27728
|
onPress: () => {
|
|
27610
27729
|
setSelectedAnnotation(ann.id);
|
|
27611
27730
|
triggerScrollToPage(ann.pageIndex);
|
|
27612
27731
|
closeSheet();
|
|
27613
27732
|
},
|
|
27614
|
-
style: [
|
|
27733
|
+
style: [styles9.noteCard, isDark && styles9.noteCardDark],
|
|
27615
27734
|
children: [
|
|
27616
|
-
/* @__PURE__ */
|
|
27617
|
-
/* @__PURE__ */
|
|
27618
|
-
|
|
27735
|
+
/* @__PURE__ */ jsxs10(View9, { style: styles9.noteHeader, children: [
|
|
27736
|
+
/* @__PURE__ */ jsx10(
|
|
27737
|
+
View9,
|
|
27619
27738
|
{
|
|
27620
|
-
style: [
|
|
27739
|
+
style: [styles9.noteDot, { backgroundColor: ann.color }]
|
|
27621
27740
|
}
|
|
27622
27741
|
),
|
|
27623
|
-
/* @__PURE__ */
|
|
27624
|
-
|
|
27742
|
+
/* @__PURE__ */ jsxs10(
|
|
27743
|
+
Text5,
|
|
27625
27744
|
{
|
|
27626
|
-
style: [
|
|
27745
|
+
style: [styles9.noteTitle, isDark && styles9.noteTitleDark],
|
|
27627
27746
|
children: [
|
|
27628
27747
|
t.page,
|
|
27629
27748
|
" ",
|
|
@@ -27632,23 +27751,23 @@ var RightSheet = ({
|
|
|
27632
27751
|
}
|
|
27633
27752
|
)
|
|
27634
27753
|
] }),
|
|
27635
|
-
/* @__PURE__ */
|
|
27636
|
-
|
|
27754
|
+
/* @__PURE__ */ jsx10(
|
|
27755
|
+
Text5,
|
|
27637
27756
|
{
|
|
27638
27757
|
style: [
|
|
27639
|
-
|
|
27640
|
-
isDark &&
|
|
27758
|
+
styles9.noteType,
|
|
27759
|
+
isDark && styles9.noteTypeDark,
|
|
27641
27760
|
{ color: accentColor }
|
|
27642
27761
|
],
|
|
27643
27762
|
children: ann.type === "comment" || ann.type === "text" ? t.note.toUpperCase() : ann.type.toUpperCase()
|
|
27644
27763
|
}
|
|
27645
27764
|
),
|
|
27646
|
-
ann.content ? /* @__PURE__ */
|
|
27647
|
-
|
|
27765
|
+
ann.content ? /* @__PURE__ */ jsx10(
|
|
27766
|
+
Text5,
|
|
27648
27767
|
{
|
|
27649
27768
|
style: [
|
|
27650
|
-
|
|
27651
|
-
isDark &&
|
|
27769
|
+
styles9.noteContent,
|
|
27770
|
+
isDark && styles9.noteContentDark
|
|
27652
27771
|
],
|
|
27653
27772
|
children: ann.content
|
|
27654
27773
|
}
|
|
@@ -27661,41 +27780,13 @@ var RightSheet = ({
|
|
|
27661
27780
|
)
|
|
27662
27781
|
] })
|
|
27663
27782
|
}
|
|
27664
|
-
)
|
|
27783
|
+
);
|
|
27665
27784
|
};
|
|
27666
|
-
var
|
|
27667
|
-
modalRoot: {
|
|
27668
|
-
...StyleSheet8.absoluteFillObject,
|
|
27669
|
-
zIndex: 30
|
|
27670
|
-
},
|
|
27785
|
+
var styles9 = StyleSheet9.create({
|
|
27671
27786
|
sheet: {
|
|
27672
|
-
|
|
27787
|
+
maxHeight: "100%",
|
|
27673
27788
|
paddingBottom: 16
|
|
27674
27789
|
},
|
|
27675
|
-
sheetBackground: {
|
|
27676
|
-
backgroundColor: "#ffffff",
|
|
27677
|
-
borderTopLeftRadius: 20,
|
|
27678
|
-
borderTopRightRadius: 20,
|
|
27679
|
-
borderTopWidth: 1,
|
|
27680
|
-
borderTopColor: "#e5e7eb"
|
|
27681
|
-
},
|
|
27682
|
-
sheetDark: {
|
|
27683
|
-
backgroundColor: "#0f1115",
|
|
27684
|
-
borderTopColor: "#1f2937"
|
|
27685
|
-
},
|
|
27686
|
-
handleContainer: {
|
|
27687
|
-
paddingTop: 10,
|
|
27688
|
-
paddingBottom: 12
|
|
27689
|
-
},
|
|
27690
|
-
handle: {
|
|
27691
|
-
width: 44,
|
|
27692
|
-
height: 4,
|
|
27693
|
-
borderRadius: 999,
|
|
27694
|
-
backgroundColor: "#cbd5f5"
|
|
27695
|
-
},
|
|
27696
|
-
handleDark: {
|
|
27697
|
-
backgroundColor: "#374151"
|
|
27698
|
-
},
|
|
27699
27790
|
header: {
|
|
27700
27791
|
paddingHorizontal: 16,
|
|
27701
27792
|
marginBottom: 10,
|
|
@@ -27937,15 +28028,15 @@ var RightSheet_default = RightSheet;
|
|
|
27937
28028
|
// components/AnnotationEditor.tsx
|
|
27938
28029
|
import { useEffect as useEffect8, useState as useState8 } from "react";
|
|
27939
28030
|
import {
|
|
27940
|
-
Modal as
|
|
27941
|
-
View as
|
|
27942
|
-
Text as
|
|
28031
|
+
Modal as Modal3,
|
|
28032
|
+
View as View10,
|
|
28033
|
+
Text as Text6,
|
|
27943
28034
|
TextInput as TextInput2,
|
|
27944
|
-
Pressable as
|
|
27945
|
-
StyleSheet as
|
|
28035
|
+
Pressable as Pressable8,
|
|
28036
|
+
StyleSheet as StyleSheet10
|
|
27946
28037
|
} from "react-native";
|
|
27947
28038
|
import { useViewerStore as useViewerStore8 } from "@papyrus-sdk/core";
|
|
27948
|
-
import { jsx as
|
|
28039
|
+
import { jsx as jsx11, jsxs as jsxs11 } from "react/jsx-runtime";
|
|
27949
28040
|
var AnnotationEditor = () => {
|
|
27950
28041
|
const {
|
|
27951
28042
|
annotations,
|
|
@@ -27972,19 +28063,19 @@ var AnnotationEditor = () => {
|
|
|
27972
28063
|
updateAnnotation(annotation.id, { content: draft });
|
|
27973
28064
|
setSelectedAnnotation(null);
|
|
27974
28065
|
};
|
|
27975
|
-
return /* @__PURE__ */
|
|
27976
|
-
|
|
28066
|
+
return /* @__PURE__ */ jsx11(
|
|
28067
|
+
Modal3,
|
|
27977
28068
|
{
|
|
27978
28069
|
visible: true,
|
|
27979
28070
|
transparent: true,
|
|
27980
28071
|
animationType: "fade",
|
|
27981
28072
|
onRequestClose: handleClose,
|
|
27982
|
-
children: /* @__PURE__ */
|
|
27983
|
-
/* @__PURE__ */
|
|
27984
|
-
/* @__PURE__ */
|
|
28073
|
+
children: /* @__PURE__ */ jsx11(View10, { style: styles10.overlay, children: /* @__PURE__ */ jsxs11(View10, { style: [styles10.card, isDark && styles10.cardDark], children: [
|
|
28074
|
+
/* @__PURE__ */ jsx11(Text6, { style: [styles10.title, isDark && styles10.titleDark], children: t.editNote }),
|
|
28075
|
+
/* @__PURE__ */ jsx11(
|
|
27985
28076
|
TextInput2,
|
|
27986
28077
|
{
|
|
27987
|
-
style: [
|
|
28078
|
+
style: [styles10.input, isDark && styles10.inputDark],
|
|
27988
28079
|
value: draft,
|
|
27989
28080
|
onChangeText: setDraft,
|
|
27990
28081
|
placeholder: t.notePlaceholder,
|
|
@@ -27992,25 +28083,25 @@ var AnnotationEditor = () => {
|
|
|
27992
28083
|
multiline: true
|
|
27993
28084
|
}
|
|
27994
28085
|
),
|
|
27995
|
-
/* @__PURE__ */
|
|
27996
|
-
/* @__PURE__ */
|
|
27997
|
-
|
|
28086
|
+
/* @__PURE__ */ jsxs11(View10, { style: styles10.actions, children: [
|
|
28087
|
+
/* @__PURE__ */ jsx11(
|
|
28088
|
+
Pressable8,
|
|
27998
28089
|
{
|
|
27999
28090
|
onPress: handleClose,
|
|
28000
|
-
style: [
|
|
28001
|
-
children: /* @__PURE__ */
|
|
28091
|
+
style: [styles10.actionButton, styles10.actionCancel],
|
|
28092
|
+
children: /* @__PURE__ */ jsx11(Text6, { style: styles10.actionText, children: t.cancel })
|
|
28002
28093
|
}
|
|
28003
28094
|
),
|
|
28004
|
-
/* @__PURE__ */
|
|
28005
|
-
|
|
28095
|
+
/* @__PURE__ */ jsx11(
|
|
28096
|
+
Pressable8,
|
|
28006
28097
|
{
|
|
28007
28098
|
onPress: handleSave,
|
|
28008
28099
|
style: [
|
|
28009
|
-
|
|
28010
|
-
|
|
28100
|
+
styles10.actionButton,
|
|
28101
|
+
styles10.actionSave,
|
|
28011
28102
|
{ backgroundColor: accentColor }
|
|
28012
28103
|
],
|
|
28013
|
-
children: /* @__PURE__ */
|
|
28104
|
+
children: /* @__PURE__ */ jsx11(Text6, { style: [styles10.actionText, styles10.actionTextLight], children: t.save })
|
|
28014
28105
|
}
|
|
28015
28106
|
)
|
|
28016
28107
|
] })
|
|
@@ -28018,7 +28109,7 @@ var AnnotationEditor = () => {
|
|
|
28018
28109
|
}
|
|
28019
28110
|
);
|
|
28020
28111
|
};
|
|
28021
|
-
var
|
|
28112
|
+
var styles10 = StyleSheet10.create({
|
|
28022
28113
|
overlay: {
|
|
28023
28114
|
flex: 1,
|
|
28024
28115
|
alignItems: "center",
|
|
@@ -28088,7 +28179,7 @@ var styles9 = StyleSheet9.create({
|
|
|
28088
28179
|
var AnnotationEditor_default = AnnotationEditor;
|
|
28089
28180
|
|
|
28090
28181
|
// components/BottomBar.tsx
|
|
28091
|
-
import { View as
|
|
28182
|
+
import { View as View11, Pressable as Pressable9, StyleSheet as StyleSheet11, useWindowDimensions as useWindowDimensions5 } from "react-native";
|
|
28092
28183
|
import { useViewerStore as useViewerStore9 } from "@papyrus-sdk/core";
|
|
28093
28184
|
|
|
28094
28185
|
// components/bottomBarModel.ts
|
|
@@ -28135,7 +28226,7 @@ function createOpenDestinationHandler(onOpenDestination, destination) {
|
|
|
28135
28226
|
}
|
|
28136
28227
|
|
|
28137
28228
|
// components/BottomBar.tsx
|
|
28138
|
-
import { jsx as
|
|
28229
|
+
import { jsx as jsx12, jsxs as jsxs12 } from "react/jsx-runtime";
|
|
28139
28230
|
var BottomBar = ({
|
|
28140
28231
|
documentType,
|
|
28141
28232
|
onOpenInfo,
|
|
@@ -28208,37 +28299,37 @@ var BottomBar = ({
|
|
|
28208
28299
|
}
|
|
28209
28300
|
};
|
|
28210
28301
|
if (!mobileChromeVisible || !mobileDockVisible) return null;
|
|
28211
|
-
return /* @__PURE__ */
|
|
28212
|
-
layout.leftSlots.length > 0 ? /* @__PURE__ */
|
|
28213
|
-
|
|
28302
|
+
return /* @__PURE__ */ jsx12(View11, { pointerEvents: "box-none", style: styles11.frame, children: /* @__PURE__ */ jsxs12(View11, { style: [styles11.row, isLandscape && styles11.rowLandscape], children: [
|
|
28303
|
+
layout.leftSlots.length > 0 ? /* @__PURE__ */ jsx12(
|
|
28304
|
+
View11,
|
|
28214
28305
|
{
|
|
28215
28306
|
style: [
|
|
28216
|
-
|
|
28217
|
-
|
|
28218
|
-
isDark &&
|
|
28307
|
+
styles11.island,
|
|
28308
|
+
styles11.editIsland,
|
|
28309
|
+
isDark && styles11.islandDark
|
|
28219
28310
|
],
|
|
28220
28311
|
testID: "papyrus-floating-bottom-dock-edit",
|
|
28221
28312
|
children: layout.leftSlots.map((slot) => {
|
|
28222
28313
|
const meta = slotMeta[slot.key];
|
|
28223
28314
|
const Icon = meta.icon;
|
|
28224
|
-
return /* @__PURE__ */
|
|
28225
|
-
|
|
28315
|
+
return /* @__PURE__ */ jsx12(
|
|
28316
|
+
Pressable9,
|
|
28226
28317
|
{
|
|
28227
28318
|
onPress: meta.onPress,
|
|
28228
28319
|
style: [
|
|
28229
|
-
|
|
28230
|
-
slot.active &&
|
|
28320
|
+
styles11.iconOnlyItem,
|
|
28321
|
+
slot.active && styles11.itemActive
|
|
28231
28322
|
],
|
|
28232
28323
|
accessibilityLabel: meta.label,
|
|
28233
|
-
children: /* @__PURE__ */
|
|
28234
|
-
|
|
28324
|
+
children: /* @__PURE__ */ jsx12(
|
|
28325
|
+
View11,
|
|
28235
28326
|
{
|
|
28236
28327
|
style: [
|
|
28237
|
-
|
|
28238
|
-
isDark &&
|
|
28239
|
-
slot.active &&
|
|
28328
|
+
styles11.itemIcon,
|
|
28329
|
+
isDark && styles11.itemIconDark,
|
|
28330
|
+
slot.active && styles11.itemIconActive
|
|
28240
28331
|
],
|
|
28241
|
-
children: /* @__PURE__ */
|
|
28332
|
+
children: /* @__PURE__ */ jsx12(
|
|
28242
28333
|
Icon,
|
|
28243
28334
|
{
|
|
28244
28335
|
size: MOBILE_CHROME_METRICS.iconSize,
|
|
@@ -28253,33 +28344,33 @@ var BottomBar = ({
|
|
|
28253
28344
|
})
|
|
28254
28345
|
}
|
|
28255
28346
|
) : null,
|
|
28256
|
-
/* @__PURE__ */
|
|
28257
|
-
|
|
28347
|
+
/* @__PURE__ */ jsx12(
|
|
28348
|
+
View11,
|
|
28258
28349
|
{
|
|
28259
28350
|
style: [
|
|
28260
|
-
|
|
28261
|
-
|
|
28262
|
-
isDark &&
|
|
28351
|
+
styles11.island,
|
|
28352
|
+
styles11.utilityIsland,
|
|
28353
|
+
isDark && styles11.islandDark
|
|
28263
28354
|
],
|
|
28264
28355
|
testID: "papyrus-floating-bottom-dock",
|
|
28265
28356
|
children: layout.rightSlots.map((slot) => {
|
|
28266
28357
|
const meta = slotMeta[slot.key];
|
|
28267
28358
|
const Icon = meta.icon;
|
|
28268
|
-
return /* @__PURE__ */
|
|
28269
|
-
|
|
28359
|
+
return /* @__PURE__ */ jsx12(
|
|
28360
|
+
Pressable9,
|
|
28270
28361
|
{
|
|
28271
28362
|
onPress: meta.onPress,
|
|
28272
|
-
style: [
|
|
28363
|
+
style: [styles11.iconOnlyItem, slot.active && styles11.itemActive],
|
|
28273
28364
|
accessibilityLabel: meta.label,
|
|
28274
|
-
children: /* @__PURE__ */
|
|
28275
|
-
|
|
28365
|
+
children: /* @__PURE__ */ jsx12(
|
|
28366
|
+
View11,
|
|
28276
28367
|
{
|
|
28277
28368
|
style: [
|
|
28278
|
-
|
|
28279
|
-
isDark &&
|
|
28280
|
-
slot.active &&
|
|
28369
|
+
styles11.itemIcon,
|
|
28370
|
+
isDark && styles11.itemIconDark,
|
|
28371
|
+
slot.active && styles11.itemIconActive
|
|
28281
28372
|
],
|
|
28282
|
-
children: /* @__PURE__ */
|
|
28373
|
+
children: /* @__PURE__ */ jsx12(
|
|
28283
28374
|
Icon,
|
|
28284
28375
|
{
|
|
28285
28376
|
size: MOBILE_CHROME_METRICS.iconSize,
|
|
@@ -28296,7 +28387,7 @@ var BottomBar = ({
|
|
|
28296
28387
|
)
|
|
28297
28388
|
] }) });
|
|
28298
28389
|
};
|
|
28299
|
-
var
|
|
28390
|
+
var styles11 = StyleSheet11.create({
|
|
28300
28391
|
frame: {
|
|
28301
28392
|
position: "absolute",
|
|
28302
28393
|
left: 0,
|
|
@@ -28376,14 +28467,9 @@ var styles10 = StyleSheet10.create({
|
|
|
28376
28467
|
var BottomBar_default = BottomBar;
|
|
28377
28468
|
|
|
28378
28469
|
// components/SettingsSheet.tsx
|
|
28379
|
-
import {
|
|
28380
|
-
import { Dimensions as Dimensions2, View as View11, Text as Text6, Pressable as Pressable9, StyleSheet as StyleSheet11 } from "react-native";
|
|
28381
|
-
import BottomSheet2, {
|
|
28382
|
-
BottomSheetBackdrop as BottomSheetBackdrop2,
|
|
28383
|
-
BottomSheetScrollView as BottomSheetScrollView2
|
|
28384
|
-
} from "@gorhom/bottom-sheet";
|
|
28470
|
+
import { Dimensions as Dimensions2, View as View12, Text as Text7, Pressable as Pressable10, StyleSheet as StyleSheet12 } from "react-native";
|
|
28385
28471
|
import { useViewerStore as useViewerStore10 } from "@papyrus-sdk/core";
|
|
28386
|
-
import { jsx as
|
|
28472
|
+
import { jsx as jsx13, jsxs as jsxs13 } from "react/jsx-runtime";
|
|
28387
28473
|
var PAGE_THEME_OPTIONS = [
|
|
28388
28474
|
{ value: "normal", labelKey: "themeOriginal" },
|
|
28389
28475
|
{ value: "sepia", labelKey: "themeSepia" },
|
|
@@ -28392,19 +28478,19 @@ var PAGE_THEME_OPTIONS = [
|
|
|
28392
28478
|
];
|
|
28393
28479
|
var ThemeSwatch = ({ value }) => {
|
|
28394
28480
|
if (value === "high-contrast") {
|
|
28395
|
-
return /* @__PURE__ */
|
|
28396
|
-
/* @__PURE__ */
|
|
28397
|
-
/* @__PURE__ */
|
|
28481
|
+
return /* @__PURE__ */ jsxs13(View12, { style: [styles12.themeSwatch, styles12.themeSwatchContrast], children: [
|
|
28482
|
+
/* @__PURE__ */ jsx13(View12, { style: styles12.themeSwatchContrastHalfDark }),
|
|
28483
|
+
/* @__PURE__ */ jsx13(View12, { style: styles12.themeSwatchContrastHalfLight })
|
|
28398
28484
|
] });
|
|
28399
28485
|
}
|
|
28400
|
-
return /* @__PURE__ */
|
|
28401
|
-
|
|
28486
|
+
return /* @__PURE__ */ jsx13(
|
|
28487
|
+
View12,
|
|
28402
28488
|
{
|
|
28403
28489
|
style: [
|
|
28404
|
-
|
|
28405
|
-
value === "normal" &&
|
|
28406
|
-
value === "sepia" &&
|
|
28407
|
-
value === "dark" &&
|
|
28490
|
+
styles12.themeSwatch,
|
|
28491
|
+
value === "normal" && styles12.themeSwatchNormal,
|
|
28492
|
+
value === "sepia" && styles12.themeSwatchSepia,
|
|
28493
|
+
value === "dark" && styles12.themeSwatchDark
|
|
28408
28494
|
]
|
|
28409
28495
|
}
|
|
28410
28496
|
);
|
|
@@ -28427,23 +28513,7 @@ var SettingsSheet = ({
|
|
|
28427
28513
|
const isPaged = viewMode === "single";
|
|
28428
28514
|
const isDouble = viewMode === "double";
|
|
28429
28515
|
const t = getStrings(locale);
|
|
28430
|
-
const
|
|
28431
|
-
() => [Math.min(640, Dimensions2.get("window").height * 0.72)],
|
|
28432
|
-
[]
|
|
28433
|
-
);
|
|
28434
|
-
const renderBackdrop = useCallback5(
|
|
28435
|
-
(props) => /* @__PURE__ */ jsx12(
|
|
28436
|
-
BottomSheetBackdrop2,
|
|
28437
|
-
{
|
|
28438
|
-
...props,
|
|
28439
|
-
appearsOnIndex: 0,
|
|
28440
|
-
disappearsOnIndex: -1,
|
|
28441
|
-
opacity: 0.4,
|
|
28442
|
-
pressBehavior: "close"
|
|
28443
|
-
}
|
|
28444
|
-
),
|
|
28445
|
-
[]
|
|
28446
|
-
);
|
|
28516
|
+
const sheetMaxHeight = Math.min(640, Dimensions2.get("window").height * 0.72);
|
|
28447
28517
|
const handleTransition = (mode) => {
|
|
28448
28518
|
if (mode === "paged") {
|
|
28449
28519
|
setDocumentState({ viewMode: "single" });
|
|
@@ -28469,73 +28539,72 @@ var SettingsSheet = ({
|
|
|
28469
28539
|
engine.setZoom(next);
|
|
28470
28540
|
setDocumentState({ zoom: next });
|
|
28471
28541
|
};
|
|
28472
|
-
return /* @__PURE__ */
|
|
28473
|
-
|
|
28542
|
+
return /* @__PURE__ */ jsx13(
|
|
28543
|
+
NativeSheet,
|
|
28474
28544
|
{
|
|
28475
|
-
|
|
28476
|
-
snapPoints,
|
|
28477
|
-
enablePanDownToClose: true,
|
|
28545
|
+
visible,
|
|
28478
28546
|
onClose,
|
|
28479
|
-
|
|
28480
|
-
|
|
28481
|
-
|
|
28482
|
-
|
|
28483
|
-
|
|
28484
|
-
|
|
28547
|
+
isDark,
|
|
28548
|
+
maxHeight: sheetMaxHeight,
|
|
28549
|
+
showHeader: true,
|
|
28550
|
+
title: locale === "pt-BR" ? "Exibicao" : "Display",
|
|
28551
|
+
closeAccessibilityLabel: "Close settings",
|
|
28552
|
+
children: /* @__PURE__ */ jsxs13(
|
|
28553
|
+
NativeSheetScrollView,
|
|
28485
28554
|
{
|
|
28486
|
-
style:
|
|
28487
|
-
contentContainerStyle:
|
|
28555
|
+
style: styles12.sheet,
|
|
28556
|
+
contentContainerStyle: styles12.sheetContent,
|
|
28488
28557
|
showsVerticalScrollIndicator: false,
|
|
28489
28558
|
children: [
|
|
28490
|
-
/* @__PURE__ */
|
|
28491
|
-
/* @__PURE__ */
|
|
28492
|
-
|
|
28559
|
+
/* @__PURE__ */ jsxs13(View12, { style: styles12.section, children: [
|
|
28560
|
+
/* @__PURE__ */ jsx13(
|
|
28561
|
+
Text7,
|
|
28493
28562
|
{
|
|
28494
|
-
style: [
|
|
28563
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28495
28564
|
children: t.appearance
|
|
28496
28565
|
}
|
|
28497
28566
|
),
|
|
28498
|
-
/* @__PURE__ */
|
|
28499
|
-
/* @__PURE__ */
|
|
28500
|
-
|
|
28567
|
+
/* @__PURE__ */ jsxs13(View12, { style: styles12.optionRow, children: [
|
|
28568
|
+
/* @__PURE__ */ jsx13(
|
|
28569
|
+
Pressable10,
|
|
28501
28570
|
{
|
|
28502
28571
|
onPress: () => setDocumentState({ uiTheme: "light" }),
|
|
28503
28572
|
style: [
|
|
28504
|
-
|
|
28505
|
-
isDark &&
|
|
28506
|
-
uiTheme === "light" &&
|
|
28573
|
+
styles12.optionButton,
|
|
28574
|
+
isDark && styles12.optionButtonDark,
|
|
28575
|
+
uiTheme === "light" && styles12.optionButtonActive,
|
|
28507
28576
|
uiTheme === "light" && { backgroundColor: accentColor }
|
|
28508
28577
|
],
|
|
28509
|
-
children: /* @__PURE__ */
|
|
28510
|
-
|
|
28578
|
+
children: /* @__PURE__ */ jsx13(
|
|
28579
|
+
Text7,
|
|
28511
28580
|
{
|
|
28512
28581
|
style: [
|
|
28513
|
-
|
|
28514
|
-
isDark &&
|
|
28515
|
-
uiTheme === "light" &&
|
|
28582
|
+
styles12.optionText,
|
|
28583
|
+
isDark && styles12.optionTextDark,
|
|
28584
|
+
uiTheme === "light" && styles12.optionTextActive
|
|
28516
28585
|
],
|
|
28517
28586
|
children: t.light
|
|
28518
28587
|
}
|
|
28519
28588
|
)
|
|
28520
28589
|
}
|
|
28521
28590
|
),
|
|
28522
|
-
/* @__PURE__ */
|
|
28523
|
-
|
|
28591
|
+
/* @__PURE__ */ jsx13(
|
|
28592
|
+
Pressable10,
|
|
28524
28593
|
{
|
|
28525
28594
|
onPress: () => setDocumentState({ uiTheme: "dark" }),
|
|
28526
28595
|
style: [
|
|
28527
|
-
|
|
28528
|
-
isDark &&
|
|
28529
|
-
uiTheme === "dark" &&
|
|
28596
|
+
styles12.optionButton,
|
|
28597
|
+
isDark && styles12.optionButtonDark,
|
|
28598
|
+
uiTheme === "dark" && styles12.optionButtonActive,
|
|
28530
28599
|
uiTheme === "dark" && { backgroundColor: accentColor }
|
|
28531
28600
|
],
|
|
28532
|
-
children: /* @__PURE__ */
|
|
28533
|
-
|
|
28601
|
+
children: /* @__PURE__ */ jsx13(
|
|
28602
|
+
Text7,
|
|
28534
28603
|
{
|
|
28535
28604
|
style: [
|
|
28536
|
-
|
|
28537
|
-
isDark &&
|
|
28538
|
-
uiTheme === "dark" &&
|
|
28605
|
+
styles12.optionText,
|
|
28606
|
+
isDark && styles12.optionTextDark,
|
|
28607
|
+
uiTheme === "dark" && styles12.optionTextActive
|
|
28539
28608
|
],
|
|
28540
28609
|
children: t.dark
|
|
28541
28610
|
}
|
|
@@ -28544,34 +28613,34 @@ var SettingsSheet = ({
|
|
|
28544
28613
|
)
|
|
28545
28614
|
] })
|
|
28546
28615
|
] }),
|
|
28547
|
-
/* @__PURE__ */
|
|
28548
|
-
/* @__PURE__ */
|
|
28549
|
-
|
|
28616
|
+
/* @__PURE__ */ jsxs13(View12, { style: styles12.section, children: [
|
|
28617
|
+
/* @__PURE__ */ jsx13(
|
|
28618
|
+
Text7,
|
|
28550
28619
|
{
|
|
28551
|
-
style: [
|
|
28620
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28552
28621
|
children: t.pageTheme
|
|
28553
28622
|
}
|
|
28554
28623
|
),
|
|
28555
|
-
/* @__PURE__ */
|
|
28624
|
+
/* @__PURE__ */ jsx13(View12, { style: styles12.themeOptionRow, children: PAGE_THEME_OPTIONS.map((option) => {
|
|
28556
28625
|
const active = pageTheme === option.value;
|
|
28557
|
-
return /* @__PURE__ */
|
|
28558
|
-
|
|
28626
|
+
return /* @__PURE__ */ jsxs13(
|
|
28627
|
+
Pressable10,
|
|
28559
28628
|
{
|
|
28560
28629
|
onPress: () => setDocumentState({ pageTheme: option.value }),
|
|
28561
28630
|
style: [
|
|
28562
|
-
|
|
28563
|
-
isDark &&
|
|
28564
|
-
active &&
|
|
28631
|
+
styles12.themeOptionButton,
|
|
28632
|
+
isDark && styles12.themeOptionButtonDark,
|
|
28633
|
+
active && styles12.themeOptionButtonActive,
|
|
28565
28634
|
active && { borderColor: accentColor }
|
|
28566
28635
|
],
|
|
28567
28636
|
children: [
|
|
28568
|
-
/* @__PURE__ */
|
|
28569
|
-
/* @__PURE__ */
|
|
28570
|
-
|
|
28637
|
+
/* @__PURE__ */ jsx13(ThemeSwatch, { value: option.value }),
|
|
28638
|
+
/* @__PURE__ */ jsx13(
|
|
28639
|
+
Text7,
|
|
28571
28640
|
{
|
|
28572
28641
|
style: [
|
|
28573
|
-
|
|
28574
|
-
isDark &&
|
|
28642
|
+
styles12.themeOptionLabel,
|
|
28643
|
+
isDark && styles12.themeOptionLabelDark,
|
|
28575
28644
|
active && { color: accentColor }
|
|
28576
28645
|
],
|
|
28577
28646
|
children: t[option.labelKey]
|
|
@@ -28583,55 +28652,55 @@ var SettingsSheet = ({
|
|
|
28583
28652
|
);
|
|
28584
28653
|
}) })
|
|
28585
28654
|
] }),
|
|
28586
|
-
/* @__PURE__ */
|
|
28587
|
-
/* @__PURE__ */
|
|
28588
|
-
|
|
28655
|
+
/* @__PURE__ */ jsxs13(View12, { style: styles12.section, children: [
|
|
28656
|
+
/* @__PURE__ */ jsx13(
|
|
28657
|
+
Text7,
|
|
28589
28658
|
{
|
|
28590
|
-
style: [
|
|
28659
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28591
28660
|
children: t.pageTransition
|
|
28592
28661
|
}
|
|
28593
28662
|
),
|
|
28594
|
-
/* @__PURE__ */
|
|
28595
|
-
/* @__PURE__ */
|
|
28596
|
-
|
|
28663
|
+
/* @__PURE__ */ jsxs13(View12, { style: styles12.optionRow, children: [
|
|
28664
|
+
/* @__PURE__ */ jsx13(
|
|
28665
|
+
Pressable10,
|
|
28597
28666
|
{
|
|
28598
28667
|
onPress: () => handleTransition("continuous"),
|
|
28599
28668
|
style: [
|
|
28600
|
-
|
|
28601
|
-
isDark &&
|
|
28602
|
-
(!isPaged || isDouble) &&
|
|
28669
|
+
styles12.optionButton,
|
|
28670
|
+
isDark && styles12.optionButtonDark,
|
|
28671
|
+
(!isPaged || isDouble) && styles12.optionButtonActive,
|
|
28603
28672
|
(!isPaged || isDouble) && { backgroundColor: accentColor }
|
|
28604
28673
|
],
|
|
28605
|
-
children: /* @__PURE__ */
|
|
28606
|
-
|
|
28674
|
+
children: /* @__PURE__ */ jsx13(
|
|
28675
|
+
Text7,
|
|
28607
28676
|
{
|
|
28608
28677
|
style: [
|
|
28609
|
-
|
|
28610
|
-
isDark &&
|
|
28611
|
-
(!isPaged || isDouble) &&
|
|
28678
|
+
styles12.optionText,
|
|
28679
|
+
isDark && styles12.optionTextDark,
|
|
28680
|
+
(!isPaged || isDouble) && styles12.optionTextActive
|
|
28612
28681
|
],
|
|
28613
28682
|
children: t.continuous
|
|
28614
28683
|
}
|
|
28615
28684
|
)
|
|
28616
28685
|
}
|
|
28617
28686
|
),
|
|
28618
|
-
/* @__PURE__ */
|
|
28619
|
-
|
|
28687
|
+
/* @__PURE__ */ jsx13(
|
|
28688
|
+
Pressable10,
|
|
28620
28689
|
{
|
|
28621
28690
|
onPress: () => handleTransition("paged"),
|
|
28622
28691
|
style: [
|
|
28623
|
-
|
|
28624
|
-
isDark &&
|
|
28625
|
-
isPaged &&
|
|
28692
|
+
styles12.optionButton,
|
|
28693
|
+
isDark && styles12.optionButtonDark,
|
|
28694
|
+
isPaged && styles12.optionButtonActive,
|
|
28626
28695
|
isPaged && { backgroundColor: accentColor }
|
|
28627
28696
|
],
|
|
28628
|
-
children: /* @__PURE__ */
|
|
28629
|
-
|
|
28697
|
+
children: /* @__PURE__ */ jsx13(
|
|
28698
|
+
Text7,
|
|
28630
28699
|
{
|
|
28631
28700
|
style: [
|
|
28632
|
-
|
|
28633
|
-
isDark &&
|
|
28634
|
-
isPaged &&
|
|
28701
|
+
styles12.optionText,
|
|
28702
|
+
isDark && styles12.optionTextDark,
|
|
28703
|
+
isPaged && styles12.optionTextActive
|
|
28635
28704
|
],
|
|
28636
28705
|
children: t.pageByPage
|
|
28637
28706
|
}
|
|
@@ -28640,55 +28709,55 @@ var SettingsSheet = ({
|
|
|
28640
28709
|
)
|
|
28641
28710
|
] })
|
|
28642
28711
|
] }),
|
|
28643
|
-
/* @__PURE__ */
|
|
28644
|
-
/* @__PURE__ */
|
|
28645
|
-
|
|
28712
|
+
/* @__PURE__ */ jsxs13(View12, { style: styles12.section, children: [
|
|
28713
|
+
/* @__PURE__ */ jsx13(
|
|
28714
|
+
Text7,
|
|
28646
28715
|
{
|
|
28647
|
-
style: [
|
|
28716
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28648
28717
|
children: t.layout
|
|
28649
28718
|
}
|
|
28650
28719
|
),
|
|
28651
|
-
/* @__PURE__ */
|
|
28652
|
-
/* @__PURE__ */
|
|
28653
|
-
|
|
28720
|
+
/* @__PURE__ */ jsxs13(View12, { style: styles12.optionRow, children: [
|
|
28721
|
+
/* @__PURE__ */ jsx13(
|
|
28722
|
+
Pressable10,
|
|
28654
28723
|
{
|
|
28655
28724
|
onPress: () => handleLayout("single"),
|
|
28656
28725
|
style: [
|
|
28657
|
-
|
|
28658
|
-
isDark &&
|
|
28659
|
-
!isDouble &&
|
|
28726
|
+
styles12.optionButton,
|
|
28727
|
+
isDark && styles12.optionButtonDark,
|
|
28728
|
+
!isDouble && styles12.optionButtonActive,
|
|
28660
28729
|
!isDouble && { backgroundColor: accentColor }
|
|
28661
28730
|
],
|
|
28662
|
-
children: /* @__PURE__ */
|
|
28663
|
-
|
|
28731
|
+
children: /* @__PURE__ */ jsx13(
|
|
28732
|
+
Text7,
|
|
28664
28733
|
{
|
|
28665
28734
|
style: [
|
|
28666
|
-
|
|
28667
|
-
isDark &&
|
|
28668
|
-
!isDouble &&
|
|
28735
|
+
styles12.optionText,
|
|
28736
|
+
isDark && styles12.optionTextDark,
|
|
28737
|
+
!isDouble && styles12.optionTextActive
|
|
28669
28738
|
],
|
|
28670
28739
|
children: t.singlePage
|
|
28671
28740
|
}
|
|
28672
28741
|
)
|
|
28673
28742
|
}
|
|
28674
28743
|
),
|
|
28675
|
-
/* @__PURE__ */
|
|
28676
|
-
|
|
28744
|
+
/* @__PURE__ */ jsx13(
|
|
28745
|
+
Pressable10,
|
|
28677
28746
|
{
|
|
28678
28747
|
onPress: () => handleLayout("double"),
|
|
28679
28748
|
style: [
|
|
28680
|
-
|
|
28681
|
-
isDark &&
|
|
28682
|
-
isDouble &&
|
|
28749
|
+
styles12.optionButton,
|
|
28750
|
+
isDark && styles12.optionButtonDark,
|
|
28751
|
+
isDouble && styles12.optionButtonActive,
|
|
28683
28752
|
isDouble && { backgroundColor: accentColor }
|
|
28684
28753
|
],
|
|
28685
|
-
children: /* @__PURE__ */
|
|
28686
|
-
|
|
28754
|
+
children: /* @__PURE__ */ jsx13(
|
|
28755
|
+
Text7,
|
|
28687
28756
|
{
|
|
28688
28757
|
style: [
|
|
28689
|
-
|
|
28690
|
-
isDark &&
|
|
28691
|
-
isDouble &&
|
|
28758
|
+
styles12.optionText,
|
|
28759
|
+
isDark && styles12.optionTextDark,
|
|
28760
|
+
isDouble && styles12.optionTextActive
|
|
28692
28761
|
],
|
|
28693
28762
|
children: t.doublePage
|
|
28694
28763
|
}
|
|
@@ -28697,38 +28766,38 @@ var SettingsSheet = ({
|
|
|
28697
28766
|
)
|
|
28698
28767
|
] })
|
|
28699
28768
|
] }),
|
|
28700
|
-
/* @__PURE__ */
|
|
28701
|
-
/* @__PURE__ */
|
|
28702
|
-
|
|
28769
|
+
/* @__PURE__ */ jsxs13(View12, { style: styles12.section, children: [
|
|
28770
|
+
/* @__PURE__ */ jsx13(
|
|
28771
|
+
Text7,
|
|
28703
28772
|
{
|
|
28704
|
-
style: [
|
|
28773
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28705
28774
|
children: t.rotate
|
|
28706
28775
|
}
|
|
28707
28776
|
),
|
|
28708
|
-
/* @__PURE__ */
|
|
28709
|
-
/* @__PURE__ */
|
|
28710
|
-
|
|
28777
|
+
/* @__PURE__ */ jsxs13(View12, { style: styles12.optionRow, children: [
|
|
28778
|
+
/* @__PURE__ */ jsx13(
|
|
28779
|
+
Pressable10,
|
|
28711
28780
|
{
|
|
28712
28781
|
onPress: () => handleRotate("counterclockwise"),
|
|
28713
|
-
style: [
|
|
28714
|
-
children: /* @__PURE__ */
|
|
28715
|
-
|
|
28782
|
+
style: [styles12.optionButton, isDark && styles12.optionButtonDark],
|
|
28783
|
+
children: /* @__PURE__ */ jsx13(
|
|
28784
|
+
Text7,
|
|
28716
28785
|
{
|
|
28717
|
-
style: [
|
|
28786
|
+
style: [styles12.optionText, isDark && styles12.optionTextDark],
|
|
28718
28787
|
children: t.counterclockwise
|
|
28719
28788
|
}
|
|
28720
28789
|
)
|
|
28721
28790
|
}
|
|
28722
28791
|
),
|
|
28723
|
-
/* @__PURE__ */
|
|
28724
|
-
|
|
28792
|
+
/* @__PURE__ */ jsx13(
|
|
28793
|
+
Pressable10,
|
|
28725
28794
|
{
|
|
28726
28795
|
onPress: () => handleRotate("clockwise"),
|
|
28727
|
-
style: [
|
|
28728
|
-
children: /* @__PURE__ */
|
|
28729
|
-
|
|
28796
|
+
style: [styles12.optionButton, isDark && styles12.optionButtonDark],
|
|
28797
|
+
children: /* @__PURE__ */ jsx13(
|
|
28798
|
+
Text7,
|
|
28730
28799
|
{
|
|
28731
|
-
style: [
|
|
28800
|
+
style: [styles12.optionText, isDark && styles12.optionTextDark],
|
|
28732
28801
|
children: t.clockwise
|
|
28733
28802
|
}
|
|
28734
28803
|
)
|
|
@@ -28736,86 +28805,86 @@ var SettingsSheet = ({
|
|
|
28736
28805
|
)
|
|
28737
28806
|
] })
|
|
28738
28807
|
] }),
|
|
28739
|
-
/* @__PURE__ */
|
|
28740
|
-
/* @__PURE__ */
|
|
28741
|
-
|
|
28808
|
+
/* @__PURE__ */ jsxs13(View12, { style: styles12.section, children: [
|
|
28809
|
+
/* @__PURE__ */ jsx13(
|
|
28810
|
+
Text7,
|
|
28742
28811
|
{
|
|
28743
|
-
style: [
|
|
28812
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28744
28813
|
children: t.zoom
|
|
28745
28814
|
}
|
|
28746
28815
|
),
|
|
28747
|
-
/* @__PURE__ */
|
|
28748
|
-
/* @__PURE__ */
|
|
28749
|
-
|
|
28816
|
+
/* @__PURE__ */ jsxs13(View12, { style: styles12.optionRow, children: [
|
|
28817
|
+
/* @__PURE__ */ jsx13(
|
|
28818
|
+
Pressable10,
|
|
28750
28819
|
{
|
|
28751
28820
|
onPress: () => handleZoom(-0.1),
|
|
28752
|
-
style: [
|
|
28753
|
-
children: /* @__PURE__ */
|
|
28821
|
+
style: [styles12.optionButton, isDark && styles12.optionButtonDark],
|
|
28822
|
+
children: /* @__PURE__ */ jsx13(IconZoomOut, { size: 16, color: isDark ? "#e5e7eb" : "#111827" })
|
|
28754
28823
|
}
|
|
28755
28824
|
),
|
|
28756
|
-
/* @__PURE__ */
|
|
28825
|
+
/* @__PURE__ */ jsx13(View12, { style: styles12.zoomValue, children: /* @__PURE__ */ jsxs13(Text7, { style: [styles12.zoomText, isDark && styles12.zoomTextDark], children: [
|
|
28757
28826
|
Math.round(zoom * 100),
|
|
28758
28827
|
"%"
|
|
28759
28828
|
] }) }),
|
|
28760
|
-
/* @__PURE__ */
|
|
28761
|
-
|
|
28829
|
+
/* @__PURE__ */ jsx13(
|
|
28830
|
+
Pressable10,
|
|
28762
28831
|
{
|
|
28763
28832
|
onPress: () => handleZoom(0.1),
|
|
28764
|
-
style: [
|
|
28765
|
-
children: /* @__PURE__ */
|
|
28833
|
+
style: [styles12.optionButton, isDark && styles12.optionButtonDark],
|
|
28834
|
+
children: /* @__PURE__ */ jsx13(IconZoomIn, { size: 16, color: isDark ? "#e5e7eb" : "#111827" })
|
|
28766
28835
|
}
|
|
28767
28836
|
)
|
|
28768
28837
|
] })
|
|
28769
28838
|
] }),
|
|
28770
|
-
/* @__PURE__ */
|
|
28771
|
-
/* @__PURE__ */
|
|
28772
|
-
|
|
28839
|
+
/* @__PURE__ */ jsxs13(View12, { style: styles12.section, children: [
|
|
28840
|
+
/* @__PURE__ */ jsx13(
|
|
28841
|
+
Text7,
|
|
28773
28842
|
{
|
|
28774
|
-
style: [
|
|
28843
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28775
28844
|
children: t.language
|
|
28776
28845
|
}
|
|
28777
28846
|
),
|
|
28778
|
-
/* @__PURE__ */
|
|
28779
|
-
/* @__PURE__ */
|
|
28780
|
-
|
|
28847
|
+
/* @__PURE__ */ jsxs13(View12, { style: styles12.optionRow, children: [
|
|
28848
|
+
/* @__PURE__ */ jsx13(
|
|
28849
|
+
Pressable10,
|
|
28781
28850
|
{
|
|
28782
28851
|
onPress: () => setDocumentState({ locale: "en" }),
|
|
28783
28852
|
style: [
|
|
28784
|
-
|
|
28785
|
-
isDark &&
|
|
28786
|
-
locale === "en" &&
|
|
28853
|
+
styles12.optionButton,
|
|
28854
|
+
isDark && styles12.optionButtonDark,
|
|
28855
|
+
locale === "en" && styles12.optionButtonActive,
|
|
28787
28856
|
locale === "en" && { backgroundColor: accentColor }
|
|
28788
28857
|
],
|
|
28789
|
-
children: /* @__PURE__ */
|
|
28790
|
-
|
|
28858
|
+
children: /* @__PURE__ */ jsx13(
|
|
28859
|
+
Text7,
|
|
28791
28860
|
{
|
|
28792
28861
|
style: [
|
|
28793
|
-
|
|
28794
|
-
isDark &&
|
|
28795
|
-
locale === "en" &&
|
|
28862
|
+
styles12.optionText,
|
|
28863
|
+
isDark && styles12.optionTextDark,
|
|
28864
|
+
locale === "en" && styles12.optionTextActive
|
|
28796
28865
|
],
|
|
28797
28866
|
children: t.english
|
|
28798
28867
|
}
|
|
28799
28868
|
)
|
|
28800
28869
|
}
|
|
28801
28870
|
),
|
|
28802
|
-
/* @__PURE__ */
|
|
28803
|
-
|
|
28871
|
+
/* @__PURE__ */ jsx13(
|
|
28872
|
+
Pressable10,
|
|
28804
28873
|
{
|
|
28805
28874
|
onPress: () => setDocumentState({ locale: "pt-BR" }),
|
|
28806
28875
|
style: [
|
|
28807
|
-
|
|
28808
|
-
isDark &&
|
|
28809
|
-
locale === "pt-BR" &&
|
|
28876
|
+
styles12.optionButton,
|
|
28877
|
+
isDark && styles12.optionButtonDark,
|
|
28878
|
+
locale === "pt-BR" && styles12.optionButtonActive,
|
|
28810
28879
|
locale === "pt-BR" && { backgroundColor: accentColor }
|
|
28811
28880
|
],
|
|
28812
|
-
children: /* @__PURE__ */
|
|
28813
|
-
|
|
28881
|
+
children: /* @__PURE__ */ jsx13(
|
|
28882
|
+
Text7,
|
|
28814
28883
|
{
|
|
28815
28884
|
style: [
|
|
28816
|
-
|
|
28817
|
-
isDark &&
|
|
28818
|
-
locale === "pt-BR" &&
|
|
28885
|
+
styles12.optionText,
|
|
28886
|
+
isDark && styles12.optionTextDark,
|
|
28887
|
+
locale === "pt-BR" && styles12.optionTextActive
|
|
28819
28888
|
],
|
|
28820
28889
|
children: t.portuguese
|
|
28821
28890
|
}
|
|
@@ -28828,44 +28897,16 @@ var SettingsSheet = ({
|
|
|
28828
28897
|
}
|
|
28829
28898
|
)
|
|
28830
28899
|
}
|
|
28831
|
-
)
|
|
28900
|
+
);
|
|
28832
28901
|
};
|
|
28833
|
-
var
|
|
28834
|
-
modalRoot: {
|
|
28835
|
-
...StyleSheet11.absoluteFillObject,
|
|
28836
|
-
zIndex: 30
|
|
28837
|
-
},
|
|
28902
|
+
var styles12 = StyleSheet12.create({
|
|
28838
28903
|
sheet: {
|
|
28839
|
-
|
|
28904
|
+
maxHeight: "100%"
|
|
28840
28905
|
},
|
|
28841
28906
|
sheetContent: {
|
|
28842
28907
|
paddingHorizontal: 18,
|
|
28843
28908
|
paddingBottom: 24
|
|
28844
28909
|
},
|
|
28845
|
-
sheetBackground: {
|
|
28846
|
-
backgroundColor: "#ffffff",
|
|
28847
|
-
borderTopLeftRadius: 24,
|
|
28848
|
-
borderTopRightRadius: 24,
|
|
28849
|
-
borderTopWidth: 1,
|
|
28850
|
-
borderTopColor: "#e5e7eb"
|
|
28851
|
-
},
|
|
28852
|
-
sheetDark: {
|
|
28853
|
-
backgroundColor: "#0f1115",
|
|
28854
|
-
borderTopColor: "#1f2937"
|
|
28855
|
-
},
|
|
28856
|
-
handleContainer: {
|
|
28857
|
-
paddingTop: 10,
|
|
28858
|
-
paddingBottom: 12
|
|
28859
|
-
},
|
|
28860
|
-
handle: {
|
|
28861
|
-
width: 44,
|
|
28862
|
-
height: 4,
|
|
28863
|
-
borderRadius: 999,
|
|
28864
|
-
backgroundColor: "#cbd5f5"
|
|
28865
|
-
},
|
|
28866
|
-
handleDark: {
|
|
28867
|
-
backgroundColor: "#374151"
|
|
28868
|
-
},
|
|
28869
28910
|
section: {
|
|
28870
28911
|
marginBottom: 16
|
|
28871
28912
|
},
|
|
@@ -28991,17 +29032,17 @@ var styles11 = StyleSheet11.create({
|
|
|
28991
29032
|
var SettingsSheet_default = SettingsSheet;
|
|
28992
29033
|
|
|
28993
29034
|
// components/CoverPreview.tsx
|
|
28994
|
-
import { useEffect as useEffect9, useMemo as
|
|
29035
|
+
import { useEffect as useEffect9, useMemo as useMemo6, useRef as useRef7, useState as useState9 } from "react";
|
|
28995
29036
|
import {
|
|
28996
29037
|
ActivityIndicator,
|
|
28997
|
-
StyleSheet as
|
|
28998
|
-
Text as
|
|
29038
|
+
StyleSheet as StyleSheet13,
|
|
29039
|
+
Text as Text8,
|
|
28999
29040
|
UIManager as UIManager2,
|
|
29000
|
-
View as
|
|
29041
|
+
View as View13,
|
|
29001
29042
|
findNodeHandle as findNodeHandle3
|
|
29002
29043
|
} from "react-native";
|
|
29003
29044
|
import { MobileDocumentEngine, PapyrusPageView as PapyrusPageView3 } from "@papyrus-sdk/engine-native";
|
|
29004
|
-
import { jsx as
|
|
29045
|
+
import { jsx as jsx14, jsxs as jsxs14 } from "react/jsx-runtime";
|
|
29005
29046
|
var parseDataUri = (value) => {
|
|
29006
29047
|
const match = /^data:([^;,]+)?(;base64)?,/.exec(value);
|
|
29007
29048
|
if (!match) return null;
|
|
@@ -29055,7 +29096,7 @@ var CoverPreview = ({
|
|
|
29055
29096
|
const [loading, setLoading] = useState9(false);
|
|
29056
29097
|
const [error, setError] = useState9(null);
|
|
29057
29098
|
const viewRef = useRef7(null);
|
|
29058
|
-
const resolvedType =
|
|
29099
|
+
const resolvedType = useMemo6(() => inferDocumentType(source, type), [source, type]);
|
|
29059
29100
|
const isPdf = resolvedType === "pdf";
|
|
29060
29101
|
const hasNativePageView = Boolean(UIManager2.getViewManagerConfig?.("PapyrusPageView"));
|
|
29061
29102
|
const canRender = !isPdf || hasNativePageView;
|
|
@@ -29118,15 +29159,15 @@ var CoverPreview = ({
|
|
|
29118
29159
|
}
|
|
29119
29160
|
};
|
|
29120
29161
|
if (!shouldRender || !canRender) {
|
|
29121
|
-
return /* @__PURE__ */
|
|
29162
|
+
return /* @__PURE__ */ jsx14(View13, { style: [styles13.container, style], children: placeholder ?? /* @__PURE__ */ jsx14(View13, { style: styles13.placeholder, children: /* @__PURE__ */ jsx14(Text8, { style: styles13.placeholderText, children: "Preview" }) }) });
|
|
29122
29163
|
}
|
|
29123
|
-
return /* @__PURE__ */
|
|
29124
|
-
/* @__PURE__ */
|
|
29125
|
-
showLoading && loading && /* @__PURE__ */
|
|
29126
|
-
error && /* @__PURE__ */
|
|
29164
|
+
return /* @__PURE__ */ jsxs14(View13, { style: [styles13.container, style], onLayout: handleLayout, children: [
|
|
29165
|
+
/* @__PURE__ */ jsx14(View13, { style: styles13.previewFrame, pointerEvents: allowInteraction ? "auto" : "none", children: isPdf ? /* @__PURE__ */ jsx14(PapyrusPageView3, { ref: viewRef, style: styles13.pageView }) : engine && /* @__PURE__ */ jsx14(WebViewViewer_default, { engine }) }),
|
|
29166
|
+
showLoading && loading && /* @__PURE__ */ jsx14(View13, { pointerEvents: "none", style: styles13.loadingOverlay, children: loadingIndicator ?? /* @__PURE__ */ jsx14(ActivityIndicator, { size: "small", color: "#2563eb" }) }),
|
|
29167
|
+
error && /* @__PURE__ */ jsx14(View13, { pointerEvents: "none", style: styles13.errorOverlay, children: /* @__PURE__ */ jsx14(Text8, { style: styles13.errorText, children: "Preview unavailable" }) })
|
|
29127
29168
|
] });
|
|
29128
29169
|
};
|
|
29129
|
-
var
|
|
29170
|
+
var styles13 = StyleSheet13.create({
|
|
29130
29171
|
container: {
|
|
29131
29172
|
backgroundColor: "#f8fafc",
|
|
29132
29173
|
borderRadius: 12,
|
|
@@ -29142,13 +29183,13 @@ var styles12 = StyleSheet12.create({
|
|
|
29142
29183
|
backgroundColor: "transparent"
|
|
29143
29184
|
},
|
|
29144
29185
|
loadingOverlay: {
|
|
29145
|
-
...
|
|
29186
|
+
...StyleSheet13.absoluteFillObject,
|
|
29146
29187
|
alignItems: "center",
|
|
29147
29188
|
justifyContent: "center",
|
|
29148
29189
|
backgroundColor: "rgba(15, 23, 42, 0.15)"
|
|
29149
29190
|
},
|
|
29150
29191
|
errorOverlay: {
|
|
29151
|
-
...
|
|
29192
|
+
...StyleSheet13.absoluteFillObject,
|
|
29152
29193
|
alignItems: "center",
|
|
29153
29194
|
justifyContent: "center",
|
|
29154
29195
|
backgroundColor: "rgba(15, 23, 42, 0.4)"
|
|
@@ -29173,43 +29214,43 @@ var styles12 = StyleSheet12.create({
|
|
|
29173
29214
|
var CoverPreview_default = CoverPreview;
|
|
29174
29215
|
|
|
29175
29216
|
// components/ReadingShell.tsx
|
|
29176
|
-
import
|
|
29177
|
-
import { Keyboard as Keyboard2, View as
|
|
29217
|
+
import React13, { useState as useState11 } from "react";
|
|
29218
|
+
import { Keyboard as Keyboard2, View as View20, StyleSheet as StyleSheet20 } from "react-native";
|
|
29178
29219
|
import { useViewerStore as useViewerStore17 } from "@papyrus-sdk/core";
|
|
29179
29220
|
|
|
29180
29221
|
// components/DocumentActionsSheet.tsx
|
|
29181
29222
|
import {
|
|
29182
|
-
Modal as
|
|
29183
|
-
Pressable as
|
|
29184
|
-
StyleSheet as
|
|
29185
|
-
Text as
|
|
29186
|
-
View as
|
|
29223
|
+
Modal as Modal4,
|
|
29224
|
+
Pressable as Pressable11,
|
|
29225
|
+
StyleSheet as StyleSheet14,
|
|
29226
|
+
Text as Text9,
|
|
29227
|
+
View as View14
|
|
29187
29228
|
} from "react-native";
|
|
29188
29229
|
import { useViewerStore as useViewerStore11 } from "@papyrus-sdk/core";
|
|
29189
|
-
import { jsx as
|
|
29230
|
+
import { jsx as jsx15, jsxs as jsxs15 } from "react/jsx-runtime";
|
|
29190
29231
|
function DocumentActionsSheet({
|
|
29191
29232
|
visible,
|
|
29192
29233
|
onClose
|
|
29193
29234
|
}) {
|
|
29194
29235
|
const { uiTheme } = useViewerStore11();
|
|
29195
29236
|
const isDark = uiTheme === "dark";
|
|
29196
|
-
return /* @__PURE__ */
|
|
29197
|
-
|
|
29237
|
+
return /* @__PURE__ */ jsx15(Modal4, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ jsx15(Pressable11, { style: styles14.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs15(
|
|
29238
|
+
Pressable11,
|
|
29198
29239
|
{
|
|
29199
29240
|
onPress: (event) => event.stopPropagation(),
|
|
29200
|
-
style: [
|
|
29241
|
+
style: [styles14.card, isDark && styles14.cardDark],
|
|
29201
29242
|
children: [
|
|
29202
|
-
/* @__PURE__ */
|
|
29203
|
-
/* @__PURE__ */
|
|
29204
|
-
/* @__PURE__ */
|
|
29205
|
-
/* @__PURE__ */
|
|
29243
|
+
/* @__PURE__ */ jsx15(Text9, { style: [styles14.eyebrow, isDark && styles14.eyebrowDark], children: "Document actions" }),
|
|
29244
|
+
/* @__PURE__ */ jsxs15(View14, { style: styles14.actionList, children: [
|
|
29245
|
+
/* @__PURE__ */ jsx15(View14, { style: [styles14.actionItem, isDark && styles14.actionItemDark], children: /* @__PURE__ */ jsx15(Text9, { style: [styles14.actionText, isDark && styles14.actionTextDark], children: "Share" }) }),
|
|
29246
|
+
/* @__PURE__ */ jsx15(View14, { style: [styles14.actionItem, isDark && styles14.actionItemDark], children: /* @__PURE__ */ jsx15(Text9, { style: [styles14.actionText, isDark && styles14.actionTextDark], children: "Export" }) })
|
|
29206
29247
|
] }),
|
|
29207
|
-
/* @__PURE__ */
|
|
29248
|
+
/* @__PURE__ */ jsx15(Pressable11, { onPress: onClose, style: styles14.closeButton, accessibilityLabel: "Close actions sheet", children: /* @__PURE__ */ jsx15(Text9, { style: styles14.closeText, children: "Close" }) })
|
|
29208
29249
|
]
|
|
29209
29250
|
}
|
|
29210
29251
|
) }) });
|
|
29211
29252
|
}
|
|
29212
|
-
var
|
|
29253
|
+
var styles14 = StyleSheet14.create({
|
|
29213
29254
|
backdrop: {
|
|
29214
29255
|
flex: 1,
|
|
29215
29256
|
backgroundColor: "rgba(15, 23, 42, 0.35)",
|
|
@@ -29271,12 +29312,12 @@ var styles13 = StyleSheet13.create({
|
|
|
29271
29312
|
|
|
29272
29313
|
// components/InfoSheet.tsx
|
|
29273
29314
|
import {
|
|
29274
|
-
Modal as
|
|
29275
|
-
Pressable as
|
|
29276
|
-
ScrollView as
|
|
29277
|
-
StyleSheet as
|
|
29278
|
-
Text as
|
|
29279
|
-
View as
|
|
29315
|
+
Modal as Modal5,
|
|
29316
|
+
Pressable as Pressable12,
|
|
29317
|
+
ScrollView as ScrollView4,
|
|
29318
|
+
StyleSheet as StyleSheet15,
|
|
29319
|
+
Text as Text10,
|
|
29320
|
+
View as View15
|
|
29280
29321
|
} from "react-native";
|
|
29281
29322
|
import { useViewerStore as useViewerStore12 } from "@papyrus-sdk/core";
|
|
29282
29323
|
|
|
@@ -29377,7 +29418,7 @@ var buildInfoRows = ({
|
|
|
29377
29418
|
};
|
|
29378
29419
|
|
|
29379
29420
|
// components/InfoSheet.tsx
|
|
29380
|
-
import { jsx as
|
|
29421
|
+
import { jsx as jsx16, jsxs as jsxs16 } from "react/jsx-runtime";
|
|
29381
29422
|
function InfoSheet({
|
|
29382
29423
|
visible,
|
|
29383
29424
|
title,
|
|
@@ -29407,66 +29448,66 @@ function InfoSheet({
|
|
|
29407
29448
|
pageTheme,
|
|
29408
29449
|
locale
|
|
29409
29450
|
});
|
|
29410
|
-
return /* @__PURE__ */
|
|
29411
|
-
|
|
29451
|
+
return /* @__PURE__ */ jsx16(
|
|
29452
|
+
Modal5,
|
|
29412
29453
|
{
|
|
29413
29454
|
visible,
|
|
29414
29455
|
transparent: true,
|
|
29415
29456
|
animationType: "fade",
|
|
29416
29457
|
onRequestClose: onClose,
|
|
29417
|
-
children: /* @__PURE__ */
|
|
29418
|
-
|
|
29458
|
+
children: /* @__PURE__ */ jsx16(Pressable12, { style: styles15.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs16(
|
|
29459
|
+
Pressable12,
|
|
29419
29460
|
{
|
|
29420
29461
|
onPress: (event) => event.stopPropagation(),
|
|
29421
|
-
style: [
|
|
29462
|
+
style: [styles15.card, isDark && styles15.cardDark],
|
|
29422
29463
|
children: [
|
|
29423
|
-
/* @__PURE__ */
|
|
29424
|
-
/* @__PURE__ */
|
|
29425
|
-
|
|
29464
|
+
/* @__PURE__ */ jsxs16(View15, { style: styles15.topRow, children: [
|
|
29465
|
+
/* @__PURE__ */ jsx16(
|
|
29466
|
+
Pressable12,
|
|
29426
29467
|
{
|
|
29427
29468
|
onPress: onClose,
|
|
29428
29469
|
style: [
|
|
29429
|
-
|
|
29430
|
-
isDark &&
|
|
29470
|
+
styles15.iconCloseButton,
|
|
29471
|
+
isDark && styles15.iconCloseButtonDark
|
|
29431
29472
|
],
|
|
29432
29473
|
accessibilityLabel: "Close info sheet",
|
|
29433
|
-
children: /* @__PURE__ */
|
|
29474
|
+
children: /* @__PURE__ */ jsx16(IconClose, { size: 18, color: isDark ? "#f8fafc" : "#111827" })
|
|
29434
29475
|
}
|
|
29435
29476
|
),
|
|
29436
|
-
/* @__PURE__ */
|
|
29437
|
-
|
|
29477
|
+
/* @__PURE__ */ jsx16(
|
|
29478
|
+
Text10,
|
|
29438
29479
|
{
|
|
29439
|
-
style: [
|
|
29480
|
+
style: [styles15.headerTitle, isDark && styles15.headerTitleDark],
|
|
29440
29481
|
numberOfLines: 1,
|
|
29441
29482
|
children: locale === "pt-BR" ? "Informa\xE7\xF5es" : "Information"
|
|
29442
29483
|
}
|
|
29443
29484
|
),
|
|
29444
|
-
/* @__PURE__ */
|
|
29485
|
+
/* @__PURE__ */ jsx16(View15, { style: styles15.topRowSpacer })
|
|
29445
29486
|
] }),
|
|
29446
|
-
/* @__PURE__ */
|
|
29447
|
-
|
|
29487
|
+
/* @__PURE__ */ jsxs16(
|
|
29488
|
+
ScrollView4,
|
|
29448
29489
|
{
|
|
29449
|
-
style:
|
|
29450
|
-
contentContainerStyle:
|
|
29490
|
+
style: styles15.content,
|
|
29491
|
+
contentContainerStyle: styles15.contentInner,
|
|
29451
29492
|
showsVerticalScrollIndicator: false,
|
|
29452
29493
|
children: [
|
|
29453
|
-
/* @__PURE__ */
|
|
29454
|
-
|
|
29494
|
+
/* @__PURE__ */ jsx16(
|
|
29495
|
+
Text10,
|
|
29455
29496
|
{
|
|
29456
|
-
style: [
|
|
29497
|
+
style: [styles15.sectionTitle, isDark && styles15.sectionTitleDark],
|
|
29457
29498
|
children: locale === "pt-BR" ? "Informa\xE7\xF5es" : "Information"
|
|
29458
29499
|
}
|
|
29459
29500
|
),
|
|
29460
|
-
/* @__PURE__ */
|
|
29461
|
-
|
|
29501
|
+
/* @__PURE__ */ jsx16(View15, { style: styles15.rows, children: rows.map((row) => /* @__PURE__ */ jsxs16(
|
|
29502
|
+
View15,
|
|
29462
29503
|
{
|
|
29463
|
-
style: [
|
|
29504
|
+
style: [styles15.row, isDark && styles15.rowDark],
|
|
29464
29505
|
children: [
|
|
29465
|
-
/* @__PURE__ */
|
|
29466
|
-
/* @__PURE__ */
|
|
29467
|
-
|
|
29506
|
+
/* @__PURE__ */ jsx16(Text10, { style: [styles15.label, isDark && styles15.labelDark], children: row.label }),
|
|
29507
|
+
/* @__PURE__ */ jsx16(
|
|
29508
|
+
Text10,
|
|
29468
29509
|
{
|
|
29469
|
-
style: [
|
|
29510
|
+
style: [styles15.value, isDark && styles15.valueDark],
|
|
29470
29511
|
selectable: true,
|
|
29471
29512
|
children: row.value
|
|
29472
29513
|
}
|
|
@@ -29484,7 +29525,7 @@ function InfoSheet({
|
|
|
29484
29525
|
}
|
|
29485
29526
|
);
|
|
29486
29527
|
}
|
|
29487
|
-
var
|
|
29528
|
+
var styles15 = StyleSheet15.create({
|
|
29488
29529
|
backdrop: {
|
|
29489
29530
|
flex: 1,
|
|
29490
29531
|
backgroundColor: "rgba(0, 0, 0, 0.4)",
|
|
@@ -29587,9 +29628,9 @@ var styles14 = StyleSheet14.create({
|
|
|
29587
29628
|
});
|
|
29588
29629
|
|
|
29589
29630
|
// components/OverflowSheet.tsx
|
|
29590
|
-
import { Modal as
|
|
29631
|
+
import { Modal as Modal6, Pressable as Pressable13, StyleSheet as StyleSheet16, Text as Text11, View as View16 } from "react-native";
|
|
29591
29632
|
import { useViewerStore as useViewerStore13 } from "@papyrus-sdk/core";
|
|
29592
|
-
import { jsx as
|
|
29633
|
+
import { jsx as jsx17, jsxs as jsxs17 } from "react/jsx-runtime";
|
|
29593
29634
|
var actionLabels = [{ key: "actions", label: "Document actions" }];
|
|
29594
29635
|
function OverflowSheet({
|
|
29595
29636
|
visible,
|
|
@@ -29601,30 +29642,30 @@ function OverflowSheet({
|
|
|
29601
29642
|
const handlers = {
|
|
29602
29643
|
actions: onOpenActions
|
|
29603
29644
|
};
|
|
29604
|
-
return /* @__PURE__ */
|
|
29605
|
-
|
|
29645
|
+
return /* @__PURE__ */ jsx17(
|
|
29646
|
+
Modal6,
|
|
29606
29647
|
{
|
|
29607
29648
|
visible,
|
|
29608
29649
|
transparent: true,
|
|
29609
29650
|
animationType: "fade",
|
|
29610
29651
|
onRequestClose: onClose,
|
|
29611
|
-
children: /* @__PURE__ */
|
|
29612
|
-
|
|
29652
|
+
children: /* @__PURE__ */ jsx17(Pressable13, { style: styles16.backdrop, onPress: onClose, children: /* @__PURE__ */ jsxs17(
|
|
29653
|
+
Pressable13,
|
|
29613
29654
|
{
|
|
29614
29655
|
onPress: (event) => event.stopPropagation(),
|
|
29615
|
-
style: [
|
|
29656
|
+
style: [styles16.card, isDark && styles16.cardDark],
|
|
29616
29657
|
children: [
|
|
29617
|
-
/* @__PURE__ */
|
|
29618
|
-
actionLabels.map((action) => /* @__PURE__ */
|
|
29619
|
-
|
|
29658
|
+
/* @__PURE__ */ jsx17(View16, { style: styles16.handle }),
|
|
29659
|
+
actionLabels.map((action) => /* @__PURE__ */ jsx17(
|
|
29660
|
+
Pressable13,
|
|
29620
29661
|
{
|
|
29621
29662
|
onPress: handlers[action.key],
|
|
29622
|
-
style: [
|
|
29663
|
+
style: [styles16.actionButton, { borderColor: accentColor }],
|
|
29623
29664
|
accessibilityLabel: action.label,
|
|
29624
|
-
children: /* @__PURE__ */
|
|
29625
|
-
|
|
29665
|
+
children: /* @__PURE__ */ jsx17(
|
|
29666
|
+
Text11,
|
|
29626
29667
|
{
|
|
29627
|
-
style: [
|
|
29668
|
+
style: [styles16.actionText, isDark && styles16.actionTextDark],
|
|
29628
29669
|
children: action.label
|
|
29629
29670
|
}
|
|
29630
29671
|
)
|
|
@@ -29637,7 +29678,7 @@ function OverflowSheet({
|
|
|
29637
29678
|
}
|
|
29638
29679
|
);
|
|
29639
29680
|
}
|
|
29640
|
-
var
|
|
29681
|
+
var styles16 = StyleSheet16.create({
|
|
29641
29682
|
backdrop: {
|
|
29642
29683
|
flex: 1,
|
|
29643
29684
|
backgroundColor: "rgba(15, 23, 42, 0.35)",
|
|
@@ -29678,10 +29719,10 @@ var styles15 = StyleSheet15.create({
|
|
|
29678
29719
|
});
|
|
29679
29720
|
|
|
29680
29721
|
// components/ProgressPill.tsx
|
|
29681
|
-
import { useMemo as
|
|
29682
|
-
import { Pressable as
|
|
29722
|
+
import { useMemo as useMemo7 } from "react";
|
|
29723
|
+
import { Pressable as Pressable14, StyleSheet as StyleSheet17, Text as Text12, View as View17 } from "react-native";
|
|
29683
29724
|
import { useViewerStore as useViewerStore14 } from "@papyrus-sdk/core";
|
|
29684
|
-
import { jsx as
|
|
29725
|
+
import { jsx as jsx18, jsxs as jsxs18 } from "react/jsx-runtime";
|
|
29685
29726
|
var clampPercent = (value) => Math.max(0, Math.min(100, Math.round(value)));
|
|
29686
29727
|
function ProgressPill({
|
|
29687
29728
|
documentType,
|
|
@@ -29697,7 +29738,7 @@ function ProgressPill({
|
|
|
29697
29738
|
mobileProgressPillVisible
|
|
29698
29739
|
} = useViewerStore14();
|
|
29699
29740
|
const isDark = uiTheme === "dark";
|
|
29700
|
-
const label =
|
|
29741
|
+
const label = useMemo7(() => {
|
|
29701
29742
|
const total = Math.max(pageCount, 1);
|
|
29702
29743
|
const percent = clampPercent(currentPage / total * 100);
|
|
29703
29744
|
if (documentType === "pdf") {
|
|
@@ -29709,24 +29750,24 @@ function ProgressPill({
|
|
|
29709
29750
|
return `${percent}%`;
|
|
29710
29751
|
}, [currentPage, documentType, pageCount]);
|
|
29711
29752
|
if (!mobileChromeVisible || !mobileProgressPillVisible) return null;
|
|
29712
|
-
return /* @__PURE__ */
|
|
29713
|
-
|
|
29753
|
+
return /* @__PURE__ */ jsx18(View17, { pointerEvents: "box-none", style: styles17.frame, children: /* @__PURE__ */ jsxs18(
|
|
29754
|
+
View17,
|
|
29714
29755
|
{
|
|
29715
29756
|
accessibilityLabel: "Open document navigation",
|
|
29716
29757
|
style: [
|
|
29717
|
-
|
|
29718
|
-
isDark &&
|
|
29758
|
+
styles17.pill,
|
|
29759
|
+
isDark && styles17.pillDark,
|
|
29719
29760
|
{ borderColor: `${accentColor}33` }
|
|
29720
29761
|
],
|
|
29721
29762
|
testID: "papyrus-progress-pill",
|
|
29722
29763
|
children: [
|
|
29723
|
-
/* @__PURE__ */
|
|
29724
|
-
|
|
29764
|
+
/* @__PURE__ */ jsx18(
|
|
29765
|
+
Pressable14,
|
|
29725
29766
|
{
|
|
29726
29767
|
onPress,
|
|
29727
|
-
style:
|
|
29768
|
+
style: styles17.iconHit,
|
|
29728
29769
|
accessibilityLabel: "Open document navigation",
|
|
29729
|
-
children: /* @__PURE__ */
|
|
29770
|
+
children: /* @__PURE__ */ jsx18(
|
|
29730
29771
|
IconPageNav,
|
|
29731
29772
|
{
|
|
29732
29773
|
size: 20,
|
|
@@ -29736,21 +29777,21 @@ function ProgressPill({
|
|
|
29736
29777
|
)
|
|
29737
29778
|
}
|
|
29738
29779
|
),
|
|
29739
|
-
/* @__PURE__ */
|
|
29740
|
-
|
|
29780
|
+
/* @__PURE__ */ jsx18(
|
|
29781
|
+
Pressable14,
|
|
29741
29782
|
{
|
|
29742
29783
|
onPress,
|
|
29743
29784
|
onLongPress: onOpenPageJump,
|
|
29744
|
-
style:
|
|
29785
|
+
style: styles17.labelHit,
|
|
29745
29786
|
accessibilityLabel: "Open page jump",
|
|
29746
|
-
children: /* @__PURE__ */
|
|
29787
|
+
children: /* @__PURE__ */ jsx18(Text12, { style: [styles17.label, isDark && styles17.labelDark], children: label })
|
|
29747
29788
|
}
|
|
29748
29789
|
)
|
|
29749
29790
|
]
|
|
29750
29791
|
}
|
|
29751
29792
|
) });
|
|
29752
29793
|
}
|
|
29753
|
-
var
|
|
29794
|
+
var styles17 = StyleSheet17.create({
|
|
29754
29795
|
frame: {
|
|
29755
29796
|
position: "absolute",
|
|
29756
29797
|
top: 72,
|
|
@@ -29798,17 +29839,17 @@ var styles16 = StyleSheet16.create({
|
|
|
29798
29839
|
});
|
|
29799
29840
|
|
|
29800
29841
|
// components/SearchOverlay.tsx
|
|
29801
|
-
import { useEffect as useEffect10, useMemo as
|
|
29842
|
+
import { useEffect as useEffect10, useMemo as useMemo8, useState as useState10 } from "react";
|
|
29802
29843
|
import {
|
|
29803
29844
|
Keyboard,
|
|
29804
|
-
Pressable as
|
|
29805
|
-
StyleSheet as
|
|
29806
|
-
Text as
|
|
29845
|
+
Pressable as Pressable15,
|
|
29846
|
+
StyleSheet as StyleSheet18,
|
|
29847
|
+
Text as Text13,
|
|
29807
29848
|
TextInput as TextInput3,
|
|
29808
|
-
View as
|
|
29849
|
+
View as View18
|
|
29809
29850
|
} from "react-native";
|
|
29810
29851
|
import { SearchService, useViewerStore as useViewerStore15 } from "@papyrus-sdk/core";
|
|
29811
|
-
import { jsx as
|
|
29852
|
+
import { jsx as jsx19, jsxs as jsxs19 } from "react/jsx-runtime";
|
|
29812
29853
|
function SearchOverlay({
|
|
29813
29854
|
engine,
|
|
29814
29855
|
documentType,
|
|
@@ -29831,7 +29872,7 @@ function SearchOverlay({
|
|
|
29831
29872
|
const [isSearching, setIsSearching] = useState10(false);
|
|
29832
29873
|
const isDark = uiTheme === "dark";
|
|
29833
29874
|
const t = getStrings(locale);
|
|
29834
|
-
const searchService =
|
|
29875
|
+
const searchService = useMemo8(() => new SearchService(engine), [engine]);
|
|
29835
29876
|
const currentCount = searchResults.length > 0 && activeSearchIndex >= 0 ? activeSearchIndex + 1 : 0;
|
|
29836
29877
|
const targetLabel = documentType === "pdf" ? t.page : documentType === "epub" ? t.contents : t.progress;
|
|
29837
29878
|
useEffect10(() => {
|
|
@@ -29858,23 +29899,23 @@ function SearchOverlay({
|
|
|
29858
29899
|
onClose();
|
|
29859
29900
|
};
|
|
29860
29901
|
if (!visible) return null;
|
|
29861
|
-
return /* @__PURE__ */
|
|
29862
|
-
|
|
29902
|
+
return /* @__PURE__ */ jsx19(View18, { pointerEvents: "box-none", style: styles18.frame, children: /* @__PURE__ */ jsxs19(
|
|
29903
|
+
View18,
|
|
29863
29904
|
{
|
|
29864
|
-
style: [
|
|
29905
|
+
style: [styles18.card, isDark && styles18.cardDark],
|
|
29865
29906
|
testID: "papyrus-search-overlay",
|
|
29866
29907
|
children: [
|
|
29867
|
-
/* @__PURE__ */
|
|
29868
|
-
/* @__PURE__ */
|
|
29869
|
-
/* @__PURE__ */
|
|
29870
|
-
/* @__PURE__ */
|
|
29908
|
+
/* @__PURE__ */ jsxs19(View18, { style: styles18.inputRow, children: [
|
|
29909
|
+
/* @__PURE__ */ jsxs19(View18, { style: [styles18.searchInputWrap, isDark && styles18.searchInputWrapDark], children: [
|
|
29910
|
+
/* @__PURE__ */ jsx19(IconSearch, { size: 16, color: isDark ? "#cbd5e1" : "#64748b" }),
|
|
29911
|
+
/* @__PURE__ */ jsx19(
|
|
29871
29912
|
TextInput3,
|
|
29872
29913
|
{
|
|
29873
29914
|
value: draft,
|
|
29874
29915
|
onChangeText: setDraft,
|
|
29875
29916
|
placeholder: t.searchPlaceholder,
|
|
29876
29917
|
placeholderTextColor: isDark ? "#94a3b8" : "#6b7280",
|
|
29877
|
-
style: [
|
|
29918
|
+
style: [styles18.input, isDark && styles18.inputDark],
|
|
29878
29919
|
autoFocus: true,
|
|
29879
29920
|
returnKeyType: "search",
|
|
29880
29921
|
onSubmitEditing: handleSubmit,
|
|
@@ -29882,74 +29923,74 @@ function SearchOverlay({
|
|
|
29882
29923
|
}
|
|
29883
29924
|
)
|
|
29884
29925
|
] }),
|
|
29885
|
-
/* @__PURE__ */
|
|
29886
|
-
|
|
29926
|
+
/* @__PURE__ */ jsx19(
|
|
29927
|
+
Pressable15,
|
|
29887
29928
|
{
|
|
29888
29929
|
onPress: handleClose,
|
|
29889
|
-
style: [
|
|
29930
|
+
style: [styles18.closeButton, isDark && styles18.closeButtonDark],
|
|
29890
29931
|
accessibilityLabel: "Close search",
|
|
29891
|
-
children: /* @__PURE__ */
|
|
29932
|
+
children: /* @__PURE__ */ jsx19(Text13, { style: [styles18.closeText, isDark && styles18.closeTextDark], children: t.cancel })
|
|
29892
29933
|
}
|
|
29893
29934
|
)
|
|
29894
29935
|
] }),
|
|
29895
|
-
/* @__PURE__ */
|
|
29896
|
-
/* @__PURE__ */
|
|
29897
|
-
|
|
29936
|
+
/* @__PURE__ */ jsxs19(View18, { style: styles18.metaRow, children: [
|
|
29937
|
+
/* @__PURE__ */ jsx19(
|
|
29938
|
+
Pressable15,
|
|
29898
29939
|
{
|
|
29899
29940
|
onPress: prevSearchResult,
|
|
29900
29941
|
disabled: searchResults.length === 0,
|
|
29901
29942
|
style: [
|
|
29902
|
-
|
|
29903
|
-
isDark &&
|
|
29904
|
-
searchResults.length === 0 &&
|
|
29943
|
+
styles18.navButton,
|
|
29944
|
+
isDark && styles18.navButtonDark,
|
|
29945
|
+
searchResults.length === 0 && styles18.navButtonDisabled
|
|
29905
29946
|
],
|
|
29906
29947
|
accessibilityLabel: "Previous result",
|
|
29907
|
-
children: /* @__PURE__ */
|
|
29948
|
+
children: /* @__PURE__ */ jsx19(IconChevronLeft, { size: 16, color: isDark ? "#e5e7eb" : "#111827" })
|
|
29908
29949
|
}
|
|
29909
29950
|
),
|
|
29910
|
-
/* @__PURE__ */
|
|
29911
|
-
/* @__PURE__ */
|
|
29912
|
-
|
|
29951
|
+
/* @__PURE__ */ jsx19(Text13, { style: [styles18.metaText, isDark && styles18.metaTextDark], children: isSearching ? t.searching : `${currentCount}/${searchResults.length} ${targetLabel}` }),
|
|
29952
|
+
/* @__PURE__ */ jsx19(
|
|
29953
|
+
Pressable15,
|
|
29913
29954
|
{
|
|
29914
29955
|
onPress: nextSearchResult,
|
|
29915
29956
|
disabled: searchResults.length === 0,
|
|
29916
29957
|
style: [
|
|
29917
|
-
|
|
29918
|
-
isDark &&
|
|
29919
|
-
searchResults.length === 0 &&
|
|
29958
|
+
styles18.navButton,
|
|
29959
|
+
isDark && styles18.navButtonDark,
|
|
29960
|
+
searchResults.length === 0 && styles18.navButtonDisabled
|
|
29920
29961
|
],
|
|
29921
29962
|
accessibilityLabel: "Next result",
|
|
29922
|
-
children: /* @__PURE__ */
|
|
29963
|
+
children: /* @__PURE__ */ jsx19(IconChevronRight, { size: 16, color: isDark ? "#e5e7eb" : "#111827" })
|
|
29923
29964
|
}
|
|
29924
29965
|
)
|
|
29925
29966
|
] }),
|
|
29926
|
-
/* @__PURE__ */
|
|
29927
|
-
/* @__PURE__ */
|
|
29928
|
-
|
|
29967
|
+
/* @__PURE__ */ jsxs19(View18, { style: styles18.actionsRow, children: [
|
|
29968
|
+
/* @__PURE__ */ jsx19(
|
|
29969
|
+
Pressable15,
|
|
29929
29970
|
{
|
|
29930
29971
|
onPress: handleSubmit,
|
|
29931
|
-
style: [
|
|
29972
|
+
style: [styles18.primaryAction, { backgroundColor: accentColor }],
|
|
29932
29973
|
accessibilityLabel: "Run search",
|
|
29933
|
-
children: /* @__PURE__ */
|
|
29974
|
+
children: /* @__PURE__ */ jsx19(Text13, { style: styles18.primaryActionText, children: t.searchGo })
|
|
29934
29975
|
}
|
|
29935
29976
|
),
|
|
29936
|
-
/* @__PURE__ */
|
|
29937
|
-
|
|
29977
|
+
/* @__PURE__ */ jsx19(
|
|
29978
|
+
Pressable15,
|
|
29938
29979
|
{
|
|
29939
29980
|
onPress: onOpenResults,
|
|
29940
29981
|
disabled: searchResults.length === 0,
|
|
29941
29982
|
style: [
|
|
29942
|
-
|
|
29943
|
-
isDark &&
|
|
29944
|
-
searchResults.length === 0 &&
|
|
29983
|
+
styles18.secondaryAction,
|
|
29984
|
+
isDark && styles18.secondaryActionDark,
|
|
29985
|
+
searchResults.length === 0 && styles18.navButtonDisabled
|
|
29945
29986
|
],
|
|
29946
29987
|
accessibilityLabel: "Open all results",
|
|
29947
|
-
children: /* @__PURE__ */
|
|
29948
|
-
|
|
29988
|
+
children: /* @__PURE__ */ jsx19(
|
|
29989
|
+
Text13,
|
|
29949
29990
|
{
|
|
29950
29991
|
style: [
|
|
29951
|
-
|
|
29952
|
-
isDark &&
|
|
29992
|
+
styles18.secondaryActionText,
|
|
29993
|
+
isDark && styles18.secondaryActionTextDark
|
|
29953
29994
|
],
|
|
29954
29995
|
children: t.allResults
|
|
29955
29996
|
}
|
|
@@ -29961,7 +30002,7 @@ function SearchOverlay({
|
|
|
29961
30002
|
}
|
|
29962
30003
|
) });
|
|
29963
30004
|
}
|
|
29964
|
-
var
|
|
30005
|
+
var styles18 = StyleSheet18.create({
|
|
29965
30006
|
frame: {
|
|
29966
30007
|
position: "absolute",
|
|
29967
30008
|
left: 0,
|
|
@@ -29975,8 +30016,8 @@ var styles17 = StyleSheet17.create({
|
|
|
29975
30016
|
borderWidth: 1,
|
|
29976
30017
|
borderColor: "rgba(255,255,255,0.72)",
|
|
29977
30018
|
backgroundColor: "rgba(255,255,255,0.94)",
|
|
29978
|
-
padding:
|
|
29979
|
-
gap:
|
|
30019
|
+
padding: 8,
|
|
30020
|
+
gap: 8,
|
|
29980
30021
|
shadowColor: "#0f172a",
|
|
29981
30022
|
shadowOpacity: 0.12,
|
|
29982
30023
|
shadowRadius: 20,
|
|
@@ -29999,7 +30040,7 @@ var styles17 = StyleSheet17.create({
|
|
|
29999
30040
|
borderWidth: 1,
|
|
30000
30041
|
borderColor: "#e2e8f0",
|
|
30001
30042
|
paddingHorizontal: 10,
|
|
30002
|
-
paddingVertical:
|
|
30043
|
+
paddingVertical: 3,
|
|
30003
30044
|
flexDirection: "row",
|
|
30004
30045
|
alignItems: "center",
|
|
30005
30046
|
gap: 8
|
|
@@ -30010,7 +30051,7 @@ var styles17 = StyleSheet17.create({
|
|
|
30010
30051
|
},
|
|
30011
30052
|
input: {
|
|
30012
30053
|
flex: 1,
|
|
30013
|
-
minHeight:
|
|
30054
|
+
minHeight: 28,
|
|
30014
30055
|
fontSize: 13,
|
|
30015
30056
|
color: "#111827"
|
|
30016
30057
|
},
|
|
@@ -30020,7 +30061,7 @@ var styles17 = StyleSheet17.create({
|
|
|
30020
30061
|
closeButton: {
|
|
30021
30062
|
borderRadius: 12,
|
|
30022
30063
|
paddingHorizontal: 10,
|
|
30023
|
-
paddingVertical:
|
|
30064
|
+
paddingVertical: 6,
|
|
30024
30065
|
backgroundColor: "#f1f5f9"
|
|
30025
30066
|
},
|
|
30026
30067
|
closeButtonDark: {
|
|
@@ -30103,15 +30144,15 @@ var styles17 = StyleSheet17.create({
|
|
|
30103
30144
|
|
|
30104
30145
|
// components/SearchResultsSheet.tsx
|
|
30105
30146
|
import {
|
|
30106
|
-
Modal as
|
|
30107
|
-
Pressable as
|
|
30108
|
-
ScrollView as
|
|
30109
|
-
StyleSheet as
|
|
30110
|
-
Text as
|
|
30111
|
-
View as
|
|
30147
|
+
Modal as Modal7,
|
|
30148
|
+
Pressable as Pressable16,
|
|
30149
|
+
ScrollView as ScrollView5,
|
|
30150
|
+
StyleSheet as StyleSheet19,
|
|
30151
|
+
Text as Text14,
|
|
30152
|
+
View as View19
|
|
30112
30153
|
} from "react-native";
|
|
30113
30154
|
import { useViewerStore as useViewerStore16 } from "@papyrus-sdk/core";
|
|
30114
|
-
import { jsx as
|
|
30155
|
+
import { jsx as jsx20, jsxs as jsxs20 } from "react/jsx-runtime";
|
|
30115
30156
|
function SearchResultsSheet({
|
|
30116
30157
|
documentType,
|
|
30117
30158
|
visible,
|
|
@@ -30135,29 +30176,29 @@ function SearchResultsSheet({
|
|
|
30135
30176
|
const percent = pageCount <= 1 ? 100 : Math.round((pageIndex + 1) / pageCount * 100);
|
|
30136
30177
|
return `${t.progress} ${percent}%`;
|
|
30137
30178
|
};
|
|
30138
|
-
return /* @__PURE__ */
|
|
30139
|
-
|
|
30179
|
+
return /* @__PURE__ */ jsx20(
|
|
30180
|
+
Modal7,
|
|
30140
30181
|
{
|
|
30141
30182
|
visible,
|
|
30142
30183
|
transparent: true,
|
|
30143
30184
|
animationType: "slide",
|
|
30144
30185
|
onRequestClose: onClose,
|
|
30145
|
-
children: /* @__PURE__ */
|
|
30146
|
-
/* @__PURE__ */
|
|
30147
|
-
/* @__PURE__ */
|
|
30148
|
-
/* @__PURE__ */
|
|
30149
|
-
/* @__PURE__ */
|
|
30150
|
-
/* @__PURE__ */
|
|
30151
|
-
/* @__PURE__ */
|
|
30186
|
+
children: /* @__PURE__ */ jsxs20(View19, { style: styles19.modalRoot, children: [
|
|
30187
|
+
/* @__PURE__ */ jsx20(Pressable16, { style: styles19.backdrop, onPress: onClose }),
|
|
30188
|
+
/* @__PURE__ */ jsxs20(View19, { style: [styles19.sheet, isDark && styles19.sheetDark], children: [
|
|
30189
|
+
/* @__PURE__ */ jsx20(View19, { style: [styles19.handle, isDark && styles19.handleDark] }),
|
|
30190
|
+
/* @__PURE__ */ jsxs20(View19, { style: styles19.header, children: [
|
|
30191
|
+
/* @__PURE__ */ jsx20(Text14, { style: [styles19.title, isDark && styles19.titleDark], children: t.allResults }),
|
|
30192
|
+
/* @__PURE__ */ jsxs20(Text14, { style: [styles19.meta, isDark && styles19.metaDark], children: [
|
|
30152
30193
|
searchResults.length,
|
|
30153
30194
|
" ",
|
|
30154
30195
|
t.results
|
|
30155
30196
|
] })
|
|
30156
30197
|
] }),
|
|
30157
|
-
/* @__PURE__ */
|
|
30198
|
+
/* @__PURE__ */ jsx20(ScrollView5, { contentContainerStyle: styles19.content, children: searchResults.length === 0 ? /* @__PURE__ */ jsx20(Text14, { style: [styles19.emptyText, isDark && styles19.emptyTextDark], children: t.noResults }) : searchResults.map((result, index) => {
|
|
30158
30199
|
const isActive = index === activeSearchIndex;
|
|
30159
|
-
return /* @__PURE__ */
|
|
30160
|
-
|
|
30200
|
+
return /* @__PURE__ */ jsxs20(
|
|
30201
|
+
Pressable16,
|
|
30161
30202
|
{
|
|
30162
30203
|
onPress: () => {
|
|
30163
30204
|
setDocumentState({
|
|
@@ -30168,21 +30209,21 @@ function SearchResultsSheet({
|
|
|
30168
30209
|
onClose();
|
|
30169
30210
|
},
|
|
30170
30211
|
style: [
|
|
30171
|
-
|
|
30172
|
-
isDark &&
|
|
30212
|
+
styles19.resultCard,
|
|
30213
|
+
isDark && styles19.resultCardDark,
|
|
30173
30214
|
isActive && {
|
|
30174
30215
|
borderColor: accentColor,
|
|
30175
30216
|
backgroundColor: `${accentColor}14`
|
|
30176
30217
|
}
|
|
30177
30218
|
],
|
|
30178
30219
|
children: [
|
|
30179
|
-
/* @__PURE__ */
|
|
30180
|
-
/* @__PURE__ */
|
|
30181
|
-
|
|
30220
|
+
/* @__PURE__ */ jsx20(Text14, { style: [styles19.resultLabel, { color: accentColor }], children: getResultLabel(result.pageIndex) }),
|
|
30221
|
+
/* @__PURE__ */ jsx20(
|
|
30222
|
+
Text14,
|
|
30182
30223
|
{
|
|
30183
30224
|
style: [
|
|
30184
|
-
|
|
30185
|
-
isDark &&
|
|
30225
|
+
styles19.resultText,
|
|
30226
|
+
isDark && styles19.resultTextDark
|
|
30186
30227
|
],
|
|
30187
30228
|
children: result.text
|
|
30188
30229
|
}
|
|
@@ -30197,13 +30238,13 @@ function SearchResultsSheet({
|
|
|
30197
30238
|
}
|
|
30198
30239
|
);
|
|
30199
30240
|
}
|
|
30200
|
-
var
|
|
30241
|
+
var styles19 = StyleSheet19.create({
|
|
30201
30242
|
modalRoot: {
|
|
30202
30243
|
flex: 1,
|
|
30203
30244
|
backgroundColor: "transparent"
|
|
30204
30245
|
},
|
|
30205
30246
|
backdrop: {
|
|
30206
|
-
...
|
|
30247
|
+
...StyleSheet19.absoluteFillObject,
|
|
30207
30248
|
backgroundColor: "rgba(0, 0, 0, 0.4)"
|
|
30208
30249
|
},
|
|
30209
30250
|
sheet: {
|
|
@@ -30298,7 +30339,7 @@ var styles18 = StyleSheet18.create({
|
|
|
30298
30339
|
var isSidebarBoundDestination = (destination) => destination === "pages" || destination === "contents" || destination === "progress" || destination === "notes";
|
|
30299
30340
|
|
|
30300
30341
|
// components/ReadingShell.tsx
|
|
30301
|
-
import { jsx as
|
|
30342
|
+
import { jsx as jsx21, jsxs as jsxs21 } from "react/jsx-runtime";
|
|
30302
30343
|
function ReadingShell({
|
|
30303
30344
|
engine,
|
|
30304
30345
|
title,
|
|
@@ -30326,7 +30367,7 @@ function ReadingShell({
|
|
|
30326
30367
|
const [searchResultsOpen, setSearchResultsOpen] = useState11(false);
|
|
30327
30368
|
const [pageJumpOpen, setPageJumpOpen] = useState11(false);
|
|
30328
30369
|
const isDark = uiTheme === "dark";
|
|
30329
|
-
|
|
30370
|
+
React13.useEffect(() => {
|
|
30330
30371
|
const showSubscription = Keyboard2.addListener("keyboardDidShow", () => {
|
|
30331
30372
|
setMobileKeyboardOpen(true);
|
|
30332
30373
|
});
|
|
@@ -30338,7 +30379,7 @@ function ReadingShell({
|
|
|
30338
30379
|
hideSubscription.remove();
|
|
30339
30380
|
};
|
|
30340
30381
|
}, [setMobileKeyboardOpen]);
|
|
30341
|
-
|
|
30382
|
+
React13.useEffect(() => {
|
|
30342
30383
|
if (sidebarRightOpen) return;
|
|
30343
30384
|
if (isSidebarBoundDestination(activeMobileDestination)) {
|
|
30344
30385
|
closeMobileDestination();
|
|
@@ -30384,8 +30425,8 @@ function ReadingShell({
|
|
|
30384
30425
|
setDocumentState({ currentPage: page });
|
|
30385
30426
|
triggerScrollToPage(page - 1);
|
|
30386
30427
|
};
|
|
30387
|
-
return /* @__PURE__ */
|
|
30388
|
-
/* @__PURE__ */
|
|
30428
|
+
return /* @__PURE__ */ jsxs21(View20, { style: styles20.container, testID: "papyrus-rn-reading-shell", children: [
|
|
30429
|
+
/* @__PURE__ */ jsx21(
|
|
30389
30430
|
Topbar_default,
|
|
30390
30431
|
{
|
|
30391
30432
|
engine,
|
|
@@ -30401,8 +30442,8 @@ function ReadingShell({
|
|
|
30401
30442
|
showPageNavigationControls: false
|
|
30402
30443
|
}
|
|
30403
30444
|
),
|
|
30404
|
-
/* @__PURE__ */
|
|
30405
|
-
/* @__PURE__ */
|
|
30445
|
+
/* @__PURE__ */ jsx21(View20, { style: styles20.viewerStage, children: /* @__PURE__ */ jsx21(Viewer_default, { engine, ...viewerProps }) }),
|
|
30446
|
+
/* @__PURE__ */ jsx21(
|
|
30406
30447
|
ProgressPill,
|
|
30407
30448
|
{
|
|
30408
30449
|
documentType,
|
|
@@ -30412,7 +30453,7 @@ function ReadingShell({
|
|
|
30412
30453
|
onOpenPageJump: () => setPageJumpOpen(true)
|
|
30413
30454
|
}
|
|
30414
30455
|
),
|
|
30415
|
-
/* @__PURE__ */
|
|
30456
|
+
/* @__PURE__ */ jsx21(
|
|
30416
30457
|
BottomBar_default,
|
|
30417
30458
|
{
|
|
30418
30459
|
documentType,
|
|
@@ -30421,7 +30462,7 @@ function ReadingShell({
|
|
|
30421
30462
|
onOpenSettings: () => openDestination("display")
|
|
30422
30463
|
}
|
|
30423
30464
|
),
|
|
30424
|
-
/* @__PURE__ */
|
|
30465
|
+
/* @__PURE__ */ jsx21(
|
|
30425
30466
|
SearchOverlay,
|
|
30426
30467
|
{
|
|
30427
30468
|
engine,
|
|
@@ -30434,7 +30475,7 @@ function ReadingShell({
|
|
|
30434
30475
|
onOpenResults: () => setSearchResultsOpen(true)
|
|
30435
30476
|
}
|
|
30436
30477
|
),
|
|
30437
|
-
/* @__PURE__ */
|
|
30478
|
+
/* @__PURE__ */ jsx21(
|
|
30438
30479
|
SearchResultsSheet,
|
|
30439
30480
|
{
|
|
30440
30481
|
documentType,
|
|
@@ -30442,7 +30483,7 @@ function ReadingShell({
|
|
|
30442
30483
|
onClose: () => setSearchResultsOpen(false)
|
|
30443
30484
|
}
|
|
30444
30485
|
),
|
|
30445
|
-
/* @__PURE__ */
|
|
30486
|
+
/* @__PURE__ */ jsx21(
|
|
30446
30487
|
RightSheet_default,
|
|
30447
30488
|
{
|
|
30448
30489
|
engine,
|
|
@@ -30451,7 +30492,7 @@ function ReadingShell({
|
|
|
30451
30492
|
onOpenPageJump: () => setPageJumpOpen(true)
|
|
30452
30493
|
}
|
|
30453
30494
|
),
|
|
30454
|
-
/* @__PURE__ */
|
|
30495
|
+
/* @__PURE__ */ jsx21(
|
|
30455
30496
|
OverflowSheet,
|
|
30456
30497
|
{
|
|
30457
30498
|
visible: overflowOpen,
|
|
@@ -30465,7 +30506,7 @@ function ReadingShell({
|
|
|
30465
30506
|
}
|
|
30466
30507
|
}
|
|
30467
30508
|
),
|
|
30468
|
-
/* @__PURE__ */
|
|
30509
|
+
/* @__PURE__ */ jsx21(
|
|
30469
30510
|
InfoSheet,
|
|
30470
30511
|
{
|
|
30471
30512
|
visible: infoOpen,
|
|
@@ -30477,7 +30518,7 @@ function ReadingShell({
|
|
|
30477
30518
|
}
|
|
30478
30519
|
}
|
|
30479
30520
|
),
|
|
30480
|
-
/* @__PURE__ */
|
|
30521
|
+
/* @__PURE__ */ jsx21(
|
|
30481
30522
|
DocumentActionsSheet,
|
|
30482
30523
|
{
|
|
30483
30524
|
visible: actionsOpen,
|
|
@@ -30487,7 +30528,7 @@ function ReadingShell({
|
|
|
30487
30528
|
}
|
|
30488
30529
|
}
|
|
30489
30530
|
),
|
|
30490
|
-
/* @__PURE__ */
|
|
30531
|
+
/* @__PURE__ */ jsx21(
|
|
30491
30532
|
SettingsSheet_default,
|
|
30492
30533
|
{
|
|
30493
30534
|
engine,
|
|
@@ -30498,7 +30539,7 @@ function ReadingShell({
|
|
|
30498
30539
|
}
|
|
30499
30540
|
}
|
|
30500
30541
|
),
|
|
30501
|
-
/* @__PURE__ */
|
|
30542
|
+
/* @__PURE__ */ jsx21(
|
|
30502
30543
|
PageJumpModal,
|
|
30503
30544
|
{
|
|
30504
30545
|
visible: pageJumpOpen,
|
|
@@ -30512,7 +30553,7 @@ function ReadingShell({
|
|
|
30512
30553
|
)
|
|
30513
30554
|
] });
|
|
30514
30555
|
}
|
|
30515
|
-
var
|
|
30556
|
+
var styles20 = StyleSheet20.create({
|
|
30516
30557
|
container: {
|
|
30517
30558
|
flex: 1
|
|
30518
30559
|
},
|