@flozy/editor 1.7.6 → 1.7.7

Sign up to get free protection for your applications and to get access to all the features.
@@ -8,12 +8,14 @@ import { jsxs as _jsxs } from "react/jsx-runtime";
8
8
  let c = [];
9
9
  const ColorChunks = (recentColors = []) => [...recentColors, ...colors].reduce((a, b, i) => {
10
10
  if (i % 7 === 0) {
11
- a.push(c);
11
+ if (c.length > 0) {
12
+ a.push(c);
13
+ }
12
14
  c = [];
13
15
  }
14
16
  c.push(b);
15
17
  return a;
16
- }, []).sort((a, b) => b.length - a.length);
18
+ }, []);
17
19
  const SingleColorButton = ({
18
20
  crs,
19
21
  index,
@@ -77,6 +79,9 @@ export const AllColors = props => {
77
79
  sx: classes.allColorInner,
78
80
  children: /*#__PURE__*/_jsx(Box, {
79
81
  className: "buttonsWrpr",
82
+ style: {
83
+ padding: "8px"
84
+ },
80
85
  children: all.map((m, i) => {
81
86
  return /*#__PURE__*/_jsx(SingleColorButton, {
82
87
  id: `pi_${id}`,
@@ -17,11 +17,11 @@ const ColorPickerStyles = () => ({
17
17
  "&:before": {
18
18
  content: '" "',
19
19
  position: "absolute",
20
- top: "-5px",
21
- left: "-5px",
22
- width: "calc(100% + 4px)",
23
- height: "calc(100% + 4px)",
24
- border: "3px solid #2563EB",
20
+ top: "-4px",
21
+ left: "-4px",
22
+ width: "calc(100% + 8px)",
23
+ height: "calc(100% + 8px)",
24
+ border: "2px solid #2563EB",
25
25
  borderRadius: "50%"
26
26
  }
27
27
  }
@@ -1 +1 @@
1
- export const colors = ["#0F172A", "#2563EB", "#8360FD", "#19A9FC", "#FDB52A", "#0E8E2A", "#E1425E", "#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%)"];
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"];
@@ -195,7 +195,6 @@ const usePopupStyle = () => ({
195
195
  allColor: {},
196
196
  allColorInner: {
197
197
  "& .buttonsWrpr": {
198
- paddingLeft: "8px",
199
198
  "& button": {
200
199
  border: "1px solid #ccc",
201
200
  margin: "4px",
@@ -217,8 +216,8 @@ const usePopupStyle = () => ({
217
216
  }
218
217
  },
219
218
  defaultBtn: {
220
- color: '#0F172A',
221
- textTransform: 'none'
219
+ color: "#0F172A",
220
+ textTransform: "none"
222
221
  }
223
222
  });
224
223
  export default usePopupStyle;
@@ -1,14 +1,15 @@
1
1
  import React from "react";
2
- import { MdFormatQuote, MdFormatAlignLeft, MdFormatAlignCenter, MdFormatAlignRight, MdFormatListNumbered, MdFormatListBulleted, MdAdd, MdArrowForward, MdEmojiEmotions, MdOutlinePermMedia, MdOutlineFileUpload } from "react-icons/md";
2
+ import { MdFormatQuote, MdFormatAlignLeft, MdFormatAlignCenter, MdFormatAlignRight, MdFormatListNumbered, MdFormatListBulleted, MdAdd, MdArrowForward, MdEmojiEmotions, MdOutlinePermMedia } from "react-icons/md";
3
3
  import { BsTypeH1, BsTypeH2, BsTypeH3, BsCameraVideoFill, BsArrowBarRight, BsArrowBarLeft } from "react-icons/bs";
4
4
  import { FaSuperscript, FaSubscript } from "react-icons/fa";
5
5
  import { FcAddRow, FcAddColumn } from "react-icons/fc";
6
6
  import { AiFillEdit, AiOutlineInsertRowBelow, AiOutlineInsertRowRight, AiOutlineDelete, AiFillTag, AiOutlineUpload, AiOutlineArrowsAlt, AiOutlineInsertRowAbove, AiOutlineInsertRowLeft, AiFillHtml5 } from "react-icons/ai";
7
7
  import { SiLatex } from "react-icons/si";
8
8
  import { RiDeleteColumn, RiDeleteRow } from "react-icons/ri";
9
- import { IoIosImage, IoIosLink, IoMdArrowDroprightCircle, IoMdArrowDropdownCircle } from "react-icons/io";
9
+ import { IoIosImage, IoMdArrowDroprightCircle, IoMdArrowDropdownCircle } from "react-icons/io";
10
10
  import { GridIcon, AccordionIcon, SignatureIcon, ButtonIcon, Carousal, FormIcon, BoldIcon, FontFamilyIcon, FontSizeIcon, ImageIcon, ItalicIcon, LinkIcon, StrikethroughIcon, TableIcon, UnderLineIcon, VideoIcon, CheckboxIcon, AppHeader, MoreHorizontal, UploadImage } from "./iconslist";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
+ import { jsxs as _jsxs } from "react/jsx-runtime";
12
13
  const iconList = {
13
14
  fontFamily: /*#__PURE__*/_jsx(FontFamilyIcon, {
14
15
  size: 20
@@ -162,7 +163,7 @@ const iconList = {
162
163
  addRow: /*#__PURE__*/_jsx(FcAddRow, {
163
164
  size: 20
164
165
  }),
165
- checkList: /*#__PURE__*/_jsx(CheckboxIcon, {
166
+ "check-list-item": /*#__PURE__*/_jsx(CheckboxIcon, {
166
167
  size: 20
167
168
  }),
168
169
  embed: /*#__PURE__*/_jsx(LinkIcon, {}),
@@ -187,6 +188,8 @@ const Icon = props => {
187
188
  const {
188
189
  icon
189
190
  } = props;
190
- return iconList[icon];
191
+ return iconList[icon] ? iconList[icon] : /*#__PURE__*/_jsxs("div", {
192
+ children: ["dummy ", icon]
193
+ });
191
194
  };
192
195
  export default Icon;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "1.7.6",
3
+ "version": "1.7.7",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"