@bigbinary/neeto-editor 1.45.15 → 1.45.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (42) hide show
  1. package/dist/Editor.js +4 -12
  2. package/dist/Editor.js.map +1 -1
  3. package/dist/EditorContent.js +3 -3
  4. package/dist/FormikEditor.js +2 -3
  5. package/dist/FormikEditor.js.map +1 -1
  6. package/dist/{chunk-GwDLPLDQ.js → chunk-B88REGV6.js} +3 -6
  7. package/dist/chunk-B88REGV6.js.map +1 -0
  8. package/dist/{chunk-CGoAVMwz.js → chunk-CDBSVHz6.js} +16 -3
  9. package/dist/chunk-CDBSVHz6.js.map +1 -0
  10. package/dist/{chunk-BeW6s4Si.js → chunk-DBch3tqq.js} +2 -15
  11. package/dist/chunk-DBch3tqq.js.map +1 -0
  12. package/dist/chunk-LjMXcuRe.js +6 -0
  13. package/dist/chunk-LjMXcuRe.js.map +1 -0
  14. package/dist/cjs/Editor.cjs.js +8 -16
  15. package/dist/cjs/Editor.cjs.js.map +1 -1
  16. package/dist/cjs/EditorContent.cjs.js +8 -8
  17. package/dist/cjs/FormikEditor.cjs.js +2 -3
  18. package/dist/cjs/FormikEditor.cjs.js.map +1 -1
  19. package/dist/cjs/{chunk-CjXcHxqY.cjs.js → chunk-BIff7Ppc.cjs.js} +25 -9
  20. package/dist/cjs/chunk-BIff7Ppc.cjs.js.map +1 -0
  21. package/dist/cjs/chunk-DN1S-KLQ.cjs.js +10 -0
  22. package/dist/cjs/chunk-DN1S-KLQ.cjs.js.map +1 -0
  23. package/dist/cjs/{chunk-B0S9scli.cjs.js → chunk-Dh0stJ0O.cjs.js} +1 -20
  24. package/dist/cjs/chunk-Dh0stJ0O.cjs.js.map +1 -0
  25. package/dist/cjs/{chunk-3eBSLfI7.cjs.js → chunk-a-cnTJIr.cjs.js} +5 -9
  26. package/dist/cjs/chunk-a-cnTJIr.cjs.js.map +1 -0
  27. package/dist/cjs/index.cjs.js +6 -5
  28. package/dist/cjs/index.cjs.js.map +1 -1
  29. package/dist/cjs/utils.cjs.js +5 -4
  30. package/dist/cjs/utils.cjs.js.map +1 -1
  31. package/dist/editor-stats.html +19 -1
  32. package/dist/index.js +6 -5
  33. package/dist/index.js.map +1 -1
  34. package/dist/utils.js +5 -4
  35. package/dist/utils.js.map +1 -1
  36. package/package.json +1 -1
  37. package/dist/chunk-BeW6s4Si.js.map +0 -1
  38. package/dist/chunk-CGoAVMwz.js.map +0 -1
  39. package/dist/chunk-GwDLPLDQ.js.map +0 -1
  40. package/dist/cjs/chunk-3eBSLfI7.cjs.js.map +0 -1
  41. package/dist/cjs/chunk-B0S9scli.cjs.js.map +0 -1
  42. package/dist/cjs/chunk-CjXcHxqY.cjs.js.map +0 -1
@@ -9,7 +9,7 @@ import { isNil } from 'ramda';
9
9
  import { createRoot } from 'react-dom/client';
10
10
  import { E as EDITOR_SIZES } from './chunk-D86RZ044.js';
11
11
  import { n } from './chunk-DmrvuTKK.js';
12
- import { E as EDITOR_CONTENT_CLASS_NAME, S as SANITIZE_OPTIONS, a as EDITOR_CONTENT_DEFAULT_CONFIGURATION } from './chunk-BeW6s4Si.js';
12
+ import { s as substituteVariables, a as applySyntaxHighlightingAndLineNumbers, b as applyLineHighlighting, E as EDITOR_CONTENT_CLASS_NAME, S as SANITIZE_OPTIONS, c as EDITOR_CONTENT_DEFAULT_CONFIGURATION } from './chunk-CDBSVHz6.js';
13
13
  import { useOnClickOutside } from '@bigbinary/neeto-commons-frontend/react-utils';
14
14
  import Close from '@bigbinary/neeto-icons/Close';
15
15
  import Button from '@bigbinary/neetoui/Button';
@@ -17,10 +17,10 @@ import Spinner from '@bigbinary/neetoui/Spinner';
17
17
  import { createPortal } from 'react-dom';
18
18
  import { useTranslation } from 'react-i18next';
19
19
  import { jsxs, jsx, Fragment } from 'react/jsx-runtime';
20
- import { s as substituteVariables, a as applySyntaxHighlightingAndLineNumbers, b as applyLineHighlighting } from './chunk-CGoAVMwz.js';
21
- import '@babel/runtime/helpers/toConsumableArray';
20
+ import './chunk-DBch3tqq.js';
22
21
  import '@bigbinary/neeto-cist';
23
22
  import 'react-dom/server';
23
+ import '@babel/runtime/helpers/toConsumableArray';
24
24
 
