@flozy/editor 4.2.5 → 4.2.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -486,7 +486,7 @@ const CommonEditor = /*#__PURE__*/forwardRef((props, ref) => {
486
486
  children: [/*#__PURE__*/_jsx(DragAndDrop, {
487
487
  children: /*#__PURE__*/_jsxs(Overlay, {
488
488
  children: [/*#__PURE__*/_jsx(Box, {
489
- className: `${hasTopBanner() ? "has-topbanner" : ""} ${!pageColor ? "no-color" : ""} scrollable-content scrollSmooth`,
489
+ className: `pc-${editorClass || ""} ${hasTopBanner() ? "has-topbanner" : ""} ${!pageColor ? "no-color" : ""} scrollable-content scrollSmooth`,
490
490
  sx: classes.slateWrapper,
491
491
  id: "slate-wrapper-scroll-container",
492
492
  ref: editorWrapper,
@@ -880,6 +880,7 @@ blockquote {
880
880
  /* For Firefox */
881
881
  .removeScroll {
882
882
  -moz-appearance: textfield;
883
+ appearance: none;
883
884
  }
884
885
 
885
886
  .borderInput:focus-visible {
@@ -43,7 +43,7 @@ const useFreeGridStyles = ({
43
43
  // pages needs no color
44
44
  "&.no-color": {
45
45
  backgroundColor: "auto",
46
- color: "auto",
46
+ color: "#000",
47
47
  "& .signed-btn": {
48
48
  "& img": {
49
49
  backgroundColor: "auto"
@@ -209,7 +209,6 @@ const useFreeGridStyles = ({
209
209
  }
210
210
  },
211
211
  "& .fgi_type_table": {
212
- overflowX: "auto",
213
212
  "& table": {
214
213
  "&.readOnly": {
215
214
  tableLayout: "fixed",
@@ -6,7 +6,6 @@ import { isTextSelected } from "../../utils/helper";
6
6
  import { useEditorContext } from "../../hooks/useMouseMove";
7
7
  import SimpleTextStyle from "./style";
8
8
  import { jsx as _jsx } from "react/jsx-runtime";
9
- import { Fragment as _Fragment } from "react/jsx-runtime";
10
9
  import { jsxs as _jsxs } from "react/jsx-runtime";
11
10
  import { createElement as _createElement } from "react";
12
11
  const SimpleText = props => {
@@ -49,7 +48,8 @@ const SimpleText = props => {
49
48
  key: `para_${path.join("|")}`
50
49
  }, children, openAI ? null : /*#__PURE__*/_jsx("span", {
51
50
  className: "placeholder-simple-text",
52
- children: isEmptyEditor ? editorPlaceholder || "Write Something..." : showPlaceHolder ? opacity && selected ? /*#__PURE__*/_jsxs(_Fragment, {
51
+ children: isEmptyEditor ? editorPlaceholder || "Write Something..." : showPlaceHolder ? opacity && selected ? /*#__PURE__*/_jsxs("span", {
52
+ className: "placeholder-simple-text-default",
53
53
  children: ["Type ", /*#__PURE__*/_jsx("span", {
54
54
  style: {
55
55
  backgroundColor: '#F2F6FA',
@@ -76,6 +76,10 @@ const editorStyles = ({
76
76
  "&.no-color": {
77
77
  backgroundColor: theme?.palette?.editor?.background,
78
78
  color: theme?.palette?.editor?.textColor,
79
+ "&.pc-page-builder": {
80
+ backgroundColor: "#FFF",
81
+ color: "#000"
82
+ },
79
83
  "& .signed-btn": {
80
84
  "& img": {
81
85
  backgroundColor: "#FFF"
@@ -4,7 +4,12 @@ import CMenus from "./CMenus";
4
4
  import useContextMenuStyle from "./styles";
5
5
  import { jsx as _jsx } from "react/jsx-runtime";
6
6
  const ContextMenu = props => {
7
- const classes = useContextMenuStyle();
7
+ const {
8
+ theme
9
+ } = props;
10
+ const classes = useContextMenuStyle({
11
+ theme
12
+ });
8
13
  const {
9
14
  open,
10
15
  type,
@@ -1,9 +1,16 @@
1
- const useContextMenuStyle = () => ({
1
+ const useContextMenuStyle = ({
2
+ theme
3
+ }) => ({
2
4
  root: {
3
5
  zIndex: 1200,
6
+ "& .MuiPaper-root": {
7
+ backgroundColor: theme?.palette?.editor?.background,
8
+ color: theme?.palette?.editor?.textColor
9
+ },
4
10
  "& .cm-menu-item": {
5
11
  width: "190px",
6
12
  justifyContent: "space-between",
13
+ color: theme?.palette?.editor?.textColor,
7
14
  "& .shortcut-help-info": {
8
15
  display: "flex",
9
16
  justifyContent: "center",
@@ -14,6 +21,13 @@ const useContextMenuStyle = () => ({
14
21
  width: "12px",
15
22
  marginRight: "4px"
16
23
  }
24
+ },
25
+ "&:hover": {
26
+ color: theme?.palette?.editor?.background,
27
+ background: "rgba(233, 243, 254, 1)",
28
+ "& .shortcut-help-info": {
29
+ color: theme?.palette?.editor?.background
30
+ }
17
31
  }
18
32
  }
19
33
  }
@@ -108,7 +108,8 @@ const useElementSettingsStyle = theme => ({
108
108
  dialog: {
109
109
  "& .MuiDialogTitle-root": {
110
110
  display: "flex",
111
- justifyContent: "space-between"
111
+ justifyContent: "space-between",
112
+ color: "#000"
112
113
  },
113
114
  "& .MuiGrid-root": {
114
115
  marginBottom: "12px"
@@ -38,8 +38,11 @@ const useOptionsPopupStyle = ({
38
38
  borderRadius: "7px",
39
39
  color: theme?.palette?.editor?.textColor,
40
40
  "&:hover": {
41
- color: "#000",
42
- background: "rgba(233, 243, 254, 1)"
41
+ color: theme?.palette?.editor?.background,
42
+ background: "rgba(233, 243, 254, 1)",
43
+ "& .MuiTypography-root": {
44
+ color: theme?.palette?.editor?.background
45
+ }
43
46
  }
44
47
  }
45
48
  },
@@ -559,7 +559,8 @@ const RnD = props => {
559
559
  type: type,
560
560
  open: openContextMenu,
561
561
  contextMenu: contextMenu,
562
- handleClose: handleClose
562
+ handleClose: handleClose,
563
+ theme: theme
563
564
  }), type === "parent" && breakpoint === "lg" ? /*#__PURE__*/_jsx(VirtualElement, {
564
565
  parentEle: positionRef?.current?.resizableElement?.current,
565
566
  updated_at: updated_at,
@@ -144,6 +144,9 @@ const withHtml = editor => {
144
144
  const parsed = new DOMParser().parseFromString(html, "text/html");
145
145
  const isGoogleSheet = parsed.body.querySelector("google-sheets-html-origin");
146
146
  if (isGoogleSheet) {
147
+ if (editor.isChatEditor) {
148
+ return;
149
+ }
147
150
  const table = parsed.body.querySelector("table");
148
151
  const colGrp = table.querySelector("colgroup");
149
152
  if (colGrp) {
@@ -157,7 +160,7 @@ const withHtml = editor => {
157
160
  const formattedFragment = formatFragment[eltype] ? formatFragment[eltype](fragment) : fragment;
158
161
  let is_img_table = false;
159
162
  formattedFragment.map(f => {
160
- if (f.type === 'image' || f.type === 'table') {
163
+ if (f.type === 'image' || f?.type?.includes('table')) {
161
164
  is_img_table = true;
162
165
  }
163
166
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "4.2.5",
3
+ "version": "4.2.7",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"
@@ -68,7 +68,7 @@
68
68
  "storybook": "storybook dev -p 6006",
69
69
  "build-storybook": "NODE_OPTIONS='--max_old_space_size=4096' storybook build",
70
70
  "publish:npm": "rm -rf dist && mkdir dist && babel src/components -d dist --copy-files",
71
- "publish:local": "rm -rf /Users/agenciflow08/Documents/flozyapp/client/node_modules/@flozy/editor/dist && babel src/components -d /Users/agenciflow08/Documents/flozyapp/client/node_modules/@flozy/editor/dist --copy-files"
71
+ "publish:local": "rm -rf /Users/agmac03/flozy/client/node_modules/@flozy/editor/dist && babel src/components -d /Users/agmac03/flozy/client/node_modules/@flozy/editor/dist --copy-files"
72
72
  },
73
73
  "eslintConfig": {
74
74
  "extends": [