@bigbinary/neeto-editor 1.47.1 → 1.47.2

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.
@@ -5,7 +5,7 @@ var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
5
5
  var _slicedToArray = require('@babel/runtime/helpers/slicedToArray');
6
6
  var _objectWithoutProperties = require('@babel/runtime/helpers/objectWithoutProperties');
7
7
  var React = require('react');
8
- var Menu$3 = require('./chunk-kKbY2sPw.cjs.js');
8
+ var Menu$3 = require('./chunk-BxEO1Xq_.cjs.js');
9
9
  var classnames = require('classnames');
10
10
  var constants = require('./chunk-B9Evf49b.cjs.js');
11
11
  var neetoCist = require('@bigbinary/neeto-cist');
@@ -13,7 +13,7 @@ var constants = require('./chunk-B9Evf49b.cjs.js');
13
13
  var injectCss = require('./chunk-vQvjPR2x.cjs.js');
14
14
  require('@bigbinary/neeto-cist');
15
15
  require('./chunk-D_e3pQI3.cjs.js');
16
- var index$1 = require('./chunk-W-ChuMj0.cjs.js');
16
+ var index$1 = require('./chunk-Dlwo4bBb.cjs.js');
17
17
  var common = require('./chunk-Bi1rI-2R.cjs.js');
18
18
  var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
19
19
  var Close = require('@bigbinary/neeto-icons/Close');
