manifesto.js 4.2.21 → 4.2.23

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.
Files changed (194) hide show
  1. package/README.md +4 -3
  2. package/dist-commonjs/AnnotationBody.d.ts +2 -0
  3. package/dist-commonjs/AnnotationBody.js +6 -0
  4. package/dist-commonjs/AnnotationBody.js.map +1 -1
  5. package/dist-commonjs/AnnotationList.js.map +1 -1
  6. package/dist-commonjs/Canvas.d.ts +2 -1
  7. package/dist-commonjs/Canvas.js +24 -6
  8. package/dist-commonjs/Canvas.js.map +1 -1
  9. package/dist-commonjs/Collection.js +8 -1
  10. package/dist-commonjs/Collection.js.map +1 -1
  11. package/dist-commonjs/Duration.js.map +1 -1
  12. package/dist-commonjs/IIIFResource.js +1 -1
  13. package/dist-commonjs/IIIFResource.js.map +1 -1
  14. package/dist-commonjs/Manifest.js +9 -3
  15. package/dist-commonjs/Manifest.js.map +1 -1
  16. package/dist-commonjs/PropertyValue.js.map +1 -1
  17. package/dist-commonjs/Range.js +8 -1
  18. package/dist-commonjs/Range.js.map +1 -1
  19. package/dist-commonjs/Sequence.js +8 -1
  20. package/dist-commonjs/Sequence.js.map +1 -1
  21. package/dist-commonjs/Serialisation.js.map +1 -1
  22. package/dist-commonjs/Utils.d.ts +1 -1
  23. package/dist-commonjs/Utils.js.map +1 -1
  24. package/dist-esmodule/Annotation.js +1 -1
  25. package/dist-esmodule/Annotation.js.map +1 -1
  26. package/dist-esmodule/AnnotationBody.d.ts +2 -0
  27. package/dist-esmodule/AnnotationBody.js +6 -0
  28. package/dist-esmodule/AnnotationBody.js.map +1 -1
  29. package/dist-esmodule/AnnotationList.js +1 -1
  30. package/dist-esmodule/AnnotationList.js.map +1 -1
  31. package/dist-esmodule/Canvas.d.ts +2 -1
  32. package/dist-esmodule/Canvas.js +26 -8
  33. package/dist-esmodule/Canvas.js.map +1 -1
  34. package/dist-esmodule/Collection.js +10 -3
  35. package/dist-esmodule/Collection.js.map +1 -1
  36. package/dist-esmodule/Duration.js.map +1 -1
  37. package/dist-esmodule/IIIFResource.js +3 -3
  38. package/dist-esmodule/IIIFResource.js.map +1 -1
  39. package/dist-esmodule/Manifest.js +11 -5
  40. package/dist-esmodule/Manifest.js.map +1 -1
  41. package/dist-esmodule/ManifestResource.js +2 -2
  42. package/dist-esmodule/ManifestResource.js.map +1 -1
  43. package/dist-esmodule/PropertyValue.js.map +1 -1
  44. package/dist-esmodule/Range.js +10 -3
  45. package/dist-esmodule/Range.js.map +1 -1
  46. package/dist-esmodule/Resource.js +1 -1
  47. package/dist-esmodule/Resource.js.map +1 -1
  48. package/dist-esmodule/Sequence.js +9 -2
  49. package/dist-esmodule/Sequence.js.map +1 -1
  50. package/dist-esmodule/Serialisation.js +1 -1
  51. package/dist-esmodule/Serialisation.js.map +1 -1
  52. package/dist-esmodule/Utils.d.ts +1 -1
  53. package/dist-esmodule/Utils.js +3 -3
  54. package/dist-esmodule/Utils.js.map +1 -1
  55. package/dist-umd/manifesto.js +1 -1
  56. package/dist-var/manifesto.js +1 -1
  57. package/docs/assets/hierarchy.js +1 -0
  58. package/docs/assets/highlight.css +64 -0
  59. package/docs/assets/icons.js +18 -0
  60. package/docs/assets/icons.svg +1 -0
  61. package/docs/assets/main.js +60 -0
  62. package/docs/assets/navigation.js +1 -0
  63. package/docs/assets/search.js +1 -0
  64. package/docs/assets/style.css +1633 -0
  65. package/docs/classes/Annotation.html +29 -0
  66. package/docs/classes/AnnotationBody.html +30 -0
  67. package/docs/classes/AnnotationList.html +13 -0
  68. package/docs/classes/AnnotationPage.html +25 -0
  69. package/docs/classes/Canvas.html +53 -0
  70. package/docs/classes/Collection.html +55 -0
  71. package/docs/classes/Deserialiser.html +10 -0
  72. package/docs/classes/Duration.html +5 -0
  73. package/docs/classes/IIIFResource.html +41 -0
  74. package/docs/classes/JSONLDResource.html +6 -0
  75. package/docs/classes/LabelValuePair.html +12 -0
  76. package/docs/classes/LanguageMap.html +199 -0
  77. package/docs/classes/LocalizedValue.html +21 -0
  78. package/docs/classes/Manifest.html +58 -0
  79. package/docs/classes/ManifestResource.html +24 -0
  80. package/docs/classes/PropertyValue.html +216 -0
  81. package/docs/classes/Range.html +37 -0
  82. package/docs/classes/Rendering.html +25 -0
  83. package/docs/classes/Resource.html +32 -0
  84. package/docs/classes/Sequence.html +48 -0
  85. package/docs/classes/Service.html +32 -0
  86. package/docs/classes/Size.html +4 -0
  87. package/docs/classes/Thumb.html +10 -0
  88. package/docs/classes/Thumbnail.html +32 -0
  89. package/docs/classes/TreeNode.html +14 -0
  90. package/docs/classes/Utils.html +39 -0
  91. package/docs/enums/ManifestType.html +4 -0
  92. package/docs/enums/StatusCode.html +5 -0
  93. package/docs/enums/TreeNodeType.html +4 -0
  94. package/docs/hierarchy.html +1 -0
  95. package/docs/index.html +22 -274
  96. package/docs/interfaces/IAccessToken.html +6 -0
  97. package/docs/interfaces/IExternalImageResourceData.html +8 -0
  98. package/docs/interfaces/IExternalResource.html +22 -0
  99. package/docs/interfaces/IExternalResourceData.html +6 -0
  100. package/docs/interfaces/IExternalResourceOptions.html +2 -0
  101. package/docs/interfaces/IManifestoOptions.html +7 -0
  102. package/docs/modules.html +1 -0
  103. package/docs/variables/loadManifest.html +1 -0
  104. package/docs/variables/parseManifest.html +1 -0
  105. package/eslint.config.cjs +25 -0
  106. package/package.json +24 -20
  107. package/pkg-tests/node-umd.js +3 -0
  108. package/test/fixtures/manifests.js +2 -1
  109. package/test/fixtures/pres3-annotations-embedded.json +66 -0
  110. package/test/index.js +1 -0
  111. package/test/tests/pres3-annotations-embedded.js +55 -0
  112. package/tsconfig.docs.json +13 -0
  113. package/types/index.d.ts +4 -1
  114. package/docs/assets/css/main.css +0 -865
  115. package/docs/assets/css/main.css.map +0 -7
  116. package/docs/assets/images/icons.png +0 -0
  117. package/docs/assets/images/icons@2x.png +0 -0
  118. package/docs/assets/images/widgets.png +0 -0
  119. package/docs/assets/images/widgets@2x.png +0 -0
  120. package/docs/assets/js/main.js +0 -5
  121. package/docs/assets/js/search.js +0 -3
  122. package/docs/classes/_annotation_.annotation.html +0 -809
  123. package/docs/classes/_annotationbody_.annotationbody.html +0 -788
  124. package/docs/classes/_annotationlist_.annotationlist.html +0 -443
  125. package/docs/classes/_annotationpage_.annotationpage.html +0 -719
  126. package/docs/classes/_canvas_.canvas.html +0 -1049
  127. package/docs/classes/_collection_.collection.html +0 -1286
  128. package/docs/classes/_duration_.duration.html +0 -284
  129. package/docs/classes/_iiifresource_.iiifresource.html +0 -995
  130. package/docs/classes/_jsonldresource_.jsonldresource.html +0 -309
  131. package/docs/classes/_labelvaluepair_.labelvaluepair.html +0 -417
  132. package/docs/classes/_language_.language.html +0 -255
  133. package/docs/classes/_languagemap_.languagemap.html +0 -2050
  134. package/docs/classes/_manifest_.manifest.html +0 -1482
  135. package/docs/classes/_manifestresource_.manifestresource.html +0 -710
  136. package/docs/classes/_range_.range.html +0 -1004
  137. package/docs/classes/_rendering_.rendering.html +0 -719
  138. package/docs/classes/_resource_.resource.html +0 -876
  139. package/docs/classes/_sequence_.sequence.html +0 -1308
  140. package/docs/classes/_serialisation_.deserialiser.html +0 -438
  141. package/docs/classes/_service_.service.html +0 -884
  142. package/docs/classes/_size_.size.html +0 -255
  143. package/docs/classes/_thumb_.thumb.html +0 -325
  144. package/docs/classes/_thumbnail_.thumbnail.html +0 -876
  145. package/docs/classes/_treenode_.treenode.html +0 -437
  146. package/docs/classes/_utils_.utils.html +0 -2045
  147. package/docs/enums/_manifesttype_.manifesttype.html +0 -223
  148. package/docs/enums/_statuscode_.statuscode.html +0 -237
  149. package/docs/enums/_treenodetype_.treenodetype.html +0 -223
  150. package/docs/globals.html +0 -300
  151. package/docs/interfaces/_iaccesstoken_.iaccesstoken.html +0 -259
  152. package/docs/interfaces/_iexternalimageresourcedata_.iexternalimageresourcedata.html +0 -282
  153. package/docs/interfaces/_iexternalresource_.iexternalresource.html +0 -518
  154. package/docs/interfaces/_iexternalresourcedata_.iexternalresourcedata.html +0 -250
  155. package/docs/interfaces/_iexternalresourceoptions_.iexternalresourceoptions.html +0 -203
  156. package/docs/interfaces/_imanifestooptions_.imanifestooptions.html +0 -273
  157. package/docs/modules/_annotation_.html +0 -170
  158. package/docs/modules/_annotationbody_.html +0 -170
  159. package/docs/modules/_annotationlist_.html +0 -170
  160. package/docs/modules/_annotationpage_.html +0 -170
  161. package/docs/modules/_canvas_.html +0 -170
  162. package/docs/modules/_collection_.html +0 -170
  163. package/docs/modules/_duration_.html +0 -170
  164. package/docs/modules/_iaccesstoken_.html +0 -170
  165. package/docs/modules/_iexternalimageresourcedata_.html +0 -170
  166. package/docs/modules/_iexternalresource_.html +0 -170
  167. package/docs/modules/_iexternalresourcedata_.html +0 -170
  168. package/docs/modules/_iexternalresourceoptions_.html +0 -170
  169. package/docs/modules/_iiifresource_.html +0 -170
  170. package/docs/modules/_imanifestooptions_.html +0 -170
  171. package/docs/modules/_index_.__global.html +0 -180
  172. package/docs/modules/_index_.__global.manifesto.html +0 -245
  173. package/docs/modules/_index_.html +0 -240
  174. package/docs/modules/_jsonldresource_.html +0 -170
  175. package/docs/modules/_labelvaluepair_.html +0 -170
  176. package/docs/modules/_language_.html +0 -170
  177. package/docs/modules/_languagemap_.html +0 -170
  178. package/docs/modules/_manifest_.html +0 -170
  179. package/docs/modules/_manifestresource_.html +0 -170
  180. package/docs/modules/_manifesttype_.html +0 -170
  181. package/docs/modules/_range_.html +0 -170
  182. package/docs/modules/_rendering_.html +0 -170
  183. package/docs/modules/_resource_.html +0 -170
  184. package/docs/modules/_sequence_.html +0 -170
  185. package/docs/modules/_serialisation_.html +0 -170
  186. package/docs/modules/_service_.html +0 -170
  187. package/docs/modules/_size_.html +0 -170
  188. package/docs/modules/_statuscode_.html +0 -170
  189. package/docs/modules/_thumb_.html +0 -170
  190. package/docs/modules/_thumbnail_.html +0 -170
  191. package/docs/modules/_treenode_.html +0 -170
  192. package/docs/modules/_treenodetype_.html +0 -170
  193. package/docs/modules/_utils_.html +0 -220
  194. package/tslint.json +0 -40
