manifesto.js 4.2.21 → 4.2.22
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/README.md +4 -3
- package/dist-commonjs/AnnotationList.js.map +1 -1
- package/dist-commonjs/Canvas.js +4 -5
- package/dist-commonjs/Canvas.js.map +1 -1
- package/dist-commonjs/Collection.js.map +1 -1
- package/dist-commonjs/Duration.js.map +1 -1
- package/dist-commonjs/IIIFResource.js +1 -1
- package/dist-commonjs/IIIFResource.js.map +1 -1
- package/dist-commonjs/Manifest.js +1 -2
- package/dist-commonjs/Manifest.js.map +1 -1
- package/dist-commonjs/PropertyValue.js.map +1 -1
- package/dist-commonjs/Range.js.map +1 -1
- package/dist-commonjs/Sequence.js.map +1 -1
- package/dist-commonjs/Serialisation.js.map +1 -1
- package/dist-commonjs/Utils.d.ts +1 -1
- package/dist-commonjs/Utils.js.map +1 -1
- package/dist-esmodule/Annotation.js +1 -1
- package/dist-esmodule/Annotation.js.map +1 -1
- package/dist-esmodule/AnnotationList.js +1 -1
- package/dist-esmodule/AnnotationList.js.map +1 -1
- package/dist-esmodule/Canvas.js +6 -7
- package/dist-esmodule/Canvas.js.map +1 -1
- package/dist-esmodule/Collection.js +2 -2
- package/dist-esmodule/Collection.js.map +1 -1
- package/dist-esmodule/Duration.js.map +1 -1
- package/dist-esmodule/IIIFResource.js +3 -3
- package/dist-esmodule/IIIFResource.js.map +1 -1
- package/dist-esmodule/Manifest.js +3 -4
- package/dist-esmodule/Manifest.js.map +1 -1
- package/dist-esmodule/ManifestResource.js +2 -2
- package/dist-esmodule/ManifestResource.js.map +1 -1
- package/dist-esmodule/PropertyValue.js.map +1 -1
- package/dist-esmodule/Range.js +2 -2
- package/dist-esmodule/Range.js.map +1 -1
- package/dist-esmodule/Resource.js +1 -1
- package/dist-esmodule/Resource.js.map +1 -1
- package/dist-esmodule/Sequence.js +1 -1
- package/dist-esmodule/Sequence.js.map +1 -1
- package/dist-esmodule/Serialisation.js +1 -1
- package/dist-esmodule/Serialisation.js.map +1 -1
- package/dist-esmodule/Utils.d.ts +1 -1
- package/dist-esmodule/Utils.js +3 -3
- package/dist-esmodule/Utils.js.map +1 -1
- package/dist-umd/manifesto.js +1 -1
- package/dist-var/manifesto.js +1 -1
- package/docs/assets/hierarchy.js +1 -0
- package/docs/assets/highlight.css +64 -0
- package/docs/assets/icons.js +18 -0
- package/docs/assets/icons.svg +1 -0
- package/docs/assets/main.js +60 -0
- package/docs/assets/navigation.js +1 -0
- package/docs/assets/search.js +1 -0
- package/docs/assets/style.css +1633 -0
- package/docs/classes/Annotation.html +29 -0
- package/docs/classes/AnnotationBody.html +28 -0
- package/docs/classes/AnnotationList.html +13 -0
- package/docs/classes/AnnotationPage.html +25 -0
- package/docs/classes/Canvas.html +52 -0
- package/docs/classes/Collection.html +55 -0
- package/docs/classes/Deserialiser.html +10 -0
- package/docs/classes/Duration.html +5 -0
- package/docs/classes/IIIFResource.html +41 -0
- package/docs/classes/JSONLDResource.html +6 -0
- package/docs/classes/LabelValuePair.html +12 -0
- package/docs/classes/LanguageMap.html +199 -0
- package/docs/classes/LocalizedValue.html +21 -0
- package/docs/classes/Manifest.html +58 -0
- package/docs/classes/ManifestResource.html +24 -0
- package/docs/classes/PropertyValue.html +216 -0
- package/docs/classes/Range.html +37 -0
- package/docs/classes/Rendering.html +25 -0
- package/docs/classes/Resource.html +32 -0
- package/docs/classes/Sequence.html +48 -0
- package/docs/classes/Service.html +32 -0
- package/docs/classes/Size.html +4 -0
- package/docs/classes/Thumb.html +10 -0
- package/docs/classes/Thumbnail.html +32 -0
- package/docs/classes/TreeNode.html +14 -0
- package/docs/classes/Utils.html +39 -0
- package/docs/enums/ManifestType.html +4 -0
- package/docs/enums/StatusCode.html +5 -0
- package/docs/enums/TreeNodeType.html +4 -0
- package/docs/hierarchy.html +1 -0
- package/docs/index.html +22 -274
- package/docs/interfaces/IAccessToken.html +6 -0
- package/docs/interfaces/IExternalImageResourceData.html +8 -0
- package/docs/interfaces/IExternalResource.html +22 -0
- package/docs/interfaces/IExternalResourceData.html +6 -0
- package/docs/interfaces/IExternalResourceOptions.html +2 -0
- package/docs/interfaces/IManifestoOptions.html +7 -0
- package/docs/modules.html +1 -0
- package/docs/variables/loadManifest.html +1 -0
- package/docs/variables/parseManifest.html +1 -0
- package/eslint.config.cjs +25 -0
- package/package.json +24 -20
- package/pkg-tests/node-umd.js +3 -0
- package/tsconfig.docs.json +13 -0
- package/types/index.d.ts +1 -1
- package/docs/assets/css/main.css +0 -865
- package/docs/assets/css/main.css.map +0 -7
- package/docs/assets/images/icons.png +0 -0
- package/docs/assets/images/icons@2x.png +0 -0
- package/docs/assets/images/widgets.png +0 -0
- package/docs/assets/images/widgets@2x.png +0 -0
- package/docs/assets/js/main.js +0 -5
- package/docs/assets/js/search.js +0 -3
- package/docs/classes/_annotation_.annotation.html +0 -809
- package/docs/classes/_annotationbody_.annotationbody.html +0 -788
- package/docs/classes/_annotationlist_.annotationlist.html +0 -443
- package/docs/classes/_annotationpage_.annotationpage.html +0 -719
- package/docs/classes/_canvas_.canvas.html +0 -1049
- package/docs/classes/_collection_.collection.html +0 -1286
- package/docs/classes/_duration_.duration.html +0 -284
- package/docs/classes/_iiifresource_.iiifresource.html +0 -995
- package/docs/classes/_jsonldresource_.jsonldresource.html +0 -309
- package/docs/classes/_labelvaluepair_.labelvaluepair.html +0 -417
- package/docs/classes/_language_.language.html +0 -255
- package/docs/classes/_languagemap_.languagemap.html +0 -2050
- package/docs/classes/_manifest_.manifest.html +0 -1482
- package/docs/classes/_manifestresource_.manifestresource.html +0 -710
- package/docs/classes/_range_.range.html +0 -1004
- package/docs/classes/_rendering_.rendering.html +0 -719
- package/docs/classes/_resource_.resource.html +0 -876
- package/docs/classes/_sequence_.sequence.html +0 -1308
- package/docs/classes/_serialisation_.deserialiser.html +0 -438
- package/docs/classes/_service_.service.html +0 -884
- package/docs/classes/_size_.size.html +0 -255
- package/docs/classes/_thumb_.thumb.html +0 -325
- package/docs/classes/_thumbnail_.thumbnail.html +0 -876
- package/docs/classes/_treenode_.treenode.html +0 -437
- package/docs/classes/_utils_.utils.html +0 -2045
- package/docs/enums/_manifesttype_.manifesttype.html +0 -223
- package/docs/enums/_statuscode_.statuscode.html +0 -237
- package/docs/enums/_treenodetype_.treenodetype.html +0 -223
- package/docs/globals.html +0 -300
- package/docs/interfaces/_iaccesstoken_.iaccesstoken.html +0 -259
- package/docs/interfaces/_iexternalimageresourcedata_.iexternalimageresourcedata.html +0 -282
- package/docs/interfaces/_iexternalresource_.iexternalresource.html +0 -518
- package/docs/interfaces/_iexternalresourcedata_.iexternalresourcedata.html +0 -250
- package/docs/interfaces/_iexternalresourceoptions_.iexternalresourceoptions.html +0 -203
- package/docs/interfaces/_imanifestooptions_.imanifestooptions.html +0 -273
- package/docs/modules/_annotation_.html +0 -170
- package/docs/modules/_annotationbody_.html +0 -170
- package/docs/modules/_annotationlist_.html +0 -170
- package/docs/modules/_annotationpage_.html +0 -170
- package/docs/modules/_canvas_.html +0 -170
- package/docs/modules/_collection_.html +0 -170
- package/docs/modules/_duration_.html +0 -170
- package/docs/modules/_iaccesstoken_.html +0 -170
- package/docs/modules/_iexternalimageresourcedata_.html +0 -170
- package/docs/modules/_iexternalresource_.html +0 -170
- package/docs/modules/_iexternalresourcedata_.html +0 -170
- package/docs/modules/_iexternalresourceoptions_.html +0 -170
- package/docs/modules/_iiifresource_.html +0 -170
- package/docs/modules/_imanifestooptions_.html +0 -170
- package/docs/modules/_index_.__global.html +0 -180
- package/docs/modules/_index_.__global.manifesto.html +0 -245
- package/docs/modules/_index_.html +0 -240
- package/docs/modules/_jsonldresource_.html +0 -170
- package/docs/modules/_labelvaluepair_.html +0 -170
- package/docs/modules/_language_.html +0 -170
- package/docs/modules/_languagemap_.html +0 -170
- package/docs/modules/_manifest_.html +0 -170
- package/docs/modules/_manifestresource_.html +0 -170
- package/docs/modules/_manifesttype_.html +0 -170
- package/docs/modules/_range_.html +0 -170
- package/docs/modules/_rendering_.html +0 -170
- package/docs/modules/_resource_.html +0 -170
- package/docs/modules/_sequence_.html +0 -170
- package/docs/modules/_serialisation_.html +0 -170
- package/docs/modules/_service_.html +0 -170
- package/docs/modules/_size_.html +0 -170
- package/docs/modules/_statuscode_.html +0 -170
- package/docs/modules/_thumb_.html +0 -170
- package/docs/modules/_thumbnail_.html +0 -170
- package/docs/modules/_treenode_.html +0 -170
- package/docs/modules/_treenodetype_.html +0 -170
- package/docs/modules/_utils_.html +0 -220
- 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.
|
|
3
|
+
"version": "4.2.22",
|
|
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
|
-
"
|
|
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
|
|
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
|
|
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": "
|
|
43
|
-
"chai": "2.
|
|
44
|
-
"cross-env": "^
|
|
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
|
-
"
|
|
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": "^
|
|
49
|
-
"prettier": "^
|
|
53
|
+
"mocha": "^11.7.1",
|
|
54
|
+
"prettier": "^3.6.2",
|
|
50
55
|
"prettier-check": "^2.0.0",
|
|
51
|
-
"rimraf": "^
|
|
52
|
-
"serve-static": "^
|
|
53
|
-
"ts-loader": "^
|
|
54
|
-
"
|
|
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-
|
|
58
|
-
"webpack": "^
|
|
59
|
-
"webpack-cli": "^
|
|
60
|
-
"yargs": "
|
|
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.
|
|
68
|
+
"@iiif/vocabulary": "^1.0.28",
|
|
65
69
|
"isomorphic-unfetch": "^3.0.0",
|
|
66
70
|
"lodash": "^4.17.21"
|
|
67
71
|
},
|
package/pkg-tests/node-umd.js
CHANGED
|
@@ -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
|
|
|
@@ -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
|
@@ -477,7 +477,7 @@ export declare class Utils {
|
|
|
477
477
|
* @example Utils.traverseAndFind({foo: 'bar'}, 'foo', 'bar')
|
|
478
478
|
*/
|
|
479
479
|
static traverseAndFind(object: any, k: string, v: string): object | undefined;
|
|
480
|
-
static getServices(resource: any, { onlyService, onlyServices, skipParentResources }?: {
|
|
480
|
+
static getServices(resource: any, { onlyService, onlyServices, skipParentResources, }?: {
|
|
481
481
|
onlyServices?: boolean;
|
|
482
482
|
skipParentResources?: boolean;
|
|
483
483
|
onlyService?: boolean;
|