@flozy/editor 5.0.2 → 5.0.3

Sign up to get free protection for your applications and to get access to all the features.
@@ -622,21 +622,7 @@ blockquote {
622
622
  }
623
623
 
624
624
  .MuiIconButton-root.btnActive {
625
- svg path {
626
- stroke: #2563EB;
627
- }
628
-
629
- svg text,
630
- svg circle,
631
- .fill-svg,
632
- .fill-path,
633
- .fill-path path {
634
- fill: #2563EB;
635
- }
636
-
637
- path.fill-path {
638
- stroke: none;
639
- }
625
+ color: #2563EB !important;
640
626
  }
641
627
 
642
628
  .embed .element-toolbar {
@@ -7,7 +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
+ import { clearBrainText } from "../../helper";
11
11
  import { jsx as _jsx } from "react/jsx-runtime";
12
12
  import { Fragment as _Fragment } from "react/jsx-runtime";
13
13
  import { jsxs as _jsxs } from "react/jsx-runtime";
@@ -89,15 +89,7 @@ const SearchButton = /*#__PURE__*/forwardRef((props, ref) => {
89
89
  setSkip(0);
90
90
  };
91
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
- }
92
+ clearBrainText(editor);
101
93
  setAnchorEl(null);
102
94
  };
103
95
  const handleClick = data => {
@@ -31,6 +31,9 @@ const BlockButton = props => {
31
31
  },
32
32
  title: title,
33
33
  sx: classes.textAlignButtons,
34
+ style: {
35
+ color: "#64748B"
36
+ },
34
37
  children: /*#__PURE__*/_jsx(Icon, {
35
38
  icon: format
36
39
  })
@@ -16,6 +16,9 @@ const MarkButton = ({
16
16
  toggleMark(editor, format);
17
17
  },
18
18
  title: title,
19
+ style: {
20
+ color: "#64748B"
21
+ },
19
22
  children: /*#__PURE__*/_jsx(Icon, {
20
23
  icon: format
21
24
  })
@@ -145,7 +145,10 @@ const usePopupStyle = theme => ({
145
145
  background: "#2563EB"
146
146
  },
147
147
  "& .MuiTabScrollButton-horizontal": {
148
- borderBottom: "unset !important"
148
+ borderBottom: "unset !important",
149
+ "& svg": {
150
+ color: theme?.palette?.editor?.closeButtonSvgStroke
151
+ }
149
152
  },
150
153
  "@media only screen and (max-width: 599px)": {
151
154
  width: "330px"
@@ -336,50 +339,50 @@ const usePopupStyle = theme => ({
336
339
  marginBottom: "16px"
337
340
  },
338
341
  textAlignButtons: {
339
- "& .justifyIcon": {
340
- "& path": {
341
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
342
- stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
343
- }
344
- },
345
- "& .textAlignIconSameStyles": {
346
- "& path": {
347
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
348
- }
349
- },
350
- "& .orderedListIcon": {
351
- "& path": {
352
- stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
353
- },
354
- "& text": {
355
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
356
- }
357
- },
358
- "& .bulletedListTextIcon": {
359
- "& path": {
360
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
361
- stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
362
- },
363
- "& circle": {
364
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
365
- }
366
- },
367
- "& .checkedListTextIcon": {
368
- "& path": {
369
- stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
370
- }
371
- },
372
- "& .accordianListTextIcon": {
373
- // stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`,
374
- "& svg": {
375
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
376
- stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
377
- },
378
- "& path": {
379
- fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
380
- stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`
381
- }
382
- }
342
+ // "& .justifyIcon": {
343
+ // "& path": {
344
+ // fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
345
+ // stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
346
+ // },
347
+ // },
348
+ // "& .textAlignIconSameStyles": {
349
+ // "& path": {
350
+ // fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
351
+ // },
352
+ // },
353
+ // "& .orderedListIcon": {
354
+ // "& path": {
355
+ // stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
356
+ // },
357
+ // "& text": {
358
+ // fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
359
+ // },
360
+ // },
361
+ // "& .bulletedListTextIcon": {
362
+ // "& path": {
363
+ // fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
364
+ // stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
365
+ // },
366
+ // "& circle": {
367
+ // fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
368
+ // },
369
+ // },
370
+ // "& .checkedListTextIcon": {
371
+ // "& path": {
372
+ // stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
373
+ // },
374
+ // },
375
+ // "& .accordianListTextIcon": {
376
+ // // stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor} !important`,
377
+ // "& svg": {
378
+ // fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
379
+ // stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
380
+ // },
381
+ // "& path": {
382
+ // fill: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
383
+ // stroke: `${theme?.palette?.editor?.svgTextAlignStrokeColor}`,
384
+ // },
385
+ // },
383
386
  },
384
387
  autoCompleteaFontFamily: {
385
388
  "& .MuiOutlinedInput-root": {
@@ -18,7 +18,7 @@ const usePopupStyles = theme => ({
18
18
  "& button": {
19
19
  padding: "0px 0px 0px 6px",
20
20
  "& svg": {
21
- width: "19px !important",
21
+ // width: "19px !important",
22
22
  paddingRight: "6px"
23
23
  }
24
24
  },
@@ -215,7 +215,8 @@ const usePopupStyles = theme => ({
215
215
  margin: "8px",
216
216
  display: "flex",
217
217
  justifyContent: "center",
218
- alignItems: "center"
218
+ alignItems: "center",
219
+ color: "#64748B"
219
220
  }
220
221
  });
221
222
  export default usePopupStyles;
@@ -462,19 +462,19 @@ export const OrderedListTextFormatIcon = props => /*#__PURE__*/_jsxs("svg", {
462
462
  className: "orderedListIcon",
463
463
  children: [/*#__PURE__*/_jsx("path", {
464
464
  d: "M11 19.8564H21",
465
- stroke: "#64748B",
465
+ stroke: "currentColor",
466
466
  strokeWidth: "1.5",
467
467
  strokeLinecap: "round",
468
468
  strokeLinejoin: "round"
469
469
  }), /*#__PURE__*/_jsx("path", {
470
470
  d: "M11 12.8564H21",
471
- stroke: "#64748B",
471
+ stroke: "currentColor",
472
472
  strokeWidth: "1.5",
473
473
  strokeLinecap: "round",
474
474
  strokeLinejoin: "round"
475
475
  }), /*#__PURE__*/_jsx("path", {
476
476
  d: "M11 5.85645H21",
477
- stroke: "#64748B",
477
+ stroke: "currentColor",
478
478
  strokeWidth: "1.5",
479
479
  strokeLinecap: "round",
480
480
  strokeLinejoin: "round"
@@ -482,19 +482,19 @@ export const OrderedListTextFormatIcon = props => /*#__PURE__*/_jsxs("svg", {
482
482
  x: "3",
483
483
  y: "8",
484
484
  fontSize: "5",
485
- fill: "#64748B",
485
+ fill: "currentColor",
486
486
  children: "1"
487
487
  }), /*#__PURE__*/_jsx("text", {
488
488
  x: "3",
489
489
  y: "14",
490
490
  fontSize: "5",
491
- fill: "#64748B",
491
+ fill: "currentColor",
492
492
  children: "2"
493
493
  }), /*#__PURE__*/_jsx("text", {
494
494
  x: "3",
495
495
  y: "21",
496
496
  fontSize: "5",
497
- fill: "#64748B",
497
+ fill: "currentColor",
498
498
  children: "3"
499
499
  })]
500
500
  });
@@ -507,19 +507,19 @@ export const BulletedListTextFormatIcon = props => /*#__PURE__*/_jsxs("svg", {
507
507
  className: "bulletedListTextIcon",
508
508
  children: [/*#__PURE__*/_jsx("path", {
509
509
  d: "M11 19.8564H21",
510
- stroke: "#64748B",
510
+ stroke: "currentColor",
511
511
  strokeWidth: "1.5",
512
512
  strokeLinecap: "round",
513
513
  strokeLinejoin: "round"
514
514
  }), /*#__PURE__*/_jsx("path", {
515
515
  d: "M11 12.8564H21",
516
- stroke: "#64748B",
516
+ stroke: "currentColor",
517
517
  strokeWidth: "1.5",
518
518
  strokeLinecap: "round",
519
519
  strokeLinejoin: "round"
520
520
  }), /*#__PURE__*/_jsx("path", {
521
521
  d: "M11 5.85645H21",
522
- stroke: "#64748B",
522
+ stroke: "currentColor",
523
523
  strokeWidth: "1.5",
524
524
  strokeLinecap: "round",
525
525
  strokeLinejoin: "round"
@@ -527,17 +527,17 @@ export const BulletedListTextFormatIcon = props => /*#__PURE__*/_jsxs("svg", {
527
527
  cx: "5.25",
528
528
  cy: "5.80664",
529
529
  r: "1.25",
530
- fill: "#64748B"
530
+ fill: "currentColor"
531
531
  }), /*#__PURE__*/_jsx("circle", {
532
532
  cx: "5.25",
533
533
  cy: "12.8066",
534
534
  r: "1.25",
535
- fill: "#64748B"
535
+ fill: "currentColor"
536
536
  }), /*#__PURE__*/_jsx("circle", {
537
537
  cx: "5.25",
538
538
  cy: "19.8066",
539
539
  r: "1.25",
540
- fill: "#64748B"
540
+ fill: "currentColor"
541
541
  })]
542
542
  });
543
543
  export const CheckListTextFormatIcon = props => /*#__PURE__*/_jsxs("svg", {
@@ -549,37 +549,37 @@ export const CheckListTextFormatIcon = props => /*#__PURE__*/_jsxs("svg", {
549
549
  className: "checkedListTextIcon",
550
550
  children: [/*#__PURE__*/_jsx("path", {
551
551
  d: "M11 19.8564H21",
552
- stroke: "#64748B",
552
+ stroke: "currentColor",
553
553
  strokeWidth: "1.5",
554
554
  strokeLinecap: "round",
555
555
  strokeLinejoin: "round"
556
556
  }), /*#__PURE__*/_jsx("path", {
557
557
  d: "M11 12.8564H21",
558
- stroke: "#64748B",
558
+ stroke: "currentColor",
559
559
  strokeWidth: "1.5",
560
560
  strokeLinecap: "round",
561
561
  strokeLinejoin: "round"
562
562
  }), /*#__PURE__*/_jsx("path", {
563
563
  d: "M11 5.85645H21",
564
- stroke: "#64748B",
564
+ stroke: "currentColor",
565
565
  strokeWidth: "1.5",
566
566
  strokeLinecap: "round",
567
567
  strokeLinejoin: "round"
568
568
  }), /*#__PURE__*/_jsx("path", {
569
569
  d: "M3 5.85645L4 6.85645L7 3.85645",
570
- stroke: "#64748B",
570
+ stroke: "currentColor",
571
571
  strokeWidth: "1.5",
572
572
  strokeLinecap: "round",
573
573
  strokeLinejoin: "round"
574
574
  }), /*#__PURE__*/_jsx("path", {
575
575
  d: "M3 12.8564L4 13.8564L7 10.8564",
576
- stroke: "#64748B",
576
+ stroke: "currentColor",
577
577
  strokeWidth: "1.5",
578
578
  strokeLinecap: "round",
579
579
  strokeLinejoin: "round"
580
580
  }), /*#__PURE__*/_jsx("path", {
581
581
  d: "M3 19.8564L4 20.8564L7 17.8564",
582
- stroke: "#64748B",
582
+ stroke: "currentColor",
583
583
  strokeWidth: "1.5",
584
584
  strokeLinecap: "round",
585
585
  strokeLinejoin: "round"
@@ -628,10 +628,9 @@ export const BoldTextFormatIcon = props => /*#__PURE__*/_jsx("svg", {
628
628
  viewBox: "0 0 12 16",
629
629
  fill: "none",
630
630
  xmlns: "http://www.w3.org/2000/svg",
631
- className: "fill-path",
632
631
  children: /*#__PURE__*/_jsx("path", {
633
632
  d: "M0.598011 15.3564V0.81099H5.92472C6.95691 0.81099 7.81155 0.981445 8.48864 1.32235C9.16572 1.65853 9.67235 2.11544 10.0085 2.69309C10.3447 3.26601 10.5128 3.91232 10.5128 4.63201C10.5128 5.23807 10.4015 5.74944 10.179 6.1661C9.95644 6.57804 9.65814 6.90948 9.28409 7.16042C8.91477 7.40663 8.50758 7.58656 8.0625 7.7002V7.84224C8.54545 7.86591 9.01657 8.02216 9.47585 8.31099C9.93987 8.59508 10.3234 8.99991 10.6264 9.52548C10.9295 10.051 11.081 10.6903 11.081 11.4431C11.081 12.1865 10.9058 12.8541 10.5554 13.4459C10.2098 14.0331 9.67472 14.4994 8.95028 14.8451C8.22585 15.186 7.30019 15.3564 6.1733 15.3564H0.598011ZM2.79261 13.4743H5.96023C7.01136 13.4743 7.7642 13.2707 8.21875 12.8635C8.6733 12.4564 8.90057 11.9474 8.90057 11.3366C8.90057 10.8773 8.78456 10.4559 8.55256 10.0724C8.32055 9.68883 7.98911 9.38343 7.55824 9.15616C7.1321 8.92889 6.62547 8.81525 6.03835 8.81525H2.79261V13.4743ZM2.79261 7.1036H5.73295C6.22538 7.1036 6.66809 7.00891 7.06108 6.81951C7.45881 6.63012 7.77367 6.36497 8.00568 6.02406C8.24242 5.67841 8.3608 5.27122 8.3608 4.80247C8.3608 4.20114 8.15009 3.69688 7.72869 3.28968C7.30729 2.88249 6.66099 2.67889 5.78977 2.67889H2.79261V7.1036Z",
634
- fill: "#64748B"
633
+ fill: "currentColor"
635
634
  })
636
635
  });
637
636
  export const UnderlineTextFormatIcon = props => /*#__PURE__*/_jsxs("svg", {
@@ -642,13 +641,13 @@ export const UnderlineTextFormatIcon = props => /*#__PURE__*/_jsxs("svg", {
642
641
  xmlns: "http://www.w3.org/2000/svg",
643
642
  children: [/*#__PURE__*/_jsx("path", {
644
643
  d: "M3.41406 1.58301V6.16634C3.41406 7.38192 3.89695 8.54771 4.75649 9.40725C5.61603 10.2668 6.78182 10.7497 7.9974 10.7497C9.21297 10.7497 10.3788 10.2668 11.2383 9.40725C12.0978 8.54771 12.5807 7.38192 12.5807 6.16634V1.58301",
645
- stroke: "#64748B",
644
+ stroke: "currentColor",
646
645
  strokeWidth: "2",
647
646
  strokeLinecap: "round",
648
647
  strokeLinejoin: "round"
649
648
  }), /*#__PURE__*/_jsx("path", {
650
649
  d: "M1.58203 14.416H14.4154",
651
- stroke: "#64748B",
650
+ stroke: "currentColor",
652
651
  strokeWidth: "2",
653
652
  strokeLinecap: "round",
654
653
  strokeLinejoin: "round"
@@ -662,19 +661,19 @@ export const ItalicTextFormatIcon = props => /*#__PURE__*/_jsxs("svg", {
662
661
  xmlns: "http://www.w3.org/2000/svg",
663
662
  children: [/*#__PURE__*/_jsx("path", {
664
663
  d: "M4.71094 1.45801H9.46094",
665
- stroke: "#64748B",
664
+ stroke: "currentColor",
666
665
  strokeWidth: "2",
667
666
  strokeLinecap: "round",
668
667
  strokeLinejoin: "round"
669
668
  }), /*#__PURE__*/_jsx("path", {
670
669
  d: "M1.54297 12.541H6.29297",
671
- stroke: "#64748B",
670
+ stroke: "currentColor",
672
671
  strokeWidth: "2",
673
672
  strokeLinecap: "round",
674
673
  strokeLinejoin: "round"
675
674
  }), /*#__PURE__*/_jsx("path", {
676
675
  d: "M7.08464 1.45801L3.91797 12.5413",
677
- stroke: "#64748B",
676
+ stroke: "currentColor",
678
677
  strokeWidth: "2",
679
678
  strokeLinecap: "round",
680
679
  strokeLinejoin: "round"
@@ -951,16 +950,16 @@ export function LeftAlignTextFormat() {
951
950
  className: "textAlignIconSameStyles",
952
951
  children: [/*#__PURE__*/_jsx("path", {
953
952
  d: "M17.5 5.60547H2.5C2.15833 5.60547 1.875 5.26547 1.875 4.85547C1.875 4.44547 2.15833 4.10547 2.5 4.10547H17.5C17.8417 4.10547 18.125 4.44547 18.125 4.85547C18.125 5.26547 17.8417 5.60547 17.5 5.60547Z",
954
- fill: "#94A3B8"
953
+ fill: "currentColor"
955
954
  }), /*#__PURE__*/_jsx("path", {
956
955
  d: "M10.3917 10.6055H2.5C2.15833 10.6055 1.875 10.2655 1.875 9.85547C1.875 9.44547 2.15833 9.10547 2.5 9.10547H10.3917C10.7333 9.10547 11.0167 9.44547 11.0167 9.85547C11.0167 10.2655 10.7417 10.6055 10.3917 10.6055Z",
957
- fill: "#94A3B8"
956
+ fill: "currentColor"
958
957
  }), /*#__PURE__*/_jsx("path", {
959
958
  d: "M17.5 15.6055H2.5C2.15833 15.6055 1.875 15.2655 1.875 14.8555C1.875 14.4455 2.15833 14.1055 2.5 14.1055H17.5C17.8417 14.1055 18.125 14.4455 18.125 14.8555C18.125 15.2655 17.8417 15.6055 17.5 15.6055Z",
960
- fill: "#94A3B8"
959
+ fill: "currentColor"
961
960
  }), /*#__PURE__*/_jsx("path", {
962
961
  d: "M10.3917 20.6055H2.5C2.15833 20.6055 1.875 20.2655 1.875 19.8555C1.875 19.4455 2.15833 19.1055 2.5 19.1055H10.3917C10.7333 19.1055 11.0167 19.4455 11.0167 19.8555C11.0167 20.2655 10.7417 20.6055 10.3917 20.6055Z",
963
- fill: "#94A3B8"
962
+ fill: "currentColor"
964
963
  })]
965
964
  });
966
965
  }
@@ -974,16 +973,16 @@ export function CenterAlignTextFormat() {
974
973
  className: "textAlignIconSameStyles",
975
974
  children: [/*#__PURE__*/_jsx("path", {
976
975
  d: "M17.5 5.60547H2.5C2.15833 5.60547 1.875 5.26547 1.875 4.85547C1.875 4.44547 2.15833 4.10547 2.5 4.10547H17.5C17.8417 4.10547 18.125 4.44547 18.125 4.85547C18.125 5.26547 17.8417 5.60547 17.5 5.60547Z",
977
- fill: "#8F9CAE"
976
+ fill: "currentColor"
978
977
  }), /*#__PURE__*/_jsx("path", {
979
978
  d: "M13.9508 10.6055H6.05078C5.70911 10.6055 5.42578 10.2655 5.42578 9.85547C5.42578 9.44547 5.70911 9.10547 6.05078 9.10547H13.9424C14.2841 9.10547 14.5674 9.44547 14.5674 9.85547C14.5674 10.2655 14.2924 10.6055 13.9508 10.6055Z",
980
- fill: "#8F9CAE"
979
+ fill: "currentColor"
981
980
  }), /*#__PURE__*/_jsx("path", {
982
981
  d: "M17.5 15.6055H2.5C2.15833 15.6055 1.875 15.2655 1.875 14.8555C1.875 14.4455 2.15833 14.1055 2.5 14.1055H17.5C17.8417 14.1055 18.125 14.4455 18.125 14.8555C18.125 15.2655 17.8417 15.6055 17.5 15.6055Z",
983
- fill: "#8F9CAE"
982
+ fill: "currentColor"
984
983
  }), /*#__PURE__*/_jsx("path", {
985
984
  d: "M13.9508 20.6055H6.05078C5.70911 20.6055 5.42578 20.2655 5.42578 19.8555C5.42578 19.4455 5.70911 19.1055 6.05078 19.1055H13.9424C14.2841 19.1055 14.5674 19.4455 14.5674 19.8555C14.5674 20.2655 14.2924 20.6055 13.9508 20.6055Z",
986
- fill: "#8F9CAE"
985
+ fill: "currentColor"
987
986
  })]
988
987
  });
989
988
  }
@@ -997,16 +996,16 @@ export function RightAlignTextFormat() {
997
996
  className: "textAlignIconSameStyles",
998
997
  children: [/*#__PURE__*/_jsx("path", {
999
998
  d: "M17.5 5.60547H2.5C2.15833 5.60547 1.875 5.26547 1.875 4.85547C1.875 4.44547 2.15833 4.10547 2.5 4.10547H17.5C17.8417 4.10547 18.125 4.44547 18.125 4.85547C18.125 5.26547 17.8417 5.60547 17.5 5.60547Z",
1000
- fill: "#94A3B8"
999
+ fill: "currentColor"
1001
1000
  }), /*#__PURE__*/_jsx("path", {
1002
1001
  d: "M17.4991 10.6055H9.60742C9.26576 10.6055 8.98242 10.2655 8.98242 9.85547C8.98242 9.44547 9.26576 9.10547 9.60742 9.10547H17.4991C17.8408 9.10547 18.1241 9.44547 18.1241 9.85547C18.1241 10.2655 17.8408 10.6055 17.4991 10.6055Z",
1003
- fill: "#94A3B8"
1002
+ fill: "currentColor"
1004
1003
  }), /*#__PURE__*/_jsx("path", {
1005
1004
  d: "M17.5 15.6055H2.5C2.15833 15.6055 1.875 15.2655 1.875 14.8555C1.875 14.4455 2.15833 14.1055 2.5 14.1055H17.5C17.8417 14.1055 18.125 14.4455 18.125 14.8555C18.125 15.2655 17.8417 15.6055 17.5 15.6055Z",
1006
- fill: "#94A3B8"
1005
+ fill: "currentColor"
1007
1006
  }), /*#__PURE__*/_jsx("path", {
1008
1007
  d: "M17.4991 20.6055H9.60742C9.26576 20.6055 8.98242 20.2655 8.98242 19.8555C8.98242 19.4455 9.26576 19.1055 9.60742 19.1055H17.4991C17.8408 19.1055 18.1241 19.4455 18.1241 19.8555C18.1241 20.2655 17.8408 20.6055 17.4991 20.6055Z",
1009
- fill: "#94A3B8"
1008
+ fill: "currentColor"
1010
1009
  })]
1011
1010
  });
1012
1011
  }
@@ -1021,25 +1020,25 @@ export function JustifyTextFormat() {
1021
1020
  className: "justifyIcon",
1022
1021
  children: [/*#__PURE__*/_jsx("path", {
1023
1022
  d: "M2.5 4.85547H17.5",
1024
- stroke: "#8F9CAE",
1023
+ stroke: "currentColor",
1025
1024
  strokeWidth: "1.5",
1026
1025
  strokeLinecap: "round",
1027
1026
  strokeLinejoin: "round"
1028
1027
  }), /*#__PURE__*/_jsx("path", {
1029
1028
  d: "M2.5 9.85547H17.5",
1030
- stroke: "#8F9CAE",
1029
+ stroke: "currentColor",
1031
1030
  strokeWidth: "1.5",
1032
1031
  strokeLinecap: "round",
1033
1032
  strokeLinejoin: "round"
1034
1033
  }), /*#__PURE__*/_jsx("path", {
1035
1034
  d: "M2.5 14.8555H17.5",
1036
- stroke: "#8F9CAE",
1035
+ stroke: "currentColor",
1037
1036
  strokeWidth: "1.5",
1038
1037
  strokeLinecap: "round",
1039
1038
  strokeLinejoin: "round"
1040
1039
  }), /*#__PURE__*/_jsx("path", {
1041
1040
  d: "M2.5 19.8555H17.5",
1042
- stroke: "#8F9CAE",
1041
+ stroke: "currentColor",
1043
1042
  strokeWidth: "1.5",
1044
1043
  strokeLinecap: "round",
1045
1044
  strokeLinejoin: "round"
@@ -135,12 +135,11 @@ export const StrikethroughIcon = props => /*#__PURE__*/_jsx("svg", {
135
135
  height: "15",
136
136
  viewBox: "0 0 15 15",
137
137
  fill: "none",
138
- className: "fill-path",
139
138
  children: /*#__PURE__*/_jsx("path", {
140
139
  className: "strokeFillPath",
141
140
  d: "M2.7607 11.125C2.7607 13.0718 4.33885 14.65 6.28568 14.65H8.21432C10.1611 14.65 11.7393 13.0718 11.7393 11.125V10.6429C11.7393 9.78254 11.4309 8.99403 10.9189 8.38214H13.5179C13.867 8.38214 14.15 8.0991 14.15 7.75C14.15 7.4009 13.867 7.11786 13.5179 7.11786H8.21597H8.21435H6.28579C5.03727 7.11786 4.02509 6.10568 4.02509 4.85714V4.375C4.02509 3.12647 5.03727 2.11429 6.28579 2.11429H8.21435C9.46288 2.11429 10.4751 3.12647 10.4751 4.375V4.84874C10.4751 5.19784 10.7581 5.48088 11.1072 5.48088C11.4563 5.48088 11.7393 5.19784 11.7393 4.84874V4.375C11.7393 2.42817 10.1612 0.85 8.21435 0.85H6.28579C4.33897 0.85 2.76081 2.42817 2.76081 4.375V4.85714C2.76081 5.71746 3.06916 6.50597 3.58108 7.11786H0.982141C0.633044 7.11786 0.35 7.4009 0.35 7.75C0.35 8.0991 0.633044 8.38214 0.982141 8.38214H8.21424L8.21556 8.38214C8.21559 8.38214 8.21562 8.38214 8.21564 8.38214C9.46353 8.38289 10.4749 9.39474 10.4749 10.6429V11.125C10.4749 12.3735 9.46276 13.3857 8.21424 13.3857H6.28568C5.03715 13.3857 4.02498 12.3735 4.02498 11.125V10.6429C4.02498 10.2938 3.74193 10.0107 3.39284 10.0107C3.04374 10.0107 2.7607 10.2938 2.7607 10.6429V11.125Z",
142
- fill: "#64748B",
143
- stroke: "#64748B",
141
+ fill: "currentColor",
142
+ stroke: "currentColor",
144
143
  strokeWidth: "0.3"
145
144
  })
146
145
  });
@@ -342,4 +342,20 @@ export const isCarouselSelected = editor => {
342
342
  console.log(err);
343
343
  return false;
344
344
  }
345
+ };
346
+ export const clearBrainText = editor => {
347
+ try {
348
+ const {
349
+ selection
350
+ } = editor;
351
+ if (selection) {
352
+ const [currentNode, currentPath] = Editor.node(editor, selection);
353
+ const cleanedText = Node.string(currentNode).replace(/\/b(?:rain|r|ra|rai)?/g, "").trim();
354
+ Transforms.insertText(editor, cleanedText, {
355
+ at: currentPath
356
+ });
357
+ }
358
+ } catch (err) {
359
+ console.log(err);
360
+ }
345
361
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@flozy/editor",
3
- "version": "5.0.2",
3
+ "version": "5.0.3",
4
4
  "description": "An Editor for flozy app brain",
5
5
  "files": [
6
6
  "dist"
@@ -68,9 +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/agmac03/flozy/client/node_modules/@flozy/editor/dist && babel src/components -d /Users/agmac03/flozy/client/node_modules/@flozy/editor/dist --copy-files",
72
- "publish:local2": "rm -rf /Users/agmac23/Desktop/surya/sweetpsocial-2.0/client/node_modules/@flozy/editor/dist && babel src/components -d /Users/agmac23/Desktop/surya/sweetpsocial-2.0/client/node_modules/@flozy/editor/dist --copy-files",
73
- "publish:local3": "rm -rf /Users/agmac23/Desktop/surya/flozy_v2.0/microservices/pages/public && cp -r /Users/agmac23/Desktop/surya/editor/build /Users/agmac23/Desktop/surya/flozy_v2.0/microservices/pages/public"
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"
74
72
  },
75
73
  "eslintConfig": {
76
74
  "extends": [