@annotorious/react 3.0.0-rc.26 → 3.0.0-rc.28
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-react.es.js +2 -2
- package/dist/annotorious-react.es10.js +4 -4
- package/dist/annotorious-react.es10.js.map +1 -1
- package/package.json +6 -6
- package/dist/annotorious-react.es6.js +0 -2
- package/dist/annotorious-react.es6.js.map +0 -1
- package/dist/annotorious-react.es7.js +0 -2
- package/dist/annotorious-react.es7.js.map +0 -1
|
@@ -2,8 +2,8 @@ import { Annotorious as g, AnnotoriousContext as A, useAnnotationStore as c, use
|
|
|
2
2
|
import { AnnotoriousPlugin as y } from "./annotorious-react.es3.js";
|
|
3
3
|
import { Draggable as O } from "./annotorious-react.es4.js";
|
|
4
4
|
import { ImageAnnotator as h } from "./annotorious-react.es5.js";
|
|
5
|
-
|
|
6
|
-
|
|
5
|
+
/* empty css */
|
|
6
|
+
/* empty css */
|
|
7
7
|
import { Origin as F, PointerSelectAction as T, createAnonymousGuest as V, createBody as W, defaultColorProvider as $ } from "@annotorious/core";
|
|
8
8
|
import { createImageAnnotator as o, ShapeType as e, W3CImageFormat as t } from "@annotorious/annotorious";
|
|
9
9
|
import { OpenSeadragonAnnotator as v, useViewer as B } from "./annotorious-react.es8.js";
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { j as
|
|
2
|
-
import { forwardRef as m, useRef as p, useContext as u,
|
|
1
|
+
import { j as f } from "./annotorious-react.es11.js";
|
|
2
|
+
import { forwardRef as m, useRef as p, useContext as u, useLayoutEffect as c, useImperativeHandle as d } from "react";
|
|
3
3
|
import l from "openseadragon";
|
|
4
4
|
import { OpenSeadragonAnnotatorContext as x } from "./annotorious-react.es8.js";
|
|
5
5
|
const S = m((n, s) => {
|
|
6
|
-
const { className: i, options: t } = n, r = p(null), { viewer:
|
|
6
|
+
const { className: i, options: t } = n, r = p(null), { viewer: a, setViewer: e } = u(x);
|
|
7
7
|
return c(() => {
|
|
8
8
|
if (r.current) {
|
|
9
9
|
const o = l({ ...t, element: r.current });
|
|
@@ -11,7 +11,7 @@ const S = m((n, s) => {
|
|
|
11
11
|
o.destroy(), e && e(void 0);
|
|
12
12
|
};
|
|
13
13
|
}
|
|
14
|
-
}, [JSON.stringify(t)]), d(s, () =>
|
|
14
|
+
}, [JSON.stringify(t)]), d(s, () => a), /* @__PURE__ */ f.jsx("div", { className: i, ref: r });
|
|
15
15
|
});
|
|
16
16
|
export {
|
|
17
17
|
S as OpenSeadragonViewer
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-react.es10.js","sources":["../src/openseadragon/OpenSeadragonViewer.tsx"],"sourcesContent":["import { forwardRef, useContext,
|
|
1
|
+
{"version":3,"file":"annotorious-react.es10.js","sources":["../src/openseadragon/OpenSeadragonViewer.tsx"],"sourcesContent":["import { forwardRef, useContext, useImperativeHandle, useLayoutEffect, useRef } from 'react';\nimport OpenSeadragon from 'openseadragon';\nimport { OpenSeadragonAnnotatorContext } from './OpenSeadragonAnnotator';\n\nexport interface OpenSeadragonViewerProps {\n\n className?: string;\n\n options: OpenSeadragon.Options;\n\n}\n\nexport const OpenSeadragonViewer = forwardRef<OpenSeadragon.Viewer, OpenSeadragonViewerProps>((props: OpenSeadragonViewerProps, ref) => {\n\n const { className, options } = props;\n\n const element = useRef<HTMLDivElement>(null);\n\n const { viewer, setViewer } = useContext(OpenSeadragonAnnotatorContext);\n\n useLayoutEffect(() => { \n if (element.current) {\n const v = OpenSeadragon({...options, element: element.current });\n\n // Checking for setViewer is just a convenience so we can\n // use this component also without an OpenSeadragonAnnotator\n if (setViewer)\n setViewer(v);\n\n return () => {\n v.destroy();\n\n if (setViewer) \n setViewer(undefined);\n }\n }\n }, [JSON.stringify(options)]);\n\n useImperativeHandle(ref, () => viewer);\n\n return (\n <div className={className} ref={element} />\n );\n\n});"],"names":["OpenSeadragonViewer","forwardRef","props","ref","className","options","element","useRef","viewer","setViewer","useContext","OpenSeadragonAnnotatorContext","useLayoutEffect","v","OpenSeadragon","useImperativeHandle","jsx"],"mappings":";;;;AAYO,MAAMA,IAAsBC,EAA2D,CAACC,GAAiCC,MAAQ;AAEhI,QAAA,EAAE,WAAAC,GAAW,SAAAC,EAAY,IAAAH,GAEzBI,IAAUC,EAAuB,IAAI,GAErC,EAAE,QAAAC,GAAQ,WAAAC,EAAU,IAAIC,EAAWC,CAA6B;AAEtE,SAAAC,EAAgB,MAAM;AACpB,QAAIN,EAAQ,SAAS;AACb,YAAAO,IAAIC,EAAc,EAAC,GAAGT,GAAS,SAASC,EAAQ,SAAS;AAI3D,aAAAG,KACFA,EAAUI,CAAC,GAEN,MAAM;AACX,QAAAA,EAAE,QAAQ,GAENJ,KACFA,EAAU,MAAS;AAAA,MAAA;AAAA,IAEzB;AAAA,KACC,CAAC,KAAK,UAAUJ,CAAO,CAAC,CAAC,GAERU,EAAAZ,GAAK,MAAMK,CAAM,GAGlCQ,gBAAAA,EAAAA,IAAA,OAAA,EAAI,WAAAZ,GAAsB,KAAKE,EAAS,CAAA;AAG7C,CAAC;"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@annotorious/react",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.28",
|
|
4
4
|
"description": "Annotorious React bindings",
|
|
5
5
|
"author": "Rainer Simon",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
@@ -26,9 +26,9 @@
|
|
|
26
26
|
"devDependencies": {
|
|
27
27
|
"@types/react": "^18.3.3",
|
|
28
28
|
"@types/react-dom": "^18.3.0",
|
|
29
|
-
"@vitejs/plugin-react": "^4.3.
|
|
29
|
+
"@vitejs/plugin-react": "^4.3.1",
|
|
30
30
|
"typescript": "^5.4.5",
|
|
31
|
-
"vite": "^5.2.
|
|
31
|
+
"vite": "^5.2.13",
|
|
32
32
|
"vite-plugin-dts": "^3.9.1",
|
|
33
33
|
"vite-tsconfig-paths": "^4.3.2"
|
|
34
34
|
},
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
}
|
|
44
44
|
},
|
|
45
45
|
"dependencies": {
|
|
46
|
-
"@annotorious/core": "3.0.0-rc.
|
|
47
|
-
"@annotorious/annotorious": "3.0.0-rc.
|
|
48
|
-
"@annotorious/openseadragon": "3.0.0-rc.
|
|
46
|
+
"@annotorious/core": "3.0.0-rc.28",
|
|
47
|
+
"@annotorious/annotorious": "3.0.0-rc.28",
|
|
48
|
+
"@annotorious/openseadragon": "3.0.0-rc.28",
|
|
49
49
|
"@neodrag/react": "^2.0.4"
|
|
50
50
|
},
|
|
51
51
|
"sideEffects": false
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-react.es6.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"annotorious-react.es7.js","sources":[],"sourcesContent":[],"names":[],"mappings":""}
|