bok-reader 0.7.1 → 0.8.2
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/bok.es.js +3666 -3451
- package/dist/bok.umd.js +25 -25
- package/dist/components/BokReader/BokReader.d.ts +4 -0
- package/dist/components/Book.d.ts +4 -0
- package/dist/components/HighlightNoteModal/HighlightNoteModal.d.ts +10 -0
- package/dist/components/HighlightsMenu/HighlightsMenu.d.ts +1 -0
- package/dist/hooks/useEpub.d.ts +1 -0
- package/dist/main.css +1 -1
- package/package.json +1 -1
|
@@ -35,6 +35,10 @@ export type BokReaderSyncEvent = (BokReaderSyncEventBase & {
|
|
|
35
35
|
type: "highlight.updateColor";
|
|
36
36
|
highlightId: string;
|
|
37
37
|
color: Highlight["color"];
|
|
38
|
+
}) | (BokReaderSyncEventBase & {
|
|
39
|
+
type: "highlight.updateNote";
|
|
40
|
+
highlightId: string;
|
|
41
|
+
note?: string;
|
|
38
42
|
});
|
|
39
43
|
export type BokReaderSyncConflictEntity = "progress" | "highlights";
|
|
40
44
|
export interface BokReaderSyncConflict {
|
|
@@ -13,9 +13,11 @@ export type Highlight = {
|
|
|
13
13
|
end: number;
|
|
14
14
|
color: HighlightColor;
|
|
15
15
|
text?: string;
|
|
16
|
+
note?: string;
|
|
16
17
|
};
|
|
17
18
|
interface PageProps {
|
|
18
19
|
content: string;
|
|
20
|
+
contentLanguage: string;
|
|
19
21
|
title: string;
|
|
20
22
|
bookId: string;
|
|
21
23
|
setIsLoading: Dispatch<SetStateAction<boolean>>;
|
|
@@ -34,6 +36,8 @@ interface PageProps {
|
|
|
34
36
|
onAddHighlight: (highlight: Highlight) => void;
|
|
35
37
|
onRemoveHighlight: (id: string) => void;
|
|
36
38
|
onUpdateHighlightColor: (id: string, color: HighlightColor) => void;
|
|
39
|
+
onRequestHighlightNote: (id: string) => void;
|
|
40
|
+
isHighlightNoteModalVisible: boolean;
|
|
37
41
|
}
|
|
38
42
|
declare const Book: React.ForwardRefExoticComponent<PageProps & React.RefAttributes<BookHandle>>;
|
|
39
43
|
export default Book;
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { default as React } from 'react';
|
|
2
|
+
interface HighlightNoteModalProps {
|
|
3
|
+
isOpen: boolean;
|
|
4
|
+
initialNote?: string;
|
|
5
|
+
highlightText?: string;
|
|
6
|
+
onClose: () => void;
|
|
7
|
+
onSave: (note: string) => void;
|
|
8
|
+
}
|
|
9
|
+
declare const HighlightNoteModal: React.FC<HighlightNoteModalProps>;
|
|
10
|
+
export default HighlightNoteModal;
|
|
@@ -6,6 +6,7 @@ interface HighlightsMenuProps {
|
|
|
6
6
|
onGoToPage: (page: number) => void;
|
|
7
7
|
onRemoveHighlight: (id: string) => void;
|
|
8
8
|
onUpdateHighlightColor: (id: string, color: HighlightColor) => void;
|
|
9
|
+
onRequestHighlightNote: (id: string) => void;
|
|
9
10
|
}
|
|
10
11
|
declare const HighlightsMenu: React.FC<HighlightsMenuProps>;
|
|
11
12
|
export default HighlightsMenu;
|