@flozy/editor 4.9.9 → 5.0.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1075,6 +1075,10 @@ blockquote {
1075
1075
  font-size: 14px;
1076
1076
  }
1077
1077
 
1078
+ .listItemMargin {
1079
+ margin: 0px;
1080
+ }
1081
+
1078
1082
  .content-editable.empty {
1079
1083
  position: relative;
1080
1084
  }
@@ -9,7 +9,7 @@ const ColorPickerStyles = theme => ({
9
9
  width: "24px",
10
10
  height: "24px",
11
11
  marginRight: "8px",
12
- border: "1px solid #ccc"
12
+ border: "unset"
13
13
  }
14
14
  },
15
15
  colorPopper: {
@@ -58,7 +58,7 @@ const ColorPickerStyles = theme => ({
58
58
  width: "24px",
59
59
  height: "24px",
60
60
  margin: "0px 4px",
61
- border: "1px solid #ccc"
61
+ border: "unset"
62
62
  }
63
63
  },
64
64
  colorPickerIcon: {
@@ -1,4 +1,4 @@
1
- export const colors = ["#292D32", "#578CFF", "#A58CFF", "#46BBFF", "#FFC93A", "#33B24F", "#F06C83", "#64748B", "#82A9FE", "#C4B3FF", "#71CBFF", "#FFD055", "#61D57A", "#FA91A4", "#A2B0B9", "#A4C1FF", "#D7CBFF", "#9FDCFF", "#FFDC80", "#8AE59E", "#FCB0BE", "#E4ECF3", "#CDDCFF", "#E0D7FF", "#BEE7FF", "#FFE49E", "#B9F6C6", "#FDCAD3", "#FFFFFF", "#489FF8", "#FE7A00", "linear-gradient(327.62deg, #EBB9E0 13.53%, #9CEEE5 86.82%)", "linear-gradient(310.6deg, #7FA4F4 15.53%, #805EF5 83.64%)", "linear-gradient(95.19deg, #A831E7 4.17%, #F05339 88.89%)", "linear-gradient(90deg, #3F2AB7 12.5%, #0DC9B5 100%)", "#0F172A", "#2563EB", "#8360FD", "#19A9FC", "#FDB52A", "#0E8E2A", "#E1425E"
1
+ export const colors = ["#000000", "#578CFF", "#A58CFF", "#46BBFF", "#FFC93A", "#33B24F", "#F06C83", "#64748B", "#82A9FE", "#C4B3FF", "#71CBFF", "#FFD055", "#61D57A", "#FA91A4", "#A2B0B9", "#A4C1FF", "#D7CBFF", "#9FDCFF", "#FFDC80", "#8AE59E", "#FCB0BE", "#E4ECF3", "#CDDCFF", "#E0D7FF", "#BEE7FF", "#FFE49E", "#B9F6C6", "#FDCAD3", "#FFFFFF", "#489FF8", "#FE7A00", "linear-gradient(327.62deg, #EBB9E0 13.53%, #9CEEE5 86.82%)", "linear-gradient(310.6deg, #7FA4F4 15.53%, #805EF5 83.64%)", "linear-gradient(95.19deg, #A831E7 4.17%, #F05339 88.89%)", "linear-gradient(90deg, #3F2AB7 12.5%, #0DC9B5 100%)", "#0F172A", "#2563EB", "#8360FD", "#19A9FC", "#FDB52A", "#0E8E2A", "#E1425E"
2
2
  // "#E6E6E6",
3
- // "#BEBEBE"
3
+ // "#BEBEBE",
4
4
  ];
@@ -36,7 +36,7 @@ const SearchAttachment = props => {
36
36
  display: "block"
37
37
  },
38
38
  children: /*#__PURE__*/_jsxs(Card, {
39
- style: {
39
+ sx: {
40
40
  display: "flex",
41
41
  justifyContent: "flex-start",
42
42
  alignItems: "flex-end",
@@ -48,6 +48,10 @@ const SearchAttachment = props => {
48
48
  borderRadius: "7px !important",
49
49
  background: theme?.palette?.containers?.slashBrainCardBg,
50
50
  cursor: 'pointer',
51
+ "&.MuiPaper-root.MuiPaper-rounded": {
52
+ borderRadius: "7px !important",
53
+ paddingTop: '0px !important'
54
+ },
51
55
  "& *::selection": {
52
56
  background: "#000"
53
57
  }
@@ -7,6 +7,7 @@ import SwipeableDrawerComponent from "../../common/SwipeableDrawer";
7
7
  import SearchAndDocList from "./SearchList";
8
8
  import { insertBrain } from "../../utils/brains";
9
9
  import { useDebounce } from "use-debounce";
10
+ import { Editor, Transforms } from "slate";
10
11
  import { jsx as _jsx } from "react/jsx-runtime";
11
12
  import { Fragment as _Fragment } from "react/jsx-runtime";
12
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -88,6 +89,15 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
88
89
  setSkip(0);
89
90
  };
90
91
  const handleClose = () => {
92
+ const {
93
+ selection
94
+ } = editor;
95
+ if (selection) {
96
+ const [, currentPath] = Editor.node(editor, selection);
97
+ Transforms.insertText(editor, '', {
98
+ at: currentPath
99
+ });
100
+ }
91
101
  setAnchorEl(null);
92
102
  };
93
103
  const handleClick = data => {
@@ -35,12 +35,12 @@ const SearchAndDocList = ({
35
35
  },
36
36
  sx: {
37
37
  borderRadius: "6px",
38
- backgroundColor: theme?.palette?.containers?.bg7,
39
- border: theme?.palette?.type === 'dark' ? `1px solid ${theme?.palette?.editor?.popUpBorderColor}` : '',
38
+ backgroundColor: theme?.palette?.editor?.miniToolBarBackground,
39
+ border: `1px solid ${theme?.palette?.primary?.slashBrainBorder}`,
40
40
  padding: "5px",
41
41
  "&:hover": {
42
- backgroundColor: theme?.palette?.containers?.bg8,
43
- background: theme?.palette?.containers?.bg8
42
+ backgroundColor: theme?.palette?.editor?.sectionSettingIconHover,
43
+ background: theme?.palette?.editor?.sectionSettingIconHover
44
44
  }
45
45
  },
46
46
  children: /*#__PURE__*/_jsx(Icon, {
@@ -77,6 +77,7 @@ const SearchAndDocList = ({
77
77
  "& .MuiOutlinedInput-root": {
78
78
  color: theme?.palette?.primary?.main,
79
79
  boxShadow: theme?.palette?.shadows?.shadow12,
80
+ backgroundColor: theme?.palette?.editor?.miniToolBarBackground,
80
81
  "&:hover .MuiOutlinedInput-notchedOutline": {
81
82
  borderRadius: "8px",
82
83
  border: `1px solid ${theme?.palette?.primary?.slashBrainBorder}`,
@@ -85,7 +86,7 @@ const SearchAndDocList = ({
85
86
  "&.Mui-focused .MuiOutlinedInput-notchedOutline": {
86
87
  borderRadius: "8px",
87
88
  border: `1px solid ${theme?.palette?.primary?.slashBrainBorder}`,
88
- borderColor: theme?.palette?.primary?.slashBrainBorder
89
+ borderColor: `${theme?.palette?.primary?.slashBrainBorder} !important`
89
90
  }
90
91
  },
91
92
  '& .MuiOutlinedInput-notchedOutline': {
@@ -113,7 +114,26 @@ const SearchAndDocList = ({
113
114
  overflowY: 'auto',
114
115
  overflowX: 'hidden',
115
116
  padding: '0px 16px 8px',
116
- marginBottom: '20px'
117
+ marginBottom: '20px',
118
+ scrollbarWidth: "thin",
119
+ scrollbarColor: `${theme?.palette?.primary?.slashBrainBorder} transparent`,
120
+ "&::-webkit-scrollbar": {
121
+ width: "3px",
122
+ height: "3px !important",
123
+ borderRadius: "10px !important"
124
+ },
125
+ "&::-webkit-scrollbar-thumb": {
126
+ backgroundColor: theme?.palette?.primary?.slashBrainBorder,
127
+ borderRadius: "10px !important",
128
+ width: "3px !important"
129
+ },
130
+ "&::-webkit-scrollbar-thumb:hover": {
131
+ backgroundColor: theme?.palette?.primary?.slashBrainBorder
132
+ },
133
+ "&::-webkit-scrollbar-track": {
134
+ background: "transparent",
135
+ borderRadius: "10px !important"
136
+ }
117
137
  },
118
138
  children: [mapData?.map((doc, index) => {
119
139
  const title = doc?.title?.trim() === "" ? 'Untitled' : doc?.title;
@@ -291,9 +291,11 @@ const editorStyles = ({
291
291
  }
292
292
  },
293
293
  fullScreenWrapper: {
294
+ "& .editor-wrapper": {
295
+ paddingTop: '20px'
296
+ },
294
297
  "& .MuiPaper-root": {
295
298
  borderRadius: "0px !important",
296
- paddingTop: "20px",
297
299
  "& .MuiDialogTitle-root": {
298
300
  position: "absolute",
299
301
  top: 0,
@@ -1,10 +1,11 @@
1
1
  import React, { useState } from "react";
2
- import { Grid, Typography, IconButton, Tooltip, TextField } from "@mui/material";
2
+ import { Grid, Typography, IconButton, Tooltip, TextField, InputAdornment } from "@mui/material";
3
3
  import CloseIcon from "@mui/icons-material/Close";
4
4
  import OpenInFullIcon from "@mui/icons-material/OpenInFull";
5
5
  import CloseFullscreenIcon from "@mui/icons-material/CloseFullscreen";
6
6
  import Icon from "../../common/Icon";
7
7
  import { ToggleFullScreenIcon } from "../../common/iconListV2";
8
+ import { SearchIcon } from "../../common/iconslist";
8
9
  import { jsx as _jsx } from "react/jsx-runtime";
9
10
  import { jsxs as _jsxs } from "react/jsx-runtime";
10
11
  const SearchBox = props => {
@@ -17,7 +18,13 @@ const SearchBox = props => {
17
18
  sx: classes.searchBox,
18
19
  size: "small",
19
20
  value: search,
20
- onChange: handleChange
21
+ onChange: handleChange,
22
+ InputProps: {
23
+ startAdornment: /*#__PURE__*/_jsx(InputAdornment, {
24
+ position: "start",
25
+ children: /*#__PURE__*/_jsx(SearchIcon, {})
26
+ })
27
+ }
21
28
  });
22
29
  };
23
30
  const PopperHeader = props => {
@@ -63,6 +70,7 @@ const PopperHeader = props => {
63
70
  sx: {
64
71
  position: 'relative'
65
72
  },
73
+ className: "inputField",
66
74
  children: [/*#__PURE__*/_jsx(IconButton, {
67
75
  className: openSearch ? 'searchContainer' : '',
68
76
  onClick: handleSearchButton,
@@ -24,6 +24,31 @@ const usePopupStyle = theme => ({
24
24
  "& .MuiDialog-paperFullScreen": {
25
25
  borderRadius: "0px !important"
26
26
  },
27
+ "& .inputField": {
28
+ height: '29px',
29
+ '& .MuiIconButton-root': {
30
+ padding: '5px'
31
+ },
32
+ "& .MuiFormControl-root": {
33
+ background: theme?.palette?.editor?.inputFieldBgColor,
34
+ borderRadius: "8px"
35
+ },
36
+ "& .MuiOutlinedInput-notchedOutline": {
37
+ borderRadius: "8px",
38
+ border: `1px solid ${theme?.palette?.editor?.inputFieldBorder}`
39
+ },
40
+ "& .MuiOutlinedInput-input": {
41
+ padding: "3px 35px 4px 2px !important"
42
+ },
43
+ "& .MuiInputBase-adornedStart": {
44
+ padding: "0px 0px 0px 9px"
45
+ },
46
+ '& svg': {
47
+ '& path': {
48
+ stroke: `${theme?.palette?.editor?.closeButtonSvgStroke} !important`
49
+ }
50
+ }
51
+ },
27
52
  "&.textSettings": {
28
53
  "@media only screen and (max-width: 600px)": {
29
54
  margin: "4px !important",
@@ -56,6 +81,11 @@ const usePopupStyle = theme => ({
56
81
  "& .buttonsWrpr": {
57
82
  "& button": {
58
83
  color: theme?.palette?.editor?.textColor
84
+ },
85
+ "& .more-btn-cbs": {
86
+ color: `${theme?.palette?.editor?.closeButtonSvgStroke}`,
87
+ border: `1.5px solid ${theme?.palette?.editor?.closeButtonSvgStroke}`,
88
+ paddingTop: "10px"
59
89
  }
60
90
  },
61
91
  "@media only screen and (max-width: 599px)": {
@@ -596,7 +626,7 @@ const usePopupStyle = theme => ({
596
626
  borderRadius: "7px !important",
597
627
  "& .buttonsWrpr": {
598
628
  "& button": {
599
- border: "1px solid #ccc",
629
+ // border: "1px solid #ccc",
600
630
  margin: "4px",
601
631
  width: "24px",
602
632
  height: "24px",
@@ -652,14 +682,16 @@ const usePopupStyle = theme => ({
652
682
  padding: "7px 15px",
653
683
  color: "#FFF",
654
684
  width: "100px",
655
- marginBottom: "10px"
685
+ marginBottom: "10px",
686
+ textTransform: "capitalize"
656
687
  },
657
688
  "& .outlineBtn": {
658
689
  border: "1px solid #D7DBEC",
659
690
  borderRadius: "7px",
660
691
  padding: "7px 15px",
661
692
  color: "#FFF",
662
- width: "100px"
693
+ width: "100px",
694
+ textTransform: "capitalize"
663
695
  }
664
696
  },
665
697
  searchBox: {
@@ -1,6 +1,6 @@
1
1
  import React, { useState } from "react";
2
2
  import { Button, ButtonGroup, Divider, Grid, Typography } from "@mui/material";
3
- import ArrowDropDownIcon from "@mui/icons-material/ArrowDropDown";
3
+ import KeyboardArrowDownRoundedIcon from "@mui/icons-material/KeyboardArrowDownRounded";
4
4
  import { Dropdown, MarkButton, TextSize, BlockButton, AccordionButton } from "../FormatTools";
5
5
  import { toolbarGroups } from "../toolbarGroups";
6
6
  import ColorPicker from "../../Elements/Color Picker/ColorPicker";
@@ -438,8 +438,8 @@ const TextFormat = props => {
438
438
  className: "vl"
439
439
  }), /*#__PURE__*/_jsx(Button, {
440
440
  onClick: handleColorPicker("bgColor"),
441
- className: "colorPicker",
442
- children: /*#__PURE__*/_jsx(ArrowDropDownIcon, {})
441
+ className: "colorPicker textFormatMUIIcon",
442
+ children: /*#__PURE__*/_jsx(KeyboardArrowDownRoundedIcon, {})
443
443
  })]
444
444
  }), /*#__PURE__*/_jsxs(ButtonGroup, {
445
445
  sx: classes.btnGroup2,
@@ -460,8 +460,8 @@ const TextFormat = props => {
460
460
  className: "vl"
461
461
  }), /*#__PURE__*/_jsx(Button, {
462
462
  onClick: handleColorPicker("color"),
463
- className: "colorPicker",
464
- children: /*#__PURE__*/_jsx(ArrowDropDownIcon, {})
463
+ className: "colorPicker textFormatMUIIcon",
464
+ children: /*#__PURE__*/_jsx(KeyboardArrowDownRoundedIcon, {})
465
465
  })]
466
466
  })]
467
467
  }), /*#__PURE__*/_jsx(AllColors, {
@@ -253,7 +253,7 @@ const StyleBuilder = props => {
253
253
  style: {
254
254
  zIndex: "1300"
255
255
  },
256
- sx: classes.bottomBarDrawer,
256
+ sx: classes.sideBarDrawer,
257
257
  children: renderDrawerMenu()
258
258
  }) : /*#__PURE__*/_jsx(Drawer, {
259
259
  open: true,
@@ -162,7 +162,8 @@ const useCommonStyle = theme => ({
162
162
  background: `${theme?.palette?.editor?.closeButtonBgColor} !important`
163
163
  },
164
164
  "& .deleteBtn": {
165
- background: "transparent"
165
+ background: "transparent",
166
+ margin: '0px !important'
166
167
  },
167
168
  "& .MuiGrid-container": {
168
169
  "& .workFlowButton": {
@@ -170,7 +171,9 @@ const useCommonStyle = theme => ({
170
171
  textTransform: "unset !important",
171
172
  color: `${theme?.palette?.editor?.textColor} !important`,
172
173
  fontSize: "14px !important",
173
- fontWeight: "500 !important"
174
+ fontWeight: "500 !important",
175
+ borderRadius: "25px",
176
+ padding: "5px 15px"
174
177
  }
175
178
  },
176
179
  "& .MuiDialogActions-root": {
@@ -369,12 +369,14 @@ export const getBlock = props => {
369
369
  });
370
370
  case "orderedList":
371
371
  return /*#__PURE__*/_jsx("ol", {
372
+ className: "listItemMargin",
372
373
  type: "1",
373
374
  ...attributes,
374
375
  children: children
375
376
  });
376
377
  case "unorderedList":
377
378
  return /*#__PURE__*/_jsx("ul", {
379
+ className: "listItemMargin",
378
380
  ...attributes,
379
381
  children: children
380
382
  });
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "4.9.9",
3
+ "version": "5.0.0",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"