@bigbinary/neeto-editor 1.46.1 → 1.47.1

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.
@@ -15699,8 +15699,8 @@ var emojiPickerApi = {
15699
15699
  fetch: fetch
15700
15700
  };
15701
15701
 
15702
- function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15703
- function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15702
+ function ownKeys$c(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15703
+ function _objectSpread$c(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$c(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$c(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15704
15704
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn$1(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
15705
15705
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
15706
15706
  var EmojiPickerMenu = /*#__PURE__*/function (_React$Component) {
@@ -15752,7 +15752,7 @@ var EmojiPickerMenu = /*#__PURE__*/function (_React$Component) {
15752
15752
  return _createClass$1(EmojiPickerMenu, [{
15753
15753
  key: "componentDidMount",
15754
15754
  value: function componentDidMount() {
15755
- new Picker(_objectSpread$b(_objectSpread$b({}, this.props), {}, {
15755
+ new Picker(_objectSpread$c(_objectSpread$c({}, this.props), {}, {
15756
15756
  onEmojiSelect: this.handleSelect,
15757
15757
  style: {
15758
15758
  maxWidth: "100%"
@@ -15810,8 +15810,8 @@ var useEditorStore = create(withImmutableActions(function (set) {
15810
15810
  };
15811
15811
  }));
15812
15812
 
15813
- function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15814
- function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15813
+ function ownKeys$b(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
15814
+ function _objectSpread$b(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$b(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$b(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
15815
15815
  var MenuButton = function MenuButton(_ref) {
15816
15816
  var icon = _ref.icon,
15817
15817
  command = _ref.command,
@@ -15830,7 +15830,7 @@ var MenuButton = function MenuButton(_ref) {
15830
15830
  isActive = _useEditorStore.isActive,
15831
15831
  _useEditorStore$disab = _useEditorStore.disabled,
15832
15832
  disabled = _useEditorStore$disab === void 0 ? isButtonDisabled : _useEditorStore$disab;
15833
- return /*#__PURE__*/jsx(Button$1, _objectSpread$a({
15833
+ return /*#__PURE__*/jsx(Button$1, _objectSpread$b({
15834
15834
  disabled: disabled,
15835
15835
  icon: icon,
15836
15836
  className: "neeto-editor-fixed-menu__item",
@@ -15838,7 +15838,7 @@ var MenuButton = function MenuButton(_ref) {
15838
15838
  style: isActive ? "secondary" : "text",
15839
15839
  tabIndex: "-1",
15840
15840
  tooltipProps: {
15841
- content: label,
15841
+ content: renderTooltipContent(label, optionName),
15842
15842
  position: "bottom"
15843
15843
  },
15844
15844
  onClick: command
@@ -15867,9 +15867,6 @@ var EmojiOption = function EmojiOption(_ref) {
15867
15867
  return /*#__PURE__*/jsx(Dropdown$1, {
15868
15868
  buttonStyle: "text",
15869
15869
  closeOnSelect: false,
15870
- dropdownProps: {
15871
- classNames: "neeto-editor-fixed-menu__emoji-dropdown"
15872
- },
15873
15870
  icon: Smiley,
15874
15871
  isOpen: isActive,
15875
15872
  position: isSecondaryMenu ? "left-start" : "bottom-start",
@@ -15887,6 +15884,12 @@ var EmojiOption = function EmojiOption(_ref) {
15887
15884
  label: label,
15888
15885
  icon: Smiley
15889
15886
  }),
15887
+ dropdownProps: {
15888
+ classNames: "neeto-editor-fixed-menu__emoji-dropdown",
15889
+ onClick: function onClick(e) {
15890
+ return isSecondaryMenu && e.stopPropagation();
15891
+ }
15892
+ },
15890
15893
  onClose: function onClose() {
15891
15894
  return setActive(false);
15892
15895
  },
@@ -16038,8 +16041,8 @@ var TableOption$2 = function TableOption(_ref) {
16038
16041
  });
16039
16042
  };
16040
16043
 
16041
- function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16042
- function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16044
+ function ownKeys$a(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
16045
+ function _objectSpread$a(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$a(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$a(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
16043
16046
  var createMenuOptions$2 = function createMenuOptions(_ref) {
16044
16047
  var tooltips = _ref.tooltips,
16045
16048
  editor = _ref.editor,
@@ -16283,7 +16286,7 @@ var renderOptionButton = function renderOptionButton(_ref4) {
16283
16286
  active = _ref4.active,
16284
16287
  optionName = _ref4.optionName,
16285
16288
  highlight = _ref4.highlight;
16286
- return /*#__PURE__*/jsx(Button$1, _objectSpread$9({
16289
+ return /*#__PURE__*/jsx(Button$1, _objectSpread$a({
16287
16290
  "data-cy": "neeto-editor-bubble-menu-".concat(optionName, "-option"),
16288
16291
  icon: Icon,
16289
16292
  size: "small",
@@ -18096,8 +18099,8 @@ var LinkAddPopOver = function LinkAddPopOver(_ref) {
18096
18099
  };
18097
18100
 
18098
18101
  var _excluded$3 = ["type"];
18099
- function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18100
- function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18102
+ function ownKeys$9(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18103
+ function _objectSpread$9(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$9(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$9(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18101
18104
  var Menu$3 = Dropdown$1.Menu,
18102
18105
  MenuItem$1 = Dropdown$1.MenuItem;
18103
18106
  var MoreMenu = function MoreMenu(_ref) {
@@ -18118,18 +18121,18 @@ var MoreMenu = function MoreMenu(_ref) {
18118
18121
  var Component = MENU_ELEMENTS[type];
18119
18122
  if (type === MENU_ELEMENT_TYPES.BUTTON) {
18120
18123
  var Icon = props.icon;
18121
- return /*#__PURE__*/jsxs(MenuItem$1.Button, _objectSpread$8(_objectSpread$8({
18124
+ return /*#__PURE__*/jsxs(MenuItem$1.Button, _objectSpread$9(_objectSpread$9({
18122
18125
  "data-cy": "neeto-editor-fixed-menu-".concat(props.optionName, "-option"),
18123
18126
  isActive: editor.isActive(props.optionName),
18124
18127
  tabIndex: "-1",
18125
18128
  onClick: props.command
18126
- }, _objectSpread$8(_objectSpread$8(_objectSpread$8({}, generateFocusProps(props.highlight)), props), {}, {
18129
+ }, _objectSpread$9(_objectSpread$9(_objectSpread$9({}, generateFocusProps(props.highlight)), props), {}, {
18127
18130
  editor: editor
18128
18131
  })), {}, {
18129
18132
  children: [/*#__PURE__*/jsx(Icon, {}), " ", props.label]
18130
18133
  }), props.optionName);
18131
18134
  }
18132
- return /*#__PURE__*/jsx(Component, _objectSpread$8(_objectSpread$8({}, _objectSpread$8(_objectSpread$8({}, props), {}, {
18135
+ return /*#__PURE__*/jsx(Component, _objectSpread$9(_objectSpread$9({}, _objectSpread$9(_objectSpread$9({}, props), {}, {
18133
18136
  editor: editor
18134
18137
  }, generateFocusProps(props.highlight))), {}, {
18135
18138
  isSecondaryMenu: true
@@ -18142,8 +18145,8 @@ var MoreMenu = function MoreMenu(_ref) {
18142
18145
 
18143
18146
  var EDITOR_MARKS = [EDITOR_OPTIONS.UNDO, EDITOR_OPTIONS.REDO, "fontSizeOptions", EDITOR_OPTIONS.BOLD, EDITOR_OPTIONS.ITALIC, EDITOR_OPTIONS.UNDERLINE, EDITOR_OPTIONS.LINK, EDITOR_OPTIONS.STRIKETHROUGH, EDITOR_OPTIONS.HIGHLIGHT, "bulletList", "orderedList", "blockquote", EDITOR_OPTIONS.CODE, "codeBlock", EDITOR_OPTIONS.TABLE, EDITOR_OPTIONS.ATTACHMENTS, EDITOR_OPTIONS.IMAGE_UPLOAD, EDITOR_OPTIONS.VIDEO_UPLOAD, EDITOR_OPTIONS.VIDEO_EMBED, EDITOR_OPTIONS.TEXT_COLOR, EDITOR_OPTIONS.EMOJI, "mentions"];
18144
18147
 
18145
- function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18146
- function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18148
+ function ownKeys$8(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18149
+ function _objectSpread$8(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$8(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$8(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18147
18150
  var useEditorState = function useEditorState(_ref) {
18148
18151
  var editor = _ref.editor;
18149
18152
  var _useEditorStore = useEditorStore(function (store) {
@@ -18179,7 +18182,7 @@ var useEditorState = function useEditorState(_ref) {
18179
18182
  var redoOptionState = {
18180
18183
  disabled: !editor.can().redo()
18181
18184
  };
18182
- var updatedMarksState = _objectSpread$7(_objectSpread$7({}, marksState), {}, _defineProperty(_defineProperty({}, EDITOR_OPTIONS.UNDO, undoOptionState), EDITOR_OPTIONS.REDO, redoOptionState));
18185
+ var updatedMarksState = _objectSpread$8(_objectSpread$8({}, marksState), {}, _defineProperty(_defineProperty({}, EDITOR_OPTIONS.UNDO, undoOptionState), EDITOR_OPTIONS.REDO, redoOptionState));
18183
18186
  setMarksState(updatedMarksState);
18184
18187
  }, [marksState, setMarksState]);
18185
18188
  useEffect(function () {
@@ -18199,8 +18202,8 @@ var useEditorState = function useEditorState(_ref) {
18199
18202
  };
18200
18203
 
18201
18204
  var _excluded$2 = ["type"];
18202
- function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18203
- function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18205
+ function ownKeys$7(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18206
+ function _objectSpread$7(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$7(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$7(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18204
18207
  var Fixed = function Fixed(_ref) {
18205
18208
  var editor = _ref.editor,
18206
18209
  options = _ref.options,
@@ -18299,7 +18302,8 @@ var Fixed = function Fixed(_ref) {
18299
18302
  mentions: mentions,
18300
18303
  addonCommands: addonCommands,
18301
18304
  setIsEmojiPickerActive: setIsEmojiPickerActive,
18302
- isEmojiPickerActive: isEmojiPickerActive
18305
+ isEmojiPickerActive: isEmojiPickerActive,
18306
+ editor: editor
18303
18307
  });
18304
18308
  }, [isEmojiPickerActive, mentions]);
18305
18309
  var handleResize = useCallback(function () {
@@ -18351,7 +18355,7 @@ var Fixed = function Fixed(_ref) {
18351
18355
  props = _objectWithoutProperties$1(_ref2, _excluded$2);
18352
18356
  var Component = MENU_ELEMENTS[type];
18353
18357
  if (!Component) return null;
18354
- return /*#__PURE__*/jsx(Component, _objectSpread$6({}, _objectSpread$6(_objectSpread$6({}, props), {}, {
18358
+ return /*#__PURE__*/jsx(Component, _objectSpread$7({}, _objectSpread$7(_objectSpread$7({}, props), {}, {
18355
18359
  editor: editor,
18356
18360
  options: options
18357
18361
  })), props.optionName);
@@ -18400,8 +18404,8 @@ var Fixed = function Fixed(_ref) {
18400
18404
  };
18401
18405
 
18402
18406
  var _excluded$1 = ["icon", "onClick", "disabled", "className", "tooltipProps"];
18403
- function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18404
- function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18407
+ function ownKeys$6(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18408
+ function _objectSpread$6(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$6(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$6(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18405
18409
  var Button = function Button(_ref) {
18406
18410
  var _ref$icon = _ref.icon,
18407
18411
  icon = _ref$icon === void 0 ? null : _ref$icon,
@@ -18413,16 +18417,16 @@ var Button = function Button(_ref) {
18413
18417
  tooltipProps = _ref.tooltipProps,
18414
18418
  otherProps = _objectWithoutProperties$1(_ref, _excluded$1);
18415
18419
  var Icon = icon;
18416
- return /*#__PURE__*/jsx(Tooltip, _objectSpread$5(_objectSpread$5({
18420
+ return /*#__PURE__*/jsx(Tooltip, _objectSpread$6(_objectSpread$6({
18417
18421
  disabled: !tooltipProps,
18418
18422
  onClick: function onClick() {
18419
18423
  return _onClick();
18420
18424
  }
18421
18425
  }, tooltipProps), {}, {
18422
- children: /*#__PURE__*/jsx("button", _objectSpread$5(_objectSpread$5({
18426
+ children: /*#__PURE__*/jsx("button", _objectSpread$6(_objectSpread$6({
18423
18427
  className: classnames("ne-headless-btn", _defineProperty({}, className, className)),
18424
18428
  type: "button"
18425
- }, _objectSpread$5({
18429
+ }, _objectSpread$6({
18426
18430
  disabled: disabled,
18427
18431
  onClick: _onClick
18428
18432
  }, otherProps)), {}, {
@@ -18435,8 +18439,8 @@ var Button = function Button(_ref) {
18435
18439
  };
18436
18440
 
18437
18441
  var _excluded = ["icon", "isOpen", "onClose", "children", "className", "onClick", "buttonProps"];
18438
- function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18439
- function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18442
+ function ownKeys$5(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18443
+ function _objectSpread$5(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$5(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$5(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18440
18444
  var hideOnEsc = {
18441
18445
  name: "hideOnEsc",
18442
18446
  defaultValue: true,
@@ -18475,7 +18479,7 @@ var Dropdown = function Dropdown(_ref2) {
18475
18479
  _useState2 = _slicedToArray(_useState, 2),
18476
18480
  mounted = _useState2[0],
18477
18481
  setMounted = _useState2[1];
18478
- return /*#__PURE__*/jsx(Tippy, _objectSpread$4(_objectSpread$4({
18482
+ return /*#__PURE__*/jsx(Tippy, _objectSpread$5(_objectSpread$5({
18479
18483
  onClose: onClose,
18480
18484
  hideOnEsc: true,
18481
18485
  interactive: true,
@@ -18507,7 +18511,7 @@ var Dropdown = function Dropdown(_ref2) {
18507
18511
  }
18508
18512
  }, otherProps), {}, {
18509
18513
  children: /*#__PURE__*/jsx("span", {
18510
- children: /*#__PURE__*/jsx(Button, _objectSpread$4({}, _objectSpread$4({
18514
+ children: /*#__PURE__*/jsx(Button, _objectSpread$5({}, _objectSpread$5({
18511
18515
  icon: icon,
18512
18516
  onClick: onClick
18513
18517
  }, buttonProps)))
@@ -18580,8 +18584,8 @@ var Option = function Option(_ref) {
18580
18584
  });
18581
18585
  };
18582
18586
 
18583
- function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18584
- function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18587
+ function ownKeys$4(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18588
+ function _objectSpread$4(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$4(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$4(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18585
18589
  var t = i18n.t;
18586
18590
  var createMenuOptions$1 = function createMenuOptions(_ref) {
18587
18591
  var editor = _ref.editor,
@@ -18740,7 +18744,7 @@ var buildOptionsFromAddonCommands$1 = function buildOptionsFromAddonCommands(_re
18740
18744
  var to = editor.state.selection.to;
18741
18745
  return commands.map(function (option) {
18742
18746
  var _option$active;
18743
- return _objectSpread$3(_objectSpread$3({}, option), {}, {
18747
+ return _objectSpread$4(_objectSpread$4({}, option), {}, {
18744
18748
  active: (_option$active = option.active) === null || _option$active === void 0 ? void 0 : _option$active.call(option, {
18745
18749
  editor: editor
18746
18750
  }),
@@ -18782,8 +18786,8 @@ var buildMenuOptions$1 = function buildMenuOptions(_ref3) {
18782
18786
  }).filter(Boolean);
18783
18787
  };
18784
18788
 
18785
- function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18786
- function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18789
+ function ownKeys$3(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18790
+ function _objectSpread$3(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$3(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$3(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18787
18791
  var Headless = function Headless(_ref) {
18788
18792
  var editor = _ref.editor,
18789
18793
  options = _ref.options,
@@ -18821,7 +18825,7 @@ var Headless = function Headless(_ref) {
18821
18825
  return /*#__PURE__*/jsxs("div", {
18822
18826
  className: classnames("ne-headless", _defineProperty({}, className, className)),
18823
18827
  children: [allOptions.map(function (option) {
18824
- return /*#__PURE__*/createElement(Option, _objectSpread$2({
18828
+ return /*#__PURE__*/createElement(Option, _objectSpread$3({
18825
18829
  editor: editor,
18826
18830
  key: option.optionName
18827
18831
  }, option));
@@ -18961,6 +18965,166 @@ var FontSizeOption = function FontSizeOption(_ref) {
18961
18965
  };
18962
18966
  var FontSizeOption$1 = /*#__PURE__*/memo(FontSizeOption);
18963
18967
 
18968
+ function ownKeys$2(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
18969
+ function _objectSpread$2(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$2(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$2(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
18970
+ var ColorDot = function ColorDot(_ref) {
18971
+ var colorVar = _ref.colorVar,
18972
+ isSelected = _ref.isSelected,
18973
+ onClick = _ref.onClick,
18974
+ isTextColor = _ref.isTextColor;
18975
+ var dotClass = classnames("neeto-editor-highlight-dropdown__color-dot", {
18976
+ "neeto-editor-highlight-dropdown__color-dot--selected": isSelected,
18977
+ "neeto-editor-highlight-dropdown__color-dot--background": !isTextColor
18978
+ });
18979
+ var dotStyle = _objectSpread$2({}, isTextColor ? {
18980
+ color: "var(".concat(colorVar, ")")
18981
+ } : {
18982
+ backgroundColor: "var(".concat(colorVar, ")")
18983
+ });
18984
+ return /*#__PURE__*/jsx("div", {
18985
+ onClick: onClick,
18986
+ className: dotClass,
18987
+ style: dotStyle,
18988
+ children: isTextColor && /*#__PURE__*/jsx(Typography, {
18989
+ className: "neeto-editor-highlight-dropdown__color-dot-text",
18990
+ style: "body2",
18991
+ weight: "semibold",
18992
+ children: "A"
18993
+ })
18994
+ });
18995
+ };
18996
+
18997
+ var ColorDotIcon = function ColorDotIcon(_ref) {
18998
+ var textColor = _ref.textColor,
18999
+ backgroundColor = _ref.backgroundColor;
19000
+ var dotClass = classnames("neeto-editor-highlight-dropdown__color-dot", {});
19001
+ var dotStyle = {
19002
+ color: "var(".concat(textColor, ")"),
19003
+ backgroundColor: "var(".concat(backgroundColor, ")")
19004
+ };
19005
+ return /*#__PURE__*/jsx("div", {
19006
+ className: dotClass,
19007
+ style: dotStyle,
19008
+ children: /*#__PURE__*/jsx(Typography, {
19009
+ className: "neeto-editor-highlight-dropdown__color-dot-text",
19010
+ style: "body2",
19011
+ weight: "semibold",
19012
+ children: "A"
19013
+ })
19014
+ });
19015
+ };
19016
+
19017
+ var COLORS = {
19018
+ recent: ["--neeto-editor-highlight-bg-yellow-light"],
19019
+ text: ["--neeto-editor-highlight-text-1", "--neeto-editor-highlight-text-2", "--neeto-editor-highlight-text-3", "--neeto-editor-highlight-text-4", "--neeto-editor-highlight-text-5", "--neeto-editor-highlight-text-6", "--neeto-editor-highlight-text-7", "--neeto-editor-highlight-text-8", "--neeto-editor-highlight-text-9", "--neeto-editor-highlight-text-10"],
19020
+ background: ["--neeto-editor-highlight-bg-1", "--neeto-editor-highlight-bg-2", "--neeto-editor-highlight-bg-3", "--neeto-editor-highlight-bg-4", "--neeto-editor-highlight-bg-5", "--neeto-editor-highlight-bg-6", "--neeto-editor-highlight-bg-7", "--neeto-editor-highlight-bg-8", "--neeto-editor-highlight-bg-9", "--neeto-editor-highlight-bg-10"]
19021
+ };
19022
+
19023
+ var colorSections = [{
19024
+ title: "Text color",
19025
+ colors: COLORS.text,
19026
+ isTextColor: true
19027
+ }, {
19028
+ title: "Background color",
19029
+ colors: COLORS.background,
19030
+ isTextColor: false
19031
+ }];
19032
+ var HighlightDropdown = function HighlightDropdown(_ref) {
19033
+ var editor = _ref.editor,
19034
+ label = _ref.label,
19035
+ tooltipContent = _ref.tooltipContent,
19036
+ runEditorCommand = _ref.runEditorCommand;
19037
+ var dropdownRef = useRef(null);
19038
+ var textColor = editor.getAttributes("textStyle").color;
19039
+ var backgroundColor = editor.getAttributes("textStyle").backgroundColor;
19040
+ var updateBackgroundColor = function updateBackgroundColor(value) {
19041
+ runEditorCommand(function (editor) {
19042
+ return editor.chain().focus().setMark("textStyle", {
19043
+ backgroundColor: value
19044
+ }).run();
19045
+ })();
19046
+ };
19047
+ var handleBackgroundColorClick = function handleBackgroundColorClick(colorVar) {
19048
+ if (backgroundColor === "var(".concat(colorVar, ")")) {
19049
+ updateBackgroundColor(null);
19050
+ } else {
19051
+ updateBackgroundColor("var(".concat(colorVar, ")"));
19052
+ }
19053
+ };
19054
+ var handleTextColorClick = function handleTextColorClick(colorVar) {
19055
+ if (textColor === "var(".concat(colorVar, ")")) {
19056
+ editor.chain().focus().unsetColor().run();
19057
+ } else {
19058
+ editor.chain().focus().setColor("var(".concat(colorVar, ")")).run();
19059
+ }
19060
+ };
19061
+ var renderColorDots = function renderColorDots(colorList) {
19062
+ var isTextColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
19063
+ return colorList.map(function (colorVar, idx) {
19064
+ return /*#__PURE__*/createElement(ColorDot, {
19065
+ colorVar: colorVar,
19066
+ isTextColor: isTextColor,
19067
+ key: idx,
19068
+ isSelected: isTextColor ? textColor === "var(".concat(colorVar, ")") : backgroundColor === "var(".concat(colorVar, ")"),
19069
+ onClick: function onClick() {
19070
+ return isTextColor ? handleTextColorClick(colorVar) : handleBackgroundColorClick(colorVar);
19071
+ }
19072
+ });
19073
+ });
19074
+ };
19075
+ return /*#__PURE__*/jsx(Dropdown$1, {
19076
+ autoWidth: true,
19077
+ placement: "bottom-start",
19078
+ strategy: "fixed",
19079
+ buttonProps: {
19080
+ icon: function icon() {
19081
+ return /*#__PURE__*/jsx(ColorDotIcon, {
19082
+ backgroundColor: backgroundColor,
19083
+ textColor: textColor
19084
+ });
19085
+ },
19086
+ iconPosition: "left",
19087
+ iconSize: 20,
19088
+ label: /*#__PURE__*/jsx(Down, {
19089
+ size: 12
19090
+ }),
19091
+ ref: dropdownRef,
19092
+ "data-cy": "neeto-editor-fixed-menu-highlight-option",
19093
+ onKeyDown: function onKeyDown(event) {
19094
+ var _dropdownRef$current;
19095
+ return event.key === "ArrowDown" && ((_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current === void 0 ? void 0 : _dropdownRef$current.click());
19096
+ },
19097
+ tooltipProps: {
19098
+ content: tooltipContent !== null && tooltipContent !== void 0 ? tooltipContent : label,
19099
+ position: "bottom"
19100
+ },
19101
+ style: "text",
19102
+ size: "small",
19103
+ className: "neeto-editor-fixed-menu__item"
19104
+ },
19105
+ children: /*#__PURE__*/jsx(Dropdown$1.Menu, {
19106
+ className: "neeto-editor-highlight-dropdown",
19107
+ children: colorSections.map(function (_ref2) {
19108
+ var title = _ref2.title,
19109
+ colors = _ref2.colors,
19110
+ isTextColor = _ref2.isTextColor;
19111
+ return /*#__PURE__*/jsxs("div", {
19112
+ className: "neeto-editor-highlight-dropdown__section",
19113
+ children: [/*#__PURE__*/jsx(Typography, {
19114
+ className: "neeto-editor-highlight-dropdown__section-title",
19115
+ style: "body2",
19116
+ weight: "normal",
19117
+ children: title
19118
+ }), /*#__PURE__*/jsx("div", {
19119
+ className: "neeto-editor-highlight-dropdown__color-grid",
19120
+ children: renderColorDots(colors, isTextColor)
19121
+ })]
19122
+ }, title);
19123
+ })
19124
+ })
19125
+ });
19126
+ };
19127
+
18964
19128
  var Menu$1 = Dropdown$1.Menu;
18965
19129
  var TableOption = function TableOption(_ref) {
18966
19130
  var editor = _ref.editor,
@@ -19057,21 +19221,57 @@ var TableOption = function TableOption(_ref) {
19057
19221
  };
19058
19222
  var TableOption$1 = /*#__PURE__*/memo(TableOption);
19059
19223
 
19224
+ var _SHORTCUTS;
19060
19225
  var MENU_ELEMENT_TYPES = {
19061
19226
  BUTTON: "button",
19062
19227
  FONT_SIZE: "fontSize",
19063
19228
  TABLE: "table",
19064
19229
  TEXT_COLOR: "textColor",
19065
19230
  EMOJI: "emoji",
19066
- MENTIONS: "mentions"
19231
+ MENTIONS: "mentions",
19232
+ HIGHLIGHT: "highlight"
19067
19233
  };
19068
- var MENU_ELEMENTS = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, MENU_ELEMENT_TYPES.BUTTON, MenuButton$1), MENU_ELEMENT_TYPES.FONT_SIZE, FontSizeOption$1), MENU_ELEMENT_TYPES.TABLE, TableOption$1), MENU_ELEMENT_TYPES.TEXT_COLOR, TextColorOption), MENU_ELEMENT_TYPES.EMOJI, EmojiOption$1), MENU_ELEMENT_TYPES.MENTIONS, Mentions$1);
19069
- var MENU_ELEMENT_WIDTHS = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, MENU_ELEMENT_TYPES.BUTTON, 36), MENU_ELEMENT_TYPES.FONT_SIZE, 103), MENU_ELEMENT_TYPES.TABLE, 36), MENU_ELEMENT_TYPES.TEXT_COLOR, 36), MENU_ELEMENT_TYPES.EMOJI, 36), MENU_ELEMENT_TYPES.MENTIONS, 36);
19234
+ var SHORTCUTS = (_SHORTCUTS = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_SHORTCUTS, EDITOR_OPTIONS.BOLD, {
19235
+ mac: "⌘B",
19236
+ win: "Ctrl+B"
19237
+ }), EDITOR_OPTIONS.ITALIC, {
19238
+ mac: "⌘I",
19239
+ win: "Ctrl+I"
19240
+ }), EDITOR_OPTIONS.UNDERLINE, {
19241
+ mac: "⌘U",
19242
+ win: "Ctrl+U"
19243
+ }), EDITOR_OPTIONS.STRIKETHROUGH, {
19244
+ mac: "⌘⇧S or ⌘⇧X",
19245
+ win: "Ctrl+Shift+S or Ctrl+Shift+X"
19246
+ }), EDITOR_OPTIONS.CODE, {
19247
+ mac: "⌘E",
19248
+ win: "Ctrl+E"
19249
+ }), EDITOR_OPTIONS.UNDO, {
19250
+ mac: "⌘Z",
19251
+ win: "Ctrl+Z"
19252
+ }), EDITOR_OPTIONS.REDO, {
19253
+ mac: "⌘⇧Z",
19254
+ win: "Ctrl+Shift+Z"
19255
+ }), EDITOR_OPTIONS.LINK, {
19256
+ mac: "⌘K",
19257
+ win: "Ctrl+K"
19258
+ }), EDITOR_OPTIONS.HIGHLIGHT, {
19259
+ mac: "⌘⇧H",
19260
+ win: "Ctrl+Shift+H"
19261
+ }), "bulletList", {
19262
+ mac: "⌘⇧8",
19263
+ win: "Ctrl+Shift+8"
19264
+ }), _defineProperty(_SHORTCUTS, "orderedList", {
19265
+ mac: "⌘⇧7",
19266
+ win: "Ctrl+Shift+7"
19267
+ }));
19268
+ var MENU_ELEMENTS = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, MENU_ELEMENT_TYPES.BUTTON, MenuButton$1), MENU_ELEMENT_TYPES.FONT_SIZE, FontSizeOption$1), MENU_ELEMENT_TYPES.TABLE, TableOption$1), MENU_ELEMENT_TYPES.TEXT_COLOR, TextColorOption), MENU_ELEMENT_TYPES.EMOJI, EmojiOption$1), MENU_ELEMENT_TYPES.MENTIONS, Mentions$1), MENU_ELEMENT_TYPES.HIGHLIGHT, HighlightDropdown);
19269
+ var MENU_ELEMENT_WIDTHS = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, MENU_ELEMENT_TYPES.BUTTON, 36), MENU_ELEMENT_TYPES.FONT_SIZE, 103), MENU_ELEMENT_TYPES.TABLE, 36), MENU_ELEMENT_TYPES.TEXT_COLOR, 36), MENU_ELEMENT_TYPES.EMOJI, 36), MENU_ELEMENT_TYPES.MENTIONS, 36), MENU_ELEMENT_TYPES.HIGHLIGHT, 103);
19070
19270
 
19071
19271
  function ownKeys$1(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
19072
19272
  function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
19073
19273
  var createMenuOptions = function createMenuOptions(_ref) {
19074
- var _tooltips$undo, _tooltips$redo, _tooltips$fontSize, _tooltips$bold, _tooltips$italic, _tooltips$underline, _tooltips$link, _tooltips$strike, _tooltips$highlight, _tooltips$bulletList, _tooltips$orderedList, _tooltips$blockQuote, _tooltips$code, _tooltips$codeBlock, _tooltips$table, _tooltips$attachments, _tooltips$imageUpload, _tooltips$videoUpload, _tooltips$videoEmbed, _tooltips$textColor, _tooltips$emoji, _tooltips$mention;
19274
+ var _tooltips$undo, _tooltips$redo, _tooltips$fontSize, _tooltips$bold, _tooltips$italic, _tooltips$link, _tooltips$strike, _tooltips$highlight, _tooltips$highlight2, _tooltips$bulletList, _tooltips$orderedList, _tooltips$blockQuote, _tooltips$table, _tooltips$attachments, _tooltips$imageUpload, _tooltips$videoEmbed, _tooltips$textColor, _tooltips$emoji, _tooltips$mention, _tooltips$code, _tooltips$codeBlock, _tooltips$videoUpload, _tooltips$underline;
19075
19275
  var tooltips = _ref.tooltips,
19076
19276
  setMediaUploader = _ref.setMediaUploader,
19077
19277
  attachmentProps = _ref.attachmentProps,
@@ -19082,7 +19282,8 @@ var createMenuOptions = function createMenuOptions(_ref) {
19082
19282
  addonCommandOptions = _ref.addonCommandOptions,
19083
19283
  setIsEmojiPickerActive = _ref.setIsEmojiPickerActive,
19084
19284
  isEmojiPickerActive = _ref.isEmojiPickerActive,
19085
- runEditorCommand = _ref.runEditorCommand;
19285
+ runEditorCommand = _ref.runEditorCommand,
19286
+ editor = _ref.editor;
19086
19287
  var fontSizeOptions = options.filter(function (option) {
19087
19288
  return option.match(/^h[1-6]$/);
19088
19289
  });
@@ -19133,15 +19334,6 @@ var createMenuOptions = function createMenuOptions(_ref) {
19133
19334
  }),
19134
19335
  optionName: EDITOR_OPTIONS.ITALIC,
19135
19336
  label: (_tooltips$italic = tooltips.italic) !== null && _tooltips$italic !== void 0 ? _tooltips$italic : t$1("neetoEditor.menu.italic")
19136
- }, {
19137
- type: MENU_ELEMENT_TYPES.BUTTON,
19138
- icon: Underline,
19139
- isEnabled: options.includes(EDITOR_OPTIONS.UNDERLINE),
19140
- command: runEditorCommand(function (editor) {
19141
- return editor.chain().focus().toggleUnderline().run();
19142
- }),
19143
- optionName: EDITOR_OPTIONS.UNDERLINE,
19144
- label: (_tooltips$underline = tooltips.underline) !== null && _tooltips$underline !== void 0 ? _tooltips$underline : t$1("neetoEditor.menu.underline")
19145
19337
  }, {
19146
19338
  type: MENU_ELEMENT_TYPES.BUTTON,
19147
19339
  icon: Link,
@@ -19161,14 +19353,14 @@ var createMenuOptions = function createMenuOptions(_ref) {
19161
19353
  optionName: EDITOR_OPTIONS.STRIKETHROUGH,
19162
19354
  label: (_tooltips$strike = tooltips.strike) !== null && _tooltips$strike !== void 0 ? _tooltips$strike : t$1("neetoEditor.menu.strike")
19163
19355
  }, {
19164
- type: MENU_ELEMENT_TYPES.BUTTON,
19356
+ type: MENU_ELEMENT_TYPES.HIGHLIGHT,
19165
19357
  icon: Highlight,
19358
+ label: (_tooltips$highlight = tooltips.highlight) !== null && _tooltips$highlight !== void 0 ? _tooltips$highlight : t$1("neetoEditor.menu.highlight"),
19166
19359
  isEnabled: options.includes(EDITOR_OPTIONS.HIGHLIGHT),
19167
- command: runEditorCommand(function (editor) {
19168
- return editor.chain().focus().toggleHighlight().run();
19169
- }),
19170
19360
  optionName: EDITOR_OPTIONS.HIGHLIGHT,
19171
- label: (_tooltips$highlight = tooltips.highlight) !== null && _tooltips$highlight !== void 0 ? _tooltips$highlight : t$1("neetoEditor.menu.highlight")
19361
+ editor: editor,
19362
+ runEditorCommand: runEditorCommand,
19363
+ tooltipContent: (_tooltips$highlight2 = tooltips.highlight) !== null && _tooltips$highlight2 !== void 0 ? _tooltips$highlight2 : t$1("neetoEditor.menu.highlight")
19172
19364
  }],
19173
19365
  // list
19174
19366
  [{
@@ -19203,24 +19395,6 @@ var createMenuOptions = function createMenuOptions(_ref) {
19203
19395
  optionName: "blockquote",
19204
19396
  highlight: true,
19205
19397
  label: (_tooltips$blockQuote = tooltips.blockQuote) !== null && _tooltips$blockQuote !== void 0 ? _tooltips$blockQuote : t$1("neetoEditor.menu.blockQuote")
19206
- }, {
19207
- type: MENU_ELEMENT_TYPES.BUTTON,
19208
- icon: Code,
19209
- command: runEditorCommand(function (editor) {
19210
- return editor.chain().focus().toggleCode().run();
19211
- }),
19212
- isEnabled: options.includes(EDITOR_OPTIONS.CODE),
19213
- optionName: EDITOR_OPTIONS.CODE,
19214
- label: (_tooltips$code = tooltips.code) !== null && _tooltips$code !== void 0 ? _tooltips$code : t$1("neetoEditor.menu.code")
19215
- }, {
19216
- type: MENU_ELEMENT_TYPES.BUTTON,
19217
- icon: CodeBlock,
19218
- command: runEditorCommand(function (editor) {
19219
- return editor.chain().focus().toggleCodeBlock().run();
19220
- }),
19221
- isEnabled: options.includes(EDITOR_OPTIONS.CODE_BLOCK),
19222
- optionName: "codeBlock",
19223
- label: (_tooltips$codeBlock = tooltips.codeBlock) !== null && _tooltips$codeBlock !== void 0 ? _tooltips$codeBlock : t$1("neetoEditor.menu.codeBlock")
19224
19398
  }],
19225
19399
  // misc
19226
19400
  [{
@@ -19247,15 +19421,6 @@ var createMenuOptions = function createMenuOptions(_ref) {
19247
19421
  isEnabled: options.includes(EDITOR_OPTIONS.IMAGE_UPLOAD),
19248
19422
  optionName: EDITOR_OPTIONS.IMAGE_UPLOAD,
19249
19423
  label: (_tooltips$imageUpload = tooltips.imageUpload) !== null && _tooltips$imageUpload !== void 0 ? _tooltips$imageUpload : t$1("neetoEditor.menu.imageUpload")
19250
- }, {
19251
- type: MENU_ELEMENT_TYPES.BUTTON,
19252
- icon: Video,
19253
- command: function command() {
19254
- return setMediaUploader(assoc("video", true));
19255
- },
19256
- isEnabled: options.includes(EDITOR_OPTIONS.VIDEO_UPLOAD),
19257
- optionName: EDITOR_OPTIONS.VIDEO_UPLOAD,
19258
- label: (_tooltips$videoUpload = tooltips.videoUpload) !== null && _tooltips$videoUpload !== void 0 ? _tooltips$videoUpload : t$1("neetoEditor.menu.videoUpload")
19259
19424
  }, {
19260
19425
  type: MENU_ELEMENT_TYPES.BUTTON,
19261
19426
  icon: MediaVideo,
@@ -19285,6 +19450,42 @@ var createMenuOptions = function createMenuOptions(_ref) {
19285
19450
  isEnabled: isNotEmpty(mentions),
19286
19451
  optionName: "mentions",
19287
19452
  mentions: mentions
19453
+ }, {
19454
+ type: MENU_ELEMENT_TYPES.BUTTON,
19455
+ icon: Code,
19456
+ command: runEditorCommand(function (editor) {
19457
+ return editor.chain().focus().toggleCode().run();
19458
+ }),
19459
+ isEnabled: options.includes(EDITOR_OPTIONS.CODE),
19460
+ optionName: EDITOR_OPTIONS.CODE,
19461
+ label: (_tooltips$code = tooltips.code) !== null && _tooltips$code !== void 0 ? _tooltips$code : t$1("neetoEditor.menu.code")
19462
+ }, {
19463
+ type: MENU_ELEMENT_TYPES.BUTTON,
19464
+ icon: CodeBlock,
19465
+ command: runEditorCommand(function (editor) {
19466
+ return editor.chain().focus().toggleCodeBlock().run();
19467
+ }),
19468
+ isEnabled: options.includes(EDITOR_OPTIONS.CODE_BLOCK),
19469
+ optionName: "codeBlock",
19470
+ label: (_tooltips$codeBlock = tooltips.codeBlock) !== null && _tooltips$codeBlock !== void 0 ? _tooltips$codeBlock : t$1("neetoEditor.menu.codeBlock")
19471
+ }, {
19472
+ type: MENU_ELEMENT_TYPES.BUTTON,
19473
+ icon: Video,
19474
+ command: function command() {
19475
+ return setMediaUploader(assoc("video", true));
19476
+ },
19477
+ isEnabled: options.includes(EDITOR_OPTIONS.VIDEO_UPLOAD),
19478
+ optionName: EDITOR_OPTIONS.VIDEO_UPLOAD,
19479
+ label: (_tooltips$videoUpload = tooltips.videoUpload) !== null && _tooltips$videoUpload !== void 0 ? _tooltips$videoUpload : t$1("neetoEditor.menu.videoUpload")
19480
+ }, {
19481
+ type: MENU_ELEMENT_TYPES.BUTTON,
19482
+ icon: Underline,
19483
+ isEnabled: options.includes(EDITOR_OPTIONS.UNDERLINE),
19484
+ command: runEditorCommand(function (editor) {
19485
+ return editor.chain().focus().toggleUnderline().run();
19486
+ }),
19487
+ optionName: EDITOR_OPTIONS.UNDERLINE,
19488
+ label: (_tooltips$underline = tooltips.underline) !== null && _tooltips$underline !== void 0 ? _tooltips$underline : t$1("neetoEditor.menu.underline")
19288
19489
  }], //addons
19289
19490
  _toConsumableArray(addonCommandOptions)];
19290
19491
  };
@@ -19319,7 +19520,8 @@ var buildMenuOptions = function buildMenuOptions(_ref3) {
19319
19520
  addonCommands = _ref3.addonCommands,
19320
19521
  setIsEmojiPickerActive = _ref3.setIsEmojiPickerActive,
19321
19522
  isEmojiPickerActive = _ref3.isEmojiPickerActive,
19322
- runEditorCommand = _ref3.runEditorCommand;
19523
+ runEditorCommand = _ref3.runEditorCommand,
19524
+ editor = _ref3.editor;
19323
19525
  var addonCommandOptions = buildOptionsFromAddonCommands({
19324
19526
  commands: addonCommands,
19325
19527
  runEditorCommand: runEditorCommand
@@ -19335,7 +19537,8 @@ var buildMenuOptions = function buildMenuOptions(_ref3) {
19335
19537
  addonCommandOptions: addonCommandOptions,
19336
19538
  setIsEmojiPickerActive: setIsEmojiPickerActive,
19337
19539
  isEmojiPickerActive: isEmojiPickerActive,
19338
- runEditorCommand: runEditorCommand
19540
+ runEditorCommand: runEditorCommand,
19541
+ editor: editor
19339
19542
  });
19340
19543
  return menuOptions.map(function (option) {
19341
19544
  return option.filter(prop("isEnabled"));
@@ -19413,6 +19616,15 @@ var getLinkPopoverPosition = function getLinkPopoverPosition(editor, popoverRef)
19413
19616
  popoverPosition: popoverPosition
19414
19617
  };
19415
19618
  };
19619
+ function renderTooltipContent(label, optionName) {
19620
+ var shortcut = SHORTCUTS[optionName];
19621
+ if (!shortcut) return label;
19622
+ var isMac = function isMac() {
19623
+ return typeof window !== "undefined" && /Mac|iPod|iPhone|iPad/.test(window.navigator.userAgent);
19624
+ };
19625
+ var key = isMac() ? shortcut.mac : shortcut.win;
19626
+ return "".concat(label, " (").concat(key, ")");
19627
+ }
19416
19628
 
19417
19629
  var css = ".neeto-editor-fixed-menu{background-color:rgb(var(--neeto-ui-white));border:thin solid rgb(var(--neeto-ui-gray-400));border-bottom:none;border-radius:var(--neeto-ui-rounded) var(--neeto-ui-rounded) 0 0;display:flex;position:relative}.neeto-editor-fixed-menu--independant{border-bottom:thin solid rgb(var(--neeto-ui-gray-400));border-radius:0;border-radius:initial}.neeto-editor-fixed-menu--independant .neeto-editor-fixed-menu__wrapper{border-bottom:0!important}.neeto-editor-fixed-menu--independant .neeto-editor-fixed-menu__wrapper button.neeto-editor-fixed-menu__item .neeto-ui-btn__icon path{stroke-width:1.8px}.neeto-editor-fixed-menu__item{border-radius:0}.neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item{--neeto-ui-btn-border-radius:0;--neeto-ui-btn-icon-size:22px;--neeto-ui-btn-padding-x:0;--neeto-ui-btn-padding-y:0;--neeto-ui-btn-focus-box-shadow:none;align-items:center;height:36px;justify-content:center;min-width:-moz-fit-content;min-width:fit-content;padding:0;width:36px}.neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item .neeto-ui-btn__icon{color:rgb(var(--neeto-ui-black))}.neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item .neeto-ui-btn__icon path{stroke-width:1.5px}.neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item.neeto-ui-btn--style-secondary{background-color:rgb(var(--neeto-ui-accent-100))}.neeto-editor-fixed-menu button.neeto-editor-fixed-menu__item.neeto-ui-btn--style-secondary .neeto-ui-btn__icon{color:rgb(var(--neeto-ui-accent-800))}.neeto-editor-fixed-menu__wrapper{align-items:center;border-bottom:thin solid rgb(var(--neeto-ui-gray-400));display:flex;flex-grow:1;justify-content:flex-start;padding:0 2px;width:100%}.neeto-editor-fixed-menu__wrapper__button-group{display:flex}.neeto-editor-fixed-menu__variables{bottom:-42px;position:absolute;right:8px;z-index:10}.neeto-editor-fixed-menu__variables .neeto-editor-menu__item{background-color:rgb(var(--neeto-ui-gray-700));border-radius:var(--neeto-ui-rounded-sm);padding:4px}.neeto-editor-fixed-menu__variables .neeto-editor-menu__item.active,.neeto-editor-fixed-menu__variables .neeto-editor-menu__item:hover{background-color:rgb(var(--neeto-ui-gray-600))}.neeto-editor-fixed-menu__right-options{display:flex}.neeto-editor-fixed-menu__emoji-dropdown{max-height:none!important}.neeto-editor-fixed-menu__separator{display:flex;height:28px;width:32px}.neeto-editor-fixed-menu__separator span{width:100%}.neeto-editor-fixed-menu__separator span:first-child{border-right:1px solid rgb(var(--neeto-ui-gray-200))}.neeto-editor-text-color-option__options-group{align-items:center;display:flex;gap:8px;margin:8px 4px}.neeto-editor-text-color-option__options-group__input{max-width:120px}.neeto-editor-text-color-option__options-group__reset-button{align-self:center}.react-colorful{width:100%!important}.neeto-editor-menu__item{align-items:center;border-radius:2px;cursor:pointer;display:flex;flex-direction:row;gap:4px;justify-content:center;padding:8px;transition:var(--neeto-ui-transition)}.neeto-editor-menu__item p{color:rgb(var(--neeto-ui-gray-600));font-size:var(--neeto-ui-text-xs);line-height:1;white-space:nowrap}.neeto-editor-menu__item.active,.neeto-editor-menu__item:hover{background-color:rgb(var(--neeto-ui-gray-200))}.neeto-editor-menu__item:focus,.neeto-editor-menu__item:focus-visible{outline:rgb(var(--neeto-ui-gray-300)) auto 1px}.neeto-editor-menu__item input[type=color]{height:0;visibility:hidden;width:0}.neeto-editor-menu__item:disabled{background-color:rgb(var(--neeto-ui-gray-100));opacity:.5}.neeto-editor-link__item{align-items:flex-start;justify-content:flex-start}.neeto-editor-link__item,.neeto-editor-table__item{display:flex!important;flex-direction:row;gap:8px;padding:8px!important}.neeto-editor-table__item{min-width:210px}.neeto-editor-table__item input{max-width:60px!important}.neeto-editor-table__options-menu{display:flex;flex-direction:column;gap:8px;max-height:150px!important;overflow:scroll;padding:8px!important}.neeto-editor-font-size__wrapper{font-size:16px;font-weight:var(--neeto-ui-font-normal)!important;padding-left:4px!important;padding-right:4px!important}.neeto-editor-bubble-menu{align-items:center;background:rgb(var(--neeto-ui-gray-800));border-radius:var(--neeto-ui-rounded);display:flex;flex-direction:row;gap:1px;justify-content:flex-start;padding:0 4px;position:relative}.neeto-editor-bubble-menu button.neeto-ui-btn--style-text{color:rgb(var(--neeto-ui-gray-200));min-width:-moz-fit-content;min-width:fit-content}.neeto-editor-bubble-menu button.neeto-ui-btn--style-text.active,.neeto-editor-bubble-menu button.neeto-ui-btn--style-text:active,.neeto-editor-bubble-menu button.neeto-ui-btn--style-text:hover{background-color:rgb(var(--neeto-ui-gray-600))!important;color:rgb(var(--neeto-ui-gray-200))!important}.neeto-editor-bubble-menu button.neeto-ui-btn--style-secondary{background-color:rgb(var(--neeto-ui-gray-400));min-width:-moz-fit-content;min-width:fit-content}.neeto-editor-bubble-menu .neeto-ui-dropdown__popup{background-color:rgb(var(--neeto-ui-gray-700))}.neeto-editor-bubble-menu .neeto-ui-dropdown__popup-menu-item-btn{background-color:inherit!important;color:rgb(var(--neeto-ui-gray-200))!important}.neeto-editor-bubble-menu .neeto-ui-dropdown__popup-menu-item-btn.active,.neeto-editor-bubble-menu .neeto-ui-dropdown__popup-menu-item-btn:active,.neeto-editor-bubble-menu .neeto-ui-dropdown__popup-menu-item-btn:hover{background-color:rgb(var(--neeto-ui-gray-600))!important}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link{align-items:center;display:flex;gap:8px;justify-content:space-between;padding:6px;width:256px}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .neeto-editor-bubble-menu-link__input{background-color:transparent;color:rgb(var(--neeto-ui-gray-200));line-height:20px;outline:none;width:100%}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .neeto-editor-bubble-menu-link__input::-moz-placeholder{color:rgba(.4);color:rgba(var(--neeto-ui-white,.4))}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .neeto-editor-bubble-menu-link__input::placeholder{color:rgba(.4);color:rgba(var(--neeto-ui-white,.4))}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .ne-btn--icon-only{min-height:0;opacity:.8;padding:0}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link .ne-btn--icon-only:hover{opacity:1}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__table{align-items:center;display:flex;gap:6px;justify-content:space-between;max-width:256px;padding:4px}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__table input{background-color:rgba(var(--neeto-ui-gray-400),.2);height:24px;line-height:20px;outline:none;padding:3px 5px;width:60px}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__table input::-moz-placeholder{color:rgba(.4);color:rgba(var(--neeto-ui-white,.4))}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__table input::placeholder{color:rgba(.4);color:rgba(var(--neeto-ui-white,.4))}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__table__menu-item{display:flex;flex-direction:column;gap:4px}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__table__input-label{color:#fff}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__table__buttons{align-self:flex-end;display:flex;gap:4px;justify-content:space-between}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__table__options{display:flex;flex-direction:column;gap:2px;max-height:190px;overflow:scroll}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown-target{align-items:center;display:flex;font-size:var(--neeto-ui-text-xs);gap:4px;line-height:var(--neeto-ui-leading-normal);white-space:nowrap}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown{align-items:flex-start;display:flex;flex-direction:column}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown .neeto-editor-bubble-menu__dropdown-item{font-size:var(--neeto-ui-text-xs);padding:8px 12px;text-align:left;width:100%}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown .neeto-editor-bubble-menu__dropdown-item:first-child{border-top-left-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__dropdown .neeto-editor-bubble-menu__dropdown-item:last-child{border-bottom-left-radius:var(--neeto-ui-rounded);border-bottom-right-radius:var(--neeto-ui-rounded)}.neeto-editor-bubble-menu-animate-shake{animation:shake 1s linear infinite alternate both}.neeto-editor-table-menu__button{align-items:flex-end;display:flex}.neeto-editor__image-menu .neeto-ui-dropdown__popup{display:flex;min-width:0;min-width:auto}.neeto-editor__image-menu .neeto-ui-dropdown__popup .neeto-ui-btn .neeto-ui-btn__icon{height:18px!important;width:18px!important}.neeto-editor__image-menu-btn{border-radius:100%;position:absolute!important;right:6px;top:6px;z-index:1}.neeto-editor-menu-font-size-options{padding:8px!important}.neeto-editor-menu-font-size-options .neeto-ui-dropdown__popup-menu-item{background-color:transparent!important}.neeto-editor-menu-font-size-options .neeto-editor-menu-font-size-options__item-btn{border-radius:var(--neeto-ui-btn-border-radius)!important;justify-content:center;min-height:34px;min-width:34px;overflow:hidden;padding-left:0!important;padding-right:0!important;text-align:center}.neeto-editor-menu-font-size-options .neeto-editor-menu-font-size-options__item-btn--selected{background-color:rgb(var(--neeto-ui-accent-100))!important;color:rgb(var(--neeto-ui-accent-800))!important}";
19418
19630
  n(css,{});
@@ -19482,4 +19694,4 @@ var Menu = function Menu(props) {
19482
19694
  };
19483
19695
 
19484
19696
  export { combineTransactionSteps as A, getChangedRanges as B, findChildrenInRange as C, DecorationSet as D, Extension as E, getMarksBetween as F, getAttributes as G, highlightFocussedNode as H, InputRule as I, resetFocussedNode as J, findParentNodeClosestToPos as K, BubbleMenu as L, Menu as M, Node as N, getLinkPopoverPosition as O, PasteRule as P, getMarkType as Q, ReactNodeViewRenderer as R, getMarkRange as S, useEditor as T, useEditorState$1 as U, EditorContent as V, MediaUploader as W, EmbedOption as X, EditorView as Y, Mark as a, markInputRule as b, markPasteRule as c, Decoration as d, isAtStartOfNode as e, isAtEndOfNode as f, getMarkAttributes as g, getNodeType$1 as h, isNodeActive as i, getNodeAtPosition as j, keydownHandler as k, callOrReturn as l, mergeAttributes as m, getExtensionField as n, isNodeSelection as o, nodeInputRule as p, findChildren as q, NodeViewWrapper as r, NodeViewContent as s, textblockTypeInputRule as t, escapeForRegEx as u, validateUrl as v, wrappingInputRule as w, ReactRenderer as x, EmojiPickerMenu as y, emojiPickerApi as z };
19485
- //# sourceMappingURL=chunk-C7yqzIpq.js.map
19697
+ //# sourceMappingURL=chunk-CeFnZWjP.js.map