diff --git a/package-lock.json b/package-lock.json index e769b63b..7355dc90 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@recogito/text-annotator-monorepo", - "version": "3.0.0-rc.50", + "version": "3.0.0-rc.52", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@recogito/text-annotator-monorepo", - "version": "3.0.0-rc.50", + "version": "3.0.0-rc.52", "license": "BSD-3-Clause", "workspaces": [ "./packages/text-annotator", @@ -29,70 +29,44 @@ } }, "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.12", + "resolved": "https://registry.npmjs.org/@annotorious/annotorious/-/annotorious-3.0.12.tgz", + "integrity": "sha512-Wkb7hqETWaWGWNwJ2muQUNrv5ePzHyZOGty5Xtsjrc47tDGl4ZwH/9jt1666bB5ttqANq/eYdy8Jch8UcUIJmg==", "license": "BSD-3-Clause", "dependencies": { - "@annotorious/core": "3.0.11", + "@annotorious/core": "3.0.12", "rbush": "^4.0.1", - "uuid": "^10.0.0" + "uuid": "^11.0.3" }, "funding": { "url": "https://steadyhq.com/rainer-simon" } }, - "node_modules/@annotorious/annotorious/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "node_modules/@annotorious/core": { - "version": "3.0.11", - "resolved": "https://registry.npmjs.org/@annotorious/core/-/core-3.0.11.tgz", - "integrity": "sha512-PZuQyyux1WgJEjZQwDvGwxlWeZEycUj7zJuJL5v02p+AVNeflUGIKGHBhphCdJhz7LpawWfCbrhlhYO8jit8Hw==", + "version": "3.0.12", + "resolved": "https://registry.npmjs.org/@annotorious/core/-/core-3.0.12.tgz", + "integrity": "sha512-QKLHqeKa5YieuWog/6fsyrA5851zncQGE8NpK1s90+Ckr/eZ/b9TsK+vEssA7vBH0AcEFrsE3HsEZ2S4jlJ6LA==", "license": "BSD-3-Clause", "dependencies": { "dequal": "^2.0.3", - "nanoevents": "^9.0.0", - "nanoid": "^5.0.7", - "uuid": "^10.0.0" + "nanoevents": "^9.1.0", + "nanoid": "^5.0.8", + "uuid": "^11.0.3" }, "funding": { "url": "https://steadyhq.com/rainer-simon" } }, - "node_modules/@annotorious/core/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "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.12", + "resolved": "https://registry.npmjs.org/@annotorious/openseadragon/-/openseadragon-3.0.12.tgz", + "integrity": "sha512-vXFbvgTNfZHKK/jUyOnooX5k52zHpiYk5ehIEEWCy+hY0/3HOLR1R3+mE9PnVh2DwsYXMlR2qJ55qCV5loVv4Q==", "license": "BSD-3-Clause", "dependencies": { - "@annotorious/annotorious": "3.0.11", - "@annotorious/core": "3.0.11", + "@annotorious/annotorious": "3.0.12", + "@annotorious/core": "3.0.12", "pixi.js": "^7.4.2", - "uuid": "^10.0.0" + "uuid": "^11.0.3" }, "funding": { "url": "https://steadyhq.com/rainer-simon" @@ -101,29 +75,17 @@ "openseadragon": "^3.0.0 || ^4.0.0 || ^5.0.0" } }, - "node_modules/@annotorious/openseadragon/node_modules/uuid": { - "version": "10.0.0", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-10.0.0.tgz", - "integrity": "sha512-8XkAphELsDnEGrDxUOHB3RGvXz6TeuYSGEZBOjtTtPm2lwhGBjLgOzLHB63IUWfBpNucQjND6d3AOudO+H3RWQ==", - "funding": [ - "https://github.com/sponsors/broofa", - "https://github.com/sponsors/ctavan" - ], - "license": "MIT", - "bin": { - "uuid": "dist/bin/uuid" - } - }, "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.12", + "resolved": "https://registry.npmjs.org/@annotorious/react/-/react-3.0.12.tgz", + "integrity": "sha512-HLk8NXOMCPadQ1kBqyD6h87VA9IlBv5LAGZn3yfONXnKfrPuBuZE/DWeOgi0E725HmAZWtHvJZarV5WQHgMTow==", "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" + "@annotorious/annotorious": "3.0.12", + "@annotorious/core": "3.0.12", + "@annotorious/openseadragon": "3.0.12", + "@floating-ui/react": "^0.26.27", + "zustand": "^5.0.1" }, "funding": { "url": "https://steadyhq.com/rainer-simon" @@ -1432,9 +1394,9 @@ } }, "node_modules/@rollup/rollup-android-arm-eabi": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.24.3.tgz", - "integrity": "sha512-ufb2CH2KfBWPJok95frEZZ82LtDl0A6QKTa8MoM+cWwDZvVGl5/jNb79pIhRvAalUu+7LD91VYR0nwRD799HkQ==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.25.0.tgz", + "integrity": "sha512-CC/ZqFZwlAIbU1wUPisHyV/XRc5RydFrNLtgl3dGYskdwPZdt4HERtKm50a/+DtTlKeCq9IXFEWR+P6blwjqBA==", "cpu": [ "arm" ], @@ -1446,9 +1408,9 @@ ] }, "node_modules/@rollup/rollup-android-arm64": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.24.3.tgz", - "integrity": "sha512-iAHpft/eQk9vkWIV5t22V77d90CRofgR2006UiCjHcHJFVI1E0oBkQIAbz+pLtthFw3hWEmVB4ilxGyBf48i2Q==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.25.0.tgz", + "integrity": "sha512-/Y76tmLGUJqVBXXCfVS8Q8FJqYGhgH4wl4qTA24E9v/IJM0XvJCGQVSW1QZ4J+VURO9h8YCa28sTFacZXwK7Rg==", "cpu": [ "arm64" ], @@ -1460,9 +1422,9 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.24.3.tgz", - "integrity": "sha512-QPW2YmkWLlvqmOa2OwrfqLJqkHm7kJCIMq9kOz40Zo9Ipi40kf9ONG5Sz76zszrmIZZ4hgRIkez69YnTHgEz1w==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.25.0.tgz", + "integrity": "sha512-YVT6L3UrKTlC0FpCZd0MGA7NVdp7YNaEqkENbWQ7AOVOqd/7VzyHpgIpc1mIaxRAo1ZsJRH45fq8j4N63I/vvg==", "cpu": [ "arm64" ], @@ -1474,9 +1436,9 @@ ] }, "node_modules/@rollup/rollup-darwin-x64": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.24.3.tgz", - "integrity": "sha512-KO0pN5x3+uZm1ZXeIfDqwcvnQ9UEGN8JX5ufhmgH5Lz4ujjZMAnxQygZAVGemFWn+ZZC0FQopruV4lqmGMshow==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.25.0.tgz", + "integrity": "sha512-ZRL+gexs3+ZmmWmGKEU43Bdn67kWnMeWXLFhcVv5Un8FQcx38yulHBA7XR2+KQdYIOtD0yZDWBCudmfj6lQJoA==", "cpu": [ "x64" ], @@ -1488,9 +1450,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-arm64": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.24.3.tgz", - "integrity": "sha512-CsC+ZdIiZCZbBI+aRlWpYJMSWvVssPuWqrDy/zi9YfnatKKSLFCe6fjna1grHuo/nVaHG+kiglpRhyBQYRTK4A==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-arm64/-/rollup-freebsd-arm64-4.25.0.tgz", + "integrity": "sha512-xpEIXhiP27EAylEpreCozozsxWQ2TJbOLSivGfXhU4G1TBVEYtUPi2pOZBnvGXHyOdLAUUhPnJzH3ah5cqF01g==", "cpu": [ "arm64" ], @@ -1502,9 +1464,9 @@ ] }, "node_modules/@rollup/rollup-freebsd-x64": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.24.3.tgz", - "integrity": "sha512-F0nqiLThcfKvRQhZEzMIXOQG4EeX61im61VYL1jo4eBxv4aZRmpin6crnBJQ/nWnCsjH5F6J3W6Stdm0mBNqBg==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-freebsd-x64/-/rollup-freebsd-x64-4.25.0.tgz", + "integrity": "sha512-sC5FsmZGlJv5dOcURrsnIK7ngc3Kirnx3as2XU9uER+zjfyqIjdcMVgzy4cOawhsssqzoAX19qmxgJ8a14Qrqw==", "cpu": [ "x64" ], @@ -1516,9 +1478,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-gnueabihf": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.24.3.tgz", - "integrity": "sha512-KRSFHyE/RdxQ1CSeOIBVIAxStFC/hnBgVcaiCkQaVC+EYDtTe4X7z5tBkFyRoBgUGtB6Xg6t9t2kulnX6wJc6A==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.25.0.tgz", + "integrity": "sha512-uD/dbLSs1BEPzg564TpRAQ/YvTnCds2XxyOndAO8nJhaQcqQGFgv/DAVko/ZHap3boCvxnzYMa3mTkV/B/3SWA==", "cpu": [ "arm" ], @@ -1530,9 +1492,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm-musleabihf": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.24.3.tgz", - "integrity": "sha512-h6Q8MT+e05zP5BxEKz0vi0DhthLdrNEnspdLzkoFqGwnmOzakEHSlXfVyA4HJ322QtFy7biUAVFPvIDEDQa6rw==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.25.0.tgz", + "integrity": "sha512-ZVt/XkrDlQWegDWrwyC3l0OfAF7yeJUF4fq5RMS07YM72BlSfn2fQQ6lPyBNjt+YbczMguPiJoCfaQC2dnflpQ==", "cpu": [ "arm" ], @@ -1544,9 +1506,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-gnu": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.24.3.tgz", - "integrity": "sha512-fKElSyXhXIJ9pqiYRqisfirIo2Z5pTTve5K438URf08fsypXrEkVmShkSfM8GJ1aUyvjakT+fn2W7Czlpd/0FQ==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.25.0.tgz", + "integrity": "sha512-qboZ+T0gHAW2kkSDPHxu7quaFaaBlynODXpBVnPxUgvWYaE84xgCKAPEYE+fSMd3Zv5PyFZR+L0tCdYCMAtG0A==", "cpu": [ "arm64" ], @@ -1558,9 +1520,9 @@ ] }, "node_modules/@rollup/rollup-linux-arm64-musl": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.24.3.tgz", - "integrity": "sha512-YlddZSUk8G0px9/+V9PVilVDC6ydMz7WquxozToozSnfFK6wa6ne1ATUjUvjin09jp34p84milxlY5ikueoenw==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.25.0.tgz", + "integrity": "sha512-ndWTSEmAaKr88dBuogGH2NZaxe7u2rDoArsejNslugHZ+r44NfWiwjzizVS1nUOHo+n1Z6qV3X60rqE/HlISgw==", "cpu": [ "arm64" ], @@ -1572,9 +1534,9 @@ ] }, "node_modules/@rollup/rollup-linux-powerpc64le-gnu": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.24.3.tgz", - "integrity": "sha512-yNaWw+GAO8JjVx3s3cMeG5Esz1cKVzz8PkTJSfYzE5u7A+NvGmbVFEHP+BikTIyYWuz0+DX9kaA3pH9Sqxp69g==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.25.0.tgz", + "integrity": "sha512-BVSQvVa2v5hKwJSy6X7W1fjDex6yZnNKy3Kx1JGimccHft6HV0THTwNtC2zawtNXKUu+S5CjXslilYdKBAadzA==", "cpu": [ "ppc64" ], @@ -1586,9 +1548,9 @@ ] }, "node_modules/@rollup/rollup-linux-riscv64-gnu": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.24.3.tgz", - "integrity": "sha512-lWKNQfsbpv14ZCtM/HkjCTm4oWTKTfxPmr7iPfp3AHSqyoTz5AgLemYkWLwOBWc+XxBbrU9SCokZP0WlBZM9lA==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.25.0.tgz", + "integrity": "sha512-G4hTREQrIdeV0PE2JruzI+vXdRnaK1pg64hemHq2v5fhv8C7WjVaeXc9P5i4Q5UC06d/L+zA0mszYIKl+wY8oA==", "cpu": [ "riscv64" ], @@ -1600,9 +1562,9 @@ ] }, "node_modules/@rollup/rollup-linux-s390x-gnu": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.24.3.tgz", - "integrity": "sha512-HoojGXTC2CgCcq0Woc/dn12wQUlkNyfH0I1ABK4Ni9YXyFQa86Fkt2Q0nqgLfbhkyfQ6003i3qQk9pLh/SpAYw==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.25.0.tgz", + "integrity": "sha512-9T/w0kQ+upxdkFL9zPVB6zy9vWW1deA3g8IauJxojN4bnz5FwSsUAD034KpXIVX5j5p/rn6XqumBMxfRkcHapQ==", "cpu": [ "s390x" ], @@ -1614,9 +1576,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-gnu": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.24.3.tgz", - "integrity": "sha512-mnEOh4iE4USSccBOtcrjF5nj+5/zm6NcNhbSEfR3Ot0pxBwvEn5QVUXcuOwwPkapDtGZ6pT02xLoPaNv06w7KQ==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.25.0.tgz", + "integrity": "sha512-ThcnU0EcMDn+J4B9LD++OgBYxZusuA7iemIIiz5yzEcFg04VZFzdFjuwPdlURmYPZw+fgVrFzj4CA64jSTG4Ig==", "cpu": [ "x64" ], @@ -1628,9 +1590,9 @@ ] }, "node_modules/@rollup/rollup-linux-x64-musl": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.24.3.tgz", - "integrity": "sha512-rMTzawBPimBQkG9NKpNHvquIUTQPzrnPxPbCY1Xt+mFkW7pshvyIS5kYgcf74goxXOQk0CP3EoOC1zcEezKXhw==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.25.0.tgz", + "integrity": "sha512-zx71aY2oQxGxAT1JShfhNG79PnjYhMC6voAjzpu/xmMjDnKNf6Nl/xv7YaB/9SIa9jDYf8RBPWEnjcdlhlv1rQ==", "cpu": [ "x64" ], @@ -1642,9 +1604,9 @@ ] }, "node_modules/@rollup/rollup-win32-arm64-msvc": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.24.3.tgz", - "integrity": "sha512-2lg1CE305xNvnH3SyiKwPVsTVLCg4TmNCF1z7PSHX2uZY2VbUpdkgAllVoISD7JO7zu+YynpWNSKAtOrX3AiuA==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.25.0.tgz", + "integrity": "sha512-JT8tcjNocMs4CylWY/CxVLnv8e1lE7ff1fi6kbGocWwxDq9pj30IJ28Peb+Y8yiPNSF28oad42ApJB8oUkwGww==", "cpu": [ "arm64" ], @@ -1656,9 +1618,9 @@ ] }, "node_modules/@rollup/rollup-win32-ia32-msvc": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.24.3.tgz", - "integrity": "sha512-9SjYp1sPyxJsPWuhOCX6F4jUMXGbVVd5obVpoVEi8ClZqo52ViZewA6eFz85y8ezuOA+uJMP5A5zo6Oz4S5rVQ==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.25.0.tgz", + "integrity": "sha512-dRLjLsO3dNOfSN6tjyVlG+Msm4IiZnGkuZ7G5NmpzwF9oOc582FZG05+UdfTbz5Jd4buK/wMb6UeHFhG18+OEg==", "cpu": [ "ia32" ], @@ -1670,9 +1632,9 @@ ] }, "node_modules/@rollup/rollup-win32-x64-msvc": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.24.3.tgz", - "integrity": "sha512-HGZgRFFYrMrP3TJlq58nR1xy8zHKId25vhmm5S9jETEfDf6xybPxsavFTJaufe2zgOGYJBskGlj49CwtEuFhWQ==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.25.0.tgz", + "integrity": "sha512-/RqrIFtLB926frMhZD0a5oDa4eFIbyNEwLLloMTEjmqfwZWXywwVVOVmwTsuyhC9HKkVEZcOOi+KV4U9wmOdlg==", "cpu": [ "x64" ], @@ -1888,9 +1850,9 @@ } }, "node_modules/@types/node": { - "version": "22.8.7", - "resolved": "https://registry.npmjs.org/@types/node/-/node-22.8.7.tgz", - "integrity": "sha512-LidcG+2UeYIWcMuMUpBKOnryBWG/rnmOHQR5apjn8myTQcx3rinFRn7DcIFhMnS0PPFSC6OafdIKEad0lj6U0Q==", + "version": "22.9.0", + "resolved": "https://registry.npmjs.org/@types/node/-/node-22.9.0.tgz", + "integrity": "sha512-vuyHg81vvWA1Z1ELfvLko2c8f34gyA0zaic0+Rllc5lbCnbSyuvb2Oxpm6TAUAC/2xZN3QGqxBNggD1nNR2AfQ==", "dev": true, "license": "MIT", "dependencies": { @@ -1901,7 +1863,7 @@ "version": "15.7.13", "resolved": "https://registry.npmjs.org/@types/prop-types/-/prop-types-15.7.13.tgz", "integrity": "sha512-hCZTSvwbzWGvhqxp/RqVqwU999pBf2vp7hzIjiYOsl8wqOmUxkQ6ddw1cV3l8811+kdUFus/q4d1Y3E3SyEifA==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/@types/rbush": { @@ -1915,7 +1877,7 @@ "version": "18.3.12", "resolved": "https://registry.npmjs.org/@types/react/-/react-18.3.12.tgz", "integrity": "sha512-D2wOSq/d6Agt28q7rSI3jhU7G6aiuzljDGZ2hTZHIkrTLUI+AF3WMeKkEZ9nN2fkBAlcktT6vcZjDFiIhMYEQw==", - "dev": true, + "devOptional": true, "license": "MIT", "dependencies": { "@types/prop-types": "*", @@ -2083,30 +2045,30 @@ } }, "node_modules/@volar/language-core": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.8.tgz", - "integrity": "sha512-K/GxMOXGq997bO00cdFhTNuR85xPxj0BEEAy+BaqqayTmy9Tmhfgmq2wpJcVspRhcwfgPoE2/mEJa26emUhG/g==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@volar/language-core/-/language-core-2.4.10.tgz", + "integrity": "sha512-hG3Z13+nJmGaT+fnQzAkS0hjJRa2FCeqZt6Bd+oGNhUkQ+mTFsDETg5rqUTxyzIh5pSOGY7FHCWUS8G82AzLCA==", "dev": true, "license": "MIT", "dependencies": { - "@volar/source-map": "2.4.8" + "@volar/source-map": "2.4.10" } }, "node_modules/@volar/source-map": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.8.tgz", - "integrity": "sha512-jeWJBkC/WivdelMwxKkpFL811uH/jJ1kVxa+c7OvG48DXc3VrP7pplSWPP2W1dLMqBxD+awRlg55FQQfiup4cA==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@volar/source-map/-/source-map-2.4.10.tgz", + "integrity": "sha512-OCV+b5ihV0RF3A7vEvNyHPi4G4kFa6ukPmyVocmqm5QzOd8r5yAtiNvaPEjl8dNvgC/lj4JPryeeHLdXd62rWA==", "dev": true, "license": "MIT" }, "node_modules/@volar/typescript": { - "version": "2.4.8", - "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.8.tgz", - "integrity": "sha512-6xkIYJ5xxghVBhVywMoPMidDDAFT1OoQeXwa27HSgJ6AiIKRe61RXLoik+14Z7r0JvnblXVsjsRLmCr42SGzqg==", + "version": "2.4.10", + "resolved": "https://registry.npmjs.org/@volar/typescript/-/typescript-2.4.10.tgz", + "integrity": "sha512-F8ZtBMhSXyYKuBfGpYwqA5rsONnOwAVvjyE7KPYJ7wgZqo2roASqNWUnianOomJX5u1cxeRooHV59N0PhvEOgw==", "dev": true, "license": "MIT", "dependencies": { - "@volar/language-core": "2.4.8", + "@volar/language-core": "2.4.10", "path-browserify": "^1.0.1", "vscode-uri": "^3.0.8" } @@ -2389,9 +2351,9 @@ } }, "node_modules/caniuse-lite": { - "version": "1.0.30001677", - "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001677.tgz", - "integrity": "sha512-fmfjsOlJUpMWu+mAAtZZZHz7UEwsUxIIvu1TJfO1HqFQvB/B+ii0xr9B5HpbZY/mC4XZ8SvjHJqtAY6pDPQEog==", + "version": "1.0.30001680", + "resolved": "https://registry.npmjs.org/caniuse-lite/-/caniuse-lite-1.0.30001680.tgz", + "integrity": "sha512-rPQy70G6AGUMnbwS1z6Xg+RkHYPAi18ihs47GH0jcxIG7wArmPgY3XbS2sRdBbxJljp3thdT8BIqv9ccCypiPA==", "dev": true, "funding": [ { @@ -2513,7 +2475,7 @@ "version": "3.1.3", "resolved": "https://registry.npmjs.org/csstype/-/csstype-3.1.3.tgz", "integrity": "sha512-M1uQkMl8rQK/szD0LNhtqxIPLpimGm8sOBwU7lLnCpSbTyY3yeU1Vc7l4KT5zT4s/yOxHH5O7tIuuLOCnLADRw==", - "dev": true, + "devOptional": true, "license": "MIT" }, "node_modules/data-urls": { @@ -2615,9 +2577,9 @@ "license": "ISC" }, "node_modules/electron-to-chromium": { - "version": "1.5.50", - "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.50.tgz", - "integrity": "sha512-eMVObiUQ2LdgeO1F/ySTXsvqvxb6ZH2zPGaMYsWzRDdOddUa77tdmI0ltg+L16UpbWdhPmuF3wIQYyQq65WfZw==", + "version": "1.5.55", + "resolved": "https://registry.npmjs.org/electron-to-chromium/-/electron-to-chromium-1.5.55.tgz", + "integrity": "sha512-6maZ2ASDOTBtjt9FhqYPRnbvKU5tjG0IN9SztUOWYw2AzNDNpKJYLJmlK0/En4Hs/aiWnB+JZ+gW19PIGszgKg==", "dev": true, "license": "ISC" }, @@ -3295,9 +3257,9 @@ "license": "MIT" }, "node_modules/object-inspect": { - "version": "1.13.2", - "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.2.tgz", - "integrity": "sha512-IRZSRuzJiynemAXPYtPe5BoI/RESNYR7TYm50MC5Mqbd3Jmw5y790sErYw3V6SryFJD64b74qQQs9wn5Bg/k3g==", + "version": "1.13.3", + "resolved": "https://registry.npmjs.org/object-inspect/-/object-inspect-1.13.3.tgz", + "integrity": "sha512-kDCGIbxkDSXE3euJZZXzc6to7fCrKHNI/hSRQnRuQ+BWjFNzZwiFF8fj/6o2t2G9/jTj8PSIYTfCLelLZEeRpA==", "license": "MIT", "engines": { "node": ">= 0.4" @@ -3435,9 +3397,9 @@ } }, "node_modules/postcss": { - "version": "8.4.47", - "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.47.tgz", - "integrity": "sha512-56rxCq7G/XfB4EkXq9Egn5GCqugWvDFjafDOThIdMBsI15iqPqR5r15TfSr1YPYeEI19YeaXMCbY6u88Y76GLQ==", + "version": "8.4.48", + "resolved": "https://registry.npmjs.org/postcss/-/postcss-8.4.48.tgz", + "integrity": "sha512-GCRK8F6+Dl7xYniR5a4FYbpBzU8XnZVeowqsQFYdcXuSbChgiks7qybSkbvnaeqv0G0B+dd9/jJgH8kkLDQeEA==", "dev": true, "funding": [ { @@ -3456,7 +3418,7 @@ "license": "MIT", "dependencies": { "nanoid": "^3.3.7", - "picocolors": "^1.1.0", + "picocolors": "^1.1.1", "source-map-js": "^1.2.1" }, "engines": { @@ -3582,9 +3544,9 @@ } }, "node_modules/rollup": { - "version": "4.24.3", - "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.3.tgz", - "integrity": "sha512-HBW896xR5HGmoksbi3JBDtmVzWiPAYqp7wip50hjQ67JbDz61nyoMPdqu1DvVW9asYb2M65Z20ZHsyJCMqMyDg==", + "version": "4.25.0", + "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.25.0.tgz", + "integrity": "sha512-uVbClXmR6wvx5R1M3Od4utyLUxrmOcEm3pAtMphn73Apq19PDtHpgZoEvqH2YnnaNUuvKmg2DgRd2Sqv+odyqg==", "dev": true, "license": "MIT", "dependencies": { @@ -3598,24 +3560,24 @@ "npm": ">=8.0.0" }, "optionalDependencies": { - "@rollup/rollup-android-arm-eabi": "4.24.3", - "@rollup/rollup-android-arm64": "4.24.3", - "@rollup/rollup-darwin-arm64": "4.24.3", - "@rollup/rollup-darwin-x64": "4.24.3", - "@rollup/rollup-freebsd-arm64": "4.24.3", - "@rollup/rollup-freebsd-x64": "4.24.3", - "@rollup/rollup-linux-arm-gnueabihf": "4.24.3", - "@rollup/rollup-linux-arm-musleabihf": "4.24.3", - "@rollup/rollup-linux-arm64-gnu": "4.24.3", - "@rollup/rollup-linux-arm64-musl": "4.24.3", - "@rollup/rollup-linux-powerpc64le-gnu": "4.24.3", - "@rollup/rollup-linux-riscv64-gnu": "4.24.3", - "@rollup/rollup-linux-s390x-gnu": "4.24.3", - "@rollup/rollup-linux-x64-gnu": "4.24.3", - "@rollup/rollup-linux-x64-musl": "4.24.3", - "@rollup/rollup-win32-arm64-msvc": "4.24.3", - "@rollup/rollup-win32-ia32-msvc": "4.24.3", - "@rollup/rollup-win32-x64-msvc": "4.24.3", + "@rollup/rollup-android-arm-eabi": "4.25.0", + "@rollup/rollup-android-arm64": "4.25.0", + "@rollup/rollup-darwin-arm64": "4.25.0", + "@rollup/rollup-darwin-x64": "4.25.0", + "@rollup/rollup-freebsd-arm64": "4.25.0", + "@rollup/rollup-freebsd-x64": "4.25.0", + "@rollup/rollup-linux-arm-gnueabihf": "4.25.0", + "@rollup/rollup-linux-arm-musleabihf": "4.25.0", + "@rollup/rollup-linux-arm64-gnu": "4.25.0", + "@rollup/rollup-linux-arm64-musl": "4.25.0", + "@rollup/rollup-linux-powerpc64le-gnu": "4.25.0", + "@rollup/rollup-linux-riscv64-gnu": "4.25.0", + "@rollup/rollup-linux-s390x-gnu": "4.25.0", + "@rollup/rollup-linux-x64-gnu": "4.25.0", + "@rollup/rollup-linux-x64-musl": "4.25.0", + "@rollup/rollup-win32-arm64-msvc": "4.25.0", + "@rollup/rollup-win32-ia32-msvc": "4.25.0", + "@rollup/rollup-win32-x64-msvc": "4.25.0", "fsevents": "~2.3.2" } }, @@ -3742,9 +3704,9 @@ "license": "MIT" }, "node_modules/std-env": { - "version": "3.7.0", - "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.7.0.tgz", - "integrity": "sha512-JPbdCEQLj1w5GilpiHAx3qJvFndqybBysA3qUOnznweH4QbNYUsW/ea8QzSrnh0vNsezMMw5bcVool8lM0gwzg==", + "version": "3.8.0", + "resolved": "https://registry.npmjs.org/std-env/-/std-env-3.8.0.tgz", + "integrity": "sha512-Bc3YwwCB+OzldMxOXJIIvC6cPRWr/LxOp48CdQTOkPyk/t4JWWJbrilwBd7RJzKV8QW7tJkcgAmeuLLJugl5/w==", "dev": true, "license": "MIT" }, @@ -3858,22 +3820,22 @@ } }, "node_modules/tldts": { - "version": "6.1.58", - "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.58.tgz", - "integrity": "sha512-MQJrJhjHOYGYb8DobR6Y4AdDbd4TYkyQ+KBDVc5ODzs1cbrvPpfN1IemYi9jfipJ/vR1YWvrDli0hg1y19VRoA==", + "version": "6.1.60", + "resolved": "https://registry.npmjs.org/tldts/-/tldts-6.1.60.tgz", + "integrity": "sha512-TYVHm7G9NCnhgqOsFalbX6MG1Po5F4efF+tLfoeiOGQq48Oqgwcgz8upY2R1BHWa4aDrj28RYx0dkYJ63qCFMg==", "dev": true, "license": "MIT", "dependencies": { - "tldts-core": "^6.1.58" + "tldts-core": "^6.1.60" }, "bin": { "tldts": "bin/cli.js" } }, "node_modules/tldts-core": { - "version": "6.1.58", - "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.58.tgz", - "integrity": "sha512-dR936xmhBm7AeqHIhCWwK765gZ7dFyL+IqLSFAjJbFlUXGMLCb8i2PzlzaOuWBuplBTaBYseSb565nk/ZEM0Bg==", + "version": "6.1.60", + "resolved": "https://registry.npmjs.org/tldts-core/-/tldts-core-6.1.60.tgz", + "integrity": "sha512-XHjoxak8SFQnHnmYHb3PcnW5TZ+9ErLZemZei3azuIRhQLw4IExsVbL3VZJdHcLeNaXq6NqawgpDPpjBOg4B5g==", "dev": true, "license": "MIT" }, @@ -4037,9 +3999,9 @@ } }, "node_modules/uuid": { - "version": "11.0.2", - "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.2.tgz", - "integrity": "sha512-14FfcOJmqdjbBPdDjFQyk/SdT4NySW4eM0zcG+HqbHP5jzuH56xO3J1DGhgs/cEMCfwYi3HQI1gnTO62iaG+tQ==", + "version": "11.0.3", + "resolved": "https://registry.npmjs.org/uuid/-/uuid-11.0.3.tgz", + "integrity": "sha512-d0z310fCWv5dJwnX1Y/MncBAqGMKEzlBb1AOf7z9K8ALnd0utBX/msg/fA0+sbyN1ihbMsLhrBlnl1ak7Wa0rg==", "funding": [ "https://github.com/sponsors/broofa", "https://github.com/sponsors/ctavan" @@ -4050,9 +4012,9 @@ } }, "node_modules/vite": { - "version": "5.4.10", - "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.10.tgz", - "integrity": "sha512-1hvaPshuPUtxeQ0hsVH3Mud0ZanOLwVTneA1EgbAM5LhaZEqyPWGRQ7BtaMvUrTDeEaC8pxtj6a6jku3x4z6SQ==", + "version": "5.4.11", + "resolved": "https://registry.npmjs.org/vite/-/vite-5.4.11.tgz", + "integrity": "sha512-c7jFQRklXua0mTzneGW9QVyxFjUgwcihC4bXEtujIo2ouWCe1Ajt/amn2PCxYnhYfd5k09JX3SB7OYWFKYqj8Q==", "dev": true, "license": "MIT", "dependencies": { @@ -4162,9 +4124,9 @@ } }, "node_modules/vite-tsconfig-paths": { - "version": "5.0.1", - "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-5.0.1.tgz", - "integrity": "sha512-yqwv+LstU7NwPeNqajZzLEBVpUFU6Dugtb2P84FXuvaoYA+/70l9MHE+GYfYAycVyPSDYZ7mjOFuYBRqlEpTig==", + "version": "5.1.2", + "resolved": "https://registry.npmjs.org/vite-tsconfig-paths/-/vite-tsconfig-paths-5.1.2.tgz", + "integrity": "sha512-gEIbKfJzSEv0yR3XS2QEocKetONoWkbROj6hGx0FHM18qKUojhvcokQsxQx5nMkelZq2n37zbSGCJn+FSODSjA==", "dev": true, "license": "MIT", "dependencies": { @@ -4377,54 +4339,83 @@ "dev": true, "license": "ISC" }, + "node_modules/zustand": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/zustand/-/zustand-5.0.1.tgz", + "integrity": "sha512-pRET7Lao2z+n5R/HduXMio35TncTlSW68WsYBq2Lg1ASspsNGjpwLAsij3RpouyV6+kHMwwwzP0bZPD70/Jx/w==", + "license": "MIT", + "engines": { + "node": ">=12.20.0" + }, + "peerDependencies": { + "@types/react": ">=18.0.0", + "immer": ">=9.0.6", + "react": ">=18.0.0", + "use-sync-external-store": ">=1.2.0" + }, + "peerDependenciesMeta": { + "@types/react": { + "optional": true + }, + "immer": { + "optional": true + }, + "react": { + "optional": true + }, + "use-sync-external-store": { + "optional": true + } + } + }, "packages/extension-tei": { "name": "@recogito/text-annotator-tei", - "version": "3.0.0-rc.50", + "version": "3.0.0-rc.52", "license": "BSD-3-Clause", "devDependencies": { "CETEIcean": "^1.9.3", "typescript": "5.6.3", - "vite": "^5.4.10", + "vite": "^5.4.11", "vite-plugin-dts": "^4.3.0" }, "peerDependencies": { - "@annotorious/core": "^3.0.11", - "@recogito/text-annotator": "3.0.0-rc.50" + "@annotorious/core": "^3.0.12", + "@recogito/text-annotator": "3.0.0-rc.52" } }, "packages/text-annotator": { "name": "@recogito/text-annotator", - "version": "3.0.0-rc.50", + "version": "3.0.0-rc.52", "license": "BSD-3-Clause", "dependencies": { - "@annotorious/core": "^3.0.11", + "@annotorious/core": "^3.0.12", "colord": "^2.9.3", "dequal": "^2.0.3", "hotkeys-js": "^3.13.7", "nanoevents": "^9.0.0", "rbush": "^4.0.1", - "uuid": "^11.0.2" + "uuid": "^11.0.3" }, "devDependencies": { "@types/jsdom": "^21.1.7", "@types/rbush": "^4.0.0", "jsdom": "^25.0.1", "typescript": "5.6.3", - "vite": "^5.4.10", + "vite": "^5.4.11", "vite-plugin-dts": "^4.3.0", "vitest": "^2.1.4" } }, "packages/text-annotator-react": { "name": "@recogito/react-text-annotator", - "version": "3.0.0-rc.50", + "version": "3.0.0-rc.52", "license": "BSD-3-Clause", "dependencies": { - "@annotorious/core": "^3.0.11", - "@annotorious/react": "^3.0.11", + "@annotorious/core": "^3.0.12", + "@annotorious/react": "^3.0.12", "@floating-ui/react": "^0.26.27", - "@recogito/text-annotator": "3.0.0-rc.50", - "@recogito/text-annotator-tei": "3.0.0-rc.50", + "@recogito/text-annotator": "3.0.0-rc.52", + "@recogito/text-annotator-tei": "3.0.0-rc.52", "CETEIcean": "^1.9.3" }, "devDependencies": { @@ -4433,9 +4424,9 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "typescript": "5.6.3", - "vite": "^5.4.10", + "vite": "^5.4.11", "vite-plugin-dts": "^4.3.0", - "vite-tsconfig-paths": "^5.0.1" + "vite-tsconfig-paths": "^5.1.2" }, "peerDependencies": { "openseadragon": "^3.0.0 || ^4.0.0 || ^5.0.0", diff --git a/package.json b/package.json index 6e786cfe..3fdc7213 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@recogito/text-annotator-monorepo", - "version": "3.0.0-rc.50", + "version": "3.0.0-rc.52", "description": "Recogito Text Annotator monorepo", "author": "Rainer Simon", "repository": { diff --git a/packages/extension-tei/package.json b/packages/extension-tei/package.json index 4c7fb114..81396ee7 100644 --- a/packages/extension-tei/package.json +++ b/packages/extension-tei/package.json @@ -1,6 +1,6 @@ { "name": "@recogito/text-annotator-tei", - "version": "3.0.0-rc.50", + "version": "3.0.0-rc.52", "description": "Recogito Text Annotator TEI extension", "author": "Rainer Simon", "license": "BSD-3-Clause", @@ -28,11 +28,11 @@ "devDependencies": { "CETEIcean": "^1.9.3", "typescript": "5.6.3", - "vite": "^5.4.10", + "vite": "^5.4.11", "vite-plugin-dts": "^4.3.0" }, "peerDependencies": { - "@annotorious/core": "^3.0.11", - "@recogito/text-annotator": "3.0.0-rc.50" + "@annotorious/core": "^3.0.12", + "@recogito/text-annotator": "3.0.0-rc.52" } } \ No newline at end of file diff --git a/packages/text-annotator-react/package.json b/packages/text-annotator-react/package.json index b5973d2c..5d30334f 100644 --- a/packages/text-annotator-react/package.json +++ b/packages/text-annotator-react/package.json @@ -1,6 +1,6 @@ { "name": "@recogito/react-text-annotator", - "version": "3.0.0-rc.50", + "version": "3.0.0-rc.52", "description": "Recogito Text Annotator React bindings", "author": "Rainer Simon", "license": "BSD-3-Clause", @@ -29,9 +29,9 @@ "react": "^18.3.1", "react-dom": "^18.3.1", "typescript": "5.6.3", - "vite": "^5.4.10", + "vite": "^5.4.11", "vite-plugin-dts": "^4.3.0", - "vite-tsconfig-paths": "^5.0.1" + "vite-tsconfig-paths": "^5.1.2" }, "peerDependencies": { "openseadragon": "^3.0.0 || ^4.0.0 || ^5.0.0", @@ -44,11 +44,11 @@ } }, "dependencies": { - "@annotorious/core": "^3.0.11", - "@annotorious/react": "^3.0.11", + "@annotorious/core": "^3.0.12", + "@annotorious/react": "^3.0.12", "@floating-ui/react": "^0.26.27", - "@recogito/text-annotator": "3.0.0-rc.50", - "@recogito/text-annotator-tei": "3.0.0-rc.50", + "@recogito/text-annotator": "3.0.0-rc.52", + "@recogito/text-annotator-tei": "3.0.0-rc.52", "CETEIcean": "^1.9.3" } } \ No newline at end of file diff --git a/packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.css b/packages/text-annotator-react/src/TextAnnotationPopup/TextAnnotationPopup.css similarity index 100% rename from packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.css rename to packages/text-annotator-react/src/TextAnnotationPopup/TextAnnotationPopup.css diff --git a/packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.tsx b/packages/text-annotator-react/src/TextAnnotationPopup/TextAnnotationPopup.tsx similarity index 63% rename from packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.tsx rename to packages/text-annotator-react/src/TextAnnotationPopup/TextAnnotationPopup.tsx index 6d1d0aac..7f62e990 100644 --- a/packages/text-annotator-react/src/TextAnnotatorPopup/TextAnnotatorPopup.tsx +++ b/packages/text-annotator-react/src/TextAnnotationPopup/TextAnnotationPopup.tsx @@ -1,10 +1,13 @@ -import { PointerEvent, ReactNode, useCallback, useEffect, useMemo, useState } from 'react'; +import { ReactNode, useEffect, useMemo, useRef, useState } from 'react'; import { useAnnotator, useSelection } from '@annotorious/react'; -import { isRevived, TextAnnotation, TextAnnotator } from '@recogito/text-annotator'; +import { isRevived, NOT_ANNOTATABLE_CLASS, TextAnnotation, TextAnnotator } from '@recogito/text-annotator'; import { isMobile } from './isMobile'; import { + arrow, autoUpdate, flip, + FloatingArrow, + FloatingArrowProps, FloatingFocusManager, FloatingPortal, inline, @@ -16,12 +19,16 @@ import { useRole } from '@floating-ui/react'; -import './TextAnnotatorPopup.css'; +import './TextAnnotationPopup.css'; interface TextAnnotationPopupProps { ariaCloseWarning?: string; + arrow?: boolean; + + arrowProps?: Omit; + popup(props: TextAnnotationPopupContentProps): ReactNode; } @@ -32,11 +39,11 @@ export interface TextAnnotationPopupContentProps { editable?: boolean; - event?: PointerEvent; + event?: PointerEvent | KeyboardEvent; } -export const TextAnnotatorPopup = (props: TextAnnotationPopupProps) => { +export const TextAnnotationPopup = (props: TextAnnotationPopupProps) => { const r = useAnnotator(); @@ -46,6 +53,22 @@ export const TextAnnotatorPopup = (props: TextAnnotationPopupProps) => { const [isOpen, setOpen] = useState(selected?.length > 0); + const arrowRef = useRef(null); + + // Conditional floating-ui middleware + const middleware = useMemo(() => { + const m = [ + inline(), + offset(10), + flip({ crossAxis: true }), + shift({ crossAxis: true, padding: 10 }) + ]; + + return props.arrow + ? [...m, arrow({ element: arrowRef }) ] + : m; + }, [props.arrow]); + const { refs, floatingStyles, update, context } = useFloating({ placement: isMobile() ? 'bottom' : 'top', open: isOpen, @@ -55,12 +78,7 @@ export const TextAnnotatorPopup = (props: TextAnnotationPopupProps) => { r?.cancelSelected(); } }, - middleware: [ - offset(10), - inline(), - flip(), - shift({ mainAxis: false, crossAxis: true, padding: 10 }) - ], + middleware, whileElementsMounted: autoUpdate }); @@ -106,12 +124,6 @@ export const TextAnnotatorPopup = (props: TextAnnotationPopupProps) => { }; }, [update]); - // Prevent text-annotator from handling the irrelevant events triggered from the popup - const getStopEventsPropagationProps = useCallback( - () => ({ onPointerUp: (event: PointerEvent) => event.stopPropagation() }), - [] - ); - // Don't shift focus to the floating element if selected via keyboard or on mobile. const initialFocus = useMemo(() => { return (event?.type === 'keyup' || event?.type === 'contextmenu' || isMobile()) ? -1 : 0; @@ -128,17 +140,23 @@ export const TextAnnotatorPopup = (props: TextAnnotationPopupProps) => { returnFocus={false} initialFocus={initialFocus}>
+ {...getFloatingProps(getStopEventsPropagationProps())}> {props.popup({ annotation: selected[0].annotation, editable: selected[0].editable, event })} + {props.arrow && ( + + )} + @@ -148,3 +166,25 @@ export const TextAnnotatorPopup = (props: TextAnnotationPopupProps) => { ) : null; } + +/** + * Prevent text-annotator from handling the irrelevant events + * triggered from the popup/toolbar/dialog + */ +const getStopEventsPropagationProps = () => ({ + onPointerUp: (event: React.PointerEvent) => event.stopPropagation(), + onPointerDown: (event: React.PointerEvent) => event.stopPropagation(), + onMouseDown: (event: React.MouseEvent) => event.stopPropagation(), + onMouseUp: (event: React.MouseEvent) => event.stopPropagation() +}); + +/** For backwards compatibility **/ +/** @deprecated Use TextAnnotationPopup instead */ +export const TextAnnotatorPopup = (props: TextAnnotationPopupProps) => { + + useEffect(() => { + console.warn('TextAnnotatorPopup is deprecated and will be removed in a future version. Please use TextAnnotationPopup instead.'); + }, []); + + return ; +}; diff --git a/packages/text-annotator-react/src/TextAnnotationPopup/index.ts b/packages/text-annotator-react/src/TextAnnotationPopup/index.ts new file mode 100644 index 00000000..0f8139ae --- /dev/null +++ b/packages/text-annotator-react/src/TextAnnotationPopup/index.ts @@ -0,0 +1 @@ +export * from './TextAnnotationPopup'; diff --git a/packages/text-annotator-react/src/TextAnnotatorPopup/isMobile.ts b/packages/text-annotator-react/src/TextAnnotationPopup/isMobile.ts similarity index 100% rename from packages/text-annotator-react/src/TextAnnotatorPopup/isMobile.ts rename to packages/text-annotator-react/src/TextAnnotationPopup/isMobile.ts diff --git a/packages/text-annotator-react/src/TextAnnotatorPopup/index.ts b/packages/text-annotator-react/src/TextAnnotatorPopup/index.ts deleted file mode 100644 index 259f9b65..00000000 --- a/packages/text-annotator-react/src/TextAnnotatorPopup/index.ts +++ /dev/null @@ -1 +0,0 @@ -export * from './TextAnnotatorPopup'; diff --git a/packages/text-annotator-react/src/index.ts b/packages/text-annotator-react/src/index.ts index 645d635f..f67af5d3 100644 --- a/packages/text-annotator-react/src/index.ts +++ b/packages/text-annotator-react/src/index.ts @@ -1,6 +1,6 @@ export * from './tei'; export * from './TextAnnotator'; -export * from './TextAnnotatorPopup'; +export * from './TextAnnotationPopup'; export * from './TextAnnotatorPlugin'; // Essential re-exports from @annotorious/core diff --git a/packages/text-annotator-react/test/App.tsx b/packages/text-annotator-react/test/App.tsx index 74849e2c..3e6db393 100644 --- a/packages/text-annotator-react/test/App.tsx +++ b/packages/text-annotator-react/test/App.tsx @@ -1,6 +1,6 @@ import React, { FC, useCallback, useEffect } from 'react'; import { AnnotationBody, Annotorious, useAnnotationStore, useAnnotator } from '@annotorious/react'; -import { TextAnnotationPopupContentProps, TextAnnotator, TextAnnotatorPopup } from '../src'; +import { TextAnnotationPopup, TextAnnotationPopupContentProps, TextAnnotator } from '../src'; import { W3CTextFormat, type TextAnnotation, type TextAnnotator as RecogitoTextAnnotator } from '@recogito/text-annotator'; const TestPopup: FC = (props) => { @@ -67,7 +67,8 @@ export const App: FC = () => { return ( - +

