@flozy/editor 3.6.9 → 3.7.0

Sign up to get free protection for your applications and to get access to all the features.
Files changed (100) hide show
  1. package/dist/Editor/CommonEditor.js +111 -169
  2. package/dist/Editor/Elements/Accordion/Accordion.js +7 -74
  3. package/dist/Editor/Elements/Accordion/AccordionBtnPopup.js +2 -3
  4. package/dist/Editor/Elements/Accordion/AccordionSummary.js +60 -4
  5. package/dist/Editor/Elements/AppHeader/AppHeader.js +15 -39
  6. package/dist/Editor/Elements/Button/EditorButton.js +18 -34
  7. package/dist/Editor/Elements/ChipText/ChipText.js +3 -3
  8. package/dist/Editor/Elements/Color Picker/ColorButtons.js +17 -60
  9. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  10. package/dist/Editor/Elements/Color Picker/ColorPicker.js +4 -4
  11. package/dist/Editor/Elements/Color Picker/Styles.js +1 -2
  12. package/dist/Editor/Elements/Embed/Frames/ImageFrame.js +0 -1
  13. package/dist/Editor/Elements/Emoji/EmojiButton.js +2 -2
  14. package/dist/Editor/Elements/Emoji/EmojiPicker.js +0 -16
  15. package/dist/Editor/Elements/Form/Workflow/UserInputs.js +1 -2
  16. package/dist/Editor/Elements/Grid/Grid.js +1 -3
  17. package/dist/Editor/Elements/Grid/GridItem.js +2 -4
  18. package/dist/Editor/Elements/InlineIcon/InlineIcon.js +3 -2
  19. package/dist/Editor/Elements/Link/Link.js +1 -6
  20. package/dist/Editor/Elements/Link/LinkButton.js +2 -4
  21. package/dist/Editor/Elements/Link/LinkPopup.js +3 -11
  22. package/dist/Editor/Elements/List/CheckList.js +2 -6
  23. package/dist/Editor/Elements/Table/TableCell.js +1 -1
  24. package/dist/Editor/MiniEditor.js +1 -3
  25. package/dist/Editor/Styles/EditorStyles.js +2 -3
  26. package/dist/Editor/Toolbar/Basic/index.js +2 -4
  27. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +2 -26
  28. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  29. package/dist/Editor/Toolbar/FormatTools/TextSize.js +11 -5
  30. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +11 -4
  31. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +86 -213
  32. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +1 -2
  33. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +13 -20
  34. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +7 -52
  35. package/dist/Editor/Toolbar/PopupTool/index.js +11 -12
  36. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  37. package/dist/Editor/common/ColorPickerButton.js +9 -25
  38. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  39. package/dist/Editor/common/Icon.js +2 -30
  40. package/dist/Editor/common/LinkSettings/NavComponents.js +20 -54
  41. package/dist/Editor/common/MentionsPopup/MentionsListCard.js +2 -5
  42. package/dist/Editor/common/MentionsPopup/Styles.js +3 -6
  43. package/dist/Editor/common/Shorthands/elements.js +0 -54
  44. package/dist/Editor/common/StyleBuilder/accordionTitleBtnStyle.js +7 -7
  45. package/dist/Editor/common/StyleBuilder/accordionTitleStyle.js +16 -16
  46. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  47. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +3 -13
  48. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  49. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +7 -31
  50. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +4 -13
  51. package/dist/Editor/common/StyleBuilder/fieldTypes/icons.js +28 -12
  52. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +4 -14
  53. package/dist/Editor/common/StyleBuilder/index.js +1 -1
  54. package/dist/Editor/helper/index.js +0 -15
  55. package/dist/Editor/helper/theme.js +4 -190
  56. package/dist/Editor/hooks/useMouseMove.js +6 -15
  57. package/dist/Editor/plugins/withEmbeds.js +1 -1
  58. package/dist/Editor/plugins/withHTML.js +5 -47
  59. package/dist/Editor/plugins/withLayout.js +10 -15
  60. package/dist/Editor/plugins/withTable.js +2 -2
  61. package/dist/Editor/theme/ThemeList.js +173 -50
  62. package/dist/Editor/utils/SlateUtilityFunctions.js +25 -157
  63. package/dist/Editor/utils/button.js +17 -1
  64. package/dist/Editor/utils/events.js +4 -11
  65. package/dist/Editor/utils/font.js +37 -40
  66. package/dist/Editor/utils/helper.js +22 -104
  67. package/dist/Editor/utils/serializeToHTML.js +13 -25
  68. package/dist/index.js +1 -5
  69. package/package.json +4 -4
  70. package/dist/Editor/ChatEditor.js +0 -211
  71. package/dist/Editor/Elements/Link/LinkPopupStyles.js +0 -28
  72. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -438
  73. package/dist/Editor/assets/svg/ThemeIcons.js +0 -291
  74. package/dist/Editor/common/CustomColorPicker/index.js +0 -106
  75. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  76. package/dist/Editor/common/CustomDialog/index.js +0 -94
  77. package/dist/Editor/common/CustomDialog/style.js +0 -67
  78. package/dist/Editor/common/CustomSelect.js +0 -33
  79. package/dist/Editor/common/EditorCmds.js +0 -35
  80. package/dist/Editor/common/MUIIcon/index.js +0 -48
  81. package/dist/Editor/common/StyleBuilder/fieldTypes/loadIcon.js +0 -13
  82. package/dist/Editor/common/StyleBuilder/fieldTypes/mui_filled_icons.js +0 -2
  83. package/dist/Editor/hooks/useEditorTheme.js +0 -139
  84. package/dist/Editor/theme/index.js +0 -144
  85. package/dist/Editor/themeSettings/ActiveTheme.js +0 -72
  86. package/dist/Editor/themeSettings/buttons/index.js +0 -290
  87. package/dist/Editor/themeSettings/buttons/style.js +0 -21
  88. package/dist/Editor/themeSettings/colorTheme/index.js +0 -290
  89. package/dist/Editor/themeSettings/colorTheme/style.js +0 -77
  90. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -123
  91. package/dist/Editor/themeSettings/fonts/index.js +0 -213
  92. package/dist/Editor/themeSettings/fonts/style.js +0 -44
  93. package/dist/Editor/themeSettings/icons.js +0 -60
  94. package/dist/Editor/themeSettings/index.js +0 -320
  95. package/dist/Editor/themeSettings/style.js +0 -152
  96. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  97. package/dist/Editor/themeSettingsAI/index.js +0 -356
  98. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -190
  99. package/dist/Editor/themeSettingsAI/style.js +0 -247
  100. package/dist/Editor/utils/chatEditor/SlateUtilityFunctions.js +0 -361
