@annotorious/react 3.1.4 → 3.1.6
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.map +1 -1
- package/dist/AnnotoriousPlugin.d.ts.map +1 -1
- package/dist/ImageAnnotationPopup.d.ts.map +1 -1
- package/dist/ImageAnnotator.d.ts.map +1 -1
- package/dist/annotorious-react.css +1 -1
- package/dist/annotorious-react.es10.js +7 -7
- package/dist/annotorious-react.es11.js +5 -5
- package/dist/annotorious-react.es12.js +40 -40
- package/dist/annotorious-react.es12.js.map +1 -1
- package/dist/annotorious-react.es14.js +379 -185
- package/dist/annotorious-react.es14.js.map +1 -1
- package/dist/annotorious-react.es15.js +185 -379
- package/dist/annotorious-react.es15.js.map +1 -1
- package/dist/annotorious-react.es17.js +42 -42
- package/dist/annotorious-react.es2.js +50 -50
- package/dist/annotorious-react.es22.js +184 -184
- package/dist/annotorious-react.es4.js +8 -8
- package/dist/annotorious-react.es8.js +4 -4
- package/dist/annotorious-react.es9.js +2 -2
- package/dist/openseadragon/OpenSeadragonAnnotationPopup.d.ts.map +1 -1
- package/dist/openseadragon/setPosition.d.ts.map +1 -1
- package/dist/state/AnnotoriousZustand.d.ts.map +1 -1
- package/dist/useDebounce.d.ts.map +1 -1
- package/dist/utils/toClientRects.d.ts.map +1 -1
- package/package.json +8 -8
|
@@ -3,8 +3,8 @@ import { useState as E, useRef as A, useEffect as D } from "react";
|
|
|
3
3
|
import { useFloating as O, FloatingArrow as L } from "./annotorious-react.es12.js";
|
|
4
4
|
import { useAnnotator as S, useSelection as U } from "./annotorious-react.es2.js";
|
|
5
5
|
import { toClientRects as F } from "./annotorious-react.es13.js";
|
|
6
|
-
import {
|
|
7
|
-
import {
|
|
6
|
+
import { autoUpdate as M } from "./annotorious-react.es14.js";
|
|
7
|
+
import { inline as P, offset as b, flip as j, shift as k, arrow as z } from "./annotorious-react.es15.js";
|
|
8
8
|
import g from "./annotorious-react.es16.js";
|
|
9
9
|
const H = (i, t) => {
|
|
10
10
|
const n = t.querySelector("img"), { left: a, top: d } = n.getBoundingClientRect(), s = n.offsetWidth / n.naturalWidth, c = n.offsetHeight / n.naturalHeight, { minX: o, minY: l, maxX: p, maxY: u } = i.bounds;
|
|
@@ -20,19 +20,19 @@ const H = (i, t) => {
|
|
|
20
20
|
open: n,
|
|
21
21
|
onOpenChange: a,
|
|
22
22
|
middleware: [
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
23
|
+
P(),
|
|
24
|
+
b(10),
|
|
25
|
+
j({ crossAxis: !0 }),
|
|
26
|
+
k({
|
|
27
27
|
crossAxis: !0,
|
|
28
28
|
padding: { right: 5, left: 5, top: 10, bottom: 10 }
|
|
29
29
|
}),
|
|
30
|
-
|
|
30
|
+
z({
|
|
31
31
|
element: d,
|
|
32
32
|
padding: 5
|
|
33
33
|
})
|
|
34
34
|
],
|
|
35
|
-
whileElementsMounted:
|
|
35
|
+
whileElementsMounted: M
|
|
36
36
|
});
|
|
37
37
|
D(() => {
|
|
38
38
|
if (s.length === 0)
|
|
@@ -1,10 +1,10 @@
|
|
|
1
1
|
import { jsx as d } from "react/jsx-runtime";
|
|
2
|
-
import {
|
|
2
|
+
import { forwardRef as m, createContext as S, useState as w, useContext as a, useImperativeHandle as A, useEffect as n } from "react";
|
|
3
3
|
import { createAnonymousGuest as g } from "@annotorious/core";
|
|
4
4
|
import { createOSDAnnotator as x } from "@annotorious/openseadragon";
|
|
5
|
-
import { AnnotoriousContext as
|
|
6
|
-
const s =
|
|
7
|
-
const { children:
|
|
5
|
+
import { AnnotoriousContext as v } from "./annotorious-react.es2.js";
|
|
6
|
+
const s = S({ viewer: null, setViewer: null }), O = m((t, c) => {
|
|
7
|
+
const { children: y, tool: o, ...f } = t, [r, u] = w(), { anno: e, setAnno: i } = a(v);
|
|
8
8
|
return A(c, () => e, [e]), n(() => {
|
|
9
9
|
if (r != null && r.element) {
|
|
10
10
|
const l = x(r, f);
|
|
@@ -9,8 +9,8 @@ import "@annotorious/annotorious";
|
|
|
9
9
|
import { toClientRects as b } from "./annotorious-react.es13.js";
|
|
10
10
|
import { useFloating as U, FloatingArrow as F } from "./annotorious-react.es12.js";
|
|
11
11
|
import { useViewer as M } from "./annotorious-react.es8.js";
|
|
12
|
-
import { inline as V, offset as j, flip as z, shift as H, arrow as T } from "./annotorious-react.
|
|
13
|
-
import { autoUpdate as X } from "./annotorious-react.
|
|
12
|
+
import { inline as V, offset as j, flip as z, shift as H, arrow as T } from "./annotorious-react.es15.js";
|
|
13
|
+
import { autoUpdate as X } from "./annotorious-react.es14.js";
|
|
14
14
|
import w from "./annotorious-react.es16.js";
|
|
15
15
|
const Y = (n, r) => {
|
|
16
16
|
const { minX: d, minY: a, maxX: o, maxY: l } = r.bounds, { top: s, left: p } = n.element.getBoundingClientRect(), t = n.viewport.imageToViewerElementCoordinates(new g.Point(d, a)), m = n.viewport.imageToViewerElementCoordinates(new g.Point(o, l));
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"OpenSeadragonAnnotationPopup.d.ts","sourceRoot":"","sources":["../../src/openseadragon/OpenSeadragonAnnotationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAI/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EASL,kBAAkB,EAClB,SAAS,EACV,MAAM,oBAAoB,CAAC;AAkB5B,UAAU,iCAAiC;IAEzC,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,UAAU,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,KAAK,CAAC,CAAC;IAEzD,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,KAAK,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,SAAS,CAAC;CAEzC;AAED,eAAO,MAAM,4BAA4B,
|
|
1
|
+
{"version":3,"file":"OpenSeadragonAnnotationPopup.d.ts","sourceRoot":"","sources":["../../src/openseadragon/OpenSeadragonAnnotationPopup.tsx"],"names":[],"mappings":"AAAA,OAAO,EAAE,SAAS,EAA+B,MAAM,OAAO,CAAC;AAI/D,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,oBAAoB,CAAC;AAGrD,OAAO,EASL,kBAAkB,EAClB,SAAS,EACV,MAAM,oBAAoB,CAAC;AAkB5B,UAAU,iCAAiC;IAEzC,KAAK,CAAC,EAAE,OAAO,CAAC;IAEhB,UAAU,CAAC,EAAE,IAAI,CAAC,kBAAkB,EAAE,SAAS,GAAG,KAAK,CAAC,CAAC;IAEzD,SAAS,CAAC,EAAE,SAAS,CAAC;IAEtB,KAAK,EAAE,CAAC,KAAK,EAAE,UAAU,KAAK,SAAS,CAAC;CAEzC;AAED,eAAO,MAAM,4BAA4B,GAAI,OAAO,iCAAiC,4CA4HpF,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"setPosition.d.ts","sourceRoot":"","sources":["../../src/openseadragon/setPosition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,aAAa,MAAM,eAAe,CAAC;AAqB1C,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"setPosition.d.ts","sourceRoot":"","sources":["../../src/openseadragon/setPosition.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,eAAe,EAAE,MAAM,0BAA0B,CAAC;AAC3D,OAAO,aAAa,MAAM,eAAe,CAAC;AAqB1C,eAAO,MAAM,WAAW,GACtB,QAAQ,aAAa,CAAC,MAAM,EAC5B,YAAY,eAAe,EAC3B,OAAO,WAAW,EAClB,aAAY,MAAU,SAqGvB,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"AnnotoriousZustand.d.ts","sourceRoot":"","sources":["../../src/state/AnnotoriousZustand.tsx"],"names":[],"mappings":"AAAA,OA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AG,KAAK,CAAC,UAAU,CAAC,OAE1C,CAAC,GAAG,SACjC,CAAC;AAEF,eAAO,MAAM,cAAc,GAAI,CAAC,SAAS,UAAU,GAAG,eAAe,EAAE,WAAW,MAAM,QAGvF,CAAC;AAEF,eAAO,MAAM,aAAa,GAAI,CAAC,SAAS,UAAU,GAAG,eAAe,EAClE,IAAI,MAAM,EACV,UAAU,IAAI,CAAC,mBAAmB,EAAE,aAAa,CAAC,MAoBnD,CAAC;AAEF,eAAO,MAAM,yBAAyB,GACpC,CAAC,SAAS,UAAU,GAAG,eAAe,EACtC,CAAC,SAAS,OAAO,GAAG,eAAe,EAEnC,IAAI,MAAM,EACV,QAAQ,0BAA0B,CAAC,CAAC,CAAC,iDAItC,CAAC;AAEF,eAAO,MAAM,YAAY,GAAI,CAAC,SAAS,UAAU,GAAG,eAAe,OACP,SAAS,CAAC,CAAC,CACtE,CAAC;AAEF,eAAO,MAAM,QAAQ,GAAI,CAAC,SAAS,UAAU,GAAG,eAAe,OACP,CAAC,GAAG,SAC3D,CAAC;AAEF,eAAO,MAAM,gBAAgB,QAAO,IAGnC,CAAC;AAEF,eAAO,MAAM,gBAAgB,GAAI,CAAC,SAAS,UAAU,GAAG,eAAe,EAAE,WAAW,MAAM,QAGzF,CAAC;AAGF,eAAO,MAAM,WAAW;cAAqC,SAAS;qEASrE,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useDebounce.d.ts","sourceRoot":"","sources":["../src/useDebounce.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,
|
|
1
|
+
{"version":3,"file":"useDebounce.d.ts","sourceRoot":"","sources":["../src/useDebounce.ts"],"names":[],"mappings":"AAEA,eAAO,MAAM,WAAW,GAAI,OAAO,GAAG,EAAE,OAAO,MAAM,QAepD,CAAA"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"toClientRects.d.ts","sourceRoot":"","sources":["../../src/utils/toClientRects.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,aAAa,
|
|
1
|
+
{"version":3,"file":"toClientRects.d.ts","sourceRoot":"","sources":["../../src/utils/toClientRects.ts"],"names":[],"mappings":"AAAA;;;GAGG;AACH,eAAO,MAAM,aAAa,GAAI,MAAM,OAAO,KAOtC,WAAY,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@annotorious/react",
|
|
3
|
-
"version": "3.1.
|
|
3
|
+
"version": "3.1.6",
|
|
4
4
|
"description": "Annotorious React bindings",
|
|
5
5
|
"author": "Rainer Simon",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
@@ -26,10 +26,10 @@
|
|
|
26
26
|
"./annotorious-react.css": "./dist/annotorious-react.css"
|
|
27
27
|
},
|
|
28
28
|
"devDependencies": {
|
|
29
|
-
"@types/react": "^19.0.
|
|
30
|
-
"@types/react-dom": "^19.0.
|
|
29
|
+
"@types/react": "^19.0.10",
|
|
30
|
+
"@types/react-dom": "^19.0.4",
|
|
31
31
|
"@vitejs/plugin-react": "^4.3.4",
|
|
32
|
-
"typescript": "5.
|
|
32
|
+
"typescript": "5.8.2",
|
|
33
33
|
"vite": "^5.4.14",
|
|
34
34
|
"vite-plugin-dts": "^4.5.0",
|
|
35
35
|
"vite-tsconfig-paths": "^5.1.4"
|
|
@@ -45,10 +45,10 @@
|
|
|
45
45
|
}
|
|
46
46
|
},
|
|
47
47
|
"dependencies": {
|
|
48
|
-
"@annotorious/annotorious": "3.1.
|
|
49
|
-
"@annotorious/core": "3.1.
|
|
50
|
-
"@annotorious/openseadragon": "3.1.
|
|
51
|
-
"@floating-ui/react": "^0.27.
|
|
48
|
+
"@annotorious/annotorious": "3.1.6",
|
|
49
|
+
"@annotorious/core": "3.1.6",
|
|
50
|
+
"@annotorious/openseadragon": "3.1.6",
|
|
51
|
+
"@floating-ui/react": "^0.27.5",
|
|
52
52
|
"zustand": "^5.0.3"
|
|
53
53
|
},
|
|
54
54
|
"sideEffects": false
|