@bigbinary/neeto-editor 1.45.15 → 1.45.16
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.
- package/dist/Editor.js +3 -11
- package/dist/Editor.js.map +1 -1
- package/dist/EditorContent.js +3 -3
- package/dist/FormikEditor.js +2 -3
- package/dist/FormikEditor.js.map +1 -1
- package/dist/{chunk-GwDLPLDQ.js → chunk-B88REGV6.js} +3 -6
- package/dist/chunk-B88REGV6.js.map +1 -0
- package/dist/{chunk-CGoAVMwz.js → chunk-CDBSVHz6.js} +16 -3
- package/dist/chunk-CDBSVHz6.js.map +1 -0
- package/dist/{chunk-BeW6s4Si.js → chunk-DBch3tqq.js} +2 -15
- package/dist/chunk-DBch3tqq.js.map +1 -0
- package/dist/chunk-LjMXcuRe.js +6 -0
- package/dist/chunk-LjMXcuRe.js.map +1 -0
- package/dist/cjs/Editor.cjs.js +7 -15
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/cjs/EditorContent.cjs.js +8 -8
- package/dist/cjs/FormikEditor.cjs.js +2 -3
- package/dist/cjs/FormikEditor.cjs.js.map +1 -1
- package/dist/cjs/{chunk-CjXcHxqY.cjs.js → chunk-BIff7Ppc.cjs.js} +25 -9
- package/dist/cjs/chunk-BIff7Ppc.cjs.js.map +1 -0
- package/dist/cjs/chunk-DN1S-KLQ.cjs.js +10 -0
- package/dist/cjs/chunk-DN1S-KLQ.cjs.js.map +1 -0
- package/dist/cjs/{chunk-B0S9scli.cjs.js → chunk-Dh0stJ0O.cjs.js} +1 -20
- package/dist/cjs/chunk-Dh0stJ0O.cjs.js.map +1 -0
- package/dist/cjs/{chunk-3eBSLfI7.cjs.js → chunk-a-cnTJIr.cjs.js} +5 -9
- package/dist/cjs/chunk-a-cnTJIr.cjs.js.map +1 -0
- package/dist/cjs/index.cjs.js +5 -4
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/cjs/utils.cjs.js +5 -4
- package/dist/cjs/utils.cjs.js.map +1 -1
- package/dist/editor-stats.html +1 -1
- package/dist/index.js +5 -4
- package/dist/index.js.map +1 -1
- package/dist/utils.js +5 -4
- package/dist/utils.js.map +1 -1
- package/package.json +1 -1
- package/dist/chunk-BeW6s4Si.js.map +0 -1
- package/dist/chunk-CGoAVMwz.js.map +0 -1
- package/dist/chunk-GwDLPLDQ.js.map +0 -1
- package/dist/cjs/chunk-3eBSLfI7.cjs.js.map +0 -1
- package/dist/cjs/chunk-B0S9scli.cjs.js.map +0 -1
- package/dist/cjs/chunk-CjXcHxqY.cjs.js.map +0 -1
|
@@ -11,7 +11,7 @@ var ramda = require('ramda');
|
|
|
11
11
|
var client = require('react-dom/client');
|
|
12
12
|
var _commonjsHelpers = require('./chunk-CGaZRQZu.cjs.js');
|
|
13
13
|
var injectCss = require('./chunk-vQvjPR2x.cjs.js');
|
|
14
|
-
var index$
|
|
14
|
+
var index$1 = require('./chunk-BIff7Ppc.cjs.js');
|
|
15
15
|
var reactUtils = require('@bigbinary/neeto-commons-frontend/react-utils');
|
|
16
16
|
var Close = require('@bigbinary/neeto-icons/Close');
|
|
17
17
|
var Button = require('@bigbinary/neetoui/Button');
|
|
@@ -19,10 +19,10 @@ var Spinner = require('@bigbinary/neetoui/Spinner');
|
|
|
19
19
|
var ReactDOM = require('react-dom');
|
|
20
20
|
var reactI18next = require('react-i18next');
|
|
21
21
|
var jsxRuntime = require('react/jsx-runtime');
|
|
22
|
-
|
|
23
|
-
require('@babel/runtime/helpers/toConsumableArray');
|
|
22
|
+
require('./chunk-Dh0stJ0O.cjs.js');
|
|
24
23
|
require('@bigbinary/neeto-cist');
|
|
25
24
|
require('react-dom/server');
|
|
25
|
+
require('@babel/runtime/helpers/toConsumableArray');
|
|
26
26
|
|
|
27
27
|
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))}";
|
|
28
28
|
injectCss.n(css,{});
|
|
@@ -134,7 +134,7 @@ var EditorContent = function EditorContent(_ref) {
|
|
|
134
134
|
_ref$size = _ref.size,
|
|
135
135
|
size = _ref$size === void 0 ? _commonjsHelpers.EDITOR_SIZES.SMALL : _ref$size,
|
|
136
136
|
_ref$configuration = _ref.configuration,
|
|
137
|
-
configuration = _ref$configuration === void 0 ? index$
|
|
137
|
+
configuration = _ref$configuration === void 0 ? index$1.EDITOR_CONTENT_DEFAULT_CONFIGURATION : _ref$configuration,
|
|
138
138
|
otherProps = _objectWithoutProperties(_ref, _excluded);
|
|
139
139
|
var _useState = React.useState(null),
|
|
140
140
|
_useState2 = _slicedToArray(_useState, 2),
|
|
@@ -145,7 +145,7 @@ var EditorContent = function EditorContent(_ref) {
|
|
|
145
145
|
var sanitize = DOMPurify.sanitize;
|
|
146
146
|
var injectCopyButtonToCodeBlocks = function injectCopyButtonToCodeBlocks() {
|
|
147
147
|
var _editorContentRef$cur;
|
|
148
|
-
var preTags = (_editorContentRef$cur = editorContentRef.current) === null || _editorContentRef$cur === void 0 ? void 0 : _editorContentRef$cur.querySelectorAll(".".concat(index$
|
|
148
|
+
var preTags = (_editorContentRef$cur = editorContentRef.current) === null || _editorContentRef$cur === void 0 ? void 0 : _editorContentRef$cur.querySelectorAll(".".concat(index$1.EDITOR_CONTENT_CLASS_NAME, " pre"));
|
|
149
149
|
preTags.forEach(function (preTag) {
|
|
150
150
|
var button = document.createElement("div");
|
|
151
151
|
button.className = "neeto-editor-codeblock-options";
|
|
@@ -160,7 +160,7 @@ var EditorContent = function EditorContent(_ref) {
|
|
|
160
160
|
};
|
|
161
161
|
var bindImageClickListener = function bindImageClickListener() {
|
|
162
162
|
var _editorContentRef$cur2;
|
|
163
|
-
var figureTags = (_editorContentRef$cur2 = editorContentRef.current) === null || _editorContentRef$cur2 === void 0 ? void 0 : _editorContentRef$cur2.querySelectorAll(".".concat(index$
|
|
163
|
+
var figureTags = (_editorContentRef$cur2 = editorContentRef.current) === null || _editorContentRef$cur2 === void 0 ? void 0 : _editorContentRef$cur2.querySelectorAll(".".concat(index$1.EDITOR_CONTENT_CLASS_NAME, " figure"));
|
|
164
164
|
figureTags.forEach(function (figureTag) {
|
|
165
165
|
var image = figureTag.querySelector("img");
|
|
166
166
|
var link = figureTag.querySelector("a");
|
|
@@ -185,9 +185,9 @@ var EditorContent = function EditorContent(_ref) {
|
|
|
185
185
|
children: [/*#__PURE__*/jsxRuntime.jsx("div", _objectSpread({
|
|
186
186
|
"data-cy": "neeto-editor-content",
|
|
187
187
|
ref: editorContentRef,
|
|
188
|
-
className: classnames(index$
|
|
188
|
+
className: classnames(index$1.EDITOR_CONTENT_CLASS_NAME, _defineProperty(_defineProperty({}, className, className), "neeto-editor-size--".concat(size), true)),
|
|
189
189
|
dangerouslySetInnerHTML: {
|
|
190
|
-
__html: sanitize(htmlContent, index$
|
|
190
|
+
__html: sanitize(htmlContent, index$1.SANITIZE_OPTIONS)
|
|
191
191
|
}
|
|
192
192
|
}, otherProps)), imagePreviewDetails && /*#__PURE__*/jsxRuntime.jsx(ImagePreview, {
|
|
193
193
|
imagePreviewDetails: imagePreviewDetails,
|
|
@@ -81,12 +81,11 @@ require('@bigbinary/neetoui/Checkbox');
|
|
|
81
81
|
require('@bigbinary/neeto-icons/MenuHorizontal');
|
|
82
82
|
require('@tippyjs/react');
|
|
83
83
|
require('@bigbinary/neeto-icons/File');
|
|
84
|
-
require('react-dom/server');
|
|
85
|
-
require('./chunk-B0S9scli.cjs.js');
|
|
86
|
-
require('./chunk-3eBSLfI7.cjs.js');
|
|
87
84
|
require('yjs');
|
|
88
85
|
require('@bigbinary/neeto-icons/Down');
|
|
89
86
|
require('@bigbinary/neeto-molecules/CopyToClipboardButton');
|
|
87
|
+
require('./chunk-Dh0stJ0O.cjs.js');
|
|
88
|
+
require('./chunk-DN1S-KLQ.cjs.js');
|
|
90
89
|
require('@bigbinary/neeto-icons/Paragraph');
|
|
91
90
|
require('@bigbinary/neeto-icons/TextH1');
|
|
92
91
|
require('@bigbinary/neeto-icons/TextH2');
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"FormikEditor.cjs.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":"
|
|
1
|
+
{"version":3,"file":"FormikEditor.cjs.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":"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"}
|
|
@@ -2,10 +2,11 @@
|
|
|
2
2
|
|
|
3
3
|
var React = require('react');
|
|
4
4
|
var _commonjsHelpers = require('./chunk-CGaZRQZu.cjs.js');
|
|
5
|
-
var
|
|
5
|
+
var common$1 = require('./chunk-Dh0stJ0O.cjs.js');
|
|
6
6
|
var neetoCist = require('@bigbinary/neeto-cist');
|
|
7
7
|
var ramda = require('ramda');
|
|
8
8
|
var server = require('react-dom/server');
|
|
9
|
+
var _toConsumableArray = require('@babel/runtime/helpers/toConsumableArray');
|
|
9
10
|
|
|
10
11
|
/*
|
|
11
12
|
Language: HTML, XML
|
|
@@ -12467,7 +12468,7 @@ function requireWasm () {
|
|
|
12467
12468
|
return wasm_1;
|
|
12468
12469
|
}
|
|
12469
12470
|
|
|
12470
|
-
var hljs =
|
|
12471
|
+
var hljs = common$1.core;
|
|
12471
12472
|
|
|
12472
12473
|
hljs.registerLanguage('xml', requireXml());
|
|
12473
12474
|
hljs.registerLanguage('bash', requireBash());
|
|
@@ -12512,6 +12513,18 @@ var common = hljs;
|
|
|
12512
12513
|
|
|
12513
12514
|
var HighlightJS = /*@__PURE__*/_commonjsHelpers.getDefaultExportFromCjs(common);
|
|
12514
12515
|
|
|
12516
|
+
var EDITOR_CONTENT_CLASS_NAME = "neeto-editor-content";
|
|
12517
|
+
var SANITIZE_OPTIONS = {
|
|
12518
|
+
ADD_TAGS: ["iframe"],
|
|
12519
|
+
ADD_ATTR: ["target", "allow", "allowfullscreen", "frameborder"]
|
|
12520
|
+
};
|
|
12521
|
+
var CODE_BLOCK_REGEX = /<pre(?:\s+[^>]+)?><code(?:\s+class="language-([^"]*)")?>([\S\s]*?)<\/code><\/pre>/gim;
|
|
12522
|
+
var VARIABLE_SPAN_REGEX = /<span data-variable="" [^>]*data-label="([^"]+)">{{([^}]+)}}<\/span>/g;
|
|
12523
|
+
var LANGUAGE_LIST = [].concat(_toConsumableArray(common$1.lowlight.listLanguages()), ["html"]);
|
|
12524
|
+
var EDITOR_CONTENT_DEFAULT_CONFIGURATION = {
|
|
12525
|
+
enableHeaderLinks: false
|
|
12526
|
+
};
|
|
12527
|
+
|
|
12515
12528
|
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; } } }; }
|
|
12516
12529
|
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); }
|
|
12517
12530
|
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; }
|
|
@@ -12573,19 +12586,19 @@ var highlightLinesElement = function highlightLinesElement(code, options) {
|
|
|
12573
12586
|
highlightLinesCode(code, options);
|
|
12574
12587
|
};
|
|
12575
12588
|
var applySyntaxHighlightingAndLineNumbers = function applySyntaxHighlightingAndLineNumbers(content) {
|
|
12576
|
-
|
|
12589
|
+
common$1.lowlight.highlightAuto("");
|
|
12577
12590
|
var highlightedAST = {};
|
|
12578
|
-
return content.replace(
|
|
12591
|
+
return content.replace(CODE_BLOCK_REGEX, function (_, language, code) {
|
|
12579
12592
|
var _highlightMatch$;
|
|
12580
12593
|
var highlightRegex = /data-highlighted-lines="([^"]*)"/;
|
|
12581
12594
|
var linenumbersRegex = /data-linenumbers/;
|
|
12582
12595
|
var highlightMatch = content.match(highlightRegex);
|
|
12583
|
-
if (language &&
|
|
12584
|
-
highlightedAST =
|
|
12596
|
+
if (language && LANGUAGE_LIST.includes(language)) {
|
|
12597
|
+
highlightedAST = common$1.lowlight.highlight(language, transformCode(code));
|
|
12585
12598
|
} else {
|
|
12586
12599
|
highlightedAST = HighlightJS.highlightAuto(transformCode(code))._emitter.root;
|
|
12587
12600
|
if (ramda.isEmpty(highlightedAST.children)) {
|
|
12588
|
-
highlightedAST =
|
|
12601
|
+
highlightedAST = common$1.lowlight.highlight("javascript", transformCode(code));
|
|
12589
12602
|
}
|
|
12590
12603
|
}
|
|
12591
12604
|
var highlightedNode = highlightedAST.children.map(buildReactElementFromAST);
|
|
@@ -12613,7 +12626,7 @@ var applyLineHighlighting = function applyLineHighlighting(editorContent) {
|
|
|
12613
12626
|
});
|
|
12614
12627
|
};
|
|
12615
12628
|
var substituteVariables = function substituteVariables(highlightedContent, variables) {
|
|
12616
|
-
return highlightedContent.replace(
|
|
12629
|
+
return highlightedContent.replace(VARIABLE_SPAN_REGEX, function (matchedSpan, dataLabel) {
|
|
12617
12630
|
var dataLabelSplitted = dataLabel.split(".");
|
|
12618
12631
|
if (dataLabelSplitted.length > 1) {
|
|
12619
12632
|
var category = neetoCist.findBy({
|
|
@@ -12631,7 +12644,10 @@ var substituteVariables = function substituteVariables(highlightedContent, varia
|
|
|
12631
12644
|
});
|
|
12632
12645
|
};
|
|
12633
12646
|
|
|
12647
|
+
exports.EDITOR_CONTENT_CLASS_NAME = EDITOR_CONTENT_CLASS_NAME;
|
|
12648
|
+
exports.EDITOR_CONTENT_DEFAULT_CONFIGURATION = EDITOR_CONTENT_DEFAULT_CONFIGURATION;
|
|
12649
|
+
exports.SANITIZE_OPTIONS = SANITIZE_OPTIONS;
|
|
12634
12650
|
exports.applyLineHighlighting = applyLineHighlighting;
|
|
12635
12651
|
exports.applySyntaxHighlightingAndLineNumbers = applySyntaxHighlightingAndLineNumbers;
|
|
12636
12652
|
exports.substituteVariables = substituteVariables;
|
|
12637
|
-
//# sourceMappingURL=chunk-
|
|
12653
|
+
//# sourceMappingURL=chunk-BIff7Ppc.cjs.js.map
|