@@ -0,0 +1,25 @@
1
+ // eslint.config.js
2
+ const { defineConfig } = require("eslint/config");
3
+ const tsPlugin = require("@typescript-eslint/eslint-plugin");
4
+ const tsParser = require("@typescript-eslint/parser");
5
+ const prettierConfig = require("eslint-config-prettier");
6
+
7
+ module.exports = defineConfig([
8
+ {
9
+ files: ["**/*.{js,jsx,ts,tsx}"],
10
+ languageOptions: {
11
+ parser: tsParser,
12
+ parserOptions: {
13
+ sourceType: "module",
14
+ },
15
+ },
16
+ plugins: {
17
+ "@typescript-eslint": tsPlugin,
18
+ },
19
+ rules: {
20
+ semi: "error",
21
+ "prefer-const": "error",
22
+ },
23
+ },
24
+ prettierConfig,
25
+ ]);
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "manifesto.js",
3
- "version": "4.2.21",
3
+ "version": "4.2.23",
4
4
  "description": "IIIF Presentation API utility library for client and server",
5
5
  "main": "./dist-commonjs/index.js",
6
6
  "module": "./dist-esmodule/index.js",
@@ -9,14 +9,16 @@
9
9
  "types": "./dist-esmodule/index.d.ts",
10
10
  "scripts": {
11
11
  "build:commonjs": "tsc",
12
- "build:docs": "rimraf -rf docs && typedoc --out docs --name manifesto --theme default --ignoreCompilerErrors --experimentalDecorators --emitDecoratorMetadata --target ES6 --moduleResolution node --preserveConstEnums --stripInternal --suppressExcessPropertyErrors --module commonjs src/ && touch docs/.nojekyll",
12
+ "docs": "rimraf -rf docs && typedoc --tsconfig tsconfig.docs.json --out docs --name manifesto --theme default src/",
13
13
  "build:esmodule": "tsc -m es6 --outDir dist-esmodule",
14
14
  "build:types": "dts-bundle-generator --umd-module-name manifesto -o types/index.d.ts dist-esmodule/index.d.ts",
15
15
  "build:umd": "webpack",
16
16
  "build:var": "cross-env NODE_WEBPACK_LIBRARY_PATH=dist-var NODE_WEBPACK_LIBRARY_TARGET=var webpack",
17
- "build": "npm run lint:all && npm run clean && npm run build:commonjs && npm run build:esmodule && npm run build:umd && npm run build:var && npm run build:types",
17
+ "build": "npm run fix && npm run clean && npm run build:commonjs && npm run build:esmodule && npm run build:umd && npm run build:var && npm run build:types",
18
18
  "clean": "rimraf -rf dist-umd dist-commonjs dist-esmodule dist-var types",
19
- "lint:all": "prettier --write \"./src/**/*.{js,jsx,json,css,ts,tsx}\"",
19
+ "lint": "eslint --fix \"./src/**/*.{js,jsx,json,css,ts,tsx}\"",
20
+ "prettify": "prettier --write \"./src/**/*.{js,jsx,json,css,ts,tsx}\" --ignore-path .prettierignore",
21
+ "fix": "npm run lint && npm run prettify",
20
22
  "prepublishOnly": "npm run build && npm run test",
21
23
  "test": "mocha",
22
24
  "watch": "npm run build:esmodule -- --watch"
@@ -39,29 +41,31 @@
39
41
  },
