@annotorious/react 3.0.0-rc.9 → 3.0.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/Annotorious.d.ts +14 -43
- package/dist/Annotorious.d.ts.map +1 -1
- package/dist/AnnotoriousPlugin.d.ts +12 -6
- package/dist/AnnotoriousPlugin.d.ts.map +1 -1
- package/dist/AnnotoriousPopupProps.d.ts +10 -0
- package/dist/AnnotoriousPopupProps.d.ts.map +1 -0
- package/dist/ImageAnnotationPopup.d.ts +9 -0
- package/dist/ImageAnnotationPopup.d.ts.map +1 -0
- package/dist/ImageAnnotator.d.ts +2 -3
- package/dist/ImageAnnotator.d.ts.map +1 -1
- package/dist/annotorious-react.css +1 -1
- package/dist/annotorious-react.es.js +37 -34
- package/dist/annotorious-react.es.js.map +1 -1
- package/dist/annotorious-react.es10.js +15 -35
- package/dist/annotorious-react.es10.js.map +1 -1
- package/dist/annotorious-react.es11.js +6 -16
- package/dist/annotorious-react.es11.js.map +1 -1
- package/dist/annotorious-react.es12.js +8 -4
- package/dist/annotorious-react.es12.js.map +1 -1
- package/dist/annotorious-react.es13.js +272 -8
- package/dist/annotorious-react.es13.js.map +1 -1
- package/dist/annotorious-react.es14.js +9 -153
- package/dist/annotorious-react.es14.js.map +1 -1
- package/dist/annotorious-react.es15.js +193 -6
- package/dist/annotorious-react.es15.js.map +1 -1
- package/dist/annotorious-react.es16.js +327 -22113
- package/dist/annotorious-react.es16.js.map +1 -1
- package/dist/annotorious-react.es17.js +11 -32
- package/dist/annotorious-react.es17.js.map +1 -1
- package/dist/annotorious-react.es19.js +6 -10
- package/dist/annotorious-react.es19.js.map +1 -1
- package/dist/annotorious-react.es2.js +87 -68
- package/dist/annotorious-react.es2.js.map +1 -1
- package/dist/annotorious-react.es20.js +214 -207
- package/dist/annotorious-react.es20.js.map +1 -1
- package/dist/annotorious-react.es21.js +126 -2
- package/dist/annotorious-react.es21.js.map +1 -1
- package/dist/annotorious-react.es22.js +2 -2
- package/dist/annotorious-react.es23.js +5 -0
- package/dist/annotorious-react.es23.js.map +1 -0
- package/dist/annotorious-react.es24.js +10 -0
- package/dist/annotorious-react.es24.js.map +1 -0
- package/dist/annotorious-react.es25.js +8 -0
- package/dist/annotorious-react.es25.js.map +1 -0
- package/dist/annotorious-react.es26.js +10 -0
- package/dist/annotorious-react.es26.js.map +1 -0
- package/dist/annotorious-react.es27.js +129 -0
- package/dist/annotorious-react.es27.js.map +1 -0
- package/dist/annotorious-react.es28.js +466 -0
- package/dist/annotorious-react.es28.js.map +1 -0
- package/dist/annotorious-react.es3.js +10 -11
- package/dist/annotorious-react.es3.js.map +1 -1
- package/dist/annotorious-react.es4.js +90 -12
- package/dist/annotorious-react.es4.js.map +1 -1
- package/dist/annotorious-react.es5.js +21 -20
- package/dist/annotorious-react.es5.js.map +1 -1
- package/dist/annotorious-react.es8.js +27 -80
- package/dist/annotorious-react.es8.js.map +1 -1
- package/dist/annotorious-react.es9.js +103 -26
- package/dist/annotorious-react.es9.js.map +1 -1
- package/dist/index.d.ts +10 -10
- package/dist/index.d.ts.map +1 -1
- package/dist/openseadragon/OpenSeadragonAnnotationPopup.d.ts +9 -0
- package/dist/openseadragon/OpenSeadragonAnnotationPopup.d.ts.map +1 -0
- package/dist/openseadragon/OpenSeadragonAnnotator.d.ts +7 -8
- package/dist/openseadragon/OpenSeadragonAnnotator.d.ts.map +1 -1
- package/dist/openseadragon/OpenSeadragonViewer.d.ts +2 -3
- package/dist/openseadragon/OpenSeadragonViewer.d.ts.map +1 -1
- package/dist/openseadragon/index.d.ts +1 -1
- package/dist/openseadragon/index.d.ts.map +1 -1
- package/dist/openseadragon/setPosition.d.ts +1 -1
- package/dist/openseadragon/setPosition.d.ts.map +1 -1
- package/dist/utils/toClientRects.d.ts +6 -0
- package/dist/utils/toClientRects.d.ts.map +1 -0
- package/package.json +15 -13
- package/dist/AnnotoriousPopup.d.ts +0 -16
- package/dist/AnnotoriousPopup.d.ts.map +0 -1
- package/dist/annotorious-react.es6.js +0 -5
- package/dist/annotorious-react.es6.js.map +0 -1
- package/dist/annotorious-react.es7.js +0 -5
- package/dist/annotorious-react.es7.js.map +0 -1
- package/dist/openseadragon/OpenSeadragonPopup.d.ts +0 -11
- package/dist/openseadragon/OpenSeadragonPopup.d.ts.map +0 -1
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-react.es14.js","sources":["../../../node_modules/@neodrag/react/dist/min/index.js"],"sourcesContent":["import{useRef as t,useState as e,useEffect as n}from\"react\";var r={dragStart:!0},o=(t,e={})=>{let n,o,{bounds:f,axis:g=\"both\",gpuAcceleration:h=!0,legacyTranslate:p=!0,transform:m,applyUserSelectHack:y=!0,disabled:w=!1,ignoreMultitouch:b=!1,recomputeBounds:v=r,grid:D,position:E,cancel:S,handle:x,defaultClass:A=\"neodrag\",defaultClassDragging:C=\"neodrag-dragging\",defaultClassDragged:M=\"neodrag-dragged\",defaultPosition:N={x:0,y:0},onDragStart:B,onDrag:$,onDragEnd:H}=e,L=!1,R=0,T=0,P=0,X=0,Y=0,q=0,{x:k,y:U}=E?{x:E?.x??0,y:E?.y??0}:N;Q(k,U);let W,j,z,F,G,I=\"\",J=!!E;v={...r,...v};const K=document.body.style,O=t.classList;function Q(e=R,n=T){if(!m){if(p){let r=`${+e}px, ${+n}px`;return l(t,\"transform\",h?`translate3d(${r}, 0)`:`translate(${r})`)}return l(t,\"translate\",`${+e}px ${+n}px ${h?\"1px\":\"\"}`)}const r=m({offsetX:e,offsetY:n,rootNode:t});i(r)&&l(t,\"transform\",r)}const V=(e,n)=>{const r={offsetX:R,offsetY:T,rootNode:t,currentNode:G};t.dispatchEvent(new CustomEvent(e,{detail:r})),n?.(r)};const Z=addEventListener;Z(\"pointerdown\",tt,!1),Z(\"pointerup\",et,!1),Z(\"pointermove\",nt,!1),l(t,\"touch-action\",\"none\");const _=()=>{let e=t.offsetWidth/j.width;return isNaN(e)&&(e=1),e};function tt(e){if(w)return;if(2===e.button)return;if(b&&!e.isPrimary)return;if(v.dragStart&&(W=c(f,t)),i(x)&&i(S)&&x===S)throw new Error(\"`handle` selector can't be same as `cancel` selector\");if(O.add(A),z=function(t,e){if(!t)return[e];if(u(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())}(x,t),F=function(t,e){if(!t)return[];if(u(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,t),n=/(both|x)/.test(g),o=/(both|y)/.test(g),d(F,z))throw new Error(\"Element being dragged can't be a child of the element on which `cancel` is applied\");const r=e.composedPath()[0];if(!z.some((t=>t.contains(r)||t.shadowRoot?.contains(r)))||d(F,[r]))return;G=1===z.length?t:z.find((t=>t.contains(r))),L=!0,j=t.getBoundingClientRect(),y&&(I=K.userSelect,K.userSelect=\"none\"),V(\"neodrag:start\",B);const{clientX:a,clientY:s}=e,l=_();n&&(P=a-k/l),o&&(X=s-U/l),W&&(Y=a-j.left,q=s-j.top)}function et(){L&&(v.dragEnd&&(W=c(f,t)),O.remove(C),O.add(M),y&&(K.userSelect=I),V(\"neodrag:end\",H),n&&(P=R),o&&(X=T),L=!1)}function nt(e){if(!L)return;v.drag&&(W=c(f,t)),O.add(C),e.preventDefault(),j=t.getBoundingClientRect();let r=e.clientX,i=e.clientY;const d=_();if(W){const t={left:W.left+Y,top:W.top+q,right:W.right+Y-j.width,bottom:W.bottom+q-j.height};r=a(r,t.left,t.right),i=a(i,t.top,t.bottom)}if(Array.isArray(D)){let[t,e]=D;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 n=r-P,o=i-X;[n,o]=s([t/d,e/d],n,o),r=P+n,i=X+o}n&&(R=Math.round((r-P)*d)),o&&(T=Math.round((i-X)*d)),k=R,U=T,V(\"neodrag\",$),Q()}return{destroy:()=>{const t=removeEventListener;t(\"pointerdown\",tt,!1),t(\"pointerup\",et,!1),t(\"pointermove\",nt,!1)},update:t=>{g=t.axis||\"both\",w=t.disabled??!1,b=t.ignoreMultitouch??!1,x=t.handle,f=t.bounds,v=t.recomputeBounds??r,S=t.cancel,y=t.applyUserSelectHack??!0,D=t.grid,h=t.gpuAcceleration??!0,p=t.legacyTranslate??!0,m=t.transform;const e=O.contains(M);O.remove(A,M),A=t.defaultClass??\"neodrag\",C=t.defaultClassDragging??\"neodrag-dragging\",M=t.defaultClassDragged??\"neodrag-dragged\",O.add(A),e&&O.add(M),J&&(k=R=t.position?.x??R,U=T=t.position?.y??T,Q())}}},a=(t,e,n)=>Math.min(Math.max(t,e),n),i=t=>\"string\"==typeof t,s=([t,e],n,r)=>{const o=(t,e)=>0===e?0:Math.ceil(t/e)*e;return[o(n,t),o(r,e)]};var d=(t,e)=>t.some((t=>e.some((e=>t.contains(e)))));function c(t,e){if(void 0===t)return;if(u(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 l=(t,e,n)=>t.style.setProperty(e,n),u=t=>t instanceof HTMLElement;function f(t){return null==t||\"string\"==typeof t||t instanceof HTMLElement?t:\"current\"in t?t.current:Array.isArray(t)?t.map((t=>t instanceof HTMLElement?t:t.current)):void 0}function g(r,a={}){const i=t(),[s,d]=e(!1),[c,l]=e();let{onDragStart:u,onDrag:g,onDragEnd:h,handle:p,cancel:m}=a,y=f(p),w=f(m);function b(t,e){l(t),e?.(t)}function v(t){d(!0),b(t,u)}function D(t){b(t,g)}function E(t){d(!1),b(t,h)}return n((()=>{if(\"undefined\"==typeof window)return;const t=r.current;if(!t)return;({onDragStart:u,onDrag:g,onDragEnd:h}=a);const{update:e,destroy:n}=o(t,{...a,handle:y,cancel:w,onDragStart:v,onDrag:D,onDragEnd:E});return i.current=e,n}),[]),n((()=>{i.current?.({...a,handle:f(p),cancel:f(m),onDragStart:v,onDrag:D,onDragEnd:E})}),[a]),{isDragging:s,dragState:c}}export{g as useDraggable};"],"names":["r","o","t","e","n","f","g","h","p","m","y","w","b","v","D","E","S","x","A","C","M","N","B","$","H","L","R","T","P","X","Y","q","k","U","Q","W","j","z","G","I","J","K","O","l","i","V","Z","tt","et","nt","_","c","u","d","_a","a","s","_b"],"mappings":";AAA4D,IAAIA,IAAE,EAAC,WAAU,GAAE,GAAEC,KAAE,CAACC,GAAEC,IAAE,CAAE,MAAG;AAAC,MAAIC,GAAEH,GAAE,EAAC,QAAOI,GAAE,MAAKC,IAAE,QAAO,iBAAgBC,IAAE,IAAG,iBAAgBC,IAAE,IAAG,WAAUC,GAAE,qBAAoBC,IAAE,IAAG,UAASC,IAAE,IAAG,kBAAiBC,IAAE,IAAG,iBAAgBC,IAAEb,GAAE,MAAKc,GAAE,UAASC,GAAE,QAAOC,GAAE,QAAOC,GAAE,cAAaC,IAAE,WAAU,sBAAqBC,IAAE,oBAAmB,qBAAoBC,IAAE,mBAAkB,iBAAgBC,IAAE,EAAC,GAAE,GAAE,GAAE,EAAC,GAAE,aAAYC,IAAE,QAAOC,IAAE,WAAUC,GAAC,IAAErB,GAAEsB,IAAE,IAAGC,IAAE,GAAEC,IAAE,GAAEC,IAAE,GAAEC,IAAE,GAAEC,IAAE,GAAEC,IAAE,GAAE,EAAC,GAAEC,GAAE,GAAEC,EAAC,IAAElB,IAAE,EAAC,IAAEA,KAAA,gBAAAA,EAAG,MAAG,GAAE,IAAEA,KAAA,gBAAAA,EAAG,MAAG,EAAC,IAAEM;AAAE,EAAAa,EAAEF,GAAEC,CAAC;AAAE,MAAIE,GAAEC,GAAEC,GAAE,GAA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AC;AAAC,SAAOH,GAAG,MAAI;AAAC,QAAgB,OAAO,SAApB;AAA2B;AAAO,UAAMF,IAAEF,EAAE;AAAQ,QAAG,CAACE;AAAE;AAAO,KAAC,EAAC,aAAYkD,GAAE,QAAO9C,GAAE,WAAUC,EAAC,IAAEgD;AAAG,UAAK,EAAC,QAAOpD,GAAE,SAAQC,EAAC,IAAEH,GAAEC,GAAE,EAAC,GAAGqD,GAAE,QAAO7C,GAAE,QAAOC,GAAE,aAAYE,GAAE,QAAOC,GAAE,WAAUC,EAAC,CAAC;AAAE,WAAO6B,EAAE,UAAQzC,GAAEC;AAAA,EAAC,GAAG,CAAA,CAAE,GAAEA,GAAG,MAAI;;AAAC,KAAAkD,IAAAV,EAAE,YAAF,QAAAU,EAAA,KAAAV,GAAY,EAAC,GAAGW,GAAE,QAAOlD,EAAEG,CAAC,GAAE,QAAOH,EAAEI,CAAC,GAAE,aAAYI,GAAE,QAAOC,GAAE,WAAUC,EAAC;AAAA,EAAE,GAAG,CAACwC,CAAC,CAAC,GAAE,EAAC,YAAWC,GAAE,WAAUL,EAAC;AAAC;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"annotorious-react.es14.js","sources":["../src/utils/toClientRects.ts"],"sourcesContent":["/** \n * Wraps a single DOMRect into an object that properly\n * implements the DOMRectList interface.\n */\nexport const toClientRects = (rect: DOMRect) => ({\n length: 1,\n item: (index: number) => index === 0 ? rect : undefined,\n [Symbol.iterator]: function* (): IterableIterator<DOMRect> {\n for (let i = 0; i < this.length; i++)\n yield this.item(i)!;\n }\n} as DOMRectList);"],"names":["toClientRects","rect","index","i"],"mappings":"AAIa,MAAAA,IAAgB,CAACC,OAAmB;AAAA,EAC/C,QAAQ;AAAA,EACR,MAAM,CAACC,MAAkBA,MAAU,IAAID,IAAO;AAAA,EAC9C,CAAC,OAAO,QAAQ,GAAG,aAAwC;AACzD,aAASE,IAAI,GAAGA,IAAI,KAAK,QAAQA;AACzB,YAAA,KAAK,KAAKA,CAAC;AAAA,EACrB;AACF;"}
|
|
@@ -1,9 +1,196 @@
|
|
|
1
|
-
import {
|
|
2
|
-
import {
|
|
3
|
-
import
|
|
4
|
-
|
|
5
|
-
|
|
1
|
+
import { offset as H, shift as I, flip as J, inline as K, computePosition as N, arrow as j } from "./annotorious-react.es16.js";
|
|
2
|
+
import { autoUpdate as ue, platform as le } from "./annotorious-react.es16.js";
|
|
3
|
+
import * as f from "react";
|
|
4
|
+
import { useLayoutEffect as Q, useEffect as T } from "react";
|
|
5
|
+
import * as X from "react-dom";
|
|
6
|
+
var R = typeof document < "u" ? Q : T;
|
|
7
|
+
function h(e, t) {
|
|
8
|
+
if (e === t)
|
|
9
|
+
return !0;
|
|
10
|
+
if (typeof e != typeof t)
|
|
11
|
+
return !1;
|
|
12
|
+
if (typeof e == "function" && e.toString() === t.toString())
|
|
13
|
+
return !0;
|
|
14
|
+
let n, r, s;
|
|
15
|
+
if (e && t && typeof e == "object") {
|
|
16
|
+
if (Array.isArray(e)) {
|
|
17
|
+
if (n = e.length, n !== t.length) return !1;
|
|
18
|
+
for (r = n; r-- !== 0; )
|
|
19
|
+
if (!h(e[r], t[r]))
|
|
20
|
+
return !1;
|
|
21
|
+
return !0;
|
|
22
|
+
}
|
|
23
|
+
if (s = Object.keys(e), n = s.length, n !== Object.keys(t).length)
|
|
24
|
+
return !1;
|
|
25
|
+
for (r = n; r-- !== 0; )
|
|
26
|
+
if (!{}.hasOwnProperty.call(t, s[r]))
|
|
27
|
+
return !1;
|
|
28
|
+
for (r = n; r-- !== 0; ) {
|
|
29
|
+
const p = s[r];
|
|
30
|
+
if (!(p === "_owner" && e.$$typeof) && !h(e[p], t[p]))
|
|
31
|
+
return !1;
|
|
32
|
+
}
|
|
33
|
+
return !0;
|
|
34
|
+
}
|
|
35
|
+
return e !== e && t !== t;
|
|
36
|
+
}
|
|
37
|
+
function A(e) {
|
|
38
|
+
return typeof window > "u" ? 1 : (e.ownerDocument.defaultView || window).devicePixelRatio || 1;
|
|
39
|
+
}
|
|
40
|
+
function L(e, t) {
|
|
41
|
+
const n = A(e);
|
|
42
|
+
return Math.round(t * n) / n;
|
|
43
|
+
}
|
|
44
|
+
function v(e) {
|
|
45
|
+
const t = f.useRef(e);
|
|
46
|
+
return R(() => {
|
|
47
|
+
t.current = e;
|
|
48
|
+
}), t;
|
|
49
|
+
}
|
|
50
|
+
function ee(e) {
|
|
51
|
+
e === void 0 && (e = {});
|
|
52
|
+
const {
|
|
53
|
+
placement: t = "bottom",
|
|
54
|
+
strategy: n = "absolute",
|
|
55
|
+
middleware: r = [],
|
|
56
|
+
platform: s,
|
|
57
|
+
elements: {
|
|
58
|
+
reference: p,
|
|
59
|
+
floating: q
|
|
60
|
+
} = {},
|
|
61
|
+
transform: E = !0,
|
|
62
|
+
whileElementsMounted: $,
|
|
63
|
+
open: k
|
|
64
|
+
} = e, [i, D] = f.useState({
|
|
65
|
+
x: 0,
|
|
66
|
+
y: 0,
|
|
67
|
+
strategy: n,
|
|
68
|
+
placement: t,
|
|
69
|
+
middlewareData: {},
|
|
70
|
+
isPositioned: !1
|
|
71
|
+
}), [x, B] = f.useState(r);
|
|
72
|
+
h(x, r) || B(r);
|
|
73
|
+
const [U, V] = f.useState(null), [W, z] = f.useState(null), O = f.useCallback((o) => {
|
|
74
|
+
o !== a.current && (a.current = o, V(o));
|
|
75
|
+
}, []), _ = f.useCallback((o) => {
|
|
76
|
+
o !== d.current && (d.current = o, z(o));
|
|
77
|
+
}, []), u = p || U, l = q || W, a = f.useRef(null), d = f.useRef(null), y = f.useRef(i), G = $ != null, M = v($), P = v(s), g = f.useCallback(() => {
|
|
78
|
+
if (!a.current || !d.current)
|
|
79
|
+
return;
|
|
80
|
+
const o = {
|
|
81
|
+
placement: t,
|
|
82
|
+
strategy: n,
|
|
83
|
+
middleware: x
|
|
84
|
+
};
|
|
85
|
+
P.current && (o.platform = P.current), N(a.current, d.current, o).then((w) => {
|
|
86
|
+
const m = {
|
|
87
|
+
...w,
|
|
88
|
+
isPositioned: !0
|
|
89
|
+
};
|
|
90
|
+
S.current && !h(y.current, m) && (y.current = m, X.flushSync(() => {
|
|
91
|
+
D(m);
|
|
92
|
+
}));
|
|
93
|
+
});
|
|
94
|
+
}, [x, t, n, P]);
|
|
95
|
+
R(() => {
|
|
96
|
+
k === !1 && y.current.isPositioned && (y.current.isPositioned = !1, D((o) => ({
|
|
97
|
+
...o,
|
|
98
|
+
isPositioned: !1
|
|
99
|
+
})));
|
|
100
|
+
}, [k]);
|
|
101
|
+
const S = f.useRef(!1);
|
|
102
|
+
R(() => (S.current = !0, () => {
|
|
103
|
+
S.current = !1;
|
|
104
|
+
}), []), R(() => {
|
|
105
|
+
if (u && (a.current = u), l && (d.current = l), u && l) {
|
|
106
|
+
if (M.current)
|
|
107
|
+
return M.current(u, l, g);
|
|
108
|
+
g();
|
|
109
|
+
}
|
|
110
|
+
}, [u, l, g, M, G]);
|
|
111
|
+
const C = f.useMemo(() => ({
|
|
112
|
+
reference: a,
|
|
113
|
+
floating: d,
|
|
114
|
+
setReference: O,
|
|
115
|
+
setFloating: _
|
|
116
|
+
}), [O, _]), c = f.useMemo(() => ({
|
|
117
|
+
reference: u,
|
|
118
|
+
floating: l
|
|
119
|
+
}), [u, l]), F = f.useMemo(() => {
|
|
120
|
+
const o = {
|
|
121
|
+
position: n,
|
|
122
|
+
left: 0,
|
|
123
|
+
top: 0
|
|
124
|
+
};
|
|
125
|
+
if (!c.floating)
|
|
126
|
+
return o;
|
|
127
|
+
const w = L(c.floating, i.x), m = L(c.floating, i.y);
|
|
128
|
+
return E ? {
|
|
129
|
+
...o,
|
|
130
|
+
transform: "translate(" + w + "px, " + m + "px)",
|
|
131
|
+
...A(c.floating) >= 1.5 && {
|
|
132
|
+
willChange: "transform"
|
|
133
|
+
}
|
|
134
|
+
} : {
|
|
135
|
+
position: n,
|
|
136
|
+
left: w,
|
|
137
|
+
top: m
|
|
138
|
+
};
|
|
139
|
+
}, [n, E, c.floating, i.x, i.y]);
|
|
140
|
+
return f.useMemo(() => ({
|
|
141
|
+
...i,
|
|
142
|
+
update: g,
|
|
143
|
+
refs: C,
|
|
144
|
+
elements: c,
|
|
145
|
+
floatingStyles: F
|
|
146
|
+
}), [i, g, C, c, F]);
|
|
147
|
+
}
|
|
148
|
+
const Y = (e) => {
|
|
149
|
+
function t(n) {
|
|
150
|
+
return {}.hasOwnProperty.call(n, "current");
|
|
151
|
+
}
|
|
152
|
+
return {
|
|
153
|
+
name: "arrow",
|
|
154
|
+
options: e,
|
|
155
|
+
fn(n) {
|
|
156
|
+
const {
|
|
157
|
+
element: r,
|
|
158
|
+
padding: s
|
|
159
|
+
} = typeof e == "function" ? e(n) : e;
|
|
160
|
+
return r && t(r) ? r.current != null ? j({
|
|
161
|
+
element: r.current,
|
|
162
|
+
padding: s
|
|
163
|
+
}).fn(n) : {} : r ? j({
|
|
164
|
+
element: r,
|
|
165
|
+
padding: s
|
|
166
|
+
}).fn(n) : {};
|
|
167
|
+
}
|
|
168
|
+
};
|
|
169
|
+
}, te = (e, t) => ({
|
|
170
|
+
...H(e),
|
|
171
|
+
options: [e, t]
|
|
172
|
+
}), ne = (e, t) => ({
|
|
173
|
+
...I(e),
|
|
174
|
+
options: [e, t]
|
|
175
|
+
}), re = (e, t) => ({
|
|
176
|
+
...J(e),
|
|
177
|
+
options: [e, t]
|
|
178
|
+
}), fe = (e, t) => ({
|
|
179
|
+
...K(e),
|
|
180
|
+
options: [e, t]
|
|
181
|
+
}), oe = (e, t) => ({
|
|
182
|
+
...Y(e),
|
|
183
|
+
options: [e, t]
|
|
184
|
+
});
|
|
6
185
|
export {
|
|
7
|
-
|
|
186
|
+
oe as arrow,
|
|
187
|
+
ue as autoUpdate,
|
|
188
|
+
N as computePosition,
|
|
189
|
+
re as flip,
|
|
190
|
+
fe as inline,
|
|
191
|
+
te as offset,
|
|
192
|
+
le as platform,
|
|
193
|
+
ne as shift,
|
|
194
|
+
ee as useFloating
|
|
8
195
|
};
|
|
9
196
|
//# sourceMappingURL=annotorious-react.es15.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-react.es15.js","sources":["../../../node_modules/react/jsx-runtime.js"],"sourcesContent":["'use strict';\n\nif (process.env.NODE_ENV === 'production') {\n module.exports = require('./cjs/react-jsx-runtime.production.min.js');\n} else {\n module.exports = require('./cjs/react-jsx-runtime.development.js');\n}\n"],"names":["jsxRuntimeModule","require$$0","require$$1"],"mappings":";;;AAEI,QAAQ,IAAI,aAAa,eAC3BA,EAAA,UAAiBC,MAEjBD,EAAA,UAAiBE;;","x_google_ignoreList":[0]}
|
|
1
|
+
{"version":3,"file":"annotorious-react.es15.js","sources":["../../../node_modules/@floating-ui/react-dom/dist/floating-ui.react-dom.mjs"],"sourcesContent":["import { computePosition, arrow as arrow$2, offset as offset$1, shift as shift$1, limitShift as limitShift$1, flip as flip$1, size as size$1, autoPlacement as autoPlacement$1, hide as hide$1, inline as inline$1 } from '@floating-ui/dom';\nexport { autoUpdate, computePosition, detectOverflow, getOverflowAncestors, platform } from '@floating-ui/dom';\nimport * as React from 'react';\nimport { useLayoutEffect, useEffect } from 'react';\nimport * as ReactDOM from 'react-dom';\n\nvar index = typeof document !== 'undefined' ? useLayoutEffect : useEffect;\n\n// Fork of `fast-deep-equal` that only does the comparisons we need and compares\n// functions\nfunction deepEqual(a, b) {\n if (a === b) {\n return true;\n }\n if (typeof a !== typeof b) {\n return false;\n }\n if (typeof a === 'function' && a.toString() === b.toString()) {\n return true;\n }\n let length;\n let i;\n let keys;\n if (a && b && typeof a === 'object') {\n if (Array.isArray(a)) {\n length = a.length;\n if (length !== b.length) return false;\n for (i = length; i-- !== 0;) {\n if (!deepEqual(a[i], b[i])) {\n return false;\n }\n }\n return true;\n }\n keys = Object.keys(a);\n length = keys.length;\n if (length !== Object.keys(b).length) {\n return false;\n }\n for (i = length; i-- !== 0;) {\n if (!{}.hasOwnProperty.call(b, keys[i])) {\n return false;\n }\n }\n for (i = length; i-- !== 0;) {\n const key = keys[i];\n if (key === '_owner' && a.$$typeof) {\n continue;\n }\n if (!deepEqual(a[key], b[key])) {\n return false;\n }\n }\n return true;\n }\n return a !== a && b !== b;\n}\n\nfunction getDPR(element) {\n if (typeof window === 'undefined') {\n return 1;\n }\n const win = element.ownerDocument.defaultView || window;\n return win.devicePixelRatio || 1;\n}\n\nfunction roundByDPR(element, value) {\n const dpr = getDPR(element);\n return Math.round(value * dpr) / dpr;\n}\n\nfunction useLatestRef(value) {\n const ref = React.useRef(value);\n index(() => {\n ref.current = value;\n });\n return ref;\n}\n\n/**\n * Provides data to position a floating element.\n * @see https://floating-ui.com/docs/useFloating\n */\nfunction useFloating(options) {\n if (options === void 0) {\n options = {};\n }\n const {\n placement = 'bottom',\n strategy = 'absolute',\n middleware = [],\n platform,\n elements: {\n reference: externalReference,\n floating: externalFloating\n } = {},\n transform = true,\n whileElementsMounted,\n open\n } = options;\n const [data, setData] = React.useState({\n x: 0,\n y: 0,\n strategy,\n placement,\n middlewareData: {},\n isPositioned: false\n });\n const [latestMiddleware, setLatestMiddleware] = React.useState(middleware);\n if (!deepEqual(latestMiddleware, middleware)) {\n setLatestMiddleware(middleware);\n }\n const [_reference, _setReference] = React.useState(null);\n const [_floating, _setFloating] = React.useState(null);\n const setReference = React.useCallback(node => {\n if (node !== referenceRef.current) {\n referenceRef.current = node;\n _setReference(node);\n }\n }, []);\n const setFloating = React.useCallback(node => {\n if (node !== floatingRef.current) {\n floatingRef.current = node;\n _setFloating(node);\n }\n }, []);\n const referenceEl = externalReference || _reference;\n const floatingEl = externalFloating || _floating;\n const referenceRef = React.useRef(null);\n const floatingRef = React.useRef(null);\n const dataRef = React.useRef(data);\n const hasWhileElementsMounted = whileElementsMounted != null;\n const whileElementsMountedRef = useLatestRef(whileElementsMounted);\n const platformRef = useLatestRef(platform);\n const update = React.useCallback(() => {\n if (!referenceRef.current || !floatingRef.current) {\n return;\n }\n const config = {\n placement,\n strategy,\n middleware: latestMiddleware\n };\n if (platformRef.current) {\n config.platform = platformRef.current;\n }\n computePosition(referenceRef.current, floatingRef.current, config).then(data => {\n const fullData = {\n ...data,\n isPositioned: true\n };\n if (isMountedRef.current && !deepEqual(dataRef.current, fullData)) {\n dataRef.current = fullData;\n ReactDOM.flushSync(() => {\n setData(fullData);\n });\n }\n });\n }, [latestMiddleware, placement, strategy, platformRef]);\n index(() => {\n if (open === false && dataRef.current.isPositioned) {\n dataRef.current.isPositioned = false;\n setData(data => ({\n ...data,\n isPositioned: false\n }));\n }\n }, [open]);\n const isMountedRef = React.useRef(false);\n index(() => {\n isMountedRef.current = true;\n return () => {\n isMountedRef.current = false;\n };\n }, []);\n index(() => {\n if (referenceEl) referenceRef.current = referenceEl;\n if (floatingEl) floatingRef.current = floatingEl;\n if (referenceEl && floatingEl) {\n if (whileElementsMountedRef.current) {\n return whileElementsMountedRef.current(referenceEl, floatingEl, update);\n }\n update();\n }\n }, [referenceEl, floatingEl, update, whileElementsMountedRef, hasWhileElementsMounted]);\n const refs = React.useMemo(() => ({\n reference: referenceRef,\n floating: floatingRef,\n setReference,\n setFloating\n }), [setReference, setFloating]);\n const elements = React.useMemo(() => ({\n reference: referenceEl,\n floating: floatingEl\n }), [referenceEl, floatingEl]);\n const floatingStyles = React.useMemo(() => {\n const initialStyles = {\n position: strategy,\n left: 0,\n top: 0\n };\n if (!elements.floating) {\n return initialStyles;\n }\n const x = roundByDPR(elements.floating, data.x);\n const y = roundByDPR(elements.floating, data.y);\n if (transform) {\n return {\n ...initialStyles,\n transform: \"translate(\" + x + \"px, \" + y + \"px)\",\n ...(getDPR(elements.floating) >= 1.5 && {\n willChange: 'transform'\n })\n };\n }\n return {\n position: strategy,\n left: x,\n top: y\n };\n }, [strategy, transform, elements.floating, data.x, data.y]);\n return React.useMemo(() => ({\n ...data,\n update,\n refs,\n elements,\n floatingStyles\n }), [data, update, refs, elements, floatingStyles]);\n}\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow$1 = options => {\n function isRef(value) {\n return {}.hasOwnProperty.call(value, 'current');\n }\n return {\n name: 'arrow',\n options,\n fn(state) {\n const {\n element,\n padding\n } = typeof options === 'function' ? options(state) : options;\n if (element && isRef(element)) {\n if (element.current != null) {\n return arrow$2({\n element: element.current,\n padding\n }).fn(state);\n }\n return {};\n }\n if (element) {\n return arrow$2({\n element,\n padding\n }).fn(state);\n }\n return {};\n }\n };\n};\n\n/**\n * Modifies the placement by translating the floating element along the\n * specified axes.\n * A number (shorthand for `mainAxis` or distance), or an axes configuration\n * object may be passed.\n * @see https://floating-ui.com/docs/offset\n */\nconst offset = (options, deps) => ({\n ...offset$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by shifting it in order to\n * keep it in view when it will overflow the clipping boundary.\n * @see https://floating-ui.com/docs/shift\n */\nconst shift = (options, deps) => ({\n ...shift$1(options),\n options: [options, deps]\n});\n\n/**\n * Built-in `limiter` that will stop `shift()` at a certain point.\n */\nconst limitShift = (options, deps) => ({\n ...limitShift$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by flipping the `placement`\n * in order to keep it in view when the preferred placement(s) will overflow the\n * clipping boundary. Alternative to `autoPlacement`.\n * @see https://floating-ui.com/docs/flip\n */\nconst flip = (options, deps) => ({\n ...flip$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data that allows you to change the size of the floating element —\n * for instance, prevent it from overflowing the clipping boundary or match the\n * width of the reference element.\n * @see https://floating-ui.com/docs/size\n */\nconst size = (options, deps) => ({\n ...size$1(options),\n options: [options, deps]\n});\n\n/**\n * Optimizes the visibility of the floating element by choosing the placement\n * that has the most space available automatically, without needing to specify a\n * preferred placement. Alternative to `flip`.\n * @see https://floating-ui.com/docs/autoPlacement\n */\nconst autoPlacement = (options, deps) => ({\n ...autoPlacement$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to hide the floating element in applicable situations, such as\n * when it is not in the same clipping context as the reference element.\n * @see https://floating-ui.com/docs/hide\n */\nconst hide = (options, deps) => ({\n ...hide$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides improved positioning for inline reference elements that can span\n * over multiple lines, such as hyperlinks or range selections.\n * @see https://floating-ui.com/docs/inline\n */\nconst inline = (options, deps) => ({\n ...inline$1(options),\n options: [options, deps]\n});\n\n/**\n * Provides data to position an inner element of the floating element so that it\n * appears centered to the reference element.\n * This wraps the core `arrow` middleware to allow React refs as the element.\n * @see https://floating-ui.com/docs/arrow\n */\nconst arrow = (options, deps) => ({\n ...arrow$1(options),\n options: [options, deps]\n});\n\nexport { arrow, autoPlacement, flip, hide, inline, limitShift, offset, shift, size, useFloating };\n"],"names":["index","useLayoutEffect","useEffect","deepEqual","a","b","length","i","keys","key","getDPR","element","roundByDPR","value","dpr","useLatestRef","ref","React","useFloating","options","placement","strategy","middleware","platform","externalReference","externalFloating","transform","whileElementsMounted","open","data","setData","latestMiddleware","setLatestMiddleware","_reference","_setReference","_floating","_setFloating","setReference","node","referenceRef","setFloating","floatingRef","referenceEl","floatingEl","dataRef","hasWhileElementsMounted","whileElementsMountedRef","platformRef","update","config","computePosition","fullData","isMountedRef","ReactDOM","refs","elements","floatingStyles","initialStyles","x","y","arrow$1","isRef","state","padding","arrow$2","offset","deps","offset$1","shift","shift$1","flip","flip$1","inline","inline$1","arrow"],"mappings":";;;;;AAMA,IAAIA,IAAQ,OAAO,WAAa,MAAcC,IAAkBC;AAIhE,SAASC,EAAUC,GAAGC,GAAG;AACvB,MAAID,MAAMC;AACR,WAAO;AAET,MAAI,OAAOD,KAAM,OAAOC;AACtB,WAAO;AAET,MAAI,OAAOD,KAAM,cAAcA,EAAE,eAAeC,EAAE;AAChD,WAAO;AAET,MAAIC,GACAC,GACAC;AACJ,MAAIJ,KAAKC,KAAK,OAAOD,KAAM,UAAU;AACnC,QAAI,MAAM,QAAQA,CAAC,GAAG;AAEpB,UADAE,IAASF,EAA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