@atlaskit/editor-core 187.41.4 → 187.41.7

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 (69) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/create-editor/feature-flags-from-props.js +2 -3
  3. package/dist/cjs/plugins/collab-edit/ui/styles.js +2 -2
  4. package/dist/cjs/plugins/date/nodeviews/date.js +6 -1
  5. package/dist/cjs/plugins/floating-toolbar/ui/Toolbar.js +4 -16
  6. package/dist/cjs/plugins/media/nodeviews/mediaSingle.js +3 -1
  7. package/dist/cjs/plugins/media/toolbar/index.js +0 -1
  8. package/dist/cjs/plugins/media/ui/ImageBorder/index.js +1 -3
  9. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +17 -0
  10. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -2
  11. package/dist/cjs/plugins/media/ui/ResizableMediaSingle/styles.js +18 -0
  12. package/dist/cjs/plugins/paste/handlers.js +2 -1
  13. package/dist/cjs/plugins/text-color/index.js +2 -6
  14. package/dist/cjs/plugins/text-color/ui/ToolbarTextColor/index.js +2 -5
  15. package/dist/cjs/ui/ColorPickerButton/index.js +3 -4
  16. package/dist/cjs/ui/ConfigPanel/Fields/ColorPicker.js +1 -11
  17. package/dist/cjs/ui/ConfigPanel/Fields/Expand.js +1 -1
  18. package/dist/cjs/version-wrapper.js +1 -1
  19. package/dist/es2019/create-editor/feature-flags-from-props.js +2 -3
  20. package/dist/es2019/plugins/collab-edit/ui/styles.js +2 -2
  21. package/dist/es2019/plugins/date/nodeviews/date.js +6 -1
  22. package/dist/es2019/plugins/floating-toolbar/ui/Toolbar.js +0 -13
  23. package/dist/es2019/plugins/media/nodeviews/mediaSingle.js +3 -1
  24. package/dist/es2019/plugins/media/toolbar/index.js +0 -1
  25. package/dist/es2019/plugins/media/ui/ImageBorder/index.js +1 -3
  26. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +9 -0
  27. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -2
  28. package/dist/es2019/plugins/media/ui/ResizableMediaSingle/styles.js +14 -0
  29. package/dist/es2019/plugins/paste/handlers.js +2 -1
  30. package/dist/es2019/plugins/text-color/index.js +2 -6
  31. package/dist/es2019/plugins/text-color/ui/ToolbarTextColor/index.js +2 -7
  32. package/dist/es2019/ui/ColorPickerButton/index.js +2 -3
  33. package/dist/es2019/ui/ConfigPanel/Fields/ColorPicker.js +1 -11
  34. package/dist/es2019/ui/ConfigPanel/Fields/Expand.js +1 -1
  35. package/dist/es2019/version-wrapper.js +1 -1
  36. package/dist/esm/create-editor/feature-flags-from-props.js +2 -3
  37. package/dist/esm/plugins/collab-edit/ui/styles.js +2 -2
  38. package/dist/esm/plugins/date/nodeviews/date.js +6 -1
  39. package/dist/esm/plugins/floating-toolbar/ui/Toolbar.js +4 -16
  40. package/dist/esm/plugins/media/nodeviews/mediaSingle.js +3 -1
  41. package/dist/esm/plugins/media/toolbar/index.js +0 -1
  42. package/dist/esm/plugins/media/ui/ImageBorder/index.js +1 -3
  43. package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.js +9 -0
  44. package/dist/esm/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.js +4 -2
  45. package/dist/esm/plugins/media/ui/ResizableMediaSingle/styles.js +7 -0
  46. package/dist/esm/plugins/paste/handlers.js +2 -1
  47. package/dist/esm/plugins/text-color/index.js +2 -6
  48. package/dist/esm/plugins/text-color/ui/ToolbarTextColor/index.js +2 -5
  49. package/dist/esm/ui/ColorPickerButton/index.js +3 -4
  50. package/dist/esm/ui/ConfigPanel/Fields/ColorPicker.js +1 -11
  51. package/dist/esm/ui/ConfigPanel/Fields/Expand.js +1 -1
  52. package/dist/esm/version-wrapper.js +1 -1
  53. package/dist/types/plugins/media/ui/ImageBorder/index.d.ts +3 -4
  54. package/dist/types/plugins/media/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.d.ts +3 -0
  55. package/dist/types/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +3 -1
  56. package/dist/types/plugins/media/ui/ResizableMediaSingle/styles.d.ts +1 -0
  57. package/dist/types/plugins/text-color/index.d.ts +1 -2
  58. package/dist/types/plugins/text-color/ui/ToolbarTextColor/index.d.ts +0 -2
  59. package/dist/types/ui/ColorPickerButton/index.d.ts +1 -2
  60. package/dist/types/ui/ConfigPanel/Fields/Expand.d.ts +2 -2
  61. package/dist/types-ts4.5/plugins/media/ui/ImageBorder/index.d.ts +3 -4
  62. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/ResizableMediaMigrationNotification.d.ts +3 -0
  63. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/ResizableMediaSingleNext.d.ts +3 -1
  64. package/dist/types-ts4.5/plugins/media/ui/ResizableMediaSingle/styles.d.ts +1 -0
  65. package/dist/types-ts4.5/plugins/text-color/index.d.ts +0 -2
  66. package/dist/types-ts4.5/plugins/text-color/ui/ToolbarTextColor/index.d.ts +0 -2
  67. package/dist/types-ts4.5/ui/ColorPickerButton/index.d.ts +1 -2
  68. package/dist/types-ts4.5/ui/ConfigPanel/Fields/Expand.d.ts +2 -2
  69. package/package.json +4 -4
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 187.41.7
4
+
5
+ ### Patch Changes
6
+
7
+ - [`64c9a1be1b1`](https://bitbucket.org/atlassian/atlassian-frontend/commits/64c9a1be1b1) - [ux] Show notification dot when image is sized using percentage or legacy
8
+
9
+ ## 187.41.5
10
+
11
+ ### Patch Changes
12
+
13
+ - [`1e26db8ffd0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/1e26db8ffd0) - ED-18264: Clean up useSomewhatSemanticTextColorNames - default behaviour will be same as when FF was on.
14
+ - [`6900f89eb0e`](https://bitbucket.org/atlassian/atlassian-frontend/commits/6900f89eb0e) - Internal changes to use space tokens. There is no expected visual or behaviour change.
15
+ - [`69857bbbff0`](https://bitbucket.org/atlassian/atlassian-frontend/commits/69857bbbff0) - [ED-20004] Capture errors in getPos due to prosemirror-view bump
16
+ - [`ba95f6c1fd5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/ba95f6c1fd5) - handleMarkdown no longer throws RangeError when 'from' argument exceeds document length, resolving bug where pasting a Jira issue datasource node at the end of a document would result in the legacy Jira issue macro being rendered instead
17
+ - Updated dependencies
18
+
3
19
  ## 187.41.4
4
20
 
5
21
  ### Patch Changes
@@ -32,7 +32,7 @@ function getSpellCheck(featureFlags) {
32
32
  * which is used by both current and archv3 editors.
33
33
  */
34
34
  function createFeatureFlagsFromProps(props) {
35
- var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29;
35
+ var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27;
36
36
  var normalizedFeatureFlags = (0, _normalizeFeatureFlags.normalizeFeatureFlags)(props.featureFlags);
37
37
  return _objectSpread(_objectSpread({}, normalizedFeatureFlags), {}, {
38
38
  newInsertionBehaviour: props.allowNewInsertionBehaviour,
@@ -63,8 +63,7 @@ function createFeatureFlagsFromProps(props) {
63
63
  // Including fallback to props.featureFlags so that mobile feature flags
64
64
  // are included (they are not kebab cased)
65
65
  restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.restartNumberedLists) === true,
66
- useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.useSomewhatSemanticTextColorNames) : false)),
67
66
  lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
68
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29['prevent-popup-overflow']) : false)
67
+ preventPopupOverflow: Boolean(typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27['prevent-popup-overflow']) : false)
69
68
  });
