From d880d17225db906550ca798abdd608dcb3f8ebf6 Mon Sep 17 00:00:00 2001 From: edsilv Date: Thu, 10 Sep 2015 11:39:03 +0100 Subject: [PATCH] updated bower.json --- README.md | 2 +- bower.json | 10 ++++- examples | 2 +- package.json | 2 +- src/lib/manifesto.js | 89 ++++++++++++++++++++++++++++++++------ src/typings/manifesto.d.ts | 1 + 6 files changed, 87 insertions(+), 19 deletions(-) diff --git a/README.md b/README.md index fc6b779ca..e63abaca6 100644 --- a/README.md +++ b/README.md @@ -17,7 +17,7 @@ ## About -The Universal Viewer is an [open source](https://github.com/UniversalViewer/universalviewer/blob/master/LICENSE.txt) project to enable cultural heritage institutions to present their digital artefacts in an [IIIF-compliant](http://iiif.io/) and highly customisable user interface. +The Universal Viewer is an [open source](https://github.com/UniversalViewer/universalviewer/blob/master/LICENSE.txt) project to enable cultural heritage institutions to present their digital artifacts in an [IIIF-compliant](http://iiif.io/) and highly customisable user interface. Features: diff --git a/bower.json b/bower.json index 3bde0be22..584484f5e 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,7 @@ { "name": "Universal Viewer", "version": "1.5.1", + "description": "The Universal Viewer is an open source project to enable cultural heritage institutions to present their digital artifacts in an IIIF-compliant and highly customisable user interface.", "repository": { "type": "git", "url": "git://github.com/UniversalViewer/universalviewer" @@ -9,10 +10,15 @@ "edsilv " ], "ignore": [ + "**/.*", + "*.js", + "*.ts", "build", + "examples", + "lib", + "src", + "tasks", "tests", - "Gruntfile.js", - "**/.*", "node_modules", "bower_components" ], diff --git a/examples b/examples index 0606525ff..374035925 160000 --- a/examples +++ b/examples @@ -1 +1 @@ -Subproject commit 0606525ff4bcba5b91f35dc5fd11a77e1839ea11 +Subproject commit 374035925fcf69fe3c98c2eba94f12784479fffc diff --git a/package.json b/package.json index 90ebbaf2d..a09a5fc50 100644 --- a/package.json +++ b/package.json @@ -1,7 +1,7 @@ { "name": "UniversalViewer", "version": "1.5.1", - "description": "Navigate sequences of images in a zoomable, extensible interface.", + "description": "The Universal Viewer is an open source project to enable cultural heritage institutions to present their digital artifacts in an IIIF-compliant and highly customisable user interface.", "devDependencies": { "async": "^0.9.0", "chalk": "^0.5.1", diff --git a/src/lib/manifesto.js b/src/lib/manifesto.js index f3860b1f8..8711bf217 100644 --- a/src/lib/manifesto.js +++ b/src/lib/manifesto.js @@ -851,6 +851,7 @@ var Manifesto; Manifesto.Sequence = Sequence; })(Manifesto || (Manifesto = {})); var jmespath = _dereq_('jmespath'); +var _isString = _dereq_("lodash.isstring"); var Manifesto; (function (Manifesto) { var Deserialiser = (function () { @@ -897,7 +898,8 @@ var Manifesto; var manifest = new Manifesto.Manifest(json, options); this.parseSequences(manifest, options); if (manifest.__jsonld.structures && manifest.__jsonld.structures.length) { - this.parseRanges(manifest, JsonUtils.getRootRange(manifest.__jsonld), ''); + var r = JsonUtils.getRootRange(manifest.__jsonld); + this.parseRanges(manifest, r, ''); } return manifest; }; @@ -936,7 +938,11 @@ var Manifesto; return canvases; }; Deserialiser.parseRanges = function (manifest, r, path, parentRange) { - var range = new Manifesto.Range(r, manifest.options); + var range; + if (_isString(r)) { + r = JsonUtils.getRangeById(manifest.__jsonld, r); + } + range = new Manifesto.Range(r, manifest.options); // if no parent range is passed, assign the new range to manifest.rootRange if (!parentRange) { manifest.rootRange = range; @@ -1377,7 +1383,7 @@ module.exports = { /// /// -},{"http":6,"jmespath":27,"lodash.assign":40,"lodash.endswith":50,"lodash.isarray":52,"lodash.last":53,"lodash.map":54,"url":24}],2:[function(_dereq_,module,exports){ +},{"http":6,"jmespath":27,"lodash.assign":40,"lodash.endswith":50,"lodash.isarray":52,"lodash.isstring":53,"lodash.last":54,"lodash.map":55,"url":24}],2:[function(_dereq_,module,exports){ /*! * The buffer module from node.js, for the browser. * @@ -10857,6 +10863,61 @@ function isNative(value) { module.exports = isArray; },{}],53:[function(_dereq_,module,exports){ +/** + * lodash 3.0.1 (Custom Build) + * Build: `lodash modern modularize exports="npm" -o ./` + * Copyright 2012-2015 The Dojo Foundation + * Based on Underscore.js 1.8.2 + * Copyright 2009-2015 Jeremy Ashkenas, DocumentCloud and Investigative Reporters & Editors + * Available under MIT license + */ + +/** `Object#toString` result references. */ +var stringTag = '[object String]'; + +/** + * Checks if `value` is object-like. + * + * @private + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is object-like, else `false`. + */ +function isObjectLike(value) { + return !!value && typeof value == 'object'; +} + +/** Used for native method references. */ +var objectProto = Object.prototype; + +/** + * Used to resolve the [`toStringTag`](https://people.mozilla.org/~jorendorff/es6-draft.html#sec-object.prototype.tostring) + * of values. + */ +var objToString = objectProto.toString; + +/** + * Checks if `value` is classified as a `String` primitive or object. + * + * @static + * @memberOf _ + * @category Lang + * @param {*} value The value to check. + * @returns {boolean} Returns `true` if `value` is correctly classified, else `false`. + * @example + * + * _.isString('abc'); + * // => true + * + * _.isString(1); + * // => false + */ +function isString(value) { + return typeof value == 'string' || (isObjectLike(value) && objToString.call(value) == stringTag); +} + +module.exports = isString; + +},{}],54:[function(_dereq_,module,exports){ /** * lodash 3.0.0 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` @@ -10886,7 +10947,7 @@ function last(array) { module.exports = last; -},{}],54:[function(_dereq_,module,exports){ +},{}],55:[function(_dereq_,module,exports){ /** * lodash 3.1.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` @@ -11038,7 +11099,7 @@ function map(collection, iteratee, thisArg) { module.exports = map; -},{"lodash._arraymap":55,"lodash._basecallback":56,"lodash._baseeach":61,"lodash.isarray":52}],55:[function(_dereq_,module,exports){ +},{"lodash._arraymap":56,"lodash._basecallback":57,"lodash._baseeach":62,"lodash.isarray":52}],56:[function(_dereq_,module,exports){ /** * lodash 3.0.0 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` @@ -11070,7 +11131,7 @@ function arrayMap(array, iteratee) { module.exports = arrayMap; -},{}],56:[function(_dereq_,module,exports){ +},{}],57:[function(_dereq_,module,exports){ /** * lodash 3.3.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` @@ -11494,7 +11555,7 @@ function property(path) { module.exports = baseCallback; -},{"lodash._baseisequal":57,"lodash._bindcallback":59,"lodash.isarray":52,"lodash.pairs":60}],57:[function(_dereq_,module,exports){ +},{"lodash._baseisequal":58,"lodash._bindcallback":60,"lodash.isarray":52,"lodash.pairs":61}],58:[function(_dereq_,module,exports){ /** * lodash 3.0.7 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` @@ -11838,7 +11899,7 @@ function isObject(value) { module.exports = baseIsEqual; -},{"lodash.isarray":52,"lodash.istypedarray":58,"lodash.keys":62}],58:[function(_dereq_,module,exports){ +},{"lodash.isarray":52,"lodash.istypedarray":59,"lodash.keys":63}],59:[function(_dereq_,module,exports){ /** * lodash 3.0.2 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` @@ -11950,9 +12011,9 @@ function isTypedArray(value) { module.exports = isTypedArray; -},{}],59:[function(_dereq_,module,exports){ -module.exports=_dereq_(44) },{}],60:[function(_dereq_,module,exports){ +module.exports=_dereq_(44) +},{}],61:[function(_dereq_,module,exports){ /** * lodash 3.0.1 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` @@ -12032,7 +12093,7 @@ function pairs(object) { module.exports = pairs; -},{"lodash.keys":62}],61:[function(_dereq_,module,exports){ +},{"lodash.keys":63}],62:[function(_dereq_,module,exports){ /** * lodash 3.0.4 (Custom Build) * Build: `lodash modern modularize exports="npm" -o ./` @@ -12215,11 +12276,11 @@ function isObject(value) { module.exports = baseEach; -},{"lodash.keys":62}],62:[function(_dereq_,module,exports){ +},{"lodash.keys":63}],63:[function(_dereq_,module,exports){ module.exports=_dereq_(34) -},{"lodash._getnative":63,"lodash.isarguments":64,"lodash.isarray":52}],63:[function(_dereq_,module,exports){ +},{"lodash._getnative":64,"lodash.isarguments":65,"lodash.isarray":52}],64:[function(_dereq_,module,exports){ module.exports=_dereq_(35) -},{}],64:[function(_dereq_,module,exports){ +},{}],65:[function(_dereq_,module,exports){ module.exports=_dereq_(36) },{}]},{},[1]) (1) diff --git a/src/typings/manifesto.d.ts b/src/typings/manifesto.d.ts index 5e06172ac..848f6986c 100644 --- a/src/typings/manifesto.d.ts +++ b/src/typings/manifesto.d.ts @@ -242,6 +242,7 @@ declare module Manifesto { } } declare var jmespath: any; +declare var _isString: any; declare module Manifesto { class Deserialiser { static parse(manifest: string, options?: IManifestoOptions): IIIIFResource;