@flozy/editor 11.1.9 → 11.2.2

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 (141) hide show
  1. package/dist/Editor/ChatEditor.js +7 -7
  2. package/dist/Editor/CommonEditor.js +24 -86
  3. package/dist/Editor/DialogWrapper.js +25 -31
  4. package/dist/Editor/Editor.css +4 -37
  5. package/dist/Editor/Elements/AI/PopoverAIInput.js +3 -11
  6. package/dist/Editor/Elements/AppHeader/AppHeader.js +3 -3
  7. package/dist/Editor/Elements/Attachments/Attachments.js +11 -154
  8. package/dist/Editor/Elements/Attachments/AttachmentsButton.js +3 -8
  9. package/dist/Editor/Elements/Button/EditorButton.js +7 -22
  10. package/dist/Editor/Elements/Color Picker/ColorButtons.js +14 -61
  11. package/dist/Editor/Elements/Color Picker/ColorPicker.css +1 -25
  12. package/dist/Editor/Elements/Color Picker/ColorPicker.js +7 -10
  13. package/dist/Editor/Elements/Color Picker/Styles.js +13 -15
  14. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/Select.js +55 -134
  15. package/dist/Editor/Elements/DataView/Layouts/DataTypes/Components/SelectV1.js +8 -7
  16. package/dist/Editor/Elements/DataView/Layouts/DataTypes/PersonType.js +3 -8
  17. package/dist/Editor/Elements/DataView/Layouts/Options/EditProperty.js +1 -1
  18. package/dist/Editor/Elements/DataView/Layouts/TableStyles.js +1 -1
  19. package/dist/Editor/Elements/Embed/Embed.js +43 -37
  20. package/dist/Editor/Elements/Embed/Image.js +22 -242
  21. package/dist/Editor/Elements/Embed/Video.js +32 -277
  22. package/dist/Editor/Elements/EmbedScript/EmbedScriptPopup.js +6 -9
  23. package/dist/Editor/Elements/EmbedScript/styles.js +1 -17
  24. package/dist/Editor/Elements/Form/FormField.js +1 -1
  25. package/dist/Editor/Elements/Form/Workflow/Styles.js +22 -24
  26. package/dist/Editor/Elements/Form/Workflow/constant.js +1 -25
  27. package/dist/Editor/Elements/FreeGrid/FreeGrid.js +76 -37
  28. package/dist/Editor/Elements/FreeGrid/FreeGridBox.js +5 -9
  29. package/dist/Editor/Elements/FreeGrid/FreeGridItem.js +1 -3
  30. package/dist/Editor/Elements/FreeGrid/styles.js +0 -15
  31. package/dist/Editor/Elements/Grid/GridItem.js +1 -1
  32. package/dist/Editor/Elements/PageSettings/PageSettingsButton.js +1 -2
  33. package/dist/Editor/Elements/Table/Table.js +1 -2
  34. package/dist/Editor/Elements/Table/TableCell.js +3 -10
  35. package/dist/Editor/Elements/Title/title.js +5 -4
  36. package/dist/Editor/Elements/TopBanner/TopBanner.js +2 -4
  37. package/dist/Editor/Elements/TopBanner/TopBannerButton.js +3 -5
  38. package/dist/Editor/Styles/EditorStyles.js +5 -19
  39. package/dist/Editor/Toolbar/FormatTools/Dropdown.js +3 -27
  40. package/dist/Editor/Toolbar/FormatTools/FontFamilyAutocomplete.js +3 -4
  41. package/dist/Editor/Toolbar/FormatTools/MarkButton.js +2 -2
  42. package/dist/Editor/Toolbar/FormatTools/TextSize.js +29 -33
  43. package/dist/Editor/Toolbar/Mini/MiniToolbar.js +1 -2
  44. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/MiniColorPicker.js +1 -3
  45. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectFontSize.js +23 -25
  46. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/SelectTypography.js +42 -167
  47. package/dist/Editor/Toolbar/PopupTool/MiniTextFormat/index.js +5 -15
  48. package/dist/Editor/Toolbar/PopupTool/PopperHeader.js +1 -2
  49. package/dist/Editor/Toolbar/PopupTool/PopupToolStyle.js +7 -65
  50. package/dist/Editor/Toolbar/PopupTool/TextFormat.js +12 -66
  51. package/dist/Editor/Toolbar/PopupTool/index.js +4 -6
  52. package/dist/Editor/Toolbar/toolbarGroups.js +6 -48
  53. package/dist/Editor/common/ColorPickerButton.js +19 -38
  54. package/dist/Editor/common/DnD/DragHandleButton.js +1 -1
  55. package/dist/Editor/common/FontLoader/FontLoader.js +0 -1
  56. package/dist/Editor/common/Icon.js +0 -28
  57. package/dist/Editor/common/ImageSelector/ImageSelector.js +7 -45
  58. package/dist/Editor/common/ImageSelector/Options/Upload.js +11 -26
  59. package/dist/Editor/common/ImageSelector/Styles.js +9 -3
  60. package/dist/Editor/common/RnD/ElementSettings/OtherSettings/Settings.js +1 -2
  61. package/dist/Editor/common/RnD/ElementSettings/Settings/AppHeaderSettings.js +2 -3
  62. package/dist/Editor/common/RnD/ElementSettings/Settings/BoxSettings.js +2 -3
  63. package/dist/Editor/common/RnD/ElementSettings/Settings/ButtonSettings.js +2 -3
  64. package/dist/Editor/common/RnD/ElementSettings/Settings/CodeSettings.js +2 -3
  65. package/dist/Editor/common/RnD/ElementSettings/Settings/FormSettings.js +2 -3
  66. package/dist/Editor/common/RnD/ElementSettings/Settings/ImageSettings.js +7 -20
  67. package/dist/Editor/common/RnD/ElementSettings/Settings/TableSettings.js +2 -3
  68. package/dist/Editor/common/RnD/ElementSettings/Settings/TextSettings.js +0 -2
  69. package/dist/Editor/common/RnD/ElementSettings/Settings/VideoSettings.js +7 -20
  70. package/dist/Editor/common/RnD/GuideLines/styles.js +1 -1
  71. package/dist/Editor/common/RnD/Theme/ViewportStimulator.js +3 -6
  72. package/dist/Editor/common/RnD/Utils/gridDropItem.js +11 -28
  73. package/dist/Editor/common/RnD/Utils/index.js +1 -3
  74. package/dist/Editor/common/RnD/VirtualElement/VirtualTextElement.js +63 -52
  75. package/dist/Editor/common/RnD/VirtualElement/helper.js +68 -248
  76. package/dist/Editor/common/RnD/VirtualElement/styles.js +0 -22
  77. package/dist/Editor/common/RnD/index.js +14 -61
  78. package/dist/Editor/common/Shorthands/elements.js +0 -54
  79. package/dist/Editor/common/StyleBuilder/buttonStyle.js +2 -4
  80. package/dist/Editor/common/StyleBuilder/embedVideoStyle.js +0 -4
  81. package/dist/Editor/common/StyleBuilder/fieldStyle.js +0 -1
  82. package/dist/Editor/common/StyleBuilder/fieldTypes/backgroundImage.js +2 -10
  83. package/dist/Editor/common/StyleBuilder/fieldTypes/bannerSpacing.js +2 -12
  84. package/dist/Editor/common/StyleBuilder/fieldTypes/borderRadius.js +7 -15
  85. package/dist/Editor/common/StyleBuilder/fieldTypes/color.js +10 -36
  86. package/dist/Editor/common/StyleBuilder/fieldTypes/fontSize.js +4 -13
  87. package/dist/Editor/common/StyleBuilder/fieldTypes/menusArray.js +0 -2
  88. package/dist/Editor/common/StyleBuilder/fieldTypes/text.js +4 -16
  89. package/dist/Editor/common/StyleBuilder/fieldTypes/textOptions.js +7 -15
  90. package/dist/Editor/common/StyleBuilder/formStyle.js +13 -19
  91. package/dist/Editor/common/StyleBuilder/index.js +4 -8
  92. package/dist/Editor/common/Uploader.js +17 -118
  93. package/dist/Editor/common/iconslist.js +0 -21
  94. package/dist/Editor/commonStyle.js +53 -111
  95. package/dist/Editor/helper/index.js +1 -4
  96. package/dist/Editor/helper/theme.js +2 -203
  97. package/dist/Editor/hooks/useMouseMove.js +3 -12
  98. package/dist/Editor/hooks/useTable.js +1 -62
  99. package/dist/Editor/plugins/withEmbeds.js +1 -1
  100. package/dist/Editor/plugins/withHTML.js +3 -56
  101. package/dist/Editor/plugins/withTable.js +1 -1
  102. package/dist/Editor/service/fileupload.js +0 -70
  103. package/dist/Editor/theme/ThemeList.js +173 -50
  104. package/dist/Editor/utils/SlateUtilityFunctions.js +38 -163
  105. package/dist/Editor/utils/accordion.js +1 -1
  106. package/dist/Editor/utils/button.js +17 -1
  107. package/dist/Editor/utils/font.js +37 -40
  108. package/dist/Editor/utils/formfield.js +2 -2
  109. package/dist/Editor/utils/helper.js +3 -101
  110. package/dist/Editor/utils/insertAppHeader.js +4 -8
  111. package/package.json +1 -1
  112. package/dist/Editor/Elements/Attachments/AttachmentStyles.js +0 -16
  113. package/dist/Editor/Elements/FreeGrid/helper.js +0 -194
  114. package/dist/Editor/Toolbar/PopupTool/ThemeTextFormat.js +0 -439
  115. package/dist/Editor/assets/svg/BackIcon.js +0 -18
  116. package/dist/Editor/assets/svg/ThemeIcons.js +0 -293
  117. package/dist/Editor/common/CustomColorPicker/index.js +0 -130
  118. package/dist/Editor/common/CustomColorPicker/style.js +0 -53
  119. package/dist/Editor/common/CustomDialog2/index.js +0 -94
  120. package/dist/Editor/common/CustomDialog2/style.js +0 -67
  121. package/dist/Editor/common/CustomSelect.js +0 -43
  122. package/dist/Editor/common/RnD/Theme/MainThemeProvider.js +0 -17
  123. package/dist/Editor/common/UploaderWithProgress.js +0 -183
  124. package/dist/Editor/hooks/useEditorTheme.js +0 -153
  125. package/dist/Editor/hooks/useThemeValues.js +0 -63
  126. package/dist/Editor/theme/index.js +0 -149
  127. package/dist/Editor/themeSettings/ActiveTheme.js +0 -82
  128. package/dist/Editor/themeSettings/buttons/index.js +0 -300
  129. package/dist/Editor/themeSettings/buttons/style.js +0 -23
  130. package/dist/Editor/themeSettings/colorTheme/index.js +0 -310
  131. package/dist/Editor/themeSettings/colorTheme/style.js +0 -81
  132. package/dist/Editor/themeSettings/fonts/PreviewElement.js +0 -121
  133. package/dist/Editor/themeSettings/fonts/index.js +0 -240
  134. package/dist/Editor/themeSettings/fonts/style.js +0 -62
  135. package/dist/Editor/themeSettings/icons.js +0 -60
  136. package/dist/Editor/themeSettings/index.js +0 -380
  137. package/dist/Editor/themeSettings/style.js +0 -299
  138. package/dist/Editor/themeSettingsAI/icons.js +0 -96
  139. package/dist/Editor/themeSettingsAI/index.js +0 -355
  140. package/dist/Editor/themeSettingsAI/saveTheme.js +0 -202
  141. package/dist/Editor/themeSettingsAI/style.js +0 -332
