@atlaskit/editor-common 78.12.2 → 78.12.4

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 (36) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/extensibility/Extension/InlineExtension/styles.js +0 -4
  3. package/dist/cjs/keymaps/index.js +3 -2
  4. package/dist/cjs/media/index.js +8 -1
  5. package/dist/cjs/media/styles.js +15 -0
  6. package/dist/cjs/monitoring/error.js +1 -1
  7. package/dist/cjs/styles/index.js +6 -0
  8. package/dist/cjs/styles/shared/annotation.js +10 -2
  9. package/dist/cjs/ui/DropList/index.js +1 -1
  10. package/dist/es2019/extensibility/Extension/InlineExtension/styles.js +0 -4
  11. package/dist/es2019/keymaps/index.js +1 -0
  12. package/dist/es2019/media/index.js +2 -1
  13. package/dist/es2019/media/styles.js +7 -0
  14. package/dist/es2019/monitoring/error.js +1 -1
  15. package/dist/es2019/styles/index.js +1 -1
  16. package/dist/es2019/styles/shared/annotation.js +25 -0
  17. package/dist/es2019/ui/DropList/index.js +1 -1
  18. package/dist/esm/extensibility/Extension/InlineExtension/styles.js +0 -4
  19. package/dist/esm/keymaps/index.js +1 -0
  20. package/dist/esm/media/index.js +2 -1
  21. package/dist/esm/media/styles.js +9 -0
  22. package/dist/esm/monitoring/error.js +1 -1
  23. package/dist/esm/styles/index.js +1 -1
  24. package/dist/esm/styles/shared/annotation.js +9 -1
  25. package/dist/esm/ui/DropList/index.js +1 -1
  26. package/dist/types/keymaps/index.d.ts +1 -0
  27. package/dist/types/media/index.d.ts +1 -0
  28. package/dist/types/media/styles.d.ts +2 -0
  29. package/dist/types/styles/index.d.ts +1 -1
  30. package/dist/types/styles/shared/annotation.d.ts +6 -0
  31. package/dist/types-ts4.5/keymaps/index.d.ts +1 -0
  32. package/dist/types-ts4.5/media/index.d.ts +1 -0
  33. package/dist/types-ts4.5/media/styles.d.ts +2 -0
  34. package/dist/types-ts4.5/styles/index.d.ts +1 -1
  35. package/dist/types-ts4.5/styles/shared/annotation.d.ts +6 -0
  36. package/package.json +1 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 78.12.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [#80123](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80123) [`e235b04b9352`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/e235b04b9352) - [ED-22387] Add css styling for comments on media node
8
+ - [#80086](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80086) [`c30ac781b469`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/c30ac781b469) - Add keyboard support Cmd-A to select whole table
9
+
10
+ ## 78.12.3
11
+
12
+ ### Patch Changes
13
+
14
+ - [#80907](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/80907) [`b84391b5a626`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b84391b5a626) - fix regression issue caused by styling for inline extension
15
+
3
16
  ## 78.12.2
4
17
 
5
18
  ### Patch Changes
@@ -26,10 +26,6 @@ var wrapperStyle = exports.wrapperStyle = (0, _react.css)(_styles.wrapperDefault
26
26
  });
27
27
  var inlineWrapperStyels = exports.inlineWrapperStyels = (0, _react.css)({
28
28
  maxWidth: '100%',
29
- display: 'inline-block',
30
- '&::after, &::before': {
31
- display: 'block'
32
- },
33
29
  'tr &': {
34
30
  maxWidth: 'inherit'
35
31
  },
@@ -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.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.startColumnResizing = exports.splitListItem = exports.splitCodeBlock = exports.space = exports.shiftTab = exports.shiftEnter = exports.shiftBackspace = exports.shiftArrowUp = exports.setNormalText = 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 = void 0;
103
+ 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.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 = void 0;
105
105
  exports.tooltip = tooltip;
106
106
  exports.undo = void 0;
107
107
  var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
@@ -195,6 +195,7 @@ var alignRight = exports.alignRight = makeKeyMapWithCommon('Align Right', 'Mod-A
195
195
  var toggleTaskItemCheckbox = exports.toggleTaskItemCheckbox = makeKeyMapWithCommon('Toggles task item', 'Mod-Alt-Enter');
196
196
  var selectRow = exports.selectRow = makeKeyMapArrayWithCommon('Select row', ['Mod-Alt-Shift-ArrowLeft', 'Mod-Alt-Shift-ArrowRight']);
197
197
  var selectColumn = exports.selectColumn = makeKeyMapArrayWithCommon('Select column', ['Mod-Alt-Shift-ArrowDown', 'Mod-Alt-Shift-ArrowUp']);
198
+ var selectTable = exports.selectTable = makeKeyMapWithCommon('Select table', 'Mod-a');
198
199
  var increaseMediaSize = exports.increaseMediaSize = makeKeyMapWithCommon('increase image size', 'Mod-Alt-]');
199
200
  var decreaseMediaSize = exports.decreaseMediaSize = makeKeyMapWithCommon('increase image size', 'Mod-Alt-[');
200
201
  var arrowKeysMap = {
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "commentMessages", {
21
21
  return _comments.commentMessages;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "commentStatusStyleMap", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _styles.commentStatusStyleMap;
28
+ }
29
+ });
24
30
  Object.defineProperty(exports, "dropPlaceholderMessages", {
25
31
  enumerable: true,
26
32
  get: function get() {
@@ -72,4 +78,5 @@ var _caption = require("./messages/caption");
72
78
  var _dropPlaceholder = require("./messages/dropPlaceholder");
73
79
  var _altText = require("./messages/altText");
74
80
  var _mediaResizeAnnouncerMess = require("./messages/mediaResizeAnnouncerMess");
75
- var _comments = require("./messages/comments");
81
+ var _comments = require("./messages/comments");
82
+ var _styles = require("./styles");
@@ -0,0 +1,15 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.commentStatusStyleMap = void 0;
7
+ var _colors = require("@atlaskit/theme/colors");
8
+ var boxShadowColorByStatus = {
9
+ draft: "var(--ds-background-accent-yellow-subtle, ".concat(_colors.Y300, ")"),
10
+ focus: "var(--ds-background-accent-yellow-subtle, ".concat(_colors.Y300, ")"),
11
+ blur: "var(--ds-background-accent-yellow-subtler, ".concat(_colors.Y200, ")")
12
+ };
13
+ var commentStatusStyleMap = exports.commentStatusStyleMap = function commentStatusStyleMap(status) {
14
+ return "3px 3px 0px 0px ".concat(boxShadowColorByStatus[status]);
15
+ };
@@ -16,7 +16,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
16
16
  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; }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "78.12.2";
19
+ var packageVersion = "78.12.4";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // TODO: Sanitise the URL instead of just removing it
@@ -27,6 +27,12 @@ Object.defineProperty(exports, "BODIED_EXT_PADDING", {
27
27
  return _extension.BODIED_EXT_PADDING;
28
28
  }
29
29
  });
30
+ Object.defineProperty(exports, "BlockAnnotationSharedClassNames", {
31
+ enumerable: true,
32
+ get: function get() {
33
+ return _annotation.BlockAnnotationSharedClassNames;
34
+ }
35
+ });
30
36
  Object.defineProperty(exports, "BreakoutCssClassName", {
31
37
  enumerable: true,
32
38
  get: function get() {
@@ -4,10 +4,11 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.annotationSharedStyles = exports.annotationPrefix = exports.AnnotationSharedClassNames = exports.AnnotationSharedCSSByState = void 0;
7
+ exports.blockAnnotationPrefix = exports.annotationSharedStyles = exports.annotationPrefix = exports.BlockAnnotationSharedClassNames = exports.AnnotationSharedClassNames = exports.AnnotationSharedCSSByState = void 0;
8
8
  var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
9
9
  var _react = require("@emotion/react");
10
10
  var _colors = require("@atlaskit/theme/colors");
11
+ var _styles = require("../../media/styles");
11
12
  var _templateObject;
12
13
  var annotationPrefix = exports.annotationPrefix = 'ak-editor-annotation';
13
14
  var AnnotationSharedClassNames = exports.AnnotationSharedClassNames = {
@@ -15,6 +16,13 @@ var AnnotationSharedClassNames = exports.AnnotationSharedClassNames = {
15
16
  blur: "".concat(annotationPrefix, "-blur"),
16
17
  draft: "".concat(annotationPrefix, "-draft")
17
18
  };
19
+ var blockAnnotationPrefix = exports.blockAnnotationPrefix = 'ak-editor-block-annotation';
20
+ var BlockAnnotationSharedClassNames = exports.BlockAnnotationSharedClassNames = {
21
+ focus: "".concat(blockAnnotationPrefix, "-focus"),
22
+ blur: "".concat(blockAnnotationPrefix, "-blur"),
23
+ draft: "".concat(blockAnnotationPrefix, "-draft")
24
+ };
25
+ var mediaNodeDomRef = 'mediaView-content-wrap';
18
26
  var Y75a = 'rgba(255, 240, 179, 0.5)';
19
27
  var Y200a = 'rgba(255, 196, 0, 0.82)';
20
28
  var AnnotationSharedCSSByState = exports.AnnotationSharedCSSByState = function AnnotationSharedCSSByState() {
@@ -38,5 +46,5 @@ var AnnotationSharedCSSByState = exports.AnnotationSharedCSSByState = function A
38
46
 
39
47
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
40
48
  var annotationSharedStyles = exports.annotationSharedStyles = function annotationSharedStyles() {
41
- return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur);
49
+ return (0, _react.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n\n // Styling for comments on media node\n .", "[class*=ak-editor-block-annotation-] {\n border-radius: 3px;\n }\n\n .", ".", " {\n box-shadow: ", ";\n }\n\n .", ".", " {\n box-shadow: ", ";\n }\n\n .", ".", " {\n box-shadow: ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur, mediaNodeDomRef, mediaNodeDomRef, BlockAnnotationSharedClassNames.draft, (0, _styles.commentStatusStyleMap)('draft'), mediaNodeDomRef, BlockAnnotationSharedClassNames.focus, (0, _styles.commentStatusStyleMap)('focus'), mediaNodeDomRef, BlockAnnotationSharedClassNames.blur, (0, _styles.commentStatusStyleMap)('blur'));
42
50
  };
@@ -22,7 +22,7 @@ var _templateObject, _templateObject2, _templateObject3;
22
22
  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); }; }
23
23
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */
24
24
  var packageName = "@atlaskit/editor-common";
25
- var packageVersion = "78.12.2";
25
+ var packageVersion = "78.12.4";
26
26
  var halfFocusRing = 1;
27
27
  var dropOffset = '0, 8';
28
28
  var DropList = /*#__PURE__*/function (_Component) {
@@ -20,10 +20,6 @@ export const wrapperStyle = css(wrapperDefault, {
20
20
  });
21
21
  export const inlineWrapperStyels = css({
22
22
  maxWidth: '100%',
23
- display: 'inline-block',
24
- '&::after, &::before': {
25
- display: 'block'
26
- },
27
23
  'tr &': {
28
24
  maxWidth: 'inherit'
29
25
  },
@@ -83,6 +83,7 @@ export const alignRight = makeKeyMapWithCommon('Align Right', 'Mod-Alt-t');
83
83
  export const toggleTaskItemCheckbox = makeKeyMapWithCommon('Toggles task item', 'Mod-Alt-Enter');
84
84
  export const selectRow = makeKeyMapArrayWithCommon('Select row', ['Mod-Alt-Shift-ArrowLeft', 'Mod-Alt-Shift-ArrowRight']);
85
85
  export const selectColumn = makeKeyMapArrayWithCommon('Select column', ['Mod-Alt-Shift-ArrowDown', 'Mod-Alt-Shift-ArrowUp']);
86
+ export const selectTable = makeKeyMapWithCommon('Select table', 'Mod-a');
86
87
  export const increaseMediaSize = makeKeyMapWithCommon('increase image size', 'Mod-Alt-]');
87
88
  export const decreaseMediaSize = makeKeyMapWithCommon('increase image size', 'Mod-Alt-[');
88
89
  const arrowKeysMap = {
@@ -7,4 +7,5 @@ export { captionMessages } from './messages/caption';
7
7
  export { dropPlaceholderMessages } from './messages/dropPlaceholder';
8
8
  export { altTextMessages } from './messages/altText';
9
9
  export { mediaResizeAnnouncerMessMessages } from './messages/mediaResizeAnnouncerMess';
10
- export { commentMessages } from './messages/comments';
10
+ export { commentMessages } from './messages/comments';
11
+ export { commentStatusStyleMap } from './styles';
@@ -0,0 +1,7 @@
1
+ import { Y200, Y300 } from '@atlaskit/theme/colors';
2
+ const boxShadowColorByStatus = {
3
+ draft: `var(--ds-background-accent-yellow-subtle, ${Y300})`,
4
+ focus: `var(--ds-background-accent-yellow-subtle, ${Y300})`,
5
+ blur: `var(--ds-background-accent-yellow-subtler, ${Y200})`
6
+ };
7
+ export const commentStatusStyleMap = status => `3px 3px 0px 0px ${boxShadowColorByStatus[status]}`;
@@ -1,6 +1,6 @@
1
1
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
2
2
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
3
- const packageVersion = "78.12.2";
3
+ const packageVersion = "78.12.4";
4
4
  const sanitiseSentryEvents = (data, _hint) => {
5
5
  // Remove URL as it has UGC
6
6
  // TODO: Sanitise the URL instead of just removing it
@@ -1,6 +1,6 @@
1
1
  export { textColorStyles } from './shared/text-color';
2
2
  export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl } from './shared/table';
3
- export { AnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles } from './shared/annotation';
3
+ export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles } from './shared/annotation';
4
4
  export { columnLayoutSharedStyle } from './shared/column-layout';
5
5
  export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
6
6
  export { blockquoteSharedStyles } from './shared/blockquote';
@@ -1,11 +1,19 @@
1
1
  import { css } from '@emotion/react';
2
2
  import { N60A, Y300, Y75 } from '@atlaskit/theme/colors';
3
+ import { commentStatusStyleMap } from '../../media/styles';
3
4
  export const annotationPrefix = 'ak-editor-annotation';
4
5
  export const AnnotationSharedClassNames = {
5
6
  focus: `${annotationPrefix}-focus`,
6
7
  blur: `${annotationPrefix}-blur`,
7
8
  draft: `${annotationPrefix}-draft`
8
9
  };
10
+ export const blockAnnotationPrefix = 'ak-editor-block-annotation';
11
+ export const BlockAnnotationSharedClassNames = {
12
+ focus: `${blockAnnotationPrefix}-focus`,
13
+ blur: `${blockAnnotationPrefix}-blur`,
14
+ draft: `${blockAnnotationPrefix}-draft`
15
+ };
16
+ const mediaNodeDomRef = 'mediaView-content-wrap';
9
17
  const Y75a = 'rgba(255, 240, 179, 0.5)';
10
18
  const Y200a = 'rgba(255, 196, 0, 0.82)';
11
19
  export const AnnotationSharedCSSByState = () => ({
@@ -40,5 +48,22 @@ export const annotationSharedStyles = () => css`
40
48
  .${AnnotationSharedClassNames.blur} {
41
49
  ${AnnotationSharedCSSByState().blur};
42
50
  }
51
+
52
+ // Styling for comments on media node
53
+ .${mediaNodeDomRef}[class*=ak-editor-block-annotation-] {
54
+ border-radius: 3px;
55
+ }
56
+
57
+ .${mediaNodeDomRef}.${BlockAnnotationSharedClassNames.draft} {
58
+ box-shadow: ${commentStatusStyleMap('draft')};
59
+ }
60
+
61
+ .${mediaNodeDomRef}.${BlockAnnotationSharedClassNames.focus} {
62
+ box-shadow: ${commentStatusStyleMap('focus')};
63
+ }
64
+
65
+ .${mediaNodeDomRef}.${BlockAnnotationSharedClassNames.blur} {
66
+ box-shadow: ${commentStatusStyleMap('blur')};
67
+ }
43
68
  }
44
69
  `;
@@ -7,7 +7,7 @@ import { createAndFireEvent, withAnalyticsContext, withAnalyticsEvents } from '@
7
7
  import { N0, N50A, N60A, N900 } from '@atlaskit/theme/colors';
8
8
  import Layer from '../Layer';
9
9
  const packageName = "@atlaskit/editor-common";
10
- const packageVersion = "78.12.2";
10
+ const packageVersion = "78.12.4";
11
11
  const halfFocusRing = 1;
12
12
  const dropOffset = '0, 8';
13
13
  class DropList extends Component {
@@ -20,10 +20,6 @@ export var wrapperStyle = css(wrapperDefault, {
20
20
  });
21
21
  export var inlineWrapperStyels = css({
22
22
  maxWidth: '100%',
23
- display: 'inline-block',
24
- '&::after, &::before': {
25
- display: 'block'
26
- },
27
23
  'tr &': {
28
24
  maxWidth: 'inherit'
29
25
  },
@@ -84,6 +84,7 @@ export var alignRight = makeKeyMapWithCommon('Align Right', 'Mod-Alt-t');
84
84
  export var toggleTaskItemCheckbox = makeKeyMapWithCommon('Toggles task item', 'Mod-Alt-Enter');
85
85
  export var selectRow = makeKeyMapArrayWithCommon('Select row', ['Mod-Alt-Shift-ArrowLeft', 'Mod-Alt-Shift-ArrowRight']);
86
86
  export var selectColumn = makeKeyMapArrayWithCommon('Select column', ['Mod-Alt-Shift-ArrowDown', 'Mod-Alt-Shift-ArrowUp']);
87
+ export var selectTable = makeKeyMapWithCommon('Select table', 'Mod-a');
87
88
  export var increaseMediaSize = makeKeyMapWithCommon('increase image size', 'Mod-Alt-]');
88
89
  export var decreaseMediaSize = makeKeyMapWithCommon('increase image size', 'Mod-Alt-[');
89
90
  var arrowKeysMap = {
@@ -7,4 +7,5 @@ export { captionMessages } from './messages/caption';
7
7
  export { dropPlaceholderMessages } from './messages/dropPlaceholder';
8
8
  export { altTextMessages } from './messages/altText';
9
9
  export { mediaResizeAnnouncerMessMessages } from './messages/mediaResizeAnnouncerMess';
10
- export { commentMessages } from './messages/comments';
10
+ export { commentMessages } from './messages/comments';
11
+ export { commentStatusStyleMap } from './styles';
@@ -0,0 +1,9 @@
1
+ import { Y200, Y300 } from '@atlaskit/theme/colors';
2
+ var boxShadowColorByStatus = {
3
+ draft: "var(--ds-background-accent-yellow-subtle, ".concat(Y300, ")"),
4
+ focus: "var(--ds-background-accent-yellow-subtle, ".concat(Y300, ")"),
5
+ blur: "var(--ds-background-accent-yellow-subtler, ".concat(Y200, ")")
6
+ };
7
+ export var commentStatusStyleMap = function commentStatusStyleMap(status) {
8
+ return "3px 3px 0px 0px ".concat(boxShadowColorByStatus[status]);
9
+ };
@@ -6,7 +6,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
6
6
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
7
7
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
8
8
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
9
- var packageVersion = "78.12.2";
9
+ var packageVersion = "78.12.4";
10
10
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
11
11
  // Remove URL as it has UGC
12
12
  // TODO: Sanitise the URL instead of just removing it
@@ -1,6 +1,6 @@
1
1
  export { textColorStyles } from './shared/text-color';
2
2
  export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl } from './shared/table';
3
- export { AnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles } from './shared/annotation';
3
+ export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles } from './shared/annotation';
4
4
  export { columnLayoutSharedStyle } from './shared/column-layout';
5
5
  export { mediaSingleSharedStyle, richMediaClassName } from './shared/media-single';
6
6
  export { blockquoteSharedStyles } from './shared/blockquote';
@@ -2,12 +2,20 @@ import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral
2
2
  var _templateObject;
3
3
  import { css } from '@emotion/react';
4
4
  import { N60A, Y300, Y75 } from '@atlaskit/theme/colors';
5
+ import { commentStatusStyleMap } from '../../media/styles';
5
6
  export var annotationPrefix = 'ak-editor-annotation';
6
7
  export var AnnotationSharedClassNames = {
7
8
  focus: "".concat(annotationPrefix, "-focus"),
8
9
  blur: "".concat(annotationPrefix, "-blur"),
9
10
  draft: "".concat(annotationPrefix, "-draft")
10
11
  };
12
+ export var blockAnnotationPrefix = 'ak-editor-block-annotation';
13
+ export var BlockAnnotationSharedClassNames = {
14
+ focus: "".concat(blockAnnotationPrefix, "-focus"),
15
+ blur: "".concat(blockAnnotationPrefix, "-blur"),
16
+ draft: "".concat(blockAnnotationPrefix, "-draft")
17
+ };
18
+ var mediaNodeDomRef = 'mediaView-content-wrap';
11
19
  var Y75a = 'rgba(255, 240, 179, 0.5)';
12
20
  var Y200a = 'rgba(255, 196, 0, 0.82)';
13
21
  export var AnnotationSharedCSSByState = function AnnotationSharedCSSByState() {
@@ -31,5 +39,5 @@ export var AnnotationSharedCSSByState = function AnnotationSharedCSSByState() {
31
39
 
32
40
  // eslint-disable-next-line @atlaskit/design-system/no-css-tagged-template-expression -- `AnnotationSharedCSSByState()` is not safe in object syntax
33
41
  export var annotationSharedStyles = function annotationSharedStyles() {
34
- return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur);
42
+ return css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n .ProseMirror {\n .", " {\n ", ";\n }\n\n .", " {\n ", ";\n cursor: initial;\n }\n\n .", " {\n ", ";\n }\n\n // Styling for comments on media node\n .", "[class*=ak-editor-block-annotation-] {\n border-radius: 3px;\n }\n\n .", ".", " {\n box-shadow: ", ";\n }\n\n .", ".", " {\n box-shadow: ", ";\n }\n\n .", ".", " {\n box-shadow: ", ";\n }\n }\n"])), AnnotationSharedClassNames.focus, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.draft, AnnotationSharedCSSByState().focus, AnnotationSharedClassNames.blur, AnnotationSharedCSSByState().blur, mediaNodeDomRef, mediaNodeDomRef, BlockAnnotationSharedClassNames.draft, commentStatusStyleMap('draft'), mediaNodeDomRef, BlockAnnotationSharedClassNames.focus, commentStatusStyleMap('focus'), mediaNodeDomRef, BlockAnnotationSharedClassNames.blur, commentStatusStyleMap('blur'));
35
43
  };
@@ -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 = "78.12.2";
20
+ var packageVersion = "78.12.4";
21
21
  var halfFocusRing = 1;
22
22
  var dropOffset = '0, 8';
23
23
  var DropList = /*#__PURE__*/function (_Component) {
@@ -81,6 +81,7 @@ export declare const alignRight: Keymap;
81
81
  export declare const toggleTaskItemCheckbox: Keymap;
82
82
  export declare const selectRow: Keymap[];
83
83
  export declare const selectColumn: Keymap[];
84
+ export declare const selectTable: Keymap;
84
85
  export declare const increaseMediaSize: Keymap;
85
86
  export declare const decreaseMediaSize: Keymap;
86
87
  export declare function tooltip(keymap?: Keymap, description?: string): string | undefined;
@@ -8,3 +8,4 @@ export { dropPlaceholderMessages } from './messages/dropPlaceholder';
8
8
  export { altTextMessages } from './messages/altText';
9
9
  export { mediaResizeAnnouncerMessMessages } from './messages/mediaResizeAnnouncerMess';
10
10
  export { commentMessages } from './messages/comments';
11
+ export { commentStatusStyleMap } from './styles';
@@ -0,0 +1,2 @@
1
+ export type CommentStatus = 'draft' | 'focus' | 'blur';
2
+ export declare const commentStatusStyleMap: (status: CommentStatus) => string;
@@ -1,6 +1,6 @@
1
1
  export { textColorStyles } from './shared/text-color';
2
2
  export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl, } from './shared/table';
3
- export { AnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles, } from './shared/annotation';
3
+ export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles, } from './shared/annotation';
4
4
  export { columnLayoutSharedStyle } from './shared/column-layout';
5
5
  export { mediaSingleSharedStyle, richMediaClassName, } from './shared/media-single';
6
6
  export { blockquoteSharedStyles } from './shared/blockquote';
@@ -4,6 +4,12 @@ export declare const AnnotationSharedClassNames: {
4
4
  blur: string;
5
5
  draft: string;
6
6
  };
7
+ export declare const blockAnnotationPrefix = "ak-editor-block-annotation";
8
+ export declare const BlockAnnotationSharedClassNames: {
9
+ focus: string;
10
+ blur: string;
11
+ draft: string;
12
+ };
7
13
  export declare const AnnotationSharedCSSByState: () => {
8
14
  focus: import("@emotion/react").SerializedStyles;
9
15
  blur: import("@emotion/react").SerializedStyles;
@@ -81,6 +81,7 @@ export declare const alignRight: Keymap;
81
81
  export declare const toggleTaskItemCheckbox: Keymap;
82
82
  export declare const selectRow: Keymap[];
83
83
  export declare const selectColumn: Keymap[];
84
+ export declare const selectTable: Keymap;
84
85
  export declare const increaseMediaSize: Keymap;
85
86
  export declare const decreaseMediaSize: Keymap;
86
87
  export declare function tooltip(keymap?: Keymap, description?: string): string | undefined;
@@ -8,3 +8,4 @@ export { dropPlaceholderMessages } from './messages/dropPlaceholder';
8
8
  export { altTextMessages } from './messages/altText';
9
9
  export { mediaResizeAnnouncerMessMessages } from './messages/mediaResizeAnnouncerMess';
10
10
  export { commentMessages } from './messages/comments';
11
+ export { commentStatusStyleMap } from './styles';
@@ -0,0 +1,2 @@
1
+ export type CommentStatus = 'draft' | 'focus' | 'blur';
2
+ export declare const commentStatusStyleMap: (status: CommentStatus) => string;
@@ -1,6 +1,6 @@
1
1
  export { textColorStyles } from './shared/text-color';
2
2
  export { tableSharedStyle, tableMarginTop, tableMarginBottom, tableMarginSides, tableCellMinWidth, tableNewColumnMinWidth, tableCellBorderWidth, calcTableWidth, TableSharedCssClassName, tableResizeHandleWidth, tableCellPadding, tableMarginTopWithControl, } from './shared/table';
3
- export { AnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles, } from './shared/annotation';
3
+ export { AnnotationSharedClassNames, BlockAnnotationSharedClassNames, AnnotationSharedCSSByState, annotationSharedStyles, } from './shared/annotation';
4
4
  export { columnLayoutSharedStyle } from './shared/column-layout';
5
5
  export { mediaSingleSharedStyle, richMediaClassName, } from './shared/media-single';
6
6
  export { blockquoteSharedStyles } from './shared/blockquote';
@@ -4,6 +4,12 @@ export declare const AnnotationSharedClassNames: {
4
4
  blur: string;
5
5
  draft: string;
6
6
  };
7
+ export declare const blockAnnotationPrefix = "ak-editor-block-annotation";
8
+ export declare const BlockAnnotationSharedClassNames: {
9
+ focus: string;
10
+ blur: string;
11
+ draft: string;
12
+ };
7
13
  export declare const AnnotationSharedCSSByState: () => {
8
14
  focus: import("@emotion/react").SerializedStyles;
9
15
  blur: import("@emotion/react").SerializedStyles;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "78.12.2",
3
+ "version": "78.12.4",
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/"