diff --git a/CHANGELOG.md b/CHANGELOG.md new file mode 100644 index 0000000..bd77a3a --- /dev/null +++ b/CHANGELOG.md @@ -0,0 +1,15 @@ +Changelog +========= + +All notable changes to this project will be documented in this file. +This project adheres to [Semantic Versioning](http://semver.org). + +1.1.0 - 2015-04-02 +------------------ + +* Changed: Removed dependency on ES5 shim + +1.0.0 - 2015-03-31 +------------------ + +* First stable release diff --git a/bower.json b/bower.json index 42027b8..26ce103 100644 --- a/bower.json +++ b/bower.json @@ -1,6 +1,6 @@ { "name": "lity", - "version": "1.0.0", + "version": "1.1.0", "authors": [ "Jan Sorgalla " ], diff --git a/dist/lity.css b/dist/lity.css index 8e98947..f4e8c91 100644 --- a/dist/lity.css +++ b/dist/lity.css @@ -1,4 +1,4 @@ -/*! Lity - v1.0.0 - 2015-04-02 +/*! Lity - v1.1.0 - 2015-04-02 * http://sorgalla.com/lity/ * Copyright (c) 2015 Jan Sorgalla; Licensed MIT */ .lity { diff --git a/dist/lity.js b/dist/lity.js index 7c95383..db629b0 100644 --- a/dist/lity.js +++ b/dist/lity.js @@ -1,4 +1,4 @@ -/*! Lity - v1.0.0 - 2015-04-02 +/*! Lity - v1.1.0 - 2015-04-02 * http://sorgalla.com/lity/ * Copyright (c) 2015 Jan Sorgalla; Licensed MIT */ (function(window, factory) { @@ -371,7 +371,7 @@ return popup.options(options); } - lity.version = '1.0.0'; + lity.version = '1.1.0'; lity.handlers = $.proxy(settings, lity, _defaultHandlers); lity.options = $.proxy(settings, lity, _defaultOptions); diff --git a/dist/lity.min.css b/dist/lity.min.css index e0b533a..c3592b3 100644 --- a/dist/lity.min.css +++ b/dist/lity.min.css @@ -1,3 +1,3 @@ -/*! Lity - v1.0.0 - 2015-04-02 +/*! Lity - v1.1.0 - 2015-04-02 * http://sorgalla.com/lity/ * Copyright (c) 2015 Jan Sorgalla; Licensed MIT */.lity{z-index:9990;position:fixed;top:0;right:0;bottom:0;left:0;white-space:nowrap;background:#0b0b0b;background:rgba(0,0,0,0.9);outline:none !important;opacity:0;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.lity.lity-opened{opacity:1}.lity.lity-closed{opacity:0}.lity *{-webkit-box-sizing:border-box;-moz-box-sizing:border-box;box-sizing:border-box}.lity-wrap{z-index:9990;position:fixed;top:0;right:0;bottom:0;left:0;text-align:center;outline:none !important}.lity-wrap:before{content:'';display:inline-block;height:100%;vertical-align:middle;margin-right:-0.25em}.lity-loader{z-index:9991;color:#fff;position:absolute;top:50%;margin-top:-0.8em;width:100%;text-align:center;font-size:14px;font-family:Arial,Helvetica,sans-serif;opacity:0;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.lity-loading .lity-loader{opacity:1}.lity-container{z-index:9992;position:relative;text-align:left;vertical-align:middle;display:inline-block;white-space:normal;max-width:100%;max-height:100%;outline:none !important;opacity:1;-webkit-transition:opacity .2s ease;-o-transition:opacity .2s ease;transition:opacity .2s ease}.lity-loading .lity-container{opacity:0}.lity-container:after{content:'';position:absolute;left:0;top:0;bottom:0;display:block;right:0;width:auto;height:auto;z-index:-1;-webkit-box-shadow:0 0 8px rgba(0,0,0,0.6);box-shadow:0 0 8px rgba(0,0,0,0.6)}.lity-content{z-index:9993;width:100%}.lity-close{z-index:9994;width:35px;height:35px;line-height:35px;position:fixed;right:0;top:0;text-decoration:none;text-align:center;padding:0;color:#fff;font-style:normal;font-size:35px;font-family:Arial,Baskerville,monospace;text-shadow:0 1px 2px rgba(0,0,0,0.6);border:0;background:transparent;outline:none !important;-webkit-box-shadow:none;box-shadow:none;-webkit-appearance:none;cursor:pointer}.lity-close:active{top:1px}.lity-image img{max-width:100%;display:block;line-height:0;border:0}.lity-iframe .lity-container{width:100%;max-width:964px}.lity-iframe-container{width:100%;height:0;overflow:hidden;padding-top:56.25%}.lity-iframe-container iframe{position:absolute;display:block;top:0;left:0;width:100%;height:100%;-webkit-box-shadow:0 0 8px rgba(0,0,0,0.6);box-shadow:0 0 8px rgba(0,0,0,0.6);background:#000}.lity-hide{display:none} \ No newline at end of file diff --git a/dist/lity.min.js b/dist/lity.min.js index 9d77dcf..3e75dc5 100644 --- a/dist/lity.min.js +++ b/dist/lity.min.js @@ -1,4 +1,4 @@ -/*! Lity - v1.0.0 - 2015-04-02 +/*! Lity - v1.1.0 - 2015-04-02 * http://sorgalla.com/lity/ * Copyright (c) 2015 Jan Sorgalla; Licensed MIT */ -!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=b(a,require("jquery")):a.lity=b(a,a.jQuery||a.Zepto)}(window,function(a,b){"use strict";function c(a){var c=b.Deferred();return s?(a.one(s,c.resolve),setTimeout(c.reject,500)):c.resolve(),c.promise()}function d(a,c,d){if(1===arguments.length)return b.extend({},a);if("string"==typeof c){if("undefined"==typeof d)return"undefined"==typeof a[c]?null:a[c];a[c]=d}else b.extend(a,c);return this}function e(){return"file:"===a.location.protocol?"http:":""}function f(a){return b('').append(a)}function g(a){if(!m.test(a))return!1;var c=b(''),d=b.Deferred(),e=function(){d.reject(f("Failed loading image"))};return c.on("load",function(){return 0===this.naturalWidth?e():void d.resolve(c)}).on("error",e),d.promise()}function h(a){if(!n.test(a))return!1;var b;return a.indexOf("youtube.")>-1&&a.indexOf("/embed")<0&&(b=o.exec(a)[1],a=e()+"//www.youtube.com/embed/"+b+"?autoplay=1"),a.indexOf("vimeo.")>-1&&a.indexOf("player.vimeo.")<0&&(b=p.exec(a.split("//")[1])[1],a=e()+"//player.vimeo.com/video/"+b+"?autoplay=1"),a.indexOf("//maps.google.")>-1&&a.indexOf("output=embed")<0&&(a+="&output=embed"),'
'}function i(a){try{var c=b(a)}catch(d){return!1}var e=b('');return c.after(e).on("lity:ready",function(a,b){b.one("lity:close",function(){e.before(c.addClass("lity-hide")).remove()})})}function j(a){function e(a){n.esc&&27===a.keyCode&&j()}function f(){var a=k.documentElement.clientHeight?k.documentElement.clientHeight:Math.round(l.height());p.css("max-height",Math.floor(a)+"px").trigger("lity:resize",[o,m])}function g(a){o&&(p=b(a),l.on("resize",f),f(),o.find(".lity-loader").each(function(){var a=b(this);c(a).always(function(){a.remove()})}).end().removeClass("lity-loading").find(".lity-content").empty().append(p),p.removeClass("lity-hide").trigger("lity:ready",[o,m]),v.resolve())}function h(a,c){o=b(t).appendTo("body"),l.one("keyup",e),setTimeout(function(){o.addClass("lity-opened lity-"+a).on("click","[data-lity-close]",function(a){b(a.target).is("[data-lity-close]")&&j()}).trigger("lity:open",[o,m]),b.when(c).always(g)},0)}function i(a){var c,d;if(n.handler&&u[n.handler])d=u[n.handler](a,instance,m),c=n.handler;else{var e=b.extend({},u),f={};b.each(["iframe","inline"],function(a,b){e[b]&&(f[b]=e[b]),delete e[b]});var g=function(b,e){return e?(d=e(a,m),d?(c=b,!1):void 0):!0};b.each(e,g),!c&&b.each(f,g)}return d&&(v=b.Deferred(),b.when(j()).done(b.proxy(h,null,c,d))),!!d}function j(){if(o){var a=b.Deferred();return v.done(function(){l.off("resize",f).off("keyup",e),p&&p.trigger("lity:close",[o,m]),o.removeClass("lity-opened").addClass("lity-closed");var b=o;o=null,p=null,c(b).always(function(){b.remove(),a.resolve()})}),a.promise()}}function m(a){var c,d,e=a&&!!a.preventDefault;if(e||(c=a),!c){var f=b(this);c=f.attr("data-lity-target")||f.attr("href")||f.attr("src"),d=f.data("lity-options")||f.data("lity")||{}}return c?(n=b.extend({},s,d),i(c)&&e&&a.preventDefault(),m):void 0}var n,o,p,s=b.extend({},r),u=b.extend({},q),v=b.Deferred().resolve();return m.handlers=b.proxy(d,m,u),m.options=b.proxy(d,m,s),m.open=function(a){return i(a),m},m.close=function(){return j(),m},m.options(a)}var k=a.document,l=b(a),m=/\.(png|jpg|jpeg|gif|tiff|bmp)(\?\S*)?$/i,n=/^([a-z]+:)?\/\//i,o=/v=([^&]+)/,p=/\/([^\?&]+)$/,q={image:g,iframe:h,inline:i},r={esc:!0},s=function(){var a=k.createElement("div"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return b[c];return!1}(),t='
Loading...
';return j.version="1.0.0",j.handlers=b.proxy(d,j,q),j.options=b.proxy(d,j,r),b(k).on("click","[data-lity]",j()),j}); \ No newline at end of file +!function(a,b){"function"==typeof define&&define.amd?define(["jquery"],function(c){return b(a,c)}):"object"==typeof module&&"object"==typeof module.exports?module.exports=b(a,require("jquery")):a.lity=b(a,a.jQuery||a.Zepto)}(window,function(a,b){"use strict";function c(a){var c=b.Deferred();return s?(a.one(s,c.resolve),setTimeout(c.reject,500)):c.resolve(),c.promise()}function d(a,c,d){if(1===arguments.length)return b.extend({},a);if("string"==typeof c){if("undefined"==typeof d)return"undefined"==typeof a[c]?null:a[c];a[c]=d}else b.extend(a,c);return this}function e(){return"file:"===a.location.protocol?"http:":""}function f(a){return b('').append(a)}function g(a){if(!m.test(a))return!1;var c=b(''),d=b.Deferred(),e=function(){d.reject(f("Failed loading image"))};return c.on("load",function(){return 0===this.naturalWidth?e():void d.resolve(c)}).on("error",e),d.promise()}function h(a){if(!n.test(a))return!1;var b;return a.indexOf("youtube.")>-1&&a.indexOf("/embed")<0&&(b=o.exec(a)[1],a=e()+"//www.youtube.com/embed/"+b+"?autoplay=1"),a.indexOf("vimeo.")>-1&&a.indexOf("player.vimeo.")<0&&(b=p.exec(a.split("//")[1])[1],a=e()+"//player.vimeo.com/video/"+b+"?autoplay=1"),a.indexOf("//maps.google.")>-1&&a.indexOf("output=embed")<0&&(a+="&output=embed"),'
'}function i(a){try{var c=b(a)}catch(d){return!1}var e=b('');return c.after(e).on("lity:ready",function(a,b){b.one("lity:close",function(){e.before(c.addClass("lity-hide")).remove()})})}function j(a){function e(a){n.esc&&27===a.keyCode&&j()}function f(){var a=k.documentElement.clientHeight?k.documentElement.clientHeight:Math.round(l.height());p.css("max-height",Math.floor(a)+"px").trigger("lity:resize",[o,m])}function g(a){o&&(p=b(a),l.on("resize",f),f(),o.find(".lity-loader").each(function(){var a=b(this);c(a).always(function(){a.remove()})}).end().removeClass("lity-loading").find(".lity-content").empty().append(p),p.removeClass("lity-hide").trigger("lity:ready",[o,m]),v.resolve())}function h(a,c){o=b(t).appendTo("body"),l.one("keyup",e),setTimeout(function(){o.addClass("lity-opened lity-"+a).on("click","[data-lity-close]",function(a){b(a.target).is("[data-lity-close]")&&j()}).trigger("lity:open",[o,m]),b.when(c).always(g)},0)}function i(a){var c,d;if(n.handler&&u[n.handler])d=u[n.handler](a,instance,m),c=n.handler;else{var e=b.extend({},u),f={};b.each(["iframe","inline"],function(a,b){e[b]&&(f[b]=e[b]),delete e[b]});var g=function(b,e){return e?(d=e(a,m),d?(c=b,!1):void 0):!0};b.each(e,g),!c&&b.each(f,g)}return d&&(v=b.Deferred(),b.when(j()).done(b.proxy(h,null,c,d))),!!d}function j(){if(o){var a=b.Deferred();return v.done(function(){l.off("resize",f).off("keyup",e),p&&p.trigger("lity:close",[o,m]),o.removeClass("lity-opened").addClass("lity-closed");var b=o;o=null,p=null,c(b).always(function(){b.remove(),a.resolve()})}),a.promise()}}function m(a){var c,d,e=a&&!!a.preventDefault;if(e||(c=a),!c){var f=b(this);c=f.attr("data-lity-target")||f.attr("href")||f.attr("src"),d=f.data("lity-options")||f.data("lity")||{}}return c?(n=b.extend({},s,d),i(c)&&e&&a.preventDefault(),m):void 0}var n,o,p,s=b.extend({},r),u=b.extend({},q),v=b.Deferred().resolve();return m.handlers=b.proxy(d,m,u),m.options=b.proxy(d,m,s),m.open=function(a){return i(a),m},m.close=function(){return j(),m},m.options(a)}var k=a.document,l=b(a),m=/\.(png|jpg|jpeg|gif|tiff|bmp)(\?\S*)?$/i,n=/^([a-z]+:)?\/\//i,o=/v=([^&]+)/,p=/\/([^\?&]+)$/,q={image:g,iframe:h,inline:i},r={esc:!0},s=function(){var a=k.createElement("div"),b={WebkitTransition:"webkitTransitionEnd",MozTransition:"transitionend",OTransition:"oTransitionEnd otransitionend",transition:"transitionend"};for(var c in b)if(void 0!==a.style[c])return b[c];return!1}(),t='
Loading...
';return j.version="1.1.0",j.handlers=b.proxy(d,j,q),j.options=b.proxy(d,j,r),b(k).on("click","[data-lity]",j()),j}); \ No newline at end of file diff --git a/package.json b/package.json index 6f6a4c8..72e30fa 100644 --- a/package.json +++ b/package.json @@ -7,7 +7,7 @@ "url": "http://sorgalla.com" }, "homepage": "http://sorgalla.com/lity/", - "version": "1.0.0", + "version": "1.1.0", "main": "dist/lity.js", "peerDependencies": { "jquery": ">=1.7"