manifesto.js 4.2.3 → 4.2.7
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-commonjs/Annotation.d.ts +10 -10
- package/dist-commonjs/Annotation.js +74 -74
- package/dist-commonjs/AnnotationBody.d.ts +9 -9
- package/dist-commonjs/AnnotationBody.js +44 -44
- package/dist-commonjs/AnnotationList.d.ts +12 -12
- package/dist-commonjs/AnnotationList.js +61 -61
- package/dist-commonjs/AnnotationPage.d.ts +5 -5
- package/dist-commonjs/AnnotationPage.js +27 -27
- package/dist-commonjs/Canvas.d.ts +31 -31
- package/dist-commonjs/Canvas.js +304 -302
- package/dist-commonjs/Canvas.js.map +1 -1
- package/dist-commonjs/Collection.d.ts +28 -28
- package/dist-commonjs/Collection.js +156 -156
- package/dist-commonjs/Duration.d.ts +6 -6
- package/dist-commonjs/Duration.js +13 -13
- package/dist-commonjs/IAccessToken.d.ts +7 -7
- package/dist-commonjs/IAccessToken.js +2 -2
- package/dist-commonjs/IExternalImageResourceData.d.ts +5 -5
- package/dist-commonjs/IExternalImageResourceData.js +2 -2
- package/dist-commonjs/IExternalResource.d.ts +24 -24
- package/dist-commonjs/IExternalResource.js +2 -2
- package/dist-commonjs/IExternalResourceData.d.ts +6 -6
- package/dist-commonjs/IExternalResourceData.js +2 -2
- package/dist-commonjs/IExternalResourceOptions.d.ts +3 -3
- package/dist-commonjs/IExternalResourceOptions.js +2 -2
- package/dist-commonjs/IIIFResource.d.ts +28 -28
- package/dist-commonjs/IIIFResource.js +167 -155
- package/dist-commonjs/IIIFResource.js.map +1 -1
- package/dist-commonjs/IManifestoOptions.d.ts +9 -9
- package/dist-commonjs/IManifestoOptions.js +2 -2
- package/dist-commonjs/JSONLDResource.d.ts +7 -7
- package/dist-commonjs/JSONLDResource.js +22 -22
- package/dist-commonjs/LabelValuePair.d.ts +14 -14
- package/dist-commonjs/LabelValuePair.js +56 -56
- package/dist-commonjs/Language.d.ts +5 -5
- package/dist-commonjs/Language.js +2 -2
- package/dist-commonjs/LanguageMap.d.ts +8 -8
- package/dist-commonjs/LanguageMap.js +32 -32
- package/dist-commonjs/Manifest.d.ts +29 -27
- package/dist-commonjs/Manifest.js +259 -251
- package/dist-commonjs/Manifest.js.map +1 -1
- package/dist-commonjs/ManifestResource.d.ts +23 -22
- package/dist-commonjs/ManifestResource.js +129 -120
- package/dist-commonjs/ManifestResource.js.map +1 -1
- package/dist-commonjs/ManifestType.d.ts +5 -5
- package/dist-commonjs/ManifestType.js +8 -8
- package/dist-commonjs/PropertyValue.d.ts +58 -58
- package/dist-commonjs/PropertyValue.js +285 -285
- package/dist-commonjs/Range.d.ts +20 -20
- package/dist-commonjs/Range.js +197 -197
- package/dist-commonjs/Rendering.d.ts +6 -6
- package/dist-commonjs/Rendering.js +27 -27
- package/dist-commonjs/Resource.d.ts +13 -13
- package/dist-commonjs/Resource.js +67 -67
- package/dist-commonjs/Sequence.d.ts +30 -30
- package/dist-commonjs/Sequence.js +266 -266
- package/dist-commonjs/Serialisation.d.ts +11 -11
- package/dist-commonjs/Serialisation.js +155 -155
- package/dist-commonjs/Service.d.ts +13 -13
- package/dist-commonjs/Service.js +60 -60
- package/dist-commonjs/Size.d.ts +5 -5
- package/dist-commonjs/Size.js +10 -10
- package/dist-commonjs/StatusCode.d.ts +6 -6
- package/dist-commonjs/StatusCode.js +9 -9
- package/dist-commonjs/Thumb.d.ts +11 -11
- package/dist-commonjs/Thumb.js +22 -22
- package/dist-commonjs/Thumbnail.d.ts +4 -4
- package/dist-commonjs/Thumbnail.js +24 -24
- package/dist-commonjs/TreeNode.d.ts +15 -15
- package/dist-commonjs/TreeNode.js +25 -25
- package/dist-commonjs/TreeNodeType.d.ts +5 -5
- package/dist-commonjs/TreeNodeType.js +8 -8
- package/dist-commonjs/Utils.d.ts +42 -42
- package/dist-commonjs/Utils.js +736 -729
- package/dist-commonjs/Utils.js.map +1 -1
- package/dist-commonjs/index.d.ts +5 -5
- package/dist-commonjs/index.js +13 -13
- package/dist-commonjs/internal.d.ts +35 -35
- package/dist-commonjs/internal.js +33 -33
- package/dist-esmodule/Annotation.d.ts +10 -10
- package/dist-esmodule/Annotation.js +72 -72
- package/dist-esmodule/AnnotationBody.d.ts +9 -9
- package/dist-esmodule/AnnotationBody.js +42 -42
- package/dist-esmodule/AnnotationList.d.ts +12 -12
- package/dist-esmodule/AnnotationList.js +59 -59
- package/dist-esmodule/AnnotationPage.d.ts +5 -5
- package/dist-esmodule/AnnotationPage.js +25 -25
- package/dist-esmodule/Canvas.d.ts +31 -31
- package/dist-esmodule/Canvas.js +302 -300
- package/dist-esmodule/Canvas.js.map +1 -1
- package/dist-esmodule/Collection.d.ts +28 -28
- package/dist-esmodule/Collection.js +154 -154
- package/dist-esmodule/Duration.d.ts +6 -6
- package/dist-esmodule/Duration.js +11 -11
- package/dist-esmodule/IAccessToken.d.ts +7 -7
- package/dist-esmodule/IExternalImageResourceData.d.ts +5 -5
- package/dist-esmodule/IExternalResource.d.ts +24 -24
- package/dist-esmodule/IExternalResourceData.d.ts +6 -6
- package/dist-esmodule/IExternalResourceOptions.d.ts +3 -3
- package/dist-esmodule/IIIFResource.d.ts +28 -28
- package/dist-esmodule/IIIFResource.js +165 -153
- package/dist-esmodule/IIIFResource.js.map +1 -1
- package/dist-esmodule/IManifestoOptions.d.ts +9 -9
- package/dist-esmodule/JSONLDResource.d.ts +7 -7
- package/dist-esmodule/JSONLDResource.js +20 -20
- package/dist-esmodule/LabelValuePair.d.ts +14 -14
- package/dist-esmodule/LabelValuePair.js +54 -54
- package/dist-esmodule/Language.d.ts +5 -5
- package/dist-esmodule/LanguageMap.d.ts +8 -8
- package/dist-esmodule/LanguageMap.js +30 -30
- package/dist-esmodule/Manifest.d.ts +29 -27
- package/dist-esmodule/Manifest.js +257 -249
- package/dist-esmodule/Manifest.js.map +1 -1
- package/dist-esmodule/ManifestResource.d.ts +23 -22
- package/dist-esmodule/ManifestResource.js +127 -118
- package/dist-esmodule/ManifestResource.js.map +1 -1
- package/dist-esmodule/ManifestType.d.ts +5 -5
- package/dist-esmodule/ManifestType.js +6 -6
- package/dist-esmodule/PropertyValue.d.ts +58 -58
- package/dist-esmodule/PropertyValue.js +283 -283
- package/dist-esmodule/Range.d.ts +20 -20
- package/dist-esmodule/Range.js +195 -195
- package/dist-esmodule/Rendering.d.ts +6 -6
- package/dist-esmodule/Rendering.js +25 -25
- package/dist-esmodule/Resource.d.ts +13 -13
- package/dist-esmodule/Resource.js +65 -65
- package/dist-esmodule/Sequence.d.ts +30 -30
- package/dist-esmodule/Sequence.js +264 -264
- package/dist-esmodule/Serialisation.d.ts +11 -11
- package/dist-esmodule/Serialisation.js +153 -153
- package/dist-esmodule/Service.d.ts +13 -13
- package/dist-esmodule/Service.js +58 -58
- package/dist-esmodule/Size.d.ts +5 -5
- package/dist-esmodule/Size.js +8 -8
- package/dist-esmodule/StatusCode.d.ts +6 -6
- package/dist-esmodule/StatusCode.js +7 -7
- package/dist-esmodule/Thumb.d.ts +11 -11
- package/dist-esmodule/Thumb.js +20 -20
- package/dist-esmodule/Thumbnail.d.ts +4 -4
- package/dist-esmodule/Thumbnail.js +22 -22
- package/dist-esmodule/TreeNode.d.ts +15 -15
- package/dist-esmodule/TreeNode.js +23 -23
- package/dist-esmodule/TreeNodeType.d.ts +5 -5
- package/dist-esmodule/TreeNodeType.js +6 -6
- package/dist-esmodule/Utils.d.ts +42 -42
- package/dist-esmodule/Utils.js +734 -727
- package/dist-esmodule/Utils.js.map +1 -1
- package/dist-esmodule/index.d.ts +5 -5
- package/dist-esmodule/index.js +8 -8
- package/dist-esmodule/internal.d.ts +35 -35
- package/dist-esmodule/internal.js +28 -28
- package/dist-umd/manifesto.js +1 -1
- package/dist-var/manifesto.js +1 -1
- package/package.json +1 -1
- package/pkg-tests/README.md +9 -0
- package/pkg-tests/index.esm.html +29 -0
- package/pkg-tests/index.umd.html +16 -0
- package/pkg-tests/node-load.js +8 -0
- package/pkg-tests/node-load.mjs +4 -0
- package/pkg-tests/node-umd.js +8 -0
- package/test/fixtures/RHUL.json +433 -0
- package/test/fixtures/manifests.js +1 -0
- package/test/index.js +3 -0
- package/test/tests/get-range-by-id.js +22 -0
- package/test/tests/rhul.js +18 -0
- package/types/index.d.ts +466 -463
- package/coverage/coverage-final.json +0 -2
- package/coverage/lcov-report/base.css +0 -182
- package/coverage/lcov-report/index.html +0 -60
- package/coverage/lcov-report/prettify.css +0 -1
- package/coverage/lcov-report/prettify.js +0 -1
- package/coverage/lcov-report/sort-arrow-sprite.png +0 -0
- package/coverage/lcov-report/sorter.js +0 -156
- package/coverage/lcov.info +0 -0
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
import { AnnotationMotivation } from "@iiif/vocabulary/dist-commonjs";
|
|
2
|
-
import { AnnotationBody, IManifestoOptions, ManifestResource, Resource } from "./internal";
|
|
3
|
-
export declare class Annotation extends ManifestResource {
|
|
4
|
-
constructor(jsonld: any, options: IManifestoOptions);
|
|
5
|
-
getBody(): AnnotationBody[];
|
|
6
|
-
getMotivation(): AnnotationMotivation | null;
|
|
7
|
-
getOn(): string;
|
|
8
|
-
getTarget(): string | null;
|
|
9
|
-
getResource(): Resource;
|
|
10
|
-
}
|
|
1
|
+
import { AnnotationMotivation } from "@iiif/vocabulary/dist-commonjs";
|
|
2
|
+
import { AnnotationBody, IManifestoOptions, ManifestResource, Resource } from "./internal";
|
|
3
|
+
export declare class Annotation extends ManifestResource {
|
|
4
|
+
constructor(jsonld: any, options: IManifestoOptions);
|
|
5
|
+
getBody(): AnnotationBody[];
|
|
6
|
+
getMotivation(): AnnotationMotivation | null;
|
|
7
|
+
getOn(): string;
|
|
8
|
+
getTarget(): string | null;
|
|
9
|
+
getResource(): Resource;
|
|
10
|
+
}
|
|
@@ -1,75 +1,75 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
var internal_1 = require("./internal");
|
|
17
|
-
var Annotation = /** @class */ (function (_super) {
|
|
18
|
-
__extends(Annotation, _super);
|
|
19
|
-
function Annotation(jsonld, options) {
|
|
20
|
-
return _super.call(this, jsonld, options) || this;
|
|
21
|
-
}
|
|
22
|
-
Annotation.prototype.getBody = function () {
|
|
23
|
-
var bodies = [];
|
|
24
|
-
var body = this.getProperty("body");
|
|
25
|
-
// todo: make this a generic "property that can be an object or array enumerator" util
|
|
26
|
-
if (body) {
|
|
27
|
-
if (Array.isArray(body)) {
|
|
28
|
-
for (var i = 0; i < body.length; i++) {
|
|
29
|
-
var b = body[i];
|
|
30
|
-
if (b.items) {
|
|
31
|
-
for (var i_1 = 0; i_1 < b.items.length; i_1++) {
|
|
32
|
-
// todo: don't ignore that it's a choice. maybe add isChoice() to IAnnotationBody?
|
|
33
|
-
var c = b.items[i_1];
|
|
34
|
-
bodies.push(new internal_1.AnnotationBody(c, this.options));
|
|
35
|
-
}
|
|
36
|
-
}
|
|
37
|
-
else {
|
|
38
|
-
bodies.push(new internal_1.AnnotationBody(b, this.options));
|
|
39
|
-
}
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
else if (body.items) {
|
|
43
|
-
for (var i = 0; i < body.items.length; i++) {
|
|
44
|
-
var b = body.items[i];
|
|
45
|
-
bodies.push(new internal_1.AnnotationBody(b, this.options));
|
|
46
|
-
}
|
|
47
|
-
}
|
|
48
|
-
else {
|
|
49
|
-
bodies.push(new internal_1.AnnotationBody(body, this.options));
|
|
50
|
-
}
|
|
51
|
-
}
|
|
52
|
-
return bodies;
|
|
53
|
-
};
|
|
54
|
-
Annotation.prototype.getMotivation = function () {
|
|
55
|
-
var motivation = this.getProperty("motivation");
|
|
56
|
-
if (motivation) {
|
|
57
|
-
//const key: string | undefined = Object.keys(AnnotationMotivationEnum).find(k => AnnotationMotivationEnum[k] === motivation);
|
|
58
|
-
return motivation;
|
|
59
|
-
}
|
|
60
|
-
return null;
|
|
61
|
-
};
|
|
62
|
-
// open annotation
|
|
63
|
-
Annotation.prototype.getOn = function () {
|
|
64
|
-
return this.getProperty("on");
|
|
65
|
-
};
|
|
66
|
-
Annotation.prototype.getTarget = function () {
|
|
67
|
-
return this.getProperty("target");
|
|
68
|
-
};
|
|
69
|
-
Annotation.prototype.getResource = function () {
|
|
70
|
-
return new internal_1.Resource(this.getProperty("resource"), this.options);
|
|
71
|
-
};
|
|
72
|
-
return Annotation;
|
|
73
|
-
}(internal_1.ManifestResource));
|
|
74
|
-
exports.Annotation = Annotation;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
var internal_1 = require("./internal");
|
|
17
|
+
var Annotation = /** @class */ (function (_super) {
|
|
18
|
+
__extends(Annotation, _super);
|
|
19
|
+
function Annotation(jsonld, options) {
|
|
20
|
+
return _super.call(this, jsonld, options) || this;
|
|
21
|
+
}
|
|
22
|
+
Annotation.prototype.getBody = function () {
|
|
23
|
+
var bodies = [];
|
|
24
|
+
var body = this.getProperty("body");
|
|
25
|
+
// todo: make this a generic "property that can be an object or array enumerator" util
|
|
26
|
+
if (body) {
|
|
27
|
+
if (Array.isArray(body)) {
|
|
28
|
+
for (var i = 0; i < body.length; i++) {
|
|
29
|
+
var b = body[i];
|
|
30
|
+
if (b.items) {
|
|
31
|
+
for (var i_1 = 0; i_1 < b.items.length; i_1++) {
|
|
32
|
+
// todo: don't ignore that it's a choice. maybe add isChoice() to IAnnotationBody?
|
|
33
|
+
var c = b.items[i_1];
|
|
34
|
+
bodies.push(new internal_1.AnnotationBody(c, this.options));
|
|
35
|
+
}
|
|
36
|
+
}
|
|
37
|
+
else {
|
|
38
|
+
bodies.push(new internal_1.AnnotationBody(b, this.options));
|
|
39
|
+
}
|
|
40
|
+
}
|
|
41
|
+
}
|
|
42
|
+
else if (body.items) {
|
|
43
|
+
for (var i = 0; i < body.items.length; i++) {
|
|
44
|
+
var b = body.items[i];
|
|
45
|
+
bodies.push(new internal_1.AnnotationBody(b, this.options));
|
|
46
|
+
}
|
|
47
|
+
}
|
|
48
|
+
else {
|
|
49
|
+
bodies.push(new internal_1.AnnotationBody(body, this.options));
|
|
50
|
+
}
|
|
51
|
+
}
|
|
52
|
+
return bodies;
|
|
53
|
+
};
|
|
54
|
+
Annotation.prototype.getMotivation = function () {
|
|
55
|
+
var motivation = this.getProperty("motivation");
|
|
56
|
+
if (motivation) {
|
|
57
|
+
//const key: string | undefined = Object.keys(AnnotationMotivationEnum).find(k => AnnotationMotivationEnum[k] === motivation);
|
|
58
|
+
return motivation;
|
|
59
|
+
}
|
|
60
|
+
return null;
|
|
61
|
+
};
|
|
62
|
+
// open annotation
|
|
63
|
+
Annotation.prototype.getOn = function () {
|
|
64
|
+
return this.getProperty("on");
|
|
65
|
+
};
|
|
66
|
+
Annotation.prototype.getTarget = function () {
|
|
67
|
+
return this.getProperty("target");
|
|
68
|
+
};
|
|
69
|
+
Annotation.prototype.getResource = function () {
|
|
70
|
+
return new internal_1.Resource(this.getProperty("resource"), this.options);
|
|
71
|
+
};
|
|
72
|
+
return Annotation;
|
|
73
|
+
}(internal_1.ManifestResource));
|
|
74
|
+
exports.Annotation = Annotation;
|
|
75
75
|
//# sourceMappingURL=Annotation.js.map
|
|
@@ -1,9 +1,9 @@
|
|
|
1
|
-
import { ExternalResourceType, MediaType } from "@iiif/vocabulary/dist-commonjs";
|
|
2
|
-
import { IManifestoOptions, ManifestResource } from "./internal";
|
|
3
|
-
export declare class AnnotationBody extends ManifestResource {
|
|
4
|
-
constructor(jsonld?: any, options?: IManifestoOptions);
|
|
5
|
-
getFormat(): MediaType | null;
|
|
6
|
-
getType(): ExternalResourceType | null;
|
|
7
|
-
getWidth(): number;
|
|
8
|
-
getHeight(): number;
|
|
9
|
-
}
|
|
1
|
+
import { ExternalResourceType, MediaType } from "@iiif/vocabulary/dist-commonjs";
|
|
2
|
+
import { IManifestoOptions, ManifestResource } from "./internal";
|
|
3
|
+
export declare class AnnotationBody extends ManifestResource {
|
|
4
|
+
constructor(jsonld?: any, options?: IManifestoOptions);
|
|
5
|
+
getFormat(): MediaType | null;
|
|
6
|
+
getType(): ExternalResourceType | null;
|
|
7
|
+
getWidth(): number;
|
|
8
|
+
getHeight(): number;
|
|
9
|
+
}
|
|
@@ -1,45 +1,45 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
var internal_1 = require("./internal");
|
|
17
|
-
var AnnotationBody = /** @class */ (function (_super) {
|
|
18
|
-
__extends(AnnotationBody, _super);
|
|
19
|
-
function AnnotationBody(jsonld, options) {
|
|
20
|
-
return _super.call(this, jsonld, options) || this;
|
|
21
|
-
}
|
|
22
|
-
AnnotationBody.prototype.getFormat = function () {
|
|
23
|
-
var format = this.getProperty("format");
|
|
24
|
-
if (format) {
|
|
25
|
-
return internal_1.Utils.getMediaType(format);
|
|
26
|
-
}
|
|
27
|
-
return null;
|
|
28
|
-
};
|
|
29
|
-
AnnotationBody.prototype.getType = function () {
|
|
30
|
-
var type = this.getProperty("type");
|
|
31
|
-
if (type) {
|
|
32
|
-
return (internal_1.Utils.normaliseType(this.getProperty("type")));
|
|
33
|
-
}
|
|
34
|
-
return null;
|
|
35
|
-
};
|
|
36
|
-
AnnotationBody.prototype.getWidth = function () {
|
|
37
|
-
return this.getProperty("width");
|
|
38
|
-
};
|
|
39
|
-
AnnotationBody.prototype.getHeight = function () {
|
|
40
|
-
return this.getProperty("height");
|
|
41
|
-
};
|
|
42
|
-
return AnnotationBody;
|
|
43
|
-
}(internal_1.ManifestResource));
|
|
44
|
-
exports.AnnotationBody = AnnotationBody;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
var internal_1 = require("./internal");
|
|
17
|
+
var AnnotationBody = /** @class */ (function (_super) {
|
|
18
|
+
__extends(AnnotationBody, _super);
|
|
19
|
+
function AnnotationBody(jsonld, options) {
|
|
20
|
+
return _super.call(this, jsonld, options) || this;
|
|
21
|
+
}
|
|
22
|
+
AnnotationBody.prototype.getFormat = function () {
|
|
23
|
+
var format = this.getProperty("format");
|
|
24
|
+
if (format) {
|
|
25
|
+
return internal_1.Utils.getMediaType(format);
|
|
26
|
+
}
|
|
27
|
+
return null;
|
|
28
|
+
};
|
|
29
|
+
AnnotationBody.prototype.getType = function () {
|
|
30
|
+
var type = this.getProperty("type");
|
|
31
|
+
if (type) {
|
|
32
|
+
return (internal_1.Utils.normaliseType(this.getProperty("type")));
|
|
33
|
+
}
|
|
34
|
+
return null;
|
|
35
|
+
};
|
|
36
|
+
AnnotationBody.prototype.getWidth = function () {
|
|
37
|
+
return this.getProperty("width");
|
|
38
|
+
};
|
|
39
|
+
AnnotationBody.prototype.getHeight = function () {
|
|
40
|
+
return this.getProperty("height");
|
|
41
|
+
};
|
|
42
|
+
return AnnotationBody;
|
|
43
|
+
}(internal_1.ManifestResource));
|
|
44
|
+
exports.AnnotationBody = AnnotationBody;
|
|
45
45
|
//# sourceMappingURL=AnnotationBody.js.map
|
|
@@ -1,12 +1,12 @@
|
|
|
1
|
-
import { IIIFResourceType } from "@iiif/vocabulary/dist-commonjs";
|
|
2
|
-
import { Annotation, IManifestoOptions, JSONLDResource } from "./internal";
|
|
3
|
-
export declare class AnnotationList extends JSONLDResource {
|
|
4
|
-
options: IManifestoOptions;
|
|
5
|
-
label: string;
|
|
6
|
-
isLoaded: boolean;
|
|
7
|
-
constructor(label: any, jsonld?: any, options?: IManifestoOptions);
|
|
8
|
-
getIIIFResourceType(): IIIFResourceType;
|
|
9
|
-
getLabel(): string;
|
|
10
|
-
getResources(): Annotation[];
|
|
11
|
-
load(): Promise<AnnotationList>;
|
|
12
|
-
}
|
|
1
|
+
import { IIIFResourceType } from "@iiif/vocabulary/dist-commonjs";
|
|
2
|
+
import { Annotation, IManifestoOptions, JSONLDResource } from "./internal";
|
|
3
|
+
export declare class AnnotationList extends JSONLDResource {
|
|
4
|
+
options: IManifestoOptions;
|
|
5
|
+
label: string;
|
|
6
|
+
isLoaded: boolean;
|
|
7
|
+
constructor(label: any, jsonld?: any, options?: IManifestoOptions);
|
|
8
|
+
getIIIFResourceType(): IIIFResourceType;
|
|
9
|
+
getLabel(): string;
|
|
10
|
+
getResources(): Annotation[];
|
|
11
|
+
load(): Promise<AnnotationList>;
|
|
12
|
+
}
|
|
@@ -1,62 +1,62 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
var internal_1 = require("./internal");
|
|
17
|
-
var AnnotationList = /** @class */ (function (_super) {
|
|
18
|
-
__extends(AnnotationList, _super);
|
|
19
|
-
function AnnotationList(label, jsonld, options) {
|
|
20
|
-
var _this = _super.call(this, jsonld) || this;
|
|
21
|
-
_this.label = label;
|
|
22
|
-
_this.options = options;
|
|
23
|
-
return _this;
|
|
24
|
-
}
|
|
25
|
-
AnnotationList.prototype.getIIIFResourceType = function () {
|
|
26
|
-
return internal_1.Utils.normaliseType(this.getProperty("type"));
|
|
27
|
-
};
|
|
28
|
-
AnnotationList.prototype.getLabel = function () {
|
|
29
|
-
return this.label;
|
|
30
|
-
};
|
|
31
|
-
AnnotationList.prototype.getResources = function () {
|
|
32
|
-
var _this = this;
|
|
33
|
-
var resources = this.getProperty("resources");
|
|
34
|
-
return resources.map(function (resource) { return new internal_1.Annotation(resource, _this.options); });
|
|
35
|
-
};
|
|
36
|
-
AnnotationList.prototype.load = function () {
|
|
37
|
-
var _this = this;
|
|
38
|
-
return new Promise(function (resolve, reject) {
|
|
39
|
-
if (_this.isLoaded) {
|
|
40
|
-
resolve(_this);
|
|
41
|
-
}
|
|
42
|
-
else {
|
|
43
|
-
var id = _this.__jsonld.id;
|
|
44
|
-
if (!id) {
|
|
45
|
-
id = _this.__jsonld["@id"];
|
|
46
|
-
}
|
|
47
|
-
internal_1.Utils.loadManifest(id)
|
|
48
|
-
.then(function (data) {
|
|
49
|
-
_this.__jsonld = data;
|
|
50
|
-
_this.context = _this.getProperty("context");
|
|
51
|
-
_this.id = _this.getProperty("id");
|
|
52
|
-
_this.isLoaded = true;
|
|
53
|
-
resolve(_this);
|
|
54
|
-
})
|
|
55
|
-
.catch(reject);
|
|
56
|
-
}
|
|
57
|
-
});
|
|
58
|
-
};
|
|
59
|
-
return AnnotationList;
|
|
60
|
-
}(internal_1.JSONLDResource));
|
|
61
|
-
exports.AnnotationList = AnnotationList;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
var internal_1 = require("./internal");
|
|
17
|
+
var AnnotationList = /** @class */ (function (_super) {
|
|
18
|
+
__extends(AnnotationList, _super);
|
|
19
|
+
function AnnotationList(label, jsonld, options) {
|
|
20
|
+
var _this = _super.call(this, jsonld) || this;
|
|
21
|
+
_this.label = label;
|
|
22
|
+
_this.options = options;
|
|
23
|
+
return _this;
|
|
24
|
+
}
|
|
25
|
+
AnnotationList.prototype.getIIIFResourceType = function () {
|
|
26
|
+
return internal_1.Utils.normaliseType(this.getProperty("type"));
|
|
27
|
+
};
|
|
28
|
+
AnnotationList.prototype.getLabel = function () {
|
|
29
|
+
return this.label;
|
|
30
|
+
};
|
|
31
|
+
AnnotationList.prototype.getResources = function () {
|
|
32
|
+
var _this = this;
|
|
33
|
+
var resources = this.getProperty("resources");
|
|
34
|
+
return resources.map(function (resource) { return new internal_1.Annotation(resource, _this.options); });
|
|
35
|
+
};
|
|
36
|
+
AnnotationList.prototype.load = function () {
|
|
37
|
+
var _this = this;
|
|
38
|
+
return new Promise(function (resolve, reject) {
|
|
39
|
+
if (_this.isLoaded) {
|
|
40
|
+
resolve(_this);
|
|
41
|
+
}
|
|
42
|
+
else {
|
|
43
|
+
var id = _this.__jsonld.id;
|
|
44
|
+
if (!id) {
|
|
45
|
+
id = _this.__jsonld["@id"];
|
|
46
|
+
}
|
|
47
|
+
internal_1.Utils.loadManifest(id)
|
|
48
|
+
.then(function (data) {
|
|
49
|
+
_this.__jsonld = data;
|
|
50
|
+
_this.context = _this.getProperty("context");
|
|
51
|
+
_this.id = _this.getProperty("id");
|
|
52
|
+
_this.isLoaded = true;
|
|
53
|
+
resolve(_this);
|
|
54
|
+
})
|
|
55
|
+
.catch(reject);
|
|
56
|
+
}
|
|
57
|
+
});
|
|
58
|
+
};
|
|
59
|
+
return AnnotationList;
|
|
60
|
+
}(internal_1.JSONLDResource));
|
|
61
|
+
exports.AnnotationList = AnnotationList;
|
|
62
62
|
//# sourceMappingURL=AnnotationList.js.map
|
|
@@ -1,5 +1,5 @@
|
|
|
1
|
-
import { Annotation, IManifestoOptions, ManifestResource } from "./internal";
|
|
2
|
-
export declare class AnnotationPage extends ManifestResource {
|
|
3
|
-
constructor(jsonld: any, options: IManifestoOptions);
|
|
4
|
-
getItems(): Annotation[];
|
|
5
|
-
}
|
|
1
|
+
import { Annotation, IManifestoOptions, ManifestResource } from "./internal";
|
|
2
|
+
export declare class AnnotationPage extends ManifestResource {
|
|
3
|
+
constructor(jsonld: any, options: IManifestoOptions);
|
|
4
|
+
getItems(): Annotation[];
|
|
5
|
+
}
|
|
@@ -1,28 +1,28 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __extends = (this && this.__extends) || (function () {
|
|
3
|
-
var extendStatics = function (d, b) {
|
|
4
|
-
extendStatics = Object.setPrototypeOf ||
|
|
5
|
-
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
-
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
-
return extendStatics(d, b);
|
|
8
|
-
};
|
|
9
|
-
return function (d, b) {
|
|
10
|
-
extendStatics(d, b);
|
|
11
|
-
function __() { this.constructor = d; }
|
|
12
|
-
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
-
};
|
|
14
|
-
})();
|
|
15
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
-
var internal_1 = require("./internal");
|
|
17
|
-
var AnnotationPage = /** @class */ (function (_super) {
|
|
18
|
-
__extends(AnnotationPage, _super);
|
|
19
|
-
function AnnotationPage(jsonld, options) {
|
|
20
|
-
return _super.call(this, jsonld, options) || this;
|
|
21
|
-
}
|
|
22
|
-
AnnotationPage.prototype.getItems = function () {
|
|
23
|
-
return this.getProperty("items");
|
|
24
|
-
};
|
|
25
|
-
return AnnotationPage;
|
|
26
|
-
}(internal_1.ManifestResource));
|
|
27
|
-
exports.AnnotationPage = AnnotationPage;
|
|
1
|
+
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (b.hasOwnProperty(p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
extendStatics(d, b);
|
|
11
|
+
function __() { this.constructor = d; }
|
|
12
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
13
|
+
};
|
|
14
|
+
})();
|
|
15
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
|
16
|
+
var internal_1 = require("./internal");
|
|
17
|
+
var AnnotationPage = /** @class */ (function (_super) {
|
|
18
|
+
__extends(AnnotationPage, _super);
|
|
19
|
+
function AnnotationPage(jsonld, options) {
|
|
20
|
+
return _super.call(this, jsonld, options) || this;
|
|
21
|
+
}
|
|
22
|
+
AnnotationPage.prototype.getItems = function () {
|
|
23
|
+
return this.getProperty("items");
|
|
24
|
+
};
|
|
25
|
+
return AnnotationPage;
|
|
26
|
+
}(internal_1.ManifestResource));
|
|
27
|
+
exports.AnnotationPage = AnnotationPage;
|
|
28
28
|
//# sourceMappingURL=AnnotationPage.js.map
|
|
@@ -1,31 +1,31 @@
|
|
|
1
|
-
import { ViewingHint } from "@iiif/vocabulary/dist-commonjs";
|
|
2
|
-
import { Annotation, AnnotationList, IManifestoOptions, Range, Resource, Size } from "./internal";
|
|
3
|
-
export declare class Canvas extends Resource {
|
|
4
|
-
ranges: Range[];
|
|
5
|
-
constructor(jsonld?: any, options?: IManifestoOptions);
|
|
6
|
-
getCanonicalImageUri(w?: number): string;
|
|
7
|
-
getMaxDimensions(): Size | null;
|
|
8
|
-
getContent(): Annotation[];
|
|
9
|
-
getDuration(): number | null;
|
|
10
|
-
getImages(): Annotation[];
|
|
11
|
-
getIndex(): number;
|
|
12
|
-
getOtherContent(): Promise<AnnotationList[]>;
|
|
13
|
-
getWidth(): number;
|
|
14
|
-
getHeight(): number;
|
|
15
|
-
getViewingHint(): ViewingHint | null;
|
|
16
|
-
readonly imageResources: any;
|
|
17
|
-
readonly resourceAnnotations: any;
|
|
18
|
-
/**
|
|
19
|
-
* Returns a given resource Annotation, based on a contained resource or body
|
|
20
|
-
* id
|
|
21
|
-
*/
|
|
22
|
-
resourceAnnotation(id: any): any;
|
|
23
|
-
/**
|
|
24
|
-
* Returns the fragment placement values if a resourceAnnotation is placed on
|
|
25
|
-
* a canvas somewhere besides the full extent
|
|
26
|
-
*/
|
|
27
|
-
onFragment(id: any): any;
|
|
28
|
-
readonly iiifImageResources: any;
|
|
29
|
-
readonly imageServiceIds: any;
|
|
30
|
-
readonly aspectRatio: number;
|
|
31
|
-
}
|
|
1
|
+
import { ViewingHint } from "@iiif/vocabulary/dist-commonjs";
|
|
2
|
+
import { Annotation, AnnotationList, IManifestoOptions, Range, Resource, Size } from "./internal";
|
|
3
|
+
export declare class Canvas extends Resource {
|
|
4
|
+
ranges: Range[];
|
|
5
|
+
constructor(jsonld?: any, options?: IManifestoOptions);
|
|
6
|
+
getCanonicalImageUri(w?: number): string;
|
|
7
|
+
getMaxDimensions(): Size | null;
|
|
8
|
+
getContent(): Annotation[];
|
|
9
|
+
getDuration(): number | null;
|
|
10
|
+
getImages(): Annotation[];
|
|
11
|
+
getIndex(): number;
|
|
12
|
+
getOtherContent(): Promise<AnnotationList[]>;
|
|
13
|
+
getWidth(): number;
|
|
14
|
+
getHeight(): number;
|
|
15
|
+
getViewingHint(): ViewingHint | null;
|
|
16
|
+
readonly imageResources: any;
|
|
17
|
+
readonly resourceAnnotations: any;
|
|
18
|
+
/**
|
|
19
|
+
* Returns a given resource Annotation, based on a contained resource or body
|
|
20
|
+
* id
|
|
21
|
+
*/
|
|
22
|
+
resourceAnnotation(id: any): any;
|
|
23
|
+
/**
|
|
24
|
+
* Returns the fragment placement values if a resourceAnnotation is placed on
|
|
25
|
+
* a canvas somewhere besides the full extent
|
|
26
|
+
*/
|
|
27
|
+
onFragment(id: any): any;
|
|
28
|
+
readonly iiifImageResources: any;
|
|
29
|
+
readonly imageServiceIds: any;
|
|
30
|
+
readonly aspectRatio: number;
|
|
31
|
+
}
|