@vue-pdf-viewer/shared 1.0.0-alpha.4 → 1.0.0-alpha.6

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
@@ -1,6 +1,6 @@
1
1
  import type { InjectionKey, Reactive, ComputedRef } from "vue";
2
2
  import type { LocaleKey, Localization, PluginContext } from "./index";
3
- import { EventAnnotation } from "./enumerators";
3
+ import { EventAnnotation, FreeTextFontColor, HighlightColor } from "./enumerators";
4
4
  export declare const PLUGIN_ID: {
5
5
  ANNOTATIONS: string;
6
6
  };
@@ -8,3 +8,5 @@ export declare const Locales: Record<LocaleKey, Localization>;
8
8
  export declare const SHARED_UI_SYMBOL: InjectionKey<Reactive<PluginContext["shared"]["ui"]>>;
9
9
  export declare const LOCALIZATION_SYMBOL: InjectionKey<ComputedRef<Localization> | undefined>;
10
10
  export declare const EVENT_ANNOTATION: typeof EventAnnotation;
11
+ export declare const DEFAULT_HIGHLIGHT_COLORS: Record<HighlightColor, string>;
12
+ export declare const DEFAULT_FREE_TEXT_FONT_COLORS: Record<FreeTextFontColor, string>;
package/dist/const.js CHANGED
@@ -1,4 +1,4 @@
1
- import { EventAnnotation } from "./enumerators";
1
+ import { EventAnnotation, FreeTextFontColor, HighlightColor, } from "./enumerators";
2
2
  import en from "./locales/en_US.json";
3
3
  import cn from "./locales/zh_CN.json";
4
4
  import it from "./locales/it_IT.json";
