@atlaskit/editor-core 204.4.3 → 204.4.5

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/CHANGELOG.md CHANGED
@@ -1,5 +1,17 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 204.4.5
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 204.4.4
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
3
15
  ## 204.4.3
4
16
 
5
17
  ### Patch Changes
@@ -68,6 +68,8 @@ var CollapsedEditor = exports.default = /*#__PURE__*/function (_React$Component)
68
68
  });
69
69
  }
70
70
  if (!this.state.editorModules) {
71
+ // Ignored via go/ees007
72
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
71
73
  // TODO: Proper loading state
72
74
  return /*#__PURE__*/_react.default.createElement(_ChromeCollapsed.default, {
73
75
  text: "Loading..."
@@ -23,7 +23,6 @@ var _nodesByLocalIds = require("../utils/nodes-by-localIds");
23
23
  var _tempIsEmptyDocument = require("./temp-is-empty-document");
24
24
  var _tempNodesByLocalids = require("./temp-nodes-by-localids");
25
25
  var _tempToJson = require("./temp-to-json");
26
- // TODO: ED-21786
27
26
  // Please, do not copy or use this kind of code below
28
27
  // @ts-ignore
29
28
  var fakePluginKey = {
@@ -156,6 +156,8 @@ var ErrorBoundaryWithEditorView = exports.ErrorBoundaryWithEditorView = /*#__PUR
156
156
  });
157
157
  }
158
158
 
159
+ // Ignored via go/ees007
160
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
159
161
  // FIXME: This is causing more problems then it's solving. The async check to sniff the browser extensions is block some
160
162
  // react unit tests. Essentially jest never completes and just hangs. This was code was added 3yrs ago so that errors
161
163
  // would detail if the browser had grammarly extension installed or not. I'm not sure if anyone has every inspecting this
@@ -377,6 +377,8 @@ function ReactEditorView(props) {
377
377
  onEditorViewUpdated: onEditorViewUpdated
378
378
  });
379
379
 
380
+ // Ignored via go/ees007
381
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
380
382
  // TODO: Remove these when we deprecate these props from editor-props - smartLinks is unfortunately still used in some places, we can sidestep this problem if we move everyone across to ComposableEditor and deprecate Editor
381
383
  var UNSAFE_cards = props.editorProps.UNSAFE_cards;
382
384
  var smartLinks = props.editorProps.smartLinks;
@@ -90,6 +90,7 @@ var Content = /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
90
90
  }) &&
91
91
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
92
92
  _StyledComponents.contentAreaReducedHeaderSpace]),
93
+ "data-editor-editable-content": true,
93
94
  role: "region",
94
95
  "aria-label": props.intl.formatMessage(_messages.fullPageMessages.editableContentLabel),
95
96
  ref: contentAreaRef
@@ -19,7 +19,8 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
19
19
  (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"]))) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
20
20
  (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n\t\t\t\t> :not(style):first-child,\n\t\t\t\t> style:first-child + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"])));
21
21
  };
22
-
22
+ // Ignored via go/ees007
23
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
23
24
  // TODO handle responsive
24
25
  var layoutColumnStyles = function layoutColumnStyles() {
25
26
  return (0, _experiments.editorExperiment)('advanced_layouts', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
@@ -69,5 +70,5 @@ var layoutResponsiveStyles = function layoutResponsiveStyles(viewMode) {
69
70
 
70
71
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
71
72
  var layoutStyles = exports.layoutStyles = function layoutStyles(viewMode) {
72
- return (0, _react.css)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t// TODO: Migrate away from gridSize\n\t\t\t// Recommendation: Replace directly with 7px\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t// styles to support borders for layout\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t// hide separator when element is dragging on top of a layout column\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", _editorSharedStyles.akLayoutGutterOffset + ((0, _experiments.editorExperiment)('nested-dnd', true) && (0, _platformFeatureFlags.fg)('platform_editor_advanced_layouts_post_fix_patch_2') ? 8 : 0), _editorSharedStyles.akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || (0, _experiments.editorExperiment)('advanced_layouts', true) ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", _styles.LAYOUT_COLUMN_PADDING, _styles.LAYOUT_COLUMN_PADDING + ((0, _experiments.editorExperiment)('nested-dnd', true) ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), (0, _experiments.editorExperiment)('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), (0, _experiments.editorExperiment)('advanced_layouts', true) && layoutResponsiveStyles(viewMode), _types.TableCssClassName.TABLE_CONTAINER, _consts.tableMarginFullWidthMode, (0, _experiments.editorExperiment)('nested-dnd', true) && (0, _experiments.editorExperiment)('advanced_layouts', false) && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", _editorSharedStyles.akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
73
+ return (0, _react.css)(_templateObject14 || (_templateObject14 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t// Ignored via go/ees007\n\t\t\t// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format\n\t\t\t// TODO: Migrate away from gridSize\n\t\t\t// Recommendation: Replace directly with 7px\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t// styles to support borders for layout\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t// hide separator when element is dragging on top of a layout column\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", _editorSharedStyles.akLayoutGutterOffset + ((0, _experiments.editorExperiment)('nested-dnd', true) && (0, _platformFeatureFlags.fg)('platform_editor_advanced_layouts_post_fix_patch_2') ? 8 : 0), _editorSharedStyles.akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || (0, _experiments.editorExperiment)('advanced_layouts', true) ? 0 : _editorSharedStyles.akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", _styles.LAYOUT_COLUMN_PADDING, _styles.LAYOUT_COLUMN_PADDING + ((0, _experiments.editorExperiment)('nested-dnd', true) ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), (0, _experiments.editorExperiment)('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), (0, _experiments.editorExperiment)('advanced_layouts', true) && layoutResponsiveStyles(viewMode), _types.TableCssClassName.TABLE_CONTAINER, _consts.tableMarginFullWidthMode, (0, _experiments.editorExperiment)('nested-dnd', true) && (0, _experiments.editorExperiment)('advanced_layouts', false) && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", _editorSharedStyles.akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
73
74
  };
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getEditorValueWithMedia = getEditorValueWithMedia;
8
8
  var _regenerator = _interopRequireDefault(require("@babel/runtime/regenerator"));
9
9
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
10
- // TODO: ED-15663
11
10
  // Please, do not copy or use this kind of code below
12
11
  // @ts-ignore
13
12
  var mediaPluginKey = {
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "204.4.3";
8
+ var version = exports.version = "204.4.5";
@@ -38,6 +38,8 @@ export default class CollapsedEditor extends React.Component {
38
38
  });
39
39
  }
40
40
  if (!this.state.editorModules) {
41
+ // Ignored via go/ees007
42
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
41
43
  // TODO: Proper loading state
42
44
  return /*#__PURE__*/React.createElement(ChromeCollapsed, {
43
45
  text: "Loading..."
@@ -13,7 +13,6 @@ import { isEmptyDocument } from './temp-is-empty-document';
13
13
  import { findNodePosByLocalIds } from './temp-nodes-by-localids';
14
14
  import { toJSON } from './temp-to-json';
15
15
 
16
- // TODO: ED-21786
17
16
  // Please, do not copy or use this kind of code below
18
17
  // @ts-ignore
19
18
  const fakePluginKey = {
@@ -104,6 +104,8 @@ export class ErrorBoundaryWithEditorView extends React.Component {
104
104
  });
105
105
  }
106
106
 
107
+ // Ignored via go/ees007
108
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
107
109
  // FIXME: This is causing more problems then it's solving. The async check to sniff the browser extensions is block some
108
110
  // react unit tests. Essentially jest never completes and just hangs. This was code was added 3yrs ago so that errors
109
111
  // would detail if the browser had grammarly extension installed or not. I'm not sure if anyone has every inspecting this
@@ -351,6 +351,8 @@ export function ReactEditorView(props) {
351
351
  onEditorViewUpdated
352
352
  });
353
353
 
354
+ // Ignored via go/ees007
355
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
354
356
  // TODO: Remove these when we deprecate these props from editor-props - smartLinks is unfortunately still used in some places, we can sidestep this problem if we move everyone across to ComposableEditor and deprecate Editor
355
357
  const UNSAFE_cards = props.editorProps.UNSAFE_cards;
356
358
  const smartLinks = props.editorProps.smartLinks;
@@ -78,6 +78,7 @@ const Content = /*#__PURE__*/React.forwardRef((props, ref) => {
78
78
  }) &&
79
79
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
80
80
  contentAreaReducedHeaderSpace],
81
+ "data-editor-editable-content": true,
81
82
  role: "region",
82
83
  "aria-label": props.intl.formatMessage(messages.editableContentLabel),
83
84
  ref: contentAreaRef
@@ -29,7 +29,8 @@ css`
29
29
  margin-top: 0;
30
30
  }
31
31
  `;
32
-
32
+ // Ignored via go/ees007
33
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
33
34
  // TODO handle responsive
34
35
  const layoutColumnStyles = () => editorExperiment('advanced_layouts', true) ?
35
36
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
@@ -305,6 +306,8 @@ export const layoutStyles = viewMode => css`
305
306
  .ProseMirror {
306
307
  ${layoutSectionStyles()}
307
308
  [data-layout-section] {
309
+ // Ignored via go/ees007
310
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
308
311
  // TODO: Migrate away from gridSize
309
312
  // Recommendation: Replace directly with 7px
310
313
  margin: ${"var(--ds-space-100, 8px)"} -${akLayoutGutterOffset + (editorExperiment('nested-dnd', true) && fg('platform_editor_advanced_layouts_post_fix_patch_2') ? 8 : 0)}px 0;
@@ -1,4 +1,3 @@
1
- // TODO: ED-15663
2
1
  // Please, do not copy or use this kind of code below
3
2
  // @ts-ignore
4
3
  const mediaPluginKey = {
@@ -1,2 +1,2 @@
1
1
  export const name = "@atlaskit/editor-core";
2
- export const version = "204.4.3";
2
+ export const version = "204.4.5";
@@ -60,6 +60,8 @@ var CollapsedEditor = /*#__PURE__*/function (_React$Component) {
60
60
  });
61
61
  }
62
62
  if (!this.state.editorModules) {
63
+ // Ignored via go/ees007
64
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
63
65
  // TODO: Proper loading state
64
66
  return /*#__PURE__*/React.createElement(ChromeCollapsed, {
65
67
  text: "Loading..."
@@ -17,7 +17,6 @@ import { isEmptyDocument } from './temp-is-empty-document';
17
17
  import { findNodePosByLocalIds } from './temp-nodes-by-localids';
18
18
  import { toJSON } from './temp-to-json';
19
19
 
20
- // TODO: ED-21786
21
20
  // Please, do not copy or use this kind of code below
22
21
  // @ts-ignore
23
22
  var fakePluginKey = {
@@ -149,6 +149,8 @@ export var ErrorBoundaryWithEditorView = /*#__PURE__*/function (_React$Component
149
149
  });
150
150
  }
151
151
 
152
+ // Ignored via go/ees007
153
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
152
154
  // FIXME: This is causing more problems then it's solving. The async check to sniff the browser extensions is block some
153
155
  // react unit tests. Essentially jest never completes and just hangs. This was code was added 3yrs ago so that errors
154
156
  // would detail if the browser had grammarly extension installed or not. I'm not sure if anyone has every inspecting this
@@ -366,6 +366,8 @@ export function ReactEditorView(props) {
366
366
  onEditorViewUpdated: onEditorViewUpdated
367
367
  });
368
368
 
369
+ // Ignored via go/ees007
370
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
369
371
  // TODO: Remove these when we deprecate these props from editor-props - smartLinks is unfortunately still used in some places, we can sidestep this problem if we move everyone across to ComposableEditor and deprecate Editor
370
372
  var UNSAFE_cards = props.editorProps.UNSAFE_cards;
371
373
  var smartLinks = props.editorProps.smartLinks;
@@ -79,6 +79,7 @@ var Content = /*#__PURE__*/React.forwardRef(function (props, ref) {
79
79
  }) &&
80
80
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
81
81
  contentAreaReducedHeaderSpace]),
82
+ "data-editor-editable-content": true,
82
83
  role: "region",
83
84
  "aria-label": props.intl.formatMessage(messages.editableContentLabel),
84
85
  ref: contentAreaRef
@@ -13,7 +13,8 @@ var firstNodeWithNotMarginTop = function firstNodeWithNotMarginTop() {
13
13
  css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n\t\t\t\t> :nth-child(1 of :not(style, .ProseMirror-gapcursor, .ProseMirror-widget, span)) {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"]))) : // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
14
14
  css(_templateObject2 || (_templateObject2 = _taggedTemplateLiteral(["\n\t\t\t\t> :not(style):first-child,\n\t\t\t\t> style:first-child + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + *,\n\t\t\t\t> style:first-child + .ProseMirror-gapcursor + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\n\t\t\t\t> .ProseMirror-gapcursor:first-child + span + * {\n\t\t\t\t\tmargin-top: 0;\n\t\t\t\t}\n\t\t\t"])));
15
15
  };
16
-
16
+ // Ignored via go/ees007
17
+ // eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format
17
18
  // TODO handle responsive
18
19
  var layoutColumnStyles = function layoutColumnStyles() {
19
20
  return editorExperiment('advanced_layouts', true) ? // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression
@@ -63,5 +64,5 @@ var layoutResponsiveStyles = function layoutResponsiveStyles(viewMode) {
63
64
 
64
65
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- Needs manual remediation
65
66
  export var layoutStyles = function layoutStyles(viewMode) {
66
- return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t// TODO: Migrate away from gridSize\n\t\t\t// Recommendation: Replace directly with 7px\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t// styles to support borders for layout\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t// hide separator when element is dragging on top of a layout column\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", akLayoutGutterOffset + (editorExperiment('nested-dnd', true) && fg('platform_editor_advanced_layouts_post_fix_patch_2') ? 8 : 0), akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || editorExperiment('advanced_layouts', true) ? 0 : akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", LAYOUT_COLUMN_PADDING, LAYOUT_COLUMN_PADDING + (editorExperiment('nested-dnd', true) ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), editorExperiment('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), editorExperiment('advanced_layouts', true) && layoutResponsiveStyles(viewMode), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode, editorExperiment('nested-dnd', true) && editorExperiment('advanced_layouts', false) && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
67
+ return css(_templateObject14 || (_templateObject14 = _taggedTemplateLiteral(["\n\t.ProseMirror {\n\t\t", "\n\t\t[data-layout-section] {\n\t\t\t// Ignored via go/ees007\n\t\t\t// eslint-disable-next-line @atlaskit/editor/enforce-todo-comment-format\n\t\t\t// TODO: Migrate away from gridSize\n\t\t\t// Recommendation: Replace directly with 7px\n\t\t\tmargin: ", " -", "px 0;\n\t\t\ttransition: border-color 0.3s ", ";\n\t\t\tcursor: ", ";\n\n\t\t\t/* Inner cursor located 26px from left */\n\t\t\t[data-layout-column] {\n\t\t\t\tflex: 1;\n\t\t\t\tposition: relative;\n\n\t\t\t\tmin-width: 0;\n\t\t\t\t/* disable 4 borders when in view mode and advanced layouts is on */\n\t\t\t\tborder: ", "px\n\t\t\t\t\tsolid ", ";\n\t\t\t\tborder-radius: 4px;\n\t\t\t\tpadding: ", "px\n\t\t\t\t\t", "px;\n\t\t\t\tbox-sizing: border-box;\n\n\t\t\t\t> div {\n\t\t\t\t\t", "\n\n\t\t\t\t\t> .embedCardView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .mediaSingleView-content-wrap:first-of-type .rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-child\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor.-right\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> .ProseMirror-gapcursor.-right:first-of-type\n\t\t\t\t\t\t+ .embedCardView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t> .ProseMirror-gapcursor:first-child\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item,\n\t\t\t\t\t> style:first-child\n\t\t\t\t\t\t+ .ProseMirror-gapcursor\n\t\t\t\t\t\t+ span\n\t\t\t\t\t\t+ .mediaSingleView-content-wrap\n\t\t\t\t\t\t.rich-media-item {\n\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t}\n\n\t\t\t\t\t/* Prevent first DecisionWrapper's margin-top: 8px from shifting decisions down\n and shrinking layout's node selectable area (leniency margin) */\n\t\t\t\t\t> [data-node-type='decisionList'] {\n\t\t\t\t\t\tli:first-of-type [data-decision-wrapper] {\n\t\t\t\t\t\t\tmargin-top: 0;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t/* Make the 'content' fill the entire height of the layout column to allow click\n handler of layout section nodeview to target only data-layout-column */\n\t\t\t\t[data-layout-content] {\n\t\t\t\t\theight: 100%;\n\t\t\t\t\tcursor: text;\n\t\t\t\t\t.mediaGroupView-content-wrap {\n\t\t\t\t\t\tclear: both;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t", "\n\t\t}\n\n\t\t// styles to support borders for layout\n\t\t[data-layout-section],\n\t\t.layoutSectionView-content-wrap {\n\t\t\t", "\n\t\t}\n\t}\n\n\t", "\n\n\t// hide separator when element is dragging on top of a layout column\n\t[data-blocks-drop-target-container] ~ [data-layout-column] > [data-layout-content]::before {\n\t\tdisplay: none;\n\t}\n\n\t.fabric-editor--full-width-mode .ProseMirror {\n\t\t[data-layout-section] {\n\t\t\t.", " {\n\t\t\t\tmargin: 0 ", "px;\n\t\t\t}\n\t\t}\n\t}\n\n\t", "\n"])), layoutSectionStyles(), "var(--ds-space-100, 8px)", akLayoutGutterOffset + (editorExperiment('nested-dnd', true) && fg('platform_editor_advanced_layouts_post_fix_patch_2') ? 8 : 0), akEditorSwoopCubicBezier, viewMode === 'view' ? 'default' : 'pointer', viewMode === 'view' || editorExperiment('advanced_layouts', true) ? 0 : akEditorSelectedBorderSize, "var(--ds-border, #091E4224)", LAYOUT_COLUMN_PADDING, LAYOUT_COLUMN_PADDING + (editorExperiment('nested-dnd', true) ? 8 : 0), firstNodeWithNotMarginTop(), layoutColumnStyles(), editorExperiment('advanced_layouts', true) ? layoutWithSeparatorBorderStyles(viewMode) : layoutBorderStyles(viewMode), editorExperiment('advanced_layouts', true) && layoutResponsiveStyles(viewMode), TableCssClassName.TABLE_CONTAINER, tableMarginFullWidthMode, editorExperiment('nested-dnd', true) && editorExperiment('advanced_layouts', false) && ".ak-editor-content-area.appearance-full-page .ProseMirror [data-layout-section] {\n\t\t\t\tmargin: ".concat("var(--ds-space-100, 8px)", " -", akLayoutGutterOffset + 8, "px 0;\n\t\t\t\t}"));
67
68
  };
@@ -1,6 +1,5 @@
1
1
  import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
2
2
  import _regeneratorRuntime from "@babel/runtime/regenerator";
3
- // TODO: ED-15663
4
3
  // Please, do not copy or use this kind of code below
5
4
  // @ts-ignore
6
5
  var mediaPluginKey = {
@@ -1,2 +1,2 @@
1
1
  export var name = "@atlaskit/editor-core";
2
- export var version = "204.4.3";
2
+ export var version = "204.4.5";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-core",
3
- "version": "204.4.3",
3
+ "version": "204.4.5",
4
4
  "description": "A package contains Atlassian editor core functionality",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -46,22 +46,22 @@
46
46
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
47
47
  "@atlaskit/button": "^21.1.0",
48
48
  "@atlaskit/css": "^0.10.0",
49
- "@atlaskit/editor-common": "^101.1.0",
49
+ "@atlaskit/editor-common": "^102.4.0",
50
50
  "@atlaskit/editor-json-transformer": "^8.24.0",
51
51
  "@atlaskit/editor-performance-metrics": "^2.0.0",
52
- "@atlaskit/editor-plugin-quick-insert": "^2.0.0",
52
+ "@atlaskit/editor-plugin-quick-insert": "^2.1.0",
53
53
  "@atlaskit/editor-plugins": "^8.0.0",
54
54
  "@atlaskit/editor-prosemirror": "7.0.0",
55
55
  "@atlaskit/editor-shared-styles": "^3.4.0",
56
56
  "@atlaskit/emoji": "^68.0.0",
57
- "@atlaskit/icon": "^24.1.0",
57
+ "@atlaskit/icon": "^25.0.0",
58
58
  "@atlaskit/media-card": "^79.0.0",
59
59
  "@atlaskit/mention": "^24.1.0",
60
60
  "@atlaskit/platform-feature-flags": "^1.1.0",
61
- "@atlaskit/react-ufo": "^3.3.0",
61
+ "@atlaskit/react-ufo": "^3.4.0",
62
62
  "@atlaskit/task-decision": "^19.0.0",
63
- "@atlaskit/tmp-editor-statsig": "^3.4.0",
64
- "@atlaskit/tokens": "^4.3.0",
63
+ "@atlaskit/tmp-editor-statsig": "^3.6.0",
64
+ "@atlaskit/tokens": "^4.4.0",
65
65
  "@atlaskit/tooltip": "^20.0.0",
66
66
  "@atlaskit/width-detector": "^5.0.0",
67
67
  "@babel/runtime": "^7.0.0",
@@ -100,7 +100,7 @@
100
100
  "@atlaskit/media-test-helpers": "^35.0.0",
101
101
  "@atlaskit/modal-dialog": "^13.0.0",
102
102
  "@atlaskit/primitives": "^14.1.0",
103
- "@atlaskit/renderer": "^113.2.0",
103
+ "@atlaskit/renderer": "^114.2.0",
104
104
  "@atlaskit/smart-card": "^35.2.0",
105
105
  "@atlaskit/synchrony-test-helpers": "^3.1.0",
106
106
  "@atlaskit/toggle": "^15.0.0",
@@ -145,6 +145,10 @@
145
145
  }
146
146
  },
147
147
  "platform-feature-flags": {
148
+ "platform_editor_emotion_refactor_renderer": {
149
+ "type": "boolean",
150
+ "referenceOnly": "true"
151
+ },
148
152
  "platform_editor_fe--performance_metrics": {
149
153
  "type": "boolean"
150
154
  },
@@ -159,6 +163,9 @@
159
163
  "type": "boolean",
160
164
  "referenceOnly": "true"
161
165
  },
166
+ "platform_editor_update_insert_link_mark_end_pos": {
167
+ "type": "boolean"
168
+ },
162
169
  "linking_platform_datasource_assets_objects": {
163
170
  "type": "boolean",
164
171
  "referenceOnly": "true"
@@ -223,6 +230,9 @@
223
230
  "platform_editor_ssr_fix_block_controls": {
224
231
  "type": "boolean"
225
232
  },
233
+ "platform_editor_react18_mention_with_provider_fix": {
234
+ "type": "boolean"
235
+ },
226
236
  "platform_editor_ssr_fix_smartlinks": {
227
237
  "type": "boolean",
228
238
  "referenceOnly": true
@@ -239,10 +249,6 @@
239
249
  "type": "boolean",
240
250
  "referenceOnly": true
241
251
  },
242
- "platform_editor_element_dnd_nested_fix_patch_5": {
243
- "type": "boolean",
244
- "referenceOnly": true
245
- },
246
252
  "platform_editor_element_dnd_nested_fix_patch_6": {
247
253
  "type": "boolean",
248
254
  "referenceOnly": true
@@ -518,6 +524,9 @@
518
524
  "type": "boolean",
519
525
  "referenceOnly": true
520
526
  },
527
+ "platform_editor_number_column_sticky_header_bug": {
528
+ "type": "boolean"
529
+ },
521
530
  "platform_editor_elements_dnd_select_node_on_drag": {
522
531
  "type": "boolean",
523
532
  "referenceOnly": true
@@ -525,6 +534,14 @@
525
534
  "platform_editor_non_macros_copy_and_paste_fix": {
526
535
  "type": "boolean",
527
536
  "referenceOnly": true
537
+ },
538
+ "platform_editor_nbm_backspace_fixes": {
539
+ "type": "boolean",
540
+ "referenceOnly": true
541
+ },
542
+ "platform_editor_remove_drag_handle_fix": {
543
+ "type": "boolean",
544
+ "referenceOnly": true
528
545
  }
529
546
  },
530
547
  "stricter": {