piral-debug-utils
Advanced tools
Comparing version 0.14.0-pre.3079 to 0.14.0-unstable.3105
@@ -207,3 +207,3 @@ import { DebugTracker } from './DebugTracker'; | ||
name: ev.type.replace('piral-', ''), | ||
args: ev.detail.arg, | ||
args: decycle(ev.detail.arg), | ||
time: Date.now(), | ||
@@ -210,0 +210,0 @@ }); |
@@ -25,40 +25,46 @@ import * as React from 'react'; | ||
if (sibling && active) { | ||
const style = container.current.style; | ||
const target = container.current.parentNode; | ||
const mouseIn = () => { | ||
style.display = 'block'; | ||
style.left = '0px'; | ||
style.top = '0px'; | ||
style.bottom = '0px'; | ||
style.right = '0px'; | ||
const targetRect = sibling.getBoundingClientRect(); | ||
const sourceRect = container.current.getBoundingClientRect(); | ||
style.left = targetRect.left - sourceRect.left + 'px'; | ||
style.top = targetRect.top - sourceRect.top + 'px'; | ||
style.bottom = -(targetRect.bottom - sourceRect.bottom) + 'px'; | ||
style.right = -(targetRect.right - sourceRect.right) + 'px'; | ||
if (container.current && sibling) { | ||
const style = container.current.style; | ||
style.display = 'block'; | ||
style.left = '0px'; | ||
style.top = '0px'; | ||
style.bottom = '0px'; | ||
style.right = '0px'; | ||
const targetRect = sibling.getBoundingClientRect(); | ||
const sourceRect = container.current.getBoundingClientRect(); | ||
style.left = targetRect.left - sourceRect.left + 'px'; | ||
style.top = targetRect.top - sourceRect.top + 'px'; | ||
style.bottom = -(targetRect.bottom - sourceRect.bottom) + 'px'; | ||
style.right = -(targetRect.right - sourceRect.right) + 'px'; | ||
} | ||
}; | ||
const mouseOut = () => { | ||
style.display = 'none'; | ||
if (container.current) { | ||
const style = container.current.style; | ||
style.display = 'none'; | ||
} | ||
}; | ||
const append = () => { | ||
if (!force) { | ||
if (force) { | ||
mouseIn(); | ||
} | ||
else if (sibling) { | ||
sibling.addEventListener('mouseover', mouseIn); | ||
sibling.addEventListener('mouseout', mouseOut); | ||
} | ||
else { | ||
mouseIn(); | ||
} | ||
}; | ||
const remove = () => { | ||
if (!force) { | ||
if (force) { | ||
mouseOut(); | ||
} | ||
else if (sibling) { | ||
sibling.removeEventListener('mouseover', mouseIn); | ||
sibling.removeEventListener('mouseout', mouseOut); | ||
} | ||
else { | ||
mouseOut(); | ||
} | ||
}; | ||
const observer = new MutationObserver(() => { | ||
const newSibling = container.current.nextElementSibling; | ||
var _a; | ||
const newSibling = (_a = container.current) === null || _a === void 0 ? void 0 : _a.nextElementSibling; | ||
if (newSibling !== sibling) { | ||
@@ -65,0 +71,0 @@ remove(); |
@@ -210,3 +210,3 @@ "use strict"; | ||
name: ev.type.replace('piral-', ''), | ||
args: ev.detail.arg, | ||
args: (0, decycle_1.decycle)(ev.detail.arg), | ||
time: Date.now(), | ||
@@ -213,0 +213,0 @@ }); |
@@ -28,40 +28,46 @@ "use strict"; | ||
if (sibling && active) { | ||
const style = container.current.style; | ||
const target = container.current.parentNode; | ||
const mouseIn = () => { | ||
style.display = 'block'; | ||
style.left = '0px'; | ||
style.top = '0px'; | ||
style.bottom = '0px'; | ||
style.right = '0px'; | ||
const targetRect = sibling.getBoundingClientRect(); | ||
const sourceRect = container.current.getBoundingClientRect(); | ||
style.left = targetRect.left - sourceRect.left + 'px'; | ||
style.top = targetRect.top - sourceRect.top + 'px'; | ||
style.bottom = -(targetRect.bottom - sourceRect.bottom) + 'px'; | ||
style.right = -(targetRect.right - sourceRect.right) + 'px'; | ||
if (container.current && sibling) { | ||
const style = container.current.style; | ||
style.display = 'block'; | ||
style.left = '0px'; | ||
style.top = '0px'; | ||
style.bottom = '0px'; | ||
style.right = '0px'; | ||
const targetRect = sibling.getBoundingClientRect(); | ||
const sourceRect = container.current.getBoundingClientRect(); | ||
style.left = targetRect.left - sourceRect.left + 'px'; | ||
style.top = targetRect.top - sourceRect.top + 'px'; | ||
style.bottom = -(targetRect.bottom - sourceRect.bottom) + 'px'; | ||
style.right = -(targetRect.right - sourceRect.right) + 'px'; | ||
} | ||
}; | ||
const mouseOut = () => { | ||
style.display = 'none'; | ||
if (container.current) { | ||
const style = container.current.style; | ||
style.display = 'none'; | ||
} | ||
}; | ||
const append = () => { | ||
if (!force) { | ||
if (force) { | ||
mouseIn(); | ||
} | ||
else if (sibling) { | ||
sibling.addEventListener('mouseover', mouseIn); | ||
sibling.addEventListener('mouseout', mouseOut); | ||
} | ||
else { | ||
mouseIn(); | ||
} | ||
}; | ||
const remove = () => { | ||
if (!force) { | ||
if (force) { | ||
mouseOut(); | ||
} | ||
else if (sibling) { | ||
sibling.removeEventListener('mouseover', mouseIn); | ||
sibling.removeEventListener('mouseout', mouseOut); | ||
} | ||
else { | ||
mouseOut(); | ||
} | ||
}; | ||
const observer = new MutationObserver(() => { | ||
const newSibling = container.current.nextElementSibling; | ||
var _a; | ||
const newSibling = (_a = container.current) === null || _a === void 0 ? void 0 : _a.nextElementSibling; | ||
if (newSibling !== sibling) { | ||
@@ -68,0 +74,0 @@ remove(); |
{ | ||
"name": "piral-debug-utils", | ||
"version": "0.14.0-pre.3079", | ||
"version": "0.14.0-unstable.3105", | ||
"description": "Utilities for debugging Piral instances.", | ||
@@ -41,3 +41,3 @@ "keywords": [ | ||
"devDependencies": { | ||
"piral-base": "^0.14.0-pre.3079" | ||
"piral-base": "^0.14.0-unstable.3105" | ||
}, | ||
@@ -49,3 +49,3 @@ "peerDependencies": { | ||
}, | ||
"gitHead": "d9d31abfd290494a188209094b5fe54b86aedf5a" | ||
"gitHead": "f0732b5a8decdddc5abd7c50a05af59dbcb03912" | ||
} |
@@ -266,3 +266,3 @@ import { DebugTracker } from './DebugTracker'; | ||
name: ev.type.replace('piral-', ''), | ||
args: ev.detail.arg, | ||
args: decycle(ev.detail.arg), | ||
time: Date.now(), | ||
@@ -269,0 +269,0 @@ }); |
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
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
126110
2241