@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.js
CHANGED
|
@@ -27213,8 +27213,7 @@ var ToolDock_default = ToolDock;
|
|
|
27213
27213
|
|
|
27214
27214
|
// components/RightSheet.tsx
|
|
27215
27215
|
var import_react8 = require("react");
|
|
27216
|
-
var
|
|
27217
|
-
var import_bottom_sheet = __toESM(require("@gorhom/bottom-sheet"));
|
|
27216
|
+
var import_react_native9 = require("react-native");
|
|
27218
27217
|
var import_core7 = require("@papyrus-sdk/core");
|
|
27219
27218
|
var import_engine_native3 = require("@papyrus-sdk/engine-native");
|
|
27220
27219
|
|
|
@@ -27224,8 +27223,142 @@ var resolveRightSheetHeight = ({
|
|
|
27224
27223
|
showingNotes
|
|
27225
27224
|
}) => showingNotes ? Math.min(440, windowHeight * 0.56) : Math.min(640, windowHeight * 0.72);
|
|
27226
27225
|
|
|
27227
|
-
// components/
|
|
27226
|
+
// components/NativeSheet.tsx
|
|
27227
|
+
var import_react_native8 = require("react-native");
|
|
27228
27228
|
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
27229
|
+
function NativeSheet({
|
|
27230
|
+
visible,
|
|
27231
|
+
onClose,
|
|
27232
|
+
children,
|
|
27233
|
+
isDark,
|
|
27234
|
+
maxHeight,
|
|
27235
|
+
title,
|
|
27236
|
+
closeAccessibilityLabel = "Close sheet",
|
|
27237
|
+
showHeader = false,
|
|
27238
|
+
sheetStyle
|
|
27239
|
+
}) {
|
|
27240
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
27241
|
+
import_react_native8.Modal,
|
|
27242
|
+
{
|
|
27243
|
+
animationType: "fade",
|
|
27244
|
+
transparent: true,
|
|
27245
|
+
visible,
|
|
27246
|
+
onRequestClose: onClose,
|
|
27247
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native8.View, { style: styles8.root, children: [
|
|
27248
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
27249
|
+
import_react_native8.Pressable,
|
|
27250
|
+
{
|
|
27251
|
+
accessibilityRole: "button",
|
|
27252
|
+
accessibilityLabel: closeAccessibilityLabel,
|
|
27253
|
+
style: styles8.backdrop,
|
|
27254
|
+
onPress: onClose
|
|
27255
|
+
}
|
|
27256
|
+
),
|
|
27257
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(
|
|
27258
|
+
import_react_native8.View,
|
|
27259
|
+
{
|
|
27260
|
+
style: [
|
|
27261
|
+
styles8.sheet,
|
|
27262
|
+
isDark && styles8.sheetDark,
|
|
27263
|
+
maxHeight ? { maxHeight } : null,
|
|
27264
|
+
sheetStyle
|
|
27265
|
+
],
|
|
27266
|
+
children: [
|
|
27267
|
+
showHeader ? /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native8.View, { style: styles8.header, children: [
|
|
27268
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
27269
|
+
import_react_native8.Pressable,
|
|
27270
|
+
{
|
|
27271
|
+
onPress: onClose,
|
|
27272
|
+
style: [
|
|
27273
|
+
styles8.closeButton,
|
|
27274
|
+
isDark && styles8.closeButtonDark
|
|
27275
|
+
],
|
|
27276
|
+
accessibilityLabel: closeAccessibilityLabel,
|
|
27277
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(IconClose, { size: 18, color: isDark ? "#f8fafc" : "#111827" })
|
|
27278
|
+
}
|
|
27279
|
+
),
|
|
27280
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
27281
|
+
import_react_native8.Text,
|
|
27282
|
+
{
|
|
27283
|
+
style: [styles8.title, isDark && styles8.titleDark],
|
|
27284
|
+
numberOfLines: 1,
|
|
27285
|
+
children: title
|
|
27286
|
+
}
|
|
27287
|
+
),
|
|
27288
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.View, { style: styles8.headerSpacer })
|
|
27289
|
+
] }) : null,
|
|
27290
|
+
children
|
|
27291
|
+
]
|
|
27292
|
+
}
|
|
27293
|
+
)
|
|
27294
|
+
] })
|
|
27295
|
+
}
|
|
27296
|
+
);
|
|
27297
|
+
}
|
|
27298
|
+
function NativeSheetScrollView(props) {
|
|
27299
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.ScrollView, { ...props });
|
|
27300
|
+
}
|
|
27301
|
+
function NativeSheetFlatList(props) {
|
|
27302
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.FlatList, { ...props });
|
|
27303
|
+
}
|
|
27304
|
+
var styles8 = import_react_native8.StyleSheet.create({
|
|
27305
|
+
root: {
|
|
27306
|
+
flex: 1,
|
|
27307
|
+
justifyContent: "flex-end"
|
|
27308
|
+
},
|
|
27309
|
+
backdrop: {
|
|
27310
|
+
...import_react_native8.StyleSheet.absoluteFillObject,
|
|
27311
|
+
backgroundColor: "rgba(0, 0, 0, 0.4)"
|
|
27312
|
+
},
|
|
27313
|
+
sheet: {
|
|
27314
|
+
maxHeight: "78%",
|
|
27315
|
+
width: "100%",
|
|
27316
|
+
borderTopLeftRadius: 24,
|
|
27317
|
+
borderTopRightRadius: 24,
|
|
27318
|
+
borderTopWidth: 1,
|
|
27319
|
+
borderTopColor: "#e5e7eb",
|
|
27320
|
+
backgroundColor: "#ffffff"
|
|
27321
|
+
},
|
|
27322
|
+
sheetDark: {
|
|
27323
|
+
borderTopColor: "#1f2937",
|
|
27324
|
+
backgroundColor: "#0f1115"
|
|
27325
|
+
},
|
|
27326
|
+
header: {
|
|
27327
|
+
flexDirection: "row",
|
|
27328
|
+
alignItems: "center",
|
|
27329
|
+
justifyContent: "space-between",
|
|
27330
|
+
paddingHorizontal: 16,
|
|
27331
|
+
paddingTop: 16,
|
|
27332
|
+
paddingBottom: 14
|
|
27333
|
+
},
|
|
27334
|
+
headerSpacer: {
|
|
27335
|
+
width: 42
|
|
27336
|
+
},
|
|
27337
|
+
closeButton: {
|
|
27338
|
+
width: 42,
|
|
27339
|
+
height: 42,
|
|
27340
|
+
borderRadius: 21,
|
|
27341
|
+
alignItems: "center",
|
|
27342
|
+
justifyContent: "center",
|
|
27343
|
+
backgroundColor: "#f1f5f9"
|
|
27344
|
+
},
|
|
27345
|
+
closeButtonDark: {
|
|
27346
|
+
backgroundColor: "#111827"
|
|
27347
|
+
},
|
|
27348
|
+
title: {
|
|
27349
|
+
flex: 1,
|
|
27350
|
+
textAlign: "center",
|
|
27351
|
+
fontSize: 18,
|
|
27352
|
+
fontWeight: "800",
|
|
27353
|
+
color: "#111827"
|
|
27354
|
+
},
|
|
27355
|
+
titleDark: {
|
|
27356
|
+
color: "#f8fafc"
|
|
27357
|
+
}
|
|
27358
|
+
});
|
|
27359
|
+
|
|
27360
|
+
// components/RightSheet.tsx
|
|
27361
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
27229
27362
|
var THUMBNAILS_INITIAL_NUM_TO_RENDER = 4;
|
|
27230
27363
|
var THUMBNAILS_WINDOW_SIZE = 5;
|
|
27231
27364
|
var THUMBNAILS_MAX_TO_RENDER_PER_BATCH = 6;
|
|
@@ -27262,9 +27395,9 @@ var PageThumbnail = ({
|
|
|
27262
27395
|
const [layoutReady, setLayoutReady] = (0, import_react8.useState)(false);
|
|
27263
27396
|
(0, import_react8.useEffect)(() => {
|
|
27264
27397
|
if (!layoutReady || !useNativePreview || !shouldRenderPreview) return;
|
|
27265
|
-
const viewTag = (0,
|
|
27398
|
+
const viewTag = (0, import_react_native9.findNodeHandle)(viewRef.current);
|
|
27266
27399
|
if (!viewTag) return;
|
|
27267
|
-
const isNative =
|
|
27400
|
+
const isNative = import_react_native9.Platform.OS === "android" || import_react_native9.Platform.OS === "ios";
|
|
27268
27401
|
const renderScale = isNative ? 2 / Math.max(zoom, 0.5) : 2;
|
|
27269
27402
|
void engine.renderPage(pageIndex, viewTag, renderScale);
|
|
27270
27403
|
}, [
|
|
@@ -27280,36 +27413,36 @@ var PageThumbnail = ({
|
|
|
27280
27413
|
setLayoutReady(true);
|
|
27281
27414
|
}
|
|
27282
27415
|
};
|
|
27283
|
-
return /* @__PURE__ */ (0,
|
|
27284
|
-
|
|
27416
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
27417
|
+
import_react_native9.Pressable,
|
|
27285
27418
|
{
|
|
27286
27419
|
onPress,
|
|
27287
27420
|
style: [
|
|
27288
|
-
|
|
27421
|
+
styles9.thumbCard,
|
|
27289
27422
|
{ width: cardWidth },
|
|
27290
|
-
isDark &&
|
|
27291
|
-
isActive &&
|
|
27423
|
+
isDark && styles9.thumbCardDark,
|
|
27424
|
+
isActive && styles9.thumbCardActive,
|
|
27292
27425
|
isActive && { borderColor: accentColor }
|
|
27293
27426
|
],
|
|
27294
27427
|
children: [
|
|
27295
|
-
/* @__PURE__ */ (0,
|
|
27296
|
-
|
|
27428
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27429
|
+
import_react_native9.View,
|
|
27297
27430
|
{
|
|
27298
27431
|
onLayout: handleLayout,
|
|
27299
|
-
style: [
|
|
27300
|
-
children: useNativePreview && shouldRenderPreview ? /* @__PURE__ */ (0,
|
|
27301
|
-
|
|
27432
|
+
style: [styles9.thumbFrame, { width: frameWidth, height: frameHeight }],
|
|
27433
|
+
children: useNativePreview && shouldRenderPreview ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_engine_native3.PapyrusPageView, { ref: viewRef, style: styles9.thumbView }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.View, { style: [styles9.thumbFallback, isDark && styles9.thumbFallbackDark], children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27434
|
+
import_react_native9.Text,
|
|
27302
27435
|
{
|
|
27303
27436
|
style: [
|
|
27304
|
-
|
|
27305
|
-
isDark &&
|
|
27437
|
+
styles9.thumbFallbackText,
|
|
27438
|
+
isDark && styles9.thumbFallbackTextDark
|
|
27306
27439
|
],
|
|
27307
27440
|
children: pageIndex + 1
|
|
27308
27441
|
}
|
|
27309
27442
|
) })
|
|
27310
27443
|
}
|
|
27311
27444
|
),
|
|
27312
|
-
/* @__PURE__ */ (0,
|
|
27445
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.Text, { style: [styles9.thumbLabel, isDark && styles9.thumbLabelDark], children: pageIndex + 1 })
|
|
27313
27446
|
]
|
|
27314
27447
|
}
|
|
27315
27448
|
);
|
|
@@ -27317,21 +27450,21 @@ var PageThumbnail = ({
|
|
|
27317
27450
|
var OutlineNode = ({ item, depth = 0, isDark, onSelect, untitledLabel }) => {
|
|
27318
27451
|
const hasChildren = item.children && item.children.length > 0;
|
|
27319
27452
|
const isClickable = item.pageIndex >= 0;
|
|
27320
|
-
return /* @__PURE__ */ (0,
|
|
27321
|
-
/* @__PURE__ */ (0,
|
|
27322
|
-
|
|
27453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { children: [
|
|
27454
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27455
|
+
import_react_native9.Pressable,
|
|
27323
27456
|
{
|
|
27324
27457
|
onPress: () => {
|
|
27325
27458
|
if (isClickable) onSelect(item.pageIndex);
|
|
27326
27459
|
},
|
|
27327
|
-
style: [
|
|
27328
|
-
children: /* @__PURE__ */ (0,
|
|
27329
|
-
|
|
27460
|
+
style: [styles9.outlineRow, { paddingLeft: 12 + depth * 12 }],
|
|
27461
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27462
|
+
import_react_native9.Text,
|
|
27330
27463
|
{
|
|
27331
27464
|
style: [
|
|
27332
|
-
|
|
27333
|
-
isDark &&
|
|
27334
|
-
!isClickable &&
|
|
27465
|
+
styles9.outlineText,
|
|
27466
|
+
isDark && styles9.outlineTextDark,
|
|
27467
|
+
!isClickable && styles9.outlineTextMuted
|
|
27335
27468
|
],
|
|
27336
27469
|
numberOfLines: 2,
|
|
27337
27470
|
children: item.title || untitledLabel
|
|
@@ -27339,7 +27472,7 @@ var OutlineNode = ({ item, depth = 0, isDark, onSelect, untitledLabel }) => {
|
|
|
27339
27472
|
)
|
|
27340
27473
|
}
|
|
27341
27474
|
),
|
|
27342
|
-
hasChildren ? item.children.map((child, index) => /* @__PURE__ */ (0,
|
|
27475
|
+
hasChildren ? item.children.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27343
27476
|
OutlineNode,
|
|
27344
27477
|
{
|
|
27345
27478
|
item: child,
|
|
@@ -27381,18 +27514,17 @@ var RightSheet = ({
|
|
|
27381
27514
|
const t = getStrings(locale);
|
|
27382
27515
|
const showingNotes = sidebarRightTab === "annotations";
|
|
27383
27516
|
const sheetHeight = resolveRightSheetHeight({
|
|
27384
|
-
windowHeight:
|
|
27517
|
+
windowHeight: import_react_native9.Dimensions.get("window").height,
|
|
27385
27518
|
showingNotes
|
|
27386
27519
|
});
|
|
27387
|
-
const
|
|
27388
|
-
const windowWidth = import_react_native8.Dimensions.get("window").width;
|
|
27520
|
+
const windowWidth = import_react_native9.Dimensions.get("window").width;
|
|
27389
27521
|
const gridGutter = 12;
|
|
27390
27522
|
const gridPadding = 16;
|
|
27391
27523
|
const cardWidth = (windowWidth - gridPadding * 2 - gridGutter) / 2;
|
|
27392
27524
|
const frameWidth = cardWidth - 16;
|
|
27393
27525
|
const renderTarget = engine.getRenderTargetType?.();
|
|
27394
27526
|
const hasNativePageView = Boolean(
|
|
27395
|
-
|
|
27527
|
+
import_react_native9.UIManager.getViewManagerConfig?.("PapyrusPageView")
|
|
27396
27528
|
);
|
|
27397
27529
|
const useNativePreview = renderTarget !== "webview" && hasNativePageView;
|
|
27398
27530
|
const thumbnailDimensionsCacheRef = (0, import_react8.useRef)(/* @__PURE__ */ new Map());
|
|
@@ -27552,7 +27684,7 @@ var RightSheet = ({
|
|
|
27552
27684
|
const renderThumbnailItem = (0, import_react8.useCallback)(
|
|
27553
27685
|
({ item }) => {
|
|
27554
27686
|
const shouldRenderPreview = useNativePreview && (visibleThumbnailPages.has(item) || item < resolvedThumbsPrewarmCount || Math.abs(item + 1 - currentPage) <= 1);
|
|
27555
|
-
return /* @__PURE__ */ (0,
|
|
27687
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27556
27688
|
PageThumbnail,
|
|
27557
27689
|
{
|
|
27558
27690
|
engine,
|
|
@@ -27585,89 +27717,72 @@ var RightSheet = ({
|
|
|
27585
27717
|
zoom
|
|
27586
27718
|
]
|
|
27587
27719
|
);
|
|
27588
|
-
const renderBackdrop = (0, import_react8.useCallback)(
|
|
27589
|
-
(props) => /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
27590
|
-
import_bottom_sheet.BottomSheetBackdrop,
|
|
27591
|
-
{
|
|
27592
|
-
...props,
|
|
27593
|
-
appearsOnIndex: 0,
|
|
27594
|
-
disappearsOnIndex: -1,
|
|
27595
|
-
opacity: 0.4,
|
|
27596
|
-
pressBehavior: "close"
|
|
27597
|
-
}
|
|
27598
|
-
),
|
|
27599
|
-
[]
|
|
27600
|
-
);
|
|
27601
27720
|
if (!sidebarRightOpen) return null;
|
|
27602
|
-
return /* @__PURE__ */ (0,
|
|
27603
|
-
|
|
27721
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27722
|
+
NativeSheet,
|
|
27604
27723
|
{
|
|
27605
|
-
|
|
27606
|
-
snapPoints,
|
|
27607
|
-
enablePanDownToClose: true,
|
|
27724
|
+
visible: sidebarRightOpen,
|
|
27608
27725
|
onClose: closeSheet,
|
|
27609
|
-
|
|
27610
|
-
|
|
27611
|
-
|
|
27612
|
-
|
|
27613
|
-
|
|
27614
|
-
|
|
27615
|
-
|
|
27616
|
-
!showingNotes ? /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
27617
|
-
import_react_native8.Pressable,
|
|
27726
|
+
isDark,
|
|
27727
|
+
maxHeight: sheetHeight,
|
|
27728
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: styles9.sheet, children: [
|
|
27729
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: styles9.header, children: [
|
|
27730
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.Text, { style: [styles9.sheetTitle, isDark && styles9.sheetTitleDark], children: showingNotes ? t.notes : navigationTitle }),
|
|
27731
|
+
!showingNotes ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27732
|
+
import_react_native9.Pressable,
|
|
27618
27733
|
{
|
|
27619
27734
|
onPress: showingProgress ? void 0 : onOpenPageJump,
|
|
27620
27735
|
disabled: showingProgress || pageCount <= 0,
|
|
27621
|
-
style:
|
|
27736
|
+
style: styles9.pageStatusHit,
|
|
27622
27737
|
accessibilityLabel: "Open page jump",
|
|
27623
|
-
children: /* @__PURE__ */ (0,
|
|
27738
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.Text, { style: [styles9.pageStatus, isDark && styles9.pageStatusDark], children: showingProgress ? `${Math.round(currentPage / Math.max(pageCount, 1) * 100)}%` : `${currentPage}/${pageCount}` })
|
|
27624
27739
|
}
|
|
27625
27740
|
) : null
|
|
27626
27741
|
] }),
|
|
27627
|
-
!showingNotes ? /* @__PURE__ */ (0,
|
|
27628
|
-
!showingProgress ? /* @__PURE__ */ (0,
|
|
27629
|
-
supportsThumbnails ? /* @__PURE__ */ (0,
|
|
27630
|
-
|
|
27742
|
+
!showingNotes ? /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: styles9.pagesContent, children: [
|
|
27743
|
+
!showingProgress ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.View, { style: styles9.pageHeader, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: [styles9.segmented, isDark && styles9.segmentedDark], children: [
|
|
27744
|
+
supportsThumbnails ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27745
|
+
import_react_native9.Pressable,
|
|
27631
27746
|
{
|
|
27632
27747
|
onPress: () => setPagesMode("thumbnails"),
|
|
27633
27748
|
style: [
|
|
27634
|
-
|
|
27635
|
-
pagesMode === "thumbnails" &&
|
|
27749
|
+
styles9.segmentButton,
|
|
27750
|
+
pagesMode === "thumbnails" && styles9.segmentButtonActive,
|
|
27636
27751
|
pagesMode === "thumbnails" && {
|
|
27637
27752
|
backgroundColor: accentColor
|
|
27638
27753
|
}
|
|
27639
27754
|
],
|
|
27640
|
-
children: /* @__PURE__ */ (0,
|
|
27641
|
-
|
|
27755
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27756
|
+
import_react_native9.Text,
|
|
27642
27757
|
{
|
|
27643
27758
|
style: [
|
|
27644
|
-
|
|
27645
|
-
isDark &&
|
|
27646
|
-
pagesMode === "thumbnails" &&
|
|
27759
|
+
styles9.segmentText,
|
|
27760
|
+
isDark && styles9.segmentTextDark,
|
|
27761
|
+
pagesMode === "thumbnails" && styles9.segmentTextActive
|
|
27647
27762
|
],
|
|
27648
27763
|
children: thumbnailLabel
|
|
27649
27764
|
}
|
|
27650
27765
|
)
|
|
27651
27766
|
}
|
|
27652
27767
|
) : null,
|
|
27653
|
-
/* @__PURE__ */ (0,
|
|
27654
|
-
|
|
27768
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27769
|
+
import_react_native9.Pressable,
|
|
27655
27770
|
{
|
|
27656
27771
|
onPress: () => setPagesMode("summary"),
|
|
27657
27772
|
style: [
|
|
27658
|
-
|
|
27659
|
-
pagesMode === "summary" &&
|
|
27773
|
+
styles9.segmentButton,
|
|
27774
|
+
pagesMode === "summary" && styles9.segmentButtonActive,
|
|
27660
27775
|
pagesMode === "summary" && {
|
|
27661
27776
|
backgroundColor: accentColor
|
|
27662
27777
|
}
|
|
27663
27778
|
],
|
|
27664
|
-
children: /* @__PURE__ */ (0,
|
|
27665
|
-
|
|
27779
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27780
|
+
import_react_native9.Text,
|
|
27666
27781
|
{
|
|
27667
27782
|
style: [
|
|
27668
|
-
|
|
27669
|
-
isDark &&
|
|
27670
|
-
pagesMode === "summary" &&
|
|
27783
|
+
styles9.segmentText,
|
|
27784
|
+
isDark && styles9.segmentTextDark,
|
|
27785
|
+
pagesMode === "summary" && styles9.segmentTextActive
|
|
27671
27786
|
],
|
|
27672
27787
|
children: summaryLabel
|
|
27673
27788
|
}
|
|
@@ -27675,14 +27790,14 @@ var RightSheet = ({
|
|
|
27675
27790
|
}
|
|
27676
27791
|
)
|
|
27677
27792
|
] }) }) : null,
|
|
27678
|
-
supportsThumbnails && !showingProgress && pagesMode === "thumbnails" ? /* @__PURE__ */ (0,
|
|
27679
|
-
|
|
27793
|
+
supportsThumbnails && !showingProgress && pagesMode === "thumbnails" ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27794
|
+
NativeSheetFlatList,
|
|
27680
27795
|
{
|
|
27681
27796
|
data: pages,
|
|
27682
27797
|
keyExtractor: (item) => `thumb-${item}`,
|
|
27683
27798
|
numColumns: 2,
|
|
27684
|
-
contentContainerStyle:
|
|
27685
|
-
columnWrapperStyle:
|
|
27799
|
+
contentContainerStyle: styles9.thumbGrid,
|
|
27800
|
+
columnWrapperStyle: styles9.thumbRow,
|
|
27686
27801
|
showsVerticalScrollIndicator: false,
|
|
27687
27802
|
initialNumToRender: normalizedThumbsInitialCount,
|
|
27688
27803
|
windowSize: THUMBNAILS_WINDOW_SIZE,
|
|
@@ -27693,29 +27808,29 @@ var RightSheet = ({
|
|
|
27693
27808
|
onViewableItemsChanged: onThumbnailsViewableItemsChanged,
|
|
27694
27809
|
renderItem: renderThumbnailItem
|
|
27695
27810
|
}
|
|
27696
|
-
) : showingProgress ? /* @__PURE__ */ (0,
|
|
27697
|
-
|
|
27811
|
+
) : showingProgress ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27812
|
+
NativeSheetScrollView,
|
|
27698
27813
|
{
|
|
27699
|
-
contentContainerStyle:
|
|
27814
|
+
contentContainerStyle: styles9.summaryContent,
|
|
27700
27815
|
showsVerticalScrollIndicator: false,
|
|
27701
27816
|
children: progressEntries.map((entry) => {
|
|
27702
27817
|
const isActive = entry.pageIndex + 1 === currentPage;
|
|
27703
|
-
return /* @__PURE__ */ (0,
|
|
27704
|
-
|
|
27818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
27819
|
+
import_react_native9.Pressable,
|
|
27705
27820
|
{
|
|
27706
27821
|
onPress: () => jumpToPage(entry.pageIndex),
|
|
27707
27822
|
style: [
|
|
27708
|
-
|
|
27709
|
-
isDark &&
|
|
27823
|
+
styles9.progressRow,
|
|
27824
|
+
isDark && styles9.progressRowDark,
|
|
27710
27825
|
isActive && { borderColor: accentColor }
|
|
27711
27826
|
],
|
|
27712
27827
|
children: [
|
|
27713
|
-
/* @__PURE__ */ (0,
|
|
27714
|
-
|
|
27828
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
27829
|
+
import_react_native9.Text,
|
|
27715
27830
|
{
|
|
27716
27831
|
style: [
|
|
27717
|
-
|
|
27718
|
-
isDark &&
|
|
27832
|
+
styles9.progressLabel,
|
|
27833
|
+
isDark && styles9.progressLabelDark
|
|
27719
27834
|
],
|
|
27720
27835
|
children: [
|
|
27721
27836
|
entry.percent,
|
|
@@ -27723,12 +27838,12 @@ var RightSheet = ({
|
|
|
27723
27838
|
]
|
|
27724
27839
|
}
|
|
27725
27840
|
),
|
|
27726
|
-
/* @__PURE__ */ (0,
|
|
27727
|
-
|
|
27841
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
27842
|
+
import_react_native9.Text,
|
|
27728
27843
|
{
|
|
27729
27844
|
style: [
|
|
27730
|
-
|
|
27731
|
-
isDark &&
|
|
27845
|
+
styles9.progressMeta,
|
|
27846
|
+
isDark && styles9.progressMetaDark
|
|
27732
27847
|
],
|
|
27733
27848
|
children: [
|
|
27734
27849
|
t.page,
|
|
@@ -27743,12 +27858,12 @@ var RightSheet = ({
|
|
|
27743
27858
|
);
|
|
27744
27859
|
})
|
|
27745
27860
|
}
|
|
27746
|
-
) : /* @__PURE__ */ (0,
|
|
27747
|
-
|
|
27861
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27862
|
+
NativeSheetScrollView,
|
|
27748
27863
|
{
|
|
27749
|
-
contentContainerStyle:
|
|
27864
|
+
contentContainerStyle: styles9.summaryContent,
|
|
27750
27865
|
showsVerticalScrollIndicator: false,
|
|
27751
|
-
children: outline.length === 0 ? /* @__PURE__ */ (0,
|
|
27866
|
+
children: outline.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.Text, { style: [styles9.emptyText, isDark && styles9.emptyTextDark], children: t.noSummary }) : outline.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27752
27867
|
OutlineNode,
|
|
27753
27868
|
{
|
|
27754
27869
|
item,
|
|
@@ -27760,32 +27875,32 @@ var RightSheet = ({
|
|
|
27760
27875
|
))
|
|
27761
27876
|
}
|
|
27762
27877
|
)
|
|
27763
|
-
] }) : /* @__PURE__ */ (0,
|
|
27764
|
-
|
|
27878
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27879
|
+
NativeSheetScrollView,
|
|
27765
27880
|
{
|
|
27766
|
-
contentContainerStyle:
|
|
27881
|
+
contentContainerStyle: styles9.content,
|
|
27767
27882
|
showsVerticalScrollIndicator: false,
|
|
27768
|
-
children: annotations.length === 0 ? /* @__PURE__ */ (0,
|
|
27769
|
-
|
|
27883
|
+
children: annotations.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.Text, { style: [styles9.emptyText, isDark && styles9.emptyTextDark], children: t.noAnnotations }) : /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.View, { children: annotations.map((ann) => /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
27884
|
+
import_react_native9.Pressable,
|
|
27770
27885
|
{
|
|
27771
27886
|
onPress: () => {
|
|
27772
27887
|
setSelectedAnnotation(ann.id);
|
|
27773
27888
|
triggerScrollToPage(ann.pageIndex);
|
|
27774
27889
|
closeSheet();
|
|
27775
27890
|
},
|
|
27776
|
-
style: [
|
|
27891
|
+
style: [styles9.noteCard, isDark && styles9.noteCardDark],
|
|
27777
27892
|
children: [
|
|
27778
|
-
/* @__PURE__ */ (0,
|
|
27779
|
-
/* @__PURE__ */ (0,
|
|
27780
|
-
|
|
27893
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: styles9.noteHeader, children: [
|
|
27894
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27895
|
+
import_react_native9.View,
|
|
27781
27896
|
{
|
|
27782
|
-
style: [
|
|
27897
|
+
style: [styles9.noteDot, { backgroundColor: ann.color }]
|
|
27783
27898
|
}
|
|
27784
27899
|
),
|
|
27785
|
-
/* @__PURE__ */ (0,
|
|
27786
|
-
|
|
27900
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(
|
|
27901
|
+
import_react_native9.Text,
|
|
27787
27902
|
{
|
|
27788
|
-
style: [
|
|
27903
|
+
style: [styles9.noteTitle, isDark && styles9.noteTitleDark],
|
|
27789
27904
|
children: [
|
|
27790
27905
|
t.page,
|
|
27791
27906
|
" ",
|
|
@@ -27794,23 +27909,23 @@ var RightSheet = ({
|
|
|
27794
27909
|
}
|
|
27795
27910
|
)
|
|
27796
27911
|
] }),
|
|
27797
|
-
/* @__PURE__ */ (0,
|
|
27798
|
-
|
|
27912
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27913
|
+
import_react_native9.Text,
|
|
27799
27914
|
{
|
|
27800
27915
|
style: [
|
|
27801
|
-
|
|
27802
|
-
isDark &&
|
|
27916
|
+
styles9.noteType,
|
|
27917
|
+
isDark && styles9.noteTypeDark,
|
|
27803
27918
|
{ color: accentColor }
|
|
27804
27919
|
],
|
|
27805
27920
|
children: ann.type === "comment" || ann.type === "text" ? t.note.toUpperCase() : ann.type.toUpperCase()
|
|
27806
27921
|
}
|
|
27807
27922
|
),
|
|
27808
|
-
ann.content ? /* @__PURE__ */ (0,
|
|
27809
|
-
|
|
27923
|
+
ann.content ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27924
|
+
import_react_native9.Text,
|
|
27810
27925
|
{
|
|
27811
27926
|
style: [
|
|
27812
|
-
|
|
27813
|
-
isDark &&
|
|
27927
|
+
styles9.noteContent,
|
|
27928
|
+
isDark && styles9.noteContentDark
|
|
27814
27929
|
],
|
|
27815
27930
|
children: ann.content
|
|
27816
27931
|
}
|
|
@@ -27823,41 +27938,13 @@ var RightSheet = ({
|
|
|
27823
27938
|
)
|
|
27824
27939
|
] })
|
|
27825
27940
|
}
|
|
27826
|
-
)
|
|
27941
|
+
);
|
|
27827
27942
|
};
|
|
27828
|
-
var
|
|
27829
|
-
modalRoot: {
|
|
27830
|
-
...import_react_native8.StyleSheet.absoluteFillObject,
|
|
27831
|
-
zIndex: 30
|
|
27832
|
-
},
|
|
27943
|
+
var styles9 = import_react_native9.StyleSheet.create({
|
|
27833
27944
|
sheet: {
|
|
27834
|
-
|
|
27945
|
+
maxHeight: "100%",
|
|
27835
27946
|
paddingBottom: 16
|
|
27836
27947
|
},
|
|
27837
|
-
sheetBackground: {
|
|
27838
|
-
backgroundColor: "#ffffff",
|
|
27839
|
-
borderTopLeftRadius: 20,
|
|
27840
|
-
borderTopRightRadius: 20,
|
|
27841
|
-
borderTopWidth: 1,
|
|
27842
|
-
borderTopColor: "#e5e7eb"
|
|
27843
|
-
},
|
|
27844
|
-
sheetDark: {
|
|
27845
|
-
backgroundColor: "#0f1115",
|
|
27846
|
-
borderTopColor: "#1f2937"
|
|
27847
|
-
},
|
|
27848
|
-
handleContainer: {
|
|
27849
|
-
paddingTop: 10,
|
|
27850
|
-
paddingBottom: 12
|
|
27851
|
-
},
|
|
27852
|
-
handle: {
|
|
27853
|
-
width: 44,
|
|
27854
|
-
height: 4,
|
|
27855
|
-
borderRadius: 999,
|
|
27856
|
-
backgroundColor: "#cbd5f5"
|
|
27857
|
-
},
|
|
27858
|
-
handleDark: {
|
|
27859
|
-
backgroundColor: "#374151"
|
|
27860
|
-
},
|
|
27861
27948
|
header: {
|
|
27862
27949
|
paddingHorizontal: 16,
|
|
27863
27950
|
marginBottom: 10,
|
|
@@ -28098,9 +28185,9 @@ var RightSheet_default = RightSheet;
|
|
|
28098
28185
|
|
|
28099
28186
|
// components/AnnotationEditor.tsx
|
|
28100
28187
|
var import_react9 = require("react");
|
|
28101
|
-
var
|
|
28188
|
+
var import_react_native10 = require("react-native");
|
|
28102
28189
|
var import_core8 = require("@papyrus-sdk/core");
|
|
28103
|
-
var
|
|
28190
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
28104
28191
|
var AnnotationEditor = () => {
|
|
28105
28192
|
const {
|
|
28106
28193
|
annotations,
|
|
@@ -28127,19 +28214,19 @@ var AnnotationEditor = () => {
|
|
|
28127
28214
|
updateAnnotation(annotation.id, { content: draft });
|
|
28128
28215
|
setSelectedAnnotation(null);
|
|
28129
28216
|
};
|
|
28130
|
-
return /* @__PURE__ */ (0,
|
|
28131
|
-
|
|
28217
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28218
|
+
import_react_native10.Modal,
|
|
28132
28219
|
{
|
|
28133
28220
|
visible: true,
|
|
28134
28221
|
transparent: true,
|
|
28135
28222
|
animationType: "fade",
|
|
28136
28223
|
onRequestClose: handleClose,
|
|
28137
|
-
children: /* @__PURE__ */ (0,
|
|
28138
|
-
/* @__PURE__ */ (0,
|
|
28139
|
-
/* @__PURE__ */ (0,
|
|
28140
|
-
|
|
28224
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.View, { style: styles10.overlay, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: [styles10.card, isDark && styles10.cardDark], children: [
|
|
28225
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.Text, { style: [styles10.title, isDark && styles10.titleDark], children: t.editNote }),
|
|
28226
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28227
|
+
import_react_native10.TextInput,
|
|
28141
28228
|
{
|
|
28142
|
-
style: [
|
|
28229
|
+
style: [styles10.input, isDark && styles10.inputDark],
|
|
28143
28230
|
value: draft,
|
|
28144
28231
|
onChangeText: setDraft,
|
|
28145
28232
|
placeholder: t.notePlaceholder,
|
|
@@ -28147,25 +28234,25 @@ var AnnotationEditor = () => {
|
|
|
28147
28234
|
multiline: true
|
|
28148
28235
|
}
|
|
28149
28236
|
),
|
|
28150
|
-
/* @__PURE__ */ (0,
|
|
28151
|
-
/* @__PURE__ */ (0,
|
|
28152
|
-
|
|
28237
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.actions, children: [
|
|
28238
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28239
|
+
import_react_native10.Pressable,
|
|
28153
28240
|
{
|
|
28154
28241
|
onPress: handleClose,
|
|
28155
|
-
style: [
|
|
28156
|
-
children: /* @__PURE__ */ (0,
|
|
28242
|
+
style: [styles10.actionButton, styles10.actionCancel],
|
|
28243
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.Text, { style: styles10.actionText, children: t.cancel })
|
|
28157
28244
|
}
|
|
28158
28245
|
),
|
|
28159
|
-
/* @__PURE__ */ (0,
|
|
28160
|
-
|
|
28246
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28247
|
+
import_react_native10.Pressable,
|
|
28161
28248
|
{
|
|
28162
28249
|
onPress: handleSave,
|
|
28163
28250
|
style: [
|
|
28164
|
-
|
|
28165
|
-
|
|
28251
|
+
styles10.actionButton,
|
|
28252
|
+
styles10.actionSave,
|
|
28166
28253
|
{ backgroundColor: accentColor }
|
|
28167
28254
|
],
|
|
28168
|
-
children: /* @__PURE__ */ (0,
|
|
28255
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.Text, { style: [styles10.actionText, styles10.actionTextLight], children: t.save })
|
|
28169
28256
|
}
|
|
28170
28257
|
)
|
|
28171
28258
|
] })
|
|
@@ -28173,7 +28260,7 @@ var AnnotationEditor = () => {
|
|
|
28173
28260
|
}
|
|
28174
28261
|
);
|
|
28175
28262
|
};
|
|
28176
|
-
var
|
|
28263
|
+
var styles10 = import_react_native10.StyleSheet.create({
|
|
28177
28264
|
overlay: {
|
|
28178
28265
|
flex: 1,
|
|
28179
28266
|
alignItems: "center",
|
|
@@ -28243,7 +28330,7 @@ var styles9 = import_react_native9.StyleSheet.create({
|
|
|
28243
28330
|
var AnnotationEditor_default = AnnotationEditor;
|
|
28244
28331
|
|
|
28245
28332
|
// components/BottomBar.tsx
|
|
28246
|
-
var
|
|
28333
|
+
var import_react_native11 = require("react-native");
|
|
28247
28334
|
var import_core9 = require("@papyrus-sdk/core");
|
|
28248
28335
|
|
|
28249
28336
|
// components/bottomBarModel.ts
|
|
@@ -28290,7 +28377,7 @@ function createOpenDestinationHandler(onOpenDestination, destination) {
|
|
|
28290
28377
|
}
|
|
28291
28378
|
|
|
28292
28379
|
// components/BottomBar.tsx
|
|
28293
|
-
var
|
|
28380
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
28294
28381
|
var BottomBar = ({
|
|
28295
28382
|
documentType,
|
|
28296
28383
|
onOpenInfo,
|
|
@@ -28311,7 +28398,7 @@ var BottomBar = ({
|
|
|
28311
28398
|
} = (0, import_core9.useViewerStore)();
|
|
28312
28399
|
const isDark = uiTheme === "dark";
|
|
28313
28400
|
const t = getStrings(locale);
|
|
28314
|
-
const { width, height } = (0,
|
|
28401
|
+
const { width, height } = (0, import_react_native11.useWindowDimensions)();
|
|
28315
28402
|
const isLandscape = width > height;
|
|
28316
28403
|
const iconColor = (active) => {
|
|
28317
28404
|
if (active) return accentColor;
|
|
@@ -28363,37 +28450,37 @@ var BottomBar = ({
|
|
|
28363
28450
|
}
|
|
28364
28451
|
};
|
|
28365
28452
|
if (!mobileChromeVisible || !mobileDockVisible) return null;
|
|
28366
|
-
return /* @__PURE__ */ (0,
|
|
28367
|
-
layout.leftSlots.length > 0 ? /* @__PURE__ */ (0,
|
|
28368
|
-
|
|
28453
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.View, { pointerEvents: "box-none", style: styles11.frame, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native11.View, { style: [styles11.row, isLandscape && styles11.rowLandscape], children: [
|
|
28454
|
+
layout.leftSlots.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
28455
|
+
import_react_native11.View,
|
|
28369
28456
|
{
|
|
28370
28457
|
style: [
|
|
28371
|
-
|
|
28372
|
-
|
|
28373
|
-
isDark &&
|
|
28458
|
+
styles11.island,
|
|
28459
|
+
styles11.editIsland,
|
|
28460
|
+
isDark && styles11.islandDark
|
|
28374
28461
|
],
|
|
28375
28462
|
testID: "papyrus-floating-bottom-dock-edit",
|
|
28376
28463
|
children: layout.leftSlots.map((slot) => {
|
|
28377
28464
|
const meta = slotMeta[slot.key];
|
|
28378
28465
|
const Icon = meta.icon;
|
|
28379
|
-
return /* @__PURE__ */ (0,
|
|
28380
|
-
|
|
28466
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
28467
|
+
import_react_native11.Pressable,
|
|
28381
28468
|
{
|
|
28382
28469
|
onPress: meta.onPress,
|
|
28383
28470
|
style: [
|
|
28384
|
-
|
|
28385
|
-
slot.active &&
|
|
28471
|
+
styles11.iconOnlyItem,
|
|
28472
|
+
slot.active && styles11.itemActive
|
|
28386
28473
|
],
|
|
28387
28474
|
accessibilityLabel: meta.label,
|
|
28388
|
-
children: /* @__PURE__ */ (0,
|
|
28389
|
-
|
|
28475
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
28476
|
+
import_react_native11.View,
|
|
28390
28477
|
{
|
|
28391
28478
|
style: [
|
|
28392
|
-
|
|
28393
|
-
isDark &&
|
|
28394
|
-
slot.active &&
|
|
28479
|
+
styles11.itemIcon,
|
|
28480
|
+
isDark && styles11.itemIconDark,
|
|
28481
|
+
slot.active && styles11.itemIconActive
|
|
28395
28482
|
],
|
|
28396
|
-
children: /* @__PURE__ */ (0,
|
|
28483
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
28397
28484
|
Icon,
|
|
28398
28485
|
{
|
|
28399
28486
|
size: MOBILE_CHROME_METRICS.iconSize,
|
|
@@ -28408,33 +28495,33 @@ var BottomBar = ({
|
|
|
28408
28495
|
})
|
|
28409
28496
|
}
|
|
28410
28497
|
) : null,
|
|
28411
|
-
/* @__PURE__ */ (0,
|
|
28412
|
-
|
|
28498
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
28499
|
+
import_react_native11.View,
|
|
28413
28500
|
{
|
|
28414
28501
|
style: [
|
|
28415
|
-
|
|
28416
|
-
|
|
28417
|
-
isDark &&
|
|
28502
|
+
styles11.island,
|
|
28503
|
+
styles11.utilityIsland,
|
|
28504
|
+
isDark && styles11.islandDark
|
|
28418
28505
|
],
|
|
28419
28506
|
testID: "papyrus-floating-bottom-dock",
|
|
28420
28507
|
children: layout.rightSlots.map((slot) => {
|
|
28421
28508
|
const meta = slotMeta[slot.key];
|
|
28422
28509
|
const Icon = meta.icon;
|
|
28423
|
-
return /* @__PURE__ */ (0,
|
|
28424
|
-
|
|
28510
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
28511
|
+
import_react_native11.Pressable,
|
|
28425
28512
|
{
|
|
28426
28513
|
onPress: meta.onPress,
|
|
28427
|
-
style: [
|
|
28514
|
+
style: [styles11.iconOnlyItem, slot.active && styles11.itemActive],
|
|
28428
28515
|
accessibilityLabel: meta.label,
|
|
28429
|
-
children: /* @__PURE__ */ (0,
|
|
28430
|
-
|
|
28516
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
28517
|
+
import_react_native11.View,
|
|
28431
28518
|
{
|
|
28432
28519
|
style: [
|
|
28433
|
-
|
|
28434
|
-
isDark &&
|
|
28435
|
-
slot.active &&
|
|
28520
|
+
styles11.itemIcon,
|
|
28521
|
+
isDark && styles11.itemIconDark,
|
|
28522
|
+
slot.active && styles11.itemIconActive
|
|
28436
28523
|
],
|
|
28437
|
-
children: /* @__PURE__ */ (0,
|
|
28524
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
28438
28525
|
Icon,
|
|
28439
28526
|
{
|
|
28440
28527
|
size: MOBILE_CHROME_METRICS.iconSize,
|
|
@@ -28451,7 +28538,7 @@ var BottomBar = ({
|
|
|
28451
28538
|
)
|
|
28452
28539
|
] }) });
|
|
28453
28540
|
};
|
|
28454
|
-
var
|
|
28541
|
+
var styles11 = import_react_native11.StyleSheet.create({
|
|
28455
28542
|
frame: {
|
|
28456
28543
|
position: "absolute",
|
|
28457
28544
|
left: 0,
|
|
@@ -28531,11 +28618,9 @@ var styles10 = import_react_native10.StyleSheet.create({
|
|
|
28531
28618
|
var BottomBar_default = BottomBar;
|
|
28532
28619
|
|
|
28533
28620
|
// components/SettingsSheet.tsx
|
|
28534
|
-
var
|
|
28535
|
-
var import_react_native11 = require("react-native");
|
|
28536
|
-
var import_bottom_sheet2 = __toESM(require("@gorhom/bottom-sheet"));
|
|
28621
|
+
var import_react_native12 = require("react-native");
|
|
28537
28622
|
var import_core10 = require("@papyrus-sdk/core");
|
|
28538
|
-
var
|
|
28623
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
28539
28624
|
var PAGE_THEME_OPTIONS = [
|
|
28540
28625
|
{ value: "normal", labelKey: "themeOriginal" },
|
|
28541
28626
|
{ value: "sepia", labelKey: "themeSepia" },
|
|
@@ -28544,19 +28629,19 @@ var PAGE_THEME_OPTIONS = [
|
|
|
28544
28629
|
];
|
|
28545
28630
|
var ThemeSwatch = ({ value }) => {
|
|
28546
28631
|
if (value === "high-contrast") {
|
|
28547
|
-
return /* @__PURE__ */ (0,
|
|
28548
|
-
/* @__PURE__ */ (0,
|
|
28549
|
-
/* @__PURE__ */ (0,
|
|
28632
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: [styles12.themeSwatch, styles12.themeSwatchContrast], children: [
|
|
28633
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.View, { style: styles12.themeSwatchContrastHalfDark }),
|
|
28634
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.View, { style: styles12.themeSwatchContrastHalfLight })
|
|
28550
28635
|
] });
|
|
28551
28636
|
}
|
|
28552
|
-
return /* @__PURE__ */ (0,
|
|
28553
|
-
|
|
28637
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28638
|
+
import_react_native12.View,
|
|
28554
28639
|
{
|
|
28555
28640
|
style: [
|
|
28556
|
-
|
|
28557
|
-
value === "normal" &&
|
|
28558
|
-
value === "sepia" &&
|
|
28559
|
-
value === "dark" &&
|
|
28641
|
+
styles12.themeSwatch,
|
|
28642
|
+
value === "normal" && styles12.themeSwatchNormal,
|
|
28643
|
+
value === "sepia" && styles12.themeSwatchSepia,
|
|
28644
|
+
value === "dark" && styles12.themeSwatchDark
|
|
28560
28645
|
]
|
|
28561
28646
|
}
|
|
28562
28647
|
);
|
|
@@ -28579,23 +28664,7 @@ var SettingsSheet = ({
|
|
|
28579
28664
|
const isPaged = viewMode === "single";
|
|
28580
28665
|
const isDouble = viewMode === "double";
|
|
28581
28666
|
const t = getStrings(locale);
|
|
28582
|
-
const
|
|
28583
|
-
() => [Math.min(640, import_react_native11.Dimensions.get("window").height * 0.72)],
|
|
28584
|
-
[]
|
|
28585
|
-
);
|
|
28586
|
-
const renderBackdrop = (0, import_react10.useCallback)(
|
|
28587
|
-
(props) => /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(
|
|
28588
|
-
import_bottom_sheet2.BottomSheetBackdrop,
|
|
28589
|
-
{
|
|
28590
|
-
...props,
|
|
28591
|
-
appearsOnIndex: 0,
|
|
28592
|
-
disappearsOnIndex: -1,
|
|
28593
|
-
opacity: 0.4,
|
|
28594
|
-
pressBehavior: "close"
|
|
28595
|
-
}
|
|
28596
|
-
),
|
|
28597
|
-
[]
|
|
28598
|
-
);
|
|
28667
|
+
const sheetMaxHeight = Math.min(640, import_react_native12.Dimensions.get("window").height * 0.72);
|
|
28599
28668
|
const handleTransition = (mode) => {
|
|
28600
28669
|
if (mode === "paged") {
|
|
28601
28670
|
setDocumentState({ viewMode: "single" });
|
|
@@ -28621,73 +28690,72 @@ var SettingsSheet = ({
|
|
|
28621
28690
|
engine.setZoom(next);
|
|
28622
28691
|
setDocumentState({ zoom: next });
|
|
28623
28692
|
};
|
|
28624
|
-
return /* @__PURE__ */ (0,
|
|
28625
|
-
|
|
28693
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28694
|
+
NativeSheet,
|
|
28626
28695
|
{
|
|
28627
|
-
|
|
28628
|
-
snapPoints,
|
|
28629
|
-
enablePanDownToClose: true,
|
|
28696
|
+
visible,
|
|
28630
28697
|
onClose,
|
|
28631
|
-
|
|
28632
|
-
|
|
28633
|
-
|
|
28634
|
-
|
|
28635
|
-
|
|
28636
|
-
|
|
28698
|
+
isDark,
|
|
28699
|
+
maxHeight: sheetMaxHeight,
|
|
28700
|
+
showHeader: true,
|
|
28701
|
+
title: locale === "pt-BR" ? "Exibicao" : "Display",
|
|
28702
|
+
closeAccessibilityLabel: "Close settings",
|
|
28703
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
28704
|
+
NativeSheetScrollView,
|
|
28637
28705
|
{
|
|
28638
|
-
style:
|
|
28639
|
-
contentContainerStyle:
|
|
28706
|
+
style: styles12.sheet,
|
|
28707
|
+
contentContainerStyle: styles12.sheetContent,
|
|
28640
28708
|
showsVerticalScrollIndicator: false,
|
|
28641
28709
|
children: [
|
|
28642
|
-
/* @__PURE__ */ (0,
|
|
28643
|
-
/* @__PURE__ */ (0,
|
|
28644
|
-
|
|
28710
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.section, children: [
|
|
28711
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28712
|
+
import_react_native12.Text,
|
|
28645
28713
|
{
|
|
28646
|
-
style: [
|
|
28714
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28647
28715
|
children: t.appearance
|
|
28648
28716
|
}
|
|
28649
28717
|
),
|
|
28650
|
-
/* @__PURE__ */ (0,
|
|
28651
|
-
/* @__PURE__ */ (0,
|
|
28652
|
-
|
|
28718
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.optionRow, children: [
|
|
28719
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28720
|
+
import_react_native12.Pressable,
|
|
28653
28721
|
{
|
|
28654
28722
|
onPress: () => setDocumentState({ uiTheme: "light" }),
|
|
28655
28723
|
style: [
|
|
28656
|
-
|
|
28657
|
-
isDark &&
|
|
28658
|
-
uiTheme === "light" &&
|
|
28724
|
+
styles12.optionButton,
|
|
28725
|
+
isDark && styles12.optionButtonDark,
|
|
28726
|
+
uiTheme === "light" && styles12.optionButtonActive,
|
|
28659
28727
|
uiTheme === "light" && { backgroundColor: accentColor }
|
|
28660
28728
|
],
|
|
28661
|
-
children: /* @__PURE__ */ (0,
|
|
28662
|
-
|
|
28729
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28730
|
+
import_react_native12.Text,
|
|
28663
28731
|
{
|
|
28664
28732
|
style: [
|
|
28665
|
-
|
|
28666
|
-
isDark &&
|
|
28667
|
-
uiTheme === "light" &&
|
|
28733
|
+
styles12.optionText,
|
|
28734
|
+
isDark && styles12.optionTextDark,
|
|
28735
|
+
uiTheme === "light" && styles12.optionTextActive
|
|
28668
28736
|
],
|
|
28669
28737
|
children: t.light
|
|
28670
28738
|
}
|
|
28671
28739
|
)
|
|
28672
28740
|
}
|
|
28673
28741
|
),
|
|
28674
|
-
/* @__PURE__ */ (0,
|
|
28675
|
-
|
|
28742
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28743
|
+
import_react_native12.Pressable,
|
|
28676
28744
|
{
|
|
28677
28745
|
onPress: () => setDocumentState({ uiTheme: "dark" }),
|
|
28678
28746
|
style: [
|
|
28679
|
-
|
|
28680
|
-
isDark &&
|
|
28681
|
-
uiTheme === "dark" &&
|
|
28747
|
+
styles12.optionButton,
|
|
28748
|
+
isDark && styles12.optionButtonDark,
|
|
28749
|
+
uiTheme === "dark" && styles12.optionButtonActive,
|
|
28682
28750
|
uiTheme === "dark" && { backgroundColor: accentColor }
|
|
28683
28751
|
],
|
|
28684
|
-
children: /* @__PURE__ */ (0,
|
|
28685
|
-
|
|
28752
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28753
|
+
import_react_native12.Text,
|
|
28686
28754
|
{
|
|
28687
28755
|
style: [
|
|
28688
|
-
|
|
28689
|
-
isDark &&
|
|
28690
|
-
uiTheme === "dark" &&
|
|
28756
|
+
styles12.optionText,
|
|
28757
|
+
isDark && styles12.optionTextDark,
|
|
28758
|
+
uiTheme === "dark" && styles12.optionTextActive
|
|
28691
28759
|
],
|
|
28692
28760
|
children: t.dark
|
|
28693
28761
|
}
|
|
@@ -28696,34 +28764,34 @@ var SettingsSheet = ({
|
|
|
28696
28764
|
)
|
|
28697
28765
|
] })
|
|
28698
28766
|
] }),
|
|
28699
|
-
/* @__PURE__ */ (0,
|
|
28700
|
-
/* @__PURE__ */ (0,
|
|
28701
|
-
|
|
28767
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.section, children: [
|
|
28768
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28769
|
+
import_react_native12.Text,
|
|
28702
28770
|
{
|
|
28703
|
-
style: [
|
|
28771
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28704
28772
|
children: t.pageTheme
|
|
28705
28773
|
}
|
|
28706
28774
|
),
|
|
28707
|
-
/* @__PURE__ */ (0,
|
|
28775
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.View, { style: styles12.themeOptionRow, children: PAGE_THEME_OPTIONS.map((option) => {
|
|
28708
28776
|
const active = pageTheme === option.value;
|
|
28709
|
-
return /* @__PURE__ */ (0,
|
|
28710
|
-
|
|
28777
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
28778
|
+
import_react_native12.Pressable,
|
|
28711
28779
|
{
|
|
28712
28780
|
onPress: () => setDocumentState({ pageTheme: option.value }),
|
|
28713
28781
|
style: [
|
|
28714
|
-
|
|
28715
|
-
isDark &&
|
|
28716
|
-
active &&
|
|
28782
|
+
styles12.themeOptionButton,
|
|
28783
|
+
isDark && styles12.themeOptionButtonDark,
|
|
28784
|
+
active && styles12.themeOptionButtonActive,
|
|
28717
28785
|
active && { borderColor: accentColor }
|
|
28718
28786
|
],
|
|
28719
28787
|
children: [
|
|
28720
|
-
/* @__PURE__ */ (0,
|
|
28721
|
-
/* @__PURE__ */ (0,
|
|
28722
|
-
|
|
28788
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(ThemeSwatch, { value: option.value }),
|
|
28789
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28790
|
+
import_react_native12.Text,
|
|
28723
28791
|
{
|
|
28724
28792
|
style: [
|
|
28725
|
-
|
|
28726
|
-
isDark &&
|
|
28793
|
+
styles12.themeOptionLabel,
|
|
28794
|
+
isDark && styles12.themeOptionLabelDark,
|
|
28727
28795
|
active && { color: accentColor }
|
|
28728
28796
|
],
|
|
28729
28797
|
children: t[option.labelKey]
|
|
@@ -28735,55 +28803,55 @@ var SettingsSheet = ({
|
|
|
28735
28803
|
);
|
|
28736
28804
|
}) })
|
|
28737
28805
|
] }),
|
|
28738
|
-
/* @__PURE__ */ (0,
|
|
28739
|
-
/* @__PURE__ */ (0,
|
|
28740
|
-
|
|
28806
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.section, children: [
|
|
28807
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28808
|
+
import_react_native12.Text,
|
|
28741
28809
|
{
|
|
28742
|
-
style: [
|
|
28810
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28743
28811
|
children: t.pageTransition
|
|
28744
28812
|
}
|
|
28745
28813
|
),
|
|
28746
|
-
/* @__PURE__ */ (0,
|
|
28747
|
-
/* @__PURE__ */ (0,
|
|
28748
|
-
|
|
28814
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.optionRow, children: [
|
|
28815
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28816
|
+
import_react_native12.Pressable,
|
|
28749
28817
|
{
|
|
28750
28818
|
onPress: () => handleTransition("continuous"),
|
|
28751
28819
|
style: [
|
|
28752
|
-
|
|
28753
|
-
isDark &&
|
|
28754
|
-
(!isPaged || isDouble) &&
|
|
28820
|
+
styles12.optionButton,
|
|
28821
|
+
isDark && styles12.optionButtonDark,
|
|
28822
|
+
(!isPaged || isDouble) && styles12.optionButtonActive,
|
|
28755
28823
|
(!isPaged || isDouble) && { backgroundColor: accentColor }
|
|
28756
28824
|
],
|
|
28757
|
-
children: /* @__PURE__ */ (0,
|
|
28758
|
-
|
|
28825
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28826
|
+
import_react_native12.Text,
|
|
28759
28827
|
{
|
|
28760
28828
|
style: [
|
|
28761
|
-
|
|
28762
|
-
isDark &&
|
|
28763
|
-
(!isPaged || isDouble) &&
|
|
28829
|
+
styles12.optionText,
|
|
28830
|
+
isDark && styles12.optionTextDark,
|
|
28831
|
+
(!isPaged || isDouble) && styles12.optionTextActive
|
|
28764
28832
|
],
|
|
28765
28833
|
children: t.continuous
|
|
28766
28834
|
}
|
|
28767
28835
|
)
|
|
28768
28836
|
}
|
|
28769
28837
|
),
|
|
28770
|
-
/* @__PURE__ */ (0,
|
|
28771
|
-
|
|
28838
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28839
|
+
import_react_native12.Pressable,
|
|
28772
28840
|
{
|
|
28773
28841
|
onPress: () => handleTransition("paged"),
|
|
28774
28842
|
style: [
|
|
28775
|
-
|
|
28776
|
-
isDark &&
|
|
28777
|
-
isPaged &&
|
|
28843
|
+
styles12.optionButton,
|
|
28844
|
+
isDark && styles12.optionButtonDark,
|
|
28845
|
+
isPaged && styles12.optionButtonActive,
|
|
28778
28846
|
isPaged && { backgroundColor: accentColor }
|
|
28779
28847
|
],
|
|
28780
|
-
children: /* @__PURE__ */ (0,
|
|
28781
|
-
|
|
28848
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28849
|
+
import_react_native12.Text,
|
|
28782
28850
|
{
|
|
28783
28851
|
style: [
|
|
28784
|
-
|
|
28785
|
-
isDark &&
|
|
28786
|
-
isPaged &&
|
|
28852
|
+
styles12.optionText,
|
|
28853
|
+
isDark && styles12.optionTextDark,
|
|
28854
|
+
isPaged && styles12.optionTextActive
|
|
28787
28855
|
],
|
|
28788
28856
|
children: t.pageByPage
|
|
28789
28857
|
}
|
|
@@ -28792,55 +28860,55 @@ var SettingsSheet = ({
|
|
|
28792
28860
|
)
|
|
28793
28861
|
] })
|
|
28794
28862
|
] }),
|
|
28795
|
-
/* @__PURE__ */ (0,
|
|
28796
|
-
/* @__PURE__ */ (0,
|
|
28797
|
-
|
|
28863
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.section, children: [
|
|
28864
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28865
|
+
import_react_native12.Text,
|
|
28798
28866
|
{
|
|
28799
|
-
style: [
|
|
28867
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28800
28868
|
children: t.layout
|
|
28801
28869
|
}
|
|
28802
28870
|
),
|
|
28803
|
-
/* @__PURE__ */ (0,
|
|
28804
|
-
/* @__PURE__ */ (0,
|
|
28805
|
-
|
|
28871
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.optionRow, children: [
|
|
28872
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28873
|
+
import_react_native12.Pressable,
|
|
28806
28874
|
{
|
|
28807
28875
|
onPress: () => handleLayout("single"),
|
|
28808
28876
|
style: [
|
|
28809
|
-
|
|
28810
|
-
isDark &&
|
|
28811
|
-
!isDouble &&
|
|
28877
|
+
styles12.optionButton,
|
|
28878
|
+
isDark && styles12.optionButtonDark,
|
|
28879
|
+
!isDouble && styles12.optionButtonActive,
|
|
28812
28880
|
!isDouble && { backgroundColor: accentColor }
|
|
28813
28881
|
],
|
|
28814
|
-
children: /* @__PURE__ */ (0,
|
|
28815
|
-
|
|
28882
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28883
|
+
import_react_native12.Text,
|
|
28816
28884
|
{
|
|
28817
28885
|
style: [
|
|
28818
|
-
|
|
28819
|
-
isDark &&
|
|
28820
|
-
!isDouble &&
|
|
28886
|
+
styles12.optionText,
|
|
28887
|
+
isDark && styles12.optionTextDark,
|
|
28888
|
+
!isDouble && styles12.optionTextActive
|
|
28821
28889
|
],
|
|
28822
28890
|
children: t.singlePage
|
|
28823
28891
|
}
|
|
28824
28892
|
)
|
|
28825
28893
|
}
|
|
28826
28894
|
),
|
|
28827
|
-
/* @__PURE__ */ (0,
|
|
28828
|
-
|
|
28895
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28896
|
+
import_react_native12.Pressable,
|
|
28829
28897
|
{
|
|
28830
28898
|
onPress: () => handleLayout("double"),
|
|
28831
28899
|
style: [
|
|
28832
|
-
|
|
28833
|
-
isDark &&
|
|
28834
|
-
isDouble &&
|
|
28900
|
+
styles12.optionButton,
|
|
28901
|
+
isDark && styles12.optionButtonDark,
|
|
28902
|
+
isDouble && styles12.optionButtonActive,
|
|
28835
28903
|
isDouble && { backgroundColor: accentColor }
|
|
28836
28904
|
],
|
|
28837
|
-
children: /* @__PURE__ */ (0,
|
|
28838
|
-
|
|
28905
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28906
|
+
import_react_native12.Text,
|
|
28839
28907
|
{
|
|
28840
28908
|
style: [
|
|
28841
|
-
|
|
28842
|
-
isDark &&
|
|
28843
|
-
isDouble &&
|
|
28909
|
+
styles12.optionText,
|
|
28910
|
+
isDark && styles12.optionTextDark,
|
|
28911
|
+
isDouble && styles12.optionTextActive
|
|
28844
28912
|
],
|
|
28845
28913
|
children: t.doublePage
|
|
28846
28914
|
}
|
|
@@ -28849,38 +28917,38 @@ var SettingsSheet = ({
|
|
|
28849
28917
|
)
|
|
28850
28918
|
] })
|
|
28851
28919
|
] }),
|
|
28852
|
-
/* @__PURE__ */ (0,
|
|
28853
|
-
/* @__PURE__ */ (0,
|
|
28854
|
-
|
|
28920
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.section, children: [
|
|
28921
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28922
|
+
import_react_native12.Text,
|
|
28855
28923
|
{
|
|
28856
|
-
style: [
|
|
28924
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28857
28925
|
children: t.rotate
|
|
28858
28926
|
}
|
|
28859
28927
|
),
|
|
28860
|
-
/* @__PURE__ */ (0,
|
|
28861
|
-
/* @__PURE__ */ (0,
|
|
28862
|
-
|
|
28928
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.optionRow, children: [
|
|
28929
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28930
|
+
import_react_native12.Pressable,
|
|
28863
28931
|
{
|
|
28864
28932
|
onPress: () => handleRotate("counterclockwise"),
|
|
28865
|
-
style: [
|
|
28866
|
-
children: /* @__PURE__ */ (0,
|
|
28867
|
-
|
|
28933
|
+
style: [styles12.optionButton, isDark && styles12.optionButtonDark],
|
|
28934
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28935
|
+
import_react_native12.Text,
|
|
28868
28936
|
{
|
|
28869
|
-
style: [
|
|
28937
|
+
style: [styles12.optionText, isDark && styles12.optionTextDark],
|
|
28870
28938
|
children: t.counterclockwise
|
|
28871
28939
|
}
|
|
28872
28940
|
)
|
|
28873
28941
|
}
|
|
28874
28942
|
),
|
|
28875
|
-
/* @__PURE__ */ (0,
|
|
28876
|
-
|
|
28943
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28944
|
+
import_react_native12.Pressable,
|
|
28877
28945
|
{
|
|
28878
28946
|
onPress: () => handleRotate("clockwise"),
|
|
28879
|
-
style: [
|
|
28880
|
-
children: /* @__PURE__ */ (0,
|
|
28881
|
-
|
|
28947
|
+
style: [styles12.optionButton, isDark && styles12.optionButtonDark],
|
|
28948
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28949
|
+
import_react_native12.Text,
|
|
28882
28950
|
{
|
|
28883
|
-
style: [
|
|
28951
|
+
style: [styles12.optionText, isDark && styles12.optionTextDark],
|
|
28884
28952
|
children: t.clockwise
|
|
28885
28953
|
}
|
|
28886
28954
|
)
|
|
@@ -28888,86 +28956,86 @@ var SettingsSheet = ({
|
|
|
28888
28956
|
)
|
|
28889
28957
|
] })
|
|
28890
28958
|
] }),
|
|
28891
|
-
/* @__PURE__ */ (0,
|
|
28892
|
-
/* @__PURE__ */ (0,
|
|
28893
|
-
|
|
28959
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.section, children: [
|
|
28960
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28961
|
+
import_react_native12.Text,
|
|
28894
28962
|
{
|
|
28895
|
-
style: [
|
|
28963
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28896
28964
|
children: t.zoom
|
|
28897
28965
|
}
|
|
28898
28966
|
),
|
|
28899
|
-
/* @__PURE__ */ (0,
|
|
28900
|
-
/* @__PURE__ */ (0,
|
|
28901
|
-
|
|
28967
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.optionRow, children: [
|
|
28968
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28969
|
+
import_react_native12.Pressable,
|
|
28902
28970
|
{
|
|
28903
28971
|
onPress: () => handleZoom(-0.1),
|
|
28904
|
-
style: [
|
|
28905
|
-
children: /* @__PURE__ */ (0,
|
|
28972
|
+
style: [styles12.optionButton, isDark && styles12.optionButtonDark],
|
|
28973
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconZoomOut, { size: 16, color: isDark ? "#e5e7eb" : "#111827" })
|
|
28906
28974
|
}
|
|
28907
28975
|
),
|
|
28908
|
-
/* @__PURE__ */ (0,
|
|
28976
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.View, { style: styles12.zoomValue, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.Text, { style: [styles12.zoomText, isDark && styles12.zoomTextDark], children: [
|
|
28909
28977
|
Math.round(zoom * 100),
|
|
28910
28978
|
"%"
|
|
28911
28979
|
] }) }),
|
|
28912
|
-
/* @__PURE__ */ (0,
|
|
28913
|
-
|
|
28980
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28981
|
+
import_react_native12.Pressable,
|
|
28914
28982
|
{
|
|
28915
28983
|
onPress: () => handleZoom(0.1),
|
|
28916
|
-
style: [
|
|
28917
|
-
children: /* @__PURE__ */ (0,
|
|
28984
|
+
style: [styles12.optionButton, isDark && styles12.optionButtonDark],
|
|
28985
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(IconZoomIn, { size: 16, color: isDark ? "#e5e7eb" : "#111827" })
|
|
28918
28986
|
}
|
|
28919
28987
|
)
|
|
28920
28988
|
] })
|
|
28921
28989
|
] }),
|
|
28922
|
-
/* @__PURE__ */ (0,
|
|
28923
|
-
/* @__PURE__ */ (0,
|
|
28924
|
-
|
|
28990
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.section, children: [
|
|
28991
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
28992
|
+
import_react_native12.Text,
|
|
28925
28993
|
{
|
|
28926
|
-
style: [
|
|
28994
|
+
style: [styles12.sectionTitle, isDark && styles12.sectionTitleDark],
|
|
28927
28995
|
children: t.language
|
|
28928
28996
|
}
|
|
28929
28997
|
),
|
|
28930
|
-
/* @__PURE__ */ (0,
|
|
28931
|
-
/* @__PURE__ */ (0,
|
|
28932
|
-
|
|
28998
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.optionRow, children: [
|
|
28999
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
29000
|
+
import_react_native12.Pressable,
|
|
28933
29001
|
{
|
|
28934
29002
|
onPress: () => setDocumentState({ locale: "en" }),
|
|
28935
29003
|
style: [
|
|
28936
|
-
|
|
28937
|
-
isDark &&
|
|
28938
|
-
locale === "en" &&
|
|
29004
|
+
styles12.optionButton,
|
|
29005
|
+
isDark && styles12.optionButtonDark,
|
|
29006
|
+
locale === "en" && styles12.optionButtonActive,
|
|
28939
29007
|
locale === "en" && { backgroundColor: accentColor }
|
|
28940
29008
|
],
|
|
28941
|
-
children: /* @__PURE__ */ (0,
|
|
28942
|
-
|
|
29009
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
29010
|
+
import_react_native12.Text,
|
|
28943
29011
|
{
|
|
28944
29012
|
style: [
|
|
28945
|
-
|
|
28946
|
-
isDark &&
|
|
28947
|
-
locale === "en" &&
|
|
29013
|
+
styles12.optionText,
|
|
29014
|
+
isDark && styles12.optionTextDark,
|
|
29015
|
+
locale === "en" && styles12.optionTextActive
|
|
28948
29016
|
],
|
|
28949
29017
|
children: t.english
|
|
28950
29018
|
}
|
|
28951
29019
|
)
|
|
28952
29020
|
}
|
|
28953
29021
|
),
|
|
28954
|
-
/* @__PURE__ */ (0,
|
|
28955
|
-
|
|
29022
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
29023
|
+
import_react_native12.Pressable,
|
|
28956
29024
|
{
|
|
28957
29025
|
onPress: () => setDocumentState({ locale: "pt-BR" }),
|
|
28958
29026
|
style: [
|
|
28959
|
-
|
|
28960
|
-
isDark &&
|
|
28961
|
-
locale === "pt-BR" &&
|
|
29027
|
+
styles12.optionButton,
|
|
29028
|
+
isDark && styles12.optionButtonDark,
|
|
29029
|
+
locale === "pt-BR" && styles12.optionButtonActive,
|
|
28962
29030
|
locale === "pt-BR" && { backgroundColor: accentColor }
|
|
28963
29031
|
],
|
|
28964
|
-
children: /* @__PURE__ */ (0,
|
|
28965
|
-
|
|
29032
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(
|
|
29033
|
+
import_react_native12.Text,
|
|
28966
29034
|
{
|
|
28967
29035
|
style: [
|
|
28968
|
-
|
|
28969
|
-
isDark &&
|
|
28970
|
-
locale === "pt-BR" &&
|
|
29036
|
+
styles12.optionText,
|
|
29037
|
+
isDark && styles12.optionTextDark,
|
|
29038
|
+
locale === "pt-BR" && styles12.optionTextActive
|
|
28971
29039
|
],
|
|
28972
29040
|
children: t.portuguese
|
|
28973
29041
|
}
|
|
@@ -28980,44 +29048,16 @@ var SettingsSheet = ({
|
|
|
28980
29048
|
}
|
|
28981
29049
|
)
|
|
28982
29050
|
}
|
|
28983
|
-
)
|
|
29051
|
+
);
|
|
28984
29052
|
};
|
|
28985
|
-
var
|
|
28986
|
-
modalRoot: {
|
|
28987
|
-
...import_react_native11.StyleSheet.absoluteFillObject,
|
|
28988
|
-
zIndex: 30
|
|
28989
|
-
},
|
|
29053
|
+
var styles12 = import_react_native12.StyleSheet.create({
|
|
28990
29054
|
sheet: {
|
|
28991
|
-
|
|
29055
|
+
maxHeight: "100%"
|
|
28992
29056
|
},
|
|
28993
29057
|
sheetContent: {
|
|
28994
29058
|
paddingHorizontal: 18,
|
|
28995
29059
|
paddingBottom: 24
|
|
28996
29060
|
},
|
|
28997
|
-
sheetBackground: {
|
|
28998
|
-
backgroundColor: "#ffffff",
|
|
28999
|
-
borderTopLeftRadius: 24,
|
|
29000
|
-
borderTopRightRadius: 24,
|
|
29001
|
-
borderTopWidth: 1,
|
|
29002
|
-
borderTopColor: "#e5e7eb"
|
|
29003
|
-
},
|
|
29004
|
-
sheetDark: {
|
|
29005
|
-
backgroundColor: "#0f1115",
|
|
29006
|
-
borderTopColor: "#1f2937"
|
|
29007
|
-
},
|
|
29008
|
-
handleContainer: {
|
|
29009
|
-
paddingTop: 10,
|
|
29010
|
-
paddingBottom: 12
|
|
29011
|
-
},
|
|
29012
|
-
handle: {
|
|
29013
|
-
width: 44,
|
|
29014
|
-
height: 4,
|
|
29015
|
-
borderRadius: 999,
|
|
29016
|
-
backgroundColor: "#cbd5f5"
|
|
29017
|
-
},
|
|
29018
|
-
handleDark: {
|
|
29019
|
-
backgroundColor: "#374151"
|
|
29020
|
-
},
|
|
29021
29061
|
section: {
|
|
29022
29062
|
marginBottom: 16
|
|
29023
29063
|
},
|
|
@@ -29143,10 +29183,10 @@ var styles11 = import_react_native11.StyleSheet.create({
|
|
|
29143
29183
|
var SettingsSheet_default = SettingsSheet;
|
|
29144
29184
|
|
|
29145
29185
|
// components/CoverPreview.tsx
|
|
29146
|
-
var
|
|
29147
|
-
var
|
|
29186
|
+
var import_react10 = require("react");
|
|
29187
|
+
var import_react_native13 = require("react-native");
|
|
29148
29188
|
var import_engine_native4 = require("@papyrus-sdk/engine-native");
|
|
29149
|
-
var
|
|
29189
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
29150
29190
|
var parseDataUri = (value) => {
|
|
29151
29191
|
const match = /^data:([^;,]+)?(;base64)?,/.exec(value);
|
|
29152
29192
|
if (!match) return null;
|
|
@@ -29194,18 +29234,18 @@ var CoverPreview = ({
|
|
|
29194
29234
|
onLoadEnd,
|
|
29195
29235
|
onError
|
|
29196
29236
|
}) => {
|
|
29197
|
-
const [engine, setEngine] = (0,
|
|
29198
|
-
const [layoutReady, setLayoutReady] = (0,
|
|
29199
|
-
const [loaded, setLoaded] = (0,
|
|
29200
|
-
const [loading, setLoading] = (0,
|
|
29201
|
-
const [error, setError] = (0,
|
|
29202
|
-
const viewRef = (0,
|
|
29203
|
-
const resolvedType = (0,
|
|
29237
|
+
const [engine, setEngine] = (0, import_react10.useState)(null);
|
|
29238
|
+
const [layoutReady, setLayoutReady] = (0, import_react10.useState)(false);
|
|
29239
|
+
const [loaded, setLoaded] = (0, import_react10.useState)(false);
|
|
29240
|
+
const [loading, setLoading] = (0, import_react10.useState)(false);
|
|
29241
|
+
const [error, setError] = (0, import_react10.useState)(null);
|
|
29242
|
+
const viewRef = (0, import_react10.useRef)(null);
|
|
29243
|
+
const resolvedType = (0, import_react10.useMemo)(() => inferDocumentType(source, type), [source, type]);
|
|
29204
29244
|
const isPdf = resolvedType === "pdf";
|
|
29205
|
-
const hasNativePageView = Boolean(
|
|
29245
|
+
const hasNativePageView = Boolean(import_react_native13.UIManager.getViewManagerConfig?.("PapyrusPageView"));
|
|
29206
29246
|
const canRender = !isPdf || hasNativePageView;
|
|
29207
29247
|
const shouldRender = Boolean(visible);
|
|
29208
|
-
(0,
|
|
29248
|
+
(0, import_react10.useEffect)(() => {
|
|
29209
29249
|
if (!shouldRender) {
|
|
29210
29250
|
if (!keepAlive) {
|
|
29211
29251
|
setEngine(null);
|
|
@@ -29218,7 +29258,7 @@ var CoverPreview = ({
|
|
|
29218
29258
|
setEngine(new import_engine_native4.MobileDocumentEngine());
|
|
29219
29259
|
}
|
|
29220
29260
|
}, [shouldRender, keepAlive, engine, canRender]);
|
|
29221
|
-
(0,
|
|
29261
|
+
(0, import_react10.useEffect)(() => {
|
|
29222
29262
|
if (!engine || !shouldRender || !canRender) return;
|
|
29223
29263
|
let active = true;
|
|
29224
29264
|
setLoading(true);
|
|
@@ -29245,13 +29285,13 @@ var CoverPreview = ({
|
|
|
29245
29285
|
active = false;
|
|
29246
29286
|
};
|
|
29247
29287
|
}, [engine, shouldRender, canRender, source, type, pageIndex, isPdf, onLoadStart, onLoadEnd, onError]);
|
|
29248
|
-
(0,
|
|
29288
|
+
(0, import_react10.useEffect)(() => {
|
|
29249
29289
|
if (!engine || !isPdf || !loaded || !layoutReady || !shouldRender || !canRender) return;
|
|
29250
|
-
const viewTag = (0,
|
|
29290
|
+
const viewTag = (0, import_react_native13.findNodeHandle)(viewRef.current);
|
|
29251
29291
|
if (!viewTag) return;
|
|
29252
29292
|
engine.renderPage(pageIndex, viewTag, renderScale);
|
|
29253
29293
|
}, [engine, isPdf, loaded, layoutReady, shouldRender, canRender, pageIndex, renderScale]);
|
|
29254
|
-
(0,
|
|
29294
|
+
(0, import_react10.useEffect)(() => {
|
|
29255
29295
|
return () => {
|
|
29256
29296
|
engine?.destroy();
|
|
29257
29297
|
};
|
|
@@ -29263,15 +29303,15 @@ var CoverPreview = ({
|
|
|
29263
29303
|
}
|
|
29264
29304
|
};
|
|
29265
29305
|
if (!shouldRender || !canRender) {
|
|
29266
|
-
return /* @__PURE__ */ (0,
|
|
29306
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.View, { style: [styles13.container, style], children: placeholder ?? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.View, { style: styles13.placeholder, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.Text, { style: styles13.placeholderText, children: "Preview" }) }) });
|
|
29267
29307
|
}
|
|
29268
|
-
return /* @__PURE__ */ (0,
|
|
29269
|
-
/* @__PURE__ */ (0,
|
|
29270
|
-
showLoading && loading && /* @__PURE__ */ (0,
|
|
29271
|
-
error && /* @__PURE__ */ (0,
|
|
29308
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native13.View, { style: [styles13.container, style], onLayout: handleLayout, children: [
|
|
29309
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.View, { style: styles13.previewFrame, pointerEvents: allowInteraction ? "auto" : "none", children: isPdf ? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_engine_native4.PapyrusPageView, { ref: viewRef, style: styles13.pageView }) : engine && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(WebViewViewer_default, { engine }) }),
|
|
29310
|
+
showLoading && loading && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.View, { pointerEvents: "none", style: styles13.loadingOverlay, children: loadingIndicator ?? /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.ActivityIndicator, { size: "small", color: "#2563eb" }) }),
|
|
29311
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.View, { pointerEvents: "none", style: styles13.errorOverlay, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.Text, { style: styles13.errorText, children: "Preview unavailable" }) })
|
|
29272
29312
|
] });
|
|
29273
29313
|
};
|
|
29274
|
-
var
|
|
29314
|
+
var styles13 = import_react_native13.StyleSheet.create({
|
|
29275
29315
|
container: {
|
|
29276
29316
|
backgroundColor: "#f8fafc",
|
|
29277
29317
|
borderRadius: 12,
|
|
@@ -29287,13 +29327,13 @@ var styles12 = import_react_native12.StyleSheet.create({
|
|
|
29287
29327
|
backgroundColor: "transparent"
|
|
29288
29328
|
},
|
|
29289
29329
|
loadingOverlay: {
|
|
29290
|
-
...
|
|
29330
|
+
...import_react_native13.StyleSheet.absoluteFillObject,
|
|
29291
29331
|
alignItems: "center",
|
|
29292
29332
|
justifyContent: "center",
|
|
29293
29333
|
backgroundColor: "rgba(15, 23, 42, 0.15)"
|
|
29294
29334
|
},
|
|
29295
29335
|
errorOverlay: {
|
|
29296
|
-
...
|
|
29336
|
+
...import_react_native13.StyleSheet.absoluteFillObject,
|
|
29297
29337
|
alignItems: "center",
|
|
29298
29338
|
justifyContent: "center",
|
|
29299
29339
|
backgroundColor: "rgba(15, 23, 42, 0.4)"
|
|
@@ -29318,37 +29358,37 @@ var styles12 = import_react_native12.StyleSheet.create({
|
|
|
29318
29358
|
var CoverPreview_default = CoverPreview;
|
|
29319
29359
|
|
|
29320
29360
|
// components/ReadingShell.tsx
|
|
29321
|
-
var
|
|
29322
|
-
var
|
|
29361
|
+
var import_react13 = __toESM(require("react"));
|
|
29362
|
+
var import_react_native20 = require("react-native");
|
|
29323
29363
|
var import_core17 = require("@papyrus-sdk/core");
|
|
29324
29364
|
|
|
29325
29365
|
// components/DocumentActionsSheet.tsx
|
|
29326
|
-
var
|
|
29366
|
+
var import_react_native14 = require("react-native");
|
|
29327
29367
|
var import_core11 = require("@papyrus-sdk/core");
|
|
29328
|
-
var
|
|
29368
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
29329
29369
|
function DocumentActionsSheet({
|
|
29330
29370
|
visible,
|
|
29331
29371
|
onClose
|
|
29332
29372
|
}) {
|
|
29333
29373
|
const { uiTheme } = (0, import_core11.useViewerStore)();
|
|
29334
29374
|
const isDark = uiTheme === "dark";
|
|
29335
|
-
return /* @__PURE__ */ (0,
|
|
29336
|
-
|
|
29375
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.Pressable, { style: styles14.backdrop, onPress: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
29376
|
+
import_react_native14.Pressable,
|
|
29337
29377
|
{
|
|
29338
29378
|
onPress: (event) => event.stopPropagation(),
|
|
29339
|
-
style: [
|
|
29379
|
+
style: [styles14.card, isDark && styles14.cardDark],
|
|
29340
29380
|
children: [
|
|
29341
|
-
/* @__PURE__ */ (0,
|
|
29342
|
-
/* @__PURE__ */ (0,
|
|
29343
|
-
/* @__PURE__ */ (0,
|
|
29344
|
-
/* @__PURE__ */ (0,
|
|
29381
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.Text, { style: [styles14.eyebrow, isDark && styles14.eyebrowDark], children: "Document actions" }),
|
|
29382
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(import_react_native14.View, { style: styles14.actionList, children: [
|
|
29383
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.View, { style: [styles14.actionItem, isDark && styles14.actionItemDark], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.Text, { style: [styles14.actionText, isDark && styles14.actionTextDark], children: "Share" }) }),
|
|
29384
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.View, { style: [styles14.actionItem, isDark && styles14.actionItemDark], children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.Text, { style: [styles14.actionText, isDark && styles14.actionTextDark], children: "Export" }) })
|
|
29345
29385
|
] }),
|
|
29346
|
-
/* @__PURE__ */ (0,
|
|
29386
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.Pressable, { onPress: onClose, style: styles14.closeButton, accessibilityLabel: "Close actions sheet", children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.Text, { style: styles14.closeText, children: "Close" }) })
|
|
29347
29387
|
]
|
|
29348
29388
|
}
|
|
29349
29389
|
) }) });
|
|
29350
29390
|
}
|
|
29351
|
-
var
|
|
29391
|
+
var styles14 = import_react_native14.StyleSheet.create({
|
|
29352
29392
|
backdrop: {
|
|
29353
29393
|
flex: 1,
|
|
29354
29394
|
backgroundColor: "rgba(15, 23, 42, 0.35)",
|
|
@@ -29409,7 +29449,7 @@ var styles13 = import_react_native13.StyleSheet.create({
|
|
|
29409
29449
|
});
|
|
29410
29450
|
|
|
29411
29451
|
// components/InfoSheet.tsx
|
|
29412
|
-
var
|
|
29452
|
+
var import_react_native15 = require("react-native");
|
|
29413
29453
|
var import_core12 = require("@papyrus-sdk/core");
|
|
29414
29454
|
|
|
29415
29455
|
// components/infoSheetModel.ts
|
|
@@ -29509,7 +29549,7 @@ var buildInfoRows = ({
|
|
|
29509
29549
|
};
|
|
29510
29550
|
|
|
29511
29551
|
// components/InfoSheet.tsx
|
|
29512
|
-
var
|
|
29552
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
29513
29553
|
function InfoSheet({
|
|
29514
29554
|
visible,
|
|
29515
29555
|
title,
|
|
@@ -29539,66 +29579,66 @@ function InfoSheet({
|
|
|
29539
29579
|
pageTheme,
|
|
29540
29580
|
locale
|
|
29541
29581
|
});
|
|
29542
|
-
return /* @__PURE__ */ (0,
|
|
29543
|
-
|
|
29582
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
29583
|
+
import_react_native15.Modal,
|
|
29544
29584
|
{
|
|
29545
29585
|
visible,
|
|
29546
29586
|
transparent: true,
|
|
29547
29587
|
animationType: "fade",
|
|
29548
29588
|
onRequestClose: onClose,
|
|
29549
|
-
children: /* @__PURE__ */ (0,
|
|
29550
|
-
|
|
29589
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.Pressable, { style: styles15.backdrop, onPress: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
29590
|
+
import_react_native15.Pressable,
|
|
29551
29591
|
{
|
|
29552
29592
|
onPress: (event) => event.stopPropagation(),
|
|
29553
|
-
style: [
|
|
29593
|
+
style: [styles15.card, isDark && styles15.cardDark],
|
|
29554
29594
|
children: [
|
|
29555
|
-
/* @__PURE__ */ (0,
|
|
29556
|
-
/* @__PURE__ */ (0,
|
|
29557
|
-
|
|
29595
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(import_react_native15.View, { style: styles15.topRow, children: [
|
|
29596
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
29597
|
+
import_react_native15.Pressable,
|
|
29558
29598
|
{
|
|
29559
29599
|
onPress: onClose,
|
|
29560
29600
|
style: [
|
|
29561
|
-
|
|
29562
|
-
isDark &&
|
|
29601
|
+
styles15.iconCloseButton,
|
|
29602
|
+
isDark && styles15.iconCloseButtonDark
|
|
29563
29603
|
],
|
|
29564
29604
|
accessibilityLabel: "Close info sheet",
|
|
29565
|
-
children: /* @__PURE__ */ (0,
|
|
29605
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(IconClose, { size: 18, color: isDark ? "#f8fafc" : "#111827" })
|
|
29566
29606
|
}
|
|
29567
29607
|
),
|
|
29568
|
-
/* @__PURE__ */ (0,
|
|
29569
|
-
|
|
29608
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
29609
|
+
import_react_native15.Text,
|
|
29570
29610
|
{
|
|
29571
|
-
style: [
|
|
29611
|
+
style: [styles15.headerTitle, isDark && styles15.headerTitleDark],
|
|
29572
29612
|
numberOfLines: 1,
|
|
29573
29613
|
children: locale === "pt-BR" ? "Informa\xE7\xF5es" : "Information"
|
|
29574
29614
|
}
|
|
29575
29615
|
),
|
|
29576
|
-
/* @__PURE__ */ (0,
|
|
29616
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.View, { style: styles15.topRowSpacer })
|
|
29577
29617
|
] }),
|
|
29578
|
-
/* @__PURE__ */ (0,
|
|
29579
|
-
|
|
29618
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
29619
|
+
import_react_native15.ScrollView,
|
|
29580
29620
|
{
|
|
29581
|
-
style:
|
|
29582
|
-
contentContainerStyle:
|
|
29621
|
+
style: styles15.content,
|
|
29622
|
+
contentContainerStyle: styles15.contentInner,
|
|
29583
29623
|
showsVerticalScrollIndicator: false,
|
|
29584
29624
|
children: [
|
|
29585
|
-
/* @__PURE__ */ (0,
|
|
29586
|
-
|
|
29625
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
29626
|
+
import_react_native15.Text,
|
|
29587
29627
|
{
|
|
29588
|
-
style: [
|
|
29628
|
+
style: [styles15.sectionTitle, isDark && styles15.sectionTitleDark],
|
|
29589
29629
|
children: locale === "pt-BR" ? "Informa\xE7\xF5es" : "Information"
|
|
29590
29630
|
}
|
|
29591
29631
|
),
|
|
29592
|
-
/* @__PURE__ */ (0,
|
|
29593
|
-
|
|
29632
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.View, { style: styles15.rows, children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
29633
|
+
import_react_native15.View,
|
|
29594
29634
|
{
|
|
29595
|
-
style: [
|
|
29635
|
+
style: [styles15.row, isDark && styles15.rowDark],
|
|
29596
29636
|
children: [
|
|
29597
|
-
/* @__PURE__ */ (0,
|
|
29598
|
-
/* @__PURE__ */ (0,
|
|
29599
|
-
|
|
29637
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.Text, { style: [styles15.label, isDark && styles15.labelDark], children: row.label }),
|
|
29638
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
29639
|
+
import_react_native15.Text,
|
|
29600
29640
|
{
|
|
29601
|
-
style: [
|
|
29641
|
+
style: [styles15.value, isDark && styles15.valueDark],
|
|
29602
29642
|
selectable: true,
|
|
29603
29643
|
children: row.value
|
|
29604
29644
|
}
|
|
@@ -29616,7 +29656,7 @@ function InfoSheet({
|
|
|
29616
29656
|
}
|
|
29617
29657
|
);
|
|
29618
29658
|
}
|
|
29619
|
-
var
|
|
29659
|
+
var styles15 = import_react_native15.StyleSheet.create({
|
|
29620
29660
|
backdrop: {
|
|
29621
29661
|
flex: 1,
|
|
29622
29662
|
backgroundColor: "rgba(0, 0, 0, 0.4)",
|
|
@@ -29719,9 +29759,9 @@ var styles14 = import_react_native14.StyleSheet.create({
|
|
|
29719
29759
|
});
|
|
29720
29760
|
|
|
29721
29761
|
// components/OverflowSheet.tsx
|
|
29722
|
-
var
|
|
29762
|
+
var import_react_native16 = require("react-native");
|
|
29723
29763
|
var import_core13 = require("@papyrus-sdk/core");
|
|
29724
|
-
var
|
|
29764
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
29725
29765
|
var actionLabels = [{ key: "actions", label: "Document actions" }];
|
|
29726
29766
|
function OverflowSheet({
|
|
29727
29767
|
visible,
|
|
@@ -29733,30 +29773,30 @@ function OverflowSheet({
|
|
|
29733
29773
|
const handlers = {
|
|
29734
29774
|
actions: onOpenActions
|
|
29735
29775
|
};
|
|
29736
|
-
return /* @__PURE__ */ (0,
|
|
29737
|
-
|
|
29776
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
29777
|
+
import_react_native16.Modal,
|
|
29738
29778
|
{
|
|
29739
29779
|
visible,
|
|
29740
29780
|
transparent: true,
|
|
29741
29781
|
animationType: "fade",
|
|
29742
29782
|
onRequestClose: onClose,
|
|
29743
|
-
children: /* @__PURE__ */ (0,
|
|
29744
|
-
|
|
29783
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Pressable, { style: styles16.backdrop, onPress: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
29784
|
+
import_react_native16.Pressable,
|
|
29745
29785
|
{
|
|
29746
29786
|
onPress: (event) => event.stopPropagation(),
|
|
29747
|
-
style: [
|
|
29787
|
+
style: [styles16.card, isDark && styles16.cardDark],
|
|
29748
29788
|
children: [
|
|
29749
|
-
/* @__PURE__ */ (0,
|
|
29750
|
-
actionLabels.map((action) => /* @__PURE__ */ (0,
|
|
29751
|
-
|
|
29789
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.View, { style: styles16.handle }),
|
|
29790
|
+
actionLabels.map((action) => /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
29791
|
+
import_react_native16.Pressable,
|
|
29752
29792
|
{
|
|
29753
29793
|
onPress: handlers[action.key],
|
|
29754
|
-
style: [
|
|
29794
|
+
style: [styles16.actionButton, { borderColor: accentColor }],
|
|
29755
29795
|
accessibilityLabel: action.label,
|
|
29756
|
-
children: /* @__PURE__ */ (0,
|
|
29757
|
-
|
|
29796
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
29797
|
+
import_react_native16.Text,
|
|
29758
29798
|
{
|
|
29759
|
-
style: [
|
|
29799
|
+
style: [styles16.actionText, isDark && styles16.actionTextDark],
|
|
29760
29800
|
children: action.label
|
|
29761
29801
|
}
|
|
29762
29802
|
)
|
|
@@ -29769,7 +29809,7 @@ function OverflowSheet({
|
|
|
29769
29809
|
}
|
|
29770
29810
|
);
|
|
29771
29811
|
}
|
|
29772
|
-
var
|
|
29812
|
+
var styles16 = import_react_native16.StyleSheet.create({
|
|
29773
29813
|
backdrop: {
|
|
29774
29814
|
flex: 1,
|
|
29775
29815
|
backgroundColor: "rgba(15, 23, 42, 0.35)",
|
|
@@ -29810,10 +29850,10 @@ var styles15 = import_react_native15.StyleSheet.create({
|
|
|
29810
29850
|
});
|
|
29811
29851
|
|
|
29812
29852
|
// components/ProgressPill.tsx
|
|
29813
|
-
var
|
|
29814
|
-
var
|
|
29853
|
+
var import_react11 = require("react");
|
|
29854
|
+
var import_react_native17 = require("react-native");
|
|
29815
29855
|
var import_core14 = require("@papyrus-sdk/core");
|
|
29816
|
-
var
|
|
29856
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
29817
29857
|
var clampPercent = (value) => Math.max(0, Math.min(100, Math.round(value)));
|
|
29818
29858
|
function ProgressPill({
|
|
29819
29859
|
documentType,
|
|
@@ -29829,7 +29869,7 @@ function ProgressPill({
|
|
|
29829
29869
|
mobileProgressPillVisible
|
|
29830
29870
|
} = (0, import_core14.useViewerStore)();
|
|
29831
29871
|
const isDark = uiTheme === "dark";
|
|
29832
|
-
const label = (0,
|
|
29872
|
+
const label = (0, import_react11.useMemo)(() => {
|
|
29833
29873
|
const total = Math.max(pageCount, 1);
|
|
29834
29874
|
const percent = clampPercent(currentPage / total * 100);
|
|
29835
29875
|
if (documentType === "pdf") {
|
|
@@ -29841,24 +29881,24 @@ function ProgressPill({
|
|
|
29841
29881
|
return `${percent}%`;
|
|
29842
29882
|
}, [currentPage, documentType, pageCount]);
|
|
29843
29883
|
if (!mobileChromeVisible || !mobileProgressPillVisible) return null;
|
|
29844
|
-
return /* @__PURE__ */ (0,
|
|
29845
|
-
|
|
29884
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.View, { pointerEvents: "box-none", style: styles17.frame, children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
29885
|
+
import_react_native17.View,
|
|
29846
29886
|
{
|
|
29847
29887
|
accessibilityLabel: "Open document navigation",
|
|
29848
29888
|
style: [
|
|
29849
|
-
|
|
29850
|
-
isDark &&
|
|
29889
|
+
styles17.pill,
|
|
29890
|
+
isDark && styles17.pillDark,
|
|
29851
29891
|
{ borderColor: `${accentColor}33` }
|
|
29852
29892
|
],
|
|
29853
29893
|
testID: "papyrus-progress-pill",
|
|
29854
29894
|
children: [
|
|
29855
|
-
/* @__PURE__ */ (0,
|
|
29856
|
-
|
|
29895
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
29896
|
+
import_react_native17.Pressable,
|
|
29857
29897
|
{
|
|
29858
29898
|
onPress,
|
|
29859
|
-
style:
|
|
29899
|
+
style: styles17.iconHit,
|
|
29860
29900
|
accessibilityLabel: "Open document navigation",
|
|
29861
|
-
children: /* @__PURE__ */ (0,
|
|
29901
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
29862
29902
|
IconPageNav,
|
|
29863
29903
|
{
|
|
29864
29904
|
size: 20,
|
|
@@ -29868,21 +29908,21 @@ function ProgressPill({
|
|
|
29868
29908
|
)
|
|
29869
29909
|
}
|
|
29870
29910
|
),
|
|
29871
|
-
/* @__PURE__ */ (0,
|
|
29872
|
-
|
|
29911
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
29912
|
+
import_react_native17.Pressable,
|
|
29873
29913
|
{
|
|
29874
29914
|
onPress,
|
|
29875
29915
|
onLongPress: onOpenPageJump,
|
|
29876
|
-
style:
|
|
29916
|
+
style: styles17.labelHit,
|
|
29877
29917
|
accessibilityLabel: "Open page jump",
|
|
29878
|
-
children: /* @__PURE__ */ (0,
|
|
29918
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: [styles17.label, isDark && styles17.labelDark], children: label })
|
|
29879
29919
|
}
|
|
29880
29920
|
)
|
|
29881
29921
|
]
|
|
29882
29922
|
}
|
|
29883
29923
|
) });
|
|
29884
29924
|
}
|
|
29885
|
-
var
|
|
29925
|
+
var styles17 = import_react_native17.StyleSheet.create({
|
|
29886
29926
|
frame: {
|
|
29887
29927
|
position: "absolute",
|
|
29888
29928
|
top: 72,
|
|
@@ -29930,10 +29970,10 @@ var styles16 = import_react_native16.StyleSheet.create({
|
|
|
29930
29970
|
});
|
|
29931
29971
|
|
|
29932
29972
|
// components/SearchOverlay.tsx
|
|
29933
|
-
var
|
|
29934
|
-
var
|
|
29973
|
+
var import_react12 = require("react");
|
|
29974
|
+
var import_react_native18 = require("react-native");
|
|
29935
29975
|
var import_core15 = require("@papyrus-sdk/core");
|
|
29936
|
-
var
|
|
29976
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
29937
29977
|
function SearchOverlay({
|
|
29938
29978
|
engine,
|
|
29939
29979
|
documentType,
|
|
@@ -29952,14 +29992,14 @@ function SearchOverlay({
|
|
|
29952
29992
|
uiTheme,
|
|
29953
29993
|
accentColor
|
|
29954
29994
|
} = (0, import_core15.useViewerStore)();
|
|
29955
|
-
const [draft, setDraft] = (0,
|
|
29956
|
-
const [isSearching, setIsSearching] = (0,
|
|
29995
|
+
const [draft, setDraft] = (0, import_react12.useState)(searchQuery);
|
|
29996
|
+
const [isSearching, setIsSearching] = (0, import_react12.useState)(false);
|
|
29957
29997
|
const isDark = uiTheme === "dark";
|
|
29958
29998
|
const t = getStrings(locale);
|
|
29959
|
-
const searchService = (0,
|
|
29999
|
+
const searchService = (0, import_react12.useMemo)(() => new import_core15.SearchService(engine), [engine]);
|
|
29960
30000
|
const currentCount = searchResults.length > 0 && activeSearchIndex >= 0 ? activeSearchIndex + 1 : 0;
|
|
29961
30001
|
const targetLabel = documentType === "pdf" ? t.page : documentType === "epub" ? t.contents : t.progress;
|
|
29962
|
-
(0,
|
|
30002
|
+
(0, import_react12.useEffect)(() => {
|
|
29963
30003
|
if (!visible) return;
|
|
29964
30004
|
setDraft(searchQuery);
|
|
29965
30005
|
}, [searchQuery, visible]);
|
|
@@ -29978,28 +30018,28 @@ function SearchOverlay({
|
|
|
29978
30018
|
}
|
|
29979
30019
|
};
|
|
29980
30020
|
const handleClose = () => {
|
|
29981
|
-
|
|
30021
|
+
import_react_native18.Keyboard.dismiss();
|
|
29982
30022
|
setSearch("", []);
|
|
29983
30023
|
onClose();
|
|
29984
30024
|
};
|
|
29985
30025
|
if (!visible) return null;
|
|
29986
|
-
return /* @__PURE__ */ (0,
|
|
29987
|
-
|
|
30026
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native18.View, { pointerEvents: "box-none", style: styles18.frame, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(
|
|
30027
|
+
import_react_native18.View,
|
|
29988
30028
|
{
|
|
29989
|
-
style: [
|
|
30029
|
+
style: [styles18.card, isDark && styles18.cardDark],
|
|
29990
30030
|
testID: "papyrus-search-overlay",
|
|
29991
30031
|
children: [
|
|
29992
|
-
/* @__PURE__ */ (0,
|
|
29993
|
-
/* @__PURE__ */ (0,
|
|
29994
|
-
/* @__PURE__ */ (0,
|
|
29995
|
-
/* @__PURE__ */ (0,
|
|
29996
|
-
|
|
30032
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native18.View, { style: styles18.inputRow, children: [
|
|
30033
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native18.View, { style: [styles18.searchInputWrap, isDark && styles18.searchInputWrapDark], children: [
|
|
30034
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(IconSearch, { size: 16, color: isDark ? "#cbd5e1" : "#64748b" }),
|
|
30035
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
30036
|
+
import_react_native18.TextInput,
|
|
29997
30037
|
{
|
|
29998
30038
|
value: draft,
|
|
29999
30039
|
onChangeText: setDraft,
|
|
30000
30040
|
placeholder: t.searchPlaceholder,
|
|
30001
30041
|
placeholderTextColor: isDark ? "#94a3b8" : "#6b7280",
|
|
30002
|
-
style: [
|
|
30042
|
+
style: [styles18.input, isDark && styles18.inputDark],
|
|
30003
30043
|
autoFocus: true,
|
|
30004
30044
|
returnKeyType: "search",
|
|
30005
30045
|
onSubmitEditing: handleSubmit,
|
|
@@ -30007,74 +30047,74 @@ function SearchOverlay({
|
|
|
30007
30047
|
}
|
|
30008
30048
|
)
|
|
30009
30049
|
] }),
|
|
30010
|
-
/* @__PURE__ */ (0,
|
|
30011
|
-
|
|
30050
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
30051
|
+
import_react_native18.Pressable,
|
|
30012
30052
|
{
|
|
30013
30053
|
onPress: handleClose,
|
|
30014
|
-
style: [
|
|
30054
|
+
style: [styles18.closeButton, isDark && styles18.closeButtonDark],
|
|
30015
30055
|
accessibilityLabel: "Close search",
|
|
30016
|
-
children: /* @__PURE__ */ (0,
|
|
30056
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native18.Text, { style: [styles18.closeText, isDark && styles18.closeTextDark], children: t.cancel })
|
|
30017
30057
|
}
|
|
30018
30058
|
)
|
|
30019
30059
|
] }),
|
|
30020
|
-
/* @__PURE__ */ (0,
|
|
30021
|
-
/* @__PURE__ */ (0,
|
|
30022
|
-
|
|
30060
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native18.View, { style: styles18.metaRow, children: [
|
|
30061
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
30062
|
+
import_react_native18.Pressable,
|
|
30023
30063
|
{
|
|
30024
30064
|
onPress: prevSearchResult,
|
|
30025
30065
|
disabled: searchResults.length === 0,
|
|
30026
30066
|
style: [
|
|
30027
|
-
|
|
30028
|
-
isDark &&
|
|
30029
|
-
searchResults.length === 0 &&
|
|
30067
|
+
styles18.navButton,
|
|
30068
|
+
isDark && styles18.navButtonDark,
|
|
30069
|
+
searchResults.length === 0 && styles18.navButtonDisabled
|
|
30030
30070
|
],
|
|
30031
30071
|
accessibilityLabel: "Previous result",
|
|
30032
|
-
children: /* @__PURE__ */ (0,
|
|
30072
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(IconChevronLeft, { size: 16, color: isDark ? "#e5e7eb" : "#111827" })
|
|
30033
30073
|
}
|
|
30034
30074
|
),
|
|
30035
|
-
/* @__PURE__ */ (0,
|
|
30036
|
-
/* @__PURE__ */ (0,
|
|
30037
|
-
|
|
30075
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native18.Text, { style: [styles18.metaText, isDark && styles18.metaTextDark], children: isSearching ? t.searching : `${currentCount}/${searchResults.length} ${targetLabel}` }),
|
|
30076
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
30077
|
+
import_react_native18.Pressable,
|
|
30038
30078
|
{
|
|
30039
30079
|
onPress: nextSearchResult,
|
|
30040
30080
|
disabled: searchResults.length === 0,
|
|
30041
30081
|
style: [
|
|
30042
|
-
|
|
30043
|
-
isDark &&
|
|
30044
|
-
searchResults.length === 0 &&
|
|
30082
|
+
styles18.navButton,
|
|
30083
|
+
isDark && styles18.navButtonDark,
|
|
30084
|
+
searchResults.length === 0 && styles18.navButtonDisabled
|
|
30045
30085
|
],
|
|
30046
30086
|
accessibilityLabel: "Next result",
|
|
30047
|
-
children: /* @__PURE__ */ (0,
|
|
30087
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(IconChevronRight, { size: 16, color: isDark ? "#e5e7eb" : "#111827" })
|
|
30048
30088
|
}
|
|
30049
30089
|
)
|
|
30050
30090
|
] }),
|
|
30051
|
-
/* @__PURE__ */ (0,
|
|
30052
|
-
/* @__PURE__ */ (0,
|
|
30053
|
-
|
|
30091
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native18.View, { style: styles18.actionsRow, children: [
|
|
30092
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
30093
|
+
import_react_native18.Pressable,
|
|
30054
30094
|
{
|
|
30055
30095
|
onPress: handleSubmit,
|
|
30056
|
-
style: [
|
|
30096
|
+
style: [styles18.primaryAction, { backgroundColor: accentColor }],
|
|
30057
30097
|
accessibilityLabel: "Run search",
|
|
30058
|
-
children: /* @__PURE__ */ (0,
|
|
30098
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native18.Text, { style: styles18.primaryActionText, children: t.searchGo })
|
|
30059
30099
|
}
|
|
30060
30100
|
),
|
|
30061
|
-
/* @__PURE__ */ (0,
|
|
30062
|
-
|
|
30101
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
30102
|
+
import_react_native18.Pressable,
|
|
30063
30103
|
{
|
|
30064
30104
|
onPress: onOpenResults,
|
|
30065
30105
|
disabled: searchResults.length === 0,
|
|
30066
30106
|
style: [
|
|
30067
|
-
|
|
30068
|
-
isDark &&
|
|
30069
|
-
searchResults.length === 0 &&
|
|
30107
|
+
styles18.secondaryAction,
|
|
30108
|
+
isDark && styles18.secondaryActionDark,
|
|
30109
|
+
searchResults.length === 0 && styles18.navButtonDisabled
|
|
30070
30110
|
],
|
|
30071
30111
|
accessibilityLabel: "Open all results",
|
|
30072
|
-
children: /* @__PURE__ */ (0,
|
|
30073
|
-
|
|
30112
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
30113
|
+
import_react_native18.Text,
|
|
30074
30114
|
{
|
|
30075
30115
|
style: [
|
|
30076
|
-
|
|
30077
|
-
isDark &&
|
|
30116
|
+
styles18.secondaryActionText,
|
|
30117
|
+
isDark && styles18.secondaryActionTextDark
|
|
30078
30118
|
],
|
|
30079
30119
|
children: t.allResults
|
|
30080
30120
|
}
|
|
@@ -30086,7 +30126,7 @@ function SearchOverlay({
|
|
|
30086
30126
|
}
|
|
30087
30127
|
) });
|
|
30088
30128
|
}
|
|
30089
|
-
var
|
|
30129
|
+
var styles18 = import_react_native18.StyleSheet.create({
|
|
30090
30130
|
frame: {
|
|
30091
30131
|
position: "absolute",
|
|
30092
30132
|
left: 0,
|
|
@@ -30100,8 +30140,8 @@ var styles17 = import_react_native17.StyleSheet.create({
|
|
|
30100
30140
|
borderWidth: 1,
|
|
30101
30141
|
borderColor: "rgba(255,255,255,0.72)",
|
|
30102
30142
|
backgroundColor: "rgba(255,255,255,0.94)",
|
|
30103
|
-
padding:
|
|
30104
|
-
gap:
|
|
30143
|
+
padding: 8,
|
|
30144
|
+
gap: 8,
|
|
30105
30145
|
shadowColor: "#0f172a",
|
|
30106
30146
|
shadowOpacity: 0.12,
|
|
30107
30147
|
shadowRadius: 20,
|
|
@@ -30124,7 +30164,7 @@ var styles17 = import_react_native17.StyleSheet.create({
|
|
|
30124
30164
|
borderWidth: 1,
|
|
30125
30165
|
borderColor: "#e2e8f0",
|
|
30126
30166
|
paddingHorizontal: 10,
|
|
30127
|
-
paddingVertical:
|
|
30167
|
+
paddingVertical: 3,
|
|
30128
30168
|
flexDirection: "row",
|
|
30129
30169
|
alignItems: "center",
|
|
30130
30170
|
gap: 8
|
|
@@ -30135,7 +30175,7 @@ var styles17 = import_react_native17.StyleSheet.create({
|
|
|
30135
30175
|
},
|
|
30136
30176
|
input: {
|
|
30137
30177
|
flex: 1,
|
|
30138
|
-
minHeight:
|
|
30178
|
+
minHeight: 28,
|
|
30139
30179
|
fontSize: 13,
|
|
30140
30180
|
color: "#111827"
|
|
30141
30181
|
},
|
|
@@ -30145,7 +30185,7 @@ var styles17 = import_react_native17.StyleSheet.create({
|
|
|
30145
30185
|
closeButton: {
|
|
30146
30186
|
borderRadius: 12,
|
|
30147
30187
|
paddingHorizontal: 10,
|
|
30148
|
-
paddingVertical:
|
|
30188
|
+
paddingVertical: 6,
|
|
30149
30189
|
backgroundColor: "#f1f5f9"
|
|
30150
30190
|
},
|
|
30151
30191
|
closeButtonDark: {
|
|
@@ -30227,9 +30267,9 @@ var styles17 = import_react_native17.StyleSheet.create({
|
|
|
30227
30267
|
});
|
|
30228
30268
|
|
|
30229
30269
|
// components/SearchResultsSheet.tsx
|
|
30230
|
-
var
|
|
30270
|
+
var import_react_native19 = require("react-native");
|
|
30231
30271
|
var import_core16 = require("@papyrus-sdk/core");
|
|
30232
|
-
var
|
|
30272
|
+
var import_jsx_runtime20 = require("react/jsx-runtime");
|
|
30233
30273
|
function SearchResultsSheet({
|
|
30234
30274
|
documentType,
|
|
30235
30275
|
visible,
|
|
@@ -30253,29 +30293,29 @@ function SearchResultsSheet({
|
|
|
30253
30293
|
const percent = pageCount <= 1 ? 100 : Math.round((pageIndex + 1) / pageCount * 100);
|
|
30254
30294
|
return `${t.progress} ${percent}%`;
|
|
30255
30295
|
};
|
|
30256
|
-
return /* @__PURE__ */ (0,
|
|
30257
|
-
|
|
30296
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
30297
|
+
import_react_native19.Modal,
|
|
30258
30298
|
{
|
|
30259
30299
|
visible,
|
|
30260
30300
|
transparent: true,
|
|
30261
30301
|
animationType: "slide",
|
|
30262
30302
|
onRequestClose: onClose,
|
|
30263
|
-
children: /* @__PURE__ */ (0,
|
|
30264
|
-
/* @__PURE__ */ (0,
|
|
30265
|
-
/* @__PURE__ */ (0,
|
|
30266
|
-
/* @__PURE__ */ (0,
|
|
30267
|
-
/* @__PURE__ */ (0,
|
|
30268
|
-
/* @__PURE__ */ (0,
|
|
30269
|
-
/* @__PURE__ */ (0,
|
|
30303
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native19.View, { style: styles19.modalRoot, children: [
|
|
30304
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native19.Pressable, { style: styles19.backdrop, onPress: onClose }),
|
|
30305
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native19.View, { style: [styles19.sheet, isDark && styles19.sheetDark], children: [
|
|
30306
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native19.View, { style: [styles19.handle, isDark && styles19.handleDark] }),
|
|
30307
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native19.View, { style: styles19.header, children: [
|
|
30308
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native19.Text, { style: [styles19.title, isDark && styles19.titleDark], children: t.allResults }),
|
|
30309
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(import_react_native19.Text, { style: [styles19.meta, isDark && styles19.metaDark], children: [
|
|
30270
30310
|
searchResults.length,
|
|
30271
30311
|
" ",
|
|
30272
30312
|
t.results
|
|
30273
30313
|
] })
|
|
30274
30314
|
] }),
|
|
30275
|
-
/* @__PURE__ */ (0,
|
|
30315
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native19.ScrollView, { contentContainerStyle: styles19.content, children: searchResults.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native19.Text, { style: [styles19.emptyText, isDark && styles19.emptyTextDark], children: t.noResults }) : searchResults.map((result, index) => {
|
|
30276
30316
|
const isActive = index === activeSearchIndex;
|
|
30277
|
-
return /* @__PURE__ */ (0,
|
|
30278
|
-
|
|
30317
|
+
return /* @__PURE__ */ (0, import_jsx_runtime20.jsxs)(
|
|
30318
|
+
import_react_native19.Pressable,
|
|
30279
30319
|
{
|
|
30280
30320
|
onPress: () => {
|
|
30281
30321
|
setDocumentState({
|
|
@@ -30286,21 +30326,21 @@ function SearchResultsSheet({
|
|
|
30286
30326
|
onClose();
|
|
30287
30327
|
},
|
|
30288
30328
|
style: [
|
|
30289
|
-
|
|
30290
|
-
isDark &&
|
|
30329
|
+
styles19.resultCard,
|
|
30330
|
+
isDark && styles19.resultCardDark,
|
|
30291
30331
|
isActive && {
|
|
30292
30332
|
borderColor: accentColor,
|
|
30293
30333
|
backgroundColor: `${accentColor}14`
|
|
30294
30334
|
}
|
|
30295
30335
|
],
|
|
30296
30336
|
children: [
|
|
30297
|
-
/* @__PURE__ */ (0,
|
|
30298
|
-
/* @__PURE__ */ (0,
|
|
30299
|
-
|
|
30337
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(import_react_native19.Text, { style: [styles19.resultLabel, { color: accentColor }], children: getResultLabel(result.pageIndex) }),
|
|
30338
|
+
/* @__PURE__ */ (0, import_jsx_runtime20.jsx)(
|
|
30339
|
+
import_react_native19.Text,
|
|
30300
30340
|
{
|
|
30301
30341
|
style: [
|
|
30302
|
-
|
|
30303
|
-
isDark &&
|
|
30342
|
+
styles19.resultText,
|
|
30343
|
+
isDark && styles19.resultTextDark
|
|
30304
30344
|
],
|
|
30305
30345
|
children: result.text
|
|
30306
30346
|
}
|
|
@@ -30315,13 +30355,13 @@ function SearchResultsSheet({
|
|
|
30315
30355
|
}
|
|
30316
30356
|
);
|
|
30317
30357
|
}
|
|
30318
|
-
var
|
|
30358
|
+
var styles19 = import_react_native19.StyleSheet.create({
|
|
30319
30359
|
modalRoot: {
|
|
30320
30360
|
flex: 1,
|
|
30321
30361
|
backgroundColor: "transparent"
|
|
30322
30362
|
},
|
|
30323
30363
|
backdrop: {
|
|
30324
|
-
...
|
|
30364
|
+
...import_react_native19.StyleSheet.absoluteFillObject,
|
|
30325
30365
|
backgroundColor: "rgba(0, 0, 0, 0.4)"
|
|
30326
30366
|
},
|
|
30327
30367
|
sheet: {
|
|
@@ -30416,7 +30456,7 @@ var styles18 = import_react_native18.StyleSheet.create({
|
|
|
30416
30456
|
var isSidebarBoundDestination = (destination) => destination === "pages" || destination === "contents" || destination === "progress" || destination === "notes";
|
|
30417
30457
|
|
|
30418
30458
|
// components/ReadingShell.tsx
|
|
30419
|
-
var
|
|
30459
|
+
var import_jsx_runtime21 = require("react/jsx-runtime");
|
|
30420
30460
|
function ReadingShell({
|
|
30421
30461
|
engine,
|
|
30422
30462
|
title,
|
|
@@ -30437,18 +30477,18 @@ function ReadingShell({
|
|
|
30437
30477
|
uiTheme,
|
|
30438
30478
|
accentColor
|
|
30439
30479
|
} = (0, import_core17.useViewerStore)();
|
|
30440
|
-
const [overflowOpen, setOverflowOpen] = (0,
|
|
30441
|
-
const [infoOpen, setInfoOpen] = (0,
|
|
30442
|
-
const [actionsOpen, setActionsOpen] = (0,
|
|
30443
|
-
const [settingsOpen, setSettingsOpen] = (0,
|
|
30444
|
-
const [searchResultsOpen, setSearchResultsOpen] = (0,
|
|
30445
|
-
const [pageJumpOpen, setPageJumpOpen] = (0,
|
|
30480
|
+
const [overflowOpen, setOverflowOpen] = (0, import_react13.useState)(false);
|
|
30481
|
+
const [infoOpen, setInfoOpen] = (0, import_react13.useState)(false);
|
|
30482
|
+
const [actionsOpen, setActionsOpen] = (0, import_react13.useState)(false);
|
|
30483
|
+
const [settingsOpen, setSettingsOpen] = (0, import_react13.useState)(false);
|
|
30484
|
+
const [searchResultsOpen, setSearchResultsOpen] = (0, import_react13.useState)(false);
|
|
30485
|
+
const [pageJumpOpen, setPageJumpOpen] = (0, import_react13.useState)(false);
|
|
30446
30486
|
const isDark = uiTheme === "dark";
|
|
30447
|
-
|
|
30448
|
-
const showSubscription =
|
|
30487
|
+
import_react13.default.useEffect(() => {
|
|
30488
|
+
const showSubscription = import_react_native20.Keyboard.addListener("keyboardDidShow", () => {
|
|
30449
30489
|
setMobileKeyboardOpen(true);
|
|
30450
30490
|
});
|
|
30451
|
-
const hideSubscription =
|
|
30491
|
+
const hideSubscription = import_react_native20.Keyboard.addListener("keyboardDidHide", () => {
|
|
30452
30492
|
setMobileKeyboardOpen(false);
|
|
30453
30493
|
});
|
|
30454
30494
|
return () => {
|
|
@@ -30456,7 +30496,7 @@ function ReadingShell({
|
|
|
30456
30496
|
hideSubscription.remove();
|
|
30457
30497
|
};
|
|
30458
30498
|
}, [setMobileKeyboardOpen]);
|
|
30459
|
-
|
|
30499
|
+
import_react13.default.useEffect(() => {
|
|
30460
30500
|
if (sidebarRightOpen) return;
|
|
30461
30501
|
if (isSidebarBoundDestination(activeMobileDestination)) {
|
|
30462
30502
|
closeMobileDestination();
|
|
@@ -30502,8 +30542,8 @@ function ReadingShell({
|
|
|
30502
30542
|
setDocumentState({ currentPage: page });
|
|
30503
30543
|
triggerScrollToPage(page - 1);
|
|
30504
30544
|
};
|
|
30505
|
-
return /* @__PURE__ */ (0,
|
|
30506
|
-
/* @__PURE__ */ (0,
|
|
30545
|
+
return /* @__PURE__ */ (0, import_jsx_runtime21.jsxs)(import_react_native20.View, { style: styles20.container, testID: "papyrus-rn-reading-shell", children: [
|
|
30546
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
30507
30547
|
Topbar_default,
|
|
30508
30548
|
{
|
|
30509
30549
|
engine,
|
|
@@ -30519,8 +30559,8 @@ function ReadingShell({
|
|
|
30519
30559
|
showPageNavigationControls: false
|
|
30520
30560
|
}
|
|
30521
30561
|
),
|
|
30522
|
-
/* @__PURE__ */ (0,
|
|
30523
|
-
/* @__PURE__ */ (0,
|
|
30562
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(import_react_native20.View, { style: styles20.viewerStage, children: /* @__PURE__ */ (0, import_jsx_runtime21.jsx)(Viewer_default, { engine, ...viewerProps }) }),
|
|
30563
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
30524
30564
|
ProgressPill,
|
|
30525
30565
|
{
|
|
30526
30566
|
documentType,
|
|
@@ -30530,7 +30570,7 @@ function ReadingShell({
|
|
|
30530
30570
|
onOpenPageJump: () => setPageJumpOpen(true)
|
|
30531
30571
|
}
|
|
30532
30572
|
),
|
|
30533
|
-
/* @__PURE__ */ (0,
|
|
30573
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
30534
30574
|
BottomBar_default,
|
|
30535
30575
|
{
|
|
30536
30576
|
documentType,
|
|
@@ -30539,7 +30579,7 @@ function ReadingShell({
|
|
|
30539
30579
|
onOpenSettings: () => openDestination("display")
|
|
30540
30580
|
}
|
|
30541
30581
|
),
|
|
30542
|
-
/* @__PURE__ */ (0,
|
|
30582
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
30543
30583
|
SearchOverlay,
|
|
30544
30584
|
{
|
|
30545
30585
|
engine,
|
|
@@ -30552,7 +30592,7 @@ function ReadingShell({
|
|
|
30552
30592
|
onOpenResults: () => setSearchResultsOpen(true)
|
|
30553
30593
|
}
|
|
30554
30594
|
),
|
|
30555
|
-
/* @__PURE__ */ (0,
|
|
30595
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
30556
30596
|
SearchResultsSheet,
|
|
30557
30597
|
{
|
|
30558
30598
|
documentType,
|
|
@@ -30560,7 +30600,7 @@ function ReadingShell({
|
|
|
30560
30600
|
onClose: () => setSearchResultsOpen(false)
|
|
30561
30601
|
}
|
|
30562
30602
|
),
|
|
30563
|
-
/* @__PURE__ */ (0,
|
|
30603
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
30564
30604
|
RightSheet_default,
|
|
30565
30605
|
{
|
|
30566
30606
|
engine,
|
|
@@ -30569,7 +30609,7 @@ function ReadingShell({
|
|
|
30569
30609
|
onOpenPageJump: () => setPageJumpOpen(true)
|
|
30570
30610
|
}
|
|
30571
30611
|
),
|
|
30572
|
-
/* @__PURE__ */ (0,
|
|
30612
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
30573
30613
|
OverflowSheet,
|
|
30574
30614
|
{
|
|
30575
30615
|
visible: overflowOpen,
|
|
@@ -30583,7 +30623,7 @@ function ReadingShell({
|
|
|
30583
30623
|
}
|
|
30584
30624
|
}
|
|
30585
30625
|
),
|
|
30586
|
-
/* @__PURE__ */ (0,
|
|
30626
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
30587
30627
|
InfoSheet,
|
|
30588
30628
|
{
|
|
30589
30629
|
visible: infoOpen,
|
|
@@ -30595,7 +30635,7 @@ function ReadingShell({
|
|
|
30595
30635
|
}
|
|
30596
30636
|
}
|
|
30597
30637
|
),
|
|
30598
|
-
/* @__PURE__ */ (0,
|
|
30638
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
30599
30639
|
DocumentActionsSheet,
|
|
30600
30640
|
{
|
|
30601
30641
|
visible: actionsOpen,
|
|
@@ -30605,7 +30645,7 @@ function ReadingShell({
|
|
|
30605
30645
|
}
|
|
30606
30646
|
}
|
|
30607
30647
|
),
|
|
30608
|
-
/* @__PURE__ */ (0,
|
|
30648
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
30609
30649
|
SettingsSheet_default,
|
|
30610
30650
|
{
|
|
30611
30651
|
engine,
|
|
@@ -30616,7 +30656,7 @@ function ReadingShell({
|
|
|
30616
30656
|
}
|
|
30617
30657
|
}
|
|
30618
30658
|
),
|
|
30619
|
-
/* @__PURE__ */ (0,
|
|
30659
|
+
/* @__PURE__ */ (0, import_jsx_runtime21.jsx)(
|
|
30620
30660
|
PageJumpModal,
|
|
30621
30661
|
{
|
|
30622
30662
|
visible: pageJumpOpen,
|
|
@@ -30630,7 +30670,7 @@ function ReadingShell({
|
|
|
30630
30670
|
)
|
|
30631
30671
|
] });
|
|
30632
30672
|
}
|
|
30633
|
-
var
|
|
30673
|
+
var styles20 = import_react_native20.StyleSheet.create({
|
|
30634
30674
|
container: {
|
|
30635
30675
|
flex: 1
|
|
30636
30676
|
},
|