feat(pdf): move ebook reader to embedpdf, add bookmarks, remove old pdf.js stuff (#393)

* feat(pdf): move ebook reader to embedpdf, add bookmarks, remove old pdf.js stuff

* feat(pdf): add page number support for bookmarks and enhance mobile navigation

* feat(pdf): implement document ID tracking for search functionality

* feat(pdf): add page number column to book marks and update unique index

* feat(pdf): enhance annotation handling and improve search result scrolling

* feat(pdf): improve layout handling and enhance resize observer functionality

* feat(pdf): improve document viewer initialization and improve close button styling

* fix(pdf): remove 'form' from disabled categories

* feat(pdf): add pan mode functionality and enhance sidebar layout

* feat(pdf): improve book viewer initialization with enhanced element detection

* feat(pdf): add link handling to text selection and improve popup actions

* feat(pdf): enhance link detection and improve selection handling in event service

* feat(pdf): improve accessibility and improve resource management in PDF viewer

* feat(pdf): add resize observer for improved layout handling

* feat(pdf): error handling and improve navigation in PDF reader
This commit is contained in:
brios
2026-04-22 17:27:07 -04:00
committed by Zach Yale
parent e3b22ed9c6
commit 6c8a907325
29 changed files with 3681 additions and 724 deletions
@@ -6,7 +6,7 @@ import {ReaderIconComponent} from './icon.component';
export type AnnotationStyle = 'highlight' | 'underline' | 'strikethrough' | 'squiggly';
export interface TextSelectionAction {
type: 'select' | 'annotate' | 'delete' | 'dismiss' | 'preview' | 'search' | 'note';
type: 'select' | 'annotate' | 'delete' | 'dismiss' | 'preview' | 'search' | 'note' | 'go-to-link';
color?: string;
style?: AnnotationStyle;
annotationId?: number;
@@ -37,6 +37,7 @@ export class TextSelectionPopupComponent {
@Input() showBelow = false;
@Input() overlappingAnnotationId: number | null = null;
@Input() selectedText = '';
@Input() linkUrl?: string;
@Output() action = new EventEmitter<TextSelectionAction>();
showAnnotationOptions = false;
@@ -122,6 +123,12 @@ export class TextSelectionPopupComponent {
this.hasPreview = false;
}
onGoToLink(): void {
if (this.linkUrl) {
this.action.emit({type: 'go-to-link'});
}
}
onNote(): void {
this.action.emit({type: 'note'});
this.showAnnotationOptions = false;