@@ -151,7 +151,7 @@ var EditorContent = function EditorContent(_ref) {
151
151
  imagePreviewDetails = _useState2[0],
152
152
  setImagePreviewDetails = _useState2[1];
153
153
  var editorContentRef = React.useRef(null);
154
- var htmlContent = index$1.substituteVariables(index$1.applySyntaxHighlightingAndLineNumbers(common.removeEmptyTags(content)), variables);
154
+ var htmlContent = index$1.substituteVariables(index$1.applySyntaxHighlightingAndLineNumbers(index$1.replaceHTMLEntities(common.removeEmptyTags(content))), variables);
155
155
  var sanitize = DOMPurify.sanitize;
156
156
  var injectCopyButtonToCodeBlocks = function injectCopyButtonToCodeBlocks() {
157
157
  var _editorContentRef$cur;
@@ -1 +1 @@
1
- {"version":3,"file":"EditorContent.cjs.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","_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,CAAA;AACjE,EAAA,IAAAC,SAAA,GAAkCC,cAAQ,CAAC,IAAI,CAAC;IAAAC,UAAA,GAAAC,cAAA,CAAAH,SAAA,EAAA,CAAA,CAAA;AAAzCI,IAAAA,SAAS,GAAAF,UAAA,CAAA,CAAA,CAAA;AAAEG,IAAAA,YAAY,GAAAH,UAAA,CAAA,CAAA,CAAA,CAAA;AAE9B,EAAA,IAAAI,eAAA,GAAcC,2BAAc,EAAE;IAAtBC,CAAC,GAAAF,eAAA,CAADE,CAAC,CAAA;AAET,EAAA,IAAMC,eAAe,GAAGC,YAAM,CAAC,IAAI,CAAC,CAAA;EAEpCC,4BAAiB,CAACF,eAAe,EAAE,YAAA;IAAA,OAAMV,sBAAsB,CAAC,IAAI,CAAC,CAAA;GAAE,EAAA;AACrEa,IAAAA,OAAO,EAAE,IAAA;AACX,GAAC,CAAC,CAAA;AAEFC,EAAAA,eAAS,CAAC,YAAM;AACd,IAAA,IAAI,CAACJ,eAAe,CAACK,OAAO,EAAE,OAAA;IAE9BL,eAAe,CAACK,OAAO,CAACC,YAAY,CAAC,UAAU,EAAE,IAAI,CAAC,CAAA;AACtDN,IAAAA,eAAe,CAACK,OAAO,CAACE,KAAK,EAAE,CAAA;GAChC,EA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AAqB,CAAC9B,gBAAgB,CAAC7E,OAAO,CAAC,CAAA;IAC/CwE,aAAa,CAACoC,iBAAiB,IAC7BlE,gBAAgB,CAACmC,gBAAgB,CAAC7E,OAAO,CAAC,CAAA;AAC9C,GAAC,EAAE,CAACgE,OAAO,CAAC,CAAC,CAAA;EAEb,oBACExD,eAAA,CAAAqG,mBAAA,EAAA;IAAAnG,QAAA,EAAA,cACEC,cAAA,CAAA,KAAA,EAAAmG,aAAA,CAAA;AACE,MAAA,SAAA,EAAQ,sBAAsB;AAC9B1F,MAAAA,GAAG,EAAEyD,gBAAiB;AACtBpE,MAAAA,SAAS,EAAES,UAAU,CAACqE,gCAAyB,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,uBAAgB,CAAA;AAChD,OAAA;KACIxC,EAAAA,UAAU,CACf,CAAC,EACD1F,mBAAmB,iBAClB2B,cAAA,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,UAAI,CAACrD,aAAa,CAAC;;;;"}
1
+ {"version":3,"file":"EditorContent.cjs.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","SANITI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,mBAAA,EAAA;IAAApG,QAAA,EAAA,cACEC,cAAA,CAAA,KAAA,EAAAoG,aAAA,CAAA;AACE,MAAA,SAAA,EAAQ,sBAAsB;AAC9B3F,MAAAA,GAAG,EAAEyD,gBAAiB;AACtBpE,MAAAA,SAAS,EAAES,UAAU,CAACsE,gCAAyB,EAAAwB,eAAA,CAAAA,eAAA,CAAA,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,uBAAgB,CAAA;AAChD,OAAA;KACIzC,EAAAA,UAAU,CACf,CAAC,EACD1F,mBAAmB,iBAClB2B,cAAA,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,UAAI,CAACtD,aAAa,CAAC;;;;"}
@@ -10,7 +10,7 @@ var Editor = require('./Editor.cjs.js');
10
10
  var jsxRuntime = require('react/jsx-runtime');
11
11
  require('@babel/runtime/helpers/toConsumableArray');
12
12
  require('@babel/runtime/helpers/slicedToArray');
13
- require('./chunk-kKbY2sPw.cjs.js');
13
+ require('./chunk-BxEO1Xq_.cjs.js');
14
14
  require('./chunk-vQvjPR2x.cjs.js');
15
15
  require('i18next');
16
16
  require('@bigbinary/neeto-icons/TextH1');
@@ -29,6 +29,7 @@ require('classnames');
29
29
  require('tippy.js/dist/svg-arrow.css');
30
30
  require('@bigbinary/neeto-icons/Link');
31
31
  require('@bigbinary/neeto-icons/Column');
32
+ require('@bigbinary/neeto-icons/Down');
32
33
  require('@bigbinary/neetoui/Dropdown');
33
34
  require('react-i18next');
34
35
  require('@bigbinary/neeto-icons/Close');
@@ -86,7 +87,6 @@ require('@bigbinary/neeto-commons-frontend/initializers');
86
87
  require('@bigbinary/neetoui/Tooltip');
87
88
  require('@bigbinary/neetoui/Spinner');
88
89
  require('@bigbinary/neetoui/Checkbox');
89
- require('@bigbinary/neeto-icons/Down');
90
90
  require('@bigbinary/neeto-icons/MenuHorizontal');
91
91
  require('@tippyjs/react');
92
92
  require('@bigbinary/neeto-icons/File');
@@ -5,7 +5,7 @@ require('@babel/runtime/helpers/toConsumableArray');
5
5
  require('@babel/runtime/helpers/slicedToArray');
6
6
  require('react');
7
7
  require('ramda');
8
- var Menu = require('./chunk-kKbY2sPw.cjs.js');
8
+ var Menu = require('./chunk-BxEO1Xq_.cjs.js');
9
9
  require('./chunk-D_e3pQI3.cjs.js');
10
10
  require('react/jsx-runtime');
11
11
  require('./chunk-vQvjPR2x.cjs.js');
@@ -25,6 +25,7 @@ require('classnames');
25
25
  require('tippy.js/dist/svg-arrow.css');
26
26
  require('@bigbinary/neeto-icons/Link');
27
27
  require('@bigbinary/neeto-icons/Column');
28
+ require('@bigbinary/neeto-icons/Down');
28
29
  require('@bigbinary/neetoui/Dropdown');
29
30
  require('react-i18next');
30
31
  require('@bigbinary/neeto-icons/Close');
@@ -83,7 +84,6 @@ require('@bigbinary/neeto-commons-frontend/initializers');
83
84
  require('@bigbinary/neetoui/Tooltip');
84
85
  require('@bigbinary/neetoui/Spinner');
85
86
  require('@bigbinary/neetoui/Checkbox');
86
- require('@bigbinary/neeto-icons/Down');
87
87
  require('@bigbinary/neeto-icons/MenuHorizontal');
88
88
  require('@tippyjs/react');
89
89
  require('@bigbinary/neeto-icons/File');
@@ -22,6 +22,7 @@ var neetoCist = require('@bigbinary/neeto-cist');
22
22
  require('tippy.js/dist/svg-arrow.css');
23
23
  var Link = require('@bigbinary/neeto-icons/Link');
24
24
  var Column = require('@bigbinary/neeto-icons/Column');
25
+ var Down = require('@bigbinary/neeto-icons/Down');
25
26
  var Dropdown$1 = require('@bigbinary/neetoui/Dropdown');
26
27
  var reactI18next = require('react-i18next');
27
28
  var Close = require('@bigbinary/neeto-icons/Close');
@@ -75,7 +76,6 @@ var _commonjsHelpers = require('./chunk-B83fTs8d.cjs.js');
75
76
  var Checkbox = require('@bigbinary/neetoui/Checkbox');
76
77
  var shallow = require('zustand/shallow');
77
78
  var zustand = require('zustand');
78
- var Down = require('@bigbinary/neeto-icons/Down');
79
79
  var MenuHorizontal = require('@bigbinary/neeto-icons/MenuHorizontal');
80
80
  var Tippy = require('@tippyjs/react');
81
81
  var File = require('@bigbinary/neeto-icons/File');
@@ -9994,7 +9994,7 @@ function getAttributesFromExtensions(extensions) {
9994
9994
  return extensionAttributes;
9995
9995
  }
9996
9996
 
9997
- function getNodeType$1(nameOrType, schema) {
9997
+ function getNodeType(nameOrType, schema) {
9998
9998
  if (typeof nameOrType === 'string') {
9999
9999
  if (!schema.nodes[nameOrType]) {
10000
10000
  throw Error(`There is no node type named '${nameOrType}'. Maybe you forgot to add the extension?`);
@@ -10847,7 +10847,7 @@ class ExtensionManager {
10847
10847
  options: extension.options,
10848
10848
  storage: extension.storage,
10849
10849
  editor,
10850
- type: getNodeType$1(extension.name, this.schema),
10850
+ type: getNodeType(extension.name, this.schema),
10851
10851
  };
10852
10852
  const addNodeView = getExtensionField(extension, 'addNodeView', context);
10853
10853
  if (!addNodeView) {
@@ -11194,7 +11194,7 @@ const deleteCurrentNode = () => ({ tr, dispatch }) => {
11194
11194
  };
11195
11195
 
11196
11196
  const deleteNode = typeOrName => ({ tr, state, dispatch }) => {
11197
- const type = getNodeType$1(typeOrName, state.schema);
11197
+ const type = getNodeType(typeOrName, state.schema);
11198
11198
  const $pos = tr.selection.$anchor;
11199
11199
  for (let depth = $pos.depth; depth > 0; depth -= 1) {
11200
11200
  const node = $pos.node(depth);
@@ -11782,7 +11782,7 @@ const keyboardShortcut = name => ({ editor, view, tr, dispatch, }) => {
11782
11782
 
11783
11783
  function isNodeActive(state, typeOrName, attributes = {}) {
11784
11784
  const { from, to, empty } = state.selection;
11785
- const type = typeOrName ? getNodeType$1(typeOrName, state.schema) : null;
11785
+ const type = typeOrName ? getNodeType(typeOrName, state.schema) : null;
11786
11786
  const nodeRanges = [];
11787
11787
  state.doc.nodesBetween(from, to, (node, pos) => {
11788
11788
  if (node.isText) {
@@ -11813,7 +11813,7 @@ function isNodeActive(state, typeOrName, attributes = {}) {
11813
11813
  }
11814
11814
 
11815
11815
  const lift = (typeOrName, attributes = {}) => ({ state, dispatch }) => {
11816
- const type = getNodeType$1(typeOrName, state.schema);
11816
+ const type = getNodeType(typeOrName, state.schema);
11817
11817
  const isActive = isNodeActive(state, type, attributes);
11818
11818
  if (!isActive) {
11819
11819
  return false;
@@ -11826,7 +11826,7 @@ const liftEmptyBlock = () => ({ state, dispatch }) => {
11826
11826
  };
11827
11827
 
11828
11828
  const liftListItem = typeOrName => ({ state, dispatch }) => {
11829
- const type = getNodeType$1(typeOrName, state.schema);
11829
+ const type = getNodeType(typeOrName, state.schema);
11830
11830
  return liftListItem$1(type)(state, dispatch);
11831
11831
  };
11832
11832
 
@@ -11877,7 +11877,7 @@ const resetAttributes = (typeOrName, attributes) => ({ tr, state, dispatch }) =>
11877
11877
  return false;
11878
11878
  }
11879
11879
  if (schemaType === 'node') {
11880
- nodeType = getNodeType$1(typeOrName, state.schema);
11880
+ nodeType = getNodeType(typeOrName, state.schema);
11881
11881
  }
11882
11882
  if (schemaType === 'mark') {
11883
11883
  markType = getMarkType(typeOrName, state.schema);
@@ -12139,7 +12139,7 @@ function getText(node, options) {
12139
12139
  }
12140
12140
 
12141
12141
  function getNodeAttributes(state, typeOrName) {
12142
- const type = getNodeType$1(typeOrName, state.schema);
12142
+ const type = getNodeType(typeOrName, state.schema);
12143
12143
  const { from, to } = state.selection;
12144
12144
  const nodes = [];
12145
12145
  state.doc.nodesBetween(from, to, node => {
@@ -12602,7 +12602,7 @@ const setMeta = (key, value) => ({ tr }) => {
12602
12602
  };
12603
12603
 
12604
12604
  const setNode = (typeOrName, attributes = {}) => ({ state, dispatch, chain }) => {
12605
- const type = getNodeType$1(typeOrName, state.schema);
12605
+ const type = getNodeType(typeOrName, state.schema);
12606
12606
  // TODO: use a fallback like insertContent?
12607
12607
  if (!type.isTextblock) {
12608
12608
  console.warn('[tiptap warn]: Currently "setNode()" only supports text block nodes.');
@@ -12648,7 +12648,7 @@ const setTextSelection = position => ({ tr, dispatch }) => {
12648
12648
  };
12649
12649
 
12650
12650
  const sinkListItem = typeOrName => ({ state, dispatch }) => {
12651
- const type = getNodeType$1(typeOrName, state.schema);
12651
+ const type = getNodeType(typeOrName, state.schema);
12652
12652
  return sinkListItem$1(type)(state, dispatch);
12653
12653
  };
12654
12654
 
@@ -12729,7 +12729,7 @@ const splitBlock = ({ keepMarks = true } = {}) => ({ tr, state, dispatch, editor
12729
12729
 
12730
12730
  const splitListItem = (typeOrName, overrideAttrs = {}) => ({ tr, state, dispatch, editor, }) => {
12731
12731
  var _a;
12732
- const type = getNodeType$1(typeOrName, state.schema);
12732
+ const type = getNodeType(typeOrName, state.schema);
12733
12733
  const { $from, $to } = state.selection;
12734
12734
  // @ts-ignore
12735
12735
  // eslint-disable-next-line
@@ -12856,8 +12856,8 @@ const joinListForwards = (tr, listType) => {
12856
12856
  };
12857
12857
  const toggleList = (listTypeOrName, itemTypeOrName, keepMarks, attributes = {}) => ({ editor, tr, state, dispatch, chain, commands, can, }) => {
12858
12858
  const { extensions, splittableMarks } = editor.extensionManager;
12859
- const listType = getNodeType$1(listTypeOrName, state.schema);
12860
- const itemType = getNodeType$1(itemTypeOrName, state.schema);
12859
+ const listType = getNodeType(listTypeOrName, state.schema);
12860
+ const itemType = getNodeType(itemTypeOrName, state.schema);
12861
12861
  const { selection, storedMarks } = state;
12862
12862
  const { $from, $to } = selection;
12863
12863
  const range = $from.blockRange($to);
@@ -12928,8 +12928,8 @@ const toggleMark = (typeOrName, attributes = {}, options = {}) => ({ state, comm
12928
12928
  };
12929
12929
 
12930
12930
  const toggleNode = (typeOrName, toggleTypeOrName, attributes = {}) => ({ state, commands }) => {
12931
- const type = getNodeType$1(typeOrName, state.schema);
12932
- const toggleType = getNodeType$1(toggleTypeOrName, state.schema);
12931
+ const type = getNodeType(typeOrName, state.schema);
12932
+ const toggleType = getNodeType(toggleTypeOrName, state.schema);
12933
12933
  const isActive = isNodeActive(state, type, attributes);
12934
12934
  if (isActive) {
12935
12935
  return commands.setNode(toggleType);
@@ -12938,7 +12938,7 @@ const toggleNode = (typeOrName, toggleTypeOrName, attributes = {}) => ({ state,
12938
12938
  };
12939
12939
 
12940
12940
  const toggleWrap = (typeOrName, attributes = {}) => ({ state, commands }) => {
12941
- const type = getNodeType$1(typeOrName, state.schema);
12941
+ const type = getNodeType(typeOrName, state.schema);
12942
12942
  const isActive = isNodeActive(state, type, attributes);
12943
12943
  if (isActive) {
12944
12944
  return commands.lift(type);
@@ -13024,7 +13024,7 @@ const updateAttributes = (typeOrName, attributes = {}) => ({ tr, state, dispatch
13024
13024
  return false;
13025
13025
  }
13026
13026
  if (schemaType === 'node') {
13027
- nodeType = getNodeType$1(typeOrName, state.schema);
13027
+ nodeType = getNodeType(typeOrName, state.schema);
13028
13028
  }
13029
13029
  if (schemaType === 'mark') {
13030
13030
  markType = getMarkType(typeOrName, state.schema);
@@ -13059,12 +13059,12 @@ const updateAttributes = (typeOrName, attributes = {}) => ({ tr, state, dispatch
13059
13059
  };
13060
13060
 
13061
13061
  const wrapIn = (typeOrName, attributes = {}) => ({ state, dispatch }) => {
13062
- const type = getNodeType$1(typeOrName, state.schema);
13062
+ const type = getNodeType(typeOrName, state.schema);
13063
13063
  return wrapIn$1(type, attributes)(state, dispatch);
13064
13064
  };
13065
13065
 
13066
13066
  const wrapInList = (typeOrName, attributes = {}) => ({ state, dispatch }) => {
13067
- const type = getNodeType$1(typeOrName, state.schema);
13067
+ const type = getNodeType(typeOrName, state.schema);
13068
13068
  return wrapInList$1(type, attributes)(state, dispatch);
13069
13069
  };
13070
13070
 
@@ -16008,7 +16008,6 @@ var TableOption$2 = function TableOption(_ref) {
16008
16008
  autoFocus: true,
16009
16009
  "data-cy": "neeto-editor-fixed-menu-table-option-input",
16010
16010
  min: "1",
16011
- placeholder: t("neetoEditor.placeholders.rows"),
16012
16011
  type: "number",
16013
16012
  value: rows,
16014
16013
  onChange: utils$1.withEventTargetValue(setRows)
@@ -16021,7 +16020,6 @@ var TableOption$2 = function TableOption(_ref) {
16021
16020
  }), /*#__PURE__*/jsxRuntime.jsx("input", {
16022
16021
  "data-cy": "neeto-editor-bubble-menu-table-option-input",
16023
16022
  min: "1",
16024
- placeholder: t("neetoEditor.placeholders.columns"),
16025
16023
  type: "number",
16026
16024
  value: columns,
16027
16025
  onChange: utils$1.withEventTargetValue(setColumns)
@@ -16031,11 +16029,13 @@ var TableOption$2 = function TableOption(_ref) {
16031
16029
  children: [/*#__PURE__*/jsxRuntime.jsx(Button$1, {
16032
16030
  "data-cy": "neeto-editor-bubble-menu-table-option-create-button",
16033
16031
  icon: Check,
16032
+ size: "small",
16034
16033
  style: "secondary",
16035
16034
  onClick: handleSubmit
16036
16035
  }), /*#__PURE__*/jsxRuntime.jsx(Button$1, {
16037
16036
  "data-cy": "neeto-editor-bubble-menu-table-option-create-button",
16038
16037
  icon: Close,
16038
+ size: "small",
16039
16039
  style: "secondary",
16040
16040
  onClick: handleClose
16041
16041
  })]
@@ -16221,8 +16221,9 @@ var buildBubbleMenuOptions = function buildBubbleMenuOptions(_ref2) {
16221
16221
  var getTextMenuDropdownOptions = function getTextMenuDropdownOptions(_ref3) {
16222
16222
  var editor = _ref3.editor,
16223
16223
  options = _ref3.options;
16224
- var textOptions = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, constants.EDITOR_OPTIONS.H1, {
16224
+ var textOptions = _defineProperty(_defineProperty(_defineProperty(_defineProperty({}, constants.EDITOR_OPTIONS.H1, {
16225
16225
  optionName: "Heading 1",
16226
+ icon: TextH1,
16226
16227
  active: editor.isActive("heading", {
16227
16228
  level: 1
16228
16229
  }),
@@ -16233,6 +16234,7 @@ var getTextMenuDropdownOptions = function getTextMenuDropdownOptions(_ref3) {
16233
16234
  }
16234
16235
  }), constants.EDITOR_OPTIONS.H2, {
16235
16236
  optionName: "Heading 2",
16237
+ icon: TextH2,
16236
16238
  active: editor.isActive("heading", {
16237
16239
  level: 2
16238
16240
  }),
@@ -16243,6 +16245,7 @@ var getTextMenuDropdownOptions = function getTextMenuDropdownOptions(_ref3) {
16243
16245
  }
16244
16246
  }), constants.EDITOR_OPTIONS.H3, {
16245
16247
  optionName: "Heading 3",
16248
+ icon: TextH3,
16246
16249
  active: editor.isActive("heading", {
16247
16250
  level: 3
16248
16251
  }),
@@ -16251,20 +16254,9 @@ var getTextMenuDropdownOptions = function getTextMenuDropdownOptions(_ref3) {
16251
16254
  level: 3
16252
16255
  }).run();
16253
16256
  }
16254
- }), constants.EDITOR_OPTIONS.LIST_ORDERED, {
16255
- optionName: "Ordered List",
16256
- active: editor.isActive("orderedList"),
16257
- command: function command() {
16258
- return editor.chain().focus().toggleOrderedList().run();
16259
- }
16260
- }), constants.EDITOR_OPTIONS.LIST_BULLETS, {
16261
- optionName: "Bulleted List",
16262
- active: editor.isActive("bulletList"),
16263
- command: function command() {
16264
- return editor.chain().focus().toggleBulletList().run();
16265
- }
16266
16257
  }), constants.EDITOR_OPTIONS.PARAGRAPH, {
16267
16258
  optionName: "Text",
16259
+ icon: TextP,
16268
16260
  active: editor.isActive("paragraph"),
16269
16261
  command: function command() {
16270
16262
  return editor.chain().focus().setNode("paragraph").run();
@@ -16277,9 +16269,9 @@ var getTextMenuDropdownOptions = function getTextMenuDropdownOptions(_ref3) {
16277
16269
  });
16278
16270
  return result;
16279
16271
  };
16280
- var getNodeType = function getNodeType(options) {
16272
+ var getNodeIcon = function getNodeIcon(options) {
16281
16273
  var _options$find;
16282
- return ((_options$find = options.find(ramda.prop("active"))) === null || _options$find === void 0 ? void 0 : _options$find.optionName) || "Text";
16274
+ return ((_options$find = options.find(ramda.prop("active"))) === null || _options$find === void 0 ? void 0 : _options$find.icon) || TextP;
16283
16275
  };
16284
16276
  var renderOptionButton = function renderOptionButton(_ref4) {
16285
16277
  var tooltip = _ref4.tooltip,
@@ -16289,15 +16281,15 @@ var renderOptionButton = function renderOptionButton(_ref4) {
16289
16281
  optionName = _ref4.optionName,
16290
16282
  highlight = _ref4.highlight;
16291
16283
  return /*#__PURE__*/jsxRuntime.jsx(Button$1, _objectSpread$a({
16284
+ className: "neeto-editor-bubble-menu__item",
16292
16285
  "data-cy": "neeto-editor-bubble-menu-".concat(optionName, "-option"),
16293
16286
  icon: Icon,
16294
- size: "small",
16287
+ size: "medium",
16295
16288
  style: active ? "secondary" : "text",
16296
16289
  tooltipProps: {
16297
16290
  content: tooltip,
16298
16291
  position: "bottom",
16299
- theme: "dark",
16300
- delay: [500]
16292
+ theme: "dark"
16301
16293
  },
16302
16294
  onClick: command
16303
16295
  }, generateFocusProps(highlight)), optionName);
@@ -16411,7 +16403,8 @@ var TextColorOption = function TextColorOption(_ref) {
16411
16403
  buttonProps: {
16412
16404
  tabIndex: -1,
16413
16405
  tooltipProps: {
16414
- content: tooltipContent !== null && tooltipContent !== void 0 ? tooltipContent : label
16406
+ content: tooltipContent !== null && tooltipContent !== void 0 ? tooltipContent : label,
16407
+ position: "bottom"
16415
16408
  },
16416
16409
  className: "neeto-editor-fixed-menu__item neeto-editor-text-color-option"
16417
16410
  },
@@ -16493,7 +16486,7 @@ var Options = function Options(_ref) {
16493
16486
  editor: editor,
16494
16487
  options: options
16495
16488
  });
16496
- var nodeType = getNodeType(dropdownOptions);
16489
+ var Icon = getNodeIcon(dropdownOptions);
16497
16490
  var isEmojiActive = options.includes(constants.EDITOR_OPTIONS.EMOJI);
16498
16491
  var isTextColorOptionActive = options.includes(constants.EDITOR_OPTIONS.TEXT_COLOR);
16499
16492
  var isLinkActive = options.includes(constants.EDITOR_OPTIONS.LINK);
@@ -16537,15 +16530,36 @@ var Options = function Options(_ref) {
16537
16530
  children: [/*#__PURE__*/jsxRuntime.jsx(Dropdown$1, {
16538
16531
  buttonSize: "small",
16539
16532
  buttonStyle: "text",
16540
- label: nodeType,
16533
+ label: Icon,
16541
16534
  strategy: "fixed",
16535
+ buttonProps: {
16536
+ icon: Icon,
16537
+ iconPosition: "left",
16538
+ iconSize: 22,
16539
+ label: /*#__PURE__*/jsxRuntime.jsx(Down, {
16540
+ size: 12
16541
+ }),
16542
+ "data-cy": "neeto-editor-fixed-menu-font-size-option",
16543
+ style: "text",
16544
+ size: "small",
16545
+ className: "neeto-editor-bubble-menu__item neeto-editor-font-size__wrapper"
16546
+ },
16542
16547
  children: /*#__PURE__*/jsxRuntime.jsx(Menu, {
16548
+ className: "neeto-ui-flex neeto-ui-gap-1 neeto-editor-menu-font-size-options",
16543
16549
  children: dropdownOptions.map(function (_ref2) {
16544
16550
  var optionName = _ref2.optionName,
16545
- command = _ref2.command;
16551
+ command = _ref2.command,
16552
+ Icon = _ref2.icon;
16546
16553
  return /*#__PURE__*/jsxRuntime.jsx(MenuItem.Button, {
16554
+ className: "neeto-editor-menu-font-size-options__item-btn",
16555
+ tooltipProps: {
16556
+ content: optionName,
16557
+ position: "bottom"
16558
+ },
16547
16559
  onClick: command,
16548
- children: optionName
16560
+ children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
16561
+ size: 22
16562
+ })
16549
16563
  }, optionName);
16550
16564
  })
16551
16565
  })
@@ -16629,7 +16643,7 @@ var Bubble = function Bubble(_ref) {
16629
16643
  setIsLinkOptionActive(false);
16630
16644
  setIsTableOptionActive(false);
16631
16645
  },
16632
- theme: "neeto-editor-bubble-menu",
16646
+ theme: "light neeto-editor-bubble-menu-tippy-box",
16633
16647
  maxWidth: 500
16634
16648
  },
16635
16649
  children: /*#__PURE__*/jsxRuntime.jsx(Options, {
@@ -19628,7 +19642,7 @@ function renderTooltipContent(label, optionName) {
19628
19642
  return "".concat(label, " (").concat(key, ")");
19629
19643
  }
19630
19644
 
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}";
19645
+ 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}";
19632
19646
  injectCss.n(css,{});
19633
19647
 
19634
19648
  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; }
@@ -19729,7 +19743,7 @@ exports.getMarkRange = getMarkRange;
19729
19743
  exports.getMarkType = getMarkType;
19730
19744
  exports.getMarksBetween = getMarksBetween;
19731
19745
  exports.getNodeAtPosition = getNodeAtPosition;
19732
- exports.getNodeType = getNodeType$1;
19746
+ exports.getNodeType = getNodeType;
19733
19747
  exports.highlightFocussedNode = highlightFocussedNode;
19734
19748
  exports.isAtEndOfNode = isAtEndOfNode;
19735
19749
  exports.isAtStartOfNode = isAtStartOfNode;
@@ -19746,4 +19760,4 @@ exports.useEditor = useEditor;
19746
19760
  exports.useEditorState = useEditorState$1;
19747
19761
  exports.validateUrl = validateUrl;
19748
19762
  exports.wrappingInputRule = wrappingInputRule;
19749
- //# sourceMappingURL=chunk-kKbY2sPw.cjs.js.map
19763
+ //# sourceMappingURL=chunk-BxEO1Xq_.cjs.js.map