Tell me, O muse, of that ingenious hero who travelled far and wide after he had sacked the famous town of Troy. Many cities did he @@ -189,7 +190,11 @@ export const App: FC = () => {

- () } diff --git a/packages/text-annotator-react/test/index.html b/packages/text-annotator-react/test/index.html index 3f33c769..ba514892 100644 --- a/packages/text-annotator-react/test/index.html +++ b/packages/text-annotator-react/test/index.html @@ -26,6 +26,7 @@ p { font-size: 17px; line-height: 160%; + min-width: 600px; } .r6o-popup { diff --git a/packages/text-annotator/package.json b/packages/text-annotator/package.json index 4da274e1..5df5c890 100644 --- a/packages/text-annotator/package.json +++ b/packages/text-annotator/package.json @@ -1,6 +1,6 @@ { "name": "@recogito/text-annotator", - "version": "3.0.0-rc.50", + "version": "3.0.0-rc.52", "description": "A JavaScript text annotation library", "author": "Rainer Simon", "license": "BSD-3-Clause", @@ -30,17 +30,17 @@ "@types/rbush": "^4.0.0", "jsdom": "^25.0.1", "typescript": "5.6.3", - "vite": "^5.4.10", + "vite": "^5.4.11", "vite-plugin-dts": "^4.3.0", "vitest": "^2.1.4" }, "dependencies": { - "@annotorious/core": "^3.0.11", + "@annotorious/core": "^3.0.12", "colord": "^2.9.3", "dequal": "^2.0.3", "hotkeys-js": "^3.13.7", "nanoevents": "^9.0.0", "rbush": "^4.0.1", - "uuid": "^11.0.2" + "uuid": "^11.0.3" } -} +} \ No newline at end of file diff --git a/packages/text-annotator/src/SelectionHandler.ts b/packages/text-annotator/src/SelectionHandler.ts index 84d45071..626a74a8 100644 --- a/packages/text-annotator/src/SelectionHandler.ts +++ b/packages/text-annotator/src/SelectionHandler.ts @@ -15,6 +15,7 @@ import { trimRangeToContainer, isNotAnnotatable } from './utils'; +import type { TextAnnotatorOptions } from './TextAnnotatorOptions'; const CLICK_TIMEOUT = 300; @@ -30,12 +31,13 @@ const SELECTION_KEYS = [ export const SelectionHandler = ( container: HTMLElement, state: TextAnnotatorState, - annotatingEnabled: boolean, - offsetReferenceSelector?: string + options: TextAnnotatorOptions ) => { let currentUser: User | undefined; + const { annotatingEnabled, offsetReferenceSelector, selectionMode } = options; + const setUser = (user?: User) => currentUser = user; let currentFilter: Filter | undefined; @@ -73,9 +75,12 @@ export const SelectionHandler = ( const onSelectionChange = debounce((evt: Event) => { const sel = document.getSelection(); - // This is to handle cases where the selection is "hijacked" by another element - // in a not-annotatable area. A rare case in theory. But rich text editors - // will like Quill do it... + /** + * This is to handle cases where the selection is "hijacked" + * by another element in a not-annotatable area. + * A rare case in theory. + * But rich text editors will like Quill do it. + */ if (isNotAnnotatable(sel.anchorNode)) { currentTarget = undefined; return; @@ -130,7 +135,6 @@ export const SelectionHandler = ( const hasChanged = annotatableRanges.length !== currentTarget.selector.length || annotatableRanges.some((r, i) => r.toString() !== currentTarget.selector[i]?.quote); - if (!hasChanged) return; currentTarget = { @@ -140,8 +144,8 @@ export const SelectionHandler = ( }; /** - * During mouse selection on the desktop, annotation won't usually exist while the selection is being edited. - * But it will be typical during keyboard or mobile handlebars selection! + * During mouse selection on the desktop, the annotation won't usually exist while the selection is being edited. + * But it'll be typical during selection via the keyboard or mobile's handlebars. */ if (store.getAnnotation(currentTarget.annotation)) { store.updateTarget(currentTarget, Origin.LOCAL); @@ -152,7 +156,7 @@ export const SelectionHandler = ( }); /** - * Select events don't carry information about the mouse button + * Select events don't carry information about the mouse button. * Therefore, to prevent right-click selection, we need to listen * to the initial pointerdown event and remember the button */ @@ -167,20 +171,6 @@ export const SelectionHandler = ( isLeftClick = lastDownEvent.button === 0; }; - // Helper - const upsertCurrentTarget = () => { - const exists = store.getAnnotation(currentTarget.annotation); - if (exists) { - store.updateTarget(currentTarget); - } else { - store.addAnnotation({ - id: currentTarget.annotation, - bodies: [], - target: currentTarget - }); - } - } - const onPointerUp = (evt: PointerEvent) => { if (isNotAnnotatable(evt.target as Node) || !isLeftClick) return; @@ -191,14 +181,20 @@ export const SelectionHandler = ( const hovered = evt.target instanceof Node && container.contains(evt.target) && - store.getAt(evt.clientX - x, evt.clientY - y, currentFilter); + store.getAt(evt.clientX - x, evt.clientY - y, selectionMode === 'all', currentFilter); if (hovered) { const { selected } = selection; - if (selected.length !== 1 || selected[0].id !== hovered.id) { - selection.userSelect(hovered.id, evt); - } + const currentIds = new Set(selected.map(s => s.id)); + const nextIds = Array.isArray(hovered) ? hovered.map(a => a.id) : [hovered.id]; + + const hasChanged = + currentIds.size !== nextIds.length || + !nextIds.every(id => currentIds.has(id)); + + if (hasChanged) + selection.userSelect(nextIds, evt); } else { selection.clear(); } @@ -317,6 +313,29 @@ export const SelectionHandler = ( hotkeys(ARROW_KEYS.join(','), { keydown: true, keyup: false }, handleArrowKeyPress); + // Helper + const upsertCurrentTarget = () => { + const existingAnnotation = store.getAnnotation(currentTarget.annotation); + if (!existingAnnotation) { + store.addAnnotation({ + id: currentTarget.annotation, + bodies: [], + target: currentTarget + }); + return; + } + + const { target: { updated: existingTargetUpdated } } = existingAnnotation; + const { updated: currentTargetUpdated } = currentTarget; + if ( + !existingTargetUpdated || + !currentTargetUpdated || + existingTargetUpdated < currentTargetUpdated + ) { + store.updateTarget(currentTarget); + } + }; + container.addEventListener('pointerdown', onPointerDown); document.addEventListener('pointerup', onPointerUp); document.addEventListener('contextmenu', onContextMenu); diff --git a/packages/text-annotator/src/TextAnnotator.ts b/packages/text-annotator/src/TextAnnotator.ts index a6995347..81a604a5 100644 --- a/packages/text-annotator/src/TextAnnotator.ts +++ b/packages/text-annotator/src/TextAnnotator.ts @@ -76,7 +76,7 @@ export const createTextAnnotator = ( if (opts.style) highlightRenderer.setStyle(opts.style); - const selectionHandler = SelectionHandler(container, state, opts.annotatingEnabled, opts.offsetReferenceSelector); + const selectionHandler = SelectionHandler(container, state, opts); selectionHandler.setUser(currentUser); /*************************/ diff --git a/packages/text-annotator/src/TextAnnotatorOptions.ts b/packages/text-annotator/src/TextAnnotatorOptions.ts index d31eace6..bd9ced93 100644 --- a/packages/text-annotator/src/TextAnnotatorOptions.ts +++ b/packages/text-annotator/src/TextAnnotatorOptions.ts @@ -17,6 +17,8 @@ export interface TextAnnotatorOptions { const {x, y} = container.getBoundingClientRect(); - const hit = store.getAt(event.clientX - x, event.clientY - y, currentFilter); + const hit = store.getAt(event.clientX - x, event.clientY - y, false, currentFilter); if (hit) { if (hover.current !== hit.id) { container.classList.add('hovered'); diff --git a/packages/text-annotator/src/model/w3c/W3CTextFormatAdapter.ts b/packages/text-annotator/src/model/w3c/W3CTextFormatAdapter.ts index 12687bb6..d0ca1f9f 100644 --- a/packages/text-annotator/src/model/w3c/W3CTextFormatAdapter.ts +++ b/packages/text-annotator/src/model/w3c/W3CTextFormatAdapter.ts @@ -38,13 +38,18 @@ const parseW3CTextTargets = (annotation: W3CTextAnnotation) => { } = annotation; const w3cTargets = Array.isArray(target) ? target : [target]; + if (w3cTargets.length === 0) { + return { error: Error(`No targets found for annotation: ${annotation.id}`) }; + } const parsed: TextAnnotationTarget = { creator: parseW3CUser(creator), created: created ? new Date(created) : undefined, updated: modified ? new Date(modified) : undefined, annotation: annotationId, - selector: [] + selector: [], + // @ts-expect-error: `styleClass` is not part of the core `TextAnnotationTarget` type + styleClass: 'styleClass' in w3cTargets[0] ? w3cTargets[0].styleClass : undefined }; for (const w3cTarget of w3cTargets) { @@ -64,12 +69,14 @@ const parseW3CTextTargets = (annotation: W3CTextAnnotation) => { }, {}); if (isTextSelector(selector)) { - parsed.selector.push({ - ...selector, - id: w3cTarget.id, - // @ts-ignore - scope: w3cTarget.scope - }); + parsed.selector.push( + { + ...selector, + id: w3cTarget.id, + // @ts-expect-error: `scope` is not part of the core `TextSelector` type + scope: w3cTarget.scope + } + ); } else { const missingTypes = [ !selector.start ? 'TextPositionSelector' : undefined, @@ -127,7 +134,7 @@ export const serializeW3CTextAnnotation = ( ...targetRest } = target; - const w3cTargets = selector.map((s) => { + const w3cTargets = selector.map((s): W3CTextAnnotationTarget => { const { id, quote, start, end, range } = s; const { prefix, suffix } = getQuoteContext(range, container); @@ -146,10 +153,11 @@ export const serializeW3CTextAnnotation = ( return { ...targetRest, id, + // @ts-expect-error: `scope` is not part of the core `TextSelector` type scope: 'scope' in s ? s.scope : undefined, source, selector: w3cSelectors - } as W3CTextAnnotationTarget; + }; }); diff --git a/packages/text-annotator/src/state/TextAnnotationStore.ts b/packages/text-annotator/src/state/TextAnnotationStore.ts index 19b7423d..7e676273 100644 --- a/packages/text-annotator/src/state/TextAnnotationStore.ts +++ b/packages/text-annotator/src/state/TextAnnotationStore.ts @@ -19,7 +19,9 @@ export interface TextAnnotationStore getAnnotationRects(id: string): DOMRect[]; - getAt(x: number, y: number, filter?: Filter): T | undefined; + getAt(x: number, y: number, all: true, filter?: Filter): T[] | undefined; + getAt(x: number, y: number, all: false, filter?: Filter): T | undefined; + getAt(x: number, y: number, all?: boolean, filter?: Filter): T | T[] | undefined; getIntersecting(minX: number, minY: number, maxX: number, maxY: number): AnnotationRects[]; diff --git a/packages/text-annotator/src/state/TextAnnotatorState.ts b/packages/text-annotator/src/state/TextAnnotatorState.ts index 2756da65..27aef73a 100644 --- a/packages/text-annotator/src/state/TextAnnotatorState.ts +++ b/packages/text-annotator/src/state/TextAnnotatorState.ts @@ -1,4 +1,4 @@ -import type { Filter, Store, ViewportState, UserSelectActionExpression, Annotation } from '@annotorious/core'; +import type { Filter, Store, ViewportState, UserSelectActionExpression } from '@annotorious/core'; import { createHoverState, createSelectionState, @@ -65,19 +65,9 @@ export const createTextAnnotatorState = !isRevived(a.target.selector)); - if (couldNotRevive.length > 0) { - console.warn('Could not revive all targets for these annotations:', couldNotRevive); - - // Note: we want to keep ALL annotations in the store, even those that - // were not revived - even if the highlighter won't be able to render - // the un-revived ones to the screen. - store.bulkAddAnnotation(revived, replace, origin); - - return couldNotRevive; - } else { - store.bulkAddAnnotation(revived, replace, origin); - return []; - } + store.bulkAddAnnotation(revived, replace, origin); + + return couldNotRevive; } const bulkUpsertAnnotations = ( @@ -88,9 +78,7 @@ export const createTextAnnotatorState = !isRevived(a.target.selector)); - if (couldNotRevive.length > 0) - console.warn('Could not revive all targets for these annotations:', couldNotRevive); - + revived.forEach(a => { if (store.getAnnotation(a.id)) store.updateAnnotation(a, origin); @@ -111,10 +99,19 @@ export const createTextAnnotatorState = { - const annotations = tree.getAt(x, y, Boolean(filter)).map(id => store.getAnnotation(id)); + function getAt(x: number, y: number, all: true, filter?: Filter): I[] | undefined; + function getAt(x: number, y: number, all: false, filter?: Filter): I | undefined; + function getAt(x: number, y: number, all?: boolean, filter?: Filter): I | I[] | undefined { + const getAll = all || Boolean(filter); + + const annotations = tree.getAt(x, y, getAll).map(id => store.getAnnotation(id)); + const filtered = filter ? annotations.filter(filter) : annotations; - return filtered.length > 0 ? filtered[0] : undefined; + + if (filtered.length === 0) + return undefined; + + return all ? filtered : filtered[0]; } const getAnnotationBounds = (id: string, x?: number, y?: number, buffer = 5): DOMRect => { diff --git a/packages/text-annotator/test/index.html b/packages/text-annotator/test/index.html index 04aea80b..4f17b699 100644 --- a/packages/text-annotator/test/index.html +++ b/packages/text-annotator/test/index.html @@ -304,6 +304,7 @@

Not annotatable block!

adapter: W3CTextFormat('https://www.gutenberg.org', contentContainer), renderer: 'SPANS', // annotatingEnabled: false, + // selectionMode: 'all', style });