@flozy/editor 5.9.3 → 5.9.5

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (58) hide show
  1. package/dist/Editor/CommonEditor.js +14 -16
  2. package/dist/Editor/Editor.css +16 -22
  3. package/dist/Editor/Elements/AI/PopoverAIInput.js +12 -2
  4. package/dist/Editor/Elements/Button/EditorButton.js +1 -3
  5. package/dist/Editor/Elements/DataView/DataView.js +3 -4
  6. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +14 -8
  7. package/dist/Editor/Elements/DataView/Layouts/DataTypes/NumberType.js +1 -5
  8. package/dist/Editor/Elements/DataView/Layouts/DataTypes/TextType.js +1 -5
  9. package/dist/Editor/Elements/DataView/Layouts/FilterView.js +19 -23
  10. package/dist/Editor/Elements/Form/Form.js +0 -1
  11. package/dist/Editor/Elements/FreeGrid/styles.js +0 -1
  12. package/dist/Editor/Elements/Grid/GridItem.js +2 -1
  13. package/dist/Editor/Elements/Link/Link.js +43 -70
  14. package/dist/Editor/Elements/List/CheckList.js +1 -2
  15. package/dist/Editor/Elements/Search/SearchAttachment.js +0 -1
  16. package/dist/Editor/Elements/Search/SearchList.js +1 -8
  17. package/dist/Editor/Elements/SimpleText/index.js +1 -8
  18. package/dist/Editor/Elements/SimpleText/style.js +1 -5
  19. package/dist/Editor/Elements/Table/Table.js +3 -3
  20. package/dist/Editor/Elements/Table/TableCell.js +9 -14
  21. package/dist/Editor/Elements/Title/title.js +1 -13
  22. package/dist/Editor/Elements/Variables/Style.js +2 -28
  23. package/dist/Editor/Elements/Variables/VariableButton.js +4 -17
  24. package/dist/Editor/MiniEditor.js +2 -4
  25. package/dist/Editor/Toolbar/PopupTool/AddTemplates.js +28 -37
  26. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectAlignment.js +1 -3
  27. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +1 -1
  28. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectList.js +1 -3
  29. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +1 -1
  30. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +3 -9
  31. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +0 -5
  32. package/dist/Editor/Toolbar/PopupTool/TemplateCard.js +1 -1
  33. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +0 -45
  34. package/dist/Editor/Toolbar/PopupTool/index.js +0 -2
  35. package/dist/Editor/common/FontLoader/FontLoader.js +4 -6
  36. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +0 -1
  37. package/dist/Editor/common/RnD/SwitchViewport/SwitchViewport.js +2 -14
  38. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +0 -5
  39. package/dist/Editor/common/StyleBuilder/fieldTypes/card.js +2 -10
  40. package/dist/Editor/common/StyleBuilder/fieldTypes/index.js +1 -3
  41. package/dist/Editor/common/StyleBuilder/pageSettingsStyle.js +0 -4
  42. package/dist/Editor/common/Uploader.js +0 -8
  43. package/dist/Editor/common/iconslist.js +2 -1
  44. package/dist/Editor/commonStyle.js +57 -58
  45. package/dist/Editor/helper/index.js +2 -2
  46. package/dist/Editor/helper/theme.js +1 -24
  47. package/dist/Editor/hooks/useMouseMove.js +2 -5
  48. package/dist/Editor/plugins/withLayout.js +1 -1
  49. package/dist/Editor/utils/SlateUtilityFunctions.js +4 -10
  50. package/dist/Editor/utils/button.js +4 -4
  51. package/dist/Editor/utils/customHooks/useTableResize.js +1 -2
  52. package/dist/Editor/utils/draftToSlate.js +2 -3
  53. package/dist/Editor/utils/helper.js +19 -60
  54. package/dist/Editor/utils/pageSettings.js +2 -14
  55. package/dist/Editor/utils/table.js +0 -21
  56. package/package.json +1 -1
  57. package/dist/Editor/common/StyleBuilder/fieldTypes/lineSpacing.js +0 -79
  58. package/dist/Editor/helper/ensureWrappedVariables.js +0 -28