25
25
  var css = "@charset \"UTF-8\";@import url(\"https://cdnjs.cloudflare.com/ajax/libs/highlight.js/10.7.2/styles/github.min.css\");.neeto-ui-theme--dark .hljs{background:#0d1117;color:#c9d1d9}.neeto-ui-theme--dark .hljs-doctag,.neeto-ui-theme--dark .hljs-keyword,.neeto-ui-theme--dark .hljs-meta .hljs-keyword,.neeto-ui-theme--dark .hljs-template-tag,.neeto-ui-theme--dark .hljs-template-variable,.neeto-ui-theme--dark .hljs-type,.neeto-ui-theme--dark .hljs-variable.language_{color:#ff7b72}.neeto-ui-theme--dark .hljs-title,.neeto-ui-theme--dark .hljs-title.class_,.neeto-ui-theme--dark .hljs-title.class_.inherited__,.neeto-ui-theme--dark .hljs-title.function_{color:#d2a8ff}.neeto-ui-theme--dark .hljs-attr,.neeto-ui-theme--dark .hljs-attribute,.neeto-ui-theme--dark .hljs-literal,.neeto-ui-theme--dark .hljs-meta,.neeto-ui-theme--dark .hljs-number,.neeto-ui-theme--dark .hljs-operator,.neeto-ui-theme--dark .hljs-selector-attr,.neeto-ui-theme--dark .hljs-selector-class,.neeto-ui-theme--dark .hljs-selector-id,.neeto-ui-theme--dark .hljs-variable{color:#79c0ff}.neeto-ui-theme--dark .hljs-meta .hljs-string,.neeto-ui-theme--dark .hljs-regexp,.neeto-ui-theme--dark .hljs-string{color:#a5d6ff}.neeto-ui-theme--dark .hljs-built_in,.neeto-ui-theme--dark .hljs-symbol{color:#ffa657}.neeto-ui-theme--dark .hljs-code,.neeto-ui-theme--dark .hljs-comment,.neeto-ui-theme--dark .hljs-formula{color:#8b949e}.neeto-ui-theme--dark .hljs-name,.neeto-ui-theme--dark .hljs-quote,.neeto-ui-theme--dark .hljs-selector-pseudo,.neeto-ui-theme--dark .hljs-selector-tag{color:#7ee787}.neeto-ui-theme--dark .hljs-subst{color:#c9d1d9}.neeto-ui-theme--dark .hljs-section{color:#1f6feb}.neeto-ui-theme--dark .hljs-bullet{color:#f2cc60}.neeto-ui-theme--dark .hljs-emphasis{color:#c9d1d9}.neeto-ui-theme--dark .hljs-strong{color:#c9d1d9;font-weight:700}.neeto-ui-theme--dark .hljs-addition{background-color:#033a16;color:#aff5b4}.neeto-ui-theme--dark .hljs-deletion{background-color:#67060c;color:#ffdcd7}.neeto-ui-theme--light .hljs{background:#f8f8f8;color:#333}.neeto-ui-theme--light .hljs-comment,.neeto-ui-theme--light .hljs-quote{color:#998}.neeto-ui-theme--light .hljs-keyword,.neeto-ui-theme--light .hljs-selector-tag,.neeto-ui-theme--light .hljs-subst{color:#333}.neeto-ui-theme--light .hljs-literal,.neeto-ui-theme--light .hljs-number,.neeto-ui-theme--light .hljs-tag .hljs-attr,.neeto-ui-theme--light .hljs-template-variable,.neeto-ui-theme--light .hljs-variable{color:teal}.neeto-ui-theme--light .hljs-doctag,.neeto-ui-theme--light .hljs-string{color:#d14}.neeto-ui-theme--light .hljs-section,.neeto-ui-theme--light .hljs-selector-id,.neeto-ui-theme--light .hljs-title{color:#900}.neeto-ui-theme--light .hljs-class .hljs-title,.neeto-ui-theme--light .hljs-type{color:#458}.neeto-ui-theme--light .hljs-attribute,.neeto-ui-theme--light .hljs-name,.neeto-ui-theme--light .hljs-tag{color:navy}.neeto-ui-theme--light .hljs-link,.neeto-ui-theme--light .hljs-regexp{color:#009926}.neeto-ui-theme--light .hljs-bullet,.neeto-ui-theme--light .hljs-symbol{color:#990073}.neeto-ui-theme--light .hljs-built_in,.neeto-ui-theme--light .hljs-builtin-name{color:#0086b3}.neeto-ui-theme--light .hljs-meta{color:#999}.neeto-ui-theme--light .hljs-deletion{background:#fdd}.neeto-ui-theme--light .hljs-addition{background:#dfd}.neeto-ui-theme--light,:root{--neeto-editor-white:255,255,255;--neeto-editor-black:12,17,29;--neeto-editor-gray-800:16,24,40;--neeto-editor-gray-700:29,41,57;--neeto-editor-gray-600:52,64,84;--neeto-editor-gray-500:135,146,157;--neeto-editor-gray-400:194,200,204;--neeto-editor-gray-300:216,220,222;--neeto-editor-gray-200:233,235,237;--neeto-editor-gray-100:246,247,248;--neeto-editor-gray-50:250,250,250;--neeto-editor-primary-800:0,102,83;--neeto-editor-primary-600:0,122,100;--neeto-editor-primary-500:0,128,104;--neeto-editor-primary-100:225,243,238;--neeto-editor-primary-50:240,249,247;--neeto-editor-accent-800:9,90,186;--neeto-editor-accent-600:13,102,208;--neeto-editor-accent-500:20,115,230;--neeto-editor-accent-100:230,244,255;--neeto-editor-accent-50:239,248,255;--neeto-editor-success-800:1,121,93;--neeto-editor-success-600:1,141,109;--neeto-editor-success-500:2,162,124;--neeto-editor-success-100:235,255,250;--neeto-editor-error-800:187,18,26;--neeto-editor-error-600:201,37,45;--neeto-editor-error-500:215,55,63;--neeto-editor-error-100:254,236,240;--neeto-editor-info-800:9,90,186;--neeto-editor-info-600:13,102,208;--neeto-editor-info-500:20,115,230;--neeto-editor-info-100:226,242,255;--neeto-editor-warning-800:189,100,13;--neeto-editor-warning-600:203,111,16;--neeto-editor-warning-500:218,123,17;--neeto-editor-warning-100:251,242,225;--neeto-editor-pastel-silver:232,233,237;--neeto-editor-pastel-red:255,229,229;--neeto-editor-pastel-yellow:254,243,197;--neeto-editor-pastel-green:211,249,232;--neeto-editor-pastel-blue:236,244,255;--neeto-editor-pastel-purple:238,235,255;--neeto-editor-pastel-pink:253,226,241;--neeto-editor-rounded-none:0;--neeto-editor-rounded-sm:3px;--neeto-editor-rounded:5px;--neeto-editor-rounded-md:6px;--neeto-editor-rounded-lg:8px;--neeto-editor-rounded-xl:12px;--neeto-editor-rounded-full:999px;--neeto-editor-font-thin:100;--neeto-editor-font-extralight:200;--neeto-editor-font-light:300;--neeto-editor-font-normal:400;--neeto-editor-font-medium:500;--neeto-editor-font-semibold:600;--neeto-editor-font-bold:700;--neeto-editor-font-extrabold:800;--neeto-editor-font-black:900;--neeto-editor-content-h1-margin:1.5rem 0 0.25rem;--neeto-editor-content-h2-margin:1.5rem 0 0.25rem;--neeto-editor-content-h3-margin:1.5rem 0 0.25rem;--neeto-editor-content-h4-margin:1.5rem 0 0.25rem;--neeto-editor-content-h5-margin:1.5rem 0 0.25rem;--neeto-editor-content-h6-margin:1.5rem 0 0.25rem;--neeto-editor-content-heading-font-weight:600;--neeto-editor-content-heading-font-weight-bold:bold;--neeto-editor-content-heading-color:12,17,29,1;--neeto-editor-content-paragraph-color:54,55,55,1;--neeto-editor-content-paragraph-font-weight:400;--neeto-editor-content-paragraph-line-height:1.6;--neeto-editor-content-list-left-padding:2rem;--neeto-editor-content-list-margin-bottom:1rem;--neeto-editor-content-list-item-margin-bottom:0.5rem;--neeto-editor-content-list-item-margin-top:0.5rem;--neeto-editor-content-code-font-size:85%;--neeto-editor-content-code-background-color:246,248,250,1;--neeto-editor-content-code-line-number-color:89,99,110,1;--neeto-editor-content-code-color:31,35,40,1;--neeto-editor-content-code-padding:0.2em 0.4em;--neeto-editor-content-blockquote-color:89,99,110,1;--neeto-editor-content-blockquote-border-color:209,217,224,1;--neeto-editor-content-blockquote-border-left-width:4px;--neeto-editor-content-blockquote-margin-bottom:1rem;--neeto-editor-content-blockquote-padding-left:0.75rem;--neeto-editor-content-image-border-color:228,228,231;--neeto-editor-content-image-border-radius:8px}.neeto-ui-theme--dark{--neeto-editor-white:18,18,18;--neeto-editor-black:224,224,224;--neeto-editor-gray-50:10,10,10;--neeto-editor-gray-100:30,30,30;--neeto-editor-gray-200:44,44,44;--neeto-editor-gray-300:57,57,57;--neeto-editor-gray-400:73,73,73;--neeto-editor-gray-500:92,92,92;--neeto-editor-gray-600:124,124,124;--neeto-editor-gray-700:162,162,162;--neeto-editor-gray-800:200,200,200;--neeto-editor-primary-800:0,245,200;--neeto-editor-primary-600:0,224,183;--neeto-editor-primary-500:0,204,167;--neeto-editor-primary-100:0,61,49;--neeto-editor-primary-50:0,41,33;--neeto-editor-accent-800:142,189,245;--neeto-editor-accent-600:105,167,242;--neeto-editor-accent-500:67,144,239;--neeto-editor-accent-100:10,56,113;--neeto-editor-accent-50:7,37,75;--neeto-editor-error-800:247,109,116;--neeto-editor-error-600:236,91,98;--neeto-editor-error-500:227,72,80;--neeto-editor-error-100:129,33,38;--neeto-editor-success-800:0,245,200;--neeto-editor-success-600:0,224,183;--neeto-editor-success-500:0,204,167;--neeto-editor-success-100:0,61,49;--neeto-editor-warning-800:249,164,63;--neeto-editor-warning-600:242,148,35;--neeto-editor-warning-500:230,134,25;--neeto-editor-warning-100:131,74,11;--neeto-editor-info-800:142,189,245;--neeto-editor-info-600:105,167,242;--neeto-editor-info-500:67,144,239;--neeto-editor-info-100:10,56,113;--neeto-editor-pastel-silver:167,168,170;--neeto-editor-pastel-red:183,164,165;--neeto-editor-pastel-yellow:182,175,143;--neeto-editor-pastel-green:152,179,167;--neeto-editor-pastel-blue:170,175,183;--neeto-editor-pastel-purple:171,169,183;--neeto-editor-pastel-pink:181,162,174;--neeto-editor-content-heading-color:224,224,224,1;--neeto-editor-content-paragraph-color:224,224,224,1;--neeto-editor-content-code-background-color:21,27,35,1;--neeto-editor-content-code-line-number-color:89,99,110,1;--neeto-editor-content-code-color:240,246,252,1;--neeto-editor-content-blockquote-color:145,152,161,1;--neeto-editor-content-blockquote-border-color:61,68,77,1}.neeto-ui-theme--dark .neeto-editor-content.neeto-editor-size--small{--neeto-editor-content-heading-color:224,224,224,1;--neeto-editor-content-paragraph-color:224,224,224,1}.neeto-ui-theme--light .neeto-editor-content{--neeto-editor-content-heading-color:12,17,29,1;--neeto-editor-content-paragraph-color:54,55,55,1}.neeto-ui-theme--light .neeto-editor-content.neeto-editor-size--small{--neeto-editor-content-heading-color:31,35,40,1;--neeto-editor-content-paragraph-color:31,35,40,1}.neeto-editor-content{-moz-tab-size:2;-o-tab-size:2;tab-size:2;white-space:pre-wrap;word-break:break-word}.neeto-editor-content hr{border-color:#363737;border-color:rgba(var(--neeto-editor-content-paragraph-color));margin:.5rem 0;opacity:.2}.neeto-editor-content .table-responsive{-webkit-overflow-scrolling:touch;margin:1rem 0;overflow-x:auto}.neeto-editor-content.neeto-editor-size--small{--neeto-editor-content-heading-color:31,35,40,1;--neeto-editor-content-paragraph-color:31,35,40,1;--neeto-editor-content-h1-font-size:1.75rem;--neeto-editor-content-h2-font-size:1.3125rem;--neeto-editor-content-h3-font-size:1.09375rem;--neeto-editor-content-h4-font-size:0.875rem;--neeto-editor-content-h5-font-size:0.765625rem;--neeto-editor-content-h6-font-size:0.74375rem;--neeto-editor-content-paragraph-font-size:0.875rem;--neeto-editor-content-paragraph-line-height:1.5;--neeto-editor-content-list-left-padding:1.5rem;--neeto-editor-content-list-item-margin-bottom:0.25rem;--neeto-editor-content-list-item-margin-top:0.25rem}.neeto-editor-content.neeto-editor-size--medium{--neeto-editor-content-h1-font-size:2rem;--neeto-editor-content-h2-font-size:1.5rem;--neeto-editor-content-h3-font-size:1.25rem;--neeto-editor-content-h4-font-size:1rem;--neeto-editor-content-h5-font-size:0.875rem;--neeto-editor-content-h6-font-size:0.75rem;--neeto-editor-content-paragraph-font-size:1rem}@media only screen and (max-width:767px){.neeto-editor-content.neeto-editor-size--medium{--neeto-editor-content-h1-font-size:1.375rem;--neeto-editor-content-h2-font-size:1.25rem;--neeto-editor-content-h3-font-size:1.125rem}}.neeto-editor-content.neeto-editor-size--large{--neeto-editor-content-h1-font-size:2.375rem;--neeto-editor-content-h2-font-size:1.93rem;--neeto-editor-content-h3-font-size:1.633rem;--neeto-editor-content-h4-font-size:1.336rem;--neeto-editor-content-h5-font-size:0.986rem;--neeto-editor-content-h6-font-size:0.796rem;--neeto-editor-content-paragraph-font-size:1.125rem}@media only screen and (max-width:767px){.neeto-editor-content.neeto-editor-size--large{--neeto-editor-content-h1-font-size:2.125rem;--neeto-editor-content-h2-font-size:1.7266rem;--neeto-editor-content-h3-font-size:1.4609rem;--neeto-editor-content-h4-font-size:1.1953rem;--neeto-editor-content-h5-font-size:0.875rem;--neeto-editor-content-h6-font-size:0.75rem;--neeto-editor-content-paragraph-font-size:1rem}}.neeto-editor-content h1,.neeto-editor-content h2,.neeto-editor-content h3,.neeto-editor-content h4,.neeto-editor-content h5,.neeto-editor-content h6{color:#0c111d;color:rgba(var(--neeto-editor-content-heading-color));font-weight:600;font-weight:var(--neeto-editor-content-heading-font-weight)}.neeto-editor-content h1 strong,.neeto-editor-content h2 strong,.neeto-editor-content h3 strong,.neeto-editor-content h4 strong,.neeto-editor-content h5 strong,.neeto-editor-content h6 strong{font-weight:700!important;font-weight:var(--neeto-editor-content-heading-font-weight-bold)!important}.neeto-editor-content h1{font-size:var(--neeto-editor-content-h1-font-size);margin:1.5rem 0 .25rem;margin:var(--neeto-editor-content-h1-margin)}.neeto-editor-content h2{font-size:var(--neeto-editor-content-h2-font-size);margin:1.5rem 0 .25rem;margin:var(--neeto-editor-content-h2-margin)}.neeto-editor-content h3{font-size:var(--neeto-editor-content-h3-font-size);margin:1.5rem 0 .25rem;margin:var(--neeto-editor-content-h3-margin)}.neeto-editor-content h4{font-size:var(--neeto-editor-content-h4-font-size);margin:1.5rem 0 .25rem;margin:var(--neeto-editor-content-h4-margin)}.neeto-editor-content h5{font-size:var(--neeto-editor-content-h5-font-size);margin:1.5rem 0 .25rem;margin:var(--neeto-editor-content-h5-margin)}.neeto-editor-content h6{font-size:var(--neeto-editor-content-h6-font-size);margin:1.5rem 0 .25rem;margin:var(--neeto-editor-content-h6-margin)}.neeto-editor-content .header-wrapper-link{position:relative}.neeto-editor-content .header-wrapper-link h1,.neeto-editor-content .header-wrapper-link h2,.neeto-editor-content .header-wrapper-link h3,.neeto-editor-content .header-wrapper-link h4,.neeto-editor-content .header-wrapper-link h5,.neeto-editor-content .header-wrapper-link h6{cursor:pointer;transition:color .15s ease-in}.neeto-editor-content .header-wrapper-link .header-link-icon-wrapper{align-items:center;display:flex;height:100%;left:-1.5625rem;opacity:0;position:absolute;transition:opacity .15s ease-in;width:1.5625rem}.neeto-editor-content .header-wrapper-link .header-link-icon-wrapper svg{fill:#006653;fill:rgb(var(--neeto-editor-primary-800));transition:fill .15s ease-in}.neeto-editor-content .header-wrapper-link:hover h1,.neeto-editor-content .header-wrapper-link:hover h2,.neeto-editor-content .header-wrapper-link:hover h3,.neeto-editor-content .header-wrapper-link:hover h4,.neeto-editor-content .header-wrapper-link:hover h5,.neeto-editor-content .header-wrapper-link:hover h6{color:#095aba;color:rgb(var(--neeto-editor-accent-800))}.neeto-editor-content .header-wrapper-link:hover .header-link-icon-wrapper{opacity:1}.neeto-editor-content .header-wrapper-link:hover svg{fill:#095aba;fill:rgb(var(--neeto-editor-accent-800))}.neeto-editor-content p{color:#363737;color:rgba(var(--neeto-editor-content-paragraph-color));font-size:var(--neeto-editor-content-paragraph-font-size);font-weight:400;font-weight:var(--neeto-editor-content-paragraph-font-weight);line-height:1.6;line-height:var(--neeto-editor-content-paragraph-line-height);margin:0}.neeto-editor-content p:empty:after{content:\" \"}.neeto-editor-content p:last-child{margin-bottom:0}.neeto-editor-content p strong{font-weight:600!important}.neeto-editor-content div{color:#363737;color:rgba(var(--neeto-editor-content-paragraph-color));font-size:var(--neeto-editor-content-paragraph-font-size);font-weight:400;font-weight:var(--neeto-editor-content-paragraph-font-weight);line-height:1.6;line-height:var(--neeto-editor-content-paragraph-line-height)}.neeto-editor-content code{background-color:#f6f8fa;background-color:rgba(var(--neeto-editor-content-code-background-color));border-color:#f6f8fa;border-color:rgba(var(--neeto-editor-content-code-background-color));border-radius:3px;border-radius:var(--neeto-editor-rounded-sm);color:#1f2328;color:rgba(var(--neeto-editor-content-code-color));font-family:SFMono-Regular,Menlo,Consolas,PT Mono,Liberation Mono,Courier,monospace;font-size:85%;font-size:var(--neeto-editor-content-code-font-size);padding:.2em .4em;padding:var(--neeto-editor-content-code-padding)}.neeto-editor-content code *{font-size:inherit!important}.neeto-editor-content h1 code,.neeto-editor-content h2 code,.neeto-editor-content h3 code,.neeto-editor-content h4 code,.neeto-editor-content h5 code,.neeto-editor-content h6 code,.neeto-editor-content p code{font-size:85%;font-size:var(--neeto-editor-content-code-font-size)}.neeto-editor-content pre{background-color:#f6f8fa;background-color:rgba(var(--neeto-editor-content-code-background-color));border-color:#f6f8fa;border-color:rgba(var(--neeto-editor-content-code-background-color));border-radius:3px;border-radius:var(--neeto-editor-rounded-sm);counter-reset:line-number;font-size:var(--neeto-editor-content-paragraph-font-size);line-height:1.5;margin-bottom:1rem;margin-top:1rem;max-width:100%;padding:0;position:relative}.neeto-editor-content pre,.neeto-editor-content pre div{color:#1f2328;color:rgba(var(--neeto-editor-content-code-color))}.neeto-editor-content pre .neeto-editor-codeblock-options{align-items:center;display:flex;gap:.25rem;opacity:0;position:absolute;right:.25rem;top:.25rem;visibility:hidden}.neeto-editor-content pre .neeto-editor-codeblock-options__menu{display:flex;flex-direction:column;gap:.25rem}.neeto-editor-content pre .neeto-editor-codeblock-options__input{margin:.25rem}.neeto-editor-content pre:hover .copy-button,.neeto-editor-content pre:hover .neeto-editor-codeblock-options{opacity:1;visibility:visible}.neeto-editor-content pre .copy-button{opacity:0;position:absolute;right:.25rem;top:.25rem;visibility:hidden}.neeto-editor-content pre[data-linenumbers] .highlight-line{padding-left:3.125rem;position:relative}.neeto-editor-content pre[data-linenumbers] .highlight-line:before{align-items:center;color:#59636e;color:rgba(var(--neeto-editor-content-code-line-number-color));content:counter(line-number);counter-increment:line-number;display:flex;font-size:85%;font-weight:400;height:100%;justify-content:flex-end;left:0;padding-left:.625rem;padding-right:1rem;position:absolute;width:3.125rem}.neeto-editor-content pre[data-linenumbers] .highlight-line:last-child:before{content:\"\"}.neeto-editor-content pre>code{background-color:transparent;border-radius:0;border-width:0;color:inherit;display:block;font-size:85%;font-size:var(--neeto-editor-content-code-font-size);font-weight:400;line-height:inherit;overflow-x:auto;padding:.75rem;white-space:pre!important;width:100%}.neeto-editor-content pre[data-linenumbers]>code{padding-left:0}.neeto-editor-content blockquote{border-left-color:#d1d9e0;border-left-color:rgba(var(--neeto-editor-content-blockquote-border-color));border-left-width:4px;border-left-width:var(--neeto-editor-content-blockquote-border-left-width);color:#59636e;color:rgba(var(--neeto-editor-content-blockquote-color));font-weight:500;font-weight:var(--neeto-editor-font-medium);margin-bottom:1rem;margin-bottom:var(--neeto-editor-content-blockquote-margin-bottom);padding-left:.75rem;padding-left:var(--neeto-editor-content-blockquote-padding-left);quotes:\"“\" \"”\" \"‘\" \"’\"}.neeto-editor-content blockquote div,.neeto-editor-content blockquote p{color:inherit}.neeto-editor-content blockquote>p:after,.neeto-editor-content blockquote>p:before{content:\"\"!important}.neeto-editor-content ol,.neeto-editor-content ul{list-style:revert;margin-bottom:1rem;margin-bottom:var(--neeto-editor-content-list-margin-bottom);padding-left:2rem;padding-left:var(--neeto-editor-content-list-left-padding)}.neeto-editor-content ol li,.neeto-editor-content ul li{color:#363737;color:rgba(var(--neeto-editor-content-paragraph-color));font-size:var(--neeto-editor-content-paragraph-font-size);font-weight:400;font-weight:var(--neeto-editor-content-paragraph-font-weight);line-height:1.6;line-height:var(--neeto-editor-content-paragraph-line-height);margin-bottom:.5rem;margin-bottom:var(--neeto-editor-content-list-item-margin-bottom);margin-top:.5rem;margin-top:var(--neeto-editor-content-list-item-margin-top)}.neeto-editor-content ol li:before,.neeto-editor-content ul li:before{background-color:#363737;background-color:rgba(var(--neeto-editor-content-paragraph-color))}.neeto-editor-content a[href]{color:#095aba;color:rgb(var(--neeto-editor-accent-800));font-weight:inherit}.neeto-editor-content .neeto-editor__video-wrapper{display:flex;margin:1rem 0}.neeto-editor-content .neeto-editor__video-wrapper .neeto-editor__video-iframe{display:inline-block;height:auto!important;max-width:100%;vertical-align:top}.neeto-editor-content .neeto-editor__video-wrapper .neeto-editor__video-iframe iframe{aspect-ratio:16/9;width:100%}.neeto-editor-content .neeto-editor__video--left{justify-content:flex-start}.neeto-editor-content .neeto-editor__video--right{justify-content:flex-end}.neeto-editor-content .neeto-editor__video--center{justify-content:center}.neeto-editor-content mark{border-radius:3px;border-radius:var(--neeto-editor-rounded-sm);padding:0}.neeto-editor-content [data-type=mention],.neeto-editor-content [data-type=special-mention]{color:#095aba;color:rgb(var(--neeto-editor-accent-800))}.neeto-editor-content table{border:1px solid #d8dcde;border:1px solid rgba(var(--neeto-editor-gray-300));border-collapse:separate;border-radius:3px;border-radius:var(--neeto-editor-rounded-sm);border-spacing:0;min-width:300px;overflow:hidden;table-layout:fixed}.neeto-editor-content table td,.neeto-editor-content table th{border-left:1px solid #d8dcde;border-left:1px solid rgba(var(--neeto-editor-gray-300));border-top:1px solid #d8dcde;border-top:1px solid rgba(var(--neeto-editor-gray-300));padding:8px 12px;position:relative}.neeto-editor-content table td:first-child,.neeto-editor-content table th:first-child{border-left:none}.neeto-editor-content table th{background:#f6f7f8;background:rgb(var(--neeto-editor-gray-100));border-top:none}.neeto-editor-content table td{background:#fff;background:rgb(var(--neeto-editor-white))}.neeto-editor-content--hidden{display:none}.neeto-editor__image-wrapper{color:inherit!important;display:flex;font-weight:400!important;margin:1rem 0;padding-left:3px;text-decoration:none}.neeto-editor__image-wrapper figure{cursor:pointer;display:inline-block;margin:0;max-width:100%;overflow:hidden;position:relative;vertical-align:top}.neeto-editor__image-wrapper .neeto-editor__image{display:inline-block;height:auto!important;max-width:100%;min-height:52px;vertical-align:top}.neeto-editor__image-wrapper .neeto-editor__image img,.neeto-editor__image-wrapper .neeto-editor__image video{display:inline-block;height:auto;vertical-align:top!important;width:100%}.neeto-editor__image-wrapper .neeto-editor__image img.hidden,.neeto-editor__image-wrapper .neeto-editor__image video.hidden{display:none}.neeto-editor__image-wrapper .neeto-editor__image img{border:1px solid #e4e4e7;border-color:rgba(var(--neeto-editor-content-image-border-color));border-radius:8px;border-radius:var(--neeto-editor-content-image-border-radius);cursor:zoom-in}.neeto-editor__image-wrapper .neeto-editor__image-placeholder{align-items:center;border:1px solid;border-radius:8px;display:flex;height:200px;justify-content:center;width:400px}.neeto-editor__image-wrapper figcaption div{color:#344054;color:rgb(var(--neeto-editor-gray-600));font-size:.875rem;font-weight:400;font-weight:var(--neeto-editor-font-normal);line-height:1.4;text-align:center}.neeto-editor__image-wrapper figcaption div a{display:inline-block;margin:0;text-align:center}.neeto-editor__image-wrapper figcaption.is-empty div:before{color:#87929d;color:rgb(var(--neeto-editor-gray-500));content:\"Add a caption\";inset:0;position:absolute}.neeto-editor__image-wrapper:has(img:not([src])){display:none}.neeto-editor-content figcaption{color:#6b7280;font-size:.875rem;font-weight:400;line-height:1.4;max-width:100%;text-align:center}.neeto-editor__image--left{justify-content:flex-start}.neeto-editor__image--center{justify-content:center}.neeto-editor__image--right{justify-content:flex-end}.selected-text{background-color:#d8dcde;background-color:rgb(var(--neeto-editor-gray-300));padding:2px 0}.ne-image-preview-wrapper{align-items:center;background:rgba(16,24,40,.5);background:rgba(var(--neeto-editor-gray-800),.5);display:none;height:100%;justify-content:center;left:0;position:fixed;top:0;width:100%;z-index:999999}.ne-image-preview-wrapper.active{display:flex}.ne-image-preview-wrapper .ne-image-preview{background:#fff;background:rgb(var(--neeto-editor-white));display:flex;flex-direction:column;gap:10px;max-height:90vh;max-width:60vw;opacity:0;transition:opacity .1s ease-in-out}.ne-image-preview-wrapper .ne-image-preview img{background:#fff;background:rgb(var(--neeto-editor-white));max-height:100%;max-width:100%;-o-object-fit:contain;object-fit:contain;overflow:hidden;padding:10px;width:-moz-fit-content;width:fit-content}.ne-image-preview-wrapper .ne-image-preview.image-loaded{align-items:center;background:transparent;border-radius:10px;display:flex;opacity:1}.ne-image-preview-wrapper .ne-image-preview__caption{color:#101828;color:rgb(var(--neeto-editor-gray-800));line-height:1.5;margin-top:auto;text-align:center;width:100%}.ne-image-preview-wrapper .close-button{align-items:center;background-color:#fff;background-color:rgb(var(--neeto-editor-white));border-radius:999px;border-radius:var(--neeto-editor-rounded-full);cursor:pointer;display:flex;height:30px;justify-content:center;position:absolute;right:12px;top:12px;width:30px}.ne-image-preview-wrapper .image-preview{max-height:70%;max-width:70%}.ne-image-preview-wrapper__spinner{position:absolute}.ne-image-preview-wrapper__spinner i{background-color:#d8dcde;background-color:rgb(var(--neeto-editor-gray-300))}";
