@papyrus-sdk/ui-react-native 0.2.13-beta.0 → 0.2.15
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.d.mts +23 -3
- package/dist/index.d.ts +23 -3
- package/dist/index.js +1511 -1280
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1501 -1274
- package/dist/index.mjs.map +1 -1
- package/package.json +11 -7
package/dist/index.js
CHANGED
|
@@ -21023,6 +21023,7 @@ __export(ui_react_native_exports, {
|
|
|
21023
21023
|
CoverPreview: () => CoverPreview_default,
|
|
21024
21024
|
DocumentActionsSheet: () => DocumentActionsSheet,
|
|
21025
21025
|
InfoSheet: () => InfoSheet,
|
|
21026
|
+
MOBILE_CHROME_METRICS: () => MOBILE_CHROME_METRICS,
|
|
21026
21027
|
OverflowSheet: () => OverflowSheet,
|
|
21027
21028
|
PageRenderer: () => PageRenderer_default,
|
|
21028
21029
|
ProgressPill: () => ProgressPill,
|
|
@@ -21699,7 +21700,7 @@ var PageRenderer = ({
|
|
|
21699
21700
|
createdAt: Date.now()
|
|
21700
21701
|
});
|
|
21701
21702
|
},
|
|
21702
|
-
[addAnnotation, annotationColor, pageIndex]
|
|
21703
|
+
[addAnnotation, annotationColor, logSelectionPerf, pageIndex]
|
|
21703
21704
|
);
|
|
21704
21705
|
const clamp3 = (value, min, max) => Math.min(max, Math.max(min, value));
|
|
21705
21706
|
const getBoundsFromRects = (rects) => {
|
|
@@ -24597,8 +24598,8 @@ var styles3 = import_react_native3.StyleSheet.create({
|
|
|
24597
24598
|
var Viewer_default = Viewer;
|
|
24598
24599
|
|
|
24599
24600
|
// components/Topbar.tsx
|
|
24600
|
-
var
|
|
24601
|
-
var
|
|
24601
|
+
var import_react5 = require("react");
|
|
24602
|
+
var import_react_native5 = require("react-native");
|
|
24602
24603
|
var import_core4 = require("@papyrus-sdk/core");
|
|
24603
24604
|
|
|
24604
24605
|
// icons.tsx
|
|
@@ -24932,7 +24933,9 @@ var IconToolInk = ({
|
|
|
24932
24933
|
}
|
|
24933
24934
|
),
|
|
24934
24935
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Rect, { x: "11", y: "52", width: "16", height: "2", fill: "url(#penBand)" }),
|
|
24936
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Rect, { x: "11", y: "52", width: "16", height: "2", fill: color, opacity: "0.78" }),
|
|
24935
24937
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Rect, { x: "15", y: "4", width: "8", height: "10", rx: "0.8", fill: "url(#penCap)" }),
|
|
24938
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Rect, { x: "15", y: "4", width: "8", height: "10", rx: "0.8", fill: color, opacity: "0.72" }),
|
|
24936
24939
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Path, { d: "M18.55 4.6h.9L26.2 40H11.8l6.75-35.4Z", fill: "rgba(255,255,255,0.05)" }),
|
|
24937
24940
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Rect, { x: "11", y: "52", width: "16", height: "2", fill: color, opacity: "0.35" })
|
|
24938
24941
|
] });
|
|
@@ -24970,7 +24973,15 @@ var IconToolHighlighter = ({
|
|
|
24970
24973
|
),
|
|
24971
24974
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Rect, { x: "7", y: "51.35", width: "24", height: "35", rx: "1.6", fill: "url(#markerBody)" }),
|
|
24972
24975
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Rect, { x: "7", y: "51.35", width: "24", height: "11", rx: "0.8", fill: "url(#markerMetal)" }),
|
|
24973
|
-
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Rect, { x: "7", y: "51.35", width: "24", height: "11", rx: "0.8", fill: color, opacity: "0.
|
|
24976
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Rect, { x: "7", y: "51.35", width: "24", height: "11", rx: "0.8", fill: color, opacity: "0.78" }),
|
|
24977
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
24978
|
+
import_react_native_svg2.Path,
|
|
24979
|
+
{
|
|
24980
|
+
d: "M13 10.8v5.55h12V5c0-.75-.8-1.23-1.46-.89l-9.46 4.92c-.66.34-1.08 1.03-1.08 1.77Z",
|
|
24981
|
+
fill: color,
|
|
24982
|
+
opacity: "0.72"
|
|
24983
|
+
}
|
|
24984
|
+
)
|
|
24974
24985
|
] });
|
|
24975
24986
|
var IconToolUnderline = ({
|
|
24976
24987
|
size = 32,
|
|
@@ -25005,6 +25016,7 @@ var IconToolUnderline = ({
|
|
|
25005
25016
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Path, { d: "M8 43.88v-1L15 16.88h8l7 26v1H8Z", fill: "url(#pencilBodyTop)" }),
|
|
25006
25017
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Path, { d: "M8 42.88h22v43H8v-43Z", fill: "url(#pencilBodyBottom)" }),
|
|
25007
25018
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Rect, { x: "8", y: "50.88", width: "22", height: "2", fill: "url(#pencilMetal)" }),
|
|
25019
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Rect, { x: "8", y: "50.88", width: "22", height: "2", fill: color, opacity: "0.78" }),
|
|
25008
25020
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
25009
25021
|
import_react_native_svg2.Path,
|
|
25010
25022
|
{
|
|
@@ -25012,6 +25024,14 @@ var IconToolUnderline = ({
|
|
|
25012
25024
|
fill: "url(#pencilTip)"
|
|
25013
25025
|
}
|
|
25014
25026
|
),
|
|
25027
|
+
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(
|
|
25028
|
+
import_react_native_svg2.Path,
|
|
25029
|
+
{
|
|
25030
|
+
d: "M15 16.88 18.03 4.76c.25-1.01 1.69-1.01 1.94 0L23 16.88h-8Z",
|
|
25031
|
+
fill: color,
|
|
25032
|
+
opacity: "0.72"
|
|
25033
|
+
}
|
|
25034
|
+
),
|
|
25015
25035
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Rect, { x: "8", y: "50.88", width: "22", height: "2", fill: color, opacity: "0.3" })
|
|
25016
25036
|
] });
|
|
25017
25037
|
var IconToolSquiggly = ({
|
|
@@ -25082,8 +25102,188 @@ var IconToolNote = ({
|
|
|
25082
25102
|
/* @__PURE__ */ (0, import_jsx_runtime4.jsx)(import_react_native_svg2.Line, { x1: "15", y1: "18.2", x2: "19.2", y2: "18.2", stroke: color, strokeWidth: "1.8", strokeLinecap: "round" })
|
|
25083
25103
|
] });
|
|
25084
25104
|
|
|
25085
|
-
// components/
|
|
25105
|
+
// components/mobileChromeMetrics.ts
|
|
25106
|
+
var MOBILE_CHROME_METRICS = {
|
|
25107
|
+
screenPadding: 16,
|
|
25108
|
+
maxFloatingWidth: 360,
|
|
25109
|
+
maxToolDockWidth: 420,
|
|
25110
|
+
toolDockPaddingTop: 4,
|
|
25111
|
+
toolDockHistoryIconSize: 18,
|
|
25112
|
+
toolDockHistoryGap: 2,
|
|
25113
|
+
toolDockDisabledIconColorDark: "#64748b",
|
|
25114
|
+
toolDockDisabledIconColorLight: "#6b7280",
|
|
25115
|
+
toolDockDisabledOpacity: 0.72,
|
|
25116
|
+
iconSize: 20,
|
|
25117
|
+
iconBoxSize: 28,
|
|
25118
|
+
topbarPageButtonSize: 30,
|
|
25119
|
+
bottomBarItemPaddingHorizontal: 5,
|
|
25120
|
+
bottomBarItemPaddingVertical: 3
|
|
25121
|
+
};
|
|
25122
|
+
|
|
25123
|
+
// components/PageJumpModal.tsx
|
|
25124
|
+
var import_react4 = require("react");
|
|
25125
|
+
var import_react_native4 = require("react-native");
|
|
25126
|
+
|
|
25127
|
+
// components/pageJumpModel.ts
|
|
25128
|
+
var resolvePageJumpTarget = (value, pageCount) => {
|
|
25129
|
+
if (pageCount <= 0) return null;
|
|
25130
|
+
const parsed = Number.parseInt(value, 10);
|
|
25131
|
+
if (Number.isNaN(parsed)) return null;
|
|
25132
|
+
return Math.max(1, Math.min(pageCount, parsed));
|
|
25133
|
+
};
|
|
25134
|
+
|
|
25135
|
+
// components/PageJumpModal.tsx
|
|
25086
25136
|
var import_jsx_runtime5 = require("react/jsx-runtime");
|
|
25137
|
+
function PageJumpModal({
|
|
25138
|
+
visible,
|
|
25139
|
+
currentPage,
|
|
25140
|
+
pageCount,
|
|
25141
|
+
isDark,
|
|
25142
|
+
accentColor,
|
|
25143
|
+
onClose,
|
|
25144
|
+
onConfirm
|
|
25145
|
+
}) {
|
|
25146
|
+
const [value, setValue] = (0, import_react4.useState)(`${currentPage}`);
|
|
25147
|
+
(0, import_react4.useEffect)(() => {
|
|
25148
|
+
if (visible) setValue(`${currentPage}`);
|
|
25149
|
+
}, [currentPage, visible]);
|
|
25150
|
+
const confirmJump = () => {
|
|
25151
|
+
const targetPage = resolvePageJumpTarget(value, pageCount);
|
|
25152
|
+
if (targetPage) onConfirm(targetPage);
|
|
25153
|
+
onClose();
|
|
25154
|
+
};
|
|
25155
|
+
return /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
25156
|
+
import_react_native4.Modal,
|
|
25157
|
+
{
|
|
25158
|
+
visible,
|
|
25159
|
+
transparent: true,
|
|
25160
|
+
animationType: "fade",
|
|
25161
|
+
onRequestClose: onClose,
|
|
25162
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native4.Pressable, { style: styles4.backdrop, onPress: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
25163
|
+
import_react_native4.Pressable,
|
|
25164
|
+
{
|
|
25165
|
+
style: [styles4.card, isDark && styles4.cardDark],
|
|
25166
|
+
onPress: (event) => event.stopPropagation(),
|
|
25167
|
+
children: [
|
|
25168
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native4.Text, { style: [styles4.title, isDark && styles4.titleDark], children: "Ir para pagina" }),
|
|
25169
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
25170
|
+
import_react_native4.TextInput,
|
|
25171
|
+
{
|
|
25172
|
+
value,
|
|
25173
|
+
onChangeText: (text) => setValue(text.replace(/[^0-9]/g, "")),
|
|
25174
|
+
keyboardType: "number-pad",
|
|
25175
|
+
autoFocus: true,
|
|
25176
|
+
selectTextOnFocus: true,
|
|
25177
|
+
maxLength: 6,
|
|
25178
|
+
placeholder: "1",
|
|
25179
|
+
placeholderTextColor: isDark ? "#6b7280" : "#9ca3af",
|
|
25180
|
+
style: [styles4.input, isDark && styles4.inputDark],
|
|
25181
|
+
onSubmitEditing: confirmJump,
|
|
25182
|
+
accessibilityLabel: "Page jump input"
|
|
25183
|
+
}
|
|
25184
|
+
),
|
|
25185
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native4.View, { style: styles4.actions, children: [
|
|
25186
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
25187
|
+
import_react_native4.Pressable,
|
|
25188
|
+
{
|
|
25189
|
+
onPress: onClose,
|
|
25190
|
+
style: [
|
|
25191
|
+
styles4.actionButton,
|
|
25192
|
+
styles4.actionCancel,
|
|
25193
|
+
isDark && styles4.actionCancelDark
|
|
25194
|
+
],
|
|
25195
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native4.Text, { style: [styles4.actionText, isDark && styles4.actionTextDark], children: "Cancelar" })
|
|
25196
|
+
}
|
|
25197
|
+
),
|
|
25198
|
+
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
25199
|
+
import_react_native4.Pressable,
|
|
25200
|
+
{
|
|
25201
|
+
onPress: confirmJump,
|
|
25202
|
+
style: [styles4.actionButton, { backgroundColor: accentColor }],
|
|
25203
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(import_react_native4.Text, { style: [styles4.actionText, styles4.actionTextPrimary], children: "Ir" })
|
|
25204
|
+
}
|
|
25205
|
+
)
|
|
25206
|
+
] })
|
|
25207
|
+
]
|
|
25208
|
+
}
|
|
25209
|
+
) })
|
|
25210
|
+
}
|
|
25211
|
+
);
|
|
25212
|
+
}
|
|
25213
|
+
var styles4 = import_react_native4.StyleSheet.create({
|
|
25214
|
+
backdrop: {
|
|
25215
|
+
flex: 1,
|
|
25216
|
+
backgroundColor: "rgba(15, 23, 42, 0.4)",
|
|
25217
|
+
alignItems: "center",
|
|
25218
|
+
justifyContent: "center",
|
|
25219
|
+
padding: 24
|
|
25220
|
+
},
|
|
25221
|
+
card: {
|
|
25222
|
+
width: "100%",
|
|
25223
|
+
maxWidth: 320,
|
|
25224
|
+
borderRadius: 24,
|
|
25225
|
+
backgroundColor: "#ffffff",
|
|
25226
|
+
padding: 18,
|
|
25227
|
+
gap: 12
|
|
25228
|
+
},
|
|
25229
|
+
cardDark: {
|
|
25230
|
+
backgroundColor: "#0f1115"
|
|
25231
|
+
},
|
|
25232
|
+
title: {
|
|
25233
|
+
fontSize: 16,
|
|
25234
|
+
fontWeight: "800",
|
|
25235
|
+
color: "#111827"
|
|
25236
|
+
},
|
|
25237
|
+
titleDark: {
|
|
25238
|
+
color: "#f8fafc"
|
|
25239
|
+
},
|
|
25240
|
+
input: {
|
|
25241
|
+
borderRadius: 14,
|
|
25242
|
+
borderWidth: 1,
|
|
25243
|
+
borderColor: "#d1d5db",
|
|
25244
|
+
paddingHorizontal: 14,
|
|
25245
|
+
paddingVertical: 10,
|
|
25246
|
+
fontSize: 18,
|
|
25247
|
+
fontWeight: "800",
|
|
25248
|
+
color: "#111827",
|
|
25249
|
+
textAlign: "center"
|
|
25250
|
+
},
|
|
25251
|
+
inputDark: {
|
|
25252
|
+
backgroundColor: "#111827",
|
|
25253
|
+
borderColor: "#374151",
|
|
25254
|
+
color: "#f8fafc"
|
|
25255
|
+
},
|
|
25256
|
+
actions: {
|
|
25257
|
+
flexDirection: "row",
|
|
25258
|
+
justifyContent: "flex-end",
|
|
25259
|
+
gap: 10
|
|
25260
|
+
},
|
|
25261
|
+
actionButton: {
|
|
25262
|
+
borderRadius: 999,
|
|
25263
|
+
paddingHorizontal: 14,
|
|
25264
|
+
paddingVertical: 9
|
|
25265
|
+
},
|
|
25266
|
+
actionCancel: {
|
|
25267
|
+
backgroundColor: "#e5e7eb"
|
|
25268
|
+
},
|
|
25269
|
+
actionCancelDark: {
|
|
25270
|
+
backgroundColor: "#111827"
|
|
25271
|
+
},
|
|
25272
|
+
actionText: {
|
|
25273
|
+
fontSize: 12,
|
|
25274
|
+
fontWeight: "800",
|
|
25275
|
+
color: "#111827"
|
|
25276
|
+
},
|
|
25277
|
+
actionTextDark: {
|
|
25278
|
+
color: "#e5e7eb"
|
|
25279
|
+
},
|
|
25280
|
+
actionTextPrimary: {
|
|
25281
|
+
color: "#ffffff"
|
|
25282
|
+
}
|
|
25283
|
+
});
|
|
25284
|
+
|
|
25285
|
+
// components/Topbar.tsx
|
|
25286
|
+
var import_jsx_runtime6 = require("react/jsx-runtime");
|
|
25087
25287
|
var Topbar = ({
|
|
25088
25288
|
engine,
|
|
25089
25289
|
onOpenSettings,
|
|
@@ -25092,7 +25292,8 @@ var Topbar = ({
|
|
|
25092
25292
|
logo,
|
|
25093
25293
|
onLogoPress,
|
|
25094
25294
|
logoAccessibilityLabel = "Logo",
|
|
25095
|
-
showPageNavigationControls = false
|
|
25295
|
+
showPageNavigationControls = false,
|
|
25296
|
+
onOpenPageJump
|
|
25096
25297
|
}) => {
|
|
25097
25298
|
const {
|
|
25098
25299
|
currentPage,
|
|
@@ -25103,17 +25304,9 @@ var Topbar = ({
|
|
|
25103
25304
|
accentColor,
|
|
25104
25305
|
mobileChromeVisible
|
|
25105
25306
|
} = (0, import_core4.useViewerStore)();
|
|
25106
|
-
const [
|
|
25107
|
-
const [jumpModalOpen, setJumpModalOpen] = (0, import_react4.useState)(false);
|
|
25108
|
-
const [jumpValue, setJumpValue] = (0, import_react4.useState)(`${currentPage}`);
|
|
25307
|
+
const [jumpModalOpen, setJumpModalOpen] = (0, import_react5.useState)(false);
|
|
25109
25308
|
const isDark = uiTheme === "dark";
|
|
25110
25309
|
const navIconColor = isDark ? "#e5e7eb" : "#111827";
|
|
25111
|
-
(0, import_react4.useEffect)(() => {
|
|
25112
|
-
setPageLabel(`${currentPage}`);
|
|
25113
|
-
if (!jumpModalOpen) {
|
|
25114
|
-
setJumpValue(`${currentPage}`);
|
|
25115
|
-
}
|
|
25116
|
-
}, [currentPage, jumpModalOpen]);
|
|
25117
25310
|
const navigateToPage = (targetPage) => {
|
|
25118
25311
|
const next = Math.max(1, Math.min(pageCount, targetPage));
|
|
25119
25312
|
engine.goToPage(next);
|
|
@@ -25124,73 +25317,82 @@ var Topbar = ({
|
|
|
25124
25317
|
navigateToPage(currentPage + delta);
|
|
25125
25318
|
};
|
|
25126
25319
|
const openJumpModal = () => {
|
|
25127
|
-
|
|
25128
|
-
|
|
25129
|
-
};
|
|
25130
|
-
const confirmJump = () => {
|
|
25131
|
-
const parsed = Number.parseInt(jumpValue, 10);
|
|
25132
|
-
if (Number.isNaN(parsed)) {
|
|
25133
|
-
setJumpModalOpen(false);
|
|
25320
|
+
if (onOpenPageJump) {
|
|
25321
|
+
onOpenPageJump();
|
|
25134
25322
|
return;
|
|
25135
25323
|
}
|
|
25136
|
-
|
|
25137
|
-
setJumpModalOpen(false);
|
|
25324
|
+
setJumpModalOpen(true);
|
|
25138
25325
|
};
|
|
25139
|
-
const defaultLogo = /* @__PURE__ */ (0,
|
|
25326
|
+
const defaultLogo = /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_native5.View, { style: [styles5.logoBadge, { backgroundColor: accentColor }], children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_native5.Text, { style: styles5.logoText, children: "P" }) });
|
|
25140
25327
|
const logoElement = logo ?? defaultLogo;
|
|
25141
25328
|
if (!mobileChromeVisible) return null;
|
|
25142
|
-
return /* @__PURE__ */ (0,
|
|
25143
|
-
/* @__PURE__ */ (0,
|
|
25144
|
-
|
|
25329
|
+
return /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
25330
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25331
|
+
import_react_native5.View,
|
|
25145
25332
|
{
|
|
25146
|
-
style: [
|
|
25333
|
+
style: [styles5.chromeFrame],
|
|
25147
25334
|
pointerEvents: "box-none",
|
|
25148
25335
|
testID: "papyrus-floating-top-controls",
|
|
25149
|
-
children: /* @__PURE__ */ (0,
|
|
25150
|
-
/* @__PURE__ */ (0,
|
|
25151
|
-
onLogoPress ? /* @__PURE__ */ (0,
|
|
25152
|
-
|
|
25336
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_native5.View, { style: [styles5.container, isDark && styles5.containerDark], children: [
|
|
25337
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_react_native5.View, { style: styles5.leftGroup, children: [
|
|
25338
|
+
onLogoPress ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25339
|
+
import_react_native5.Pressable,
|
|
25153
25340
|
{
|
|
25154
25341
|
onPress: onLogoPress,
|
|
25155
25342
|
accessibilityRole: "button",
|
|
25156
25343
|
accessibilityLabel: logoAccessibilityLabel,
|
|
25157
|
-
style:
|
|
25344
|
+
style: styles5.logoSlot,
|
|
25158
25345
|
children: logoElement
|
|
25159
25346
|
}
|
|
25160
|
-
) : /* @__PURE__ */ (0,
|
|
25161
|
-
/* @__PURE__ */ (0,
|
|
25162
|
-
|
|
25347
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_native5.View, { style: styles5.logoSlot, children: logoElement }),
|
|
25348
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25349
|
+
import_react_native5.Pressable,
|
|
25163
25350
|
{
|
|
25164
|
-
|
|
25165
|
-
|
|
25166
|
-
|
|
25351
|
+
onPress: openJumpModal,
|
|
25352
|
+
disabled: pageCount <= 0,
|
|
25353
|
+
style: styles5.titleHit,
|
|
25354
|
+
accessibilityLabel: "Open page jump",
|
|
25355
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25356
|
+
import_react_native5.Text,
|
|
25357
|
+
{
|
|
25358
|
+
numberOfLines: 1,
|
|
25359
|
+
style: [styles5.brandText, isDark && styles5.brandTextDark],
|
|
25360
|
+
children: title ?? "Papyrus"
|
|
25361
|
+
}
|
|
25362
|
+
)
|
|
25167
25363
|
}
|
|
25168
25364
|
)
|
|
25169
25365
|
] }),
|
|
25170
|
-
showPageNavigationControls ? /* @__PURE__ */ (0,
|
|
25171
|
-
/* @__PURE__ */ (0,
|
|
25172
|
-
|
|
25366
|
+
showPageNavigationControls ? /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_native5.View, { style: styles5.pageGroup, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(import_jsx_runtime6.Fragment, { children: [
|
|
25367
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25368
|
+
import_react_native5.Pressable,
|
|
25173
25369
|
{
|
|
25174
25370
|
onPress: () => handlePageChange(-1),
|
|
25175
|
-
style: [
|
|
25176
|
-
children: /* @__PURE__ */ (0,
|
|
25371
|
+
style: [styles5.pageButton, isDark && styles5.pageButtonDark],
|
|
25372
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25373
|
+
IconChevronLeft,
|
|
25374
|
+
{
|
|
25375
|
+
size: MOBILE_CHROME_METRICS.iconSize,
|
|
25376
|
+
color: navIconColor
|
|
25377
|
+
}
|
|
25378
|
+
)
|
|
25177
25379
|
}
|
|
25178
25380
|
),
|
|
25179
|
-
/* @__PURE__ */ (0,
|
|
25180
|
-
|
|
25381
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25382
|
+
import_react_native5.Pressable,
|
|
25181
25383
|
{
|
|
25182
25384
|
onPress: openJumpModal,
|
|
25183
|
-
style:
|
|
25385
|
+
style: styles5.pageIndicatorHit,
|
|
25184
25386
|
accessibilityLabel: "Page jump",
|
|
25185
|
-
children: /* @__PURE__ */ (0,
|
|
25186
|
-
|
|
25387
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsxs)(
|
|
25388
|
+
import_react_native5.Text,
|
|
25187
25389
|
{
|
|
25188
25390
|
style: [
|
|
25189
|
-
|
|
25190
|
-
isDark &&
|
|
25391
|
+
styles5.pageIndicator,
|
|
25392
|
+
isDark && styles5.pageIndicatorDark
|
|
25191
25393
|
],
|
|
25192
25394
|
children: [
|
|
25193
|
-
|
|
25395
|
+
currentPage,
|
|
25194
25396
|
"/",
|
|
25195
25397
|
pageCount
|
|
25196
25398
|
]
|
|
@@ -25198,123 +25400,57 @@ var Topbar = ({
|
|
|
25198
25400
|
)
|
|
25199
25401
|
}
|
|
25200
25402
|
),
|
|
25201
|
-
/* @__PURE__ */ (0,
|
|
25202
|
-
|
|
25403
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25404
|
+
import_react_native5.Pressable,
|
|
25203
25405
|
{
|
|
25204
25406
|
onPress: () => handlePageChange(1),
|
|
25205
|
-
style: [
|
|
25206
|
-
children: /* @__PURE__ */ (0,
|
|
25407
|
+
style: [styles5.pageButton, isDark && styles5.pageButtonDark],
|
|
25408
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25409
|
+
IconChevronRight,
|
|
25410
|
+
{
|
|
25411
|
+
size: MOBILE_CHROME_METRICS.iconSize,
|
|
25412
|
+
color: navIconColor
|
|
25413
|
+
}
|
|
25414
|
+
)
|
|
25207
25415
|
}
|
|
25208
25416
|
)
|
|
25209
25417
|
] }) }) : null,
|
|
25210
|
-
/* @__PURE__ */ (0,
|
|
25211
|
-
|
|
25418
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(import_react_native5.View, { style: styles5.rightGroup, children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25419
|
+
import_react_native5.Pressable,
|
|
25212
25420
|
{
|
|
25213
25421
|
onPress: () => onOpenOverflow?.() ?? onOpenSettings?.(),
|
|
25214
|
-
style: [
|
|
25422
|
+
style: [styles5.iconButton, isDark && styles5.iconButtonDark],
|
|
25215
25423
|
accessibilityLabel: "Open overflow menu",
|
|
25216
|
-
children: /* @__PURE__ */ (0,
|
|
25424
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25425
|
+
IconSettings,
|
|
25426
|
+
{
|
|
25427
|
+
size: MOBILE_CHROME_METRICS.iconSize,
|
|
25428
|
+
color: isDark ? "#e5e7eb" : "#111827"
|
|
25429
|
+
}
|
|
25430
|
+
)
|
|
25217
25431
|
}
|
|
25218
25432
|
) })
|
|
25219
25433
|
] })
|
|
25220
25434
|
}
|
|
25221
25435
|
),
|
|
25222
|
-
/* @__PURE__ */ (0,
|
|
25223
|
-
|
|
25436
|
+
/* @__PURE__ */ (0, import_jsx_runtime6.jsx)(
|
|
25437
|
+
PageJumpModal,
|
|
25224
25438
|
{
|
|
25225
25439
|
visible: jumpModalOpen,
|
|
25226
|
-
|
|
25227
|
-
|
|
25228
|
-
|
|
25229
|
-
|
|
25230
|
-
|
|
25231
|
-
|
|
25232
|
-
style: styles4.jumpModalBackdrop,
|
|
25233
|
-
onPress: () => setJumpModalOpen(false),
|
|
25234
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(
|
|
25235
|
-
import_react_native4.Pressable,
|
|
25236
|
-
{
|
|
25237
|
-
style: [styles4.jumpModalCard, isDark && styles4.jumpModalCardDark],
|
|
25238
|
-
onPress: (event) => event.stopPropagation(),
|
|
25239
|
-
children: [
|
|
25240
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
25241
|
-
import_react_native4.Text,
|
|
25242
|
-
{
|
|
25243
|
-
style: [
|
|
25244
|
-
styles4.jumpModalTitle,
|
|
25245
|
-
isDark && styles4.jumpModalTitleDark
|
|
25246
|
-
],
|
|
25247
|
-
children: "Ir para p\xE1gina"
|
|
25248
|
-
}
|
|
25249
|
-
),
|
|
25250
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
25251
|
-
import_react_native4.TextInput,
|
|
25252
|
-
{
|
|
25253
|
-
value: jumpValue,
|
|
25254
|
-
onChangeText: (text) => setJumpValue(text.replace(/[^0-9]/g, "")),
|
|
25255
|
-
keyboardType: "number-pad",
|
|
25256
|
-
autoFocus: true,
|
|
25257
|
-
selectTextOnFocus: true,
|
|
25258
|
-
maxLength: 6,
|
|
25259
|
-
placeholder: "1",
|
|
25260
|
-
placeholderTextColor: isDark ? "#6b7280" : "#9ca3af",
|
|
25261
|
-
style: [styles4.jumpInput, isDark && styles4.jumpInputDark],
|
|
25262
|
-
onSubmitEditing: confirmJump,
|
|
25263
|
-
accessibilityLabel: "Page jump input"
|
|
25264
|
-
}
|
|
25265
|
-
),
|
|
25266
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsxs)(import_react_native4.View, { style: styles4.jumpActions, children: [
|
|
25267
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
25268
|
-
import_react_native4.Pressable,
|
|
25269
|
-
{
|
|
25270
|
-
onPress: () => setJumpModalOpen(false),
|
|
25271
|
-
style: [
|
|
25272
|
-
styles4.jumpActionButton,
|
|
25273
|
-
styles4.jumpActionCancel,
|
|
25274
|
-
isDark && styles4.jumpActionCancelDark
|
|
25275
|
-
],
|
|
25276
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
25277
|
-
import_react_native4.Text,
|
|
25278
|
-
{
|
|
25279
|
-
style: [
|
|
25280
|
-
styles4.jumpActionText,
|
|
25281
|
-
isDark && styles4.jumpActionTextDark
|
|
25282
|
-
],
|
|
25283
|
-
children: "Cancelar"
|
|
25284
|
-
}
|
|
25285
|
-
)
|
|
25286
|
-
}
|
|
25287
|
-
),
|
|
25288
|
-
/* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
25289
|
-
import_react_native4.Pressable,
|
|
25290
|
-
{
|
|
25291
|
-
onPress: confirmJump,
|
|
25292
|
-
style: [
|
|
25293
|
-
styles4.jumpActionButton,
|
|
25294
|
-
{ backgroundColor: accentColor }
|
|
25295
|
-
],
|
|
25296
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime5.jsx)(
|
|
25297
|
-
import_react_native4.Text,
|
|
25298
|
-
{
|
|
25299
|
-
style: [styles4.jumpActionText, styles4.jumpActionTextPrimary],
|
|
25300
|
-
children: "Ir"
|
|
25301
|
-
}
|
|
25302
|
-
)
|
|
25303
|
-
}
|
|
25304
|
-
)
|
|
25305
|
-
] })
|
|
25306
|
-
]
|
|
25307
|
-
}
|
|
25308
|
-
)
|
|
25309
|
-
}
|
|
25310
|
-
)
|
|
25440
|
+
currentPage,
|
|
25441
|
+
pageCount,
|
|
25442
|
+
isDark,
|
|
25443
|
+
accentColor,
|
|
25444
|
+
onClose: () => setJumpModalOpen(false),
|
|
25445
|
+
onConfirm: navigateToPage
|
|
25311
25446
|
}
|
|
25312
25447
|
)
|
|
25313
25448
|
] });
|
|
25314
25449
|
};
|
|
25315
|
-
var
|
|
25450
|
+
var styles5 = import_react_native5.StyleSheet.create({
|
|
25316
25451
|
container: {
|
|
25317
|
-
|
|
25452
|
+
width: "100%",
|
|
25453
|
+
maxWidth: MOBILE_CHROME_METRICS.maxFloatingWidth,
|
|
25318
25454
|
marginTop: 10,
|
|
25319
25455
|
paddingHorizontal: 14,
|
|
25320
25456
|
paddingVertical: 10,
|
|
@@ -25339,7 +25475,9 @@ var styles4 = import_react_native4.StyleSheet.create({
|
|
|
25339
25475
|
top: 0,
|
|
25340
25476
|
left: 0,
|
|
25341
25477
|
right: 0,
|
|
25342
|
-
zIndex: 20
|
|
25478
|
+
zIndex: 20,
|
|
25479
|
+
paddingHorizontal: MOBILE_CHROME_METRICS.screenPadding,
|
|
25480
|
+
alignItems: "center"
|
|
25343
25481
|
},
|
|
25344
25482
|
leftGroup: {
|
|
25345
25483
|
flexDirection: "row",
|
|
@@ -25374,6 +25512,12 @@ var styles4 = import_react_native4.StyleSheet.create({
|
|
|
25374
25512
|
brandTextDark: {
|
|
25375
25513
|
color: "#f9fafb"
|
|
25376
25514
|
},
|
|
25515
|
+
titleHit: {
|
|
25516
|
+
flexShrink: 1,
|
|
25517
|
+
flexGrow: 1,
|
|
25518
|
+
minWidth: 0,
|
|
25519
|
+
borderRadius: 8
|
|
25520
|
+
},
|
|
25377
25521
|
pageGroup: {
|
|
25378
25522
|
flexDirection: "row",
|
|
25379
25523
|
alignItems: "center",
|
|
@@ -25381,8 +25525,8 @@ var styles4 = import_react_native4.StyleSheet.create({
|
|
|
25381
25525
|
justifyContent: "center"
|
|
25382
25526
|
},
|
|
25383
25527
|
pageButton: {
|
|
25384
|
-
width:
|
|
25385
|
-
height:
|
|
25528
|
+
width: MOBILE_CHROME_METRICS.topbarPageButtonSize,
|
|
25529
|
+
height: MOBILE_CHROME_METRICS.topbarPageButtonSize,
|
|
25386
25530
|
borderRadius: 10,
|
|
25387
25531
|
alignItems: "center",
|
|
25388
25532
|
justifyContent: "center",
|
|
@@ -25452,86 +25596,13 @@ var styles4 = import_react_native4.StyleSheet.create({
|
|
|
25452
25596
|
},
|
|
25453
25597
|
iconRowSpacer: {
|
|
25454
25598
|
width: 6
|
|
25455
|
-
},
|
|
25456
|
-
jumpModalBackdrop: {
|
|
25457
|
-
flex: 1,
|
|
25458
|
-
backgroundColor: "rgba(0, 0, 0, 0.35)",
|
|
25459
|
-
alignItems: "center",
|
|
25460
|
-
justifyContent: "center",
|
|
25461
|
-
paddingHorizontal: 24
|
|
25462
|
-
},
|
|
25463
|
-
jumpModalCard: {
|
|
25464
|
-
width: "100%",
|
|
25465
|
-
maxWidth: 280,
|
|
25466
|
-
backgroundColor: "#ffffff",
|
|
25467
|
-
borderRadius: 14,
|
|
25468
|
-
borderWidth: 1,
|
|
25469
|
-
borderColor: "#e5e7eb",
|
|
25470
|
-
padding: 14
|
|
25471
|
-
},
|
|
25472
|
-
jumpModalCardDark: {
|
|
25473
|
-
backgroundColor: "#0f1115",
|
|
25474
|
-
borderColor: "#1f2937"
|
|
25475
|
-
},
|
|
25476
|
-
jumpModalTitle: {
|
|
25477
|
-
fontSize: 13,
|
|
25478
|
-
fontWeight: "700",
|
|
25479
|
-
color: "#111827",
|
|
25480
|
-
marginBottom: 10
|
|
25481
|
-
},
|
|
25482
|
-
jumpModalTitleDark: {
|
|
25483
|
-
color: "#f3f4f6"
|
|
25484
|
-
},
|
|
25485
|
-
jumpInput: {
|
|
25486
|
-
borderWidth: 1,
|
|
25487
|
-
borderColor: "#d1d5db",
|
|
25488
|
-
borderRadius: 10,
|
|
25489
|
-
paddingHorizontal: 12,
|
|
25490
|
-
paddingVertical: 8,
|
|
25491
|
-
fontSize: 15,
|
|
25492
|
-
color: "#111827",
|
|
25493
|
-
marginBottom: 12
|
|
25494
|
-
},
|
|
25495
|
-
jumpInputDark: {
|
|
25496
|
-
borderColor: "#374151",
|
|
25497
|
-
color: "#f3f4f6",
|
|
25498
|
-
backgroundColor: "#111827"
|
|
25499
|
-
},
|
|
25500
|
-
jumpActions: {
|
|
25501
|
-
flexDirection: "row",
|
|
25502
|
-
justifyContent: "flex-end"
|
|
25503
|
-
},
|
|
25504
|
-
jumpActionButton: {
|
|
25505
|
-
paddingHorizontal: 12,
|
|
25506
|
-
paddingVertical: 8,
|
|
25507
|
-
borderRadius: 8,
|
|
25508
|
-
marginLeft: 8,
|
|
25509
|
-
minWidth: 64,
|
|
25510
|
-
alignItems: "center"
|
|
25511
|
-
},
|
|
25512
|
-
jumpActionCancel: {
|
|
25513
|
-
backgroundColor: "#f3f4f6"
|
|
25514
|
-
},
|
|
25515
|
-
jumpActionCancelDark: {
|
|
25516
|
-
backgroundColor: "#111827"
|
|
25517
|
-
},
|
|
25518
|
-
jumpActionText: {
|
|
25519
|
-
fontSize: 12,
|
|
25520
|
-
fontWeight: "700",
|
|
25521
|
-
color: "#111827"
|
|
25522
|
-
},
|
|
25523
|
-
jumpActionTextDark: {
|
|
25524
|
-
color: "#e5e7eb"
|
|
25525
|
-
},
|
|
25526
|
-
jumpActionTextPrimary: {
|
|
25527
|
-
color: "#ffffff"
|
|
25528
25599
|
}
|
|
25529
25600
|
});
|
|
25530
25601
|
var Topbar_default = Topbar;
|
|
25531
25602
|
|
|
25532
25603
|
// components/ToolDock.tsx
|
|
25533
|
-
var
|
|
25534
|
-
var
|
|
25604
|
+
var import_react6 = __toESM(require("react"));
|
|
25605
|
+
var import_react_native6 = require("react-native");
|
|
25535
25606
|
var import_core5 = require("@papyrus-sdk/core");
|
|
25536
25607
|
|
|
25537
25608
|
// mobileStrings.ts
|
|
@@ -25664,9 +25735,27 @@ var getStrings = (locale) => STRINGS[locale ?? "en"] ?? STRINGS.en;
|
|
|
25664
25735
|
// components/ToolDock.layout.ts
|
|
25665
25736
|
var TOOL_DOCK_SCROLL_THRESHOLD = 420;
|
|
25666
25737
|
var shouldUseScrollablePrimaryToolsRow = (windowWidth) => windowWidth < TOOL_DOCK_SCROLL_THRESHOLD;
|
|
25738
|
+
var DRAWING_TOOL_IDS = /* @__PURE__ */ new Set(["ink", "highlight", "underline"]);
|
|
25739
|
+
var resolveToolDockBaseIconColor = ({
|
|
25740
|
+
label,
|
|
25741
|
+
isDark
|
|
25742
|
+
}) => {
|
|
25743
|
+
if (label === "note") return "#f4c430";
|
|
25744
|
+
return isDark ? "#f8fafc" : "#111827";
|
|
25745
|
+
};
|
|
25746
|
+
var resolveToolDockIconColor = ({
|
|
25747
|
+
toolId,
|
|
25748
|
+
isSelected,
|
|
25749
|
+
annotationColor,
|
|
25750
|
+
accentColor,
|
|
25751
|
+
baseIconColor
|
|
25752
|
+
}) => {
|
|
25753
|
+
if (!isSelected) return baseIconColor;
|
|
25754
|
+
return DRAWING_TOOL_IDS.has(toolId) ? annotationColor : accentColor;
|
|
25755
|
+
};
|
|
25667
25756
|
|
|
25668
25757
|
// components/ToolDock.tsx
|
|
25669
|
-
var
|
|
25758
|
+
var import_jsx_runtime7 = require("react/jsx-runtime");
|
|
25670
25759
|
var COLOR_SWATCHES = [
|
|
25671
25760
|
"#fbbf24",
|
|
25672
25761
|
"#f97316",
|
|
@@ -25716,10 +25805,7 @@ var OPACITY_TRACK_PADDING = 6;
|
|
|
25716
25805
|
var OPACITY_THUMB_SIZE = 22;
|
|
25717
25806
|
var OPACITY_RAIL_HEIGHT = 10;
|
|
25718
25807
|
var getToolAccentColor = (tool, isDark) => {
|
|
25719
|
-
|
|
25720
|
-
return "#f4c430";
|
|
25721
|
-
}
|
|
25722
|
-
return isDark ? "#f8fafc" : "#111827";
|
|
25808
|
+
return resolveToolDockBaseIconColor({ label: tool.label, isDark });
|
|
25723
25809
|
};
|
|
25724
25810
|
var getToolVisual = (toolId) => {
|
|
25725
25811
|
switch (toolId) {
|
|
@@ -25740,24 +25826,24 @@ var getToolVisual = (toolId) => {
|
|
|
25740
25826
|
return { width: 24, iconSize: 28, offsetY: 6 };
|
|
25741
25827
|
}
|
|
25742
25828
|
};
|
|
25743
|
-
var OpacitySlider =
|
|
25829
|
+
var OpacitySlider = import_react6.default.memo(function OpacitySlider2({
|
|
25744
25830
|
value,
|
|
25745
25831
|
color,
|
|
25746
25832
|
isDark,
|
|
25747
25833
|
onCommit
|
|
25748
25834
|
}) {
|
|
25749
|
-
const [trackWidth, setTrackWidth] = (0,
|
|
25750
|
-
const [draftValue, setDraftValue] = (0,
|
|
25751
|
-
const dragValueRef = (0,
|
|
25752
|
-
const isDraggingRef = (0,
|
|
25753
|
-
const frameRef = (0,
|
|
25754
|
-
(0,
|
|
25835
|
+
const [trackWidth, setTrackWidth] = (0, import_react6.useState)(0);
|
|
25836
|
+
const [draftValue, setDraftValue] = (0, import_react6.useState)(value);
|
|
25837
|
+
const dragValueRef = (0, import_react6.useRef)(draftValue);
|
|
25838
|
+
const isDraggingRef = (0, import_react6.useRef)(false);
|
|
25839
|
+
const frameRef = (0, import_react6.useRef)(null);
|
|
25840
|
+
(0, import_react6.useEffect)(() => {
|
|
25755
25841
|
if (!isDraggingRef.current) {
|
|
25756
25842
|
dragValueRef.current = value;
|
|
25757
25843
|
setDraftValue(value);
|
|
25758
25844
|
}
|
|
25759
25845
|
}, [value]);
|
|
25760
|
-
(0,
|
|
25846
|
+
(0, import_react6.useEffect)(() => {
|
|
25761
25847
|
return () => {
|
|
25762
25848
|
if (frameRef.current !== null) {
|
|
25763
25849
|
cancelAnimationFrame(frameRef.current);
|
|
@@ -25794,10 +25880,10 @@ var OpacitySlider = import_react5.default.memo(function OpacitySlider2({
|
|
|
25794
25880
|
setDraftValue(next);
|
|
25795
25881
|
onCommit(next);
|
|
25796
25882
|
};
|
|
25797
|
-
return /* @__PURE__ */ (0,
|
|
25798
|
-
|
|
25883
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.View, { style: styles6.opacitySliderWrap, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
25884
|
+
import_react_native6.View,
|
|
25799
25885
|
{
|
|
25800
|
-
style:
|
|
25886
|
+
style: styles6.opacityTouchSurface,
|
|
25801
25887
|
onLayout: (event) => setTrackWidth(event.nativeEvent.layout.width),
|
|
25802
25888
|
onStartShouldSetResponder: () => true,
|
|
25803
25889
|
onMoveShouldSetResponder: () => true,
|
|
@@ -25806,12 +25892,12 @@ var OpacitySlider = import_react5.default.memo(function OpacitySlider2({
|
|
|
25806
25892
|
onResponderRelease: commitDraft,
|
|
25807
25893
|
onResponderTerminate: () => commitDraft(),
|
|
25808
25894
|
children: [
|
|
25809
|
-
/* @__PURE__ */ (0,
|
|
25810
|
-
/* @__PURE__ */ (0,
|
|
25811
|
-
|
|
25895
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.View, { style: styles6.opacityTrack }),
|
|
25896
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
25897
|
+
import_react_native6.View,
|
|
25812
25898
|
{
|
|
25813
25899
|
style: [
|
|
25814
|
-
|
|
25900
|
+
styles6.opacityTrackFill,
|
|
25815
25901
|
{
|
|
25816
25902
|
width: fillWidth,
|
|
25817
25903
|
backgroundColor: withInkAlpha(color, 0.92)
|
|
@@ -25819,11 +25905,11 @@ var OpacitySlider = import_react5.default.memo(function OpacitySlider2({
|
|
|
25819
25905
|
]
|
|
25820
25906
|
}
|
|
25821
25907
|
),
|
|
25822
|
-
/* @__PURE__ */ (0,
|
|
25823
|
-
|
|
25908
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
25909
|
+
import_react_native6.View,
|
|
25824
25910
|
{
|
|
25825
25911
|
style: [
|
|
25826
|
-
|
|
25912
|
+
styles6.opacityThumb,
|
|
25827
25913
|
{
|
|
25828
25914
|
left: thumbOffset,
|
|
25829
25915
|
borderColor: isDark ? "#0f172a" : "#ffffff"
|
|
@@ -25856,10 +25942,10 @@ var ToolDock = () => {
|
|
|
25856
25942
|
undoAnnotations,
|
|
25857
25943
|
redoAnnotations
|
|
25858
25944
|
} = (0, import_core5.useViewerStore)();
|
|
25859
|
-
const [paletteExpanded, setPaletteExpanded] = (0,
|
|
25860
|
-
const [extrasExpanded, setExtrasExpanded] = (0,
|
|
25945
|
+
const [paletteExpanded, setPaletteExpanded] = (0, import_react6.useState)(false);
|
|
25946
|
+
const [extrasExpanded, setExtrasExpanded] = (0, import_react6.useState)(false);
|
|
25861
25947
|
const isDark = uiTheme === "dark";
|
|
25862
|
-
const { width: windowWidth } = (0,
|
|
25948
|
+
const { width: windowWidth } = (0, import_react_native6.useWindowDimensions)();
|
|
25863
25949
|
const t = getStrings(locale);
|
|
25864
25950
|
const panelColor = isDark ? "rgba(24,24,27,0.92)" : "rgba(255,255,255,0.96)";
|
|
25865
25951
|
const borderColor = isDark ? "rgba(71,85,105,0.48)" : "rgba(229,231,235,0.88)";
|
|
@@ -25867,7 +25953,7 @@ var ToolDock = () => {
|
|
|
25867
25953
|
const iconColor = isDark ? "#e5e7eb" : "#111827";
|
|
25868
25954
|
const labelColor = isDark ? "#e5e7eb" : "#374151";
|
|
25869
25955
|
const utilityIconColor = isDark ? "#f8fafc" : "#111827";
|
|
25870
|
-
const selectedTool = (0,
|
|
25956
|
+
const selectedTool = (0, import_react6.useMemo)(
|
|
25871
25957
|
() => ALL_TOOLS.find(
|
|
25872
25958
|
(tool) => tool.id === "ink" || tool.id === "highlight" || tool.id === "underline" ? activeTool === "ink" && activeDrawToolPreset === tool.id : isToolDockToolSelected({
|
|
25873
25959
|
toolId: tool.id,
|
|
@@ -25935,22 +26021,29 @@ var ToolDock = () => {
|
|
|
25935
26021
|
const Icon = tool.icon;
|
|
25936
26022
|
const visual = getToolVisual(tool.id);
|
|
25937
26023
|
const baseIconColor = getToolAccentColor(tool, isDark);
|
|
25938
|
-
|
|
25939
|
-
|
|
26024
|
+
const iconColor2 = resolveToolDockIconColor({
|
|
26025
|
+
toolId: tool.id,
|
|
26026
|
+
isSelected,
|
|
26027
|
+
annotationColor,
|
|
26028
|
+
accentColor,
|
|
26029
|
+
baseIconColor
|
|
26030
|
+
});
|
|
26031
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26032
|
+
import_react_native6.Pressable,
|
|
25940
26033
|
{
|
|
25941
26034
|
onPress: () => {
|
|
25942
26035
|
applyTool(tool.id);
|
|
25943
26036
|
if (compact) setExtrasExpanded(false);
|
|
25944
26037
|
},
|
|
25945
26038
|
style: [
|
|
25946
|
-
compact ?
|
|
26039
|
+
compact ? styles6.compactToolButton : styles6.toolButton,
|
|
25947
26040
|
{ width: compact ? void 0 : visual.width }
|
|
25948
26041
|
],
|
|
25949
|
-
children: /* @__PURE__ */ (0,
|
|
25950
|
-
|
|
26042
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26043
|
+
import_react_native6.View,
|
|
25951
26044
|
{
|
|
25952
26045
|
style: [
|
|
25953
|
-
compact ?
|
|
26046
|
+
compact ? styles6.compactToolIconWrap : styles6.toolIconWrap,
|
|
25954
26047
|
{
|
|
25955
26048
|
transform: [
|
|
25956
26049
|
{ translateY: compact ? 4 : visual.offsetY },
|
|
@@ -25959,11 +26052,11 @@ var ToolDock = () => {
|
|
|
25959
26052
|
opacity: isSelected ? 1 : 0.92
|
|
25960
26053
|
}
|
|
25961
26054
|
],
|
|
25962
|
-
children: /* @__PURE__ */ (0,
|
|
26055
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
25963
26056
|
Icon,
|
|
25964
26057
|
{
|
|
25965
26058
|
size: compact ? 34 : visual.iconSize,
|
|
25966
|
-
color:
|
|
26059
|
+
color: iconColor2
|
|
25967
26060
|
}
|
|
25968
26061
|
)
|
|
25969
26062
|
}
|
|
@@ -25972,35 +26065,35 @@ var ToolDock = () => {
|
|
|
25972
26065
|
tool.id
|
|
25973
26066
|
);
|
|
25974
26067
|
};
|
|
25975
|
-
return /* @__PURE__ */ (0,
|
|
25976
|
-
paletteExpanded ? /* @__PURE__ */ (0,
|
|
25977
|
-
|
|
26068
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.View, { pointerEvents: "box-none", style: styles6.root, children: toolDockOpen ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native6.View, { style: styles6.stack, children: [
|
|
26069
|
+
paletteExpanded ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26070
|
+
import_react_native6.View,
|
|
25978
26071
|
{
|
|
25979
26072
|
style: [
|
|
25980
|
-
|
|
26073
|
+
styles6.popup,
|
|
25981
26074
|
{
|
|
25982
26075
|
backgroundColor: panelColor,
|
|
25983
26076
|
borderColor
|
|
25984
26077
|
}
|
|
25985
26078
|
],
|
|
25986
|
-
children: /* @__PURE__ */ (0,
|
|
26079
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.View, { style: styles6.swatchRow, children: COLOR_SWATCHES.map((color) => {
|
|
25987
26080
|
const isSelected = annotationColor === color;
|
|
25988
|
-
return /* @__PURE__ */ (0,
|
|
25989
|
-
|
|
26081
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26082
|
+
import_react_native6.Pressable,
|
|
25990
26083
|
{
|
|
25991
26084
|
onPress: () => setAnnotationColor(color),
|
|
25992
26085
|
style: [
|
|
25993
|
-
|
|
26086
|
+
styles6.swatchOuter,
|
|
25994
26087
|
{
|
|
25995
26088
|
borderColor: isSelected ? accentColor : "transparent",
|
|
25996
26089
|
backgroundColor: isSelected ? `${accentColor}12` : "transparent"
|
|
25997
26090
|
}
|
|
25998
26091
|
],
|
|
25999
|
-
children: /* @__PURE__ */ (0,
|
|
26000
|
-
|
|
26092
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26093
|
+
import_react_native6.View,
|
|
26001
26094
|
{
|
|
26002
26095
|
style: [
|
|
26003
|
-
|
|
26096
|
+
styles6.swatch,
|
|
26004
26097
|
{
|
|
26005
26098
|
backgroundColor: color,
|
|
26006
26099
|
borderColor: color === "#f3f4f6" ? "#d1d5db" : "transparent"
|
|
@@ -26014,32 +26107,32 @@ var ToolDock = () => {
|
|
|
26014
26107
|
}) })
|
|
26015
26108
|
}
|
|
26016
26109
|
) : null,
|
|
26017
|
-
inkSettingsExpanded ? /* @__PURE__ */ (0,
|
|
26018
|
-
|
|
26110
|
+
inkSettingsExpanded ? /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
26111
|
+
import_react_native6.View,
|
|
26019
26112
|
{
|
|
26020
26113
|
style: [
|
|
26021
|
-
|
|
26022
|
-
|
|
26114
|
+
styles6.popup,
|
|
26115
|
+
styles6.inkPopup,
|
|
26023
26116
|
{
|
|
26024
26117
|
backgroundColor: panelColor,
|
|
26025
26118
|
borderColor
|
|
26026
26119
|
}
|
|
26027
26120
|
],
|
|
26028
26121
|
children: [
|
|
26029
|
-
/* @__PURE__ */ (0,
|
|
26122
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.View, { style: styles6.inkPreviewRow, children: INK_WIDTHS.map((width) => {
|
|
26030
26123
|
const selected = Math.abs(inkStrokeWidth - width) < 5e-4;
|
|
26031
|
-
return /* @__PURE__ */ (0,
|
|
26032
|
-
|
|
26124
|
+
return /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26125
|
+
import_react_native6.Pressable,
|
|
26033
26126
|
{
|
|
26034
26127
|
onPress: () => setInkStrokeWidth(width),
|
|
26035
26128
|
style: [
|
|
26036
|
-
|
|
26129
|
+
styles6.inkWidthButton,
|
|
26037
26130
|
selected && {
|
|
26038
26131
|
backgroundColor: `${accentColor}12`,
|
|
26039
26132
|
borderColor: `${accentColor}30`
|
|
26040
26133
|
}
|
|
26041
26134
|
],
|
|
26042
|
-
children: /* @__PURE__ */ (0,
|
|
26135
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.View, { style: styles6.inkNib, children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26043
26136
|
IconToolInk,
|
|
26044
26137
|
{
|
|
26045
26138
|
size: Math.round(18 + width * 1200),
|
|
@@ -26050,7 +26143,7 @@ var ToolDock = () => {
|
|
|
26050
26143
|
width
|
|
26051
26144
|
);
|
|
26052
26145
|
}) }),
|
|
26053
|
-
/* @__PURE__ */ (0,
|
|
26146
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26054
26147
|
OpacitySlider,
|
|
26055
26148
|
{
|
|
26056
26149
|
value: annotationOpacity,
|
|
@@ -26062,106 +26155,106 @@ var ToolDock = () => {
|
|
|
26062
26155
|
]
|
|
26063
26156
|
}
|
|
26064
26157
|
) : null,
|
|
26065
|
-
extrasExpanded ? /* @__PURE__ */ (0,
|
|
26066
|
-
|
|
26158
|
+
extrasExpanded ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26159
|
+
import_react_native6.View,
|
|
26067
26160
|
{
|
|
26068
26161
|
style: [
|
|
26069
|
-
|
|
26070
|
-
|
|
26162
|
+
styles6.popup,
|
|
26163
|
+
styles6.extrasPopup,
|
|
26071
26164
|
{
|
|
26072
26165
|
backgroundColor: panelColor,
|
|
26073
26166
|
borderColor
|
|
26074
26167
|
}
|
|
26075
26168
|
],
|
|
26076
|
-
children: /* @__PURE__ */ (0,
|
|
26169
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.View, { style: styles6.compactToolsRow, children: EXTRA_TOOLS.map((tool) => renderToolButton(tool, true)) })
|
|
26077
26170
|
}
|
|
26078
26171
|
) : null,
|
|
26079
|
-
/* @__PURE__ */ (0,
|
|
26080
|
-
|
|
26172
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26173
|
+
import_react_native6.View,
|
|
26081
26174
|
{
|
|
26082
26175
|
style: [
|
|
26083
|
-
|
|
26176
|
+
styles6.container,
|
|
26084
26177
|
{
|
|
26085
26178
|
backgroundColor: panelColor,
|
|
26086
26179
|
borderColor
|
|
26087
26180
|
}
|
|
26088
26181
|
],
|
|
26089
|
-
children: primaryToolsRowIsScrollable ? /* @__PURE__ */ (0,
|
|
26090
|
-
|
|
26182
|
+
children: primaryToolsRowIsScrollable ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26183
|
+
import_react_native6.ScrollView,
|
|
26091
26184
|
{
|
|
26092
26185
|
horizontal: true,
|
|
26093
26186
|
bounces: false,
|
|
26094
26187
|
showsHorizontalScrollIndicator: false,
|
|
26095
|
-
style:
|
|
26188
|
+
style: styles6.primaryToolsScrollView,
|
|
26096
26189
|
contentContainerStyle: [
|
|
26097
|
-
|
|
26098
|
-
|
|
26190
|
+
styles6.primaryToolsRow,
|
|
26191
|
+
styles6.primaryToolsRowScrollableContent
|
|
26099
26192
|
],
|
|
26100
|
-
children: /* @__PURE__ */ (0,
|
|
26101
|
-
/* @__PURE__ */ (0,
|
|
26102
|
-
/* @__PURE__ */ (0,
|
|
26103
|
-
|
|
26193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native6.View, { style: styles6.primaryToolsRowInner, children: [
|
|
26194
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native6.View, { style: styles6.historyGroup, children: [
|
|
26195
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26196
|
+
import_react_native6.Pressable,
|
|
26104
26197
|
{
|
|
26105
26198
|
onPress: undoAnnotations,
|
|
26106
26199
|
disabled: !canUndo,
|
|
26107
26200
|
style: [
|
|
26108
|
-
|
|
26109
|
-
|
|
26201
|
+
styles6.utilityButton,
|
|
26202
|
+
styles6.historyButton,
|
|
26110
26203
|
{ backgroundColor: buttonColor },
|
|
26111
|
-
!canUndo &&
|
|
26204
|
+
!canUndo && styles6.disabledButton
|
|
26112
26205
|
],
|
|
26113
|
-
children: /* @__PURE__ */ (0,
|
|
26206
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26114
26207
|
IconUndo,
|
|
26115
26208
|
{
|
|
26116
|
-
size:
|
|
26117
|
-
color: canUndo ? utilityIconColor : isDark ?
|
|
26209
|
+
size: MOBILE_CHROME_METRICS.toolDockHistoryIconSize,
|
|
26210
|
+
color: canUndo ? utilityIconColor : isDark ? MOBILE_CHROME_METRICS.toolDockDisabledIconColorDark : MOBILE_CHROME_METRICS.toolDockDisabledIconColorLight,
|
|
26118
26211
|
strokeWidth: 2.2
|
|
26119
26212
|
}
|
|
26120
26213
|
)
|
|
26121
26214
|
}
|
|
26122
26215
|
),
|
|
26123
|
-
/* @__PURE__ */ (0,
|
|
26124
|
-
|
|
26216
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26217
|
+
import_react_native6.Pressable,
|
|
26125
26218
|
{
|
|
26126
26219
|
onPress: redoAnnotations,
|
|
26127
26220
|
disabled: !canRedo,
|
|
26128
26221
|
style: [
|
|
26129
|
-
|
|
26130
|
-
|
|
26222
|
+
styles6.utilityButton,
|
|
26223
|
+
styles6.historyButton,
|
|
26131
26224
|
{ backgroundColor: buttonColor },
|
|
26132
|
-
!canRedo &&
|
|
26225
|
+
!canRedo && styles6.disabledButton
|
|
26133
26226
|
],
|
|
26134
|
-
children: /* @__PURE__ */ (0,
|
|
26227
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26135
26228
|
IconRedo,
|
|
26136
26229
|
{
|
|
26137
|
-
size:
|
|
26138
|
-
color: canRedo ? utilityIconColor : isDark ?
|
|
26230
|
+
size: MOBILE_CHROME_METRICS.toolDockHistoryIconSize,
|
|
26231
|
+
color: canRedo ? utilityIconColor : isDark ? MOBILE_CHROME_METRICS.toolDockDisabledIconColorDark : MOBILE_CHROME_METRICS.toolDockDisabledIconColorLight,
|
|
26139
26232
|
strokeWidth: 2.2
|
|
26140
26233
|
}
|
|
26141
26234
|
)
|
|
26142
26235
|
}
|
|
26143
26236
|
)
|
|
26144
26237
|
] }),
|
|
26145
|
-
/* @__PURE__ */ (0,
|
|
26146
|
-
/* @__PURE__ */ (0,
|
|
26147
|
-
/* @__PURE__ */ (0,
|
|
26148
|
-
|
|
26238
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.View, { style: styles6.toolsGroup, children: PRIMARY_TOOLS.map((tool) => renderToolButton(tool)) }),
|
|
26239
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native6.View, { style: styles6.controlsGroup, children: [
|
|
26240
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26241
|
+
import_react_native6.Pressable,
|
|
26149
26242
|
{
|
|
26150
26243
|
onPress: () => {
|
|
26151
26244
|
setExtrasExpanded((value) => !value);
|
|
26152
26245
|
setPaletteExpanded(false);
|
|
26153
26246
|
},
|
|
26154
26247
|
style: [
|
|
26155
|
-
|
|
26248
|
+
styles6.utilityButton,
|
|
26156
26249
|
{
|
|
26157
26250
|
backgroundColor: extrasExpanded ? `${accentColor}12` : buttonColor
|
|
26158
26251
|
}
|
|
26159
26252
|
],
|
|
26160
|
-
children: /* @__PURE__ */ (0,
|
|
26161
|
-
|
|
26253
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26254
|
+
import_react_native6.Text,
|
|
26162
26255
|
{
|
|
26163
26256
|
style: [
|
|
26164
|
-
|
|
26257
|
+
styles6.utilityLabel,
|
|
26165
26258
|
{ color: extrasExpanded ? accentColor : utilityIconColor }
|
|
26166
26259
|
],
|
|
26167
26260
|
children: "+"
|
|
@@ -26169,15 +26262,15 @@ var ToolDock = () => {
|
|
|
26169
26262
|
)
|
|
26170
26263
|
}
|
|
26171
26264
|
),
|
|
26172
|
-
/* @__PURE__ */ (0,
|
|
26173
|
-
|
|
26265
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26266
|
+
import_react_native6.Pressable,
|
|
26174
26267
|
{
|
|
26175
26268
|
onPress: () => {
|
|
26176
26269
|
setPaletteExpanded((value) => !value);
|
|
26177
26270
|
setExtrasExpanded(false);
|
|
26178
26271
|
},
|
|
26179
|
-
style:
|
|
26180
|
-
children: /* @__PURE__ */ (0,
|
|
26272
|
+
style: styles6.colorButton,
|
|
26273
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26181
26274
|
IconColorRing,
|
|
26182
26275
|
{
|
|
26183
26276
|
size: 30,
|
|
@@ -26187,8 +26280,8 @@ var ToolDock = () => {
|
|
|
26187
26280
|
)
|
|
26188
26281
|
}
|
|
26189
26282
|
),
|
|
26190
|
-
/* @__PURE__ */ (0,
|
|
26191
|
-
|
|
26283
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26284
|
+
import_react_native6.Pressable,
|
|
26192
26285
|
{
|
|
26193
26286
|
onPress: () => setDocumentState(
|
|
26194
26287
|
getToolDockDismissState({
|
|
@@ -26197,10 +26290,10 @@ var ToolDock = () => {
|
|
|
26197
26290
|
})
|
|
26198
26291
|
),
|
|
26199
26292
|
style: [
|
|
26200
|
-
|
|
26293
|
+
styles6.utilityButton,
|
|
26201
26294
|
{ backgroundColor: buttonColor }
|
|
26202
26295
|
],
|
|
26203
|
-
children: /* @__PURE__ */ (0,
|
|
26296
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26204
26297
|
IconClose,
|
|
26205
26298
|
{
|
|
26206
26299
|
size: 15,
|
|
@@ -26213,71 +26306,71 @@ var ToolDock = () => {
|
|
|
26213
26306
|
] })
|
|
26214
26307
|
] })
|
|
26215
26308
|
}
|
|
26216
|
-
) : /* @__PURE__ */ (0,
|
|
26217
|
-
/* @__PURE__ */ (0,
|
|
26218
|
-
/* @__PURE__ */ (0,
|
|
26219
|
-
|
|
26309
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native6.View, { style: styles6.primaryToolsRow, children: [
|
|
26310
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native6.View, { style: styles6.historyGroup, children: [
|
|
26311
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26312
|
+
import_react_native6.Pressable,
|
|
26220
26313
|
{
|
|
26221
26314
|
onPress: undoAnnotations,
|
|
26222
26315
|
disabled: !canUndo,
|
|
26223
26316
|
style: [
|
|
26224
|
-
|
|
26225
|
-
|
|
26317
|
+
styles6.utilityButton,
|
|
26318
|
+
styles6.historyButton,
|
|
26226
26319
|
{ backgroundColor: buttonColor },
|
|
26227
|
-
!canUndo &&
|
|
26320
|
+
!canUndo && styles6.disabledButton
|
|
26228
26321
|
],
|
|
26229
|
-
children: /* @__PURE__ */ (0,
|
|
26322
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26230
26323
|
IconUndo,
|
|
26231
26324
|
{
|
|
26232
|
-
size:
|
|
26233
|
-
color: canUndo ? utilityIconColor : isDark ?
|
|
26325
|
+
size: MOBILE_CHROME_METRICS.toolDockHistoryIconSize,
|
|
26326
|
+
color: canUndo ? utilityIconColor : isDark ? MOBILE_CHROME_METRICS.toolDockDisabledIconColorDark : MOBILE_CHROME_METRICS.toolDockDisabledIconColorLight,
|
|
26234
26327
|
strokeWidth: 2.2
|
|
26235
26328
|
}
|
|
26236
26329
|
)
|
|
26237
26330
|
}
|
|
26238
26331
|
),
|
|
26239
|
-
/* @__PURE__ */ (0,
|
|
26240
|
-
|
|
26332
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26333
|
+
import_react_native6.Pressable,
|
|
26241
26334
|
{
|
|
26242
26335
|
onPress: redoAnnotations,
|
|
26243
26336
|
disabled: !canRedo,
|
|
26244
26337
|
style: [
|
|
26245
|
-
|
|
26246
|
-
|
|
26338
|
+
styles6.utilityButton,
|
|
26339
|
+
styles6.historyButton,
|
|
26247
26340
|
{ backgroundColor: buttonColor },
|
|
26248
|
-
!canRedo &&
|
|
26341
|
+
!canRedo && styles6.disabledButton
|
|
26249
26342
|
],
|
|
26250
|
-
children: /* @__PURE__ */ (0,
|
|
26343
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26251
26344
|
IconRedo,
|
|
26252
26345
|
{
|
|
26253
|
-
size:
|
|
26254
|
-
color: canRedo ? utilityIconColor : isDark ?
|
|
26346
|
+
size: MOBILE_CHROME_METRICS.toolDockHistoryIconSize,
|
|
26347
|
+
color: canRedo ? utilityIconColor : isDark ? MOBILE_CHROME_METRICS.toolDockDisabledIconColorDark : MOBILE_CHROME_METRICS.toolDockDisabledIconColorLight,
|
|
26255
26348
|
strokeWidth: 2.2
|
|
26256
26349
|
}
|
|
26257
26350
|
)
|
|
26258
26351
|
}
|
|
26259
26352
|
)
|
|
26260
26353
|
] }),
|
|
26261
|
-
/* @__PURE__ */ (0,
|
|
26262
|
-
/* @__PURE__ */ (0,
|
|
26263
|
-
/* @__PURE__ */ (0,
|
|
26264
|
-
|
|
26354
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(import_react_native6.View, { style: styles6.toolsGroup, children: PRIMARY_TOOLS.map((tool) => renderToolButton(tool)) }),
|
|
26355
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(import_react_native6.View, { style: styles6.controlsGroup, children: [
|
|
26356
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26357
|
+
import_react_native6.Pressable,
|
|
26265
26358
|
{
|
|
26266
26359
|
onPress: () => {
|
|
26267
26360
|
setExtrasExpanded((value) => !value);
|
|
26268
26361
|
setPaletteExpanded(false);
|
|
26269
26362
|
},
|
|
26270
26363
|
style: [
|
|
26271
|
-
|
|
26364
|
+
styles6.utilityButton,
|
|
26272
26365
|
{
|
|
26273
26366
|
backgroundColor: extrasExpanded ? `${accentColor}12` : buttonColor
|
|
26274
26367
|
}
|
|
26275
26368
|
],
|
|
26276
|
-
children: /* @__PURE__ */ (0,
|
|
26277
|
-
|
|
26369
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26370
|
+
import_react_native6.Text,
|
|
26278
26371
|
{
|
|
26279
26372
|
style: [
|
|
26280
|
-
|
|
26373
|
+
styles6.utilityLabel,
|
|
26281
26374
|
{ color: extrasExpanded ? accentColor : utilityIconColor }
|
|
26282
26375
|
],
|
|
26283
26376
|
children: "+"
|
|
@@ -26285,15 +26378,15 @@ var ToolDock = () => {
|
|
|
26285
26378
|
)
|
|
26286
26379
|
}
|
|
26287
26380
|
),
|
|
26288
|
-
/* @__PURE__ */ (0,
|
|
26289
|
-
|
|
26381
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26382
|
+
import_react_native6.Pressable,
|
|
26290
26383
|
{
|
|
26291
26384
|
onPress: () => {
|
|
26292
26385
|
setPaletteExpanded((value) => !value);
|
|
26293
26386
|
setExtrasExpanded(false);
|
|
26294
26387
|
},
|
|
26295
|
-
style:
|
|
26296
|
-
children: /* @__PURE__ */ (0,
|
|
26388
|
+
style: styles6.colorButton,
|
|
26389
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26297
26390
|
IconColorRing,
|
|
26298
26391
|
{
|
|
26299
26392
|
size: 30,
|
|
@@ -26303,8 +26396,8 @@ var ToolDock = () => {
|
|
|
26303
26396
|
)
|
|
26304
26397
|
}
|
|
26305
26398
|
),
|
|
26306
|
-
/* @__PURE__ */ (0,
|
|
26307
|
-
|
|
26399
|
+
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26400
|
+
import_react_native6.Pressable,
|
|
26308
26401
|
{
|
|
26309
26402
|
onPress: () => setDocumentState(
|
|
26310
26403
|
getToolDockDismissState({
|
|
@@ -26312,8 +26405,8 @@ var ToolDock = () => {
|
|
|
26312
26405
|
interactionMode
|
|
26313
26406
|
})
|
|
26314
26407
|
),
|
|
26315
|
-
style: [
|
|
26316
|
-
children: /* @__PURE__ */ (0,
|
|
26408
|
+
style: [styles6.utilityButton, { backgroundColor: buttonColor }],
|
|
26409
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
26317
26410
|
IconClose,
|
|
26318
26411
|
{
|
|
26319
26412
|
size: 15,
|
|
@@ -26329,17 +26422,17 @@ var ToolDock = () => {
|
|
|
26329
26422
|
)
|
|
26330
26423
|
] }) : null });
|
|
26331
26424
|
};
|
|
26332
|
-
var
|
|
26425
|
+
var styles6 = import_react_native6.StyleSheet.create({
|
|
26333
26426
|
root: {
|
|
26334
|
-
...
|
|
26427
|
+
...import_react_native6.StyleSheet.absoluteFillObject,
|
|
26335
26428
|
alignItems: "center",
|
|
26336
26429
|
justifyContent: "flex-end",
|
|
26337
|
-
paddingHorizontal:
|
|
26430
|
+
paddingHorizontal: MOBILE_CHROME_METRICS.screenPadding,
|
|
26338
26431
|
paddingBottom: 72
|
|
26339
26432
|
},
|
|
26340
26433
|
stack: {
|
|
26341
26434
|
width: "100%",
|
|
26342
|
-
maxWidth:
|
|
26435
|
+
maxWidth: MOBILE_CHROME_METRICS.maxToolDockWidth,
|
|
26343
26436
|
alignItems: "center"
|
|
26344
26437
|
},
|
|
26345
26438
|
container: {
|
|
@@ -26349,7 +26442,7 @@ var styles5 = import_react_native5.StyleSheet.create({
|
|
|
26349
26442
|
borderWidth: 1,
|
|
26350
26443
|
paddingLeft: 12,
|
|
26351
26444
|
paddingRight: 12,
|
|
26352
|
-
paddingTop:
|
|
26445
|
+
paddingTop: MOBILE_CHROME_METRICS.toolDockPaddingTop,
|
|
26353
26446
|
paddingBottom: 2,
|
|
26354
26447
|
justifyContent: "center",
|
|
26355
26448
|
overflow: "hidden",
|
|
@@ -26402,7 +26495,7 @@ var styles5 = import_react_native5.StyleSheet.create({
|
|
|
26402
26495
|
historyGroup: {
|
|
26403
26496
|
flexDirection: "row",
|
|
26404
26497
|
alignItems: "center",
|
|
26405
|
-
gap:
|
|
26498
|
+
gap: MOBILE_CHROME_METRICS.toolDockHistoryGap,
|
|
26406
26499
|
width: 82,
|
|
26407
26500
|
height: 52
|
|
26408
26501
|
},
|
|
@@ -26527,7 +26620,7 @@ var styles5 = import_react_native5.StyleSheet.create({
|
|
|
26527
26620
|
},
|
|
26528
26621
|
historyButton: {},
|
|
26529
26622
|
disabledButton: {
|
|
26530
|
-
opacity:
|
|
26623
|
+
opacity: MOBILE_CHROME_METRICS.toolDockDisabledOpacity
|
|
26531
26624
|
},
|
|
26532
26625
|
utilityLabel: {
|
|
26533
26626
|
fontSize: 28,
|
|
@@ -26573,11 +26666,20 @@ var withInkAlpha = (hex, alpha) => {
|
|
|
26573
26666
|
var ToolDock_default = ToolDock;
|
|
26574
26667
|
|
|
26575
26668
|
// components/RightSheet.tsx
|
|
26576
|
-
var
|
|
26577
|
-
var
|
|
26669
|
+
var import_react7 = require("react");
|
|
26670
|
+
var import_react_native7 = require("react-native");
|
|
26671
|
+
var import_bottom_sheet = __toESM(require("@gorhom/bottom-sheet"));
|
|
26578
26672
|
var import_core6 = require("@papyrus-sdk/core");
|
|
26579
26673
|
var import_engine_native2 = require("@papyrus-sdk/engine-native");
|
|
26580
|
-
|
|
26674
|
+
|
|
26675
|
+
// components/rightSheetLayout.ts
|
|
26676
|
+
var resolveRightSheetHeight = ({
|
|
26677
|
+
windowHeight,
|
|
26678
|
+
showingNotes
|
|
26679
|
+
}) => showingNotes ? Math.min(440, windowHeight * 0.56) : Math.min(640, windowHeight * 0.72);
|
|
26680
|
+
|
|
26681
|
+
// components/RightSheet.tsx
|
|
26682
|
+
var import_jsx_runtime8 = require("react/jsx-runtime");
|
|
26581
26683
|
var THUMBNAILS_INITIAL_NUM_TO_RENDER = 4;
|
|
26582
26684
|
var THUMBNAILS_WINDOW_SIZE = 5;
|
|
26583
26685
|
var THUMBNAILS_MAX_TO_RENDER_PER_BATCH = 6;
|
|
@@ -26610,13 +26712,13 @@ var PageThumbnail = ({
|
|
|
26610
26712
|
shouldRenderPreview,
|
|
26611
26713
|
onPress
|
|
26612
26714
|
}) => {
|
|
26613
|
-
const viewRef = (0,
|
|
26614
|
-
const [layoutReady, setLayoutReady] = (0,
|
|
26615
|
-
(0,
|
|
26715
|
+
const viewRef = (0, import_react7.useRef)(null);
|
|
26716
|
+
const [layoutReady, setLayoutReady] = (0, import_react7.useState)(false);
|
|
26717
|
+
(0, import_react7.useEffect)(() => {
|
|
26616
26718
|
if (!layoutReady || !useNativePreview || !shouldRenderPreview) return;
|
|
26617
|
-
const viewTag = (0,
|
|
26719
|
+
const viewTag = (0, import_react_native7.findNodeHandle)(viewRef.current);
|
|
26618
26720
|
if (!viewTag) return;
|
|
26619
|
-
const isNative =
|
|
26721
|
+
const isNative = import_react_native7.Platform.OS === "android" || import_react_native7.Platform.OS === "ios";
|
|
26620
26722
|
const renderScale = isNative ? 2 / Math.max(zoom, 0.5) : 2;
|
|
26621
26723
|
void engine.renderPage(pageIndex, viewTag, renderScale);
|
|
26622
26724
|
}, [
|
|
@@ -26632,36 +26734,36 @@ var PageThumbnail = ({
|
|
|
26632
26734
|
setLayoutReady(true);
|
|
26633
26735
|
}
|
|
26634
26736
|
};
|
|
26635
|
-
return /* @__PURE__ */ (0,
|
|
26636
|
-
|
|
26737
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
26738
|
+
import_react_native7.Pressable,
|
|
26637
26739
|
{
|
|
26638
26740
|
onPress,
|
|
26639
26741
|
style: [
|
|
26640
|
-
|
|
26742
|
+
styles7.thumbCard,
|
|
26641
26743
|
{ width: cardWidth },
|
|
26642
|
-
isDark &&
|
|
26643
|
-
isActive &&
|
|
26744
|
+
isDark && styles7.thumbCardDark,
|
|
26745
|
+
isActive && styles7.thumbCardActive,
|
|
26644
26746
|
isActive && { borderColor: accentColor }
|
|
26645
26747
|
],
|
|
26646
26748
|
children: [
|
|
26647
|
-
/* @__PURE__ */ (0,
|
|
26648
|
-
|
|
26749
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
26750
|
+
import_react_native7.View,
|
|
26649
26751
|
{
|
|
26650
26752
|
onLayout: handleLayout,
|
|
26651
|
-
style: [
|
|
26652
|
-
children: useNativePreview && shouldRenderPreview ? /* @__PURE__ */ (0,
|
|
26653
|
-
|
|
26753
|
+
style: [styles7.thumbFrame, { width: frameWidth, height: frameHeight }],
|
|
26754
|
+
children: useNativePreview && shouldRenderPreview ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_engine_native2.PapyrusPageView, { ref: viewRef, style: styles7.thumbView }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.View, { style: [styles7.thumbFallback, isDark && styles7.thumbFallbackDark], children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
26755
|
+
import_react_native7.Text,
|
|
26654
26756
|
{
|
|
26655
26757
|
style: [
|
|
26656
|
-
|
|
26657
|
-
isDark &&
|
|
26758
|
+
styles7.thumbFallbackText,
|
|
26759
|
+
isDark && styles7.thumbFallbackTextDark
|
|
26658
26760
|
],
|
|
26659
26761
|
children: pageIndex + 1
|
|
26660
26762
|
}
|
|
26661
26763
|
) })
|
|
26662
26764
|
}
|
|
26663
26765
|
),
|
|
26664
|
-
/* @__PURE__ */ (0,
|
|
26766
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: [styles7.thumbLabel, isDark && styles7.thumbLabelDark], children: pageIndex + 1 })
|
|
26665
26767
|
]
|
|
26666
26768
|
}
|
|
26667
26769
|
);
|
|
@@ -26669,21 +26771,21 @@ var PageThumbnail = ({
|
|
|
26669
26771
|
var OutlineNode = ({ item, depth = 0, isDark, onSelect, untitledLabel }) => {
|
|
26670
26772
|
const hasChildren = item.children && item.children.length > 0;
|
|
26671
26773
|
const isClickable = item.pageIndex >= 0;
|
|
26672
|
-
return /* @__PURE__ */ (0,
|
|
26673
|
-
/* @__PURE__ */ (0,
|
|
26674
|
-
|
|
26774
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native7.View, { children: [
|
|
26775
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
26776
|
+
import_react_native7.Pressable,
|
|
26675
26777
|
{
|
|
26676
26778
|
onPress: () => {
|
|
26677
26779
|
if (isClickable) onSelect(item.pageIndex);
|
|
26678
26780
|
},
|
|
26679
|
-
style: [
|
|
26680
|
-
children: /* @__PURE__ */ (0,
|
|
26681
|
-
|
|
26781
|
+
style: [styles7.outlineRow, { paddingLeft: 12 + depth * 12 }],
|
|
26782
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
26783
|
+
import_react_native7.Text,
|
|
26682
26784
|
{
|
|
26683
26785
|
style: [
|
|
26684
|
-
|
|
26685
|
-
isDark &&
|
|
26686
|
-
!isClickable &&
|
|
26786
|
+
styles7.outlineText,
|
|
26787
|
+
isDark && styles7.outlineTextDark,
|
|
26788
|
+
!isClickable && styles7.outlineTextMuted
|
|
26687
26789
|
],
|
|
26688
26790
|
numberOfLines: 2,
|
|
26689
26791
|
children: item.title || untitledLabel
|
|
@@ -26691,7 +26793,7 @@ var OutlineNode = ({ item, depth = 0, isDark, onSelect, untitledLabel }) => {
|
|
|
26691
26793
|
)
|
|
26692
26794
|
}
|
|
26693
26795
|
),
|
|
26694
|
-
hasChildren ? item.children.map((child, index) => /* @__PURE__ */ (0,
|
|
26796
|
+
hasChildren ? item.children.map((child, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
26695
26797
|
OutlineNode,
|
|
26696
26798
|
{
|
|
26697
26799
|
item: child,
|
|
@@ -26707,7 +26809,8 @@ var OutlineNode = ({ item, depth = 0, isDark, onSelect, untitledLabel }) => {
|
|
|
26707
26809
|
var RightSheet = ({
|
|
26708
26810
|
engine,
|
|
26709
26811
|
documentType,
|
|
26710
|
-
thumbsInitialCount
|
|
26812
|
+
thumbsInitialCount,
|
|
26813
|
+
onOpenPageJump
|
|
26711
26814
|
}) => {
|
|
26712
26815
|
const {
|
|
26713
26816
|
activeMobileDestination,
|
|
@@ -26725,30 +26828,35 @@ var RightSheet = ({
|
|
|
26725
26828
|
locale,
|
|
26726
26829
|
accentColor
|
|
26727
26830
|
} = (0, import_core6.useViewerStore)();
|
|
26728
|
-
const [pagesMode, setPagesMode] = (0,
|
|
26831
|
+
const [pagesMode, setPagesMode] = (0, import_react7.useState)(
|
|
26729
26832
|
documentType === "pdf" ? "thumbnails" : "summary"
|
|
26730
26833
|
);
|
|
26731
26834
|
const isDark = uiTheme === "dark";
|
|
26732
26835
|
const t = getStrings(locale);
|
|
26733
|
-
const
|
|
26734
|
-
const
|
|
26836
|
+
const showingNotes = sidebarRightTab === "annotations";
|
|
26837
|
+
const sheetHeight = resolveRightSheetHeight({
|
|
26838
|
+
windowHeight: import_react_native7.Dimensions.get("window").height,
|
|
26839
|
+
showingNotes
|
|
26840
|
+
});
|
|
26841
|
+
const snapPoints = (0, import_react7.useMemo)(() => [sheetHeight], [sheetHeight]);
|
|
26842
|
+
const windowWidth = import_react_native7.Dimensions.get("window").width;
|
|
26735
26843
|
const gridGutter = 12;
|
|
26736
26844
|
const gridPadding = 16;
|
|
26737
26845
|
const cardWidth = (windowWidth - gridPadding * 2 - gridGutter) / 2;
|
|
26738
26846
|
const frameWidth = cardWidth - 16;
|
|
26739
26847
|
const renderTarget = engine.getRenderTargetType?.();
|
|
26740
26848
|
const hasNativePageView = Boolean(
|
|
26741
|
-
|
|
26849
|
+
import_react_native7.UIManager.getViewManagerConfig?.("PapyrusPageView")
|
|
26742
26850
|
);
|
|
26743
26851
|
const useNativePreview = renderTarget !== "webview" && hasNativePageView;
|
|
26744
|
-
const thumbnailDimensionsCacheRef = (0,
|
|
26745
|
-
const thumbnailDimensionsPendingRef = (0,
|
|
26746
|
-
const thumbnailRefreshTimeoutRef = (0,
|
|
26747
|
-
const [thumbnailLayoutRevision, setThumbnailLayoutRevision] = (0,
|
|
26748
|
-
const [visibleThumbnailPages, setVisibleThumbnailPages] = (0,
|
|
26852
|
+
const thumbnailDimensionsCacheRef = (0, import_react7.useRef)(/* @__PURE__ */ new Map());
|
|
26853
|
+
const thumbnailDimensionsPendingRef = (0, import_react7.useRef)(/* @__PURE__ */ new Set());
|
|
26854
|
+
const thumbnailRefreshTimeoutRef = (0, import_react7.useRef)(null);
|
|
26855
|
+
const [thumbnailLayoutRevision, setThumbnailLayoutRevision] = (0, import_react7.useState)(0);
|
|
26856
|
+
const [visibleThumbnailPages, setVisibleThumbnailPages] = (0, import_react7.useState)(
|
|
26749
26857
|
() => /* @__PURE__ */ new Set()
|
|
26750
26858
|
);
|
|
26751
|
-
const resolvedThumbsInitialCount = (0,
|
|
26859
|
+
const resolvedThumbsInitialCount = (0, import_react7.useMemo)(
|
|
26752
26860
|
() => resolvePositiveInt2(
|
|
26753
26861
|
thumbsInitialCount,
|
|
26754
26862
|
THUMBNAILS_INITIAL_NUM_TO_RENDER,
|
|
@@ -26762,16 +26870,15 @@ var RightSheet = ({
|
|
|
26762
26870
|
resolvedThumbsInitialCount,
|
|
26763
26871
|
resolvedThumbsPrewarmCount
|
|
26764
26872
|
);
|
|
26765
|
-
const showingNotes = sidebarRightTab === "annotations";
|
|
26766
26873
|
const showingProgress = documentType === "text" || activeMobileDestination === "progress";
|
|
26767
26874
|
const supportsThumbnails = documentType !== "text";
|
|
26768
26875
|
const navigationTitle = showingProgress ? t.progress : documentType === "epub" || activeMobileDestination === "contents" ? t.contents : t.pages;
|
|
26769
26876
|
const summaryLabel = documentType === "epub" ? t.contents : t.summaryTab;
|
|
26770
26877
|
const thumbnailLabel = documentType === "epub" ? t.pages : t.pagesTab;
|
|
26771
|
-
const closeSheet = (0,
|
|
26878
|
+
const closeSheet = (0, import_react7.useCallback)(() => {
|
|
26772
26879
|
setDocumentState({ sidebarRightOpen: false });
|
|
26773
26880
|
}, [setDocumentState]);
|
|
26774
|
-
const jumpToPage = (0,
|
|
26881
|
+
const jumpToPage = (0, import_react7.useCallback)(
|
|
26775
26882
|
(pageIndex) => {
|
|
26776
26883
|
engine.goToPage(pageIndex + 1);
|
|
26777
26884
|
setDocumentState({ currentPage: pageIndex + 1 });
|
|
@@ -26780,14 +26887,14 @@ var RightSheet = ({
|
|
|
26780
26887
|
},
|
|
26781
26888
|
[closeSheet, engine, setDocumentState, triggerScrollToPage]
|
|
26782
26889
|
);
|
|
26783
|
-
const scheduleThumbnailLayoutRefresh = (0,
|
|
26890
|
+
const scheduleThumbnailLayoutRefresh = (0, import_react7.useCallback)(() => {
|
|
26784
26891
|
if (thumbnailRefreshTimeoutRef.current) return;
|
|
26785
26892
|
thumbnailRefreshTimeoutRef.current = setTimeout(() => {
|
|
26786
26893
|
thumbnailRefreshTimeoutRef.current = null;
|
|
26787
26894
|
setThumbnailLayoutRevision((value) => value + 1);
|
|
26788
26895
|
}, 80);
|
|
26789
26896
|
}, []);
|
|
26790
|
-
const ensureThumbnailDimensions = (0,
|
|
26897
|
+
const ensureThumbnailDimensions = (0, import_react7.useCallback)(
|
|
26791
26898
|
(pageIndex) => {
|
|
26792
26899
|
if (pageIndex < 0 || pageIndex >= pageCount) return;
|
|
26793
26900
|
if (thumbnailDimensionsCacheRef.current.has(pageIndex)) return;
|
|
@@ -26806,7 +26913,7 @@ var RightSheet = ({
|
|
|
26806
26913
|
},
|
|
26807
26914
|
[engine, pageCount, scheduleThumbnailLayoutRefresh]
|
|
26808
26915
|
);
|
|
26809
|
-
const getThumbnailFrameHeight = (0,
|
|
26916
|
+
const getThumbnailFrameHeight = (0, import_react7.useCallback)(
|
|
26810
26917
|
(pageIndex) => {
|
|
26811
26918
|
const dims = thumbnailDimensionsCacheRef.current.get(pageIndex);
|
|
26812
26919
|
const ratio = !dims || dims.width <= 0 || dims.height <= 0 ? THUMBNAILS_DEFAULT_ASPECT_RATIO : dims.height / dims.width;
|
|
@@ -26818,7 +26925,7 @@ var RightSheet = ({
|
|
|
26818
26925
|
},
|
|
26819
26926
|
[frameWidth, thumbnailLayoutRevision]
|
|
26820
26927
|
);
|
|
26821
|
-
(0,
|
|
26928
|
+
(0, import_react7.useEffect)(
|
|
26822
26929
|
() => () => {
|
|
26823
26930
|
if (thumbnailRefreshTimeoutRef.current) {
|
|
26824
26931
|
clearTimeout(thumbnailRefreshTimeoutRef.current);
|
|
@@ -26826,11 +26933,11 @@ var RightSheet = ({
|
|
|
26826
26933
|
},
|
|
26827
26934
|
[]
|
|
26828
26935
|
);
|
|
26829
|
-
(0,
|
|
26936
|
+
(0, import_react7.useEffect)(() => {
|
|
26830
26937
|
if (sidebarRightOpen) return;
|
|
26831
26938
|
setVisibleThumbnailPages(/* @__PURE__ */ new Set());
|
|
26832
26939
|
}, [sidebarRightOpen]);
|
|
26833
|
-
(0,
|
|
26940
|
+
(0, import_react7.useEffect)(() => {
|
|
26834
26941
|
if (!sidebarRightOpen || sidebarRightTab !== "pages") return;
|
|
26835
26942
|
if (activeMobileDestination === "pages") {
|
|
26836
26943
|
setPagesMode("thumbnails");
|
|
@@ -26838,7 +26945,7 @@ var RightSheet = ({
|
|
|
26838
26945
|
}
|
|
26839
26946
|
setPagesMode("summary");
|
|
26840
26947
|
}, [activeMobileDestination, sidebarRightOpen, sidebarRightTab]);
|
|
26841
|
-
(0,
|
|
26948
|
+
(0, import_react7.useEffect)(() => {
|
|
26842
26949
|
if (!sidebarRightOpen || sidebarRightTab !== "pages") return;
|
|
26843
26950
|
if (pagesMode !== "thumbnails" || !supportsThumbnails) return;
|
|
26844
26951
|
if (pageCount <= 0) return;
|
|
@@ -26868,18 +26975,18 @@ var RightSheet = ({
|
|
|
26868
26975
|
sidebarRightTab,
|
|
26869
26976
|
supportsThumbnails
|
|
26870
26977
|
]);
|
|
26871
|
-
const pages = (0,
|
|
26978
|
+
const pages = (0, import_react7.useMemo)(
|
|
26872
26979
|
() => Array.from({ length: pageCount }, (_, i) => i),
|
|
26873
26980
|
[pageCount]
|
|
26874
26981
|
);
|
|
26875
|
-
const progressEntries = (0,
|
|
26982
|
+
const progressEntries = (0, import_react7.useMemo)(
|
|
26876
26983
|
() => pages.map((pageIndex) => ({
|
|
26877
26984
|
pageIndex,
|
|
26878
26985
|
percent: pageCount <= 1 ? 100 : Math.round((pageIndex + 1) / pageCount * 100)
|
|
26879
26986
|
})),
|
|
26880
26987
|
[pageCount, pages]
|
|
26881
26988
|
);
|
|
26882
|
-
const onThumbnailsViewableItemsChanged = (0,
|
|
26989
|
+
const onThumbnailsViewableItemsChanged = (0, import_react7.useCallback)(
|
|
26883
26990
|
({ viewableItems }) => {
|
|
26884
26991
|
const nextVisible = /* @__PURE__ */ new Set();
|
|
26885
26992
|
viewableItems.forEach((token) => {
|
|
@@ -26896,10 +27003,10 @@ var RightSheet = ({
|
|
|
26896
27003
|
},
|
|
26897
27004
|
[ensureThumbnailDimensions]
|
|
26898
27005
|
);
|
|
26899
|
-
const renderThumbnailItem = (0,
|
|
27006
|
+
const renderThumbnailItem = (0, import_react7.useCallback)(
|
|
26900
27007
|
({ item }) => {
|
|
26901
27008
|
const shouldRenderPreview = useNativePreview && (visibleThumbnailPages.has(item) || item < resolvedThumbsPrewarmCount || Math.abs(item + 1 - currentPage) <= 1);
|
|
26902
|
-
return /* @__PURE__ */ (0,
|
|
27009
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
26903
27010
|
PageThumbnail,
|
|
26904
27011
|
{
|
|
26905
27012
|
engine,
|
|
@@ -26932,267 +27039,275 @@ var RightSheet = ({
|
|
|
26932
27039
|
zoom
|
|
26933
27040
|
]
|
|
26934
27041
|
);
|
|
27042
|
+
const renderBackdrop = (0, import_react7.useCallback)(
|
|
27043
|
+
(props) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27044
|
+
import_bottom_sheet.BottomSheetBackdrop,
|
|
27045
|
+
{
|
|
27046
|
+
...props,
|
|
27047
|
+
appearsOnIndex: 0,
|
|
27048
|
+
disappearsOnIndex: -1,
|
|
27049
|
+
opacity: 0.4,
|
|
27050
|
+
pressBehavior: "close"
|
|
27051
|
+
}
|
|
27052
|
+
),
|
|
27053
|
+
[]
|
|
27054
|
+
);
|
|
26935
27055
|
if (!sidebarRightOpen) return null;
|
|
26936
|
-
return /* @__PURE__ */ (0,
|
|
26937
|
-
|
|
27056
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.View, { style: styles7.modalRoot, pointerEvents: "box-none", children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27057
|
+
import_bottom_sheet.default,
|
|
26938
27058
|
{
|
|
26939
|
-
|
|
26940
|
-
|
|
26941
|
-
|
|
26942
|
-
|
|
26943
|
-
|
|
26944
|
-
|
|
26945
|
-
|
|
26946
|
-
|
|
26947
|
-
|
|
26948
|
-
|
|
26949
|
-
|
|
26950
|
-
|
|
26951
|
-
|
|
26952
|
-
|
|
26953
|
-
|
|
26954
|
-
|
|
26955
|
-
|
|
26956
|
-
|
|
26957
|
-
|
|
26958
|
-
|
|
26959
|
-
|
|
26960
|
-
|
|
26961
|
-
|
|
26962
|
-
|
|
26963
|
-
|
|
26964
|
-
|
|
26965
|
-
|
|
26966
|
-
|
|
26967
|
-
|
|
26968
|
-
|
|
26969
|
-
|
|
26970
|
-
|
|
26971
|
-
|
|
26972
|
-
|
|
26973
|
-
|
|
26974
|
-
|
|
26975
|
-
|
|
26976
|
-
|
|
26977
|
-
|
|
26978
|
-
|
|
26979
|
-
|
|
26980
|
-
|
|
26981
|
-
|
|
26982
|
-
|
|
26983
|
-
|
|
26984
|
-
|
|
26985
|
-
|
|
26986
|
-
|
|
26987
|
-
|
|
26988
|
-
|
|
26989
|
-
|
|
26990
|
-
|
|
26991
|
-
|
|
26992
|
-
|
|
26993
|
-
|
|
26994
|
-
|
|
26995
|
-
|
|
26996
|
-
|
|
26997
|
-
|
|
27059
|
+
index: 0,
|
|
27060
|
+
snapPoints,
|
|
27061
|
+
enablePanDownToClose: true,
|
|
27062
|
+
onClose: closeSheet,
|
|
27063
|
+
backdropComponent: renderBackdrop,
|
|
27064
|
+
backgroundStyle: [styles7.sheetBackground, isDark && styles7.sheetDark],
|
|
27065
|
+
handleIndicatorStyle: [styles7.handle, isDark && styles7.handleDark],
|
|
27066
|
+
handleStyle: styles7.handleContainer,
|
|
27067
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native7.View, { style: styles7.sheet, children: [
|
|
27068
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native7.View, { style: styles7.header, children: [
|
|
27069
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: [styles7.sheetTitle, isDark && styles7.sheetTitleDark], children: showingNotes ? t.notes : navigationTitle }),
|
|
27070
|
+
!showingNotes ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27071
|
+
import_react_native7.Pressable,
|
|
27072
|
+
{
|
|
27073
|
+
onPress: showingProgress ? void 0 : onOpenPageJump,
|
|
27074
|
+
disabled: showingProgress || pageCount <= 0,
|
|
27075
|
+
style: styles7.pageStatusHit,
|
|
27076
|
+
accessibilityLabel: "Open page jump",
|
|
27077
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: [styles7.pageStatus, isDark && styles7.pageStatusDark], children: showingProgress ? `${Math.round(currentPage / Math.max(pageCount, 1) * 100)}%` : `${currentPage}/${pageCount}` })
|
|
27078
|
+
}
|
|
27079
|
+
) : null
|
|
27080
|
+
] }),
|
|
27081
|
+
!showingNotes ? /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native7.View, { style: styles7.pagesContent, children: [
|
|
27082
|
+
!showingProgress ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.View, { style: styles7.pageHeader, children: /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native7.View, { style: [styles7.segmented, isDark && styles7.segmentedDark], children: [
|
|
27083
|
+
supportsThumbnails ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27084
|
+
import_react_native7.Pressable,
|
|
27085
|
+
{
|
|
27086
|
+
onPress: () => setPagesMode("thumbnails"),
|
|
27087
|
+
style: [
|
|
27088
|
+
styles7.segmentButton,
|
|
27089
|
+
pagesMode === "thumbnails" && styles7.segmentButtonActive,
|
|
27090
|
+
pagesMode === "thumbnails" && {
|
|
27091
|
+
backgroundColor: accentColor
|
|
27092
|
+
}
|
|
27093
|
+
],
|
|
27094
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27095
|
+
import_react_native7.Text,
|
|
27096
|
+
{
|
|
27097
|
+
style: [
|
|
27098
|
+
styles7.segmentText,
|
|
27099
|
+
isDark && styles7.segmentTextDark,
|
|
27100
|
+
pagesMode === "thumbnails" && styles7.segmentTextActive
|
|
27101
|
+
],
|
|
27102
|
+
children: thumbnailLabel
|
|
27103
|
+
}
|
|
27104
|
+
)
|
|
27105
|
+
}
|
|
27106
|
+
) : null,
|
|
27107
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27108
|
+
import_react_native7.Pressable,
|
|
27109
|
+
{
|
|
27110
|
+
onPress: () => setPagesMode("summary"),
|
|
27111
|
+
style: [
|
|
27112
|
+
styles7.segmentButton,
|
|
27113
|
+
pagesMode === "summary" && styles7.segmentButtonActive,
|
|
27114
|
+
pagesMode === "summary" && {
|
|
27115
|
+
backgroundColor: accentColor
|
|
27116
|
+
}
|
|
27117
|
+
],
|
|
27118
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27119
|
+
import_react_native7.Text,
|
|
27120
|
+
{
|
|
27121
|
+
style: [
|
|
27122
|
+
styles7.segmentText,
|
|
27123
|
+
isDark && styles7.segmentTextDark,
|
|
27124
|
+
pagesMode === "summary" && styles7.segmentTextActive
|
|
27125
|
+
],
|
|
27126
|
+
children: summaryLabel
|
|
27127
|
+
}
|
|
27128
|
+
)
|
|
27129
|
+
}
|
|
27130
|
+
)
|
|
27131
|
+
] }) }) : null,
|
|
27132
|
+
supportsThumbnails && !showingProgress && pagesMode === "thumbnails" ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27133
|
+
import_bottom_sheet.BottomSheetFlatList,
|
|
27134
|
+
{
|
|
27135
|
+
data: pages,
|
|
27136
|
+
keyExtractor: (item) => `thumb-${item}`,
|
|
27137
|
+
numColumns: 2,
|
|
27138
|
+
contentContainerStyle: styles7.thumbGrid,
|
|
27139
|
+
columnWrapperStyle: styles7.thumbRow,
|
|
27140
|
+
showsVerticalScrollIndicator: false,
|
|
27141
|
+
initialNumToRender: normalizedThumbsInitialCount,
|
|
27142
|
+
windowSize: THUMBNAILS_WINDOW_SIZE,
|
|
27143
|
+
maxToRenderPerBatch: THUMBNAILS_MAX_TO_RENDER_PER_BATCH,
|
|
27144
|
+
updateCellsBatchingPeriod: THUMBNAILS_UPDATE_CELLS_BATCHING_PERIOD,
|
|
27145
|
+
removeClippedSubviews: true,
|
|
27146
|
+
viewabilityConfig: { itemVisiblePercentThreshold: 20 },
|
|
27147
|
+
onViewableItemsChanged: onThumbnailsViewableItemsChanged,
|
|
27148
|
+
renderItem: renderThumbnailItem
|
|
27149
|
+
}
|
|
27150
|
+
) : showingProgress ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27151
|
+
import_bottom_sheet.BottomSheetScrollView,
|
|
27152
|
+
{
|
|
27153
|
+
contentContainerStyle: styles7.summaryContent,
|
|
27154
|
+
showsVerticalScrollIndicator: false,
|
|
27155
|
+
children: progressEntries.map((entry) => {
|
|
27156
|
+
const isActive = entry.pageIndex + 1 === currentPage;
|
|
27157
|
+
return /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
27158
|
+
import_react_native7.Pressable,
|
|
27159
|
+
{
|
|
27160
|
+
onPress: () => jumpToPage(entry.pageIndex),
|
|
27161
|
+
style: [
|
|
27162
|
+
styles7.progressRow,
|
|
27163
|
+
isDark && styles7.progressRowDark,
|
|
27164
|
+
isActive && { borderColor: accentColor }
|
|
27165
|
+
],
|
|
27166
|
+
children: [
|
|
27167
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
27168
|
+
import_react_native7.Text,
|
|
26998
27169
|
{
|
|
26999
27170
|
style: [
|
|
27000
|
-
|
|
27001
|
-
isDark &&
|
|
27002
|
-
pagesMode === "summary" && styles6.segmentTextActive
|
|
27171
|
+
styles7.progressLabel,
|
|
27172
|
+
isDark && styles7.progressLabelDark
|
|
27003
27173
|
],
|
|
27004
|
-
children:
|
|
27174
|
+
children: [
|
|
27175
|
+
entry.percent,
|
|
27176
|
+
"%"
|
|
27177
|
+
]
|
|
27005
27178
|
}
|
|
27006
|
-
)
|
|
27007
|
-
|
|
27008
|
-
|
|
27009
|
-
] }) }) : null,
|
|
27010
|
-
supportsThumbnails && !showingProgress && pagesMode === "thumbnails" ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
27011
|
-
import_react_native6.FlatList,
|
|
27012
|
-
{
|
|
27013
|
-
data: pages,
|
|
27014
|
-
keyExtractor: (item) => `thumb-${item}`,
|
|
27015
|
-
numColumns: 2,
|
|
27016
|
-
contentContainerStyle: styles6.thumbGrid,
|
|
27017
|
-
columnWrapperStyle: styles6.thumbRow,
|
|
27018
|
-
showsVerticalScrollIndicator: false,
|
|
27019
|
-
initialNumToRender: normalizedThumbsInitialCount,
|
|
27020
|
-
windowSize: THUMBNAILS_WINDOW_SIZE,
|
|
27021
|
-
maxToRenderPerBatch: THUMBNAILS_MAX_TO_RENDER_PER_BATCH,
|
|
27022
|
-
updateCellsBatchingPeriod: THUMBNAILS_UPDATE_CELLS_BATCHING_PERIOD,
|
|
27023
|
-
removeClippedSubviews: true,
|
|
27024
|
-
viewabilityConfig: { itemVisiblePercentThreshold: 20 },
|
|
27025
|
-
onViewableItemsChanged: onThumbnailsViewableItemsChanged,
|
|
27026
|
-
renderItem: renderThumbnailItem
|
|
27027
|
-
}
|
|
27028
|
-
) : showingProgress ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
27029
|
-
import_react_native6.ScrollView,
|
|
27030
|
-
{
|
|
27031
|
-
contentContainerStyle: styles6.summaryContent,
|
|
27032
|
-
showsVerticalScrollIndicator: false,
|
|
27033
|
-
children: progressEntries.map((entry) => {
|
|
27034
|
-
const isActive = entry.pageIndex + 1 === currentPage;
|
|
27035
|
-
return /* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
27036
|
-
import_react_native6.Pressable,
|
|
27179
|
+
),
|
|
27180
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
27181
|
+
import_react_native7.Text,
|
|
27037
27182
|
{
|
|
27038
|
-
onPress: () => jumpToPage(entry.pageIndex),
|
|
27039
27183
|
style: [
|
|
27040
|
-
|
|
27041
|
-
isDark &&
|
|
27042
|
-
isActive && { borderColor: accentColor }
|
|
27184
|
+
styles7.progressMeta,
|
|
27185
|
+
isDark && styles7.progressMetaDark
|
|
27043
27186
|
],
|
|
27044
27187
|
children: [
|
|
27045
|
-
|
|
27046
|
-
|
|
27047
|
-
|
|
27048
|
-
style: [
|
|
27049
|
-
styles6.progressLabel,
|
|
27050
|
-
isDark && styles6.progressLabelDark
|
|
27051
|
-
],
|
|
27052
|
-
children: [
|
|
27053
|
-
entry.percent,
|
|
27054
|
-
"%"
|
|
27055
|
-
]
|
|
27056
|
-
}
|
|
27057
|
-
),
|
|
27058
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsxs)(
|
|
27059
|
-
import_react_native6.Text,
|
|
27060
|
-
{
|
|
27061
|
-
style: [
|
|
27062
|
-
styles6.progressMeta,
|
|
27063
|
-
isDark && styles6.progressMetaDark
|
|
27064
|
-
],
|
|
27065
|
-
children: [
|
|
27066
|
-
t.page,
|
|
27067
|
-
" ",
|
|
27068
|
-
entry.pageIndex + 1
|
|
27069
|
-
]
|
|
27070
|
-
}
|
|
27071
|
-
)
|
|
27188
|
+
t.page,
|
|
27189
|
+
" ",
|
|
27190
|
+
entry.pageIndex + 1
|
|
27072
27191
|
]
|
|
27073
|
-
}
|
|
27074
|
-
|
|
27075
|
-
|
|
27076
|
-
|
|
27077
|
-
}
|
|
27078
|
-
)
|
|
27079
|
-
|
|
27080
|
-
|
|
27081
|
-
|
|
27082
|
-
|
|
27083
|
-
|
|
27084
|
-
|
|
27085
|
-
|
|
27086
|
-
|
|
27087
|
-
|
|
27088
|
-
untitledLabel: t.untitled,
|
|
27089
|
-
onSelect: jumpToPage
|
|
27090
|
-
},
|
|
27091
|
-
`${item.title}-${index}`
|
|
27092
|
-
))
|
|
27093
|
-
}
|
|
27094
|
-
)
|
|
27095
|
-
] }) : /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
27096
|
-
import_react_native6.ScrollView,
|
|
27192
|
+
}
|
|
27193
|
+
)
|
|
27194
|
+
]
|
|
27195
|
+
},
|
|
27196
|
+
`progress-${entry.pageIndex}`
|
|
27197
|
+
);
|
|
27198
|
+
})
|
|
27199
|
+
}
|
|
27200
|
+
) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27201
|
+
import_bottom_sheet.BottomSheetScrollView,
|
|
27202
|
+
{
|
|
27203
|
+
contentContainerStyle: styles7.summaryContent,
|
|
27204
|
+
showsVerticalScrollIndicator: false,
|
|
27205
|
+
children: outline.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: [styles7.emptyText, isDark && styles7.emptyTextDark], children: t.noSummary }) : outline.map((item, index) => /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27206
|
+
OutlineNode,
|
|
27097
27207
|
{
|
|
27098
|
-
|
|
27099
|
-
|
|
27100
|
-
|
|
27101
|
-
|
|
27208
|
+
item,
|
|
27209
|
+
isDark,
|
|
27210
|
+
untitledLabel: t.untitled,
|
|
27211
|
+
onSelect: jumpToPage
|
|
27212
|
+
},
|
|
27213
|
+
`${item.title}-${index}`
|
|
27214
|
+
))
|
|
27215
|
+
}
|
|
27216
|
+
)
|
|
27217
|
+
] }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27218
|
+
import_bottom_sheet.BottomSheetScrollView,
|
|
27219
|
+
{
|
|
27220
|
+
contentContainerStyle: styles7.content,
|
|
27221
|
+
showsVerticalScrollIndicator: false,
|
|
27222
|
+
children: annotations.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.Text, { style: [styles7.emptyText, isDark && styles7.emptyTextDark], children: t.noAnnotations }) : /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(import_react_native7.View, { children: annotations.map((ann) => /* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
27223
|
+
import_react_native7.Pressable,
|
|
27224
|
+
{
|
|
27225
|
+
onPress: () => {
|
|
27226
|
+
setSelectedAnnotation(ann.id);
|
|
27227
|
+
triggerScrollToPage(ann.pageIndex);
|
|
27228
|
+
closeSheet();
|
|
27229
|
+
},
|
|
27230
|
+
style: [styles7.noteCard, isDark && styles7.noteCardDark],
|
|
27231
|
+
children: [
|
|
27232
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(import_react_native7.View, { style: styles7.noteHeader, children: [
|
|
27233
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27234
|
+
import_react_native7.View,
|
|
27235
|
+
{
|
|
27236
|
+
style: [styles7.noteDot, { backgroundColor: ann.color }]
|
|
27237
|
+
}
|
|
27238
|
+
),
|
|
27239
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsxs)(
|
|
27240
|
+
import_react_native7.Text,
|
|
27241
|
+
{
|
|
27242
|
+
style: [styles7.noteTitle, isDark && styles7.noteTitleDark],
|
|
27243
|
+
children: [
|
|
27244
|
+
t.page,
|
|
27245
|
+
" ",
|
|
27246
|
+
ann.pageIndex + 1
|
|
27247
|
+
]
|
|
27248
|
+
}
|
|
27249
|
+
)
|
|
27250
|
+
] }),
|
|
27251
|
+
/* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27252
|
+
import_react_native7.Text,
|
|
27102
27253
|
{
|
|
27103
|
-
|
|
27104
|
-
|
|
27105
|
-
|
|
27106
|
-
|
|
27107
|
-
|
|
27108
|
-
|
|
27109
|
-
|
|
27110
|
-
|
|
27111
|
-
|
|
27112
|
-
|
|
27113
|
-
|
|
27114
|
-
|
|
27115
|
-
|
|
27116
|
-
|
|
27117
|
-
|
|
27118
|
-
|
|
27119
|
-
|
|
27120
|
-
|
|
27121
|
-
|
|
27122
|
-
|
|
27123
|
-
|
|
27124
|
-
|
|
27125
|
-
]
|
|
27126
|
-
}
|
|
27127
|
-
)
|
|
27128
|
-
] }),
|
|
27129
|
-
/* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
27130
|
-
import_react_native6.Text,
|
|
27131
|
-
{
|
|
27132
|
-
style: [
|
|
27133
|
-
styles6.noteType,
|
|
27134
|
-
isDark && styles6.noteTypeDark,
|
|
27135
|
-
{ color: accentColor }
|
|
27136
|
-
],
|
|
27137
|
-
children: ann.type === "comment" || ann.type === "text" ? t.note.toUpperCase() : ann.type.toUpperCase()
|
|
27138
|
-
}
|
|
27139
|
-
),
|
|
27140
|
-
ann.content ? /* @__PURE__ */ (0, import_jsx_runtime7.jsx)(
|
|
27141
|
-
import_react_native6.Text,
|
|
27142
|
-
{
|
|
27143
|
-
style: [
|
|
27144
|
-
styles6.noteContent,
|
|
27145
|
-
isDark && styles6.noteContentDark
|
|
27146
|
-
],
|
|
27147
|
-
children: ann.content
|
|
27148
|
-
}
|
|
27149
|
-
) : null
|
|
27150
|
-
]
|
|
27151
|
-
},
|
|
27152
|
-
ann.id
|
|
27153
|
-
)) })
|
|
27154
|
-
}
|
|
27155
|
-
)
|
|
27156
|
-
]
|
|
27254
|
+
style: [
|
|
27255
|
+
styles7.noteType,
|
|
27256
|
+
isDark && styles7.noteTypeDark,
|
|
27257
|
+
{ color: accentColor }
|
|
27258
|
+
],
|
|
27259
|
+
children: ann.type === "comment" || ann.type === "text" ? t.note.toUpperCase() : ann.type.toUpperCase()
|
|
27260
|
+
}
|
|
27261
|
+
),
|
|
27262
|
+
ann.content ? /* @__PURE__ */ (0, import_jsx_runtime8.jsx)(
|
|
27263
|
+
import_react_native7.Text,
|
|
27264
|
+
{
|
|
27265
|
+
style: [
|
|
27266
|
+
styles7.noteContent,
|
|
27267
|
+
isDark && styles7.noteContentDark
|
|
27268
|
+
],
|
|
27269
|
+
children: ann.content
|
|
27270
|
+
}
|
|
27271
|
+
) : null
|
|
27272
|
+
]
|
|
27273
|
+
},
|
|
27274
|
+
ann.id
|
|
27275
|
+
)) })
|
|
27157
27276
|
}
|
|
27158
27277
|
)
|
|
27159
27278
|
] })
|
|
27160
27279
|
}
|
|
27161
|
-
);
|
|
27280
|
+
) });
|
|
27162
27281
|
};
|
|
27163
|
-
var
|
|
27282
|
+
var styles7 = import_react_native7.StyleSheet.create({
|
|
27164
27283
|
modalRoot: {
|
|
27165
|
-
|
|
27166
|
-
|
|
27167
|
-
},
|
|
27168
|
-
backdrop: {
|
|
27169
|
-
...import_react_native6.StyleSheet.absoluteFillObject,
|
|
27170
|
-
backgroundColor: "rgba(0, 0, 0, 0.4)"
|
|
27284
|
+
...import_react_native7.StyleSheet.absoluteFillObject,
|
|
27285
|
+
zIndex: 30
|
|
27171
27286
|
},
|
|
27172
27287
|
sheet: {
|
|
27173
|
-
|
|
27174
|
-
|
|
27175
|
-
|
|
27176
|
-
|
|
27288
|
+
flex: 1,
|
|
27289
|
+
paddingBottom: 16
|
|
27290
|
+
},
|
|
27291
|
+
sheetBackground: {
|
|
27177
27292
|
backgroundColor: "#ffffff",
|
|
27178
27293
|
borderTopLeftRadius: 20,
|
|
27179
27294
|
borderTopRightRadius: 20,
|
|
27180
27295
|
borderTopWidth: 1,
|
|
27181
|
-
borderTopColor: "#e5e7eb"
|
|
27182
|
-
paddingBottom: 16
|
|
27296
|
+
borderTopColor: "#e5e7eb"
|
|
27183
27297
|
},
|
|
27184
27298
|
sheetDark: {
|
|
27185
27299
|
backgroundColor: "#0f1115",
|
|
27186
27300
|
borderTopColor: "#1f2937"
|
|
27187
27301
|
},
|
|
27302
|
+
handleContainer: {
|
|
27303
|
+
paddingTop: 10,
|
|
27304
|
+
paddingBottom: 12
|
|
27305
|
+
},
|
|
27188
27306
|
handle: {
|
|
27189
27307
|
width: 44,
|
|
27190
27308
|
height: 4,
|
|
27191
27309
|
borderRadius: 999,
|
|
27192
|
-
backgroundColor: "#cbd5f5"
|
|
27193
|
-
alignSelf: "center",
|
|
27194
|
-
marginTop: 10,
|
|
27195
|
-
marginBottom: 12
|
|
27310
|
+
backgroundColor: "#cbd5f5"
|
|
27196
27311
|
},
|
|
27197
27312
|
handleDark: {
|
|
27198
27313
|
backgroundColor: "#374151"
|
|
@@ -27200,12 +27315,16 @@ var styles6 = import_react_native6.StyleSheet.create({
|
|
|
27200
27315
|
header: {
|
|
27201
27316
|
paddingHorizontal: 16,
|
|
27202
27317
|
marginBottom: 10,
|
|
27203
|
-
gap: 4
|
|
27318
|
+
gap: 4,
|
|
27319
|
+
flexDirection: "row",
|
|
27320
|
+
alignItems: "center",
|
|
27321
|
+
justifyContent: "space-between"
|
|
27204
27322
|
},
|
|
27205
27323
|
sheetTitle: {
|
|
27206
27324
|
fontSize: 16,
|
|
27207
27325
|
fontWeight: "800",
|
|
27208
|
-
color: "#111827"
|
|
27326
|
+
color: "#111827",
|
|
27327
|
+
flex: 1
|
|
27209
27328
|
},
|
|
27210
27329
|
sheetTitleDark: {
|
|
27211
27330
|
color: "#f8fafc"
|
|
@@ -27225,6 +27344,11 @@ var styles6 = import_react_native6.StyleSheet.create({
|
|
|
27225
27344
|
fontWeight: "700",
|
|
27226
27345
|
color: "#111827"
|
|
27227
27346
|
},
|
|
27347
|
+
pageStatusHit: {
|
|
27348
|
+
paddingHorizontal: 8,
|
|
27349
|
+
paddingVertical: 4,
|
|
27350
|
+
borderRadius: 8
|
|
27351
|
+
},
|
|
27228
27352
|
pageStatusDark: {
|
|
27229
27353
|
color: "#e5e7eb"
|
|
27230
27354
|
},
|
|
@@ -27427,10 +27551,10 @@ var styles6 = import_react_native6.StyleSheet.create({
|
|
|
27427
27551
|
var RightSheet_default = RightSheet;
|
|
27428
27552
|
|
|
27429
27553
|
// components/AnnotationEditor.tsx
|
|
27430
|
-
var
|
|
27431
|
-
var
|
|
27554
|
+
var import_react8 = require("react");
|
|
27555
|
+
var import_react_native8 = require("react-native");
|
|
27432
27556
|
var import_core7 = require("@papyrus-sdk/core");
|
|
27433
|
-
var
|
|
27557
|
+
var import_jsx_runtime9 = require("react/jsx-runtime");
|
|
27434
27558
|
var AnnotationEditor = () => {
|
|
27435
27559
|
const {
|
|
27436
27560
|
annotations,
|
|
@@ -27443,10 +27567,10 @@ var AnnotationEditor = () => {
|
|
|
27443
27567
|
} = (0, import_core7.useViewerStore)();
|
|
27444
27568
|
const annotation = annotations.find((ann) => ann.id === selectedAnnotationId);
|
|
27445
27569
|
const isEditable = annotation && (annotation.type === "text" || annotation.type === "comment");
|
|
27446
|
-
const [draft, setDraft] = (0,
|
|
27570
|
+
const [draft, setDraft] = (0, import_react8.useState)("");
|
|
27447
27571
|
const isDark = uiTheme === "dark";
|
|
27448
27572
|
const t = getStrings(locale);
|
|
27449
|
-
(0,
|
|
27573
|
+
(0, import_react8.useEffect)(() => {
|
|
27450
27574
|
if (isEditable) {
|
|
27451
27575
|
setDraft(annotation?.content ?? "");
|
|
27452
27576
|
}
|
|
@@ -27457,19 +27581,19 @@ var AnnotationEditor = () => {
|
|
|
27457
27581
|
updateAnnotation(annotation.id, { content: draft });
|
|
27458
27582
|
setSelectedAnnotation(null);
|
|
27459
27583
|
};
|
|
27460
|
-
return /* @__PURE__ */ (0,
|
|
27461
|
-
|
|
27584
|
+
return /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
27585
|
+
import_react_native8.Modal,
|
|
27462
27586
|
{
|
|
27463
27587
|
visible: true,
|
|
27464
27588
|
transparent: true,
|
|
27465
27589
|
animationType: "fade",
|
|
27466
27590
|
onRequestClose: handleClose,
|
|
27467
|
-
children: /* @__PURE__ */ (0,
|
|
27468
|
-
/* @__PURE__ */ (0,
|
|
27469
|
-
/* @__PURE__ */ (0,
|
|
27470
|
-
|
|
27591
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.View, { style: styles8.overlay, children: /* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native8.View, { style: [styles8.card, isDark && styles8.cardDark], children: [
|
|
27592
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: [styles8.title, isDark && styles8.titleDark], children: t.editNote }),
|
|
27593
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
27594
|
+
import_react_native8.TextInput,
|
|
27471
27595
|
{
|
|
27472
|
-
style: [
|
|
27596
|
+
style: [styles8.input, isDark && styles8.inputDark],
|
|
27473
27597
|
value: draft,
|
|
27474
27598
|
onChangeText: setDraft,
|
|
27475
27599
|
placeholder: t.notePlaceholder,
|
|
@@ -27477,25 +27601,25 @@ var AnnotationEditor = () => {
|
|
|
27477
27601
|
multiline: true
|
|
27478
27602
|
}
|
|
27479
27603
|
),
|
|
27480
|
-
/* @__PURE__ */ (0,
|
|
27481
|
-
/* @__PURE__ */ (0,
|
|
27482
|
-
|
|
27604
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsxs)(import_react_native8.View, { style: styles8.actions, children: [
|
|
27605
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
27606
|
+
import_react_native8.Pressable,
|
|
27483
27607
|
{
|
|
27484
27608
|
onPress: handleClose,
|
|
27485
|
-
style: [
|
|
27486
|
-
children: /* @__PURE__ */ (0,
|
|
27609
|
+
style: [styles8.actionButton, styles8.actionCancel],
|
|
27610
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: styles8.actionText, children: t.cancel })
|
|
27487
27611
|
}
|
|
27488
27612
|
),
|
|
27489
|
-
/* @__PURE__ */ (0,
|
|
27490
|
-
|
|
27613
|
+
/* @__PURE__ */ (0, import_jsx_runtime9.jsx)(
|
|
27614
|
+
import_react_native8.Pressable,
|
|
27491
27615
|
{
|
|
27492
27616
|
onPress: handleSave,
|
|
27493
27617
|
style: [
|
|
27494
|
-
|
|
27495
|
-
|
|
27618
|
+
styles8.actionButton,
|
|
27619
|
+
styles8.actionSave,
|
|
27496
27620
|
{ backgroundColor: accentColor }
|
|
27497
27621
|
],
|
|
27498
|
-
children: /* @__PURE__ */ (0,
|
|
27622
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime9.jsx)(import_react_native8.Text, { style: [styles8.actionText, styles8.actionTextLight], children: t.save })
|
|
27499
27623
|
}
|
|
27500
27624
|
)
|
|
27501
27625
|
] })
|
|
@@ -27503,7 +27627,7 @@ var AnnotationEditor = () => {
|
|
|
27503
27627
|
}
|
|
27504
27628
|
);
|
|
27505
27629
|
};
|
|
27506
|
-
var
|
|
27630
|
+
var styles8 = import_react_native8.StyleSheet.create({
|
|
27507
27631
|
overlay: {
|
|
27508
27632
|
flex: 1,
|
|
27509
27633
|
alignItems: "center",
|
|
@@ -27573,7 +27697,7 @@ var styles7 = import_react_native7.StyleSheet.create({
|
|
|
27573
27697
|
var AnnotationEditor_default = AnnotationEditor;
|
|
27574
27698
|
|
|
27575
27699
|
// components/BottomBar.tsx
|
|
27576
|
-
var
|
|
27700
|
+
var import_react_native9 = require("react-native");
|
|
27577
27701
|
var import_core8 = require("@papyrus-sdk/core");
|
|
27578
27702
|
|
|
27579
27703
|
// components/bottomBarModel.ts
|
|
@@ -27612,8 +27736,15 @@ function buildBottomBarLayout({
|
|
|
27612
27736
|
};
|
|
27613
27737
|
}
|
|
27614
27738
|
|
|
27739
|
+
// components/BottomBar.actions.ts
|
|
27740
|
+
function createOpenDestinationHandler(onOpenDestination, destination) {
|
|
27741
|
+
return () => {
|
|
27742
|
+
onOpenDestination?.(destination);
|
|
27743
|
+
};
|
|
27744
|
+
}
|
|
27745
|
+
|
|
27615
27746
|
// components/BottomBar.tsx
|
|
27616
|
-
var
|
|
27747
|
+
var import_jsx_runtime10 = require("react/jsx-runtime");
|
|
27617
27748
|
var BottomBar = ({
|
|
27618
27749
|
documentType,
|
|
27619
27750
|
onOpenInfo,
|
|
@@ -27658,19 +27789,19 @@ var BottomBar = ({
|
|
|
27658
27789
|
});
|
|
27659
27790
|
return;
|
|
27660
27791
|
}
|
|
27661
|
-
onOpenDestination("annotate");
|
|
27792
|
+
onOpenDestination?.("annotate");
|
|
27662
27793
|
setDocumentState({ toolDockOpen: true });
|
|
27663
27794
|
}
|
|
27664
27795
|
},
|
|
27665
27796
|
notes: {
|
|
27666
27797
|
label: t.notes,
|
|
27667
27798
|
icon: IconComment,
|
|
27668
|
-
onPress: (
|
|
27799
|
+
onPress: createOpenDestinationHandler(onOpenDestination, "notes")
|
|
27669
27800
|
},
|
|
27670
27801
|
search: {
|
|
27671
27802
|
label: t.search,
|
|
27672
27803
|
icon: IconSearch,
|
|
27673
|
-
onPress: (
|
|
27804
|
+
onPress: createOpenDestinationHandler(onOpenDestination, "search")
|
|
27674
27805
|
},
|
|
27675
27806
|
info: {
|
|
27676
27807
|
label: t.info,
|
|
@@ -27684,37 +27815,43 @@ var BottomBar = ({
|
|
|
27684
27815
|
}
|
|
27685
27816
|
};
|
|
27686
27817
|
if (!mobileChromeVisible || !mobileDockVisible) return null;
|
|
27687
|
-
return /* @__PURE__ */ (0,
|
|
27688
|
-
layout.leftSlots.length > 0 ? /* @__PURE__ */ (0,
|
|
27689
|
-
|
|
27818
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(import_react_native9.View, { pointerEvents: "box-none", style: styles9.frame, children: /* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: styles9.row, children: [
|
|
27819
|
+
layout.leftSlots.length > 0 ? /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27820
|
+
import_react_native9.View,
|
|
27690
27821
|
{
|
|
27691
27822
|
style: [
|
|
27692
|
-
|
|
27693
|
-
|
|
27694
|
-
isDark &&
|
|
27823
|
+
styles9.island,
|
|
27824
|
+
styles9.editIsland,
|
|
27825
|
+
isDark && styles9.islandDark
|
|
27695
27826
|
],
|
|
27696
27827
|
testID: "papyrus-floating-bottom-dock-edit",
|
|
27697
27828
|
children: layout.leftSlots.map((slot) => {
|
|
27698
27829
|
const meta = slotMeta[slot.key];
|
|
27699
27830
|
const Icon = meta.icon;
|
|
27700
|
-
return /* @__PURE__ */ (0,
|
|
27701
|
-
|
|
27831
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27832
|
+
import_react_native9.Pressable,
|
|
27702
27833
|
{
|
|
27703
27834
|
onPress: meta.onPress,
|
|
27704
27835
|
style: [
|
|
27705
|
-
|
|
27706
|
-
slot.active &&
|
|
27836
|
+
styles9.iconOnlyItem,
|
|
27837
|
+
slot.active && styles9.itemActive
|
|
27707
27838
|
],
|
|
27708
27839
|
accessibilityLabel: meta.label,
|
|
27709
|
-
children: /* @__PURE__ */ (0,
|
|
27710
|
-
|
|
27840
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27841
|
+
import_react_native9.View,
|
|
27711
27842
|
{
|
|
27712
27843
|
style: [
|
|
27713
|
-
|
|
27714
|
-
isDark &&
|
|
27715
|
-
slot.active &&
|
|
27844
|
+
styles9.itemIcon,
|
|
27845
|
+
isDark && styles9.itemIconDark,
|
|
27846
|
+
slot.active && styles9.itemIconActive
|
|
27716
27847
|
],
|
|
27717
|
-
children: /* @__PURE__ */ (0,
|
|
27848
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27849
|
+
Icon,
|
|
27850
|
+
{
|
|
27851
|
+
size: MOBILE_CHROME_METRICS.iconSize,
|
|
27852
|
+
color: iconColor(slot.active)
|
|
27853
|
+
}
|
|
27854
|
+
)
|
|
27718
27855
|
}
|
|
27719
27856
|
)
|
|
27720
27857
|
},
|
|
@@ -27723,33 +27860,39 @@ var BottomBar = ({
|
|
|
27723
27860
|
})
|
|
27724
27861
|
}
|
|
27725
27862
|
) : null,
|
|
27726
|
-
/* @__PURE__ */ (0,
|
|
27727
|
-
|
|
27863
|
+
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27864
|
+
import_react_native9.View,
|
|
27728
27865
|
{
|
|
27729
27866
|
style: [
|
|
27730
|
-
|
|
27731
|
-
|
|
27732
|
-
isDark &&
|
|
27867
|
+
styles9.island,
|
|
27868
|
+
styles9.utilityIsland,
|
|
27869
|
+
isDark && styles9.islandDark
|
|
27733
27870
|
],
|
|
27734
27871
|
testID: "papyrus-floating-bottom-dock",
|
|
27735
27872
|
children: layout.rightSlots.map((slot) => {
|
|
27736
27873
|
const meta = slotMeta[slot.key];
|
|
27737
27874
|
const Icon = meta.icon;
|
|
27738
|
-
return /* @__PURE__ */ (0,
|
|
27739
|
-
|
|
27875
|
+
return /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27876
|
+
import_react_native9.Pressable,
|
|
27740
27877
|
{
|
|
27741
27878
|
onPress: meta.onPress,
|
|
27742
|
-
style: [
|
|
27879
|
+
style: [styles9.iconOnlyItem, slot.active && styles9.itemActive],
|
|
27743
27880
|
accessibilityLabel: meta.label,
|
|
27744
|
-
children: /* @__PURE__ */ (0,
|
|
27745
|
-
|
|
27881
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27882
|
+
import_react_native9.View,
|
|
27746
27883
|
{
|
|
27747
27884
|
style: [
|
|
27748
|
-
|
|
27749
|
-
isDark &&
|
|
27750
|
-
slot.active &&
|
|
27885
|
+
styles9.itemIcon,
|
|
27886
|
+
isDark && styles9.itemIconDark,
|
|
27887
|
+
slot.active && styles9.itemIconActive
|
|
27751
27888
|
],
|
|
27752
|
-
children: /* @__PURE__ */ (0,
|
|
27889
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27890
|
+
Icon,
|
|
27891
|
+
{
|
|
27892
|
+
size: MOBILE_CHROME_METRICS.iconSize,
|
|
27893
|
+
color: iconColor(slot.active)
|
|
27894
|
+
}
|
|
27895
|
+
)
|
|
27753
27896
|
}
|
|
27754
27897
|
)
|
|
27755
27898
|
},
|
|
@@ -27760,20 +27903,20 @@ var BottomBar = ({
|
|
|
27760
27903
|
)
|
|
27761
27904
|
] }) });
|
|
27762
27905
|
};
|
|
27763
|
-
var
|
|
27906
|
+
var styles9 = import_react_native9.StyleSheet.create({
|
|
27764
27907
|
frame: {
|
|
27765
27908
|
position: "absolute",
|
|
27766
27909
|
left: 0,
|
|
27767
27910
|
right: 0,
|
|
27768
27911
|
bottom: 0,
|
|
27769
27912
|
zIndex: 20,
|
|
27770
|
-
paddingHorizontal:
|
|
27913
|
+
paddingHorizontal: MOBILE_CHROME_METRICS.screenPadding,
|
|
27771
27914
|
paddingBottom: 14,
|
|
27772
27915
|
alignItems: "center"
|
|
27773
27916
|
},
|
|
27774
27917
|
row: {
|
|
27775
27918
|
width: "100%",
|
|
27776
|
-
maxWidth:
|
|
27919
|
+
maxWidth: MOBILE_CHROME_METRICS.maxFloatingWidth,
|
|
27777
27920
|
flexDirection: "row",
|
|
27778
27921
|
justifyContent: "flex-start",
|
|
27779
27922
|
alignItems: "center",
|
|
@@ -27811,15 +27954,15 @@ var styles8 = import_react_native8.StyleSheet.create({
|
|
|
27811
27954
|
iconOnlyItem: {
|
|
27812
27955
|
alignItems: "center",
|
|
27813
27956
|
justifyContent: "center",
|
|
27814
|
-
paddingHorizontal:
|
|
27815
|
-
paddingVertical:
|
|
27957
|
+
paddingHorizontal: MOBILE_CHROME_METRICS.bottomBarItemPaddingHorizontal,
|
|
27958
|
+
paddingVertical: MOBILE_CHROME_METRICS.bottomBarItemPaddingVertical
|
|
27816
27959
|
},
|
|
27817
27960
|
itemActive: {
|
|
27818
27961
|
transform: [{ translateY: -2 }]
|
|
27819
27962
|
},
|
|
27820
27963
|
itemIcon: {
|
|
27821
|
-
width:
|
|
27822
|
-
height:
|
|
27964
|
+
width: MOBILE_CHROME_METRICS.iconBoxSize,
|
|
27965
|
+
height: MOBILE_CHROME_METRICS.iconBoxSize,
|
|
27823
27966
|
borderRadius: 0,
|
|
27824
27967
|
backgroundColor: "transparent",
|
|
27825
27968
|
alignItems: "center",
|
|
@@ -27837,9 +27980,11 @@ var styles8 = import_react_native8.StyleSheet.create({
|
|
|
27837
27980
|
var BottomBar_default = BottomBar;
|
|
27838
27981
|
|
|
27839
27982
|
// components/SettingsSheet.tsx
|
|
27840
|
-
var
|
|
27983
|
+
var import_react9 = require("react");
|
|
27984
|
+
var import_react_native10 = require("react-native");
|
|
27985
|
+
var import_bottom_sheet2 = __toESM(require("@gorhom/bottom-sheet"));
|
|
27841
27986
|
var import_core9 = require("@papyrus-sdk/core");
|
|
27842
|
-
var
|
|
27987
|
+
var import_jsx_runtime11 = require("react/jsx-runtime");
|
|
27843
27988
|
var PAGE_THEME_OPTIONS = [
|
|
27844
27989
|
{ value: "normal", labelKey: "themeOriginal" },
|
|
27845
27990
|
{ value: "sepia", labelKey: "themeSepia" },
|
|
@@ -27848,19 +27993,19 @@ var PAGE_THEME_OPTIONS = [
|
|
|
27848
27993
|
];
|
|
27849
27994
|
var ThemeSwatch = ({ value }) => {
|
|
27850
27995
|
if (value === "high-contrast") {
|
|
27851
|
-
return /* @__PURE__ */ (0,
|
|
27852
|
-
/* @__PURE__ */ (0,
|
|
27853
|
-
/* @__PURE__ */ (0,
|
|
27996
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: [styles10.themeSwatch, styles10.themeSwatchContrast], children: [
|
|
27997
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.View, { style: styles10.themeSwatchContrastHalfDark }),
|
|
27998
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.View, { style: styles10.themeSwatchContrastHalfLight })
|
|
27854
27999
|
] });
|
|
27855
28000
|
}
|
|
27856
|
-
return /* @__PURE__ */ (0,
|
|
27857
|
-
|
|
28001
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28002
|
+
import_react_native10.View,
|
|
27858
28003
|
{
|
|
27859
28004
|
style: [
|
|
27860
|
-
|
|
27861
|
-
value === "normal" &&
|
|
27862
|
-
value === "sepia" &&
|
|
27863
|
-
value === "dark" &&
|
|
28005
|
+
styles10.themeSwatch,
|
|
28006
|
+
value === "normal" && styles10.themeSwatchNormal,
|
|
28007
|
+
value === "sepia" && styles10.themeSwatchSepia,
|
|
28008
|
+
value === "dark" && styles10.themeSwatchDark
|
|
27864
28009
|
]
|
|
27865
28010
|
}
|
|
27866
28011
|
);
|
|
@@ -27883,6 +28028,23 @@ var SettingsSheet = ({
|
|
|
27883
28028
|
const isPaged = viewMode === "single";
|
|
27884
28029
|
const isDouble = viewMode === "double";
|
|
27885
28030
|
const t = getStrings(locale);
|
|
28031
|
+
const snapPoints = (0, import_react9.useMemo)(
|
|
28032
|
+
() => [Math.min(640, import_react_native10.Dimensions.get("window").height * 0.72)],
|
|
28033
|
+
[]
|
|
28034
|
+
);
|
|
28035
|
+
const renderBackdrop = (0, import_react9.useCallback)(
|
|
28036
|
+
(props) => /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28037
|
+
import_bottom_sheet2.BottomSheetBackdrop,
|
|
28038
|
+
{
|
|
28039
|
+
...props,
|
|
28040
|
+
appearsOnIndex: 0,
|
|
28041
|
+
disappearsOnIndex: -1,
|
|
28042
|
+
opacity: 0.4,
|
|
28043
|
+
pressBehavior: "close"
|
|
28044
|
+
}
|
|
28045
|
+
),
|
|
28046
|
+
[]
|
|
28047
|
+
);
|
|
27886
28048
|
const handleTransition = (mode) => {
|
|
27887
28049
|
if (mode === "paged") {
|
|
27888
28050
|
setDocumentState({ viewMode: "single" });
|
|
@@ -27909,366 +28071,380 @@ var SettingsSheet = ({
|
|
|
27909
28071
|
setDocumentState({ zoom: next });
|
|
27910
28072
|
};
|
|
27911
28073
|
if (!visible) return null;
|
|
27912
|
-
return /* @__PURE__ */ (0,
|
|
27913
|
-
|
|
27914
|
-
|
|
27915
|
-
|
|
27916
|
-
|
|
27917
|
-
|
|
27918
|
-
|
|
27919
|
-
|
|
27920
|
-
|
|
27921
|
-
|
|
27922
|
-
|
|
27923
|
-
|
|
27924
|
-
|
|
27925
|
-
|
|
27926
|
-
|
|
27927
|
-
|
|
27928
|
-
|
|
27929
|
-
|
|
27930
|
-
|
|
27931
|
-
|
|
27932
|
-
|
|
27933
|
-
uiTheme === "light" && { backgroundColor: accentColor }
|
|
27934
|
-
],
|
|
27935
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27936
|
-
import_react_native9.Text,
|
|
27937
|
-
{
|
|
27938
|
-
style: [
|
|
27939
|
-
styles9.optionText,
|
|
27940
|
-
isDark && styles9.optionTextDark,
|
|
27941
|
-
uiTheme === "light" && styles9.optionTextActive
|
|
27942
|
-
],
|
|
27943
|
-
children: t.light
|
|
27944
|
-
}
|
|
27945
|
-
)
|
|
27946
|
-
}
|
|
27947
|
-
),
|
|
27948
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27949
|
-
import_react_native9.Pressable,
|
|
27950
|
-
{
|
|
27951
|
-
onPress: () => setDocumentState({ uiTheme: "dark" }),
|
|
27952
|
-
style: [
|
|
27953
|
-
styles9.optionButton,
|
|
27954
|
-
isDark && styles9.optionButtonDark,
|
|
27955
|
-
uiTheme === "dark" && styles9.optionButtonActive,
|
|
27956
|
-
uiTheme === "dark" && { backgroundColor: accentColor }
|
|
27957
|
-
],
|
|
27958
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27959
|
-
import_react_native9.Text,
|
|
28074
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.View, { style: styles10.modalRoot, pointerEvents: "box-none", children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28075
|
+
import_bottom_sheet2.default,
|
|
28076
|
+
{
|
|
28077
|
+
index: 0,
|
|
28078
|
+
snapPoints,
|
|
28079
|
+
enablePanDownToClose: true,
|
|
28080
|
+
onClose,
|
|
28081
|
+
backdropComponent: renderBackdrop,
|
|
28082
|
+
backgroundStyle: [styles10.sheetBackground, isDark && styles10.sheetDark],
|
|
28083
|
+
handleIndicatorStyle: [styles10.handle, isDark && styles10.handleDark],
|
|
28084
|
+
handleStyle: styles10.handleContainer,
|
|
28085
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
28086
|
+
import_bottom_sheet2.BottomSheetScrollView,
|
|
28087
|
+
{
|
|
28088
|
+
style: styles10.sheet,
|
|
28089
|
+
contentContainerStyle: styles10.sheetContent,
|
|
28090
|
+
showsVerticalScrollIndicator: false,
|
|
28091
|
+
children: [
|
|
28092
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.section, children: [
|
|
28093
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28094
|
+
import_react_native10.Text,
|
|
27960
28095
|
{
|
|
27961
|
-
style: [
|
|
27962
|
-
|
|
27963
|
-
isDark && styles9.optionTextDark,
|
|
27964
|
-
uiTheme === "dark" && styles9.optionTextActive
|
|
27965
|
-
],
|
|
27966
|
-
children: t.dark
|
|
28096
|
+
style: [styles10.sectionTitle, isDark && styles10.sectionTitleDark],
|
|
28097
|
+
children: t.appearance
|
|
27967
28098
|
}
|
|
27968
|
-
)
|
|
27969
|
-
|
|
27970
|
-
|
|
27971
|
-
|
|
27972
|
-
|
|
27973
|
-
|
|
27974
|
-
|
|
27975
|
-
|
|
27976
|
-
|
|
27977
|
-
|
|
27978
|
-
|
|
27979
|
-
|
|
27980
|
-
|
|
27981
|
-
|
|
27982
|
-
|
|
27983
|
-
|
|
27984
|
-
|
|
27985
|
-
|
|
27986
|
-
|
|
27987
|
-
|
|
27988
|
-
|
|
27989
|
-
|
|
27990
|
-
|
|
27991
|
-
|
|
27992
|
-
|
|
27993
|
-
|
|
27994
|
-
|
|
27995
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
27996
|
-
import_react_native9.Text,
|
|
28099
|
+
),
|
|
28100
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.optionRow, children: [
|
|
28101
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28102
|
+
import_react_native10.Pressable,
|
|
28103
|
+
{
|
|
28104
|
+
onPress: () => setDocumentState({ uiTheme: "light" }),
|
|
28105
|
+
style: [
|
|
28106
|
+
styles10.optionButton,
|
|
28107
|
+
isDark && styles10.optionButtonDark,
|
|
28108
|
+
uiTheme === "light" && styles10.optionButtonActive,
|
|
28109
|
+
uiTheme === "light" && { backgroundColor: accentColor }
|
|
28110
|
+
],
|
|
28111
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28112
|
+
import_react_native10.Text,
|
|
28113
|
+
{
|
|
28114
|
+
style: [
|
|
28115
|
+
styles10.optionText,
|
|
28116
|
+
isDark && styles10.optionTextDark,
|
|
28117
|
+
uiTheme === "light" && styles10.optionTextActive
|
|
28118
|
+
],
|
|
28119
|
+
children: t.light
|
|
28120
|
+
}
|
|
28121
|
+
)
|
|
28122
|
+
}
|
|
28123
|
+
),
|
|
28124
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28125
|
+
import_react_native10.Pressable,
|
|
27997
28126
|
{
|
|
28127
|
+
onPress: () => setDocumentState({ uiTheme: "dark" }),
|
|
27998
28128
|
style: [
|
|
27999
|
-
|
|
28000
|
-
isDark &&
|
|
28001
|
-
|
|
28129
|
+
styles10.optionButton,
|
|
28130
|
+
isDark && styles10.optionButtonDark,
|
|
28131
|
+
uiTheme === "dark" && styles10.optionButtonActive,
|
|
28132
|
+
uiTheme === "dark" && { backgroundColor: accentColor }
|
|
28002
28133
|
],
|
|
28003
|
-
children:
|
|
28134
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28135
|
+
import_react_native10.Text,
|
|
28136
|
+
{
|
|
28137
|
+
style: [
|
|
28138
|
+
styles10.optionText,
|
|
28139
|
+
isDark && styles10.optionTextDark,
|
|
28140
|
+
uiTheme === "dark" && styles10.optionTextActive
|
|
28141
|
+
],
|
|
28142
|
+
children: t.dark
|
|
28143
|
+
}
|
|
28144
|
+
)
|
|
28004
28145
|
}
|
|
28005
28146
|
)
|
|
28006
|
-
]
|
|
28007
|
-
},
|
|
28008
|
-
|
|
28009
|
-
|
|
28010
|
-
|
|
28011
|
-
] }),
|
|
28012
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: styles9.section, children: [
|
|
28013
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
28014
|
-
import_react_native9.Text,
|
|
28015
|
-
{
|
|
28016
|
-
style: [styles9.sectionTitle, isDark && styles9.sectionTitleDark],
|
|
28017
|
-
children: t.pageTransition
|
|
28018
|
-
}
|
|
28019
|
-
),
|
|
28020
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: styles9.optionRow, children: [
|
|
28021
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
28022
|
-
import_react_native9.Pressable,
|
|
28023
|
-
{
|
|
28024
|
-
onPress: () => handleTransition("continuous"),
|
|
28025
|
-
style: [
|
|
28026
|
-
styles9.optionButton,
|
|
28027
|
-
isDark && styles9.optionButtonDark,
|
|
28028
|
-
(!isPaged || isDouble) && styles9.optionButtonActive,
|
|
28029
|
-
(!isPaged || isDouble) && { backgroundColor: accentColor }
|
|
28030
|
-
],
|
|
28031
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
28032
|
-
import_react_native9.Text,
|
|
28033
|
-
{
|
|
28034
|
-
style: [
|
|
28035
|
-
styles9.optionText,
|
|
28036
|
-
isDark && styles9.optionTextDark,
|
|
28037
|
-
(!isPaged || isDouble) && styles9.optionTextActive
|
|
28038
|
-
],
|
|
28039
|
-
children: t.continuous
|
|
28040
|
-
}
|
|
28041
|
-
)
|
|
28042
|
-
}
|
|
28043
|
-
),
|
|
28044
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
28045
|
-
import_react_native9.Pressable,
|
|
28046
|
-
{
|
|
28047
|
-
onPress: () => handleTransition("paged"),
|
|
28048
|
-
style: [
|
|
28049
|
-
styles9.optionButton,
|
|
28050
|
-
isDark && styles9.optionButtonDark,
|
|
28051
|
-
isPaged && styles9.optionButtonActive,
|
|
28052
|
-
isPaged && { backgroundColor: accentColor }
|
|
28053
|
-
],
|
|
28054
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
28055
|
-
import_react_native9.Text,
|
|
28056
|
-
{
|
|
28057
|
-
style: [
|
|
28058
|
-
styles9.optionText,
|
|
28059
|
-
isDark && styles9.optionTextDark,
|
|
28060
|
-
isPaged && styles9.optionTextActive
|
|
28061
|
-
],
|
|
28062
|
-
children: t.pageByPage
|
|
28063
|
-
}
|
|
28064
|
-
)
|
|
28065
|
-
}
|
|
28066
|
-
)
|
|
28067
|
-
] })
|
|
28068
|
-
] }),
|
|
28069
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: styles9.section, children: [
|
|
28070
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
28071
|
-
import_react_native9.Text,
|
|
28072
|
-
{
|
|
28073
|
-
style: [styles9.sectionTitle, isDark && styles9.sectionTitleDark],
|
|
28074
|
-
children: t.layout
|
|
28075
|
-
}
|
|
28076
|
-
),
|
|
28077
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: styles9.optionRow, children: [
|
|
28078
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
28079
|
-
import_react_native9.Pressable,
|
|
28080
|
-
{
|
|
28081
|
-
onPress: () => handleLayout("single"),
|
|
28082
|
-
style: [
|
|
28083
|
-
styles9.optionButton,
|
|
28084
|
-
isDark && styles9.optionButtonDark,
|
|
28085
|
-
!isDouble && styles9.optionButtonActive,
|
|
28086
|
-
!isDouble && { backgroundColor: accentColor }
|
|
28087
|
-
],
|
|
28088
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
28089
|
-
import_react_native9.Text,
|
|
28147
|
+
] })
|
|
28148
|
+
] }),
|
|
28149
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.section, children: [
|
|
28150
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28151
|
+
import_react_native10.Text,
|
|
28090
28152
|
{
|
|
28091
|
-
style: [
|
|
28092
|
-
|
|
28093
|
-
isDark && styles9.optionTextDark,
|
|
28094
|
-
!isDouble && styles9.optionTextActive
|
|
28095
|
-
],
|
|
28096
|
-
children: t.singlePage
|
|
28153
|
+
style: [styles10.sectionTitle, isDark && styles10.sectionTitleDark],
|
|
28154
|
+
children: t.pageTheme
|
|
28097
28155
|
}
|
|
28098
|
-
)
|
|
28099
|
-
|
|
28100
|
-
|
|
28101
|
-
|
|
28102
|
-
|
|
28103
|
-
|
|
28104
|
-
|
|
28105
|
-
|
|
28106
|
-
|
|
28107
|
-
|
|
28108
|
-
|
|
28109
|
-
|
|
28110
|
-
|
|
28111
|
-
|
|
28112
|
-
|
|
28156
|
+
),
|
|
28157
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.View, { style: styles10.themeOptionRow, children: PAGE_THEME_OPTIONS.map((option) => {
|
|
28158
|
+
const active = pageTheme === option.value;
|
|
28159
|
+
return /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(
|
|
28160
|
+
import_react_native10.Pressable,
|
|
28161
|
+
{
|
|
28162
|
+
onPress: () => setDocumentState({ pageTheme: option.value }),
|
|
28163
|
+
style: [
|
|
28164
|
+
styles10.themeOptionButton,
|
|
28165
|
+
isDark && styles10.themeOptionButtonDark,
|
|
28166
|
+
active && styles10.themeOptionButtonActive,
|
|
28167
|
+
active && { borderColor: accentColor }
|
|
28168
|
+
],
|
|
28169
|
+
children: [
|
|
28170
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(ThemeSwatch, { value: option.value }),
|
|
28171
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28172
|
+
import_react_native10.Text,
|
|
28173
|
+
{
|
|
28174
|
+
style: [
|
|
28175
|
+
styles10.themeOptionLabel,
|
|
28176
|
+
isDark && styles10.themeOptionLabelDark,
|
|
28177
|
+
active && { color: accentColor }
|
|
28178
|
+
],
|
|
28179
|
+
children: t[option.labelKey]
|
|
28180
|
+
}
|
|
28181
|
+
)
|
|
28182
|
+
]
|
|
28183
|
+
},
|
|
28184
|
+
option.value
|
|
28185
|
+
);
|
|
28186
|
+
}) })
|
|
28187
|
+
] }),
|
|
28188
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.section, children: [
|
|
28189
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28190
|
+
import_react_native10.Text,
|
|
28113
28191
|
{
|
|
28114
|
-
style: [
|
|
28115
|
-
|
|
28116
|
-
isDark && styles9.optionTextDark,
|
|
28117
|
-
isDouble && styles9.optionTextActive
|
|
28118
|
-
],
|
|
28119
|
-
children: t.doublePage
|
|
28192
|
+
style: [styles10.sectionTitle, isDark && styles10.sectionTitleDark],
|
|
28193
|
+
children: t.pageTransition
|
|
28120
28194
|
}
|
|
28121
|
-
)
|
|
28122
|
-
|
|
28123
|
-
|
|
28124
|
-
|
|
28125
|
-
|
|
28126
|
-
|
|
28127
|
-
|
|
28128
|
-
|
|
28129
|
-
|
|
28130
|
-
|
|
28131
|
-
|
|
28132
|
-
|
|
28133
|
-
|
|
28134
|
-
|
|
28135
|
-
|
|
28136
|
-
|
|
28137
|
-
|
|
28138
|
-
|
|
28139
|
-
|
|
28140
|
-
|
|
28141
|
-
|
|
28195
|
+
),
|
|
28196
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.optionRow, children: [
|
|
28197
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28198
|
+
import_react_native10.Pressable,
|
|
28199
|
+
{
|
|
28200
|
+
onPress: () => handleTransition("continuous"),
|
|
28201
|
+
style: [
|
|
28202
|
+
styles10.optionButton,
|
|
28203
|
+
isDark && styles10.optionButtonDark,
|
|
28204
|
+
(!isPaged || isDouble) && styles10.optionButtonActive,
|
|
28205
|
+
(!isPaged || isDouble) && { backgroundColor: accentColor }
|
|
28206
|
+
],
|
|
28207
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28208
|
+
import_react_native10.Text,
|
|
28209
|
+
{
|
|
28210
|
+
style: [
|
|
28211
|
+
styles10.optionText,
|
|
28212
|
+
isDark && styles10.optionTextDark,
|
|
28213
|
+
(!isPaged || isDouble) && styles10.optionTextActive
|
|
28214
|
+
],
|
|
28215
|
+
children: t.continuous
|
|
28216
|
+
}
|
|
28217
|
+
)
|
|
28218
|
+
}
|
|
28219
|
+
),
|
|
28220
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28221
|
+
import_react_native10.Pressable,
|
|
28222
|
+
{
|
|
28223
|
+
onPress: () => handleTransition("paged"),
|
|
28224
|
+
style: [
|
|
28225
|
+
styles10.optionButton,
|
|
28226
|
+
isDark && styles10.optionButtonDark,
|
|
28227
|
+
isPaged && styles10.optionButtonActive,
|
|
28228
|
+
isPaged && { backgroundColor: accentColor }
|
|
28229
|
+
],
|
|
28230
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28231
|
+
import_react_native10.Text,
|
|
28232
|
+
{
|
|
28233
|
+
style: [
|
|
28234
|
+
styles10.optionText,
|
|
28235
|
+
isDark && styles10.optionTextDark,
|
|
28236
|
+
isPaged && styles10.optionTextActive
|
|
28237
|
+
],
|
|
28238
|
+
children: t.pageByPage
|
|
28239
|
+
}
|
|
28240
|
+
)
|
|
28241
|
+
}
|
|
28242
|
+
)
|
|
28243
|
+
] })
|
|
28244
|
+
] }),
|
|
28245
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.section, children: [
|
|
28246
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28247
|
+
import_react_native10.Text,
|
|
28142
28248
|
{
|
|
28143
|
-
style: [
|
|
28144
|
-
children: t.
|
|
28249
|
+
style: [styles10.sectionTitle, isDark && styles10.sectionTitleDark],
|
|
28250
|
+
children: t.layout
|
|
28145
28251
|
}
|
|
28146
|
-
)
|
|
28147
|
-
|
|
28148
|
-
|
|
28149
|
-
|
|
28150
|
-
|
|
28151
|
-
|
|
28152
|
-
|
|
28153
|
-
|
|
28154
|
-
|
|
28155
|
-
|
|
28252
|
+
),
|
|
28253
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.optionRow, children: [
|
|
28254
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28255
|
+
import_react_native10.Pressable,
|
|
28256
|
+
{
|
|
28257
|
+
onPress: () => handleLayout("single"),
|
|
28258
|
+
style: [
|
|
28259
|
+
styles10.optionButton,
|
|
28260
|
+
isDark && styles10.optionButtonDark,
|
|
28261
|
+
!isDouble && styles10.optionButtonActive,
|
|
28262
|
+
!isDouble && { backgroundColor: accentColor }
|
|
28263
|
+
],
|
|
28264
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28265
|
+
import_react_native10.Text,
|
|
28266
|
+
{
|
|
28267
|
+
style: [
|
|
28268
|
+
styles10.optionText,
|
|
28269
|
+
isDark && styles10.optionTextDark,
|
|
28270
|
+
!isDouble && styles10.optionTextActive
|
|
28271
|
+
],
|
|
28272
|
+
children: t.singlePage
|
|
28273
|
+
}
|
|
28274
|
+
)
|
|
28275
|
+
}
|
|
28276
|
+
),
|
|
28277
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28278
|
+
import_react_native10.Pressable,
|
|
28279
|
+
{
|
|
28280
|
+
onPress: () => handleLayout("double"),
|
|
28281
|
+
style: [
|
|
28282
|
+
styles10.optionButton,
|
|
28283
|
+
isDark && styles10.optionButtonDark,
|
|
28284
|
+
isDouble && styles10.optionButtonActive,
|
|
28285
|
+
isDouble && { backgroundColor: accentColor }
|
|
28286
|
+
],
|
|
28287
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28288
|
+
import_react_native10.Text,
|
|
28289
|
+
{
|
|
28290
|
+
style: [
|
|
28291
|
+
styles10.optionText,
|
|
28292
|
+
isDark && styles10.optionTextDark,
|
|
28293
|
+
isDouble && styles10.optionTextActive
|
|
28294
|
+
],
|
|
28295
|
+
children: t.doublePage
|
|
28296
|
+
}
|
|
28297
|
+
)
|
|
28298
|
+
}
|
|
28299
|
+
)
|
|
28300
|
+
] })
|
|
28301
|
+
] }),
|
|
28302
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.section, children: [
|
|
28303
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28304
|
+
import_react_native10.Text,
|
|
28156
28305
|
{
|
|
28157
|
-
style: [
|
|
28158
|
-
children: t.
|
|
28306
|
+
style: [styles10.sectionTitle, isDark && styles10.sectionTitleDark],
|
|
28307
|
+
children: t.rotate
|
|
28159
28308
|
}
|
|
28160
|
-
)
|
|
28161
|
-
|
|
28162
|
-
|
|
28163
|
-
|
|
28164
|
-
|
|
28165
|
-
|
|
28166
|
-
|
|
28167
|
-
|
|
28168
|
-
|
|
28169
|
-
|
|
28170
|
-
|
|
28171
|
-
|
|
28172
|
-
|
|
28173
|
-
|
|
28174
|
-
|
|
28175
|
-
|
|
28176
|
-
|
|
28177
|
-
|
|
28178
|
-
|
|
28179
|
-
|
|
28180
|
-
|
|
28181
|
-
|
|
28182
|
-
|
|
28183
|
-
|
|
28184
|
-
|
|
28185
|
-
|
|
28186
|
-
|
|
28187
|
-
|
|
28188
|
-
|
|
28189
|
-
|
|
28190
|
-
|
|
28191
|
-
|
|
28192
|
-
|
|
28193
|
-
|
|
28194
|
-
|
|
28195
|
-
] }),
|
|
28196
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: styles9.section, children: [
|
|
28197
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
28198
|
-
import_react_native9.Text,
|
|
28199
|
-
{
|
|
28200
|
-
style: [styles9.sectionTitle, isDark && styles9.sectionTitleDark],
|
|
28201
|
-
children: t.language
|
|
28202
|
-
}
|
|
28203
|
-
),
|
|
28204
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsxs)(import_react_native9.View, { style: styles9.optionRow, children: [
|
|
28205
|
-
/* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
28206
|
-
import_react_native9.Pressable,
|
|
28207
|
-
{
|
|
28208
|
-
onPress: () => setDocumentState({ locale: "en" }),
|
|
28209
|
-
style: [
|
|
28210
|
-
styles9.optionButton,
|
|
28211
|
-
isDark && styles9.optionButtonDark,
|
|
28212
|
-
locale === "en" && styles9.optionButtonActive,
|
|
28213
|
-
locale === "en" && { backgroundColor: accentColor }
|
|
28214
|
-
],
|
|
28215
|
-
children: /* @__PURE__ */ (0, import_jsx_runtime10.jsx)(
|
|
28216
|
-
import_react_native9.Text,
|
|
28309
|
+
),
|
|
28310
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.optionRow, children: [
|
|
28311
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28312
|
+
import_react_native10.Pressable,
|
|
28313
|
+
{
|
|
28314
|
+
onPress: () => handleRotate("counterclockwise"),
|
|
28315
|
+
style: [styles10.optionButton, isDark && styles10.optionButtonDark],
|
|
28316
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28317
|
+
import_react_native10.Text,
|
|
28318
|
+
{
|
|
28319
|
+
style: [styles10.optionText, isDark && styles10.optionTextDark],
|
|
28320
|
+
children: t.counterclockwise
|
|
28321
|
+
}
|
|
28322
|
+
)
|
|
28323
|
+
}
|
|
28324
|
+
),
|
|
28325
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28326
|
+
import_react_native10.Pressable,
|
|
28327
|
+
{
|
|
28328
|
+
onPress: () => handleRotate("clockwise"),
|
|
28329
|
+
style: [styles10.optionButton, isDark && styles10.optionButtonDark],
|
|
28330
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28331
|
+
import_react_native10.Text,
|
|
28332
|
+
{
|
|
28333
|
+
style: [styles10.optionText, isDark && styles10.optionTextDark],
|
|
28334
|
+
children: t.clockwise
|
|
28335
|
+
}
|
|
28336
|
+
)
|
|
28337
|
+
}
|
|
28338
|
+
)
|
|
28339
|
+
] })
|
|
28340
|
+
] }),
|
|
28341
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.section, children: [
|
|
28342
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28343
|
+
import_react_native10.Text,
|
|
28217
28344
|
{
|
|
28218
|
-
style: [
|
|
28219
|
-
|
|
28220
|
-
isDark && styles9.optionTextDark,
|
|
28221
|
-
locale === "en" && styles9.optionTextActive
|
|
28222
|
-
],
|
|
28223
|
-
children: t.english
|
|
28345
|
+
style: [styles10.sectionTitle, isDark && styles10.sectionTitleDark],
|
|
28346
|
+
children: t.zoom
|
|
28224
28347
|
}
|
|
28225
|
-
)
|
|
28226
|
-
|
|
28227
|
-
|
|
28228
|
-
|
|
28229
|
-
|
|
28230
|
-
|
|
28231
|
-
|
|
28232
|
-
|
|
28233
|
-
|
|
28234
|
-
|
|
28235
|
-
|
|
28236
|
-
|
|
28237
|
-
|
|
28238
|
-
|
|
28239
|
-
|
|
28348
|
+
),
|
|
28349
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.optionRow, children: [
|
|
28350
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28351
|
+
import_react_native10.Pressable,
|
|
28352
|
+
{
|
|
28353
|
+
onPress: () => handleZoom(-0.1),
|
|
28354
|
+
style: [styles10.optionButton, isDark && styles10.optionButtonDark],
|
|
28355
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconZoomOut, { size: 16, color: isDark ? "#e5e7eb" : "#111827" })
|
|
28356
|
+
}
|
|
28357
|
+
),
|
|
28358
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(import_react_native10.View, { style: styles10.zoomValue, children: /* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.Text, { style: [styles10.zoomText, isDark && styles10.zoomTextDark], children: [
|
|
28359
|
+
Math.round(zoom * 100),
|
|
28360
|
+
"%"
|
|
28361
|
+
] }) }),
|
|
28362
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28363
|
+
import_react_native10.Pressable,
|
|
28364
|
+
{
|
|
28365
|
+
onPress: () => handleZoom(0.1),
|
|
28366
|
+
style: [styles10.optionButton, isDark && styles10.optionButtonDark],
|
|
28367
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(IconZoomIn, { size: 16, color: isDark ? "#e5e7eb" : "#111827" })
|
|
28368
|
+
}
|
|
28369
|
+
)
|
|
28370
|
+
] })
|
|
28371
|
+
] }),
|
|
28372
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.section, children: [
|
|
28373
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28374
|
+
import_react_native10.Text,
|
|
28240
28375
|
{
|
|
28241
|
-
style: [
|
|
28242
|
-
|
|
28243
|
-
isDark && styles9.optionTextDark,
|
|
28244
|
-
locale === "pt-BR" && styles9.optionTextActive
|
|
28245
|
-
],
|
|
28246
|
-
children: t.portuguese
|
|
28376
|
+
style: [styles10.sectionTitle, isDark && styles10.sectionTitleDark],
|
|
28377
|
+
children: t.language
|
|
28247
28378
|
}
|
|
28248
|
-
)
|
|
28249
|
-
|
|
28250
|
-
|
|
28251
|
-
|
|
28252
|
-
|
|
28253
|
-
|
|
28254
|
-
|
|
28379
|
+
),
|
|
28380
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsxs)(import_react_native10.View, { style: styles10.optionRow, children: [
|
|
28381
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28382
|
+
import_react_native10.Pressable,
|
|
28383
|
+
{
|
|
28384
|
+
onPress: () => setDocumentState({ locale: "en" }),
|
|
28385
|
+
style: [
|
|
28386
|
+
styles10.optionButton,
|
|
28387
|
+
isDark && styles10.optionButtonDark,
|
|
28388
|
+
locale === "en" && styles10.optionButtonActive,
|
|
28389
|
+
locale === "en" && { backgroundColor: accentColor }
|
|
28390
|
+
],
|
|
28391
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28392
|
+
import_react_native10.Text,
|
|
28393
|
+
{
|
|
28394
|
+
style: [
|
|
28395
|
+
styles10.optionText,
|
|
28396
|
+
isDark && styles10.optionTextDark,
|
|
28397
|
+
locale === "en" && styles10.optionTextActive
|
|
28398
|
+
],
|
|
28399
|
+
children: t.english
|
|
28400
|
+
}
|
|
28401
|
+
)
|
|
28402
|
+
}
|
|
28403
|
+
),
|
|
28404
|
+
/* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28405
|
+
import_react_native10.Pressable,
|
|
28406
|
+
{
|
|
28407
|
+
onPress: () => setDocumentState({ locale: "pt-BR" }),
|
|
28408
|
+
style: [
|
|
28409
|
+
styles10.optionButton,
|
|
28410
|
+
isDark && styles10.optionButtonDark,
|
|
28411
|
+
locale === "pt-BR" && styles10.optionButtonActive,
|
|
28412
|
+
locale === "pt-BR" && { backgroundColor: accentColor }
|
|
28413
|
+
],
|
|
28414
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime11.jsx)(
|
|
28415
|
+
import_react_native10.Text,
|
|
28416
|
+
{
|
|
28417
|
+
style: [
|
|
28418
|
+
styles10.optionText,
|
|
28419
|
+
isDark && styles10.optionTextDark,
|
|
28420
|
+
locale === "pt-BR" && styles10.optionTextActive
|
|
28421
|
+
],
|
|
28422
|
+
children: t.portuguese
|
|
28423
|
+
}
|
|
28424
|
+
)
|
|
28425
|
+
}
|
|
28426
|
+
)
|
|
28427
|
+
] })
|
|
28428
|
+
] })
|
|
28429
|
+
]
|
|
28430
|
+
}
|
|
28431
|
+
)
|
|
28432
|
+
}
|
|
28433
|
+
) });
|
|
28255
28434
|
};
|
|
28256
|
-
var
|
|
28435
|
+
var styles10 = import_react_native10.StyleSheet.create({
|
|
28257
28436
|
modalRoot: {
|
|
28258
|
-
|
|
28259
|
-
|
|
28260
|
-
},
|
|
28261
|
-
backdrop: {
|
|
28262
|
-
...import_react_native9.StyleSheet.absoluteFillObject,
|
|
28263
|
-
backgroundColor: "rgba(0, 0, 0, 0.45)"
|
|
28437
|
+
...import_react_native10.StyleSheet.absoluteFillObject,
|
|
28438
|
+
zIndex: 30
|
|
28264
28439
|
},
|
|
28265
28440
|
sheet: {
|
|
28266
|
-
|
|
28267
|
-
|
|
28268
|
-
|
|
28269
|
-
bottom: 0,
|
|
28441
|
+
flex: 1
|
|
28442
|
+
},
|
|
28443
|
+
sheetContent: {
|
|
28270
28444
|
paddingHorizontal: 18,
|
|
28271
|
-
paddingBottom: 24
|
|
28445
|
+
paddingBottom: 24
|
|
28446
|
+
},
|
|
28447
|
+
sheetBackground: {
|
|
28272
28448
|
backgroundColor: "#ffffff",
|
|
28273
28449
|
borderTopLeftRadius: 24,
|
|
28274
28450
|
borderTopRightRadius: 24,
|
|
@@ -28279,14 +28455,15 @@ var styles9 = import_react_native9.StyleSheet.create({
|
|
|
28279
28455
|
backgroundColor: "#0f1115",
|
|
28280
28456
|
borderTopColor: "#1f2937"
|
|
28281
28457
|
},
|
|
28458
|
+
handleContainer: {
|
|
28459
|
+
paddingTop: 10,
|
|
28460
|
+
paddingBottom: 12
|
|
28461
|
+
},
|
|
28282
28462
|
handle: {
|
|
28283
28463
|
width: 44,
|
|
28284
28464
|
height: 4,
|
|
28285
28465
|
borderRadius: 999,
|
|
28286
|
-
backgroundColor: "#cbd5f5"
|
|
28287
|
-
alignSelf: "center",
|
|
28288
|
-
marginTop: 10,
|
|
28289
|
-
marginBottom: 12
|
|
28466
|
+
backgroundColor: "#cbd5f5"
|
|
28290
28467
|
},
|
|
28291
28468
|
handleDark: {
|
|
28292
28469
|
backgroundColor: "#374151"
|
|
@@ -28416,10 +28593,10 @@ var styles9 = import_react_native9.StyleSheet.create({
|
|
|
28416
28593
|
var SettingsSheet_default = SettingsSheet;
|
|
28417
28594
|
|
|
28418
28595
|
// components/CoverPreview.tsx
|
|
28419
|
-
var
|
|
28420
|
-
var
|
|
28596
|
+
var import_react10 = require("react");
|
|
28597
|
+
var import_react_native11 = require("react-native");
|
|
28421
28598
|
var import_engine_native3 = require("@papyrus-sdk/engine-native");
|
|
28422
|
-
var
|
|
28599
|
+
var import_jsx_runtime12 = require("react/jsx-runtime");
|
|
28423
28600
|
var parseDataUri = (value) => {
|
|
28424
28601
|
const match = /^data:([^;,]+)?(;base64)?,/.exec(value);
|
|
28425
28602
|
if (!match) return null;
|
|
@@ -28467,18 +28644,18 @@ var CoverPreview = ({
|
|
|
28467
28644
|
onLoadEnd,
|
|
28468
28645
|
onError
|
|
28469
28646
|
}) => {
|
|
28470
|
-
const [engine, setEngine] = (0,
|
|
28471
|
-
const [layoutReady, setLayoutReady] = (0,
|
|
28472
|
-
const [loaded, setLoaded] = (0,
|
|
28473
|
-
const [loading, setLoading] = (0,
|
|
28474
|
-
const [error, setError] = (0,
|
|
28475
|
-
const viewRef = (0,
|
|
28476
|
-
const resolvedType = (0,
|
|
28647
|
+
const [engine, setEngine] = (0, import_react10.useState)(null);
|
|
28648
|
+
const [layoutReady, setLayoutReady] = (0, import_react10.useState)(false);
|
|
28649
|
+
const [loaded, setLoaded] = (0, import_react10.useState)(false);
|
|
28650
|
+
const [loading, setLoading] = (0, import_react10.useState)(false);
|
|
28651
|
+
const [error, setError] = (0, import_react10.useState)(null);
|
|
28652
|
+
const viewRef = (0, import_react10.useRef)(null);
|
|
28653
|
+
const resolvedType = (0, import_react10.useMemo)(() => inferDocumentType(source, type), [source, type]);
|
|
28477
28654
|
const isPdf = resolvedType === "pdf";
|
|
28478
|
-
const hasNativePageView = Boolean(
|
|
28655
|
+
const hasNativePageView = Boolean(import_react_native11.UIManager.getViewManagerConfig?.("PapyrusPageView"));
|
|
28479
28656
|
const canRender = !isPdf || hasNativePageView;
|
|
28480
28657
|
const shouldRender = Boolean(visible);
|
|
28481
|
-
(0,
|
|
28658
|
+
(0, import_react10.useEffect)(() => {
|
|
28482
28659
|
if (!shouldRender) {
|
|
28483
28660
|
if (!keepAlive) {
|
|
28484
28661
|
setEngine(null);
|
|
@@ -28491,7 +28668,7 @@ var CoverPreview = ({
|
|
|
28491
28668
|
setEngine(new import_engine_native3.MobileDocumentEngine());
|
|
28492
28669
|
}
|
|
28493
28670
|
}, [shouldRender, keepAlive, engine, canRender]);
|
|
28494
|
-
(0,
|
|
28671
|
+
(0, import_react10.useEffect)(() => {
|
|
28495
28672
|
if (!engine || !shouldRender || !canRender) return;
|
|
28496
28673
|
let active = true;
|
|
28497
28674
|
setLoading(true);
|
|
@@ -28518,13 +28695,13 @@ var CoverPreview = ({
|
|
|
28518
28695
|
active = false;
|
|
28519
28696
|
};
|
|
28520
28697
|
}, [engine, shouldRender, canRender, source, type, pageIndex, isPdf, onLoadStart, onLoadEnd, onError]);
|
|
28521
|
-
(0,
|
|
28698
|
+
(0, import_react10.useEffect)(() => {
|
|
28522
28699
|
if (!engine || !isPdf || !loaded || !layoutReady || !shouldRender || !canRender) return;
|
|
28523
|
-
const viewTag = (0,
|
|
28700
|
+
const viewTag = (0, import_react_native11.findNodeHandle)(viewRef.current);
|
|
28524
28701
|
if (!viewTag) return;
|
|
28525
28702
|
engine.renderPage(pageIndex, viewTag, renderScale);
|
|
28526
28703
|
}, [engine, isPdf, loaded, layoutReady, shouldRender, canRender, pageIndex, renderScale]);
|
|
28527
|
-
(0,
|
|
28704
|
+
(0, import_react10.useEffect)(() => {
|
|
28528
28705
|
return () => {
|
|
28529
28706
|
engine?.destroy();
|
|
28530
28707
|
};
|
|
@@ -28536,15 +28713,15 @@ var CoverPreview = ({
|
|
|
28536
28713
|
}
|
|
28537
28714
|
};
|
|
28538
28715
|
if (!shouldRender || !canRender) {
|
|
28539
|
-
return /* @__PURE__ */ (0,
|
|
28716
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.View, { style: [styles11.container, style], children: placeholder ?? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.View, { style: styles11.placeholder, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.Text, { style: styles11.placeholderText, children: "Preview" }) }) });
|
|
28540
28717
|
}
|
|
28541
|
-
return /* @__PURE__ */ (0,
|
|
28542
|
-
/* @__PURE__ */ (0,
|
|
28543
|
-
showLoading && loading && /* @__PURE__ */ (0,
|
|
28544
|
-
error && /* @__PURE__ */ (0,
|
|
28718
|
+
return /* @__PURE__ */ (0, import_jsx_runtime12.jsxs)(import_react_native11.View, { style: [styles11.container, style], onLayout: handleLayout, children: [
|
|
28719
|
+
/* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.View, { style: styles11.previewFrame, pointerEvents: allowInteraction ? "auto" : "none", children: isPdf ? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_engine_native3.PapyrusPageView, { ref: viewRef, style: styles11.pageView }) : engine && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(WebViewViewer_default, { engine }) }),
|
|
28720
|
+
showLoading && loading && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.View, { pointerEvents: "none", style: styles11.loadingOverlay, children: loadingIndicator ?? /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.ActivityIndicator, { size: "small", color: "#2563eb" }) }),
|
|
28721
|
+
error && /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.View, { pointerEvents: "none", style: styles11.errorOverlay, children: /* @__PURE__ */ (0, import_jsx_runtime12.jsx)(import_react_native11.Text, { style: styles11.errorText, children: "Preview unavailable" }) })
|
|
28545
28722
|
] });
|
|
28546
28723
|
};
|
|
28547
|
-
var
|
|
28724
|
+
var styles11 = import_react_native11.StyleSheet.create({
|
|
28548
28725
|
container: {
|
|
28549
28726
|
backgroundColor: "#f8fafc",
|
|
28550
28727
|
borderRadius: 12,
|
|
@@ -28560,13 +28737,13 @@ var styles10 = import_react_native10.StyleSheet.create({
|
|
|
28560
28737
|
backgroundColor: "transparent"
|
|
28561
28738
|
},
|
|
28562
28739
|
loadingOverlay: {
|
|
28563
|
-
...
|
|
28740
|
+
...import_react_native11.StyleSheet.absoluteFillObject,
|
|
28564
28741
|
alignItems: "center",
|
|
28565
28742
|
justifyContent: "center",
|
|
28566
28743
|
backgroundColor: "rgba(15, 23, 42, 0.15)"
|
|
28567
28744
|
},
|
|
28568
28745
|
errorOverlay: {
|
|
28569
|
-
...
|
|
28746
|
+
...import_react_native11.StyleSheet.absoluteFillObject,
|
|
28570
28747
|
alignItems: "center",
|
|
28571
28748
|
justifyContent: "center",
|
|
28572
28749
|
backgroundColor: "rgba(15, 23, 42, 0.4)"
|
|
@@ -28591,37 +28768,37 @@ var styles10 = import_react_native10.StyleSheet.create({
|
|
|
28591
28768
|
var CoverPreview_default = CoverPreview;
|
|
28592
28769
|
|
|
28593
28770
|
// components/ReadingShell.tsx
|
|
28594
|
-
var
|
|
28595
|
-
var
|
|
28771
|
+
var import_react13 = __toESM(require("react"));
|
|
28772
|
+
var import_react_native18 = require("react-native");
|
|
28596
28773
|
var import_core16 = require("@papyrus-sdk/core");
|
|
28597
28774
|
|
|
28598
28775
|
// components/DocumentActionsSheet.tsx
|
|
28599
|
-
var
|
|
28776
|
+
var import_react_native12 = require("react-native");
|
|
28600
28777
|
var import_core10 = require("@papyrus-sdk/core");
|
|
28601
|
-
var
|
|
28778
|
+
var import_jsx_runtime13 = require("react/jsx-runtime");
|
|
28602
28779
|
function DocumentActionsSheet({
|
|
28603
28780
|
visible,
|
|
28604
28781
|
onClose
|
|
28605
28782
|
}) {
|
|
28606
28783
|
const { uiTheme } = (0, import_core10.useViewerStore)();
|
|
28607
28784
|
const isDark = uiTheme === "dark";
|
|
28608
|
-
return /* @__PURE__ */ (0,
|
|
28609
|
-
|
|
28785
|
+
return /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Modal, { visible, transparent: true, animationType: "fade", onRequestClose: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Pressable, { style: styles12.backdrop, onPress: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(
|
|
28786
|
+
import_react_native12.Pressable,
|
|
28610
28787
|
{
|
|
28611
28788
|
onPress: (event) => event.stopPropagation(),
|
|
28612
|
-
style: [
|
|
28789
|
+
style: [styles12.card, isDark && styles12.cardDark],
|
|
28613
28790
|
children: [
|
|
28614
|
-
/* @__PURE__ */ (0,
|
|
28615
|
-
/* @__PURE__ */ (0,
|
|
28616
|
-
/* @__PURE__ */ (0,
|
|
28617
|
-
/* @__PURE__ */ (0,
|
|
28791
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: [styles12.eyebrow, isDark && styles12.eyebrowDark], children: "Document actions" }),
|
|
28792
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsxs)(import_react_native12.View, { style: styles12.actionList, children: [
|
|
28793
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.View, { style: [styles12.actionItem, isDark && styles12.actionItemDark], children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: [styles12.actionText, isDark && styles12.actionTextDark], children: "Share" }) }),
|
|
28794
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.View, { style: [styles12.actionItem, isDark && styles12.actionItemDark], children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: [styles12.actionText, isDark && styles12.actionTextDark], children: "Export" }) })
|
|
28618
28795
|
] }),
|
|
28619
|
-
/* @__PURE__ */ (0,
|
|
28796
|
+
/* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Pressable, { onPress: onClose, style: styles12.closeButton, accessibilityLabel: "Close actions sheet", children: /* @__PURE__ */ (0, import_jsx_runtime13.jsx)(import_react_native12.Text, { style: styles12.closeText, children: "Close" }) })
|
|
28620
28797
|
]
|
|
28621
28798
|
}
|
|
28622
28799
|
) }) });
|
|
28623
28800
|
}
|
|
28624
|
-
var
|
|
28801
|
+
var styles12 = import_react_native12.StyleSheet.create({
|
|
28625
28802
|
backdrop: {
|
|
28626
28803
|
flex: 1,
|
|
28627
28804
|
backgroundColor: "rgba(15, 23, 42, 0.35)",
|
|
@@ -28682,7 +28859,7 @@ var styles11 = import_react_native11.StyleSheet.create({
|
|
|
28682
28859
|
});
|
|
28683
28860
|
|
|
28684
28861
|
// components/InfoSheet.tsx
|
|
28685
|
-
var
|
|
28862
|
+
var import_react_native13 = require("react-native");
|
|
28686
28863
|
var import_core11 = require("@papyrus-sdk/core");
|
|
28687
28864
|
|
|
28688
28865
|
// components/infoSheetModel.ts
|
|
@@ -28782,7 +28959,7 @@ var buildInfoRows = ({
|
|
|
28782
28959
|
};
|
|
28783
28960
|
|
|
28784
28961
|
// components/InfoSheet.tsx
|
|
28785
|
-
var
|
|
28962
|
+
var import_jsx_runtime14 = require("react/jsx-runtime");
|
|
28786
28963
|
function InfoSheet({
|
|
28787
28964
|
visible,
|
|
28788
28965
|
title,
|
|
@@ -28812,66 +28989,66 @@ function InfoSheet({
|
|
|
28812
28989
|
pageTheme,
|
|
28813
28990
|
locale
|
|
28814
28991
|
});
|
|
28815
|
-
return /* @__PURE__ */ (0,
|
|
28816
|
-
|
|
28992
|
+
return /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
28993
|
+
import_react_native13.Modal,
|
|
28817
28994
|
{
|
|
28818
28995
|
visible,
|
|
28819
28996
|
transparent: true,
|
|
28820
28997
|
animationType: "fade",
|
|
28821
28998
|
onRequestClose: onClose,
|
|
28822
|
-
children: /* @__PURE__ */ (0,
|
|
28823
|
-
|
|
28999
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.Pressable, { style: styles13.backdrop, onPress: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
29000
|
+
import_react_native13.Pressable,
|
|
28824
29001
|
{
|
|
28825
29002
|
onPress: (event) => event.stopPropagation(),
|
|
28826
|
-
style: [
|
|
29003
|
+
style: [styles13.card, isDark && styles13.cardDark],
|
|
28827
29004
|
children: [
|
|
28828
|
-
/* @__PURE__ */ (0,
|
|
28829
|
-
/* @__PURE__ */ (0,
|
|
28830
|
-
|
|
29005
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(import_react_native13.View, { style: styles13.topRow, children: [
|
|
29006
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
29007
|
+
import_react_native13.Pressable,
|
|
28831
29008
|
{
|
|
28832
29009
|
onPress: onClose,
|
|
28833
29010
|
style: [
|
|
28834
|
-
|
|
28835
|
-
isDark &&
|
|
29011
|
+
styles13.iconCloseButton,
|
|
29012
|
+
isDark && styles13.iconCloseButtonDark
|
|
28836
29013
|
],
|
|
28837
29014
|
accessibilityLabel: "Close info sheet",
|
|
28838
|
-
children: /* @__PURE__ */ (0,
|
|
29015
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime14.jsx)(IconClose, { size: 18, color: isDark ? "#f8fafc" : "#111827" })
|
|
28839
29016
|
}
|
|
28840
29017
|
),
|
|
28841
|
-
/* @__PURE__ */ (0,
|
|
28842
|
-
|
|
29018
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
29019
|
+
import_react_native13.Text,
|
|
28843
29020
|
{
|
|
28844
|
-
style: [
|
|
29021
|
+
style: [styles13.headerTitle, isDark && styles13.headerTitleDark],
|
|
28845
29022
|
numberOfLines: 1,
|
|
28846
29023
|
children: locale === "pt-BR" ? "Informa\xE7\xF5es" : "Information"
|
|
28847
29024
|
}
|
|
28848
29025
|
),
|
|
28849
|
-
/* @__PURE__ */ (0,
|
|
29026
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.View, { style: styles13.topRowSpacer })
|
|
28850
29027
|
] }),
|
|
28851
|
-
/* @__PURE__ */ (0,
|
|
28852
|
-
|
|
29028
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
29029
|
+
import_react_native13.ScrollView,
|
|
28853
29030
|
{
|
|
28854
|
-
style:
|
|
28855
|
-
contentContainerStyle:
|
|
29031
|
+
style: styles13.content,
|
|
29032
|
+
contentContainerStyle: styles13.contentInner,
|
|
28856
29033
|
showsVerticalScrollIndicator: false,
|
|
28857
29034
|
children: [
|
|
28858
|
-
/* @__PURE__ */ (0,
|
|
28859
|
-
|
|
29035
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
29036
|
+
import_react_native13.Text,
|
|
28860
29037
|
{
|
|
28861
|
-
style: [
|
|
29038
|
+
style: [styles13.sectionTitle, isDark && styles13.sectionTitleDark],
|
|
28862
29039
|
children: locale === "pt-BR" ? "Informa\xE7\xF5es" : "Information"
|
|
28863
29040
|
}
|
|
28864
29041
|
),
|
|
28865
|
-
/* @__PURE__ */ (0,
|
|
28866
|
-
|
|
29042
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.View, { style: styles13.rows, children: rows.map((row) => /* @__PURE__ */ (0, import_jsx_runtime14.jsxs)(
|
|
29043
|
+
import_react_native13.View,
|
|
28867
29044
|
{
|
|
28868
|
-
style: [
|
|
29045
|
+
style: [styles13.row, isDark && styles13.rowDark],
|
|
28869
29046
|
children: [
|
|
28870
|
-
/* @__PURE__ */ (0,
|
|
28871
|
-
/* @__PURE__ */ (0,
|
|
28872
|
-
|
|
29047
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(import_react_native13.Text, { style: [styles13.label, isDark && styles13.labelDark], children: row.label }),
|
|
29048
|
+
/* @__PURE__ */ (0, import_jsx_runtime14.jsx)(
|
|
29049
|
+
import_react_native13.Text,
|
|
28873
29050
|
{
|
|
28874
|
-
style: [
|
|
29051
|
+
style: [styles13.value, isDark && styles13.valueDark],
|
|
28875
29052
|
selectable: true,
|
|
28876
29053
|
children: row.value
|
|
28877
29054
|
}
|
|
@@ -28889,15 +29066,15 @@ function InfoSheet({
|
|
|
28889
29066
|
}
|
|
28890
29067
|
);
|
|
28891
29068
|
}
|
|
28892
|
-
var
|
|
29069
|
+
var styles13 = import_react_native13.StyleSheet.create({
|
|
28893
29070
|
backdrop: {
|
|
28894
29071
|
flex: 1,
|
|
28895
|
-
backgroundColor: "rgba(
|
|
29072
|
+
backgroundColor: "rgba(0, 0, 0, 0.4)",
|
|
28896
29073
|
justifyContent: "flex-end",
|
|
28897
29074
|
padding: 16
|
|
28898
29075
|
},
|
|
28899
29076
|
card: {
|
|
28900
|
-
borderRadius:
|
|
29077
|
+
borderRadius: 24,
|
|
28901
29078
|
backgroundColor: "#ffffff",
|
|
28902
29079
|
paddingHorizontal: 16,
|
|
28903
29080
|
paddingTop: 16,
|
|
@@ -28906,7 +29083,7 @@ var styles12 = import_react_native12.StyleSheet.create({
|
|
|
28906
29083
|
maxHeight: "88%"
|
|
28907
29084
|
},
|
|
28908
29085
|
cardDark: {
|
|
28909
|
-
backgroundColor: "#
|
|
29086
|
+
backgroundColor: "#0f1115"
|
|
28910
29087
|
},
|
|
28911
29088
|
topRow: {
|
|
28912
29089
|
flexDirection: "row",
|
|
@@ -28927,7 +29104,7 @@ var styles12 = import_react_native12.StyleSheet.create({
|
|
|
28927
29104
|
backgroundColor: "#f1f5f9"
|
|
28928
29105
|
},
|
|
28929
29106
|
iconCloseButtonDark: {
|
|
28930
|
-
backgroundColor: "#
|
|
29107
|
+
backgroundColor: "#111827"
|
|
28931
29108
|
},
|
|
28932
29109
|
headerTitle: {
|
|
28933
29110
|
fontSize: 18,
|
|
@@ -28992,9 +29169,9 @@ var styles12 = import_react_native12.StyleSheet.create({
|
|
|
28992
29169
|
});
|
|
28993
29170
|
|
|
28994
29171
|
// components/OverflowSheet.tsx
|
|
28995
|
-
var
|
|
29172
|
+
var import_react_native14 = require("react-native");
|
|
28996
29173
|
var import_core12 = require("@papyrus-sdk/core");
|
|
28997
|
-
var
|
|
29174
|
+
var import_jsx_runtime15 = require("react/jsx-runtime");
|
|
28998
29175
|
var actionLabels = [{ key: "actions", label: "Document actions" }];
|
|
28999
29176
|
function OverflowSheet({
|
|
29000
29177
|
visible,
|
|
@@ -29006,30 +29183,30 @@ function OverflowSheet({
|
|
|
29006
29183
|
const handlers = {
|
|
29007
29184
|
actions: onOpenActions
|
|
29008
29185
|
};
|
|
29009
|
-
return /* @__PURE__ */ (0,
|
|
29010
|
-
|
|
29186
|
+
return /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
29187
|
+
import_react_native14.Modal,
|
|
29011
29188
|
{
|
|
29012
29189
|
visible,
|
|
29013
29190
|
transparent: true,
|
|
29014
29191
|
animationType: "fade",
|
|
29015
29192
|
onRequestClose: onClose,
|
|
29016
|
-
children: /* @__PURE__ */ (0,
|
|
29017
|
-
|
|
29193
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.Pressable, { style: styles14.backdrop, onPress: onClose, children: /* @__PURE__ */ (0, import_jsx_runtime15.jsxs)(
|
|
29194
|
+
import_react_native14.Pressable,
|
|
29018
29195
|
{
|
|
29019
29196
|
onPress: (event) => event.stopPropagation(),
|
|
29020
|
-
style: [
|
|
29197
|
+
style: [styles14.card, isDark && styles14.cardDark],
|
|
29021
29198
|
children: [
|
|
29022
|
-
/* @__PURE__ */ (0,
|
|
29023
|
-
actionLabels.map((action) => /* @__PURE__ */ (0,
|
|
29024
|
-
|
|
29199
|
+
/* @__PURE__ */ (0, import_jsx_runtime15.jsx)(import_react_native14.View, { style: styles14.handle }),
|
|
29200
|
+
actionLabels.map((action) => /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
29201
|
+
import_react_native14.Pressable,
|
|
29025
29202
|
{
|
|
29026
29203
|
onPress: handlers[action.key],
|
|
29027
|
-
style: [
|
|
29204
|
+
style: [styles14.actionButton, { borderColor: accentColor }],
|
|
29028
29205
|
accessibilityLabel: action.label,
|
|
29029
|
-
children: /* @__PURE__ */ (0,
|
|
29030
|
-
|
|
29206
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime15.jsx)(
|
|
29207
|
+
import_react_native14.Text,
|
|
29031
29208
|
{
|
|
29032
|
-
style: [
|
|
29209
|
+
style: [styles14.actionText, isDark && styles14.actionTextDark],
|
|
29033
29210
|
children: action.label
|
|
29034
29211
|
}
|
|
29035
29212
|
)
|
|
@@ -29042,7 +29219,7 @@ function OverflowSheet({
|
|
|
29042
29219
|
}
|
|
29043
29220
|
);
|
|
29044
29221
|
}
|
|
29045
|
-
var
|
|
29222
|
+
var styles14 = import_react_native14.StyleSheet.create({
|
|
29046
29223
|
backdrop: {
|
|
29047
29224
|
flex: 1,
|
|
29048
29225
|
backgroundColor: "rgba(15, 23, 42, 0.35)",
|
|
@@ -29083,12 +29260,16 @@ var styles13 = import_react_native13.StyleSheet.create({
|
|
|
29083
29260
|
});
|
|
29084
29261
|
|
|
29085
29262
|
// components/ProgressPill.tsx
|
|
29086
|
-
var
|
|
29087
|
-
var
|
|
29263
|
+
var import_react11 = require("react");
|
|
29264
|
+
var import_react_native15 = require("react-native");
|
|
29088
29265
|
var import_core13 = require("@papyrus-sdk/core");
|
|
29089
|
-
var
|
|
29266
|
+
var import_jsx_runtime16 = require("react/jsx-runtime");
|
|
29090
29267
|
var clampPercent = (value) => Math.max(0, Math.min(100, Math.round(value)));
|
|
29091
|
-
function ProgressPill({
|
|
29268
|
+
function ProgressPill({
|
|
29269
|
+
documentType,
|
|
29270
|
+
onPress,
|
|
29271
|
+
onOpenPageJump
|
|
29272
|
+
}) {
|
|
29092
29273
|
const {
|
|
29093
29274
|
currentPage,
|
|
29094
29275
|
pageCount,
|
|
@@ -29098,7 +29279,7 @@ function ProgressPill({ documentType, onPress }) {
|
|
|
29098
29279
|
mobileProgressPillVisible
|
|
29099
29280
|
} = (0, import_core13.useViewerStore)();
|
|
29100
29281
|
const isDark = uiTheme === "dark";
|
|
29101
|
-
const label = (0,
|
|
29282
|
+
const label = (0, import_react11.useMemo)(() => {
|
|
29102
29283
|
const total = Math.max(pageCount, 1);
|
|
29103
29284
|
const percent = clampPercent(currentPage / total * 100);
|
|
29104
29285
|
if (documentType === "pdf") {
|
|
@@ -29110,37 +29291,53 @@ function ProgressPill({ documentType, onPress }) {
|
|
|
29110
29291
|
return `${percent}%`;
|
|
29111
29292
|
}, [currentPage, documentType, pageCount]);
|
|
29112
29293
|
if (!mobileChromeVisible || !mobileProgressPillVisible) return null;
|
|
29113
|
-
return /* @__PURE__ */ (0,
|
|
29114
|
-
|
|
29294
|
+
return /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.View, { pointerEvents: "box-none", style: styles15.frame, children: /* @__PURE__ */ (0, import_jsx_runtime16.jsxs)(
|
|
29295
|
+
import_react_native15.View,
|
|
29115
29296
|
{
|
|
29116
|
-
onPress,
|
|
29117
29297
|
accessibilityLabel: "Open document navigation",
|
|
29118
29298
|
style: [
|
|
29119
|
-
|
|
29120
|
-
isDark &&
|
|
29299
|
+
styles15.pill,
|
|
29300
|
+
isDark && styles15.pillDark,
|
|
29121
29301
|
{ borderColor: `${accentColor}33` }
|
|
29122
29302
|
],
|
|
29123
29303
|
testID: "papyrus-progress-pill",
|
|
29124
29304
|
children: [
|
|
29125
|
-
/* @__PURE__ */ (0,
|
|
29126
|
-
|
|
29305
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
29306
|
+
import_react_native15.Pressable,
|
|
29127
29307
|
{
|
|
29128
|
-
|
|
29129
|
-
|
|
29130
|
-
|
|
29308
|
+
onPress,
|
|
29309
|
+
style: styles15.iconHit,
|
|
29310
|
+
accessibilityLabel: "Open document navigation",
|
|
29311
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
29312
|
+
IconPageNav,
|
|
29313
|
+
{
|
|
29314
|
+
size: 20,
|
|
29315
|
+
color: isDark ? "#f8fafc" : "#111827",
|
|
29316
|
+
strokeWidth: 1.8
|
|
29317
|
+
}
|
|
29318
|
+
)
|
|
29131
29319
|
}
|
|
29132
29320
|
),
|
|
29133
|
-
/* @__PURE__ */ (0,
|
|
29321
|
+
/* @__PURE__ */ (0, import_jsx_runtime16.jsx)(
|
|
29322
|
+
import_react_native15.Pressable,
|
|
29323
|
+
{
|
|
29324
|
+
onPress,
|
|
29325
|
+
onLongPress: onOpenPageJump,
|
|
29326
|
+
style: styles15.labelHit,
|
|
29327
|
+
accessibilityLabel: "Open page jump",
|
|
29328
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime16.jsx)(import_react_native15.Text, { style: [styles15.label, isDark && styles15.labelDark], children: label })
|
|
29329
|
+
}
|
|
29330
|
+
)
|
|
29134
29331
|
]
|
|
29135
29332
|
}
|
|
29136
29333
|
) });
|
|
29137
29334
|
}
|
|
29138
|
-
var
|
|
29335
|
+
var styles15 = import_react_native15.StyleSheet.create({
|
|
29139
29336
|
frame: {
|
|
29140
29337
|
position: "absolute",
|
|
29141
29338
|
top: 72,
|
|
29142
|
-
left:
|
|
29143
|
-
right:
|
|
29339
|
+
left: MOBILE_CHROME_METRICS.screenPadding,
|
|
29340
|
+
right: MOBILE_CHROME_METRICS.screenPadding,
|
|
29144
29341
|
bottom: "auto",
|
|
29145
29342
|
alignItems: "flex-start",
|
|
29146
29343
|
zIndex: 18
|
|
@@ -29162,6 +29359,12 @@ var styles14 = import_react_native14.StyleSheet.create({
|
|
|
29162
29359
|
shadowOffset: { width: 0, height: 8 },
|
|
29163
29360
|
elevation: 6
|
|
29164
29361
|
},
|
|
29362
|
+
iconHit: {
|
|
29363
|
+
borderRadius: 8
|
|
29364
|
+
},
|
|
29365
|
+
labelHit: {
|
|
29366
|
+
borderRadius: 8
|
|
29367
|
+
},
|
|
29165
29368
|
pillDark: {
|
|
29166
29369
|
backgroundColor: "rgba(15,17,21,0.88)"
|
|
29167
29370
|
},
|
|
@@ -29177,10 +29380,10 @@ var styles14 = import_react_native14.StyleSheet.create({
|
|
|
29177
29380
|
});
|
|
29178
29381
|
|
|
29179
29382
|
// components/SearchOverlay.tsx
|
|
29180
|
-
var
|
|
29181
|
-
var
|
|
29383
|
+
var import_react12 = require("react");
|
|
29384
|
+
var import_react_native16 = require("react-native");
|
|
29182
29385
|
var import_core14 = require("@papyrus-sdk/core");
|
|
29183
|
-
var
|
|
29386
|
+
var import_jsx_runtime17 = require("react/jsx-runtime");
|
|
29184
29387
|
function SearchOverlay({
|
|
29185
29388
|
engine,
|
|
29186
29389
|
documentType,
|
|
@@ -29199,14 +29402,14 @@ function SearchOverlay({
|
|
|
29199
29402
|
uiTheme,
|
|
29200
29403
|
accentColor
|
|
29201
29404
|
} = (0, import_core14.useViewerStore)();
|
|
29202
|
-
const [draft, setDraft] = (0,
|
|
29203
|
-
const [isSearching, setIsSearching] = (0,
|
|
29405
|
+
const [draft, setDraft] = (0, import_react12.useState)(searchQuery);
|
|
29406
|
+
const [isSearching, setIsSearching] = (0, import_react12.useState)(false);
|
|
29204
29407
|
const isDark = uiTheme === "dark";
|
|
29205
29408
|
const t = getStrings(locale);
|
|
29206
|
-
const searchService = (0,
|
|
29409
|
+
const searchService = (0, import_react12.useMemo)(() => new import_core14.SearchService(engine), [engine]);
|
|
29207
29410
|
const currentCount = searchResults.length > 0 && activeSearchIndex >= 0 ? activeSearchIndex + 1 : 0;
|
|
29208
29411
|
const targetLabel = documentType === "pdf" ? t.page : documentType === "epub" ? t.contents : t.progress;
|
|
29209
|
-
(0,
|
|
29412
|
+
(0, import_react12.useEffect)(() => {
|
|
29210
29413
|
if (!visible) return;
|
|
29211
29414
|
setDraft(searchQuery);
|
|
29212
29415
|
}, [searchQuery, visible]);
|
|
@@ -29225,27 +29428,27 @@ function SearchOverlay({
|
|
|
29225
29428
|
}
|
|
29226
29429
|
};
|
|
29227
29430
|
const handleClose = () => {
|
|
29228
|
-
|
|
29431
|
+
import_react_native16.Keyboard.dismiss();
|
|
29229
29432
|
onClose();
|
|
29230
29433
|
};
|
|
29231
29434
|
if (!visible) return null;
|
|
29232
|
-
return /* @__PURE__ */ (0,
|
|
29233
|
-
|
|
29435
|
+
return /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.View, { pointerEvents: "box-none", style: styles16.frame, children: /* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(
|
|
29436
|
+
import_react_native16.View,
|
|
29234
29437
|
{
|
|
29235
|
-
style: [
|
|
29438
|
+
style: [styles16.card, isDark && styles16.cardDark],
|
|
29236
29439
|
testID: "papyrus-search-overlay",
|
|
29237
29440
|
children: [
|
|
29238
|
-
/* @__PURE__ */ (0,
|
|
29239
|
-
/* @__PURE__ */ (0,
|
|
29240
|
-
/* @__PURE__ */ (0,
|
|
29241
|
-
/* @__PURE__ */ (0,
|
|
29242
|
-
|
|
29441
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.View, { style: styles16.inputRow, children: [
|
|
29442
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.View, { style: [styles16.searchInputWrap, isDark && styles16.searchInputWrapDark], children: [
|
|
29443
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconSearch, { size: 16, color: isDark ? "#cbd5e1" : "#64748b" }),
|
|
29444
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
29445
|
+
import_react_native16.TextInput,
|
|
29243
29446
|
{
|
|
29244
29447
|
value: draft,
|
|
29245
29448
|
onChangeText: setDraft,
|
|
29246
29449
|
placeholder: t.searchPlaceholder,
|
|
29247
29450
|
placeholderTextColor: isDark ? "#94a3b8" : "#6b7280",
|
|
29248
|
-
style: [
|
|
29451
|
+
style: [styles16.input, isDark && styles16.inputDark],
|
|
29249
29452
|
autoFocus: true,
|
|
29250
29453
|
returnKeyType: "search",
|
|
29251
29454
|
onSubmitEditing: handleSubmit,
|
|
@@ -29253,74 +29456,74 @@ function SearchOverlay({
|
|
|
29253
29456
|
}
|
|
29254
29457
|
)
|
|
29255
29458
|
] }),
|
|
29256
|
-
/* @__PURE__ */ (0,
|
|
29257
|
-
|
|
29459
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
29460
|
+
import_react_native16.Pressable,
|
|
29258
29461
|
{
|
|
29259
29462
|
onPress: handleClose,
|
|
29260
|
-
style: [
|
|
29463
|
+
style: [styles16.closeButton, isDark && styles16.closeButtonDark],
|
|
29261
29464
|
accessibilityLabel: "Close search",
|
|
29262
|
-
children: /* @__PURE__ */ (0,
|
|
29465
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: [styles16.closeText, isDark && styles16.closeTextDark], children: t.cancel })
|
|
29263
29466
|
}
|
|
29264
29467
|
)
|
|
29265
29468
|
] }),
|
|
29266
|
-
/* @__PURE__ */ (0,
|
|
29267
|
-
/* @__PURE__ */ (0,
|
|
29268
|
-
|
|
29469
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.View, { style: styles16.metaRow, children: [
|
|
29470
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
29471
|
+
import_react_native16.Pressable,
|
|
29269
29472
|
{
|
|
29270
29473
|
onPress: prevSearchResult,
|
|
29271
29474
|
disabled: searchResults.length === 0,
|
|
29272
29475
|
style: [
|
|
29273
|
-
|
|
29274
|
-
isDark &&
|
|
29275
|
-
searchResults.length === 0 &&
|
|
29476
|
+
styles16.navButton,
|
|
29477
|
+
isDark && styles16.navButtonDark,
|
|
29478
|
+
searchResults.length === 0 && styles16.navButtonDisabled
|
|
29276
29479
|
],
|
|
29277
29480
|
accessibilityLabel: "Previous result",
|
|
29278
|
-
children: /* @__PURE__ */ (0,
|
|
29481
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconChevronLeft, { size: 16, color: isDark ? "#e5e7eb" : "#111827" })
|
|
29279
29482
|
}
|
|
29280
29483
|
),
|
|
29281
|
-
/* @__PURE__ */ (0,
|
|
29282
|
-
/* @__PURE__ */ (0,
|
|
29283
|
-
|
|
29484
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: [styles16.metaText, isDark && styles16.metaTextDark], children: isSearching ? t.searching : `${currentCount}/${searchResults.length} ${targetLabel}` }),
|
|
29485
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
29486
|
+
import_react_native16.Pressable,
|
|
29284
29487
|
{
|
|
29285
29488
|
onPress: nextSearchResult,
|
|
29286
29489
|
disabled: searchResults.length === 0,
|
|
29287
29490
|
style: [
|
|
29288
|
-
|
|
29289
|
-
isDark &&
|
|
29290
|
-
searchResults.length === 0 &&
|
|
29491
|
+
styles16.navButton,
|
|
29492
|
+
isDark && styles16.navButtonDark,
|
|
29493
|
+
searchResults.length === 0 && styles16.navButtonDisabled
|
|
29291
29494
|
],
|
|
29292
29495
|
accessibilityLabel: "Next result",
|
|
29293
|
-
children: /* @__PURE__ */ (0,
|
|
29496
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(IconChevronRight, { size: 16, color: isDark ? "#e5e7eb" : "#111827" })
|
|
29294
29497
|
}
|
|
29295
29498
|
)
|
|
29296
29499
|
] }),
|
|
29297
|
-
/* @__PURE__ */ (0,
|
|
29298
|
-
/* @__PURE__ */ (0,
|
|
29299
|
-
|
|
29500
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsxs)(import_react_native16.View, { style: styles16.actionsRow, children: [
|
|
29501
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
29502
|
+
import_react_native16.Pressable,
|
|
29300
29503
|
{
|
|
29301
29504
|
onPress: handleSubmit,
|
|
29302
|
-
style: [
|
|
29505
|
+
style: [styles16.primaryAction, { backgroundColor: accentColor }],
|
|
29303
29506
|
accessibilityLabel: "Run search",
|
|
29304
|
-
children: /* @__PURE__ */ (0,
|
|
29507
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(import_react_native16.Text, { style: styles16.primaryActionText, children: t.searchGo })
|
|
29305
29508
|
}
|
|
29306
29509
|
),
|
|
29307
|
-
/* @__PURE__ */ (0,
|
|
29308
|
-
|
|
29510
|
+
/* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
29511
|
+
import_react_native16.Pressable,
|
|
29309
29512
|
{
|
|
29310
29513
|
onPress: onOpenResults,
|
|
29311
29514
|
disabled: searchResults.length === 0,
|
|
29312
29515
|
style: [
|
|
29313
|
-
|
|
29314
|
-
isDark &&
|
|
29315
|
-
searchResults.length === 0 &&
|
|
29516
|
+
styles16.secondaryAction,
|
|
29517
|
+
isDark && styles16.secondaryActionDark,
|
|
29518
|
+
searchResults.length === 0 && styles16.navButtonDisabled
|
|
29316
29519
|
],
|
|
29317
29520
|
accessibilityLabel: "Open all results",
|
|
29318
|
-
children: /* @__PURE__ */ (0,
|
|
29319
|
-
|
|
29521
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime17.jsx)(
|
|
29522
|
+
import_react_native16.Text,
|
|
29320
29523
|
{
|
|
29321
29524
|
style: [
|
|
29322
|
-
|
|
29323
|
-
isDark &&
|
|
29525
|
+
styles16.secondaryActionText,
|
|
29526
|
+
isDark && styles16.secondaryActionTextDark
|
|
29324
29527
|
],
|
|
29325
29528
|
children: t.allResults
|
|
29326
29529
|
}
|
|
@@ -29332,7 +29535,7 @@ function SearchOverlay({
|
|
|
29332
29535
|
}
|
|
29333
29536
|
) });
|
|
29334
29537
|
}
|
|
29335
|
-
var
|
|
29538
|
+
var styles16 = import_react_native16.StyleSheet.create({
|
|
29336
29539
|
frame: {
|
|
29337
29540
|
position: "absolute",
|
|
29338
29541
|
left: 0,
|
|
@@ -29473,9 +29676,9 @@ var styles15 = import_react_native15.StyleSheet.create({
|
|
|
29473
29676
|
});
|
|
29474
29677
|
|
|
29475
29678
|
// components/SearchResultsSheet.tsx
|
|
29476
|
-
var
|
|
29679
|
+
var import_react_native17 = require("react-native");
|
|
29477
29680
|
var import_core15 = require("@papyrus-sdk/core");
|
|
29478
|
-
var
|
|
29681
|
+
var import_jsx_runtime18 = require("react/jsx-runtime");
|
|
29479
29682
|
function SearchResultsSheet({
|
|
29480
29683
|
documentType,
|
|
29481
29684
|
visible,
|
|
@@ -29499,29 +29702,29 @@ function SearchResultsSheet({
|
|
|
29499
29702
|
const percent = pageCount <= 1 ? 100 : Math.round((pageIndex + 1) / pageCount * 100);
|
|
29500
29703
|
return `${t.progress} ${percent}%`;
|
|
29501
29704
|
};
|
|
29502
|
-
return /* @__PURE__ */ (0,
|
|
29503
|
-
|
|
29705
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
29706
|
+
import_react_native17.Modal,
|
|
29504
29707
|
{
|
|
29505
29708
|
visible,
|
|
29506
29709
|
transparent: true,
|
|
29507
29710
|
animationType: "slide",
|
|
29508
29711
|
onRequestClose: onClose,
|
|
29509
|
-
children: /* @__PURE__ */ (0,
|
|
29510
|
-
/* @__PURE__ */ (0,
|
|
29511
|
-
/* @__PURE__ */ (0,
|
|
29512
|
-
/* @__PURE__ */ (0,
|
|
29513
|
-
/* @__PURE__ */ (0,
|
|
29514
|
-
/* @__PURE__ */ (0,
|
|
29515
|
-
/* @__PURE__ */ (0,
|
|
29712
|
+
children: /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native17.View, { style: styles17.modalRoot, children: [
|
|
29713
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Pressable, { style: styles17.backdrop, onPress: onClose }),
|
|
29714
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native17.View, { style: [styles17.sheet, isDark && styles17.sheetDark], children: [
|
|
29715
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.View, { style: [styles17.handle, isDark && styles17.handleDark] }),
|
|
29716
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native17.View, { style: styles17.header, children: [
|
|
29717
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: [styles17.title, isDark && styles17.titleDark], children: t.allResults }),
|
|
29718
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(import_react_native17.Text, { style: [styles17.meta, isDark && styles17.metaDark], children: [
|
|
29516
29719
|
searchResults.length,
|
|
29517
29720
|
" ",
|
|
29518
29721
|
t.results
|
|
29519
29722
|
] })
|
|
29520
29723
|
] }),
|
|
29521
|
-
/* @__PURE__ */ (0,
|
|
29724
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.ScrollView, { contentContainerStyle: styles17.content, children: searchResults.length === 0 ? /* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: [styles17.emptyText, isDark && styles17.emptyTextDark], children: t.noResults }) : searchResults.map((result, index) => {
|
|
29522
29725
|
const isActive = index === activeSearchIndex;
|
|
29523
|
-
return /* @__PURE__ */ (0,
|
|
29524
|
-
|
|
29726
|
+
return /* @__PURE__ */ (0, import_jsx_runtime18.jsxs)(
|
|
29727
|
+
import_react_native17.Pressable,
|
|
29525
29728
|
{
|
|
29526
29729
|
onPress: () => {
|
|
29527
29730
|
setDocumentState({
|
|
@@ -29532,21 +29735,21 @@ function SearchResultsSheet({
|
|
|
29532
29735
|
onClose();
|
|
29533
29736
|
},
|
|
29534
29737
|
style: [
|
|
29535
|
-
|
|
29536
|
-
isDark &&
|
|
29738
|
+
styles17.resultCard,
|
|
29739
|
+
isDark && styles17.resultCardDark,
|
|
29537
29740
|
isActive && {
|
|
29538
29741
|
borderColor: accentColor,
|
|
29539
29742
|
backgroundColor: `${accentColor}14`
|
|
29540
29743
|
}
|
|
29541
29744
|
],
|
|
29542
29745
|
children: [
|
|
29543
|
-
/* @__PURE__ */ (0,
|
|
29544
|
-
/* @__PURE__ */ (0,
|
|
29545
|
-
|
|
29746
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(import_react_native17.Text, { style: [styles17.resultLabel, { color: accentColor }], children: getResultLabel(result.pageIndex) }),
|
|
29747
|
+
/* @__PURE__ */ (0, import_jsx_runtime18.jsx)(
|
|
29748
|
+
import_react_native17.Text,
|
|
29546
29749
|
{
|
|
29547
29750
|
style: [
|
|
29548
|
-
|
|
29549
|
-
isDark &&
|
|
29751
|
+
styles17.resultText,
|
|
29752
|
+
isDark && styles17.resultTextDark
|
|
29550
29753
|
],
|
|
29551
29754
|
children: result.text
|
|
29552
29755
|
}
|
|
@@ -29561,13 +29764,13 @@ function SearchResultsSheet({
|
|
|
29561
29764
|
}
|
|
29562
29765
|
);
|
|
29563
29766
|
}
|
|
29564
|
-
var
|
|
29767
|
+
var styles17 = import_react_native17.StyleSheet.create({
|
|
29565
29768
|
modalRoot: {
|
|
29566
29769
|
flex: 1,
|
|
29567
29770
|
backgroundColor: "transparent"
|
|
29568
29771
|
},
|
|
29569
29772
|
backdrop: {
|
|
29570
|
-
...
|
|
29773
|
+
...import_react_native17.StyleSheet.absoluteFillObject,
|
|
29571
29774
|
backgroundColor: "rgba(0, 0, 0, 0.4)"
|
|
29572
29775
|
},
|
|
29573
29776
|
sheet: {
|
|
@@ -29662,7 +29865,7 @@ var styles16 = import_react_native16.StyleSheet.create({
|
|
|
29662
29865
|
var isSidebarBoundDestination = (destination) => destination === "pages" || destination === "contents" || destination === "progress" || destination === "notes";
|
|
29663
29866
|
|
|
29664
29867
|
// components/ReadingShell.tsx
|
|
29665
|
-
var
|
|
29868
|
+
var import_jsx_runtime19 = require("react/jsx-runtime");
|
|
29666
29869
|
function ReadingShell({
|
|
29667
29870
|
engine,
|
|
29668
29871
|
title,
|
|
@@ -29676,18 +29879,25 @@ function ReadingShell({
|
|
|
29676
29879
|
openMobileDestination,
|
|
29677
29880
|
setDocumentState,
|
|
29678
29881
|
setMobileKeyboardOpen,
|
|
29679
|
-
|
|
29882
|
+
triggerScrollToPage,
|
|
29883
|
+
sidebarRightOpen,
|
|
29884
|
+
currentPage,
|
|
29885
|
+
pageCount,
|
|
29886
|
+
uiTheme,
|
|
29887
|
+
accentColor
|
|
29680
29888
|
} = (0, import_core16.useViewerStore)();
|
|
29681
|
-
const [overflowOpen, setOverflowOpen] = (0,
|
|
29682
|
-
const [infoOpen, setInfoOpen] = (0,
|
|
29683
|
-
const [actionsOpen, setActionsOpen] = (0,
|
|
29684
|
-
const [settingsOpen, setSettingsOpen] = (0,
|
|
29685
|
-
const [searchResultsOpen, setSearchResultsOpen] = (0,
|
|
29686
|
-
|
|
29687
|
-
|
|
29889
|
+
const [overflowOpen, setOverflowOpen] = (0, import_react13.useState)(false);
|
|
29890
|
+
const [infoOpen, setInfoOpen] = (0, import_react13.useState)(false);
|
|
29891
|
+
const [actionsOpen, setActionsOpen] = (0, import_react13.useState)(false);
|
|
29892
|
+
const [settingsOpen, setSettingsOpen] = (0, import_react13.useState)(false);
|
|
29893
|
+
const [searchResultsOpen, setSearchResultsOpen] = (0, import_react13.useState)(false);
|
|
29894
|
+
const [pageJumpOpen, setPageJumpOpen] = (0, import_react13.useState)(false);
|
|
29895
|
+
const isDark = uiTheme === "dark";
|
|
29896
|
+
import_react13.default.useEffect(() => {
|
|
29897
|
+
const showSubscription = import_react_native18.Keyboard.addListener("keyboardDidShow", () => {
|
|
29688
29898
|
setMobileKeyboardOpen(true);
|
|
29689
29899
|
});
|
|
29690
|
-
const hideSubscription =
|
|
29900
|
+
const hideSubscription = import_react_native18.Keyboard.addListener("keyboardDidHide", () => {
|
|
29691
29901
|
setMobileKeyboardOpen(false);
|
|
29692
29902
|
});
|
|
29693
29903
|
return () => {
|
|
@@ -29695,7 +29905,7 @@ function ReadingShell({
|
|
|
29695
29905
|
hideSubscription.remove();
|
|
29696
29906
|
};
|
|
29697
29907
|
}, [setMobileKeyboardOpen]);
|
|
29698
|
-
|
|
29908
|
+
import_react13.default.useEffect(() => {
|
|
29699
29909
|
if (sidebarRightOpen) return;
|
|
29700
29910
|
if (isSidebarBoundDestination(activeMobileDestination)) {
|
|
29701
29911
|
closeMobileDestination();
|
|
@@ -29736,8 +29946,13 @@ function ReadingShell({
|
|
|
29736
29946
|
setActionsOpen(true);
|
|
29737
29947
|
}
|
|
29738
29948
|
};
|
|
29739
|
-
|
|
29740
|
-
|
|
29949
|
+
const navigateToPage = (page) => {
|
|
29950
|
+
engine.goToPage(page);
|
|
29951
|
+
setDocumentState({ currentPage: page });
|
|
29952
|
+
triggerScrollToPage(page - 1);
|
|
29953
|
+
};
|
|
29954
|
+
return /* @__PURE__ */ (0, import_jsx_runtime19.jsxs)(import_react_native18.View, { style: styles18.container, testID: "papyrus-rn-reading-shell", children: [
|
|
29955
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
29741
29956
|
Topbar_default,
|
|
29742
29957
|
{
|
|
29743
29958
|
engine,
|
|
@@ -29749,20 +29964,22 @@ function ReadingShell({
|
|
|
29749
29964
|
setSettingsOpen(false);
|
|
29750
29965
|
setOverflowOpen(true);
|
|
29751
29966
|
},
|
|
29967
|
+
onOpenPageJump: () => setPageJumpOpen(true),
|
|
29752
29968
|
showPageNavigationControls: false
|
|
29753
29969
|
}
|
|
29754
29970
|
),
|
|
29755
|
-
/* @__PURE__ */ (0,
|
|
29756
|
-
/* @__PURE__ */ (0,
|
|
29971
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(import_react_native18.View, { style: styles18.viewerStage, children: /* @__PURE__ */ (0, import_jsx_runtime19.jsx)(Viewer_default, { engine, ...viewerProps }) }),
|
|
29972
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
29757
29973
|
ProgressPill,
|
|
29758
29974
|
{
|
|
29759
29975
|
documentType,
|
|
29760
29976
|
onPress: () => openDestination(
|
|
29761
29977
|
documentType === "pdf" ? "pages" : documentType === "epub" ? "contents" : "progress"
|
|
29762
|
-
)
|
|
29978
|
+
),
|
|
29979
|
+
onOpenPageJump: () => setPageJumpOpen(true)
|
|
29763
29980
|
}
|
|
29764
29981
|
),
|
|
29765
|
-
/* @__PURE__ */ (0,
|
|
29982
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
29766
29983
|
BottomBar_default,
|
|
29767
29984
|
{
|
|
29768
29985
|
documentType,
|
|
@@ -29771,7 +29988,7 @@ function ReadingShell({
|
|
|
29771
29988
|
onOpenSettings: () => openDestination("display")
|
|
29772
29989
|
}
|
|
29773
29990
|
),
|
|
29774
|
-
/* @__PURE__ */ (0,
|
|
29991
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
29775
29992
|
SearchOverlay,
|
|
29776
29993
|
{
|
|
29777
29994
|
engine,
|
|
@@ -29784,7 +30001,7 @@ function ReadingShell({
|
|
|
29784
30001
|
onOpenResults: () => setSearchResultsOpen(true)
|
|
29785
30002
|
}
|
|
29786
30003
|
),
|
|
29787
|
-
/* @__PURE__ */ (0,
|
|
30004
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
29788
30005
|
SearchResultsSheet,
|
|
29789
30006
|
{
|
|
29790
30007
|
documentType,
|
|
@@ -29792,15 +30009,16 @@ function ReadingShell({
|
|
|
29792
30009
|
onClose: () => setSearchResultsOpen(false)
|
|
29793
30010
|
}
|
|
29794
30011
|
),
|
|
29795
|
-
/* @__PURE__ */ (0,
|
|
30012
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
29796
30013
|
RightSheet_default,
|
|
29797
30014
|
{
|
|
29798
30015
|
engine,
|
|
29799
30016
|
documentType,
|
|
29800
|
-
thumbsInitialCount
|
|
30017
|
+
thumbsInitialCount,
|
|
30018
|
+
onOpenPageJump: () => setPageJumpOpen(true)
|
|
29801
30019
|
}
|
|
29802
30020
|
),
|
|
29803
|
-
/* @__PURE__ */ (0,
|
|
30021
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
29804
30022
|
OverflowSheet,
|
|
29805
30023
|
{
|
|
29806
30024
|
visible: overflowOpen,
|
|
@@ -29814,7 +30032,7 @@ function ReadingShell({
|
|
|
29814
30032
|
}
|
|
29815
30033
|
}
|
|
29816
30034
|
),
|
|
29817
|
-
/* @__PURE__ */ (0,
|
|
30035
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
29818
30036
|
InfoSheet,
|
|
29819
30037
|
{
|
|
29820
30038
|
visible: infoOpen,
|
|
@@ -29826,7 +30044,7 @@ function ReadingShell({
|
|
|
29826
30044
|
}
|
|
29827
30045
|
}
|
|
29828
30046
|
),
|
|
29829
|
-
/* @__PURE__ */ (0,
|
|
30047
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
29830
30048
|
DocumentActionsSheet,
|
|
29831
30049
|
{
|
|
29832
30050
|
visible: actionsOpen,
|
|
@@ -29836,7 +30054,7 @@ function ReadingShell({
|
|
|
29836
30054
|
}
|
|
29837
30055
|
}
|
|
29838
30056
|
),
|
|
29839
|
-
/* @__PURE__ */ (0,
|
|
30057
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
29840
30058
|
SettingsSheet_default,
|
|
29841
30059
|
{
|
|
29842
30060
|
engine,
|
|
@@ -29846,10 +30064,22 @@ function ReadingShell({
|
|
|
29846
30064
|
closeMobileDestination();
|
|
29847
30065
|
}
|
|
29848
30066
|
}
|
|
30067
|
+
),
|
|
30068
|
+
/* @__PURE__ */ (0, import_jsx_runtime19.jsx)(
|
|
30069
|
+
PageJumpModal,
|
|
30070
|
+
{
|
|
30071
|
+
visible: pageJumpOpen,
|
|
30072
|
+
currentPage,
|
|
30073
|
+
pageCount,
|
|
30074
|
+
isDark,
|
|
30075
|
+
accentColor,
|
|
30076
|
+
onClose: () => setPageJumpOpen(false),
|
|
30077
|
+
onConfirm: navigateToPage
|
|
30078
|
+
}
|
|
29849
30079
|
)
|
|
29850
30080
|
] });
|
|
29851
30081
|
}
|
|
29852
|
-
var
|
|
30082
|
+
var styles18 = import_react_native18.StyleSheet.create({
|
|
29853
30083
|
container: {
|
|
29854
30084
|
flex: 1
|
|
29855
30085
|
},
|
|
@@ -29865,6 +30095,7 @@ var styles17 = import_react_native17.StyleSheet.create({
|
|
|
29865
30095
|
CoverPreview,
|
|
29866
30096
|
DocumentActionsSheet,
|
|
29867
30097
|
InfoSheet,
|
|
30098
|
+
MOBILE_CHROME_METRICS,
|
|
29868
30099
|
OverflowSheet,
|
|
29869
30100
|
PageRenderer,
|
|
29870
30101
|
ProgressPill,
|