70
69
  }
@@ -10,9 +10,9 @@ var _react = require("@emotion/react");
10
10
  var _colors = require("@atlaskit/theme/colors");
11
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
12
  var _templateObject, _templateObject2, _templateObject3;
13
- var inviteTeamWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-radius: 50%;\n min-width: ", ";\n margin-left: calc(-1 * ", ");\n"])), "var(--ds-background-neutral, ".concat(_colors.N20, ")"), "var(--ds-space-400, 32px)", "var(--ds-space-050, 4px)");
13
+ var inviteTeamWrapper = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n background: ", ";\n border-radius: 50%;\n min-width: ", ";\n margin-left: ", ";\n"])), "var(--ds-background-neutral, ".concat(_colors.N20, ")"), "var(--ds-space-400, 32px)", "var(--ds-space-negative-050, -4px)");
14
14
  exports.inviteTeamWrapper = inviteTeamWrapper;
15
- var avatarContainer = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: ", ";\n display: flex;\n align-items: center;\n\n // ED-13102: This is to override list styles that come from the\n // .wiki-content class in Confluence that should not apply within\n // the toolbar. Has to be extra specific to override.\n && > ul {\n list-style-type: none;\n }\n\n div:last-child button.invite-to-edit {\n border-radius: 50%;\n height: 32px;\n width: 32px;\n padding: 2px;\n }\n"])), "var(--ds-space-100, 8px)");
15
+ var avatarContainer = (0, _react.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin-right: ", ";\n display: flex;\n align-items: center;\n\n // ED-13102: This is to override list styles that come from the\n // .wiki-content class in Confluence that should not apply within\n // the toolbar. Has to be extra specific to override.\n && > ul {\n list-style-type: none;\n }\n\n div:last-child button.invite-to-edit {\n border-radius: 50%;\n height: 32px;\n width: 32px;\n padding: ", ";\n }\n"])), "var(--ds-space-100, 8px)", "var(--ds-space-025, 2px)");
16
16
  exports.avatarContainer = avatarContainer;
17
17
  var badge = function badge(color) {
18
18
  return (0, _react.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: block;\n position: absolute;\n right: 1px;\n bottom: 1px;\n width: 13px;\n height: 13px;\n z-index: ", ";\n border-radius: 3px;\n background: ", ";\n color: ", ";\n font-size: ", ";\n line-height: 0;\n padding-top: 7px;\n text-align: center;\n box-shadow: 0 0 1px ", ";\n box-sizing: border-box;\n"])), _editorSharedStyles.akEditorSmallZIndex, color, "var(--ds-text-inverse, #fff)", (0, _editorSharedStyles.relativeFontSizeToBase16)(9), "var(--ds-border-inverse, #fff)");
@@ -19,7 +19,12 @@ function DateNodeView(props) {
19
19
  selection = _props$view$state.selection,
20
20
  getPos = props.getPos;
21
21
  var intl = (0, _reactIntlNext.useIntl)();
22
- var pos = typeof getPos === 'function' ? getPos() : undefined;
22
+ var pos;
23
+ try {
24
+ pos = typeof getPos === 'function' ? getPos() : undefined;
25
+ } catch (e) {
26
+ pos = undefined;
27
+ }
23
28
 
24
29
  // We fall back to selection.$from even though it does not cover all use cases
25
30
  // eg. upon Editor init, selection is at the start, not at the Date node
@@ -62,10 +62,6 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
62
62
  featureFlags = _ref.featureFlags,
63
63
  api = _ref.api;
64
64
  var emojiAndColourPickerMountPoint = scrollable ? popupsMountPoint || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.fabric-editor-popup-scroll-parent')) || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.ak-editor-content-area')) || undefined : popupsMountPoint;
65
- var _ref2 = featureFlags || {
66
- useSomewhatSemanticTextColorNames: false
67
- },
68
- useSomewhatSemanticTextColorNames = _ref2.useSomewhatSemanticTextColorNames;
69
65
  return (0, _react2.jsx)(_buttonGroup.default, null, items.filter(function (item) {
70
66
  return !item.hidden;
71
67
  }).map(function (item, idx) {
@@ -201,14 +197,6 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
201
197
  ,
202
198
  hexToPaletteColor: _editorPalette.hexToEditorBackgroundPaletteColor,
203
199
  paletteColorTooltipMessages: _ColorPalette.backgroundPaletteTooltipMessages
204
- // We did not want to create new FF or update
205
- // useSomewhatSemanticTextColorNames name
206
- // because it is temporary and require extra work.
207
- // So even though it says text color names,
208
- // we are going to use for all color pickers
209
- // such as text, background and table charts.
210
- ,
211
- showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames
212
200
  });
213
201
  }
214
202
  if (item.selectType === 'emoji') {
@@ -230,8 +218,8 @@ var ToolbarItems = /*#__PURE__*/_react.default.memo(function (_ref) {
230
218
  if (!editorView || !extensionsProvider) {
231
219
  return null;
232
220
  }
233
- var _ref3 = featureFlags || {},
234
- extendFloatingToolbar = _ref3.extendFloatingToolbar;
221
+ var _ref2 = featureFlags || {},
222
+ extendFloatingToolbar = _ref2.extendFloatingToolbar;
235
223
  if (!extendFloatingToolbar) {
236
224
  return null;
237
225
  }
@@ -377,8 +365,8 @@ var Toolbar = /*#__PURE__*/function (_Component) {
377
365
  // this prevents https://product-fabric.atlassian.net/browse/ED-10207
378
366
  (0, _createClass2.default)(Toolbar, [{
379
367
  key: "resetStyling",
380
- value: function resetStyling(_ref4) {
381
- var table = _ref4.table;
368
+ value: function resetStyling(_ref3) {
369
+ var table = _ref3.table;
382
370
  if (this.props.editorView) {
383
371
  var _this$props$api;
384
372
  var _this$props$editorVie2 = this.props.editorView,
@@ -407,7 +407,9 @@ var MediaSingleNode = /*#__PURE__*/function (_Component) {
407
407
  ref: this.captionPlaceHolderRef,
408
408
  onClick: this.clickPlaceholder
409
409
  }));
410
- return canResize ? (0, _platformFeatureFlags.getBooleanFF)('platform.editor.media.extended-resize-experience') ? (0, _react.jsx)(_ResizableMediaSingleNext.default, resizableMediaSingleProps, MediaChildren) : (0, _react.jsx)(_ResizableMediaSingle.default, (0, _extends2.default)({}, resizableMediaSingleProps, {
410
+ return canResize ? (0, _platformFeatureFlags.getBooleanFF)('platform.editor.media.extended-resize-experience') ? (0, _react.jsx)(_ResizableMediaSingleNext.default, (0, _extends2.default)({}, resizableMediaSingleProps, {
411
+ showLegacyNotification: widthType !== 'pixel'
412
+ }), MediaChildren) : (0, _react.jsx)(_ResizableMediaSingle.default, (0, _extends2.default)({}, resizableMediaSingleProps, {
411
413
  lineLength: contentWidthForLegacyExperience
412
414
  }), MediaChildren) : (0, _react.jsx)(_ui.MediaSingle, mediaSingleProps, MediaChildren);
413
415
  }
@@ -229,7 +229,6 @@ var generateMediaSingleFloatingToolbar = function generateMediaSingleFloatingToo
229
229
  var _pluginInjectionApi$a2;
230
230
  (0, _commands.setBorderMark)(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a2 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.actions)(attrs)(state, dispatch);
231
231
  },
232
- showSomewhatSemanticTooltips: getEditorFeatureFlags === null || getEditorFeatureFlags === void 0 ? void 0 : getEditorFeatureFlags().useSomewhatSemanticTextColorNames,
233
232
  borderMark: borderMark,
234
233
  intl: intl
235
234
  });
@@ -24,7 +24,6 @@ var _messages = require("./messages");
24
24
  var ImageBorder = function ImageBorder(_ref) {
25
25
  var formatMessage = _ref.intl.formatMessage,
26
26
  toggleBorder = _ref.toggleBorder,
27
- showSomewhatSemanticTooltips = _ref.showSomewhatSemanticTooltips,
28
27
  borderMark = _ref.borderMark,
29
28
  setBorder = _ref.setBorder;
30
29
  var popupTarget = (0, _react2.useRef)(null);
@@ -85,8 +84,7 @@ var ImageBorder = function ImageBorder(_ref) {
85
84
  paletteOptions: {
86
85
  palette: _uiColor.borderColorPalette,
87
86
  paletteColorTooltipMessages: _uiColor.borderPaletteTooltipMessages,
88
- hexToPaletteColor: _editorPalette.hexToEditorBorderPaletteColor,
89
- showSomewhatSemanticTooltips: showSomewhatSemanticTooltips
87
+ hexToPaletteColor: _editorPalette.hexToEditorBorderPaletteColor
90
88
  }
91
89
  })))
92
90
  }, {
@@ -0,0 +1,17 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.ResizableMediaMigrationNotification = void 0;
7
+ var _react = require("@emotion/react");
8
+ var _styles = require("./styles");
9
+ /** @jsx jsx */
10
+
11
+ var ResizableMediaMigrationNotification = function ResizableMediaMigrationNotification() {
12
+ return (0, _react.jsx)("div", {
13
+ "data-testid": "resizable-media-migration-notification",
14
+ css: [_styles.resizableMediaMigrationNotificationStyle]
15
+ });
16
+ };
17
+ exports.ResizableMediaMigrationNotification = ResizableMediaMigrationNotification;
@@ -32,6 +32,7 @@ var _memoizeOne = _interopRequireDefault(require("memoize-one"));
32
32
  var _analytics = require("../../utils/analytics");
33
33
  var _throttle = _interopRequireDefault(require("lodash/throttle"));
34
34
  var _main = require("../../pm-plugins/main");
35
+ var _ResizableMediaMigrationNotification = require("./ResizableMediaMigrationNotification");
35
36
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = (0, _getPrototypeOf2.default)(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = (0, _getPrototypeOf2.default)(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return (0, _possibleConstructorReturn2.default)(this, result); }; }
36
37
  function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } } /** @jsx jsx */
37
38
  var resizerNextTestId = 'mediaSingle.resizerNext.testid';
@@ -502,7 +503,8 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
502
503
  fullWidthMode = _this$props8.fullWidthMode,
503
504
  selected = _this$props8.selected,
504
505
  children = _this$props8.children,
505
- lineLength = _this$props8.lineLength;
506
+ lineLength = _this$props8.lineLength,
507
+ showLegacyNotification = _this$props8.showLegacyNotification;
506
508
  var _this$state = this.state,
507
509
  isResizing = _this$state.isResizing,
508
510
  size = _this$state.size,
@@ -554,7 +556,7 @@ var ResizableMediaSingleNext = /*#__PURE__*/function (_React$Component) {
554
556
  isHandleVisible: selected,
555
557
  handlePositioning: isNestedNode ? 'adjacent' : undefined,
556
558
  handleHighlight: "full-height"
557
- }, children));
559
+ }, children, showLegacyNotification && (0, _react2.jsx)(_ResizableMediaMigrationNotification.ResizableMediaMigrationNotification, null)));
558
560
  }
