@vue-pdf-viewer/annotation 0.0.0-experimental.3 → 0.0.0-experimental.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.js +180 -156
- package/dist/index.umd.cjs +1 -1
- package/package.json +43 -43
package/dist/index.js
CHANGED
|
@@ -1,70 +1,72 @@
|
|
|
1
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-52907777],.vpv-toolbar-btn[data-v-52907777]:hover{background-color:var(--vpv-primary-color);color:#fff}.vpv-annotation-tools-container[data-v-61a608d5]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-61a608d5] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-61a608d5],.slide-leave-active[data-v-61a608d5]{transition:all .3s ease-out}.slide-enter-from[data-v-61a608d5],.slide-leave-to[data-v-61a608d5]{opacity:0}.slide-enter-from[data-v-61a608d5],.slide-leave-to[data-v-61a608d5]{transform:translateY(-20px)}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
import { defineComponent as m, inject as
|
|
3
|
-
var
|
|
2
|
+
import { defineComponent as m, inject as I, computed as g, openBlock as s, createBlock as p, resolveDynamicComponent as f, normalizeProps as b, mergeProps as A, createSlots as B, withCtx as l, renderSlot as v, renderList as te, createElementBlock as w, defineAsyncComponent as ne, unref as h, ref as x, createTextVNode as L, toDisplayString as E, createVNode as d, normalizeClass as V, createCommentVNode as P, mergeModels as oe, useModel as j, watchEffect as ae, createElementVNode as q, reactive as le, Transition as ie, h as se } from "vue";
|
|
3
|
+
var S;
|
|
4
4
|
(function(n) {
|
|
5
5
|
n.highlight = "vpv:annotation:highlight", n.freeText = "vpv:annotation:freeText", n.signature = "vpv:annotation:signature";
|
|
6
|
-
})(
|
|
7
|
-
var
|
|
6
|
+
})(S || (S = {}));
|
|
7
|
+
var M;
|
|
8
8
|
(function(n) {
|
|
9
9
|
n.Purple = "#7862FF", n.Cyan = "#3FE9E3", n.Red = "#F87777", n.Orange = "#FE9639", n.Yellow = "#FBDA15", n.Green = "#88F526";
|
|
10
|
-
})(
|
|
11
|
-
const
|
|
10
|
+
})(M || (M = {}));
|
|
11
|
+
const re = {
|
|
12
|
+
ANNOTATIONS: "annotations"
|
|
13
|
+
}, O = Symbol("VPV Shared UIs"), R = Symbol("VPV Current Localization"), ce = (n, o) => `${n}-${o}`, F = /* @__PURE__ */ m({
|
|
12
14
|
__name: "AppTooltip",
|
|
13
15
|
setup(n) {
|
|
14
|
-
const o =
|
|
15
|
-
return (t, a) => e.value ? (s(),
|
|
16
|
+
const o = I(O), e = g(() => o?.AppTooltip);
|
|
17
|
+
return (t, a) => e.value ? (s(), p(f(e.value), b(A({ key: 0 }, t.$attrs)), B({
|
|
16
18
|
default: l(() => [
|
|
17
19
|
v(t.$slots, "default")
|
|
18
20
|
]),
|
|
19
21
|
_: 2
|
|
20
22
|
}, [
|
|
21
|
-
|
|
22
|
-
name:
|
|
23
|
+
te(t.$slots, (c, r) => ({
|
|
24
|
+
name: r,
|
|
23
25
|
fn: l(() => [
|
|
24
|
-
v(t.$slots,
|
|
26
|
+
v(t.$slots, r)
|
|
25
27
|
])
|
|
26
28
|
}))
|
|
27
|
-
]), 1040)) : (s(),
|
|
29
|
+
]), 1040)) : (s(), w("div", b(A({ key: 1 }, t.$attrs)), [
|
|
28
30
|
v(t.$slots, "default")
|
|
29
31
|
], 16));
|
|
30
32
|
}
|
|
31
|
-
}),
|
|
33
|
+
}), H = /* @__PURE__ */ m({
|
|
32
34
|
__name: "AppButton",
|
|
33
35
|
setup(n) {
|
|
34
|
-
const o =
|
|
35
|
-
return (t, a) => e.value ? (s(),
|
|
36
|
+
const o = I(O), e = g(() => o?.AppButton);
|
|
37
|
+
return (t, a) => e.value ? (s(), p(f(e.value), b(A({ key: 0 }, t.$attrs)), {
|
|
36
38
|
default: l(() => [
|
|
37
39
|
v(t.$slots, "default")
|
|
38
40
|
]),
|
|
39
41
|
_: 3
|
|
40
|
-
}, 16)) : (s(),
|
|
42
|
+
}, 16)) : (s(), w("button", b(A({ key: 1 }, t.$attrs)), [
|
|
41
43
|
v(t.$slots, "default")
|
|
42
44
|
], 16));
|
|
43
45
|
}
|
|
44
|
-
}),
|
|
46
|
+
}), ue = (n, o) => {
|
|
45
47
|
const e = n[o];
|
|
46
48
|
return e ? typeof e == "function" ? e() : Promise.resolve(e) : new Promise((t, a) => {
|
|
47
49
|
(typeof queueMicrotask == "function" ? queueMicrotask : setTimeout)(a.bind(null, new Error("Unknown variable dynamic import: " + o)));
|
|
48
50
|
});
|
|
49
|
-
},
|
|
51
|
+
}, pe = /* @__PURE__ */ m({
|
|
50
52
|
__name: "Icon",
|
|
51
53
|
props: {
|
|
52
54
|
name: {}
|
|
53
55
|
},
|
|
54
56
|
setup(n) {
|
|
55
|
-
const o = n, e =
|
|
56
|
-
loader: () =>
|
|
57
|
+
const o = n, e = ne({
|
|
58
|
+
loader: () => ue(/* @__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-signature.svg": () => import("./tool-signature.85da0b98.js") }), `../assets/icons/${o.name}.svg`)
|
|
57
59
|
});
|
|
58
|
-
return (t, a) => (s(),
|
|
60
|
+
return (t, a) => (s(), p(f(h(e)), { class: "vp-text-xl" }));
|
|
59
61
|
}
|
|
60
62
|
});
|
|
61
|
-
const
|
|
63
|
+
const D = (n, o) => {
|
|
62
64
|
const e = n.__vccOpts || n;
|
|
63
65
|
for (const [t, a] of o)
|
|
64
66
|
e[t] = a;
|
|
65
67
|
return e;
|
|
66
|
-
},
|
|
67
|
-
const n =
|
|
68
|
+
}, U = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-c6e40782"]]), z = () => {
|
|
69
|
+
const n = I(
|
|
68
70
|
R,
|
|
69
71
|
g(() => ({}))
|
|
70
72
|
);
|
|
@@ -75,28 +77,28 @@ const U = (n, o) => {
|
|
|
75
77
|
}).value,
|
|
76
78
|
currentLocale: g(() => n.value)
|
|
77
79
|
};
|
|
78
|
-
},
|
|
80
|
+
}, ve = /* @__PURE__ */ m({
|
|
79
81
|
__name: "ToolAnnotation",
|
|
80
82
|
emits: ["toggle"],
|
|
81
83
|
setup(n, { emit: o }) {
|
|
82
|
-
const { t: e } =
|
|
84
|
+
const { t: e } = z(), t = o, a = x(!1), c = () => {
|
|
83
85
|
a.value = !a.value, t("toggle", a.value);
|
|
84
86
|
};
|
|
85
|
-
return (
|
|
87
|
+
return (r, u) => r.$slots.default ? v(r.$slots, "default", {
|
|
86
88
|
key: 0,
|
|
87
|
-
onClick:
|
|
88
|
-
}, void 0, !0) : (s(),
|
|
89
|
+
onClick: c
|
|
90
|
+
}, void 0, !0) : (s(), p(F, { key: 1 }, {
|
|
89
91
|
content: l(() => [
|
|
90
|
-
L(E(a.value ?
|
|
92
|
+
L(E(a.value ? h(e)("annotationToggleHideTooltip") : h(e)("annotationToggleShowTooltip")), 1)
|
|
91
93
|
]),
|
|
92
94
|
default: l(() => [
|
|
93
|
-
|
|
94
|
-
"aria-label": a.value ?
|
|
95
|
-
class:
|
|
96
|
-
onClick:
|
|
95
|
+
d(H, {
|
|
96
|
+
"aria-label": a.value ? h(e)("annotationToggleHideTooltip") : h(e)("annotationToggleShowTooltip"),
|
|
97
|
+
class: V(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": a.value }]),
|
|
98
|
+
onClick: c
|
|
97
99
|
}, {
|
|
98
100
|
default: l(() => [
|
|
99
|
-
|
|
101
|
+
d(U, {
|
|
100
102
|
name: "annotations",
|
|
101
103
|
class: "vp-text-xl"
|
|
102
104
|
})
|
|
@@ -108,11 +110,11 @@ const U = (n, o) => {
|
|
|
108
110
|
}));
|
|
109
111
|
}
|
|
110
112
|
});
|
|
111
|
-
const
|
|
113
|
+
const ge = /* @__PURE__ */ D(ve, [["__scopeId", "data-v-52907777"]]), Y = /* @__PURE__ */ m({
|
|
112
114
|
__name: "AppPopover",
|
|
113
115
|
setup(n) {
|
|
114
|
-
const o =
|
|
115
|
-
return (t, a) => e.value ? (s(),
|
|
116
|
+
const o = I(O), e = g(() => o?.AppPopover);
|
|
117
|
+
return (t, a) => e.value ? (s(), p(f(e.value), b(A({ key: 0 }, t.$attrs)), {
|
|
116
118
|
trigger: l(() => [
|
|
117
119
|
v(t.$slots, "trigger")
|
|
118
120
|
]),
|
|
@@ -120,35 +122,35 @@ const pe = /* @__PURE__ */ U(ue, [["__scopeId", "data-v-52907777"]]), ve = /* @_
|
|
|
120
122
|
v(t.$slots, "default")
|
|
121
123
|
]),
|
|
122
124
|
_: 3
|
|
123
|
-
}, 16)) : (s(),
|
|
125
|
+
}, 16)) : (s(), w("button", b(A({ key: 1 }, t.$attrs)), [
|
|
124
126
|
v(t.$slots, "default")
|
|
125
127
|
], 16));
|
|
126
128
|
}
|
|
127
|
-
}),
|
|
129
|
+
}), de = /* @__PURE__ */ m({
|
|
128
130
|
__name: "AppHighlightColorPicker",
|
|
129
131
|
setup(n) {
|
|
130
|
-
const o =
|
|
131
|
-
return (t, a) => e.value ? (s(),
|
|
132
|
+
const o = I(O), e = g(() => o?.AppHighlightColorPicker);
|
|
133
|
+
return (t, a) => e.value ? (s(), p(f(e.value), b(A({ key: 0 }, t.$attrs)), null, 16)) : P("", !0);
|
|
132
134
|
}
|
|
133
|
-
}),
|
|
135
|
+
}), fe = { class: "vpv-annotation-highlight__color-picker-wrapper" }, he = /* @__PURE__ */ m({
|
|
134
136
|
__name: "ToolAnnotationHighlight",
|
|
135
137
|
props: {
|
|
136
138
|
active: { type: Boolean, required: !0 },
|
|
137
139
|
activeModifiers: {}
|
|
138
140
|
},
|
|
139
|
-
emits: /* @__PURE__ */
|
|
141
|
+
emits: /* @__PURE__ */ oe(["change"], ["update:active"]),
|
|
140
142
|
setup(n, { emit: o }) {
|
|
141
|
-
const e =
|
|
143
|
+
const e = j(n, "active"), t = x(!1), a = o, { t: c } = z(), r = x(M.Purple), u = () => {
|
|
142
144
|
!e.value && !t.value && (t.value = !0), e.value = !e.value;
|
|
143
145
|
}, T = (y) => {
|
|
144
146
|
t.value = !1;
|
|
145
147
|
};
|
|
146
|
-
return
|
|
147
|
-
!e.value || a("change",
|
|
148
|
-
}), (y,
|
|
148
|
+
return ae(() => {
|
|
149
|
+
!e.value || a("change", r.value);
|
|
150
|
+
}), (y, $) => y.$slots.default ? v(y.$slots, "default", {
|
|
149
151
|
key: 0,
|
|
150
|
-
onClick:
|
|
151
|
-
}
|
|
152
|
+
onClick: u
|
|
153
|
+
}) : (s(), p(Y, {
|
|
152
154
|
key: 1,
|
|
153
155
|
open: t.value,
|
|
154
156
|
side: "right",
|
|
@@ -156,20 +158,20 @@ const pe = /* @__PURE__ */ U(ue, [["__scopeId", "data-v-52907777"]]), ve = /* @_
|
|
|
156
158
|
onInteractOutside: T
|
|
157
159
|
}, {
|
|
158
160
|
trigger: l(() => [
|
|
159
|
-
|
|
161
|
+
d(F, null, {
|
|
160
162
|
content: l(() => [
|
|
161
|
-
L(E(
|
|
163
|
+
L(E(h(c)("annotationHighlightTooltip")), 1)
|
|
162
164
|
]),
|
|
163
165
|
default: l(() => [
|
|
164
|
-
|
|
165
|
-
"aria-label":
|
|
166
|
-
class:
|
|
167
|
-
onClick:
|
|
166
|
+
d(H, {
|
|
167
|
+
"aria-label": h(c)("annotationHighlightLabel"),
|
|
168
|
+
class: V(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": e.value }]),
|
|
169
|
+
onClick: u
|
|
168
170
|
}, {
|
|
169
171
|
default: l(() => [
|
|
170
172
|
v(y.$slots, "icon", {}, () => [
|
|
171
|
-
|
|
172
|
-
]
|
|
173
|
+
d(U, { name: "tool-highlight" })
|
|
174
|
+
])
|
|
173
175
|
]),
|
|
174
176
|
_: 3
|
|
175
177
|
}, 8, ["aria-label", "class"])
|
|
@@ -178,19 +180,24 @@ const pe = /* @__PURE__ */ U(ue, [["__scopeId", "data-v-52907777"]]), ve = /* @_
|
|
|
178
180
|
})
|
|
179
181
|
]),
|
|
180
182
|
default: l(() => [
|
|
181
|
-
q("div",
|
|
182
|
-
q("p", null, E(
|
|
183
|
-
|
|
184
|
-
color:
|
|
185
|
-
"onUpdate:color":
|
|
183
|
+
q("div", fe, [
|
|
184
|
+
q("p", null, E(h(c)("annotationHighlightColorPickerLabel")), 1),
|
|
185
|
+
d(de, {
|
|
186
|
+
color: r.value,
|
|
187
|
+
"onUpdate:color": $[0] || ($[0] = (C) => r.value = C)
|
|
186
188
|
}, null, 8, ["color"])
|
|
187
189
|
])
|
|
188
190
|
]),
|
|
189
191
|
_: 3
|
|
190
192
|
}, 8, ["open"]));
|
|
191
193
|
}
|
|
192
|
-
})
|
|
193
|
-
|
|
194
|
+
}), _e = /* @__PURE__ */ m({
|
|
195
|
+
__name: "AppSignatures",
|
|
196
|
+
setup(n) {
|
|
197
|
+
const o = I(O), e = g(() => o?.AppSignatures);
|
|
198
|
+
return (t, a) => e.value ? (s(), p(f(e.value), b(A({ key: 0 }, t.$attrs)), null, 16)) : P("", !0);
|
|
199
|
+
}
|
|
200
|
+
}), me = /* @__PURE__ */ m({
|
|
194
201
|
__name: "ToolAnnotationSignature",
|
|
195
202
|
props: {
|
|
196
203
|
active: { type: Boolean, required: !0 },
|
|
@@ -198,34 +205,51 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
198
205
|
},
|
|
199
206
|
emits: ["update:active"],
|
|
200
207
|
setup(n) {
|
|
201
|
-
const o =
|
|
202
|
-
o.value = !o.value;
|
|
208
|
+
const o = j(n, "active"), { t: e } = z(), t = x(!1), a = () => {
|
|
209
|
+
!o.value && !t.value && (t.value = !0), o.value = !o.value;
|
|
210
|
+
}, c = (r) => {
|
|
211
|
+
t.value = !1;
|
|
203
212
|
};
|
|
204
|
-
return (
|
|
213
|
+
return (r, u) => r.$slots.default ? v(r.$slots, "default", {
|
|
205
214
|
key: 0,
|
|
206
|
-
onClick:
|
|
207
|
-
}) : (s(),
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
212
|
-
|
|
213
|
-
|
|
214
|
-
|
|
215
|
-
|
|
216
|
-
|
|
215
|
+
onClick: a
|
|
216
|
+
}) : (s(), p(Y, {
|
|
217
|
+
key: 1,
|
|
218
|
+
open: t.value,
|
|
219
|
+
side: "right",
|
|
220
|
+
sideOffset: 10,
|
|
221
|
+
class: "vpv-annotation-signatures__popover",
|
|
222
|
+
onInteractOutside: c
|
|
223
|
+
}, {
|
|
224
|
+
trigger: l(() => [
|
|
225
|
+
d(F, null, {
|
|
226
|
+
content: l(() => [
|
|
227
|
+
L(E(h(e)("annotationSignatureTooltip")), 1)
|
|
228
|
+
]),
|
|
217
229
|
default: l(() => [
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
230
|
+
d(H, {
|
|
231
|
+
"aria-label": h(e)("annotationSignatureLabel"),
|
|
232
|
+
class: V(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": o.value }]),
|
|
233
|
+
onClick: a
|
|
234
|
+
}, {
|
|
235
|
+
default: l(() => [
|
|
236
|
+
v(r.$slots, "icon", {}, () => [
|
|
237
|
+
d(U, { name: "tool-signature" })
|
|
238
|
+
])
|
|
239
|
+
]),
|
|
240
|
+
_: 3
|
|
241
|
+
}, 8, ["aria-label", "class"])
|
|
221
242
|
]),
|
|
222
243
|
_: 3
|
|
223
|
-
}
|
|
244
|
+
})
|
|
245
|
+
]),
|
|
246
|
+
default: l(() => [
|
|
247
|
+
d(_e)
|
|
224
248
|
]),
|
|
225
249
|
_: 3
|
|
226
|
-
}));
|
|
250
|
+
}, 8, ["open"]));
|
|
227
251
|
}
|
|
228
|
-
}),
|
|
252
|
+
}), Te = /* @__PURE__ */ m({
|
|
229
253
|
__name: "ToolAnnotationFreeText",
|
|
230
254
|
props: {
|
|
231
255
|
active: { type: Boolean, required: !0 },
|
|
@@ -233,25 +257,25 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
233
257
|
},
|
|
234
258
|
emits: ["update:active"],
|
|
235
259
|
setup(n) {
|
|
236
|
-
const o =
|
|
260
|
+
const o = j(n, "active"), { t: e } = z(), t = () => {
|
|
237
261
|
o.value = !o.value;
|
|
238
262
|
};
|
|
239
|
-
return (a,
|
|
263
|
+
return (a, c) => a.$slots.default ? v(a.$slots, "default", {
|
|
240
264
|
key: 0,
|
|
241
265
|
onClick: t
|
|
242
|
-
}) : (s(),
|
|
266
|
+
}) : (s(), p(F, { key: 1 }, {
|
|
243
267
|
content: l(() => [
|
|
244
|
-
L(E(
|
|
268
|
+
L(E(h(e)("annotationFreeTextTooltip")), 1)
|
|
245
269
|
]),
|
|
246
270
|
default: l(() => [
|
|
247
|
-
|
|
248
|
-
"aria-label":
|
|
249
|
-
class:
|
|
271
|
+
d(H, {
|
|
272
|
+
"aria-label": h(e)("annotationFreeTextLabel"),
|
|
273
|
+
class: V(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": o.value }]),
|
|
250
274
|
onClick: t
|
|
251
275
|
}, {
|
|
252
276
|
default: l(() => [
|
|
253
277
|
v(a.$slots, "icon", {}, () => [
|
|
254
|
-
|
|
278
|
+
d(U, { name: "tool-free-text" })
|
|
255
279
|
])
|
|
256
280
|
]),
|
|
257
281
|
_: 3
|
|
@@ -260,10 +284,10 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
260
284
|
_: 3
|
|
261
285
|
}));
|
|
262
286
|
}
|
|
263
|
-
}),
|
|
287
|
+
}), ye = { class: "vpv-annotation-tools-container" }, ke = {
|
|
264
288
|
key: 0,
|
|
265
289
|
class: "vpv-annotation-tools"
|
|
266
|
-
},
|
|
290
|
+
}, be = {
|
|
267
291
|
highlight: {
|
|
268
292
|
type: [Object, Boolean],
|
|
269
293
|
default: () => !0
|
|
@@ -280,122 +304,122 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
280
304
|
type: Number,
|
|
281
305
|
required: !0
|
|
282
306
|
}
|
|
283
|
-
},
|
|
307
|
+
}, Ae = /* @__PURE__ */ m({
|
|
284
308
|
__name: "VPdfAnnotationTools",
|
|
285
|
-
props:
|
|
309
|
+
props: be,
|
|
286
310
|
emits: ["highlight", "freeText", "signature"],
|
|
287
311
|
setup(n, { emit: o }) {
|
|
288
|
-
const e = n, t = o, a = (i) =>
|
|
312
|
+
const e = n, t = o, a = (i) => ce(e.instanceId, i), c = {
|
|
289
313
|
highlight: new CustomEvent(
|
|
290
|
-
a(
|
|
314
|
+
a(S.highlight),
|
|
291
315
|
{
|
|
292
316
|
detail: { active: !1, color: null }
|
|
293
317
|
}
|
|
294
318
|
),
|
|
295
319
|
freeText: new CustomEvent(
|
|
296
|
-
a(
|
|
320
|
+
a(S.freeText),
|
|
297
321
|
{
|
|
298
322
|
detail: { active: !1 }
|
|
299
323
|
}
|
|
300
324
|
),
|
|
301
325
|
signature: new CustomEvent(
|
|
302
|
-
a(
|
|
326
|
+
a(S.signature),
|
|
303
327
|
{
|
|
304
328
|
detail: { active: !1 }
|
|
305
329
|
}
|
|
306
330
|
)
|
|
307
|
-
},
|
|
331
|
+
}, r = x(!1), u = le({
|
|
308
332
|
highlight: !1,
|
|
309
333
|
freeText: !1,
|
|
310
334
|
signature: !1
|
|
311
|
-
}), T =
|
|
312
|
-
get: () =>
|
|
335
|
+
}), T = x(null), y = g({
|
|
336
|
+
get: () => u.highlight,
|
|
313
337
|
set: (i) => {
|
|
314
|
-
|
|
338
|
+
u.highlight = i, i ? (u.freeText = !1, u.signature = !1) : (T.value = null, N());
|
|
315
339
|
}
|
|
316
|
-
}),
|
|
317
|
-
get: () =>
|
|
340
|
+
}), $ = g({
|
|
341
|
+
get: () => u.freeText,
|
|
318
342
|
set: (i) => {
|
|
319
|
-
i && (
|
|
343
|
+
i && (u.highlight = !1, u.signature = !1), u.freeText = i, N();
|
|
320
344
|
}
|
|
321
345
|
}), C = g({
|
|
322
|
-
get: () =>
|
|
346
|
+
get: () => u.signature,
|
|
323
347
|
set: (i) => {
|
|
324
|
-
i && (
|
|
348
|
+
i && (u.highlight = !1, u.freeText = !1), u.signature = i, N();
|
|
325
349
|
}
|
|
326
|
-
}),
|
|
327
|
-
|
|
328
|
-
},
|
|
329
|
-
T.value = i,
|
|
330
|
-
},
|
|
331
|
-
t("highlight", i),
|
|
332
|
-
}, W = (i) => {
|
|
333
|
-
t("freeText", i), r.freeText.detail.active = i, window.dispatchEvent(r.freeText);
|
|
350
|
+
}), G = g(() => e.highlight), K = g(() => e.freeText), Z = g(() => e.signature), J = (i) => {
|
|
351
|
+
r.value = i, i || (y.value = !1, $.value = !1, C.value = !1, T.value = null);
|
|
352
|
+
}, Q = (i) => {
|
|
353
|
+
T.value = i, N();
|
|
354
|
+
}, W = (i, k) => {
|
|
355
|
+
t("highlight", i), c.highlight.detail.active = i, c.highlight.detail.color = k, window.dispatchEvent(c.highlight);
|
|
334
356
|
}, X = (i) => {
|
|
335
|
-
t("
|
|
357
|
+
t("freeText", i), c.freeText.detail.active = i, window.dispatchEvent(c.freeText);
|
|
358
|
+
}, ee = (i) => {
|
|
359
|
+
t("signature", i), c.signature.detail.active = i, window.dispatchEvent(c.signature);
|
|
336
360
|
};
|
|
337
|
-
function
|
|
338
|
-
|
|
361
|
+
function N() {
|
|
362
|
+
W(y.value, T.value), X($.value), ee(C.value);
|
|
339
363
|
}
|
|
340
|
-
return (i, k) => (s(),
|
|
341
|
-
|
|
342
|
-
|
|
364
|
+
return (i, k) => (s(), w("div", ye, [
|
|
365
|
+
d(ge, { onToggle: J }),
|
|
366
|
+
d(ie, { name: "slide" }, {
|
|
343
367
|
default: l(() => [
|
|
344
|
-
|
|
345
|
-
|
|
368
|
+
r.value ? (s(), w("div", ke, [
|
|
369
|
+
G.value ? (s(), p(he, {
|
|
346
370
|
key: 0,
|
|
347
371
|
active: y.value,
|
|
348
|
-
"onUpdate:active": k[0] || (k[0] = (
|
|
349
|
-
onChange:
|
|
350
|
-
},
|
|
372
|
+
"onUpdate:active": k[0] || (k[0] = (_) => y.value = _),
|
|
373
|
+
onChange: Q
|
|
374
|
+
}, B({ _: 2 }, [
|
|
351
375
|
e.highlight?.props?.icon ? {
|
|
352
376
|
name: "icon",
|
|
353
377
|
fn: l(() => [
|
|
354
|
-
(s(),
|
|
378
|
+
(s(), p(f(e.highlight.props.icon)))
|
|
355
379
|
]),
|
|
356
380
|
key: "0"
|
|
357
381
|
} : typeof e.highlight == "object" ? {
|
|
358
382
|
name: "default",
|
|
359
|
-
fn: l(({ onClick:
|
|
360
|
-
(s(),
|
|
383
|
+
fn: l(({ onClick: _ }) => [
|
|
384
|
+
(s(), p(f(e.highlight), { onClick: _ }, null, 8, ["onClick"]))
|
|
361
385
|
]),
|
|
362
386
|
key: "1"
|
|
363
387
|
} : void 0
|
|
364
388
|
]), 1032, ["active"])) : P("", !0),
|
|
365
|
-
|
|
389
|
+
K.value ? (s(), p(Te, {
|
|
366
390
|
key: 1,
|
|
367
|
-
active:
|
|
368
|
-
"onUpdate:active": k[1] || (k[1] = (
|
|
369
|
-
},
|
|
391
|
+
active: $.value,
|
|
392
|
+
"onUpdate:active": k[1] || (k[1] = (_) => $.value = _)
|
|
393
|
+
}, B({ _: 2 }, [
|
|
370
394
|
e.freeText?.props?.icon ? {
|
|
371
395
|
name: "icon",
|
|
372
396
|
fn: l(() => [
|
|
373
|
-
(s(),
|
|
397
|
+
(s(), p(f(e.freeText.props.icon)))
|
|
374
398
|
]),
|
|
375
399
|
key: "0"
|
|
376
400
|
} : typeof e.freeText == "object" ? {
|
|
377
401
|
name: "default",
|
|
378
|
-
fn: l(({ onClick:
|
|
379
|
-
(s(),
|
|
402
|
+
fn: l(({ onClick: _ }) => [
|
|
403
|
+
(s(), p(f(e.freeText), { onClick: _ }, null, 8, ["onClick"]))
|
|
380
404
|
]),
|
|
381
405
|
key: "1"
|
|
382
406
|
} : void 0
|
|
383
407
|
]), 1032, ["active"])) : P("", !0),
|
|
384
|
-
|
|
408
|
+
Z.value ? (s(), p(me, {
|
|
385
409
|
key: 2,
|
|
386
410
|
active: C.value,
|
|
387
|
-
"onUpdate:active": k[2] || (k[2] = (
|
|
388
|
-
},
|
|
411
|
+
"onUpdate:active": k[2] || (k[2] = (_) => C.value = _)
|
|
412
|
+
}, B({ _: 2 }, [
|
|
389
413
|
e.signature?.props?.icon ? {
|
|
390
414
|
name: "icon",
|
|
391
415
|
fn: l(() => [
|
|
392
|
-
(s(),
|
|
416
|
+
(s(), p(f(e.signature.props.icon)))
|
|
393
417
|
]),
|
|
394
418
|
key: "0"
|
|
395
419
|
} : typeof e.signature == "object" ? {
|
|
396
420
|
name: "default",
|
|
397
|
-
fn: l(({ onClick:
|
|
398
|
-
(s(),
|
|
421
|
+
fn: l(({ onClick: _ }) => [
|
|
422
|
+
(s(), p(f(e.signature), { onClick: _ }, null, 8, ["onClick"]))
|
|
399
423
|
]),
|
|
400
424
|
key: "1"
|
|
401
425
|
} : void 0
|
|
@@ -407,34 +431,34 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
407
431
|
]));
|
|
408
432
|
}
|
|
409
433
|
});
|
|
410
|
-
const
|
|
434
|
+
const $e = /* @__PURE__ */ D(Ae, [["__scopeId", "data-v-61a608d5"]]), Pe = (n = {}) => {
|
|
411
435
|
const { highlight: o, freeText: e, signature: t } = n;
|
|
412
436
|
return {
|
|
413
437
|
name: "annotation",
|
|
414
438
|
setup(a) {
|
|
415
|
-
const { componentInstance:
|
|
439
|
+
const { componentInstance: c, shared: r } = a, u = c?.uid ?? 0;
|
|
416
440
|
a.toolbar.addItem({
|
|
417
|
-
id:
|
|
441
|
+
id: re.ANNOTATIONS,
|
|
418
442
|
toolbarDirection: "left",
|
|
419
|
-
component:
|
|
443
|
+
component: se($e, {
|
|
420
444
|
highlight: o,
|
|
421
445
|
freeText: !1,
|
|
422
|
-
signature:
|
|
423
|
-
instanceId:
|
|
446
|
+
signature: t,
|
|
447
|
+
instanceId: u
|
|
424
448
|
})
|
|
425
449
|
});
|
|
426
|
-
const T =
|
|
427
|
-
|
|
450
|
+
const T = c?.appContext.app;
|
|
451
|
+
r.ui ? (T.provide(O, r.ui), console.log(
|
|
428
452
|
"VPdfAnnotationPlugin - Provided UI context at plugin level"
|
|
429
453
|
)) : console.warn(
|
|
430
454
|
"VPdfAnnotationPlugin - No UI context found in plugin context"
|
|
431
|
-
),
|
|
455
|
+
), r.localization?.value ? T.provide(R, r.localization) : console.warn(
|
|
432
456
|
"VPdfAnnotationPlugin - No localization found in plugin context"
|
|
433
457
|
);
|
|
434
458
|
}
|
|
435
459
|
};
|
|
436
460
|
};
|
|
437
461
|
export {
|
|
438
|
-
|
|
439
|
-
|
|
462
|
+
$e as VPdfAnnotationTools,
|
|
463
|
+
Pe as default
|
|
440
464
|
};
|
package/dist/index.umd.cjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
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-52907777],.vpv-toolbar-btn[data-v-52907777]:hover{background-color:var(--vpv-primary-color);color:#fff}.vpv-annotation-tools-container[data-v-61a608d5]{padding-top:.5rem;padding-bottom:.5rem;border-top:1px solid #c6ccd2;max-width:min-content;margin:.5rem auto}.vpv-annotation-tools-container[data-v-61a608d5] .vpv-toolbar-btn{margin-bottom:.25rem}.slide-enter-active[data-v-61a608d5],.slide-leave-active[data-v-61a608d5]{transition:all .3s ease-out}.slide-enter-from[data-v-61a608d5],.slide-leave-to[data-v-61a608d5]{opacity:0}.slide-enter-from[data-v-61a608d5],.slide-leave-to[data-v-61a608d5]{transform:translateY(-20px)}")),document.head.appendChild(t)}}catch(a){console.error("vite-plugin-css-injected-by-js",a)}})();
|
|
2
|
-
(function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h["@vue-pdf-viewer/annotation"]={},h.Vue))})(this,function(h,e){"use strict";var u;(function(n){n.highlight="vpv:annotation:highlight",n.freeText="vpv:annotation:freeText",n.signature="vpv:annotation:signature"})(u||(u={}));var b;(function(n){n.Purple="#7862FF",n.Cyan="#3FE9E3",n.Red="#F87777",n.Orange="#FE9639",n.Yellow="#FBDA15",n.Green="#88F526"})(b||(b={}));const k=Symbol("VPV Shared UIs"),$=Symbol("VPV Current Localization"),z=(n,o)=>`${n}-${o}`,C=e.defineComponent({__name:"AppTooltip",setup(n){const o=e.inject(k),t=e.computed(()=>o?.AppTooltip);return(l,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},l.$attrs)),e.createSlots({default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:2},[e.renderList(l.$slots,(i,c)=>({name:c,fn:e.withCtx(()=>[e.renderSlot(l.$slots,c)])}))]),1040)):(e.openBlock(),e.createElementBlock("div",e.normalizeProps(e.mergeProps({key:1},l.$attrs)),[e.renderSlot(l.$slots,"default")],16))}}),y=e.defineComponent({__name:"AppButton",setup(n){const o=e.inject(k),t=e.computed(()=>o?.AppButton);return(l,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},l.$attrs)),{default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},l.$attrs)),[e.renderSlot(l.$slots,"default")],16))}}),M=(n,o)=>{const t=n[o];return t?typeof t=="function"?t():Promise.resolve(t):new Promise((l,a)=>{(typeof queueMicrotask=="function"?queueMicrotask:setTimeout)(a.bind(null,new Error("Unknown variable dynamic import: "+o)))})},j=e.defineComponent({__name:"Icon",props:{name:{}},setup(n){const o=n,t=e.defineAsyncComponent({loader:()=>M(Object.assign({"../assets/icons/annotations.svg":()=>Promise.resolve().then(()=>Q),"../assets/icons/tool-comment.svg":()=>Promise.resolve().then(()=>X),"../assets/icons/tool-free-text.svg":()=>Promise.resolve().then(()=>te),"../assets/icons/tool-highlight.svg":()=>Promise.resolve().then(()=>ne),"../assets/icons/tool-signature.svg":()=>Promise.resolve().then(()=>ae)}),`../assets/icons/${o.name}.svg`)});return(l,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),{class:"vp-text-xl"}))}}),ge="",w=(n,o)=>{const t=n.__vccOpts||n;for(const[l,a]of o)t[l]=a;return t},T=w(j,[["__scopeId","data-v-c6e40782"]]),x=()=>{const n=e.inject($,e.computed(()=>({})));return{t:e.computed(()=>t=>{const l=t.split(".").pop()||t;return n.value&&l in n.value?n.value[l]:(console.warn(`useLocalization - Translation not found for key: ${t}`),t)}).value,currentLocale:e.computed(()=>n.value)}},O=e.defineComponent({__name:"ToolAnnotation",emits:["toggle"],setup(n,{emit:o}){const{t}=x(),l=o,a=e.ref(!1),i=()=>{a.value=!a.value,l("toggle",a.value)};return(c,s)=>c.$slots.default?e.renderSlot(c.$slots,"default",{key:0,onClick:i},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(y,{"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:i},{default:e.withCtx(()=>[e.createVNode(T,{name:"annotations",class:"vp-text-xl"})]),_:1},8,["aria-label","class"])]),_:1}))}}),me="",I=w(O,[["__scopeId","data-v-52907777"]]),D=e.defineComponent({__name:"AppPopover",setup(n){const o=e.inject(k),t=e.computed(()=>o?.AppPopover);return(l,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},l.$attrs)),{trigger:e.withCtx(()=>[e.renderSlot(l.$slots,"trigger")]),default:e.withCtx(()=>[e.renderSlot(l.$slots,"default")]),_:3},16)):(e.openBlock(),e.createElementBlock("button",e.normalizeProps(e.mergeProps({key:1},l.$attrs)),[e.renderSlot(l.$slots,"default")],16))}}),H=e.defineComponent({__name:"AppHighlightColorPicker",setup(n){const o=e.inject(k),t=e.computed(()=>o?.AppHighlightColorPicker);return(l,a)=>t.value?(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.value),e.normalizeProps(e.mergeProps({key:0},l.$attrs)),null,16)):e.createCommentVNode("",!0)}}),L={class:"vpv-annotation-highlight__color-picker-wrapper"},F=e.defineComponent({__name:"ToolAnnotationHighlight",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:e.mergeModels(["change"],["update:active"]),setup(n,{emit:o}){const t=e.useModel(n,"active"),l=e.ref(!1),a=o,{t:i}=x(),c=e.ref(b.Purple),s=()=>{!t.value&&!l.value&&(l.value=!0),t.value=!t.value},p=f=>{l.value=!1};return e.watchEffect(()=>{!t.value||a("change",c.value)}),(f,m)=>f.$slots.default?e.renderSlot(f.$slots,"default",{key:0,onClick:s},void 0,!0):(e.openBlock(),e.createBlock(D,{key:1,open:l.value,side:"right",sideOffset:10,onInteractOutside:p},{trigger:e.withCtx(()=>[e.createVNode(C,null,{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(i)("annotationHighlightTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(y,{"aria-label":e.unref(i)("annotationHighlightLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":t.value}]),onClick:s},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"icon",{},()=>[e.createVNode(T,{name:"tool-highlight"})],!0)]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createElementVNode("div",L,[e.createElementVNode("p",null,e.toDisplayString(e.unref(i)("annotationHighlightColorPickerLabel")),1),e.createVNode(H,{color:c.value,"onUpdate:color":m[0]||(m[0]=_=>c.value=_)},null,8,["color"])])]),_:3},8,["open"]))}}),_e="",v=w(F,[["__scopeId","data-v-45efa0d1"]]),U=e.defineComponent({__name:"ToolAnnotationSignature",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(n){const o=e.useModel(n,"active"),{t}=x(),l=()=>{o.value=!o.value};return(a,i)=>a.$slots.default?e.renderSlot(a.$slots,"default",{key:0,onClick:l}):(e.openBlock(),e.createBlock(C,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationSignatureTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(y,{"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(a.$slots,"icon",{},()=>[e.createVNode(T,{name:"tool-signature"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),q=e.defineComponent({__name:"ToolAnnotationFreeText",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(n){const o=e.useModel(n,"active"),{t}=x(),l=()=>{o.value=!o.value};return(a,i)=>a.$slots.default?e.renderSlot(a.$slots,"default",{key:0,onClick:l}):(e.openBlock(),e.createBlock(C,{key:1},{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(t)("annotationFreeTextTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(y,{"aria-label":e.unref(t)("annotationFreeTextLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":o.value}]),onClick:l},{default:e.withCtx(()=>[e.renderSlot(a.$slots,"icon",{},()=>[e.createVNode(T,{name:"tool-free-text"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),R={class:"vpv-annotation-tools-container"},Y={key:0,class:"vpv-annotation-tools"},G={highlight:{type:[Object,Boolean],default:()=>!0},freeText:{type:[Object,Boolean],default:()=>!0},signature:{type:[Object,Boolean],default:()=>!0},instanceId:{type:Number,required:!0}},K=e.defineComponent({__name:"VPdfAnnotationTools",props:G,emits:["highlight","freeText","signature"],setup(n,{emit:o}){const t=n,l=o,a=r=>z(t.instanceId,r),i={highlight:new CustomEvent(a(u.highlight),{detail:{active:!1,color:null}}),freeText:new CustomEvent(a(u.freeText),{detail:{active:!1}}),signature:new CustomEvent(a(u.signature),{detail:{active:!1}})},c=e.ref(!1),s=e.reactive({highlight:!1,freeText:!1,signature:!1}),p=e.ref(null),f=e.computed({get:()=>s.highlight,set:r=>{s.highlight=r,r?(s.freeText=!1,s.signature=!1):(p.value=null,B())}}),m=e.computed({get:()=>s.freeText,set:r=>{r&&(s.highlight=!1,s.signature=!1),s.freeText=r,B()}}),_=e.computed({get:()=>s.signature,set:r=>{r&&(s.highlight=!1,s.freeText=!1),s.signature=r,B()}}),re=e.computed(()=>t.highlight),ie=e.computed(()=>t.freeText),se=e.computed(()=>t.signature),ce=r=>{c.value=r,r||(f.value=!1,m.value=!1,_.value=!1,p.value=null)},de=r=>{p.value=r,B()},pe=(r,g)=>{l("highlight",r),i.highlight.detail.active=r,i.highlight.detail.color=g,window.dispatchEvent(i.highlight)},fe=r=>{l("freeText",r),i.freeText.detail.active=r,window.dispatchEvent(i.freeText)},he=r=>{l("signature",r),i.signature.detail.active=r,window.dispatchEvent(i.signature)};function B(){pe(f.value,p.value),fe(m.value),he(_.value)}return(r,g)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(I,{onToggle:ce}),e.createVNode(e.Transition,{name:"slide"},{default:e.withCtx(()=>[c.value?(e.openBlock(),e.createElementBlock("div",Y,[re.value?(e.openBlock(),e.createBlock(v,{key:0,active:f.value,"onUpdate:active":g[0]||(g[0]=d=>f.value=d),onChange:de},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:d})=>[(e.openBlock(),e.createBlock(e.resolveDynamicComponent(t.highlight),{onClick:d},null,8,["onClick"]))]),key:"1"}:void 0]),1032,["active"])):e.createCommentVNode("",!0),ie.value?(e.openBlock(),e.createBlock(q,{key:1,active:m.value,"onUpdate:active":g[1]||(g[1]=d=>m.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),se.value?(e.openBlock(),e.createBlock(U,{key:2,active:_.value,"onUpdate:active":g[2]||(g[2]=d=>_.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})]))}}),ue="",P=w(K,[["__scopeId","data-v-61a608d5"]]),Z=(n={})=>{const{highlight:o,freeText:t,signature:l}=n;return{name:"annotation",setup(a){const{componentInstance:i,shared:c}=a,s=i?.uid??0;a.toolbar.addItem({id:"annotations",toolbarDirection:"left",component:e.h(P,{highlight:o,freeText:!1,signature:!1,instanceId:s})});const p=i?.appContext.app;c.ui?(p.provide(k,c.ui),console.log("VPdfAnnotationPlugin - Provided UI context at plugin level")):console.warn("VPdfAnnotationPlugin - No UI context found in plugin context"),c.localization?.value?p.provide($,c.localization):console.warn("VPdfAnnotationPlugin - No localization found in plugin context")}}},J={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function S(n,o){return e.openBlock(),e.createElementBlock("svg",J,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 Q=Object.freeze(Object.defineProperty({__proto__:null,render:S,default:{render:S}},Symbol.toStringTag,{value:"Module"})),W={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",W,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 X=Object.freeze(Object.defineProperty({__proto__:null,render:V,default:{render:V}},Symbol.toStringTag,{value:"Module"})),ee={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",ee,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 te=Object.freeze(Object.defineProperty({__proto__:null,render:A,default:{render:A}},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("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 ne=Object.freeze(Object.defineProperty({__proto__:null,render:N,default:{render:N}},Symbol.toStringTag,{value:"Module"})),le={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",le,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 ae=Object.freeze(Object.defineProperty({__proto__:null,render:E,default:{render:E}},Symbol.toStringTag,{value:"Module"}));h.VPdfAnnotationTools=P,h.default=Z,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
|
2
|
+
(function(h,e){typeof exports=="object"&&typeof module<"u"?e(exports,require("vue")):typeof define=="function"&&define.amd?define(["exports","vue"],e):(h=typeof globalThis<"u"?globalThis:h||self,e(h["@vue-pdf-viewer/annotation"]={},h.Vue))})(this,function(h,e){"use strict";var k;(function(l){l.highlight="vpv:annotation:highlight",l.freeText="vpv:annotation:freeText",l.signature="vpv:annotation:signature"})(k||(k={}));var B;(function(l){l.Purple="#7862FF",l.Cyan="#3FE9E3",l.Red="#F87777",l.Orange="#FE9639",l.Yellow="#FBDA15",l.Green="#88F526"})(B||(B={}));const z={ANNOTATIONS:"annotations"},_=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(_),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,(s,i)=>({name:i,fn:e.withCtx(()=>[e.renderSlot(n.$slots,i)])}))]),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(_),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)))})},I=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(()=>W),"../assets/icons/tool-comment.svg":()=>Promise.resolve().then(()=>ee),"../assets/icons/tool-free-text.svg":()=>Promise.resolve().then(()=>oe),"../assets/icons/tool-highlight.svg":()=>Promise.resolve().then(()=>le),"../assets/icons/tool-signature.svg":()=>Promise.resolve().then(()=>re)}),`../assets/icons/${o.name}.svg`)});return(n,a)=>(e.openBlock(),e.createBlock(e.resolveDynamicComponent(e.unref(t)),{class:"vp-text-xl"}))}}),ge="",b=(l,o)=>{const t=l.__vccOpts||l;for(const[n,a]of o)t[n]=a;return t},T=b(I,[["__scopeId","data-v-c6e40782"]]),y=()=>{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)}},D=e.defineComponent({__name:"ToolAnnotation",emits:["toggle"],setup(l,{emit:o}){const{t}=y(),n=o,a=e.ref(!1),s=()=>{a.value=!a.value,n("toggle",a.value)};return(i,c)=>i.$slots.default?e.renderSlot(i.$slots,"default",{key:0,onClick:s},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:s},{default:e.withCtx(()=>[e.createVNode(T,{name:"annotations",class:"vp-text-xl"})]),_:1},8,["aria-label","class"])]),_:1}))}}),_e="",H=b(D,[["__scopeId","data-v-52907777"]]),P=e.defineComponent({__name:"AppPopover",setup(l){const o=e.inject(_),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))}}),L=e.defineComponent({__name:"AppHighlightColorPicker",setup(l){const o=e.inject(_),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)}}),F={class:"vpv-annotation-highlight__color-picker-wrapper"},U=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:s}=y(),i=e.ref(B.Purple),c=()=>{!t.value&&!n.value&&(n.value=!0),t.value=!t.value},d=f=>{n.value=!1};return e.watchEffect(()=>{!t.value||a("change",i.value)}),(f,g)=>f.$slots.default?e.renderSlot(f.$slots,"default",{key:0,onClick:c}):(e.openBlock(),e.createBlock(P,{key:1,open:n.value,side:"right",sideOffset:10,onInteractOutside:d},{trigger:e.withCtx(()=>[e.createVNode(C,null,{content:e.withCtx(()=>[e.createTextVNode(e.toDisplayString(e.unref(s)("annotationHighlightTooltip")),1)]),default:e.withCtx(()=>[e.createVNode(w,{"aria-label":e.unref(s)("annotationHighlightLabel"),class:e.normalizeClass(["vpv-toolbar-btn",{"vpv-toolbar-btn-active":t.value}]),onClick:c},{default:e.withCtx(()=>[e.renderSlot(f.$slots,"icon",{},()=>[e.createVNode(T,{name:"tool-highlight"})])]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createElementVNode("div",F,[e.createElementVNode("p",null,e.toDisplayString(e.unref(s)("annotationHighlightColorPickerLabel")),1),e.createVNode(L,{color:i.value,"onUpdate:color":g[0]||(g[0]=u=>i.value=u)},null,8,["color"])])]),_:3},8,["open"]))}}),q=e.defineComponent({__name:"AppSignatures",setup(l){const o=e.inject(_),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)}}),v=e.defineComponent({__name:"ToolAnnotationSignature",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(l){const o=e.useModel(l,"active"),{t}=y(),n=e.ref(!1),a=()=>{!o.value&&!n.value&&(n.value=!0),o.value=!o.value},s=i=>{n.value=!1};return(i,c)=>i.$slots.default?e.renderSlot(i.$slots,"default",{key:0,onClick:a}):(e.openBlock(),e.createBlock(P,{key:1,open:n.value,side:"right",sideOffset:10,class:"vpv-annotation-signatures__popover",onInteractOutside:s},{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(i.$slots,"icon",{},()=>[e.createVNode(T,{name:"tool-signature"})])]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createVNode(q)]),_:3},8,["open"]))}}),R=e.defineComponent({__name:"ToolAnnotationFreeText",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(l){const o=e.useModel(l,"active"),{t}=y(),n=()=>{o.value=!o.value};return(a,s)=>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(T,{name:"tool-free-text"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),Y={class:"vpv-annotation-tools-container"},G={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},instanceId:{type:Number,required:!0}},Z=e.defineComponent({__name:"VPdfAnnotationTools",props:K,emits:["highlight","freeText","signature"],setup(l,{emit:o}){const t=l,n=o,a=r=>M(t.instanceId,r),s={highlight:new CustomEvent(a(k.highlight),{detail:{active:!1,color:null}}),freeText:new CustomEvent(a(k.freeText),{detail:{active:!1}}),signature:new CustomEvent(a(k.signature),{detail:{active:!1}})},i=e.ref(!1),c=e.reactive({highlight:!1,freeText:!1,signature:!1}),d=e.ref(null),f=e.computed({get:()=>c.highlight,set:r=>{c.highlight=r,r?(c.freeText=!1,c.signature=!1):(d.value=null,x())}}),g=e.computed({get:()=>c.freeText,set:r=>{r&&(c.highlight=!1,c.signature=!1),c.freeText=r,x()}}),u=e.computed({get:()=>c.signature,set:r=>{r&&(c.highlight=!1,c.freeText=!1),c.signature=r,x()}}),ie=e.computed(()=>t.highlight),se=e.computed(()=>t.freeText),ce=e.computed(()=>t.signature),pe=r=>{i.value=r,r||(f.value=!1,g.value=!1,u.value=!1,d.value=null)},de=r=>{d.value=r,x()},fe=(r,m)=>{n("highlight",r),s.highlight.detail.active=r,s.highlight.detail.color=m,window.dispatchEvent(s.highlight)},he=r=>{n("freeText",r),s.freeText.detail.active=r,window.dispatchEvent(s.freeText)},me=r=>{n("signature",r),s.signature.detail.active=r,window.dispatchEvent(s.signature)};function x(){fe(f.value,d.value),he(g.value),me(u.value)}return(r,m)=>(e.openBlock(),e.createElementBlock("div",Y,[e.createVNode(H,{onToggle:pe}),e.createVNode(e.Transition,{name:"slide"},{default:e.withCtx(()=>[i.value?(e.openBlock(),e.createElementBlock("div",G,[ie.value?(e.openBlock(),e.createBlock(U,{key:0,active:f.value,"onUpdate:active":m[0]||(m[0]=p=>f.value=p),onChange:de},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),se.value?(e.openBlock(),e.createBlock(R,{key:1,active:g.value,"onUpdate:active":m[1]||(m[1]=p=>g.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),ce.value?(e.openBlock(),e.createBlock(v,{key:2,active:u.value,"onUpdate:active":m[2]||(m[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})]))}}),ue="",$=b(Z,[["__scopeId","data-v-61a608d5"]]),J=(l={})=>{const{highlight:o,freeText:t,signature:n}=l;return{name:"annotation",setup(a){const{componentInstance:s,shared:i}=a,c=s?.uid??0;a.toolbar.addItem({id:z.ANNOTATIONS,toolbarDirection:"left",component:e.h($,{highlight:o,freeText:!1,signature:n,instanceId:c})});const d=s?.appContext.app;i.ui?(d.provide(_,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")}}},Q={xmlns:"http://www.w3.org/2000/svg",width:"1em",height:"1em",fill:"none",viewBox:"0 0 20 20"};function V(l,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 W=Object.freeze(Object.defineProperty({__proto__:null,render:V,default:{render:V}},Symbol.toStringTag,{value:"Module"})),X={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",X,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 ee=Object.freeze(Object.defineProperty({__proto__:null,render:N,default:{render:N}},Symbol.toStringTag,{value:"Module"})),te={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",te,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 oe=Object.freeze(Object.defineProperty({__proto__:null,render:A,default:{render:A}},Symbol.toStringTag,{value:"Module"})),ne={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",ne,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:E,default:{render:E}},Symbol.toStringTag,{value:"Module"})),ae={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",ae,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 re=Object.freeze(Object.defineProperty({__proto__:null,render:O,default:{render:O}},Symbol.toStringTag,{value:"Module"}));h.VPdfAnnotationTools=$,h.default=J,Object.defineProperties(h,{__esModule:{value:!0},[Symbol.toStringTag]:{value:"Module"}})});
|
package/package.json
CHANGED
|
@@ -1,45 +1,45 @@
|
|
|
1
1
|
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
2
|
+
"name": "@vue-pdf-viewer/annotation",
|
|
3
|
+
"private": false,
|
|
4
|
+
"version": "0.0.0-experimental.5",
|
|
5
|
+
"type": "module",
|
|
6
|
+
"main": "./dist/index.umd.cjs",
|
|
7
|
+
"module": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"import": "./dist/index.js",
|
|
12
|
+
"require": "./dist/index.umd.cjs",
|
|
13
|
+
"types": "./dist/index.d.ts"
|
|
14
|
+
}
|
|
15
|
+
},
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"publishConfig": {
|
|
20
|
+
"access": "public"
|
|
21
|
+
},
|
|
22
|
+
"scripts": {
|
|
23
|
+
"test": "vitest",
|
|
24
|
+
"dev": "vite",
|
|
25
|
+
"build": "vue-tsc --project tsconfig.build.json && vite build && tsc --emitDeclarationOnly --project tsconfig.build.json",
|
|
26
|
+
"preview": "vite preview"
|
|
27
|
+
},
|
|
28
|
+
"peerDependencies": {
|
|
29
|
+
"vue": "^3.2.37"
|
|
30
|
+
},
|
|
31
|
+
"dependencies": {
|
|
32
|
+
"@vue-pdf-viewer/shared": "^0.0.0-experimental.13",
|
|
33
|
+
"vite-plugin-css-injected-by-js": "^3.5.2",
|
|
34
|
+
"vue": "^3.2.37"
|
|
35
|
+
},
|
|
36
|
+
"devDependencies": {
|
|
37
|
+
"@vitejs/plugin-vue": "^3.1.0",
|
|
38
|
+
"typescript": "^4.6.4",
|
|
39
|
+
"vite": "^3.1.0",
|
|
40
|
+
"vite-plugin-node-polyfills": "^0.23.0",
|
|
41
|
+
"vite-svg-loader": "^5.1.0",
|
|
42
|
+
"vitest": "^3.1.3",
|
|
43
|
+
"vue-tsc": "^0.40.4"
|
|
44
|
+
}
|
|
45
45
|
}
|