40
42
  "homepage": "https://github.com/iiif-commons/manifesto",
41
43
  "devDependencies": {
42
- "@types/node": "8.10.52",
43
- "chai": "2.3.0",
44
- "cross-env": "^5.2.1",
44
+ "@types/node": "24.0.10",
45
+ "chai": "5.2.0",
46
+ "cross-env": "^7.0.3",
45
47
  "dts-bundle-generator": "^9.5.1",
46
- "finalhandler": "1.3.1",
48
+ "eslint": "9.27.0",
49
+ "eslint-config-prettier": "10.1.5",
50
+ "eslint-plugin-prettier": "5.4.0",
51
+ "finalhandler": "2.1.0",
47
52
  "http": "0.0.0",
48
- "mocha": "^10.7.3",
49
- "prettier": "^1.19.1",
53
+ "mocha": "^11.7.1",
54
+ "prettier": "^3.6.2",
50
55
  "prettier-check": "^2.0.0",
51
- "rimraf": "^3.0.0",
52
- "serve-static": "^1.14.1",
53
- "ts-loader": "^8",
54
- "tslint-config-prettier": "^1.18.0",
55
- "typedoc": "^0.26.10",
56
+ "rimraf": "^6.0.1",
57
+ "serve-static": "^2.2.0",
58
+ "ts-loader": "^9",
59
+ "typedoc": "^0.28.7",
56
60
  "typescript": "^5",
57
- "typescript-tslint-plugin": "^0.5.5",
58
- "webpack": "^4.28.3",
59
- "webpack-cli": "^3.1.2",
60
- "yargs": "3.10.0"
61
+ "typescript-eslint": "8.32.1",
62
+ "webpack": "^5.99.9",
63
+ "webpack-cli": "^6.0.1",
64
+ "yargs": "18.0.0"
61
65
  },
