@arc-fusion/pb-editor-wrapper
Advanced tools
Comparing version 0.0.345 to 0.0.346
@@ -12,4 +12,2 @@ "use strict"; | ||
var _reactDom = _interopRequireDefault(require("react-dom")); | ||
var _propTypes = _interopRequireDefault(require("prop-types")); | ||
@@ -51,9 +49,14 @@ | ||
var incrementMutationCount = function incrementMutationCount() { | ||
console.log('HELLO WORLD', mutationCount); | ||
console.log('YOOOO'); | ||
return setMutationCount(mutationCount + 1); | ||
}; | ||
var _useMutationObserverR = (0, _rooks.useMutationObserverRef)(incrementMutationCount), | ||
var _useMutationObserverR = (0, _rooks.useMutationObserverRef)(incrementMutationCount, { | ||
attributes: false, | ||
characterData: false, | ||
subtree: false, | ||
childList: true | ||
}), | ||
_useMutationObserverR2 = _slicedToArray(_useMutationObserverR, 1), | ||
myRef = _useMutationObserverR2[0]; | ||
enterRef = _useMutationObserverR2[0]; | ||
@@ -89,8 +92,5 @@ var previewEvents = { | ||
(0, _react.useEffect)(function () { | ||
(0, _react.useLayoutEffect)(function () { | ||
if (isChain) return; | ||
console.log('MY REF', myRef, myRef === null || myRef === void 0 ? void 0 : myRef.current); | ||
var enterNode = _reactDom.default.findDOMNode(myRef === null || myRef === void 0 ? void 0 : myRef.current); | ||
var enterNode = document.querySelector("[data-fusion-component=\"".concat(fingerprint, "\"]")); | ||
var siblingNodes = (0, _getSiblingNodes.getSiblingNodes)(fingerprint, enterNode); | ||
@@ -124,3 +124,3 @@ addMouseEvents(siblingNodes); | ||
}, | ||
ref: myRef | ||
ref: enterRef | ||
}), children, /*#__PURE__*/_react.default.createElement("fusion-exit", { | ||
@@ -127,0 +127,0 @@ id: "fusion-exit-".concat(fingerprint), |
{ | ||
"name": "@arc-fusion/pb-editor-wrapper", | ||
"description": "PageBuilder Preview Wrapper", | ||
"version": "0.0.345", | ||
"version": "0.0.346", | ||
"module": "dist/index.js", | ||
@@ -6,0 +6,0 @@ "files": [ |
139
9640