Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

vue-resize

Package Overview
Dependencies
Maintainers
1
Versions
20
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

vue-resize - npm Package Compare versions

Comparing version 0.4.4 to 0.4.5

.circleci/config.yml

24

dist/vue-resize.esm.js

@@ -42,15 +42,17 @@ function getInternetExplorerVersion() {

methods: {
notify: function notify() {
this.$emit('notify');
},
addResizeHandlers: function addResizeHandlers() {
this._resizeObject.contentDocument.defaultView.addEventListener('resize', this.notify);
compareAndNotify: function compareAndNotify() {
if (this._w !== this.$el.offsetWidth || this._h !== this.$el.offsetHeight) {
this.notify();
this._w = this.$el.offsetWidth;
this._h = this.$el.offsetHeight;
this.$emit('notify');
}
},
addResizeHandlers: function addResizeHandlers() {
this._resizeObject.contentDocument.defaultView.addEventListener('resize', this.compareAndNotify);
this.compareAndNotify();
},
removeResizeHandlers: function removeResizeHandlers() {
if (this._resizeObject && this._resizeObject.onload) {
if (!isIE && this._resizeObject.contentDocument) {
this._resizeObject.contentDocument.defaultView.removeEventListener('resize', this.notify);
this._resizeObject.contentDocument.defaultView.removeEventListener('resize', this.compareAndNotify);
}

@@ -72,3 +74,2 @@ delete this._resizeObject.onload;

this._resizeObject = object;
object.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;');
object.setAttribute('aria-hidden', 'true');

@@ -94,12 +95,9 @@ object.setAttribute('tabindex', -1);

Vue.component('resize-observer', ResizeObserver);
/* -- Add more components here -- */
Vue.component('ResizeObserver', ResizeObserver);
}
/* -- Plugin definition & Auto-install -- */
/* You shouldn't have to modify the code below */
// Plugin
var plugin = {
// eslint-disable-next-line no-undef
version: "0.4.4",
version: "0.4.5",
install: install

@@ -106,0 +104,0 @@ };

@@ -1,1 +0,1 @@

var VueResize=function(e){"use strict";function t(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var n=e.indexOf("Edge/");return n>0?parseInt(e.substring(n+5,e.indexOf(".",n)),10):-1}function i(){i.init||(i.init=!0,s=-1!==t())}function n(e){e.component("resize-observer",r)}var s=void 0,r={render:function(){var e=this,t=e.$createElement;return(e._self._c||t)("div",{staticClass:"resize-observer",attrs:{tabindex:"-1"}})},staticRenderFns:[],_scopeId:"data-v-b329ee4c",name:"resize-observer",methods:{notify:function(){this.$emit("notify")},addResizeHandlers:function(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.notify),this._w===this.$el.offsetWidth&&this._h===this.$el.offsetHeight||this.notify()},removeResizeHandlers:function(){this._resizeObject&&this._resizeObject.onload&&(!s&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.notify),delete this._resizeObject.onload)}},mounted:function(){var e=this;i(),this.$nextTick(function(){e._w=e.$el.offsetWidth,e._h=e.$el.offsetHeight});var t=document.createElement("object");this._resizeObject=t,t.setAttribute("style","display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;"),t.setAttribute("aria-hidden","true"),t.setAttribute("tabindex",-1),t.onload=this.addResizeHandlers,t.type="text/html",s&&this.$el.appendChild(t),t.data="about:blank",s||this.$el.appendChild(t)},beforeDestroy:function(){this.removeResizeHandlers()}},o={version:"0.4.4",install:n},d=null;return"undefined"!=typeof window?d=window.Vue:"undefined"!=typeof global&&(d=global.Vue),d&&d.use(o),e.install=n,e.ResizeObserver=r,e.default=o,e}({});
var VueResize=function(e){"use strict";var t=void 0;function i(){i.init||(i.init=!0,t=-1!==function(){var e=window.navigator.userAgent,t=e.indexOf("MSIE ");if(t>0)return parseInt(e.substring(t+5,e.indexOf(".",t)),10);if(e.indexOf("Trident/")>0){var i=e.indexOf("rv:");return parseInt(e.substring(i+3,e.indexOf(".",i)),10)}var n=e.indexOf("Edge/");return n>0?parseInt(e.substring(n+5,e.indexOf(".",n)),10):-1}())}var n={render:function(){var e=this.$createElement;return(this._self._c||e)("div",{staticClass:"resize-observer",attrs:{tabindex:"-1"}})},staticRenderFns:[],_scopeId:"data-v-b329ee4c",name:"resize-observer",methods:{compareAndNotify:function(){this._w===this.$el.offsetWidth&&this._h===this.$el.offsetHeight||(this._w=this.$el.offsetWidth,this._h=this.$el.offsetHeight,this.$emit("notify"))},addResizeHandlers:function(){this._resizeObject.contentDocument.defaultView.addEventListener("resize",this.compareAndNotify),this.compareAndNotify()},removeResizeHandlers:function(){this._resizeObject&&this._resizeObject.onload&&(!t&&this._resizeObject.contentDocument&&this._resizeObject.contentDocument.defaultView.removeEventListener("resize",this.compareAndNotify),delete this._resizeObject.onload)}},mounted:function(){var e=this;i(),this.$nextTick(function(){e._w=e.$el.offsetWidth,e._h=e.$el.offsetHeight});var n=document.createElement("object");this._resizeObject=n,n.setAttribute("aria-hidden","true"),n.setAttribute("tabindex",-1),n.onload=this.addResizeHandlers,n.type="text/html",t&&this.$el.appendChild(n),n.data="about:blank",t||this.$el.appendChild(n)},beforeDestroy:function(){this.removeResizeHandlers()}};function s(e){e.component("resize-observer",n),e.component("ResizeObserver",n)}var r={version:"0.4.5",install:s},o=null;return"undefined"!=typeof window?o=window.Vue:"undefined"!=typeof global&&(o=global.Vue),o&&o.use(r),e.install=s,e.ResizeObserver=n,e.default=r,e}({});

@@ -48,15 +48,17 @@ (function (global, factory) {

methods: {
notify: function notify() {
this.$emit('notify');
},
addResizeHandlers: function addResizeHandlers() {
this._resizeObject.contentDocument.defaultView.addEventListener('resize', this.notify);
compareAndNotify: function compareAndNotify() {
if (this._w !== this.$el.offsetWidth || this._h !== this.$el.offsetHeight) {
this.notify();
this._w = this.$el.offsetWidth;
this._h = this.$el.offsetHeight;
this.$emit('notify');
}
},
addResizeHandlers: function addResizeHandlers() {
this._resizeObject.contentDocument.defaultView.addEventListener('resize', this.compareAndNotify);
this.compareAndNotify();
},
removeResizeHandlers: function removeResizeHandlers() {
if (this._resizeObject && this._resizeObject.onload) {
if (!isIE && this._resizeObject.contentDocument) {
this._resizeObject.contentDocument.defaultView.removeEventListener('resize', this.notify);
this._resizeObject.contentDocument.defaultView.removeEventListener('resize', this.compareAndNotify);
}

@@ -78,3 +80,2 @@ delete this._resizeObject.onload;

this._resizeObject = object;
object.setAttribute('style', 'display: block; position: absolute; top: 0; left: 0; height: 100%; width: 100%; overflow: hidden; pointer-events: none; z-index: -1;');
object.setAttribute('aria-hidden', 'true');

@@ -100,12 +101,9 @@ object.setAttribute('tabindex', -1);

Vue.component('resize-observer', ResizeObserver);
/* -- Add more components here -- */
Vue.component('ResizeObserver', ResizeObserver);
}
/* -- Plugin definition & Auto-install -- */
/* You shouldn't have to modify the code below */
// Plugin
var plugin = {
// eslint-disable-next-line no-undef
version: "0.4.4",
version: "0.4.5",
install: install

@@ -112,0 +110,0 @@ };

{
"name": "vue-resize-demo",
"version": "1.0.0",
"private": true,
"description": "Demo for vue-resize",
"version": "1.0.0",
"author": "Guillaume Chau <guillaume.b.chau@gmail.com>",
"private": true,
"scripts": {
"dev": "cross-env NODE_ENV=development webpack-dev-server --open --inline --hot",
"build": "cross-env NODE_ENV=production webpack --progress --hide-modules"
"serve": "vue-cli-service serve",
"build": "vue-cli-service build",
"lint": "vue-cli-service lint",
"test:e2e": "vue-cli-service test:e2e",
"test": "vue-cli-service test:e2e --headless"
},
"dependencies": {
"vue": "^2.1.0"
"vue": "^2.5.21"
},
"devDependencies": {
"babel-core": "^6.0.0",
"babel-loader": "^7.1.2",
"babel-preset-env": "^1.6.1",
"cross-env": "^5.0.5",
"css-loader": "^0.28.7",
"file-loader": "^1.1.5",
"style-loader": "^0.19.0",
"vue-loader": "^13.0.0",
"vue-template-compiler": "^2.1.0",
"webpack": "^3.6.0",
"webpack-dev-server": "^2.8.2"
}
"@vue/cli-plugin-babel": "^3.2.0",
"@vue/cli-plugin-e2e-cypress": "^3.2.0",
"@vue/cli-plugin-eslint": "^3.2.1",
"@vue/cli-service": "^3.2.0",
"@vue/eslint-config-standard": "^4.0.0",
"stylus": "^0.54.5",
"stylus-loader": "^3.0.2",
"vue-template-compiler": "^2.5.21"
},
"postcss": {
"plugins": {
"autoprefixer": {}
}
},
"browserslist": [
"> 1%",
"last 2 versions",
"not ie <= 8"
],
"root": true
}

@@ -12,4 +12,4 @@ import '../../dist/vue-resize.css'

new Vue({
el: '#app',
render: h => h(App),
el: '#app',
render: h => h(App),
})
{
"name": "vue-resize",
"description": "Detect DOM element resizing",
"version": "0.4.4",
"version": "0.4.5",
"author": {

@@ -19,8 +19,9 @@ "name": "Guillaume Chau",

"scripts": {
"build": "npm run build:browser && npm run build:es && npm run build:umd",
"build": "yarn run build:browser && yarn run build:es && yarn run build:umd",
"build:browser": "rollup --config build/rollup.config.browser.js",
"build:es": "rollup --config build/rollup.config.es.js",
"build:umd": "rollup --config build/rollup.config.umd.js",
"prepublishOnly": "npm run build",
"dev": "cross-env NODE_ENV=development rollup --config build/rollup.config.es.js --watch"
"prepublishOnly": "yarn run test",
"dev": "cross-env NODE_ENV=development rollup --config build/rollup.config.es.js --watch",
"test": "yarn run build && cd ./docs-src && yarn run test"
},

@@ -27,0 +28,0 @@ "watch": {

@@ -10,2 +10,20 @@ # vue-resize

<p>
<a href="https://www.patreon.com/akryum" target="_blank">
<img src="https://c5.patreon.com/external/logo/become_a_patron_button.png" alt="Become a Patreon">
</a>
</p>
## Sponsors
### Silver
<p align="center">
<a href="https://vueschool.io/" target="_blank">
<img src="https://vueschool.io/img/logo/vueschool_logo_multicolor.svg" alt="VueSchool logo" width="200px">
</a>
</p>
<br>
# Installation

@@ -12,0 +30,0 @@

@@ -6,3 +6,3 @@ import ResizeObserver from './components/ResizeObserver.vue'

Vue.component('resize-observer', ResizeObserver)
/* -- Add more components here -- */
Vue.component('ResizeObserver', ResizeObserver)
}

@@ -14,5 +14,2 @@

/* -- Plugin definition & Auto-install -- */
/* You shouldn't have to modify the code below */
// Plugin

@@ -19,0 +16,0 @@ const plugin = {

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

Sorry, the diff of this file is not supported yet

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc