vue-progressive-image
Advanced tools
Comparing version 1.2.2 to 1.2.3
/*! | ||
* vue-progressive-image v1.2.2 | ||
* vue-progressive-image v1.2.3 | ||
* (c) 2017 Matteo Gabriele | ||
@@ -26,3 +26,3 @@ * Released under the ISC License. | ||
var style = __$styleInject("._component_t6cre_1 {\n position: relative;\n overflow: hidden;\n}\n\n._image_t6cre_6 {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 1;\n transition: opacity 1s;\n}\n\n._before_t6cre_15 {\n opacity: 1;\n}\n\n._enter_t6cre_19 {\n opacity: 0;\n}\n\n._placeholder_t6cre_23 {\n z-index: 0;\n\n /* this is needed so Safari keeps sharp edges */\n transform: scale(1)\n}\n", { "component": "_component_t6cre_1", "image": "_image_t6cre_6", "before": "_before_t6cre_15", "enter": "_enter_t6cre_19", "placeholder": "_placeholder_t6cre_23 _image_t6cre_6" }); | ||
var style = __$styleInject("._component_16a4v_1 {\n position: relative;\n overflow: hidden;\n}\n\n._image_16a4v_6 {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 1;\n transition: opacity 1s;\n transform: translateZ(0) scale(1);\n}\n\n._before_16a4v_16 {\n opacity: 1;\n}\n\n._enter_16a4v_20 {\n opacity: 0;\n}\n\n._placeholder_16a4v_24 {\n z-index: 0;\n\n /* this is needed so Safari keeps sharp edges */\n transform: scale(1);\n}\n", { "component": "_component_16a4v_1", "image": "_image_16a4v_6", "before": "_before_16a4v_16", "enter": "_enter_16a4v_20", "placeholder": "_placeholder_16a4v_24 _image_16a4v_6" }); | ||
@@ -29,0 +29,0 @@ /** |
/*! | ||
* vue-progressive-image v1.2.2 | ||
* vue-progressive-image v1.2.3 | ||
* (c) 2017 Matteo Gabriele | ||
@@ -30,3 +30,3 @@ * Released under the ISC License. | ||
var style = __$styleInject("._component_t6cre_1 {\n position: relative;\n overflow: hidden;\n}\n\n._image_t6cre_6 {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 1;\n transition: opacity 1s;\n}\n\n._before_t6cre_15 {\n opacity: 1;\n}\n\n._enter_t6cre_19 {\n opacity: 0;\n}\n\n._placeholder_t6cre_23 {\n z-index: 0;\n\n /* this is needed so Safari keeps sharp edges */\n transform: scale(1)\n}\n", { "component": "_component_t6cre_1", "image": "_image_t6cre_6", "before": "_before_t6cre_15", "enter": "_enter_t6cre_19", "placeholder": "_placeholder_t6cre_23 _image_t6cre_6" }); | ||
var style = __$styleInject("._component_16a4v_1 {\n position: relative;\n overflow: hidden;\n}\n\n._image_16a4v_6 {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 1;\n transition: opacity 1s;\n transform: translateZ(0) scale(1);\n}\n\n._before_16a4v_16 {\n opacity: 1;\n}\n\n._enter_16a4v_20 {\n opacity: 0;\n}\n\n._placeholder_16a4v_24 {\n z-index: 0;\n\n /* this is needed so Safari keeps sharp edges */\n transform: scale(1);\n}\n", { "component": "_component_16a4v_1", "image": "_image_16a4v_6", "before": "_before_16a4v_16", "enter": "_enter_16a4v_20", "placeholder": "_placeholder_16a4v_24 _image_16a4v_6" }); | ||
@@ -33,0 +33,0 @@ /** |
/*! | ||
* vue-progressive-image v1.2.2 | ||
* vue-progressive-image v1.2.3 | ||
* (c) 2017 Matteo Gabriele | ||
* Released under the ISC License. | ||
*/ | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VueProgressiveImage=t()}(this,function(){"use strict";function e(e,t){if("undefined"==typeof document)return t;e=e||"";var n=document.head||document.getElementsByTagName("head")[0],r=document.createElement("style");return r.type="text/css",r.styleSheet?r.styleSheet.cssText=e:r.appendChild(document.createTextNode(e)),n.appendChild(r),t}var t='<div :class="style.component">\n <div :style="wrapperStyle">\n <transition :enter-class="style.enter" :enter-active-class="style.before">\n <img v-if="shouldImageRender" :class="style.image" :src="image" :alt="alt">\n </transition>\n <img v-if="shouldPlaceholderRender" :class="style.placeholder" :style="placeholderStyle" :src="placeholderImage">\n </div>\n</div>\n',n=e("._component_t6cre_1 {\n position: relative;\n overflow: hidden;\n}\n\n._image_t6cre_6 {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 1;\n transition: opacity 1s;\n}\n\n._before_t6cre_15 {\n opacity: 1;\n}\n\n._enter_t6cre_19 {\n opacity: 0;\n}\n\n._placeholder_t6cre_23 {\n z-index: 0;\n\n /* this is needed so Safari keeps sharp edges */\n transform: scale(1)\n}\n",{component:"_component_t6cre_1",image:"_image_t6cre_6",before:"_before_t6cre_15",enter:"_enter_t6cre_19",placeholder:"_placeholder_t6cre_23 _image_t6cre_6"}),r=function(e){return"undefined"!=typeof e&&null!==e},i=function(e,i){return{name:"progressive-img",template:t,props:{src:{type:String,required:!0},placeholder:{type:String,required:!1},blur:{type:Number,required:!1},alt:{type:String,required:!1}},data:function(){return{options:i,style:n,defaultBlur:5,image:null,placeholderImage:null,aspectRatio:56.25}},computed:{shouldPlaceholderRender:function(){return this.placeholderImage},shouldImageRender:function(){return this.image},wrapperStyle:function(){return{paddingBottom:this.aspectRatio+"%"}},placeholderStyle:function(){var e=this.defaultBlur;return r(this.blur)?this.getBlurStyle(this.blur):r(this.options.blur)?this.getBlurStyle(this.options.blur):this.getBlurStyle(e)}},created:function(){this.handleImageLoading()},methods:{getBlurStyle:function(e){return 0===e?{}:{filter:"blur("+e+"px)"}},defineAspectRatio:function(e){var t=this,n=setInterval(function(){if(e.naturalWidth){clearInterval(n);var r=e.naturalHeight,i=e.naturalWidth;t.aspectRatio=r/i*100}},20)},loadImage:function(){var e=this,t=new Image;this.defineAspectRatio(t),t.onload=function(){setTimeout(function(){e.image=e.src},e.options.delay||0)},t.src=this.src},loadPlaceholder:function(){var e=this;if(this.placeholder||this.options.placeholder){var t=new Image,n=this.placeholder;this.options.placeholder&&!this.placeholder&&(n=this.options.placeholder),t.onload=function(){e.placeholderImage=n},t.src=n}},handleImageLoading:function(){this.loadPlaceholder(),this.loadImage()}}}},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e,t);e.component("progressive-img",n),e.component("progressive-image",n)},l={install:o};return l}); | ||
!function(e,t){"object"==typeof exports&&"undefined"!=typeof module?module.exports=t():"function"==typeof define&&define.amd?define(t):e.VueProgressiveImage=t()}(this,function(){"use strict";function e(e,t){if("undefined"==typeof document)return t;e=e||"";var n=document.head||document.getElementsByTagName("head")[0],a=document.createElement("style");return a.type="text/css",a.styleSheet?a.styleSheet.cssText=e:a.appendChild(document.createTextNode(e)),n.appendChild(a),t}var t='<div :class="style.component">\n <div :style="wrapperStyle">\n <transition :enter-class="style.enter" :enter-active-class="style.before">\n <img v-if="shouldImageRender" :class="style.image" :src="image" :alt="alt">\n </transition>\n <img v-if="shouldPlaceholderRender" :class="style.placeholder" :style="placeholderStyle" :src="placeholderImage">\n </div>\n</div>\n',n=e("._component_16a4v_1 {\n position: relative;\n overflow: hidden;\n}\n\n._image_16a4v_6 {\n position: absolute;\n top: 0;\n left: 0;\n width: 100%;\n z-index: 1;\n transition: opacity 1s;\n transform: translateZ(0) scale(1);\n}\n\n._before_16a4v_16 {\n opacity: 1;\n}\n\n._enter_16a4v_20 {\n opacity: 0;\n}\n\n._placeholder_16a4v_24 {\n z-index: 0;\n\n /* this is needed so Safari keeps sharp edges */\n transform: scale(1);\n}\n",{component:"_component_16a4v_1",image:"_image_16a4v_6",before:"_before_16a4v_16",enter:"_enter_16a4v_20",placeholder:"_placeholder_16a4v_24 _image_16a4v_6"}),a=function(e){return"undefined"!=typeof e&&null!==e},i=function(e,i){return{name:"progressive-img",template:t,props:{src:{type:String,required:!0},placeholder:{type:String,required:!1},blur:{type:Number,required:!1},alt:{type:String,required:!1}},data:function(){return{options:i,style:n,defaultBlur:5,image:null,placeholderImage:null,aspectRatio:56.25}},computed:{shouldPlaceholderRender:function(){return this.placeholderImage},shouldImageRender:function(){return this.image},wrapperStyle:function(){return{paddingBottom:this.aspectRatio+"%"}},placeholderStyle:function(){var e=this.defaultBlur;return a(this.blur)?this.getBlurStyle(this.blur):a(this.options.blur)?this.getBlurStyle(this.options.blur):this.getBlurStyle(e)}},created:function(){this.handleImageLoading()},methods:{getBlurStyle:function(e){return 0===e?{}:{filter:"blur("+e+"px)"}},defineAspectRatio:function(e){var t=this,n=setInterval(function(){if(e.naturalWidth){clearInterval(n);var a=e.naturalHeight,i=e.naturalWidth;t.aspectRatio=a/i*100}},20)},loadImage:function(){var e=this,t=new Image;this.defineAspectRatio(t),t.onload=function(){setTimeout(function(){e.image=e.src},e.options.delay||0)},t.src=this.src},loadPlaceholder:function(){var e=this;if(this.placeholder||this.options.placeholder){var t=new Image,n=this.placeholder;this.options.placeholder&&!this.placeholder&&(n=this.options.placeholder),t.onload=function(){e.placeholderImage=n},t.src=n}},handleImageLoading:function(){this.loadPlaceholder(),this.loadImage()}}}},o=function(e){var t=arguments.length>1&&void 0!==arguments[1]?arguments[1]:{},n=i(e,t);e.component("progressive-img",n),e.component("progressive-image",n)},r={install:o};return r}); |
{ | ||
"name": "vue-progressive-image", | ||
"version": "1.2.2", | ||
"version": "1.2.3", | ||
"description": "Vue progressive image loading plugin", | ||
@@ -5,0 +5,0 @@ "main": "dist/vue-progressive-image.js", |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
1400298
728