@@ -1,247 +0,0 @@
1
- const style = () => ({
2
- ".fs-12": {
3
- fontSize: "12px"
4
- },
5
- ".fs-14": {
6
- fontSize: "14px"
7
- },
8
- ".fw-500": {
9
- fontWeight: "500"
10
- },
11
- ".fw-600": {
12
- fontWeight: "600"
13
- },
14
- ".pointer": {
15
- cursor: "pointer"
16
- },
17
- ".transformNone": {
18
- textTransform: "none"
19
- },
20
- ".settingsContainer": {
21
- width: "340px",
22
- padding: "16px 16px",
23
- background: "#fff",
24
- ".header": {
25
- borderBottom: `1px solid #DCE4EC`,
26
- paddingBottom: "8px"
27
- // marginBottom: "16px",
28
- }
29
- },
30
-
31
- ".title": {
32
- fontWeight: "700",
33
- fontSize: "14px"
34
- },
35
- ".closeBtn": {
36
- width: "26px",
37
- height: "26px",
38
- BorderRadius: "4px",
39
- flexShrik: "0",
40
- padding: "4px",
41
- background: " #F8FAFC",
42
- borderRadius: "4px"
43
- },
44
- ".MuiTabs-scroller": {
45
- borderBottom: `1px solid #DCE4EC`
46
- },
47
- ".themeCardWrapper": {
48
- borderRadius: "4px",
49
- ".active": {
50
- background: "#ECF2FF"
51
- }
52
- },
53
- ".primaryCard, .secondaryCard": {
54
- width: "44px",
55
- height: "44px",
56
- borderRadius: "5px",
57
- border: `1px solid #929292`
58
- },
59
- ".flexAlign": {
60
- display: "flex",
61
- alignItems: "center"
62
- },
63
- ".activeColorBox, .xsColorBox": {
64
- width: "24px",
65
- height: "24px",
66
- borderRadius: "5px",
67
- border: `1px solid #929292`
68
- },
69
- ".themeCard": {
70
- borderRadius: "7px",
71
- padding: "16px",
72
- border: "1px solid #F3F3F3",
73
- boxShadow: "1px 2px 5px 0px #00000014",
74
- position: "relative",
75
- flexWrap: "nowrap",
76
- ".tickIcon": {
77
- visibility: "hidden",
78
- opacity: "0",
79
- position: "absolute",
80
- right: "-8px",
81
- top: "-8px"
82
- },
83
- "&.selected": {
84
- ".tickIcon": {
85
- visibility: "visible",
86
- opacity: "1"
87
- }
88
- }
89
- },
90
- ".otherColors": {
91
- display: "flex",
92
- flexWrap: "wrap",
93
- width: "48px",
94
- ".smallCard": {
95
- width: "20px",
96
- height: "20px",
97
- borderRadius: "5px",
98
- border: `1px solid #929292`
99
- }
100
- },
101
- ".imageUpload": {
102
- background: "#F3F3F3",
103
- borderRadius: "12px",
104
- padding: "10px",
105
- height: "208px",
106
- position: "relative",
107
- "& .resetIcon": {
108
- position: "absolute",
109
- right: "10px",
110
- top: "10px"
111
- },
112
- ".changeImgText": {
113
- position: "absolute",
114
- left: "50%",
115
- top: "50%",
116
- transform: "translate(-50%, -50%)",
117
- zIndex: 1,
118
- background: "#0000004D",
119
- color: "#fff",
120
- padding: "6px",
121
- borderRadius: "6px",
122
- fontSize: "12px",
123
- fontWeight: 600,
124
- opacity: "0",
125
- visibility: "hidden"
126
- },
127
- "&:hover": {
128
- ".changeImgText": {
129
- opacity: "1",
130
- visibility: "visible"
131
- }
132
- }
133
- },
134
- ".imgUploadInner": {
135
- background: "#fff",
136
- borderRadius: "10px",
137
- border: "0.79px dashed #8360FD",
138
- height: "100%"
139
- },
140
- ".outlineBtn": {
141
- color: "#2563EB",
142
- borderRadius: "8px",
143
- boxShadow: "0px 4px 10px 0px #00000026",
144
- border: "1px solid #2563EB",
145
- background: "#EBF1F9",
146
- height: "34px",
147
- textTransform: "unset"
148
- },
149
- ".seondaryOutlineBtn": {
150
- border: "1px solid #D8DDE1",
151
- borderRadius: "8px",
152
- // boxShadow: "0px 4px 10px 0px #00000026",
153
- height: "34px",
154
- textTransform: "unset",
155
- background: "#eceef3",
156
- color: "#64748B"
157
- },
158
- ".blueBtn": {
159
- boxShadow: "0px 4px 10px 0px #00000026",
160
- background: "#2563EB",
161
- borderRadius: "8px",
162
- textTransform: "unset",
163
- height: "34px",
164
- color: "#fff",
165
- "&.disabled": {
166
- background: "#D9D9DD !important",
167
- color: "#fff !important"
168
- }
169
- },
170
- ".generatedItem": {
171
- border: "1px solid #E4E6E9",
172
- borderRadius: "7px",
173
- padding: "14px",
174
- display: "flex",
175
- gap: "16px",
176
- position: "relative",
177
- justifyContent: "space-between",
178
- marginBottom: "12px",
179
- ".tickIcon": {
180
- visibility: "hidden",
181
- opacity: "0",
182
- position: "absolute",
183
- right: "-8px",
184
- top: "-8px"
185
- },
186
- "&.selected": {
187
- border: "1px solid #2563EB",
188
- boxShadow: " 3px 3px 8px 0px #2563EB40",
189
- ".tickIcon": {
190
- visibility: "visible",
191
- opacity: "1"
192
- }
193
- },
194
- ".colorBox": {
195
- border: "1px solid #929292",
196
- height: "28px",
197
- width: "28px",
198
- borderRadius: "5px"
199
- }
200
- },
201
- ".textArea": {
202
- background: "#F3F3F3",
203
- borderRadius: "12px",
204
- padding: "10px",
205
- height: "208px",
206
- "& textarea": {
207
- width: "100%",
208
- height: "100% !important",
209
- border: "0.79px solid #8360FD",
210
- background: "#FFFFFF",
211
- borderRadius: "8px",
212
- padding: "10px"
213
- }
214
- },
215
- ".imageUrl": {
216
- height: "auto !important",
217
- ".MuiOutlinedInput-root": {
218
- border: "0.79px solid #8360FD",
219
- background: "#FFFFFF",
220
- borderRadius: "8px",
221
- ".tickIcon": {
222
- width: "18px"
223
- }
224
- },
225
- "&.invalidUrl": {
226
- ".MuiInputAdornment-root": {
227
- ".tickIcon": {
228
- ".fillPath": {
229
- fill: "#D9D9DD!important"
230
- }
231
- }
232
- }
233
- }
234
- },
235
- ".saveThemeContainer": {
236
- ".MuiOutlinedInput-root": {
237
- borderRadius: "8px",
238
- boxShadow: "0px 4px 16px 0px #0000000D"
239
- }
240
- },
241
- ".uploadedImage": {
242
- width: "126px",
243
- height: "126px",
244
- borderRadius: "126px"
245
- }
246
- });
247
- export default style;
@@ -1,361 +0,0 @@
1
- import { Editor, Transforms, Element as SlateElement } from "slate";
2
- import { Box } from "@mui/material";
3
- import { fontFamilyMap, sizeMap } from "../font";
4
- import Table from "../../Elements/Table/Table";
5
- import TableRow from "../../Elements/Table/TableRow";
6
- import TableCell from "../../Elements/Table/TableCell";
7
- import Mentions from "../../Elements/Mentions/Mentions";
8
- import CheckList from "../../Elements/List/CheckList";
9
- import { isEmptyTextNode } from "../../helper";
10
- import { getBreakPointsValue } from "../../helper/theme";
11
- import insertNewLine from "../insertNewLine";
12
- import { getBorderColor } from "../helper";
13
- import { jsx as _jsx } from "react/jsx-runtime";
14
- const alignment = ["alignLeft", "alignRight", "alignCenter"];
15
- const list_types = ["orderedList", "unorderedList"];
16
- const LIST_FORMAT_TYPE = {
17
- orderedList: "list-item",
18
- unorderedList: "list-item"
19
- };
20
- const NEWLINESAFTER = ["headingOne", "headingTwo", "headingThree"];
21
- export const toggleBlock = (editor, format, selection = true, attr = {}) => {
22
- const isActive = isBlockActive(editor, format);
23
- const isList = list_types.includes(format);
24
- const isIndent = alignment.includes(format);
25
- const isAligned = alignment.some(alignmentType => isBlockActive(editor, alignmentType));
26
-
27
- /*If the node is already aligned and change in indent is called we should unwrap it first and split the node to prevent
28
- messy, nested DOM structure and bugs due to that.*/
29
- if (isAligned && isIndent) {
30
- Transforms.unwrapNodes(editor, {
31
- match: n => alignment.includes(!Editor.isEditor(n) && SlateElement.isElement(n) && n.type),
32
- split: true
33
- });
34
- }
35
-
36
- /* Wraping the nodes for alignment, to allow it to co-exist with other block level operations*/
37
- if (isIndent) {
38
- Transforms.wrapNodes(editor, {
39
- type: format,
40
- children: []
41
- });
42
- return;
43
- }
44
- Transforms.unwrapNodes(editor, {
45
- match: n => list_types.includes(!Editor.isEditor(n) && SlateElement.isElement(n) && n.type),
46
- split: true
47
- });
48
-
49
- // inserting blocks from "/"" commands remove searched word
50
- if (!selection) {
51
- Transforms.insertText(editor, "");
52
- }
53
- Transforms.setNodes(editor, {
54
- type: isActive ? "paragraph" : isList ? LIST_FORMAT_TYPE[format] : format,
55
- ...attr
56
- });
57
- if (isList && !isActive) {
58
- Transforms.wrapNodes(editor, {
59
- type: format,
60
- children: []
61
- });
62
- }
63
- if (NEWLINESAFTER.indexOf(format) > -1) {
64
- insertNewLine(editor);
65
- }
66
- };
67
- export const addMarkData = (editor, data) => {
68
- try {
69
- Editor.addMark(editor, data.format, data.value);
70
- } catch (err) {
71
- console.log(err);
72
- }
73
- };
74
- export const toggleMark = (editor, format) => {
75
- const isActive = isMarkActive(editor, format);
76
- if (isActive) {
77
- Editor.removeMark(editor, format);
78
- } else {
79
- Editor.addMark(editor, format, true);
80
- }
81
- };
82
- export const isMarkActive = (editor, format) => {
83
- try {
84
- const marks = Editor.marks(editor);
85
- return marks ? marks[format] === true : false;
86
- } catch (err) {
87
- console.log(err);
88
- return null;
89
- }
90
- };
91
- export const isBlockActive = (editor, format) => {
92
- const [match] = Editor.nodes(editor, {
93
- match: n => !Editor.isEditor(n) && SlateElement.isElement(n) && n.type === format
94
- });
95
- return !!match;
96
- };
97
- export const getBlockActive = (editor, format) => {
98
- const [match] = Editor.nodes(editor, {
99
- match: n => !Editor.isEditor(n) && SlateElement.isElement(n) && n.type === format
100
- });
101
- return {
102
- isActive: !!match,
103
- props: match && match[0]
104
- };
105
- };
106
- export const upateBlockActive = (editor, format, attr = {}) => {
107
- const [match] = Editor.nodes(editor, {
108
- match: n => !Editor.isEditor(n) && SlateElement.isElement(n) && n.type === format
109
- });
110
- if (match && match[1] !== undefined) {
111
- Transforms.setNodes(editor, attr, {
112
- at: match[1]
113
- });
114
- }
115
- };
116
- export const activeMark = (editor, format) => {
117
- const defaultMarkData = {
118
- color: "#000000",
119
- bgColor: "#FFFFFF",
120
- fontSize: "normal",
121
- fontFamily: "PoppinsRegular",
122
- fontWeight: "normal"
123
- };
124
- try {
125
- const marks = Editor.marks(editor);
126
- const defaultValue = defaultMarkData[format];
127
- return marks?.[format] ?? defaultValue;
128
- } catch (err) {
129
- console.log(err);
130
- return null;
131
- }
132
- };
133
- export const getMarked = (leaf, children) => {
134
- const className = leaf?.doublequote ? "doublequote" : "";
135
- if (leaf.bold) {
136
- children = /*#__PURE__*/_jsx("strong", {
137
- children: children
138
- });
139
- }
140
- if (leaf.code) {
141
- children = /*#__PURE__*/_jsx("code", {
142
- children: children
143
- });
144
- }
145
- if (leaf.italic) {
146
- children = /*#__PURE__*/_jsx("em", {
147
- children: children
148
- });
149
- }
150
- if (leaf.strikethrough) {
151
- children = /*#__PURE__*/_jsx("span", {
152
- style: {
153
- textDecoration: "line-through"
154
- },
155
- children: children
156
- });
157
- }
158
- if (leaf.underline) {
159
- children = /*#__PURE__*/_jsx("u", {
160
- children: children
161
- });
162
- }
163
- if (leaf.superscript) {
164
- children = /*#__PURE__*/_jsx("sup", {
165
- children: children
166
- });
167
- }
168
- if (leaf.subscript) {
169
- children = /*#__PURE__*/_jsx("sub", {
170
- children: children
171
- });
172
- }
173
- // cover under single span
174
- if (leaf.color || leaf.bgColor || leaf.fontSize || leaf.fontFamily || leaf.fontWeight || className) {
175
- const family = fontFamilyMap[leaf?.fontFamily];
176
- const textStyles = leaf?.color?.indexOf("gradient") >= 0 ? {
177
- background: leaf?.color?.concat("text"),
178
- WebkitBackgroundClip: "text",
179
- WebkitTextFillColor: "transparent"
180
- } : {
181
- color: leaf.color
182
- };
183
- children = /*#__PURE__*/_jsx("span", {
184
- style: {
185
- background: leaf.bgColor
186
- },
187
- children: /*#__PURE__*/_jsx(Box, {
188
- className: className,
189
- component: "span",
190
- sx: {
191
- fontSize: {
192
- lg: sizeMap[leaf.fontSize] || leaf.fontSize,
193
- ...getBreakPointsValue(leaf.fontSize, null, "overrideText")
194
- },
195
- ...textStyles,
196
- fontFamily: family,
197
- fontWeight: leaf.fontWeight
198
- },
199
- children: children
200
- })
201
- });
202
- }
203
- if (leaf.decoration === "link") {
204
- children = /*#__PURE__*/_jsx("a", {
205
- style: {
206
- cursor: "pointer"
207
- },
208
- rel: "noreferrer",
209
- target: "_blank",
210
- href: leaf.text,
211
- children: children
212
- });
213
- }
214
- return children;
215
- };
216
- export const getBlock = props => {
217
- const {
218
- element,
219
- children
220
- } = props;
221
- const attributes = props.attributes ?? {};
222
- const isEmpty = isEmptyTextNode(element);
223
- switch (element.type) {
224
- case "paragraph":
225
- return /*#__PURE__*/_jsx("p", {
226
- ...attributes,
227
- ...element.attr,
228
- className: `content-editable ${isEmpty ? "empty" : ""}`
229
- // placeholder="paragraph"
230
- ,
231
- children: children
232
- });
233
- case "headingOne":
234
- return /*#__PURE__*/_jsx("h1", {
235
- ...attributes,
236
- ...element.attr,
237
- className: `content-editable ${isEmpty ? "empty" : ""}`
238
- // placeholder="Heading 1"
239
- ,
240
- children: children
241
- });
242
- case "headingTwo":
243
- return /*#__PURE__*/_jsx("h2", {
244
- ...attributes,
245
- ...element.attr,
246
- className: `content-editable ${isEmpty ? "empty" : ""}`
247
- // placeholder="Heading 2"
248
- ,
249
- children: children
250
- });
251
- case "headingThree":
252
- return /*#__PURE__*/_jsx("h3", {
253
- ...attributes,
254
- ...element.attr,
255
- className: `content-editable ${isEmpty ? "empty" : ""}`
256
- // placeholder="Heading 3"
257
- ,
258
- children: children
259
- });
260
- case "blockquote":
261
- return /*#__PURE__*/_jsx("blockquote", {
262
- ...attributes,
263
- ...element.attr,
264
- style: {
265
- // borderColor: element?.color || "transparent",
266
- ...getBorderColor(element?.color || "transparent", 3),
267
- background: element?.bgColor || "none",
268
- padding: `${element?.bgColor ? "16px" : "0px"} 8px`,
269
- borderRadius: `${element?.color ? "0px" : "12px"} 12px 12px ${element?.color ? "0px" : "12px"}`,
270
- margin: `${element?.bgColor ? "16px" : "0px"} 0px`,
271
- width: element?.bgColor ? "calc(100% - 16px)" : "100%",
272
- borderWidth: element?.color ? "0px 0px 0px 3px" : "0px"
273
- },
274
- children: children
275
- });
276
- case "alignLeft":
277
- return /*#__PURE__*/_jsx("div", {
278
- ...attributes,
279
- ...element.attr,
280
- children: children
281
- });
282
- case "alignCenter":
283
- return /*#__PURE__*/_jsx("div", {
284
- style: {
285
- display: "flex",
286
- alignItems: "center",
287
- flexDirection: "column",
288
- textAlign: "center"
289
- },
290
- ...attributes,
291
- ...element.attr,
292
- children: children
293
- });
294
- case "alignRight":
295
- return /*#__PURE__*/_jsx("div", {
296
- style: {
297
- display: "flex",
298
- alignItems: "flex-end",
299
- flexDirection: "column",
300
- textAlign: "right"
301
- },
302
- ...attributes,
303
- ...element.attr,
304
- children: children
305
- });
306
- case "list-item":
307
- const firstChildren = element.children[0] || {};
308
- return /*#__PURE__*/_jsx("li", {
309
- ...attributes,
310
- ...element.attr,
311
- className: `content-editable ${isEmpty ? "empty" : ""}`,
312
- placeholder: "List",
313
- style: {
314
- color: firstChildren?.color
315
- },
316
- children: children
317
- });
318
- case "orderedList":
319
- return /*#__PURE__*/_jsx("ol", {
320
- type: "1",
321
- ...attributes,
322
- children: children
323
- });
324
- case "unorderedList":
325
- return /*#__PURE__*/_jsx("ul", {
326
- ...attributes,
327
- children: children
328
- });
329
- case "check-list-item":
330
- return /*#__PURE__*/_jsx(CheckList, {
331
- ...props,
332
- isEmpty: isEmpty
333
- });
334
- case "table":
335
- return /*#__PURE__*/_jsx(Table, {
336
- ...props
337
- });
338
- case "table-head":
339
- return /*#__PURE__*/_jsx("thead", {
340
- children: children
341
- });
342
- case "table-body":
343
- return /*#__PURE__*/_jsx("tbody", {
344
- children: children
345
- });
346
- case "table-row":
347
- return /*#__PURE__*/_jsx(TableRow, {
348
- ...props
349
- });
350
- case "table-cell":
351
- return /*#__PURE__*/_jsx(TableCell, {
352
- ...props
353
- });
354
- case "mention":
355
- return /*#__PURE__*/_jsx(Mentions, {
356
- ...props
357
- });
358
- default:
359
- return;
360
- }
361
- };