62
66
  "dependencies": {
63
67
  "@edsilv/http-status-codes": "^1.0.3",
64
- "@iiif/vocabulary": "^1.0.26",
68
+ "@iiif/vocabulary": "^1.0.28",
65
69
  "isomorphic-unfetch": "^3.0.0",
66
70
  "lodash": "^4.17.21"
67
71
  },
@@ -1,6 +1,9 @@
1
1
  // @todo works, but with these specific workarounds.
2
2
  globalThis.window = globalThis.window || {};
3
3
  globalThis.fetch = require('node-fetch');
4
+ if (typeof self === 'undefined') {
5
+ global.self = global;
6
+ }
4
7
 
5
8
  const Manifesto = require('../dist-umd/manifesto');
6
9
 
@@ -61,7 +61,8 @@ module.exports = {
61
61
  "riksmuseumimageapiv3thumbnails": "http://localhost:3001/riksmuseum-image-api-v3-thumbnails.json",
62
62
  //"query-bodleian": "http://iiif.bodleian.ox.ac.uk/iiif/manifest/f22e9dae-c070-48eb-be0b-aa6c5bc195a6.json",
63
63
  //"query-gams": "http://gams.uni-graz.at/cocoon/mets2json?source=http%3A%2F%2Fgams.uni-graz.at%2Farchive%2Fget%2Fo%3Asrbas.1535%2FMETS_SOURCE",
64
- "v3ProviderNoLogo": "http://localhost:3001/YaleCanterburyTalesV3ProviderNoLogo.json"
64
+ "v3ProviderNoLogo": "http://localhost:3001/YaleCanterburyTalesV3ProviderNoLogo.json",
65
+ "pres3AnnotationsEmbedded": "http://localhost:3001/pres3-annotations-embedded.json"
65
66
  };
