From 8792b4552ee0d0a8cfea4690b106ef12d95669c8 Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Tue, 8 Oct 2024 19:21:25 +0200 Subject: [PATCH 1/4] Annotorious library downgrade --- package-lock.json | 136 +++++++++++++++++++++++++++++++++++++--------- package.json | 2 +- 2 files changed, 111 insertions(+), 27 deletions(-) diff --git a/package-lock.json b/package-lock.json index c0e7938d..23453e5b 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "dependencies": { "@allmaps/iiif-parser": "1.0.0-beta.39", - "@annotorious/react": "3.0.11", + "@annotorious/react": "3.0.3", "@astrojs/netlify": "^5.5.3", "@astrojs/node": "^8.3.4", "@astrojs/react": "^3.6.2", @@ -118,17 +118,26 @@ } }, "node_modules/@annotorious/annotorious": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@annotorious/annotorious/-/annotorious-3.0.11.tgz", - "integrity": "sha512-5w8ES2hTJU/WVwzlqzxX6McouC9bR/P9zoOxF1SHa+D4Z4E8RbygyE4XfVy7fuDNHUEQAlq3DQdvW2S4TyZ4Qw==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@annotorious/annotorious/-/annotorious-3.0.3.tgz", + "integrity": "sha512-jp0LLQxrBLRYVzrc9V4eTCjuDIF9WnwMJDkKUEthQAqsd8K1i3iXVfqxPQNH6uIay4cNenMAS8DhArKVXqkGyA==", "license": "BSD-3-Clause", "dependencies": { - "@annotorious/core": "3.0.11", + "@annotorious/core": "3.0.3", "rbush": "^4.0.1", "uuid": "^10.0.0" - }, - "funding": { - "url": "https://steadyhq.com/rainer-simon" + } + }, + "node_modules/@annotorious/annotorious/node_modules/@annotorious/core": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@annotorious/core/-/core-3.0.3.tgz", + "integrity": "sha512-D1mvTtlnmSco17X3PTZ92xKC9baxbcT9WDbtXIOotcFvTPq2Hpib36Jwz/DLXbVbCG6I3LScqtNcx/3JOElPhg==", + "license": "BSD-3-Clause", + "dependencies": { + "dequal": "^2.0.3", + "nanoevents": "^9.0.0", + "nanoid": "^5.0.7", + "uuid": "^10.0.0" } }, "node_modules/@annotorious/core": { @@ -147,36 +156,42 @@ } }, "node_modules/@annotorious/openseadragon": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@annotorious/openseadragon/-/openseadragon-3.0.11.tgz", - "integrity": "sha512-AkSBy0r6HNxS6NXyfP94RyXOhb4yatjFph49ZPcBMyO7zKXPEJWT/t4HyFbg5QpJ8/xTY3wFaXThRcU0yYxB8A==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@annotorious/openseadragon/-/openseadragon-3.0.3.tgz", + "integrity": "sha512-B2pG/jj1aVOIo51jU9GJEUQEzBYB/YtIYJuwoe0m1KrXKtbx0VfeixHiY6YXrQpRLG3iwfT1ztTVEgpOsLMtLw==", "license": "BSD-3-Clause", "dependencies": { - "@annotorious/annotorious": "3.0.11", - "@annotorious/core": "3.0.11", + "@annotorious/annotorious": "3.0.3", + "@annotorious/core": "3.0.3", "pixi.js": "^7.4.2", "uuid": "^10.0.0" }, - "funding": { - "url": "https://steadyhq.com/rainer-simon" - }, "peerDependencies": { "openseadragon": "^3.0.0 || ^4.0.0 || ^5.0.0" } }, + "node_modules/@annotorious/openseadragon/node_modules/@annotorious/core": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@annotorious/core/-/core-3.0.3.tgz", + "integrity": "sha512-D1mvTtlnmSco17X3PTZ92xKC9baxbcT9WDbtXIOotcFvTPq2Hpib36Jwz/DLXbVbCG6I3LScqtNcx/3JOElPhg==", + "license": "BSD-3-Clause", + "dependencies": { + "dequal": "^2.0.3", + "nanoevents": "^9.0.0", + "nanoid": "^5.0.7", + "uuid": "^10.0.0" + } + }, "node_modules/@annotorious/react": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@annotorious/react/-/react-3.0.11.tgz", - "integrity": "sha512-auhoOgZhRKnSiXadw+jrZpddJujv6KxPNsG/D5L2pEk6EznBRuuX/e5wlCbcK609Q1guUMskx1GEl1AuR5kl5g==", + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@annotorious/react/-/react-3.0.3.tgz", + "integrity": "sha512-ijPbtW5FcFWMeVxCVcwoMuXuxMaCGnzjsrwYx4Xe/mnlNw5wWzfXAFIv4GK9IZUi+YKdmIsZ9yHmyUGUVwtabA==", "license": "BSD-3-Clause", "dependencies": { - "@annotorious/annotorious": "3.0.11", - "@annotorious/core": "3.0.11", - "@annotorious/openseadragon": "3.0.11", - "@floating-ui/react": "^0.26.24" - }, - "funding": { - "url": "https://steadyhq.com/rainer-simon" + "@annotorious/annotorious": "3.0.3", + "@annotorious/core": "3.0.3", + "@annotorious/openseadragon": "3.0.3", + "@floating-ui/react": "^0.26.23" }, "peerDependencies": { "openseadragon": "^3.0.0 || ^4.0.0 || ^5.0.0", @@ -189,6 +204,18 @@ } } }, + "node_modules/@annotorious/react/node_modules/@annotorious/core": { + "version": "3.0.3", + "resolved": "https://registry.npmjs.org/@annotorious/core/-/core-3.0.3.tgz", + "integrity": "sha512-D1mvTtlnmSco17X3PTZ92xKC9baxbcT9WDbtXIOotcFvTPq2Hpib36Jwz/DLXbVbCG6I3LScqtNcx/3JOElPhg==", + "license": "BSD-3-Clause", + "dependencies": { + "dequal": "^2.0.3", + "nanoevents": "^9.0.0", + "nanoid": "^5.0.7", + "uuid": "^10.0.0" + } + }, "node_modules/@astrojs/compiler": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.10.3.tgz", @@ -3691,6 +3718,63 @@ } } }, + "node_modules/@recogito/react-text-annotator/node_modules/@annotorious/annotorious": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@annotorious/annotorious/-/annotorious-3.0.11.tgz", + "integrity": "sha512-5w8ES2hTJU/WVwzlqzxX6McouC9bR/P9zoOxF1SHa+D4Z4E8RbygyE4XfVy7fuDNHUEQAlq3DQdvW2S4TyZ4Qw==", + "license": "BSD-3-Clause", + "dependencies": { + "@annotorious/core": "3.0.11", + "rbush": "^4.0.1", + "uuid": "^10.0.0" + }, + "funding": { + "url": "https://steadyhq.com/rainer-simon" + } + }, + "node_modules/@recogito/react-text-annotator/node_modules/@annotorious/openseadragon": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@annotorious/openseadragon/-/openseadragon-3.0.11.tgz", + "integrity": "sha512-AkSBy0r6HNxS6NXyfP94RyXOhb4yatjFph49ZPcBMyO7zKXPEJWT/t4HyFbg5QpJ8/xTY3wFaXThRcU0yYxB8A==", + "license": "BSD-3-Clause", + "dependencies": { + "@annotorious/annotorious": "3.0.11", + "@annotorious/core": "3.0.11", + "pixi.js": "^7.4.2", + "uuid": "^10.0.0" + }, + "funding": { + "url": "https://steadyhq.com/rainer-simon" + }, + "peerDependencies": { + "openseadragon": "^3.0.0 || ^4.0.0 || ^5.0.0" + } + }, + "node_modules/@recogito/react-text-annotator/node_modules/@annotorious/react": { + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@annotorious/react/-/react-3.0.11.tgz", + "integrity": "sha512-auhoOgZhRKnSiXadw+jrZpddJujv6KxPNsG/D5L2pEk6EznBRuuX/e5wlCbcK609Q1guUMskx1GEl1AuR5kl5g==", + "license": "BSD-3-Clause", + "dependencies": { + "@annotorious/annotorious": "3.0.11", + "@annotorious/core": "3.0.11", + "@annotorious/openseadragon": "3.0.11", + "@floating-ui/react": "^0.26.24" + }, + "funding": { + "url": "https://steadyhq.com/rainer-simon" + }, + "peerDependencies": { + "openseadragon": "^3.0.0 || ^4.0.0 || ^5.0.0", + "react": "16.8.0 || >=17.x || >=18.x", + "react-dom": "16.8.0 || >=17.x || >=18.x" + }, + "peerDependenciesMeta": { + "openseadragon": { + "optional": true + } + } + }, "node_modules/@recogito/text-annotator": { "version": "3.0.0-rc.49", "resolved": "https://registry.npmjs.org/@recogito/text-annotator/-/text-annotator-3.0.0-rc.49.tgz", diff --git a/package.json b/package.json index 337b0882..5f039819 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@allmaps/iiif-parser": "1.0.0-beta.39", - "@annotorious/react": "3.0.11", + "@annotorious/react": "3.0.3", "@astrojs/netlify": "^5.5.3", "@astrojs/node": "^8.3.4", "@astrojs/react": "^3.6.2", From b5e7776f2c564015af7e62d1634380372b2390ac Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Tue, 8 Oct 2024 19:40:23 +0200 Subject: [PATCH 2/4] Bugfix --- package-lock.json | 136 ++++-------------- package.json | 2 +- .../AnnotatedImage/AnnotatedImage.tsx | 6 +- 3 files changed, 30 insertions(+), 114 deletions(-) diff --git a/package-lock.json b/package-lock.json index 23453e5b..c0e7938d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -10,7 +10,7 @@ "hasInstallScript": true, "dependencies": { "@allmaps/iiif-parser": "1.0.0-beta.39", - "@annotorious/react": "3.0.3", + "@annotorious/react": "3.0.11", "@astrojs/netlify": "^5.5.3", "@astrojs/node": "^8.3.4", "@astrojs/react": "^3.6.2", @@ -118,26 +118,17 @@ } }, "node_modules/@annotorious/annotorious": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@annotorious/annotorious/-/annotorious-3.0.3.tgz", - "integrity": "sha512-jp0LLQxrBLRYVzrc9V4eTCjuDIF9WnwMJDkKUEthQAqsd8K1i3iXVfqxPQNH6uIay4cNenMAS8DhArKVXqkGyA==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@annotorious/annotorious/-/annotorious-3.0.11.tgz", + "integrity": "sha512-5w8ES2hTJU/WVwzlqzxX6McouC9bR/P9zoOxF1SHa+D4Z4E8RbygyE4XfVy7fuDNHUEQAlq3DQdvW2S4TyZ4Qw==", "license": "BSD-3-Clause", "dependencies": { - "@annotorious/core": "3.0.3", + "@annotorious/core": "3.0.11", "rbush": "^4.0.1", "uuid": "^10.0.0" - } - }, - "node_modules/@annotorious/annotorious/node_modules/@annotorious/core": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@annotorious/core/-/core-3.0.3.tgz", - "integrity": "sha512-D1mvTtlnmSco17X3PTZ92xKC9baxbcT9WDbtXIOotcFvTPq2Hpib36Jwz/DLXbVbCG6I3LScqtNcx/3JOElPhg==", - "license": "BSD-3-Clause", - "dependencies": { - "dequal": "^2.0.3", - "nanoevents": "^9.0.0", - "nanoid": "^5.0.7", - "uuid": "^10.0.0" + }, + "funding": { + "url": "https://steadyhq.com/rainer-simon" } }, "node_modules/@annotorious/core": { @@ -156,42 +147,36 @@ } }, "node_modules/@annotorious/openseadragon": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@annotorious/openseadragon/-/openseadragon-3.0.3.tgz", - "integrity": "sha512-B2pG/jj1aVOIo51jU9GJEUQEzBYB/YtIYJuwoe0m1KrXKtbx0VfeixHiY6YXrQpRLG3iwfT1ztTVEgpOsLMtLw==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@annotorious/openseadragon/-/openseadragon-3.0.11.tgz", + "integrity": "sha512-AkSBy0r6HNxS6NXyfP94RyXOhb4yatjFph49ZPcBMyO7zKXPEJWT/t4HyFbg5QpJ8/xTY3wFaXThRcU0yYxB8A==", "license": "BSD-3-Clause", "dependencies": { - "@annotorious/annotorious": "3.0.3", - "@annotorious/core": "3.0.3", + "@annotorious/annotorious": "3.0.11", + "@annotorious/core": "3.0.11", "pixi.js": "^7.4.2", "uuid": "^10.0.0" }, + "funding": { + "url": "https://steadyhq.com/rainer-simon" + }, "peerDependencies": { "openseadragon": "^3.0.0 || ^4.0.0 || ^5.0.0" } }, - "node_modules/@annotorious/openseadragon/node_modules/@annotorious/core": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@annotorious/core/-/core-3.0.3.tgz", - "integrity": "sha512-D1mvTtlnmSco17X3PTZ92xKC9baxbcT9WDbtXIOotcFvTPq2Hpib36Jwz/DLXbVbCG6I3LScqtNcx/3JOElPhg==", - "license": "BSD-3-Clause", - "dependencies": { - "dequal": "^2.0.3", - "nanoevents": "^9.0.0", - "nanoid": "^5.0.7", - "uuid": "^10.0.0" - } - }, "node_modules/@annotorious/react": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@annotorious/react/-/react-3.0.3.tgz", - "integrity": "sha512-ijPbtW5FcFWMeVxCVcwoMuXuxMaCGnzjsrwYx4Xe/mnlNw5wWzfXAFIv4GK9IZUi+YKdmIsZ9yHmyUGUVwtabA==", + "version": "3.0.11", + "resolved": "https://registry.npmjs.org/@annotorious/react/-/react-3.0.11.tgz", + "integrity": "sha512-auhoOgZhRKnSiXadw+jrZpddJujv6KxPNsG/D5L2pEk6EznBRuuX/e5wlCbcK609Q1guUMskx1GEl1AuR5kl5g==", "license": "BSD-3-Clause", "dependencies": { - "@annotorious/annotorious": "3.0.3", - "@annotorious/core": "3.0.3", - "@annotorious/openseadragon": "3.0.3", - "@floating-ui/react": "^0.26.23" + "@annotorious/annotorious": "3.0.11", + "@annotorious/core": "3.0.11", + "@annotorious/openseadragon": "3.0.11", + "@floating-ui/react": "^0.26.24" + }, + "funding": { + "url": "https://steadyhq.com/rainer-simon" }, "peerDependencies": { "openseadragon": "^3.0.0 || ^4.0.0 || ^5.0.0", @@ -204,18 +189,6 @@ } } }, - "node_modules/@annotorious/react/node_modules/@annotorious/core": { - "version": "3.0.3", - "resolved": "https://registry.npmjs.org/@annotorious/core/-/core-3.0.3.tgz", - "integrity": "sha512-D1mvTtlnmSco17X3PTZ92xKC9baxbcT9WDbtXIOotcFvTPq2Hpib36Jwz/DLXbVbCG6I3LScqtNcx/3JOElPhg==", - "license": "BSD-3-Clause", - "dependencies": { - "dequal": "^2.0.3", - "nanoevents": "^9.0.0", - "nanoid": "^5.0.7", - "uuid": "^10.0.0" - } - }, "node_modules/@astrojs/compiler": { "version": "2.10.3", "resolved": "https://registry.npmjs.org/@astrojs/compiler/-/compiler-2.10.3.tgz", @@ -3718,63 +3691,6 @@ } } }, - "node_modules/@recogito/react-text-annotator/node_modules/@annotorious/annotorious": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@annotorious/annotorious/-/annotorious-3.0.11.tgz", - "integrity": "sha512-5w8ES2hTJU/WVwzlqzxX6McouC9bR/P9zoOxF1SHa+D4Z4E8RbygyE4XfVy7fuDNHUEQAlq3DQdvW2S4TyZ4Qw==", - "license": "BSD-3-Clause", - "dependencies": { - "@annotorious/core": "3.0.11", - "rbush": "^4.0.1", - "uuid": "^10.0.0" - }, - "funding": { - "url": "https://steadyhq.com/rainer-simon" - } - }, - "node_modules/@recogito/react-text-annotator/node_modules/@annotorious/openseadragon": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@annotorious/openseadragon/-/openseadragon-3.0.11.tgz", - "integrity": "sha512-AkSBy0r6HNxS6NXyfP94RyXOhb4yatjFph49ZPcBMyO7zKXPEJWT/t4HyFbg5QpJ8/xTY3wFaXThRcU0yYxB8A==", - "license": "BSD-3-Clause", - "dependencies": { - "@annotorious/annotorious": "3.0.11", - "@annotorious/core": "3.0.11", - "pixi.js": "^7.4.2", - "uuid": "^10.0.0" - }, - "funding": { - "url": "https://steadyhq.com/rainer-simon" - }, - "peerDependencies": { - "openseadragon": "^3.0.0 || ^4.0.0 || ^5.0.0" - } - }, - "node_modules/@recogito/react-text-annotator/node_modules/@annotorious/react": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@annotorious/react/-/react-3.0.11.tgz", - "integrity": "sha512-auhoOgZhRKnSiXadw+jrZpddJujv6KxPNsG/D5L2pEk6EznBRuuX/e5wlCbcK609Q1guUMskx1GEl1AuR5kl5g==", - "license": "BSD-3-Clause", - "dependencies": { - "@annotorious/annotorious": "3.0.11", - "@annotorious/core": "3.0.11", - "@annotorious/openseadragon": "3.0.11", - "@floating-ui/react": "^0.26.24" - }, - "funding": { - "url": "https://steadyhq.com/rainer-simon" - }, - "peerDependencies": { - "openseadragon": "^3.0.0 || ^4.0.0 || ^5.0.0", - "react": "16.8.0 || >=17.x || >=18.x", - "react-dom": "16.8.0 || >=17.x || >=18.x" - }, - "peerDependenciesMeta": { - "openseadragon": { - "optional": true - } - } - }, "node_modules/@recogito/text-annotator": { "version": "3.0.0-rc.49", "resolved": "https://registry.npmjs.org/@recogito/text-annotator/-/text-annotator-3.0.0-rc.49.tgz", diff --git a/package.json b/package.json index 5f039819..337b0882 100644 --- a/package.json +++ b/package.json @@ -15,7 +15,7 @@ }, "dependencies": { "@allmaps/iiif-parser": "1.0.0-beta.39", - "@annotorious/react": "3.0.3", + "@annotorious/react": "3.0.11", "@astrojs/netlify": "^5.5.3", "@astrojs/node": "^8.3.4", "@astrojs/react": "^3.6.2", diff --git a/src/apps/annotation-image/AnnotatedImage/AnnotatedImage.tsx b/src/apps/annotation-image/AnnotatedImage/AnnotatedImage.tsx index 5d684891..a9160fb2 100644 --- a/src/apps/annotation-image/AnnotatedImage/AnnotatedImage.tsx +++ b/src/apps/annotation-image/AnnotatedImage/AnnotatedImage.tsx @@ -1,4 +1,4 @@ -import { forwardRef, useEffect, useMemo, useRef, useState } from 'react'; +import { forwardRef, useCallback, useEffect, useMemo, useRef, useState } from 'react'; import type OpenSeadragon from 'openseadragon'; import { UndoStack } from '@components/AnnotationDesktop'; import type { PrivacyMode } from '@components/PrivacySelector'; @@ -101,7 +101,7 @@ export const AnnotatedImage = forwardRef { + const selectAction = useCallback((annotation: SupabaseAnnotation) => { // Directly after creation, annotations have no // layer_id (because it gets added later through // the storage plugin). @@ -116,7 +116,7 @@ export const AnnotatedImage = forwardRef { if (props.tool) { From 961269300953eac6c527e1d9ab2c3811dec47a68 Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Tue, 8 Oct 2024 19:50:56 +0200 Subject: [PATCH 3/4] Dependency version: keeping OSD at 4.0.0 --- package.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/package.json b/package.json index 337b0882..144e9ccc 100644 --- a/package.json +++ b/package.json @@ -59,7 +59,7 @@ "linkedom": "0.18.5", "moment": "^2.30.1", "nodemailer": "^6.9.15", - "openseadragon": "4.1.1", + "openseadragon": "4.0.0", "papaparse": "5.4.1", "quill": "2.0.2", "react": "^18.3.1", From a7dada53068793443f305aa1854e3e008b84577f Mon Sep 17 00:00:00 2001 From: Rainer Simon Date: Tue, 8 Oct 2024 19:52:33 +0200 Subject: [PATCH 4/4] package-lock.json --- package-lock.json | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/package-lock.json b/package-lock.json index c0e7938d..f6a1b6ba 100644 --- a/package-lock.json +++ b/package-lock.json @@ -54,7 +54,7 @@ "linkedom": "0.18.5", "moment": "^2.30.1", "nodemailer": "^6.9.15", - "openseadragon": "4.1.1", + "openseadragon": "4.0.0", "papaparse": "5.4.1", "quill": "2.0.2", "react": "^18.3.1", @@ -10181,9 +10181,9 @@ } }, "node_modules/openseadragon": { - "version": "4.1.1", - "resolved": "https://registry.npmjs.org/openseadragon/-/openseadragon-4.1.1.tgz", - "integrity": "sha512-owU9gsasAcobLN+LM8lN58Xc2VDSDotY9mkrwS/NB6g9KX/PcusV4RZvhHng2RF/Q0pMziwldf62glwXoGnuzg==", + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/openseadragon/-/openseadragon-4.0.0.tgz", + "integrity": "sha512-HsjSgqiiPwLkW5576GxDJ7Rax96iLUET8fnTsJvu7uYYkd+qzen3bflxHyph0OVVgZBKP9SpGH1nPdU4Mz0Z2A==", "license": "BSD-3-Clause", "funding": { "url": "https://opencollective.com/openseadragon"