559
561
  }]);
560
562
  return ResizableMediaSingleNext;
@@ -0,0 +1,18 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ var _typeof = require("@babel/runtime/helpers/typeof");
5
+ Object.defineProperty(exports, "__esModule", {
6
+ value: true
7
+ });
8
+ exports.resizableMediaMigrationNotificationStyle = void 0;
9
+ var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
10
+ var _react = require("@emotion/react");
11
+ var colors = _interopRequireWildcard(require("@atlaskit/theme/colors"));
12
+ var _templateObject;
13
+ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "function") return null; var cacheBabelInterop = new WeakMap(); var cacheNodeInterop = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(nodeInterop) { return nodeInterop ? cacheNodeInterop : cacheBabelInterop; })(nodeInterop); }
14
+ function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof(obj) !== "object" && typeof obj !== "function") { return { default: obj }; } var cache = _getRequireWildcardCache(nodeInterop); if (cache && cache.has(obj)) { return cache.get(obj); } var newObj = {}; var hasPropertyDescriptor = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var key in obj) { if (key !== "default" && Object.prototype.hasOwnProperty.call(obj, key)) { var desc = hasPropertyDescriptor ? Object.getOwnPropertyDescriptor(obj, key) : null; if (desc && (desc.get || desc.set)) { Object.defineProperty(newObj, key, desc); } else { newObj[key] = obj[key]; } } } newObj.default = obj; if (cache) { cache.set(obj, newObj); } return newObj; }
15
+ var NOTIFICATION_SIZE = 8;
16
+ var SPACE_FROM_EDGE = "var(--ds-space-100, 8px)";
17
+ var resizableMediaMigrationNotificationStyle = (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: absolute;\n top: ", ";\n right: calc(", " + ", ");\n background-color: ", ";\n border-radius: ", ";\n width: ", "px;\n height: ", "px;\n pointer-events: none;\n"])), SPACE_FROM_EDGE, "var(--ds-space-150, 12px)", SPACE_FROM_EDGE, "var(--ds-background-warning-bold, ".concat(colors.Y300, ")"), "var(--ds-border-radius-circle, 50%)", NOTIFICATION_SIZE, NOTIFICATION_SIZE);
18
+ exports.resizableMediaMigrationNotificationStyle = resizableMediaMigrationNotificationStyle;
@@ -645,7 +645,8 @@ function handleMarkdown(markdownSlice, queueCardsFromChangedTr, from, to) {
645
645
  } else {
646
646
  tr.replaceSelection(markdownSlice);
647
647
  }
648
- tr.setSelection(_state.TextSelection.near(tr.doc.resolve(pastesFrom + markdownSlice.size), -1));
648
+ var textPosition = tr.doc.resolve(Math.min(pastesFrom + markdownSlice.size, tr.doc.content.size));
649
+ tr.setSelection(_state.TextSelection.near(textPosition, -1));
649
650
  queueCardsFromChangedTr === null || queueCardsFromChangedTr === void 0 ? void 0 : queueCardsFromChangedTr(state, tr, _analytics.INPUT_METHOD.CLIPBOARD);
650
651
  if (dispatch) {
651
652
  dispatch(tr.scrollIntoView());
@@ -23,10 +23,7 @@ var pluginConfig = function pluginConfig(textColorConfig) {
23
23
  return textColorConfig;
24
24
  };
25
25
  var textColorPlugin = function textColorPlugin(_ref) {
26
- var _api$featureFlags;
27
- var textColorConfig = _ref.config,
28
- api = _ref.api;
29
- var featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
26
+ var textColorConfig = _ref.config;
30
27
  return {
31
28
  name: 'textColor',
32
29
  marks: function marks() {
@@ -66,8 +63,7 @@ var textColorPlugin = function textColorPlugin(_ref) {
66
63
  popupsBoundariesElement: popupsBoundariesElement,
67
64
  popupsScrollableElement: popupsScrollableElement,
68
65
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
69
- disabled: disabled,
70
- featureFlags: featureFlags
66
+ disabled: disabled
71
67
  });
72
68
  }
73
69
  });
@@ -168,11 +168,9 @@ var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
168
168
  isReducedSpacing = _this$props.isReducedSpacing,
169
169
  pluginState = _this$props.pluginState,
170
170
  formatMessage = _this$props.intl.formatMessage,
171
- disabled = _this$props.disabled,
172
- featureFlags = _this$props.featureFlags;
171
+ disabled = _this$props.disabled;
173
172
  var labelTextColor = formatMessage(messages.textColor);
174
173
  var palette = pluginState.palette;
175
- var useSomewhatSemanticTextColorNames = featureFlags.useSomewhatSemanticTextColorNames;
176
174
  var fitWidth;
177
175
  if (document.body.clientWidth <= 740) {
178
176
  // This was originally hard-coded, but moved here to a const
@@ -239,8 +237,7 @@ var ToolbarTextColor = /*#__PURE__*/function (_React$Component) {
239
237
  paletteOptions: {
240
238
  palette: palette,
241
239
  hexToPaletteColor: _editorPalette.hexToEditorTextPaletteColor,
242
- paletteColorTooltipMessages: _ColorPalette.textPaletteTooltipMessages,
243
- showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames
240
+ paletteColorTooltipMessages: _ColorPalette.textPaletteTooltipMessages
244
241
  }
245
242
  }))), (0, _react2.jsx)("span", {
246
243
  css: _styles2.separatorStyles
@@ -27,16 +27,16 @@ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
27
27
  /** @jsx jsx */
28
28
  // helps adjusts position of popup
29
29
  var colorPickerButtonWrapper = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n"])));
30
- var colorPickerExpandContainer = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0px -4px;\n"])));
30
+ var colorPickerExpandContainer = (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n margin: 0px ", ";\n"])), "var(--ds-space-negative-050, -4px)");
31
31
 
32
32
  // Control the size of color picker buttons and preview
33
33
  // TODO: https://product-fabric.atlassian.net/browse/DSP-4134
34
34
  /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
35
35
  var colorPickerWrapper = function colorPickerWrapper(theme) {
36
- return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", "px;\n background-color: ", ";\n box-shadow: 0 4px 8px -2px ", ", 0 0 1px ", ";\n padding: 8px 0px;\n"])), (0, _constants.borderRadius)(), (0, _components.themed)({
36
+ return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n border-radius: ", "px;\n background-color: ", ";\n box-shadow: 0 4px 8px -2px ", ", 0 0 1px ", ";\n padding: ", " 0px;\n"])), (0, _constants.borderRadius)(), (0, _components.themed)({
37
37
  light: "var(--ds-surface-overlay, ".concat(_colors.N0, ")"),
38
38
  dark: "var(--ds-surface-overlay, ".concat(_colors.DN50, ")")
39
- })(theme), _colors.N60A, _colors.N60A);
39
+ })(theme), _colors.N60A, _colors.N60A, "var(--ds-space-100, 8px)");
40
40
  };