@@ -1,6 +1,6 @@
1
1
  import React, { useCallback, useMemo, useRef, useImperativeHandle, forwardRef, useState } from "react";
2
- import { Editable, Slate, ReactEditor } from "slate-react";
3
- import { createEditor, Transforms, Editor } from "slate";
2
+ import { Editable, Slate, ReactEditor } from 'slate-react';
3
+ import { createEditor, Transforms, Editor } from 'slate';
4
4
  import withCommon from "./hooks/withCommon";
5
5
  import { getBlock, getMarked, serializeMentions } from "./utils/chatEditor/SlateUtilityFunctions";
6
6
  import MiniTextFormat from "./Toolbar/PopupTool/MiniTextFormat";
@@ -33,15 +33,15 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
33
33
  isMobile = false,
34
34
  debounceTimeOut = 10,
35
35
  isMarkDown = false,
36
- markDownContent = "",
36
+ markDownContent = '',
37
37
  translation
38
38
  } = props;
39
39
  const classes = usePopupStyle(theme);
40
40
  const convertedContent = draftToSlate({
41
41
  data: content && content?.length > 0 ? content : [{
42
- type: "paragraph",
42
+ type: 'paragraph',
43
43
  children: [{
44
- text: ""
44
+ text: ''
45
45
  }]
46
46
  }]
47
47
  });
