easy-email-pro-theme 1.43.0 → 1.43.2
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.
- package/lib/index.js +28 -17
- package/package.json +1 -1
package/lib/index.js
CHANGED
|
@@ -7476,11 +7476,15 @@ const BlockLayer = () => {
|
|
|
7476
7476
|
}, []);
|
|
7477
7477
|
const isSelected = useCallback$1(
|
|
7478
7478
|
(item2) => {
|
|
7479
|
-
|
|
7480
|
-
|
|
7481
|
-
|
|
7479
|
+
try {
|
|
7480
|
+
const currentPath = ReactEditor.findPath(editor, item2.data);
|
|
7481
|
+
if (!selectedNodePath) {
|
|
7482
|
+
return !currentPath;
|
|
7483
|
+
}
|
|
7484
|
+
return Path.equals(currentPath, selectedNodePath);
|
|
7485
|
+
} catch (error2) {
|
|
7486
|
+
return false;
|
|
7482
7487
|
}
|
|
7483
|
-
return Path.equals(currentPath, selectedNodePath);
|
|
7484
7488
|
},
|
|
7485
7489
|
[editor, selectedNodePath]
|
|
7486
7490
|
);
|
|
@@ -7513,25 +7517,32 @@ const BlockLayer = () => {
|
|
|
7513
7517
|
);
|
|
7514
7518
|
const onHover = useMemo$1(
|
|
7515
7519
|
() => debounce$2((item2) => {
|
|
7516
|
-
|
|
7517
|
-
|
|
7518
|
-
|
|
7519
|
-
|
|
7520
|
-
|
|
7521
|
-
node
|
|
7522
|
-
|
|
7523
|
-
|
|
7524
|
-
|
|
7525
|
-
|
|
7520
|
+
try {
|
|
7521
|
+
const currentPath = ReactEditor.findPath(editor, item2.data);
|
|
7522
|
+
setHoverNodePath(currentPath);
|
|
7523
|
+
if (scrollWhenHover) {
|
|
7524
|
+
const node = ReactEditor.toDOMNode(editor, item2.data);
|
|
7525
|
+
if (node) {
|
|
7526
|
+
node.scrollIntoView({
|
|
7527
|
+
block: "center",
|
|
7528
|
+
behavior: "smooth",
|
|
7529
|
+
inline: "center"
|
|
7530
|
+
});
|
|
7531
|
+
}
|
|
7526
7532
|
}
|
|
7533
|
+
} catch (error2) {
|
|
7527
7534
|
}
|
|
7528
7535
|
}, 500),
|
|
7529
7536
|
[editor, scrollWhenHover, setHoverNodePath]
|
|
7530
7537
|
);
|
|
7531
7538
|
const handleRemove = useCallback$1(
|
|
7532
7539
|
(item2) => {
|
|
7533
|
-
|
|
7534
|
-
|
|
7540
|
+
try {
|
|
7541
|
+
const currentPath = ReactEditor.findPath(editor, item2.data);
|
|
7542
|
+
deleteBlock(currentPath);
|
|
7543
|
+
} catch (error2) {
|
|
7544
|
+
console.log(error2);
|
|
7545
|
+
}
|
|
7535
7546
|
},
|
|
7536
7547
|
[editor, deleteBlock]
|
|
7537
7548
|
);
|
|
@@ -36263,7 +36274,7 @@ const SlateField = (props) => {
|
|
|
36263
36274
|
return;
|
|
36264
36275
|
if (get(child, attributesKey + "." + props.childrenFieldName) === currentValue)
|
|
36265
36276
|
return;
|
|
36266
|
-
const attrs = __spreadProps(__spreadValues({}, child
|
|
36277
|
+
const attrs = __spreadProps(__spreadValues({}, get(child, attributesKey, {})), {
|
|
36267
36278
|
[props.childrenFieldName]: currentValue
|
|
36268
36279
|
});
|
|
36269
36280
|
Transforms.setNodes(
|