@annotorious/annotorious
Advanced tools
Comparing version 3.0.0-rc.18 to 3.0.0-rc.19
{ | ||
"name": "@annotorious/annotorious", | ||
"version": "3.0.0-rc.18", | ||
"version": "3.0.0-rc.19", | ||
"description": "Add image annotation functionality to any web page with a few lines of JavaScript", | ||
@@ -42,8 +42,8 @@ "author": "Rainer Simon", | ||
"@types/rbush": "^3.0.3", | ||
"jsdom": "^23.0.1", | ||
"svelte": "^4.2.8", | ||
"jsdom": "^24.0.0", | ||
"svelte": "^4.2.9", | ||
"typescript": "^5.3.3", | ||
"vite": "^5.0.10", | ||
"vite-plugin-dts": "^3.7.0", | ||
"vitest": "^1.1.1" | ||
"vite": "^5.0.12", | ||
"vite-plugin-dts": "^3.7.2", | ||
"vitest": "^1.2.1" | ||
}, | ||
@@ -50,0 +50,0 @@ "peerDependencies": { |
@@ -65,3 +65,3 @@ import { v4 as uuidv4 } from 'uuid'; | ||
updated: modified ? new Date(modified) : undefined, | ||
...rest.target, | ||
...(Array.isArray(rest.target) ? rest.target[0] : rest.target), | ||
annotation: annotationId, | ||
@@ -95,3 +95,3 @@ selector | ||
return { | ||
const serialized = { | ||
...annotation, | ||
@@ -110,3 +110,11 @@ '@context': 'http://www.w3.org/ns/anno.jsonld', | ||
} | ||
} | ||
} as W3CImageAnnotation; | ||
// Remove core properties that should not appear in the W3C annotation | ||
delete serialized.bodies; | ||
if ('annotation' in serialized.target) | ||
delete serialized.target.annotation; | ||
return serialized; | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
884040
5988