@embedpdf-editor/chapter-snippet 0.3.1 → 0.3.3
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/embedpdf-chapter.d.ts +16 -0
- package/dist/embedpdf-chapter.js +1641 -1510
- package/dist/embedpdf-chapter.js.map +1 -1
- package/package.json +6 -6
|
@@ -320,6 +320,7 @@ export { ChapterViewerCatalog }
|
|
|
320
320
|
export declare type ChapterViewerConfig = {
|
|
321
321
|
markup?: boolean | {
|
|
322
322
|
styles?: MarkupStylesConfig;
|
|
323
|
+
annotationMenu?: MarkupAnnotationMenuConfig;
|
|
323
324
|
};
|
|
324
325
|
bookmarks?: boolean | {
|
|
325
326
|
marker?: BookmarkMarkerUiConfig;
|
|
@@ -341,6 +342,7 @@ export declare interface ChapterViewerFeaturesConfig {
|
|
|
341
342
|
markup?: {
|
|
342
343
|
enabled?: boolean;
|
|
343
344
|
styles?: MarkupStylesConfig;
|
|
345
|
+
annotationMenu?: MarkupAnnotationMenuConfig;
|
|
344
346
|
};
|
|
345
347
|
/** 段落书签(含悬停添加) */
|
|
346
348
|
bookmarks?: {
|
|
@@ -596,6 +598,20 @@ declare interface IPasswordProvider {
|
|
|
596
598
|
getCachedPassword?(chapterId: string): string | null;
|
|
597
599
|
}
|
|
598
600
|
|
|
601
|
+
declare interface MarkupAnnotationMenuActionCtx {
|
|
602
|
+
pageIndex: number;
|
|
603
|
+
annotationId: string;
|
|
604
|
+
onDelete: () => void;
|
|
605
|
+
}
|
|
606
|
+
|
|
607
|
+
/** 点击已创建的划线标注时,选区菜单(删除等) */
|
|
608
|
+
declare interface MarkupAnnotationMenuConfig {
|
|
609
|
+
/** 是否显示默认删除按钮,默认 true */
|
|
610
|
+
enabled?: boolean;
|
|
611
|
+
/** 完全自定义菜单;不提供则显示默认「删除」按钮 */
|
|
612
|
+
renderMenu?: (ctx: MarkupAnnotationMenuActionCtx) => unknown;
|
|
613
|
+
}
|
|
614
|
+
|
|
599
615
|
/** 单种划线的样式(颜色、粗细、垂直偏移,PDF 点) */
|
|
600
616
|
declare interface MarkupKindStyle {
|
|
601
617
|
/** 描边/填充色,如 #facc15 */
|