@flozy/editor 1.0.7 → 1.0.9

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (30) hide show
  1. package/dist/Editor/CollaborativeEditor.js +6 -4
  2. package/dist/Editor/CommonEditor.js +43 -31
  3. package/dist/Editor/Elements/CodeToText/CodeToText.js +44 -33
  4. package/dist/Editor/Elements/CodeToText/CodeToTextButton.js +13 -8
  5. package/dist/Editor/Elements/CodeToText/HtmlCode.js +13 -8
  6. package/dist/Editor/Elements/CodeToText/HtmlContextMenu.js +15 -9
  7. package/dist/Editor/Elements/Color Picker/ColorPicker.js +63 -55
  8. package/dist/Editor/Elements/Embed/Embed.js +63 -50
  9. package/dist/Editor/Elements/Embed/Image.js +31 -25
  10. package/dist/Editor/Elements/Embed/Video.js +46 -41
  11. package/dist/Editor/Elements/Equation/Equation.js +17 -10
  12. package/dist/Editor/Elements/Equation/EquationButton.js +38 -29
  13. package/dist/Editor/Elements/Grid/Grid.js +14 -9
  14. package/dist/Editor/Elements/Grid/GridButton.js +5 -3
  15. package/dist/Editor/Elements/Grid/GridItem.js +18 -13
  16. package/dist/Editor/Elements/ID/Id.js +30 -24
  17. package/dist/Editor/Elements/Link/Link.js +27 -20
  18. package/dist/Editor/Elements/Link/LinkButton.js +50 -40
  19. package/dist/Editor/Elements/Mentions/Mentions.js +6 -4
  20. package/dist/Editor/Elements/NewLine/NewLineButton.js +5 -3
  21. package/dist/Editor/Elements/Table/Table.js +10 -3
  22. package/dist/Editor/Elements/Table/TableSelector.js +41 -33
  23. package/dist/Editor/Elements/TableContextMenu/TableContextMenu.js +21 -16
  24. package/dist/Editor/RemoteCursorOverlay/Overlay.js +35 -31
  25. package/dist/Editor/Toolbar/Toolbar.js +90 -94
  26. package/dist/Editor/common/Button.js +7 -6
  27. package/dist/Editor/common/Icon.js +34 -33
  28. package/dist/Editor/common/MentionsPopup.js +20 -18
  29. package/dist/Editor/utils/SlateUtilityFunctions.js +132 -52
  30. package/package.json +2 -2
@@ -1,9 +1,10 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
1
  import React, { useEffect, useState } from "react";
3
2
  import { useSlateStatic, useSelected, useFocused, ReactEditor } from "slate-react";
4
3
  import { Node, Transforms } from "slate";
5
4
  import Icon from "../../common/Icon";
6
- import useResize from "../../utils/customHooks/useResize.js";
5
+ import useResize from "../../utils/customHooks/useResize";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
7
8
  const Image = ({
8
9
  attributes,
9
10
  element,
@@ -37,34 +38,39 @@ const Image = ({
37
38
  });
38
39
  }
39
40
  }, [resizing]);