66
67
 
67
68
  //BBoM: http://wellcomelibrary.org/iiif/b18031511/manifest
@@ -0,0 +1,66 @@
1
+ {
2
+ "@context": "http://iiif.io/api/presentation/3/context.json",
3
+ "id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/manifest.json",
4
+ "type": "Manifest",
5
+ "label": {
6
+ "en": [
7
+ "Picture of Göttingen taken during the 2019 IIIF Conference"
8
+ ]
9
+ },
10
+ "items": [
11
+ {
12
+ "id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1",
13
+ "type": "Canvas",
14
+ "height": 3024,
15
+ "width": 4032,
16
+ "items": [
17
+ {
18
+ "id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1/annopage-1",
19
+ "type": "AnnotationPage",
20
+ "items": [
21
+ {
22
+ "id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1/annopage-1/anno-1",
23
+ "type": "Annotation",
24
+ "motivation": "painting",
25
+ "body": {
26
+ "id": "https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-gottingen/full/max/0/default.jpg",
27
+ "type": "Image",
28
+ "format": "image/jpeg",
29
+ "height": 3024,
30
+ "width": 4032,
31
+ "service": [
32
+ {
33
+ "id": "https://iiif.io/api/image/3.0/example/reference/918ecd18c2592080851777620de9bcb5-gottingen",
34
+ "profile": "level1",
35
+ "type": "ImageService3"
36
+ }
37
+ ]
38
+ },
39
+ "target": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1"
40
+ }
41
+ ]
42
+ }
43
+ ],
44
+ "annotations": [
45
+ {
46
+ "id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1/annopage-2",
47
+ "type": "AnnotationPage",
48
+ "items": [
49
+ {
50
+ "id": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1/annopage-2/anno-1",
51
+ "type": "Annotation",
52
+ "motivation": "commenting",
53
+ "body": {
54
+ "type": "TextualBody",
55
+ "language": "de",
56
+ "format": "text/plain",
57
+ "value": "Göttinger Marktplatz mit Gänseliesel Brunnen"
58
+ },
59
+ "target": "https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1"
60
+ }
61
+ ]
62
+ }
63
+ ]
64
+ }
65
+ ]
66
+ }
package/test/index.js CHANGED
@@ -94,3 +94,4 @@ importTest('translations', './tests/translations');
94
94
  importTest('witnesstopeter', './tests/witnesstopeter');
95
95
  importTest('Utils', './tests/Utils.test');
