@vue-pdf-viewer/annotation 0.0.0-experimental.8 → 1.0.0-alpha.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/colors.d.ts +1 -0
- package/dist/index.js +414 -296
- package/dist/index.umd.cjs +2 -2
- package/dist/types.d.ts +5 -1
- package/package.json +2 -2
package/dist/colors.d.ts
ADDED
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare const getHexColor: (color: string) => string;
|
package/dist/index.js
CHANGED
|
@@ -1,104 +1,104 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".vp-text-xl[data-v-c6e40782]{font-size:1.25rem;line-height:1.75rem}.vpv-toolbar-btn.vpv-toolbar-btn-active[data-v-
|
|
2
|
-
import { defineComponent as
|
|
3
|
-
var
|
|
4
|
-
(function(
|
|
5
|
-
|
|
6
|
-
})(
|
|
7
|
-
var
|
|
8
|
-
(function(
|
|
9
|
-
|
|
10
|
-
})(
|
|
11
|
-
const
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".vp-text-xl[data-v-c6e40782]{font-size:1.25rem;line-height:1.75rem}.vpv-toolbar-btn.vpv-toolbar-btn-active[data-v-7ffb5374],.vpv-toolbar-btn[data-v-7ffb5374]:hover{background-color:var(--vpv-primary-color);color:#fff}.vpv-annotation-tools-container[data-v-1d37828e]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-1d37828e] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-1d37828e],.slide-leave-active[data-v-1d37828e]{transition:all .3s ease-out}.slide-enter-from[data-v-1d37828e],.slide-leave-to[data-v-1d37828e]{opacity:0}.slide-enter-from[data-v-1d37828e],.slide-leave-to[data-v-1d37828e]{transform:translateY(-20px)}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
import { defineComponent as b, inject as x, computed as g, openBlock as s, createBlock as c, resolveDynamicComponent as m, normalizeProps as k, mergeProps as y, createSlots as C, withCtx as i, renderSlot as d, renderList as X, createElementBlock as I, defineAsyncComponent as ee, unref as h, ref as z, createTextVNode as O, toDisplayString as S, createVNode as p, normalizeClass as F, useModel as U, createCommentVNode as $, reactive as te, Transition as ae, h as ne } from "vue";
|
|
3
|
+
var A;
|
|
4
|
+
(function(t) {
|
|
5
|
+
t.highlight = "vpv:annotation:highlight", t.freeText = "vpv:annotation:freeText", t.signature = "vpv:annotation:signature", t.image = "vpv:annotation:image";
|
|
6
|
+
})(A || (A = {}));
|
|
7
|
+
var j;
|
|
8
|
+
(function(t) {
|
|
9
|
+
t.Purple = "#7862FF", t.Cyan = "#3FE9E3", t.Red = "#F87777", t.Orange = "#FE9639", t.Yellow = "#FBDA15", t.Green = "#88F526";
|
|
10
|
+
})(j || (j = {}));
|
|
11
|
+
const oe = {
|
|
12
12
|
ANNOTATIONS: "annotations"
|
|
13
|
-
},
|
|
13
|
+
}, P = Symbol("VPV Shared UIs"), H = Symbol("VPV Current Localization"), ie = (t, n) => `${t}-${n}`, E = /* @__PURE__ */ b({
|
|
14
14
|
__name: "AppTooltip",
|
|
15
|
-
setup(
|
|
16
|
-
const
|
|
17
|
-
return (
|
|
18
|
-
default:
|
|
19
|
-
|
|
15
|
+
setup(t) {
|
|
16
|
+
const n = x(P), e = g(() => n?.AppTooltip);
|
|
17
|
+
return (a, o) => e.value ? (s(), c(m(e.value), k(y({ key: 0 }, a.$attrs)), C({
|
|
18
|
+
default: i(() => [
|
|
19
|
+
d(a.$slots, "default")
|
|
20
20
|
]),
|
|
21
21
|
_: 2
|
|
22
22
|
}, [
|
|
23
|
-
|
|
24
|
-
name:
|
|
25
|
-
fn:
|
|
26
|
-
|
|
23
|
+
X(a.$slots, (l, u) => ({
|
|
24
|
+
name: u,
|
|
25
|
+
fn: i(() => [
|
|
26
|
+
d(a.$slots, u)
|
|
27
27
|
])
|
|
28
28
|
}))
|
|
29
|
-
]), 1040)) : (
|
|
30
|
-
|
|
29
|
+
]), 1040)) : (s(), I("div", k(y({ key: 1 }, a.$attrs)), [
|
|
30
|
+
d(a.$slots, "default")
|
|
31
31
|
], 16));
|
|
32
32
|
}
|
|
33
|
-
}),
|
|
33
|
+
}), B = /* @__PURE__ */ b({
|
|
34
34
|
__name: "AppButton",
|
|
35
|
-
setup(
|
|
36
|
-
const
|
|
37
|
-
return (
|
|
38
|
-
default:
|
|
39
|
-
|
|
35
|
+
setup(t) {
|
|
36
|
+
const n = x(P), e = g(() => n?.AppButton);
|
|
37
|
+
return (a, o) => e.value ? (s(), c(m(e.value), k(y({ key: 0 }, a.$attrs)), {
|
|
38
|
+
default: i(() => [
|
|
39
|
+
d(a.$slots, "default")
|
|
40
40
|
]),
|
|
41
41
|
_: 3
|
|
42
|
-
}, 16)) : (
|
|
43
|
-
|
|
42
|
+
}, 16)) : (s(), I("button", k(y({ key: 1 }, a.$attrs)), [
|
|
43
|
+
d(a.$slots, "default")
|
|
44
44
|
], 16));
|
|
45
45
|
}
|
|
46
|
-
}),
|
|
47
|
-
const e = n
|
|
48
|
-
return e ? typeof e == "function" ? e() : Promise.resolve(e) : new Promise((
|
|
49
|
-
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(
|
|
46
|
+
}), le = (t, n) => {
|
|
47
|
+
const e = t[n];
|
|
48
|
+
return e ? typeof e == "function" ? e() : Promise.resolve(e) : new Promise((a, o) => {
|
|
49
|
+
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(o.bind(null, new Error("Unknown variable dynamic import: " + n)));
|
|
50
50
|
});
|
|
51
|
-
},
|
|
51
|
+
}, se = /* @__PURE__ */ b({
|
|
52
52
|
__name: "Icon",
|
|
53
53
|
props: {
|
|
54
54
|
name: {}
|
|
55
55
|
},
|
|
56
|
-
setup(
|
|
57
|
-
const
|
|
58
|
-
loader: () =>
|
|
56
|
+
setup(t) {
|
|
57
|
+
const n = t, e = ee({
|
|
58
|
+
loader: () => le(/* @__PURE__ */ Object.assign({ "../assets/icons/annotations.svg": () => import("./annotations.1313e99f.js"), "../assets/icons/tool-comment.svg": () => import("./tool-comment.d0e017dc.js"), "../assets/icons/tool-free-text.svg": () => import("./tool-free-text.bcc03e9a.js"), "../assets/icons/tool-highlight.svg": () => import("./tool-highlight.d3ea6f0b.js"), "../assets/icons/tool-image.svg": () => import("./tool-image.72fd3197.js"), "../assets/icons/tool-signature.svg": () => import("./tool-signature.85da0b98.js") }), `../assets/icons/${n.name}.svg`)
|
|
59
59
|
});
|
|
60
|
-
return (
|
|
60
|
+
return (a, o) => (s(), c(m(h(e)), { class: "vp-text-xl" }));
|
|
61
61
|
}
|
|
62
62
|
});
|
|
63
|
-
const
|
|
64
|
-
const e =
|
|
65
|
-
for (const [
|
|
66
|
-
e[
|
|
63
|
+
const M = (t, n) => {
|
|
64
|
+
const e = t.__vccOpts || t;
|
|
65
|
+
for (const [a, o] of n)
|
|
66
|
+
e[a] = o;
|
|
67
67
|
return e;
|
|
68
|
-
},
|
|
69
|
-
const
|
|
70
|
-
|
|
71
|
-
|
|
68
|
+
}, L = /* @__PURE__ */ M(se, [["__scopeId", "data-v-c6e40782"]]), N = () => {
|
|
69
|
+
const t = x(
|
|
70
|
+
H,
|
|
71
|
+
g(() => ({}))
|
|
72
72
|
);
|
|
73
73
|
return {
|
|
74
|
-
t:
|
|
75
|
-
const
|
|
76
|
-
return
|
|
74
|
+
t: g(() => (e) => {
|
|
75
|
+
const a = e.split(".").pop() || e;
|
|
76
|
+
return t.value && a in t.value ? t.value[a] : (console.warn(`useLocalization - Translation not found for key: ${e}`), e);
|
|
77
77
|
}).value,
|
|
78
|
-
currentLocale:
|
|
78
|
+
currentLocale: g(() => t.value)
|
|
79
79
|
};
|
|
80
|
-
},
|
|
80
|
+
}, re = /* @__PURE__ */ b({
|
|
81
81
|
__name: "ToolAnnotation",
|
|
82
82
|
emits: ["toggle"],
|
|
83
|
-
setup(
|
|
84
|
-
const { t: e } =
|
|
85
|
-
|
|
83
|
+
setup(t, { emit: n }) {
|
|
84
|
+
const { t: e } = N(), a = n, o = z(!1), l = () => {
|
|
85
|
+
o.value = !o.value, a("toggle", o.value);
|
|
86
86
|
};
|
|
87
|
-
return (
|
|
87
|
+
return (u, f) => u.$slots.default ? d(u.$slots, "default", {
|
|
88
88
|
key: 0,
|
|
89
|
-
onClick:
|
|
90
|
-
}, void 0, !0) : (
|
|
91
|
-
content:
|
|
92
|
-
|
|
89
|
+
onClick: l
|
|
90
|
+
}, void 0, !0) : (s(), c(E, { key: 1 }, {
|
|
91
|
+
content: i(() => [
|
|
92
|
+
O(S(o.value ? h(e)("annotationToggleHideTooltip") : h(e)("annotationToggleShowTooltip")), 1)
|
|
93
93
|
]),
|
|
94
|
-
default:
|
|
95
|
-
|
|
96
|
-
"aria-label":
|
|
97
|
-
class:
|
|
98
|
-
onClick:
|
|
94
|
+
default: i(() => [
|
|
95
|
+
p(B, {
|
|
96
|
+
"aria-label": o.value ? h(e)("annotationToggleHideTooltip") : h(e)("annotationToggleShowTooltip"),
|
|
97
|
+
class: F(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": o.value }]),
|
|
98
|
+
onClick: l
|
|
99
99
|
}, {
|
|
100
|
-
default:
|
|
101
|
-
|
|
100
|
+
default: i(() => [
|
|
101
|
+
p(L, {
|
|
102
102
|
name: "annotations",
|
|
103
103
|
class: "vp-text-xl"
|
|
104
104
|
})
|
|
@@ -110,131 +110,101 @@ const D = (n, o) => {
|
|
|
110
110
|
}));
|
|
111
111
|
}
|
|
112
112
|
});
|
|
113
|
-
const
|
|
114
|
-
__name: "AppPopover",
|
|
115
|
-
setup(n) {
|
|
116
|
-
const o = w(S), e = f(() => o?.AppPopover);
|
|
117
|
-
return (t, a) => e.value ? (i(), r(d(e.value), b($({ key: 0 }, t.$attrs)), {
|
|
118
|
-
trigger: l(() => [
|
|
119
|
-
v(t.$slots, "trigger")
|
|
120
|
-
]),
|
|
121
|
-
default: l(() => [
|
|
122
|
-
v(t.$slots, "default")
|
|
123
|
-
]),
|
|
124
|
-
_: 3
|
|
125
|
-
}, 16)) : (i(), N("button", b($({ key: 1 }, t.$attrs)), [
|
|
126
|
-
v(t.$slots, "default")
|
|
127
|
-
], 16));
|
|
128
|
-
}
|
|
129
|
-
}), de = /* @__PURE__ */ T({
|
|
130
|
-
__name: "AppHighlightColorPicker",
|
|
131
|
-
setup(n) {
|
|
132
|
-
const o = w(S), e = f(() => o?.AppHighlightColorPicker);
|
|
133
|
-
return (t, a) => e.value ? (i(), r(d(e.value), b($({ key: 0 }, t.$attrs)), null, 16)) : C("", !0);
|
|
134
|
-
}
|
|
135
|
-
}), he = { class: "vpv-annotation-highlight__color-picker-wrapper" }, _e = /* @__PURE__ */ T({
|
|
113
|
+
const ce = /* @__PURE__ */ M(re, [["__scopeId", "data-v-7ffb5374"]]), fe = /* @__PURE__ */ b({
|
|
136
114
|
__name: "ToolAnnotationHighlight",
|
|
137
115
|
props: {
|
|
138
116
|
active: { type: Boolean, required: !0 },
|
|
139
117
|
activeModifiers: {}
|
|
140
118
|
},
|
|
141
|
-
emits:
|
|
142
|
-
setup(
|
|
143
|
-
const
|
|
144
|
-
|
|
145
|
-
}, k = (m) => {
|
|
146
|
-
t.value = !1;
|
|
119
|
+
emits: ["update:active"],
|
|
120
|
+
setup(t) {
|
|
121
|
+
const n = U(t, "active"), { t: e } = N(), a = () => {
|
|
122
|
+
n.value = !n.value;
|
|
147
123
|
};
|
|
148
|
-
return
|
|
149
|
-
!e.value || a("change", p.value);
|
|
150
|
-
}), (m, A) => m.$slots.default ? v(m.$slots, "default", {
|
|
124
|
+
return (o, l) => o.$slots.default ? d(o.$slots, "default", {
|
|
151
125
|
key: 0,
|
|
152
|
-
onClick:
|
|
153
|
-
}) : (
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
"aria-label": h(u)("annotationHighlightLabel"),
|
|
168
|
-
class: j(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": e.value }]),
|
|
169
|
-
onClick: c
|
|
170
|
-
}, {
|
|
171
|
-
default: l(() => [
|
|
172
|
-
v(m.$slots, "icon", {}, () => [
|
|
173
|
-
g(F, { name: "tool-highlight" })
|
|
174
|
-
])
|
|
175
|
-
]),
|
|
176
|
-
_: 3
|
|
177
|
-
}, 8, ["aria-label", "class"])
|
|
126
|
+
onClick: a
|
|
127
|
+
}) : (s(), c(E, { key: 1 }, {
|
|
128
|
+
content: i(() => [
|
|
129
|
+
O(S(h(e)("annotationHighlightTooltip")), 1)
|
|
130
|
+
]),
|
|
131
|
+
default: i(() => [
|
|
132
|
+
p(B, {
|
|
133
|
+
"aria-label": h(e)("annotationHighlightLabel"),
|
|
134
|
+
class: F(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": n.value }]),
|
|
135
|
+
onClick: a
|
|
136
|
+
}, {
|
|
137
|
+
default: i(() => [
|
|
138
|
+
d(o.$slots, "icon", {}, () => [
|
|
139
|
+
p(L, { name: "tool-highlight" })
|
|
140
|
+
])
|
|
178
141
|
]),
|
|
179
142
|
_: 3
|
|
180
|
-
})
|
|
143
|
+
}, 8, ["aria-label", "class"])
|
|
181
144
|
]),
|
|
182
|
-
|
|
183
|
-
|
|
184
|
-
|
|
185
|
-
|
|
186
|
-
|
|
187
|
-
|
|
188
|
-
|
|
189
|
-
|
|
145
|
+
_: 3
|
|
146
|
+
}));
|
|
147
|
+
}
|
|
148
|
+
}), ue = /* @__PURE__ */ b({
|
|
149
|
+
__name: "AppPopover",
|
|
150
|
+
setup(t) {
|
|
151
|
+
const n = x(P), e = g(() => n?.AppPopover);
|
|
152
|
+
return (a, o) => e.value ? (s(), c(m(e.value), k(y({ key: 0 }, a.$attrs)), {
|
|
153
|
+
trigger: i(() => [
|
|
154
|
+
d(a.$slots, "trigger")
|
|
155
|
+
]),
|
|
156
|
+
default: i(() => [
|
|
157
|
+
d(a.$slots, "default")
|
|
190
158
|
]),
|
|
191
159
|
_: 3
|
|
192
|
-
},
|
|
160
|
+
}, 16)) : (s(), I("button", k(y({ key: 1 }, a.$attrs)), [
|
|
161
|
+
d(a.$slots, "default")
|
|
162
|
+
], 16));
|
|
193
163
|
}
|
|
194
|
-
}),
|
|
164
|
+
}), de = /* @__PURE__ */ b({
|
|
195
165
|
__name: "AppSignatures",
|
|
196
|
-
setup(
|
|
197
|
-
const
|
|
198
|
-
return (
|
|
166
|
+
setup(t) {
|
|
167
|
+
const n = x(P), e = g(() => n?.AppSignatures);
|
|
168
|
+
return (a, o) => e.value ? (s(), c(m(e.value), k(y({ key: 0 }, a.$attrs)), null, 16)) : $("", !0);
|
|
199
169
|
}
|
|
200
|
-
}),
|
|
170
|
+
}), ge = /* @__PURE__ */ b({
|
|
201
171
|
__name: "ToolAnnotationSignature",
|
|
202
172
|
props: {
|
|
203
173
|
active: { type: Boolean, required: !0 },
|
|
204
174
|
activeModifiers: {}
|
|
205
175
|
},
|
|
206
176
|
emits: ["update:active"],
|
|
207
|
-
setup(
|
|
208
|
-
const
|
|
209
|
-
!
|
|
210
|
-
},
|
|
211
|
-
|
|
177
|
+
setup(t) {
|
|
178
|
+
const n = U(t, "active"), { t: e } = N(), a = z(!1), o = () => {
|
|
179
|
+
!n.value && !a.value && (a.value = !0), n.value = !n.value;
|
|
180
|
+
}, l = (u) => {
|
|
181
|
+
a.value = !1;
|
|
212
182
|
};
|
|
213
|
-
return (
|
|
183
|
+
return (u, f) => u.$slots.default ? d(u.$slots, "default", {
|
|
214
184
|
key: 0,
|
|
215
|
-
onClick:
|
|
216
|
-
}) : (
|
|
185
|
+
onClick: o
|
|
186
|
+
}) : (s(), c(ue, {
|
|
217
187
|
key: 1,
|
|
218
|
-
open:
|
|
188
|
+
open: a.value,
|
|
219
189
|
side: "right",
|
|
220
190
|
sideOffset: 10,
|
|
221
191
|
class: "vpv-annotation-signatures__popover",
|
|
222
|
-
onInteractOutside:
|
|
192
|
+
onInteractOutside: l
|
|
223
193
|
}, {
|
|
224
|
-
trigger:
|
|
225
|
-
|
|
226
|
-
content:
|
|
227
|
-
|
|
194
|
+
trigger: i(() => [
|
|
195
|
+
p(E, null, {
|
|
196
|
+
content: i(() => [
|
|
197
|
+
O(S(h(e)("annotationSignatureTooltip")), 1)
|
|
228
198
|
]),
|
|
229
|
-
default:
|
|
230
|
-
|
|
199
|
+
default: i(() => [
|
|
200
|
+
p(B, {
|
|
231
201
|
"aria-label": h(e)("annotationSignatureLabel"),
|
|
232
|
-
class:
|
|
233
|
-
onClick:
|
|
202
|
+
class: F(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": n.value }]),
|
|
203
|
+
onClick: o
|
|
234
204
|
}, {
|
|
235
|
-
default:
|
|
236
|
-
|
|
237
|
-
|
|
205
|
+
default: i(() => [
|
|
206
|
+
d(u.$slots, "icon", {}, () => [
|
|
207
|
+
p(L, { name: "tool-signature" })
|
|
238
208
|
])
|
|
239
209
|
]),
|
|
240
210
|
_: 3
|
|
@@ -243,39 +213,39 @@ const fe = /* @__PURE__ */ D(ge, [["__scopeId", "data-v-52907777"]]), Y = /* @__
|
|
|
243
213
|
_: 3
|
|
244
214
|
})
|
|
245
215
|
]),
|
|
246
|
-
default:
|
|
247
|
-
|
|
216
|
+
default: i(() => [
|
|
217
|
+
p(de)
|
|
248
218
|
]),
|
|
249
219
|
_: 3
|
|
250
220
|
}, 8, ["open"]));
|
|
251
221
|
}
|
|
252
|
-
}),
|
|
222
|
+
}), pe = /* @__PURE__ */ b({
|
|
253
223
|
__name: "ToolAnnotationFreeText",
|
|
254
224
|
props: {
|
|
255
225
|
active: { type: Boolean, required: !0 },
|
|
256
226
|
activeModifiers: {}
|
|
257
227
|
},
|
|
258
228
|
emits: ["update:active"],
|
|
259
|
-
setup(
|
|
260
|
-
const
|
|
261
|
-
|
|
229
|
+
setup(t) {
|
|
230
|
+
const n = U(t, "active"), { t: e } = N(), a = () => {
|
|
231
|
+
n.value = !n.value;
|
|
262
232
|
};
|
|
263
|
-
return (
|
|
233
|
+
return (o, l) => o.$slots.default ? d(o.$slots, "default", {
|
|
264
234
|
key: 0,
|
|
265
|
-
onClick:
|
|
266
|
-
}) : (
|
|
267
|
-
content:
|
|
268
|
-
|
|
235
|
+
onClick: a
|
|
236
|
+
}) : (s(), c(E, { key: 1 }, {
|
|
237
|
+
content: i(() => [
|
|
238
|
+
O(S(h(e)("annotationFreeTextTooltip")), 1)
|
|
269
239
|
]),
|
|
270
|
-
default:
|
|
271
|
-
|
|
240
|
+
default: i(() => [
|
|
241
|
+
p(B, {
|
|
272
242
|
"aria-label": h(e)("annotationFreeTextLabel"),
|
|
273
|
-
class:
|
|
274
|
-
onClick:
|
|
243
|
+
class: F(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": n.value }]),
|
|
244
|
+
onClick: a
|
|
275
245
|
}, {
|
|
276
|
-
default:
|
|
277
|
-
|
|
278
|
-
|
|
246
|
+
default: i(() => [
|
|
247
|
+
d(o.$slots, "icon", {}, () => [
|
|
248
|
+
p(L, { name: "tool-free-text" })
|
|
279
249
|
])
|
|
280
250
|
]),
|
|
281
251
|
_: 3
|
|
@@ -284,31 +254,33 @@ const fe = /* @__PURE__ */ D(ge, [["__scopeId", "data-v-52907777"]]), Y = /* @__
|
|
|
284
254
|
_: 3
|
|
285
255
|
}));
|
|
286
256
|
}
|
|
287
|
-
}),
|
|
257
|
+
}), ve = /* @__PURE__ */ b({
|
|
288
258
|
__name: "ToolAnnotationImage",
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
292
|
-
|
|
293
|
-
|
|
294
|
-
|
|
259
|
+
emits: ["change"],
|
|
260
|
+
setup(t, { emit: n }) {
|
|
261
|
+
const { t: e } = N(), a = n, o = () => {
|
|
262
|
+
const l = document.createElement("input");
|
|
263
|
+
l.type = "file", l.accept = "image/*", l.onchange = (u) => {
|
|
264
|
+
const f = u.target.files?.[0];
|
|
265
|
+
a("change", f);
|
|
266
|
+
}, l.click();
|
|
295
267
|
};
|
|
296
|
-
return (
|
|
268
|
+
return (l, u) => l.$slots.default ? d(l.$slots, "default", {
|
|
297
269
|
key: 0,
|
|
298
|
-
onClick:
|
|
299
|
-
}) : (
|
|
300
|
-
content:
|
|
301
|
-
|
|
270
|
+
onClick: o
|
|
271
|
+
}) : (s(), c(E, { key: 1 }, {
|
|
272
|
+
content: i(() => [
|
|
273
|
+
O(S(h(e)("annotationImageTooltip")), 1)
|
|
302
274
|
]),
|
|
303
|
-
default:
|
|
304
|
-
|
|
305
|
-
"aria-label": h(
|
|
275
|
+
default: i(() => [
|
|
276
|
+
p(B, {
|
|
277
|
+
"aria-label": h(e)("annotationImageLabel"),
|
|
306
278
|
class: "vpv-toolbar-btn",
|
|
307
|
-
onClick:
|
|
279
|
+
onClick: o
|
|
308
280
|
}, {
|
|
309
|
-
default:
|
|
310
|
-
|
|
311
|
-
|
|
281
|
+
default: i(() => [
|
|
282
|
+
d(l.$slots, "icon", {}, () => [
|
|
283
|
+
p(L, { name: "tool-image" })
|
|
312
284
|
])
|
|
313
285
|
]),
|
|
314
286
|
_: 3
|
|
@@ -317,10 +289,152 @@ const fe = /* @__PURE__ */ D(ge, [["__scopeId", "data-v-52907777"]]), Y = /* @__
|
|
|
317
289
|
_: 3
|
|
318
290
|
}));
|
|
319
291
|
}
|
|
320
|
-
}),
|
|
292
|
+
}), me = {
|
|
293
|
+
aliceblue: "#f0f8ff",
|
|
294
|
+
antiquewhite: "#faebd7",
|
|
295
|
+
aqua: "#00ffff",
|
|
296
|
+
aquamarine: "#7fffd4",
|
|
297
|
+
azure: "#f0ffff",
|
|
298
|
+
beige: "#f5f5dc",
|
|
299
|
+
bisque: "#ffe4c4",
|
|
300
|
+
black: "#000000",
|
|
301
|
+
blanchedalmond: "#ffebcd",
|
|
302
|
+
blue: "#0000ff",
|
|
303
|
+
blueviolet: "#8a2be2",
|
|
304
|
+
brown: "#a52a2a",
|
|
305
|
+
burlywood: "#deb887",
|
|
306
|
+
cadetblue: "#5f9ea0",
|
|
307
|
+
chartreuse: "#7fff00",
|
|
308
|
+
chocolate: "#d2691e",
|
|
309
|
+
coral: "#ff7f50",
|
|
310
|
+
cornflowerblue: "#6495ed",
|
|
311
|
+
cornsilk: "#fff8dc",
|
|
312
|
+
crimson: "#dc143c",
|
|
313
|
+
cyan: "#00ffff",
|
|
314
|
+
darkblue: "#00008b",
|
|
315
|
+
darkcyan: "#008b8b",
|
|
316
|
+
darkgoldenrod: "#b8860b",
|
|
317
|
+
darkgray: "#a9a9a9",
|
|
318
|
+
darkgreen: "#006400",
|
|
319
|
+
darkkhaki: "#bdb76b",
|
|
320
|
+
darkmagenta: "#8b008b",
|
|
321
|
+
darkolivegreen: "#556b2f",
|
|
322
|
+
darkorange: "#ff8c00",
|
|
323
|
+
darkorchid: "#9932cc",
|
|
324
|
+
darkred: "#8b0000",
|
|
325
|
+
darksalmon: "#e9967a",
|
|
326
|
+
darkseagreen: "#8fbc8f",
|
|
327
|
+
darkslateblue: "#483d8b",
|
|
328
|
+
darkslategray: "#2f4f4f",
|
|
329
|
+
darkturquoise: "#00ced1",
|
|
330
|
+
darkviolet: "#9400d3",
|
|
331
|
+
deeppink: "#ff1493",
|
|
332
|
+
deepskyblue: "#00bfff",
|
|
333
|
+
dimgray: "#696969",
|
|
334
|
+
dodgerblue: "#1e90ff",
|
|
335
|
+
firebrick: "#b22222",
|
|
336
|
+
floralwhite: "#fffaf0",
|
|
337
|
+
forestgreen: "#228b22",
|
|
338
|
+
fuchsia: "#ff00ff",
|
|
339
|
+
gainsboro: "#dcdcdc",
|
|
340
|
+
ghostwhite: "#f8f8ff",
|
|
341
|
+
gold: "#ffd700",
|
|
342
|
+
goldenrod: "#daa520",
|
|
343
|
+
gray: "#808080",
|
|
344
|
+
green: "#008000",
|
|
345
|
+
greenyellow: "#adff2f",
|
|
346
|
+
honeydew: "#f0fff0",
|
|
347
|
+
hotpink: "#ff69b4",
|
|
348
|
+
"indianred ": "#cd5c5c",
|
|
349
|
+
indigo: "#4b0082",
|
|
350
|
+
ivory: "#fffff0",
|
|
351
|
+
khaki: "#f0e68c",
|
|
352
|
+
lavender: "#e6e6fa",
|
|
353
|
+
lavenderblush: "#fff0f5",
|
|
354
|
+
lawngreen: "#7cfc00",
|
|
355
|
+
lemonchiffon: "#fffacd",
|
|
356
|
+
lightblue: "#add8e6",
|
|
357
|
+
lightcoral: "#f08080",
|
|
358
|
+
lightcyan: "#e0ffff",
|
|
359
|
+
lightgoldenrodyellow: "#fafad2",
|
|
360
|
+
lightgrey: "#d3d3d3",
|
|
361
|
+
lightgreen: "#90ee90",
|
|
362
|
+
lightpink: "#ffb6c1",
|
|
363
|
+
lightsalmon: "#ffa07a",
|
|
364
|
+
lightseagreen: "#20b2aa",
|
|
365
|
+
lightskyblue: "#87cefa",
|
|
366
|
+
lightslategray: "#778899",
|
|
367
|
+
lightsteelblue: "#b0c4de",
|
|
368
|
+
lightyellow: "#ffffe0",
|
|
369
|
+
lime: "#00ff00",
|
|
370
|
+
limegreen: "#32cd32",
|
|
371
|
+
linen: "#faf0e6",
|
|
372
|
+
magenta: "#ff00ff",
|
|
373
|
+
maroon: "#800000",
|
|
374
|
+
mediumaquamarine: "#66cdaa",
|
|
375
|
+
mediumblue: "#0000cd",
|
|
376
|
+
mediumorchid: "#ba55d3",
|
|
377
|
+
mediumpurple: "#9370d8",
|
|
378
|
+
mediumseagreen: "#3cb371",
|
|
379
|
+
mediumslateblue: "#7b68ee",
|
|
380
|
+
mediumspringgreen: "#00fa9a",
|
|
381
|
+
mediumturquoise: "#48d1cc",
|
|
382
|
+
mediumvioletred: "#c71585",
|
|
383
|
+
midnightblue: "#191970",
|
|
384
|
+
mintcream: "#f5fffa",
|
|
385
|
+
mistyrose: "#ffe4e1",
|
|
386
|
+
moccasin: "#ffe4b5",
|
|
387
|
+
navajowhite: "#ffdead",
|
|
388
|
+
navy: "#000080",
|
|
389
|
+
oldlace: "#fdf5e6",
|
|
390
|
+
olive: "#808000",
|
|
391
|
+
olivedrab: "#6b8e23",
|
|
392
|
+
orange: "#ffa500",
|
|
393
|
+
orangered: "#ff4500",
|
|
394
|
+
orchid: "#da70d6",
|
|
395
|
+
palegoldenrod: "#eee8aa",
|
|
396
|
+
palegreen: "#98fb98",
|
|
397
|
+
paleturquoise: "#afeeee",
|
|
398
|
+
palevioletred: "#d87093",
|
|
399
|
+
papayawhip: "#ffefd5",
|
|
400
|
+
peachpuff: "#ffdab9",
|
|
401
|
+
peru: "#cd853f",
|
|
402
|
+
pink: "#ffc0cb",
|
|
403
|
+
plum: "#dda0dd",
|
|
404
|
+
powderblue: "#b0e0e6",
|
|
405
|
+
purple: "#800080",
|
|
406
|
+
rebeccapurple: "#663399",
|
|
407
|
+
red: "#ff0000",
|
|
408
|
+
rosybrown: "#bc8f8f",
|
|
409
|
+
royalblue: "#4169e1",
|
|
410
|
+
saddlebrown: "#8b4513",
|
|
411
|
+
salmon: "#fa8072",
|
|
412
|
+
sandybrown: "#f4a460",
|
|
413
|
+
seagreen: "#2e8b57",
|
|
414
|
+
seashell: "#fff5ee",
|
|
415
|
+
sienna: "#a0522d",
|
|
416
|
+
silver: "#c0c0c0",
|
|
417
|
+
skyblue: "#87ceeb",
|
|
418
|
+
slateblue: "#6a5acd",
|
|
419
|
+
slategray: "#708090",
|
|
420
|
+
snow: "#fffafa",
|
|
421
|
+
springgreen: "#00ff7f",
|
|
422
|
+
steelblue: "#4682b4",
|
|
423
|
+
tan: "#d2b48c",
|
|
424
|
+
teal: "#008080",
|
|
425
|
+
thistle: "#d8bfd8",
|
|
426
|
+
tomato: "#ff6347",
|
|
427
|
+
turquoise: "#40e0d0",
|
|
428
|
+
violet: "#ee82ee",
|
|
429
|
+
wheat: "#f5deb3",
|
|
430
|
+
white: "#ffffff",
|
|
431
|
+
whitesmoke: "#f5f5f5",
|
|
432
|
+
yellow: "#ffff00",
|
|
433
|
+
yellowgreen: "#9acd32"
|
|
434
|
+
}, he = (t) => t.startsWith("#") || t.startsWith("0x") ? t : me[t] || t, be = { class: "vpv-annotation-tools-container" }, _e = {
|
|
321
435
|
key: 0,
|
|
322
436
|
class: "vpv-annotation-tools"
|
|
323
|
-
},
|
|
437
|
+
}, ke = {
|
|
324
438
|
highlight: {
|
|
325
439
|
type: [Object, Boolean],
|
|
326
440
|
default: () => !0
|
|
@@ -341,180 +455,184 @@ const fe = /* @__PURE__ */ D(ge, [["__scopeId", "data-v-52907777"]]), Y = /* @__
|
|
|
341
455
|
type: Number,
|
|
342
456
|
required: !0
|
|
343
457
|
}
|
|
344
|
-
},
|
|
458
|
+
}, ye = /* @__PURE__ */ b({
|
|
345
459
|
__name: "VPdfAnnotationTools",
|
|
346
|
-
props:
|
|
347
|
-
emits: ["highlight", "freeText", "signature"],
|
|
348
|
-
setup(
|
|
349
|
-
const e =
|
|
460
|
+
props: ke,
|
|
461
|
+
emits: ["highlight", "freeText", "signature", "image"],
|
|
462
|
+
setup(t, { emit: n }) {
|
|
463
|
+
const e = t, a = n, o = (r) => ie(e.instanceId, r), l = {
|
|
350
464
|
highlight: new CustomEvent(
|
|
351
|
-
|
|
465
|
+
o(A.highlight),
|
|
352
466
|
{
|
|
353
|
-
detail: {
|
|
467
|
+
detail: {
|
|
468
|
+
active: !1,
|
|
469
|
+
colors: null
|
|
470
|
+
}
|
|
354
471
|
}
|
|
355
472
|
),
|
|
356
473
|
freeText: new CustomEvent(
|
|
357
|
-
|
|
474
|
+
o(A.freeText),
|
|
358
475
|
{
|
|
359
476
|
detail: { active: !1 }
|
|
360
477
|
}
|
|
361
478
|
),
|
|
362
479
|
signature: new CustomEvent(
|
|
363
|
-
|
|
480
|
+
o(A.signature),
|
|
364
481
|
{
|
|
365
482
|
detail: { active: !1 }
|
|
366
483
|
}
|
|
367
484
|
),
|
|
368
|
-
image: new CustomEvent(
|
|
369
|
-
detail: {
|
|
485
|
+
image: new CustomEvent(o(A.image), {
|
|
486
|
+
detail: { file: void 0 }
|
|
370
487
|
})
|
|
371
|
-
},
|
|
488
|
+
}, u = z(!1), f = te({
|
|
372
489
|
highlight: !1,
|
|
373
490
|
freeText: !1,
|
|
374
491
|
signature: !1
|
|
375
|
-
}),
|
|
376
|
-
get: () =>
|
|
377
|
-
set: (
|
|
378
|
-
|
|
492
|
+
}), T = g({
|
|
493
|
+
get: () => f.highlight,
|
|
494
|
+
set: (r) => {
|
|
495
|
+
f.highlight = r, r && (f.freeText = !1, f.signature = !1), V();
|
|
379
496
|
}
|
|
380
|
-
}),
|
|
381
|
-
get: () =>
|
|
382
|
-
set: (
|
|
383
|
-
|
|
497
|
+
}), _ = g({
|
|
498
|
+
get: () => f.freeText,
|
|
499
|
+
set: (r) => {
|
|
500
|
+
r && (f.highlight = !1, f.signature = !1), f.freeText = r, V();
|
|
384
501
|
}
|
|
385
|
-
}),
|
|
386
|
-
get: () =>
|
|
387
|
-
set: (
|
|
388
|
-
|
|
502
|
+
}), q = g({
|
|
503
|
+
get: () => f.signature,
|
|
504
|
+
set: (r) => {
|
|
505
|
+
r && (f.highlight = !1, f.freeText = !1), f.signature = r, V();
|
|
389
506
|
}
|
|
390
|
-
}),
|
|
391
|
-
|
|
392
|
-
},
|
|
393
|
-
|
|
394
|
-
},
|
|
395
|
-
|
|
396
|
-
},
|
|
397
|
-
|
|
398
|
-
},
|
|
399
|
-
|
|
507
|
+
}), R = g(() => e.highlight), D = g(() => e.freeText), Y = g(() => e.signature), G = g(() => e.image), W = (r) => {
|
|
508
|
+
u.value = r, r || (T.value = !1, _.value = !1, q.value = !1);
|
|
509
|
+
}, K = (r) => {
|
|
510
|
+
a("highlight", r), l.highlight.detail.active = r, l.highlight.detail.colors = (e.highlight?.colors?.map(he) ?? Object.values(j)).slice(0, 6), window.dispatchEvent(l.highlight);
|
|
511
|
+
}, Z = (r) => {
|
|
512
|
+
a("freeText", r), l.freeText.detail.active = r, window.dispatchEvent(l.freeText);
|
|
513
|
+
}, J = (r) => {
|
|
514
|
+
a("signature", r), l.signature.detail.active = r, window.dispatchEvent(l.signature);
|
|
515
|
+
}, Q = (r) => {
|
|
516
|
+
a("image", r), l.image.detail.file = r, window.dispatchEvent(l.image);
|
|
400
517
|
};
|
|
401
|
-
function
|
|
402
|
-
|
|
518
|
+
function V() {
|
|
519
|
+
K(T.value), Z(_.value), J(q.value);
|
|
403
520
|
}
|
|
404
|
-
return (
|
|
405
|
-
|
|
406
|
-
|
|
407
|
-
default:
|
|
408
|
-
|
|
409
|
-
|
|
521
|
+
return (r, w) => (s(), I("div", be, [
|
|
522
|
+
p(ce, { onToggle: W }),
|
|
523
|
+
p(ae, { name: "slide" }, {
|
|
524
|
+
default: i(() => [
|
|
525
|
+
u.value ? (s(), I("div", _e, [
|
|
526
|
+
R.value ? (s(), c(fe, {
|
|
410
527
|
key: 0,
|
|
411
|
-
active:
|
|
412
|
-
"onUpdate:active":
|
|
413
|
-
|
|
414
|
-
},
|
|
415
|
-
e.highlight?.props?.icon ? {
|
|
528
|
+
active: T.value,
|
|
529
|
+
"onUpdate:active": w[0] || (w[0] = (v) => T.value = v),
|
|
530
|
+
colors: e.highlight?.colors
|
|
531
|
+
}, C({ _: 2 }, [
|
|
532
|
+
e.highlight?.component?.props?.icon ? {
|
|
416
533
|
name: "icon",
|
|
417
|
-
fn:
|
|
418
|
-
(
|
|
534
|
+
fn: i(() => [
|
|
535
|
+
(s(), c(m(e.highlight.component.props.icon)))
|
|
419
536
|
]),
|
|
420
537
|
key: "0"
|
|
421
|
-
} : typeof e.highlight == "object" ? {
|
|
538
|
+
} : typeof e.highlight == "object" && e.highlight.component ? {
|
|
422
539
|
name: "default",
|
|
423
|
-
fn:
|
|
424
|
-
(
|
|
540
|
+
fn: i(({ onClick: v }) => [
|
|
541
|
+
(s(), c(m(e.highlight.component), { onClick: v }, null, 8, ["onClick"]))
|
|
425
542
|
]),
|
|
426
543
|
key: "1"
|
|
427
544
|
} : void 0
|
|
428
|
-
]), 1032, ["active"])) :
|
|
429
|
-
|
|
545
|
+
]), 1032, ["active", "colors"])) : $("", !0),
|
|
546
|
+
D.value ? (s(), c(pe, {
|
|
430
547
|
key: 1,
|
|
431
|
-
active:
|
|
432
|
-
"onUpdate:active":
|
|
433
|
-
},
|
|
548
|
+
active: _.value,
|
|
549
|
+
"onUpdate:active": w[1] || (w[1] = (v) => _.value = v)
|
|
550
|
+
}, C({ _: 2 }, [
|
|
434
551
|
e.freeText?.props?.icon ? {
|
|
435
552
|
name: "icon",
|
|
436
|
-
fn:
|
|
437
|
-
(
|
|
553
|
+
fn: i(() => [
|
|
554
|
+
(s(), c(m(e.freeText.props.icon)))
|
|
438
555
|
]),
|
|
439
556
|
key: "0"
|
|
440
557
|
} : typeof e.freeText == "object" ? {
|
|
441
558
|
name: "default",
|
|
442
|
-
fn:
|
|
443
|
-
(
|
|
559
|
+
fn: i(({ onClick: v }) => [
|
|
560
|
+
(s(), c(m(e.freeText), { onClick: v }, null, 8, ["onClick"]))
|
|
444
561
|
]),
|
|
445
562
|
key: "1"
|
|
446
563
|
} : void 0
|
|
447
|
-
]), 1032, ["active"])) :
|
|
448
|
-
|
|
564
|
+
]), 1032, ["active"])) : $("", !0),
|
|
565
|
+
G.value ? (s(), c(ve, {
|
|
566
|
+
key: 2,
|
|
567
|
+
onChange: Q
|
|
568
|
+
}, C({ _: 2 }, [
|
|
449
569
|
e.image?.props?.icon ? {
|
|
450
570
|
name: "icon",
|
|
451
|
-
fn:
|
|
452
|
-
(
|
|
571
|
+
fn: i(() => [
|
|
572
|
+
(s(), c(m(e.image.props.icon)))
|
|
453
573
|
]),
|
|
454
574
|
key: "0"
|
|
455
575
|
} : typeof e.image == "object" ? {
|
|
456
576
|
name: "default",
|
|
457
|
-
fn:
|
|
458
|
-
(
|
|
577
|
+
fn: i(({ onClick: v }) => [
|
|
578
|
+
(s(), c(m(e.image), { onClick: v }, null, 8, ["onClick"]))
|
|
459
579
|
]),
|
|
460
580
|
key: "1"
|
|
461
581
|
} : void 0
|
|
462
|
-
]), 1024)) :
|
|
463
|
-
|
|
582
|
+
]), 1024)) : $("", !0),
|
|
583
|
+
Y.value ? (s(), c(ge, {
|
|
464
584
|
key: 3,
|
|
465
|
-
active:
|
|
466
|
-
"onUpdate:active":
|
|
467
|
-
},
|
|
585
|
+
active: q.value,
|
|
586
|
+
"onUpdate:active": w[2] || (w[2] = (v) => q.value = v)
|
|
587
|
+
}, C({ _: 2 }, [
|
|
468
588
|
e.signature?.props?.icon ? {
|
|
469
589
|
name: "icon",
|
|
470
|
-
fn:
|
|
471
|
-
(
|
|
590
|
+
fn: i(() => [
|
|
591
|
+
(s(), c(m(e.signature.props.icon)))
|
|
472
592
|
]),
|
|
473
593
|
key: "0"
|
|
474
594
|
} : typeof e.signature == "object" ? {
|
|
475
595
|
name: "default",
|
|
476
|
-
fn:
|
|
477
|
-
(
|
|
596
|
+
fn: i(({ onClick: v }) => [
|
|
597
|
+
(s(), c(m(e.signature), { onClick: v }, null, 8, ["onClick"]))
|
|
478
598
|
]),
|
|
479
599
|
key: "1"
|
|
480
600
|
} : void 0
|
|
481
|
-
]), 1032, ["active"])) :
|
|
482
|
-
])) :
|
|
601
|
+
]), 1032, ["active"])) : $("", !0)
|
|
602
|
+
])) : $("", !0)
|
|
483
603
|
]),
|
|
484
604
|
_: 1
|
|
485
605
|
})
|
|
486
606
|
]));
|
|
487
607
|
}
|
|
488
608
|
});
|
|
489
|
-
const
|
|
490
|
-
const { highlight:
|
|
609
|
+
const Te = /* @__PURE__ */ M(ye, [["__scopeId", "data-v-1d37828e"]]), $e = (t = {}) => {
|
|
610
|
+
const { highlight: n, freeText: e, signature: a, image: o } = t;
|
|
491
611
|
return {
|
|
492
612
|
name: "annotation",
|
|
493
|
-
setup(
|
|
494
|
-
const { componentInstance:
|
|
495
|
-
|
|
496
|
-
id:
|
|
613
|
+
setup(l) {
|
|
614
|
+
const { componentInstance: u, shared: f } = l, T = u?.uid ?? 0;
|
|
615
|
+
l.toolbar.addItem({
|
|
616
|
+
id: oe.ANNOTATIONS,
|
|
497
617
|
toolbarDirection: "left",
|
|
498
|
-
component:
|
|
499
|
-
highlight:
|
|
618
|
+
component: ne(Te, {
|
|
619
|
+
highlight: n,
|
|
500
620
|
freeText: !1,
|
|
501
621
|
signature: !1,
|
|
502
|
-
image:
|
|
503
|
-
instanceId:
|
|
622
|
+
image: o,
|
|
623
|
+
instanceId: T
|
|
504
624
|
})
|
|
505
625
|
});
|
|
506
|
-
const
|
|
507
|
-
|
|
508
|
-
"VPdfAnnotationPlugin - Provided UI context at plugin level"
|
|
509
|
-
)) : console.warn(
|
|
626
|
+
const _ = u?.appContext.app;
|
|
627
|
+
f.ui ? _.provide(P, f.ui) : console.warn(
|
|
510
628
|
"VPdfAnnotationPlugin - No UI context found in plugin context"
|
|
511
|
-
),
|
|
629
|
+
), f.localization?.value ? _.provide(H, f.localization) : console.warn(
|
|
512
630
|
"VPdfAnnotationPlugin - No localization found in plugin context"
|
|
513
631
|
);
|
|
514
632
|
}
|
|
515
633
|
};
|
|
516
634
|
};
|
|
517
635
|
export {
|
|
518
|
-
|
|
519
|
-
|
|
636
|
+
Te as VPdfAnnotationTools,
|
|
637
|
+
$e as default
|
|
520
638
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".vp-text-xl[data-v-c6e40782]{font-size:1.25rem;line-height:1.75rem}.vpv-toolbar-btn.vpv-toolbar-btn-active[data-v-
|
|
2
|
-
(function(m,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(m=typeof globalThis<"u"?globalThis:m||self,e(m["@vue-pdf-viewer/annotation"]={},m.Vue))})(this,function(m,e){"use strict";var _;(function(l){l.highlight="vpv:annotation:highlight",l.freeText="vpv:annotation:freeText",l.signature="vpv:annotation:signature",l.image="vpv:annotation:image"})(_||(_={}));var x;(function(l){l.Purple="#7862FF",l.Cyan="#3FE9E3",l.Red="#F87777",l.Orange="#FE9639",l.Yellow="#FBDA15",l.Green="#88F526"})(x||(x={}));const I={ANNOTATIONS:"annotations"},k=Symbol("VPV Shared UIs"),S=Symbol("VPV Current Localization"),M=(l,o)=>`${l}-${o}`,C=e.defineComponent({__name:"AppTooltip",setup(l){const o=e.inject(k),t=e.computed(()=>o?.AppTooltip);return(n,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},n.$attrs)),e.createSlots({default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:2},[e.renderList(n.$slots,(c,s)=>({name:s,fn:e.withCtx(()=>[e.renderSlot(n.$slots,s)])}))]),1040)):(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.mergeProps({key:1},n.$attrs)),[e.renderSlot(n.$slots,"default")],16))}}),w=e.defineComponent({__name:"AppButton",setup(l){const o=e.inject(k),t=e.computed(()=>o?.AppButton);return(n,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},n.$attrs)),{default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},n.$attrs)),[e.renderSlot(n.$slots,"default")],16))}}),j=(l,o)=>{const t=l[o];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((n,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+o)))})},D=e.defineComponent({__name:"Icon",props:{name:{}},setup(l){const o=l,t=e.defineAsyncComponent({loader:()=>j(Object.assign({"../assets/icons/annotations.svg":()=>Promise.resolve().then(()=>ee),"../assets/icons/tool-comment.svg":()=>Promise.resolve().then(()=>oe),"../assets/icons/tool-free-text.svg":()=>Promise.resolve().then(()=>le),"../assets/icons/tool-highlight.svg":()=>Promise.resolve().then(()=>re),"../assets/icons/tool-image.svg":()=>Promise.resolve().then(()=>ce),"../assets/icons/tool-signature.svg":()=>Promise.resolve().then(()=>pe)}),`../assets/icons/${o.name}.svg`)});return(n,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),{class:"vp-text-xl"}))}}),we="",b=(l,o)=>{const t=l.__vccOpts||l;for(const[n,a]of o)t[n]=a;return t},y=b(D,[["__scopeId","data-v-c6e40782"]]),B=()=>{const l=e.inject(S,e.computed(()=>({})));return{t:e.computed(()=>t=>{const n=t.split(".").pop()||t;return l.value&&n in l.value?l.value[n]:(console.warn(`useLocalization - Translation not found for key: ${t}`),t)}).value,currentLocale:e.computed(()=>l.value)}},L=e.defineComponent({__name:"ToolAnnotation",emits:["toggle"],setup(l,{emit:o}){const{t}=B(),n=o,a=e.ref(!1),c=()=>{a.value=!a.value,n("toggle",a.value)};return(s,i)=>s.$slots.default?e.renderSlot(s.$slots,"default",{key:0,onClick:c},void 0,!0):(e.openBlock(),e.createBlock(C,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(a.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(w,{"aria-label":a.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":a.value}]),onClick:c},{default:e.withCtx(()=>[e.createVNode(y,{name:"annotations",class:"vp-text-xl"})]),_:1},8,["aria-label","class"])]),_:1}))}}),ye="",H=b(L,[["__scopeId","data-v-52907777"]]),$=e.defineComponent({__name:"AppPopover",setup(l){const o=e.inject(k),t=e.computed(()=>o?.AppPopover);return(n,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},n.$attrs)),{trigger:e.withCtx(()=>[e.renderSlot(n.$slots,"trigger")]),default:e.withCtx(()=>[e.renderSlot(n.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},n.$attrs)),[e.renderSlot(n.$slots,"default")],16))}}),F=e.defineComponent({__name:"AppHighlightColorPicker",setup(l){const o=e.inject(k),t=e.computed(()=>o?.AppHighlightColorPicker);return(n,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},n.$attrs)),null,16)):e.createCommentVNode("",!0)}}),U={class:"vpv-annotation-highlight__color-picker-wrapper"},q=e.defineComponent({__name:"ToolAnnotationHighlight",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:e.mergeModels(["change"],["update:active"]),setup(l,{emit:o}){const t=e.useModel(l,"active"),n=e.ref(!1),a=o,{t:c}=B(),s=e.ref(x.Purple),i=()=>{!t.value&&!n.value&&(n.value=!0),t.value=!t.value},f=d=>{n.value=!1};return e.watchEffect(()=>{!t.value||a("change",s.value)}),(d,h)=>d.$slots.default?e.renderSlot(d.$slots,"default",{key:0,onClick:i}):(e.openBlock(),e.createBlock($,{key:1,open:n.value,side:"right",sideOffset:10,onInteractOutside:f},{trigger:e.withCtx(()=>[e.createVNode(C,null,{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(c)("annotationHighlightTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(w,{"aria-label":e.unref(c)("annotationHighlightLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":t.value}]),onClick:i},{default:e.withCtx(()=>[e.renderSlot(d.$slots,"icon",{},()=>[e.createVNode(y,{name:"tool-highlight"})])]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createElementVNode("div",U,[e.createElementVNode("p",null,e.toDisplayString(e.unref(c)("annotationHighlightColorPickerLabel")),1),e.createVNode(F,{color:s.value,"onUpdate:color":h[0]||(h[0]=u=>s.value=u)},null,8,["color"])])]),_:3},8,["open"]))}}),R=e.defineComponent({__name:"AppSignatures",setup(l){const o=e.inject(k),t=e.computed(()=>o?.AppSignatures);return(n,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},n.$attrs)),null,16)):e.createCommentVNode("",!0)}}),Y=e.defineComponent({__name:"ToolAnnotationSignature",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(l){const o=e.useModel(l,"active"),{t}=B(),n=e.ref(!1),a=()=>{!o.value&&!n.value&&(n.value=!0),o.value=!o.value},c=s=>{n.value=!1};return(s,i)=>s.$slots.default?e.renderSlot(s.$slots,"default",{key:0,onClick:a}):(e.openBlock(),e.createBlock($,{key:1,open:n.value,side:"right",sideOffset:10,class:"vpv-annotation-signatures__popover",onInteractOutside:c},{trigger:e.withCtx(()=>[e.createVNode(C,null,{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationSignatureTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(w,{"aria-label":e.unref(t)("annotationSignatureLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:a},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"icon",{},()=>[e.createVNode(y,{name:"tool-signature"})])]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createVNode(R)]),_:3},8,["open"]))}}),G=e.defineComponent({__name:"ToolAnnotationFreeText",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(l){const o=e.useModel(l,"active"),{t}=B(),n=()=>{o.value=!o.value};return(a,c)=>a.$slots.default?e.renderSlot(a.$slots,"default",{key:0,onClick:n}):(e.openBlock(),e.createBlock(C,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationFreeTextTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(w,{"aria-label":e.unref(t)("annotationFreeTextLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:n},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"icon",{},()=>[e.createVNode(y,{name:"tool-free-text"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),K=e.defineComponent({__name:"ToolAnnotationImage",setup(l){const{t:o}=B(),t=()=>{const n=document.createElement("input");n.type="file",n.accept="image/*",n.onchange=a=>{a.target.files?.[0]},n.click()};return(n,a)=>n.$slots.default?e.renderSlot(n.$slots,"default",{key:0,onClick:t}):(e.openBlock(),e.createBlock(C,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(o)("annotationImageTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(w,{"aria-label":e.unref(o)("annotationImageLabel"),class:"vpv-toolbar-btn",onClick:t},{default:e.withCtx(()=>[e.renderSlot(n.$slots,"icon",{},()=>[e.createVNode(y,{name:"tool-image"})])]),_:3},8,["aria-label"])]),_:3}))}}),Z={class:"vpv-annotation-tools-container"},J={key:0,class:"vpv-annotation-tools"},Q={highlight:{type:[Object,Boolean],default:()=>!0},freeText:{type:[Object,Boolean],default:()=>!0},signature:{type:[Object,Boolean],default:()=>!0},image:{type:[Object,Boolean],default:()=>!0},instanceId:{type:Number,required:!0}},W=e.defineComponent({__name:"VPdfAnnotationTools",props:Q,emits:["highlight","freeText","signature"],setup(l,{emit:o}){const t=l,n=o,a=r=>M(t.instanceId,r),c={highlight:new CustomEvent(a(_.highlight),{detail:{active:!1,color:null}}),freeText:new CustomEvent(a(_.freeText),{detail:{active:!1}}),signature:new CustomEvent(a(_.signature),{detail:{active:!1}}),image:new CustomEvent(a(_.image),{detail:{active:!1}})},s=e.ref(!1),i=e.reactive({highlight:!1,freeText:!1,signature:!1}),f=e.ref(null),d=e.computed({get:()=>i.highlight,set:r=>{i.highlight=r,r?(i.freeText=!1,i.signature=!1):(f.value=null,T())}}),h=e.computed({get:()=>i.freeText,set:r=>{r&&(i.highlight=!1,i.signature=!1),i.freeText=r,T()}}),u=e.computed({get:()=>i.signature,set:r=>{r&&(i.highlight=!1,i.freeText=!1),i.signature=r,T()}}),de=e.computed(()=>t.highlight),me=e.computed(()=>t.freeText),fe=e.computed(()=>t.signature),ge=e.computed(()=>t.image),he=r=>{s.value=r,r||(d.value=!1,h.value=!1,u.value=!1,f.value=null)},_e=r=>{f.value=r,T()},ke=(r,g)=>{n("highlight",r),c.highlight.detail.active=r,c.highlight.detail.color=g,window.dispatchEvent(c.highlight)},ue=r=>{n("freeText",r),c.freeText.detail.active=r,window.dispatchEvent(c.freeText)},Ce=r=>{n("signature",r),c.signature.detail.active=r,window.dispatchEvent(c.signature)};function T(){ke(d.value,f.value),ue(h.value),Ce(u.value)}return(r,g)=>(e.openBlock(),e.createElementBlock("div",Z,[e.createVNode(H,{onToggle:he}),e.createVNode(e.Transition,{name:"slide"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",J,[de.value?(e.openBlock(),e.createBlock(q,{key:0,active:d.value,"onUpdate:active":g[0]||(g[0]=p=>d.value=p),onChange:_e},e.createSlots({_:2},[t.highlight?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight.props.icon)))]),key:"0"}:typeof t.highlight=="object"?{name:"default",fn:e.withCtx(({onClick:p})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight),{onClick:p},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0),me.value?(e.openBlock(),e.createBlock(G,{key:1,active:h.value,"onUpdate:active":g[1]||(g[1]=p=>h.value=p)},e.createSlots({_:2},[t.freeText?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText.props.icon)))]),key:"0"}:typeof t.freeText=="object"?{name:"default",fn:e.withCtx(({onClick:p})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText),{onClick:p},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0),ge.value?(e.openBlock(),e.createBlock(K,{key:2},e.createSlots({_:2},[t.image?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.image.props.icon)))]),key:"0"}:typeof t.image=="object"?{name:"default",fn:e.withCtx(({onClick:p})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.image),{onClick:p},null,8,["onClick"]))]),key:"1"}:void 0]),1024)):e.createCommentVNode("",!0),fe.value?(e.openBlock(),e.createBlock(Y,{key:3,active:u.value,"onUpdate:active":g[2]||(g[2]=p=>u.value=p)},e.createSlots({_:2},[t.signature?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.signature.props.icon)))]),key:"0"}:typeof t.signature=="object"?{name:"default",fn:e.withCtx(({onClick:p})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.signature),{onClick:p},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})]))}}),Be="",V=b(W,[["__scopeId","data-v-a94f1d40"]]),X=(l={})=>{const{highlight:o,freeText:t,signature:n,image:a}=l;return{name:"annotation",setup(c){const{componentInstance:s,shared:i}=c,f=s?.uid??0;c.toolbar.addItem({id:I.ANNOTATIONS,toolbarDirection:"left",component:e.h(V,{highlight:o,freeText:!1,signature:!1,image:a,instanceId:f})});const d=s?.appContext.app;i.ui?(d.provide(k,i.ui),console.log("VPdfAnnotationPlugin - Provided UI context at plugin level")):console.warn("VPdfAnnotationPlugin - No UI context found in plugin context"),i.localization?.value?d.provide(S,i.localization):console.warn("VPdfAnnotationPlugin - No localization found in plugin context")}}},v={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function P(l,o){return e.openBlock(),e.createElementBlock("svg",v,o[0]||(o[0]=[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.25",d:"M10 18.334a8.333 8.333 0 1 0 0-16.667 8.333 8.333 0 0 0 0 16.667"},null,-1),e.createElementVNode("path",{stroke:"currentColor","stroke-linejoin":"round","stroke-width":"1.25",d:"m5.417 17.084 1.171-4.394c.238-.892.357-1.338.694-1.597s.798-.259 1.722-.259h1.992c.923 0 1.385 0 1.722.259.337.258.456.705.693 1.597l1.172 4.394"},null,-1),e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.25",d:"M7.917 10.834 9.23 7.8c.327-.756.491-1.134.769-1.134s.441.378.77 1.134l1.313 3.033"},null,-1)]))}const ee=Object.freeze(Object.defineProperty({__proto__:null,render:P,default:{render:P}},Symbol.toStringTag,{value:"Module"})),te={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function N(l,o){return e.openBlock(),e.createElementBlock("svg",te,o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M18.125 9.688a7.82 7.82 0 0 1-7.812 7.812H3.75a1.25 1.25 0 0 1-1.25-1.25V9.688a7.812 7.812 0 0 1 15.625 0m-1.25 0a6.563 6.563 0 0 0-13.125 0v6.562h6.563a6.57 6.57 0 0 0 6.562-6.562"},null,-1),e.createElementVNode("path",{fill:"currentColor",d:"M12.5 10a.624.624 0 0 1-.625.625h-1.25v1.25a.624.624 0 1 1-1.25 0v-1.25h-1.25a.625.625 0 1 1 0-1.25h1.25v-1.25a.625.625 0 0 1 1.25 0v1.25h1.25A.625.625 0 0 1 12.5 10"},null,-1)]))}const oe=Object.freeze(Object.defineProperty({__proto__:null,render:N,default:{render:N}},Symbol.toStringTag,{value:"Module"})),ne={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function A(l,o){return e.openBlock(),e.createElementBlock("svg",ne,o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M11.458 13.75a.624.624 0 1 0 0-1.25h-.625v-5h2.5v.625a.625.625 0 0 0 1.25 0v-1.25a.625.625 0 0 0-.625-.625h-7.5a.625.625 0 0 0-.625.625v1.25a.625.625 0 0 0 1.25 0V7.5h2.5v5h-.625a.625.625 0 1 0 0 1.25z"},null,-1),e.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M3.125 3.75c0-.115.093-.208.208-.208h13.334c.115 0 .208.093.208.208v2.917a.625.625 0 1 0 1.25 0V3.75c0-.805-.653-1.458-1.458-1.458H3.333c-.805 0-1.458.653-1.458 1.458v3.334a.625.625 0 1 0 1.25 0zm0 12.5c0 .115.093.209.208.209h13.334a.21.21 0 0 0 .208-.209v-2.916a.625.625 0 1 1 1.25 0v2.916c0 .806-.653 1.459-1.458 1.459H3.333a1.46 1.46 0 0 1-1.458-1.459v-3.333a.625.625 0 1 1 1.25 0zM2.5 8.542c.345 0 .625.28.625.625v1.667a.625.625 0 0 1-1.25 0V9.167c0-.345.28-.625.625-.625m15.625.625a.625.625 0 1 0-1.25 0v1.667a.625.625 0 0 0 1.25 0z","clip-rule":"evenodd"},null,-1)]))}const le=Object.freeze(Object.defineProperty({__proto__:null,render:A,default:{render:A}},Symbol.toStringTag,{value:"Module"})),ae={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function E(l,o){return e.openBlock(),e.createElementBlock("svg",ae,o[0]||(o[0]=[e.createElementVNode("g",{"clip-path":"url(#a)"},[e.createElementVNode("path",{fill:"currentColor",d:"M19.818 8.308a.625.625 0 0 0-.885 0L15 12.242 8.384 5.625l3.934-3.932a.626.626 0 0 0-.885-.885L7.5 4.742a1.25 1.25 0 0 0-.22 1.47L5.625 7.866a1.25 1.25 0 0 0 0 1.767l.367.366-4.559 4.558a.625.625 0 0 0 .245 1.035l5.625 1.875a.62.62 0 0 0 .437-.015.6.6 0 0 0 .203-.136l2.682-2.683.367.366a1.25 1.25 0 0 0 1.767 0l1.656-1.654a1.25 1.25 0 0 0 1.469-.22l3.934-3.933a.626.626 0 0 0 0-.885M7.332 16.16l-4.297-1.433 3.84-3.843 2.867 2.866zm4.543-2.043L6.51 8.75l1.616-1.616 5.367 5.366z"})],-1),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:"a"},[e.createElementVNode("path",{fill:"currentColor",d:"M0 0h20v20H0z"})])],-1)]))}const re=Object.freeze(Object.defineProperty({__proto__:null,render:E,default:{render:E}},Symbol.toStringTag,{value:"Module"})),ie={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function O(l,o){return e.openBlock(),e.createElementBlock("svg",ie,o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M16.875 3.125H3.125a1.25 1.25 0 0 0-1.25 1.25v11.25a1.25 1.25 0 0 0 1.25 1.25h13.75a1.25 1.25 0 0 0 1.25-1.25V4.375a1.25 1.25 0 0 0-1.25-1.25m0 1.25v8.027l-2.037-2.036a1.25 1.25 0 0 0-1.768 0l-1.562 1.563L8.07 8.49a1.25 1.25 0 0 0-1.767 0L3.125 11.67V4.376zm-13.75 9.063 4.063-4.063 6.25 6.25H3.124zm13.75 2.187h-1.67l-2.812-2.812 1.563-1.563 2.919 2.92zM11.25 7.813a.938.938 0 1 1 1.875 0 .938.938 0 0 1-1.875 0"},null,-1)]))}const ce=Object.freeze(Object.defineProperty({__proto__:null,render:O,default:{render:O}},Symbol.toStringTag,{value:"Module"})),se={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function z(l,o){return e.openBlock(),e.createElementBlock("svg",se,o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M18.125 13.125H4.99q.313-.615.625-1.259c1.172.13 2.546-.685 4.114-2.432.391 1.051 1.13 2.416 2.39 2.441.707.014 1.414-.406 2.142-1.279.53.634 1.623 1.279 3.865 1.279a.625.625 0 1 0 0-1.25c-2.377 0-3.08-.816-3.125-1.259a.6.6 0 0 0-.426-.605.636.636 0 0 0-.723.273c-.943 1.448-1.514 1.596-1.713 1.591-.645-.012-1.301-1.525-1.526-2.61a.625.625 0 0 0-1.1-.264c-1.579 1.98-2.637 2.646-3.295 2.818.663-1.474 1.158-2.768 1.475-3.858.533-1.831.572-3.112.118-3.914-.234-.42-.73-.922-1.723-.922-1.255 0-2.245 1.186-2.716 3.254-.28 1.227-.327 2.594-.127 3.75.2 1.155.615 1.996 1.218 2.495a72 72 0 0 1-.877 1.751h-1.71a.625.625 0 1 0 0 1.25h1.048c-.884 1.64-1.572 2.784-1.583 2.803a.625.625 0 1 0 1.071.644c.012-.02.88-1.468 1.93-3.447h13.784a.625.625 0 1 0 0-1.25M4.59 5.407c.311-1.365.914-2.282 1.498-2.282.416 0 .555.145.635.287.235.416.51 1.89-1.692 6.749-.645-.881-.865-2.895-.44-4.754"},null,-1)]))}const pe=Object.freeze(Object.defineProperty({__proto__:null,render:z,default:{render:z}},Symbol.toStringTag,{value:"Module"}));m.VPdfAnnotationTools=V,m.default=X,Object.defineProperties(m,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
1
|
+
(function(){"use strict";try{if(typeof document<"u"){var t=document.createElement("style");t.appendChild(document.createTextNode(".vp-text-xl[data-v-c6e40782]{font-size:1.25rem;line-height:1.75rem}.vpv-toolbar-btn.vpv-toolbar-btn-active[data-v-7ffb5374],.vpv-toolbar-btn[data-v-7ffb5374]:hover{background-color:var(--vpv-primary-color);color:#fff}.vpv-annotation-tools-container[data-v-1d37828e]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-1d37828e] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-1d37828e],.slide-leave-active[data-v-1d37828e]{transition:all .3s ease-out}.slide-enter-from[data-v-1d37828e],.slide-leave-to[data-v-1d37828e]{opacity:0}.slide-enter-from[data-v-1d37828e],.slide-leave-to[data-v-1d37828e]{transform:translateY(-20px)}")),document.head.appendChild(t)}}catch(e){console.error("vite-plugin-css-injected-by-js",e)}})();
|
|
2
|
+
(function(f,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(f=typeof globalThis<"u"?globalThis:f||self,e(f["@vue-pdf-viewer/annotation"]={},f.Vue))})(this,function(f,e){"use strict";var m;(function(n){n.highlight="vpv:annotation:highlight",n.freeText="vpv:annotation:freeText",n.signature="vpv:annotation:signature",n.image="vpv:annotation:image"})(m||(m={}));var C;(function(n){n.Purple="#7862FF",n.Cyan="#3FE9E3",n.Red="#F87777",n.Orange="#FE9639",n.Yellow="#FBDA15",n.Green="#88F526"})(C||(C={}));const O={ANNOTATIONS:"annotations"},u=Symbol("VPV Shared UIs"),x=Symbol("VPV Current Localization"),z=(n,o)=>`${n}-${o}`,k=e.defineComponent({__name:"AppTooltip",setup(n){const o=e.inject(u),t=e.computed(()=>o?.AppTooltip);return(a,l)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),e.createSlots({default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:2},[e.renderList(a.$slots,(r,s)=>({name:s,fn:e.withCtx(()=>[e.renderSlot(a.$slots,s)])}))]),1040)):(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.mergeProps({key:1},a.$attrs)),[e.renderSlot(a.$slots,"default")],16))}}),b=e.defineComponent({__name:"AppButton",setup(n){const o=e.inject(u),t=e.computed(()=>o?.AppButton);return(a,l)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),{default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},a.$attrs)),[e.renderSlot(a.$slots,"default")],16))}}),j=(n,o)=>{const t=n[o];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((a,l)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(l.bind(null,new Error("Unknown variable dynamic import: "+o)))})},I=e.defineComponent({__name:"Icon",props:{name:{}},setup(n){const o=n,t=e.defineAsyncComponent({loader:()=>j(Object.assign({"../assets/icons/annotations.svg":()=>Promise.resolve().then(()=>X),"../assets/icons/tool-comment.svg":()=>Promise.resolve().then(()=>te),"../assets/icons/tool-free-text.svg":()=>Promise.resolve().then(()=>ne),"../assets/icons/tool-highlight.svg":()=>Promise.resolve().then(()=>le),"../assets/icons/tool-image.svg":()=>Promise.resolve().then(()=>ie),"../assets/icons/tool-signature.svg":()=>Promise.resolve().then(()=>se)}),`../assets/icons/${o.name}.svg`)});return(a,l)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),{class:"vp-text-xl"}))}}),_e="",T=(n,o)=>{const t=n.__vccOpts||n;for(const[a,l]of o)t[a]=l;return t},_=T(I,[["__scopeId","data-v-c6e40782"]]),y=()=>{const n=e.inject(x,e.computed(()=>({})));return{t:e.computed(()=>t=>{const a=t.split(".").pop()||t;return n.value&&a in n.value?n.value[a]:(console.warn(`useLocalization - Translation not found for key: ${t}`),t)}).value,currentLocale:e.computed(()=>n.value)}},M=e.defineComponent({__name:"ToolAnnotation",emits:["toggle"],setup(n,{emit:o}){const{t}=y(),a=o,l=e.ref(!1),r=()=>{l.value=!l.value,a("toggle",l.value)};return(s,c)=>s.$slots.default?e.renderSlot(s.$slots,"default",{key:0,onClick:r},void 0,!0):(e.openBlock(),e.createBlock(k,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(l.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(b,{"aria-label":l.value?e.unref(t)("annotationToggleHideTooltip"):e.unref(t)("annotationToggleShowTooltip"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":l.value}]),onClick:r},{default:e.withCtx(()=>[e.createVNode(_,{name:"annotations",class:"vp-text-xl"})]),_:1},8,["aria-label","class"])]),_:1}))}}),ye="",L=T(M,[["__scopeId","data-v-7ffb5374"]]),D=e.defineComponent({__name:"ToolAnnotationHighlight",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(n){const o=e.useModel(n,"active"),{t}=y(),a=()=>{o.value=!o.value};return(l,r)=>l.$slots.default?e.renderSlot(l.$slots,"default",{key:0,onClick:a}):(e.openBlock(),e.createBlock(k,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationHighlightTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(b,{"aria-label":e.unref(t)("annotationHighlightLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:a},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(_,{name:"tool-highlight"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),q=e.defineComponent({__name:"AppPopover",setup(n){const o=e.inject(u),t=e.computed(()=>o?.AppPopover);return(a,l)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),{trigger:e.withCtx(()=>[e.renderSlot(a.$slots,"trigger")]),default:e.withCtx(()=>[e.renderSlot(a.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},a.$attrs)),[e.renderSlot(a.$slots,"default")],16))}}),F=e.defineComponent({__name:"AppSignatures",setup(n){const o=e.inject(u),t=e.computed(()=>o?.AppSignatures);return(a,l)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},a.$attrs)),null,16)):e.createCommentVNode("",!0)}}),H=e.defineComponent({__name:"ToolAnnotationSignature",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(n){const o=e.useModel(n,"active"),{t}=y(),a=e.ref(!1),l=()=>{!o.value&&!a.value&&(a.value=!0),o.value=!o.value},r=s=>{a.value=!1};return(s,c)=>s.$slots.default?e.renderSlot(s.$slots,"default",{key:0,onClick:l}):(e.openBlock(),e.createBlock(q,{key:1,open:a.value,side:"right",sideOffset:10,class:"vpv-annotation-signatures__popover",onInteractOutside:r},{trigger:e.withCtx(()=>[e.createVNode(k,null,{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationSignatureTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(b,{"aria-label":e.unref(t)("annotationSignatureLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:l},{default:e.withCtx(()=>[e.renderSlot(s.$slots,"icon",{},()=>[e.createVNode(_,{name:"tool-signature"})])]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createVNode(F)]),_:3},8,["open"]))}}),v=e.defineComponent({__name:"ToolAnnotationFreeText",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(n){const o=e.useModel(n,"active"),{t}=y(),a=()=>{o.value=!o.value};return(l,r)=>l.$slots.default?e.renderSlot(l.$slots,"default",{key:0,onClick:a}):(e.openBlock(),e.createBlock(k,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationFreeTextTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(b,{"aria-label":e.unref(t)("annotationFreeTextLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:a},{default:e.withCtx(()=>[e.renderSlot(l.$slots,"icon",{},()=>[e.createVNode(_,{name:"tool-free-text"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),U=e.defineComponent({__name:"ToolAnnotationImage",emits:["change"],setup(n,{emit:o}){const{t}=y(),a=o,l=()=>{const r=document.createElement("input");r.type="file",r.accept="image/*",r.onchange=s=>{const c=s.target.files?.[0];a("change",c)},r.click()};return(r,s)=>r.$slots.default?e.renderSlot(r.$slots,"default",{key:0,onClick:l}):(e.openBlock(),e.createBlock(k,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationImageTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(b,{"aria-label":e.unref(t)("annotationImageLabel"),class:"vpv-toolbar-btn",onClick:l},{default:e.withCtx(()=>[e.renderSlot(r.$slots,"icon",{},()=>[e.createVNode(_,{name:"tool-image"})])]),_:3},8,["aria-label"])]),_:3}))}}),R={aliceblue:"#f0f8ff",antiquewhite:"#faebd7",aqua:"#00ffff",aquamarine:"#7fffd4",azure:"#f0ffff",beige:"#f5f5dc",bisque:"#ffe4c4",black:"#000000",blanchedalmond:"#ffebcd",blue:"#0000ff",blueviolet:"#8a2be2",brown:"#a52a2a",burlywood:"#deb887",cadetblue:"#5f9ea0",chartreuse:"#7fff00",chocolate:"#d2691e",coral:"#ff7f50",cornflowerblue:"#6495ed",cornsilk:"#fff8dc",crimson:"#dc143c",cyan:"#00ffff",darkblue:"#00008b",darkcyan:"#008b8b",darkgoldenrod:"#b8860b",darkgray:"#a9a9a9",darkgreen:"#006400",darkkhaki:"#bdb76b",darkmagenta:"#8b008b",darkolivegreen:"#556b2f",darkorange:"#ff8c00",darkorchid:"#9932cc",darkred:"#8b0000",darksalmon:"#e9967a",darkseagreen:"#8fbc8f",darkslateblue:"#483d8b",darkslategray:"#2f4f4f",darkturquoise:"#00ced1",darkviolet:"#9400d3",deeppink:"#ff1493",deepskyblue:"#00bfff",dimgray:"#696969",dodgerblue:"#1e90ff",firebrick:"#b22222",floralwhite:"#fffaf0",forestgreen:"#228b22",fuchsia:"#ff00ff",gainsboro:"#dcdcdc",ghostwhite:"#f8f8ff",gold:"#ffd700",goldenrod:"#daa520",gray:"#808080",green:"#008000",greenyellow:"#adff2f",honeydew:"#f0fff0",hotpink:"#ff69b4","indianred ":"#cd5c5c",indigo:"#4b0082",ivory:"#fffff0",khaki:"#f0e68c",lavender:"#e6e6fa",lavenderblush:"#fff0f5",lawngreen:"#7cfc00",lemonchiffon:"#fffacd",lightblue:"#add8e6",lightcoral:"#f08080",lightcyan:"#e0ffff",lightgoldenrodyellow:"#fafad2",lightgrey:"#d3d3d3",lightgreen:"#90ee90",lightpink:"#ffb6c1",lightsalmon:"#ffa07a",lightseagreen:"#20b2aa",lightskyblue:"#87cefa",lightslategray:"#778899",lightsteelblue:"#b0c4de",lightyellow:"#ffffe0",lime:"#00ff00",limegreen:"#32cd32",linen:"#faf0e6",magenta:"#ff00ff",maroon:"#800000",mediumaquamarine:"#66cdaa",mediumblue:"#0000cd",mediumorchid:"#ba55d3",mediumpurple:"#9370d8",mediumseagreen:"#3cb371",mediumslateblue:"#7b68ee",mediumspringgreen:"#00fa9a",mediumturquoise:"#48d1cc",mediumvioletred:"#c71585",midnightblue:"#191970",mintcream:"#f5fffa",mistyrose:"#ffe4e1",moccasin:"#ffe4b5",navajowhite:"#ffdead",navy:"#000080",oldlace:"#fdf5e6",olive:"#808000",olivedrab:"#6b8e23",orange:"#ffa500",orangered:"#ff4500",orchid:"#da70d6",palegoldenrod:"#eee8aa",palegreen:"#98fb98",paleturquoise:"#afeeee",palevioletred:"#d87093",papayawhip:"#ffefd5",peachpuff:"#ffdab9",peru:"#cd853f",pink:"#ffc0cb",plum:"#dda0dd",powderblue:"#b0e0e6",purple:"#800080",rebeccapurple:"#663399",red:"#ff0000",rosybrown:"#bc8f8f",royalblue:"#4169e1",saddlebrown:"#8b4513",salmon:"#fa8072",sandybrown:"#f4a460",seagreen:"#2e8b57",seashell:"#fff5ee",sienna:"#a0522d",silver:"#c0c0c0",skyblue:"#87ceeb",slateblue:"#6a5acd",slategray:"#708090",snow:"#fffafa",springgreen:"#00ff7f",steelblue:"#4682b4",tan:"#d2b48c",teal:"#008080",thistle:"#d8bfd8",tomato:"#ff6347",turquoise:"#40e0d0",violet:"#ee82ee",wheat:"#f5deb3",white:"#ffffff",whitesmoke:"#f5f5f5",yellow:"#ffff00",yellowgreen:"#9acd32"},Y=n=>n.startsWith("#")||n.startsWith("0x")?n:R[n]||n,G={class:"vpv-annotation-tools-container"},W={key:0,class:"vpv-annotation-tools"},K={highlight:{type:[Object,Boolean],default:()=>!0},freeText:{type:[Object,Boolean],default:()=>!0},signature:{type:[Object,Boolean],default:()=>!0},image:{type:[Object,Boolean],default:()=>!0},instanceId:{type:Number,required:!0}},Z=e.defineComponent({__name:"VPdfAnnotationTools",props:K,emits:["highlight","freeText","signature","image"],setup(n,{emit:o}){const t=n,a=o,l=i=>z(t.instanceId,i),r={highlight:new CustomEvent(l(m.highlight),{detail:{active:!1,colors:null}}),freeText:new CustomEvent(l(m.freeText),{detail:{active:!1}}),signature:new CustomEvent(l(m.signature),{detail:{active:!1}}),image:new CustomEvent(l(m.image),{detail:{file:void 0}})},s=e.ref(!1),c=e.reactive({highlight:!1,freeText:!1,signature:!1}),g=e.computed({get:()=>c.highlight,set:i=>{c.highlight=i,i&&(c.freeText=!1,c.signature=!1),B()}}),p=e.computed({get:()=>c.freeText,set:i=>{i&&(c.highlight=!1,c.signature=!1),c.freeText=i,B()}}),w=e.computed({get:()=>c.signature,set:i=>{i&&(c.highlight=!1,c.freeText=!1),c.signature=i,B()}}),de=e.computed(()=>t.highlight),fe=e.computed(()=>t.freeText),pe=e.computed(()=>t.signature),me=e.computed(()=>t.image),ge=i=>{s.value=i,i||(g.value=!1,p.value=!1,w.value=!1)},he=i=>{a("highlight",i),r.highlight.detail.active=i,r.highlight.detail.colors=(t.highlight?.colors?.map(Y)??Object.values(C)).slice(0,6),window.dispatchEvent(r.highlight)},ue=i=>{a("freeText",i),r.freeText.detail.active=i,window.dispatchEvent(r.freeText)},ke=i=>{a("signature",i),r.signature.detail.active=i,window.dispatchEvent(r.signature)},be=i=>{a("image",i),r.image.detail.file=i,window.dispatchEvent(r.image)};function B(){he(g.value),ue(p.value),ke(w.value)}return(i,h)=>(e.openBlock(),e.createElementBlock("div",G,[e.createVNode(L,{onToggle:ge}),e.createVNode(e.Transition,{name:"slide"},{default:e.withCtx(()=>[s.value?(e.openBlock(),e.createElementBlock("div",W,[de.value?(e.openBlock(),e.createBlock(D,{key:0,active:g.value,"onUpdate:active":h[0]||(h[0]=d=>g.value=d),colors:t.highlight?.colors},e.createSlots({_:2},[t.highlight?.component?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight.component.props.icon)))]),key:"0"}:typeof t.highlight=="object"&&t.highlight.component?{name:"default",fn:e.withCtx(({onClick:d})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight.component),{onClick:d},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active","colors"])):e.createCommentVNode("",!0),fe.value?(e.openBlock(),e.createBlock(v,{key:1,active:p.value,"onUpdate:active":h[1]||(h[1]=d=>p.value=d)},e.createSlots({_:2},[t.freeText?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText.props.icon)))]),key:"0"}:typeof t.freeText=="object"?{name:"default",fn:e.withCtx(({onClick:d})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.freeText),{onClick:d},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0),me.value?(e.openBlock(),e.createBlock(U,{key:2,onChange:be},e.createSlots({_:2},[t.image?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.image.props.icon)))]),key:"0"}:typeof t.image=="object"?{name:"default",fn:e.withCtx(({onClick:d})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.image),{onClick:d},null,8,["onClick"]))]),key:"1"}:void 0]),1024)):e.createCommentVNode("",!0),pe.value?(e.openBlock(),e.createBlock(H,{key:3,active:w.value,"onUpdate:active":h[2]||(h[2]=d=>w.value=d)},e.createSlots({_:2},[t.signature?.props?.icon?{name:"icon",fn:e.withCtx(()=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.signature.props.icon)))]),key:"0"}:typeof t.signature=="object"?{name:"default",fn:e.withCtx(({onClick:d})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.signature),{onClick:d},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0)])):e.createCommentVNode("",!0)]),_:1})]))}}),we="",S=T(Z,[["__scopeId","data-v-1d37828e"]]),J=(n={})=>{const{highlight:o,freeText:t,signature:a,image:l}=n;return{name:"annotation",setup(r){const{componentInstance:s,shared:c}=r,g=s?.uid??0;r.toolbar.addItem({id:O.ANNOTATIONS,toolbarDirection:"left",component:e.h(S,{highlight:o,freeText:!1,signature:!1,image:l,instanceId:g})});const p=s?.appContext.app;c.ui?p.provide(u,c.ui):console.warn("VPdfAnnotationPlugin - No UI context found in plugin context"),c.localization?.value?p.provide(x,c.localization):console.warn("VPdfAnnotationPlugin - No localization found in plugin context")}}},Q={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function $(n,o){return e.openBlock(),e.createElementBlock("svg",Q,o[0]||(o[0]=[e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.25",d:"M10 18.334a8.333 8.333 0 1 0 0-16.667 8.333 8.333 0 0 0 0 16.667"},null,-1),e.createElementVNode("path",{stroke:"currentColor","stroke-linejoin":"round","stroke-width":"1.25",d:"m5.417 17.084 1.171-4.394c.238-.892.357-1.338.694-1.597s.798-.259 1.722-.259h1.992c.923 0 1.385 0 1.722.259.337.258.456.705.693 1.597l1.172 4.394"},null,-1),e.createElementVNode("path",{stroke:"currentColor","stroke-linecap":"round","stroke-linejoin":"round","stroke-width":"1.25",d:"M7.917 10.834 9.23 7.8c.327-.756.491-1.134.769-1.134s.441.378.77 1.134l1.313 3.033"},null,-1)]))}const X=Object.freeze(Object.defineProperty({__proto__:null,render:$,default:{render:$}},Symbol.toStringTag,{value:"Module"})),ee={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function V(n,o){return e.openBlock(),e.createElementBlock("svg",ee,o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M18.125 9.688a7.82 7.82 0 0 1-7.812 7.812H3.75a1.25 1.25 0 0 1-1.25-1.25V9.688a7.812 7.812 0 0 1 15.625 0m-1.25 0a6.563 6.563 0 0 0-13.125 0v6.562h6.563a6.57 6.57 0 0 0 6.562-6.562"},null,-1),e.createElementVNode("path",{fill:"currentColor",d:"M12.5 10a.624.624 0 0 1-.625.625h-1.25v1.25a.624.624 0 1 1-1.25 0v-1.25h-1.25a.625.625 0 1 1 0-1.25h1.25v-1.25a.625.625 0 0 1 1.25 0v1.25h1.25A.625.625 0 0 1 12.5 10"},null,-1)]))}const te=Object.freeze(Object.defineProperty({__proto__:null,render:V,default:{render:V}},Symbol.toStringTag,{value:"Module"})),oe={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function N(n,o){return e.openBlock(),e.createElementBlock("svg",oe,o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M11.458 13.75a.624.624 0 1 0 0-1.25h-.625v-5h2.5v.625a.625.625 0 0 0 1.25 0v-1.25a.625.625 0 0 0-.625-.625h-7.5a.625.625 0 0 0-.625.625v1.25a.625.625 0 0 0 1.25 0V7.5h2.5v5h-.625a.625.625 0 1 0 0 1.25z"},null,-1),e.createElementVNode("path",{fill:"currentColor","fill-rule":"evenodd",d:"M3.125 3.75c0-.115.093-.208.208-.208h13.334c.115 0 .208.093.208.208v2.917a.625.625 0 1 0 1.25 0V3.75c0-.805-.653-1.458-1.458-1.458H3.333c-.805 0-1.458.653-1.458 1.458v3.334a.625.625 0 1 0 1.25 0zm0 12.5c0 .115.093.209.208.209h13.334a.21.21 0 0 0 .208-.209v-2.916a.625.625 0 1 1 1.25 0v2.916c0 .806-.653 1.459-1.458 1.459H3.333a1.46 1.46 0 0 1-1.458-1.459v-3.333a.625.625 0 1 1 1.25 0zM2.5 8.542c.345 0 .625.28.625.625v1.667a.625.625 0 0 1-1.25 0V9.167c0-.345.28-.625.625-.625m15.625.625a.625.625 0 1 0-1.25 0v1.667a.625.625 0 0 0 1.25 0z","clip-rule":"evenodd"},null,-1)]))}const ne=Object.freeze(Object.defineProperty({__proto__:null,render:N,default:{render:N}},Symbol.toStringTag,{value:"Module"})),ae={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function P(n,o){return e.openBlock(),e.createElementBlock("svg",ae,o[0]||(o[0]=[e.createElementVNode("g",{"clip-path":"url(#a)"},[e.createElementVNode("path",{fill:"currentColor",d:"M19.818 8.308a.625.625 0 0 0-.885 0L15 12.242 8.384 5.625l3.934-3.932a.626.626 0 0 0-.885-.885L7.5 4.742a1.25 1.25 0 0 0-.22 1.47L5.625 7.866a1.25 1.25 0 0 0 0 1.767l.367.366-4.559 4.558a.625.625 0 0 0 .245 1.035l5.625 1.875a.62.62 0 0 0 .437-.015.6.6 0 0 0 .203-.136l2.682-2.683.367.366a1.25 1.25 0 0 0 1.767 0l1.656-1.654a1.25 1.25 0 0 0 1.469-.22l3.934-3.933a.626.626 0 0 0 0-.885M7.332 16.16l-4.297-1.433 3.84-3.843 2.867 2.866zm4.543-2.043L6.51 8.75l1.616-1.616 5.367 5.366z"})],-1),e.createElementVNode("defs",null,[e.createElementVNode("clipPath",{id:"a"},[e.createElementVNode("path",{fill:"currentColor",d:"M0 0h20v20H0z"})])],-1)]))}const le=Object.freeze(Object.defineProperty({__proto__:null,render:P,default:{render:P}},Symbol.toStringTag,{value:"Module"})),re={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function A(n,o){return e.openBlock(),e.createElementBlock("svg",re,o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M16.875 3.125H3.125a1.25 1.25 0 0 0-1.25 1.25v11.25a1.25 1.25 0 0 0 1.25 1.25h13.75a1.25 1.25 0 0 0 1.25-1.25V4.375a1.25 1.25 0 0 0-1.25-1.25m0 1.25v8.027l-2.037-2.036a1.25 1.25 0 0 0-1.768 0l-1.562 1.563L8.07 8.49a1.25 1.25 0 0 0-1.767 0L3.125 11.67V4.376zm-13.75 9.063 4.063-4.063 6.25 6.25H3.124zm13.75 2.187h-1.67l-2.812-2.812 1.563-1.563 2.919 2.92zM11.25 7.813a.938.938 0 1 1 1.875 0 .938.938 0 0 1-1.875 0"},null,-1)]))}const ie=Object.freeze(Object.defineProperty({__proto__:null,render:A,default:{render:A}},Symbol.toStringTag,{value:"Module"})),ce={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function E(n,o){return e.openBlock(),e.createElementBlock("svg",ce,o[0]||(o[0]=[e.createElementVNode("path",{fill:"currentColor",d:"M18.125 13.125H4.99q.313-.615.625-1.259c1.172.13 2.546-.685 4.114-2.432.391 1.051 1.13 2.416 2.39 2.441.707.014 1.414-.406 2.142-1.279.53.634 1.623 1.279 3.865 1.279a.625.625 0 1 0 0-1.25c-2.377 0-3.08-.816-3.125-1.259a.6.6 0 0 0-.426-.605.636.636 0 0 0-.723.273c-.943 1.448-1.514 1.596-1.713 1.591-.645-.012-1.301-1.525-1.526-2.61a.625.625 0 0 0-1.1-.264c-1.579 1.98-2.637 2.646-3.295 2.818.663-1.474 1.158-2.768 1.475-3.858.533-1.831.572-3.112.118-3.914-.234-.42-.73-.922-1.723-.922-1.255 0-2.245 1.186-2.716 3.254-.28 1.227-.327 2.594-.127 3.75.2 1.155.615 1.996 1.218 2.495a72 72 0 0 1-.877 1.751h-1.71a.625.625 0 1 0 0 1.25h1.048c-.884 1.64-1.572 2.784-1.583 2.803a.625.625 0 1 0 1.071.644c.012-.02.88-1.468 1.93-3.447h13.784a.625.625 0 1 0 0-1.25M4.59 5.407c.311-1.365.914-2.282 1.498-2.282.416 0 .555.145.635.287.235.416.51 1.89-1.692 6.749-.645-.881-.865-2.895-.44-4.754"},null,-1)]))}const se=Object.freeze(Object.defineProperty({__proto__:null,render:E,default:{render:E}},Symbol.toStringTag,{value:"Module"}));f.VPdfAnnotationTools=S,f.default=J,Object.defineProperties(f,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/dist/types.d.ts
CHANGED
|
@@ -1,6 +1,10 @@
|
|
|
1
|
+
import { AnnotationHighlightColors } from "@vue-pdf-viewer/shared";
|
|
1
2
|
import type { Component } from "vue";
|
|
2
3
|
export interface VPdfAnnotationPluginOptions {
|
|
3
|
-
highlight?:
|
|
4
|
+
highlight?: {
|
|
5
|
+
component: Component;
|
|
6
|
+
colors?: AnnotationHighlightColors;
|
|
7
|
+
} | boolean;
|
|
4
8
|
freeText?: Component | boolean;
|
|
5
9
|
signature?: Component | boolean;
|
|
6
10
|
image?: Component | boolean;
|
package/package.json
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@vue-pdf-viewer/annotation",
|
|
3
3
|
"private": false,
|
|
4
|
-
"version": "
|
|
4
|
+
"version": "1.0.0-alpha.0",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"main": "./dist/index.umd.cjs",
|
|
7
7
|
"module": "./dist/index.js",
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"vue": "^3.2.37"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@vue-pdf-viewer/shared": "
|
|
32
|
+
"@vue-pdf-viewer/shared": "1.0.0-alpha.1",
|
|
33
33
|
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
34
34
|
"vue": "^3.2.37"
|
|
35
35
|
},
|