@contentful/field-editor-rich-text 4.20.14 → 5.0.0
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.
- package/dist/cjs/CharConstraints.js +4 -4
- package/dist/cjs/RichTextEditor.js +3 -3
- package/dist/cjs/RichTextEditor.styles.js +8 -8
- package/dist/cjs/Toolbar/components/StickyToolbarWrapper.js +2 -2
- package/dist/cjs/Toolbar/index.js +6 -6
- package/dist/cjs/dialogs/HypelinkDialog/HyperlinkDialog.js +3 -3
- package/dist/cjs/plugins/CommandPalette/components/CommandList.js +4 -6
- package/dist/cjs/plugins/CommandPalette/components/CommandList.styles.js +12 -12
- package/dist/cjs/plugins/CommandPalette/components/CommandPrompt.js +2 -2
- package/dist/cjs/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.js +2 -2
- package/dist/cjs/plugins/Heading/components/Heading.js +17 -17
- package/dist/cjs/plugins/Heading/components/ToolbarHeadingButton.js +11 -11
- package/dist/cjs/plugins/Hr/index.js +5 -5
- package/dist/cjs/plugins/Hyperlink/HyperlinkModal.js +2 -2
- package/dist/cjs/plugins/Hyperlink/components/styles.js +6 -6
- package/dist/cjs/plugins/List/components/List.js +5 -5
- package/dist/cjs/plugins/List/components/ListItem.js +2 -2
- package/dist/cjs/plugins/Marks/Bold.js +2 -2
- package/dist/cjs/plugins/Marks/Code.js +2 -2
- package/dist/cjs/plugins/Marks/Italic.js +2 -2
- package/dist/cjs/plugins/Marks/Strikethrough.js +2 -2
- package/dist/cjs/plugins/Marks/Subscript.js +5 -3
- package/dist/cjs/plugins/Marks/Superscript.js +2 -2
- package/dist/cjs/plugins/Marks/components/MarkToolbarButton.js +3 -3
- package/dist/cjs/plugins/Paragraph/Paragraph.js +2 -2
- package/dist/cjs/plugins/Quote/components/Quote.js +2 -2
- package/dist/cjs/plugins/Table/components/Cell.js +2 -2
- package/dist/cjs/plugins/Table/components/HeaderCell.js +2 -2
- package/dist/cjs/plugins/Table/components/Row.js +2 -2
- package/dist/cjs/plugins/Table/components/Table.js +2 -2
- package/dist/cjs/plugins/Table/components/TableActions.js +2 -2
- package/dist/cjs/plugins/shared/EmbeddedBlockToolbarIcon.js +2 -2
- package/dist/cjs/plugins/shared/EmbeddedInlineToolbarIcon.js +3 -3
- package/dist/cjs/plugins/shared/LinkedBlockWrapper.js +3 -3
- package/dist/cjs/plugins/shared/LinkedInlineWrapper.js +3 -3
- package/dist/cjs/plugins/shared/ToolbarButton.js +37 -17
- package/dist/esm/CharConstraints.js +1 -1
- package/dist/esm/RichTextEditor.js +1 -1
- package/dist/esm/RichTextEditor.styles.js +1 -1
- package/dist/esm/Toolbar/components/StickyToolbarWrapper.js +1 -1
- package/dist/esm/Toolbar/index.js +1 -1
- package/dist/esm/dialogs/HypelinkDialog/HyperlinkDialog.js +1 -1
- package/dist/esm/plugins/CommandPalette/components/CommandList.js +1 -3
- package/dist/esm/plugins/CommandPalette/components/CommandList.styles.js +1 -1
- package/dist/esm/plugins/CommandPalette/components/CommandPrompt.js +1 -1
- package/dist/esm/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.js +1 -1
- package/dist/esm/plugins/Heading/components/Heading.js +1 -1
- package/dist/esm/plugins/Heading/components/ToolbarHeadingButton.js +1 -1
- package/dist/esm/plugins/Hr/index.js +1 -1
- package/dist/esm/plugins/Hyperlink/HyperlinkModal.js +1 -1
- package/dist/esm/plugins/Hyperlink/components/styles.js +1 -1
- package/dist/esm/plugins/List/components/List.js +1 -1
- package/dist/esm/plugins/List/components/ListItem.js +1 -1
- package/dist/esm/plugins/Marks/Bold.js +1 -1
- package/dist/esm/plugins/Marks/Code.js +1 -1
- package/dist/esm/plugins/Marks/Italic.js +1 -1
- package/dist/esm/plugins/Marks/Strikethrough.js +1 -1
- package/dist/esm/plugins/Marks/Subscript.js +4 -2
- package/dist/esm/plugins/Marks/Superscript.js +1 -1
- package/dist/esm/plugins/Marks/components/MarkToolbarButton.js +1 -1
- package/dist/esm/plugins/Paragraph/Paragraph.js +1 -1
- package/dist/esm/plugins/Quote/components/Quote.js +1 -1
- package/dist/esm/plugins/Table/components/Cell.js +1 -1
- package/dist/esm/plugins/Table/components/HeaderCell.js +1 -1
- package/dist/esm/plugins/Table/components/Row.js +1 -1
- package/dist/esm/plugins/Table/components/Table.js +1 -1
- package/dist/esm/plugins/Table/components/TableActions.js +1 -1
- package/dist/esm/plugins/shared/EmbeddedBlockToolbarIcon.js +1 -1
- package/dist/esm/plugins/shared/EmbeddedInlineToolbarIcon.js +1 -1
- package/dist/esm/plugins/shared/LinkedBlockWrapper.js +1 -1
- package/dist/esm/plugins/shared/LinkedInlineWrapper.js +1 -1
- package/dist/esm/plugins/shared/ToolbarButton.js +35 -15
- package/dist/types/plugins/Hyperlink/components/LinkPopover.d.ts +1 -1
- package/dist/types/plugins/shared/ToolbarButton.d.ts +1 -1
- package/package.json +12 -10
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "ListItem", {
|
|
|
10
10
|
});
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
13
|
-
const
|
|
13
|
+
const _css = require("@emotion/css");
|
|
14
14
|
function _interop_require_default(obj) {
|
|
15
15
|
return obj && obj.__esModule ? obj : {
|
|
16
16
|
default: obj
|
|
@@ -57,7 +57,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
57
57
|
}
|
|
58
58
|
return newObj;
|
|
59
59
|
}
|
|
60
|
-
const style = (0,
|
|
60
|
+
const style = (0, _css.css)`
|
|
61
61
|
margin: 0;
|
|
62
62
|
list-style: inherit;
|
|
63
63
|
margin-top: ${_f36tokens.default.spacingXs};
|
|
@@ -22,8 +22,8 @@ _export(exports, {
|
|
|
22
22
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
23
23
|
const _f36icons = require("@contentful/f36-icons");
|
|
24
24
|
const _richtexttypes = require("@contentful/rich-text-types");
|
|
25
|
+
const _css = require("@emotion/css");
|
|
25
26
|
const _platebasicmarks = require("@udecode/plate-basic-marks");
|
|
26
|
-
const _emotion = require("emotion");
|
|
27
27
|
const _queries = require("../../internal/queries");
|
|
28
28
|
const _MarkToolbarButton = require("./components/MarkToolbarButton");
|
|
29
29
|
const _helpers = require("./helpers");
|
|
@@ -74,7 +74,7 @@ const ToolbarBoldButton = (0, _MarkToolbarButton.createMarkToolbarButton)({
|
|
|
74
74
|
icon: /*#__PURE__*/ _react.createElement(_f36icons.TextBIcon, null)
|
|
75
75
|
});
|
|
76
76
|
const styles = {
|
|
77
|
-
bold: (0,
|
|
77
|
+
bold: (0, _css.css)({
|
|
78
78
|
fontWeight: 600
|
|
79
79
|
})
|
|
80
80
|
};
|
|
@@ -25,8 +25,8 @@ _export(exports, {
|
|
|
25
25
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
26
26
|
const _f36icons = require("@contentful/f36-icons");
|
|
27
27
|
const _richtexttypes = require("@contentful/rich-text-types");
|
|
28
|
+
const _css = require("@emotion/css");
|
|
28
29
|
const _platebasicmarks = require("@udecode/plate-basic-marks");
|
|
29
|
-
const _emotion = require("emotion");
|
|
30
30
|
const _MarkToolbarButton = require("./components/MarkToolbarButton");
|
|
31
31
|
const _helpers = require("./helpers");
|
|
32
32
|
function _getRequireWildcardCache(nodeInterop) {
|
|
@@ -80,7 +80,7 @@ const ToolbarDropdownCodeButton = (0, _MarkToolbarButton.createMarkToolbarButton
|
|
|
80
80
|
mark: _richtexttypes.MARKS.CODE
|
|
81
81
|
});
|
|
82
82
|
const styles = {
|
|
83
|
-
code: (0,
|
|
83
|
+
code: (0, _css.css)({
|
|
84
84
|
fontFamily: 'monospace',
|
|
85
85
|
fontSize: '.9em'
|
|
86
86
|
})
|
|
@@ -22,8 +22,8 @@ _export(exports, {
|
|
|
22
22
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
23
23
|
const _f36icons = require("@contentful/f36-icons");
|
|
24
24
|
const _richtexttypes = require("@contentful/rich-text-types");
|
|
25
|
+
const _css = require("@emotion/css");
|
|
25
26
|
const _platebasicmarks = require("@udecode/plate-basic-marks");
|
|
26
|
-
const _emotion = require("emotion");
|
|
27
27
|
const _queries = require("../../internal/queries");
|
|
28
28
|
const _MarkToolbarButton = require("./components/MarkToolbarButton");
|
|
29
29
|
const _helpers = require("./helpers");
|
|
@@ -74,7 +74,7 @@ const ToolbarItalicButton = (0, _MarkToolbarButton.createMarkToolbarButton)({
|
|
|
74
74
|
icon: /*#__PURE__*/ _react.createElement(_f36icons.TextItalicIcon, null)
|
|
75
75
|
});
|
|
76
76
|
const styles = {
|
|
77
|
-
italic: (0,
|
|
77
|
+
italic: (0, _css.css)({
|
|
78
78
|
fontStyle: 'italic'
|
|
79
79
|
})
|
|
80
80
|
};
|
|
@@ -25,8 +25,8 @@ _export(exports, {
|
|
|
25
25
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
26
26
|
const _f36icons = require("@contentful/f36-icons");
|
|
27
27
|
const _richtexttypes = require("@contentful/rich-text-types");
|
|
28
|
+
const _css = require("@emotion/css");
|
|
28
29
|
const _platebasicmarks = require("@udecode/plate-basic-marks");
|
|
29
|
-
const _emotion = require("emotion");
|
|
30
30
|
const _MarkToolbarButton = require("./components/MarkToolbarButton");
|
|
31
31
|
const _helpers = require("./helpers");
|
|
32
32
|
function _getRequireWildcardCache(nodeInterop) {
|
|
@@ -71,7 +71,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
71
71
|
return newObj;
|
|
72
72
|
}
|
|
73
73
|
const styles = {
|
|
74
|
-
strikethrough: (0,
|
|
74
|
+
strikethrough: (0, _css.css)({
|
|
75
75
|
textDecoration: 'line-through'
|
|
76
76
|
})
|
|
77
77
|
};
|
|
@@ -23,10 +23,11 @@ _export(exports, {
|
|
|
23
23
|
}
|
|
24
24
|
});
|
|
25
25
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
26
|
+
const _f36icon = require("@contentful/f36-icon");
|
|
26
27
|
const _f36icons = require("@contentful/f36-icons");
|
|
27
28
|
const _richtexttypes = require("@contentful/rich-text-types");
|
|
29
|
+
const _css = require("@emotion/css");
|
|
28
30
|
const _platebasicmarks = require("@udecode/plate-basic-marks");
|
|
29
|
-
const _emotion = require("emotion");
|
|
30
31
|
const _MarkToolbarButton = require("./components/MarkToolbarButton");
|
|
31
32
|
const _helpers = require("./helpers");
|
|
32
33
|
function _getRequireWildcardCache(nodeInterop) {
|
|
@@ -71,7 +72,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
71
72
|
return newObj;
|
|
72
73
|
}
|
|
73
74
|
const styles = {
|
|
74
|
-
subscript: (0,
|
|
75
|
+
subscript: (0, _css.css)({
|
|
75
76
|
verticalAlign: 'sub',
|
|
76
77
|
fontSize: 'smaller'
|
|
77
78
|
})
|
|
@@ -79,7 +80,8 @@ const styles = {
|
|
|
79
80
|
const ToolbarSubscriptButton = (0, _MarkToolbarButton.createMarkToolbarButton)({
|
|
80
81
|
title: 'Subscript',
|
|
81
82
|
mark: _richtexttypes.MARKS.SUBSCRIPT,
|
|
82
|
-
icon: /*#__PURE__*/ _react.createElement(
|
|
83
|
+
icon: /*#__PURE__*/ _react.createElement(_f36icon.Icon, {
|
|
84
|
+
as: _f36icons.TextSubscriptIcon,
|
|
83
85
|
viewBox: "0 0 23 18"
|
|
84
86
|
})
|
|
85
87
|
});
|
|
@@ -25,8 +25,8 @@ _export(exports, {
|
|
|
25
25
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
26
26
|
const _f36icons = require("@contentful/f36-icons");
|
|
27
27
|
const _richtexttypes = require("@contentful/rich-text-types");
|
|
28
|
+
const _css = require("@emotion/css");
|
|
28
29
|
const _platebasicmarks = require("@udecode/plate-basic-marks");
|
|
29
|
-
const _emotion = require("emotion");
|
|
30
30
|
const _MarkToolbarButton = require("./components/MarkToolbarButton");
|
|
31
31
|
const _helpers = require("./helpers");
|
|
32
32
|
function _getRequireWildcardCache(nodeInterop) {
|
|
@@ -71,7 +71,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
71
71
|
return newObj;
|
|
72
72
|
}
|
|
73
73
|
const styles = {
|
|
74
|
-
superscript: (0,
|
|
74
|
+
superscript: (0, _css.css)({
|
|
75
75
|
verticalAlign: 'super',
|
|
76
76
|
fontSize: 'smaller'
|
|
77
77
|
})
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "createMarkToolbarButton", {
|
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36components = require("@contentful/f36-components");
|
|
13
13
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
14
|
-
const
|
|
14
|
+
const _css = require("@emotion/css");
|
|
15
15
|
const _ContentfulEditorProvider = require("../../../ContentfulEditorProvider");
|
|
16
16
|
const _editor = require("../../../helpers/editor");
|
|
17
17
|
const _queries = require("../../../internal/queries");
|
|
@@ -64,7 +64,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
64
64
|
return newObj;
|
|
65
65
|
}
|
|
66
66
|
const styles = {
|
|
67
|
-
isActive: (0,
|
|
67
|
+
isActive: (0, _css.css)({
|
|
68
68
|
backgroundColor: _f36tokens.default.blue100,
|
|
69
69
|
color: _f36tokens.default.blue600
|
|
70
70
|
})
|
|
@@ -88,7 +88,7 @@ const createMarkToolbarButton = ({ mark, title, icon })=>{
|
|
|
88
88
|
return /*#__PURE__*/ _react.createElement(_f36components.Menu.Item, {
|
|
89
89
|
onClick: handleClick,
|
|
90
90
|
disabled: isDisabled,
|
|
91
|
-
className: (0,
|
|
91
|
+
className: (0, _css.cx)({
|
|
92
92
|
[styles.isActive]: (0, _queries.isMarkActive)(editor, mark)
|
|
93
93
|
}),
|
|
94
94
|
testId: `${mark}-toolbar-button`
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "Paragraph", {
|
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
13
13
|
const _richtexttypes = require("@contentful/rich-text-types");
|
|
14
|
-
const
|
|
14
|
+
const _css = require("@emotion/css");
|
|
15
15
|
function _interop_require_default(obj) {
|
|
16
16
|
return obj && obj.__esModule ? obj : {
|
|
17
17
|
default: obj
|
|
@@ -59,7 +59,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
59
59
|
return newObj;
|
|
60
60
|
}
|
|
61
61
|
const styles = {
|
|
62
|
-
[_richtexttypes.BLOCKS.PARAGRAPH]: (0,
|
|
62
|
+
[_richtexttypes.BLOCKS.PARAGRAPH]: (0, _css.css)`
|
|
63
63
|
line-height: ${_f36tokens.default.lineHeightDefault};
|
|
64
64
|
margin-bottom: 1.5em;
|
|
65
65
|
direction: inherit;
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "Quote", {
|
|
|
10
10
|
});
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
13
|
-
const
|
|
13
|
+
const _css = require("@emotion/css");
|
|
14
14
|
function _interop_require_default(obj) {
|
|
15
15
|
return obj && obj.__esModule ? obj : {
|
|
16
16
|
default: obj
|
|
@@ -57,7 +57,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
57
57
|
}
|
|
58
58
|
return newObj;
|
|
59
59
|
}
|
|
60
|
-
const style = (0,
|
|
60
|
+
const style = (0, _css.css)({
|
|
61
61
|
margin: '0 0 1.3125rem',
|
|
62
62
|
borderLeft: `6px solid ${_f36tokens.default.gray200}`,
|
|
63
63
|
paddingLeft: '0.875rem',
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "Cell", {
|
|
|
10
10
|
});
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
13
|
-
const
|
|
13
|
+
const _css = require("@emotion/css");
|
|
14
14
|
const _slatereact = require("slate-react");
|
|
15
15
|
const _TableActions = require("./TableActions");
|
|
16
16
|
function _interop_require_default(obj) {
|
|
@@ -59,7 +59,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
59
59
|
}
|
|
60
60
|
return newObj;
|
|
61
61
|
}
|
|
62
|
-
const style = (0,
|
|
62
|
+
const style = (0, _css.css)`
|
|
63
63
|
border: 1px solid ${_f36tokens.default.gray400};
|
|
64
64
|
border-collapse: collapse;
|
|
65
65
|
padding: 10px 12px;
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "HeaderCell", {
|
|
|
10
10
|
});
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
13
|
-
const
|
|
13
|
+
const _css = require("@emotion/css");
|
|
14
14
|
const _slatereact = require("slate-react");
|
|
15
15
|
const _TableActions = require("./TableActions");
|
|
16
16
|
function _interop_require_default(obj) {
|
|
@@ -59,7 +59,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
59
59
|
}
|
|
60
60
|
return newObj;
|
|
61
61
|
}
|
|
62
|
-
const style = (0,
|
|
62
|
+
const style = (0, _css.css)`
|
|
63
63
|
background-clip: padding-box;
|
|
64
64
|
background-color: ${_f36tokens.default.gray200};
|
|
65
65
|
border: 1px solid ${_f36tokens.default.gray400};
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "Row", {
|
|
|
10
10
|
});
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
13
|
-
const
|
|
13
|
+
const _css = require("@emotion/css");
|
|
14
14
|
function _interop_require_default(obj) {
|
|
15
15
|
return obj && obj.__esModule ? obj : {
|
|
16
16
|
default: obj
|
|
@@ -57,7 +57,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
57
57
|
}
|
|
58
58
|
return newObj;
|
|
59
59
|
}
|
|
60
|
-
const style = (0,
|
|
60
|
+
const style = (0, _css.css)`
|
|
61
61
|
border: 1px solid ${_f36tokens.default.gray400};
|
|
62
62
|
border-collapse: collapse;
|
|
63
63
|
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "Table", {
|
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
13
13
|
const _richtexttypes = require("@contentful/rich-text-types");
|
|
14
|
-
const
|
|
14
|
+
const _css = require("@emotion/css");
|
|
15
15
|
function _interop_require_default(obj) {
|
|
16
16
|
return obj && obj.__esModule ? obj : {
|
|
17
17
|
default: obj
|
|
@@ -58,7 +58,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
58
58
|
}
|
|
59
59
|
return newObj;
|
|
60
60
|
}
|
|
61
|
-
const style = (0,
|
|
61
|
+
const style = (0, _css.css)`
|
|
62
62
|
margin-bottom: 1.5em;
|
|
63
63
|
border-collapse: collapse;
|
|
64
64
|
border-radius: 5px;
|
|
@@ -20,8 +20,8 @@ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
|
20
20
|
const _f36components = require("@contentful/f36-components");
|
|
21
21
|
const _f36icons = require("@contentful/f36-icons");
|
|
22
22
|
const _richtexttypes = require("@contentful/rich-text-types");
|
|
23
|
+
const _css = require("@emotion/css");
|
|
23
24
|
const _platetable = require("@udecode/plate-table");
|
|
24
|
-
const _emotion = require("emotion");
|
|
25
25
|
const _ContentfulEditorProvider = require("../../../ContentfulEditorProvider");
|
|
26
26
|
const _editor = require("../../../helpers/editor");
|
|
27
27
|
const _internal = require("../../../internal");
|
|
@@ -71,7 +71,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
71
71
|
return newObj;
|
|
72
72
|
}
|
|
73
73
|
const styles = {
|
|
74
|
-
topRight: (0,
|
|
74
|
+
topRight: (0, _css.css)({
|
|
75
75
|
position: 'absolute',
|
|
76
76
|
insetBlockStart: '6px',
|
|
77
77
|
insetInlineEnd: '5px'
|
|
@@ -21,7 +21,7 @@ const _f36components = require("@contentful/f36-components");
|
|
|
21
21
|
const _f36icons = require("@contentful/f36-icons");
|
|
22
22
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
23
23
|
const _richtexttypes = require("@contentful/rich-text-types");
|
|
24
|
-
const
|
|
24
|
+
const _css = require("@emotion/css");
|
|
25
25
|
const _ContentfulEditorProvider = require("../../ContentfulEditorProvider");
|
|
26
26
|
const _SdkProvider = require("../../SdkProvider");
|
|
27
27
|
const _EmbeddedBlockUtil = require("../shared/EmbeddedBlockUtil");
|
|
@@ -73,7 +73,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
73
73
|
return newObj;
|
|
74
74
|
}
|
|
75
75
|
const styles = {
|
|
76
|
-
icon: (0,
|
|
76
|
+
icon: (0, _css.css)({
|
|
77
77
|
marginRight: '10px'
|
|
78
78
|
})
|
|
79
79
|
};
|
|
@@ -13,7 +13,7 @@ const _f36components = require("@contentful/f36-components");
|
|
|
13
13
|
const _f36icons = require("@contentful/f36-icons");
|
|
14
14
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
15
15
|
const _richtexttypes = require("@contentful/rich-text-types");
|
|
16
|
-
const
|
|
16
|
+
const _css = require("@emotion/css");
|
|
17
17
|
const _ContentfulEditorProvider = require("../../ContentfulEditorProvider");
|
|
18
18
|
const _editor = require("../../helpers/editor");
|
|
19
19
|
const _SdkProvider = require("../../SdkProvider");
|
|
@@ -66,10 +66,10 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
66
66
|
return newObj;
|
|
67
67
|
}
|
|
68
68
|
const styles = {
|
|
69
|
-
icon: (0,
|
|
69
|
+
icon: (0, _css.css)({
|
|
70
70
|
marginRight: '10px'
|
|
71
71
|
}),
|
|
72
|
-
root: (0,
|
|
72
|
+
root: (0, _css.css)({
|
|
73
73
|
display: 'inline-block',
|
|
74
74
|
margin: `0 ${_f36tokens.default.spacing2Xs}`,
|
|
75
75
|
fontSize: 'inherit',
|
|
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "LinkedBlockWrapper", {
|
|
|
9
9
|
}
|
|
10
10
|
});
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_default(require("react"));
|
|
12
|
-
const
|
|
12
|
+
const _css = require("@emotion/css");
|
|
13
13
|
const _environment = require("../../helpers/environment");
|
|
14
14
|
const _utils = require("./utils");
|
|
15
15
|
function _interop_require_default(obj) {
|
|
@@ -18,11 +18,11 @@ function _interop_require_default(obj) {
|
|
|
18
18
|
};
|
|
19
19
|
}
|
|
20
20
|
const styles = {
|
|
21
|
-
root: (0,
|
|
21
|
+
root: (0, _css.css)({
|
|
22
22
|
marginBottom: '1.25rem !important',
|
|
23
23
|
display: 'block'
|
|
24
24
|
}),
|
|
25
|
-
container: (0,
|
|
25
|
+
container: (0, _css.css)({
|
|
26
26
|
display: 'inline-block',
|
|
27
27
|
verticalAlign: 'text-top',
|
|
28
28
|
width: '100%'
|
|
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "LinkedInlineWrapper", {
|
|
|
10
10
|
});
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
13
|
-
const
|
|
13
|
+
const _css = require("@emotion/css");
|
|
14
14
|
const _environment = require("../../helpers/environment");
|
|
15
15
|
const _utils = require("./utils");
|
|
16
16
|
function _interop_require_default(obj) {
|
|
@@ -60,10 +60,10 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
60
60
|
return newObj;
|
|
61
61
|
}
|
|
62
62
|
const styles = {
|
|
63
|
-
icon: (0,
|
|
63
|
+
icon: (0, _css.css)({
|
|
64
64
|
marginRight: '10px'
|
|
65
65
|
}),
|
|
66
|
-
root: (0,
|
|
66
|
+
root: (0, _css.css)({
|
|
67
67
|
display: 'inline-block',
|
|
68
68
|
margin: `0 ${_f36tokens.default.spacing2Xs}`,
|
|
69
69
|
fontSize: 'inherit',
|
|
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "ToolbarButton", {
|
|
|
11
11
|
const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
|
|
12
12
|
const _f36components = require("@contentful/f36-components");
|
|
13
13
|
const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
|
|
14
|
-
const
|
|
14
|
+
const _css = require("@emotion/css");
|
|
15
15
|
function _interop_require_default(obj) {
|
|
16
16
|
return obj && obj.__esModule ? obj : {
|
|
17
17
|
default: obj
|
|
@@ -59,37 +59,57 @@ function _interop_require_wildcard(obj, nodeInterop) {
|
|
|
59
59
|
return newObj;
|
|
60
60
|
}
|
|
61
61
|
const styles = {
|
|
62
|
-
button: (0,
|
|
62
|
+
button: (0, _css.css)({
|
|
63
63
|
height: '30px',
|
|
64
64
|
width: '30px',
|
|
65
65
|
marginLeft: _f36tokens.default.spacing2Xs,
|
|
66
66
|
marginRight: _f36tokens.default.spacing2Xs
|
|
67
67
|
}),
|
|
68
|
-
tooltip: (0,
|
|
69
|
-
zIndex: Number(_f36tokens.default.zIndexTooltip)
|
|
68
|
+
tooltip: (0, _css.css)({
|
|
69
|
+
zIndex: Number(_f36tokens.default.zIndexTooltip),
|
|
70
|
+
pointerEvents: 'none'
|
|
70
71
|
})
|
|
71
72
|
};
|
|
72
73
|
function ToolbarButton(props) {
|
|
73
74
|
const { title, testId, isActive, children, className, isDisabled = false } = props;
|
|
74
|
-
const
|
|
75
|
+
const pointerTriggeredRef = _react.useRef(false);
|
|
76
|
+
const handlePointerDown = _react.useCallback((event)=>{
|
|
77
|
+
if (isDisabled || event.button !== 0) {
|
|
78
|
+
return;
|
|
79
|
+
}
|
|
75
80
|
event.preventDefault();
|
|
81
|
+
pointerTriggeredRef.current = true;
|
|
76
82
|
props.onClick();
|
|
77
|
-
}
|
|
78
|
-
|
|
79
|
-
|
|
83
|
+
}, [
|
|
84
|
+
isDisabled,
|
|
85
|
+
props
|
|
86
|
+
]);
|
|
87
|
+
const handleClick = _react.useCallback((event)=>{
|
|
88
|
+
if (pointerTriggeredRef.current) {
|
|
89
|
+
pointerTriggeredRef.current = false;
|
|
90
|
+
return;
|
|
91
|
+
}
|
|
92
|
+
event.preventDefault();
|
|
93
|
+
props.onClick();
|
|
94
|
+
}, [
|
|
95
|
+
props
|
|
96
|
+
]);
|
|
97
|
+
return /*#__PURE__*/ _react.createElement(_f36components.IconButton, {
|
|
98
|
+
className: (0, _css.cx)(styles.button, className),
|
|
80
99
|
isDisabled: isDisabled,
|
|
81
|
-
|
|
100
|
+
onMouseDown: handlePointerDown,
|
|
82
101
|
onClick: handleClick,
|
|
83
102
|
testId: testId,
|
|
84
103
|
variant: isActive ? 'secondary' : 'transparent',
|
|
85
|
-
size: "small"
|
|
86
|
-
|
|
87
|
-
|
|
88
|
-
|
|
104
|
+
size: "small",
|
|
105
|
+
icon: children,
|
|
106
|
+
"aria-label": title,
|
|
107
|
+
withTooltip: !!title,
|
|
108
|
+
tooltipProps: {
|
|
89
109
|
className: styles.tooltip,
|
|
90
|
-
|
|
110
|
+
usePortal: true,
|
|
111
|
+
placement: 'bottom',
|
|
91
112
|
content: title
|
|
92
|
-
}
|
|
93
|
-
}
|
|
94
|
-
return button;
|
|
113
|
+
}
|
|
114
|
+
});
|
|
95
115
|
}
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
2
|
import tokens from '@contentful/f36-tokens';
|
|
3
3
|
import { CharValidation, ConstraintsUtils } from '@contentful/field-editor-shared';
|
|
4
|
-
import { css, cx } from 'emotion';
|
|
4
|
+
import { css, cx } from '@emotion/css';
|
|
5
5
|
import { usePlateEditorState } from './internal/hooks';
|
|
6
6
|
import { useSdkContext } from './SdkProvider';
|
|
7
7
|
const styles = {
|
|
@@ -2,8 +2,8 @@ import * as React from 'react';
|
|
|
2
2
|
import { EntityProvider } from '@contentful/field-editor-reference';
|
|
3
3
|
import { FieldConnector } from '@contentful/field-editor-shared';
|
|
4
4
|
import * as Contentful from '@contentful/rich-text-types';
|
|
5
|
+
import { css, cx } from '@emotion/css';
|
|
5
6
|
import { PlateContent, Plate } from '@udecode/plate-common';
|
|
6
|
-
import { css, cx } from 'emotion';
|
|
7
7
|
import deepEquals from 'fast-deep-equal';
|
|
8
8
|
import noop from 'lodash/noop';
|
|
9
9
|
import { useDeepCompareMemo } from 'use-deep-compare';
|
|
@@ -3,7 +3,7 @@ import { Flex, IconButton, Menu } from '@contentful/f36-components';
|
|
|
3
3
|
import { DotsThreeIcon } from '@contentful/f36-icons';
|
|
4
4
|
import tokens from '@contentful/f36-tokens';
|
|
5
5
|
import { BLOCKS, INLINES, MARKS } from '@contentful/rich-text-types';
|
|
6
|
-
import { css } from 'emotion';
|
|
6
|
+
import { css } from '@emotion/css';
|
|
7
7
|
import { useContentfulEditor } from '../ContentfulEditorProvider';
|
|
8
8
|
import { isNodeTypeSelected } from '../helpers/editor';
|
|
9
9
|
import { isMarkEnabled, isNodeTypeEnabled } from '../helpers/validations';
|
|
@@ -15,8 +15,8 @@ import * as React from 'react';
|
|
|
15
15
|
import { Button, Form, FormControl, FormLabel, ModalContent, ModalControls, Select, TextInput, TextLink } from '@contentful/f36-components';
|
|
16
16
|
import tokens from '@contentful/f36-tokens';
|
|
17
17
|
import { EntityProvider } from '@contentful/field-editor-reference';
|
|
18
|
+
import { css } from '@emotion/css';
|
|
18
19
|
import { i18n as $_i18n } from "@lingui/core";
|
|
19
|
-
import { css } from 'emotion';
|
|
20
20
|
import PropTypes from 'prop-types';
|
|
21
21
|
import { FetchingWrappedAssetCard } from '../../plugins/shared/FetchingWrappedAssetCard';
|
|
22
22
|
import { FetchingWrappedEntryCard } from '../../plugins/shared/FetchingWrappedEntryCard';
|
|
@@ -3,7 +3,7 @@ import { usePopper } from 'react-popper';
|
|
|
3
3
|
import { Popover, Stack, SectionHeading, ScreenReaderOnly, Flex, AssetIcon } from '@contentful/f36-components';
|
|
4
4
|
import { Portal } from '@contentful/f36-utils';
|
|
5
5
|
import { SharedQueryClientProvider } from '@contentful/field-editor-shared/react-query';
|
|
6
|
-
import { cx } from 'emotion';
|
|
6
|
+
import { cx } from '@emotion/css';
|
|
7
7
|
import { useSdkContext } from '../../../SdkProvider';
|
|
8
8
|
import { useCommandList } from '../hooks/useCommandList';
|
|
9
9
|
import { useCommands } from '../useCommands';
|
|
@@ -44,8 +44,6 @@ const Asset = ({ command, selectedItem })=>/*#__PURE__*/ React.createElement("bu
|
|
|
44
44
|
alt: "",
|
|
45
45
|
className: styles.thumbnail
|
|
46
46
|
}) : /*#__PURE__*/ React.createElement(AssetIcon, {
|
|
47
|
-
width: "30",
|
|
48
|
-
height: "30",
|
|
49
47
|
className: styles.thumbnail
|
|
50
48
|
}), /*#__PURE__*/ React.createElement("span", null, command.label)));
|
|
51
49
|
const Item = ({ command, selectedItem })=>/*#__PURE__*/ React.createElement("button", {
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import * as React from 'react';
|
|
2
2
|
import tokens from '@contentful/f36-tokens';
|
|
3
|
-
import { css } from 'emotion';
|
|
3
|
+
import { css } from '@emotion/css';
|
|
4
4
|
import { trimLeadingSlash } from '../utils/trimLeadingSlash';
|
|
5
5
|
import { CommandList } from './CommandList';
|
|
6
6
|
const styles = {
|
|
@@ -6,7 +6,7 @@ import { ScheduledIconWithTooltip, useEntity, useEntityLoader } from '@contentfu
|
|
|
6
6
|
import { entityHelpers } from '@contentful/field-editor-shared';
|
|
7
7
|
import { SharedQueryClientProvider, useContentType } from '@contentful/field-editor-shared/react-query';
|
|
8
8
|
import { INLINES } from '@contentful/rich-text-types';
|
|
9
|
-
import { css } from 'emotion';
|
|
9
|
+
import { css } from '@emotion/css';
|
|
10
10
|
const { getEntryTitle, getEntityStatus } = entityHelpers;
|
|
11
11
|
const styles = {
|
|
12
12
|
scheduledIcon: css({
|
|
@@ -3,7 +3,7 @@ import { Menu, Button } from '@contentful/f36-components';
|
|
|
3
3
|
import { CaretDownIcon } from '@contentful/f36-icons';
|
|
4
4
|
import tokens from '@contentful/f36-tokens';
|
|
5
5
|
import { BLOCKS } from '@contentful/rich-text-types';
|
|
6
|
-
import { css, cx } from 'emotion';
|
|
6
|
+
import { css, cx } from '@emotion/css';
|
|
7
7
|
import { useContentfulEditor } from '../../../ContentfulEditorProvider';
|
|
8
8
|
import { getElementFromCurrentSelection, focus, isBlockSelected, toggleElement } from '../../../helpers/editor';
|
|
9
9
|
import { isNodeTypeEnabled } from '../../../helpers/validations';
|
|
@@ -2,7 +2,7 @@ import * as React from 'react';
|
|
|
2
2
|
import { MinusIcon } from '@contentful/f36-icons';
|
|
3
3
|
import tokens from '@contentful/f36-tokens';
|
|
4
4
|
import { BLOCKS } from '@contentful/rich-text-types';
|
|
5
|
-
import { css, cx } from 'emotion';
|
|
5
|
+
import { css, cx } from '@emotion/css';
|
|
6
6
|
import * as Slate from 'slate-react';
|
|
7
7
|
import { useContentfulEditor } from '../../ContentfulEditorProvider';
|
|
8
8
|
import { getNodeEntryFromSelection, isBlockSelected, moveToTheNextLine, focus } from '../../helpers/editor';
|
|
@@ -4,7 +4,7 @@ import tokens from '@contentful/f36-tokens';
|
|
|
4
4
|
import { EntityProvider } from '@contentful/field-editor-reference';
|
|
5
5
|
import { ModalDialogLauncher } from '@contentful/field-editor-shared';
|
|
6
6
|
import { INLINES } from '@contentful/rich-text-types';
|
|
7
|
-
import { css } from 'emotion';
|
|
7
|
+
import { css } from '@emotion/css';
|
|
8
8
|
import { focus, getNodeEntryFromSelection, insertLink, LINK_TYPES } from '../../helpers/editor';
|
|
9
9
|
import getAllowedResourcesForNodeType from '../../helpers/getAllowedResourcesForNodeType';
|
|
10
10
|
import getLinkedContentTypeIdsForNodeType from '../../helpers/getLinkedContentTypeIdsForNodeType';
|