diff --git a/bower.json b/bower.json index 41f869e3..aa8fa092 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "manifesto", - "version": "1.0.0", + "version": "2.0.0", "homepage": "https://github.com/edsilv/manifesto", "authors": [ "edsilv " diff --git a/changelog.md b/changelog.md index ef499e3b..fcb5990d 100644 --- a/changelog.md +++ b/changelog.md @@ -1,4 +1,15 @@ +#v2.0.0 +##Breaking Changes + +- Removed `Manifesto.getRenderings()`. Use `ManifestoResource.getRenderings()` instead. +- Removed `Manifesto.getService()`. Use `Manifesto.Utils.getService()` instead. +- Removed `Manifesto.getTreeNode()`. Use `new Manifeso.TreeNode()` instead. +- Removed `Manifesto.isImageProfile()`. Use `Manifesto.Utils.isImageProfile()` instead. +- Removed `Manifesto.isLevel0ImageProfile()`. Use `Manifesto.Utils.isLevel0ImageProfile()` instead. +- Removed `Manifesto.isLevel1ImageProfile()`. Use `Manifesto.Utils.isLevel1ImageProfile()` instead. +- Removed `Manifesto.isLevel2ImageProfile()`. Use `Manifesto.Utils.isLevel2ImageProfile()` instead. +- Removed `Manifesto.loadExternalResources()`. Use `Manifesto.Utils.loadExternalResources()` instead. #v1.0.0 diff --git a/dist/client/manifesto.bundle.js b/dist/client/manifesto.bundle.js index 2db68ce1..f0570839 100644 --- a/dist/client/manifesto.bundle.js +++ b/dist/client/manifesto.bundle.js @@ -2386,20 +2386,6 @@ global.manifesto = global.Manifesto = module.exports = { create: function (manifest, options) { return Manifesto.Deserialiser.parse(manifest, options); }, - // todo: create hasServiceDescriptor - // based on @profile and @type (or lack of) can the resource describe associated services? - // loadExternalResources: function(resources: Manifesto.IExternalResource[], - // tokenStorageStrategy: string, - // clickThrough: (resource: Manifesto.IExternalResource) => Promise, - // restricted: (resource: Manifesto.IExternalResource) => Promise, - // login: (resource: Manifesto.IExternalResource) => Promise, - // getAccessToken: (resource: Manifesto.IExternalResource, rejectOnError: boolean) => Promise, - // storeAccessToken: (resource: Manifesto.IExternalResource, token: Manifesto.IAccessToken, tokenStorageStrategy: string) => Promise, - // getStoredAccessToken: (resource: Manifesto.IExternalResource, tokenStorageStrategy: string) => Promise, - // handleResourceResponse: (resource: Manifesto.IExternalResource) => Promise, - // options?: Manifesto.IManifestoOptions): Promise{ - // return Manifesto.Utils.loadExternalResources(resources, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, getStoredAccessToken, handleResourceResponse, options); - // }, loadManifest: function (uri) { return Manifesto.Utils.loadResource(uri); } diff --git a/dist/client/manifesto.js b/dist/client/manifesto.js index 520ffe9b..4bda87ee 100644 --- a/dist/client/manifesto.js +++ b/dist/client/manifesto.js @@ -2322,20 +2322,6 @@ global.manifesto = global.Manifesto = module.exports = { create: function (manifest, options) { return Manifesto.Deserialiser.parse(manifest, options); }, - // todo: create hasServiceDescriptor - // based on @profile and @type (or lack of) can the resource describe associated services? - // loadExternalResources: function(resources: Manifesto.IExternalResource[], - // tokenStorageStrategy: string, - // clickThrough: (resource: Manifesto.IExternalResource) => Promise, - // restricted: (resource: Manifesto.IExternalResource) => Promise, - // login: (resource: Manifesto.IExternalResource) => Promise, - // getAccessToken: (resource: Manifesto.IExternalResource, rejectOnError: boolean) => Promise, - // storeAccessToken: (resource: Manifesto.IExternalResource, token: Manifesto.IAccessToken, tokenStorageStrategy: string) => Promise, - // getStoredAccessToken: (resource: Manifesto.IExternalResource, tokenStorageStrategy: string) => Promise, - // handleResourceResponse: (resource: Manifesto.IExternalResource) => Promise, - // options?: Manifesto.IManifestoOptions): Promise{ - // return Manifesto.Utils.loadExternalResources(resources, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, getStoredAccessToken, handleResourceResponse, options); - // }, loadManifest: function (uri) { return Manifesto.Utils.loadResource(uri); } diff --git a/dist/server/manifesto.js b/dist/server/manifesto.js index 08d2a796..bc21f174 100644 --- a/dist/server/manifesto.js +++ b/dist/server/manifesto.js @@ -2385,20 +2385,6 @@ global.manifesto = global.Manifesto = module.exports = { create: function (manifest, options) { return Manifesto.Deserialiser.parse(manifest, options); }, - // todo: create hasServiceDescriptor - // based on @profile and @type (or lack of) can the resource describe associated services? - // loadExternalResources: function(resources: Manifesto.IExternalResource[], - // tokenStorageStrategy: string, - // clickThrough: (resource: Manifesto.IExternalResource) => Promise, - // restricted: (resource: Manifesto.IExternalResource) => Promise, - // login: (resource: Manifesto.IExternalResource) => Promise, - // getAccessToken: (resource: Manifesto.IExternalResource, rejectOnError: boolean) => Promise, - // storeAccessToken: (resource: Manifesto.IExternalResource, token: Manifesto.IAccessToken, tokenStorageStrategy: string) => Promise, - // getStoredAccessToken: (resource: Manifesto.IExternalResource, tokenStorageStrategy: string) => Promise, - // handleResourceResponse: (resource: Manifesto.IExternalResource) => Promise, - // options?: Manifesto.IManifestoOptions): Promise{ - // return Manifesto.Utils.loadExternalResources(resources, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, getStoredAccessToken, handleResourceResponse, options); - // }, loadManifest: function (uri) { return Manifesto.Utils.loadResource(uri); } diff --git a/package.json b/package.json index e42e3a2c..48f1a17e 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "manifesto.js", - "version": "1.0.0", + "version": "2.0.0", "description": "IIIF Presentation API utility library for client and server", "main": "dist/server/manifesto.js", "scripts": { diff --git a/src/IManifesto.ts b/src/IManifesto.ts index 9e70ab5f..cd9679be 100644 --- a/src/IManifesto.ts +++ b/src/IManifesto.ts @@ -2,24 +2,7 @@ interface IManifesto { AnnotationMotivation: Manifesto.AnnotationMotivation; create: (manifest: string, options?: Manifesto.IManifestoOptions) => Manifesto.IIIIFResource; ElementType: Manifesto.ElementType; - //getRenderings(resource: any): Manifesto.IRendering[]; - //getService: (resource: any, profile: Manifesto.ServiceProfile | string) => Manifesto.IService; - //getTreeNode(): Manifesto.ITreeNode; IIIFResourceType: Manifesto.IIIFResourceType; - // isImageProfile(profile: Manifesto.ServiceProfile): boolean; - // isLevel0ImageProfile(profile: Manifesto.ServiceProfile): boolean; - // isLevel1ImageProfile(profile: Manifesto.ServiceProfile): boolean; - // isLevel2ImageProfile(profile: Manifesto.ServiceProfile): boolean; - // loadExternalResources: (resources: Manifesto.IExternalResource[], - // tokenStorageStrategy: string, - // clickThrough: (resource: Manifesto.IExternalResource) => Promise, - // restricted: (resource: Manifesto.IExternalResource) => Promise, - // login: (resource: Manifesto.IExternalResource) => Promise, - // getAccessToken: (resource: Manifesto.IExternalResource, rejectOnError: boolean) => Promise, - // storeAccessToken: (resource: Manifesto.IExternalResource, token: Manifesto.IAccessToken, tokenStorageStrategy: string) => Promise, - // getStoredAccessToken: (resource: Manifesto.IExternalResource, tokenStorageStrategy: string) => Promise, - // handleResourceResponse: (resource: Manifesto.IExternalResource) => Promise, - // options?: Manifesto.IManifestoOptions) => Promise; loadManifest: (uri: string) => Promise; ManifestType: Manifesto.ManifestType; MetadataItem: any; diff --git a/src/Manifesto.ts b/src/Manifesto.ts index d11480eb..6956e5ca 100644 --- a/src/Manifesto.ts +++ b/src/Manifesto.ts @@ -28,22 +28,6 @@ return Manifesto.Deserialiser.parse(manifest, options); }, - // todo: create hasServiceDescriptor - // based on @profile and @type (or lack of) can the resource describe associated services? - - // loadExternalResources: function(resources: Manifesto.IExternalResource[], - // tokenStorageStrategy: string, - // clickThrough: (resource: Manifesto.IExternalResource) => Promise, - // restricted: (resource: Manifesto.IExternalResource) => Promise, - // login: (resource: Manifesto.IExternalResource) => Promise, - // getAccessToken: (resource: Manifesto.IExternalResource, rejectOnError: boolean) => Promise, - // storeAccessToken: (resource: Manifesto.IExternalResource, token: Manifesto.IAccessToken, tokenStorageStrategy: string) => Promise, - // getStoredAccessToken: (resource: Manifesto.IExternalResource, tokenStorageStrategy: string) => Promise, - // handleResourceResponse: (resource: Manifesto.IExternalResource) => Promise, - // options?: Manifesto.IManifestoOptions): Promise{ - // return Manifesto.Utils.loadExternalResources(resources, tokenStorageStrategy, clickThrough, restricted, login, getAccessToken, storeAccessToken, getStoredAccessToken, handleResourceResponse, options); - // }, - loadManifest: function (uri: string): Promise { return Manifesto.Utils.loadResource(uri); }