@atlaskit/editor-common 72.7.3 → 72.8.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (41) hide show
  1. package/.eslintrc.js +13 -0
  2. package/CHANGELOG.md +38 -0
  3. package/dist/cjs/card/index.js +20 -1
  4. package/dist/cjs/card/utils.js +54 -0
  5. package/dist/cjs/keymaps/index.js +5 -1
  6. package/dist/cjs/ui/DropList/index.js +1 -1
  7. package/dist/cjs/ui/MediaSingle/styled.js +4 -4
  8. package/dist/cjs/ui-color/ColorPalette/Palettes/index.js +6 -0
  9. package/dist/cjs/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +199 -1
  10. package/dist/cjs/ui-color/index.js +6 -0
  11. package/dist/cjs/version.json +1 -1
  12. package/dist/es2019/card/index.js +1 -1
  13. package/dist/es2019/card/utils.js +47 -0
  14. package/dist/es2019/index.js +1 -1
  15. package/dist/es2019/keymaps/index.js +2 -0
  16. package/dist/es2019/ui/DropList/index.js +1 -1
  17. package/dist/es2019/ui/MediaSingle/styled.js +3 -0
  18. package/dist/es2019/ui-color/ColorPalette/Palettes/index.js +1 -1
  19. package/dist/es2019/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +198 -0
  20. package/dist/es2019/ui-color/index.js +1 -1
  21. package/dist/es2019/version.json +1 -1
  22. package/dist/esm/card/index.js +1 -1
  23. package/dist/esm/card/utils.js +45 -0
  24. package/dist/esm/index.js +1 -1
  25. package/dist/esm/keymaps/index.js +2 -0
  26. package/dist/esm/ui/DropList/index.js +1 -1
  27. package/dist/esm/ui/MediaSingle/styled.js +4 -4
  28. package/dist/esm/ui-color/ColorPalette/Palettes/index.js +1 -1
  29. package/dist/esm/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.js +196 -0
  30. package/dist/esm/ui-color/index.js +1 -1
  31. package/dist/esm/version.json +1 -1
  32. package/dist/types/analytics/types/smart-links.d.ts +1 -1
  33. package/dist/types/card/cardOptions.d.ts +2 -0
  34. package/dist/types/card/index.d.ts +1 -0
  35. package/dist/types/card/utils.d.ts +18 -0
  36. package/dist/types/keymaps/index.d.ts +2 -0
  37. package/dist/types/types/feature-flags.d.ts +7 -0
  38. package/dist/types/ui-color/ColorPalette/Palettes/index.d.ts +1 -1
  39. package/dist/types/ui-color/ColorPalette/Palettes/paletteMessagesTokenModeNames.d.ts +548 -0
  40. package/dist/types/ui-color/index.d.ts +1 -1
  41. package/package.json +7 -7