@@ -62,7 +62,6 @@ const FormSettings = props => {
62
62
  MuiAccordion: {
63
63
  styleOverrides: {
64
64
  root: {
65
- background: theme?.palette?.editor?.miniToolBarBackground,
66
65
  "& .MuiAccordionSummary-root": {
67
66
  flexDirection: "row-reverse",
68
67
  "& .MuiSvgIcon-root": {
@@ -3,35 +3,24 @@ import PersonalVideoIcon from "@mui/icons-material/PersonalVideo";
3
3
  import PhoneIphoneIcon from "@mui/icons-material/PhoneIphone";
4
4
  import useSwitchViewport from "./styles";
5
5
  import { useEffect } from "react";
6
- import { useEditorContext } from "../../../hooks/useMouseMove";
7
6
  import { jsx as _jsx } from "react/jsx-runtime";
8
7
  import { jsxs as _jsxs } from "react/jsx-runtime";
9
8
  const SwitchViewport = props => {
10
9
  const {
11
10
  breakpoint,
12
- onChange,
13
- show
11
+ onChange
14
12
  } = props;
15
13
  const classes = useSwitchViewport();
16
- const {
17
- setSelectedElement,
18
- setActiveBreakPoint
19
- } = useEditorContext();
20
14
  useEffect(() => {
21
- // to reset selection on viewport changes - FS-6589
22
- setSelectedElement({});
15
+ console.log(breakpoint);
23
16
  }, [breakpoint]);
24
17
  return /*#__PURE__*/_jsxs(Box, {
25
18
  sx: classes.root,
26
- style: {
27
- display: show ? "block" : "none"
28
- },
29
19
  children: [/*#__PURE__*/_jsx(Tooltip, {
30
20
  title: "Desktop View",
31
21
  children: /*#__PURE__*/_jsx(IconButton, {
32
22
  className: `${!breakpoint || breakpoint === "lg" ? "active" : ""}`,
33
23
  onClick: () => {
34
- setActiveBreakPoint("");
35
24
  onChange("");
36
25
  },
37
26
  children: /*#__PURE__*/_jsx(PersonalVideoIcon, {})
@@ -41,7 +30,6 @@ const SwitchViewport = props => {
41
30
  children: /*#__PURE__*/_jsx(IconButton, {
42
31
  className: `${breakpoint === "xs" ? "active" : ""}`,
43
32
  onClick: () => {
44
- setActiveBreakPoint("xs");
45
33
  onChange("xs");
46
34
  },
47
35
  children: /*#__PURE__*/_jsx(PhoneIphoneIcon, {})
@@ -73,11 +73,6 @@ const BackgroundImage = props => {
73
73
  children: "REMOVE"
74
74
  }) : /*#__PURE__*/_jsx(Grid, {
75
75
  className: "uploadImageText",
76
- sx: {
77
- padding: 0,
78
- background: `${theme?.palette?.editor?.inputFieldBgColor}`,
79
- border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
80
- },
81
76
  children: /*#__PURE__*/_jsxs(Button, {
82
77
  component: "label",
83
78
  variant: "text",
@@ -1,7 +1,6 @@
1
1
  import { Box, Card, Checkbox, FormControlLabel, Grid, Tooltip, Typography } from "@mui/material";
2
2
  import React from "react";
3
3
  import Icon from "../../Icon";
4
- import { useEditorContext } from "../../../hooks/useMouseMove";
5
4
  import { jsx as _jsx } from "react/jsx-runtime";
6
5
  import { Fragment as _Fragment } from "react/jsx-runtime";
7
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -16,10 +15,7 @@ const RenderCard = ({
16
15
  return /*#__PURE__*/_jsx(Card, {
17
16
  sx: {
18
17
  position: 'relative',
19
- padding: "10px",
20
- '& .MuiCheckbox-root svg': {
21
- fill: 'unset !important'
22
- }
18
+ padding: "10px"
23
19
  },
24
20
  children: /*#__PURE__*/_jsx(FormControlLabel, {
25
21
  control: /*#__PURE__*/_jsx(Checkbox, {
@@ -85,9 +81,6 @@ const CardsMapping = props => {
85
81
  selectedCard,
86
82
  infoIcon
87
83
  } = data;
88
- const {
89
- theme
90
- } = useEditorContext();
91
84
  const activeCard = value === selectedCard;
92
85
  const handleChange = e => {
93
86
  if (selectedCard === data?.value) {
@@ -106,8 +99,7 @@ const CardsMapping = props => {
106
99
  sx: {
107
100
  marginBottom: "12px",
108
101
  "& .MuiPaper-root": {
109
- background: theme?.palette?.editor?.miniToolBarBackground,
110
- border: activeCard ? "1px solid #2563EB" : `1px solid ${theme?.palette?.editor?.inputFieldBorder}`,
102
+ border: activeCard ? "1px solid #2563EB" : "1px solid #C8D8FA",
111
103
  borderRadius: "8px",
112
104
  boxShadow: activeCard ? "0px 4px 16px 0px #2563EB40" : "unset"
113
105
  }
@@ -18,7 +18,6 @@ import FontSize from "./fontSize";
18
18
  import SelectSwitch from "./selectSwitch";
19
19
  import CardsMapping from "./card";
20
20
  import MetaDataMapping from "./metaDataMapping";
21
- import LineSpacing from "./lineSpacing";
22
21
  const FieldMap = {
23
22
  text: Text,
24
23
  bannerSpacing: BannerSpacing,
@@ -39,7 +38,6 @@ const FieldMap = {
39
38
  fontSize: FontSize,
40
39
  selectSwitch: SelectSwitch,
41
40
  card: CardsMapping,
42
- metadatamapping: MetaDataMapping,
43
- lineSpacing: LineSpacing
41
+ metadatamapping: MetaDataMapping
44
42
  };
45
43
  export default FieldMap;
@@ -25,10 +25,6 @@ const pageSettingsStyle = [{
25
25
  label: "Padding",
26
26
  key: "bannerSpacing",
27
27
  type: "bannerSpacing"
28
- }, {
29
- label: "Line Spacing",
30
- key: "lineHeight",
31
- type: "lineSpacing"
32
28
  }]
33
29
  }, {
34
30
  tab: "Max Width",
@@ -4,7 +4,6 @@ import { convertBase64 } from "../utils/helper";
4
4
  import { uploadFile } from "../service/fileupload";
5
5
  import Icon from "./Icon";
6
6
  import UploadStyles from "../common/ImageSelector/UploadStyles";
7
- import { useEditorContext } from "../hooks/useMouseMove";
8
7
  import { jsx as _jsx } from "react/jsx-runtime";
9
8
  import { Fragment as _Fragment } from "react/jsx-runtime";
10
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -19,9 +18,6 @@ const Uploader = props => {
19
18
  const [base64, setBase64] = useState(value?.url);
20
19
  const [fileName, setFileName] = useState("");
21
20
  const [uploading, setUploading] = useState(false);
22
- const {
23
- theme
24
- } = useEditorContext();
25
21
  const handleChange = async e => {
26
22
  const uFile = e.target.files[0];
27
23
  const strImage = await convertBase64(uFile);
@@ -103,10 +99,6 @@ const Uploader = props => {
103
99
  className: "uploadImageSection",
104
100
  children: base64 ? renderThumb() : /*#__PURE__*/_jsx(Grid, {
105
101
  className: "uploadImageText",
106
- sx: {
107
- background: `${theme?.palette?.editor?.inputFieldBgColor}`,
108
- border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
109
- },
110
102
  children: /*#__PURE__*/_jsxs(Button, {
111
103
  component: "label",
112
104
  variant: "text",
@@ -1654,12 +1654,13 @@ export const CsvIcon = () => /*#__PURE__*/_jsxs("svg", {
1654
1654
  fill: "white"
1655
1655
  })]
1656
1656
  });
1657
- export const CloseIcon = () => /*#__PURE__*/_jsxs("svg", {
1657
+ export const CloseIcon = props => /*#__PURE__*/_jsxs("svg", {
1658
1658
  width: "20",
1659
1659
  height: "20",
1660
1660
  viewBox: "0 0 20 20",
1661
1661
  fill: "none",
1662
1662
  xmlns: "http://www.w3.org/2000/svg",
1663
+ ...(props || {}),
1663
1664
  children: [/*#__PURE__*/_jsx("path", {
1664
1665
  d: "M14.1245 5.875L5.87493 14.1246",
1665
1666
  stroke: "#64748B",
@@ -49,19 +49,15 @@ const useCommonStyle = theme => ({
49
49
  fontWeight: "500",
50
50
  fontFamily: "Inter, sans-serif"
51
51
  },
52
- "& .MuiPaper-root": {
53
- border: `unset !important`,
54
- borderRadius: "0px",
55
- height: "fit-content",
56
- padding: "2px"
57
- },
58
52
  "& p": {
59
53
  marginBottom: "7px",
60
54
  marginTop: "4px"
61
55
  },
62
- "& p": {
63
- marginBottom: "7px",
64
- marginTop: "4px"
56
+ "& .MuiPaper-root": {
57
+ border: 'unset !important',
58
+ borderRadius: '0px',
59
+ height: 'fit-content',
60
+ padding: '2px'
65
61
  },
66
62
  "& .muiIconsListParent": {
67
63
  "& svg": {
@@ -75,12 +71,15 @@ const useCommonStyle = theme => ({
75
71
  },
76
72
  "&::-webkit-scrollbar-thumb": {
77
73
  background: `${theme?.palette?.editor?.brainPopupScroll} !important`
74
+ },
75
+ "&::-webkit-scrollbar-track": {
76
+ visibility: "hidden"
78
77
  }
79
78
  },
80
79
  "& .MuiGrid-root>.MuiGrid-item": {
81
80
  paddingRight: "0px !important",
82
81
  fontFamily: "Inter, sans-serif",
83
- height: "fit-content"
82
+ height: 'fit-content'
84
83
  },
85
84
  "& .MuiInputBase-root": {
86
85
  borderRadius: "10px",
@@ -141,11 +140,11 @@ const useCommonStyle = theme => ({
141
140
  borderRadius: "10px",
142
141
  width: "46px !important",
143
142
  marginLeft: "10px",
144
- height: "36px !important"
143
+ height: '36px !important'
145
144
  }
146
145
  },
147
- "& .MuiFormHelperText-root": {
148
- margin: "4px 0px 0px 0px",
146
+ '& .MuiFormHelperText-root': {
147
+ margin: '4px 0px 0px 0px',
149
148
  color: theme?.palette?.editor?.closeButtonSvgStroke,
150
149
  fontFamily: "Inter, sans-serif"
151
150
  }
@@ -401,14 +400,14 @@ const useCommonStyle = theme => ({
401
400
  padding: "8px 12px",
402
401
  fontSize: "12px",
403
402
  color: theme?.palette?.editor?.menuOptionTextColor,
404
- fontWeight: "500",
403
+ fontWeight: '500',
405
404
  fontFamily: "Inter, sans-serif",
406
- minHeight: "36px",
405
+ minHeight: '36px',
407
406
  "&:hover": {
408
407
  backgroundColor: theme?.palette?.editor?.menuOptionHoverBackground
409
408
  }
410
409
  },
411
- "& .Mui-selected": {
410
+ '& .Mui-selected': {
412
411
  background: `${theme?.palette?.editor?.menuOptionSelectedOption} !important`
413
412
  },
414
413
  "& .MuiListSubheader-root": {
@@ -417,16 +416,16 @@ const useCommonStyle = theme => ({
417
416
  fontSize: "12px"
418
417
  },
419
418
  "& .MuiPaper-root": {
420
- borderRadius: "8px",
421
- padding: "0px",
419
+ borderRadius: '8px',
420
+ padding: '0px',
422
421
  background: `${theme?.palette?.editor?.textWeightPopUpBackground} !important`
423
422
  },
424
- "& .MuiButtonBase-root": {
425
- margin: "4px",
426
- borderRadius: "6px"
423
+ '& .MuiButtonBase-root': {
424
+ margin: '4px',
425
+ borderRadius: '6px'
427
426
  },
428
- "& .MuiList-root": {
429
- padding: "0px"
427
+ '& .MuiList-root': {
428
+ padding: '0px'
430
429
  }
431
430
  },
432
431
  datePicker: {
@@ -471,27 +470,27 @@ const useCommonStyle = theme => ({
471
470
  }
472
471
  }
473
472
  },
473
+ pageSettingPopUpRoot: {
474
+ padding: "16px 8px 16px 10px!important",
475
+ height: "100%"
476
+ },
474
477
  buttonMoreOption: {
475
478
  background: `${theme?.palette?.editor?.aiInputBackground} !important`,
476
479
  border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
477
- padding: "4px !important",
478
- "& svg": {
479
- width: "18px !important",
480
- height: "18px !important",
481
- "& path": {
480
+ padding: '4px !important',
481
+ '& svg': {
482
+ width: '18px !important',
483
+ height: '18px !important',
484
+ '& path': {
482
485
  stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
483
486
  }
484
487
  }
485
488
  },
486
- pageSettingPopUpRoot: {
487
- padding: "16px 8px 16px 10px!important",
488
- height: "100%"
489
- },
490
489
  buttonMoreOption2: {
491
490
  background: `${theme?.palette?.editor?.aiInputBackground} !important`,
492
491
  border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
493
- "& svg": {
494
- "& path": {
492
+ '& svg': {
493
+ '& path': {
495
494
  fill: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
496
495
  }
497
496
  }
@@ -499,11 +498,11 @@ const useCommonStyle = theme => ({
499
498
  buttonMoreOption3: {
500
499
  background: `${theme?.palette?.editor?.aiInputBackground} !important`,
501
500
  border: `1px solid ${theme?.palette?.editor?.buttonBorder1} !important`,
502
- padding: "5px !important",
503
- "& svg": {
504
- width: "16px !important",
505
- height: "16px !important",
506
- "& path": {
501
+ padding: '5px !important',
502
+ '& svg': {
503
+ width: '16px !important',
504
+ height: '16px !important',
505
+ '& path': {
507
506
  stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
508
507
  }
509
508
  }
@@ -511,37 +510,37 @@ const useCommonStyle = theme => ({
511
510
  resizeButton: {
512
511
  background: theme?.palette?.editor?.aiInputBackground,
513
512
  border: `1px solid ${theme?.palette?.editor?.buttonBorder1}`,
514
- padding: "5px !important",
515
- borderRadius: "50% !important",
516
- "& svg": {
517
- width: "18px",
518
- height: "18px",
519
- "& path": {
513
+ padding: '5px !important',
514
+ borderRadius: '50% !important',
515
+ '& svg': {
516
+ width: '18px',
517
+ height: '18px',
518
+ '& path': {
520
519
  fill: `${theme?.palette?.editor?.closeButtonSvgStroke}`
521
520
  }
522
521
  },
523
- "&:hover": {
522
+ '&:hover': {
524
523
  background: theme?.palette?.editor?.aiInputBackground
525
524
  }
526
525
  },
527
526
  gradientFillBtn: {
528
527
  background: `linear-gradient(112.61deg, #2C63ED 19.3%, #8360FD 88.14%) !important`,
529
- textTransform: "math-auto !important",
530
- color: "#FFFFFF !important",
531
- padding: "0px 12px !important",
532
- height: "32px",
533
- borderRadius: "8px",
534
- fontWeight: "500",
535
- fontSize: "14px"
528
+ textTransform: 'math-auto !important',
529
+ color: '#FFFFFF !important',
530
+ padding: '0px 12px !important',
531
+ height: '32px',
532
+ borderRadius: '8px',
533
+ fontWeight: '500',
534
+ fontSize: '14px'
536
535
  },
537
536
  emptyThumbBtn: {
538
537
  background: `${theme?.palette?.editor?.sectionSettingIconHover} !important`,
539
538
  color: `${theme?.palette?.editor?.textColor} !important`,
540
- fontSize: "14px !important",
541
- "& svg": {
542
- width: "20px !important",
543
- height: "20px !important",
544
- "& path": {
539
+ fontSize: '14px !important',
540
+ '& svg': {
541
+ width: '20px !important',
542
+ height: '20px !important',
543
+ '& path': {
545
544
  stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
546
545
  }
547
546
  }
@@ -337,14 +337,14 @@ export const isCarouselSelected = editor => {
337
337
  return false;
338
338
  }
339
339
  const [nodeEntry] = Editor.nodes(editor, {
340
- match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === "carousel"
340
+ match: n => !Editor.isEditor(n) && Element.isElement(n) && n.type === 'carousel'
341
341
  });
342
342
  if (!nodeEntry) {
343
343
  return false;
344
344
  }
345
345
  const [node] = nodeEntry;
346
346
  const carouselDom = ReactEditor.toDOMNode(editor, node);
347
- const isEdit = carouselDom.classList.contains("carousel_slider_edit");
347
+ const isEdit = carouselDom.classList.contains('carousel_slider_edit');
348
348
  return !isEdit;
349
349
  } catch (err) {
350
350
  console.log(err);
@@ -161,27 +161,4 @@ export const groupByBreakpoint = (styleProps, theme) => {
161
161
  }
162
162
  };
163
163
  };
164
- export const getCustomizationValue = value => isNaN(parseInt(value)) ? null : parseInt(value);
165
- export const getBreakpointLineSpacing = (value, breakpoint) => {
166
- try {
167
- const values = getBreakPointsValue(value, breakpoint);
168
- const cssVal = BREAKPOINTS_DEVICES.reduce((a, b) => {
169
- if (values[b] || values["lg"]) {
170
- const value = values[b] || values["lg"];
171
- return {
172
- ...a,
173
- [b]: value
174
- };
175
- } else {
176
- return a;
177
- }
178
- }, {});
179
- if (breakpoint) {
180
- return value[breakpoint] || value["lg"] || value;
181
- } else {
182
- return cssVal["lg"];
183
- }
184
- } catch (err) {
185
- // console.log(err);
186
- }
187
- };
164
+ export const getCustomizationValue = value => isNaN(parseInt(value)) ? null : parseInt(value);
@@ -35,7 +35,6 @@ export const EditorProvider = ({
35
35
  path: null
36
36
  });
37
37
  const [fontFamilies, setFontFamilies] = useState({});
38
- const [activeBreakPoint, setActiveBreakPoint] = useState("");
39
38
  useEffect(() => {
40
39
  window.updateSelectedItem = d => {
41
40
  setSelectedElement(d);
@@ -98,10 +97,8 @@ export const EditorProvider = ({
98
97
  setOpenAI,
99
98
  updateDragging,
100
99
  fontFamilies,
101
- setFontFamilies,
102
- activeBreakPoint,
103
- setActiveBreakPoint
104
- }), [path, editor?.selection, selectedPath, selectedElement, contextMenu, openAI, popupType, drop, activeBreakPoint]);
100
+ setFontFamilies
101
+ }), [path, editor?.selection, selectedPath, selectedElement, contextMenu, openAI, popupType, drop]);
105
102
  return /*#__PURE__*/_jsx(EditorContext.Provider, {
106
103
  value: otherValues,
107
104
  children: children
@@ -39,7 +39,7 @@ const withLayout = editor => {
39
39
  const title = {
40
40
  type: "title",
41
41
  children: [{
42
- text: ""
42
+ text: "Untitled"
43
43
  }]
44
44
  };
45
45
  Transforms.insertNodes(editor, title, {
@@ -173,9 +173,10 @@ export const getMarked = (leaf, children, theme) => {
173
173
  if (leaf.highlight) {
174
174
  children = /*#__PURE__*/_jsx("span", {
175
175
  style: {
176
- color: "inherit",
177
- background: "var(--slate-highlight-bg)"
176
+ color: "inherit"
178
177
  },
178
+ className: "slate-highlight" // while opening AI, we will use this element to highlight the selection. (PopoverAIInput.js)
179
+ ,
179
180
  children: children
180
181
  });
181
182
  }
@@ -337,8 +338,7 @@ export const getBlock = props => {
337
338
  borderRadius: `${element?.color ? "0px" : "12px"} 12px 12px ${element?.color ? "0px" : "12px"}`,
338
339
  margin: `${element?.bgColor ? "16px" : "0px"} 0px`,
339
340
  width: element?.bgColor ? "calc(100% - 16px)" : "100%",
340
- borderWidth: element?.color ? "0px 0px 0px 3px" : "0px",
341
- lineHeight: 1.43
341
+ borderWidth: element?.color ? "0px 0px 0px 3px" : "0px"
342
342
  },
343
343
  children: children
344
344
  });
@@ -398,9 +398,6 @@ export const getBlock = props => {
398
398
  });
399
399
  case "orderedList":
400
400
  return /*#__PURE__*/_jsx("ol", {
401
- style: {
402
- lineHeight: 1.43
403
- },
404
401
  className: "listItemMargin",
405
402
  type: "1",
406
403
  ...attributes,
@@ -408,9 +405,6 @@ export const getBlock = props => {
408
405
  });
409
406
  case "unorderedList":
410
407
  return /*#__PURE__*/_jsx("ul", {
411
- style: {
412
- lineHeight: 1.43
413
- },
414
408
  className: "listItemMargin",
415
409
  ...attributes,
416
410
  children: children
@@ -20,10 +20,10 @@ export const insertButton = editor => {
20
20
  bottomRight: 30
21
21
  },
22
22
  bannerSpacing: {
23
- left: 24,
24
- top: 10,
25
- right: 24,
26
- bottom: 10
23
+ left: 16,
24
+ top: 8,
25
+ right: 16,
26
+ bottom: 8
27
27
  },
28
28
  ...(windowVar.lastButtonProps || {})
29
29
  };
@@ -43,8 +43,7 @@ const useTableResize = ({
43
43
  minWidth
44
44
  } = minMaxProps || {};
45
45
  setSize(currentSize => {
46
- const width = currentSize?.width || parentDOM?.clientWidth;
47
- const calcWidth = width + e.movementX;
46
+ const calcWidth = currentSize?.width + e.movementX;
48
47
  return {
49
48
  width: minWidth && calcWidth < minWidth ? minWidth : calcWidth,
50
49
  height: currentSize.height + e.movementY,
@@ -82,8 +82,7 @@ const splitInlineStyleRanges = (text, inlineStyleRanges, data) => {
82
82
  };
83
83
  export const draftToSlate = props => {
84
84
  const {
85
- data,
86
- needLayout
85
+ data
87
86
  } = props;
88
87
  if (data?.blocks && data?.blocks?.length > 0) {
89
88
  const converted = data?.blocks?.reduce((a, b) => {
@@ -105,7 +104,7 @@ export const draftToSlate = props => {
105
104
  return data;
106
105
  } else {
107
106
  return [{
108
- type: needLayout ? "title" : "paragraph",
107
+ type: "paragraph",
109
108
  children: [{
110
109
  text: ""
111
110
  }]