@bigbinary/neeto-editor 1.45.14 → 1.45.15

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.
Files changed (42) hide show
  1. package/dist/Editor.js +11 -3
  2. package/dist/Editor.js.map +1 -1
  3. package/dist/EditorContent.js +3 -3
  4. package/dist/FormikEditor.js +3 -2
  5. package/dist/FormikEditor.js.map +1 -1
  6. package/dist/{chunk-DBch3tqq.js → chunk-BeW6s4Si.js} +15 -2
  7. package/dist/chunk-BeW6s4Si.js.map +1 -0
  8. package/dist/{chunk-CDBSVHz6.js → chunk-CGoAVMwz.js} +3 -16
  9. package/dist/chunk-CGoAVMwz.js.map +1 -0
  10. package/dist/{chunk-B88REGV6.js → chunk-GwDLPLDQ.js} +6 -3
  11. package/dist/chunk-GwDLPLDQ.js.map +1 -0
  12. package/dist/cjs/Editor.cjs.js +15 -7
  13. package/dist/cjs/Editor.cjs.js.map +1 -1
  14. package/dist/cjs/EditorContent.cjs.js +8 -8
  15. package/dist/cjs/FormikEditor.cjs.js +3 -2
  16. package/dist/cjs/FormikEditor.cjs.js.map +1 -1
  17. package/dist/cjs/{chunk-a-cnTJIr.cjs.js → chunk-3eBSLfI7.cjs.js} +9 -5
  18. package/dist/cjs/chunk-3eBSLfI7.cjs.js.map +1 -0
  19. package/dist/cjs/{chunk-Dh0stJ0O.cjs.js → chunk-B0S9scli.cjs.js} +20 -1
  20. package/dist/cjs/chunk-B0S9scli.cjs.js.map +1 -0
  21. package/dist/cjs/{chunk-BIff7Ppc.cjs.js → chunk-CjXcHxqY.cjs.js} +9 -25
  22. package/dist/cjs/chunk-CjXcHxqY.cjs.js.map +1 -0
  23. package/dist/cjs/index.cjs.js +4 -5
  24. package/dist/cjs/index.cjs.js.map +1 -1
  25. package/dist/cjs/utils.cjs.js +4 -5
  26. package/dist/cjs/utils.cjs.js.map +1 -1
  27. package/dist/editor-stats.html +1 -1
  28. package/dist/index.js +4 -5
  29. package/dist/index.js.map +1 -1
  30. package/dist/utils.js +4 -5
  31. package/dist/utils.js.map +1 -1
  32. package/package.json +1 -1
  33. package/dist/chunk-B88REGV6.js.map +0 -1
  34. package/dist/chunk-CDBSVHz6.js.map +0 -1
  35. package/dist/chunk-DBch3tqq.js.map +0 -1
  36. package/dist/chunk-LjMXcuRe.js +0 -6
  37. package/dist/chunk-LjMXcuRe.js.map +0 -1
  38. package/dist/cjs/chunk-BIff7Ppc.cjs.js.map +0 -1
  39. package/dist/cjs/chunk-DN1S-KLQ.cjs.js +0 -10
  40. package/dist/cjs/chunk-DN1S-KLQ.cjs.js.map +0 -1
  41. package/dist/cjs/chunk-Dh0stJ0O.cjs.js.map +0 -1
  42. package/dist/cjs/chunk-a-cnTJIr.cjs.js.map +0 -1
package/dist/Editor.js CHANGED
@@ -14,6 +14,9 @@ import { is, intersection, difference, union, mergeRight, isEmpty as isEmpty$1,
14
14
  import { jsxs, Fragment, jsx } from 'react/jsx-runtime';
15
15
  import { n } from './chunk-DmrvuTKK.js';
16
16
  import { P as Plugin, o as PluginKey, b as Slice, F as Fragment$1, T as TextSelection, S as Selection, d as dropPoint, N as NodeSelection, s as Mapping$1, M as Mark$1, e as MarkType, R as ReplaceError, u as SelectionRange, L as LINK_VALIDATION_SCHEMA, v as validateAndFormatUrl, w as getEditorStyles, x as clipboardTextParser, y as transformPastedHTML, z as setInitialPosition, q as DEFAULT_EDITOR_OPTIONS } from './chunk-UtuZMtPZ.js';
17
+ import 'react-dom/server';
18
+ import { l as lowlight } from './chunk-BeW6s4Si.js';
19
+ import { M as MARGIN_HEIGHT, r as removeEmptyTags } from './chunk-GwDLPLDQ.js';
17
20
  import * as Y from 'yjs';
18
21
  import { UndoManager, Item as Item$1, ContentType, Text as Text$2, XmlElement } from 'yjs';
19
22
  import Down from '@bigbinary/neeto-icons/Down';
@@ -24,7 +27,6 @@ import Input from '@bigbinary/neetoui/Input';
24
27
  import Button from '@bigbinary/neetoui/Button';
25
28
  import { useTranslation } from 'react-i18next';
26
29
  import { t } from 'i18next';
27
- import { l as lowlight } from './chunk-DBch3tqq.js';
28
30
  import _asyncToGenerator from '@babel/runtime/helpers/asyncToGenerator';
29
31
  import _regeneratorRuntime from '@babel/runtime/regenerator';
30
32
  import { flushSync, createPortal } from 'react-dom';
@@ -44,7 +46,6 @@ import Close from '@bigbinary/neeto-icons/Close';
44
46
  import Modal from '@bigbinary/neetoui/Modal';
45
47
  import Avatar from '@bigbinary/neetoui/Avatar';
46
48
  import Typography from '@bigbinary/neetoui/Typography';
47
- import { M as MARGIN_HEIGHT } from './chunk-LjMXcuRe.js';
48
49
  import Tippy from '@tippyjs/react';
49
50
  import Paragraph$1 from '@bigbinary/neeto-icons/Paragraph';
50
51
  import TextH1 from '@bigbinary/neeto-icons/TextH1';
@@ -19693,6 +19694,13 @@ var Editor = function Editor(_ref, ref) {
19693
19694
  var editor = _ref2.editor;
19694
19695
  return onChange(editor.getHTML());
19695
19696
  }, 100);
19697
+ var handleBlur = function handleBlur(props) {
19698
+ var editor = props.editor;
19699
+ var trimmedContent = removeEmptyTags(editor.getHTML());
19700
+ onChange(trimmedContent);
19701
+ editor.commands.setContent(trimmedContent);
19702
+ onBlur(props);
19703
+ };
19696
19704
  var customExtensions = useCustomExtensions({
19697
19705
  placeholder: placeholder,
19698
19706
  extensions: extensions,
@@ -19758,7 +19766,7 @@ var Editor = function Editor(_ref, ref) {
19758
19766
  },
19759
19767
  onUpdate: debouncedOnChangeHandler,
19760
19768
  onFocus: onFocus,
19761
- onBlur: onBlur
19769
+ onBlur: handleBlur
19762
19770
  });
19763
19771
  useEditorState({
19764
19772
  editor: editor,