@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.js CHANGED
@@ -86993,8 +86993,20 @@ var ImageComponent = function ImageComponent(_ref) {
86993
86993
  var height = figheight;
86994
86994
  var width = figwidth;
86995
86995
  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;
86996
+ var handleResizeStop = function handleResizeStop(_event, _direction, ref) {
86997
+ height = ref.offsetHeight;
86998
+ width = ref.offsetWidth;
86999
+ view.dispatch(view.state.tr.setNodeMarkup(getPos(), undefined, mergeRight(node.attrs, {
87000
+ figheight: height,
87001
+ figwidth: width,
87002
+ height: height,
87003
+ width: width
87004
+ })));
87005
+ editor.commands.focus();
87006
+ };
86996
87007
  return /*#__PURE__*/React__default.createElement(NodeViewWrapper, {
86997
- className: "neeto-editor__image-wrapper neeto-editor__image--".concat(align)
87008
+ className: "neeto-editor__image-wrapper neeto-editor__image--".concat(align),
87009
+ "data-cy": "neeto-editor-image-wrapper"
86998
87010
  }, /*#__PURE__*/React__default.createElement("figure", {
86999
87011
  ref: figureRef
87000
87012
  }, /*#__PURE__*/React__default.createElement(Menu$6, {
@@ -87009,19 +87021,9 @@ var ImageComponent = function ImageComponent(_ref) {
87009
87021
  height: height,
87010
87022
  width: width
87011
87023
  },
87024
+ onResizeStop: handleResizeStop,
87012
87025
  onResize: function onResize(_event, _direction, ref) {
87013
87026
  return setCaptionWidth(ref.offsetWidth);
87014
- },
87015
- onResizeStop: function onResizeStop(_event, _direction, ref) {
87016
- height = ref.offsetHeight;
87017
- width = ref.offsetWidth;
87018
- view.dispatch(view.state.tr.setNodeMarkup(getPos(), undefined, mergeRight(node.attrs, {
87019
- figheight: height,
87020
- figwidth: width,
87021
- height: height,
87022
- width: width
87023
- })));
87024
- editor.commands.focus();
87025
87027
  }
87026
87028
  }, /*#__PURE__*/React__default.createElement("img", _extends$1({}, node.attrs, {
87027
87029
  alt: caption,
@@ -94017,6 +94019,7 @@ var LocalUploader = function LocalUploader(_ref) {
94017
94019
  uppy: uppy
94018
94020
  }) : /*#__PURE__*/React__default.createElement("div", {
94019
94021
  className: "ne-media-uploader__dnd",
94022
+ "data-cy": "neeto-editor-media-uploader-dnd",
94020
94023
  ref: dropTargetRef,
94021
94024
  onClick: function onClick() {
94022
94025
  var _fileInputRef$current;
@@ -94025,6 +94028,7 @@ var LocalUploader = function LocalUploader(_ref) {
94025
94028
  }, /*#__PURE__*/React__default.createElement("input", {
94026
94029
  multiple: true,
94027
94030
  className: "ne-media-uploader__dnd-input",
94031
+ "data-cy": "neeto-editor-media-uploader-input",
94028
94032
  ref: fileInputRef,
94029
94033
  type: "file",
94030
94034
  accept: isImage ? ALLOWED_IMAGE_TYPES.join(",") : ALLOWED_VIDEO_TYPES.join(","),
@@ -96387,6 +96391,7 @@ var Fixed = function Fixed(_ref) {
96387
96391
  }, className, className))
96388
96392
  }, /*#__PURE__*/React__default.createElement("div", {
96389
96393
  className: "neeto-editor-fixed-menu__wrapper",
96394
+ "data-cy": "neeto-editor-fixed-menu-wrapper",
96390
96395
  ref: menuRef
96391
96396
  }, isFontSizeActive && /*#__PURE__*/React__default.createElement(FontSizeOption, {
96392
96397
  editor: editor,