@flozy/editor 5.1.0 → 5.1.2

Sign up to get free protection for your applications and to get access to all the features.
@@ -448,6 +448,7 @@ blockquote {
448
448
  display: flex;
449
449
  flex-direction: column;
450
450
  overflow-x: auto;
451
+ color: #000;
451
452
  border: 1px solid rgba(37, 99, 235, 0.32);
452
453
  }
453
454
 
@@ -199,7 +199,9 @@ const EditorButton = props => {
199
199
  lg: "inline-block"
200
200
  }
201
201
  }, theme);
202
- const handleMoreBtn = () => {
202
+ const handleMoreBtn = e => {
203
+ e.preventDefault();
204
+ e.stopPropagation();
203
205
  setOpenMoreOptions(!openMoreOptions);
204
206
  };
205
207
  return /*#__PURE__*/_jsxs("div", {
@@ -92,7 +92,7 @@ const Carousel = props => {
92
92
  className: "element-toolbar hr",
93
93
  contentEditable: false,
94
94
  style: {
95
- top: "-32px",
95
+ top: "-12px",
96
96
  left: "0px"
97
97
  },
98
98
  children: [/*#__PURE__*/_jsx(Tooltip, {
@@ -136,6 +136,11 @@ const Carousel = props => {
136
136
  style: {
137
137
  padding: "12px"
138
138
  },
139
+ sx: {
140
+ '& .simple-text': {
141
+ color: '#000'
142
+ }
143
+ },
139
144
  contentEditable: false,
140
145
  children: /*#__PURE__*/_jsx(Slider, {
141
146
  ...settings,
@@ -7,6 +7,11 @@ const SimpleTextStyle = ({
7
7
  position: "relative",
8
8
  padding: "0px",
9
9
  lineHeight: lineHeight,
10
+ "&.signature": {
11
+ "& .placeholder-simple-text": {
12
+ opacity: 0
13
+ }
14
+ },
10
15
  "& .placeholder-simple-text": {
11
16
  color: "#94A3B8",
12
17
  background: "transparent",
@@ -165,9 +165,9 @@ const Section = props => {
165
165
  children: /*#__PURE__*/_jsxs(Box, {
166
166
  sx: {
167
167
  bgcolor: "background.paper",
168
- background: "#F6F6F6",
169
168
  height: "30px",
170
- position: "relative"
169
+ position: "relative",
170
+ background: theme?.palette?.type === 'dark' ? theme?.palette?.editor?.miniToolBarBackground : '#F6F6F6'
171
171
  },
172
172
  children: [!readOnly && !showTool ? /*#__PURE__*/_jsx(DragHandle, {
173
173
  ...props,
@@ -25,9 +25,6 @@ const BannerSpacing = props => {
25
25
  const [size] = useWindowResize();
26
26
  const pro_value = getBreakPointsValue(val, size?.device);
27
27
  const [value, setValue] = useState(pro_value);
28
- useState(() => {
29
- setValue(pro_value);
30
- }, [pro_value]);
31
28
  const handleChange = e => {
32
29
  let changeAll = {};
33
30
  if (lockSpacing) {
@@ -40,7 +37,7 @@ const BannerSpacing = props => {
40
37
  ...changeAll,
41
38
  [e.target.name]: e.target.value
42
39
  };
43
- console.log(e.target.value, lockSpacing, changeAll, up_value, size?.device, getBreakPointsValue(val, null));
40
+ setValue(up_value);
44
41
  onChange({
45
42
  [key]: {
46
43
  ...getBreakPointsValue(val, null),
@@ -1,5 +1,6 @@
1
1
  import { Editor, Node, Path, Point, Transforms } from "slate";
2
2
  import { getNextNode } from "../utils/helper";
3
+ const BACKWARD_BLOCKS = ["list-item", "signature"];
3
4
  const isNodeTextEmpty = node => {
4
5
  const nodeText = Node.string(node);
5
6
  return nodeText.trim() === "";
@@ -29,9 +30,9 @@ const withCustomDeleteBackward = editor => {
29
30
  }
30
31
  }
31
32
 
32
- // Check if current node is a list item and is the last one
33
+ // Check if current node is a list item and is the last one, signature node
33
34
  const [node] = Editor.nodes(editor, {
34
- match: n => n.type === "list-item" // Adjust based on your list item type
35
+ match: n => BACKWARD_BLOCKS.includes(n.type) // Adjust based on your list item type
35
36
  });
36
37
 
37
38
  if (node) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "5.1.0",
3
+ "version": "5.1.2",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"