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