@bigbinary/neeto-editor 1.28.19 → 1.28.20
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/index.cjs.js +17 -12
- package/index.cjs.js.map +1 -1
- package/index.js +17 -12
- package/index.js.map +1 -1
- package/package.json +1 -1
package/index.cjs.js
CHANGED
|
@@ -87023,8 +87023,20 @@ var ImageComponent = function ImageComponent(_ref) {
|
|
|
87023
87023
|
var height = figheight;
|
|
87024
87024
|
var width = figwidth;
|
|
87025
87025
|
var caption = figureRef.current ? (_figureRef$current$qu = figureRef.current.querySelector("figcaption>div")) === null || _figureRef$current$qu === void 0 ? void 0 : _figureRef$current$qu.textContent : alt;
|
|
87026
|
+
var handleResizeStop = function handleResizeStop(_event, _direction, ref) {
|
|
87027
|
+
height = ref.offsetHeight;
|
|
87028
|
+
width = ref.offsetWidth;
|
|
87029
|
+
view.dispatch(view.state.tr.setNodeMarkup(getPos(), undefined, ramda.mergeRight(node.attrs, {
|
|
87030
|
+
figheight: height,
|
|
87031
|
+
figwidth: width,
|
|
87032
|
+
height: height,
|
|
87033
|
+
width: width
|
|
87034
|
+
})));
|
|
87035
|
+
editor.commands.focus();
|
|
87036
|
+
};
|
|
87026
87037
|
return /*#__PURE__*/React__default["default"].createElement(NodeViewWrapper, {
|
|
87027
|
-
className: "neeto-editor__image-wrapper neeto-editor__image--".concat(align)
|
|
87038
|
+
className: "neeto-editor__image-wrapper neeto-editor__image--".concat(align),
|
|
87039
|
+
"data-cy": "neeto-editor-image-wrapper"
|
|
87028
87040
|
}, /*#__PURE__*/React__default["default"].createElement("figure", {
|
|
87029
87041
|
ref: figureRef
|
|
87030
87042
|
}, /*#__PURE__*/React__default["default"].createElement(Menu$6, {
|
|
@@ -87039,19 +87051,9 @@ var ImageComponent = function ImageComponent(_ref) {
|
|
|
87039
87051
|
height: height,
|
|
87040
87052
|
width: width
|
|
87041
87053
|
},
|
|
87054
|
+
onResizeStop: handleResizeStop,
|
|
87042
87055
|
onResize: function onResize(_event, _direction, ref) {
|
|
87043
87056
|
return setCaptionWidth(ref.offsetWidth);
|
|
87044
|
-
},
|
|
87045
|
-
onResizeStop: function onResizeStop(_event, _direction, ref) {
|
|
87046
|
-
height = ref.offsetHeight;
|
|
87047
|
-
width = ref.offsetWidth;
|
|
87048
|
-
view.dispatch(view.state.tr.setNodeMarkup(getPos(), undefined, ramda.mergeRight(node.attrs, {
|
|
87049
|
-
figheight: height,
|
|
87050
|
-
figwidth: width,
|
|
87051
|
-
height: height,
|
|
87052
|
-
width: width
|
|
87053
|
-
})));
|
|
87054
|
-
editor.commands.focus();
|
|
87055
87057
|
}
|
|
87056
87058
|
}, /*#__PURE__*/React__default["default"].createElement("img", _extends$1({}, node.attrs, {
|
|
87057
87059
|
alt: caption,
|
|
@@ -94047,6 +94049,7 @@ var LocalUploader = function LocalUploader(_ref) {
|
|
|
94047
94049
|
uppy: uppy
|
|
94048
94050
|
}) : /*#__PURE__*/React__default["default"].createElement("div", {
|
|
94049
94051
|
className: "ne-media-uploader__dnd",
|
|
94052
|
+
"data-cy": "neeto-editor-media-uploader-dnd",
|
|
94050
94053
|
ref: dropTargetRef,
|
|
94051
94054
|
onClick: function onClick() {
|
|
94052
94055
|
var _fileInputRef$current;
|
|
@@ -94055,6 +94058,7 @@ var LocalUploader = function LocalUploader(_ref) {
|
|
|
94055
94058
|
}, /*#__PURE__*/React__default["default"].createElement("input", {
|
|
94056
94059
|
multiple: true,
|
|
94057
94060
|
className: "ne-media-uploader__dnd-input",
|
|
94061
|
+
"data-cy": "neeto-editor-media-uploader-input",
|
|
94058
94062
|
ref: fileInputRef,
|
|
94059
94063
|
type: "file",
|
|
94060
94064
|
accept: isImage ? ALLOWED_IMAGE_TYPES.join(",") : ALLOWED_VIDEO_TYPES.join(","),
|
|
@@ -96417,6 +96421,7 @@ var Fixed = function Fixed(_ref) {
|
|
|
96417
96421
|
}, className, className))
|
|
96418
96422
|
}, /*#__PURE__*/React__default["default"].createElement("div", {
|
|
96419
96423
|
className: "neeto-editor-fixed-menu__wrapper",
|
|
96424
|
+
"data-cy": "neeto-editor-fixed-menu-wrapper",
|
|
96420
96425
|
ref: menuRef
|
|
96421
96426
|
}, isFontSizeActive && /*#__PURE__*/React__default["default"].createElement(FontSizeOption, {
|
|
96422
96427
|
editor: editor,
|