package/.eslintrc.js ADDED
@@ -0,0 +1,13 @@
1
+ module.exports = {
2
+ rules: {
3
+ 'react/no-danger': 'error',
4
+ },
5
+ overrides: [
6
+ {
7
+ files: ['**/__tests__/**/*.{js,ts,tsx}', 'examples/**/*.{js,ts,tsx}'],
8
+ rules: {
9
+ 'react/no-danger': 'off',
10
+ },
11
+ },
12
+ ],
13
+ };
package/CHANGELOG.md CHANGED
@@ -1,5 +1,43 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 72.8.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`c2385dcb8f7`](https://bitbucket.org/atlassian/atlassian-frontend/commits/c2385dcb8f7) - [ux] ED-17043 Expanded table chart colors from 20 to 36 colors.
8
+ - [`0237059f136`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0237059f136) - Adds utilities to @atlaskit/editor-common/card for assisting adding `LinkMetaStep` to a transaction and reading metadata from a transaction.
9
+
10
+ ```ts
11
+ import { addLinkMetadata } from '@atlaskit/editor-common/card';
12
+
13
+ // Adds a LinkMetaStep to a transaction
14
+ addLinkMetadata(selection, tr, metadata);
15
+ ```
16
+
17
+ ```ts
18
+ import { getLinkMetadataFromTransaction } from '@atlaskit/editor-common/card';
19
+
20
+ // Retrieves and reduces LinkMetaData from a transaction into a single object
21
+ getLinkMetadataFromTransaction(tr);
22
+ ```
23
+
24
+ ```ts
25
+ import { commandWithMetadata } from '@atlaskit/editor-common/card';
26
+
27
+ // Wraps a command such that if there is a dispatch method will annotate the dispatched transaction with a LinkMetaStep with metadata
28
+ commandWithMetadata(command, metadata);
29
+ ```
30
+
31
+ - [`e88e54a14e3`](https://bitbucket.org/atlassian/atlassian-frontend/commits/e88e54a14e3) - [ux] [ux] Added 'allowAlignment' and 'allowWrapping' as options in 'cardOptions' to let Trello to disable the features
32
+
33
+ ### Patch Changes
34
+
35
+ - [`0df91686d92`](https://bitbucket.org/atlassian/atlassian-frontend/commits/0df91686d92) - [ux] ED-17047 fixed an issue where full width images appears narrower than full paragraph width images
36
+ - [`2e01c9c74b5`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2e01c9c74b5) - DUMMY remove before merging to master; dupe adf-schema via adf-utils
37
+ - [`b289da93d3c`](https://bitbucket.org/atlassian/atlassian-frontend/commits/b289da93d3c) - [ED-17384] Remove feature flags context plugin
38
+ - [`2cfb05a2cf8`](https://bitbucket.org/atlassian/atlassian-frontend/commits/2cfb05a2cf8) - [ux] ED-17278 - Added shortcuts to Editor Help dialog
39
+ - Updated dependencies
40
+
3
41
  ## 72.7.3
4
42
 
5
43
  ### Patch Changes
@@ -2,4 +2,23 @@
2
2
 
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
- });
5
+ });
6
+ Object.defineProperty(exports, "addLinkMetadata", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _utils.addLinkMetadata;
10
+ }
11
+ });
12
+ Object.defineProperty(exports, "commandWithMetadata", {
13
+ enumerable: true,
14
+ get: function get() {
15
+ return _utils.commandWithMetadata;
16
+ }
17
+ });
18
+ Object.defineProperty(exports, "getLinkMetadataFromTransaction", {
19
+ enumerable: true,
20
+ get: function get() {
21
+ return _utils.getLinkMetadataFromTransaction;
22
+ }
23
+ });
24
+ var _utils = require("./utils");
@@ -0,0 +1,54 @@
1
+ "use strict";
2
+
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
4
+ Object.defineProperty(exports, "__esModule", {
5
+ value: true
6
+ });
7
+ exports.addLinkMetadata = addLinkMetadata;
8
+ exports.commandWithMetadata = void 0;
9
+ exports.getLinkMetadataFromTransaction = getLinkMetadataFromTransaction;
10
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
+ var _steps = require("@atlaskit/adf-schema/steps");
12
+ function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
13
+ function _objectSpread(target) { for (var i = 1; i < arguments.length; i++) { var source = null != arguments[i] ? arguments[i] : {}; i % 2 ? ownKeys(Object(source), !0).forEach(function (key) { (0, _defineProperty2.default)(target, key, source[key]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(target, Object.getOwnPropertyDescriptors(source)) : ownKeys(Object(source)).forEach(function (key) { Object.defineProperty(target, key, Object.getOwnPropertyDescriptor(source, key)); }); } return target; }
14
+ /**
15
+ * Records metadata about the user action and input method relating to a transaction
16
+ * as a custom LinkStepMetadata prosemirror step so that it is preserved in
17
+ * the history for undo/redo
18
+ */
19
+ function addLinkMetadata(initialSelection, tr, metadata) {
20
+ var storedMarks = tr.storedMarks;
21
+ var pos = tr.mapping.map(initialSelection.$from.pos);
22
+ tr.step(new _steps.LinkMetaStep(pos, metadata));
23
+
24
+ // When you add a new step all the storedMarks are removed it
25
+ if (storedMarks) {
26
+ tr.setStoredMarks(storedMarks);
27
+ }
28
+ return tr;
29
+ }
30
+ function getLinkMetadataFromTransaction(tr) {
31
+ return tr.steps.reduce(function (metadata, step) {
32
+ if (!(step instanceof _steps.LinkMetaStep)) {
33
+ return metadata;
34
+ }
35
+ return _objectSpread(_objectSpread({}, metadata), step.getMetadata());
36
+ }, {});
37
+ }
38
+ /**
39
+ * Adds metadata to the transaction created from a command
40
+ * The metadata describes the user intent and input method
41
+ * for executing the command
42
+ */
43
+ var commandWithMetadata = function commandWithMetadata(command, metadata) {
44
+ return function (state, dispatch, view) {
45
+ if (!dispatch) {
46
+ return command(state, dispatch, view);
47
+ }
48
+ return command(state, function (tr) {
49
+ addLinkMetadata(state.selection, tr, metadata);
50
+ dispatch(tr);
51
+ }, view);
52
+ };
53
+ };
54
+ exports.commandWithMetadata = commandWithMetadata;
@@ -90,7 +90,7 @@ exports.getAriaKeyshortcuts = getAriaKeyshortcuts;
90
90
  exports.insertRule = exports.insertNewLine = exports.indentList = exports.indent = void 0;
91
91
  exports.makeKeyMapWithCommon = makeKeyMapWithCommon;
92
92
  exports.makeKeymap = makeKeymap;
93
- exports.toggleUnderline = exports.toggleTable = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleOrderedList = exports.toggleItalic = exports.toggleHeading6 = exports.toggleHeading5 = exports.toggleHeading4 = exports.toggleHeading3 = exports.toggleHeading2 = exports.toggleHeading1 = exports.toggleCode = exports.toggleBulletList = exports.toggleBold = exports.toggleBlockQuote = exports.tab = exports.submit = exports.splitListItem = exports.splitCodeBlock = exports.space = exports.shiftTab = exports.shiftEnter = exports.shiftBackspace = exports.setNormalText = exports.redo = exports.previousCell = exports.pastePlainText = exports.paste = exports.outdentList = exports.outdent = exports.openHelp = exports.nextCell = exports.moveUp = exports.moveRight = exports.moveLeft = exports.moveDown = void 0;
93
+ exports.toggleUnderline = exports.toggleTable = exports.toggleSuperscript = exports.toggleSubscript = exports.toggleStrikethrough = exports.toggleOrderedList = exports.toggleItalic = exports.toggleHeading6 = exports.toggleHeading5 = exports.toggleHeading4 = exports.toggleHeading3 = exports.toggleHeading2 = exports.toggleHeading1 = exports.toggleCode = exports.toggleBulletList = exports.toggleBold = exports.toggleBlockQuote = exports.tab = exports.submit = exports.splitListItem = exports.splitCodeBlock = exports.space = exports.shiftTab = exports.shiftEnter = exports.shiftBackspace = exports.setNormalText = exports.redo = exports.previousCell = exports.pastePlainText = exports.paste = exports.outdentList = exports.outdent = exports.openHelp = exports.nextCell = exports.navToFloatingToolbar = exports.navToEditorToolbar = exports.moveUp = exports.moveRight = exports.moveLeft = exports.moveDown = void 0;
94
94
  exports.tooltip = tooltip;
95
95
  exports.undo = void 0;
96
96
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
@@ -106,6 +106,10 @@ function _getRequireWildcardCache(nodeInterop) { if (typeof WeakMap !== "functio
106
106
  function _interopRequireWildcard(obj, nodeInterop) { if (!nodeInterop && obj && obj.__esModule) { return obj; } if (obj === null || _typeof3(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; }
107
107
  var addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
108
108
  exports.addAltText = addAltText;
109
+ var navToEditorToolbar = makeKeyMapWithCommon('Navigate to editor toolbar', 'Alt-F9');
110
+ exports.navToEditorToolbar = navToEditorToolbar;
111
+ var navToFloatingToolbar = makeKeyMapWithCommon('Navigate to floating toolbar', 'Alt-F10');
112
+ exports.navToFloatingToolbar = navToFloatingToolbar;
109
113
  var toggleBold = makeKeyMapWithCommon('Bold', 'Mod-b');
110
114
  exports.toggleBold = toggleBold;
111
115
  var toggleItalic = makeKeyMapWithCommon('Italic', 'Mod-i');
@@ -24,7 +24,7 @@ var _templateObject, _templateObject2, _templateObject3;
24
24
  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); }; }
25
25
  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 */
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "72.7.3";
27
+ var packageVersion = "72.8.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = "0, ".concat((0, _constants.gridSize)(), "px");
30
30
  var DropList = /*#__PURE__*/function (_Component) {
@@ -15,7 +15,7 @@ var _react2 = require("@emotion/react");
15
15
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
16
16
  var _breakout = require("../../utils/breakout");
17
17
  var _excluded = ["children"];
18
- var _templateObject, _templateObject2, _templateObject3;
18
+ var _templateObject, _templateObject2, _templateObject3, _templateObject4;
19
19
  /** @jsx jsx */
20
20
  function float(layout) {
21
21
  switch (layout) {
@@ -119,17 +119,17 @@ var MediaSingleDimensionHelper = function MediaSingleDimensionHelper(_ref) {
119
119
  layout = _ref.layout,
120
120
  pctWidth = _ref.pctWidth,
121
121
  width = _ref.width;
122
- return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /* For nested rich media items, set max-width to 100% */\n tr &,\n [data-layout-column] &,\n [data-node-type='expand'] & {\n max-width: 100%;\n }\n\n width: ", ";\n max-width: ", ";\n float: ", ";\n margin: ", ";\n ", ";\n\n &:not(.is-resizing) {\n transition: width 100ms ease-in;\n }\n"])), pctWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized), calcMaxWidth(layout, containerWidth), float(layout), calcMargin(layout), isImageAligned(layout));
122
+ return (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n /* For nested rich media items, set max-width to 100% */\n tr &,\n [data-layout-column] &,\n [data-node-type='expand'] & {\n max-width: 100%;\n }\n\n width: ", ";\n ", "\n max-width: ", ";\n float: ", ";\n margin: ", ";\n ", ";\n\n &:not(.is-resizing) {\n transition: width 100ms ease-in;\n }\n"])), pctWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized), layout === 'full-width' && (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n min-width: 100%;\n "]))), calcMaxWidth(layout, containerWidth), float(layout), calcMargin(layout), isImageAligned(layout));
123
123
  };
124
124
  exports.MediaSingleDimensionHelper = MediaSingleDimensionHelper;
125
125
  var RenderFallbackContainer = function RenderFallbackContainer(_ref2) {
126
126
  var hasFallbackContainer = _ref2.hasFallbackContainer,
127
127
  paddingBottom = _ref2.paddingBottom,
128
128
  height = _ref2.height;
129
- return (0, _react2.css)(_templateObject2 || (_templateObject2 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n"])), hasFallbackContainer ? "\n &::after {\n content: '';\n display: block;\n ".concat(height ? "height: ".concat(height, "px;") : paddingBottom ? "padding-bottom: ".concat(paddingBottom, ";") : '', "\n\n /* Fixes extra padding problem in Firefox */\n font-size: 0;\n line-height: 0;\n }\n ") : '');
129
+ return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n ", "\n"])), hasFallbackContainer ? "\n &::after {\n content: '';\n display: block;\n ".concat(height ? "height: ".concat(height, "px;") : paddingBottom ? "padding-bottom: ".concat(paddingBottom, ";") : '', "\n\n /* Fixes extra padding problem in Firefox */\n font-size: 0;\n line-height: 0;\n }\n ") : '');
130
130
  };
131
131
  var mediaWrapperStyle = function mediaWrapperStyle(props) {
132
- return (0, _react2.css)(_templateObject3 || (_templateObject3 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n\n ", "\n\n /* Editor */\n & > figure {\n position: ", ";\n height: 100%;\n width: 100%;\n }\n\n & > div {\n position: ", ";\n height: 100%;\n width: 100%;\n }\n\n &[data-node-type='embedCard'] > div {\n width: 100%;\n }\n\n /* Renderer */\n [data-node-type='media'] {\n position: static !important;\n\n > div {\n position: absolute;\n height: 100%;\n }\n }\n"])), RenderFallbackContainer(props), props.hasFallbackContainer ? 'absolute' : 'relative', props.hasFallbackContainer ? 'absolute' : 'relative');
132
+ return (0, _react2.css)(_templateObject4 || (_templateObject4 = (0, _taggedTemplateLiteral2.default)(["\n position: relative;\n\n ", "\n\n /* Editor */\n & > figure {\n position: ", ";\n height: 100%;\n width: 100%;\n }\n\n & > div {\n position: ", ";\n height: 100%;\n width: 100%;\n }\n\n &[data-node-type='embedCard'] > div {\n width: 100%;\n }\n\n /* Renderer */\n [data-node-type='media'] {\n position: static !important;\n\n > div {\n position: absolute;\n height: 100%;\n }\n }\n"])), RenderFallbackContainer(props), props.hasFallbackContainer ? 'absolute' : 'relative', props.hasFallbackContainer ? 'absolute' : 'relative');
133
133
  };
134
134
  exports.mediaWrapperStyle = mediaWrapperStyle;
135
135
  var MediaWrapper = function MediaWrapper(_ref3) {
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "borderPaletteTooltipMessages", {
21
21
  return _paletteMessagesTokenModeNames.borderPaletteTooltipMessages;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "chartsColorPaletteTooltipMessages", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _paletteMessagesTokenModeNames.chartsColorPaletteTooltipMessages;
28
+ }
29
+ });
24
30
  Object.defineProperty(exports, "textPaletteTooltipMessages", {
25
31
  enumerable: true,
26
32
  get: function get() {
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.textPaletteTooltipMessages = exports.lightTextPaletteTooltipMessages = exports.lightBackgroundPaletteTooltipMessages = exports.darkTextPaletteTooltipMessages = exports.darkBackgroundPaletteTooltipMessages = exports.borderPaletteTooltipMessages = exports.backgroundPaletteTooltipMessages = void 0;
7
+ exports.textPaletteTooltipMessages = exports.lightTextPaletteTooltipMessages = exports.lightChartsColorPaletteTooltipMessages = exports.lightBackgroundPaletteTooltipMessages = exports.darkTextPaletteTooltipMessages = exports.darkBackgroundPaletteTooltipMessages = exports.chartsColorPaletteTooltipMessages = exports.borderPaletteTooltipMessages = exports.backgroundPaletteTooltipMessages = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
10
  function ownKeys(object, enumerableOnly) { var keys = Object.keys(object); if (Object.getOwnPropertySymbols) { var symbols = Object.getOwnPropertySymbols(object); enumerableOnly && (symbols = symbols.filter(function (sym) { return Object.getOwnPropertyDescriptor(object, sym).enumerable; })), keys.push.apply(keys, symbols); } return keys; }
@@ -259,6 +259,204 @@ var backgroundPaletteTooltipMessages = {
259
259
  dark: darkBackgroundPaletteTooltipMessages
260
260
  };
261
261
  exports.backgroundPaletteTooltipMessages = backgroundPaletteTooltipMessages;
262
+ var lightChartsColorPaletteTooltipMessages = (0, _reactIntlNext.defineMessages)({
263
+ // Blue color
264
+ '#7AB2FF': {
265
+ id: 'fabric.theme.subtle-blue',
266
+ defaultMessage: 'Subtle blue',
267
+ description: 'Name of a color'
268
+ },
269
+ '#247FFF': {
270
+ id: 'fabric.theme.blue',
271
+ defaultMessage: 'Blue',
272
+ description: 'Name of a color'
273
+ },
274
+ '#0055CC': {
275
+ id: 'fabric.theme.bold-blue',
276
+ defaultMessage: 'Bold blue',
277
+ description: 'Name of a color'
278
+ },
279
+ '#003884': {
280
+ id: 'fabric.theme.bolder-blue',
281
+ defaultMessage: 'Bolder blue',
282
+ description: 'Name of a color'
283
+ },
284
+ // Teal color
285
+ '#60C6D2': {
286
+ id: 'fabric.theme.subtle-teal',
287
+ defaultMessage: 'Subtle teal',
288
+ description: 'Name of a color'
289
+ },
290
+ '#1D9AAA': {
291
+ id: 'fabric.theme.teal',
292
+ defaultMessage: 'Teal',
293
+ description: 'Name of a color'
294
+ },
295
+ '#1D7F8C': {
296
+ id: 'fabric.theme.bold-teal',
297
+ defaultMessage: 'Bold teal',
298
+ description: 'Name of a color'
299
+ },
300
+ '#206B74': {
301
+ id: 'fabric.theme.bolder-teal',
302
+ defaultMessage: 'Bolder teal',
303
+ description: 'Name of a color'
304
+ },
305
+ // Green color
306
+ '#6BE1B0': {
307
+ id: 'fabric.theme.subtle-green',
308
+ defaultMessage: 'Subtle green',
309
+ description: 'Name of a color'
310
+ },
311
+ '#23A971': {
312
+ id: 'fabric.theme.green',
313
+ defaultMessage: 'Green',
314
+ description: 'Name of a color'
315
+ },
316
+ '#177D52': {
317
+ id: 'fabric.theme.bold-green',
318
+ defaultMessage: 'Bold green',
319
+ description: 'Name of a color'
320
+ },
321
+ '#055C3F': {
322
+ id: 'fabric.theme.bolder-green',
323
+ defaultMessage: 'Bolder green',
324
+ description: 'Name of a color'
325
+ },
326
+ // Yellow color
327
+ '#FFDB57': {
328
+ id: 'fabric.theme.subtle-yellow',
329
+ defaultMessage: 'Subtle yellow',
330
+ description: 'Name of a color'
331
+ },
332
+ '#FFBE33': {
333
+ id: 'fabric.theme.yellow',
334
+ defaultMessage: 'Yellow',
335
+ description: 'Name of a color'
336
+ },
337
+ '#FF9D00': {
338
+ id: 'fabric.theme.bold-yellow',
339
+ defaultMessage: 'Bold yellow',
340
+ description: 'Name of a color'
341
+ },
342
+ '#946104': {
343
+ id: 'fabric.theme.bolder-yellow',
344
+ defaultMessage: 'Bolder yellow',
345
+ description: 'Name of a color'
346
+ },
347
+ // Red color
348
+ '#FF8F73': {
349
+ id: 'fabric.theme.subtle-red',
350
+ defaultMessage: 'Subtle red',
351
+ description: 'Name of a color'
352
+ },
353
+ '#FC552C': {
354
+ id: 'fabric.theme.red',
355
+ defaultMessage: 'Red',
356
+ description: 'Name of a color.'
357
+ },
358
+ '#D32D03': {
359
+ id: 'fabric.theme.bold-red',
360
+ defaultMessage: 'Bold red',
361
+ description: 'Name of a color'
362
+ },
363
+ '#A32000': {
364
+ id: 'fabric.theme.bolder-red',
365
+ defaultMessage: 'Bolder red',
366
+ description: 'Name of a color'
367
+ },
368
+ // Orange color
369
+ '#FAA53D': {
370
+ id: 'fabric.theme.subtle-orange',
371
+ defaultMessage: 'Subtle orange',
372
+ description: 'Name of a color'
373
+ },
374
+ '#D97008': {
375
+ id: 'fabric.theme.orange',
376
+ defaultMessage: 'Orange',
377
+ description: 'Name of a color.'
378
+ },
379
+ '#B65C02': {
380
+ id: 'fabric.theme.bold-orange',
381
+ defaultMessage: 'Bold orange',
382
+ description: 'Name of a color'
383
+ },
384
+ '#974F0C': {
385
+ id: 'fabric.theme.bolder-orange',
386
+ defaultMessage: 'Bolder orange',
387
+ description: 'Name of a color'
388
+ },
389
+ // Magenta color
390
+ '#E774BB': {
391
+ id: 'fabric.theme.subtle-magenta',
392
+ defaultMessage: 'Subtle magenta',
393
+ description: 'Name of a color'
394
+ },
395
+ '#DA62AC': {
396
+ id: 'fabric.theme.magenta',
397
+ defaultMessage: 'Magenta',
398
+ description: 'Name of a color'
399
+ },
400
+ '#CD519D': {
401
+ id: 'fabric.theme.bold-magenta',
402
+ defaultMessage: 'Bold magenta',
403
+ description: 'Name of a color'
404
+ },
405
+ '#943D73': {
406
+ id: 'fabric.theme.bolder-magenta',
407
+ defaultMessage: 'Bolder magenta',
408
+ description: 'Name of a color'
409
+ },
410
+ // Purple color
411
+ '#B5A7FB': {
412
+ id: 'fabric.theme.subtle-purple',
413
+ defaultMessage: 'Subtle purple',
414
+ description: 'Name of a color'
415
+ },
416
+ '#8B77EE': {
417
+ id: 'fabric.theme.purple',
418
+ defaultMessage: 'Purple',
419
+ description: 'Name of a color'
420
+ },
421
+ '#5A43D0': {
422
+ id: 'fabric.theme.bold-purple',
423
+ defaultMessage: 'Bold purple',
424
+ description: 'Name of a color'
425
+ },
426
+ '#44368B': {
427
+ id: 'fabric.theme.bolder-purple',
428
+ defaultMessage: 'Bolder purple',
429
+ description: 'Name of a color'
430
+ },
431
+ // Gray color
432
+ '#8993A5': {
433
+ id: 'fabric.theme.subtle-gray',
434
+ defaultMessage: 'Subtle gray',
435
+ description: 'Name of a color'
436
+ },
437
+ '#8590A2': {
438
+ id: 'fabric.theme.gray',
439
+ defaultMessage: 'Gray',
440
+ description: 'Name of a color'
441
+ },
442
+ '#758195': {
443
+ id: 'fabric.theme.bold-gray',
444
+ defaultMessage: 'Bold gray',
445
+ description: 'Name of a color'
446
+ },
447
+ '#44546F': {
448
+ id: 'fabric.theme.bolder-gray',
449
+ defaultMessage: 'Bolder gray',
450
+ description: 'Name of a color'
451
+ }
452
+ });
453
+ exports.lightChartsColorPaletteTooltipMessages = lightChartsColorPaletteTooltipMessages;
454
+ var darkChartsColorPaletteTooltipMessages = _objectSpread({}, lightChartsColorPaletteTooltipMessages);
455
+ var chartsColorPaletteTooltipMessages = {
456
+ light: lightChartsColorPaletteTooltipMessages,
457
+ dark: darkChartsColorPaletteTooltipMessages
458
+ };
459
+ exports.chartsColorPaletteTooltipMessages = chartsColorPaletteTooltipMessages;
262
460
  var lightBorderPaletteTooltipMessages = (0, _reactIntlNext.defineMessages)({
263
461
  '#091E4224': {
264
462
  id: 'fabric.theme.subtle-gray',
@@ -52,6 +52,12 @@ Object.defineProperty(exports, "cellBackgroundColorPalette", {
52
52
  return _cellBackgroundColorPalette.default;
53
53
  }
54
54
  });
55
+ Object.defineProperty(exports, "chartsColorPaletteTooltipMessages", {
56
+ enumerable: true,
57
+ get: function get() {
58
+ return _Palettes.chartsColorPaletteTooltipMessages;
59
+ }
60
+ });
55
61
  Object.defineProperty(exports, "colorPaletteMessages", {
56
62
  enumerable: true,
57
63
  get: function get() {
@@ -1,5 +1,5 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "72.7.3",
3
+ "version": "72.8.0",
4
4
  "sideEffects": false
5
5
  }
@@ -1 +1 @@
1
- export {};
1
+ export { addLinkMetadata, getLinkMetadataFromTransaction, commandWithMetadata } from './utils';
@@ -0,0 +1,47 @@
1
+ import { LinkMetaStep } from '@atlaskit/adf-schema/steps';
2
+
3
+ /**
4
+ * Records metadata about the user action and input method relating to a transaction
5
+ * as a custom LinkStepMetadata prosemirror step so that it is preserved in
6
+ * the history for undo/redo
7
+ */
8
+ export function addLinkMetadata(initialSelection, tr, metadata) {
9
+ const {
10
+ storedMarks
11
+ } = tr;
12
+ const pos = tr.mapping.map(initialSelection.$from.pos);
13
+ tr.step(new LinkMetaStep(pos, metadata));
14
+
15
+ // When you add a new step all the storedMarks are removed it
16
+ if (storedMarks) {
17
+ tr.setStoredMarks(storedMarks);
18
+ }
19
+ return tr;
20
+ }
21
+ export function getLinkMetadataFromTransaction(tr) {
22
+ return tr.steps.reduce((metadata, step) => {
23
+ if (!(step instanceof LinkMetaStep)) {
24
+ return metadata;
25
+ }
26
+ return {
27
+ ...metadata,
28
+ ...step.getMetadata()
29
+ };
30
+ }, {});
31
+ }
32
+ /**
33
+ * Adds metadata to the transaction created from a command
34
+ * The metadata describes the user intent and input method
35
+ * for executing the command
36
+ */
37
+ export const commandWithMetadata = (command, metadata) => {
38
+ return (state, dispatch, view) => {
39
+ if (!dispatch) {
40
+ return command(state, dispatch, view);
41
+ }
42
+ return command(state, tr => {
43
+ addLinkMetadata(state.selection, tr, metadata);
44
+ dispatch(tr);
45
+ }, view);
46
+ };
47
+ };
@@ -1,2 +1,2 @@
1
- // DO NOT EMPORT ANYTHING FROM THIS FILE. USE CHILD ENTRY POINTS
1
+ // DO NOT EMPORT ANYTHING FROM THIS FILE. USE CHILD ENTRY POINTS.
2
2
  export {};
@@ -4,6 +4,8 @@ import { css, jsx } from '@emotion/react';
4
4
  import { N400 } from '@atlaskit/theme/colors';
5
5
  import { browser } from '../utils';
6
6
  export const addAltText = makeKeyMapWithCommon('Add Alt Text', 'Mod-Alt-y');
7
+ export const navToEditorToolbar = makeKeyMapWithCommon('Navigate to editor toolbar', 'Alt-F9');
8
+ export const navToFloatingToolbar = makeKeyMapWithCommon('Navigate to floating toolbar', 'Alt-F10');
7
9
  export const toggleBold = makeKeyMapWithCommon('Bold', 'Mod-b');
8
10
  export const toggleItalic = makeKeyMapWithCommon('Italic', 'Mod-i');
9
11
  export const toggleUnderline = makeKeyMapWithCommon('Underline', 'Mod-u');
@@ -8,7 +8,7 @@ import { themed } from '@atlaskit/theme/components';
8
8
  import { borderRadius, gridSize } from '@atlaskit/theme/constants';
9
9
  import Layer from '../Layer';
10
10
  const packageName = "@atlaskit/editor-common";
11
- const packageVersion = "72.7.3";
11
+ const packageVersion = "72.8.0";
12
12
  const halfFocusRing = 1;
13
13
  const dropOffset = `0, ${gridSize()}px`;
14
14
  class DropList extends Component {
@@ -109,6 +109,9 @@ export const MediaSingleDimensionHelper = ({
109
109
  }
110
110
 
111
111
  width: ${pctWidth ? calcResizedWidth(layout, width || 0, containerWidth) : calcLegacyWidth(layout, width || 0, containerWidth, fullWidthMode, isResized)};
112
+ ${layout === 'full-width' && css`
113
+ min-width: 100%;
114
+ `}
112
115
  max-width: ${calcMaxWidth(layout, containerWidth)};
113
116
  float: ${float(layout)};
114
117
  margin: ${calcMargin(layout)};
@@ -1,2 +1,2 @@
1
1
  export { DEFAULT_BORDER_COLOR } from './common';
2
- export { textPaletteTooltipMessages, backgroundPaletteTooltipMessages, borderPaletteTooltipMessages } from './paletteMessagesTokenModeNames';
2
+ export { backgroundPaletteTooltipMessages, borderPaletteTooltipMessages, chartsColorPaletteTooltipMessages, textPaletteTooltipMessages } from './paletteMessagesTokenModeNames';