@@ -173,7 +173,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
173
173
  let {
174
174
  type
175
175
  } = mentions;
176
- if (type && type === "elements" && hideTools.indexOf("slash") > -1) {
176
+ if (type && type === "elements" && hideTools?.indexOf("slash") > -1) {
177
177
  type = null;
178
178
  }
179
179
  const chars = type ? Shorthands[type]({
@@ -257,7 +257,7 @@ const ChatEditor = /*#__PURE__*/forwardRef((props, ref) => {
257
257
  editor
258
258
  });
259
259
  } else if (event.key === "Enter" && !isMobile) {
260
- const isEmpty = debouncedValue?.current.length === 1 && debouncedValue?.current[0].type === "paragraph" && debouncedValue?.current[0].children.length === 1 && debouncedValue?.current[0].children[0].text === "";
260
+ const isEmpty = debouncedValue?.current.length === 1 && debouncedValue?.current[0].type === 'paragraph' && debouncedValue?.current[0].children.length === 1 && debouncedValue?.current[0].children[0].text === '';
261
261
  if (isEmpty) {
262
262
  event.preventDefault();
263
263
  return;
@@ -1,5 +1,5 @@
1
1
  /* eslint-disable no-unused-vars */
2
- import React, { useRef, useCallback, useEffect, useMemo, useState, forwardRef, useImperativeHandle, createContext } from "react";
2
+ import React, { useRef, useCallback, useEffect, useMemo, useState, forwardRef, useImperativeHandle } from "react";
3
3
  import PropTypes from "prop-types";
4
4
  import { createEditor, Range, Transforms } from "slate";
5
5
  import { Slate, Editable, ReactEditor } from "slate-react";
@@ -17,7 +17,7 @@ import { serializeToText } from "./utils/serializeToText";
17
17
  import { getPageSettings } from "./utils/pageSettings";
18
18
  import { getThumbnailImage, invertColor, pageTextStyle } from "./helper";
19
19
  import PopupTool from "./Toolbar/PopupTool";
20
- import { Box, Typography, useTheme, IconButton } from "@mui/material";
20
+ import { Box, Typography, useTheme } from "@mui/material";
21
21
  import Shorthands from "./common/Shorthands";
22
22
  import MiniToolbar from "./Toolbar/Mini/MiniToolbar";
23
23
  import { EditorProvider } from "./hooks/useMouseMove";
@@ -26,12 +26,9 @@ import editorStyles from "./Styles/EditorStyles";
26
26
  import DragAndDrop from "./common/DnD";
27
27
  import Section from "./common/Section";
28
28
  import decorators from "./utils/Decorators";
29
- import { getTRBLBreakPoints, getVariableValue, getBreakpointLineSpacing } from "./helper/theme";
30
- import { getInitialValue, handleCopy, handleInsertLastElement, isEverythingSelected, isFreeGrid, isFreeGridFragment, isRestrictedNode, outsideEditorClickLabel, GetPageBgImage } from "./utils/helper";
29
+ import { getBreakpointLineSpacing, getTRBLBreakPoints } from "./helper/theme";
30
+ import { getInitialValue, handleCopy, handleInsertLastElement, isEverythingSelected, isFreeGrid, isFreeGridFragment, isRestrictedNode, outsideEditorClickLabel } from "./utils/helper";
31
31
  import useWindowResize from "./hooks/useWindowResize";
32
- import { getTheme } from "./theme";
33
- import ThemeSettings from "./themeSettings";
34
- import ThemeSettingsAI from "./themeSettingsAI";
35
32
  import PopoverAIInput from "./Elements/AI/PopoverAIInput";
36
33
  import RnDCopy from "./common/RnD/RnDCopy";
37
34
  import SwitchViewport from "./common/RnD/SwitchViewport/SwitchViewport";
@@ -40,11 +37,9 @@ import "./font.css";
40
37
  import "./Editor.css";
41
38
  import "animate.css";
42
39
  import FontLoader from "./common/FontLoader/FontLoader";
43
- import { ThemeAIIcon, ThemePaintIcon } from "./assets/svg/ThemeIcons";
44
40
  import { CustomDialogComponent } from "./common/CustomDialog";
45
41
  import { jsx as _jsx } from "react/jsx-runtime";
46
42
  import { jsxs as _jsxs } from "react/jsx-runtime";
47
- export const ThemeContext = /*#__PURE__*/createContext(null);
48
43
  const Item = /*#__PURE__*/forwardRef(({
49
44
  children,
50
45
  ...props
@@ -99,7 +94,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
99
94
  otherProps,
100
95
  isIframe,
101
96
  theme,
102
- showThemeButtons,
103
97
  showViewport = false,
104
98
  overrideWrapperStyles = {},
105
99
  translation
@@ -133,29 +127,14 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
133
127
  fixedWidth = "60%",
134
128
  fullWidth = "80%",
135
129
  hideTools = [],
136
- translationMock,
137
- uploadFile,
138
- resumeUploadState,
139
- uploadTerminator,
140
- isUploadInProgress = () => {}
130
+ translationMock
141
131
  } = otherProps || {};
142
132
  const translationFn = translation || translationMock || (() => {});
143
- const getTitleSaveData = title => {
144
- const val = debouncedValue.current;
145
- const data = {
146
- text: serializeToText(val),
147
- title: title
148
- };
149
- if (customProps.onSaveTitle) {
150
- const isTitleChanged = true;
151
- customProps.onSaveTitle(JSON.stringify(val), data, isTitleChanged);
152
- }
153
- };
154
133
  const editor = useMemo(() => {
155
134
  if (collaborativeEditor) return collaborativeEditor;
156
135
  const editor = createEditor();
157
136
  editor.needLayout = needLayout;
158
- editor.getTitleSaveData = getTitleSaveData;
137
+ editor.translation = translationFn;
159
138
  return withCommon(editor, {
160
139
  needLayout
161
140
  });
@@ -166,11 +145,10 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
166
145
  const {
167
146
  bannerSpacing,
168
147
  pageBgImage,
169
- pageColor = "",
148
+ pageColor,
170
149
  color: pageTextColor,
171
150
  pageWidth,
172
151
  maxWidth: pageMaxWidth,
173
- theme: selectedTheme,
174
152
  lineHeight
175
153
  } = pageSt?.pageProps || {
176
154
  bannerSpacing: {
@@ -182,17 +160,10 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
182
160
  };
183
161
  const classes = editorStyles({
184
162
  padHeight: !fullScreen ? otherProps?.padHeight : 20,
185
- placeHolderColor: invertColor(pageColor.startsWith("var") ? getVariableValue(pageColor) : pageColor || "#FFF"),
163
+ placeHolderColor: invertColor(pageColor || "#FFF"),
186
164
  theme,
187
165
  overrideWrapperStyles
188
166
  });
189
- const [openTheme, setOpenTheme] = useState(false);
190
- const [openAITheme, setOpenAITheme] = useState(false);
191
- const [, setThemeUpdated] = useState(0);
192
- const triggerRender = () => {
193
- setThemeUpdated(prev => prev + 1); // Incrementing forces a re-render while updating theme
194
- };
195
-
196
167
  const isMobile = window.matchMedia("(max-width: 899px)")?.matches || false;
197
168
  useEffect(() => {
198
169
  setValue(draftToSlate({
@@ -235,6 +206,17 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
235
206
  title: serializeToText(title?.children) || "Untitled"
236
207
  };
237
208
  };
209
+ const getTitleSaveData = title => {
210
+ const val = debouncedValue.current;
211
+ const data = {
212
+ text: serializeToText(val),
213
+ title: title
214
+ };
215
+ if (customProps.onSaveTitle) {
216
+ const isTitleChanged = true;
217
+ customProps.onSaveTitle(JSON.stringify(val), data, isTitleChanged);
218
+ }
219
+ };
238
220
  const getPreviewImage = async (needBackground = false, options = {}) => {
239
221
  ReactEditor.blur(editor);
240
222
  const dom = needBackground ? editorWrapper?.current : editorWrapper?.current.getElementsByClassName("innert-editor-textbox")[0];
@@ -334,12 +316,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
334
316
  redo() {
335
317
  editor?.redo();
336
318
  },
337
- toggleTheme() {
338
- setOpenTheme(!openTheme);
339
- },
340
- toggleAITheme() {
341
- setOpenAITheme(!openAITheme);
342
- },
343
319
  getPageSettings: {
344
320
  background: pageBgImage && pageBgImage !== "none" ? `url(${pageBgImage})` : pageColor || ""
345
321
  }
@@ -394,11 +370,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
394
370
  ICON_API: "https://assets.agenciflow.com",
395
371
  translation: translationFn,
396
372
  getTitleSaveData,
397
- customLineHeight: lineH,
398
- uploadFile,
399
- resumeUploadState,
400
- uploadTerminator,
401
- isUploadInProgress
373
+ customLineHeight: lineH
402
374
  };
403
375
  const renderElement = useCallback(props => {
404
376
  return /*#__PURE__*/_jsx(Element, {
@@ -538,9 +510,8 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
538
510
  };
539
511
  const editorWrapperStyle = useMemo(() => {
540
512
  const style = {};
541
- const bgImageUrl = GetPageBgImage(pageBgImage);
542
- if (bgImageUrl) {
543
- style.backgroundImage = `url(${bgImageUrl})`;
513
+ if (pageBgImage && pageBgImage !== "none") {
514
+ style.backgroundImage = `url(${pageBgImage})`;
544
515
  style.backgroundSize = `cover`;
545
516
  style.backgroundRepeat = "repeat";
546
517
  } else {
@@ -548,7 +519,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
548
519
  }
549
520
  return style;
550
521
  }, [pageBgImage, pageColor, pageTextColor]);
551
- const themeProps = getTheme(selectedTheme);
552
522
 
553
523
  // const handleContextMenu = (e) => {
554
524
  // if (!readOnly) {
@@ -582,23 +552,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
582
552
  return /*#__PURE__*/_jsxs(EditorProvider, {
583
553
  theme: theme,
584
554
  editor: editor,
585
- openTheme: openTheme,
586
- setOpenTheme: setOpenTheme,
587
- triggerRender: triggerRender,
588
- children: [showThemeButtons ? /*#__PURE__*/_jsxs("div", {
589
- className: "theme-buttons",
590
- children: [/*#__PURE__*/_jsx(IconButton, {
591
- onClick: () => setOpenTheme(true),
592
- className: "themePaintIcon",
593
- children: /*#__PURE__*/_jsx(ThemePaintIcon, {})
594
- }), /*#__PURE__*/_jsx(IconButton, {
595
- onClick: () => setOpenAITheme(true),
596
- style: {
597
- marginTop: "4px"
598
- },
599
- children: /*#__PURE__*/_jsx(ThemeAIIcon, {})
600
- })]
601
- }) : null, /*#__PURE__*/_jsx(FontLoader, {
555
+ children: [/*#__PURE__*/_jsx(FontLoader, {
602
556
  otherProps: {
603
557
  services: otherProps?.services
604
558
  },
@@ -608,7 +562,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
608
562
  ...props,
609
563
  fullScreen: fullScreen,
610
564
  footer: footer || "",
611
- selectedTheme: selectedTheme,
612
565
  children: /*#__PURE__*/_jsx(Box, {
613
566
  component: "div",
614
567
  className: `et-wrpr stimulate-${breakpoint} ${editorClass || ""} ${isIframe ? "iframe-editor" : ""}`,
@@ -636,16 +589,13 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
636
589
  id: "slate-wrapper-scroll-container",
637
590
  ref: editorWrapper,
638
591
  onClick: e => {
639
- if (!isReadOnly) {
640
- handleInsertLastElement(e, editor);
641
- }
592
+ handleInsertLastElement(e, editor);
642
593
  },
643
594
  onScroll: handleScroll,
644
595
  style: editorWrapperStyle,
645
596
  children: /*#__PURE__*/_jsxs(Box, {
646
597
  component: "div",
647
598
  className: "max-content",
648
- sx: themeProps?.sxProps || {},
649
599
  "data-info": outsideEditorClickLabel,
650
600
  children: [renderTopBanner(), /*#__PURE__*/_jsx("div", {
651
601
  className: "scroll-area",
@@ -715,18 +665,6 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
715
665
  "data-info": outsideEditorClickLabel,
716
666
  onClick: handleFooterClick,
717
667
  children: footer
718
- }), openTheme ? /*#__PURE__*/_jsx(ThemeSettings, {
719
- open: openTheme,
720
- setOpen: setOpenTheme,
721
- editor: editor,
722
- services: otherProps?.services,
723
- appTheme: theme,
724
- customProps: customProps
725
- }) : null, /*#__PURE__*/_jsx(ThemeSettingsAI, {
726
- openAITheme: openAITheme,
727
- setOpenAITheme: setOpenAITheme,
728
- onSaveTheme: otherProps?.onSaveTheme,
729
- theme: theme
730
668
  })]
731
669
  })
732
670
  }), !readOnly ? /*#__PURE__*/_jsx(PopupTool, {
@@ -2,7 +2,6 @@ import React from "react";
2
2
  import { Dialog, DialogTitle, DialogContent, IconButton, Grid } from "@mui/material";
3
3
  import CloseIcon from "@mui/icons-material/Close";
4
4
  import ViewportStimulator from "./common/RnD/Theme/ViewportStimulator";
5
- import MainThemeProvider from "./common/RnD/Theme/MainThemeProvider";
6
5
  import { jsx as _jsx } from "react/jsx-runtime";
7
6
  import { jsxs as _jsxs } from "react/jsx-runtime";
8
7
  const DialogWrapper = props => {
@@ -10,45 +9,40 @@ const DialogWrapper = props => {
10
9
  fullScreen,
11
10
  onClose,
12
11
  children,
13
- classes,
14
- selectedTheme
12
+ classes
15
13
  } = props;
16
- return fullScreen ? /*#__PURE__*/_jsx(MainThemeProvider, {
17
- userSelectedTheme: selectedTheme,
18
- children: /*#__PURE__*/_jsxs(Dialog, {
19
- className: `dialogComp`,
20
- open: fullScreen,
21
- fullScreen: fullScreen,
22
- onClose: onClose,
14
+ return fullScreen ? /*#__PURE__*/_jsxs(Dialog, {
15
+ className: `dialogComp`,
16
+ open: fullScreen,
17
+ fullScreen: fullScreen,
18
+ onClose: onClose,
19
+ style: {
20
+ zIndex: 1000
21
+ },
22
+ sx: classes.fullScreenWrapper,
23
+ children: [/*#__PURE__*/_jsx(DialogTitle, {
23
24
  style: {
24
- zIndex: 1000
25
+ padding: "6px 8px"
25
26
  },
26
- sx: classes.fullScreenWrapper,
27
- children: [/*#__PURE__*/_jsx(DialogTitle, {
28
- style: {
29
- padding: "6px 8px"
30
- },
27
+ children: /*#__PURE__*/_jsx(Grid, {
31
28
  children: /*#__PURE__*/_jsx(Grid, {
32
- children: /*#__PURE__*/_jsx(Grid, {
29
+ style: {
30
+ display: "flex",
31
+ justifyContent: "end"
32
+ },
33
+ children: /*#__PURE__*/_jsx(IconButton, {
34
+ onClick: onClose,
33
35
  style: {
34
- display: "flex",
35
- justifyContent: "end"
36
+ background: "rgba(255,255,255,0.5)"
36
37
  },
37
- children: /*#__PURE__*/_jsx(IconButton, {
38
- onClick: onClose,
39
- style: {
40
- background: "rgba(255,255,255,0.5)"
41
- },
42
- children: /*#__PURE__*/_jsx(CloseIcon, {})
43
- })
38
+ children: /*#__PURE__*/_jsx(CloseIcon, {})
44
39
  })
45
40
  })
46
- }), /*#__PURE__*/_jsx(DialogContent, {
47
- children: children
48
- })]
49
- })
41
+ })
42
+ }), /*#__PURE__*/_jsx(DialogContent, {
43
+ children: children
44
+ })]
50
45
  }) : /*#__PURE__*/_jsx(ViewportStimulator, {
51
- selectedTheme: selectedTheme,
52
46
  children: children
53
47
  });
54
48
  };
@@ -1342,16 +1342,16 @@ blockquote {
1342
1342
 
1343
1343
  ::selection {
1344
1344
  color: inherit;
1345
- /* background: rgba(35, 131, 226, 0.35) !important; */
1345
+ background: rgba(35, 131, 226, 0.35) !important;
1346
1346
  }
1347
1347
 
1348
1348
  ::-moz-selection {
1349
- /* background: rgba(35, 131, 226, 0.35) !important; */
1349
+ background: rgba(35, 131, 226, 0.35) !important;
1350
1350
  color: inherit;
1351
1351
  }
1352
1352
 
1353
1353
  ::-webkit-selection {
1354
- /* background: rgba(35, 131, 226, 0.35) !important; */
1354
+ background: rgba(35, 131, 226, 0.35) !important;
1355
1355
  color: inherit;
1356
1356
  }
1357
1357
 
@@ -1383,39 +1383,6 @@ code.markcode {
1383
1383
  font-family: 'Source Code Pro' !important;
1384
1384
  }
1385
1385
 
1386
- .theme-buttons {
1387
- display: flex;
1388
- justify-content: end;
1389
- align-items: center;
1390
- margin: auto;
1391
- position: absolute;
1392
- top: 60px;
1393
- right: 20px;
1394
- z-index: 1000;
1395
- }
1396
-
1397
- .themePaintIcon:hover .iconBorder {
1398
- fill: #2563EB;
1399
- }
1400
-
1401
- .themePaintIcon:hover .iconStroke {
1402
- stroke: #2563EB;
1403
- }
1404
-
1405
1386
  .hyperLink {
1406
1387
  word-break: break-all;
1407
- }
1408
-
1409
- .truncateText {
1410
- display: inline-block;
1411
- width: 100%;
1412
- white-space: nowrap;
1413
- overflow: hidden;
1414
- text-overflow: ellipsis;
1415
- }
1416
-
1417
- @media only screen and (max-width: 600px) {
1418
- .truncateText {
1419
- width: 180px;
1420
- }
1421
- }
1388
+ }
@@ -167,7 +167,6 @@ function PopoverAIInput({
167
167
  const [generatedText, setGeneratedText] = useState("");
168
168
  const [inputValue, setInputValue] = useState("");
169
169
  const [selectedOption, setSelectedOption] = useState();
170
- const [threadId, setThreadId] = useState("");
171
170
  const selectedEleRef = useRef({});
172
171
  const classes = Styles();
173
172
  const editor = useSlate();
@@ -189,7 +188,6 @@ function PopoverAIInput({
189
188
  useEffect(() => {
190
189
  if (openAI) {
191
190
  scrollToAIInput(editor);
192
- setThreadId("");
193
191
  }
194
192
  }, [openAI]);
195
193
  useEffect(() => {
@@ -198,12 +196,8 @@ function PopoverAIInput({
198
196
  const framePayload = (type, option) => {
199
197
  let payload = {
200
198
  mode: option.mode || 0,
201
- query: option?.inputValue || inputValue,
202
- useSession: true
199
+ query: option?.inputValue || inputValue
203
200
  };
204
- if (threadId) {
205
- payload.threadId = threadId;
206
- }
207
201
  if (option.mode === MODES.translate || option.mode === MODES.rephraseTone) {
208
202
  payload.textOptionInput = type;
209
203
  }
@@ -263,14 +257,12 @@ function PopoverAIInput({
263
257
  setLoading(false);
264
258
  setInputValue("");
265
259
  let {
266
- body: text,
267
- threadId
268
- } = result?.data || {};
260
+ data: text
261
+ } = result || {};
269
262
  if (!text) {
270
263
  onClickOutside();
271
264
  return;
272
265
  }
273
- setThreadId(threadId || "");
274
266
 
275
267
  // if (!option.replace) {
276
268
  if (type === "continue_writing") {
@@ -268,7 +268,7 @@ function AppHeader(props) {
268
268
  style: {
269
269
  display: "inline-flex",
270
270
  alignItems: "center",
271
- color: textColor || "#000000",
271
+ color: textColor,
272
272
  fontSize: logoFontSize,
273
273
  fontFamily: titleFontFamily,
274
274
  justifyContent: isLogoRight ? "end" : "start"
@@ -323,7 +323,7 @@ function AppHeader(props) {
323
323
  fontFamily: fontFamily,
324
324
  textTransform: "none",
325
325
  fontSize: fontSize || "16px",
326
- color: textColor || "#000",
326
+ color: textColor || "#FFF",
327
327
  background: bgColor || "none",
328
328
  border: borderColorHover ? `1px solid transparent` : "none",
329
329
  "& .m-settings": {
@@ -339,7 +339,7 @@ function AppHeader(props) {
339
339
  background: "#FFF"
340
340
  },
341
341
  "&:hover": {
342
- color: textColorHover || textColor || "#000",
342
+ color: textColorHover || textColor || "#FFF",
343
343
  background: bgColorHover || bgColor || "none",
344
344
  border: borderColorHover ? `1px solid ${borderColorHover}` : "none",
345
345
  "& .m-settings": {