@annotorious/annotorious 3.0.0-rc.18 → 3.0.0-rc.19
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.es.js +50 -50
- package/dist/annotorious.es.js.map +1 -1
- package/dist/annotorious.js +1 -1
- package/dist/annotorious.js.map +1 -1
- package/dist/model/w3c/W3CImageFormatAdapter.d.ts.map +1 -1
- package/package.json +6 -6
- package/src/annotation/tools/polygon/RubberbandPolygon.svelte +2 -0
- package/src/model/w3c/W3CImageFormatAdapter.ts +11 -3
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"W3CImageFormatAdapter.d.ts","sourceRoot":"","sources":["../../../src/model/w3c/W3CImageFormatAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEnF,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAKlE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC;AAEvF,eAAO,MAAM,cAAc,WACjB,MAAM,YACL,OAAO,0BAUjB,CAAA;AAED,eAAO,MAAM,uBAAuB,eACtB,aAAa,YAChB,OAAO,KACf,YAAY,eAAe,CA2C7B,CAAA;AAED,eAAO,MAAM,2BAA2B,eAC1B,eAAe,UACnB,MAAM,KACb,
|
|
1
|
+
{"version":3,"file":"W3CImageFormatAdapter.d.ts","sourceRoot":"","sources":["../../../src/model/w3c/W3CImageFormatAdapter.ts"],"names":[],"mappings":"AAEA,OAAO,KAAK,EAAE,aAAa,EAAE,WAAW,EAAE,aAAa,EAAE,MAAM,mBAAmB,CAAC;AAEnF,OAAO,KAAK,EAAE,eAAe,EAAqB,MAAM,SAAS,CAAC;AAKlE,OAAO,KAAK,EAAE,kBAAkB,EAAE,MAAM,sBAAsB,CAAC;AAE/D,MAAM,MAAM,qBAAqB,GAAG,aAAa,CAAC,eAAe,EAAE,kBAAkB,CAAC,CAAC;AAEvF,eAAO,MAAM,cAAc,WACjB,MAAM,YACL,OAAO,0BAUjB,CAAA;AAED,eAAO,MAAM,uBAAuB,eACtB,aAAa,YAChB,OAAO,KACf,YAAY,eAAe,CA2C7B,CAAA;AAED,eAAO,MAAM,2BAA2B,eAC1B,eAAe,UACnB,MAAM,KACb,kBAsCF,CAAA"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@annotorious/annotorious",
|
|
3
|
-
"version": "3.0.0-rc.
|
|
3
|
+
"version": "3.0.0-rc.19",
|
|
4
4
|
"description": "Add image annotation functionality to any web page with a few lines of JavaScript",
|
|
5
5
|
"author": "Rainer Simon",
|
|
6
6
|
"license": "BSD-3-Clause",
|
|
@@ -39,12 +39,12 @@
|
|
|
39
39
|
"@sveltejs/vite-plugin-svelte": "^3.0.1",
|
|
40
40
|
"@tsconfig/svelte": "^5.0.2",
|
|
41
41
|
"@types/rbush": "^3.0.3",
|
|
42
|
-
"jsdom": "^
|
|
43
|
-
"svelte": "^4.2.
|
|
42
|
+
"jsdom": "^24.0.0",
|
|
43
|
+
"svelte": "^4.2.9",
|
|
44
44
|
"typescript": "^5.3.3",
|
|
45
|
-
"vite": "^5.0.
|
|
46
|
-
"vite-plugin-dts": "^3.7.
|
|
47
|
-
"vitest": "^1.
|
|
45
|
+
"vite": "^5.0.12",
|
|
46
|
+
"vite-plugin-dts": "^3.7.2",
|
|
47
|
+
"vitest": "^1.2.1"
|
|
48
48
|
},
|
|
49
49
|
"peerDependencies": {
|
|
50
50
|
"@annotorious/core": "*"
|
|
@@ -62,7 +62,7 @@ export const parseW3CImageAnnotation = (
|
|
|
62
62
|
created: created ? new Date(created) : undefined,
|
|
63
63
|
creator: parseW3CUser(creator),
|
|
64
64
|
updated: modified ? new Date(modified) : undefined,
|
|
65
|
-
...rest.target,
|
|
65
|
+
...(Array.isArray(rest.target) ? rest.target[0] : rest.target),
|
|
66
66
|
annotation: annotationId,
|
|
67
67
|
selector
|
|
68
68
|
}
|
|
@@ -91,7 +91,7 @@ export const serializeW3CImageAnnotation = (
|
|
|
91
91
|
serializeFragmentSelector(selector.geometry as RectangleGeometry) :
|
|
92
92
|
serializeSVGSelector(selector);
|
|
93
93
|
|
|
94
|
-
|
|
94
|
+
const serialized = {
|
|
95
95
|
...annotation,
|
|
96
96
|
'@context': 'http://www.w3.org/ns/anno.jsonld',
|
|
97
97
|
id: annotation.id,
|
|
@@ -105,5 +105,13 @@ export const serializeW3CImageAnnotation = (
|
|
|
105
105
|
source,
|
|
106
106
|
selector: w3CSelector
|
|
107
107
|
}
|
|
108
|
-
}
|
|
108
|
+
} as W3CImageAnnotation;
|
|
109
|
+
|
|
110
|
+
// Remove core properties that should not appear in the W3C annotation
|
|
111
|
+
delete serialized.bodies;
|
|
112
|
+
|
|
113
|
+
if ('annotation' in serialized.target)
|
|
114
|
+
delete serialized.target.annotation;
|
|
115
|
+
|
|
116
|
+
return serialized;
|
|
109
117
|
}
|