41
41
  /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
42
42
 
@@ -160,7 +160,6 @@ var ColorPickerButton = function ColorPickerButton(props) {
160
160
  paletteOptions: {
161
161
  palette: props.colorPalette,
162
162
  hexToPaletteColor: props.hexToPaletteColor,
163
- showSomewhatSemanticTooltips: props.showSomewhatSemanticTooltips,
164
163
  paletteColorTooltipMessages: props.paletteColorTooltipMessages
165
164
  }
166
165
  }))));
@@ -348,25 +348,15 @@ var ColorPicker = function ColorPicker(props) {
348
348
  onFieldChange(name, currentColor !== colorValue);
349
349
  };
350
350
  var _ref = featureFlags !== null && featureFlags !== void 0 ? featureFlags : {
351
- useSomewhatSemanticTextColorNames: false,
352
351
  expandedChartColors: false
353
352
  },
354
- useSomewhatSemanticTextColorNames = _ref.useSomewhatSemanticTextColorNames,
355
353
  expandedChartColors = _ref.expandedChartColors;
356
354
  return expandedChartColors ? (0, _react.jsx)(_ColorPickerButton.default, {
357
355
  title: title,
358
356
  currentColor: currentColor,
359
357
  onChange: onColorChange,
360
358
  colorPalette: extendedColorPalette,
361
- paletteColorTooltipMessages: _ColorPalette.chartsColorPaletteTooltipMessages
362
- // We did not want to create new FF or update
363
- // useSomewhatSemanticTextColorNames name
364
- // because it is temporary and require extra work.
365
- // So even though it says text color names,
366
- // we are going to use for all color pickers
367
- // such as text, background and table charts.
368
- ,
369
- showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames,
359
+ paletteColorTooltipMessages: _ColorPalette.chartsColorPaletteTooltipMessages,
370
360
  cols: EXPANDED_COLOR_PICKER_COLUMNS,
371
361
  alignX: "right",
372
362
  placement: "ConfigPanel",
@@ -27,7 +27,7 @@ exports.expandControl = expandControl;
27
27
  var chevronContainer = (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n display: flex;\n align-items: center;\n\n & > button {\n width: ", ";\n height: ", ";\n }\n"])), "var(--ds-space-300, 24px)", "var(--ds-space-300, 24px)");
28
28
  var labelContainer = (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n width: 100%;\n align-items: center;\n display: flex;\n font-weight: 500;\n"])));
29
29
  var expandContentContainer = function expandContentContainer(isHidden) {
30
- return (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: ", ";\n margin-top: calc(-1 * ", ");\n"])), isHidden ? 'none' : 'block', "var(--ds-space-100, 8px)");
30
+ return (0, _react2.css)(_templateObject5 || (_templateObject5 = (0, _taggedTemplateLiteral2.default)(["\n display: ", ";\n margin-top: ", ";\n"])), isHidden ? 'none' : 'block', "var(--ds-space-negative-100, -8px)");
31
31
  };
32
32
  function Expand(_ref) {
33
33
  var field = _ref.field,
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  exports.version = exports.nextMajorVersion = exports.name = void 0;
7
7
  var name = "@atlaskit/editor-core";
8
8
  exports.name = name;
9
- var version = "187.41.4";
9
+ var version = "187.41.7";
10
10
  exports.version = version;
11
11
  var nextMajorVersion = function nextMajorVersion() {
12
12
  return [Number(version.split('.')[0]) + 1, 0, 0].join('.');
@@ -21,7 +21,7 @@ function getSpellCheck(featureFlags) {
21
21
  * which is used by both current and archv3 editors.
22
22
  */
23
23
  export function createFeatureFlagsFromProps(props) {
24
- var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27, _props$featureFlags28, _props$featureFlags29;
24
+ var _props$allowLayouts, _props$performanceTra, _props$performanceTra2, _props$allowExtension, _props$featureFlags, _props$featureFlags2, _props$featureFlags3, _props$featureFlags4, _props$featureFlags5, _props$featureFlags6, _props$featureFlags7, _props$featureFlags8, _props$featureFlags9, _props$featureFlags10, _props$featureFlags11, _props$featureFlags12, _props$featureFlags13, _props$featureFlags14, _props$featureFlags15, _props$featureFlags16, _props$featureFlags17, _props$featureFlags18, _props$collabEdit, _props$collabEdit2, _props$featureFlags19, _props$featureFlags20, _props$featureFlags21, _props$featureFlags22, _props$featureFlags23, _props$featureFlags24, _props$featureFlags25, _props$featureFlags26, _props$featureFlags27;
25
25
  const normalizedFeatureFlags = normalizeFeatureFlags(props.featureFlags);
26
26
  return {
27
27
  ...normalizedFeatureFlags,
@@ -53,8 +53,7 @@ export function createFeatureFlagsFromProps(props) {
53
53
  // Including fallback to props.featureFlags so that mobile feature flags
54
54
  // are included (they are not kebab cased)
55
55
  restartNumberedLists: normalizedFeatureFlags.restartNumberedLists === true || ((_props$featureFlags25 = props.featureFlags) === null || _props$featureFlags25 === void 0 ? void 0 : _props$featureFlags25.restartNumberedLists) === true,
56
- useSomewhatSemanticTextColorNames: Boolean(typeof normalizedFeatureFlags.useSomewhatSemanticTextColorNames === 'boolean' && !!normalizedFeatureFlags.useSomewhatSemanticTextColorNames || (typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26.useSomewhatSemanticTextColorNames) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27.useSomewhatSemanticTextColorNames) : false)),
57
56
  lpLinkPickerFocusTrap: Boolean(normalizedFeatureFlags.lpLinkPickerFocusTrap),
58
- preventPopupOverflow: Boolean(typeof ((_props$featureFlags28 = props.featureFlags) === null || _props$featureFlags28 === void 0 ? void 0 : _props$featureFlags28['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags29 = props.featureFlags) !== null && _props$featureFlags29 !== void 0 && _props$featureFlags29['prevent-popup-overflow']) : false)
57
+ preventPopupOverflow: Boolean(typeof ((_props$featureFlags26 = props.featureFlags) === null || _props$featureFlags26 === void 0 ? void 0 : _props$featureFlags26['prevent-popup-overflow']) === 'boolean' ? !!((_props$featureFlags27 = props.featureFlags) !== null && _props$featureFlags27 !== void 0 && _props$featureFlags27['prevent-popup-overflow']) : false)
59
58
  };
60
59
  }
@@ -5,7 +5,7 @@ export const inviteTeamWrapper = css`
5
5
  background: ${`var(--ds-background-neutral, ${N20})`};
6
6
  border-radius: 50%;
7
7
  min-width: ${"var(--ds-space-400, 32px)"};
8
- margin-left: calc(-1 * ${"var(--ds-space-050, 4px)"});
8
+ margin-left: ${"var(--ds-space-negative-050, -4px)"};
9
9
  `;
10
10
  export const avatarContainer = css`
11
11
  margin-right: ${"var(--ds-space-100, 8px)"};
@@ -23,7 +23,7 @@ export const avatarContainer = css`
23
23
  border-radius: 50%;
24
24
  height: 32px;
25
25
  width: 32px;
26
- padding: 2px;
26
+ padding: ${"var(--ds-space-025, 2px)"};
27
27
  }
28
28
  `;
29
29
  export const badge = color => css`
@@ -21,7 +21,12 @@ export function DateNodeView(props) {
21
21
  getPos
22
22
  } = props;
23
23
  const intl = useIntl();
24
- const pos = typeof getPos === 'function' ? getPos() : undefined;
24
+ let pos;
25
+ try {
26
+ pos = typeof getPos === 'function' ? getPos() : undefined;
27
+ } catch (e) {
28
+ pos = undefined;
29
+ }
25
30
 
26
31
  // We fall back to selection.$from even though it does not cover all use cases
27
32
  // eg. upon Editor init, selection is at the start, not at the Date node
@@ -43,11 +43,6 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
43
43
  api
44
44
  }) => {
45
45
  const emojiAndColourPickerMountPoint = scrollable ? popupsMountPoint || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.fabric-editor-popup-scroll-parent')) || (editorView === null || editorView === void 0 ? void 0 : editorView.dom.closest('.ak-editor-content-area')) || undefined : popupsMountPoint;
46
- const {
47
- useSomewhatSemanticTextColorNames
48
- } = featureFlags || {
49
- useSomewhatSemanticTextColorNames: false
50
- };
51
46
  return jsx(ButtonGroup, null, items.filter(item => !item.hidden).map((item, idx) => {
52
47
  var _api$contextPanel, _api$extension;
53
48
  switch (item.type) {
@@ -167,14 +162,6 @@ const ToolbarItems = /*#__PURE__*/React.memo(({
167
162
  ,
168
163
  hexToPaletteColor: hexToEditorBackgroundPaletteColor,
169
164
  paletteColorTooltipMessages: backgroundPaletteTooltipMessages
170
- // We did not want to create new FF or update
171
- // useSomewhatSemanticTextColorNames name
172
- // because it is temporary and require extra work.
173
- // So even though it says text color names,
174
- // we are going to use for all color pickers
175
- // such as text, background and table charts.
176
- ,
177
- showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames
178
165
  });
179
166
  }
180
167
  if (item.selectType === 'emoji') {
@@ -317,7 +317,9 @@ export default class MediaSingleNode extends Component {
317
317
  ref: this.captionPlaceHolderRef,
318
318
  onClick: this.clickPlaceholder
319
319
  }));
320
- return canResize ? getBooleanFF('platform.editor.media.extended-resize-experience') ? jsx(ResizableMediaSingleNext, resizableMediaSingleProps, MediaChildren) : jsx(ResizableMediaSingle, _extends({}, resizableMediaSingleProps, {
320
+ return canResize ? getBooleanFF('platform.editor.media.extended-resize-experience') ? jsx(ResizableMediaSingleNext, _extends({}, resizableMediaSingleProps, {
321
+ showLegacyNotification: widthType !== 'pixel'
322
+ }), MediaChildren) : jsx(ResizableMediaSingle, _extends({}, resizableMediaSingleProps, {
321
323
  lineLength: contentWidthForLegacyExperience
322
324
  }), MediaChildren) : jsx(MediaSingle, mediaSingleProps, MediaChildren);
323
325
  }
@@ -229,7 +229,6 @@ const generateMediaSingleFloatingToolbar = (state, intl, options, pluginState, m
229
229
  var _pluginInjectionApi$a2;
230
230
  setBorderMark(pluginInjectionApi === null || pluginInjectionApi === void 0 ? void 0 : (_pluginInjectionApi$a2 = pluginInjectionApi.analytics) === null || _pluginInjectionApi$a2 === void 0 ? void 0 : _pluginInjectionApi$a2.actions)(attrs)(state, dispatch);
231
231
  },
232
- showSomewhatSemanticTooltips: getEditorFeatureFlags === null || getEditorFeatureFlags === void 0 ? void 0 : getEditorFeatureFlags().useSomewhatSemanticTextColorNames,
233
232
  borderMark: borderMark,
234
233
  intl: intl
235
234
  });
@@ -18,7 +18,6 @@ const ImageBorder = ({
18
18
  formatMessage
19
19
  },
20
20
  toggleBorder,
21
- showSomewhatSemanticTooltips,
22
21
  borderMark,
23
22
  setBorder
24
23
  }) => {
@@ -71,8 +70,7 @@ const ImageBorder = ({
71
70
  paletteOptions: {
72
71
  palette: borderColorPalette,
73
72
  paletteColorTooltipMessages: borderPaletteTooltipMessages,
74
- hexToPaletteColor: hexToEditorBorderPaletteColor,
75
- showSomewhatSemanticTooltips
73
+ hexToPaletteColor: hexToEditorBorderPaletteColor
76
74
  }
77
75
  })))
78
76
  }, {
@@ -0,0 +1,9 @@
1
+ /** @jsx jsx */
2
+ import { jsx } from '@emotion/react';
3
+ import { resizableMediaMigrationNotificationStyle } from './styles';
4
+ export const ResizableMediaMigrationNotification = () => {
5
+ return jsx("div", {
6
+ "data-testid": "resizable-media-migration-notification",
7
+ css: [resizableMediaMigrationNotificationStyle]
8
+ });
9
+ };
@@ -17,6 +17,7 @@ import memoizeOne from 'memoize-one';
17
17
  import { getMediaResizeAnalyticsEvent } from '../../utils/analytics';
18
18
  import throttle from 'lodash/throttle';
19
19
  import { MEDIA_PLUGIN_IS_RESIZING_KEY, MEDIA_PLUGIN_RESIZING_WIDTH_KEY } from '../../pm-plugins/main';
20
+ import { ResizableMediaMigrationNotification } from './ResizableMediaMigrationNotification';
20
21
  export const resizerNextTestId = 'mediaSingle.resizerNext.testid';
21
22
  class ResizableMediaSingleNext extends React.Component {
22
23
  constructor(props) {
@@ -418,7 +419,8 @@ class ResizableMediaSingleNext extends React.Component {
418
419
  fullWidthMode,
419
420
  selected,
420
421
  children,
421
- lineLength
422
+ lineLength,
423
+ showLegacyNotification
422
424
  } = this.props;
423
425
  const {
424
426
  isResizing,
@@ -472,7 +474,7 @@ class ResizableMediaSingleNext extends React.Component {
472
474
  isHandleVisible: selected,
473
475
  handlePositioning: isNestedNode ? 'adjacent' : undefined,
474
476
  handleHighlight: "full-height"
475
- }, children));
477
+ }, children, showLegacyNotification && jsx(ResizableMediaMigrationNotification, null)));
476
478
  }
477
479
  }
478
480
  export default ResizableMediaSingleNext;
@@ -0,0 +1,14 @@
1
+ import { css } from '@emotion/react';
2
+ import * as colors from '@atlaskit/theme/colors';
3
+ const NOTIFICATION_SIZE = 8;
4
+ const SPACE_FROM_EDGE = "var(--ds-space-100, 8px)";
5
+ export const resizableMediaMigrationNotificationStyle = css`
6
+ position: absolute;
7
+ top: ${SPACE_FROM_EDGE};
8
+ right: calc(${"var(--ds-space-150, 12px)"} + ${SPACE_FROM_EDGE});
9
+ background-color: ${`var(--ds-background-warning-bold, ${colors.Y300})`};
10
+ border-radius: ${"var(--ds-border-radius-circle, 50%)"};
11
+ width: ${NOTIFICATION_SIZE}px;
12
+ height: ${NOTIFICATION_SIZE}px;
13
+ pointer-events: none;
14
+ `;
@@ -635,7 +635,8 @@ export function handleMarkdown(markdownSlice, queueCardsFromChangedTr, from, to)
635
635
  } else {
636
636
  tr.replaceSelection(markdownSlice);
637
637
  }
638
- tr.setSelection(TextSelection.near(tr.doc.resolve(pastesFrom + markdownSlice.size), -1));
638
+ const textPosition = tr.doc.resolve(Math.min(pastesFrom + markdownSlice.size, tr.doc.content.size));
639
+ tr.setSelection(TextSelection.near(textPosition, -1));
639
640
  queueCardsFromChangedTr === null || queueCardsFromChangedTr === void 0 ? void 0 : queueCardsFromChangedTr(state, tr, INPUT_METHOD.CLIPBOARD);
640
641
  if (dispatch) {
641
642
  dispatch(tr.scrollIntoView());
@@ -10,11 +10,8 @@ const pluginConfig = textColorConfig => {
10
10
  return textColorConfig;
11
11
  };
12
12
  const textColorPlugin = ({
13
- config: textColorConfig,
14
- api
13
+ config: textColorConfig
15
14
  }) => {
16
- var _api$featureFlags;
17
- const featureFlags = (api === null || api === void 0 ? void 0 : (_api$featureFlags = api.featureFlags) === null || _api$featureFlags === void 0 ? void 0 : _api$featureFlags.sharedState.currentState()) || {};
18
15
  return {
19
16
  name: 'textColor',
20
17
  marks() {
@@ -54,8 +51,7 @@ const textColorPlugin = ({
54
51
  popupsBoundariesElement: popupsBoundariesElement,
55
52
  popupsScrollableElement: popupsScrollableElement,
56
53
  dispatchAnalyticsEvent: dispatchAnalyticsEvent,
57
- disabled: disabled,
58
- featureFlags: featureFlags
54
+ disabled: disabled
59
55
  })
60
56
  });
61
57
  }
@@ -143,14 +143,10 @@ export class ToolbarTextColor extends React.Component {
143
143
  intl: {
144
144
  formatMessage
145
145
  },
146
- disabled,
147
- featureFlags
146
+ disabled
148
147
  } = this.props;
149
148
  const labelTextColor = formatMessage(messages.textColor);
150
149
  const palette = pluginState.palette;
151
- const {
152
- useSomewhatSemanticTextColorNames
153
- } = featureFlags;
154
150
  let fitWidth;
155
151
  if (document.body.clientWidth <= 740) {
156
152
  // This was originally hard-coded, but moved here to a const
@@ -216,8 +212,7 @@ export class ToolbarTextColor extends React.Component {
216
212
  paletteOptions: {
217
213
  palette,
218
214
  hexToPaletteColor: hexToEditorTextPaletteColor,
219
- paletteColorTooltipMessages: textPaletteTooltipMessages,
220
- showSomewhatSemanticTooltips: useSomewhatSemanticTextColorNames
215
+ paletteColorTooltipMessages: textPaletteTooltipMessages
221
216
  }
222
217
  }))), jsx("span", {
223
218
  css: separatorStyles