96
96
  importTest('v3ProviderNoLogo', './tests/v3ProviderNoLogo');
97
+ importTest('pres3AnnotationsEmbedded', './tests/pres3-annotations-embedded');
@@ -0,0 +1,55 @@
1
+ var expect = require('chai').expect;
2
+ var should = require('chai').should();
3
+ var manifesto = require('../../dist-commonjs/');
4
+ var manifests = require('../fixtures/manifests');
5
+ var manifest, canvas, annotationPages, annotations, annotation, body
6
+
7
+ describe('#getAnnotations', function() {
8
+ it('manifest loads successfully', function (done) {
9
+ manifesto.loadManifest(manifests.pres3AnnotationsEmbedded).then(function(data) {
10
+ manifest = manifesto.parseManifest(data);
11
+ done();
12
+ });
13
+ });
14
+
15
+ it('has a sequence', function() {
16
+ sequence = manifest.getSequenceByIndex(0);
17
+ expect(sequence).to.exist;
18
+ });
19
+
20
+ it('has a canvas', function() {
21
+ canvas = sequence.getCanvases()[0];
22
+ expect(canvas).to.exist;
23
+ });
24
+
25
+ it('has annotation pages', function () {
26
+ annotationPages = canvas.getAnnotations();
27
+ expect(annotationPages).to.be.an('array');
28
+ expect(annotationPages).to.have.lengthOf(1);
29
+ });
30
+
31
+ it('annotation page has correct id', function () {
32
+ expect(annotationPages[0].id).to.equal('https://iiif.io/api/cookbook/recipe/0266-full-canvas-annotation/canvas-1/annopage-2');
33
+ });
34
+
35
+ it('annotation page contains annotations', function () {
36
+ annotations = annotationPages[0].getItems();
37
+ expect(annotations).to.be.an('array');
38
+ expect(annotations).to.have.lengthOf(1);
39
+ });
40
+
41
+ it('annotation has commenting motivation', function () {
42
+ annotations = annotationPages[0].getItems();
43
+ annotation = new manifesto.Annotation(annotations[0]);
44
+ expect(annotation.getMotivation()).to.equal('commenting');
45
+ });
46
+
47
+ it('annotation body has value', function () {
48
+ body = annotation.getBody()[0];
49
+ expect(body.getValue()).to.equal('Göttinger Marktplatz mit Gänseliesel Brunnen');
50
+ });
51
+
52
+ it('annotation body has language', function () {
53
+ expect(body.getLanguage()).to.equal('de');
54
+ });
55
+ });
@@ -0,0 +1,13 @@
1
+ {
2
+ "extends": "./tsconfig.json",
3
+ "compilerOptions": {
4
+ "target": "ES5",
5
+ "module": "commonjs",
6
+ "moduleResolution": "node",
7
+ "experimentalDecorators": true,
8
+ "emitDecoratorMetadata": true,
9
+ "preserveConstEnums": true,
10
+ "stripInternal": true
11
+ },
12
+ "include": ["src/**/*"]
13
+ }
package/types/index.d.ts CHANGED
@@ -80,6 +80,8 @@ export declare class AnnotationBody extends ManifestResource {
80
80
  constructor(jsonld?: any, options?: IManifestoOptions);
81
81
  getFormat(): MediaType | null;
82
82
  getType(): ExternalResourceType | null;
83
+ getValue(): string | null;
84
+ getLanguage(): string | null;
83
85
  getWidth(): number;
84
86
  getHeight(): number;
85
87
  }
@@ -103,6 +105,7 @@ export declare class Canvas extends Resource {
103
105
  getCanonicalImageUri(w?: number): string;
104
106
  getMaxDimensions(): Size | null;
105
107
  getContent(): Annotation[];
108
+ getAnnotations(): AnnotationPage[];
106
109
  getDuration(): number | null;
107
110
  getImages(): Annotation[];
108
111
  getIndex(): number;
@@ -477,7 +480,7 @@ export declare class Utils {
477
480
  * @example Utils.traverseAndFind({foo: 'bar'}, 'foo', 'bar')
478
481
  */
479
482
  static traverseAndFind(object: any, k: string, v: string): object | undefined;
480
- static getServices(resource: any, { onlyService, onlyServices, skipParentResources }?: {
483
+ static getServices(resource: any, { onlyService, onlyServices, skipParentResources, }?: {
481
484
  onlyServices?: boolean;
482
485
  skipParentResources?: boolean;
483
486
  onlyService?: boolean;