@annotorious/svelte 3.0.0-rc.1 → 3.0.0-rc.10
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/annotorious-svelte.es.js +14 -6
- package/dist/annotorious-svelte.es.js.map +1 -1
- package/dist/annotorious-svelte.es10.js +120 -2
- package/dist/annotorious-svelte.es10.js.map +1 -1
- package/dist/annotorious-svelte.es11.js +2 -2
- package/dist/annotorious-svelte.es11.js.map +1 -1
- package/dist/annotorious-svelte.es12.js +20 -0
- package/dist/annotorious-svelte.es12.js.map +1 -0
- package/dist/annotorious-svelte.es13.js +7 -0
- package/dist/annotorious-svelte.es13.js.map +1 -0
- package/dist/annotorious-svelte.es14.js +11 -0
- package/dist/annotorious-svelte.es14.js.map +1 -0
- package/dist/annotorious-svelte.es15.js +10 -0
- package/dist/annotorious-svelte.es15.js.map +1 -0
- package/dist/annotorious-svelte.es2.js +1 -1
- package/dist/annotorious-svelte.es3.js +2 -110
- package/dist/annotorious-svelte.es3.js.map +1 -1
- package/dist/annotorious-svelte.es4.js +9 -123
- package/dist/annotorious-svelte.es4.js.map +1 -1
- package/dist/annotorious-svelte.es5.js +1204 -223
- package/dist/annotorious-svelte.es5.js.map +1 -1
- package/dist/annotorious-svelte.es6.js +108 -7
- package/dist/annotorious-svelte.es6.js.map +1 -1
- package/dist/annotorious-svelte.es7.js +125 -2
- package/dist/annotorious-svelte.es7.js.map +1 -1
- package/dist/annotorious-svelte.es8.js +238 -20518
- package/dist/annotorious-svelte.es8.js.map +1 -1
- package/dist/annotorious-svelte.es9.js +22148 -115
- package/dist/annotorious-svelte.es9.js.map +1 -1
- package/dist/index.d.ts +11 -2
- package/dist/index.d.ts.map +1 -1
- package/package.json +7 -2
- package/src/index.ts +53 -5
|
@@ -1,9 +1,17 @@
|
|
|
1
|
-
import { default as
|
|
2
|
-
import {
|
|
3
|
-
import {
|
|
1
|
+
import { default as l } from "./annotorious-svelte.es2.js";
|
|
2
|
+
import { PointerSelectAction as o } from "./annotorious-svelte.es3.js";
|
|
3
|
+
import { createBody as e } from "./annotorious-svelte.es4.js";
|
|
4
|
+
import { ShapeType as t, W3CImageFormat as r } from "./annotorious-svelte.es5.js";
|
|
5
|
+
import { default as u } from "./annotorious-svelte.es6.js";
|
|
6
|
+
import { default as g } from "./annotorious-svelte.es7.js";
|
|
7
|
+
const c = o, m = e, s = t, i = r;
|
|
4
8
|
export {
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
9
|
+
l as MouseOverTooltip,
|
|
10
|
+
u as OpenSeadragonAnnotator,
|
|
11
|
+
g as OpenSeadragonPopup,
|
|
12
|
+
c as PointerSelectAction,
|
|
13
|
+
s as ShapeType,
|
|
14
|
+
i as W3CImageFormat,
|
|
15
|
+
m as createBody
|
|
8
16
|
};
|
|
9
17
|
//# sourceMappingURL=annotorious-svelte.es.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-svelte.es.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es.js","sources":["../src/index.ts"],"sourcesContent":["export * from './osd';\n\nexport { default as MouseOverTooltip } from './MouseOverTooltip.svelte';\n\n// Essential re-exports from @annotorious/core\nexport type {\n Annotation,\n AnnotationBody,\n AnnotationTarget,\n Annotator,\n AnnotatorState,\n Color,\n DrawingStyle,\n FormatAdapter,\n ParseResult,\n User,\n W3CAnnotation,\n W3CAnnotationBody,\n W3CAnnotationTarget,\n W3CSelector\n} from '@annotorious/core/src/model';\n\nexport type { \n HoverState,\n Selection,\n SelectionState,\n Store,\n StoreChangeEvent,\n StoreObserver,\n SvelteAnnotator,\n SvelteAnnotatorState\n} from '@annotorious/core/src/state';\n\nimport {\n PointerSelectAction as _PointerSelectAction\n} from '@annotorious/core/src/state';\n\nexport const PointerSelectAction = _PointerSelectAction;\n\nimport {\n createBody as _createBody\n} from '@annotorious/core/src/utils';\n\nexport const createBody = _createBody;\n\n// Essential re-exports from @annotorious/annotorious \nexport type {\n ImageAnnotator,\n ImageAnnotation,\n ImageAnnotatorState,\n Polygon,\n Rectangle,\n Shape\n} from '@annotorious/annotorious';\n\nimport { \n ShapeType as _ShapeType,\n W3CImageFormat as _W3CImageFormat\n} from '@annotorious/annotorious';\n\nexport const ShapeType = _ShapeType;\nexport const W3CImageFormat = _W3CImageFormat;"],"names":["PointerSelectAction","_PointerSelectAction","createBody","_createBody","ShapeType","_ShapeType","W3CImageFormat","_W3CImageFormat"],"mappings":";;;;;;AAqCO,MAAMA,IAAsBC,GAMtBC,IAAaC,GAiBbC,IAAYC,GACZC,IAAiBC;"}
|
|
@@ -1,5 +1,123 @@
|
|
|
1
|
-
|
|
1
|
+
var F = { dragStart: !0 }, rt = (e, s, i) => Math.min(Math.max(e, s), i), G = (e) => typeof e == "string", dt = ([e, s], i, d) => {
|
|
2
|
+
const u = (y, f) => f === 0 ? 0 : Math.ceil(y / f) * f;
|
|
3
|
+
return [u(i, e), u(d, s)];
|
|
4
|
+
}, ot = (e, s) => e.some((i) => s.some((d) => i.contains(d)));
|
|
5
|
+
function I(e, s) {
|
|
6
|
+
if (e === void 0)
|
|
7
|
+
return;
|
|
8
|
+
if (J(e))
|
|
9
|
+
return e.getBoundingClientRect();
|
|
10
|
+
if (typeof e == "object") {
|
|
11
|
+
const { top: d = 0, left: u = 0, right: y = 0, bottom: f = 0 } = e;
|
|
12
|
+
return { top: d, right: window.innerWidth - y, bottom: window.innerHeight - f, left: u };
|
|
13
|
+
}
|
|
14
|
+
if (e === "parent")
|
|
15
|
+
return s.parentNode.getBoundingClientRect();
|
|
16
|
+
const i = document.querySelector(e);
|
|
17
|
+
if (i === null)
|
|
18
|
+
throw new Error("The selector provided for bound doesn't exists in the document.");
|
|
19
|
+
return i.getBoundingClientRect();
|
|
20
|
+
}
|
|
21
|
+
var H = (e, s, i) => e.style.setProperty(s, i), J = (e) => e instanceof HTMLElement, ut = (e, s = {}) => {
|
|
22
|
+
let i, d, { bounds: u, axis: y = "both", gpuAcceleration: f = !0, legacyTranslate: K = !0, transform: L, applyUserSelectHack: P = !0, disabled: O = !1, ignoreMultitouch: Q = !1, recomputeBounds: x = F, grid: T, position: p, cancel: N, handle: D, defaultClass: M = "neodrag", defaultClassDragging: X = "neodrag-dragging", defaultClassDragged: S = "neodrag-dragged", defaultPosition: it = { x: 0, y: 0 }, onDragStart: at, onDrag: st, onDragEnd: lt } = s, B = !1, b = 0, w = 0, A = 0, C = 0, Y = 0, q = 0, { x: $, y: R } = p ? { x: (p == null ? void 0 : p.x) ?? 0, y: (p == null ? void 0 : p.y) ?? 0 } : it;
|
|
23
|
+
W($, R);
|
|
24
|
+
let g, v, E, k, V, Z = "", ct = !!p;
|
|
25
|
+
x = { ...F, ...x };
|
|
26
|
+
const U = document.body.style, m = e.classList;
|
|
27
|
+
function W(t = b, r = w) {
|
|
28
|
+
if (!L) {
|
|
29
|
+
if (K) {
|
|
30
|
+
let a = `${+t}px, ${+r}px`;
|
|
31
|
+
return H(e, "transform", f ? `translate3d(${a}, 0)` : `translate(${a})`);
|
|
32
|
+
}
|
|
33
|
+
return H(e, "translate", `${+t}px ${+r}px ${f ? "1px" : ""}`);
|
|
34
|
+
}
|
|
35
|
+
const o = L({ offsetX: t, offsetY: r, rootNode: e });
|
|
36
|
+
G(o) && H(e, "transform", o);
|
|
37
|
+
}
|
|
38
|
+
const j = (t, r) => {
|
|
39
|
+
const o = { offsetX: b, offsetY: w, rootNode: e, currentNode: V };
|
|
40
|
+
e.dispatchEvent(new CustomEvent(t, { detail: o })), r == null || r(o);
|
|
41
|
+
}, z = addEventListener;
|
|
42
|
+
z("pointerdown", tt, !1), z("pointerup", et, !1), z("pointermove", nt, !1), H(e, "touch-action", "none");
|
|
43
|
+
const _ = () => {
|
|
44
|
+
let t = e.offsetWidth / v.width;
|
|
45
|
+
return isNaN(t) && (t = 1), t;
|
|
46
|
+
};
|
|
47
|
+
function tt(t) {
|
|
48
|
+
if (O || t.button === 2 || Q && !t.isPrimary)
|
|
49
|
+
return;
|
|
50
|
+
if (x.dragStart && (g = I(u, e)), G(D) && G(N) && D === N)
|
|
51
|
+
throw new Error("`handle` selector can't be same as `cancel` selector");
|
|
52
|
+
if (m.add(M), E = function(n, c) {
|
|
53
|
+
if (!n)
|
|
54
|
+
return [c];
|
|
55
|
+
if (J(n))
|
|
56
|
+
return [n];
|
|
57
|
+
if (Array.isArray(n))
|
|
58
|
+
return n;
|
|
59
|
+
const h = c.querySelectorAll(n);
|
|
60
|
+
if (h === null)
|
|
61
|
+
throw new Error("Selector passed for `handle` option should be child of the element on which the action is applied");
|
|
62
|
+
return Array.from(h.values());
|
|
63
|
+
}(D, e), k = function(n, c) {
|
|
64
|
+
if (!n)
|
|
65
|
+
return [];
|
|
66
|
+
if (J(n))
|
|
67
|
+
return [n];
|
|
68
|
+
if (Array.isArray(n))
|
|
69
|
+
return n;
|
|
70
|
+
const h = c.querySelectorAll(n);
|
|
71
|
+
if (h === null)
|
|
72
|
+
throw new Error("Selector passed for `cancel` option should be child of the element on which the action is applied");
|
|
73
|
+
return Array.from(h.values());
|
|
74
|
+
}(N, e), i = /(both|x)/.test(y), d = /(both|y)/.test(y), ot(k, E))
|
|
75
|
+
throw new Error("Element being dragged can't be a child of the element on which `cancel` is applied");
|
|
76
|
+
const r = t.composedPath()[0];
|
|
77
|
+
if (!E.some((n) => {
|
|
78
|
+
var c;
|
|
79
|
+
return n.contains(r) || ((c = n.shadowRoot) == null ? void 0 : c.contains(r));
|
|
80
|
+
}) || ot(k, [r]))
|
|
81
|
+
return;
|
|
82
|
+
V = E.length === 1 ? e : E.find((n) => n.contains(r)), B = !0, v = e.getBoundingClientRect(), P && (Z = U.userSelect, U.userSelect = "none"), j("neodrag:start", at);
|
|
83
|
+
const { clientX: o, clientY: a } = t, l = _();
|
|
84
|
+
i && (A = o - $ / l), d && (C = a - R / l), g && (Y = o - v.left, q = a - v.top);
|
|
85
|
+
}
|
|
86
|
+
function et() {
|
|
87
|
+
B && (x.dragEnd && (g = I(u, e)), m.remove(X), m.add(S), P && (U.userSelect = Z), j("neodrag:end", lt), i && (A = b), d && (C = w), B = !1);
|
|
88
|
+
}
|
|
89
|
+
function nt(t) {
|
|
90
|
+
if (!B)
|
|
91
|
+
return;
|
|
92
|
+
x.drag && (g = I(u, e)), m.add(X), t.preventDefault(), v = e.getBoundingClientRect();
|
|
93
|
+
let r = t.clientX, o = t.clientY;
|
|
94
|
+
const a = _();
|
|
95
|
+
if (g) {
|
|
96
|
+
const l = { left: g.left + Y, top: g.top + q, right: g.right + Y - v.width, bottom: g.bottom + q - v.height };
|
|
97
|
+
r = rt(r, l.left, l.right), o = rt(o, l.top, l.bottom);
|
|
98
|
+
}
|
|
99
|
+
if (Array.isArray(T)) {
|
|
100
|
+
let [l, n] = T;
|
|
101
|
+
if (isNaN(+l) || l < 0)
|
|
102
|
+
throw new Error("1st argument of `grid` must be a valid positive number");
|
|
103
|
+
if (isNaN(+n) || n < 0)
|
|
104
|
+
throw new Error("2nd argument of `grid` must be a valid positive number");
|
|
105
|
+
let c = r - A, h = o - C;
|
|
106
|
+
[c, h] = dt([l / a, n / a], c, h), r = A + c, o = C + h;
|
|
107
|
+
}
|
|
108
|
+
i && (b = Math.round((r - A) * a)), d && (w = Math.round((o - C) * a)), $ = b, R = w, j("neodrag", st), W();
|
|
109
|
+
}
|
|
110
|
+
return { destroy: () => {
|
|
111
|
+
const t = removeEventListener;
|
|
112
|
+
t("pointerdown", tt, !1), t("pointerup", et, !1), t("pointermove", nt, !1);
|
|
113
|
+
}, update: (t) => {
|
|
114
|
+
var o, a;
|
|
115
|
+
y = t.axis || "both", O = t.disabled ?? !1, Q = t.ignoreMultitouch ?? !1, D = t.handle, u = t.bounds, x = t.recomputeBounds ?? F, N = t.cancel, P = t.applyUserSelectHack ?? !0, T = t.grid, f = t.gpuAcceleration ?? !0, K = t.legacyTranslate ?? !0, L = t.transform;
|
|
116
|
+
const r = m.contains(S);
|
|
117
|
+
m.remove(M, S), M = t.defaultClass ?? "neodrag", X = t.defaultClassDragging ?? "neodrag-dragging", S = t.defaultClassDragged ?? "neodrag-dragged", m.add(M), r && m.add(S), ct && ($ = b = ((o = t.position) == null ? void 0 : o.x) ?? b, R = w = ((a = t.position) == null ? void 0 : a.y) ?? w, W());
|
|
118
|
+
} };
|
|
119
|
+
};
|
|
2
120
|
export {
|
|
3
|
-
|
|
121
|
+
ut as draggable
|
|
4
122
|
};
|
|
5
123
|
//# sourceMappingURL=annotorious-svelte.es10.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-svelte.es10.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es10.js","sources":["../../../node_modules/@neodrag/svelte/dist/min/index.js"],"sourcesContent":["var t={dragStart:!0},e=(t,e,n)=>Math.min(Math.max(t,e),n),n=t=>\"string\"==typeof t,r=([t,e],n,r)=>{const o=(t,e)=>0===e?0:Math.ceil(t/e)*e;return[o(n,t),o(r,e)]};var o=(t,e)=>t.some((t=>e.some((e=>t.contains(e)))));function i(t,e){if(void 0===t)return;if(s(t))return t.getBoundingClientRect();if(\"object\"==typeof t){const{top:e=0,left:n=0,right:r=0,bottom:o=0}=t;return{top:e,right:window.innerWidth-r,bottom:window.innerHeight-o,left:n}}if(\"parent\"===t)return e.parentNode.getBoundingClientRect();const n=document.querySelector(t);if(null===n)throw new Error(\"The selector provided for bound doesn't exists in the document.\");return n.getBoundingClientRect()}var a=(t,e,n)=>t.style.setProperty(e,n),s=t=>t instanceof HTMLElement,d=(d,l={})=>{let c,u,{bounds:f,axis:g=\"both\",gpuAcceleration:h=!0,legacyTranslate:p=!0,transform:m,applyUserSelectHack:y=!0,disabled:b=!1,ignoreMultitouch:w=!1,recomputeBounds:v=t,grid:x,position:E,cancel:S,handle:A,defaultClass:C=\"neodrag\",defaultClassDragging:N=\"neodrag-dragging\",defaultClassDragged:D=\"neodrag-dragged\",defaultPosition:M={x:0,y:0},onDragStart:B,onDrag:$,onDragEnd:R}=l,H=!1,L=0,P=0,T=0,X=0,Y=0,q=0,{x:k,y:U}=E?{x:E?.x??0,y:E?.y??0}:M;Q(k,U);let W,j,z,F,G,I=\"\",J=!!E;v={...t,...v};const K=document.body.style,O=d.classList;function Q(t=L,e=P){if(!m){if(p){let n=`${+t}px, ${+e}px`;return a(d,\"transform\",h?`translate3d(${n}, 0)`:`translate(${n})`)}return a(d,\"translate\",`${+t}px ${+e}px ${h?\"1px\":\"\"}`)}const r=m({offsetX:t,offsetY:e,rootNode:d});n(r)&&a(d,\"transform\",r)}const V=(t,e)=>{const n={offsetX:L,offsetY:P,rootNode:d,currentNode:G};d.dispatchEvent(new CustomEvent(t,{detail:n})),e?.(n)};const Z=addEventListener;Z(\"pointerdown\",tt,!1),Z(\"pointerup\",et,!1),Z(\"pointermove\",nt,!1),a(d,\"touch-action\",\"none\");const _=()=>{let t=d.offsetWidth/j.width;return isNaN(t)&&(t=1),t};function tt(t){if(b)return;if(2===t.button)return;if(w&&!t.isPrimary)return;if(v.dragStart&&(W=i(f,d)),n(A)&&n(S)&&A===S)throw new Error(\"`handle` selector can't be same as `cancel` selector\");if(O.add(C),z=function(t,e){if(!t)return[e];if(s(t))return[t];if(Array.isArray(t))return t;const n=e.querySelectorAll(t);if(null===n)throw new Error(\"Selector passed for `handle` option should be child of the element on which the action is applied\");return Array.from(n.values())}(A,d),F=function(t,e){if(!t)return[];if(s(t))return[t];if(Array.isArray(t))return t;const n=e.querySelectorAll(t);if(null===n)throw new Error(\"Selector passed for `cancel` option should be child of the element on which the action is applied\");return Array.from(n.values())}(S,d),c=/(both|x)/.test(g),u=/(both|y)/.test(g),o(F,z))throw new Error(\"Element being dragged can't be a child of the element on which `cancel` is applied\");const e=t.composedPath()[0];if(!z.some((t=>t.contains(e)||t.shadowRoot?.contains(e)))||o(F,[e]))return;G=1===z.length?d:z.find((t=>t.contains(e))),H=!0,j=d.getBoundingClientRect(),y&&(I=K.userSelect,K.userSelect=\"none\"),V(\"neodrag:start\",B);const{clientX:r,clientY:a}=t,l=_();c&&(T=r-k/l),u&&(X=a-U/l),W&&(Y=r-j.left,q=a-j.top)}function et(){H&&(v.dragEnd&&(W=i(f,d)),O.remove(N),O.add(D),y&&(K.userSelect=I),V(\"neodrag:end\",R),c&&(T=L),u&&(X=P),H=!1)}function nt(t){if(!H)return;v.drag&&(W=i(f,d)),O.add(N),t.preventDefault(),j=d.getBoundingClientRect();let n=t.clientX,o=t.clientY;const a=_();if(W){const t={left:W.left+Y,top:W.top+q,right:W.right+Y-j.width,bottom:W.bottom+q-j.height};n=e(n,t.left,t.right),o=e(o,t.top,t.bottom)}if(Array.isArray(x)){let[t,e]=x;if(isNaN(+t)||t<0)throw new Error(\"1st argument of `grid` must be a valid positive number\");if(isNaN(+e)||e<0)throw new Error(\"2nd argument of `grid` must be a valid positive number\");let i=n-T,s=o-X;[i,s]=r([t/a,e/a],i,s),n=T+i,o=X+s}c&&(L=Math.round((n-T)*a)),u&&(P=Math.round((o-X)*a)),k=L,U=P,V(\"neodrag\",$),Q()}return{destroy:()=>{const t=removeEventListener;t(\"pointerdown\",tt,!1),t(\"pointerup\",et,!1),t(\"pointermove\",nt,!1)},update:e=>{g=e.axis||\"both\",b=e.disabled??!1,w=e.ignoreMultitouch??!1,A=e.handle,f=e.bounds,v=e.recomputeBounds??t,S=e.cancel,y=e.applyUserSelectHack??!0,x=e.grid,h=e.gpuAcceleration??!0,p=e.legacyTranslate??!0,m=e.transform;const n=O.contains(D);O.remove(C,D),C=e.defaultClass??\"neodrag\",N=e.defaultClassDragging??\"neodrag-dragging\",D=e.defaultClassDragged??\"neodrag-dragged\",O.add(C),n&&O.add(D),J&&(k=L=e.position?.x??L,U=P=e.position?.y??P,Q())}}};export{d as draggable};"],"names":["t","e","n","r","o","i","s","a","d","l","c","u","f","g","h","p","m","y","b","w","v","x","E","S","A","C","N","D","M","B","$","R","H","L","P","T","X","k","U","Q","W","j","z","F","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{
|
|
3
|
-
|
|
3
|
+
e as default
|
|
4
4
|
};
|
|
5
5
|
//# sourceMappingURL=annotorious-svelte.es11.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-svelte.es11.js","sources":[
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es11.js","sources":[],"sourcesContent":[],"names":[],"mappings":";"}
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import e from "./annotorious-svelte.es13.js";
|
|
2
|
+
import i from "./annotorious-svelte.es14.js";
|
|
3
|
+
import { unsafeStringify as d } from "./annotorious-svelte.es15.js";
|
|
4
|
+
function g(n, m, t) {
|
|
5
|
+
if (e.randomUUID && !m && !n)
|
|
6
|
+
return e.randomUUID();
|
|
7
|
+
n = n || {};
|
|
8
|
+
const r = n.random || (n.rng || i)();
|
|
9
|
+
if (r[6] = r[6] & 15 | 64, r[8] = r[8] & 63 | 128, m) {
|
|
10
|
+
t = t || 0;
|
|
11
|
+
for (let a = 0; a < 16; ++a)
|
|
12
|
+
m[t + a] = r[a];
|
|
13
|
+
return m;
|
|
14
|
+
}
|
|
15
|
+
return d(r);
|
|
16
|
+
}
|
|
17
|
+
export {
|
|
18
|
+
g as default
|
|
19
|
+
};
|
|
20
|
+
//# sourceMappingURL=annotorious-svelte.es12.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es12.js","sources":["../../../node_modules/uuid/dist/esm-browser/v4.js"],"sourcesContent":["import native from './native.js';\nimport rng from './rng.js';\nimport { unsafeStringify } from './stringify.js';\n\nfunction v4(options, buf, offset) {\n if (native.randomUUID && !buf && !options) {\n return native.randomUUID();\n }\n\n options = options || {};\n const rnds = options.random || (options.rng || rng)(); // Per 4.4, set bits for version and `clock_seq_hi_and_reserved`\n\n rnds[6] = rnds[6] & 0x0f | 0x40;\n rnds[8] = rnds[8] & 0x3f | 0x80; // Copy bytes to buffer, if provided\n\n if (buf) {\n offset = offset || 0;\n\n for (let i = 0; i < 16; ++i) {\n buf[offset + i] = rnds[i];\n }\n\n return buf;\n }\n\n return unsafeStringify(rnds);\n}\n\nexport default v4;"],"names":["v4","options","buf","offset","native","rnds","rng","i","unsafeStringify"],"mappings":";;;AAIA,SAASA,EAAGC,GAASC,GAAKC,GAAQ;AAChC,MAAIC,EAAO,cAAc,CAACF,KAAO,CAACD;AAChC,WAAOG,EAAO;AAGhB,EAAAH,IAAUA,KAAW;AACrB,QAAMI,IAAOJ,EAAQ,WAAWA,EAAQ,OAAOK;AAK/C,MAHAD,EAAK,CAAC,IAAIA,EAAK,CAAC,IAAI,KAAO,IAC3BA,EAAK,CAAC,IAAIA,EAAK,CAAC,IAAI,KAAO,KAEvBH,GAAK;AACP,IAAAC,IAASA,KAAU;AAEnB,aAASI,IAAI,GAAGA,IAAI,IAAI,EAAEA;AACxB,MAAAL,EAAIC,IAASI,CAAC,IAAIF,EAAKE,CAAC;AAG1B,WAAOL;AAAA,EACR;AAED,SAAOM,EAAgBH,CAAI;AAC7B;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es13.js","sources":["../../../node_modules/uuid/dist/esm-browser/native.js"],"sourcesContent":["const randomUUID = typeof crypto !== 'undefined' && crypto.randomUUID && crypto.randomUUID.bind(crypto);\nexport default {\n randomUUID\n};"],"names":["randomUUID","native"],"mappings":"AAAA,MAAMA,IAAa,OAAO,SAAW,OAAe,OAAO,cAAc,OAAO,WAAW,KAAK,MAAM,GACvFC,IAAA;AAAA,EACb,YAAAD;AACF;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,11 @@
|
|
|
1
|
+
let t;
|
|
2
|
+
const e = new Uint8Array(16);
|
|
3
|
+
function o() {
|
|
4
|
+
if (!t && (t = typeof crypto < "u" && crypto.getRandomValues && crypto.getRandomValues.bind(crypto), !t))
|
|
5
|
+
throw new Error("crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported");
|
|
6
|
+
return t(e);
|
|
7
|
+
}
|
|
8
|
+
export {
|
|
9
|
+
o as default
|
|
10
|
+
};
|
|
11
|
+
//# sourceMappingURL=annotorious-svelte.es14.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es14.js","sources":["../../../node_modules/uuid/dist/esm-browser/rng.js"],"sourcesContent":["// Unique ID creation requires a high quality random # generator. In the browser we therefore\n// require the crypto API and do not support built-in fallback to lower quality random number\n// generators (like Math.random()).\nlet getRandomValues;\nconst rnds8 = new Uint8Array(16);\nexport default function rng() {\n // lazy load so that environments that need to polyfill have a chance to do so\n if (!getRandomValues) {\n // getRandomValues needs to be invoked in a context where \"this\" is a Crypto implementation.\n getRandomValues = typeof crypto !== 'undefined' && crypto.getRandomValues && crypto.getRandomValues.bind(crypto);\n\n if (!getRandomValues) {\n throw new Error('crypto.getRandomValues() not supported. See https://github.com/uuidjs/uuid#getrandomvalues-not-supported');\n }\n }\n\n return getRandomValues(rnds8);\n}"],"names":["getRandomValues","rnds8","rng"],"mappings":"AAGA,IAAIA;AACJ,MAAMC,IAAQ,IAAI,WAAW,EAAE;AAChB,SAASC,IAAM;AAE5B,MAAI,CAACF,MAEHA,IAAkB,OAAO,SAAW,OAAe,OAAO,mBAAmB,OAAO,gBAAgB,KAAK,MAAM,GAE3G,CAACA;AACH,UAAM,IAAI,MAAM,0GAA0G;AAI9H,SAAOA,EAAgBC,CAAK;AAC9B;","x_google_ignoreList":[0]}
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
const i = [];
|
|
2
|
+
for (let n = 0; n < 256; ++n)
|
|
3
|
+
i.push((n + 256).toString(16).slice(1));
|
|
4
|
+
function c(n, u = 0) {
|
|
5
|
+
return i[n[u + 0]] + i[n[u + 1]] + i[n[u + 2]] + i[n[u + 3]] + "-" + i[n[u + 4]] + i[n[u + 5]] + "-" + i[n[u + 6]] + i[n[u + 7]] + "-" + i[n[u + 8]] + i[n[u + 9]] + "-" + i[n[u + 10]] + i[n[u + 11]] + i[n[u + 12]] + i[n[u + 13]] + i[n[u + 14]] + i[n[u + 15]];
|
|
6
|
+
}
|
|
7
|
+
export {
|
|
8
|
+
c as unsafeStringify
|
|
9
|
+
};
|
|
10
|
+
//# sourceMappingURL=annotorious-svelte.es15.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es15.js","sources":["../../../node_modules/uuid/dist/esm-browser/stringify.js"],"sourcesContent":["import validate from './validate.js';\n/**\n * Convert array of 16 byte values to UUID string format of the form:\n * XXXXXXXX-XXXX-XXXX-XXXX-XXXXXXXXXXXX\n */\n\nconst byteToHex = [];\n\nfor (let i = 0; i < 256; ++i) {\n byteToHex.push((i + 0x100).toString(16).slice(1));\n}\n\nexport function unsafeStringify(arr, offset = 0) {\n // Note: Be careful editing this code! It's been tuned for performance\n // and works in ways you may not expect. See https://github.com/uuidjs/uuid/pull/434\n return byteToHex[arr[offset + 0]] + byteToHex[arr[offset + 1]] + byteToHex[arr[offset + 2]] + byteToHex[arr[offset + 3]] + '-' + byteToHex[arr[offset + 4]] + byteToHex[arr[offset + 5]] + '-' + byteToHex[arr[offset + 6]] + byteToHex[arr[offset + 7]] + '-' + byteToHex[arr[offset + 8]] + byteToHex[arr[offset + 9]] + '-' + byteToHex[arr[offset + 10]] + byteToHex[arr[offset + 11]] + byteToHex[arr[offset + 12]] + byteToHex[arr[offset + 13]] + byteToHex[arr[offset + 14]] + byteToHex[arr[offset + 15]];\n}\n\nfunction stringify(arr, offset = 0) {\n const uuid = unsafeStringify(arr, offset); // Consistency check for valid UUID. If this throws, it's likely due to one\n // of the following:\n // - One or more input array values don't map to a hex octet (leading to\n // \"undefined\" in the uuid)\n // - Invalid input values for the RFC `version` or `variant` fields\n\n if (!validate(uuid)) {\n throw TypeError('Stringified UUID is invalid');\n }\n\n return uuid;\n}\n\nexport default stringify;"],"names":["byteToHex","i","unsafeStringify","arr","offset"],"mappings":"AAMA,MAAMA,IAAY,CAAA;AAElB,SAASC,IAAI,GAAGA,IAAI,KAAK,EAAEA;AACzB,EAAAD,EAAU,MAAMC,IAAI,KAAO,SAAS,EAAE,EAAE,MAAM,CAAC,CAAC;AAG3C,SAASC,EAAgBC,GAAKC,IAAS,GAAG;AAG/C,SAAOJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,CAAC,CAAC,IAAI,MAAMJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC,IAAIJ,EAAUG,EAAIC,IAAS,EAAE,CAAC;AACnf;","x_google_ignoreList":[0]}
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { SvelteComponent as O, init as T, safe_not_equal as q, empty as w, insert as E, transition_in as u, transition_out as _, check_outros as A, detach as L, getContext as N, component_subscribe as S, onMount as X, create_slot as Y, element as j, attr as c, update_slot_base as z, get_all_dirty_from_scope as B, get_slot_changes as D, group_outros as F } from "./annotorious-svelte.
|
|
1
|
+
import { SvelteComponent as O, init as T, safe_not_equal as q, empty as w, insert as E, transition_in as u, transition_out as _, check_outros as A, detach as L, getContext as N, component_subscribe as S, onMount as X, create_slot as Y, element as j, attr as c, update_slot_base as z, get_all_dirty_from_scope as B, get_slot_changes as D, group_outros as F } from "./annotorious-svelte.es8.js";
|
|
2
2
|
const G = (o) => ({ hovered: o & /*hovered*/
|
|
3
3
|
16 }), b = (o) => ({ hovered: (
|
|
4
4
|
/*hovered*/
|
|
@@ -1,113 +1,5 @@
|
|
|
1
|
-
|
|
2
|
-
import { toSvelteStore as D } from "./annotorious-svelte.es6.js";
|
|
3
|
-
import "./annotorious-svelte.es7.js";
|
|
4
|
-
import { createOSDAnnotator as E } from "./annotorious-svelte.es8.js";
|
|
5
|
-
function d(s) {
|
|
6
|
-
let n;
|
|
7
|
-
const o = (
|
|
8
|
-
/*#slots*/
|
|
9
|
-
s[4].default
|
|
10
|
-
), t = v(
|
|
11
|
-
o,
|
|
12
|
-
s,
|
|
13
|
-
/*$$scope*/
|
|
14
|
-
s[3],
|
|
15
|
-
null
|
|
16
|
-
);
|
|
17
|
-
return {
|
|
18
|
-
c() {
|
|
19
|
-
t && t.c();
|
|
20
|
-
},
|
|
21
|
-
m(e, i) {
|
|
22
|
-
t && t.m(e, i), n = !0;
|
|
23
|
-
},
|
|
24
|
-
p(e, i) {
|
|
25
|
-
t && t.p && (!n || i & /*$$scope*/
|
|
26
|
-
8) && C(
|
|
27
|
-
t,
|
|
28
|
-
o,
|
|
29
|
-
e,
|
|
30
|
-
/*$$scope*/
|
|
31
|
-
e[3],
|
|
32
|
-
n ? q(
|
|
33
|
-
o,
|
|
34
|
-
/*$$scope*/
|
|
35
|
-
e[3],
|
|
36
|
-
i,
|
|
37
|
-
null
|
|
38
|
-
) : N(
|
|
39
|
-
/*$$scope*/
|
|
40
|
-
e[3]
|
|
41
|
-
),
|
|
42
|
-
null
|
|
43
|
-
);
|
|
44
|
-
},
|
|
45
|
-
i(e) {
|
|
46
|
-
n || (l(t, e), n = !0);
|
|
47
|
-
},
|
|
48
|
-
o(e) {
|
|
49
|
-
c(t, e), n = !1;
|
|
50
|
-
},
|
|
51
|
-
d(e) {
|
|
52
|
-
t && t.d(e);
|
|
53
|
-
}
|
|
54
|
-
};
|
|
55
|
-
}
|
|
56
|
-
function j(s) {
|
|
57
|
-
let n, o, t = (
|
|
58
|
-
/*viewer*/
|
|
59
|
-
s[0] && d(s)
|
|
60
|
-
);
|
|
61
|
-
return {
|
|
62
|
-
c() {
|
|
63
|
-
t && t.c(), n = k();
|
|
64
|
-
},
|
|
65
|
-
m(e, i) {
|
|
66
|
-
t && t.m(e, i), w(e, n, i), o = !0;
|
|
67
|
-
},
|
|
68
|
-
p(e, [i]) {
|
|
69
|
-
/*viewer*/
|
|
70
|
-
e[0] ? t ? (t.p(e, i), i & /*viewer*/
|
|
71
|
-
1 && l(t, 1)) : (t = d(e), t.c(), l(t, 1), t.m(n.parentNode, n)) : t && (y(), c(t, 1, 1, () => {
|
|
72
|
-
t = null;
|
|
73
|
-
}), A());
|
|
74
|
-
},
|
|
75
|
-
i(e) {
|
|
76
|
-
o || (l(t), o = !0);
|
|
77
|
-
},
|
|
78
|
-
o(e) {
|
|
79
|
-
c(t), o = !1;
|
|
80
|
-
},
|
|
81
|
-
d(e) {
|
|
82
|
-
t && t.d(e), e && O(n);
|
|
83
|
-
}
|
|
84
|
-
};
|
|
85
|
-
}
|
|
86
|
-
function z(s, n, o) {
|
|
87
|
-
let { $$slots: t = {}, $$scope: e } = n, { viewer: i } = n, { opts: f = {} } = n, { anno: a = void 0 } = n;
|
|
88
|
-
const p = (r) => {
|
|
89
|
-
if (r) {
|
|
90
|
-
const u = E(r, f), S = D(u.state.store), _ = {
|
|
91
|
-
...u,
|
|
92
|
-
state: { ...u.state, store: S }
|
|
93
|
-
};
|
|
94
|
-
m("anno", _), m("viewer", r), o(1, a = _);
|
|
95
|
-
}
|
|
96
|
-
};
|
|
97
|
-
return s.$$set = (r) => {
|
|
98
|
-
"viewer" in r && o(0, i = r.viewer), "opts" in r && o(2, f = r.opts), "anno" in r && o(1, a = r.anno), "$$scope" in r && o(3, e = r.$$scope);
|
|
99
|
-
}, s.$$.update = () => {
|
|
100
|
-
s.$$.dirty & /*viewer*/
|
|
101
|
-
1 && p(i);
|
|
102
|
-
}, [i, a, f, e, t];
|
|
103
|
-
}
|
|
104
|
-
class B extends g {
|
|
105
|
-
constructor(n) {
|
|
106
|
-
super(), b(this, n, z, j, h, { viewer: 0, opts: 2, anno: 1 });
|
|
107
|
-
}
|
|
108
|
-
}
|
|
109
|
-
const J = B;
|
|
1
|
+
var N = /* @__PURE__ */ ((E) => (E.EDIT = "EDIT", E.SELECT = "SELECT", E.NONE = "NONE", E))(N || {});
|
|
110
2
|
export {
|
|
111
|
-
|
|
3
|
+
N as PointerSelectAction
|
|
112
4
|
};
|
|
113
5
|
//# sourceMappingURL=annotorious-svelte.es3.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-svelte.es3.js","sources":["
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es3.js","sources":["../../annotorious-core/src/state/Selection.ts"],"sourcesContent":["import { writable } from 'svelte/store';\nimport type { Annotation } from '../model';\nimport type { Store } from './Store';\n \nexport type Selection = {\n\n selected: { id: string, editable?: boolean }[],\n\n pointerEvent?: PointerEvent;\n\n}\n\nexport type SelectionState<T extends Annotation> = ReturnType<typeof createSelectionState<T>>;\n\nexport enum PointerSelectAction {\n\n EDIT = 'EDIT', // Make annotation target(s) editable on pointer select\n \n SELECT = 'SELECT', // Just select, but don't make editable\n\n NONE = 'NONE' // Click won't select - annotation is completely inert\n\n}\n\nconst EMPTY: Selection = { selected: [] };\n\nexport const createSelectionState = <T extends Annotation>(\n store: Store<T>,\n selectAction: PointerSelectAction | ((a: Annotation) => PointerSelectAction) = PointerSelectAction.EDIT\n) => {\n const { subscribe, set } = writable<Selection>(EMPTY);\n\n let currentSelection: Selection = EMPTY;\n\n subscribe(updated => currentSelection = updated);\n\n const clear = () => set(EMPTY);\n\n const isEmpty = () => currentSelection.selected?.length === 0;\n\n const isSelected = (annotationOrId: T | string) => {\n if (currentSelection.selected.length === 0)\n return false;\n\n const id = typeof annotationOrId === 'string' ? annotationOrId : annotationOrId.id;\n return currentSelection.selected.some(i => i.id === id);\n }\n\n // TODO enable CTRL select\n const clickSelect = (id: string, pointerEvent: PointerEvent) => {\n const annotation = store.getAnnotation(id);\n if (annotation) {\n const action = onPointerSelect(annotation, selectAction);\n if (action === PointerSelectAction.EDIT)\n set({ selected: [{ id, editable: true }], pointerEvent }); \n else if (action === PointerSelectAction.SELECT)\n set({ selected: [{ id }], pointerEvent }); \n else\n set({ selected: [], pointerEvent });\n } else {\n console.warn('Invalid selection: ' + id);\n }\n }\n\n const setSelected = (idOrIds: string | string[], editable: boolean = true) => {\n const ids = Array.isArray(idOrIds) ? idOrIds : [idOrIds];\n\n // Remove invalid\n const annotations = \n ids.map(id => store.getAnnotation(id)).filter(a => a); \n\n set({ selected: annotations.map(({ id }) => ({ id, editable })) });\n \n if (annotations.length !== ids.length)\n console.warn('Invalid selection', idOrIds);\n }\n\n const removeFromSelection = (ids: string[]) => {\n if (currentSelection.selected.length === 0)\n return false;\n\n const { selected } = currentSelection;\n\n // Checks which of the given annotations are actually in the selection\n const toRemove = selected.filter(({ id }) => ids.includes(id))\n\n if (toRemove.length > 0)\n set({ selected: selected.filter(({ id }) => !ids.includes(id)) });\n }\n\n // Track store delete and update events\n store.observe(({ changes }) =>\n removeFromSelection(changes.deleted.map(a => a.id)));\n\n return { \n clear, \n clickSelect, \n get selected() { return currentSelection ? [...currentSelection.selected ] : null},\n get pointerEvent() { return currentSelection ? currentSelection.pointerEvent : null },\n isEmpty, \n isSelected, \n setSelected, \n subscribe \n };\n\n}\n\nexport const onPointerSelect = (\n annotation: Annotation, \n action?: PointerSelectAction | ((a: Annotation) => PointerSelectAction)\n): PointerSelectAction => (typeof action === 'function') ?\n (action(annotation) || PointerSelectAction.EDIT) : \n (action || PointerSelectAction.EDIT);\n"],"names":["PointerSelectAction"],"mappings":"AAcY,IAAAA,sBAAAA,OAEVA,EAAA,OAAO,QAEPA,EAAA,SAAS,UAETA,EAAA,OAAO,QANGA,IAAAA,KAAA,CAAA,CAAA;"}
|
|
@@ -1,126 +1,12 @@
|
|
|
1
|
-
import
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
), t, s, a, d;
|
|
10
|
-
return {
|
|
11
|
-
c() {
|
|
12
|
-
o = x("div"), t = G(e), L(o, "class", "a9s-popup a9s-osd-popup svelte-1xuxeat");
|
|
13
|
-
},
|
|
14
|
-
m(r, l) {
|
|
15
|
-
P(r, o, l), R(o, t), a || (d = [
|
|
16
|
-
U(s = J.call(null, o, {
|
|
17
|
-
position: { x: (
|
|
18
|
-
/*left*/
|
|
19
|
-
n[1]
|
|
20
|
-
), y: (
|
|
21
|
-
/*top*/
|
|
22
|
-
n[2]
|
|
23
|
-
) }
|
|
24
|
-
})),
|
|
25
|
-
_(
|
|
26
|
-
o,
|
|
27
|
-
"neodrag:start",
|
|
28
|
-
/*onDragStart*/
|
|
29
|
-
n[4]
|
|
30
|
-
),
|
|
31
|
-
_(
|
|
32
|
-
o,
|
|
33
|
-
"neodrag:end",
|
|
34
|
-
/*onDragEnd*/
|
|
35
|
-
n[5]
|
|
36
|
-
)
|
|
37
|
-
], a = !0);
|
|
38
|
-
},
|
|
39
|
-
p(r, l) {
|
|
40
|
-
l & /*$selection*/
|
|
41
|
-
1 && e !== (e = /*$selection*/
|
|
42
|
-
r[0].selected.map(y).join(", ") + "") && z(t, e), s && B(s.update) && l & /*left, top*/
|
|
43
|
-
6 && s.update.call(null, {
|
|
44
|
-
position: { x: (
|
|
45
|
-
/*left*/
|
|
46
|
-
r[1]
|
|
47
|
-
), y: (
|
|
48
|
-
/*top*/
|
|
49
|
-
r[2]
|
|
50
|
-
) }
|
|
51
|
-
});
|
|
52
|
-
},
|
|
53
|
-
d(r) {
|
|
54
|
-
r && S(o), a = !1, F(d);
|
|
55
|
-
}
|
|
56
|
-
};
|
|
57
|
-
}
|
|
58
|
-
function K(n) {
|
|
59
|
-
let o, e = (
|
|
60
|
-
/*$selection*/
|
|
61
|
-
n[0] && w(n)
|
|
62
|
-
);
|
|
63
|
-
return {
|
|
64
|
-
c() {
|
|
65
|
-
e && e.c(), o = X();
|
|
66
|
-
},
|
|
67
|
-
m(t, s) {
|
|
68
|
-
e && e.m(t, s), P(t, o, s);
|
|
69
|
-
},
|
|
70
|
-
p(t, [s]) {
|
|
71
|
-
/*$selection*/
|
|
72
|
-
t[0] ? e ? e.p(t, s) : (e = w(t), e.c(), e.m(o.parentNode, o)) : e && (e.d(1), e = null);
|
|
73
|
-
},
|
|
74
|
-
i: v,
|
|
75
|
-
o: v,
|
|
76
|
-
d(t) {
|
|
77
|
-
e && e.d(t), t && S(o);
|
|
78
|
-
}
|
|
79
|
-
};
|
|
80
|
-
}
|
|
81
|
-
const y = (n) => n.id;
|
|
82
|
-
function Q(n, o, e) {
|
|
83
|
-
let t, { state: s } = o, { viewer: a } = o, d, r, l = !1, c;
|
|
84
|
-
const { selection: m, store: u } = s;
|
|
85
|
-
Y(n, m, (i) => e(0, t = i));
|
|
86
|
-
const g = (i) => {
|
|
87
|
-
var p;
|
|
88
|
-
return ((p = i.selected) == null ? void 0 : p.length) > 0;
|
|
89
|
-
}, E = () => {
|
|
90
|
-
l = !0, a.setMouseNavEnabled(!1);
|
|
91
|
-
}, D = () => {
|
|
92
|
-
a.setMouseNavEnabled(!0);
|
|
93
|
-
}, N = () => {
|
|
94
|
-
c && u.unobserve(c), g(t) && (l = !1, f(t), c = (i) => {
|
|
95
|
-
l || f(t);
|
|
96
|
-
}, u.observe(c, {
|
|
97
|
-
annotations: t.selected.map((i) => i.id)
|
|
98
|
-
}));
|
|
99
|
-
}, f = (i) => {
|
|
100
|
-
const p = i.selected[0].id, h = u.getAnnotation(p), { minX: k, minY: C, maxX: M, maxY: O } = h.target.selector.geometry.bounds, T = 14, V = a.viewport.imageToViewerElementCoordinates(new b.Point(k, C)), j = a.viewport.imageToViewerElementCoordinates(new b.Point(M, O));
|
|
101
|
-
e(1, d = j.x + T), e(2, r = V.y);
|
|
102
|
-
};
|
|
103
|
-
return q(() => {
|
|
104
|
-
const i = () => {
|
|
105
|
-
g(t) && !l && f(t);
|
|
106
|
-
};
|
|
107
|
-
return a.addHandler("update-viewport", i), () => {
|
|
108
|
-
a.removeHandler("update-viewport", i);
|
|
109
|
-
};
|
|
110
|
-
}), n.$$set = (i) => {
|
|
111
|
-
"state" in i && e(6, s = i.state), "viewer" in i && e(7, a = i.viewer);
|
|
112
|
-
}, n.$$.update = () => {
|
|
113
|
-
n.$$.dirty & /*$selection*/
|
|
114
|
-
1 && N();
|
|
115
|
-
}, [t, d, r, m, E, D, s, a];
|
|
116
|
-
}
|
|
117
|
-
class W extends A {
|
|
118
|
-
constructor(o) {
|
|
119
|
-
super(), H(this, o, Q, K, I, { state: 6, viewer: 7 });
|
|
120
|
-
}
|
|
121
|
-
}
|
|
122
|
-
const oe = W;
|
|
1
|
+
import n from "./annotorious-svelte.es12.js";
|
|
2
|
+
const d = (t, e, o, a) => ({
|
|
3
|
+
id: n(),
|
|
4
|
+
annotation: t.id,
|
|
5
|
+
created: o || /* @__PURE__ */ new Date(),
|
|
6
|
+
creator: a,
|
|
7
|
+
...e
|
|
8
|
+
});
|
|
123
9
|
export {
|
|
124
|
-
|
|
10
|
+
d as createBody
|
|
125
11
|
};
|
|
126
12
|
//# sourceMappingURL=annotorious-svelte.es4.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-svelte.es4.js","sources":["
|
|
1
|
+
{"version":3,"file":"annotorious-svelte.es4.js","sources":["../../annotorious-core/src/utils/annotationUtils.ts"],"sourcesContent":["import { v4 as uuidv4 } from 'uuid';\nimport type { Annotation, AnnotationBody } from '../model/Annotation';\nimport type { User } from '../model/User';\n/**\n * Returns all users listed as creators or updaters in any parts of this\n * annotation.\n */\nexport const getContributors = (annotation: Annotation): User[] => {\n const { creator, updatedBy } = annotation.target;\n\n const bodyCollaborators = annotation.bodies.reduce((users, body) => (\n [...users, body.creator, body.updatedBy]\n ), [] as User[]);\n\n return [\n creator,\n updatedBy,\n ...bodyCollaborators\n ].filter(u => u); // Remove undefined\n}\n\nexport const createBody = (\n annotation: Annotation, \n payload: { [key: string]: any },\n created?: Date,\n creator?: User\n): AnnotationBody => ({\n id: uuidv4(),\n annotation: annotation.id,\n created: created || new Date(),\n creator,\n ...payload\n});"],"names":["createBody","annotation","payload","created","creator","uuidv4"],"mappings":";AAqBO,MAAMA,IAAa,CACxBC,GACAC,GACAC,GACAC,OACoB;AAAA,EACpB,IAAIC,EAAO;AAAA,EACX,YAAYJ,EAAW;AAAA,EACvB,SAASE,KAAW,oBAAI,KAAK;AAAA,EAC7B,SAAAC;AAAA,EACA,GAAGF;AACL;"}
|