40
- return /*#__PURE__*/React.createElement("div", _extends({}, attributes, {
41
+ return /*#__PURE__*/_jsxs("div", {
42
+ ...attributes,
41
43
  className: "embed",
42
44
  style: {
43
45
  display: "flex",
44
46
  width: "100%",
45
47
  maxWidth: "100%",
46
48
  boxShadow: selected && focused && "0 0 3px 3px lightgray"
47
- }
48
- }, element.attr), /*#__PURE__*/React.createElement("div", {
49
- contentEditable: false,
50
- style: {
51
- position: "relative",
52
- width: size.widthInPercent ? `${size.widthInPercent}%` : `${size.width}px`,
53
- height: `${size.height}px`
54
- }
55
- }, /*#__PURE__*/React.createElement("img", {
56
- alt: alt,
57
- src: url
58
- }), selected && /*#__PURE__*/React.createElement("button", {
59
- onPointerDown: onMouseDown,
60
- style: {
61
- width: "15px",
62
- height: "15px",
63
- opacity: 1,
64
- background: "transparent"
65
- }
66
- }, /*#__PURE__*/React.createElement(Icon, {
67
- icon: "resize"
68
- }))), children);
49
+ },
50
+ ...element.attr,
51
+ children: [/*#__PURE__*/_jsxs("div", {
52
+ contentEditable: false,
53
+ style: {
54
+ position: "relative",
55
+ width: size.widthInPercent ? `${size.widthInPercent}%` : `${size.width}px`,
56
+ height: `${size.height}px`
57
+ },
58
+ children: [/*#__PURE__*/_jsx("img", {
59
+ alt: alt,
60
+ src: url
61
+ }), selected && /*#__PURE__*/_jsx("button", {
62
+ onPointerDown: onMouseDown,
63
+ style: {
64
+ width: "15px",
65
+ height: "15px",
66
+ opacity: 1,
67
+ background: "transparent"
68
+ },
69
+ children: /*#__PURE__*/_jsx(Icon, {
70
+ icon: "resize"
71
+ })
72
+ })]
73
+ }), children]
74
+ });
69
75
  };
70
76
  export default Image;
@@ -1,10 +1,9 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
1
  import React from "react";
3
2
  import { useSelected, useFocused } from "slate-react";
4
3
  import Icon from "../../common/Icon";
