@bigbinary/neeto-editor 1.47.1 → 1.47.3

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.
@@ -11,7 +11,7 @@ import { a as EDITOR_SIZES } from './chunk-FWwP48qR.js';
11
11
  import { n } from './chunk-DmrvuTKK.js';
12
12
  import '@bigbinary/neeto-cist';
13
13
  import './chunk-CftSm0ZU.js';
14
- import { s as substituteVariables, a as applySyntaxHighlightingAndLineNumbers, b as applyLineHighlighting } from './chunk-BsDiILIW.js';
14
+ import { s as substituteVariables, a as applySyntaxHighlightingAndLineNumbers, r as replaceHTMLEntities, b as applyLineHighlighting } from './chunk-LYwOO_bQ.js';
15
15
  import { r as removeEmptyTags, E as EDITOR_CONTENT_CLASS_NAME, S as SANITIZE_OPTIONS, b as EDITOR_CONTENT_DEFAULT_CONFIGURATION } from './chunk-BCoBS5ED.js';
16
16
  import { useOnClickOutside } from '@bigbinary/neeto-commons-frontend/react-utils';
17
17
  import Close from '@bigbinary/neeto-icons/Close';
@@ -149,7 +149,7 @@ var EditorContent = function EditorContent(_ref) {
149
149
  imagePreviewDetails = _useState2[0],
150
150
  setImagePreviewDetails = _useState2[1];
151
151
  var editorContentRef = useRef(null);
152
- var htmlContent = substituteVariables(applySyntaxHighlightingAndLineNumbers(removeEmptyTags(content)), variables);
152
+ var htmlContent = substituteVariables(applySyntaxHighlightingAndLineNumbers(replaceHTMLEntities(removeEmptyTags(content))), variables);
153
153
  var sanitize = DOMPurify.sanitize;
154
154
  var injectCopyButtonToCodeBlocks = function injectCopyButtonToCodeBlocks() {
155
155
  var _editorContentRef$cur;
@@ -1 +1 @@
1
- {"version":3,"file":"EditorContent.js","sources":["../src/components/EditorContent/ImagePreview.jsx","../src/components/EditorContent/utils/headers.js","../src/components/EditorContent/index.jsx"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\n\nimport classnames from \"classnames\";\nimport { useOnClickOutside } from \"neetocommons/react-utils\";\nimport { Close } from \"neetoicons\";\nimport { Button, Spinner } from \"neetoui\";\nimport { createPortal } from \"react-dom\";\nimport { useTranslation } from \"react-i18next\";\n\nconst ImagePreview = ({ imagePreviewDetails, setImagePreviewDetails }) => {\n const [isLoading, setIsLoading] = useState(true);\n\n const { t } = useTranslation();\n\n const imagePreviewRef = useRef(null);\n\n useOnClickOutside(imagePreviewRef, () => setImagePreviewDetails(null), {\n enabled: true,\n });\n\n useEffect(() => {\n if (!imagePreviewRef.current) return;\n\n imagePreviewRef.current.setAttribute(\"tabindex\", \"-1\");\n imagePreviewRef.current.focus();\n }, []);\n\n const handleKeyDown = e => {\n e.stopPropagation();\n e.key === \"Escape\" && setImagePreviewDetails(null);\n };\n\n return createPortal(\n <div className=\"ne-image-preview-wrapper active\">\n {isLoading && <Spinner className=\"ne-image-preview-wrapper__spinner\" />}\n {!isLoading && (\n <div className=\"close-button\">\n <Button\n icon={Close}\n style=\"secondary\"\n onClick={() => setImagePreviewDetails(null)}\n />\n </div>\n )}\n <div\n className={classnames(\"ne-image-preview\", {\n \"image-loaded\": !isLoading,\n })}\n >\n <img\n alt={t(\"neetoEditor.editorContent.imagePreviewAltText\")}\n ref={imagePreviewRef}\n src={imagePreviewDetails.src}\n onKeyDown={handleKeyDown}\n onLoad={() => setIsLoading(false)}\n />\n {imagePreviewDetails && (\n <p className=\"ne-image-preview__caption\">\n {imagePreviewDetails.caption}\n </p>\n )}\n </div>\n </div>,\n document.body\n );\n};\n\nexport default ImagePreview;\n","const buildLinkSVG = () => {\n const svgNS = \"http://www.w3.org/2000/svg\";\n\n const svgWrapper = document.createElement(\"span\");\n svgWrapper.classList.add(\"header-link-icon-wrapper\");\n const svg = document.createElementNS(svgNS, \"svg\");\n svg.setAttribute(\"aria-hidden\", \"true\");\n svg.setAttribute(\"height\", \"20\");\n svg.setAttribute(\"viewBox\", \"0 0 16 16\");\n svg.setAttribute(\"width\", \"20\");\n\n const path = document.createElementNS(svgNS, \"path\");\n path.setAttribute(\n \"d\",\n \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n );\n\n svg.appendChild(path);\n svgWrapper.appendChild(svg);\n\n return svgWrapper;\n};\n\nconst convertTextToId = text =>\n text\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9\\s]/g, \"\")\n .replace(/\\s+/g, \"-\");\n\nexport const buildHeaderLinks = editorContentNode => {\n const headerTags = editorContentNode.querySelectorAll(\n \"h1, h2, h3, h4, h5, h6\"\n );\n const usedIds = new Map();\n\n headerTags.forEach(heading => {\n if (heading.getAttribute(\"data-link\") === \"false\") {\n return;\n }\n\n let headingId = convertTextToId(heading.textContent);\n if (usedIds.has(headingId)) {\n const count = usedIds.get(headingId);\n usedIds.set(headingId, count + 1);\n headingId = `${headingId}-${count}`;\n } else usedIds.set(headingId, 1);\n\n heading.setAttribute(\"id\", headingId);\n\n const wrapper = document.createElement(\"div\");\n const anchor = document.createElement(\"a\");\n\n wrapper.classList.add(\"header-wrapper\");\n anchor.setAttribute(\"href\", `#${headingId}`);\n anchor.classList.add(\"header-wrapper__link\");\n anchor.appendChild(buildLinkSVG());\n\n wrapper.appendChild(heading.cloneNode(true));\n wrapper.appendChild(anchor);\n heading.replaceWith(wrapper);\n });\n};\n","import { memo, useEffect, useRef, useState } from \"react\";\n\nimport classnames from \"classnames\";\nimport DOMPurify from \"dompurify\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport { isNil } from \"ramda\";\nimport { createRoot } from \"react-dom/client\";\n\nimport { EDITOR_SIZES } from \"src/common/constants\";\nimport \"src/styles/editor/editor-content.scss\";\nimport { removeEmptyTags } from \"utils\";\n\nimport {\n EDITOR_CONTENT_CLASS_NAME,\n EDITOR_CONTENT_DEFAULT_CONFIGURATION,\n SANITIZE_OPTIONS,\n} from \"./constants\";\nimport ImagePreview from \"./ImagePreview\";\nimport {\n substituteVariables,\n applyLineHighlighting,\n applySyntaxHighlightingAndLineNumbers,\n} from \"./utils\";\nimport { buildHeaderLinks } from \"./utils/headers\";\n\nconst EditorContent = ({\n content = \"\",\n variables = [],\n className,\n size = EDITOR_SIZES.SMALL,\n configuration = EDITOR_CONTENT_DEFAULT_CONFIGURATION,\n ...otherProps\n}) => {\n const [imagePreviewDetails, setImagePreviewDetails] = useState(null);\n const editorContentRef = useRef(null);\n\n const htmlContent = substituteVariables(\n applySyntaxHighlightingAndLineNumbers(removeEmptyTags(content)),\n variables\n );\n const sanitize = DOMPurify.sanitize;\n\n const injectCopyButtonToCodeBlocks = () => {\n const preTags = editorContentRef.current?.querySelectorAll(\n `.${EDITOR_CONTENT_CLASS_NAME} pre`\n );\n\n preTags.forEach(preTag => {\n const button = document.createElement(\"div\");\n button.className = \"neeto-editor-codeblock-options\";\n const root = createRoot(button);\n root.render(\n <CopyToClipboardButton\n size=\"small\"\n style=\"tertiary\"\n value={preTag.textContent}\n />\n );\n preTag.appendChild(button);\n });\n };\n\n const bindImageClickListener = () => {\n const figureTags = editorContentRef.current?.querySelectorAll(\n `.${EDITOR_CONTENT_CLASS_NAME} figure`\n );\n\n figureTags.forEach(figureTag => {\n const image = figureTag.querySelector(\"img\");\n const link = figureTag.querySelector(\"a\");\n if (isNil(image) || isNil(link)) return;\n\n figureTag.addEventListener(\"click\", event => {\n event.preventDefault();\n const caption = figureTag.querySelector(\"figcaption\").innerText;\n setImagePreviewDetails({ src: image.src, caption });\n });\n });\n };\n\n useEffect(() => {\n injectCopyButtonToCodeBlocks();\n bindImageClickListener();\n applyLineHighlighting(editorContentRef.current);\n configuration.enableHeaderLinks &&\n buildHeaderLinks(editorContentRef.current);\n }, [content]);\n\n return (\n <>\n <div\n data-cy=\"neeto-editor-content\"\n ref={editorContentRef}\n className={classnames(EDITOR_CONTENT_CLASS_NAME, {\n [className]: className,\n [`neeto-editor-size--${size}`]: true,\n })}\n dangerouslySetInnerHTML={{\n __html: sanitize(htmlContent, SANITIZE_OPTIONS),\n }}\n {...otherProps}\n />\n {imagePreviewDetails && (\n <ImagePreview {...{ imagePreviewDetails, setImagePreviewDetails }} />\n )}\n </>\n );\n};\n\nexport default memo(EditorContent);\n"],"names":["ImagePreview","_ref","imagePreviewDetails","setImagePreviewDetails","_useState","useState","_useState2","_slicedToArray","isLoading","setIsLoading","_useTranslation","useTranslation","t","imagePreviewRef","useRef","useOnClickOutside","enabled","useEffect","current","setAttribute","focus","handleKeyDown","e","stopPropagation","key","createPortal","_jsxs","className","children","_jsx","Spinner","Button","icon","Close","style","onClick","classnames","alt","ref","src","onKeyDown","onLoad","caption","document","body","buildLinkSVG","svgNS","svgWrapper","createElement","classList","add","svg","createElementNS","path","appendChild","convertTextToId","text","trim","toLowerCase","replace","buildHeaderLinks","editorContentNode","headerTags","querySelectorAll","usedIds","Map","forEach","heading","getAttribute","headingId","textContent","has","count","get","set","concat","wrapper","anchor","cloneNode","replaceWith","EditorContent","_ref$content","content","_ref$variables","variables","_ref$size","size","EDITOR_SIZES","SMALL","_ref$configuration","configuration","EDITOR_CONTENT_DEFAULT_CONFIGURATION","otherProps","_objectWithoutProperties","_excluded","editorContentRef","htmlContent","substituteVariables","applySyntaxHighlightingAndLineNumbers","removeEmptyTags","sanitize","DOMPurify","injectCopyButtonToCodeBlocks","_editorContentRef$cur","preTags","EDITOR_CONTENT_CLASS_NAME","preTag","button","root","createRoot","render","CopyToClipboardButton","value","bindImageClickListener","_editorContentRef$cur2","figureTags","figureTag","image","querySelector","link","isNil","addEventListener","event","preventDefault","innerText","applyLineHighlighting","enableHeaderLinks","_Fragment","_objectSpread","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AAqG,QAAA,EAAA;IAAAnG,QAAA,EAAA,cACEC,GAAA,CAAA,KAAA,EAAAmG,aAAA,CAAA;AACE,MAAA,SAAA,EAAQ,sBAAsB;AAC9B1F,MAAAA,GAAG,EAAEyD,gBAAiB;AACtBpE,MAAAA,SAAS,EAAES,UAAU,CAACqE,yBAAyB,EAAAwB,eAAA,CAAAA,eAAA,CAAA,EAAA,EAC5CtG,SAAS,EAAGA,SAAS,yBAAAgD,MAAA,CACCW,IAAI,CAAK,EAAA,IAAI,CACrC,CAAE;AACH4C,MAAAA,uBAAuB,EAAE;AACvBC,QAAAA,MAAM,EAAE/B,QAAQ,CAACJ,WAAW,EAAEoC,gBAAgB,CAAA;AAChD,OAAA;KACIxC,EAAAA,UAAU,CACf,CAAC,EACD1F,mBAAmB,iBAClB2B,GAAA,CAAC7B,YAAY,EAAA;AAAOE,MAAAA,mBAAmB,EAAnBA,mBAAmB;AAAEC,MAAAA,sBAAsB,EAAtBA,sBAAAA;AAAsB,KAAK,CACrE,CAAA;AAAA,GACD,CAAC,CAAA;AAEP,CAAC,CAAA;AAED,YAAekI,aAAAA,IAAI,CAACrD,aAAa,CAAC;;;;"}
1
+ {"version":3,"file":"EditorContent.js","sources":["../src/components/EditorContent/ImagePreview.jsx","../src/components/EditorContent/utils/headers.js","../src/components/EditorContent/index.jsx"],"sourcesContent":["import { useEffect, useRef, useState } from \"react\";\n\nimport classnames from \"classnames\";\nimport { useOnClickOutside } from \"neetocommons/react-utils\";\nimport { Close } from \"neetoicons\";\nimport { Button, Spinner } from \"neetoui\";\nimport { createPortal } from \"react-dom\";\nimport { useTranslation } from \"react-i18next\";\n\nconst ImagePreview = ({ imagePreviewDetails, setImagePreviewDetails }) => {\n const [isLoading, setIsLoading] = useState(true);\n\n const { t } = useTranslation();\n\n const imagePreviewRef = useRef(null);\n\n useOnClickOutside(imagePreviewRef, () => setImagePreviewDetails(null), {\n enabled: true,\n });\n\n useEffect(() => {\n if (!imagePreviewRef.current) return;\n\n imagePreviewRef.current.setAttribute(\"tabindex\", \"-1\");\n imagePreviewRef.current.focus();\n }, []);\n\n const handleKeyDown = e => {\n e.stopPropagation();\n e.key === \"Escape\" && setImagePreviewDetails(null);\n };\n\n return createPortal(\n <div className=\"ne-image-preview-wrapper active\">\n {isLoading && <Spinner className=\"ne-image-preview-wrapper__spinner\" />}\n {!isLoading && (\n <div className=\"close-button\">\n <Button\n icon={Close}\n style=\"secondary\"\n onClick={() => setImagePreviewDetails(null)}\n />\n </div>\n )}\n <div\n className={classnames(\"ne-image-preview\", {\n \"image-loaded\": !isLoading,\n })}\n >\n <img\n alt={t(\"neetoEditor.editorContent.imagePreviewAltText\")}\n ref={imagePreviewRef}\n src={imagePreviewDetails.src}\n onKeyDown={handleKeyDown}\n onLoad={() => setIsLoading(false)}\n />\n {imagePreviewDetails && (\n <p className=\"ne-image-preview__caption\">\n {imagePreviewDetails.caption}\n </p>\n )}\n </div>\n </div>,\n document.body\n );\n};\n\nexport default ImagePreview;\n","const buildLinkSVG = () => {\n const svgNS = \"http://www.w3.org/2000/svg\";\n\n const svgWrapper = document.createElement(\"span\");\n svgWrapper.classList.add(\"header-link-icon-wrapper\");\n const svg = document.createElementNS(svgNS, \"svg\");\n svg.setAttribute(\"aria-hidden\", \"true\");\n svg.setAttribute(\"height\", \"20\");\n svg.setAttribute(\"viewBox\", \"0 0 16 16\");\n svg.setAttribute(\"width\", \"20\");\n\n const path = document.createElementNS(svgNS, \"path\");\n path.setAttribute(\n \"d\",\n \"M4 9h1v1H4c-1.5 0-3-1.69-3-3.5S2.55 3 4 3h4c1.45 0 3 1.69 3 3.5 0 1.41-.91 2.72-2 3.25V8.59c.58-.45 1-1.27 1-2.09C10 5.22 8.98 4 8 4H4c-.98 0-2 1.22-2 2.5S3 9 4 9zm9-3h-1v1h1c1 0 2 1.22 2 2.5S13.98 12 13 12H9c-.98 0-2-1.22-2-2.5 0-.83.42-1.64 1-2.09V6.25c-1.09.53-2 1.84-2 3.25C6 11.31 7.55 13 9 13h4c1.45 0 3-1.69 3-3.5S14.5 6 13 6z\"\n );\n\n svg.appendChild(path);\n svgWrapper.appendChild(svg);\n\n return svgWrapper;\n};\n\nconst convertTextToId = text =>\n text\n .trim()\n .toLowerCase()\n .replace(/[^a-z0-9\\s]/g, \"\")\n .replace(/\\s+/g, \"-\");\n\nexport const buildHeaderLinks = editorContentNode => {\n const headerTags = editorContentNode.querySelectorAll(\n \"h1, h2, h3, h4, h5, h6\"\n );\n const usedIds = new Map();\n\n headerTags.forEach(heading => {\n if (heading.getAttribute(\"data-link\") === \"false\") {\n return;\n }\n\n let headingId = convertTextToId(heading.textContent);\n if (usedIds.has(headingId)) {\n const count = usedIds.get(headingId);\n usedIds.set(headingId, count + 1);\n headingId = `${headingId}-${count}`;\n } else usedIds.set(headingId, 1);\n\n heading.setAttribute(\"id\", headingId);\n\n const wrapper = document.createElement(\"div\");\n const anchor = document.createElement(\"a\");\n\n wrapper.classList.add(\"header-wrapper\");\n anchor.setAttribute(\"href\", `#${headingId}`);\n anchor.classList.add(\"header-wrapper__link\");\n anchor.appendChild(buildLinkSVG());\n\n wrapper.appendChild(heading.cloneNode(true));\n wrapper.appendChild(anchor);\n heading.replaceWith(wrapper);\n });\n};\n","import { memo, useEffect, useRef, useState } from \"react\";\n\nimport classnames from \"classnames\";\nimport DOMPurify from \"dompurify\";\nimport CopyToClipboardButton from \"neetomolecules/CopyToClipboardButton\";\nimport { isNil } from \"ramda\";\nimport { createRoot } from \"react-dom/client\";\n\nimport { EDITOR_SIZES } from \"src/common/constants\";\nimport \"src/styles/editor/editor-content.scss\";\nimport { removeEmptyTags } from \"utils\";\n\nimport {\n EDITOR_CONTENT_CLASS_NAME,\n EDITOR_CONTENT_DEFAULT_CONFIGURATION,\n SANITIZE_OPTIONS,\n} from \"./constants\";\nimport ImagePreview from \"./ImagePreview\";\nimport {\n substituteVariables,\n applyLineHighlighting,\n replaceHTMLEntities,\n applySyntaxHighlightingAndLineNumbers,\n} from \"./utils\";\nimport { buildHeaderLinks } from \"./utils/headers\";\n\nconst EditorContent = ({\n content = \"\",\n variables = [],\n className,\n size = EDITOR_SIZES.SMALL,\n configuration = EDITOR_CONTENT_DEFAULT_CONFIGURATION,\n ...otherProps\n}) => {\n const [imagePreviewDetails, setImagePreviewDetails] = useState(null);\n const editorContentRef = useRef(null);\n\n const htmlContent = substituteVariables(\n applySyntaxHighlightingAndLineNumbers(\n replaceHTMLEntities(removeEmptyTags(content))\n ),\n variables\n );\n const sanitize = DOMPurify.sanitize;\n\n const injectCopyButtonToCodeBlocks = () => {\n const preTags = editorContentRef.current?.querySelectorAll(\n `.${EDITOR_CONTENT_CLASS_NAME} pre`\n );\n\n preTags.forEach(preTag => {\n const button = document.createElement(\"div\");\n button.className = \"neeto-editor-codeblock-options\";\n const root = createRoot(button);\n root.render(\n <CopyToClipboardButton\n size=\"small\"\n style=\"tertiary\"\n value={preTag.textContent}\n />\n );\n preTag.appendChild(button);\n });\n };\n\n const bindImageClickListener = () => {\n const figureTags = editorContentRef.current?.querySelectorAll(\n `.${EDITOR_CONTENT_CLASS_NAME} figure`\n );\n\n figureTags.forEach(figureTag => {\n const image = figureTag.querySelector(\"img\");\n const link = figureTag.querySelector(\"a\");\n if (isNil(image) || isNil(link)) return;\n\n figureTag.addEventListener(\"click\", event => {\n event.preventDefault();\n const caption = figureTag.querySelector(\"figcaption\").innerText;\n setImagePreviewDetails({ src: image.src, caption });\n });\n });\n };\n\n useEffect(() => {\n injectCopyButtonToCodeBlocks();\n bindImageClickListener();\n applyLineHighlighting(editorContentRef.current);\n configuration.enableHeaderLinks &&\n buildHeaderLinks(editorContentRef.current);\n }, [content]);\n\n return (\n <>\n <div\n data-cy=\"neeto-editor-content\"\n ref={editorContentRef}\n className={classnames(EDITOR_CONTENT_CLASS_NAME, {\n [className]: className,\n [`neeto-editor-size--${size}`]: true,\n })}\n dangerouslySetInnerHTML={{\n __html: sanitize(htmlContent, SANITIZE_OPTIONS),\n }}\n {...otherProps}\n />\n {imagePreviewDetails && (\n <ImagePreview {...{ imagePreviewDetails, setImagePreviewDetails }} />\n )}\n </>\n );\n};\n\nexport default memo(EditorContent);\n"],"names":["ImagePreview","_ref","imagePreviewDetails","setImagePreviewDetails","_useState","useState","_useState2","_slicedToArray","isLoading","setIsLoading","_useTranslation","useTranslation","t","imagePreviewRef","useRef","useOnClickOutside","enabled","useEffect","current","setAttribute","focus","handleKeyDown","e","stopPropagation","key","createPortal","_jsxs","className","children","_jsx","Spinner","Button","icon","Close","style","onClick","classnames","alt","ref","src","onKeyDown","onLoad","caption","document","body","buildLinkSVG","svgNS","svgWrapper","createElement","classList","add","svg","createElementNS","path","appendChild","convertTextToId","text","trim","toLowerCase","replace","buildHeaderLinks","editorContentNode","headerTags","querySelectorAll","usedIds","Map","forEach","heading","getAttribute","headingId","textContent","has","count","get","set","concat","wrapper","anchor","cloneNode","replaceWith","EditorContent","_ref$content","content","_ref$variables","variables","_ref$size","size","EDITOR_SIZES","SMALL","_ref$configuration","configuration","EDITOR_CONTENT_DEFAULT_CONFIGURATION","otherProps","_objectWithoutProperties","_excluded","editorContentRef","htmlContent","substituteVariables","applySyntaxHighlightingAndLineNumbers","replaceHTMLEntities","removeEmptyTags","sanitize","DOMPurify","injectCopyButtonToCodeBlocks","_editorContentRef$cur","preTags","EDITOR_CONTENT_CLASS_NAME","preTag","button","root","createRoot","render","CopyToClipboardButton","value","bindImageClickListener","_editorContentRef$cur2","figureTags","figureTag","image","querySelector","link","isNil","addEventListener","event","preventDefault","innerText","applyLineHighlighting","enableHeaderLinks","_Fragment","_objectSpread","_defineProperty","dangerouslySetInnerHTML","__html","SANITIZE_OPTIONS","memo"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AASA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAAwD;AAAA,EAAA,IAAlDC,mBAAmB,GAAAD,IAAA,CAAnBC,mBAAmB;IAAEC,sBAAsB,GAAAF,IAAA,CAAtBE,sBAAsB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,EAAA,EAC5CvG,SAAS,EAAGA,SAAS,yBAAAgD,MAAA,CACCW,IAAI,CAAK,EAAA,IAAI,CACrC,CAAE;AACH6C,MAAAA,uBAAuB,EAAE;AACvBC,QAAAA,MAAM,EAAE/B,QAAQ,CAACL,WAAW,EAAEqC,gBAAgB,CAAA;AAChD,OAAA;KACIzC,EAAAA,UAAU,CACf,CAAC,EACD1F,mBAAmB,iBAClB2B,GAAA,CAAC7B,YAAY,EAAA;AAAOE,MAAAA,mBAAmB,EAAnBA,mBAAmB;AAAEC,MAAAA,sBAAsB,EAAtBA,sBAAAA;AAAsB,KAAK,CACrE,CAAA;AAAA,GACD,CAAC,CAAA;AAEP,CAAC,CAAA;AAED,YAAemI,aAAAA,IAAI,CAACtD,aAAa,CAAC;;;;"}
@@ -8,7 +8,7 @@ import Editor from './Editor.js';
8
8
  import { jsx } from 'react/jsx-runtime';
9
9
  import '@babel/runtime/helpers/toConsumableArray';
10
10
  import '@babel/runtime/helpers/slicedToArray';
11
- import './chunk-CeFnZWjP.js';
11
+ import './chunk-BQ6gyl4W.js';
12
12
  import './chunk-DmrvuTKK.js';
13
13
  import 'i18next';
14
14
  import '@bigbinary/neeto-icons/TextH1';
@@ -27,6 +27,7 @@ import 'classnames';
27
27
  import 'tippy.js/dist/svg-arrow.css';
28
28
  import '@bigbinary/neeto-icons/Link';
29
29
  import '@bigbinary/neeto-icons/Column';
30
+ import '@bigbinary/neeto-icons/Down';
30
31
  import '@bigbinary/neetoui/Dropdown';
31
32
  import 'react-i18next';
32
33
  import '@bigbinary/neeto-icons/Close';
@@ -84,7 +85,6 @@ import '@bigbinary/neeto-commons-frontend/initializers';
84
85
  import '@bigbinary/neetoui/Tooltip';
85
86
  import '@bigbinary/neetoui/Spinner';
86
87
  import '@bigbinary/neetoui/Checkbox';
87
- import '@bigbinary/neeto-icons/Down';
88
88
  import '@bigbinary/neeto-icons/MenuHorizontal';
89
89
  import '@tippyjs/react';
90
90
  import '@bigbinary/neeto-icons/File';
package/dist/Menu.js CHANGED
@@ -3,7 +3,7 @@ import '@babel/runtime/helpers/toConsumableArray';
3
3
  import '@babel/runtime/helpers/slicedToArray';
4
4
  import 'react';
5
5
  import 'ramda';
6
- export { M as default } from './chunk-CeFnZWjP.js';
6
+ export { M as default } from './chunk-BQ6gyl4W.js';
7
7
  import './chunk-CftSm0ZU.js';
8
8
  import 'react/jsx-runtime';
9
9
  import './chunk-DmrvuTKK.js';
@@ -23,6 +23,7 @@ import 'classnames';
23
23
  import 'tippy.js/dist/svg-arrow.css';
24
24
  import '@bigbinary/neeto-icons/Link';
25
25
  import '@bigbinary/neeto-icons/Column';
26
+ import '@bigbinary/neeto-icons/Down';
26
27
  import '@bigbinary/neetoui/Dropdown';
27
28
  import 'react-i18next';
28
29
  import '@bigbinary/neeto-icons/Close';
@@ -81,7 +82,6 @@ import '@bigbinary/neeto-commons-frontend/initializers';
81
82
  import '@bigbinary/neetoui/Tooltip';
82
83
  import '@bigbinary/neetoui/Spinner';
83
84
  import '@bigbinary/neetoui/Checkbox';
84
- import '@bigbinary/neeto-icons/Down';
85
85
  import '@bigbinary/neeto-icons/MenuHorizontal';
86
86
  import '@tippyjs/react';
87
87
  import '@bigbinary/neeto-icons/File';
@@ -20,6 +20,7 @@ import { hyphenate, isNotPresent, noop, isNotEmpty, findBy, filterBy } from '@bi
20
20
  import 'tippy.js/dist/svg-arrow.css';
21
21
  import Link from '@bigbinary/neeto-icons/Link';
22
22
  import Column from '@bigbinary/neeto-icons/Column';
23
+ import Down from '@bigbinary/neeto-icons/Down';
23
24
  import Dropdown$1 from '@bigbinary/neetoui/Dropdown';
24
25
  import { useTranslation } from 'react-i18next';
25
26
  import Close from '@bigbinary/neeto-icons/Close';
@@ -73,7 +74,6 @@ import { a as getAugmentedNamespace } from './chunk-E-ZsRS8r.js';
73
74
  import Checkbox from '@bigbinary/neetoui/Checkbox';
74
75
  import { shallow } from 'zustand/shallow';
75
76
  import { create } from 'zustand';
76
- import Down from '@bigbinary/neeto-icons/Down';
77
77
  import MenuHorizontal from '@bigbinary/neeto-icons/MenuHorizontal';
78
78
  import Tippy from '@tippyjs/react';
79
79
  import File$1 from '@bigbinary/neeto-icons/File';
@@ -9992,7 +9992,7 @@ function getAttributesFromExtensions(extensions) {
9992
9992
  return extensionAttributes;
9993
9993
  }
9994
9994
 
9995
- function getNodeType$1(nameOrType, schema) {
9995
+ function getNodeType(nameOrType, schema) {
9996
9996
  if (typeof nameOrType === 'string') {
9997
9997
  if (!schema.nodes[nameOrType]) {
9998
9998
  throw Error(`There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?`);
@@ -10845,7 +10845,7 @@ class ExtensionManager {
10845
10845
  options: extension.options,
10846
10846
  storage: extension.storage,
10847
10847
  editor,
10848
- type: getNodeType$1(extension.name, this.schema),
10848
+ type: getNodeType(extension.name, this.schema),
10849
10849
  };
10850
10850
  const addNodeView = getExtensionField(extension, 'addNodeView', context);
10851
10851
  if (!addNodeView) {
@@ -11192,7 +11192,7 @@ const deleteCurrentNode = () => ({ tr, dispatch }) => {
11192
11192
  };
11193
11193
 
11194
11194
  const deleteNode = typeOrName => ({ tr, state, dispatch }) => {
11195
- const type = getNodeType$1(typeOrName, state.schema);
11195
+ const type = getNodeType(typeOrName, state.schema);
11196
11196
  const $pos = tr.selection.$anchor;
11197
11197
  for (let depth = $pos.depth; depth > 0; depth -= 1) {
11198
11198
  const node = $pos.node(depth);
@@ -11780,7 +11780,7 @@ const keyboardShortcut = name => ({ editor, view, tr, dispatch, }) => {
11780
11780
 
11781
11781
  function isNodeActive(state, typeOrName, attributes = {}) {
11782
11782
  const { from, to, empty } = state.selection;
11783
- const type = typeOrName ? getNodeType$1(typeOrName, state.schema) : null;
11783
+ const type = typeOrName ? getNodeType(typeOrName, state.schema) : null;
11784
11784
  const nodeRanges = [];
11785
11785
  state.doc.nodesBetween(from, to, (node, pos) => {
11786
11786
  if (node.isText) {
@@ -11811,7 +11811,7 @@ function isNodeActive(state, typeOrName, attributes = {}) {
11811
11811
  }
11812
11812
 
11813
11813
  const lift = (typeOrName, attributes = {}) => ({ state, dispatch }) => {
11814
- const type = getNodeType$1(typeOrName, state.schema);
11814
+ const type = getNodeType(typeOrName, state.schema);
11815
11815
  const isActive = isNodeActive(state, type, attributes);
11816
11816
  if (!isActive) {
11817
11817
  return false;
@@ -11824,7 +11824,7 @@ const liftEmptyBlock = () => ({ state, dispatch }) => {
11824
11824
  };
11825
11825
 
11826
11826
  const liftListItem = typeOrName => ({ state, dispatch }) => {
11827
- const type = getNodeType$1(typeOrName, state.schema);
11827
+ const type = getNodeType(typeOrName, state.schema);
11828
11828
  return liftListItem$1(type)(state, dispatch);
11829
11829
  };
11830
11830
 
@@ -11875,7 +11875,7 @@ const resetAttributes = (typeOrName, attributes) => ({ tr, state, dispatch }) =>
11875
11875
  return false;
11876
11876
  }
11877
11877
  if (schemaType === 'node') {
11878
- nodeType = getNodeType$1(typeOrName, state.schema);
11878
+ nodeType = getNodeType(typeOrName, state.schema);
11879
11879
  }
11880
11880
  if (schemaType === 'mark') {
11881
11881
  markType = getMarkType(typeOrName, state.schema);
@@ -12137,7 +12137,7 @@ function getText(node, options) {
12137
12137
  }
12138
12138
 
12139
12139
  function getNodeAttributes(state, typeOrName) {
12140
- const type = getNodeType$1(typeOrName, state.schema);
12140
+ const type = getNodeType(typeOrName, state.schema);
12141
12141
  const { from, to } = state.selection;
12142
12142
  const nodes = [];
12143
12143
  state.doc.nodesBetween(from, to, node => {
@@ -12600,7 +12600,7 @@ const setMeta = (key, value) => ({ tr }) => {
12600
12600
  };
12601
12601
 
12602
12602
  const setNode = (typeOrName, attributes = {}) => ({ state, dispatch, chain }) => {
12603
- const type = getNodeType$1(typeOrName, state.schema);
12603
+ const type = getNodeType(typeOrName, state.schema);
12604
12604
  // TODO: use a fallback like insertContent?
12605
12605
  if (!type.isTextblock) {
12606
12606
  console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.');
@@ -12646,7 +12646,7 @@ const setTextSelection = position => ({ tr, dispatch }) => {
12646
12646
  };
12647
12647
 
12648
12648
  const sinkListItem = typeOrName => ({ state, dispatch }) => {
12649
- const type = getNodeType$1(typeOrName, state.schema);
12649
+ const type = getNodeType(typeOrName, state.schema);
12650
12650
  return sinkListItem$1(type)(state, dispatch);
12651
12651
  };
12652
12652
 
@@ -12727,7 +12727,7 @@ const splitBlock = ({ keepMarks = true } = {}) => ({ tr, state, dispatch, editor
12727
12727
 
12728
12728
  const splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr, state, dispatch, editor, }) => {
12729
12729
  var _a;
12730
- const type = getNodeType$1(typeOrName, state.schema);
12730
+ const type = getNodeType(typeOrName, state.schema);
12731
12731
  const { $from, $to } = state.selection;
12732
12732
  // @ts-ignore
12733
12733
  // eslint-disable-next-line
@@ -12854,8 +12854,8 @@ const joinListForwards = (tr, listType) => {
12854
12854
  };
12855
12855
  const toggleList = (listTypeOrName, itemTypeOrName, keepMarks, attributes = {}) => ({ editor, tr, state, dispatch, chain, commands, can, }) => {
12856
12856
  const { extensions, splittableMarks } = editor.extensionManager;
12857
- const listType = getNodeType$1(listTypeOrName, state.schema);
12858
- const itemType = getNodeType$1(itemTypeOrName, state.schema);
12857
+ const listType = getNodeType(listTypeOrName, state.schema);
12858
+ const itemType = getNodeType(itemTypeOrName, state.schema);
12859
12859
  const { selection, storedMarks } = state;
12860
12860
  const { $from, $to } = selection;
12861
12861
  const range = $from.blockRange($to);
@@ -12926,8 +12926,8 @@ const toggleMark = (typeOrName, attributes = {}, options = {}) => ({ state, comm
12926
12926
  };
12927
12927
 
12928
12928
  const toggleNode = (typeOrName, toggleTypeOrName, attributes = {}) => ({ state, commands }) => {
12929
- const type = getNodeType$1(typeOrName, state.schema);
12930
- const toggleType = getNodeType$1(toggleTypeOrName, state.schema);
12929
+ const type = getNodeType(typeOrName, state.schema);
12930
+ const toggleType = getNodeType(toggleTypeOrName, state.schema);
12931
12931
  const isActive = isNodeActive(state, type, attributes);
12932
12932
  if (isActive) {
12933
12933
  return commands.setNode(toggleType);
@@ -12936,7 +12936,7 @@ const toggleNode = (typeOrName, toggleTypeOrName, attributes = {}) => ({ state,
12936
12936
  };
12937
12937
 
12938
12938
  const toggleWrap = (typeOrName, attributes = {}) => ({ state, commands }) => {
12939
- const type = getNodeType$1(typeOrName, state.schema);
12939
+ const type = getNodeType(typeOrName, state.schema);
12940
12940
  const isActive = isNodeActive(state, type, attributes);
12941
12941
  if (isActive) {
12942
12942
  return commands.lift(type);
@@ -13022,7 +13022,7 @@ const updateAttributes = (typeOrName, attributes = {}) => ({ tr, state, dispatch
13022
13022
  return false;
13023
13023
  }
13024
13024
  if (schemaType === 'node') {
13025
- nodeType = getNodeType$1(typeOrName, state.schema);
13025
+ nodeType = getNodeType(typeOrName, state.schema);
13026
13026
  }
13027
13027
  if (schemaType === 'mark') {
13028
13028
  markType = getMarkType(typeOrName, state.schema);
@@ -13057,12 +13057,12 @@ const updateAttributes = (typeOrName, attributes = {}) => ({ tr, state, dispatch
13057
13057
  };
13058
13058
 
13059
13059
  const wrapIn = (typeOrName, attributes = {}) => ({ state, dispatch }) => {
13060
- const type = getNodeType$1(typeOrName, state.schema);
13060
+ const type = getNodeType(typeOrName, state.schema);
13061
13061
  return wrapIn$1(type, attributes)(state, dispatch);
13062
13062
  };
13063
13063
 
13064
13064
  const wrapInList = (typeOrName, attributes = {}) => ({ state, dispatch }) => {
13065
- const type = getNodeType$1(typeOrName, state.schema);
13065
+ const type = getNodeType(typeOrName, state.schema);
13066
13066
  return wrapInList$1(type, attributes)(state, dispatch);
13067
13067
  };
13068
13068
 
@@ -16006,7 +16006,6 @@ var TableOption$2 = function TableOption(_ref) {
16006
16006
  autoFocus: true,
16007
16007
  "data-cy": "neeto-editor-fixed-menu-table-option-input",
16008
16008
  min: "1",
16009
- placeholder: t("neetoEditor.placeholders.rows"),
16010
16009
  type: "number",
16011
16010
  value: rows,
16012
16011
  onChange: withEventTargetValue(setRows)
@@ -16019,7 +16018,6 @@ var TableOption$2 = function TableOption(_ref) {
16019
16018
  }), /*#__PURE__*/jsx("input", {
16020
16019
  "data-cy": "neeto-editor-bubble-menu-table-option-input",
16021
16020
  min: "1",
16022
- placeholder: t("neetoEditor.placeholders.columns"),
16023
16021
  type: "number",
16024
16022
  value: columns,
16025
16023
  onChange: withEventTargetValue(setColumns)
@@ -16029,11 +16027,13 @@ var TableOption$2 = function TableOption(_ref) {
16029
16027
  children: [/*#__PURE__*/jsx(Button$1, {
16030
16028
  "data-cy": "neeto-editor-bubble-menu-table-option-create-button",
16031
16029
  icon: Check,
16030
+ size: "small",
16032
16031
  style: "secondary",
16033
16032
  onClick: handleSubmit
16034
16033
  }), /*#__PURE__*/jsx(Button$1, {
16035
16034
  "data-cy": "neeto-editor-bubble-menu-table-option-create-button",
16036
16035
  icon: Close,
16036
+ size: "small",
16037
16037
  style: "secondary",
16038
16038
  onClick: handleClose
16039
16039
  })]
@@ -16219,8 +16219,9 @@ var buildBubbleMenuOptions = function buildBubbleMenuOptions(_ref2) {
16219
16219
  var getTextMenuDropdownOptions = function getTextMenuDropdownOptions(_ref3) {
16220
16220
  var editor = _ref3.editor,
16221
16221
  options = _ref3.options;
16222
- var textOptions = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, EDITOR_OPTIONS.H1, {
16222
+ var textOptions = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, EDITOR_OPTIONS.H1, {
16223
16223
  optionName: "Heading 1",
16224
+ icon: TextH1,
16224
16225
  active: editor.isActive("heading", {
16225
16226
  level: 1
16226
16227
  }),
@@ -16231,6 +16232,7 @@ var getTextMenuDropdownOptions = function getTextMenuDropdownOptions(_ref3) {
16231
16232
  }
16232
16233
  }), EDITOR_OPTIONS.H2, {
16233
16234
  optionName: "Heading 2",
16235
+ icon: TextH2,
16234
16236
  active: editor.isActive("heading", {
16235
16237
  level: 2
16236
16238
  }),
@@ -16241,6 +16243,7 @@ var getTextMenuDropdownOptions = function getTextMenuDropdownOptions(_ref3) {
16241
16243
  }
16242
16244
  }), EDITOR_OPTIONS.H3, {
16243
16245
  optionName: "Heading 3",
16246
+ icon: TextH3,
16244
16247
  active: editor.isActive("heading", {
16245
16248
  level: 3
16246
16249
  }),
@@ -16249,20 +16252,9 @@ var getTextMenuDropdownOptions = function getTextMenuDropdownOptions(_ref3) {
16249
16252
  level: 3
16250
16253
  }).run();
16251
16254
  }
16252
- }), EDITOR_OPTIONS.LIST_ORDERED, {
16253
- optionName: "Ordered List",
16254
- active: editor.isActive("orderedList"),
16255
- command: function command() {
16256
- return editor.chain().focus().toggleOrderedList().run();
16257
- }
16258
- }), EDITOR_OPTIONS.LIST_BULLETS, {
16259
- optionName: "Bulleted List",
16260
- active: editor.isActive("bulletList"),
16261
- command: function command() {
16262
- return editor.chain().focus().toggleBulletList().run();
16263
- }
16264
16255
  }), EDITOR_OPTIONS.PARAGRAPH, {
16265
16256
  optionName: "Text",
16257
+ icon: TextP,
16266
16258
  active: editor.isActive("paragraph"),
16267
16259
  command: function command() {
16268
16260
  return editor.chain().focus().setNode("paragraph").run();
@@ -16275,9 +16267,9 @@ var getTextMenuDropdownOptions = function getTextMenuDropdownOptions(_ref3) {
16275
16267
  });
16276
16268
  return result;
16277
16269
  };
16278
- var getNodeType = function getNodeType(options) {
16270
+ var getNodeIcon = function getNodeIcon(options) {
16279
16271
  var _options$find;
16280
- return ((_options$find = options.find(prop("active"))) === null || _options$find === void 0 ? void 0 : _options$find.optionName) || "Text";
16272
+ return ((_options$find = options.find(prop("active"))) === null || _options$find === void 0 ? void 0 : _options$find.icon) || TextP;
16281
16273
  };
16282
16274
  var renderOptionButton = function renderOptionButton(_ref4) {
16283
16275
  var tooltip = _ref4.tooltip,
@@ -16287,15 +16279,15 @@ var renderOptionButton = function renderOptionButton(_ref4) {
16287
16279
  optionName = _ref4.optionName,
16288
16280
  highlight = _ref4.highlight;
16289
16281
  return /*#__PURE__*/jsx(Button$1, _objectSpread$a({
16282
+ className: "neeto-editor-bubble-menu__item",
16290
16283
  "data-cy": "neeto-editor-bubble-menu-".concat(optionName, "-option"),
16291
16284
  icon: Icon,
16292
- size: "small",
16285
+ size: "medium",
16293
16286
  style: active ? "secondary" : "text",
16294
16287
  tooltipProps: {
16295
16288
  content: tooltip,
16296
16289
  position: "bottom",
16297
- theme: "dark",
16298
- delay: [500]
16290
+ theme: "dark"
16299
16291
  },
16300
16292
  onClick: command
16301
16293
  }, generateFocusProps(highlight)), optionName);
@@ -16409,7 +16401,8 @@ var TextColorOption = function TextColorOption(_ref) {
16409
16401
  buttonProps: {
16410
16402
  tabIndex: -1,
16411
16403
  tooltipProps: {
16412
- content: tooltipContent !== null && tooltipContent !== void 0 ? tooltipContent : label
16404
+ content: tooltipContent !== null && tooltipContent !== void 0 ? tooltipContent : label,
16405
+ position: "bottom"
16413
16406
  },
16414
16407
  className: "neeto-editor-fixed-menu__item neeto-editor-text-color-option"
16415
16408
  },
@@ -16491,7 +16484,7 @@ var Options = function Options(_ref) {
16491
16484
  editor: editor,
16492
16485
  options: options
16493
16486
  });
16494
- var nodeType = getNodeType(dropdownOptions);
16487
+ var Icon = getNodeIcon(dropdownOptions);
16495
16488
  var isEmojiActive = options.includes(EDITOR_OPTIONS.EMOJI);
16496
16489
  var isTextColorOptionActive = options.includes(EDITOR_OPTIONS.TEXT_COLOR);
16497
16490
  var isLinkActive = options.includes(EDITOR_OPTIONS.LINK);
@@ -16535,15 +16528,36 @@ var Options = function Options(_ref) {
16535
16528
  children: [/*#__PURE__*/jsx(Dropdown$1, {
16536
16529
  buttonSize: "small",
16537
16530
  buttonStyle: "text",
16538
- label: nodeType,
16531
+ label: Icon,
16539
16532
  strategy: "fixed",
16533
+ buttonProps: {
16534
+ icon: Icon,
16535
+ iconPosition: "left",
16536
+ iconSize: 22,
16537
+ label: /*#__PURE__*/jsx(Down, {
16538
+ size: 12
16539
+ }),
16540
+ "data-cy": "neeto-editor-fixed-menu-font-size-option",
16541
+ style: "text",
16542
+ size: "small",
16543
+ className: "neeto-editor-bubble-menu__item neeto-editor-font-size__wrapper"
16544
+ },
16540
16545
  children: /*#__PURE__*/jsx(Menu, {
16546
+ className: "neeto-ui-flex neeto-ui-gap-1 neeto-editor-menu-font-size-options",
16541
16547
  children: dropdownOptions.map(function (_ref2) {
16542
16548
  var optionName = _ref2.optionName,
16543
- command = _ref2.command;
16549
+ command = _ref2.command,
16550
+ Icon = _ref2.icon;
16544
16551
  return /*#__PURE__*/jsx(MenuItem.Button, {
16552
+ className: "neeto-editor-menu-font-size-options__item-btn",
16553
+ tooltipProps: {
16554
+ content: optionName,
16555
+ position: "bottom"
16556
+ },
16545
16557
  onClick: command,
16546
- children: optionName
16558
+ children: /*#__PURE__*/jsx(Icon, {
16559
+ size: 22
16560
+ })
16547
16561
  }, optionName);
16548
16562
  })
16549
16563
  })
@@ -16627,7 +16641,7 @@ var Bubble = function Bubble(_ref) {
16627
16641
  setIsLinkOptionActive(false);
16628
16642
  setIsTableOptionActive(false);
16629
16643
  },
16630
- theme: "neeto-editor-bubble-menu",
16644
+ theme: "light neeto-editor-bubble-menu-tippy-box",
16631
16645
  maxWidth: 500
16632
16646
  },
16633
16647
  children: /*#__PURE__*/jsx(Options, {
@@ -19626,7 +19640,7 @@ function renderTooltipContent(label, optionName) {
19626
19640
  return "".concat(label, " (").concat(key, ")");
19627
19641
  }
19628
19642
 
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}";
19643
+ 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}.tippy-box[data-theme~=neeto-editor-bubble-menu-tippy-box]{box-shadow:none!important}.tippy-box[data-theme~=neeto-editor-bubble-menu-tippy-box] .tippy-content{padding:0!important}.neeto-editor-bubble-menu{align-items:center;background:rgb(var(--neeto-ui-white));border:1px solid rgb(var(--neeto-ui-gray-400));border-radius:var(--neeto-ui-rounded);display:flex;flex-direction:row;gap:0;justify-content:flex-start;overflow-x:auto;padding:0;position:relative}.neeto-editor-bubble-menu>.neeto-editor-bubble-menu__item:first-child,.neeto-editor-bubble-menu>.neeto-editor-fixed-menu__item:first-child{border-bottom-left-radius:var(--neeto-ui-rounded);border-top-left-radius:var(--neeto-ui-rounded)}.neeto-editor-bubble-menu>.neeto-editor-bubble-menu__item:last-child,.neeto-editor-bubble-menu>.neeto-editor-fixed-menu__item:last-child{border-bottom-right-radius:var(--neeto-ui-rounded);border-top-right-radius:var(--neeto-ui-rounded)}.neeto-editor-bubble-menu button.neeto-editor-bubble-menu__item,.neeto-editor-bubble-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;color:rgb(var(--neeto-ui-black))!important;flex-shrink:0;height:36px;justify-content:center;min-width:-moz-fit-content;min-width:fit-content;width:36px}.neeto-editor-bubble-menu button.neeto-editor-bubble-menu__item .neeto-ui-btn__icon,.neeto-editor-bubble-menu button.neeto-editor-fixed-menu__item .neeto-ui-btn__icon{color:rgb(var(--neeto-ui-black))}.neeto-editor-bubble-menu button.neeto-editor-bubble-menu__item .neeto-ui-btn__icon path,.neeto-editor-bubble-menu button.neeto-editor-fixed-menu__item .neeto-ui-btn__icon path{stroke-width:1.5px}.neeto-editor-bubble-menu button.neeto-editor-bubble-menu__item.active,.neeto-editor-bubble-menu button.neeto-editor-bubble-menu__item:active,.neeto-editor-bubble-menu button.neeto-editor-bubble-menu__item:hover,.neeto-editor-bubble-menu button.neeto-editor-fixed-menu__item.active,.neeto-editor-bubble-menu button.neeto-editor-fixed-menu__item:active,.neeto-editor-bubble-menu button.neeto-editor-fixed-menu__item:hover{background-color:rgb(var(--neeto-ui-gray-100))}.neeto-editor-bubble-menu button.neeto-editor-bubble-menu__item.neeto-ui-btn--style-secondary{background-color:rgb(var(--neeto-ui-accent-100))!important}.neeto-editor-bubble-menu button.neeto-editor-bubble-menu__item.neeto-ui-btn--style-secondary .neeto-ui-btn__icon{color:rgb(var(--neeto-ui-accent-800))!important}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__link{align-items:center;display:flex;gap:6px;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;background-color:var(--neeto-ui-input-bg-color);border:var(--neeto-ui-input-border-width) solid var(--neeto-ui-input-border-color);border-radius:var(--neeto-ui-input-border-radius);color:var(--neeto-ui-input-color);font-size:var(--neeto-ui-input-font-size);height:28px;line-height:1.2;outline:none;transition:var(--neeto-ui-transition);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:start;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:var(--neeto-ui-input-bg-color);border:var(--neeto-ui-input-border-width) solid var(--neeto-ui-input-border-color);border-radius:var(--neeto-ui-input-border-radius);color:var(--neeto-ui-input-color);font-size:var(--neeto-ui-input-font-size);height:28px;line-height:1.2;outline:none;padding:3px 5px;transition:var(--neeto-ui-transition);width:60px}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__table input::-moz-placeholder{color:rgb(var(--neeto-ui-gray-500))}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__table input::placeholder{color:rgb(var(--neeto-ui-gray-500))}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__table__menu-item{display:flex;flex-direction:column;gap:6px}.neeto-editor-bubble-menu .neeto-editor-bubble-menu__table__input-label{color:rgb(var(--neeto-ui-gray-800))}.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}";
19630
19644
  n(css,{});
19631
19645
 
19632
19646
  function ownKeys(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; }
@@ -19693,5 +19707,5 @@ var Menu = function Menu(props) {
19693
19707
  }));
19694
19708
  };
19695
19709
 
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 };
19697
- //# sourceMappingURL=chunk-CeFnZWjP.js.map
19710
+ 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 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 };
19711
+ //# sourceMappingURL=chunk-BQ6gyl4W.js.map