@embedpdf-editor/vue3-chapter-viewer 0.3.2 → 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/index.d.ts CHANGED
@@ -341,6 +341,7 @@ export { ChapterViewerCatalog }
341
341
  export declare type ChapterViewerConfig = {
342
342
  markup?: boolean | {
343
343
  styles?: MarkupStylesConfig;
344
+ annotationMenu?: MarkupAnnotationMenuConfig;
344
345
  };
345
346
  bookmarks?: boolean | {
346
347
  marker?: BookmarkMarkerUiConfig;
@@ -360,6 +361,7 @@ export declare interface ChapterViewerFeaturesConfig {
360
361
  markup?: {
361
362
  enabled?: boolean;
362
363
  styles?: MarkupStylesConfig;
364
+ annotationMenu?: MarkupAnnotationMenuConfig;
363
365
  };
364
366
  /** 段落书签(含悬停添加) */
365
367
  bookmarks?: {
@@ -584,6 +586,20 @@ declare interface IPasswordProvider {
584
586
  getCachedPassword?(chapterId: string): string | null;
585
587
  }
586
588
 
589
+ declare interface MarkupAnnotationMenuActionCtx {
590
+ pageIndex: number;
591
+ annotationId: string;
592
+ onDelete: () => void;
593
+ }
594
+
595
+ /** 点击已创建的划线标注时,选区菜单(删除等) */
596
+ declare interface MarkupAnnotationMenuConfig {
597
+ /** 是否显示默认删除按钮,默认 true */
598
+ enabled?: boolean;
599
+ /** 完全自定义菜单;不提供则显示默认「删除」按钮 */
600
+ renderMenu?: (ctx: MarkupAnnotationMenuActionCtx) => unknown;
601
+ }
602
+
587
603
  /** 单种划线的样式(颜色、粗细、垂直偏移,PDF 点) */
588
604
  declare interface MarkupKindStyle {
589
605
  /** 描边/填充色,如 #facc15 */