@vue-pdf-viewer/annotation 0.0.0-experimental.3 → 0.0.0-experimental.4
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 +64 -63
- package/dist/index.umd.cjs +1 -1
- package/package.json +43 -43
package/dist/index.js
CHANGED
|
@@ -1,18 +1,20 @@
|
|
|
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 S, computed as g, openBlock as s, createBlock as u, resolveDynamicComponent as _, normalizeProps as A, mergeProps as $, createSlots as
|
|
2
|
+
import { defineComponent as m, inject as S, computed as g, openBlock as s, createBlock as u, resolveDynamicComponent as _, normalizeProps as A, mergeProps as $, createSlots as B, withCtx as l, renderSlot as v, renderList as ee, createElementBlock as I, defineAsyncComponent as te, unref as d, ref as w, createTextVNode as L, toDisplayString as O, createVNode as f, normalizeClass as V, createCommentVNode as P, mergeModels as ne, useModel as j, watchEffect as oe, createElementVNode as q, reactive as ae, Transition as le, h as ie } from "vue";
|
|
3
3
|
var x;
|
|
4
4
|
(function(n) {
|
|
5
5
|
n.highlight = "vpv:annotation:highlight", n.freeText = "vpv:annotation:freeText", n.signature = "vpv:annotation:signature";
|
|
6
6
|
})(x || (x = {}));
|
|
7
|
-
var
|
|
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 se = {
|
|
12
|
+
ANNOTATIONS: "annotations"
|
|
13
|
+
}, E = Symbol("VPV Shared UIs"), R = Symbol("VPV Current Localization"), re = (n, o) => `${n}-${o}`, F = /* @__PURE__ */ m({
|
|
12
14
|
__name: "AppTooltip",
|
|
13
15
|
setup(n) {
|
|
14
|
-
const o = S(
|
|
15
|
-
return (t, a) => e.value ? (s(), u(_(e.value), A($({ key: 0 }, t.$attrs)),
|
|
16
|
+
const o = S(E), e = g(() => o?.AppTooltip);
|
|
17
|
+
return (t, a) => e.value ? (s(), u(_(e.value), A($({ key: 0 }, t.$attrs)), B({
|
|
16
18
|
default: l(() => [
|
|
17
19
|
v(t.$slots, "default")
|
|
18
20
|
]),
|
|
@@ -28,10 +30,10 @@ const B = Symbol("VPV Shared UIs"), R = Symbol("VPV Current Localization"), se =
|
|
|
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 = S(
|
|
36
|
+
const o = S(E), e = g(() => o?.AppButton);
|
|
35
37
|
return (t, a) => e.value ? (s(), u(_(e.value), A($({ key: 0 }, t.$attrs)), {
|
|
36
38
|
default: l(() => [
|
|
37
39
|
v(t.$slots, "default")
|
|
@@ -41,29 +43,29 @@ const B = Symbol("VPV Shared UIs"), R = Symbol("VPV Current Localization"), se =
|
|
|
41
43
|
v(t.$slots, "default")
|
|
42
44
|
], 16));
|
|
43
45
|
}
|
|
44
|
-
}),
|
|
46
|
+
}), ce = (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
|
+
}, ue = /* @__PURE__ */ m({
|
|
50
52
|
__name: "Icon",
|
|
51
53
|
props: {
|
|
52
54
|
name: {}
|
|
53
55
|
},
|
|
54
56
|
setup(n) {
|
|
55
57
|
const o = n, e = te({
|
|
56
|
-
loader: () =>
|
|
58
|
+
loader: () => ce(/* @__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
60
|
return (t, a) => (s(), u(_(d(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
|
-
},
|
|
68
|
+
}, U = /* @__PURE__ */ D(ue, [["__scopeId", "data-v-c6e40782"]]), z = () => {
|
|
67
69
|
const n = S(
|
|
68
70
|
R,
|
|
69
71
|
g(() => ({}))
|
|
@@ -75,28 +77,28 @@ const U = (n, o) => {
|
|
|
75
77
|
}).value,
|
|
76
78
|
currentLocale: g(() => n.value)
|
|
77
79
|
};
|
|
78
|
-
},
|
|
80
|
+
}, pe = /* @__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 = w(!1), r = () => {
|
|
83
85
|
a.value = !a.value, t("toggle", a.value);
|
|
84
86
|
};
|
|
85
87
|
return (p, c) => p.$slots.default ? v(p.$slots, "default", {
|
|
86
88
|
key: 0,
|
|
87
89
|
onClick: r
|
|
88
|
-
}, void 0, !0) : (s(), u(
|
|
90
|
+
}, void 0, !0) : (s(), u(F, { key: 1 }, {
|
|
89
91
|
content: l(() => [
|
|
90
|
-
L(
|
|
92
|
+
L(O(a.value ? d(e)("annotationToggleHideTooltip") : d(e)("annotationToggleShowTooltip")), 1)
|
|
91
93
|
]),
|
|
92
94
|
default: l(() => [
|
|
93
|
-
f(
|
|
95
|
+
f(H, {
|
|
94
96
|
"aria-label": a.value ? d(e)("annotationToggleHideTooltip") : d(e)("annotationToggleShowTooltip"),
|
|
95
|
-
class:
|
|
97
|
+
class: V(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": a.value }]),
|
|
96
98
|
onClick: r
|
|
97
99
|
}, {
|
|
98
100
|
default: l(() => [
|
|
99
|
-
f(
|
|
101
|
+
f(U, {
|
|
100
102
|
name: "annotations",
|
|
101
103
|
class: "vp-text-xl"
|
|
102
104
|
})
|
|
@@ -108,10 +110,10 @@ const U = (n, o) => {
|
|
|
108
110
|
}));
|
|
109
111
|
}
|
|
110
112
|
});
|
|
111
|
-
const
|
|
113
|
+
const ve = /* @__PURE__ */ D(pe, [["__scopeId", "data-v-52907777"]]), ge = /* @__PURE__ */ m({
|
|
112
114
|
__name: "AppPopover",
|
|
113
115
|
setup(n) {
|
|
114
|
-
const o = S(
|
|
116
|
+
const o = S(E), e = g(() => o?.AppPopover);
|
|
115
117
|
return (t, a) => e.value ? (s(), u(_(e.value), A($({ key: 0 }, t.$attrs)), {
|
|
116
118
|
trigger: l(() => [
|
|
117
119
|
v(t.$slots, "trigger")
|
|
@@ -124,13 +126,13 @@ const pe = /* @__PURE__ */ U(ue, [["__scopeId", "data-v-52907777"]]), ve = /* @_
|
|
|
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 = S(
|
|
132
|
+
const o = S(E), e = g(() => o?.AppHighlightColorPicker);
|
|
131
133
|
return (t, a) => e.value ? (s(), u(_(e.value), 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 },
|
|
@@ -138,7 +140,7 @@ const pe = /* @__PURE__ */ U(ue, [["__scopeId", "data-v-52907777"]]), ve = /* @_
|
|
|
138
140
|
},
|
|
139
141
|
emits: /* @__PURE__ */ ne(["change"], ["update:active"]),
|
|
140
142
|
setup(n, { emit: o }) {
|
|
141
|
-
const e =
|
|
143
|
+
const e = j(n, "active"), t = w(!1), a = o, { t: r } = z(), p = w(M.Purple), c = () => {
|
|
142
144
|
!e.value && !t.value && (t.value = !0), e.value = !e.value;
|
|
143
145
|
}, T = (y) => {
|
|
144
146
|
t.value = !1;
|
|
@@ -148,7 +150,7 @@ const pe = /* @__PURE__ */ U(ue, [["__scopeId", "data-v-52907777"]]), ve = /* @_
|
|
|
148
150
|
}), (y, b) => y.$slots.default ? v(y.$slots, "default", {
|
|
149
151
|
key: 0,
|
|
150
152
|
onClick: c
|
|
151
|
-
}
|
|
153
|
+
}) : (s(), u(ge, {
|
|
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
|
-
f(
|
|
161
|
+
f(F, null, {
|
|
160
162
|
content: l(() => [
|
|
161
|
-
L(
|
|
163
|
+
L(O(d(r)("annotationHighlightTooltip")), 1)
|
|
162
164
|
]),
|
|
163
165
|
default: l(() => [
|
|
164
|
-
f(
|
|
166
|
+
f(H, {
|
|
165
167
|
"aria-label": d(r)("annotationHighlightLabel"),
|
|
166
|
-
class:
|
|
168
|
+
class: V(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": e.value }]),
|
|
167
169
|
onClick: c
|
|
168
170
|
}, {
|
|
169
171
|
default: l(() => [
|
|
170
172
|
v(y.$slots, "icon", {}, () => [
|
|
171
|
-
f(
|
|
172
|
-
]
|
|
173
|
+
f(U, { name: "tool-highlight" })
|
|
174
|
+
])
|
|
173
175
|
]),
|
|
174
176
|
_: 3
|
|
175
177
|
}, 8, ["aria-label", "class"])
|
|
@@ -178,9 +180,9 @@ 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,
|
|
183
|
-
f(
|
|
183
|
+
q("div", fe, [
|
|
184
|
+
q("p", null, O(d(r)("annotationHighlightColorPickerLabel")), 1),
|
|
185
|
+
f(de, {
|
|
184
186
|
color: p.value,
|
|
185
187
|
"onUpdate:color": b[0] || (b[0] = (C) => p.value = C)
|
|
186
188
|
}, null, 8, ["color"])
|
|
@@ -189,8 +191,7 @@ const pe = /* @__PURE__ */ U(ue, [["__scopeId", "data-v-52907777"]]), ve = /* @_
|
|
|
189
191
|
_: 3
|
|
190
192
|
}, 8, ["open"]));
|
|
191
193
|
}
|
|
192
|
-
})
|
|
193
|
-
const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @__PURE__ */ m({
|
|
194
|
+
}), _e = /* @__PURE__ */ m({
|
|
194
195
|
__name: "ToolAnnotationSignature",
|
|
195
196
|
props: {
|
|
196
197
|
active: { type: Boolean, required: !0 },
|
|
@@ -198,25 +199,25 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
198
199
|
},
|
|
199
200
|
emits: ["update:active"],
|
|
200
201
|
setup(n) {
|
|
201
|
-
const o =
|
|
202
|
+
const o = j(n, "active"), { t: e } = z(), t = () => {
|
|
202
203
|
o.value = !o.value;
|
|
203
204
|
};
|
|
204
205
|
return (a, r) => a.$slots.default ? v(a.$slots, "default", {
|
|
205
206
|
key: 0,
|
|
206
207
|
onClick: t
|
|
207
|
-
}) : (s(), u(
|
|
208
|
+
}) : (s(), u(F, { key: 1 }, {
|
|
208
209
|
content: l(() => [
|
|
209
|
-
L(
|
|
210
|
+
L(O(d(e)("annotationSignatureTooltip")), 1)
|
|
210
211
|
]),
|
|
211
212
|
default: l(() => [
|
|
212
|
-
f(
|
|
213
|
+
f(H, {
|
|
213
214
|
"aria-label": d(e)("annotationSignatureLabel"),
|
|
214
|
-
class:
|
|
215
|
+
class: V(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": o.value }]),
|
|
215
216
|
onClick: t
|
|
216
217
|
}, {
|
|
217
218
|
default: l(() => [
|
|
218
219
|
v(a.$slots, "icon", {}, () => [
|
|
219
|
-
f(
|
|
220
|
+
f(U, { name: "tool-signature" })
|
|
220
221
|
])
|
|
221
222
|
]),
|
|
222
223
|
_: 3
|
|
@@ -233,25 +234,25 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
233
234
|
},
|
|
234
235
|
emits: ["update:active"],
|
|
235
236
|
setup(n) {
|
|
236
|
-
const o =
|
|
237
|
+
const o = j(n, "active"), { t: e } = z(), t = () => {
|
|
237
238
|
o.value = !o.value;
|
|
238
239
|
};
|
|
239
240
|
return (a, r) => a.$slots.default ? v(a.$slots, "default", {
|
|
240
241
|
key: 0,
|
|
241
242
|
onClick: t
|
|
242
|
-
}) : (s(), u(
|
|
243
|
+
}) : (s(), u(F, { key: 1 }, {
|
|
243
244
|
content: l(() => [
|
|
244
|
-
L(
|
|
245
|
+
L(O(d(e)("annotationFreeTextTooltip")), 1)
|
|
245
246
|
]),
|
|
246
247
|
default: l(() => [
|
|
247
|
-
f(
|
|
248
|
+
f(H, {
|
|
248
249
|
"aria-label": d(e)("annotationFreeTextLabel"),
|
|
249
|
-
class:
|
|
250
|
+
class: V(["vpv-toolbar-btn", { "vpv-toolbar-btn-active": o.value }]),
|
|
250
251
|
onClick: t
|
|
251
252
|
}, {
|
|
252
253
|
default: l(() => [
|
|
253
254
|
v(a.$slots, "icon", {}, () => [
|
|
254
|
-
f(
|
|
255
|
+
f(U, { name: "tool-free-text" })
|
|
255
256
|
])
|
|
256
257
|
]),
|
|
257
258
|
_: 3
|
|
@@ -285,7 +286,7 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
285
286
|
props: ke,
|
|
286
287
|
emits: ["highlight", "freeText", "signature"],
|
|
287
288
|
setup(n, { emit: o }) {
|
|
288
|
-
const e = n, t = o, a = (i) =>
|
|
289
|
+
const e = n, t = o, a = (i) => re(e.instanceId, i), r = {
|
|
289
290
|
highlight: new CustomEvent(
|
|
290
291
|
a(x.highlight),
|
|
291
292
|
{
|
|
@@ -311,22 +312,22 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
311
312
|
}), T = w(null), y = g({
|
|
312
313
|
get: () => c.highlight,
|
|
313
314
|
set: (i) => {
|
|
314
|
-
c.highlight = i, i ? (c.freeText = !1, c.signature = !1) : (T.value = null,
|
|
315
|
+
c.highlight = i, i ? (c.freeText = !1, c.signature = !1) : (T.value = null, N());
|
|
315
316
|
}
|
|
316
317
|
}), b = g({
|
|
317
318
|
get: () => c.freeText,
|
|
318
319
|
set: (i) => {
|
|
319
|
-
i && (c.highlight = !1, c.signature = !1), c.freeText = i,
|
|
320
|
+
i && (c.highlight = !1, c.signature = !1), c.freeText = i, N();
|
|
320
321
|
}
|
|
321
322
|
}), C = g({
|
|
322
323
|
get: () => c.signature,
|
|
323
324
|
set: (i) => {
|
|
324
|
-
i && (c.highlight = !1, c.freeText = !1), c.signature = i,
|
|
325
|
+
i && (c.highlight = !1, c.freeText = !1), c.signature = i, N();
|
|
325
326
|
}
|
|
326
327
|
}), Y = g(() => e.highlight), G = g(() => e.freeText), K = g(() => e.signature), Z = (i) => {
|
|
327
328
|
p.value = i, i || (y.value = !1, b.value = !1, C.value = !1, T.value = null);
|
|
328
329
|
}, J = (i) => {
|
|
329
|
-
T.value = i,
|
|
330
|
+
T.value = i, N();
|
|
330
331
|
}, Q = (i, k) => {
|
|
331
332
|
t("highlight", i), r.highlight.detail.active = i, r.highlight.detail.color = k, window.dispatchEvent(r.highlight);
|
|
332
333
|
}, W = (i) => {
|
|
@@ -334,11 +335,11 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
334
335
|
}, X = (i) => {
|
|
335
336
|
t("signature", i), r.signature.detail.active = i, window.dispatchEvent(r.signature);
|
|
336
337
|
};
|
|
337
|
-
function
|
|
338
|
+
function N() {
|
|
338
339
|
Q(y.value, T.value), W(b.value), X(C.value);
|
|
339
340
|
}
|
|
340
341
|
return (i, k) => (s(), I("div", Te, [
|
|
341
|
-
f(
|
|
342
|
+
f(ve, { onToggle: Z }),
|
|
342
343
|
f(le, { name: "slide" }, {
|
|
343
344
|
default: l(() => [
|
|
344
345
|
p.value ? (s(), I("div", ye, [
|
|
@@ -347,7 +348,7 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
347
348
|
active: y.value,
|
|
348
349
|
"onUpdate:active": k[0] || (k[0] = (h) => y.value = h),
|
|
349
350
|
onChange: J
|
|
350
|
-
},
|
|
351
|
+
}, B({ _: 2 }, [
|
|
351
352
|
e.highlight?.props?.icon ? {
|
|
352
353
|
name: "icon",
|
|
353
354
|
fn: l(() => [
|
|
@@ -366,7 +367,7 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
366
367
|
key: 1,
|
|
367
368
|
active: b.value,
|
|
368
369
|
"onUpdate:active": k[1] || (k[1] = (h) => b.value = h)
|
|
369
|
-
},
|
|
370
|
+
}, B({ _: 2 }, [
|
|
370
371
|
e.freeText?.props?.icon ? {
|
|
371
372
|
name: "icon",
|
|
372
373
|
fn: l(() => [
|
|
@@ -385,7 +386,7 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
385
386
|
key: 2,
|
|
386
387
|
active: C.value,
|
|
387
388
|
"onUpdate:active": k[2] || (k[2] = (h) => C.value = h)
|
|
388
|
-
},
|
|
389
|
+
}, B({ _: 2 }, [
|
|
389
390
|
e.signature?.props?.icon ? {
|
|
390
391
|
name: "icon",
|
|
391
392
|
fn: l(() => [
|
|
@@ -407,14 +408,14 @@ const he = /* @__PURE__ */ U(fe, [["__scopeId", "data-v-45efa0d1"]]), _e = /* @_
|
|
|
407
408
|
]));
|
|
408
409
|
}
|
|
409
410
|
});
|
|
410
|
-
const Ae = /* @__PURE__ */
|
|
411
|
+
const Ae = /* @__PURE__ */ D(be, [["__scopeId", "data-v-61a608d5"]]), Ce = (n = {}) => {
|
|
411
412
|
const { highlight: o, freeText: e, signature: t } = n;
|
|
412
413
|
return {
|
|
413
414
|
name: "annotation",
|
|
414
415
|
setup(a) {
|
|
415
416
|
const { componentInstance: r, shared: p } = a, c = r?.uid ?? 0;
|
|
416
417
|
a.toolbar.addItem({
|
|
417
|
-
id:
|
|
418
|
+
id: se.ANNOTATIONS,
|
|
418
419
|
toolbarDirection: "left",
|
|
419
420
|
component: ie(Ae, {
|
|
420
421
|
highlight: o,
|
|
@@ -424,7 +425,7 @@ const Ae = /* @__PURE__ */ U(be, [["__scopeId", "data-v-61a608d5"]]), Ce = (n =
|
|
|
424
425
|
})
|
|
425
426
|
});
|
|
426
427
|
const T = r?.appContext.app;
|
|
427
|
-
p.ui ? (T.provide(
|
|
428
|
+
p.ui ? (T.provide(E, p.ui), console.log(
|
|
428
429
|
"VPdfAnnotationPlugin - Provided UI context at plugin level"
|
|
429
430
|
)) : console.warn(
|
|
430
431
|
"VPdfAnnotationPlugin - No UI context found in plugin context"
|
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 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 z={ANNOTATIONS:"annotations"},k=Symbol("VPV Shared UIs"),P=Symbol("VPV Current Localization"),M=(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))}}),T=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))}}),O=(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:()=>O(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"}))}}),me="",b=(n,o)=>{const t=n.__vccOpts||n;for(const[l,a]of o)t[l]=a;return t},w=b(j,[["__scopeId","data-v-c6e40782"]]),y=()=>{const n=e.inject(P,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)}},I=e.defineComponent({__name:"ToolAnnotation",emits:["toggle"],setup(n,{emit:o}){const{t}=y(),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(T,{"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(w,{name:"annotations",class:"vp-text-xl"})]),_:1},8,["aria-label","class"])]),_:1}))}}),ge="",D=b(I,[["__scopeId","data-v-52907777"]]),H=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))}}),L=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)}}),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(n,{emit:o}){const t=e.useModel(n,"active"),l=e.ref(!1),a=o,{t:i}=y(),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,g)=>f.$slots.default?e.renderSlot(f.$slots,"default",{key:0,onClick:s}):(e.openBlock(),e.createBlock(H,{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(T,{"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(w,{name:"tool-highlight"})])]),_:3},8,["aria-label","class"])]),_:3})]),default:e.withCtx(()=>[e.createElementVNode("div",F,[e.createElementVNode("p",null,e.toDisplayString(e.unref(i)("annotationHighlightColorPickerLabel")),1),e.createVNode(L,{color:c.value,"onUpdate:color":g[0]||(g[0]=_=>c.value=_)},null,8,["color"])])]),_:3},8,["open"]))}}),q=e.defineComponent({__name:"ToolAnnotationSignature",props:{active:{type:Boolean,required:!0},activeModifiers:{}},emits:["update:active"],setup(n){const o=e.useModel(n,"active"),{t}=y(),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(T,{"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(w,{name:"tool-signature"})])]),_:3},8,["aria-label","class"])]),_:3}))}}),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(),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(T,{"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(w,{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=>M(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,x())}}),g=e.computed({get:()=>s.freeText,set:r=>{r&&(s.highlight=!1,s.signature=!1),s.freeText=r,x()}}),_=e.computed({get:()=>s.signature,set:r=>{r&&(s.highlight=!1,s.freeText=!1),s.signature=r,x()}}),re=e.computed(()=>t.highlight),ie=e.computed(()=>t.freeText),se=e.computed(()=>t.signature),ce=r=>{c.value=r,r||(f.value=!1,g.value=!1,_.value=!1,p.value=null)},de=r=>{p.value=r,x()},pe=(r,m)=>{l("highlight",r),i.highlight.detail.active=r,i.highlight.detail.color=m,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 x(){pe(f.value,p.value),fe(g.value),he(_.value)}return(r,m)=>(e.openBlock(),e.createElementBlock("div",R,[e.createVNode(D,{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(U,{key:0,active:f.value,"onUpdate:active":m[0]||(m[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(v,{key:1,active:g.value,"onUpdate:active":m[1]||(m[1]=d=>g.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(q,{key:2,active:_.value,"onUpdate:active":m[2]||(m[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})]))}}),_e="",S=b(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:z.ANNOTATIONS,toolbarDirection:"left",component:e.h(S,{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(P,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 $(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:$,default:{render:$}},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 N(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:N,default:{render:N}},Symbol.toStringTag,{value:"Module"})),oe={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",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:A,default:{render:A}},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=S,h.default=Z,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.4",
|
|
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.12",
|
|
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
|
}
|