@anaralabs/lector 3.5.14 → 3.7.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/dist/_tsup-dts-rollup.d.ts +11 -12
- package/dist/index.js +562 -273
- package/package.json +101 -109
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ComponentPropsWithoutRef } from 'react';
|
|
2
|
-
import { Context } from 'react';
|
|
3
2
|
import type { DocumentInitParameters } from 'pdfjs-dist/types/src/display/api';
|
|
4
3
|
import { ForwardRefExoticComponent } from 'react';
|
|
5
4
|
import { FunctionComponent } from 'react';
|
|
@@ -10,7 +9,7 @@ import type { JSX as JSX_2 } from 'react';
|
|
|
10
9
|
import type { PageViewport } from 'pdfjs-dist';
|
|
11
10
|
import { PDFDocumentProxy } from 'pdfjs-dist';
|
|
12
11
|
import type { PDFPageProxy } from 'pdfjs-dist';
|
|
13
|
-
import { default as React_2 } from 'react';
|
|
12
|
+
import type { default as React_2 } from 'react';
|
|
14
13
|
import { ReactElement } from 'react';
|
|
15
14
|
import { ReactNode } from 'react';
|
|
16
15
|
import { RefAttributes } from 'react';
|
|
@@ -19,7 +18,7 @@ import type { TypedArray } from 'pdfjs-dist/types/src/display/api';
|
|
|
19
18
|
import { UseBoundStore } from 'zustand';
|
|
20
19
|
import { useFloating } from '@floating-ui/react';
|
|
21
20
|
import { useInteractions } from '@floating-ui/react';
|
|
22
|
-
import { Virtualizer } from '@tanstack/react-virtual';
|
|
21
|
+
import type { Virtualizer } from '@tanstack/react-virtual';
|
|
23
22
|
|
|
24
23
|
declare interface Annotation {
|
|
25
24
|
id: string;
|
|
@@ -55,7 +54,7 @@ declare interface AnnotationHighlightLayerProps {
|
|
|
55
54
|
tooltipClassName?: string;
|
|
56
55
|
hoverTooltipClassName?: string;
|
|
57
56
|
highlightClassName?: string;
|
|
58
|
-
commentIconPosition?:
|
|
57
|
+
commentIconPosition?: "highlight" | "page";
|
|
59
58
|
underlineClassName?: string;
|
|
60
59
|
commentIconClassName?: string;
|
|
61
60
|
}
|
|
@@ -86,7 +85,7 @@ declare interface AnnotationLayerParams {
|
|
|
86
85
|
* See usePdfJump hook for available options.
|
|
87
86
|
* @default { behavior: "smooth", align: "start" }
|
|
88
87
|
*/
|
|
89
|
-
jumpOptions?: Parameters<ReturnType<typeof usePdfJump>[
|
|
88
|
+
jumpOptions?: Parameters<ReturnType<typeof usePdfJump>["jumpToPage"]>[1];
|
|
90
89
|
}
|
|
91
90
|
|
|
92
91
|
declare interface AnnotationState {
|
|
@@ -102,7 +101,7 @@ export declare const AnnotationTooltip: ({ annotation, children, renderTooltipCo
|
|
|
102
101
|
export declare type AnnotationTooltipContentProps = {
|
|
103
102
|
annotation: Annotation;
|
|
104
103
|
onClose: () => void;
|
|
105
|
-
setPosition?: (position:
|
|
104
|
+
setPosition?: (position: "top" | "bottom" | undefined) => void;
|
|
106
105
|
};
|
|
107
106
|
|
|
108
107
|
declare interface AnnotationTooltipProps {
|
|
@@ -203,6 +202,7 @@ declare type HighlightRect = {
|
|
|
203
202
|
height: number;
|
|
204
203
|
width: number;
|
|
205
204
|
type?: "pixels" | "percent";
|
|
205
|
+
style?: (rect: HighlightRect) => React_2.CSSProperties;
|
|
206
206
|
};
|
|
207
207
|
export { HighlightRect }
|
|
208
208
|
export { HighlightRect as HighlightRect_alias_1 }
|
|
@@ -231,7 +231,6 @@ export declare class LinkService implements IPDFLinkService {
|
|
|
231
231
|
_currentPageNumber: number;
|
|
232
232
|
_pageNavigationCallback?: (pageNumber: number) => void;
|
|
233
233
|
get pdfDocumentProxy(): PDFDocumentProxy;
|
|
234
|
-
constructor();
|
|
235
234
|
get pagesCount(): number;
|
|
236
235
|
get page(): number;
|
|
237
236
|
set page(value: number);
|
|
@@ -244,8 +243,8 @@ export declare class LinkService implements IPDFLinkService {
|
|
|
244
243
|
executeNamedAction(): void;
|
|
245
244
|
navigateTo(dest: string | unknown[] | Promise<unknown[]>): void;
|
|
246
245
|
get rotation(): number;
|
|
247
|
-
set rotation(
|
|
248
|
-
goToPage(
|
|
246
|
+
set rotation(_value: number);
|
|
247
|
+
goToPage(_page_valuer: number): void;
|
|
249
248
|
setHash(hash: string): void;
|
|
250
249
|
executeSetOCGState(): void;
|
|
251
250
|
registerPageNavigationCallback(callback: (pageNumber: number) => void): void;
|
|
@@ -299,7 +298,7 @@ declare interface PDFState {
|
|
|
299
298
|
currentPage: number;
|
|
300
299
|
setCurrentPage: (pageNumber: number) => void;
|
|
301
300
|
viewports: Array<PageViewport>;
|
|
302
|
-
viewportRef:
|
|
301
|
+
viewportRef: React_2.MutableRefObject<HTMLDivElement | null>;
|
|
303
302
|
pageProxies: PDFPageProxy[];
|
|
304
303
|
textContent: TextContent[];
|
|
305
304
|
setTextContent: (textContents: TextContent[]) => void;
|
|
@@ -318,9 +317,9 @@ declare interface PDFState {
|
|
|
318
317
|
|
|
319
318
|
export declare const PDFStore: {
|
|
320
319
|
useContext: () => StoreApi<PDFState>;
|
|
321
|
-
Context: Context<StoreApi<PDFState>>;
|
|
320
|
+
Context: React_2.Context<StoreApi<PDFState>>;
|
|
322
321
|
Provider: (props: {
|
|
323
|
-
children?:
|
|
322
|
+
children?: React_2.ReactNode;
|
|
324
323
|
initialValue: InitialPDFState;
|
|
325
324
|
}) => JSX.Element;
|
|
326
325
|
};
|