26
26
  n(css,{});
@@ -79,12 +79,11 @@ import '@bigbinary/neetoui/Checkbox';
79
79
  import '@bigbinary/neeto-icons/MenuHorizontal';
80
80
  import '@tippyjs/react';
81
81
  import '@bigbinary/neeto-icons/File';
82
- import 'react-dom/server';
83
- import './chunk-BeW6s4Si.js';
84
- import './chunk-GwDLPLDQ.js';
85
82
  import 'yjs';
86
83
  import '@bigbinary/neeto-icons/Down';
87
84
  import '@bigbinary/neeto-molecules/CopyToClipboardButton';
85
+ import './chunk-DBch3tqq.js';
86
+ import './chunk-LjMXcuRe.js';
88
87
  import '@bigbinary/neeto-icons/Paragraph';
89
88
  import '@bigbinary/neeto-icons/TextH1';
90
89
  import '@bigbinary/neeto-icons/TextH2';
@@ -1 +1 @@
1
- {"version":3,"file":"FormikEditor.js","sources":["../src/components/Editor/FormikEditor.jsx"],"sourcesContent":["import { forwardRef, memo } from \"react\";\n\nimport { FastField } from \"formik\";\nimport { noop } from \"neetocist\";\n\nimport Editor from \".\";\n\nconst FormikEditor = (\n {\n name,\n onChange = noop,\n shouldUpdate,\n attachments = [],\n mentions = [],\n variables = [],\n ...otherProps\n },\n ref\n) => {\n // Similar to the `shouldComponentUpdate` logic of FastField component.\n // https://github.com/jaredpalmer/formik/blob/main/packages/formik/src/FastField.tsx#L75-L93\n // Additionally calls the shouldUpdate function passed from the host application and compares to\n // the rest of the values.\n const internalShouldUpdate = (prevProps, nextProps) => {\n const prevFormikProps = prevProps.formik;\n const nextFormikProps = nextProps.formik;\n\n return (\n prevFormikProps.errors[name] !== nextFormikProps.errors[name] ||\n prevFormikProps.touched[name] !== nextFormikProps.touched[name] ||\n Object.keys(nextProps).length !== Object.keys(prevProps).length ||\n prevFormikProps.isSubmitting !== nextFormikProps.isSubmitting ||\n Boolean(shouldUpdate?.(prevProps, nextProps))\n );\n };\n\n return (\n <FastField\n {...{ attachments, mentions, name, variables }}\n shouldUpdate={internalShouldUpdate}\n >\n {({ field, form, meta }) => (\n <Editor\n {...{ attachments, mentions, name, ref, variables }}\n error={meta.touched ? meta.error : \"\"}\n initialValue={field.value}\n onBlur={() => {\n form.setFieldTouched(name, true);\n }}\n onChange={value => {\n form.setFieldValue(name, value);\n onChange?.(value);\n }}\n {...otherProps}\n />\n )}\n </FastField>\n );\n};\n\nFormikEditor.displayName = \"FormikNeetoEditor\";\n\nexport default memo(forwardRef(FormikEditor));\n"],"names":["FormikEditor","_ref","ref","name","_ref$onChange","onChange","noop","shouldUpdate","_ref$attachments","attachments","_ref$mentions","mentions","_ref$variables","variables","otherProps","_objectWithoutProperties","_excluded","internalShouldUpdate","prevProps","nextProps","prevFormikProps","formik","nextFormikProps","errors","touched","Object","keys","length","isSubmitting","Boolean","_jsx","FastField","children","_ref2","field","form","meta","Editor","_objectSpread","error","initialValue","value","onBlur","setFieldTouched","setFieldValue","displayName","memo","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAMA,YAAY,GAAG,SAAfA,YAAYA,CAAAC,IAAA,EAUhBC,GAAG,EACA;AAAA,EAAA,IATDC,IAAI,GAAAF,IAAA,CAAJE,IAAI;IAAAC,aAAA,GAAAH,IAAA,CACJI,QAAQ;AAARA,IAAAA,SAAQ,GAAAD,aAAA,KAAGE,KAAAA,CAAAA,GAAAA,IAAI,GAAAF,aAAA;IACfG,YAAY,GAAAN,IAAA,CAAZM,YAAY;IAAAC,gBAAA,GAAAP,IAAA,CACZQ,WAAW;AAAXA,IAAAA,WAAW,GAAAD,gBAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,gBAAA;IAAAE,aAAA,GAAAT,IAAA,CAChBU,QAAQ;AAARA,IAAAA,QAAQ,GAAAD,aAAA,KAAG,KAAA,CAAA,G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AK,GAAAD,KAAA,CAALC,KAAK;QAAEC,IAAI,GAAAF,KAAA,CAAJE,IAAI;QAAEC,IAAI,GAAAH,KAAA,CAAJG,IAAI,CAAA;AAAA,MAAA,oBACnBN,GAAA,CAACO,MAAM,EAAAC,aAAA,CAAA;AACC7B,QAAAA,WAAW,EAAXA,WAAW;AAAEE,QAAAA,QAAQ,EAARA,QAAQ;AAAER,QAAAA,IAAI,EAAJA,IAAI;AAAED,QAAAA,GAAG,EAAHA,GAAG;AAAEW,QAAAA,SAAS,EAATA,SAAS;QACjD0B,KAAK,EAAEH,IAAI,CAACZ,OAAO,GAAGY,IAAI,CAACG,KAAK,GAAG,EAAG;QACtCC,YAAY,EAAEN,KAAK,CAACO,KAAM;QAC1BC,MAAM,EAAE,SAAAA,MAAAA,GAAM;AACZP,UAAAA,IAAI,CAACQ,eAAe,CAACxC,IAAI,EAAE,IAAI,CAAC,CAAA;SAChC;AACFE,QAAAA,QAAQ,EAAE,SAAAA,QAAAoC,CAAAA,KAAK,EAAI;AACjBN,UAAAA,IAAI,CAACS,aAAa,CAACzC,IAAI,EAAEsC,KAAK,CAAC,CAAA;AAC/BpC,UAAAA,SAAQ,aAARA,SAAQ,KAAA,KAAA,CAAA,IAARA,SAAQ,CAAGoC,KAAK,CAAC,CAAA;AACnB,SAAA;OACI3B,EAAAA,UAAU,CACf,CAAC,CAAA;AAAA,KAAA;AACH,GACQ,CAAC,CAAA;AAEhB,CAAC,CAAA;AAEDd,YAAY,CAAC6C,WAAW,GAAG,mBAAmB,CAAA;AAE9C,qBAAA,aAAeC,IAAI,eAACC,UAAU,CAAC/C,YAAY,CAAC,CAAC;;;;"}
1
+ {"version":3,"file":"FormikEditor.js","sources":["../src/components/Editor/FormikEditor.jsx"],"sourcesContent":["import { forwardRef, memo } from \"react\";\n\nimport { FastField } from \"formik\";\nimport { noop } from \"neetocist\";\n\nimport Editor from \".\";\n\nconst FormikEditor = (\n {\n name,\n onChange = noop,\n shouldUpdate,\n attachments = [],\n mentions = [],\n variables = [],\n ...otherProps\n },\n ref\n) => {\n // Similar to the `shouldComponentUpdate` logic of FastField component.\n // https://github.com/jaredpalmer/formik/blob/main/packages/formik/src/FastField.tsx#L75-L93\n // Additionally calls the shouldUpdate function passed from the host application and compares to\n // the rest of the values.\n const internalShouldUpdate = (prevProps, nextProps) => {\n const prevFormikProps = prevProps.formik;\n const nextFormikProps = nextProps.formik;\n\n return (\n prevFormikProps.errors[name] !== nextFormikProps.errors[name] ||\n prevFormikProps.touched[name] !== nextFormikProps.touched[name] ||\n Object.keys(nextProps).length !== Object.keys(prevProps).length ||\n prevFormikProps.isSubmitting !== nextFormikProps.isSubmitting ||\n Boolean(shouldUpdate?.(prevProps, nextProps))\n );\n };\n\n return (\n <FastField\n {...{ attachments, mentions, name, variables }}\n shouldUpdate={internalShouldUpdate}\n >\n {({ field, form, meta }) => (\n <Editor\n {...{ attachments, mentions, name, ref, variables }}\n error={meta.touched ? meta.error : \"\"}\n initialValue={field.value}\n onBlur={() => {\n form.setFieldTouched(name, true);\n }}\n onChange={value => {\n form.setFieldValue(name, value);\n onChange?.(value);\n }}\n {...otherProps}\n />\n )}\n </FastField>\n );\n};\n\nFormikEditor.displayName = \"FormikNeetoEditor\";\n\nexport default memo(forwardRef(FormikEditor));\n"],"names":["FormikEditor","_ref","ref","name","_ref$onChange","onChange","noop","shouldUpdate","_ref$attachments","attachments","_ref$mentions","mentions","_ref$variables","variables","otherProps","_objectWithoutProperties","_excluded","internalShouldUpdate","prevProps","nextProps","prevFormikProps","formik","nextFormikProps","errors","touched","Object","keys","length","isSubmitting","Boolean","_jsx","FastField","children","_ref2","field","form","meta","Editor","_objectSpread","error","initialValue","value","onBlur","setFieldTouched","setFieldValue","displayName","memo","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAOA,IAAM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A,KAAA,CAAA,IAARA,SAAQ,CAAGoC,KAAK,CAAC,CAAA;AACnB,SAAA;OACI3B,EAAAA,UAAU,CACf,CAAC,CAAA;AAAA,KAAA;AACH,GACQ,CAAC,CAAA;AAEhB,CAAC,CAAA;AAEDd,YAAY,CAAC6C,WAAW,GAAG,mBAAmB,CAAA;AAE9C,qBAAA,aAAeC,IAAI,eAACC,UAAU,CAAC/C,YAAY,CAAC,CAAC;;;;"}
@@ -1,8 +1,5 @@
1
1
  import { isNotPresent } from '@bigbinary/neeto-cist';
2
-
3
- var NON_EMPTY_TAGS = ["img", "iframe"];
4
- var MARGIN_HEIGHT = 8;
5
- var EMPTY_TAGS_TO_REMOVE = ["p", "h1", "h2", "h3", "h4", "h5", "h6", "br"];
2
+ import { N as NON_EMPTY_TAGS, E as EMPTY_TAGS_TO_REMOVE } from './chunk-LjMXcuRe.js';
6
3
 
7
4
  var removeTagsStart = function removeTagsStart(node) {
8
5
  while (node.firstChild && EMPTY_TAGS_TO_REMOVE.includes((_node$firstChild$tagN = node.firstChild.tagName) === null || _node$firstChild$tagN === void 0 ? void 0 : _node$firstChild$tagN.toLowerCase())) {
@@ -58,5 +55,5 @@ var isEditorContentWithinLimit = function isEditorContentWithinLimit(htmlContent
58
55
  return isLengthWithinLimit;
59
56
  };
60
57
 
61
- export { MARGIN_HEIGHT as M, isEditorContentWithinLimit as a, isEditorEmpty as i, removeEmptyTags as r };
62
- //# sourceMappingURL=chunk-GwDLPLDQ.js.map
58
+ export { isEditorContentWithinLimit as a, isEditorEmpty as i, removeEmptyTags as r };
59
+ //# sourceMappingURL=chunk-B88REGV6.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"chunk-B88REGV6.js","sources":["../src/utils/common.js"],"sourcesContent":["import { isNotPresent } from \"neetocist\";\n\nimport { EMPTY_TAGS_TO_REMOVE, NON_EMPTY_TAGS } from \"./constants\";\n\nconst removeTagsStart = node => {\n while (\n node.firstChild &&\n EMPTY_TAGS_TO_REMOVE.includes(node.firstChild.tagName?.toLowerCase())\n ) {\n if (!node.firstChild.innerHTML) {\n node.firstChild.remove();\n } else {\n removeTagsStart(node.firstChild);\n if (node.firstChild.innerHTML) {\n break;\n }\n }\n }\n};\n\nconst removeTagsEnd = node => {\n while (\n node.lastChild &&\n EMPTY_TAGS_TO_REMOVE.includes(node.lastChild.tagName?.toLowerCase())\n ) {\n if (!node.lastChild.innerHTML) {\n node.lastChild.remove();\n } else {\n removeTagsEnd(node.lastChild);\n if (node.lastChild.innerHTML) {\n break;\n }\n }\n }\n};\n\nexport const removeEmptyTags = html => {\n const tempDiv = document.createElement(\"div\");\n tempDiv.innerHTML = html;\n\n removeTagsStart(tempDiv);\n removeTagsEnd(tempDiv);\n\n return tempDiv.innerHTML;\n};\n\nexport const isEditorEmpty = htmlContent => {\n if (isNotPresent(htmlContent)) return true;\n\n if (NON_EMPTY_TAGS.some(tag => htmlContent.includes(tag))) return false;\n\n const element = document.createElement(\"div\");\n element.innerHTML = htmlContent;\n const editorIsEmpty = isNotPresent(element.textContent?.trim());\n element.remove();\n\n return editorIsEmpty;\n};\n\nexport const isEditorContentWithinLimit = (htmlContent, maxLength) => {\n if (isNotPresent(htmlContent)) return true;\n\n const element = document.createElement(\"div\");\n element.innerHTML = htmlContent;\n const isLengthWithinLimit = element.textContent.length <= maxLength;\n element.remove();\n\n return isLengthWithinLimit;\n};\n"],"names":["removeTagsStart","node","firstChild","EMPTY_TAGS_TO_REMOVE","includes","_node$firstChild$tagN","tagName","toLowerCase","innerHTML","remove","removeTagsEnd","lastChild","_node$lastChild$tagNa","removeEmptyTags","html","tempDiv","document","createElement","isEditorEmpty","htmlContent","_element$textContent","isNotPresent","NON_EMPTY_TAGS","some","tag","element","editorIsEmpty","textContent","trim","isEditorContentWithinLimit","maxLength","isLengthWithinLimit","length"],"mappings":";;;AAIA,IAAMA,eAAe,GAAG,SAAlBA,eAAeA,CAAGC,IAAI,EAAI;EAC9B,OACEA,IAAI,CAACC,UAAU,IACfC,oB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ACjB,SAAS,GAAGW,WAAW,CAAA;EAC/B,IAAMY,mBAAmB,GAAGN,OAAO,CAACE,WAAW,CAACK,MAAM,IAAIF,SAAS,CAAA;EACnEL,OAAO,CAAChB,MAAM,EAAE,CAAA;AAEhB,EAAA,OAAOsB,mBAAmB,CAAA;AAC5B;;;;"}
@@ -1,9 +1,10 @@
1
1
  import { createElement } from 'react';
2
2
  import { g as getDefaultExportFromCjs } from './chunk-D86RZ044.js';
3
- import { c as core, V as VARIABLE_SPAN_REGEX, l as lowlight, C as CODE_BLOCK_REGEX, L as LANGUAGE_LIST } from './chunk-BeW6s4Si.js';
3
+ import { c as core, l as lowlight } from './chunk-DBch3tqq.js';
4
4
  import { findBy } from '@bigbinary/neeto-cist';
5
5
  import { isEmpty } from 'ramda';
6
6
  import { renderToString } from 'react-dom/server';
7
+ import _toConsumableArray from '@babel/runtime/helpers/toConsumableArray';
7
8
 
8
9
  /*
9
10
  Language: HTML, XML
@@ -12510,6 +12511,18 @@ var common = hljs;
12510
12511
 
12511
12512
  var HighlightJS = /*@__PURE__*/getDefaultExportFromCjs(common);
12512
12513
 
12514
+ var EDITOR_CONTENT_CLASS_NAME = "neeto-editor-content";
12515
+ var SANITIZE_OPTIONS = {
12516
+ ADD_TAGS: ["iframe"],
12517
+ ADD_ATTR: ["target", "allow", "allowfullscreen", "frameborder"]
12518
+ };
12519
+ var CODE_BLOCK_REGEX = /<pre(?:\s+[^>]+)?><code(?:\s+class="language-([^"]*)")?>([\S\s]*?)<\/code><\/pre>/gim;
12520
+ var VARIABLE_SPAN_REGEX = /<span data-variable="" [^>]*data-label="([^"]+)">{{([^}]+)}}<\/span>/g;
12521
+ var LANGUAGE_LIST = [].concat(_toConsumableArray(lowlight.listLanguages()), ["html"]);
12522
+ var EDITOR_CONTENT_DEFAULT_CONFIGURATION = {
12523
+ enableHeaderLinks: false
12524
+ };
12525
+
12513
12526
  function _createForOfIteratorHelper(o, allowArrayLike) { var it = typeof Symbol !== "undefined" && o[Symbol.iterator] || o["@@iterator"]; if (!it) { if (Array.isArray(o) || (it = _unsupportedIterableToArray(o)) || allowArrayLike) { if (it) o = it; var i = 0; var F = function F() {}; return { s: F, n: function n() { if (i >= o.length) return { done: true }; return { done: false, value: o[i++] }; }, e: function e(_e) { throw _e; }, f: F }; } throw new TypeError("Invalid attempt to iterate non-iterable instance.\nIn order to be iterable, non-array objects must have a [Symbol.iterator]() method."); } var normalCompletion = true, didErr = false, err; return { s: function s() { it = it.call(o); }, n: function n() { var step = it.next(); normalCompletion = step.done; return step; }, e: function e(_e2) { didErr = true; err = _e2; }, f: function f() { try { if (!normalCompletion && it["return"] != null) it["return"](); } finally { if (didErr) throw err; } } }; }
12514
12527
  function _unsupportedIterableToArray(o, minLen) { if (!o) return; if (typeof o === "string") return _arrayLikeToArray(o, minLen); var n = Object.prototype.toString.call(o).slice(8, -1); if (n === "Object" && o.constructor) n = o.constructor.name; if (n === "Map" || n === "Set") return Array.from(o); if (n === "Arguments" || /^(?:Ui|I)nt(?:8|16|32)(?:Clamped)?Array$/.test(n)) return _arrayLikeToArray(o, minLen); }
12515
12528
  function _arrayLikeToArray(arr, len) { if (len == null || len > arr.length) len = arr.length; for (var i = 0, arr2 = new Array(len); i < len; i++) arr2[i] = arr[i]; return arr2; }
@@ -12629,5 +12642,5 @@ var substituteVariables = function substituteVariables(highlightedContent, varia
12629
12642
  });
12630
12643
  };
12631
12644
 
12632
- export { applySyntaxHighlightingAndLineNumbers as a, applyLineHighlighting as b, substituteVariables as s };
12633
- //# sourceMappingURL=chunk-CGoAVMwz.js.map
12645
+ export { EDITOR_CONTENT_CLASS_NAME as E, SANITIZE_OPTIONS as S, applySyntaxHighlightingAndLineNumbers as a, applyLineHighlighting as b, EDITOR_CONTENT_DEFAULT_CONFIGURATION as c, substituteVariables as s };
12646
+ //# sourceMappingURL=chunk-CDBSVHz6.js.map