@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.
@@ -15701,8 +15701,8 @@ var emojiPickerApi = {
15701
15701
  fetch: fetch
15702
15702
  };
15703
15703
 
15704
- 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; }
15705
- 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; }
15704
+ 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; }
15705
+ 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; }
15706
15706
  function _callSuper(t, o, e) { return o = _getPrototypeOf(o), _possibleConstructorReturn$1(t, _isNativeReflectConstruct() ? Reflect.construct(o, e || [], _getPrototypeOf(t).constructor) : o.apply(t, e)); }
15707
15707
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
15708
15708
  var EmojiPickerMenu = /*#__PURE__*/function (_React$Component) {
@@ -15754,7 +15754,7 @@ var EmojiPickerMenu = /*#__PURE__*/function (_React$Component) {
15754
15754
  return _createClass$1(EmojiPickerMenu, [{
15755
15755
  key: "componentDidMount",
15756
15756
  value: function componentDidMount() {
15757
- new emojiMart.Picker(_objectSpread$b(_objectSpread$b({}, this.props), {}, {
15757
+ new emojiMart.Picker(_objectSpread$c(_objectSpread$c({}, this.props), {}, {
15758
15758
  onEmojiSelect: this.handleSelect,
15759
15759
  style: {
15760
15760
  maxWidth: "100%"
@@ -15812,8 +15812,8 @@ var useEditorStore = zustand.create(reactUtils.withImmutableActions(function (se
15812
15812
  };
15813
15813
  }));
15814
15814
 
15815
- 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; }
15816
- 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; }
15815
+ 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; }
15816
+ 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; }
15817
15817
  var MenuButton = function MenuButton(_ref) {
15818
15818
  var icon = _ref.icon,
15819
15819
  command = _ref.command,
@@ -15832,7 +15832,7 @@ var MenuButton = function MenuButton(_ref) {
15832
15832
  isActive = _useEditorStore.isActive,
15833
15833
  _useEditorStore$disab = _useEditorStore.disabled,
15834
15834
  disabled = _useEditorStore$disab === void 0 ? isButtonDisabled : _useEditorStore$disab;
15835
- return /*#__PURE__*/jsxRuntime.jsx(Button$1, _objectSpread$a({
15835
+ return /*#__PURE__*/jsxRuntime.jsx(Button$1, _objectSpread$b({
15836
15836
  disabled: disabled,
15837
15837
  icon: icon,
15838
15838
  className: "neeto-editor-fixed-menu__item",
@@ -15840,7 +15840,7 @@ var MenuButton = function MenuButton(_ref) {
15840
15840
  style: isActive ? "secondary" : "text",
15841
15841
  tabIndex: "-1",
15842
15842
  tooltipProps: {
15843
- content: label,
15843
+ content: renderTooltipContent(label, optionName),
15844
15844
  position: "bottom"
15845
15845
  },
15846
15846
  onClick: command
@@ -15869,9 +15869,6 @@ var EmojiOption = function EmojiOption(_ref) {
15869
15869
  return /*#__PURE__*/jsxRuntime.jsx(Dropdown$1, {
15870
15870
  buttonStyle: "text",
15871
15871
  closeOnSelect: false,
15872
- dropdownProps: {
15873
- classNames: "neeto-editor-fixed-menu__emoji-dropdown"
15874
- },
15875
15872
  icon: Smiley,
15876
15873
  isOpen: isActive,
15877
15874
  position: isSecondaryMenu ? "left-start" : "bottom-start",
@@ -15889,6 +15886,12 @@ var EmojiOption = function EmojiOption(_ref) {
15889
15886
  label: label,
15890
15887
  icon: Smiley
15891
15888
  }),
15889
+ dropdownProps: {
15890
+ classNames: "neeto-editor-fixed-menu__emoji-dropdown",
15891
+ onClick: function onClick(e) {
15892
+ return isSecondaryMenu && e.stopPropagation();
15893
+ }
15894
+ },
15892
15895
  onClose: function onClose() {
15893
15896
  return setActive(false);
15894
15897
  },
@@ -16040,8 +16043,8 @@ var TableOption$2 = function TableOption(_ref) {
16040
16043
  });
16041
16044
  };
16042
16045
 
16043
- 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; }
16044
- 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; }
16046
+ 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; }
16047
+ 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; }
16045
16048
  var createMenuOptions$2 = function createMenuOptions(_ref) {
16046
16049
  var tooltips = _ref.tooltips,
16047
16050
  editor = _ref.editor,
@@ -16285,7 +16288,7 @@ var renderOptionButton = function renderOptionButton(_ref4) {
16285
16288
  active = _ref4.active,
16286
16289
  optionName = _ref4.optionName,
16287
16290
  highlight = _ref4.highlight;
16288
- return /*#__PURE__*/jsxRuntime.jsx(Button$1, _objectSpread$9({
16291
+ return /*#__PURE__*/jsxRuntime.jsx(Button$1, _objectSpread$a({
16289
16292
  "data-cy": "neeto-editor-bubble-menu-".concat(optionName, "-option"),
16290
16293
  icon: Icon,
16291
16294
  size: "small",
@@ -18098,8 +18101,8 @@ var LinkAddPopOver = function LinkAddPopOver(_ref) {
18098
18101
  };
18099
18102
 
18100
18103
  var _excluded$3 = ["type"];
18101
- 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; }
18102
- 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; }
18104
+ 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; }
18105
+ 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; }
18103
18106
  var Menu$3 = Dropdown$1.Menu,
18104
18107
  MenuItem$1 = Dropdown$1.MenuItem;
18105
18108
  var MoreMenu = function MoreMenu(_ref) {
@@ -18120,18 +18123,18 @@ var MoreMenu = function MoreMenu(_ref) {
18120
18123
  var Component = MENU_ELEMENTS[type];
18121
18124
  if (type === MENU_ELEMENT_TYPES.BUTTON) {
18122
18125
  var Icon = props.icon;
18123
- return /*#__PURE__*/jsxRuntime.jsxs(MenuItem$1.Button, _objectSpread$8(_objectSpread$8({
18126
+ return /*#__PURE__*/jsxRuntime.jsxs(MenuItem$1.Button, _objectSpread$9(_objectSpread$9({
18124
18127
  "data-cy": "neeto-editor-fixed-menu-".concat(props.optionName, "-option"),
18125
18128
  isActive: editor.isActive(props.optionName),
18126
18129
  tabIndex: "-1",
18127
18130
  onClick: props.command
18128
- }, _objectSpread$8(_objectSpread$8(_objectSpread$8({}, generateFocusProps(props.highlight)), props), {}, {
18131
+ }, _objectSpread$9(_objectSpread$9(_objectSpread$9({}, generateFocusProps(props.highlight)), props), {}, {
18129
18132
  editor: editor
18130
18133
  })), {}, {
18131
18134
  children: [/*#__PURE__*/jsxRuntime.jsx(Icon, {}), " ", props.label]
18132
18135
  }), props.optionName);
18133
18136
  }
18134
- return /*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread$8(_objectSpread$8({}, _objectSpread$8(_objectSpread$8({}, props), {}, {
18137
+ return /*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread$9(_objectSpread$9({}, _objectSpread$9(_objectSpread$9({}, props), {}, {
18135
18138
  editor: editor
18136
18139
  }, generateFocusProps(props.highlight))), {}, {
18137
18140
  isSecondaryMenu: true
@@ -18144,8 +18147,8 @@ var MoreMenu = function MoreMenu(_ref) {
18144
18147
 
18145
18148
  var EDITOR_MARKS = [constants.EDITOR_OPTIONS.UNDO, constants.EDITOR_OPTIONS.REDO, "fontSizeOptions", constants.EDITOR_OPTIONS.BOLD, constants.EDITOR_OPTIONS.ITALIC, constants.EDITOR_OPTIONS.UNDERLINE, constants.EDITOR_OPTIONS.LINK, constants.EDITOR_OPTIONS.STRIKETHROUGH, constants.EDITOR_OPTIONS.HIGHLIGHT, "bulletList", "orderedList", "blockquote", constants.EDITOR_OPTIONS.CODE, "codeBlock", constants.EDITOR_OPTIONS.TABLE, constants.EDITOR_OPTIONS.ATTACHMENTS, constants.EDITOR_OPTIONS.IMAGE_UPLOAD, constants.EDITOR_OPTIONS.VIDEO_UPLOAD, constants.EDITOR_OPTIONS.VIDEO_EMBED, constants.EDITOR_OPTIONS.TEXT_COLOR, constants.EDITOR_OPTIONS.EMOJI, "mentions"];
18146
18149
 
18147
- 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; }
18148
- 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; }
18150
+ 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; }
18151
+ 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; }
18149
18152
  var useEditorState = function useEditorState(_ref) {
18150
18153
  var editor = _ref.editor;
18151
18154
  var _useEditorStore = useEditorStore(function (store) {
@@ -18181,7 +18184,7 @@ var useEditorState = function useEditorState(_ref) {
18181
18184
  var redoOptionState = {
18182
18185
  disabled: !editor.can().redo()
18183
18186
  };
18184
- var updatedMarksState = _objectSpread$7(_objectSpread$7({}, marksState), {}, _defineProperty(_defineProperty({}, constants.EDITOR_OPTIONS.UNDO, undoOptionState), constants.EDITOR_OPTIONS.REDO, redoOptionState));
18187
+ var updatedMarksState = _objectSpread$8(_objectSpread$8({}, marksState), {}, _defineProperty(_defineProperty({}, constants.EDITOR_OPTIONS.UNDO, undoOptionState), constants.EDITOR_OPTIONS.REDO, redoOptionState));
18185
18188
  setMarksState(updatedMarksState);
18186
18189
  }, [marksState, setMarksState]);
18187
18190
  React.useEffect(function () {
@@ -18201,8 +18204,8 @@ var useEditorState = function useEditorState(_ref) {
18201
18204
  };
18202
18205
 
18203
18206
  var _excluded$2 = ["type"];
18204
- 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; }
18205
- 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; }
18207
+ 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; }
18208
+ 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; }
18206
18209
  var Fixed = function Fixed(_ref) {
18207
18210
  var editor = _ref.editor,
18208
18211
  options = _ref.options,
@@ -18301,7 +18304,8 @@ var Fixed = function Fixed(_ref) {
18301
18304
  mentions: mentions,
18302
18305
  addonCommands: addonCommands,
18303
18306
  setIsEmojiPickerActive: setIsEmojiPickerActive,
18304
- isEmojiPickerActive: isEmojiPickerActive
18307
+ isEmojiPickerActive: isEmojiPickerActive,
18308
+ editor: editor
18305
18309
  });
18306
18310
  }, [isEmojiPickerActive, mentions]);
18307
18311
  var handleResize = React.useCallback(function () {
@@ -18353,7 +18357,7 @@ var Fixed = function Fixed(_ref) {
18353
18357
  props = _objectWithoutProperties$1(_ref2, _excluded$2);
18354
18358
  var Component = MENU_ELEMENTS[type];
18355
18359
  if (!Component) return null;
18356
- return /*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread$6({}, _objectSpread$6(_objectSpread$6({}, props), {}, {
18360
+ return /*#__PURE__*/jsxRuntime.jsx(Component, _objectSpread$7({}, _objectSpread$7(_objectSpread$7({}, props), {}, {
18357
18361
  editor: editor,
18358
18362
  options: options
18359
18363
  })), props.optionName);
@@ -18402,8 +18406,8 @@ var Fixed = function Fixed(_ref) {
18402
18406
  };
18403
18407
 
18404
18408
  var _excluded$1 = ["icon", "onClick", "disabled", "className", "tooltipProps"];
18405
- 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; }
18406
- 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; }
18409
+ 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; }
18410
+ 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; }
18407
18411
  var Button = function Button(_ref) {
18408
18412
  var _ref$icon = _ref.icon,
18409
18413
  icon = _ref$icon === void 0 ? null : _ref$icon,
@@ -18415,16 +18419,16 @@ var Button = function Button(_ref) {
18415
18419
  tooltipProps = _ref.tooltipProps,
18416
18420
  otherProps = _objectWithoutProperties$1(_ref, _excluded$1);
18417
18421
  var Icon = icon;
18418
- return /*#__PURE__*/jsxRuntime.jsx(Tooltip, _objectSpread$5(_objectSpread$5({
18422
+ return /*#__PURE__*/jsxRuntime.jsx(Tooltip, _objectSpread$6(_objectSpread$6({
18419
18423
  disabled: !tooltipProps,
18420
18424
  onClick: function onClick() {
18421
18425
  return _onClick();
18422
18426
  }
18423
18427
  }, tooltipProps), {}, {
18424
- children: /*#__PURE__*/jsxRuntime.jsx("button", _objectSpread$5(_objectSpread$5({
18428
+ children: /*#__PURE__*/jsxRuntime.jsx("button", _objectSpread$6(_objectSpread$6({
18425
18429
  className: classnames("ne-headless-btn", _defineProperty({}, className, className)),
18426
18430
  type: "button"
18427
- }, _objectSpread$5({
18431
+ }, _objectSpread$6({
18428
18432
  disabled: disabled,
18429
18433
  onClick: _onClick
18430
18434
  }, otherProps)), {}, {
@@ -18437,8 +18441,8 @@ var Button = function Button(_ref) {
18437
18441
  };
18438
18442
 
18439
18443
  var _excluded = ["icon", "isOpen", "onClose", "children", "className", "onClick", "buttonProps"];
18440
- 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; }
18441
- 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; }
18444
+ 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; }
18445
+ 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; }
18442
18446
  var hideOnEsc = {
18443
18447
  name: "hideOnEsc",
18444
18448
  defaultValue: true,
@@ -18477,7 +18481,7 @@ var Dropdown = function Dropdown(_ref2) {
18477
18481
  _useState2 = _slicedToArray(_useState, 2),
18478
18482
  mounted = _useState2[0],
18479
18483
  setMounted = _useState2[1];
18480
- return /*#__PURE__*/jsxRuntime.jsx(Tippy, _objectSpread$4(_objectSpread$4({
18484
+ return /*#__PURE__*/jsxRuntime.jsx(Tippy, _objectSpread$5(_objectSpread$5({
18481
18485
  onClose: onClose,
18482
18486
  hideOnEsc: true,
18483
18487
  interactive: true,
@@ -18509,7 +18513,7 @@ var Dropdown = function Dropdown(_ref2) {
18509
18513
  }
18510
18514
  }, otherProps), {}, {
18511
18515
  children: /*#__PURE__*/jsxRuntime.jsx("span", {
18512
- children: /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread$4({}, _objectSpread$4({
18516
+ children: /*#__PURE__*/jsxRuntime.jsx(Button, _objectSpread$5({}, _objectSpread$5({
18513
18517
  icon: icon,
18514
18518
  onClick: onClick
18515
18519
  }, buttonProps)))
@@ -18582,8 +18586,8 @@ var Option = function Option(_ref) {
18582
18586
  });
18583
18587
  };
18584
18588
 
18585
- 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; }
18586
- 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; }
18589
+ 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; }
18590
+ 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; }
18587
18591
  var t = i18n.t;
18588
18592
  var createMenuOptions$1 = function createMenuOptions(_ref) {
18589
18593
  var editor = _ref.editor,
@@ -18742,7 +18746,7 @@ var buildOptionsFromAddonCommands$1 = function buildOptionsFromAddonCommands(_re
18742
18746
  var to = editor.state.selection.to;
18743
18747
  return commands.map(function (option) {
18744
18748
  var _option$active;
18745
- return _objectSpread$3(_objectSpread$3({}, option), {}, {
18749
+ return _objectSpread$4(_objectSpread$4({}, option), {}, {
18746
18750
  active: (_option$active = option.active) === null || _option$active === void 0 ? void 0 : _option$active.call(option, {
18747
18751
  editor: editor
18748
18752
  }),
@@ -18784,8 +18788,8 @@ var buildMenuOptions$1 = function buildMenuOptions(_ref3) {
18784
18788
  }).filter(Boolean);
18785
18789
  };
18786
18790
 
18787
- 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; }
18788
- 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; }
18791
+ 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; }
18792
+ 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; }
18789
18793
  var Headless = function Headless(_ref) {
18790
18794
  var editor = _ref.editor,
18791
18795
  options = _ref.options,
@@ -18823,7 +18827,7 @@ var Headless = function Headless(_ref) {
18823
18827
  return /*#__PURE__*/jsxRuntime.jsxs("div", {
18824
18828
  className: classnames("ne-headless", _defineProperty({}, className, className)),
18825
18829
  children: [allOptions.map(function (option) {
18826
- return /*#__PURE__*/React.createElement(Option, _objectSpread$2({
18830
+ return /*#__PURE__*/React.createElement(Option, _objectSpread$3({
18827
18831
  editor: editor,
18828
18832
  key: option.optionName
18829
18833
  }, option));
@@ -18963,6 +18967,166 @@ var FontSizeOption = function FontSizeOption(_ref) {
18963
18967
  };
18964
18968
  var FontSizeOption$1 = /*#__PURE__*/React.memo(FontSizeOption);
18965
18969
 
18970
+ 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; }
18971
+ 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; }
18972
+ var ColorDot = function ColorDot(_ref) {
18973
+ var colorVar = _ref.colorVar,
18974
+ isSelected = _ref.isSelected,
18975
+ onClick = _ref.onClick,
18976
+ isTextColor = _ref.isTextColor;
18977
+ var dotClass = classnames("neeto-editor-highlight-dropdown__color-dot", {
18978
+ "neeto-editor-highlight-dropdown__color-dot--selected": isSelected,
18979
+ "neeto-editor-highlight-dropdown__color-dot--background": !isTextColor
18980
+ });
18981
+ var dotStyle = _objectSpread$2({}, isTextColor ? {
18982
+ color: "var(".concat(colorVar, ")")
18983
+ } : {
18984
+ backgroundColor: "var(".concat(colorVar, ")")
18985
+ });
18986
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
18987
+ onClick: onClick,
18988
+ className: dotClass,
18989
+ style: dotStyle,
18990
+ children: isTextColor && /*#__PURE__*/jsxRuntime.jsx(Typography, {
18991
+ className: "neeto-editor-highlight-dropdown__color-dot-text",
18992
+ style: "body2",
18993
+ weight: "semibold",
18994
+ children: "A"
18995
+ })
18996
+ });
18997
+ };
18998
+
18999
+ var ColorDotIcon = function ColorDotIcon(_ref) {
19000
+ var textColor = _ref.textColor,
19001
+ backgroundColor = _ref.backgroundColor;
19002
+ var dotClass = classnames("neeto-editor-highlight-dropdown__color-dot", {});
19003
+ var dotStyle = {
19004
+ color: "var(".concat(textColor, ")"),
19005
+ backgroundColor: "var(".concat(backgroundColor, ")")
19006
+ };
19007
+ return /*#__PURE__*/jsxRuntime.jsx("div", {
19008
+ className: dotClass,
19009
+ style: dotStyle,
19010
+ children: /*#__PURE__*/jsxRuntime.jsx(Typography, {
19011
+ className: "neeto-editor-highlight-dropdown__color-dot-text",
19012
+ style: "body2",
19013
+ weight: "semibold",
19014
+ children: "A"
19015
+ })
19016
+ });
19017
+ };
19018
+
19019
+ var COLORS = {
19020
+ recent: ["--neeto-editor-highlight-bg-yellow-light"],
19021
+ 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"],
19022
+ 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"]
19023
+ };
19024
+
19025
+ var colorSections = [{
19026
+ title: "Text color",
19027
+ colors: COLORS.text,
19028
+ isTextColor: true
19029
+ }, {
19030
+ title: "Background color",
19031
+ colors: COLORS.background,
19032
+ isTextColor: false
19033
+ }];
19034
+ var HighlightDropdown = function HighlightDropdown(_ref) {
19035
+ var editor = _ref.editor,
19036
+ label = _ref.label,
19037
+ tooltipContent = _ref.tooltipContent,
19038
+ runEditorCommand = _ref.runEditorCommand;
19039
+ var dropdownRef = React.useRef(null);
19040
+ var textColor = editor.getAttributes("textStyle").color;
19041
+ var backgroundColor = editor.getAttributes("textStyle").backgroundColor;
19042
+ var updateBackgroundColor = function updateBackgroundColor(value) {
19043
+ runEditorCommand(function (editor) {
19044
+ return editor.chain().focus().setMark("textStyle", {
19045
+ backgroundColor: value
19046
+ }).run();
19047
+ })();
19048
+ };
19049
+ var handleBackgroundColorClick = function handleBackgroundColorClick(colorVar) {
19050
+ if (backgroundColor === "var(".concat(colorVar, ")")) {
19051
+ updateBackgroundColor(null);
19052
+ } else {
19053
+ updateBackgroundColor("var(".concat(colorVar, ")"));
19054
+ }
19055
+ };
19056
+ var handleTextColorClick = function handleTextColorClick(colorVar) {
19057
+ if (textColor === "var(".concat(colorVar, ")")) {
19058
+ editor.chain().focus().unsetColor().run();
19059
+ } else {
19060
+ editor.chain().focus().setColor("var(".concat(colorVar, ")")).run();
19061
+ }
19062
+ };
19063
+ var renderColorDots = function renderColorDots(colorList) {
19064
+ var isTextColor = arguments.length > 1 && arguments[1] !== undefined ? arguments[1] : false;
19065
+ return colorList.map(function (colorVar, idx) {
19066
+ return /*#__PURE__*/React.createElement(ColorDot, {
19067
+ colorVar: colorVar,
19068
+ isTextColor: isTextColor,
19069
+ key: idx,
19070
+ isSelected: isTextColor ? textColor === "var(".concat(colorVar, ")") : backgroundColor === "var(".concat(colorVar, ")"),
19071
+ onClick: function onClick() {
19072
+ return isTextColor ? handleTextColorClick(colorVar) : handleBackgroundColorClick(colorVar);
19073
+ }
19074
+ });
19075
+ });
19076
+ };
19077
+ return /*#__PURE__*/jsxRuntime.jsx(Dropdown$1, {
19078
+ autoWidth: true,
19079
+ placement: "bottom-start",
19080
+ strategy: "fixed",
19081
+ buttonProps: {
19082
+ icon: function icon() {
19083
+ return /*#__PURE__*/jsxRuntime.jsx(ColorDotIcon, {
19084
+ backgroundColor: backgroundColor,
19085
+ textColor: textColor
19086
+ });
19087
+ },
19088
+ iconPosition: "left",
19089
+ iconSize: 20,
19090
+ label: /*#__PURE__*/jsxRuntime.jsx(Down, {
19091
+ size: 12
19092
+ }),
19093
+ ref: dropdownRef,
19094
+ "data-cy": "neeto-editor-fixed-menu-highlight-option",
19095
+ onKeyDown: function onKeyDown(event) {
19096
+ var _dropdownRef$current;
19097
+ return event.key === "ArrowDown" && ((_dropdownRef$current = dropdownRef.current) === null || _dropdownRef$current === void 0 ? void 0 : _dropdownRef$current.click());
19098
+ },
19099
+ tooltipProps: {
19100
+ content: tooltipContent !== null && tooltipContent !== void 0 ? tooltipContent : label,
19101
+ position: "bottom"
19102
+ },
19103
+ style: "text",
19104
+ size: "small",
19105
+ className: "neeto-editor-fixed-menu__item"
19106
+ },
19107
+ children: /*#__PURE__*/jsxRuntime.jsx(Dropdown$1.Menu, {
19108
+ className: "neeto-editor-highlight-dropdown",
19109
+ children: colorSections.map(function (_ref2) {
19110
+ var title = _ref2.title,
19111
+ colors = _ref2.colors,
19112
+ isTextColor = _ref2.isTextColor;
19113
+ return /*#__PURE__*/jsxRuntime.jsxs("div", {
19114
+ className: "neeto-editor-highlight-dropdown__section",
19115
+ children: [/*#__PURE__*/jsxRuntime.jsx(Typography, {
19116
+ className: "neeto-editor-highlight-dropdown__section-title",
19117
+ style: "body2",
19118
+ weight: "normal",
19119
+ children: title
19120
+ }), /*#__PURE__*/jsxRuntime.jsx("div", {
19121
+ className: "neeto-editor-highlight-dropdown__color-grid",
19122
+ children: renderColorDots(colors, isTextColor)
19123
+ })]
19124
+ }, title);
19125
+ })
19126
+ })
19127
+ });
19128
+ };
19129
+
18966
19130
  var Menu$1 = Dropdown$1.Menu;
18967
19131
  var TableOption = function TableOption(_ref) {
18968
19132
  var editor = _ref.editor,
@@ -19059,21 +19223,57 @@ var TableOption = function TableOption(_ref) {
19059
19223
  };
19060
19224
  var TableOption$1 = /*#__PURE__*/React.memo(TableOption);
19061
19225
 
19226
+ var _SHORTCUTS;
19062
19227
  var MENU_ELEMENT_TYPES = {
19063
19228
  BUTTON: "button",
19064
19229
  FONT_SIZE: "fontSize",
19065
19230
  TABLE: "table",
19066
19231
  TEXT_COLOR: "textColor",
19067
19232
  EMOJI: "emoji",
19068
- MENTIONS: "mentions"
19233
+ MENTIONS: "mentions",
19234
+ HIGHLIGHT: "highlight"
19069
19235
  };
19070
- 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);
19071
- 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);
19236
+ var SHORTCUTS = (_SHORTCUTS = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_SHORTCUTS, constants.EDITOR_OPTIONS.BOLD, {
19237
+ mac: "⌘B",
19238
+ win: "Ctrl+B"
19239
+ }), constants.EDITOR_OPTIONS.ITALIC, {
19240
+ mac: "⌘I",
19241
+ win: "Ctrl+I"
19242
+ }), constants.EDITOR_OPTIONS.UNDERLINE, {
19243
+ mac: "⌘U",
19244
+ win: "Ctrl+U"
19245
+ }), constants.EDITOR_OPTIONS.STRIKETHROUGH, {
19246
+ mac: "⌘⇧S or ⌘⇧X",
19247
+ win: "Ctrl+Shift+S or Ctrl+Shift+X"
19248
+ }), constants.EDITOR_OPTIONS.CODE, {
19249
+ mac: "⌘E",
19250
+ win: "Ctrl+E"
19251
+ }), constants.EDITOR_OPTIONS.UNDO, {
19252
+ mac: "⌘Z",
19253
+ win: "Ctrl+Z"
19254
+ }), constants.EDITOR_OPTIONS.REDO, {
19255
+ mac: "⌘⇧Z",
19256
+ win: "Ctrl+Shift+Z"
19257
+ }), constants.EDITOR_OPTIONS.LINK, {
19258
+ mac: "⌘K",
19259
+ win: "Ctrl+K"
19260
+ }), constants.EDITOR_OPTIONS.HIGHLIGHT, {
19261
+ mac: "⌘⇧H",
19262
+ win: "Ctrl+Shift+H"
19263
+ }), "bulletList", {
19264
+ mac: "⌘⇧8",
19265
+ win: "Ctrl+Shift+8"
19266
+ }), _defineProperty(_SHORTCUTS, "orderedList", {
19267
+ mac: "⌘⇧7",
19268
+ win: "Ctrl+Shift+7"
19269
+ }));
19270
+ 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);
19271
+ 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);
19072
19272
 
19073
19273
  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; }
19074
19274
  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; }
19075
19275
  var createMenuOptions = function createMenuOptions(_ref) {
19076
- 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;
19276
+ 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;
19077
19277
  var tooltips = _ref.tooltips,
19078
19278
  setMediaUploader = _ref.setMediaUploader,
19079
19279
  attachmentProps = _ref.attachmentProps,
@@ -19084,7 +19284,8 @@ var createMenuOptions = function createMenuOptions(_ref) {
19084
19284
  addonCommandOptions = _ref.addonCommandOptions,
19085
19285
  setIsEmojiPickerActive = _ref.setIsEmojiPickerActive,
19086
19286
  isEmojiPickerActive = _ref.isEmojiPickerActive,
19087
- runEditorCommand = _ref.runEditorCommand;
19287
+ runEditorCommand = _ref.runEditorCommand,
19288
+ editor = _ref.editor;
19088
19289
  var fontSizeOptions = options.filter(function (option) {
19089
19290
  return option.match(/^h[1-6]$/);
19090
19291
  });
@@ -19135,15 +19336,6 @@ var createMenuOptions = function createMenuOptions(_ref) {
19135
19336
  }),
19136
19337
  optionName: constants.EDITOR_OPTIONS.ITALIC,
19137
19338
  label: (_tooltips$italic = tooltips.italic) !== null && _tooltips$italic !== void 0 ? _tooltips$italic : i18n.t("neetoEditor.menu.italic")
19138
- }, {
19139
- type: MENU_ELEMENT_TYPES.BUTTON,
19140
- icon: Underline,
19141
- isEnabled: options.includes(constants.EDITOR_OPTIONS.UNDERLINE),
19142
- command: runEditorCommand(function (editor) {
19143
- return editor.chain().focus().toggleUnderline().run();
19144
- }),
19145
- optionName: constants.EDITOR_OPTIONS.UNDERLINE,
19146
- label: (_tooltips$underline = tooltips.underline) !== null && _tooltips$underline !== void 0 ? _tooltips$underline : i18n.t("neetoEditor.menu.underline")
19147
19339
  }, {
19148
19340
  type: MENU_ELEMENT_TYPES.BUTTON,
19149
19341
  icon: Link,
@@ -19163,14 +19355,14 @@ var createMenuOptions = function createMenuOptions(_ref) {
19163
19355
  optionName: constants.EDITOR_OPTIONS.STRIKETHROUGH,
19164
19356
  label: (_tooltips$strike = tooltips.strike) !== null && _tooltips$strike !== void 0 ? _tooltips$strike : i18n.t("neetoEditor.menu.strike")
19165
19357
  }, {
19166
- type: MENU_ELEMENT_TYPES.BUTTON,
19358
+ type: MENU_ELEMENT_TYPES.HIGHLIGHT,
19167
19359
  icon: Highlight,
19360
+ label: (_tooltips$highlight = tooltips.highlight) !== null && _tooltips$highlight !== void 0 ? _tooltips$highlight : i18n.t("neetoEditor.menu.highlight"),
19168
19361
  isEnabled: options.includes(constants.EDITOR_OPTIONS.HIGHLIGHT),
19169
- command: runEditorCommand(function (editor) {
19170
- return editor.chain().focus().toggleHighlight().run();
19171
- }),
19172
19362
  optionName: constants.EDITOR_OPTIONS.HIGHLIGHT,
19173
- label: (_tooltips$highlight = tooltips.highlight) !== null && _tooltips$highlight !== void 0 ? _tooltips$highlight : i18n.t("neetoEditor.menu.highlight")
19363
+ editor: editor,
19364
+ runEditorCommand: runEditorCommand,
19365
+ tooltipContent: (_tooltips$highlight2 = tooltips.highlight) !== null && _tooltips$highlight2 !== void 0 ? _tooltips$highlight2 : i18n.t("neetoEditor.menu.highlight")
19174
19366
  }],
19175
19367
  // list
19176
19368
  [{
@@ -19205,24 +19397,6 @@ var createMenuOptions = function createMenuOptions(_ref) {
19205
19397
  optionName: "blockquote",
19206
19398
  highlight: true,
19207
19399
  label: (_tooltips$blockQuote = tooltips.blockQuote) !== null && _tooltips$blockQuote !== void 0 ? _tooltips$blockQuote : i18n.t("neetoEditor.menu.blockQuote")
19208
- }, {
19209
- type: MENU_ELEMENT_TYPES.BUTTON,
19210
- icon: Code,
19211
- command: runEditorCommand(function (editor) {
19212
- return editor.chain().focus().toggleCode().run();
19213
- }),
19214
- isEnabled: options.includes(constants.EDITOR_OPTIONS.CODE),
19215
- optionName: constants.EDITOR_OPTIONS.CODE,
19216
- label: (_tooltips$code = tooltips.code) !== null && _tooltips$code !== void 0 ? _tooltips$code : i18n.t("neetoEditor.menu.code")
19217
- }, {
19218
- type: MENU_ELEMENT_TYPES.BUTTON,
19219
- icon: CodeBlock,
19220
- command: runEditorCommand(function (editor) {
19221
- return editor.chain().focus().toggleCodeBlock().run();
19222
- }),
19223
- isEnabled: options.includes(constants.EDITOR_OPTIONS.CODE_BLOCK),
19224
- optionName: "codeBlock",
19225
- label: (_tooltips$codeBlock = tooltips.codeBlock) !== null && _tooltips$codeBlock !== void 0 ? _tooltips$codeBlock : i18n.t("neetoEditor.menu.codeBlock")
19226
19400
  }],
19227
19401
  // misc
19228
19402
  [{
@@ -19249,15 +19423,6 @@ var createMenuOptions = function createMenuOptions(_ref) {
19249
19423
  isEnabled: options.includes(constants.EDITOR_OPTIONS.IMAGE_UPLOAD),
19250
19424
  optionName: constants.EDITOR_OPTIONS.IMAGE_UPLOAD,
19251
19425
  label: (_tooltips$imageUpload = tooltips.imageUpload) !== null && _tooltips$imageUpload !== void 0 ? _tooltips$imageUpload : i18n.t("neetoEditor.menu.imageUpload")
19252
- }, {
19253
- type: MENU_ELEMENT_TYPES.BUTTON,
19254
- icon: Video,
19255
- command: function command() {
19256
- return setMediaUploader(ramda.assoc("video", true));
19257
- },
19258
- isEnabled: options.includes(constants.EDITOR_OPTIONS.VIDEO_UPLOAD),
19259
- optionName: constants.EDITOR_OPTIONS.VIDEO_UPLOAD,
19260
- label: (_tooltips$videoUpload = tooltips.videoUpload) !== null && _tooltips$videoUpload !== void 0 ? _tooltips$videoUpload : i18n.t("neetoEditor.menu.videoUpload")
19261
19426
  }, {
19262
19427
  type: MENU_ELEMENT_TYPES.BUTTON,
19263
19428
  icon: MediaVideo,
@@ -19287,6 +19452,42 @@ var createMenuOptions = function createMenuOptions(_ref) {
19287
19452
  isEnabled: neetoCist.isNotEmpty(mentions),
19288
19453
  optionName: "mentions",
19289
19454
  mentions: mentions
19455
+ }, {
19456
+ type: MENU_ELEMENT_TYPES.BUTTON,
19457
+ icon: Code,
19458
+ command: runEditorCommand(function (editor) {
19459
+ return editor.chain().focus().toggleCode().run();
19460
+ }),
19461
+ isEnabled: options.includes(constants.EDITOR_OPTIONS.CODE),
19462
+ optionName: constants.EDITOR_OPTIONS.CODE,
19463
+ label: (_tooltips$code = tooltips.code) !== null && _tooltips$code !== void 0 ? _tooltips$code : i18n.t("neetoEditor.menu.code")
19464
+ }, {
19465
+ type: MENU_ELEMENT_TYPES.BUTTON,
19466
+ icon: CodeBlock,
19467
+ command: runEditorCommand(function (editor) {
19468
+ return editor.chain().focus().toggleCodeBlock().run();
19469
+ }),
19470
+ isEnabled: options.includes(constants.EDITOR_OPTIONS.CODE_BLOCK),
19471
+ optionName: "codeBlock",
19472
+ label: (_tooltips$codeBlock = tooltips.codeBlock) !== null && _tooltips$codeBlock !== void 0 ? _tooltips$codeBlock : i18n.t("neetoEditor.menu.codeBlock")
19473
+ }, {
19474
+ type: MENU_ELEMENT_TYPES.BUTTON,
19475
+ icon: Video,
19476
+ command: function command() {
19477
+ return setMediaUploader(ramda.assoc("video", true));
19478
+ },
19479
+ isEnabled: options.includes(constants.EDITOR_OPTIONS.VIDEO_UPLOAD),
19480
+ optionName: constants.EDITOR_OPTIONS.VIDEO_UPLOAD,
19481
+ label: (_tooltips$videoUpload = tooltips.videoUpload) !== null && _tooltips$videoUpload !== void 0 ? _tooltips$videoUpload : i18n.t("neetoEditor.menu.videoUpload")
19482
+ }, {
19483
+ type: MENU_ELEMENT_TYPES.BUTTON,
19484
+ icon: Underline,
19485
+ isEnabled: options.includes(constants.EDITOR_OPTIONS.UNDERLINE),
19486
+ command: runEditorCommand(function (editor) {
19487
+ return editor.chain().focus().toggleUnderline().run();
19488
+ }),
19489
+ optionName: constants.EDITOR_OPTIONS.UNDERLINE,
19490
+ label: (_tooltips$underline = tooltips.underline) !== null && _tooltips$underline !== void 0 ? _tooltips$underline : i18n.t("neetoEditor.menu.underline")
19290
19491
  }], //addons
19291
19492
  _toConsumableArray(addonCommandOptions)];
19292
19493
  };
@@ -19321,7 +19522,8 @@ var buildMenuOptions = function buildMenuOptions(_ref3) {
19321
19522
  addonCommands = _ref3.addonCommands,
19322
19523
  setIsEmojiPickerActive = _ref3.setIsEmojiPickerActive,
19323
19524
  isEmojiPickerActive = _ref3.isEmojiPickerActive,
19324
- runEditorCommand = _ref3.runEditorCommand;
19525
+ runEditorCommand = _ref3.runEditorCommand,
19526
+ editor = _ref3.editor;
19325
19527
  var addonCommandOptions = buildOptionsFromAddonCommands({
19326
19528
  commands: addonCommands,
19327
19529
  runEditorCommand: runEditorCommand
@@ -19337,7 +19539,8 @@ var buildMenuOptions = function buildMenuOptions(_ref3) {
19337
19539
  addonCommandOptions: addonCommandOptions,
19338
19540
  setIsEmojiPickerActive: setIsEmojiPickerActive,
19339
19541
  isEmojiPickerActive: isEmojiPickerActive,
19340
- runEditorCommand: runEditorCommand
19542
+ runEditorCommand: runEditorCommand,
19543
+ editor: editor
19341
19544
  });
19342
19545
  return menuOptions.map(function (option) {
19343
19546
  return option.filter(ramda.prop("isEnabled"));
@@ -19415,6 +19618,15 @@ var getLinkPopoverPosition = function getLinkPopoverPosition(editor, popoverRef)
19415
19618
  popoverPosition: popoverPosition
19416
19619
  };
19417
19620
  };
19621
+ function renderTooltipContent(label, optionName) {
19622
+ var shortcut = SHORTCUTS[optionName];
19623
+ if (!shortcut) return label;
19624
+ var isMac = function isMac() {
19625
+ return typeof window !== "undefined" && /Mac|iPod|iPhone|iPad/.test(window.navigator.userAgent);
19626
+ };
19627
+ var key = isMac() ? shortcut.mac : shortcut.win;
19628
+ return "".concat(label, " (").concat(key, ")");
19629
+ }
19418
19630
 
19419
19631
  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}";
19420
19632
  injectCss.n(css,{});
@@ -19534,4 +19746,4 @@ exports.useEditor = useEditor;
19534
19746
  exports.useEditorState = useEditorState$1;
19535
19747
  exports.validateUrl = validateUrl;
19536
19748
  exports.wrappingInputRule = wrappingInputRule;
19537
- //# sourceMappingURL=chunk-DWmDAnNq.cjs.js.map
19749
+ //# sourceMappingURL=chunk-kKbY2sPw.cjs.js.map