@vue-pdf-viewer/shared 1.2.0-rc.9 → 1.3.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/const.d.ts CHANGED
@@ -15,7 +15,7 @@ export declare const BASIC_COLOR: {
15
15
  readonly Gray: "#696969";
16
16
  readonly LightGray: "#9C9C9C";
17
17
  readonly LightestGray: "#CDCDCD";
18
- readonly White: "#FFFFFF";
18
+ readonly ChristmasWhite: "#EDEDED";
19
19
  };
20
20
  export declare const FREE_TEXT_FONT_COLOR: {
21
21
  readonly Purple: "#7862FF";
@@ -29,15 +29,15 @@ export declare const FREE_TEXT_FONT_COLOR: {
29
29
  readonly Gray: "#696969";
30
30
  readonly LightGray: "#9C9C9C";
31
31
  readonly LightestGray: "#CDCDCD";
32
- readonly White: "#FFFFFF";
32
+ readonly ChristmasWhite: "#EDEDED";
33
33
  };
34
- export declare const TEXT_SELECTION_COLOR: {
34
+ export declare const HIGHLIGHT_COLOR: {
35
35
  readonly Black: "#000000";
36
36
  readonly DarkGray: "#444444";
37
37
  readonly Gray: "#696969";
38
38
  readonly LightGray: "#9C9C9C";
39
39
  readonly LightestGray: "#CDCDCD";
40
- readonly White: "#FFFFFF";
40
+ readonly ChristmasWhite: "#EDEDED";
41
41
  readonly Purple: "#CAAAFF";
42
42
  readonly Cyan: "#65EDE9";
43
43
  readonly Red: "#FFACAC";
@@ -45,6 +45,22 @@ export declare const TEXT_SELECTION_COLOR: {
45
45
  readonly Yellow: "#FCE244";
46
46
  readonly Green: "#A0F751";
47
47
  };
48
- export declare const DEFAULT_TEXT_SELECTION_COLOR: Record<(typeof TEXT_SELECTION_COLOR)[keyof typeof TEXT_SELECTION_COLOR], string>;
48
+ export declare const UNDERLINE_COLOR: {
49
+ readonly Black: "#000000";
50
+ readonly DarkGray: "#444444";
51
+ readonly Gray: "#696969";
52
+ readonly LightGray: "#9C9C9C";
53
+ readonly LightestGray: "#CDCDCD";
54
+ readonly ChristmasWhite: "#EDEDED";
55
+ readonly Purple: "#7862FF";
56
+ readonly Blue: "#1777FF";
57
+ readonly Red: "#F66365";
58
+ readonly Orange: "#F67E63";
59
+ readonly Yellow: "#F5C463";
60
+ readonly Green: "#48BB77";
61
+ };
62
+ export declare const DEFAULT_HIGHLIGHT_COLOR: Record<(typeof HIGHLIGHT_COLOR)[keyof typeof HIGHLIGHT_COLOR], string>;
63
+ export declare const DEFAULT_UNDERLINE_COLOR: Record<(typeof UNDERLINE_COLOR)[keyof typeof UNDERLINE_COLOR], string>;
64
+ export declare const DEFAULT_STRIKETHROUGH_COLOR: Record<(typeof UNDERLINE_COLOR)[keyof typeof UNDERLINE_COLOR], string>;
49
65
  export declare const DEFAULT_FREE_TEXT_FONT_COLOR: Record<(typeof FREE_TEXT_FONT_COLOR)[keyof typeof FREE_TEXT_FONT_COLOR], string>;
50
66
  export declare const EDITOR_PREFIX: "pdfjs_internal_editor_";
package/dist/const.js CHANGED
@@ -8,7 +8,7 @@
8
8
  * For licensing terms and conditions, please visit:
9
9
  * https://www.vue-pdf-viewer.dev/license-agreement
10
10
  *
11
- * For commercial licensing inquiries, contact: david@vue-pdf-viewer.dev
11
+ * For commercial licensing inquiries, contact: support@vue-pdf-viewer.dev
12
12
  */
13
13
  import { EventAnnotation, EventCore } from "./enumerators";
14
14
  import en from "./locales/en_US.json";
@@ -37,7 +37,7 @@ export const BASIC_COLOR = {
37
37
  Gray: "#696969",
38
38
  LightGray: "#9C9C9C",
39
39
  LightestGray: "#CDCDCD",
40
- White: "#FFFFFF",
40
+ ChristmasWhite: "#EDEDED",
41
41
  };
42
42
  export const FREE_TEXT_FONT_COLOR = {
43
43
  ...BASIC_COLOR,
@@ -48,7 +48,7 @@ export const FREE_TEXT_FONT_COLOR = {
48
48
  Yellow: "#F5C463",
49
49
  Green: "#48BB77",
50
50
  };
51
- export const TEXT_SELECTION_COLOR = {
51
+ export const HIGHLIGHT_COLOR = {
52
52
  Purple: "#CAAAFF",
53
53
  Cyan: "#65EDE9",
54
54
  Red: "#FFACAC",
@@ -57,19 +57,57 @@ export const TEXT_SELECTION_COLOR = {
57
57
  Green: "#A0F751",
58
58
  ...BASIC_COLOR,
59
59
  };
60
- export const DEFAULT_TEXT_SELECTION_COLOR = {
61
- [TEXT_SELECTION_COLOR.Purple]: "Purple",
62
- [TEXT_SELECTION_COLOR.Cyan]: "Cyan",
63
- [TEXT_SELECTION_COLOR.Red]: "Red",
64
- [TEXT_SELECTION_COLOR.Orange]: "Orange",
65
- [TEXT_SELECTION_COLOR.Yellow]: "Yellow",
66
- [TEXT_SELECTION_COLOR.Green]: "Green",
67
- [TEXT_SELECTION_COLOR.Black]: "Black",
68
- [TEXT_SELECTION_COLOR.DarkGray]: "Dark Gray",
69
- [TEXT_SELECTION_COLOR.Gray]: "Gray",
70
- [TEXT_SELECTION_COLOR.LightGray]: "Light Gray",
71
- [TEXT_SELECTION_COLOR.LightestGray]: "Lightest Gray",
72
- [TEXT_SELECTION_COLOR.White]: "White",
60
+ export const UNDERLINE_COLOR = {
61
+ Purple: "#7862FF",
62
+ Blue: "#1777FF",
63
+ Red: "#F66365",
64
+ Orange: "#F67E63",
65
+ Yellow: "#F5C463",
66
+ Green: "#48BB77",
67
+ ...BASIC_COLOR,
68
+ };
69
+ // export const STRIKETHROUGH_COLOR = { ...UNDERLINE_COLOR } as const;
70
+ export const DEFAULT_HIGHLIGHT_COLOR = {
71
+ [HIGHLIGHT_COLOR.Purple]: "Purple",
72
+ [HIGHLIGHT_COLOR.Cyan]: "Cyan",
73
+ [HIGHLIGHT_COLOR.Red]: "Red",
74
+ [HIGHLIGHT_COLOR.Orange]: "Orange",
75
+ [HIGHLIGHT_COLOR.Yellow]: "Yellow",
76
+ [HIGHLIGHT_COLOR.Green]: "Green",
77
+ [HIGHLIGHT_COLOR.Black]: "Black",
78
+ [HIGHLIGHT_COLOR.DarkGray]: "Dark Gray",
79
+ [HIGHLIGHT_COLOR.Gray]: "Gray",
80
+ [HIGHLIGHT_COLOR.LightGray]: "Light Gray",
81
+ [HIGHLIGHT_COLOR.LightestGray]: "Lightest Gray",
82
+ [HIGHLIGHT_COLOR.ChristmasWhite]: "Christmas White",
83
+ };
84
+ export const DEFAULT_UNDERLINE_COLOR = {
85
+ [UNDERLINE_COLOR.Purple]: "Purple",
86
+ [UNDERLINE_COLOR.Blue]: "Blue",
87
+ [UNDERLINE_COLOR.Red]: "Red",
88
+ [UNDERLINE_COLOR.Orange]: "Orange",
89
+ [UNDERLINE_COLOR.Yellow]: "Yellow",
90
+ [UNDERLINE_COLOR.Green]: "Green",
91
+ [UNDERLINE_COLOR.Black]: "Black",
92
+ [UNDERLINE_COLOR.DarkGray]: "Dark Gray",
93
+ [UNDERLINE_COLOR.Gray]: "Gray",
94
+ [UNDERLINE_COLOR.LightGray]: "Light Gray",
95
+ [UNDERLINE_COLOR.LightestGray]: "Lightest Gray",
96
+ [UNDERLINE_COLOR.ChristmasWhite]: "Christmas White",
97
+ };
98
+ export const DEFAULT_STRIKETHROUGH_COLOR = {
99
+ [UNDERLINE_COLOR.Purple]: "Purple",
100
+ [UNDERLINE_COLOR.Blue]: "Blue",
101
+ [UNDERLINE_COLOR.Red]: "Red",
102
+ [UNDERLINE_COLOR.Orange]: "Orange",
103
+ [UNDERLINE_COLOR.Yellow]: "Yellow",
104
+ [UNDERLINE_COLOR.Green]: "Green",
105
+ [UNDERLINE_COLOR.Black]: "Black",
106
+ [UNDERLINE_COLOR.DarkGray]: "Dark Gray",
107
+ [UNDERLINE_COLOR.Gray]: "Gray",
108
+ [UNDERLINE_COLOR.LightGray]: "Light Gray",
109
+ [UNDERLINE_COLOR.LightestGray]: "Lightest Gray",
110
+ [UNDERLINE_COLOR.ChristmasWhite]: "Christmas White",
73
111
  };
74
112
  export const DEFAULT_FREE_TEXT_FONT_COLOR = {
75
113
  [FREE_TEXT_FONT_COLOR.Black]: "Black",
@@ -77,7 +115,7 @@ export const DEFAULT_FREE_TEXT_FONT_COLOR = {
77
115
  [FREE_TEXT_FONT_COLOR.Gray]: "Gray",
78
116
  [FREE_TEXT_FONT_COLOR.LightGray]: "Light Gray",
79
117
  [FREE_TEXT_FONT_COLOR.LightestGray]: "Lightest Gray",
80
- [FREE_TEXT_FONT_COLOR.White]: "White",
118
+ [FREE_TEXT_FONT_COLOR.ChristmasWhite]: "Christmas White",
81
119
  [FREE_TEXT_FONT_COLOR.Purple]: "Purple",
82
120
  [FREE_TEXT_FONT_COLOR.Blue]: "Blue",
83
121
  [FREE_TEXT_FONT_COLOR.Red]: "Red",
@@ -8,7 +8,7 @@
8
8
  * For licensing terms and conditions, please visit:
9
9
  * https://www.vue-pdf-viewer.dev/license-agreement
10
10
  *
11
- * For commercial licensing inquiries, contact: david@vue-pdf-viewer.dev
11
+ * For commercial licensing inquiries, contact: support@vue-pdf-viewer.dev
12
12
  */
13
13
  export var EventAnnotation;
14
14
  (function (EventAnnotation) {
@@ -88,7 +88,7 @@
88
88
  "annotationToggleShowTooltip": "Show annotation tools",
89
89
  "annotationToggleHideTooltip": "Hide annotation tools",
90
90
  "annotationTextSelectionLabel": "Text selection tool",
91
- "annotationTextSelectionTooltip": "Enable text selection tool",
91
+ "annotationTextSelectionTooltip": "Text selection",
92
92
  "annotationHighlightLabel": "Highlight",
93
93
  "annotationHighlightTooltip": "Highlight",
94
94
  "annotationHighlightColorTooltip": "Change highlight color",
@@ -88,7 +88,7 @@
88
88
  "annotationToggleShowTooltip": "Mostra strumenti annotazione",
89
89
  "annotationToggleHideTooltip": "Nascondi strumenti annotazione",
90
90
  "annotationTextSelectionLabel": "Strumento selezione testo",
91
- "annotationTextSelectionTooltip": "Abilita strumento selezione testo",
91
+ "annotationTextSelectionTooltip": "Selezione testo",
92
92
  "annotationHighlightLabel": "Evidenzia",
93
93
  "annotationHighlightTooltip": "Evidenzia",
94
94
  "annotationHighlightColorTooltip": "Cambia colore evidenziazione",
@@ -88,7 +88,7 @@
88
88
  "annotationToggleShowTooltip": "Mostrar ferramentas de anotação",
89
89
  "annotationToggleHideTooltip": "Ocultar ferramentas de anotação",
90
90
  "annotationTextSelectionLabel": "Ferramenta de seleção de texto",
91
- "annotationTextSelectionTooltip": "Ativar ferramenta de seleção de texto",
91
+ "annotationTextSelectionTooltip": "Seleção de texto",
92
92
  "annotationHighlightLabel": "Destacar",
93
93
  "annotationHighlightTooltip": "Destacar",
94
94
  "annotationHighlightColorTooltip": "Alterar cor do destaque",
@@ -88,7 +88,7 @@
88
88
  "annotationToggleShowTooltip": "แสดงเครื่องมือการออกแบบ",
89
89
  "annotationToggleHideTooltip": "ซ่อนเครื่องมือการออกแบบ",
90
90
  "annotationTextSelectionLabel": "เลือกข้อความ",
91
- "annotationTextSelectionTooltip": "เปิดใช้การเลือกข้อความ",
91
+ "annotationTextSelectionTooltip": "การเลือกข้อความ",
92
92
  "annotationHighlightLabel": "ไฮไลท์",
93
93
  "annotationHighlightTooltip": "ไฮไลท์",
94
94
  "annotationHighlightColorTooltip": "เปลี่ยนสีไฮไลท์",
@@ -88,7 +88,7 @@
88
88
  "annotationToggleShowTooltip": "显示注释工具",
89
89
  "annotationToggleHideTooltip": "隐藏注释工具",
90
90
  "annotationTextSelectionLabel": "文本选择工具",
91
- "annotationTextSelectionTooltip": "启用文本选择工具",
91
+ "annotationTextSelectionTooltip": "文本选择",
92
92
  "annotationHighlightLabel": "高亮",
93
93
  "annotationHighlightTooltip": "高亮",
94
94
  "annotationHighlightColorTooltip": "更改高亮颜色",
package/dist/types.d.ts CHANGED
@@ -268,3 +268,18 @@ export interface AnnotationEventCallback {
268
268
  onAnnotationUpdated?: AnnotationCallback;
269
269
  onAnnotationDeleted?: AnnotationCallback;
270
270
  }
271
+ /**
272
+ * Deleted annotation data for removal from PDF
273
+ * Contains full annotation data for position-based matching fallback
274
+ * (PDF annotations may not have /NM field)
275
+ */
276
+ export interface DeletedAnnotationData {
277
+ id: string;
278
+ pageIndex: number;
279
+ annotationType: number;
280
+ rect?: number[];
281
+ quadPoints?: number[];
282
+ }
283
+ export interface AnnotationPluginApi {
284
+ exportToPdf: (annotations: Annotation[], deletedAnnotations?: DeletedAnnotationData[] | string[]) => Promise<Uint8Array | null>;
285
+ }
package/dist/utils.js CHANGED
@@ -8,7 +8,7 @@
8
8
  * For licensing terms and conditions, please visit:
9
9
  * https://www.vue-pdf-viewer.dev/license-agreement
10
10
  *
11
- * For commercial licensing inquiries, contact: david@vue-pdf-viewer.dev
11
+ * For commercial licensing inquiries, contact: support@vue-pdf-viewer.dev
12
12
  */
13
13
  export const getEventName = (instanceId, event) => {
14
14
  return `${instanceId}-${event}`;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/shared",
3
3
  "private": false,
4
- "version": "1.2.0-rc.9",
4
+ "version": "1.3.0",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",
@@ -34,7 +34,7 @@
34
34
  "vue-tsc": "^0.40.4"
35
35
  },
36
36
  "description": "A shared library of vue-pdf-viewer for Vue and Nuxt.",
37
- "author": "Vue PDF Viewer <david@vue-pdf-viewer.dev>",
37
+ "author": "Vue PDF Viewer <support@vue-pdf-viewer.dev>",
38
38
  "license": "See license section",
39
39
  "homepage": "https://www.vue-pdf-viewer.dev",
40
40
  "url": "https://github.com/vue-pdf-viewer/vue-pdf-viewer",