New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

veams-plugin-media-query-handler

Package Overview
Dependencies
Maintainers
3
Versions
3
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

veams-plugin-media-query-handler - npm Package Compare versions

Comparing version 1.0.1 to 1.0.2

3

CHANGELOG.md

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

### v1.0.2
- Trigger resize event on resize without comparing width
### v1.0.1

@@ -2,0 +5,0 @@ - Update description

6

lib/index.js

@@ -112,6 +112,4 @@ (function webpackUniversalModuleDefinition(root, factory) {

if (width !== Veams.detections.width) {
Veams.detections.width = width;
Veams.Vent.trigger(Veams.EVENTS.resize, e);
}
Veams.detections.width = width;
Veams.Vent.trigger(Veams.EVENTS.resize, e);
}, this.options.delay);

@@ -118,0 +116,0 @@ }

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

!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("index",[],t):"object"==typeof exports?exports.index=t():(e.index=e.index||{},e.index.index=t())}(this,function(){return function(e){function t(n){if(i[n])return i[n].exports;var r=i[n]={exports:{},id:n,loaded:!1};return e[n].call(r.exports,r,r.exports,t),r.loaded=!0,r.exports}var i={};return t.m=e,t.c=i,t.p="",t(0)}([function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var i={options:{mediaQueryProp:"font-family",delay:300},pluginName:"MediaQueryHandler",initialize:function(e,t){var i=this,n=document.querySelectorAll("head");t&&(this.options=e.helpers.extend(this.options,t||{})),e.currentMedia=window.getComputedStyle(n[0],null).getPropertyValue(this.options.mediaQueryProp),e.Vent||console.info("VeamsMediaQueryHandler :: In order to work properly with the VeamsMediaQueryHandler plugin you should add the VeamsVent plugin!"),window.onresize=e.helpers.throttle(function(t){var r=window.getComputedStyle(n[0],null).getPropertyValue(i.options.mediaQueryProp),o=window.innerWidth;if(r!==e.currentMedia){var d=e.currentMedia;e.currentMedia=r,console.info("VeamsMediaQueryHandler :: Current media is "+e.currentMedia),e.Vent&&e.Vent.trigger(e.EVENTS.mediachange,{type:e.EVENTS.mediachange,currentMedia:r,oldMedia:d})}o!==e.detections.width&&(e.detections.width=o,e.Vent.trigger(e.EVENTS.resize,t))},this.options.delay)}};t["default"]=i,e.exports=t["default"]}])});
!function(e,t){"object"==typeof exports&&"object"==typeof module?module.exports=t():"function"==typeof define&&define.amd?define("index",[],t):"object"==typeof exports?exports.index=t():(e.index=e.index||{},e.index.index=t())}(this,function(){return function(e){function t(r){if(n[r])return n[r].exports;var i=n[r]={exports:{},id:r,loaded:!1};return e[r].call(i.exports,i,i.exports,t),i.loaded=!0,i.exports}var n={};return t.m=e,t.c=n,t.p="",t(0)}([function(e,t){"use strict";Object.defineProperty(t,"__esModule",{value:!0});var n={options:{mediaQueryProp:"font-family",delay:300},pluginName:"MediaQueryHandler",initialize:function(e,t){var n=this,r=document.querySelectorAll("head");t&&(this.options=e.helpers.extend(this.options,t||{})),e.currentMedia=window.getComputedStyle(r[0],null).getPropertyValue(this.options.mediaQueryProp),e.Vent||console.info("VeamsMediaQueryHandler :: In order to work properly with the VeamsMediaQueryHandler plugin you should add the VeamsVent plugin!"),window.onresize=e.helpers.throttle(function(t){var i=window.getComputedStyle(r[0],null).getPropertyValue(n.options.mediaQueryProp),o=window.innerWidth;if(i!==e.currentMedia){var d=e.currentMedia;e.currentMedia=i,console.info("VeamsMediaQueryHandler :: Current media is "+e.currentMedia),e.Vent&&e.Vent.trigger(e.EVENTS.mediachange,{type:e.EVENTS.mediachange,currentMedia:i,oldMedia:d})}e.detections.width=o,e.Vent.trigger(e.EVENTS.resize,t)},this.options.delay)}};t["default"]=n,e.exports=t["default"]}])});
//# sourceMappingURL=index.min.js.map
{
"name": "veams-plugin-media-query-handler",
"version": "1.0.1",
"version": "1.0.2",
"description": "The VeamsMediaQueryHandler plugin provides to you a possibility to get the current media query name from your css.",

@@ -5,0 +5,0 @@ "main": "lib/index.js",

@@ -50,6 +50,4 @@ 'use strict';

if (width !== Veams.detections.width) {
Veams.detections.width = width;
Veams.Vent.trigger(Veams.EVENTS.resize, e);
}
Veams.detections.width = width;
Veams.Vent.trigger(Veams.EVENTS.resize, e);
}, this.options.delay);

@@ -56,0 +54,0 @@ }

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