@vue-pdf-viewer/annotation 0.0.0-experimental.0

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