@@ -18,3 +18,25 @@ export const Locales = {
18
18
  export const SHARED_UI_SYMBOL = Symbol("VPV Shared UIs");
19
19
  export const LOCALIZATION_SYMBOL = Symbol("VPV Current Localization");
20
20
  export const EVENT_ANNOTATION = EventAnnotation;
21
+ export const DEFAULT_HIGHLIGHT_COLORS = {
22
+ [HighlightColor.Purple]: "Purple",
23
+ [HighlightColor.Cyan]: "Cyan",
24
+ [HighlightColor.Red]: "Red",
25
+ [HighlightColor.Orange]: "Orange",
26
+ [HighlightColor.Yellow]: "Yellow",
27
+ [HighlightColor.Green]: "Green",
28
+ };
29
+ export const DEFAULT_FREE_TEXT_FONT_COLORS = {
30
+ [FreeTextFontColor.Black]: "Black",
31
+ [FreeTextFontColor.DarkGray]: "Dark Gray",
32
+ [FreeTextFontColor.Gray]: "Gray",
33
+ [FreeTextFontColor.LightGray]: "Light Gray",
34
+ [FreeTextFontColor.LightestGray]: "Lightest Gray",
35
+ [FreeTextFontColor.White]: "White",
36
+ [FreeTextFontColor.Purple]: "Purple",
37
+ [FreeTextFontColor.Blue]: "Blue",
38
+ [FreeTextFontColor.Red]: "Red",
39
+ [FreeTextFontColor.Orange]: "Orange",
40
+ [FreeTextFontColor.Yellow]: "Yellow",
41
+ [FreeTextFontColor.Green]: "Green",
42
+ };
@@ -4,7 +4,7 @@ export declare enum EventAnnotation {
4
4
  signature = "vpv:annotation:signature",
5
5
  image = "vpv:annotation:image"
6
6
  }
7
- export declare enum DefaultHighlightColor {
7
+ export declare enum HighlightColor {
8
8
  Purple = "#CAAAFF",
9
9
  Cyan = "#65EDE9",
10
10
  Red = "#FFACAC",
@@ -12,3 +12,17 @@ export declare enum DefaultHighlightColor {
12
12
  Yellow = "#FCE244",
13
13
  Green = "#A0F751"
14
14
  }
15
+ export declare enum FreeTextFontColor {
16
+ Black = "#000000",
17
+ DarkGray = "#444444",
18
+ Gray = "#696969",
19
+ LightGray = "#9C9C9C",
20
+ LightestGray = "#CDCDCD",
21
+ White = "#FFFFFF",
22
+ Purple = "#7862FF",
23
+ Blue = "#1777FF",
24
+ Red = "#F66365",
25
+ Orange = "#F67E63",
26
+ Yellow = "#F5C463",
27
+ Green = "#48BB77"
28
+ }
@@ -5,12 +5,27 @@ export var EventAnnotation;
5
5
  EventAnnotation["signature"] = "vpv:annotation:signature";
6
6
  EventAnnotation["image"] = "vpv:annotation:image";
7
7
  })(EventAnnotation || (EventAnnotation = {}));
8
- export var DefaultHighlightColor;
9
- (function (DefaultHighlightColor) {
10
- DefaultHighlightColor["Purple"] = "#CAAAFF";
11
- DefaultHighlightColor["Cyan"] = "#65EDE9";
12
- DefaultHighlightColor["Red"] = "#FFACAC";
13
- DefaultHighlightColor["Orange"] = "#FFBD82";
14
- DefaultHighlightColor["Yellow"] = "#FCE244";
15
- DefaultHighlightColor["Green"] = "#A0F751";
16
- })(DefaultHighlightColor || (DefaultHighlightColor = {}));
8
+ export var HighlightColor;
9
+ (function (HighlightColor) {
10
+ HighlightColor["Purple"] = "#CAAAFF";
11
+ HighlightColor["Cyan"] = "#65EDE9";
12
+ HighlightColor["Red"] = "#FFACAC";
13
+ HighlightColor["Orange"] = "#FFBD82";
14
+ HighlightColor["Yellow"] = "#FCE244";
15
+ HighlightColor["Green"] = "#A0F751";
16
+ })(HighlightColor || (HighlightColor = {}));
17
+ export var FreeTextFontColor;
18
+ (function (FreeTextFontColor) {
19
+ FreeTextFontColor["Black"] = "#000000";
20
+ FreeTextFontColor["DarkGray"] = "#444444";
21
+ FreeTextFontColor["Gray"] = "#696969";
22
+ FreeTextFontColor["LightGray"] = "#9C9C9C";
23
+ FreeTextFontColor["LightestGray"] = "#CDCDCD";
24
+ FreeTextFontColor["White"] = "#FFFFFF";
25
+ FreeTextFontColor["Purple"] = "#7862FF";
26
+ FreeTextFontColor["Blue"] = "#1777FF";
27
+ FreeTextFontColor["Red"] = "#F66365";
28
+ FreeTextFontColor["Orange"] = "#F67E63";
29
+ FreeTextFontColor["Yellow"] = "#F5C463";
30
+ FreeTextFontColor["Green"] = "#48BB77";
31
+ })(FreeTextFontColor || (FreeTextFontColor = {}));
package/dist/types.d.ts CHANGED
@@ -128,5 +128,15 @@ export interface Plugin {
128
128
  name: string;
129
129
  setup: (ctx: PluginContext) => void;
130
130
  }
131
- export type HighlightColors = [string, string, string, string, string, string];
131
+ export interface LabelValuePair {
132
+ label: string;
133
+ value: string;
134
+ }
135
+ export type HighlightColors = (LabelValuePair[] | string[]) & {
136
+ length: 1 | 2 | 3 | 4 | 5 | 6;
137
+ };
132
138
  export type AnnotationHighlightColors = HighlightColors | null;
139
+ export type FreeTextFontColors = (LabelValuePair[] | string[]) & {
140
+ length: 1 | 2 | 3 | 4 | 5 | 6 | 7 | 8 | 9 | 10 | 11 | 12;
141
+ };
142
+ export type AnnotationFreeTextFontColors = FreeTextFontColors | null;
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@vue-pdf-viewer/shared",
3
3
  "private": false,
4
- "version": "1.0.0-alpha.4",
4
+ "version": "1.0.0-alpha.6",
5
5
  "type": "module",
6
6
  "main": "./dist/index.js",
7
7
  "module": "./dist/index.js",