@lvce-editor/preview-sandbox-worker 1.9.0 → 2.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
|
@@ -1721,12 +1721,6 @@ const handleMousedownLocal = (uid, hdId, clientX, clientY) => {
|
|
|
1721
1721
|
return;
|
|
1722
1722
|
}
|
|
1723
1723
|
dispatchMousedownEvent(element, happyDomInstance.window, clientX, clientY);
|
|
1724
|
-
const elementMap = Object.create(null);
|
|
1725
|
-
set$1(uid, {
|
|
1726
|
-
document: happyDomInstance.document,
|
|
1727
|
-
elementMap,
|
|
1728
|
-
window: happyDomInstance.window
|
|
1729
|
-
});
|
|
1730
1724
|
};
|
|
1731
1725
|
const handleMousedown = (uid, hdId, clientX, clientY) => {
|
|
1732
1726
|
return handleMousedownLocal(uid, hdId, clientX, clientY);
|
|
@@ -1755,12 +1749,6 @@ const handleMousemoveLocal = (uid, hdId, clientX, clientY, x, y) => {
|
|
|
1755
1749
|
const adjustedClientX = clientX - x;
|
|
1756
1750
|
const adjustedClientY = clientY - y;
|
|
1757
1751
|
dispatchMousemoveEvent(element, happyDomInstance.window, adjustedClientX, adjustedClientY);
|
|
1758
|
-
const elementMap = Object.create(null);
|
|
1759
|
-
set$1(uid, {
|
|
1760
|
-
document: happyDomInstance.document,
|
|
1761
|
-
elementMap,
|
|
1762
|
-
window: happyDomInstance.window
|
|
1763
|
-
});
|
|
1764
1752
|
};
|
|
1765
1753
|
const handleMousemove = (uid, hdId, clientX, clientY, x, y) => {
|
|
1766
1754
|
return handleMousemoveLocal(uid, hdId, clientX, clientY, x, y);
|
|
@@ -1785,12 +1773,6 @@ const handleMouseupLocal = (uid, hdId, clientX, clientY) => {
|
|
|
1785
1773
|
return;
|
|
1786
1774
|
}
|
|
1787
1775
|
dispatchMouseupEvent(element, happyDomInstance.window, clientX, clientY);
|
|
1788
|
-
const elementMap = Object.create(null);
|
|
1789
|
-
set$1(uid, {
|
|
1790
|
-
document: happyDomInstance.document,
|
|
1791
|
-
elementMap,
|
|
1792
|
-
window: happyDomInstance.window
|
|
1793
|
-
});
|
|
1794
1776
|
};
|
|
1795
1777
|
const handleMouseup = (uid, hdId, clientX, clientY) => {
|
|
1796
1778
|
return handleMouseupLocal(uid, hdId, clientX, clientY);
|
|
@@ -89679,11 +89661,10 @@ const handleMutations = async uid => {
|
|
|
89679
89661
|
const parsedDom = serialized.dom;
|
|
89680
89662
|
// @ts-ignore
|
|
89681
89663
|
getParsedNodesChildNodeCount(parsedDom);
|
|
89682
|
-
|
|
89683
|
-
// TODO notify
|
|
89684
89664
|
try {
|
|
89685
|
-
await invoke$1('Preview.
|
|
89686
|
-
} catch {
|
|
89665
|
+
await invoke$1('Preview.handleMutation', uid);
|
|
89666
|
+
} catch (error) {
|
|
89667
|
+
console.error(error);
|
|
89687
89668
|
// ignore
|
|
89688
89669
|
}
|
|
89689
89670
|
};
|