Socket
Socket
Sign inDemoInstall

@storybook/addon-measure

Package Overview
Dependencies
58
Maintainers
27
Versions
907
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

Comparing version 1.3.0--canary.17.d15bbc2.0 to 1.3.0

12

CHANGELOG.md

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

# v1.3.0 (Thu Jun 24 2021)
#### 🚀 Enhancement
- update deps, prevent multi key combo trigger and measure on enable [#17](https://github.com/storybookjs/addon-measure/pull/17) ([@winkerVSbecks](https://github.com/winkerVSbecks))
#### Authors: 1
- Varun Vachhar ([@winkerVSbecks](https://github.com/winkerVSbecks))
---
# v1.2.4 (Tue Jun 15 2021)

@@ -2,0 +14,0 @@

5

dist/cjs/useHotKey.js

@@ -12,4 +12,6 @@ "use strict";

function useHotKey(updateGlobals, measureEnabled) {
function useHotKey(updateGlobals) {
var onKeyDown = function onKeyDown(event) {
event.stopPropagation();
if (!focusInInput(event) && event.altKey) {

@@ -30,2 +32,3 @@ if (event.key === "Alt") {

if (event.key === "Alt") {
event.stopPropagation();
updateGlobals({

@@ -32,0 +35,0 @@ measureEnabled: false

4

dist/cjs/withMeasure.js

@@ -53,5 +53,3 @@ "use strict";

document.addEventListener("mousemove", onMouseMove);
console.log("addEventListener — mousemove");
return function () {
console.log("removeEventListener — mousemove");
document.removeEventListener("mousemove", onMouseMove);

@@ -77,3 +75,3 @@ };

(0, _canvas.init)();
window.addEventListener("resize", onResize); // Draw the element below the point when first enabled
window.addEventListener("resize", onResize); // Draw the element below the pointer when first enabled

@@ -80,0 +78,0 @@ findAndDrawElement(pointer.x, pointer.y);

@@ -5,4 +5,6 @@ function focusInInput(event) {

export function useHotKey(updateGlobals, measureEnabled) {
export function useHotKey(updateGlobals) {
var onKeyDown = function onKeyDown(event) {
event.stopPropagation();
if (!focusInInput(event) && event.altKey) {

@@ -23,2 +25,3 @@ if (event.key === "Alt") {

if (event.key === "Alt") {
event.stopPropagation();
updateGlobals({

@@ -25,0 +28,0 @@ measureEnabled: false

@@ -40,5 +40,3 @@ /* eslint-env browser */

document.addEventListener("mousemove", onMouseMove);
console.log("addEventListener — mousemove");
return function () {
console.log("removeEventListener — mousemove");
document.removeEventListener("mousemove", onMouseMove);

@@ -64,3 +62,3 @@ };

init();
window.addEventListener("resize", onResize); // Draw the element below the point when first enabled
window.addEventListener("resize", onResize); // Draw the element below the pointer when first enabled

@@ -67,0 +65,0 @@ findAndDrawElement(pointer.x, pointer.y);

{
"name": "@storybook/addon-measure",
"version": "1.3.0--canary.17.d15bbc2.0",
"version": "1.3.0",
"description": "Inspect layouts by visualizing the box model",

@@ -5,0 +5,0 @@ "keywords": [

SocketSocket SOC 2 Logo

Product

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

Packages

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc