From 972a01f94fe7c98f5ae886f5b06ff814ff0a8d13 Mon Sep 17 00:00:00 2001 From: jedrzejchalubek Date: Wed, 8 Aug 2018 22:33:54 +0200 Subject: [PATCH] chore(): Bump v3.2.3 --- dist/css/glide.core.css | 2 +- dist/css/glide.core.min.css | 2 +- dist/glide.esm.js | 37 ++++--------------------------------- dist/glide.js | 37 ++++--------------------------------- dist/glide.min.js | 4 ++-- dist/glide.modular.esm.js | 37 ++++--------------------------------- package.json | 2 +- 7 files changed, 17 insertions(+), 104 deletions(-) diff --git a/dist/css/glide.core.css b/dist/css/glide.core.css index bbce69c2..458af97c 100644 --- a/dist/css/glide.core.css +++ b/dist/css/glide.core.css @@ -25,7 +25,7 @@ width: 100%; height: 100%; flex-shrink: 0; - white-space: initial; + white-space: normal; user-select: none; -webkit-touch-callout: none; -webkit-tap-highlight-color: transparent; } diff --git a/dist/css/glide.core.min.css b/dist/css/glide.core.min.css index a70b04dd..60a10943 100644 --- a/dist/css/glide.core.min.css +++ b/dist/css/glide.core.min.css @@ -1 +1 @@ -.glide{position:relative;width:100%;box-sizing:border-box}.glide *{box-sizing:inherit}.glide__track{overflow:hidden}.glide__slides{position:relative;width:100%;list-style:none;backface-visibility:hidden;transform-style:preserve-3d;touch-action:pan-Y;overflow:hidden;padding:0;white-space:nowrap;display:flex;flex-wrap:nowrap;will-change:transform}.glide__slides--dragging{user-select:none}.glide__slide{width:100%;height:100%;flex-shrink:0;white-space:initial;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.glide__slide a{user-select:none;-webkit-user-drag:none;-moz-user-select:none;-ms-user-select:none}.glide__arrows{-webkit-touch-callout:none;user-select:none}.glide__bullets{-webkit-touch-callout:none;user-select:none}.glide--rtl{direction:rtl} +.glide{position:relative;width:100%;box-sizing:border-box}.glide *{box-sizing:inherit}.glide__track{overflow:hidden}.glide__slides{position:relative;width:100%;list-style:none;backface-visibility:hidden;transform-style:preserve-3d;touch-action:pan-Y;overflow:hidden;padding:0;white-space:nowrap;display:flex;flex-wrap:nowrap;will-change:transform}.glide__slides--dragging{user-select:none}.glide__slide{width:100%;height:100%;flex-shrink:0;white-space:normal;user-select:none;-webkit-touch-callout:none;-webkit-tap-highlight-color:transparent}.glide__slide a{user-select:none;-webkit-user-drag:none;-moz-user-select:none;-ms-user-select:none}.glide__arrows{-webkit-touch-callout:none;user-select:none}.glide__bullets{-webkit-touch-callout:none;user-select:none}.glide--rtl{direction:rtl} diff --git a/dist/glide.esm.js b/dist/glide.esm.js index 9c5e1e23..6cc64caf 100644 --- a/dist/glide.esm.js +++ b/dist/glide.esm.js @@ -1,5 +1,5 @@ /*! - * Glide.js v3.2.2 + * Glide.js v3.2.3 * (c) 2013-2018 Jędrzej Chałubek (http://jedrzejchalubek.com/) * Released under the MIT License. */ @@ -1151,16 +1151,6 @@ var MARGIN_TYPE = { function Gaps (Glide, Components, Events) { var Gaps = { - /** - * Setups gap value based on settings. - * - * @return {Void} - */ - mount: function mount() { - this.value = Glide.settings.gap; - }, - - /** * Applies gaps between slides. First and last * slides do not receive it's edge margins. @@ -1211,18 +1201,7 @@ function Gaps (Glide, Components, Events) { * @returns {Number} */ get: function get() { - return Gaps._v; - }, - - - /** - * Sets value of the gap. - * - * @param {String} value - * @return {Void} - */ - set: function set(value) { - Gaps._v = toInt(value); + return toInt(Glide.settings.gap); } }); @@ -1252,14 +1231,6 @@ function Gaps (Glide, Components, Events) { } }); - /** - * Remount component: - * - on updating via API, to update gap value - */ - Events.on('update', function () { - Gaps.mount(); - }); - /** * Apply calculated gaps: * - after building, so slides (including clones) will receive proper margins @@ -2697,7 +2668,7 @@ function Swipe (Glide, Components, Events) { if (settings.swipeThreshold) { Binder.on(START_EVENTS[0], Components.Html.wrapper, function (event) { _this.start(event); - }, { passive: true }); + }); } if (settings.dragThreshold) { @@ -2729,7 +2700,7 @@ function Swipe (Glide, Components, Events) { Binder.on(MOVE_EVENTS, Components.Html.wrapper, throttle(function (event) { _this2.move(event); - }, Glide.settings.throttle), { passive: true }); + }, Glide.settings.throttle)); }, diff --git a/dist/glide.js b/dist/glide.js index 8875474b..63411678 100644 --- a/dist/glide.js +++ b/dist/glide.js @@ -1,5 +1,5 @@ /*! - * Glide.js v3.2.2 + * Glide.js v3.2.3 * (c) 2013-2018 Jędrzej Chałubek (http://jedrzejchalubek.com/) * Released under the MIT License. */ @@ -1157,16 +1157,6 @@ function Gaps (Glide, Components, Events) { var Gaps = { - /** - * Setups gap value based on settings. - * - * @return {Void} - */ - mount: function mount() { - this.value = Glide.settings.gap; - }, - - /** * Applies gaps between slides. First and last * slides do not receive it's edge margins. @@ -1217,18 +1207,7 @@ * @returns {Number} */ get: function get() { - return Gaps._v; - }, - - - /** - * Sets value of the gap. - * - * @param {String} value - * @return {Void} - */ - set: function set(value) { - Gaps._v = toInt(value); + return toInt(Glide.settings.gap); } }); @@ -1258,14 +1237,6 @@ } }); - /** - * Remount component: - * - on updating via API, to update gap value - */ - Events.on('update', function () { - Gaps.mount(); - }); - /** * Apply calculated gaps: * - after building, so slides (including clones) will receive proper margins @@ -2703,7 +2674,7 @@ if (settings.swipeThreshold) { Binder.on(START_EVENTS[0], Components.Html.wrapper, function (event) { _this.start(event); - }, { passive: true }); + }); } if (settings.dragThreshold) { @@ -2735,7 +2706,7 @@ Binder.on(MOVE_EVENTS, Components.Html.wrapper, throttle(function (event) { _this2.move(event); - }, Glide.settings.throttle), { passive: true }); + }, Glide.settings.throttle)); }, diff --git a/dist/glide.min.js b/dist/glide.min.js index 92ccef75..6671e0e7 100644 --- a/dist/glide.min.js +++ b/dist/glide.min.js @@ -1,6 +1,6 @@ /*! - * Glide.js v3.2.2 + * Glide.js v3.2.3 * (c) 2013-2018 Jędrzej Chałubek (http://jedrzejchalubek.com/) * Released under the MIT License. */ -!function(t,e){"object"==typeof exports&&"undefined"!=typeof module?module.exports=e():"function"==typeof define&&define.amd?define(e):t.Glide=e()}(this,function(){"use strict";var i={type:"slider",startAt:0,perView:1,focusAt:0,gap:10,autoplay:!1,hoverpause:!0,keyboard:!0,bound:!1,swipeThreshold:80,dragThreshold:120,perTouch:!1,touchRatio:.5,touchAngle:45,animationDuration:400,rewind:!0,rewindDuration:800,animationTimingFunc:"cubic-bezier(0.165, 0.840, 0.440, 1.000)",throttle:10,direction:"ltr",peek:0,breakpoints:{},classes:{direction:{ltr:"glide--ltr",rtl:"glide--rtl"},slider:"glide--slider",carousel:"glide--carousel",swipeable:"glide--swipeable",dragging:"glide--dragging",cloneSlide:"glide__slide--clone",activeNav:"glide__bullet--active",activeSlide:"glide__slide--active",disabledArrow:"glide__arrow--disabled"}};var n="function"==typeof Symbol&&"symbol"==typeof Symbol.iterator?function(t){return typeof t}:function(t){return t&&"function"==typeof Symbol&&t.constructor===Symbol&&t!==Symbol.prototype?"symbol":typeof t},r=function(t,e){if(!(t instanceof e))throw new TypeError("Cannot call a class as a function")},o=function(){function i(t,e){for(var n=0;n":"<","<":">","=":"="};function t(t,e){return{modify:function(t){return e.Direction.is("rtl")?-t:t}}}function x(i,r,o){var s=[function(e,n){return{modify:function(t){return t+n.Gaps.value*e.index}}},function(t,e){return{modify:function(t){return t+e.Clones.grow/2}}},function(n,i){return{modify:function(t){if(0<=n.settings.focusAt){var e=i.Peek.value;return u(e)?t-e.before:t-e}return t}}},function(o,s){return{modify:function(t){var e=s.Gaps.value,n=s.Sizes.width,i=o.settings.focusAt,r=s.Sizes.slideWidth;return"center"===i?t-(n/2-r/2):t-r*i-e*i}}}].concat(i._t,[t]);return{mutate:function(t){for(var e=0;e")?(o.Transition.after(function(){s.emit("translate.jump"),u.set(0)}),u.set(i*n+e*n)):u.set(t.movement)}),s.on("destroy",function(){u.remove()}),u},Transition:function(n,e,t){var i=!1,r={compose:function(t){var e=n.settings;return i?t+" 0ms "+e.animationTimingFunc:t+" "+this.duration+"ms "+e.animationTimingFunc},set:function(){var t=0"))&&(e._o=!1,s.emit("run.offset",e.move)),s.emit("run.after",e.move),o.enable()}))},calculate:function(){var t=this.move,e=this.length,n=t.steps,i=t.direction,r="number"==typeof y(n)&&0!==y(n);switch(i){case">":">"===n?o.index=e:this.isEnd()?(o.isType("slider")&&!o.settings.rewind||(this._o=!0,o.index=0),s.emit("run.end",t)):r?o.index+=Math.min(e-o.index,-y(n)):o.index++;break;case"<":"<"===n?o.index=0:this.isStart()?(o.isType("slider")&&!o.settings.rewind||(this._o=!0,o.index=e),s.emit("run.start",t)):r?o.index-=Math.min(o.index,y(n)):o.index--;break;case"=":o.index=n}},isStart:function(){return 0===o.index},isEnd:function(){return o.index===this.length},isOffset:function(t){return this._o&&this.move.direction===t}};return v(t,"move",{get:function(){return this._m},set:function(t){this._m={direction:t.substr(0,1),steps:t.substr(1)?t.substr(1):0}}}),v(t,"length",{get:function(){var t=o.settings,e=n.Html.slides.length;return t.perView>e?0:o.isType("slider")&&"center"!==t.focusAt&&t.bound?e-1-(y(t.perView)-1)+y(t.focusAt):e-1}}),v(t,"offset",{get:function(){return this._o}}),t},Swipe:function(d,h,v){var n=new S,p=0,m=0,g=0,i=!1,t={mount:function(){this.bindSwipeStart()},start:function(t){if(!i&&!d.disabled){this.disable();var e=this.touches(t);p=null,m=y(e.pageX),g=y(e.pageY),this.bindSwipeMove(),this.bindSwipeEnd(),v.emit("swipe.start")}},move:function(t){if(!d.disabled){var e=d.settings,n=e.touchAngle,i=e.touchRatio,r=e.classes,o=this.touches(t),s=y(o.pageX)-m,u=y(o.pageY)-g,a=Math.abs(s<<2),c=Math.abs(u<<2),l=(a+c)*(a+c),f=c*c;if(p=Math.asin(f/l),h.Move.make(s*parseFloat(i)),!(180*p/Math.PI"+s))):h.Move.make(),h.Html.root.classList.remove(e.classes.dragging),this.unbindSwipeMove(),this.unbindSwipeEnd(),v.emit("swipe.end")}},bindSwipeStart:function(){var e=this,t=d.settings;t.swipeThreshold&&n.on(O[0],h.Html.wrapper,function(t){e.start(t)},{passive:!0}),t.dragThreshold&&n.on(O[1],h.Html.wrapper,function(t){e.start(t)})},unbindSwipeStart:function(){n.off(O[0],h.Html.wrapper),n.off(O[1],h.Html.wrapper)},bindSwipeMove:function(){var e=this;n.on(A,h.Html.wrapper,b(function(t){e.move(t)},d.settings.throttle),{passive:!0})},unbindSwipeMove:function(){n.off(A,h.Html.wrapper)},bindSwipeEnd:function(){var e=this;n.on(C,h.Html.wrapper,function(t){e.end(t)})},unbindSwipeEnd:function(){n.off(C,h.Html.wrapper)},touches:function(t){return-1")),37===t.keyCode&&e.Run.make(e.Direction.resolve("<"))}};return n.on(["destroy","update"],function(){r.unbind()}),n.on("update",function(){r.mount()}),n.on("destroy",function(){i.destroy()}),r},Autoplay:function(e,n,t){var i=new S,r={mount:function(){this.start(),e.settings.hoverpause&&this.bind()},start:function(){var t=this;e.settings.autoplay&&l(this._i)&&(this._i=setInterval(function(){t.stop(),n.Run.make(">"),t.start()},this.time))},stop:function(){this._i=clearInterval(this._i)},bind:function(){var t=this;i.on("mouseover",n.Html.root,function(){t.stop()}),i.on("mouseout",n.Html.root,function(){t.start()})},unbind:function(){i.off(["mouseover","mouseout"],n.Html.root)}};return v(r,"time",{get:function(){var t=n.Html.slides[e.index].getAttribute("data-glide-autoplay");return y(t||e.settings.autoplay)}}),t.on(["destroy","update"],function(){r.unbind()}),t.on(["run.before","pause","destroy","swipe.start","update"],function(){r.stop()}),t.on(["run.after","play","swipe.end"],function(){r.start()}),t.on("update",function(){r.mount()}),t.on("destroy",function(){i.destroy()}),r},Breakpoints:function(t,e,n){var i=new S,r=t.settings,o=z(r.breakpoints),s=a({},r),u={match:function(t){if(void 0!==window.matchMedia)for(var e in t)if(t.hasOwnProperty(e)&&window.matchMedia("(max-width: "+e+"px)").matches)return t[e];return s}};return a(r,u.match(o)),i.on("resize",window,b(function(){t.settings=d(r,u.match(o))},t.settings.throttle)),n.on("update",function(){o=z(o),s=a({},r)}),n.on("destroy",function(){i.off("resize",window)}),u}};return function(t){function e(){return r(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,p),o(e,[{key:"mount",value:function(){var t=0":"<","<":">","=":"="};function t(t,e){return{modify:function(t){return e.Direction.is("rtl")?-t:t}}}function x(i,r,o){var s=[function(e,n){return{modify:function(t){return t+n.Gaps.value*e.index}}},function(t,e){return{modify:function(t){return t+e.Clones.grow/2}}},function(n,i){return{modify:function(t){if(0<=n.settings.focusAt){var e=i.Peek.value;return u(e)?t-e.before:t-e}return t}}},function(o,s){return{modify:function(t){var e=s.Gaps.value,n=s.Sizes.width,i=o.settings.focusAt,r=s.Sizes.slideWidth;return"center"===i?t-(n/2-r/2):t-r*i-e*i}}}].concat(i._t,[t]);return{mutate:function(t){for(var e=0;e")?(o.Transition.after(function(){s.emit("translate.jump"),u.set(0)}),u.set(i*n+e*n)):u.set(t.movement)}),s.on("destroy",function(){u.remove()}),u},Transition:function(n,e,t){var i=!1,r={compose:function(t){var e=n.settings;return i?t+" 0ms "+e.animationTimingFunc:t+" "+this.duration+"ms "+e.animationTimingFunc},set:function(){var t=0"))&&(e._o=!1,s.emit("run.offset",e.move)),s.emit("run.after",e.move),o.enable()}))},calculate:function(){var t=this.move,e=this.length,n=t.steps,i=t.direction,r="number"==typeof y(n)&&0!==y(n);switch(i){case">":">"===n?o.index=e:this.isEnd()?(o.isType("slider")&&!o.settings.rewind||(this._o=!0,o.index=0),s.emit("run.end",t)):r?o.index+=Math.min(e-o.index,-y(n)):o.index++;break;case"<":"<"===n?o.index=0:this.isStart()?(o.isType("slider")&&!o.settings.rewind||(this._o=!0,o.index=e),s.emit("run.start",t)):r?o.index-=Math.min(o.index,y(n)):o.index--;break;case"=":o.index=n}},isStart:function(){return 0===o.index},isEnd:function(){return o.index===this.length},isOffset:function(t){return this._o&&this.move.direction===t}};return v(t,"move",{get:function(){return this._m},set:function(t){this._m={direction:t.substr(0,1),steps:t.substr(1)?t.substr(1):0}}}),v(t,"length",{get:function(){var t=o.settings,e=n.Html.slides.length;return t.perView>e?0:o.isType("slider")&&"center"!==t.focusAt&&t.bound?e-1-(y(t.perView)-1)+y(t.focusAt):e-1}}),v(t,"offset",{get:function(){return this._o}}),t},Swipe:function(d,h,v){var n=new S,p=0,m=0,g=0,i=!1,t={mount:function(){this.bindSwipeStart()},start:function(t){if(!i&&!d.disabled){this.disable();var e=this.touches(t);p=null,m=y(e.pageX),g=y(e.pageY),this.bindSwipeMove(),this.bindSwipeEnd(),v.emit("swipe.start")}},move:function(t){if(!d.disabled){var e=d.settings,n=e.touchAngle,i=e.touchRatio,r=e.classes,o=this.touches(t),s=y(o.pageX)-m,u=y(o.pageY)-g,a=Math.abs(s<<2),c=Math.abs(u<<2),l=(a+c)*(a+c),f=c*c;if(p=Math.asin(f/l),h.Move.make(s*parseFloat(i)),!(180*p/Math.PI"+s))):h.Move.make(),h.Html.root.classList.remove(e.classes.dragging),this.unbindSwipeMove(),this.unbindSwipeEnd(),v.emit("swipe.end")}},bindSwipeStart:function(){var e=this,t=d.settings;t.swipeThreshold&&n.on(O[0],h.Html.wrapper,function(t){e.start(t)}),t.dragThreshold&&n.on(O[1],h.Html.wrapper,function(t){e.start(t)})},unbindSwipeStart:function(){n.off(O[0],h.Html.wrapper),n.off(O[1],h.Html.wrapper)},bindSwipeMove:function(){var e=this;n.on(A,h.Html.wrapper,b(function(t){e.move(t)},d.settings.throttle))},unbindSwipeMove:function(){n.off(A,h.Html.wrapper)},bindSwipeEnd:function(){var e=this;n.on(C,h.Html.wrapper,function(t){e.end(t)})},unbindSwipeEnd:function(){n.off(C,h.Html.wrapper)},touches:function(t){return-1")),37===t.keyCode&&e.Run.make(e.Direction.resolve("<"))}};return n.on(["destroy","update"],function(){r.unbind()}),n.on("update",function(){r.mount()}),n.on("destroy",function(){i.destroy()}),r},Autoplay:function(e,n,t){var i=new S,r={mount:function(){this.start(),e.settings.hoverpause&&this.bind()},start:function(){var t=this;e.settings.autoplay&&l(this._i)&&(this._i=setInterval(function(){t.stop(),n.Run.make(">"),t.start()},this.time))},stop:function(){this._i=clearInterval(this._i)},bind:function(){var t=this;i.on("mouseover",n.Html.root,function(){t.stop()}),i.on("mouseout",n.Html.root,function(){t.start()})},unbind:function(){i.off(["mouseover","mouseout"],n.Html.root)}};return v(r,"time",{get:function(){var t=n.Html.slides[e.index].getAttribute("data-glide-autoplay");return y(t||e.settings.autoplay)}}),t.on(["destroy","update"],function(){r.unbind()}),t.on(["run.before","pause","destroy","swipe.start","update"],function(){r.stop()}),t.on(["run.after","play","swipe.end"],function(){r.start()}),t.on("update",function(){r.mount()}),t.on("destroy",function(){i.destroy()}),r},Breakpoints:function(t,e,n){var i=new S,r=t.settings,o=z(r.breakpoints),s=a({},r),u={match:function(t){if(void 0!==window.matchMedia)for(var e in t)if(t.hasOwnProperty(e)&&window.matchMedia("(max-width: "+e+"px)").matches)return t[e];return s}};return a(r,u.match(o)),i.on("resize",window,b(function(){t.settings=d(r,u.match(o))},t.settings.throttle)),n.on("update",function(){o=z(o),s=a({},r)}),n.on("destroy",function(){i.off("resize",window)}),u}};return function(t){function e(){return r(this,e),function(t,e){if(!t)throw new ReferenceError("this hasn't been initialised - super() hasn't been called");return!e||"object"!=typeof e&&"function"!=typeof e?t:e}(this,(e.__proto__||Object.getPrototypeOf(e)).apply(this,arguments))}return function(t,e){if("function"!=typeof e&&null!==e)throw new TypeError("Super expression must either be null or a function, not "+typeof e);t.prototype=Object.create(e&&e.prototype,{constructor:{value:t,enumerable:!1,writable:!0,configurable:!0}}),e&&(Object.setPrototypeOf?Object.setPrototypeOf(t,e):t.__proto__=e)}(e,p),o(e,[{key:"mount",value:function(){var t=0 (http://jedrzejchalubek.com/) * Released under the MIT License. */ @@ -1151,16 +1151,6 @@ var MARGIN_TYPE = { function Gaps (Glide, Components, Events) { var Gaps = { - /** - * Setups gap value based on settings. - * - * @return {Void} - */ - mount: function mount() { - this.value = Glide.settings.gap; - }, - - /** * Applies gaps between slides. First and last * slides do not receive it's edge margins. @@ -1211,18 +1201,7 @@ function Gaps (Glide, Components, Events) { * @returns {Number} */ get: function get() { - return Gaps._v; - }, - - - /** - * Sets value of the gap. - * - * @param {String} value - * @return {Void} - */ - set: function set(value) { - Gaps._v = toInt(value); + return toInt(Glide.settings.gap); } }); @@ -1252,14 +1231,6 @@ function Gaps (Glide, Components, Events) { } }); - /** - * Remount component: - * - on updating via API, to update gap value - */ - Events.on('update', function () { - Gaps.mount(); - }); - /** * Apply calculated gaps: * - after building, so slides (including clones) will receive proper margins @@ -2697,7 +2668,7 @@ function swipe (Glide, Components, Events) { if (settings.swipeThreshold) { Binder.on(START_EVENTS[0], Components.Html.wrapper, function (event) { _this.start(event); - }, { passive: true }); + }); } if (settings.dragThreshold) { @@ -2729,7 +2700,7 @@ function swipe (Glide, Components, Events) { Binder.on(MOVE_EVENTS, Components.Html.wrapper, throttle(function (event) { _this2.move(event); - }, Glide.settings.throttle), { passive: true }); + }, Glide.settings.throttle)); }, diff --git a/package.json b/package.json index 88f6ef3d..9080cf0e 100755 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "@glidejs/glide", - "version": "3.2.2", + "version": "3.2.3", "description": "Glide.js is a dependency-free JavaScript ES6 slider and carousel. It’s lightweight, flexible and fast. Designed to slide. No less, no more", "author": "Jędrzej Chałubek (http://jedrzejchalubek.com/)", "homepage": "https://glidejs.com",