@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.
Files changed (75) hide show
  1. package/dist/cjs/CharConstraints.js +4 -4
  2. package/dist/cjs/RichTextEditor.js +3 -3
  3. package/dist/cjs/RichTextEditor.styles.js +8 -8
  4. package/dist/cjs/Toolbar/components/StickyToolbarWrapper.js +2 -2
  5. package/dist/cjs/Toolbar/index.js +6 -6
  6. package/dist/cjs/dialogs/HypelinkDialog/HyperlinkDialog.js +3 -3
  7. package/dist/cjs/plugins/CommandPalette/components/CommandList.js +4 -6
  8. package/dist/cjs/plugins/CommandPalette/components/CommandList.styles.js +12 -12
  9. package/dist/cjs/plugins/CommandPalette/components/CommandPrompt.js +2 -2
  10. package/dist/cjs/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.js +2 -2
  11. package/dist/cjs/plugins/Heading/components/Heading.js +17 -17
  12. package/dist/cjs/plugins/Heading/components/ToolbarHeadingButton.js +11 -11
  13. package/dist/cjs/plugins/Hr/index.js +5 -5
  14. package/dist/cjs/plugins/Hyperlink/HyperlinkModal.js +2 -2
  15. package/dist/cjs/plugins/Hyperlink/components/styles.js +6 -6
  16. package/dist/cjs/plugins/List/components/List.js +5 -5
  17. package/dist/cjs/plugins/List/components/ListItem.js +2 -2
  18. package/dist/cjs/plugins/Marks/Bold.js +2 -2
  19. package/dist/cjs/plugins/Marks/Code.js +2 -2
  20. package/dist/cjs/plugins/Marks/Italic.js +2 -2
  21. package/dist/cjs/plugins/Marks/Strikethrough.js +2 -2
  22. package/dist/cjs/plugins/Marks/Subscript.js +5 -3
  23. package/dist/cjs/plugins/Marks/Superscript.js +2 -2
  24. package/dist/cjs/plugins/Marks/components/MarkToolbarButton.js +3 -3
  25. package/dist/cjs/plugins/Paragraph/Paragraph.js +2 -2
  26. package/dist/cjs/plugins/Quote/components/Quote.js +2 -2
  27. package/dist/cjs/plugins/Table/components/Cell.js +2 -2
  28. package/dist/cjs/plugins/Table/components/HeaderCell.js +2 -2
  29. package/dist/cjs/plugins/Table/components/Row.js +2 -2
  30. package/dist/cjs/plugins/Table/components/Table.js +2 -2
  31. package/dist/cjs/plugins/Table/components/TableActions.js +2 -2
  32. package/dist/cjs/plugins/shared/EmbeddedBlockToolbarIcon.js +2 -2
  33. package/dist/cjs/plugins/shared/EmbeddedInlineToolbarIcon.js +3 -3
  34. package/dist/cjs/plugins/shared/LinkedBlockWrapper.js +3 -3
  35. package/dist/cjs/plugins/shared/LinkedInlineWrapper.js +3 -3
  36. package/dist/cjs/plugins/shared/ToolbarButton.js +37 -17
  37. package/dist/esm/CharConstraints.js +1 -1
  38. package/dist/esm/RichTextEditor.js +1 -1
  39. package/dist/esm/RichTextEditor.styles.js +1 -1
  40. package/dist/esm/Toolbar/components/StickyToolbarWrapper.js +1 -1
  41. package/dist/esm/Toolbar/index.js +1 -1
  42. package/dist/esm/dialogs/HypelinkDialog/HyperlinkDialog.js +1 -1
  43. package/dist/esm/plugins/CommandPalette/components/CommandList.js +1 -3
  44. package/dist/esm/plugins/CommandPalette/components/CommandList.styles.js +1 -1
  45. package/dist/esm/plugins/CommandPalette/components/CommandPrompt.js +1 -1
  46. package/dist/esm/plugins/EmbeddedEntityInline/FetchingWrappedInlineEntryCard.js +1 -1
  47. package/dist/esm/plugins/Heading/components/Heading.js +1 -1
  48. package/dist/esm/plugins/Heading/components/ToolbarHeadingButton.js +1 -1
  49. package/dist/esm/plugins/Hr/index.js +1 -1
  50. package/dist/esm/plugins/Hyperlink/HyperlinkModal.js +1 -1
  51. package/dist/esm/plugins/Hyperlink/components/styles.js +1 -1
  52. package/dist/esm/plugins/List/components/List.js +1 -1
  53. package/dist/esm/plugins/List/components/ListItem.js +1 -1
  54. package/dist/esm/plugins/Marks/Bold.js +1 -1
  55. package/dist/esm/plugins/Marks/Code.js +1 -1
  56. package/dist/esm/plugins/Marks/Italic.js +1 -1
  57. package/dist/esm/plugins/Marks/Strikethrough.js +1 -1
  58. package/dist/esm/plugins/Marks/Subscript.js +4 -2
  59. package/dist/esm/plugins/Marks/Superscript.js +1 -1
  60. package/dist/esm/plugins/Marks/components/MarkToolbarButton.js +1 -1
  61. package/dist/esm/plugins/Paragraph/Paragraph.js +1 -1
  62. package/dist/esm/plugins/Quote/components/Quote.js +1 -1
  63. package/dist/esm/plugins/Table/components/Cell.js +1 -1
  64. package/dist/esm/plugins/Table/components/HeaderCell.js +1 -1
  65. package/dist/esm/plugins/Table/components/Row.js +1 -1
  66. package/dist/esm/plugins/Table/components/Table.js +1 -1
  67. package/dist/esm/plugins/Table/components/TableActions.js +1 -1
  68. package/dist/esm/plugins/shared/EmbeddedBlockToolbarIcon.js +1 -1
  69. package/dist/esm/plugins/shared/EmbeddedInlineToolbarIcon.js +1 -1
  70. package/dist/esm/plugins/shared/LinkedBlockWrapper.js +1 -1
  71. package/dist/esm/plugins/shared/LinkedInlineWrapper.js +1 -1
  72. package/dist/esm/plugins/shared/ToolbarButton.js +35 -15
  73. package/dist/types/plugins/Hyperlink/components/LinkPopover.d.ts +1 -1
  74. package/dist/types/plugins/shared/ToolbarButton.d.ts +1 -1
  75. package/package.json +12 -10
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "CharConstraints", {
11
11
  const _react = /*#__PURE__*/ _interop_require_default(require("react"));
12
12
  const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
13
13
  const _fieldeditorshared = require("@contentful/field-editor-shared");
14
- const _emotion = require("emotion");
14
+ const _css = require("@emotion/css");
15
15
  const _hooks = require("./internal/hooks");
16
16
  const _SdkProvider = require("./SdkProvider");
17
17
  function _interop_require_default(obj) {
@@ -20,14 +20,14 @@ function _interop_require_default(obj) {
20
20
  };
21
21
  }
22
22
  const styles = {
23
- container: (0, _emotion.css)({
23
+ container: (0, _css.css)({
24
24
  display: 'flex',
25
25
  justifyContent: 'space-between',
26
26
  fontSize: _f36tokens.default.fontSizeM,
27
27
  marginTop: _f36tokens.default.spacingXs,
28
28
  color: _f36tokens.default.gray700
29
29
  }),
30
- counterInvalid: (0, _emotion.css)({
30
+ counterInvalid: (0, _css.css)({
31
31
  color: _f36tokens.default.red600
32
32
  })
33
33
  };
@@ -39,7 +39,7 @@ function CharCounter({ checkConstraints }) {
39
39
  const count = editor.getCharacterCount();
40
40
  const valid = checkConstraints(count);
41
41
  return /*#__PURE__*/ _react.default.createElement("span", {
42
- className: (0, _emotion.cx)({
42
+ className: (0, _css.cx)({
43
43
  [styles.counterInvalid]: !valid
44
44
  })
45
45
  }, count, " characters");
@@ -20,8 +20,8 @@ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
20
20
  const _fieldeditorreference = require("@contentful/field-editor-reference");
21
21
  const _fieldeditorshared = require("@contentful/field-editor-shared");
22
22
  const _richtexttypes = /*#__PURE__*/ _interop_require_wildcard(require("@contentful/rich-text-types"));
23
+ const _css = require("@emotion/css");
23
24
  const _platecommon = require("@udecode/plate-common");
24
- const _emotion = require("emotion");
25
25
  const _fastdeepequal = /*#__PURE__*/ _interop_require_default(require("fast-deep-equal"));
26
26
  const _noop = /*#__PURE__*/ _interop_require_default(require("lodash/noop"));
27
27
  const _usedeepcompare = require("use-deep-compare");
@@ -96,9 +96,9 @@ const ConnectedRichTextEditor = (props)=>{
96
96
  props.value
97
97
  ]);
98
98
  const direction = sdk.locales.direction[sdk.field.locale] ?? 'ltr';
99
- const classNames = (0, _emotion.cx)(_RichTextEditorstyles.styles.editor, props.minHeight !== undefined ? (0, _emotion.css)({
99
+ const classNames = (0, _css.cx)(_RichTextEditorstyles.styles.editor, props.minHeight !== undefined ? (0, _css.css)({
100
100
  minHeight: props.minHeight
101
- }) : undefined, props.maxHeight !== undefined ? (0, _emotion.css)({
101
+ }) : undefined, props.maxHeight !== undefined ? (0, _css.css)({
102
102
  maxHeight: props.maxHeight
103
103
  }) : undefined, props.isDisabled ? _RichTextEditorstyles.styles.disabled : _RichTextEditorstyles.styles.enabled, props.isToolbarHidden && _RichTextEditorstyles.styles.hiddenToolbar, direction === 'rtl' ? _RichTextEditorstyles.styles.rtl : _RichTextEditorstyles.styles.ltr);
104
104
  return /*#__PURE__*/ _react.createElement(_fieldeditorreference.EntityProvider, {
@@ -9,7 +9,7 @@ Object.defineProperty(exports, "styles", {
9
9
  }
10
10
  });
11
11
  const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
12
- const _emotion = require("emotion");
12
+ const _css = require("@emotion/css");
13
13
  function _interop_require_default(obj) {
14
14
  return obj && obj.__esModule ? obj : {
15
15
  default: obj
@@ -17,10 +17,10 @@ function _interop_require_default(obj) {
17
17
  }
18
18
  const STYLE_EDITOR_BORDER = `1px solid ${_f36tokens.default.gray400}`;
19
19
  const styles = {
20
- root: (0, _emotion.css)({
20
+ root: (0, _css.css)({
21
21
  position: 'relative'
22
22
  }),
23
- editor: (0, _emotion.css)({
23
+ editor: (0, _css.css)({
24
24
  borderRadius: `0 0 ${_f36tokens.default.borderRadiusMedium} ${_f36tokens.default.borderRadiusMedium}`,
25
25
  border: STYLE_EDITOR_BORDER,
26
26
  borderTop: 0,
@@ -46,10 +46,10 @@ const styles = {
46
46
  margin: 0
47
47
  }
48
48
  }),
49
- hiddenToolbar: (0, _emotion.css)({
49
+ hiddenToolbar: (0, _css.css)({
50
50
  borderTop: STYLE_EDITOR_BORDER
51
51
  }),
52
- enabled: (0, _emotion.css)({
52
+ enabled: (0, _css.css)({
53
53
  background: _f36tokens.default.colorWhite,
54
54
  a: {
55
55
  span: {
@@ -60,14 +60,14 @@ const styles = {
60
60
  }
61
61
  }
62
62
  }),
63
- disabled: (0, _emotion.css)({
63
+ disabled: (0, _css.css)({
64
64
  background: _f36tokens.default.gray100,
65
65
  cursor: 'not-allowed'
66
66
  }),
67
- rtl: (0, _emotion.css)({
67
+ rtl: (0, _css.css)({
68
68
  direction: 'rtl'
69
69
  }),
70
- ltr: (0, _emotion.css)({
70
+ ltr: (0, _css.css)({
71
71
  direction: 'ltr'
72
72
  })
73
73
  };
@@ -9,14 +9,14 @@ Object.defineProperty(exports, "default", {
9
9
  }
10
10
  });
11
11
  const _react = /*#__PURE__*/ _interop_require_default(require("react"));
12
- const _emotion = require("emotion");
12
+ const _css = require("@emotion/css");
13
13
  function _interop_require_default(obj) {
14
14
  return obj && obj.__esModule ? obj : {
15
15
  default: obj
16
16
  };
17
17
  }
18
18
  const styles = {
19
- nativeSticky: (offset)=>(0, _emotion.css)`
19
+ nativeSticky: (offset)=>(0, _css.css)`
20
20
  position: -webkit-sticky;
21
21
  position: sticky;
22
22
  top: ${offset ? offset : -1}px;
@@ -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 _emotion = require("emotion");
16
+ const _css = require("@emotion/css");
17
17
  const _ContentfulEditorProvider = require("../ContentfulEditorProvider");
18
18
  const _editor = require("../helpers/editor");
19
19
  const _validations = require("../helpers/validations");
@@ -82,26 +82,26 @@ function _interop_require_wildcard(obj, nodeInterop) {
82
82
  return newObj;
83
83
  }
84
84
  const styles = {
85
- toolbar: (0, _emotion.css)({
85
+ toolbar: (0, _css.css)({
86
86
  border: `1px solid ${_f36tokens.default.gray400}`,
87
87
  backgroundColor: _f36tokens.default.gray100,
88
88
  padding: _f36tokens.default.spacingXs,
89
89
  borderRadius: `${_f36tokens.default.borderRadiusMedium} ${_f36tokens.default.borderRadiusMedium} 0 0`
90
90
  }),
91
- toolbarBtn: (0, _emotion.css)({
91
+ toolbarBtn: (0, _css.css)({
92
92
  height: '30px',
93
93
  width: '30px',
94
94
  marginLeft: _f36tokens.default.spacing2Xs,
95
95
  marginRight: _f36tokens.default.spacing2Xs
96
96
  }),
97
- divider: (0, _emotion.css)({
97
+ divider: (0, _css.css)({
98
98
  display: 'inline-block',
99
99
  height: '21px',
100
100
  width: '1px',
101
101
  background: _f36tokens.default.gray300,
102
102
  margin: `0 ${_f36tokens.default.spacing2Xs}`
103
103
  }),
104
- embedActionsWrapper: (0, _emotion.css)({
104
+ embedActionsWrapper: (0, _css.css)({
105
105
  display: [
106
106
  '-webkit-box',
107
107
  '-ms-flexbox',
@@ -111,7 +111,7 @@ const styles = {
111
111
  alignSelf: 'flex-start',
112
112
  msFlexItemAlign: 'start'
113
113
  }),
114
- formattingOptionsWrapper: (0, _emotion.css)({
114
+ formattingOptionsWrapper: (0, _css.css)({
115
115
  display: [
116
116
  '-webkit-box',
117
117
  '-ms-flexbox',
@@ -23,8 +23,8 @@ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
23
23
  const _f36components = require("@contentful/f36-components");
24
24
  const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
25
25
  const _fieldeditorreference = require("@contentful/field-editor-reference");
26
+ const _css = require("@emotion/css");
26
27
  const _core = require("@lingui/core");
27
- const _emotion = require("emotion");
28
28
  const _proptypes = /*#__PURE__*/ _interop_require_default(require("prop-types"));
29
29
  const _FetchingWrappedAssetCard = require("../../plugins/shared/FetchingWrappedAssetCard");
30
30
  const _FetchingWrappedEntryCard = require("../../plugins/shared/FetchingWrappedEntryCard");
@@ -247,7 +247,7 @@ class HyperlinkDialog extends (_React_Component = _react.Component) {
247
247
  message: "Link target"
248
248
  })), !isEntitySelectorVisible && /*#__PURE__*/ _react.createElement(_f36components.TextLink, {
249
249
  as: "button",
250
- className: (0, _emotion.css)({
250
+ className: (0, _css.css)({
251
251
  marginLeft: _f36tokens.default.spacingS
252
252
  }),
253
253
  onClick: resetEntity
@@ -270,7 +270,7 @@ class HyperlinkDialog extends (_React_Component = _react.Component) {
270
270
  }
271
271
  renderEntitySelector(type) {
272
272
  return /*#__PURE__*/ _react.createElement("div", {
273
- className: (0, _emotion.css)({
273
+ className: (0, _css.css)({
274
274
  marginTop: _f36tokens.default.spacingS
275
275
  })
276
276
  }, type === LINK_TYPES.ENTRY && /*#__PURE__*/ _react.createElement(_f36components.TextLink, {
@@ -13,7 +13,7 @@ const _reactpopper = require("react-popper");
13
13
  const _f36components = require("@contentful/f36-components");
14
14
  const _f36utils = require("@contentful/f36-utils");
15
15
  const _reactquery = require("@contentful/field-editor-shared/react-query");
16
- const _emotion = require("emotion");
16
+ const _css = require("@emotion/css");
17
17
  const _SdkProvider = require("../../../SdkProvider");
18
18
  const _useCommandList = require("../hooks/useCommandList");
19
19
  const _useCommands = require("../useCommands");
@@ -75,7 +75,7 @@ const Group = ({ commandGroup, selectedItem })=>/*#__PURE__*/ _react.createEleme
75
75
  }, commandGroup.group), commandGroup.commands.map((command)=>/*#__PURE__*/ _react.createElement("button", {
76
76
  key: command.id,
77
77
  id: command.id,
78
- className: (0, _emotion.cx)(_CommandListstyles.default.menuItem, {
78
+ className: (0, _css.cx)(_CommandListstyles.default.menuItem, {
79
79
  [_CommandListstyles.default.menuItemSelected]: command.id === selectedItem
80
80
  }),
81
81
  onClick: command.callback
@@ -86,7 +86,7 @@ const Group = ({ commandGroup, selectedItem })=>/*#__PURE__*/ _react.createEleme
86
86
  const Asset = ({ command, selectedItem })=>/*#__PURE__*/ _react.createElement("button", {
87
87
  key: command.id,
88
88
  id: command.id,
89
- className: (0, _emotion.cx)(_CommandListstyles.default.menuItem, {
89
+ className: (0, _css.cx)(_CommandListstyles.default.menuItem, {
90
90
  [_CommandListstyles.default.menuItemSelected]: command.id === selectedItem
91
91
  }),
92
92
  onClick: command.callback
@@ -100,14 +100,12 @@ const Asset = ({ command, selectedItem })=>/*#__PURE__*/ _react.createElement("b
100
100
  alt: "",
101
101
  className: _CommandListstyles.default.thumbnail
102
102
  }) : /*#__PURE__*/ _react.createElement(_f36components.AssetIcon, {
103
- width: "30",
104
- height: "30",
105
103
  className: _CommandListstyles.default.thumbnail
106
104
  }), /*#__PURE__*/ _react.createElement("span", null, command.label)));
107
105
  const Item = ({ command, selectedItem })=>/*#__PURE__*/ _react.createElement("button", {
108
106
  key: command.id,
109
107
  id: command.id,
110
- className: (0, _emotion.cx)(_CommandListstyles.default.menuItem, {
108
+ className: (0, _css.cx)(_CommandListstyles.default.menuItem, {
111
109
  [_CommandListstyles.default.menuItemSelected]: command.id === selectedItem
112
110
  }),
113
111
  onClick: command.callback
@@ -9,14 +9,14 @@ Object.defineProperty(exports, "default", {
9
9
  }
10
10
  });
11
11
  const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
12
- const _emotion = require("emotion");
12
+ const _css = require("@emotion/css");
13
13
  function _interop_require_default(obj) {
14
14
  return obj && obj.__esModule ? obj : {
15
15
  default: obj
16
16
  };
17
17
  }
18
18
  const styles = {
19
- container: (0, _emotion.css)({
19
+ container: (0, _css.css)({
20
20
  position: 'absolute',
21
21
  zIndex: _f36tokens.default.zIndexNotification,
22
22
  fontWeight: _f36tokens.default.fontWeightNormal,
@@ -27,18 +27,18 @@ const styles = {
27
27
  marginLeft: 0
28
28
  }
29
29
  }),
30
- menuPoper: (0, _emotion.css)({
30
+ menuPoper: (0, _css.css)({
31
31
  zIndex: _f36tokens.default.zIndexModal
32
32
  }),
33
- menuContent: (0, _emotion.css)({
33
+ menuContent: (0, _css.css)({
34
34
  width: '400px',
35
35
  maxHeight: '300px'
36
36
  }),
37
- menuList: (0, _emotion.css)({
37
+ menuList: (0, _css.css)({
38
38
  overflow: 'auto',
39
39
  maxHeight: '200px'
40
40
  }),
41
- menuItem: (0, _emotion.css)({
41
+ menuItem: (0, _css.css)({
42
42
  display: 'block',
43
43
  width: '100%',
44
44
  background: 'none',
@@ -66,35 +66,35 @@ const styles = {
66
66
  cursor: 'auto'
67
67
  }
68
68
  }),
69
- menuItemSelected: (0, _emotion.css)({
69
+ menuItemSelected: (0, _css.css)({
70
70
  boxShadow: `inset ${_f36tokens.default.glowPrimary}`,
71
71
  borderRadius: _f36tokens.default.borderRadiusMedium
72
72
  }),
73
- menuDivider: (0, _emotion.css)({
73
+ menuDivider: (0, _css.css)({
74
74
  border: 'none',
75
75
  width: '100%',
76
76
  height: '1px',
77
77
  background: _f36tokens.default.gray300,
78
78
  margin: `${_f36tokens.default.spacingXs} 0`
79
79
  }),
80
- menuHeader: (0, _emotion.css)({
80
+ menuHeader: (0, _css.css)({
81
81
  zIndex: _f36tokens.default.zIndexDefault,
82
82
  top: 0,
83
83
  backgroundColor: _f36tokens.default.gray100,
84
84
  padding: _f36tokens.default.spacingM
85
85
  }),
86
- menuFooter: (0, _emotion.css)({
86
+ menuFooter: (0, _css.css)({
87
87
  position: 'sticky',
88
88
  bottom: 0,
89
89
  backgroundColor: _f36tokens.default.gray100,
90
90
  padding: _f36tokens.default.spacingM
91
91
  }),
92
- footerList: (0, _emotion.css)({
92
+ footerList: (0, _css.css)({
93
93
  listStyle: 'none',
94
94
  color: _f36tokens.default.gray600,
95
95
  fontSize: _f36tokens.default.fontSizeM
96
96
  }),
97
- thumbnail: (0, _emotion.css)({
97
+ thumbnail: (0, _css.css)({
98
98
  width: '30px',
99
99
  height: '30px',
100
100
  objectFit: 'cover'
@@ -10,7 +10,7 @@ Object.defineProperty(exports, "CommandPrompt", {
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 _emotion = require("emotion");
13
+ const _css = require("@emotion/css");
14
14
  const _trimLeadingSlash = require("../utils/trimLeadingSlash");
15
15
  const _CommandList = require("./CommandList");
16
16
  function _interop_require_default(obj) {
@@ -60,7 +60,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
60
60
  return newObj;
61
61
  }
62
62
  const styles = {
63
- commandPrompt: (0, _emotion.css)({
63
+ commandPrompt: (0, _css.css)({
64
64
  color: _f36tokens.default.blue400
65
65
  })
66
66
  };
@@ -16,7 +16,7 @@ const _fieldeditorreference = require("@contentful/field-editor-reference");
16
16
  const _fieldeditorshared = require("@contentful/field-editor-shared");
17
17
  const _reactquery = require("@contentful/field-editor-shared/react-query");
18
18
  const _richtexttypes = require("@contentful/rich-text-types");
19
- const _emotion = require("emotion");
19
+ const _css = require("@emotion/css");
20
20
  function _interop_require_default(obj) {
21
21
  return obj && obj.__esModule ? obj : {
22
22
  default: obj
@@ -65,7 +65,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
65
65
  }
66
66
  const { getEntryTitle, getEntityStatus } = _fieldeditorshared.entityHelpers;
67
67
  const styles = {
68
- scheduledIcon: (0, _emotion.css)({
68
+ scheduledIcon: (0, _css.css)({
69
69
  verticalAlign: 'text-bottom',
70
70
  marginRight: _f36tokens.default.spacing2Xs
71
71
  })
@@ -11,7 +11,7 @@ Object.defineProperty(exports, "HeadingComponents", {
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 _emotion = require("emotion");
14
+ const _css = require("@emotion/css");
15
15
  function _interop_require_default(obj) {
16
16
  return obj && obj.__esModule ? obj : {
17
17
  default: obj
@@ -60,54 +60,54 @@ function _interop_require_wildcard(obj, nodeInterop) {
60
60
  }
61
61
  const styles = {
62
62
  dropdown: {
63
- root: (0, _emotion.css)`
63
+ root: (0, _css.css)`
64
64
  font-weight: ${_f36tokens.default.fontWeightDemiBold};
65
65
  `,
66
- [_richtexttypes.BLOCKS.PARAGRAPH]: (0, _emotion.css)`
66
+ [_richtexttypes.BLOCKS.PARAGRAPH]: (0, _css.css)`
67
67
  font-size: ${_f36tokens.default.fontSizeL};
68
68
  `,
69
- [_richtexttypes.BLOCKS.HEADING_1]: (0, _emotion.css)`
69
+ [_richtexttypes.BLOCKS.HEADING_1]: (0, _css.css)`
70
70
  font-size: 1.625rem;
71
71
  `,
72
- [_richtexttypes.BLOCKS.HEADING_2]: (0, _emotion.css)`
72
+ [_richtexttypes.BLOCKS.HEADING_2]: (0, _css.css)`
73
73
  font-size: 1.4375rem;
74
74
  `,
75
- [_richtexttypes.BLOCKS.HEADING_3]: (0, _emotion.css)`
75
+ [_richtexttypes.BLOCKS.HEADING_3]: (0, _css.css)`
76
76
  font-size: 1.25rem;
77
77
  `,
78
- [_richtexttypes.BLOCKS.HEADING_4]: (0, _emotion.css)`
78
+ [_richtexttypes.BLOCKS.HEADING_4]: (0, _css.css)`
79
79
  font-size: 1.125rem;
80
80
  `,
81
- [_richtexttypes.BLOCKS.HEADING_5]: (0, _emotion.css)`
81
+ [_richtexttypes.BLOCKS.HEADING_5]: (0, _css.css)`
82
82
  font-size: 1rem;
83
83
  `,
84
- [_richtexttypes.BLOCKS.HEADING_6]: (0, _emotion.css)`
84
+ [_richtexttypes.BLOCKS.HEADING_6]: (0, _css.css)`
85
85
  font-size: 0.875rem;
86
86
  `
87
87
  },
88
88
  headings: {
89
- root: (0, _emotion.css)`
89
+ root: (0, _css.css)`
90
90
  font-weight: ${_f36tokens.default.fontWeightMedium};
91
91
  line-height: 1.3;
92
92
  margin: 0 0 ${_f36tokens.default.spacingS};
93
93
  direction: inherit;
94
94
  `,
95
- [_richtexttypes.BLOCKS.HEADING_1]: (0, _emotion.css)`
95
+ [_richtexttypes.BLOCKS.HEADING_1]: (0, _css.css)`
96
96
  font-size: 1.875rem;
97
97
  `,
98
- [_richtexttypes.BLOCKS.HEADING_2]: (0, _emotion.css)`
98
+ [_richtexttypes.BLOCKS.HEADING_2]: (0, _css.css)`
99
99
  font-size: 1.5625rem;
100
100
  `,
101
- [_richtexttypes.BLOCKS.HEADING_3]: (0, _emotion.css)`
101
+ [_richtexttypes.BLOCKS.HEADING_3]: (0, _css.css)`
102
102
  font-size: 1.375rem;
103
103
  `,
104
- [_richtexttypes.BLOCKS.HEADING_4]: (0, _emotion.css)`
104
+ [_richtexttypes.BLOCKS.HEADING_4]: (0, _css.css)`
105
105
  font-size: 1.25rem;
106
106
  `,
107
- [_richtexttypes.BLOCKS.HEADING_5]: (0, _emotion.css)`
107
+ [_richtexttypes.BLOCKS.HEADING_5]: (0, _css.css)`
108
108
  font-size: 1.125rem;
109
109
  `,
110
- [_richtexttypes.BLOCKS.HEADING_6]: (0, _emotion.css)`
110
+ [_richtexttypes.BLOCKS.HEADING_6]: (0, _css.css)`
111
111
  font-size: 1rem;
112
112
  `
113
113
  }
@@ -116,7 +116,7 @@ function createHeading(Tag, block) {
116
116
  return function Heading(props) {
117
117
  return /*#__PURE__*/ _react.createElement(Tag, {
118
118
  ...props.attributes,
119
- className: (0, _emotion.cx)(styles.headings.root, styles.headings[block])
119
+ className: (0, _css.cx)(styles.headings.root, styles.headings[block])
120
120
  }, props.children);
121
121
  };
122
122
  }
@@ -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 _emotion = require("emotion");
16
+ const _css = require("@emotion/css");
17
17
  const _ContentfulEditorProvider = require("../../../ContentfulEditorProvider");
18
18
  const _editor = require("../../../helpers/editor");
19
19
  const _validations = require("../../../helpers/validations");
@@ -65,33 +65,33 @@ function _interop_require_wildcard(obj, nodeInterop) {
65
65
  return newObj;
66
66
  }
67
67
  const styles = {
68
- button: (0, _emotion.css)({
68
+ button: (0, _css.css)({
69
69
  minWidth: '125px',
70
70
  justifyContent: 'space-between'
71
71
  }),
72
72
  dropdown: {
73
- root: (0, _emotion.css)`
73
+ root: (0, _css.css)`
74
74
  font-weight: ${_f36tokens.default.fontWeightDemiBold};
75
75
  `,
76
- [_richtexttypes.BLOCKS.PARAGRAPH]: (0, _emotion.css)`
76
+ [_richtexttypes.BLOCKS.PARAGRAPH]: (0, _css.css)`
77
77
  font-size: ${_f36tokens.default.fontSizeL};
78
78
  `,
79
- [_richtexttypes.BLOCKS.HEADING_1]: (0, _emotion.css)`
79
+ [_richtexttypes.BLOCKS.HEADING_1]: (0, _css.css)`
80
80
  font-size: 1.625rem;
81
81
  `,
82
- [_richtexttypes.BLOCKS.HEADING_2]: (0, _emotion.css)`
82
+ [_richtexttypes.BLOCKS.HEADING_2]: (0, _css.css)`
83
83
  font-size: 1.4375rem;
84
84
  `,
85
- [_richtexttypes.BLOCKS.HEADING_3]: (0, _emotion.css)`
85
+ [_richtexttypes.BLOCKS.HEADING_3]: (0, _css.css)`
86
86
  font-size: 1.25rem;
87
87
  `,
88
- [_richtexttypes.BLOCKS.HEADING_4]: (0, _emotion.css)`
88
+ [_richtexttypes.BLOCKS.HEADING_4]: (0, _css.css)`
89
89
  font-size: 1.125rem;
90
90
  `,
91
- [_richtexttypes.BLOCKS.HEADING_5]: (0, _emotion.css)`
91
+ [_richtexttypes.BLOCKS.HEADING_5]: (0, _css.css)`
92
92
  font-size: 1rem;
93
93
  `,
94
- [_richtexttypes.BLOCKS.HEADING_6]: (0, _emotion.css)`
94
+ [_richtexttypes.BLOCKS.HEADING_6]: (0, _css.css)`
95
95
  font-size: 0.875rem;
96
96
  `
97
97
  }
@@ -186,6 +186,6 @@ function ToolbarHeadingButton(props) {
186
186
  testId: `dropdown-option-${nodeType}`,
187
187
  disabled: props.isDisabled
188
188
  }, /*#__PURE__*/ _react.createElement("span", {
189
- className: (0, _emotion.cx)(styles.dropdown.root, styles.dropdown[nodeType])
189
+ className: (0, _css.cx)(styles.dropdown.root, styles.dropdown[nodeType])
190
190
  }, LABELS[nodeType]))).filter(Boolean)));
191
191
  }
@@ -26,7 +26,7 @@ const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
26
26
  const _f36icons = require("@contentful/f36-icons");
27
27
  const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
28
28
  const _richtexttypes = require("@contentful/rich-text-types");
29
- const _emotion = require("emotion");
29
+ const _css = require("@emotion/css");
30
30
  const _slatereact = /*#__PURE__*/ _interop_require_wildcard(require("slate-react"));
31
31
  const _ContentfulEditorProvider = require("../../ContentfulEditorProvider");
32
32
  const _editor = require("../../helpers/editor");
@@ -80,10 +80,10 @@ function _interop_require_wildcard(obj, nodeInterop) {
80
80
  return newObj;
81
81
  }
82
82
  const styles = {
83
- container: (0, _emotion.css)`
83
+ container: (0, _css.css)`
84
84
  margin: 0 0 ${_f36tokens.default.spacingL};
85
85
  `,
86
- hr: (0, _emotion.css)`
86
+ hr: (0, _css.css)`
87
87
  margin: 0;
88
88
  height: ${_f36tokens.default.spacingM};
89
89
  background: transparent;
@@ -102,7 +102,7 @@ const styles = {
102
102
  top: 50%;
103
103
  }
104
104
  `,
105
- hrSelected: (0, _emotion.css)`
105
+ hrSelected: (0, _css.css)`
106
106
  &::after {
107
107
  background: ${_f36tokens.default.colorPrimary};
108
108
  -webkit-box-shadow: 0px 0px 5px ${_f36tokens.default.colorPrimary};
@@ -165,7 +165,7 @@ function Hr(props) {
165
165
  draggable: true,
166
166
  contentEditable: false
167
167
  }, /*#__PURE__*/ _react.createElement("hr", {
168
- className: (0, _emotion.cx)(styles.hr, isSelected && isFocused ? styles.hrSelected : undefined)
168
+ className: (0, _css.cx)(styles.hr, isSelected && isFocused ? styles.hrSelected : undefined)
169
169
  })), props.children);
170
170
  }
171
171
  const createHrPlugin = ()=>({
@@ -22,7 +22,7 @@ const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f
22
22
  const _fieldeditorreference = require("@contentful/field-editor-reference");
23
23
  const _fieldeditorshared = require("@contentful/field-editor-shared");
24
24
  const _richtexttypes = require("@contentful/rich-text-types");
25
- const _emotion = require("emotion");
25
+ const _css = require("@emotion/css");
26
26
  const _editor = require("../../helpers/editor");
27
27
  const _getAllowedResourcesForNodeType = /*#__PURE__*/ _interop_require_default(require("../../helpers/getAllowedResourcesForNodeType"));
28
28
  const _getLinkedContentTypeIdsForNodeType = /*#__PURE__*/ _interop_require_default(require("../../helpers/getLinkedContentTypeIdsForNodeType"));
@@ -80,7 +80,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
80
80
  return newObj;
81
81
  }
82
82
  const styles = {
83
- removeSelectionLabel: (0, _emotion.css)`
83
+ removeSelectionLabel: (0, _css.css)`
84
84
  margin-left: ${_f36tokens.default.spacingS};
85
85
  margin-bottom: ${_f36tokens.default.spacingXs}; // to match FormLabel margin
86
86
  `
@@ -9,24 +9,24 @@ Object.defineProperty(exports, "styles", {
9
9
  }
10
10
  });
11
11
  const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
12
- const _emotion = require("emotion");
12
+ const _css = require("@emotion/css");
13
13
  function _interop_require_default(obj) {
14
14
  return obj && obj.__esModule ? obj : {
15
15
  default: obj
16
16
  };
17
17
  }
18
18
  const styles = {
19
- hyperlinkWrapper: (0, _emotion.css)({
19
+ hyperlinkWrapper: (0, _css.css)({
20
20
  display: 'inline',
21
21
  position: 'static',
22
22
  a: {
23
23
  fontSize: 'inherit !important'
24
24
  }
25
25
  }),
26
- iconButton: (0, _emotion.css)({
26
+ iconButton: (0, _css.css)({
27
27
  padding: `${_f36tokens.default.spacing2Xs} ${_f36tokens.default.spacingXs}`
28
28
  }),
29
- openLink: (0, _emotion.css)({
29
+ openLink: (0, _css.css)({
30
30
  display: 'inline-block',
31
31
  marginLeft: _f36tokens.default.spacingXs,
32
32
  marginRight: _f36tokens.default.spacingXs,
@@ -35,10 +35,10 @@ const styles = {
35
35
  overflow: 'hidden',
36
36
  textOverflow: 'ellipsis'
37
37
  }),
38
- popover: (0, _emotion.css)({
38
+ popover: (0, _css.css)({
39
39
  zIndex: _f36tokens.default.zIndexModal
40
40
  }),
41
- hyperlink: (0, _emotion.css)({
41
+ hyperlink: (0, _css.css)({
42
42
  position: 'relative',
43
43
  whiteSpace: 'pre-wrap',
44
44
  overflowWrap: 'break-word',
@@ -19,7 +19,7 @@ _export(exports, {
19
19
  const _react = /*#__PURE__*/ _interop_require_wildcard(require("react"));
20
20
  const _f36tokens = /*#__PURE__*/ _interop_require_default(require("@contentful/f36-tokens"));
21
21
  const _richtexttypes = require("@contentful/rich-text-types");
22
- const _emotion = require("emotion");
22
+ const _css = require("@emotion/css");
23
23
  function _interop_require_default(obj) {
24
24
  return obj && obj.__esModule ? obj : {
25
25
  default: obj
@@ -66,7 +66,7 @@ function _interop_require_wildcard(obj, nodeInterop) {
66
66
  }
67
67
  return newObj;
68
68
  }
69
- const baseStyle = (0, _emotion.css)`
69
+ const baseStyle = (0, _css.css)`
70
70
  padding: 0;
71
71
  margin: 0 0 1.25rem 1.25rem;
72
72
  direction: inherit;
@@ -77,7 +77,7 @@ const baseStyle = (0, _emotion.css)`
77
77
  }
78
78
  `;
79
79
  const styles = {
80
- [_richtexttypes.BLOCKS.UL_LIST]: (0, _emotion.css)`
80
+ [_richtexttypes.BLOCKS.UL_LIST]: (0, _css.css)`
81
81
  list-style-type: disc;
82
82
  ul {
83
83
  list-style-type: circle;
@@ -86,7 +86,7 @@ const styles = {
86
86
  }
87
87
  }
88
88
  `,
89
- [_richtexttypes.BLOCKS.OL_LIST]: (0, _emotion.css)`
89
+ [_richtexttypes.BLOCKS.OL_LIST]: (0, _css.css)`
90
90
  list-style-type: decimal;
91
91
  ol {
92
92
  list-style-type: upper-alpha;
@@ -103,7 +103,7 @@ function createList(Tag, block) {
103
103
  return function List(props) {
104
104
  return /*#__PURE__*/ _react.createElement(Tag, {
105
105
  ...props.attributes,
106
- className: (0, _emotion.cx)(baseStyle, styles[block])
106
+ className: (0, _css.cx)(baseStyle, styles[block])
107
107
  }, props.children);
108
108
  };
109
109
  }