@papyrus-sdk/ui-react-native 0.2.34 → 0.2.35-beta.0
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/LICENSE +21 -0
- package/dist/index.d.mts +21 -3
- package/dist/index.d.ts +21 -3
- package/dist/index.js +1708 -1232
- package/dist/index.js.map +1 -1
- package/dist/index.mjs +1696 -1220
- package/dist/index.mjs.map +1 -1
- package/package.json +10 -10
package/LICENSE
ADDED
|
@@ -0,0 +1,21 @@
|
|
|
1
|
+
MIT License
|
|
2
|
+
|
|
3
|
+
Copyright (c) 2025 Papyrus Contributors
|
|
4
|
+
|
|
5
|
+
Permission is hereby granted, free of charge, to any person obtaining a copy
|
|
6
|
+
of this software and associated documentation files (the "Software"), to deal
|
|
7
|
+
in the Software without restriction, including without limitation the rights
|
|
8
|
+
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|
9
|
+
copies of the Software, and to permit persons to whom the Software is
|
|
10
|
+
furnished to do so, subject to the following conditions:
|
|
11
|
+
|
|
12
|
+
The above copyright notice and this permission notice shall be included in all
|
|
13
|
+
copies or substantial portions of the Software.
|
|
14
|
+
|
|
15
|
+
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
16
|
+
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
|
17
|
+
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
|
18
|
+
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
|
19
|
+
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
|
20
|
+
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
|
21
|
+
SOFTWARE.
|
package/dist/index.d.mts
CHANGED
|
@@ -20,6 +20,16 @@ interface ViewerProps {
|
|
|
20
20
|
useDedicatedAndroidPdfViewer?: boolean;
|
|
21
21
|
viewerMode?: PdfViewerMode;
|
|
22
22
|
pageScrubActive?: boolean;
|
|
23
|
+
/** Called when the native iOS PDF viewer selects non-empty text. */
|
|
24
|
+
onTextSelected?: (payload: {
|
|
25
|
+
text: string;
|
|
26
|
+
pageIndex: number;
|
|
27
|
+
}) => void;
|
|
28
|
+
/** Called when the reader's Define action is pressed for the current selection. */
|
|
29
|
+
onDefineSelection?: (payload: {
|
|
30
|
+
text: string;
|
|
31
|
+
pageIndex: number;
|
|
32
|
+
}) => void;
|
|
23
33
|
}
|
|
24
34
|
declare const Viewer: React.FC<ViewerProps>;
|
|
25
35
|
|
|
@@ -141,11 +151,19 @@ type ReadingShellProps = {
|
|
|
141
151
|
};
|
|
142
152
|
declare function ReadingShell({ engine, title, documentType, thumbsInitialCount, viewerProps, }: ReadingShellProps): react_jsx_runtime.JSX.Element;
|
|
143
153
|
|
|
144
|
-
type
|
|
154
|
+
type NativePdfDocumentViewerProps = {
|
|
145
155
|
engine: DocumentEngine;
|
|
146
156
|
maxPageWidth?: number;
|
|
157
|
+
onTextSelected?: (payload: {
|
|
158
|
+
text: string;
|
|
159
|
+
pageIndex: number;
|
|
160
|
+
}) => void;
|
|
161
|
+
onDefineSelection?: (payload: {
|
|
162
|
+
text: string;
|
|
163
|
+
pageIndex: number;
|
|
164
|
+
}) => void;
|
|
147
165
|
};
|
|
148
|
-
declare function
|
|
166
|
+
declare function NativePdfDocumentViewer({ engine, maxPageWidth, onTextSelected, onDefineSelection, }: NativePdfDocumentViewerProps): react_jsx_runtime.JSX.Element;
|
|
149
167
|
|
|
150
168
|
type OverflowSheetProps = {
|
|
151
169
|
visible: boolean;
|
|
@@ -227,4 +245,4 @@ declare const IconUnderline: React.FC<IconProps>;
|
|
|
227
245
|
declare const IconMessageSquareQuote: React.FC<IconProps>;
|
|
228
246
|
declare const IconQuote: React.FC<IconProps>;
|
|
229
247
|
|
|
230
|
-
export { AnnotationEditor, BottomBar, CoverPreview, DocumentActionsSheet, IconCopy, IconMessageSquareQuote, IconPageNav, IconPencilLine, IconQuote, IconUnderline, InfoSheet, MOBILE_CHROME_METRICS, MobilePerfProvider,
|
|
248
|
+
export { AnnotationEditor, BottomBar, CoverPreview, DocumentActionsSheet, IconCopy, IconMessageSquareQuote, IconPageNav, IconPencilLine, IconQuote, IconUnderline, InfoSheet, MOBILE_CHROME_METRICS, MobilePerfProvider, NativePdfDocumentViewer, OverflowSheet, _default as PageRenderer, ProgressPill, ReadingShell, RightSheet, SearchOverlay, SearchResultsSheet, SettingsSheet, ToolDock, Topbar, Viewer, type ViewerProps, createPerfSession, createRunId, useMobilePerf };
|
package/dist/index.d.ts
CHANGED
|
@@ -20,6 +20,16 @@ interface ViewerProps {
|
|
|
20
20
|
useDedicatedAndroidPdfViewer?: boolean;
|
|
21
21
|
viewerMode?: PdfViewerMode;
|
|
22
22
|
pageScrubActive?: boolean;
|
|
23
|
+
/** Called when the native iOS PDF viewer selects non-empty text. */
|
|
24
|
+
onTextSelected?: (payload: {
|
|
25
|
+
text: string;
|
|
26
|
+
pageIndex: number;
|
|
27
|
+
}) => void;
|
|
28
|
+
/** Called when the reader's Define action is pressed for the current selection. */
|
|
29
|
+
onDefineSelection?: (payload: {
|
|
30
|
+
text: string;
|
|
31
|
+
pageIndex: number;
|
|
32
|
+
}) => void;
|
|
23
33
|
}
|
|
24
34
|
declare const Viewer: React.FC<ViewerProps>;
|
|
25
35
|
|
|
@@ -141,11 +151,19 @@ type ReadingShellProps = {
|
|
|
141
151
|
};
|
|
142
152
|
declare function ReadingShell({ engine, title, documentType, thumbsInitialCount, viewerProps, }: ReadingShellProps): react_jsx_runtime.JSX.Element;
|
|
143
153
|
|
|
144
|
-
type
|
|
154
|
+
type NativePdfDocumentViewerProps = {
|
|
145
155
|
engine: DocumentEngine;
|
|
146
156
|
maxPageWidth?: number;
|
|
157
|
+
onTextSelected?: (payload: {
|
|
158
|
+
text: string;
|
|
159
|
+
pageIndex: number;
|
|
160
|
+
}) => void;
|
|
161
|
+
onDefineSelection?: (payload: {
|
|
162
|
+
text: string;
|
|
163
|
+
pageIndex: number;
|
|
164
|
+
}) => void;
|
|
147
165
|
};
|
|
148
|
-
declare function
|
|
166
|
+
declare function NativePdfDocumentViewer({ engine, maxPageWidth, onTextSelected, onDefineSelection, }: NativePdfDocumentViewerProps): react_jsx_runtime.JSX.Element;
|
|
149
167
|
|
|
150
168
|
type OverflowSheetProps = {
|
|
151
169
|
visible: boolean;
|
|
@@ -227,4 +245,4 @@ declare const IconUnderline: React.FC<IconProps>;
|
|
|
227
245
|
declare const IconMessageSquareQuote: React.FC<IconProps>;
|
|
228
246
|
declare const IconQuote: React.FC<IconProps>;
|
|
229
247
|
|
|
230
|
-
export { AnnotationEditor, BottomBar, CoverPreview, DocumentActionsSheet, IconCopy, IconMessageSquareQuote, IconPageNav, IconPencilLine, IconQuote, IconUnderline, InfoSheet, MOBILE_CHROME_METRICS, MobilePerfProvider,
|
|
248
|
+
export { AnnotationEditor, BottomBar, CoverPreview, DocumentActionsSheet, IconCopy, IconMessageSquareQuote, IconPageNav, IconPencilLine, IconQuote, IconUnderline, InfoSheet, MOBILE_CHROME_METRICS, MobilePerfProvider, NativePdfDocumentViewer, OverflowSheet, _default as PageRenderer, ProgressPill, ReadingShell, RightSheet, SearchOverlay, SearchResultsSheet, SettingsSheet, ToolDock, Topbar, Viewer, type ViewerProps, createPerfSession, createRunId, useMobilePerf };
|