@vue-pdf-viewer/shared 1.2.0-rc.0 → 1.2.0-rc.10
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 +39 -3
- package/dist/const.js +54 -22
- package/dist/enumerators.d.ts +2 -23
- package/dist/enumerators.js +4 -26
- package/dist/locales/en_US.json +12 -0
- package/dist/locales/it_IT.json +12 -0
- package/dist/locales/pt_PT.json +12 -0
- package/dist/locales/th_TH.json +12 -0
- package/dist/locales/zh_CN.json +12 -0
- package/dist/types.d.ts +49 -9
- package/dist/utils.js +1 -1
- package/package.json +2 -2
package/dist/const.d.ts
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { type InjectionKey, type Reactive, type ComputedRef } from "vue";
|
|
2
2
|
import type { LocaleKey, Localization, PluginContext } from "./index";
|
|
3
|
-
import { EventAnnotation, EventCore
|
|
3
|
+
import { EventAnnotation, EventCore } from "./enumerators";
|
|
4
4
|
export declare const PLUGIN_ID: {
|
|
5
5
|
ANNOTATIONS: string;
|
|
6
6
|
};
|
|
@@ -9,6 +9,42 @@ export declare const SYMBOL_SHARED_UI: InjectionKey<Reactive<PluginContext["shar
|
|
|
9
9
|
export declare const SYMBOL_LOCALIZATION: InjectionKey<ComputedRef<Localization> | undefined>;
|
|
10
10
|
export declare const EVENT_ANNOTATION: typeof EventAnnotation;
|
|
11
11
|
export declare const EVENT_CORE: typeof EventCore;
|
|
12
|
-
export declare const
|
|
13
|
-
|
|
12
|
+
export declare const BASIC_COLOR: {
|
|
13
|
+
readonly Black: "#000000";
|
|
14
|
+
readonly DarkGray: "#444444";
|
|
15
|
+
readonly Gray: "#696969";
|
|
16
|
+
readonly LightGray: "#9C9C9C";
|
|
17
|
+
readonly LightestGray: "#CDCDCD";
|
|
18
|
+
readonly White: "#FFFFFF";
|
|
19
|
+
};
|
|
20
|
+
export declare const FREE_TEXT_FONT_COLOR: {
|
|
21
|
+
readonly Purple: "#7862FF";
|
|
22
|
+
readonly Blue: "#1777FF";
|
|
23
|
+
readonly Red: "#F66365";
|
|
24
|
+
readonly Orange: "#F67E63";
|
|
25
|
+
readonly Yellow: "#F5C463";
|
|
26
|
+
readonly Green: "#48BB77";
|
|
27
|
+
readonly Black: "#000000";
|
|
28
|
+
readonly DarkGray: "#444444";
|
|
29
|
+
readonly Gray: "#696969";
|
|
30
|
+
readonly LightGray: "#9C9C9C";
|
|
31
|
+
readonly LightestGray: "#CDCDCD";
|
|
32
|
+
readonly White: "#FFFFFF";
|
|
33
|
+
};
|
|
34
|
+
export declare const TEXT_SELECTION_COLOR: {
|
|
35
|
+
readonly Black: "#000000";
|
|
36
|
+
readonly DarkGray: "#444444";
|
|
37
|
+
readonly Gray: "#696969";
|
|
38
|
+
readonly LightGray: "#9C9C9C";
|
|
39
|
+
readonly LightestGray: "#CDCDCD";
|
|
40
|
+
readonly White: "#FFFFFF";
|
|
41
|
+
readonly Purple: "#CAAAFF";
|
|
42
|
+
readonly Cyan: "#65EDE9";
|
|
43
|
+
readonly Red: "#FFACAC";
|
|
44
|
+
readonly Orange: "#FFBD82";
|
|
45
|
+
readonly Yellow: "#FCE244";
|
|
46
|
+
readonly Green: "#A0F751";
|
|
47
|
+
};
|
|
48
|
+
export declare const DEFAULT_TEXT_SELECTION_COLOR: Record<(typeof TEXT_SELECTION_COLOR)[keyof typeof TEXT_SELECTION_COLOR], string>;
|
|
49
|
+
export declare const DEFAULT_FREE_TEXT_FONT_COLOR: Record<(typeof FREE_TEXT_FONT_COLOR)[keyof typeof FREE_TEXT_FONT_COLOR], string>;
|
|
14
50
|
export declare const EDITOR_PREFIX: "pdfjs_internal_editor_";
|
package/dist/const.js
CHANGED
|
@@ -8,9 +8,9 @@
|
|
|
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:
|
|
11
|
+
* For commercial licensing inquiries, contact: support@vue-pdf-viewer.dev
|
|
12
12
|
*/
|
|
13
|
-
import { EventAnnotation, EventCore
|
|
13
|
+
import { EventAnnotation, EventCore } from "./enumerators";
|
|
14
14
|
import en from "./locales/en_US.json";
|
|
15
15
|
import cn from "./locales/zh_CN.json";
|
|
16
16
|
import it from "./locales/it_IT.json";
|
|
@@ -31,26 +31,58 @@ export const SYMBOL_SHARED_UI = Symbol("VPV Shared UIs");
|
|
|
31
31
|
export const SYMBOL_LOCALIZATION = Symbol("VPV Current Localization");
|
|
32
32
|
export const EVENT_ANNOTATION = EventAnnotation;
|
|
33
33
|
export const EVENT_CORE = EventCore;
|
|
34
|
-
export const
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
34
|
+
export const BASIC_COLOR = {
|
|
35
|
+
Black: "#000000",
|
|
36
|
+
DarkGray: "#444444",
|
|
37
|
+
Gray: "#696969",
|
|
38
|
+
LightGray: "#9C9C9C",
|
|
39
|
+
LightestGray: "#CDCDCD",
|
|
40
|
+
White: "#FFFFFF",
|
|
41
41
|
};
|
|
42
|
-
export const
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
42
|
+
export const FREE_TEXT_FONT_COLOR = {
|
|
43
|
+
...BASIC_COLOR,
|
|
44
|
+
Purple: "#7862FF",
|
|
45
|
+
Blue: "#1777FF",
|
|
46
|
+
Red: "#F66365",
|
|
47
|
+
Orange: "#F67E63",
|
|
48
|
+
Yellow: "#F5C463",
|
|
49
|
+
Green: "#48BB77",
|
|
50
|
+
};
|
|
51
|
+
export const TEXT_SELECTION_COLOR = {
|
|
52
|
+
Purple: "#CAAAFF",
|
|
53
|
+
Cyan: "#65EDE9",
|
|
54
|
+
Red: "#FFACAC",
|
|
55
|
+
Orange: "#FFBD82",
|
|
56
|
+
Yellow: "#FCE244",
|
|
57
|
+
Green: "#A0F751",
|
|
58
|
+
...BASIC_COLOR,
|
|
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",
|
|
73
|
+
};
|
|
74
|
+
export const DEFAULT_FREE_TEXT_FONT_COLOR = {
|
|
75
|
+
[FREE_TEXT_FONT_COLOR.Black]: "Black",
|
|
76
|
+
[FREE_TEXT_FONT_COLOR.DarkGray]: "Dark Gray",
|
|
77
|
+
[FREE_TEXT_FONT_COLOR.Gray]: "Gray",
|
|
78
|
+
[FREE_TEXT_FONT_COLOR.LightGray]: "Light Gray",
|
|
79
|
+
[FREE_TEXT_FONT_COLOR.LightestGray]: "Lightest Gray",
|
|
80
|
+
[FREE_TEXT_FONT_COLOR.White]: "White",
|
|
81
|
+
[FREE_TEXT_FONT_COLOR.Purple]: "Purple",
|
|
82
|
+
[FREE_TEXT_FONT_COLOR.Blue]: "Blue",
|
|
83
|
+
[FREE_TEXT_FONT_COLOR.Red]: "Red",
|
|
84
|
+
[FREE_TEXT_FONT_COLOR.Orange]: "Orange",
|
|
85
|
+
[FREE_TEXT_FONT_COLOR.Yellow]: "Yellow",
|
|
86
|
+
[FREE_TEXT_FONT_COLOR.Green]: "Green",
|
|
55
87
|
};
|
|
56
88
|
export const EDITOR_PREFIX = "pdfjs_internal_editor_";
|
package/dist/enumerators.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
export declare enum EventAnnotation {
|
|
2
|
-
|
|
2
|
+
textSelection = "vpv:annotation:textSelection",
|
|
3
3
|
freeText = "vpv:annotation:freeText",
|
|
4
4
|
signature = "vpv:annotation:signature",
|
|
5
5
|
image = "vpv:annotation:image",
|
|
6
|
+
highlight = "vpv:annotation:highlight",
|
|
6
7
|
underline = "vpv:annotation:underline",
|
|
7
8
|
strikeout = "vpv:annotation:strikeout"
|
|
8
9
|
}
|
|
@@ -13,28 +14,6 @@ export declare enum EventCore {
|
|
|
13
14
|
AnnotationMounted = "vpv:annotation:mounted",
|
|
14
15
|
Rotate = "vpv:rotate"
|
|
15
16
|
}
|
|
16
|
-
export declare enum HighlightColor {
|
|
17
|
-
Purple = "#CAAAFF",
|
|
18
|
-
Cyan = "#65EDE9",
|
|
19
|
-
Red = "#FFACAC",
|
|
20
|
-
Orange = "#FFBD82",
|
|
21
|
-
Yellow = "#FCE244",
|
|
22
|
-
Green = "#A0F751"
|
|
23
|
-
}
|
|
24
|
-
export declare enum FreeTextFontColor {
|
|
25
|
-
Black = "#000000",
|
|
26
|
-
DarkGray = "#444444",
|
|
27
|
-
Gray = "#696969",
|
|
28
|
-
LightGray = "#9C9C9C",
|
|
29
|
-
LightestGray = "#CDCDCD",
|
|
30
|
-
White = "#FFFFFF",
|
|
31
|
-
Purple = "#7862FF",
|
|
32
|
-
Blue = "#1777FF",
|
|
33
|
-
Red = "#F66365",
|
|
34
|
-
Orange = "#F67E63",
|
|
35
|
-
Yellow = "#F5C463",
|
|
36
|
-
Green = "#48BB77"
|
|
37
|
-
}
|
|
38
17
|
export declare enum AnnotationType {
|
|
39
18
|
Text = 1,
|
|
40
19
|
Link = 2,
|
package/dist/enumerators.js
CHANGED
|
@@ -8,14 +8,16 @@
|
|
|
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:
|
|
11
|
+
* For commercial licensing inquiries, contact: support@vue-pdf-viewer.dev
|
|
12
12
|
*/
|
|
13
13
|
export var EventAnnotation;
|
|
14
14
|
(function (EventAnnotation) {
|
|
15
|
-
EventAnnotation["
|
|
15
|
+
EventAnnotation["textSelection"] = "vpv:annotation:textSelection";
|
|
16
16
|
EventAnnotation["freeText"] = "vpv:annotation:freeText";
|
|
17
17
|
EventAnnotation["signature"] = "vpv:annotation:signature";
|
|
18
18
|
EventAnnotation["image"] = "vpv:annotation:image";
|
|
19
|
+
// TODO: Remove events that depends on textSelection
|
|
20
|
+
EventAnnotation["highlight"] = "vpv:annotation:highlight";
|
|
19
21
|
EventAnnotation["underline"] = "vpv:annotation:underline";
|
|
20
22
|
EventAnnotation["strikeout"] = "vpv:annotation:strikeout";
|
|
21
23
|
})(EventAnnotation || (EventAnnotation = {}));
|
|
@@ -27,30 +29,6 @@ export var EventCore;
|
|
|
27
29
|
EventCore["AnnotationMounted"] = "vpv:annotation:mounted";
|
|
28
30
|
EventCore["Rotate"] = "vpv:rotate";
|
|
29
31
|
})(EventCore || (EventCore = {}));
|
|
30
|
-
export var HighlightColor;
|
|
31
|
-
(function (HighlightColor) {
|
|
32
|
-
HighlightColor["Purple"] = "#CAAAFF";
|
|
33
|
-
HighlightColor["Cyan"] = "#65EDE9";
|
|
34
|
-
HighlightColor["Red"] = "#FFACAC";
|
|
35
|
-
HighlightColor["Orange"] = "#FFBD82";
|
|
36
|
-
HighlightColor["Yellow"] = "#FCE244";
|
|
37
|
-
HighlightColor["Green"] = "#A0F751";
|
|
38
|
-
})(HighlightColor || (HighlightColor = {}));
|
|
39
|
-
export var FreeTextFontColor;
|
|
40
|
-
(function (FreeTextFontColor) {
|
|
41
|
-
FreeTextFontColor["Black"] = "#000000";
|
|
42
|
-
FreeTextFontColor["DarkGray"] = "#444444";
|
|
43
|
-
FreeTextFontColor["Gray"] = "#696969";
|
|
44
|
-
FreeTextFontColor["LightGray"] = "#9C9C9C";
|
|
45
|
-
FreeTextFontColor["LightestGray"] = "#CDCDCD";
|
|
46
|
-
FreeTextFontColor["White"] = "#FFFFFF";
|
|
47
|
-
FreeTextFontColor["Purple"] = "#7862FF";
|
|
48
|
-
FreeTextFontColor["Blue"] = "#1777FF";
|
|
49
|
-
FreeTextFontColor["Red"] = "#F66365";
|
|
50
|
-
FreeTextFontColor["Orange"] = "#F67E63";
|
|
51
|
-
FreeTextFontColor["Yellow"] = "#F5C463";
|
|
52
|
-
FreeTextFontColor["Green"] = "#48BB77";
|
|
53
|
-
})(FreeTextFontColor || (FreeTextFontColor = {}));
|
|
54
32
|
export var AnnotationType;
|
|
55
33
|
(function (AnnotationType) {
|
|
56
34
|
AnnotationType[AnnotationType["Text"] = 1] = "Text";
|
package/dist/locales/en_US.json
CHANGED
|
@@ -87,11 +87,23 @@
|
|
|
87
87
|
"annotationLabel": "Annotation tools",
|
|
88
88
|
"annotationToggleShowTooltip": "Show annotation tools",
|
|
89
89
|
"annotationToggleHideTooltip": "Hide annotation tools",
|
|
90
|
+
"annotationTextSelectionLabel": "Text selection tool",
|
|
91
|
+
"annotationTextSelectionTooltip": "Enable text selection tool",
|
|
90
92
|
"annotationHighlightLabel": "Highlight",
|
|
91
93
|
"annotationHighlightTooltip": "Highlight",
|
|
92
94
|
"annotationHighlightColorTooltip": "Change highlight color",
|
|
93
95
|
"annotationHighlightColorPickerLabel": "Highlight color",
|
|
94
96
|
"annotationHighlightDeleteTooltip": "Remove highlight",
|
|
97
|
+
"annotationUnderlineLabel": "Underline",
|
|
98
|
+
"annotationUnderlineTooltip": "Underline",
|
|
99
|
+
"annotationUnderlineColorTooltip": "Change underline color",
|
|
100
|
+
"annotationUnderlineColorPickerLabel": "Underline color",
|
|
101
|
+
"annotationUnderlineDeleteTooltip": "Remove underline",
|
|
102
|
+
"annotationStrikethroughLabel": "Strikethrough",
|
|
103
|
+
"annotationStrikethroughTooltip": "Strikethrough",
|
|
104
|
+
"annotationStrikethroughColorTooltip": "Change strikethrough color",
|
|
105
|
+
"annotationStrikethroughColorPickerLabel": "Strikethrough color",
|
|
106
|
+
"annotationStrikethroughDeleteTooltip": "Remove strikethrough",
|
|
95
107
|
"annotationFreeTextLabel": "Free text",
|
|
96
108
|
"annotationFreeTextTooltip": "Free text",
|
|
97
109
|
"annotationFreeTextDeleteTooltip": "Remove free text",
|
package/dist/locales/it_IT.json
CHANGED
|
@@ -87,11 +87,23 @@
|
|
|
87
87
|
"annotationLabel": "Strumenti annotazione",
|
|
88
88
|
"annotationToggleShowTooltip": "Mostra strumenti annotazione",
|
|
89
89
|
"annotationToggleHideTooltip": "Nascondi strumenti annotazione",
|
|
90
|
+
"annotationTextSelectionLabel": "Strumento selezione testo",
|
|
91
|
+
"annotationTextSelectionTooltip": "Abilita strumento selezione testo",
|
|
90
92
|
"annotationHighlightLabel": "Evidenzia",
|
|
91
93
|
"annotationHighlightTooltip": "Evidenzia",
|
|
92
94
|
"annotationHighlightColorTooltip": "Cambia colore evidenziazione",
|
|
93
95
|
"annotationHighlightColorPickerLabel": "Colore evidenziazione",
|
|
94
96
|
"annotationHighlightDeleteTooltip": "Rimuovi evidenziazione",
|
|
97
|
+
"annotationUnderlineLabel": "Sottolineato",
|
|
98
|
+
"annotationUnderlineTooltip": "Sottolineato",
|
|
99
|
+
"annotationUnderlineColorTooltip": "Cambia colore sottolineato",
|
|
100
|
+
"annotationUnderlineColorPickerLabel": "Colore sottolineato",
|
|
101
|
+
"annotationUnderlineDeleteTooltip": "Rimuovi sottolineato",
|
|
102
|
+
"annotationStrikethroughLabel": "Barrato",
|
|
103
|
+
"annotationStrikethroughTooltip": "Barrato",
|
|
104
|
+
"annotationStrikethroughColorTooltip": "Cambia colore barrato",
|
|
105
|
+
"annotationStrikethroughColorPickerLabel": "Colore barrato",
|
|
106
|
+
"annotationStrikethroughDeleteTooltip": "Rimuovi barrato",
|
|
95
107
|
"annotationFreeTextLabel": "Testo libero",
|
|
96
108
|
"annotationFreeTextTooltip": "Testo libero",
|
|
97
109
|
"annotationFreeTextDeleteTooltip": "Rimuovi testo libero",
|
package/dist/locales/pt_PT.json
CHANGED
|
@@ -87,11 +87,23 @@
|
|
|
87
87
|
"annotationLabel": "Ferramentas de anotação",
|
|
88
88
|
"annotationToggleShowTooltip": "Mostrar ferramentas de anotação",
|
|
89
89
|
"annotationToggleHideTooltip": "Ocultar ferramentas de anotação",
|
|
90
|
+
"annotationTextSelectionLabel": "Ferramenta de seleção de texto",
|
|
91
|
+
"annotationTextSelectionTooltip": "Ativar ferramenta de seleção de texto",
|
|
90
92
|
"annotationHighlightLabel": "Destacar",
|
|
91
93
|
"annotationHighlightTooltip": "Destacar",
|
|
92
94
|
"annotationHighlightColorTooltip": "Alterar cor do destaque",
|
|
93
95
|
"annotationHighlightColorPickerLabel": "Cor de destaque",
|
|
94
96
|
"annotationHighlightDeleteTooltip": "Remover destaque",
|
|
97
|
+
"annotationUnderlineLabel": "Sublinhado",
|
|
98
|
+
"annotationUnderlineTooltip": "Sublinhado",
|
|
99
|
+
"annotationUnderlineColorTooltip": "Alterar cor do sublinhado",
|
|
100
|
+
"annotationUnderlineColorPickerLabel": "Cor de sublinhado",
|
|
101
|
+
"annotationUnderlineDeleteTooltip": "Remover sublinhado",
|
|
102
|
+
"annotationStrikethroughLabel": "Tachado",
|
|
103
|
+
"annotationStrikethroughTooltip": "Tachado",
|
|
104
|
+
"annotationStrikethroughColorTooltip": "Alterar cor do tachado",
|
|
105
|
+
"annotationStrikethroughColorPickerLabel": "Cor de tachado",
|
|
106
|
+
"annotationStrikethroughDeleteTooltip": "Remover tachado",
|
|
95
107
|
"annotationFreeTextLabel": "Texto livre",
|
|
96
108
|
"annotationFreeTextTooltip": "Texto livre",
|
|
97
109
|
"annotationFreeTextDeleteTooltip": "Remover texto livre",
|
package/dist/locales/th_TH.json
CHANGED
|
@@ -87,11 +87,23 @@
|
|
|
87
87
|
"annotationLabel": "เครื่องมือการออกแบบ",
|
|
88
88
|
"annotationToggleShowTooltip": "แสดงเครื่องมือการออกแบบ",
|
|
89
89
|
"annotationToggleHideTooltip": "ซ่อนเครื่องมือการออกแบบ",
|
|
90
|
+
"annotationTextSelectionLabel": "เลือกข้อความ",
|
|
91
|
+
"annotationTextSelectionTooltip": "เปิดใช้การเลือกข้อความ",
|
|
90
92
|
"annotationHighlightLabel": "ไฮไลท์",
|
|
91
93
|
"annotationHighlightTooltip": "ไฮไลท์",
|
|
92
94
|
"annotationHighlightColorTooltip": "เปลี่ยนสีไฮไลท์",
|
|
93
95
|
"annotationHighlightColorPickerLabel": "สีไฮไลท์",
|
|
94
96
|
"annotationHighlightDeleteTooltip": "ลบไฮไลท์",
|
|
97
|
+
"annotationUnderlineLabel": "ขีดเส้นใต้",
|
|
98
|
+
"annotationUnderlineTooltip": "ขีดเส้นใต้",
|
|
99
|
+
"annotationUnderlineColorTooltip": "เปลี่ยนสีขีดเส้นใต้",
|
|
100
|
+
"annotationUnderlineColorPickerLabel": "สีขีดเส้นใต้",
|
|
101
|
+
"annotationUnderlineDeleteTooltip": "ลบขีดเส้นใต้",
|
|
102
|
+
"annotationStrikethroughLabel": "ขีดฆ่า",
|
|
103
|
+
"annotationStrikethroughTooltip": "ขีดฆ่า",
|
|
104
|
+
"annotationStrikethroughColorTooltip": "เปลี่ยนสีขีดฆ่า",
|
|
105
|
+
"annotationStrikethroughColorPickerLabel": "สีขีดฆ่า",
|
|
106
|
+
"annotationStrikethroughDeleteTooltip": "ลบขีดฆ่า",
|
|
95
107
|
"annotationFreeTextLabel": "ข้อความ",
|
|
96
108
|
"annotationFreeTextTooltip": "ข้อความ",
|
|
97
109
|
"annotationFreeTextDeleteTooltip": "ลบข้อความ",
|
package/dist/locales/zh_CN.json
CHANGED
|
@@ -87,11 +87,23 @@
|
|
|
87
87
|
"annotationLabel": "注释工具",
|
|
88
88
|
"annotationToggleShowTooltip": "显示注释工具",
|
|
89
89
|
"annotationToggleHideTooltip": "隐藏注释工具",
|
|
90
|
+
"annotationTextSelectionLabel": "文本选择工具",
|
|
91
|
+
"annotationTextSelectionTooltip": "启用文本选择工具",
|
|
90
92
|
"annotationHighlightLabel": "高亮",
|
|
91
93
|
"annotationHighlightTooltip": "高亮",
|
|
92
94
|
"annotationHighlightColorTooltip": "更改高亮颜色",
|
|
93
95
|
"annotationHighlightColorPickerLabel": "高亮颜色",
|
|
94
96
|
"annotationHighlightDeleteTooltip": "删除高亮",
|
|
97
|
+
"annotationUnderlineLabel": "下划线",
|
|
98
|
+
"annotationUnderlineTooltip": "下划线",
|
|
99
|
+
"annotationUnderlineColorTooltip": "更改下划线颜色",
|
|
100
|
+
"annotationUnderlineColorPickerLabel": "下划线颜色",
|
|
101
|
+
"annotationUnderlineDeleteTooltip": "删除下划线",
|
|
102
|
+
"annotationStrikethroughLabel": "删除线",
|
|
103
|
+
"annotationStrikethroughTooltip": "删除线",
|
|
104
|
+
"annotationStrikethroughColorTooltip": "更改删除线颜色",
|
|
105
|
+
"annotationStrikethroughColorPickerLabel": "删除线颜色",
|
|
106
|
+
"annotationStrikethroughDeleteTooltip": "删除删除线",
|
|
95
107
|
"annotationFreeTextLabel": "自由文本",
|
|
96
108
|
"annotationFreeTextTooltip": "自由文本",
|
|
97
109
|
"annotationFreeTextDeleteTooltip": "删除自由文本",
|
package/dist/types.d.ts
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import type { Component, ComponentInternalInstance, ComputedRef } from "vue";
|
|
1
|
+
import type { Component, ComponentInternalInstance, ComputedRef, VNode } from "vue";
|
|
2
2
|
import { AnnotationFlag, AnnotationType, EventAnnotation, EventCore } from "./enumerators";
|
|
3
3
|
export type LocaleKey = "en_US" | "zh_CN" | "it_IT" | "pt_PT" | "th_TH" | string;
|
|
4
4
|
export type Localization = {
|
|
@@ -90,11 +90,23 @@ export type Localization = {
|
|
|
90
90
|
annotationLabel: string;
|
|
91
91
|
annotationToggleShowTooltip: string;
|
|
92
92
|
annotationToggleHideTooltip: string;
|
|
93
|
+
annotationTextSelectionLabel: string;
|
|
94
|
+
annotationTextSelectionTooltip: string;
|
|
93
95
|
annotationHighlightLabel: string;
|
|
94
96
|
annotationHighlightTooltip: string;
|
|
95
97
|
annotationHighlightColorTooltip: string;
|
|
96
98
|
annotationHighlightColorPickerLabel: string;
|
|
97
99
|
annotationHighlightDeleteTooltip: string;
|
|
100
|
+
annotationUnderlineLabel: string;
|
|
101
|
+
annotationUnderlineTooltip: string;
|
|
102
|
+
annotationUnderlineColorTooltip: string;
|
|
103
|
+
annotationUnderlineColorPickerLabel: string;
|
|
104
|
+
annotationUnderlineDeleteTooltip: string;
|
|
105
|
+
annotationStrikethroughLabel: string;
|
|
106
|
+
annotationStrikethroughTooltip: string;
|
|
107
|
+
annotationStrikethroughColorTooltip: string;
|
|
108
|
+
annotationStrikethroughColorPickerLabel: string;
|
|
109
|
+
annotationStrikethroughDeleteTooltip: string;
|
|
98
110
|
annotationFreeTextLabel: string;
|
|
99
111
|
annotationFreeTextTooltip: string;
|
|
100
112
|
annotationFreeTextDeleteTooltip: string;
|
|
@@ -132,7 +144,7 @@ export interface PluginContext<PDFDocumentProxy = any> {
|
|
|
132
144
|
AppButton?: Component;
|
|
133
145
|
AppTooltip?: Component;
|
|
134
146
|
AppPopover?: Component;
|
|
135
|
-
|
|
147
|
+
AppColorPicker?: Component;
|
|
136
148
|
AppSignatures?: Component;
|
|
137
149
|
};
|
|
138
150
|
pdf?: {
|
|
@@ -150,12 +162,36 @@ export interface LabelValuePair {
|
|
|
150
162
|
value: string;
|
|
151
163
|
}
|
|
152
164
|
export type AnnotationColors = LabelValuePair[] | string[];
|
|
153
|
-
export type
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
export type AnnotationFreeTextFontColors = (AnnotationColors & {
|
|
157
|
-
length: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
165
|
+
export type AnnotationColorsLength = 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
|
|
166
|
+
export type AnnotationTextSelectionColors = (AnnotationColors & {
|
|
167
|
+
length: AnnotationColorsLength;
|
|
158
168
|
}) | null;
|
|
169
|
+
export type AnnotationHighlightColors = AnnotationTextSelectionColors;
|
|
170
|
+
export type AnnotationStrikethroughColors = AnnotationTextSelectionColors;
|
|
171
|
+
export type AnnotationUnderlineColors = AnnotationTextSelectionColors;
|
|
172
|
+
export type AnnotationFreeTextFontColors = AnnotationTextSelectionColors;
|
|
173
|
+
export interface AnnotationToolOption {
|
|
174
|
+
icon?: Component | VNode | string;
|
|
175
|
+
component?: Component;
|
|
176
|
+
}
|
|
177
|
+
export interface HighlightToolOption extends AnnotationToolOption {
|
|
178
|
+
}
|
|
179
|
+
export interface StrikethroughToolOption extends AnnotationToolOption {
|
|
180
|
+
}
|
|
181
|
+
export interface UnderlineToolOption extends AnnotationToolOption {
|
|
182
|
+
}
|
|
183
|
+
export interface TextSelectionOption extends AnnotationToolOption {
|
|
184
|
+
colors?: AnnotationTextSelectionColors;
|
|
185
|
+
highlight?: HighlightToolOption | boolean;
|
|
186
|
+
strikethrough?: StrikethroughToolOption | boolean;
|
|
187
|
+
underline?: UnderlineToolOption | boolean;
|
|
188
|
+
}
|
|
189
|
+
export interface FreeTextOption extends AnnotationToolOption {
|
|
190
|
+
fontColors?: AnnotationFreeTextFontColors;
|
|
191
|
+
fontSizes?: number[];
|
|
192
|
+
}
|
|
193
|
+
export interface ImageOption extends AnnotationToolOption {
|
|
194
|
+
}
|
|
159
195
|
export type VPVEvent = EventAnnotation | EventCore;
|
|
160
196
|
export interface AnnotationAttachment {
|
|
161
197
|
content: Uint8Array;
|
|
@@ -191,16 +227,18 @@ export interface Annotation {
|
|
|
191
227
|
annotationType: AnnotationType;
|
|
192
228
|
rotation: number;
|
|
193
229
|
rect: number[];
|
|
230
|
+
parentRect?: number[];
|
|
231
|
+
fieldType?: string;
|
|
194
232
|
annotationFlags?: AnnotationFlag;
|
|
195
233
|
borderStyle?: AnnotationBorderStyle;
|
|
196
234
|
color?: Uint8ClampedArray | null;
|
|
197
|
-
creationDate?: string | null;
|
|
235
|
+
creationDate?: string | Date | null;
|
|
198
236
|
backgroundColor?: Uint8ClampedArray | null;
|
|
199
237
|
borderColor?: Uint8ClampedArray | null;
|
|
200
238
|
contentsObj?: AnnotationStringObj;
|
|
201
239
|
hasOwnCanvas?: boolean;
|
|
202
240
|
hasAppearance?: boolean;
|
|
203
|
-
modificationDate?: string | null;
|
|
241
|
+
modificationDate?: string | Date | null;
|
|
204
242
|
quadPoints?: Float32Array;
|
|
205
243
|
subtype?: string;
|
|
206
244
|
noRotate?: boolean;
|
|
@@ -210,6 +248,8 @@ export interface Annotation {
|
|
|
210
248
|
titleObj?: AnnotationStringObj;
|
|
211
249
|
opacity?: number;
|
|
212
250
|
file?: AnnotationAttachment;
|
|
251
|
+
inReplyTo?: string;
|
|
252
|
+
value?: string;
|
|
213
253
|
dest?: OutlineDestinations;
|
|
214
254
|
url?: string;
|
|
215
255
|
unsafeUrl?: string;
|
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:
|
|
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.
|
|
4
|
+
"version": "1.2.0-rc.10",
|
|
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 <
|
|
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",
|