@bigbinary/neeto-editor 1.46.0 → 1.47.0
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 +5 -1
- package/dist/Editor.js.map +1 -1
- package/dist/FormikEditor.js +8 -4
- package/dist/FormikEditor.js.map +1 -1
- package/dist/Menu.js +8 -1
- package/dist/Menu.js.map +1 -1
- package/dist/{chunk-B6_bJoYE.js → chunk-BWTtXW7N.js} +124 -53
- package/dist/{chunk-B6_bJoYE.js.map → chunk-BWTtXW7N.js.map} +1 -1
- package/dist/cjs/Editor.cjs.js +5 -1
- package/dist/cjs/Editor.cjs.js.map +1 -1
- package/dist/cjs/FormikEditor.cjs.js +8 -4
- package/dist/cjs/FormikEditor.cjs.js.map +1 -1
- package/dist/cjs/Menu.cjs.js +8 -1
- package/dist/cjs/Menu.cjs.js.map +1 -1
- package/dist/cjs/{chunk-0fKNRx3i.cjs.js → chunk-DutgnIWp.cjs.js} +124 -53
- package/dist/cjs/{chunk-0fKNRx3i.cjs.js.map → chunk-DutgnIWp.cjs.js.map} +1 -1
- package/dist/cjs/index.cjs.js +6 -2
- package/dist/cjs/index.cjs.js.map +1 -1
- package/dist/editor-stats.html +1 -1
- package/dist/index.js +6 -2
- package/dist/index.js.map +1 -1
- package/package.json +2 -2
- package/src/translations/en.json +2 -2
|
@@ -10,9 +10,15 @@ 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-
|
|
13
|
+
require('./chunk-DutgnIWp.cjs.js');
|
|
14
14
|
require('./chunk-vQvjPR2x.cjs.js');
|
|
15
15
|
require('i18next');
|
|
16
|
+
require('@bigbinary/neeto-icons/TextH1');
|
|
17
|
+
require('@bigbinary/neeto-icons/TextH2');
|
|
18
|
+
require('@bigbinary/neeto-icons/TextH3');
|
|
19
|
+
require('@bigbinary/neeto-icons/TextH4');
|
|
20
|
+
require('@bigbinary/neeto-icons/TextH5');
|
|
21
|
+
require('@bigbinary/neeto-icons/TextP');
|
|
16
22
|
require('./chunk-Cf2e86Di.cjs.js');
|
|
17
23
|
require('./chunk-B9Evf49b.cjs.js');
|
|
18
24
|
require('./chunk-D_e3pQI3.cjs.js');
|
|
@@ -80,17 +86,15 @@ require('@bigbinary/neeto-commons-frontend/initializers');
|
|
|
80
86
|
require('@bigbinary/neetoui/Tooltip');
|
|
81
87
|
require('@bigbinary/neetoui/Spinner');
|
|
82
88
|
require('@bigbinary/neetoui/Checkbox');
|
|
89
|
+
require('@bigbinary/neeto-icons/Down');
|
|
83
90
|
require('@bigbinary/neeto-icons/MenuHorizontal');
|
|
84
91
|
require('@tippyjs/react');
|
|
85
92
|
require('@bigbinary/neeto-icons/File');
|
|
86
93
|
require('react-dom/server');
|
|
87
94
|
require('./chunk-Bi1rI-2R.cjs.js');
|
|
88
95
|
require('yjs');
|
|
89
|
-
require('@bigbinary/neeto-icons/Down');
|
|
90
96
|
require('@bigbinary/neeto-molecules/CopyToClipboardButton');
|
|
91
97
|
require('@bigbinary/neeto-icons/Paragraph');
|
|
92
|
-
require('@bigbinary/neeto-icons/TextH1');
|
|
93
|
-
require('@bigbinary/neeto-icons/TextH2');
|
|
94
98
|
require('@bigbinary/neeto-icons/Blockquote');
|
|
95
99
|
require('@bigbinary/neeto-icons/Minus');
|
|
96
100
|
require('@bigbinary/neeto-icons/Text');
|
|
@@ -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\";\nimport { path } from \"ramda\";\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 const pathParts = name.split(\".\");\n const prevError = path(pathParts, prevFormikProps.errors);\n const nextError = path(pathParts, nextFormikProps.errors);\n const prevTouched = path(pathParts, prevFormikProps.touched);\n const nextTouched = path(pathParts, nextFormikProps.touched);\n\n return (\n prevError !== nextError ||\n prevTouched !== nextTouched ||\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","pathParts","split","prevError","path","errors","nextError","prevTouched","touched","nextTouched","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\";\nimport { path } from \"ramda\";\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 const pathParts = name.split(\".\");\n const prevError = path(pathParts, prevFormikProps.errors);\n const nextError = path(pathParts, nextFormikProps.errors);\n const prevTouched = path(pathParts, prevFormikProps.touched);\n const nextTouched = path(pathParts, nextFormikProps.touched);\n\n return (\n prevError !== nextError ||\n prevTouched !== nextTouched ||\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","pathParts","split","prevError","path","errors","nextError","prevTouched","touched","nextTouched","Object","keys","length","isSubmitting","Boolean","_jsx","FastField","children","_ref2","field","form","meta","Editor","_objectSpread","error","initialValue","value","onBlur","setFieldTouched","setFieldValue","displayName","memo","forwardRef"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAQA,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,cAAI,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,GAAA,EAAE,GAAAA,aAAA;IAAAE,cAAA,GAAAX,IAAA,CACbY,SAAS;AAATA,IAAAA,SAAS,GAAAD,cAAA,KAAG,KAAA,CAAA,GAAA,EAAE,GAAAA,cAAA;AACXE,IAAAA,UAAU,GAAAC,wBAAA,CAAAd,IAAA,EAAAe,SAAA,CAAA,CAAA;AAIf;AACA;AACA;AACA;EACA,IAAMC,oBAAoB,GAAG,SAAvBA,oBAAoBA,CAAIC,SAAS,EAAEC,SAAS,EAAK;AACrD,IAAA,IAAMC,eAAe,GAAGF,SAAS,CAACG,MAAM,CAAA;AACxC,IAAA,IAAMC,eAAe,GAAGH,SAAS,CAACE,MAAM,CAAA;AAExC,IAAA,IAAME,SAAS,GAAGpB,IAAI,CAACqB,KAAK,CAAC,GAAG,CAAC,CAAA;IACjC,IAAMC,SAAS,GAAGC,UAAI,CAACH,SAAS,EAAEH,eAAe,CAACO,MAAM,CAAC,CAAA;IACzD,IAAMC,SAAS,GAAGF,UAAI,CAACH,SAAS,EAAED,eAAe,CAACK,MAAM,CAAC,CAAA;IACzD,IAAME,WAAW,GAAGH,UAAI,CAACH,SAAS,EAAEH,eAAe,CAACU,OAAO,CAAC,CAAA;IAC5D,IAAMC,WAAW,GAAGL,UAAI,CAACH,SAAS,EAAED,eAAe,CAACQ,OAAO,CAAC,CAAA;IAE5D,OACEL,SAAS,KAAKG,SAAS,IACvBC,WAAW,KAAKE,WAAW,IAC3BC,MAAM,CAACC,IAAI,CAACd,SAAS,CAAC,CAACe,MAAM,KAAKF,MAAM,CAACC,IAAI,CAACf,SAAS,CAAC,CAACgB,MAAM,IAC/Dd,eAAe,CAACe,YAAY,KAAKb,eAAe,CAACa,YAAY,IAC7DC,OAAO,CAAC7B,YAAY,KAAA,IAAA,IAAZA,YAAY,KAAZA,KAAAA,CAAAA,GAAAA,KAAAA,CAAAA,GAAAA,YAAY,CAAGW,SAAS,EAAEC,SAAS,CAAC,CAAC,CAAA;GAEhD,CAAA;EAED,oBACEkB,cAAA,CAACC,gBAAS,EAAA;AACF7B,IAAAA,WAAW,EAAXA,WAAW;AAAEE,IAAAA,QAAQ,EAARA,QAAQ;AAAER,IAAAA,IAAI,EAAJA,IAAI;AAAEU,IAAAA,SAAS,EAATA,SAAS;AAC5CN,IAAAA,YAAY,EAAEU,oBAAqB;IAAAsB,QAAA,EAElC,SAAAA,QAAAA,CAAAC,KAAA,EAAA;AAAA,MAAA,IAAGC,KAAK,GAAAD,KAAA,CAALC,KAAK;QAAEC,IAAI,GAAAF,KAAA,CAAJE,IAAI;QAAEC,IAAI,GAAAH,KAAA,CAAJG,IAAI,CAAA;AAAA,MAAA,oBACnBN,cAAA,CAACO,MAAM,EAAAC,aAAA,CAAA;AACCpC,QAAAA,WAAW,EAAXA,WAAW;AAAEE,QAAAA,QAAQ,EAARA,QAAQ;AAAER,QAAAA,IAAI,EAAJA,IAAI;AAAED,QAAAA,GAAG,EAAHA,GAAG;AAAEW,QAAAA,SAAS,EAATA,SAAS;QACjDiC,KAAK,EAAEH,IAAI,CAACb,OAAO,GAAGa,IAAI,CAACG,KAAK,GAAG,EAAG;QACtCC,YAAY,EAAEN,KAAK,CAACO,KAAM;QAC1BC,MAAM,EAAE,SAAAA,MAAAA,GAAM;AACZP,UAAAA,IAAI,CAACQ,eAAe,CAAC/C,IAAI,EAAE,IAAI,CAAC,CAAA;SAChC;AACFE,QAAAA,QAAQ,EAAE,SAAAA,QAAA2C,CAAAA,KAAK,EAAI;AACjBN,UAAAA,IAAI,CAACS,aAAa,CAAChD,IAAI,EAAE6C,KAAK,CAAC,CAAA;AAC/B3C,UAAAA,SAAQ,aAARA,SAAQ,KAAA,KAAA,CAAA,IAARA,SAAQ,CAAG2C,KAAK,CAAC,CAAA;AACnB,SAAA;OACIlC,EAAAA,UAAU,CACf,CAAC,CAAA;AAAA,KAAA;AACH,GACQ,CAAC,CAAA;AAEhB,CAAC,CAAA;AAEDd,YAAY,CAACoD,WAAW,GAAG,mBAAmB,CAAA;AAE9C,qBAAA,aAAeC,UAAI,eAACC,gBAAU,CAACtD,YAAY,CAAC,CAAC;;;;"}
|
package/dist/cjs/Menu.cjs.js
CHANGED
|
@@ -5,11 +5,17 @@ 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-
|
|
8
|
+
var Menu = require('./chunk-DutgnIWp.cjs.js');
|
|
9
9
|
require('./chunk-D_e3pQI3.cjs.js');
|
|
10
10
|
require('react/jsx-runtime');
|
|
11
11
|
require('./chunk-vQvjPR2x.cjs.js');
|
|
12
12
|
require('i18next');
|
|
13
|
+
require('@bigbinary/neeto-icons/TextH1');
|
|
14
|
+
require('@bigbinary/neeto-icons/TextH2');
|
|
15
|
+
require('@bigbinary/neeto-icons/TextH3');
|
|
16
|
+
require('@bigbinary/neeto-icons/TextH4');
|
|
17
|
+
require('@bigbinary/neeto-icons/TextH5');
|
|
18
|
+
require('@bigbinary/neeto-icons/TextP');
|
|
13
19
|
require('./chunk-Cf2e86Di.cjs.js');
|
|
14
20
|
require('@bigbinary/neeto-cist');
|
|
15
21
|
require('./chunk-B9Evf49b.cjs.js');
|
|
@@ -77,6 +83,7 @@ require('@bigbinary/neeto-commons-frontend/initializers');
|
|
|
77
83
|
require('@bigbinary/neetoui/Tooltip');
|
|
78
84
|
require('@bigbinary/neetoui/Spinner');
|
|
79
85
|
require('@bigbinary/neetoui/Checkbox');
|
|
86
|
+
require('@bigbinary/neeto-icons/Down');
|
|
80
87
|
require('@bigbinary/neeto-icons/MenuHorizontal');
|
|
81
88
|
require('@tippyjs/react');
|
|
82
89
|
require('@bigbinary/neeto-icons/File');
|
package/dist/cjs/Menu.cjs.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"Menu.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"Menu.cjs.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;"}
|
|
@@ -7,6 +7,12 @@ var React = require('react');
|
|
|
7
7
|
var ramda = require('ramda');
|
|
8
8
|
var injectCss = require('./chunk-vQvjPR2x.cjs.js');
|
|
9
9
|
var i18n = require('i18next');
|
|
10
|
+
var TextH1 = require('@bigbinary/neeto-icons/TextH1');
|
|
11
|
+
var TextH2 = require('@bigbinary/neeto-icons/TextH2');
|
|
12
|
+
var TextH3 = require('@bigbinary/neeto-icons/TextH3');
|
|
13
|
+
var TextH4 = require('@bigbinary/neeto-icons/TextH4');
|
|
14
|
+
var TextH5 = require('@bigbinary/neeto-icons/TextH5');
|
|
15
|
+
var TextP = require('@bigbinary/neeto-icons/TextP');
|
|
10
16
|
var utils = require('./chunk-Cf2e86Di.cjs.js');
|
|
11
17
|
var tippy = require('tippy.js');
|
|
12
18
|
var ReactDOM = require('react-dom');
|
|
@@ -69,6 +75,7 @@ var _commonjsHelpers = require('./chunk-B83fTs8d.cjs.js');
|
|
|
69
75
|
var Checkbox = require('@bigbinary/neetoui/Checkbox');
|
|
70
76
|
var shallow = require('zustand/shallow');
|
|
71
77
|
var zustand = require('zustand');
|
|
78
|
+
var Down = require('@bigbinary/neeto-icons/Down');
|
|
72
79
|
var MenuHorizontal = require('@bigbinary/neeto-icons/MenuHorizontal');
|
|
73
80
|
var Tippy = require('@tippyjs/react');
|
|
74
81
|
var File = require('@bigbinary/neeto-icons/File');
|
|
@@ -15833,7 +15840,7 @@ var MenuButton = function MenuButton(_ref) {
|
|
|
15833
15840
|
style: isActive ? "secondary" : "text",
|
|
15834
15841
|
tabIndex: "-1",
|
|
15835
15842
|
tooltipProps: {
|
|
15836
|
-
content: label,
|
|
15843
|
+
content: renderTooltipContent(label, optionName),
|
|
15837
15844
|
position: "bottom"
|
|
15838
15845
|
},
|
|
15839
15846
|
onClick: command
|
|
@@ -15862,9 +15869,6 @@ var EmojiOption = function EmojiOption(_ref) {
|
|
|
15862
15869
|
return /*#__PURE__*/jsxRuntime.jsx(Dropdown$1, {
|
|
15863
15870
|
buttonStyle: "text",
|
|
15864
15871
|
closeOnSelect: false,
|
|
15865
|
-
dropdownProps: {
|
|
15866
|
-
classNames: "neeto-editor-fixed-menu__emoji-dropdown"
|
|
15867
|
-
},
|
|
15868
15872
|
icon: Smiley,
|
|
15869
15873
|
isOpen: isActive,
|
|
15870
15874
|
position: isSecondaryMenu ? "left-start" : "bottom-start",
|
|
@@ -15882,6 +15886,12 @@ var EmojiOption = function EmojiOption(_ref) {
|
|
|
15882
15886
|
label: label,
|
|
15883
15887
|
icon: Smiley
|
|
15884
15888
|
}),
|
|
15889
|
+
dropdownProps: {
|
|
15890
|
+
classNames: "neeto-editor-fixed-menu__emoji-dropdown",
|
|
15891
|
+
onClick: function onClick(e) {
|
|
15892
|
+
return isSecondaryMenu && e.stopPropagation();
|
|
15893
|
+
}
|
|
15894
|
+
},
|
|
15885
15895
|
onClose: function onClose() {
|
|
15886
15896
|
return setActive(false);
|
|
15887
15897
|
},
|
|
@@ -18837,27 +18847,33 @@ var Headless = function Headless(_ref) {
|
|
|
18837
18847
|
var FONT_SIZE_OPTIONS = [{
|
|
18838
18848
|
label: i18n.t("neetoEditor.menu.heading1"),
|
|
18839
18849
|
value: 1,
|
|
18840
|
-
key: "h1"
|
|
18850
|
+
key: "h1",
|
|
18851
|
+
icon: TextH1
|
|
18841
18852
|
}, {
|
|
18842
18853
|
label: i18n.t("neetoEditor.menu.heading2"),
|
|
18843
18854
|
value: 2,
|
|
18844
|
-
key: "h2"
|
|
18855
|
+
key: "h2",
|
|
18856
|
+
icon: TextH2
|
|
18845
18857
|
}, {
|
|
18846
18858
|
label: i18n.t("neetoEditor.menu.heading3"),
|
|
18847
18859
|
value: 3,
|
|
18848
|
-
key: "h3"
|
|
18860
|
+
key: "h3",
|
|
18861
|
+
icon: TextH3
|
|
18849
18862
|
}, {
|
|
18850
18863
|
label: i18n.t("neetoEditor.menu.heading4"),
|
|
18851
18864
|
value: 4,
|
|
18852
|
-
key: "h4"
|
|
18865
|
+
key: "h4",
|
|
18866
|
+
icon: TextH4
|
|
18853
18867
|
}, {
|
|
18854
18868
|
label: i18n.t("neetoEditor.menu.heading5"),
|
|
18855
18869
|
value: 5,
|
|
18856
|
-
key: "h5"
|
|
18870
|
+
key: "h5",
|
|
18871
|
+
icon: TextH5
|
|
18857
18872
|
}, {
|
|
18858
18873
|
label: i18n.t("neetoEditor.menu.normalText"),
|
|
18859
18874
|
value: 0,
|
|
18860
|
-
key: "body2"
|
|
18875
|
+
key: "body2",
|
|
18876
|
+
icon: TextP
|
|
18861
18877
|
}];
|
|
18862
18878
|
var MENU_COMPONENTS = {
|
|
18863
18879
|
fixed: Fixed,
|
|
@@ -18900,10 +18916,15 @@ var FontSizeOption = function FontSizeOption(_ref) {
|
|
|
18900
18916
|
}, FONT_SIZE_OPTIONS)), [FONT_SIZE_OPTIONS.at(-1)]);
|
|
18901
18917
|
return /*#__PURE__*/jsxRuntime.jsx(Dropdown$1, {
|
|
18902
18918
|
autoWidth: true,
|
|
18903
|
-
label: activeOption === null || activeOption === void 0 ? void 0 : activeOption.label,
|
|
18904
18919
|
placement: "bottom-start",
|
|
18905
18920
|
strategy: "fixed",
|
|
18906
18921
|
buttonProps: {
|
|
18922
|
+
icon: activeOption === null || activeOption === void 0 ? void 0 : activeOption.icon,
|
|
18923
|
+
iconPosition: "left",
|
|
18924
|
+
iconSize: 22,
|
|
18925
|
+
label: /*#__PURE__*/jsxRuntime.jsx(Down, {
|
|
18926
|
+
size: 12
|
|
18927
|
+
}),
|
|
18907
18928
|
ref: dropdownRef,
|
|
18908
18929
|
"data-cy": "neeto-editor-fixed-menu-font-size-option",
|
|
18909
18930
|
onKeyDown: function onKeyDown(event) {
|
|
@@ -18919,18 +18940,24 @@ var FontSizeOption = function FontSizeOption(_ref) {
|
|
|
18919
18940
|
className: "neeto-editor-fixed-menu__item neeto-editor-font-size__wrapper"
|
|
18920
18941
|
},
|
|
18921
18942
|
children: /*#__PURE__*/jsxRuntime.jsx(Menu$2, {
|
|
18943
|
+
className: "neeto-ui-flex neeto-ui-gap-1 neeto-editor-menu-font-size-options",
|
|
18922
18944
|
children: menuOptions.map(function (_ref2) {
|
|
18923
18945
|
var label = _ref2.label,
|
|
18946
|
+
Icon = _ref2.icon,
|
|
18924
18947
|
value = _ref2.value,
|
|
18925
18948
|
key = _ref2.key;
|
|
18926
18949
|
return /*#__PURE__*/jsxRuntime.jsx(MenuItem.Button, {
|
|
18950
|
+
className: "neeto-editor-menu-font-size-options__item-btn",
|
|
18927
18951
|
"data-cy": "neeto-editor-fixed-menu-font-size-option-".concat(key),
|
|
18952
|
+
tooltipProps: {
|
|
18953
|
+
content: label,
|
|
18954
|
+
position: "bottom"
|
|
18955
|
+
},
|
|
18928
18956
|
onClick: function onClick() {
|
|
18929
18957
|
return handleClick(value);
|
|
18930
18958
|
},
|
|
18931
|
-
children: /*#__PURE__*/jsxRuntime.jsx(
|
|
18932
|
-
|
|
18933
|
-
children: label
|
|
18959
|
+
children: /*#__PURE__*/jsxRuntime.jsx(Icon, {
|
|
18960
|
+
size: 22
|
|
18934
18961
|
})
|
|
18935
18962
|
}, value);
|
|
18936
18963
|
})
|
|
@@ -19035,6 +19062,7 @@ var TableOption = function TableOption(_ref) {
|
|
|
19035
19062
|
};
|
|
19036
19063
|
var TableOption$1 = /*#__PURE__*/React.memo(TableOption);
|
|
19037
19064
|
|
|
19065
|
+
var _SHORTCUTS;
|
|
19038
19066
|
var MENU_ELEMENT_TYPES = {
|
|
19039
19067
|
BUTTON: "button",
|
|
19040
19068
|
FONT_SIZE: "fontSize",
|
|
@@ -19043,13 +19071,47 @@ var MENU_ELEMENT_TYPES = {
|
|
|
19043
19071
|
EMOJI: "emoji",
|
|
19044
19072
|
MENTIONS: "mentions"
|
|
19045
19073
|
};
|
|
19074
|
+
var SHORTCUTS = (_SHORTCUTS = {}, _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_SHORTCUTS, constants.EDITOR_OPTIONS.BOLD, {
|
|
19075
|
+
mac: "⌘B",
|
|
19076
|
+
win: "Ctrl+B"
|
|
19077
|
+
}), constants.EDITOR_OPTIONS.ITALIC, {
|
|
19078
|
+
mac: "⌘I",
|
|
19079
|
+
win: "Ctrl+I"
|
|
19080
|
+
}), constants.EDITOR_OPTIONS.UNDERLINE, {
|
|
19081
|
+
mac: "⌘U",
|
|
19082
|
+
win: "Ctrl+U"
|
|
19083
|
+
}), constants.EDITOR_OPTIONS.STRIKETHROUGH, {
|
|
19084
|
+
mac: "⌘⇧S or ⌘⇧X",
|
|
19085
|
+
win: "Ctrl+Shift+S or Ctrl+Shift+X"
|
|
19086
|
+
}), constants.EDITOR_OPTIONS.CODE, {
|
|
19087
|
+
mac: "⌘E",
|
|
19088
|
+
win: "Ctrl+E"
|
|
19089
|
+
}), constants.EDITOR_OPTIONS.UNDO, {
|
|
19090
|
+
mac: "⌘Z",
|
|
19091
|
+
win: "Ctrl+Z"
|
|
19092
|
+
}), constants.EDITOR_OPTIONS.REDO, {
|
|
19093
|
+
mac: "⌘⇧Z",
|
|
19094
|
+
win: "Ctrl+Shift+Z"
|
|
19095
|
+
}), constants.EDITOR_OPTIONS.LINK, {
|
|
19096
|
+
mac: "⌘K",
|
|
19097
|
+
win: "Ctrl+K"
|
|
19098
|
+
}), constants.EDITOR_OPTIONS.HIGHLIGHT, {
|
|
19099
|
+
mac: "⌘⇧H",
|
|
19100
|
+
win: "Ctrl+Shift+H"
|
|
19101
|
+
}), "bulletList", {
|
|
19102
|
+
mac: "⌘⇧8",
|
|
19103
|
+
win: "Ctrl+Shift+8"
|
|
19104
|
+
}), _defineProperty(_SHORTCUTS, "orderedList", {
|
|
19105
|
+
mac: "⌘⇧7",
|
|
19106
|
+
win: "Ctrl+Shift+7"
|
|
19107
|
+
}));
|
|
19046
19108
|
var MENU_ELEMENTS = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, MENU_ELEMENT_TYPES.BUTTON, MenuButton$1), MENU_ELEMENT_TYPES.FONT_SIZE, FontSizeOption$1), MENU_ELEMENT_TYPES.TABLE, TableOption$1), MENU_ELEMENT_TYPES.TEXT_COLOR, TextColorOption), MENU_ELEMENT_TYPES.EMOJI, EmojiOption$1), MENU_ELEMENT_TYPES.MENTIONS, Mentions$1);
|
|
19047
19109
|
var MENU_ELEMENT_WIDTHS = _defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty(_defineProperty({}, MENU_ELEMENT_TYPES.BUTTON, 36), MENU_ELEMENT_TYPES.FONT_SIZE, 103), MENU_ELEMENT_TYPES.TABLE, 36), MENU_ELEMENT_TYPES.TEXT_COLOR, 36), MENU_ELEMENT_TYPES.EMOJI, 36), MENU_ELEMENT_TYPES.MENTIONS, 36);
|
|
19048
19110
|
|
|
19049
19111
|
function ownKeys$1(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; }
|
|
19050
19112
|
function _objectSpread$1(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys$1(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys$1(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19051
19113
|
var createMenuOptions = function createMenuOptions(_ref) {
|
|
19052
|
-
var _tooltips$undo, _tooltips$redo, _tooltips$fontSize, _tooltips$bold, _tooltips$italic, _tooltips$
|
|
19114
|
+
var _tooltips$undo, _tooltips$redo, _tooltips$fontSize, _tooltips$bold, _tooltips$italic, _tooltips$link, _tooltips$strike, _tooltips$highlight, _tooltips$bulletList, _tooltips$orderedList, _tooltips$blockQuote, _tooltips$table, _tooltips$attachments, _tooltips$imageUpload, _tooltips$videoEmbed, _tooltips$textColor, _tooltips$emoji, _tooltips$mention, _tooltips$code, _tooltips$codeBlock, _tooltips$videoUpload, _tooltips$underline;
|
|
19053
19115
|
var tooltips = _ref.tooltips,
|
|
19054
19116
|
setMediaUploader = _ref.setMediaUploader,
|
|
19055
19117
|
attachmentProps = _ref.attachmentProps,
|
|
@@ -19111,15 +19173,6 @@ var createMenuOptions = function createMenuOptions(_ref) {
|
|
|
19111
19173
|
}),
|
|
19112
19174
|
optionName: constants.EDITOR_OPTIONS.ITALIC,
|
|
19113
19175
|
label: (_tooltips$italic = tooltips.italic) !== null && _tooltips$italic !== void 0 ? _tooltips$italic : i18n.t("neetoEditor.menu.italic")
|
|
19114
|
-
}, {
|
|
19115
|
-
type: MENU_ELEMENT_TYPES.BUTTON,
|
|
19116
|
-
icon: Underline,
|
|
19117
|
-
isEnabled: options.includes(constants.EDITOR_OPTIONS.UNDERLINE),
|
|
19118
|
-
command: runEditorCommand(function (editor) {
|
|
19119
|
-
return editor.chain().focus().toggleUnderline().run();
|
|
19120
|
-
}),
|
|
19121
|
-
optionName: constants.EDITOR_OPTIONS.UNDERLINE,
|
|
19122
|
-
label: (_tooltips$underline = tooltips.underline) !== null && _tooltips$underline !== void 0 ? _tooltips$underline : i18n.t("neetoEditor.menu.underline")
|
|
19123
19176
|
}, {
|
|
19124
19177
|
type: MENU_ELEMENT_TYPES.BUTTON,
|
|
19125
19178
|
icon: Link,
|
|
@@ -19181,24 +19234,6 @@ var createMenuOptions = function createMenuOptions(_ref) {
|
|
|
19181
19234
|
optionName: "blockquote",
|
|
19182
19235
|
highlight: true,
|
|
19183
19236
|
label: (_tooltips$blockQuote = tooltips.blockQuote) !== null && _tooltips$blockQuote !== void 0 ? _tooltips$blockQuote : i18n.t("neetoEditor.menu.blockQuote")
|
|
19184
|
-
}, {
|
|
19185
|
-
type: MENU_ELEMENT_TYPES.BUTTON,
|
|
19186
|
-
icon: Code,
|
|
19187
|
-
command: runEditorCommand(function (editor) {
|
|
19188
|
-
return editor.chain().focus().toggleCode().run();
|
|
19189
|
-
}),
|
|
19190
|
-
isEnabled: options.includes(constants.EDITOR_OPTIONS.CODE),
|
|
19191
|
-
optionName: constants.EDITOR_OPTIONS.CODE,
|
|
19192
|
-
label: (_tooltips$code = tooltips.code) !== null && _tooltips$code !== void 0 ? _tooltips$code : i18n.t("neetoEditor.menu.code")
|
|
19193
|
-
}, {
|
|
19194
|
-
type: MENU_ELEMENT_TYPES.BUTTON,
|
|
19195
|
-
icon: CodeBlock,
|
|
19196
|
-
command: runEditorCommand(function (editor) {
|
|
19197
|
-
return editor.chain().focus().toggleCodeBlock().run();
|
|
19198
|
-
}),
|
|
19199
|
-
isEnabled: options.includes(constants.EDITOR_OPTIONS.CODE_BLOCK),
|
|
19200
|
-
optionName: "codeBlock",
|
|
19201
|
-
label: (_tooltips$codeBlock = tooltips.codeBlock) !== null && _tooltips$codeBlock !== void 0 ? _tooltips$codeBlock : i18n.t("neetoEditor.menu.codeBlock")
|
|
19202
19237
|
}],
|
|
19203
19238
|
// misc
|
|
19204
19239
|
[{
|
|
@@ -19225,15 +19260,6 @@ var createMenuOptions = function createMenuOptions(_ref) {
|
|
|
19225
19260
|
isEnabled: options.includes(constants.EDITOR_OPTIONS.IMAGE_UPLOAD),
|
|
19226
19261
|
optionName: constants.EDITOR_OPTIONS.IMAGE_UPLOAD,
|
|
19227
19262
|
label: (_tooltips$imageUpload = tooltips.imageUpload) !== null && _tooltips$imageUpload !== void 0 ? _tooltips$imageUpload : i18n.t("neetoEditor.menu.imageUpload")
|
|
19228
|
-
}, {
|
|
19229
|
-
type: MENU_ELEMENT_TYPES.BUTTON,
|
|
19230
|
-
icon: Video,
|
|
19231
|
-
command: function command() {
|
|
19232
|
-
return setMediaUploader(ramda.assoc("video", true));
|
|
19233
|
-
},
|
|
19234
|
-
isEnabled: options.includes(constants.EDITOR_OPTIONS.VIDEO_UPLOAD),
|
|
19235
|
-
optionName: constants.EDITOR_OPTIONS.VIDEO_UPLOAD,
|
|
19236
|
-
label: (_tooltips$videoUpload = tooltips.videoUpload) !== null && _tooltips$videoUpload !== void 0 ? _tooltips$videoUpload : i18n.t("neetoEditor.menu.videoUpload")
|
|
19237
19263
|
}, {
|
|
19238
19264
|
type: MENU_ELEMENT_TYPES.BUTTON,
|
|
19239
19265
|
icon: MediaVideo,
|
|
@@ -19263,6 +19289,42 @@ var createMenuOptions = function createMenuOptions(_ref) {
|
|
|
19263
19289
|
isEnabled: neetoCist.isNotEmpty(mentions),
|
|
19264
19290
|
optionName: "mentions",
|
|
19265
19291
|
mentions: mentions
|
|
19292
|
+
}, {
|
|
19293
|
+
type: MENU_ELEMENT_TYPES.BUTTON,
|
|
19294
|
+
icon: Code,
|
|
19295
|
+
command: runEditorCommand(function (editor) {
|
|
19296
|
+
return editor.chain().focus().toggleCode().run();
|
|
19297
|
+
}),
|
|
19298
|
+
isEnabled: options.includes(constants.EDITOR_OPTIONS.CODE),
|
|
19299
|
+
optionName: constants.EDITOR_OPTIONS.CODE,
|
|
19300
|
+
label: (_tooltips$code = tooltips.code) !== null && _tooltips$code !== void 0 ? _tooltips$code : i18n.t("neetoEditor.menu.code")
|
|
19301
|
+
}, {
|
|
19302
|
+
type: MENU_ELEMENT_TYPES.BUTTON,
|
|
19303
|
+
icon: CodeBlock,
|
|
19304
|
+
command: runEditorCommand(function (editor) {
|
|
19305
|
+
return editor.chain().focus().toggleCodeBlock().run();
|
|
19306
|
+
}),
|
|
19307
|
+
isEnabled: options.includes(constants.EDITOR_OPTIONS.CODE_BLOCK),
|
|
19308
|
+
optionName: "codeBlock",
|
|
19309
|
+
label: (_tooltips$codeBlock = tooltips.codeBlock) !== null && _tooltips$codeBlock !== void 0 ? _tooltips$codeBlock : i18n.t("neetoEditor.menu.codeBlock")
|
|
19310
|
+
}, {
|
|
19311
|
+
type: MENU_ELEMENT_TYPES.BUTTON,
|
|
19312
|
+
icon: Video,
|
|
19313
|
+
command: function command() {
|
|
19314
|
+
return setMediaUploader(ramda.assoc("video", true));
|
|
19315
|
+
},
|
|
19316
|
+
isEnabled: options.includes(constants.EDITOR_OPTIONS.VIDEO_UPLOAD),
|
|
19317
|
+
optionName: constants.EDITOR_OPTIONS.VIDEO_UPLOAD,
|
|
19318
|
+
label: (_tooltips$videoUpload = tooltips.videoUpload) !== null && _tooltips$videoUpload !== void 0 ? _tooltips$videoUpload : i18n.t("neetoEditor.menu.videoUpload")
|
|
19319
|
+
}, {
|
|
19320
|
+
type: MENU_ELEMENT_TYPES.BUTTON,
|
|
19321
|
+
icon: Underline,
|
|
19322
|
+
isEnabled: options.includes(constants.EDITOR_OPTIONS.UNDERLINE),
|
|
19323
|
+
command: runEditorCommand(function (editor) {
|
|
19324
|
+
return editor.chain().focus().toggleUnderline().run();
|
|
19325
|
+
}),
|
|
19326
|
+
optionName: constants.EDITOR_OPTIONS.UNDERLINE,
|
|
19327
|
+
label: (_tooltips$underline = tooltips.underline) !== null && _tooltips$underline !== void 0 ? _tooltips$underline : i18n.t("neetoEditor.menu.underline")
|
|
19266
19328
|
}], //addons
|
|
19267
19329
|
_toConsumableArray(addonCommandOptions)];
|
|
19268
19330
|
};
|
|
@@ -19391,8 +19453,17 @@ var getLinkPopoverPosition = function getLinkPopoverPosition(editor, popoverRef)
|
|
|
19391
19453
|
popoverPosition: popoverPosition
|
|
19392
19454
|
};
|
|
19393
19455
|
};
|
|
19456
|
+
function renderTooltipContent(label, optionName) {
|
|
19457
|
+
var shortcut = SHORTCUTS[optionName];
|
|
19458
|
+
if (!shortcut) return label;
|
|
19459
|
+
var isMac = function isMac() {
|
|
19460
|
+
return typeof window !== "undefined" && /Mac|iPod|iPhone|iPad/.test(window.navigator.userAgent);
|
|
19461
|
+
};
|
|
19462
|
+
var key = isMac() ? shortcut.mac : shortcut.win;
|
|
19463
|
+
return "".concat(label, " (").concat(key, ")");
|
|
19464
|
+
}
|
|
19394
19465
|
|
|
19395
|
-
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-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}";
|
|
19466
|
+
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}";
|
|
19396
19467
|
injectCss.n(css,{});
|
|
19397
19468
|
|
|
19398
19469
|
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; }
|
|
@@ -19510,4 +19581,4 @@ exports.useEditor = useEditor;
|
|
|
19510
19581
|
exports.useEditorState = useEditorState$1;
|
|
19511
19582
|
exports.validateUrl = validateUrl;
|
|
19512
19583
|
exports.wrappingInputRule = wrappingInputRule;
|
|
19513
|
-
//# sourceMappingURL=chunk-
|
|
19584
|
+
//# sourceMappingURL=chunk-DutgnIWp.cjs.js.map
|