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.
Files changed (179) hide show
  1. package/README.md +4 -3
  2. package/dist-commonjs/AnnotationList.js.map +1 -1
  3. package/dist-commonjs/Canvas.js +4 -5
  4. package/dist-commonjs/Canvas.js.map +1 -1
  5. package/dist-commonjs/Collection.js.map +1 -1
  6. package/dist-commonjs/Duration.js.map +1 -1
  7. package/dist-commonjs/IIIFResource.js +1 -1
  8. package/dist-commonjs/IIIFResource.js.map +1 -1
  9. package/dist-commonjs/Manifest.js +1 -2
  10. package/dist-commonjs/Manifest.js.map +1 -1
  11. package/dist-commonjs/PropertyValue.js.map +1 -1
  12. package/dist-commonjs/Range.js.map +1 -1
  13. package/dist-commonjs/Sequence.js.map +1 -1
  14. package/dist-commonjs/Serialisation.js.map +1 -1
  15. package/dist-commonjs/Utils.d.ts +1 -1
  16. package/dist-commonjs/Utils.js.map +1 -1
  17. package/dist-esmodule/Annotation.js +1 -1
  18. package/dist-esmodule/Annotation.js.map +1 -1
  19. package/dist-esmodule/AnnotationList.js +1 -1
  20. package/dist-esmodule/AnnotationList.js.map +1 -1
  21. package/dist-esmodule/Canvas.js +6 -7
  22. package/dist-esmodule/Canvas.js.map +1 -1
  23. package/dist-esmodule/Collection.js +2 -2
  24. package/dist-esmodule/Collection.js.map +1 -1
  25. package/dist-esmodule/Duration.js.map +1 -1
  26. package/dist-esmodule/IIIFResource.js +3 -3
  27. package/dist-esmodule/IIIFResource.js.map +1 -1
  28. package/dist-esmodule/Manifest.js +3 -4
  29. package/dist-esmodule/Manifest.js.map +1 -1
  30. package/dist-esmodule/ManifestResource.js +2 -2
  31. package/dist-esmodule/ManifestResource.js.map +1 -1
  32. package/dist-esmodule/PropertyValue.js.map +1 -1
  33. package/dist-esmodule/Range.js +2 -2
  34. package/dist-esmodule/Range.js.map +1 -1
  35. package/dist-esmodule/Resource.js +1 -1
  36. package/dist-esmodule/Resource.js.map +1 -1
  37. package/dist-esmodule/Sequence.js +1 -1
  38. package/dist-esmodule/Sequence.js.map +1 -1
  39. package/dist-esmodule/Serialisation.js +1 -1
  40. package/dist-esmodule/Serialisation.js.map +1 -1
  41. package/dist-esmodule/Utils.d.ts +1 -1
  42. package/dist-esmodule/Utils.js +3 -3
  43. package/dist-esmodule/Utils.js.map +1 -1
  44. package/dist-umd/manifesto.js +1 -1
  45. package/dist-var/manifesto.js +1 -1
  46. package/docs/assets/hierarchy.js +1 -0
  47. package/docs/assets/highlight.css +64 -0
  48. package/docs/assets/icons.js +18 -0
  49. package/docs/assets/icons.svg +1 -0
  50. package/docs/assets/main.js +60 -0
  51. package/docs/assets/navigation.js +1 -0
  52. package/docs/assets/search.js +1 -0
  53. package/docs/assets/style.css +1633 -0
  54. package/docs/classes/Annotation.html +29 -0
  55. package/docs/classes/AnnotationBody.html +28 -0
  56. package/docs/classes/AnnotationList.html +13 -0
  57. package/docs/classes/AnnotationPage.html +25 -0
  58. package/docs/classes/Canvas.html +52 -0
  59. package/docs/classes/Collection.html +55 -0
  60. package/docs/classes/Deserialiser.html +10 -0
  61. package/docs/classes/Duration.html +5 -0
  62. package/docs/classes/IIIFResource.html +41 -0
  63. package/docs/classes/JSONLDResource.html +6 -0
  64. package/docs/classes/LabelValuePair.html +12 -0
  65. package/docs/classes/LanguageMap.html +199 -0
  66. package/docs/classes/LocalizedValue.html +21 -0
  67. package/docs/classes/Manifest.html +58 -0
  68. package/docs/classes/ManifestResource.html +24 -0
  69. package/docs/classes/PropertyValue.html +216 -0
  70. package/docs/classes/Range.html +37 -0
  71. package/docs/classes/Rendering.html +25 -0
  72. package/docs/classes/Resource.html +32 -0
  73. package/docs/classes/Sequence.html +48 -0
  74. package/docs/classes/Service.html +32 -0
  75. package/docs/classes/Size.html +4 -0
  76. package/docs/classes/Thumb.html +10 -0
  77. package/docs/classes/Thumbnail.html +32 -0
  78. package/docs/classes/TreeNode.html +14 -0
  79. package/docs/classes/Utils.html +39 -0
  80. package/docs/enums/ManifestType.html +4 -0
  81. package/docs/enums/StatusCode.html +5 -0
  82. package/docs/enums/TreeNodeType.html +4 -0
  83. package/docs/hierarchy.html +1 -0
  84. package/docs/index.html +22 -274
  85. package/docs/interfaces/IAccessToken.html +6 -0
  86. package/docs/interfaces/IExternalImageResourceData.html +8 -0
  87. package/docs/interfaces/IExternalResource.html +22 -0
  88. package/docs/interfaces/IExternalResourceData.html +6 -0
  89. package/docs/interfaces/IExternalResourceOptions.html +2 -0
  90. package/docs/interfaces/IManifestoOptions.html +7 -0
  91. package/docs/modules.html +1 -0
  92. package/docs/variables/loadManifest.html +1 -0
  93. package/docs/variables/parseManifest.html +1 -0
  94. package/eslint.config.cjs +25 -0
  95. package/package.json +24 -20
  96. package/pkg-tests/node-umd.js +3 -0
  97. package/tsconfig.docs.json +13 -0
  98. package/types/index.d.ts +1 -1
  99. package/docs/assets/css/main.css +0 -865
  100. package/docs/assets/css/main.css.map +0 -7
  101. package/docs/assets/images/icons.png +0 -0
  102. package/docs/assets/images/icons@2x.png +0 -0
  103. package/docs/assets/images/widgets.png +0 -0
  104. package/docs/assets/images/widgets@2x.png +0 -0
  105. package/docs/assets/js/main.js +0 -5
  106. package/docs/assets/js/search.js +0 -3
  107. package/docs/classes/_annotation_.annotation.html +0 -809
  108. package/docs/classes/_annotationbody_.annotationbody.html +0 -788
  109. package/docs/classes/_annotationlist_.annotationlist.html +0 -443
  110. package/docs/classes/_annotationpage_.annotationpage.html +0 -719
  111. package/docs/classes/_canvas_.canvas.html +0 -1049
  112. package/docs/classes/_collection_.collection.html +0 -1286
  113. package/docs/classes/_duration_.duration.html +0 -284
  114. package/docs/classes/_iiifresource_.iiifresource.html +0 -995
  115. package/docs/classes/_jsonldresource_.jsonldresource.html +0 -309
  116. package/docs/classes/_labelvaluepair_.labelvaluepair.html +0 -417
  117. package/docs/classes/_language_.language.html +0 -255
  118. package/docs/classes/_languagemap_.languagemap.html +0 -2050
  119. package/docs/classes/_manifest_.manifest.html +0 -1482
  120. package/docs/classes/_manifestresource_.manifestresource.html +0 -710
  121. package/docs/classes/_range_.range.html +0 -1004
  122. package/docs/classes/_rendering_.rendering.html +0 -719
  123. package/docs/classes/_resource_.resource.html +0 -876
  124. package/docs/classes/_sequence_.sequence.html +0 -1308
  125. package/docs/classes/_serialisation_.deserialiser.html +0 -438
  126. package/docs/classes/_service_.service.html +0 -884
  127. package/docs/classes/_size_.size.html +0 -255
  128. package/docs/classes/_thumb_.thumb.html +0 -325
  129. package/docs/classes/_thumbnail_.thumbnail.html +0 -876
  130. package/docs/classes/_treenode_.treenode.html +0 -437
  131. package/docs/classes/_utils_.utils.html +0 -2045
  132. package/docs/enums/_manifesttype_.manifesttype.html +0 -223
  133. package/docs/enums/_statuscode_.statuscode.html +0 -237
  134. package/docs/enums/_treenodetype_.treenodetype.html +0 -223
  135. package/docs/globals.html +0 -300
  136. package/docs/interfaces/_iaccesstoken_.iaccesstoken.html +0 -259
  137. package/docs/interfaces/_iexternalimageresourcedata_.iexternalimageresourcedata.html +0 -282
  138. package/docs/interfaces/_iexternalresource_.iexternalresource.html +0 -518
  139. package/docs/interfaces/_iexternalresourcedata_.iexternalresourcedata.html +0 -250
  140. package/docs/interfaces/_iexternalresourceoptions_.iexternalresourceoptions.html +0 -203
  141. package/docs/interfaces/_imanifestooptions_.imanifestooptions.html +0 -273
  142. package/docs/modules/_annotation_.html +0 -170
  143. package/docs/modules/_annotationbody_.html +0 -170
  144. package/docs/modules/_annotationlist_.html +0 -170
  145. package/docs/modules/_annotationpage_.html +0 -170
  146. package/docs/modules/_canvas_.html +0 -170
  147. package/docs/modules/_collection_.html +0 -170
  148. package/docs/modules/_duration_.html +0 -170
  149. package/docs/modules/_iaccesstoken_.html +0 -170
  150. package/docs/modules/_iexternalimageresourcedata_.html +0 -170
  151. package/docs/modules/_iexternalresource_.html +0 -170
  152. package/docs/modules/_iexternalresourcedata_.html +0 -170
  153. package/docs/modules/_iexternalresourceoptions_.html +0 -170
  154. package/docs/modules/_iiifresource_.html +0 -170
  155. package/docs/modules/_imanifestooptions_.html +0 -170
  156. package/docs/modules/_index_.__global.html +0 -180
  157. package/docs/modules/_index_.__global.manifesto.html +0 -245
  158. package/docs/modules/_index_.html +0 -240
  159. package/docs/modules/_jsonldresource_.html +0 -170
  160. package/docs/modules/_labelvaluepair_.html +0 -170
  161. package/docs/modules/_language_.html +0 -170
  162. package/docs/modules/_languagemap_.html +0 -170
  163. package/docs/modules/_manifest_.html +0 -170
  164. package/docs/modules/_manifestresource_.html +0 -170
  165. package/docs/modules/_manifesttype_.html +0 -170
  166. package/docs/modules/_range_.html +0 -170
  167. package/docs/modules/_rendering_.html +0 -170
  168. package/docs/modules/_resource_.html +0 -170
  169. package/docs/modules/_sequence_.html +0 -170
  170. package/docs/modules/_serialisation_.html +0 -170
  171. package/docs/modules/_service_.html +0 -170
  172. package/docs/modules/_size_.html +0 -170
  173. package/docs/modules/_statuscode_.html +0 -170
  174. package/docs/modules/_thumb_.html +0 -170
  175. package/docs/modules/_thumbnail_.html +0 -170
  176. package/docs/modules/_treenode_.html +0 -170
  177. package/docs/modules/_treenodetype_.html +0 -170
  178. package/docs/modules/_utils_.html +0 -220
  179. 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.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
- "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
 
@@ -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;