@atlaskit/editor-common 84.3.1 → 84.4.2

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 (37) hide show
  1. package/CHANGELOG.md +34 -0
  2. package/dist/cjs/analytics/types/enums.js +2 -0
  3. package/dist/cjs/keymaps/index.js +15 -4
  4. package/dist/cjs/media-single/utils.js +2 -2
  5. package/dist/cjs/messages/block-controls.js +24 -0
  6. package/dist/cjs/messages/index.js +7 -0
  7. package/dist/cjs/monitoring/error.js +1 -1
  8. package/dist/cjs/ui/DropList/index.js +1 -1
  9. package/dist/es2019/analytics/types/enums.js +2 -0
  10. package/dist/es2019/keymaps/index.js +10 -0
  11. package/dist/es2019/media-single/utils.js +3 -3
  12. package/dist/es2019/messages/block-controls.js +18 -0
  13. package/dist/es2019/messages/index.js +1 -0
  14. package/dist/es2019/monitoring/error.js +1 -1
  15. package/dist/es2019/ui/DropList/index.js +1 -1
  16. package/dist/esm/analytics/types/enums.js +2 -0
  17. package/dist/esm/keymaps/index.js +11 -0
  18. package/dist/esm/media-single/utils.js +3 -3
  19. package/dist/esm/messages/block-controls.js +18 -0
  20. package/dist/esm/messages/index.js +1 -0
  21. package/dist/esm/monitoring/error.js +1 -1
  22. package/dist/esm/ui/DropList/index.js +1 -1
  23. package/dist/types/analytics/types/enums.d.ts +2 -0
  24. package/dist/types/analytics/types/general-events.d.ts +4 -1
  25. package/dist/types/keymaps/index.d.ts +8 -0
  26. package/dist/types/media-single/utils.d.ts +2 -1
  27. package/dist/types/messages/block-controls.d.ts +17 -0
  28. package/dist/types/messages/index.d.ts +1 -0
  29. package/dist/types/ui/MediaSingle/index.d.ts +2 -0
  30. package/dist/types-ts4.5/analytics/types/enums.d.ts +2 -0
  31. package/dist/types-ts4.5/analytics/types/general-events.d.ts +4 -1
  32. package/dist/types-ts4.5/keymaps/index.d.ts +8 -0
  33. package/dist/types-ts4.5/media-single/utils.d.ts +2 -1
  34. package/dist/types-ts4.5/messages/block-controls.d.ts +17 -0
  35. package/dist/types-ts4.5/messages/index.d.ts +1 -0
  36. package/dist/types-ts4.5/ui/MediaSingle/index.d.ts +2 -0
  37. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,39 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 84.4.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [#118866](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/118866)
8
+ [`77bd34b00632f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/77bd34b00632f) -
9
+ [ux] [ED-23873] Add tooltip to drag handle
10
+
11
+ ## 84.4.1
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
17
+ ## 84.4.0
18
+
19
+ ### Minor Changes
20
+
21
+ - [#118748](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/118748)
22
+ [`10bb9e2def098`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10bb9e2def098) -
23
+ [ux] Reduce media single max width padding for all editors except full page
24
+
25
+ ### Patch Changes
26
+
27
+ - Updated dependencies
28
+
29
+ ## 84.3.2
30
+
31
+ ### Patch Changes
32
+
33
+ - [#117769](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117769)
34
+ [`a59c5cd45160c`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a59c5cd45160c) -
35
+ [No Issue] Track how many steps a editorSession is creating
36
+
3
37
  ## 84.3.1
4
38
 
5
39
  ### Patch Changes
@@ -131,6 +131,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
131
131
  ACTION["SELECT_ALL_ESCAPED"] = "selectAllEscaped";
132
132
  ACTION["SORT_COLUMN"] = "sortedColumn";
133
133
  ACTION["SORT_COLUMN_NOT_ALLOWED"] = "sortColumnNotAllowed";
134
+ ACTION["STEPS_TRACKED"] = "stepsTracked";
134
135
  ACTION["CREATE_NOT_ALLOWED"] = "createNotAllowed";
135
136
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
136
137
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED"] = "unsupportedContentLevelsTrackingErrored";
@@ -186,6 +187,7 @@ var TRIGGER_METHOD = exports.TRIGGER_METHOD = /*#__PURE__*/function (TRIGGER_MET
186
187
  return TRIGGER_METHOD;
187
188
  }({});
188
189
  var ACTION_SUBJECT = exports.ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
190
+ ACTION_SUBJECT["COLLAB"] = "collab";
189
191
  ACTION_SUBJECT["TOOLBAR_BUTTON"] = "toolbarButton";
190
192
  ACTION_SUBJECT["BUTTON"] = "button";
191
193
  ACTION_SUBJECT["CONFIG_PANEL"] = "configPanel";
@@ -71,7 +71,7 @@ Object.defineProperty(exports, "RIGHT", {
71
71
  return _consts.RIGHT;
72
72
  }
73
73
  });
74
- exports.ToolTipContent = void 0;
74
+ exports.TooltipContentWithMultipleShortcuts = exports.ToolTipContent = void 0;
75
75
  Object.defineProperty(exports, "UP", {
76
76
  enumerable: true,
77
77
  get: function get() {
@@ -82,7 +82,7 @@ exports.backspace = exports.altPaste = exports.alignRight = exports.alignLeft =
82
82
  exports.bindKeymapArrayWithCommand = bindKeymapArrayWithCommand;
83
83
  exports.bindKeymapWithCommand = bindKeymapWithCommand;
84
84
  exports.bindKeymapWithEditorCommand = bindKeymapWithEditorCommand;
85
- exports.find = exports.escape = exports.enter = exports.deleteRow = exports.deleteKey = exports.deleteColumn = exports.decreaseMediaSize = exports.cut = exports.ctrlBackSpace = exports.copy = exports.clearFormatting = void 0;
85
+ exports.find = exports.escape = exports.enter = exports.dragToMoveUp = exports.dragToMoveDown = exports.deleteRow = exports.deleteKey = exports.deleteColumn = exports.decreaseMediaSize = exports.cut = exports.ctrlBackSpace = exports.copy = exports.clearFormatting = void 0;
86
86
  exports.findKeyMapForBrowser = findKeyMapForBrowser;
87
87
  exports.findKeymapByDescription = findKeymapByDescription;
88
88
  exports.findShortcutByDescription = findShortcutByDescription;
@@ -100,8 +100,8 @@ Object.defineProperty(exports, "keymap", {
100
100
  exports.makeKeyMapArrayWithCommon = makeKeyMapArrayWithCommon;
101
101
  exports.makeKeyMapWithCommon = makeKeyMapWithCommon;
102
102
  exports.makeKeymap = makeKeymap;
103
- exports.toggleHeading2 = exports.toggleHeading1 = exports.toggleCode = exports.toggleBulletList = exports.toggleBold = exports.toggleBlockQuote = exports.tab = exports.submit = exports.startColumnResizing = exports.splitListItem = exports.splitCodeBlock = exports.space = exports.shiftTab = exports.shiftEnter = exports.shiftBackspace = exports.shiftArrowUp = exports.setNormalText = exports.selectTable = exports.selectRow = exports.selectColumn = exports.redo = exports.previousCell = exports.pastePlainText = exports.paste = exports.outdentList = exports.outdent = exports.openHelp = exports.nextCell = exports.navToFloatingToolbar = exports.navToEditorToolbar = exports.moveUp = exports.moveRowUp = exports.moveRowDown = exports.moveRight = exports.moveLeft = exports.moveDown = exports.moveColumnRight = exports.moveColumnLeft = void 0;
104
- exports.toggleUnderline = exports.toggleTaskItemCheckbox = exports.toggleTable = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleOrderedList = exports.toggleItalic = exports.toggleHighlightPalette = exports.toggleHeading6 = exports.toggleHeading5 = exports.toggleHeading4 = exports.toggleHeading3 = void 0;
103
+ exports.toggleBulletList = exports.toggleBold = exports.toggleBlockQuote = exports.tab = exports.submit = exports.startColumnResizing = exports.splitListItem = exports.splitCodeBlock = exports.space = exports.shiftTab = exports.shiftEnter = exports.shiftBackspace = exports.shiftArrowUp = exports.setNormalText = exports.selectTable = exports.selectRow = exports.selectColumn = exports.redo = exports.previousCell = exports.pastePlainText = exports.paste = exports.outdentList = exports.outdent = exports.openHelp = exports.nextCell = exports.navToFloatingToolbar = exports.navToEditorToolbar = exports.moveUp = exports.moveRowUp = exports.moveRowDown = exports.moveRight = exports.moveLeft = exports.moveDown = exports.moveColumnRight = exports.moveColumnLeft = void 0;
104
+ exports.toggleUnderline = exports.toggleTaskItemCheckbox = exports.toggleTable = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleOrderedList = exports.toggleItalic = exports.toggleHighlightPalette = exports.toggleHeading6 = exports.toggleHeading5 = exports.toggleHeading4 = exports.toggleHeading3 = exports.toggleHeading2 = exports.toggleHeading1 = exports.toggleCode = void 0;
105
105
  exports.tooltip = tooltip;
106
106
  exports.undo = void 0;
107
107
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
@@ -208,6 +208,8 @@ var decreaseMediaSize = exports.decreaseMediaSize = makeKeyMapWithCommon('increa
208
208
  var activateVideoControls = exports.activateVideoControls = makeKeyMapWithCommon('Activate controls panel on video', 'Shift-F10');
209
209
  var toggleHighlightPalette = exports.toggleHighlightPalette = makeKeyMapWithCommon('Toggle Highlight Palette', 'Mod-Alt-b');
210
210
  var focusToContextMenuTrigger = exports.focusToContextMenuTrigger = makeKeyMapWithCommon('Focus table context menu trigger', 'Shift-F10');
211
+ var dragToMoveUp = exports.dragToMoveUp = makeKeyMapWithCommon('Move node up in the document', 'Ctrl-Alt-Shift-ArrowUp');
212
+ var dragToMoveDown = exports.dragToMoveDown = makeKeyMapWithCommon('Move node down in the document', 'Ctrl-Alt-Shift-ArrowDown');
211
213
  var arrowKeysMap = {
212
214
  // for reference: https://wincent.com/wiki/Unicode_representations_of_modifier_keys
213
215
  ARROWLEFT: "\u2190",
@@ -255,6 +257,15 @@ var ToolTipContent = exports.ToolTipContent = /*#__PURE__*/_react.default.memo(f
255
257
  css: tooltipShortcutStyle
256
258
  }, shortcut)) : null;
257
259
  });
260
+ var TooltipContentWithMultipleShortcuts = exports.TooltipContentWithMultipleShortcuts = /*#__PURE__*/_react.default.memo(function (_ref2) {
261
+ var helpDescriptors = _ref2.helpDescriptors;
262
+ var keymapCount = helpDescriptors.length;
263
+ return (0, _react2.jsx)(_react.Fragment, null, helpDescriptors.map(function (descriptor, index) {
264
+ return (0, _react2.jsx)(_react.Fragment, {
265
+ key: index
266
+ }, (0, _react2.jsx)(ToolTipContent, descriptor), " ", index < keymapCount - 1 && (0, _react2.jsx)("br", null));
267
+ }));
268
+ });
258
269
  function findKeymapByDescription(description) {
259
270
  var matches = ALL.filter(function (keymap) {
260
271
  return keymap.description.toUpperCase() === description.toUpperCase();
@@ -101,8 +101,8 @@ var calcLegacyWideWidth = function calcLegacyWideWidth(containerWidth, origWidth
101
101
  * Calculate maximum width allowed for media single node in fix-width editor in new experience
102
102
  * @param containerWidth width of editor container
103
103
  */
104
- var calcMediaSingleMaxWidth = exports.calcMediaSingleMaxWidth = function calcMediaSingleMaxWidth(containerWidth) {
105
- var fullWidthPadding = (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2;
104
+ var calcMediaSingleMaxWidth = exports.calcMediaSingleMaxWidth = function calcMediaSingleMaxWidth(containerWidth, editorAppearance) {
105
+ var fullWidthPadding = editorAppearance === 'full-page' ? (0, _editorSharedStyles.akEditorGutterPaddingDynamic)() * 2 : _editorSharedStyles.akEditorGutterPadding * 2;
106
106
  return Math.min(containerWidth - fullWidthPadding, _editorSharedStyles.akEditorFullWidthLayoutWidth);
107
107
  };
108
108
 
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.messages = void 0;
7
+ var _reactIntlNext = require("react-intl-next");
8
+ var messages = exports.messages = (0, _reactIntlNext.defineMessages)({
9
+ dragToMove: {
10
+ id: 'fabric.editor.blockControlDragHandleUsageInfo',
11
+ defaultMessage: 'Drag to move',
12
+ description: 'Use drag handle to move content'
13
+ },
14
+ moveUp: {
15
+ id: 'fabric.editor.blockControlMoveUp',
16
+ defaultMessage: 'Move up',
17
+ description: 'Moves selected content up'
18
+ },
19
+ moveDown: {
20
+ id: 'fabric.editor.blockControlMoveDown',
21
+ defaultMessage: 'Move down',
22
+ description: 'Moves selected content down'
23
+ }
24
+ });
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "avatarGroupMessages", {
21
21
  return _avatarGroup.avatarGroupMessages;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "blockControlsMessages", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _blockControls.messages;
28
+ }
29
+ });
24
30
  Object.defineProperty(exports, "blockTypeMessages", {
25
31
  enumerable: true,
26
32
  get: function get() {
@@ -215,6 +221,7 @@ var _panel = require("./panel");
215
221
  var _mentions = require("./mentions");
216
222
  var _helpDialog = require("./help-dialog");
217
223
  var _highlight = require("./highlight");
224
+ var _blockControls = require("./block-controls");
218
225
  var _default = exports.default = (0, _reactIntlNext.defineMessages)({
219
226
  layoutFixedWidth: {
220
227
  id: 'fabric.editor.layoutFixedWidth',
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && Object.prototype.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "84.3.1";
20
+ var packageVersion = "84.4.2";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -20,7 +20,7 @@ var _Layer = _interopRequireDefault(require("../Layer"));
20
20
  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); }; }
21
21
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "84.3.1";
23
+ var packageVersion = "84.4.2";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  var DropList = /*#__PURE__*/function (_Component) {
@@ -125,6 +125,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
125
125
  ACTION["SELECT_ALL_ESCAPED"] = "selectAllEscaped";
126
126
  ACTION["SORT_COLUMN"] = "sortedColumn";
127
127
  ACTION["SORT_COLUMN_NOT_ALLOWED"] = "sortColumnNotAllowed";
128
+ ACTION["STEPS_TRACKED"] = "stepsTracked";
128
129
  ACTION["CREATE_NOT_ALLOWED"] = "createNotAllowed";
129
130
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
130
131
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED"] = "unsupportedContentLevelsTrackingErrored";
@@ -180,6 +181,7 @@ export let TRIGGER_METHOD = /*#__PURE__*/function (TRIGGER_METHOD) {
180
181
  return TRIGGER_METHOD;
181
182
  }({});
182
183
  export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
184
+ ACTION_SUBJECT["COLLAB"] = "collab";
183
185
  ACTION_SUBJECT["TOOLBAR_BUTTON"] = "toolbarButton";
184
186
  ACTION_SUBJECT["BUTTON"] = "button";
185
187
  ACTION_SUBJECT["CONFIG_PANEL"] = "configPanel";
@@ -96,6 +96,8 @@ export const decreaseMediaSize = makeKeyMapWithCommon('increase image size', 'Mo
96
96
  export const activateVideoControls = makeKeyMapWithCommon('Activate controls panel on video', 'Shift-F10');
97
97
  export const toggleHighlightPalette = makeKeyMapWithCommon('Toggle Highlight Palette', 'Mod-Alt-b');
98
98
  export const focusToContextMenuTrigger = makeKeyMapWithCommon('Focus table context menu trigger', 'Shift-F10');
99
+ export const dragToMoveUp = makeKeyMapWithCommon('Move node up in the document', 'Ctrl-Alt-Shift-ArrowUp');
100
+ export const dragToMoveDown = makeKeyMapWithCommon('Move node down in the document', 'Ctrl-Alt-Shift-ArrowDown');
99
101
  const arrowKeysMap = {
100
102
  // for reference: https://wincent.com/wiki/Unicode_representations_of_modifier_keys
101
103
  ARROWLEFT: '\u2190',
@@ -144,6 +146,14 @@ export const ToolTipContent = /*#__PURE__*/React.memo(({
144
146
  css: tooltipShortcutStyle
145
147
  }, shortcut)) : null;
146
148
  });
149
+ export const TooltipContentWithMultipleShortcuts = /*#__PURE__*/React.memo(({
150
+ helpDescriptors
151
+ }) => {
152
+ const keymapCount = helpDescriptors.length;
153
+ return jsx(Fragment, null, helpDescriptors.map((descriptor, index) => jsx(Fragment, {
154
+ key: index
155
+ }, jsx(ToolTipContent, descriptor), " ", index < keymapCount - 1 && jsx("br", null))));
156
+ });
147
157
  export function findKeymapByDescription(description) {
148
158
  const matches = ALL.filter(keymap => keymap.description.toUpperCase() === description.toUpperCase());
149
159
  return matches[0];
@@ -1,5 +1,5 @@
1
1
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
2
- import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
2
+ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
3
3
  import { floatingLayouts, isRichMediaInsideOfBlockNode } from '../utils/rich-media-utils';
4
4
  import { DEFAULT_IMAGE_WIDTH, DEFAULT_ROUNDING_INTERVAL, MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, wrappedLayouts } from './constants';
5
5
 
@@ -89,8 +89,8 @@ const calcLegacyWideWidth = (containerWidth, origWidth, contentWidth) => {
89
89
  * Calculate maximum width allowed for media single node in fix-width editor in new experience
90
90
  * @param containerWidth width of editor container
91
91
  */
92
- export const calcMediaSingleMaxWidth = containerWidth => {
93
- const fullWidthPadding = akEditorGutterPaddingDynamic() * 2;
92
+ export const calcMediaSingleMaxWidth = (containerWidth, editorAppearance) => {
93
+ const fullWidthPadding = editorAppearance === 'full-page' ? akEditorGutterPaddingDynamic() * 2 : akEditorGutterPadding * 2;
94
94
  return Math.min(containerWidth - fullWidthPadding, akEditorFullWidthLayoutWidth);
95
95
  };
96
96
 
@@ -0,0 +1,18 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export const messages = defineMessages({
3
+ dragToMove: {
4
+ id: 'fabric.editor.blockControlDragHandleUsageInfo',
5
+ defaultMessage: 'Drag to move',
6
+ description: 'Use drag handle to move content'
7
+ },
8
+ moveUp: {
9
+ id: 'fabric.editor.blockControlMoveUp',
10
+ defaultMessage: 'Move up',
11
+ description: 'Moves selected content up'
12
+ },
13
+ moveDown: {
14
+ id: 'fabric.editor.blockControlMoveDown',
15
+ defaultMessage: 'Move down',
16
+ description: 'Moves selected content down'
17
+ }
18
+ });
@@ -29,6 +29,7 @@ export { panelMessages } from './panel';
29
29
  export { mentionMessages } from './mentions';
30
30
  export { helpDialogMessages } from './help-dialog';
31
31
  export { highlightMessages } from './highlight';
32
+ export { messages as blockControlsMessages } from './block-controls';
32
33
  export default defineMessages({
33
34
  layoutFixedWidth: {
34
35
  id: 'fabric.editor.layoutFixedWidth',
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "84.3.1";
4
+ const packageVersion = "84.4.2";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -9,7 +9,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
9
9
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
10
10
  import Layer from '../Layer';
11
11
  const packageName = "@atlaskit/editor-common";
12
- const packageVersion = "84.3.1";
12
+ const packageVersion = "84.4.2";
13
13
  const halfFocusRing = 1;
14
14
  const dropOffset = '0, 8';
15
15
  class DropList extends Component {
@@ -125,6 +125,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
125
125
  ACTION["SELECT_ALL_ESCAPED"] = "selectAllEscaped";
126
126
  ACTION["SORT_COLUMN"] = "sortedColumn";
127
127
  ACTION["SORT_COLUMN_NOT_ALLOWED"] = "sortColumnNotAllowed";
128
+ ACTION["STEPS_TRACKED"] = "stepsTracked";
128
129
  ACTION["CREATE_NOT_ALLOWED"] = "createNotAllowed";
129
130
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED"] = "unsupportedContentLevelsTrackingSucceeded";
130
131
  ACTION["UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED"] = "unsupportedContentLevelsTrackingErrored";
@@ -180,6 +181,7 @@ export var TRIGGER_METHOD = /*#__PURE__*/function (TRIGGER_METHOD) {
180
181
  return TRIGGER_METHOD;
181
182
  }({});
182
183
  export var ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
184
+ ACTION_SUBJECT["COLLAB"] = "collab";
183
185
  ACTION_SUBJECT["TOOLBAR_BUTTON"] = "toolbarButton";
184
186
  ACTION_SUBJECT["BUTTON"] = "button";
185
187
  ACTION_SUBJECT["CONFIG_PANEL"] = "configPanel";
@@ -97,6 +97,8 @@ export var decreaseMediaSize = makeKeyMapWithCommon('increase image size', 'Mod-
97
97
  export var activateVideoControls = makeKeyMapWithCommon('Activate controls panel on video', 'Shift-F10');
98
98
  export var toggleHighlightPalette = makeKeyMapWithCommon('Toggle Highlight Palette', 'Mod-Alt-b');
99
99
  export var focusToContextMenuTrigger = makeKeyMapWithCommon('Focus table context menu trigger', 'Shift-F10');
100
+ export var dragToMoveUp = makeKeyMapWithCommon('Move node up in the document', 'Ctrl-Alt-Shift-ArrowUp');
101
+ export var dragToMoveDown = makeKeyMapWithCommon('Move node down in the document', 'Ctrl-Alt-Shift-ArrowDown');
100
102
  var arrowKeysMap = {
101
103
  // for reference: https://wincent.com/wiki/Unicode_representations_of_modifier_keys
102
104
  ARROWLEFT: "\u2190",
@@ -144,6 +146,15 @@ export var ToolTipContent = /*#__PURE__*/React.memo(function (_ref) {
144
146
  css: tooltipShortcutStyle
145
147
  }, shortcut)) : null;
146
148
  });
149
+ export var TooltipContentWithMultipleShortcuts = /*#__PURE__*/React.memo(function (_ref2) {
150
+ var helpDescriptors = _ref2.helpDescriptors;
151
+ var keymapCount = helpDescriptors.length;
152
+ return jsx(Fragment, null, helpDescriptors.map(function (descriptor, index) {
153
+ return jsx(Fragment, {
154
+ key: index
155
+ }, jsx(ToolTipContent, descriptor), " ", index < keymapCount - 1 && jsx("br", null));
156
+ }));
157
+ });
147
158
  export function findKeymapByDescription(description) {
148
159
  var matches = ALL.filter(function (keymap) {
149
160
  return keymap.description.toUpperCase() === description.toUpperCase();
@@ -1,5 +1,5 @@
1
1
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
2
- import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
2
+ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorGutterPadding, akEditorGutterPaddingDynamic, breakoutWideScaleRatio } from '@atlaskit/editor-shared-styles';
3
3
  import { floatingLayouts, isRichMediaInsideOfBlockNode } from '../utils/rich-media-utils';
4
4
  import { DEFAULT_IMAGE_WIDTH, DEFAULT_ROUNDING_INTERVAL, MEDIA_SINGLE_DEFAULT_MIN_PIXEL_WIDTH, MEDIA_SINGLE_VIDEO_MIN_PIXEL_WIDTH, wrappedLayouts } from './constants';
5
5
 
@@ -92,8 +92,8 @@ var calcLegacyWideWidth = function calcLegacyWideWidth(containerWidth, origWidth
92
92
  * Calculate maximum width allowed for media single node in fix-width editor in new experience
93
93
  * @param containerWidth width of editor container
94
94
  */
95
- export var calcMediaSingleMaxWidth = function calcMediaSingleMaxWidth(containerWidth) {
96
- var fullWidthPadding = akEditorGutterPaddingDynamic() * 2;
95
+ export var calcMediaSingleMaxWidth = function calcMediaSingleMaxWidth(containerWidth, editorAppearance) {
96
+ var fullWidthPadding = editorAppearance === 'full-page' ? akEditorGutterPaddingDynamic() * 2 : akEditorGutterPadding * 2;
97
97
  return Math.min(containerWidth - fullWidthPadding, akEditorFullWidthLayoutWidth);
98
98
  };
99
99
 
@@ -0,0 +1,18 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var messages = defineMessages({
3
+ dragToMove: {
4
+ id: 'fabric.editor.blockControlDragHandleUsageInfo',
5
+ defaultMessage: 'Drag to move',
6
+ description: 'Use drag handle to move content'
7
+ },
8
+ moveUp: {
9
+ id: 'fabric.editor.blockControlMoveUp',
10
+ defaultMessage: 'Move up',
11
+ description: 'Moves selected content up'
12
+ },
13
+ moveDown: {
14
+ id: 'fabric.editor.blockControlMoveDown',
15
+ defaultMessage: 'Move down',
16
+ description: 'Moves selected content down'
17
+ }
18
+ });
@@ -29,6 +29,7 @@ export { panelMessages } from './panel';
29
29
  export { mentionMessages } from './mentions';
30
30
  export { helpDialogMessages } from './help-dialog';
31
31
  export { highlightMessages } from './highlight';
32
+ export { messages as blockControlsMessages } from './block-controls';
32
33
  export default defineMessages({
33
34
  layoutFixedWidth: {
34
35
  id: 'fabric.editor.layoutFixedWidth',
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "84.3.1";
10
+ var packageVersion = "84.4.2";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -17,7 +17,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
17
17
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
18
18
  import Layer from '../Layer';
19
19
  var packageName = "@atlaskit/editor-common";
20
- var packageVersion = "84.3.1";
20
+ var packageVersion = "84.4.2";
21
21
  var halfFocusRing = 1;
22
22
  var dropOffset = '0, 8';
23
23
  var DropList = /*#__PURE__*/function (_Component) {
@@ -132,6 +132,7 @@ export declare enum ACTION {
132
132
  SELECT_ALL_ESCAPED = "selectAllEscaped",
133
133
  SORT_COLUMN = "sortedColumn",
134
134
  SORT_COLUMN_NOT_ALLOWED = "sortColumnNotAllowed",
135
+ STEPS_TRACKED = "stepsTracked",
135
136
  CREATE_NOT_ALLOWED = "createNotAllowed",
136
137
  UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED = "unsupportedContentLevelsTrackingSucceeded",
137
138
  UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED = "unsupportedContentLevelsTrackingErrored",
@@ -184,6 +185,7 @@ export declare enum TRIGGER_METHOD {
184
185
  TOOLBAR = "toolbar"
185
186
  }
186
187
  export declare enum ACTION_SUBJECT {
188
+ COLLAB = "collab",
187
189
  TOOLBAR_BUTTON = "toolbarButton",
188
190
  BUTTON = "button",
189
191
  CONFIG_PANEL = "configPanel",
@@ -172,6 +172,9 @@ type DedupeMarksTransformedAEP = OperationalAEP<ACTION.DEDUPE_MARKS_TRANSFORMED_
172
172
  type IndentationMarksTransformedAEP = OperationalAEP<ACTION.INDENTATION_MARKS_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined>;
173
173
  type NodesMissingContentTransformedAEP = OperationalAEP<ACTION.NODES_MISSING_CONTENT_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined>;
174
174
  type InvalidMediaContentTransformedAEP = OperationalAEP<ACTION.INVALID_MEDIA_CONTENT_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined>;
175
+ type CollabStepsTrackerPayloadAEP = OperationalAEP<ACTION.STEPS_TRACKED, ACTION_SUBJECT.COLLAB, undefined, {
176
+ steps: unknown[];
177
+ }>;
175
178
  type HeadingAnchorLinkButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.HEADING_ANCHOR_LINK, undefined>;
176
- export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP;
179
+ export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP;
177
180
  export {};
@@ -91,12 +91,20 @@ export declare const decreaseMediaSize: Keymap;
91
91
  export declare const activateVideoControls: Keymap;
92
92
  export declare const toggleHighlightPalette: Keymap;
93
93
  export declare const focusToContextMenuTrigger: Keymap;
94
+ export declare const dragToMoveUp: Keymap;
95
+ export declare const dragToMoveDown: Keymap;
94
96
  export declare function tooltip(keymap?: Keymap, description?: string): string | undefined;
95
97
  export declare const ToolTipContent: React.MemoExoticComponent<({ description, shortcutOverride, keymap, }: {
96
98
  description?: string | React.ReactNode;
97
99
  keymap?: Keymap | undefined;
98
100
  shortcutOverride?: string | undefined;
99
101
  }) => jsx.JSX.Element | null>;
102
+ export declare const TooltipContentWithMultipleShortcuts: React.MemoExoticComponent<({ helpDescriptors, }: {
103
+ helpDescriptors: {
104
+ description?: string | React.ReactNode;
105
+ keymap?: Keymap;
106
+ }[];
107
+ }) => jsx.JSX.Element>;
100
108
  export declare function findKeymapByDescription(description: string): Keymap | undefined;
101
109
  export declare function findShortcutByDescription(description: string): string | undefined;
102
110
  export declare function findShortcutByKeymap(keymap: Keymap): string | undefined;
@@ -2,6 +2,7 @@ import type { RichMediaLayout } from '@atlaskit/adf-schema';
2
2
  import type { Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
+ import type { EditorAppearance } from '../types';
5
6
  /**
6
7
  * Convert media node width to pixel
7
8
  *
@@ -40,7 +41,7 @@ export declare const calcMediaSinglePixelWidth: ({ width, widthType, origWidth,
40
41
  * Calculate maximum width allowed for media single node in fix-width editor in new experience
41
42
  * @param containerWidth width of editor container
42
43
  */
43
- export declare const calcMediaSingleMaxWidth: (containerWidth: number) => number;
44
+ export declare const calcMediaSingleMaxWidth: (containerWidth: number, editorAppearance?: EditorAppearance) => number;
44
45
  /**
45
46
  * Calculate initial media single pixel width.
46
47
  * Make it fall between max width and min width
@@ -0,0 +1,17 @@
1
+ export declare const messages: {
2
+ dragToMove: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ moveUp: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ moveDown: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ };
@@ -28,6 +28,7 @@ export { panelMessages } from './panel';
28
28
  export { mentionMessages } from './mentions';
29
29
  export { helpDialogMessages } from './help-dialog';
30
30
  export { highlightMessages } from './highlight';
31
+ export { messages as blockControlsMessages } from './block-controls';
31
32
  declare const _default: {
32
33
  layoutFixedWidth: {
33
34
  id: string;
@@ -2,6 +2,7 @@
2
2
  import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
5
+ import type { EditorAppearance } from '../../types';
5
6
  import type { MediaSingleSize, MediaSingleWidthType } from './types';
6
7
  export interface Props {
7
8
  children: React.ReactNode;
@@ -25,6 +26,7 @@ export interface Props {
25
26
  handleMediaSingleRef?: React.RefObject<HTMLDivElement>;
26
27
  isInsideOfInlineExtension?: boolean;
27
28
  dataAttributes?: Record<string, any>;
29
+ editorAppearance?: EditorAppearance;
28
30
  }
29
31
  export type { MediaSingleWidthType, MediaSingleSize };
30
32
  export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, isInsideOfInlineExtension, dataAttributes, }: Props): jsx.JSX.Element;
@@ -132,6 +132,7 @@ export declare enum ACTION {
132
132
  SELECT_ALL_ESCAPED = "selectAllEscaped",
133
133
  SORT_COLUMN = "sortedColumn",
134
134
  SORT_COLUMN_NOT_ALLOWED = "sortColumnNotAllowed",
135
+ STEPS_TRACKED = "stepsTracked",
135
136
  CREATE_NOT_ALLOWED = "createNotAllowed",
136
137
  UNSUPPORTED_CONTENT_LEVELS_TRACKING_SUCCEEDED = "unsupportedContentLevelsTrackingSucceeded",
137
138
  UNSUPPORTED_CONTENT_LEVELS_TRACKING_ERRORED = "unsupportedContentLevelsTrackingErrored",
@@ -184,6 +185,7 @@ export declare enum TRIGGER_METHOD {
184
185
  TOOLBAR = "toolbar"
185
186
  }
186
187
  export declare enum ACTION_SUBJECT {
188
+ COLLAB = "collab",
187
189
  TOOLBAR_BUTTON = "toolbarButton",
188
190
  BUTTON = "button",
189
191
  CONFIG_PANEL = "configPanel",
@@ -172,6 +172,9 @@ type DedupeMarksTransformedAEP = OperationalAEP<ACTION.DEDUPE_MARKS_TRANSFORMED_
172
172
  type IndentationMarksTransformedAEP = OperationalAEP<ACTION.INDENTATION_MARKS_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined>;
173
173
  type NodesMissingContentTransformedAEP = OperationalAEP<ACTION.NODES_MISSING_CONTENT_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined>;
174
174
  type InvalidMediaContentTransformedAEP = OperationalAEP<ACTION.INVALID_MEDIA_CONTENT_TRANSFORMED, ACTION_SUBJECT.EDITOR, undefined, undefined>;
175
+ type CollabStepsTrackerPayloadAEP = OperationalAEP<ACTION.STEPS_TRACKED, ACTION_SUBJECT.COLLAB, undefined, {
176
+ steps: unknown[];
177
+ }>;
175
178
  type HeadingAnchorLinkButtonAEP = ButtonAEP<ACTION_SUBJECT_ID.HEADING_ANCHOR_LINK, undefined>;
176
- export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP;
179
+ export type GeneralEventPayload<T = void> = AnnotateButtonAEP | AnnotationAEP | BrowserFreezePayload | ButtonFeedbackAEP | ButtonHelpAEP | ColorPickerAEP | DispatchedTransactionAEP | EditorPerfAEP | EditorRenderedAEP<T> | EditorStartAEP | EditorStopAEP | EditorTTIAEP | ExpandToggleAEP | FeedbackAEP | FullWidthModeAEP | HelpQuickInsertAEP | InputPerfSamlingAEP | InputPerfSamplingAvgAEP | PickerEmojiAEP | PickerImageAEP | ReactNodeViewRenderedAEP | RichMediaLayoutAEP | SelectionAEP | SlowInputAEP | TransactionMutatedAEP | UploadExternalFailedAEP | WithPluginStateCalledAEP | CodeBlockLanguageSelectedAEP | EditorContentRetrievalPerformedAEP | UfoSessionCompletePayloadAEP | MediaLinkTransformedAEP | TextLinkCodeMarkTransformedAEP | DedupeMarksTransformedAEP | IndentationMarksTransformedAEP | NodesMissingContentTransformedAEP | InvalidProsemirrorDocumentErrorAEP | DocumentProcessingErrorAEP | InvalidMediaContentTransformedAEP | HeadingAnchorLinkButtonAEP | CollabStepsTrackerPayloadAEP;
177
180
  export {};
@@ -91,12 +91,20 @@ export declare const decreaseMediaSize: Keymap;
91
91
  export declare const activateVideoControls: Keymap;
92
92
  export declare const toggleHighlightPalette: Keymap;
93
93
  export declare const focusToContextMenuTrigger: Keymap;
94
+ export declare const dragToMoveUp: Keymap;
95
+ export declare const dragToMoveDown: Keymap;
94
96
  export declare function tooltip(keymap?: Keymap, description?: string): string | undefined;
95
97
  export declare const ToolTipContent: React.MemoExoticComponent<({ description, shortcutOverride, keymap, }: {
96
98
  description?: string | React.ReactNode;
97
99
  keymap?: Keymap | undefined;
98
100
  shortcutOverride?: string | undefined;
99
101
  }) => jsx.JSX.Element | null>;
102
+ export declare const TooltipContentWithMultipleShortcuts: React.MemoExoticComponent<({ helpDescriptors, }: {
103
+ helpDescriptors: {
104
+ description?: string | React.ReactNode;
105
+ keymap?: Keymap;
106
+ }[];
107
+ }) => jsx.JSX.Element>;
100
108
  export declare function findKeymapByDescription(description: string): Keymap | undefined;
101
109
  export declare function findShortcutByDescription(description: string): string | undefined;
102
110
  export declare function findShortcutByKeymap(keymap: Keymap): string | undefined;
@@ -2,6 +2,7 @@ import type { RichMediaLayout } from '@atlaskit/adf-schema';
2
2
  import type { Node as PMNode, ResolvedPos } from '@atlaskit/editor-prosemirror/model';
3
3
  import type { EditorState } from '@atlaskit/editor-prosemirror/state';
4
4
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
5
+ import type { EditorAppearance } from '../types';
5
6
  /**
6
7
  * Convert media node width to pixel
7
8
  *
@@ -40,7 +41,7 @@ export declare const calcMediaSinglePixelWidth: ({ width, widthType, origWidth,
40
41
  * Calculate maximum width allowed for media single node in fix-width editor in new experience
41
42
  * @param containerWidth width of editor container
42
43
  */
43
- export declare const calcMediaSingleMaxWidth: (containerWidth: number) => number;
44
+ export declare const calcMediaSingleMaxWidth: (containerWidth: number, editorAppearance?: EditorAppearance) => number;
44
45
  /**
45
46
  * Calculate initial media single pixel width.
46
47
  * Make it fall between max width and min width
@@ -0,0 +1,17 @@
1
+ export declare const messages: {
2
+ dragToMove: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ moveUp: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ moveDown: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ };
@@ -28,6 +28,7 @@ export { panelMessages } from './panel';
28
28
  export { mentionMessages } from './mentions';
29
29
  export { helpDialogMessages } from './help-dialog';
30
30
  export { highlightMessages } from './highlight';
31
+ export { messages as blockControlsMessages } from './block-controls';
31
32
  declare const _default: {
32
33
  layoutFixedWidth: {
33
34
  id: string;
@@ -2,6 +2,7 @@
2
2
  import React from 'react';
3
3
  import { jsx } from '@emotion/react';
4
4
  import type { RichMediaLayout as MediaSingleLayout } from '@atlaskit/adf-schema';
5
+ import type { EditorAppearance } from '../../types';
5
6
  import type { MediaSingleSize, MediaSingleWidthType } from './types';
6
7
  export interface Props {
7
8
  children: React.ReactNode;
@@ -25,6 +26,7 @@ export interface Props {
25
26
  handleMediaSingleRef?: React.RefObject<HTMLDivElement>;
26
27
  isInsideOfInlineExtension?: boolean;
27
28
  dataAttributes?: Record<string, any>;
29
+ editorAppearance?: EditorAppearance;
28
30
  }
29
31
  export type { MediaSingleWidthType, MediaSingleSize };
30
32
  export default function MediaSingle({ layout, width, height, containerWidth, isLoading, pctWidth, size, className, children: propsChildren, nodeType, fullWidthMode, lineLength: editorWidth, hasFallbackContainer, handleMediaSingleRef, isInsideOfInlineExtension, dataAttributes, }: Props): jsx.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "84.3.1",
3
+ "version": "84.4.2",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -104,7 +104,7 @@
104
104
  "@atlaskit/analytics-next": "^9.3.0",
105
105
  "@atlaskit/analytics-next-stable-react-context": "1.0.1",
106
106
  "@atlaskit/atlassian-context": "^0.0.0",
107
- "@atlaskit/button": "^18.2.0",
107
+ "@atlaskit/button": "^18.3.0",
108
108
  "@atlaskit/code": "^15.4.0",
109
109
  "@atlaskit/codemod-utils": "^4.2.0",
110
110
  "@atlaskit/custom-steps": "^0.4.0",
@@ -112,7 +112,7 @@
112
112
  "@atlaskit/editor-json-transformer": "^8.15.0",
113
113
  "@atlaskit/editor-palette": "1.6.0",
114
114
  "@atlaskit/editor-prosemirror": "4.0.1",
115
- "@atlaskit/editor-shared-styles": "^2.12.0",
115
+ "@atlaskit/editor-shared-styles": "^2.13.0",
116
116
  "@atlaskit/editor-tables": "^2.7.0",
117
117
  "@atlaskit/emoji": "^67.6.0",
118
118
  "@atlaskit/icon": "^22.6.0",
@@ -126,11 +126,11 @@
126
126
  "@atlaskit/media-file-preview": "^0.5.0",
127
127
  "@atlaskit/media-picker": "^66.4.0",
128
128
  "@atlaskit/media-ui": "^25.10.0",
129
- "@atlaskit/media-viewer": "48.6.10",
129
+ "@atlaskit/media-viewer": "48.6.11",
130
130
  "@atlaskit/mention": "^23.2.0",
131
131
  "@atlaskit/menu": "^2.7.0",
132
132
  "@atlaskit/platform-feature-flags": "^0.3.0",
133
- "@atlaskit/primitives": "^10.1.0",
133
+ "@atlaskit/primitives": "^11.0.0",
134
134
  "@atlaskit/profilecard": "^19.15.0",
135
135
  "@atlaskit/section-message": "^6.5.0",
136
136
  "@atlaskit/smart-card": "^27.9.0",