5
- import useResize from "../../utils/customHooks/useResize.js";
6
- // import "./Video.css";
7
-
4
+ import useResize from "../../utils/customHooks/useResize";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ import { jsxs as _jsxs } from "react/jsx-runtime";
8
7
  const Video = ({
9
8
  attributes,
10
9
  element,
@@ -17,46 +16,52 @@ const Video = ({
17
16
  const [size, onMouseDown, resizing] = useResize();
18
17
  const selected = useSelected();
19
18
  const focused = useFocused();
20
- return /*#__PURE__*/React.createElement("div", _extends({}, attributes, {
19
+ return /*#__PURE__*/_jsxs("div", {
20
+ ...attributes,
21
21
  className: "embed",
22
22
  style: {
23
23
  display: "flex",
24
24
  boxShadow: selected && focused && "0 0 3px 3px lightgray"
25
- }
26
- }, element.attr), /*#__PURE__*/React.createElement("div", {
27
- contentEditable: false,
28
- style: {
29
- width: `${size.width}px`,
30
- height: `${size.height}px`
31
- }
32
- },
33
- // The iframe reloads on each re-render and hence it stutters and the document doesn't detect mouse-up event leading to unwanted behaviour
34
- // So during resize replace the iframe with a simple div
35
- resizing ? /*#__PURE__*/React.createElement("div", {
36
- style: {
37
- width: "100%",
38
- height: "100%",
39
- border: "2px dashed black",
40
- display: "flex",
41
- justifyContent: "center",
42
- alignItems: "center"
43
- }
44
- }, /*#__PURE__*/React.createElement(Icon, {
45
- icon: "videoPlayer"
46
- })) : /*#__PURE__*/React.createElement("iframe", {
47
- src: url,
48
- frameBorder: "0",
49
- title: alt
50
- }), selected && /*#__PURE__*/React.createElement("button", {
51
- onMouseDown: onMouseDown,
52
- style: {
53
- width: "15px",
54
- height: "15px",
55
- opacity: 1,
56
- background: "transparent"
57
- }
58
- }, /*#__PURE__*/React.createElement(Icon, {
59
- icon: "resize"
60
- }))), children);
25
+ },
26
+ ...element.attr,
27
+ children: [/*#__PURE__*/_jsxs("div", {
28
+ contentEditable: false,
29
+ style: {
30
+ width: `${size.width}px`,
31
+ height: `${size.height}px`
32
+ },
33
+ children: [
34
+ // The iframe reloads on each re-render and hence it stutters and the document doesn't detect mouse-up event leading to unwanted behaviour
35
+ // So during resize replace the iframe with a simple div
36
+ resizing ? /*#__PURE__*/_jsx("div", {
37
+ style: {
38
+ width: "100%",
39
+ height: "100%",
40
+ border: "2px dashed black",
41
+ display: "flex",
42
+ justifyContent: "center",
43
+ alignItems: "center"
44
+ },
45
+ children: /*#__PURE__*/_jsx(Icon, {
46
+ icon: "videoPlayer"
47
+ })
48
+ }) : /*#__PURE__*/_jsx("iframe", {
49
+ src: url,
50
+ frameBorder: "0",
51
+ title: alt
52
+ }), selected && /*#__PURE__*/_jsx("button", {
53
+ onMouseDown: onMouseDown,
54
+ style: {
55
+ width: "15px",
56
+ height: "15px",
57
+ opacity: 1,
58
+ background: "transparent"
59
+ },
60
+ children: /*#__PURE__*/_jsx(Icon, {
61
+ icon: "resize"
62
+ })
63
+ })]
64
+ }), children]
65
+ });
61
66
  };
62
67
  export default Video;
@@ -1,7 +1,8 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
1
  import React from "react";
3
2
  import { InlineMath, BlockMath } from "react-katex";
4
3
  import "./styles.css";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { jsxs as _jsxs } from "react/jsx-runtime";
5
6
  const Equation = ({
6
7
  attributes,
7
8
  element,
@@ -11,14 +12,20 @@ const Equation = ({
11
12
  inline,
12
13
  math
13
14
  } = element;
14
- return /*#__PURE__*/React.createElement("div", {
15
- className: inline ? "equation-inline" : ""
16
- }, /*#__PURE__*/React.createElement("span", _extends({}, attributes, element.attr), /*#__PURE__*/React.createElement("span", {
17
- contentEditable: false
18
- }, inline ? /*#__PURE__*/React.createElement(InlineMath, {
19
- math: math
20
- }) : /*#__PURE__*/React.createElement(BlockMath, {
21
- math: math
22
- })), children));
15
+ return /*#__PURE__*/_jsx("div", {
16
+ className: inline ? "equation-inline" : "",
17
+ children: /*#__PURE__*/_jsxs("span", {
18
+ ...attributes,
19
+ ...element.attr,
20
+ children: [/*#__PURE__*/_jsx("span", {
21
+ contentEditable: false,
22
+ children: inline ? /*#__PURE__*/_jsx(InlineMath, {
23
+ math: math
24
+ }) : /*#__PURE__*/_jsx(BlockMath, {
25
+ math: math
26
+ })
27
+ }), children]
28
+ })
29
+ });
23
30
  };
24
31
  export default Equation;
@@ -2,8 +2,10 @@ import { useRef, useState } from 'react';
2
2
  import Button from '../../common/Button';
3
3
  import Icon from '../../common/Icon';
4
4
  import usePopup from '../../utils/customHooks/usePopup';
5
- import { insertEquation } from '../../utils/equation.js';
5
+ import { insertEquation } from '../../utils/equation';
6
6
  import { Transforms } from 'slate';
7
+ import { jsx as _jsx } from "react/jsx-runtime";
8
+ import { jsxs as _jsxs } from "react/jsx-runtime";
7
9
  const EquationButton = ({
8
10
  editor
9
11
  }) => {
@@ -33,34 +35,41 @@ const EquationButton = ({
33
35
  console.log('btn click');
34
36
  setShowInput(false);
35
37
  };
36
- return /*#__PURE__*/React.createElement("div", {
38
+ return /*#__PURE__*/_jsxs("div", {
37
39
  ref: equationInputRef,
38
- className: "popup-wrapper"
39
- }, /*#__PURE__*/React.createElement(Button, {
40
- format: "equation",
41
- onClick: toggleButton
42
- }, /*#__PURE__*/React.createElement(Icon, {
43
- icon: "equation"
44
- })), showInput && /*#__PURE__*/React.createElement("div", {
45
- className: "popup"
46
- }, /*#__PURE__*/React.createElement("div", {
47
- style: {
48
- display: 'flex',
49
- gap: '5px'
50
- }
51
- }, /*#__PURE__*/React.createElement("input", {
52
- type: "text",
53
- value: math,
54
- onChange: handleInputChange,
55
- placeholder: "Enter formula"
56
- }), /*#__PURE__*/React.createElement("div", {
57
- onClick: handleAddEquation
58
- }, /*#__PURE__*/React.createElement(Icon, {
59
- icon: "add"
60
- }))), /*#__PURE__*/React.createElement("label", null, /*#__PURE__*/React.createElement("input", {
61
- type: "checkbox",
62
- checked: displayInline,
63
- onChange: handleInputChange
64
- }), "Inline Equation")));
40
+ className: "popup-wrapper",
41
+ children: [/*#__PURE__*/_jsx(Button, {
42
+ format: "equation",
43
+ onClick: toggleButton,
44
+ children: /*#__PURE__*/_jsx(Icon, {
45
+ icon: "equation"
46
+ })
47
+ }), showInput && /*#__PURE__*/_jsxs("div", {
48
+ className: "popup",
49
+ children: [/*#__PURE__*/_jsxs("div", {
50
+ style: {
51
+ display: 'flex',
52
+ gap: '5px'
53
+ },
54
+ children: [/*#__PURE__*/_jsx("input", {
55
+ type: "text",
56
+ value: math,
57
+ onChange: handleInputChange,
58
+ placeholder: "Enter formula"
59
+ }), /*#__PURE__*/_jsx("div", {
60
+ onClick: handleAddEquation,
61
+ children: /*#__PURE__*/_jsx(Icon, {
62
+ icon: "add"
63
+ })
64
+ })]
65
+ }), /*#__PURE__*/_jsxs("label", {
66
+ children: [/*#__PURE__*/_jsx("input", {
67
+ type: "checkbox",
68
+ checked: displayInline,
69
+ onChange: handleInputChange
70
+ }), "Inline Equation"]
71
+ })]
72
+ })]
73
+ });
65
74
  };
66
75
  export default EquationButton;
@@ -1,8 +1,9 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
1
  import React from "react";
3
2
  import { Transforms, Path } from "slate";
4
3
  import { useSelected, useSlateStatic } from "slate-react";
5
4
  import { gridItem } from "../../utils/gridItem";
5
+ import { jsx as _jsx } from "react/jsx-runtime";
6
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
7
  const Grid = props => {
7
8
  const {
8
9
  attributes,
@@ -39,15 +40,19 @@ const Grid = props => {
39
40
  }
40
41
  };
41
42
  const GridToolBar = () => {
42
- return selected ? /*#__PURE__*/React.createElement("div", {
43
+ return selected ? /*#__PURE__*/_jsx("div", {
43
44
  className: "grid-container-toolbar",
44
- contentEditable: false
45
- }, /*#__PURE__*/React.createElement("button", {
46
- onClick: onAddGridItem
47
- }, "+ Add Item")) : null;
45
+ contentEditable: false,
46
+ children: /*#__PURE__*/_jsx("button", {
47
+ onClick: onAddGridItem,
48
+ children: "+ Add Item"
49
+ })
50
+ }) : null;
48
51
  };
49
- return /*#__PURE__*/React.createElement("div", _extends({
50
- className: `grid-container ${grid}`
51
- }, attributes), /*#__PURE__*/React.createElement(GridToolBar, null), children);
52
+ return /*#__PURE__*/_jsxs("div", {
53
+ className: `grid-container ${grid}`,
54
+ ...attributes,
55
+ children: [/*#__PURE__*/_jsx(GridToolBar, {}), children]
56
+ });
52
57
  };
53
58
  export default Grid;
@@ -1,6 +1,7 @@
1
1
  import React from "react";
2
2
  import ViewComfyIcon from "@mui/icons-material/ViewComfy";
3
3
  import { insertGrid } from "../../utils/grid";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
4
5
  const GridButton = props => {
5
6
  const {
6
7
  editor
@@ -8,12 +9,13 @@ const GridButton = props => {
8
9
  const handleInsertGrid = () => {
9
10
  insertGrid(editor);
10
11
  };
11
- return /*#__PURE__*/React.createElement("button", {
12
+ return /*#__PURE__*/_jsx("button", {
12
13
  onClick: handleInsertGrid,
13
14
  title: "Layout",
14
15
  style: {
15
16
  marginLeft: "8px"
16
- }
17
- }, /*#__PURE__*/React.createElement(ViewComfyIcon, null));
17
+ },
18
+ children: /*#__PURE__*/_jsx(ViewComfyIcon, {})
19
+ });
18
20
  };
19
21
  export default GridButton;
@@ -1,7 +1,8 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
1
  import React from "react";
3
2
  import { Transforms, Element } from "slate";
4
3
  import { useSelected, useSlateStatic } from "slate-react";
4
+ import { jsx as _jsx } from "react/jsx-runtime";
5
+ import { jsxs as _jsxs } from "react/jsx-runtime";
5
6
  const GridItem = props => {
6
7
  const {
7
8
  attributes,
@@ -33,21 +34,25 @@ const GridItem = props => {
33
34
  });
34
35
  };
35
36
  const GridItemToolbar = () => {
36
- return selected ? /*#__PURE__*/React.createElement("div", {
37
+ return selected ? /*#__PURE__*/_jsxs("div", {
37
38
  contentEditable: false,
38
- className: "grid-item-toolbar"
39
- }, /*#__PURE__*/React.createElement("button", {
40
- onClick: onItemSizeDecrease
41
- }, "-"), /*#__PURE__*/React.createElement("button", {
42
- onClick: onItemSizeIncrease
43
- }, "+")) : null;
39
+ className: "grid-item-toolbar",
40
+ children: [/*#__PURE__*/_jsx("button", {
41
+ onClick: onItemSizeDecrease,
42
+ children: "-"
43
+ }), /*#__PURE__*/_jsx("button", {
44
+ onClick: onItemSizeIncrease,
45
+ children: "+"
46
+ })]
47
+ }) : null;
44
48
  };
45
- return /*#__PURE__*/React.createElement("div", _extends({
46
- className: `grid-item xs-${grid}`
47
- }, attributes, {
49
+ return /*#__PURE__*/_jsxs("div", {
50
+ className: `grid-item xs-${grid}`,
51
+ ...attributes,
48
52
  style: {
49
53
  width: `${itemWidth}%`
50
- }
51
- }), children, /*#__PURE__*/React.createElement(GridItemToolbar, null));
54
+ },
55
+ children: [children, /*#__PURE__*/_jsx(GridItemToolbar, {})]
56
+ });
52
57
  };
53
58
  export default GridItem;
@@ -3,6 +3,8 @@ import React, { useRef, useState } from "react";
3
3
  import Button from "../../common/Button";
4
4
  import Icon from "../../common/Icon";
5
5
  import usePopup from "../../utils/customHooks/usePopup";
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
6
8
  const Id = ({
7
9
  editor
8
10
  }) => {
@@ -27,30 +29,34 @@ const Id = ({
27
29
  setShowInput(false);
28
30
  setId("");
29
31
  };
30
- return /*#__PURE__*/React.createElement("div", {
32
+ return /*#__PURE__*/_jsxs("div", {
31
33
  className: "popup-wrapper",
32
- ref: idInputRef
33
- }, /*#__PURE__*/React.createElement(Button, {
34
- className: showInput ? "clicked" : "",
35
- format: "add Id",
36
- onClick: toggleId
37
- }, /*#__PURE__*/React.createElement(Icon, {
38
- icon: "addId"
39
- })), showInput && /*#__PURE__*/React.createElement("div", {
40
- className: "popup",
41
- style: {
42
- display: "flex",
43
- gap: "4px"
44
- }
45
- }, /*#__PURE__*/React.createElement("input", {
46
- type: "text",
47
- placeholder: "Enter an unique ID",
48
- value: id,
49
- onChange: e => setId(e.target.value)
50
- }), /*#__PURE__*/React.createElement("div", {
51
- onClick: handleId
52
- }, /*#__PURE__*/React.createElement(Icon, {
53
- icon: "add"
54
- }))));
34
+ ref: idInputRef,
35
+ children: [/*#__PURE__*/_jsx(Button, {
36
+ className: showInput ? "clicked" : "",
37
+ format: "add Id",
38
+ onClick: toggleId,
39
+ children: /*#__PURE__*/_jsx(Icon, {
40
+ icon: "addId"
41
+ })
42
+ }), showInput && /*#__PURE__*/_jsxs("div", {
43
+ className: "popup",
44
+ style: {
45
+ display: "flex",
46
+ gap: "4px"
47
+ },
48
+ children: [/*#__PURE__*/_jsx("input", {
49
+ type: "text",
50
+ placeholder: "Enter an unique ID",
51
+ value: id,
52
+ onChange: e => setId(e.target.value)
53
+ }), /*#__PURE__*/_jsx("div", {
54
+ onClick: handleId,
55
+ children: /*#__PURE__*/_jsx(Icon, {
56
+ icon: "add"
57
+ })
58
+ })]
59
+ })]
60
+ });
55
61
  };
56
62
  export default Id;
@@ -1,9 +1,10 @@
1
- function _extends() { _extends = Object.assign ? Object.assign.bind() : function (target) { for (var i = 1; i < arguments.length; i++) { var source = arguments[i]; for (var key in source) { if (Object.prototype.hasOwnProperty.call(source, key)) { target[key] = source[key]; } } } return target; }; return _extends.apply(this, arguments); }
2
1
  import React from 'react';
3
2
  import { useFocused, useSelected, useSlateStatic } from 'slate-react';
4
- import { removeLink } from '../../utils/link.js';
3
+ import { removeLink } from '../../utils/link';
5
4
  import unlink from '../../Toolbar/toolbarIcons/unlink.svg';
6
5
  import './styles.css';
6
+ import { jsx as _jsx } from "react/jsx-runtime";
7
+ import { jsxs as _jsxs } from "react/jsx-runtime";
7
8
  const Link = ({
8
9
  attributes,
9
10
  element,
@@ -12,23 +13,29 @@ const Link = ({
12
13
  const editor = useSlateStatic();
13
14
  const selected = useSelected();
14
15
  const focused = useFocused();
15
- return /*#__PURE__*/React.createElement("div", {
16
- className: "link"
17
- }, /*#__PURE__*/React.createElement("a", _extends({
18
- href: element.href
19
- }, attributes, element.attr, {
20
- target: element.target
21
- }), children), selected && focused && /*#__PURE__*/React.createElement("div", {
22
- className: "link-popup",
23
- contentEditable: false
24
- }, /*#__PURE__*/React.createElement("a", {
25
- href: element.href,
26
- target: element.target
27
- }, element.href), /*#__PURE__*/React.createElement("button", {
28
- onClick: () => removeLink(editor)
29
- }, /*#__PURE__*/React.createElement("img", {
30
- src: unlink,
31
- alt: ""
32
- }))));
16
+ return /*#__PURE__*/_jsxs("div", {
17
+ className: "link",
18
+ children: [/*#__PURE__*/_jsx("a", {
19
+ href: element.href,
20
+ ...attributes,
21
+ ...element.attr,
22
+ target: element.target,
23
+ children: children
24
+ }), selected && focused && /*#__PURE__*/_jsxs("div", {
25
+ className: "link-popup",
26
+ contentEditable: false,
27
+ children: [/*#__PURE__*/_jsx("a", {
28
+ href: element.href,
29
+ target: element.target,
30
+ children: element.href
31
+ }), /*#__PURE__*/_jsx("button", {
32
+ onClick: () => removeLink(editor),
33
+ children: /*#__PURE__*/_jsx("img", {
34
+ src: unlink,
35
+ alt: ""
36
+ })
37
+ })]
38
+ })]
39
+ });
33
40
  };
34
41
  export default Link;