@atlaskit/editor-common 107.26.0 → 107.26.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 107.26.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`31fc6b9e10762`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/31fc6b9e10762) -
8
+ [ux] ED-28592 ED-28592:Add copy block menu item to block menu
9
+ - Updated dependencies
10
+
11
+ ## 107.26.1
12
+
13
+ ### Patch Changes
14
+
15
+ - [`57b19274b9fdd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/57b19274b9fdd) -
16
+ EDITOR-1373 Bump adf-schema version
17
+ - Updated dependencies
18
+
3
19
  ## 107.26.0
4
20
 
5
21
  ### Minor Changes
@@ -0,0 +1,17 @@
1
+ {
2
+ "name": "@atlaskit/editor-common/block-menu",
3
+ "main": "../dist/cjs/block-menu/index.js",
4
+ "module": "../dist/esm/block-menu/index.js",
5
+ "module:es2019": "../dist/es2019/block-menu/index.js",
6
+ "sideEffects": [
7
+ "**/*.compiled.css"
8
+ ],
9
+ "types": "../dist/types/block-menu/index.d.ts",
10
+ "typesVersions": {
11
+ ">=4.5 <5.9": {
12
+ "*": [
13
+ "../dist/types-ts4.5/block-menu/index.d.ts"
14
+ ]
15
+ }
16
+ }
17
+ }
@@ -0,0 +1,12 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ Object.defineProperty(exports, "messages", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _messages.messages;
10
+ }
11
+ });
12
+ var _messages = require("./messages");
@@ -0,0 +1,14 @@
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
+ copyBlock: {
10
+ id: 'fabric.editor.block.menu.copy.block',
11
+ defaultMessage: 'Copy Block',
12
+ description: 'Copy the selected block to the clipboard'
13
+ }
14
+ });
@@ -3,10 +3,14 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ exports.copyDomNode = void 0;
6
7
  exports.getSelectedNodeOrNodeParentByNodeType = getSelectedNodeOrNodeParentByNodeType;
7
8
  exports.toDOM = void 0;
8
9
  var _model = require("@atlaskit/editor-prosemirror/model");
10
+ var _state = require("@atlaskit/editor-prosemirror/state");
9
11
  var _utils = require("@atlaskit/editor-prosemirror/utils");
12
+ var _clipboard = require("../clipboard");
13
+ var _utils2 = require("../utils");
10
14
  function getSelectedNodeOrNodeParentByNodeType(_ref) {
11
15
  var nodeType = _ref.nodeType,
12
16
  selection = _ref.selection;
@@ -18,4 +22,35 @@ function getSelectedNodeOrNodeParentByNodeType(_ref) {
18
22
  }
19
23
  var toDOM = exports.toDOM = function toDOM(node, schema) {
20
24
  return _model.DOMSerializer.fromSchema(schema).serializeNode(node);
25
+ };
26
+ var copyDomNode = exports.copyDomNode = function copyDomNode(domNode, nodeType, selection) {
27
+ if (domNode) {
28
+ var div = document.createElement('div');
29
+ div.appendChild(domNode);
30
+ var schema = selection.$from.doc.type.schema;
31
+
32
+ // if copying inline content
33
+ if (nodeType.inlineContent) {
34
+ // The "1 1" refers to the start and end depth of the slice
35
+ // since we're copying the text inside a paragraph, it will always be 1 1
36
+ // https://github.com/ProseMirror/prosemirror-view/blob/master/src/clipboard.ts#L32
37
+ // Ignored via go/ees005
38
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
39
+ div.firstChild.setAttribute('data-pm-slice', '1 1 []');
40
+ } else {
41
+ // The "0 0" refers to the start and end depth of the slice
42
+ // since we're copying the block node only, it will always be 0 0
43
+ // https://github.com/ProseMirror/prosemirror-view/blob/master/src/clipboard.ts#L32
44
+ // Ignored via go/ees005
45
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
46
+ div.firstChild.setAttribute('data-pm-slice', '0 0 []');
47
+ }
48
+ // ED-17083 safari seems have bugs for extension copy because exntension do not have a child text(innerText) and it will not recognized as html in clipboard, this could be merge into one if this extension fixed children issue or safari fix the copy bug
49
+ // MEX-2528 safari has a bug related to the mediaSingle node with border or link. The image tag within the clipboard is not recognized as HTML when using the ClipboardItem API. To address this, we have to switch to ClipboardPolyfill
50
+ if (_utils2.browser.safari && selection instanceof _state.NodeSelection && (selection.node.type === schema.nodes.extension || selection.node.type === schema.nodes.mediaSingle)) {
51
+ (0, _clipboard.copyHTMLToClipboardPolyfill)(div);
52
+ } else {
53
+ (0, _clipboard.copyHTMLToClipboard)(div);
54
+ }
55
+ }
21
56
  };
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
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 = "107.25.5";
19
+ var packageVersion = "107.26.1";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
24
24
  * @jsx jsx
25
25
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
26
26
  var packageName = "@atlaskit/editor-common";
27
- var packageVersion = "107.25.5";
27
+ var packageVersion = "107.26.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { messages } from './messages';
@@ -0,0 +1,8 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export const messages = defineMessages({
3
+ copyBlock: {
4
+ id: 'fabric.editor.block.menu.copy.block',
5
+ defaultMessage: 'Copy Block',
6
+ description: 'Copy the selected block to the clipboard'
7
+ }
8
+ });
@@ -1,5 +1,8 @@
1
1
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
2
+ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
2
3
  import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
4
+ import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill } from '../clipboard';
5
+ import { browser } from '../utils';
3
6
  export function getSelectedNodeOrNodeParentByNodeType({
4
7
  nodeType,
5
8
  selection
@@ -12,4 +15,35 @@ export function getSelectedNodeOrNodeParentByNodeType({
12
15
  }
13
16
  export const toDOM = (node, schema) => {
14
17
  return DOMSerializer.fromSchema(schema).serializeNode(node);
18
+ };
19
+ export const copyDomNode = (domNode, nodeType, selection) => {
20
+ if (domNode) {
21
+ const div = document.createElement('div');
22
+ div.appendChild(domNode);
23
+ const schema = selection.$from.doc.type.schema;
24
+
25
+ // if copying inline content
26
+ if (nodeType.inlineContent) {
27
+ // The "1 1" refers to the start and end depth of the slice
28
+ // since we're copying the text inside a paragraph, it will always be 1 1
29
+ // https://github.com/ProseMirror/prosemirror-view/blob/master/src/clipboard.ts#L32
30
+ // Ignored via go/ees005
31
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
32
+ div.firstChild.setAttribute('data-pm-slice', '1 1 []');
33
+ } else {
34
+ // The "0 0" refers to the start and end depth of the slice
35
+ // since we're copying the block node only, it will always be 0 0
36
+ // https://github.com/ProseMirror/prosemirror-view/blob/master/src/clipboard.ts#L32
37
+ // Ignored via go/ees005
38
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
39
+ div.firstChild.setAttribute('data-pm-slice', '0 0 []');
40
+ }
41
+ // ED-17083 safari seems have bugs for extension copy because exntension do not have a child text(innerText) and it will not recognized as html in clipboard, this could be merge into one if this extension fixed children issue or safari fix the copy bug
42
+ // MEX-2528 safari has a bug related to the mediaSingle node with border or link. The image tag within the clipboard is not recognized as HTML when using the ClipboardItem API. To address this, we have to switch to ClipboardPolyfill
43
+ if (browser.safari && selection instanceof NodeSelection && (selection.node.type === schema.nodes.extension || selection.node.type === schema.nodes.mediaSingle)) {
44
+ copyHTMLToClipboardPolyfill(div);
45
+ } else {
46
+ copyHTMLToClipboard(div);
47
+ }
48
+ }
15
49
  };
@@ -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 = "107.25.5";
4
+ const packageVersion = "107.26.1";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "107.25.5";
17
+ const packageVersion = "107.26.1";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -0,0 +1,2 @@
1
+ /* eslint-disable @atlaskit/editor/no-re-export */
2
+ export { messages } from './messages';
@@ -0,0 +1,8 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var messages = defineMessages({
3
+ copyBlock: {
4
+ id: 'fabric.editor.block.menu.copy.block',
5
+ defaultMessage: 'Copy Block',
6
+ description: 'Copy the selected block to the clipboard'
7
+ }
8
+ });
@@ -1,5 +1,8 @@
1
1
  import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
2
+ import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
2
3
  import { findParentNodeOfType, findSelectedNodeOfType } from '@atlaskit/editor-prosemirror/utils';
4
+ import { copyHTMLToClipboard, copyHTMLToClipboardPolyfill } from '../clipboard';
5
+ import { browser } from '../utils';
3
6
  export function getSelectedNodeOrNodeParentByNodeType(_ref) {
4
7
  var nodeType = _ref.nodeType,
5
8
  selection = _ref.selection;
@@ -11,4 +14,35 @@ export function getSelectedNodeOrNodeParentByNodeType(_ref) {
11
14
  }
12
15
  export var toDOM = function toDOM(node, schema) {
13
16
  return DOMSerializer.fromSchema(schema).serializeNode(node);
17
+ };
18
+ export var copyDomNode = function copyDomNode(domNode, nodeType, selection) {
19
+ if (domNode) {
20
+ var div = document.createElement('div');
21
+ div.appendChild(domNode);
22
+ var schema = selection.$from.doc.type.schema;
23
+
24
+ // if copying inline content
25
+ if (nodeType.inlineContent) {
26
+ // The "1 1" refers to the start and end depth of the slice
27
+ // since we're copying the text inside a paragraph, it will always be 1 1
28
+ // https://github.com/ProseMirror/prosemirror-view/blob/master/src/clipboard.ts#L32
29
+ // Ignored via go/ees005
30
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
31
+ div.firstChild.setAttribute('data-pm-slice', '1 1 []');
32
+ } else {
33
+ // The "0 0" refers to the start and end depth of the slice
34
+ // since we're copying the block node only, it will always be 0 0
35
+ // https://github.com/ProseMirror/prosemirror-view/blob/master/src/clipboard.ts#L32
36
+ // Ignored via go/ees005
37
+ // eslint-disable-next-line @atlaskit/editor/no-as-casting
38
+ div.firstChild.setAttribute('data-pm-slice', '0 0 []');
39
+ }
40
+ // ED-17083 safari seems have bugs for extension copy because exntension do not have a child text(innerText) and it will not recognized as html in clipboard, this could be merge into one if this extension fixed children issue or safari fix the copy bug
41
+ // MEX-2528 safari has a bug related to the mediaSingle node with border or link. The image tag within the clipboard is not recognized as HTML when using the ClipboardItem API. To address this, we have to switch to ClipboardPolyfill
42
+ if (browser.safari && selection instanceof NodeSelection && (selection.node.type === schema.nodes.extension || selection.node.type === schema.nodes.mediaSingle)) {
43
+ copyHTMLToClipboardPolyfill(div);
44
+ } else {
45
+ copyHTMLToClipboard(div);
46
+ }
47
+ }
14
48
  };
@@ -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 = "107.25.5";
10
+ var packageVersion = "107.26.1";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "107.25.5";
24
+ var packageVersion = "107.26.1";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -0,0 +1 @@
1
+ export { messages } from './messages';
@@ -0,0 +1,7 @@
1
+ export declare const messages: {
2
+ copyBlock: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ };
@@ -1,8 +1,9 @@
1
1
  import type { NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
2
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
+ import type { Transaction, Selection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
4
4
  export declare function getSelectedNodeOrNodeParentByNodeType({ nodeType, selection, }: {
5
5
  nodeType: NodeType | Array<NodeType>;
6
6
  selection: Transaction['selection'];
7
7
  }): ContentNodeWithPos | undefined;
8
8
  export declare const toDOM: (node: PMNode, schema: Schema) => Node;
9
+ export declare const copyDomNode: (domNode: Node, nodeType: NodeType, selection: Selection) => void;
@@ -1,4 +1,4 @@
1
- export { TOOLBAR_RANK, AI_SECTION_RANK, ROVO_GROUP_RANK, IMPROVE_WRITING_GROUP_RANK, ROVO_MENU_RANK, ROVO_PROMPT_MENU_SECTION_RANK, CHANGE_TONE_MENU_RANK, CHANGE_TONE_MENU_SECTION_RANK, TRANSLATE_MENU_RANK, COLLAB_SECTION_RANK, COMMENT_GROUP_RANK, TEXT_SECTION_RANK, TEXT_STYLES_GROUP_RANK, TEXT_STYLES_MENU_RANK, TEXT_STYLES_MENU_SECTION_RANK, TEXT_FORMAT_GROUP_RANK, TEXT_FORMAT_MENU_RANK, TEXT_FORMATTING_MENU_SECTION_RANK, CLEAR_FORMARTTING_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_GROUP_RANK, TEXT_COLOR_HIGHLIGHT_MENU_RANK, OVERFLOW_SECTION_RANK, OVERFLOW_GROUP_RANK, OVERFLOW_MENU_RANK, PIN_MENU_SECTION_RANK, INSERT_BLOCK_SECTION_RANK, TASK_LIST_GROUP_RANK, MEDIA_GROUP_RANK, MENTION_GROUP_RANK, EMOJI_GROUP_RANK, LAYOUT_GROUP_RANK, TABLE_GROUP_RANK, LINKING_SECTION_RANK, LINKING_GROUP_RANK, ALIGNMENT_GROUP_RANK, ALIGNMENT_MENU_RANK, ALIGNMENT_MENU_SECTION_RANK, LISTS_INDENTATION_GROUP_RANK, LISTS_INDENTATION_MENU_RANK, LISTS_INDENTATION_MENU_SECTION_RANK, TRACK_CHANGES_SECTION_RANK, TRACK_CHANGES_GROUP_RANK } from './rank';
1
+ export { TOOLBAR_RANK, AI_SECTION_RANK, ROVO_GROUP_RANK, IMPROVE_WRITING_GROUP_RANK, ROVO_MENU_RANK, ROVO_PROMPT_MENU_SECTION_RANK, CHANGE_TONE_MENU_RANK, CHANGE_TONE_MENU_SECTION_RANK, TRANSLATE_MENU_RANK, COLLAB_SECTION_RANK, COMMENT_GROUP_RANK, TEXT_SECTION_RANK, TEXT_STYLES_GROUP_RANK, TEXT_STYLES_MENU_RANK, TEXT_STYLES_MENU_SECTION_RANK, TEXT_FORMAT_GROUP_RANK, TEXT_FORMAT_MENU_RANK, TEXT_FORMATTING_MENU_SECTION_RANK, CLEAR_FORMARTTING_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_GROUP_RANK, TEXT_COLOR_HIGHLIGHT_MENU_RANK, OVERFLOW_SECTION_RANK, OVERFLOW_GROUP_RANK, OVERFLOW_MENU_RANK, PIN_MENU_SECTION_RANK, INSERT_BLOCK_SECTION_RANK, TASK_LIST_GROUP_RANK, MEDIA_GROUP_RANK, MENTION_GROUP_RANK, EMOJI_GROUP_RANK, LAYOUT_GROUP_RANK, TABLE_GROUP_RANK, LINKING_SECTION_RANK, LINKING_GROUP_RANK, ALIGNMENT_GROUP_RANK, ALIGNMENT_MENU_RANK, ALIGNMENT_MENU_SECTION_RANK, LISTS_INDENTATION_GROUP_RANK, LISTS_INDENTATION_MENU_RANK, LISTS_INDENTATION_MENU_SECTION_RANK, TRACK_CHANGES_SECTION_RANK, TRACK_CHANGES_GROUP_RANK, } from './rank';
2
2
  export { TOOLBARS, AI_SECTION, ROVO_GROUP, IMPROVE_WRITING_GROUP, IMPROVE_WRITING_BUTTON, ROVO_HERO_BUTTON, ROVO_MENU, ROVO_PROMPT_MENU_SECTION, MAKE_SHORTER_MENU_ITEM, MAKE_LONGER_MENU_ITEM, CHANGE_TONE_NESTED_MENU, SPELLING_AND_GRAMMAR_MENU_ITEM, CHANGE_TONE_MENU_SECTION, MORE_PROFESSIONAL_MENU_ITEM, MORE_CASUAL_MENU_ITEM, MORE_EMPATHETIC_MENU_ITEM, TRANSLATE_NESTED_MENU, TRANSLATE_MENU_SECTION, TEXT_SECTION, TEXT_FORMATTING_GROUP, TEXT_FORMATTING_HERO_BUTTON, TEXT_FORMATTING_MENU, TEXT_FORMATTING_MENU_SECTION, TEXT_STYLES_GROUP, TEXT_STYLES_MENU, TEXT_STYLES_MENU_SECTION, NORMAL_TEXT_MENU_ITEM, HEADING_1_MENU_ITEM, HEADING_2_MENU_ITEM, HEADING_3_MENU_ITEM, HEADING_4_MENU_ITEM, HEADING_5_MENU_ITEM, HEADING_6_MENU_ITEM, BLOCK_QUOTE_MENU_ITEM, BOLD_MENU_ITEM, ITALIC_MENU_ITEM, UNDERLINE_MENU_ITEM, STRIKE_MENU_ITEM, CODE_MENU_ITEM, SUBSCRIPT_MENU_ITEM, SUPERSCRIPT_MENU_ITEM, CLEAR_FORMARTTING_MENU_SECTION, CLEAR_FORMATTING_MENU_ITEM, LISTS_INDENTATION_GROUP, LISTS_INDENTATION_HERO_BUTTON, LISTS_INDENTATION_MENU, LISTS_INDENTATION_MENU_SECTION, BULLETED_LIST_MENU_ITEM, NUMBERED_LIST_MENU_ITEM, TASK_LIST_MENU_ITEM, INDENT_MENU_ITEM, OUTDENT_MENU_ITEM, INSERT_BLOCK_SECTION, TASK_LIST_BUTTON, TASK_LIST_GROUP, MEDIA_BUTTON, MEDIA_GROUP, MENTION_BUTTON, MENTION_GROUP, EMOJI_BUTTON, EMOJI_GROUP, LAYOUT_BUTTON, LAYOUT_GROUP, TABLE_BUTTON, TABLE_GROUP, TABLE_SIZE_PICKER, LINKING_SECTION, LINKING_GROUP, LINKING_BUTTON, COLLAB_SECTION, COMMENT_GROUP, COMMENT_HERO_BUTTON, APPS_SECTION, OVERFLOW_SECTION, TEXT_COLOR_HIGHLIGHT_GROUP, TEXT_COLOR_HIGHLIGHT_MENU, TEXT_COLOR_HIGHLIGHT_MENU_SECTION, TEXT_COLOR_MENU_ITEM, HIGHLIGHT_MENU_ITEM, OVERFLOW_GROUP, OVERFLOW_MENU, PIN_MENU_SECTION, PIN_MENU_ITEM, ALIGNMENT_GROUP, ALIGNMENT_MENU, ALIGNMENT_MENU_SECTION, ALIGN_LEFT_MENU_ITEM, ALIGN_CENTER_MENU_ITEM, ALIGN_RIGHT_MENU_ITEM, TRACK_CHANGES_GROUP, TRACK_CHANGES_SECTION, UNDO_BUTTON, REDO_BUTTON, TRACK_CHANGES_BUTTON, } from './keys';
3
3
  export { useEditorToolbar, EditorToolbarProvider } from './context';
4
4
  export { EditorToolbarUIProvider } from './EditorToolbarUIProvider';
@@ -0,0 +1 @@
1
+ export { messages } from './messages';
@@ -0,0 +1,7 @@
1
+ export declare const messages: {
2
+ copyBlock: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ };
@@ -1,8 +1,9 @@
1
1
  import type { NodeType, Node as PMNode, Schema } from '@atlaskit/editor-prosemirror/model';
2
- import type { Transaction } from '@atlaskit/editor-prosemirror/state';
2
+ import type { Transaction, Selection } from '@atlaskit/editor-prosemirror/state';
3
3
  import { type ContentNodeWithPos } from '@atlaskit/editor-prosemirror/utils';
4
4
  export declare function getSelectedNodeOrNodeParentByNodeType({ nodeType, selection, }: {
5
5
  nodeType: NodeType | Array<NodeType>;
6
6
  selection: Transaction['selection'];
7
7
  }): ContentNodeWithPos | undefined;
8
8
  export declare const toDOM: (node: PMNode, schema: Schema) => Node;
9
+ export declare const copyDomNode: (domNode: Node, nodeType: NodeType, selection: Selection) => void;
@@ -1,4 +1,4 @@
1
- export { TOOLBAR_RANK, AI_SECTION_RANK, ROVO_GROUP_RANK, IMPROVE_WRITING_GROUP_RANK, ROVO_MENU_RANK, ROVO_PROMPT_MENU_SECTION_RANK, CHANGE_TONE_MENU_RANK, CHANGE_TONE_MENU_SECTION_RANK, TRANSLATE_MENU_RANK, COLLAB_SECTION_RANK, COMMENT_GROUP_RANK, TEXT_SECTION_RANK, TEXT_STYLES_GROUP_RANK, TEXT_STYLES_MENU_RANK, TEXT_STYLES_MENU_SECTION_RANK, TEXT_FORMAT_GROUP_RANK, TEXT_FORMAT_MENU_RANK, TEXT_FORMATTING_MENU_SECTION_RANK, CLEAR_FORMARTTING_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_GROUP_RANK, TEXT_COLOR_HIGHLIGHT_MENU_RANK, OVERFLOW_SECTION_RANK, OVERFLOW_GROUP_RANK, OVERFLOW_MENU_RANK, PIN_MENU_SECTION_RANK, INSERT_BLOCK_SECTION_RANK, TASK_LIST_GROUP_RANK, MEDIA_GROUP_RANK, MENTION_GROUP_RANK, EMOJI_GROUP_RANK, LAYOUT_GROUP_RANK, TABLE_GROUP_RANK, LINKING_SECTION_RANK, LINKING_GROUP_RANK, ALIGNMENT_GROUP_RANK, ALIGNMENT_MENU_RANK, ALIGNMENT_MENU_SECTION_RANK, LISTS_INDENTATION_GROUP_RANK, LISTS_INDENTATION_MENU_RANK, LISTS_INDENTATION_MENU_SECTION_RANK, TRACK_CHANGES_SECTION_RANK, TRACK_CHANGES_GROUP_RANK } from './rank';
1
+ export { TOOLBAR_RANK, AI_SECTION_RANK, ROVO_GROUP_RANK, IMPROVE_WRITING_GROUP_RANK, ROVO_MENU_RANK, ROVO_PROMPT_MENU_SECTION_RANK, CHANGE_TONE_MENU_RANK, CHANGE_TONE_MENU_SECTION_RANK, TRANSLATE_MENU_RANK, COLLAB_SECTION_RANK, COMMENT_GROUP_RANK, TEXT_SECTION_RANK, TEXT_STYLES_GROUP_RANK, TEXT_STYLES_MENU_RANK, TEXT_STYLES_MENU_SECTION_RANK, TEXT_FORMAT_GROUP_RANK, TEXT_FORMAT_MENU_RANK, TEXT_FORMATTING_MENU_SECTION_RANK, CLEAR_FORMARTTING_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_MENU_SECTION_RANK, TEXT_COLOR_HIGHLIGHT_GROUP_RANK, TEXT_COLOR_HIGHLIGHT_MENU_RANK, OVERFLOW_SECTION_RANK, OVERFLOW_GROUP_RANK, OVERFLOW_MENU_RANK, PIN_MENU_SECTION_RANK, INSERT_BLOCK_SECTION_RANK, TASK_LIST_GROUP_RANK, MEDIA_GROUP_RANK, MENTION_GROUP_RANK, EMOJI_GROUP_RANK, LAYOUT_GROUP_RANK, TABLE_GROUP_RANK, LINKING_SECTION_RANK, LINKING_GROUP_RANK, ALIGNMENT_GROUP_RANK, ALIGNMENT_MENU_RANK, ALIGNMENT_MENU_SECTION_RANK, LISTS_INDENTATION_GROUP_RANK, LISTS_INDENTATION_MENU_RANK, LISTS_INDENTATION_MENU_SECTION_RANK, TRACK_CHANGES_SECTION_RANK, TRACK_CHANGES_GROUP_RANK, } from './rank';
2
2
  export { TOOLBARS, AI_SECTION, ROVO_GROUP, IMPROVE_WRITING_GROUP, IMPROVE_WRITING_BUTTON, ROVO_HERO_BUTTON, ROVO_MENU, ROVO_PROMPT_MENU_SECTION, MAKE_SHORTER_MENU_ITEM, MAKE_LONGER_MENU_ITEM, CHANGE_TONE_NESTED_MENU, SPELLING_AND_GRAMMAR_MENU_ITEM, CHANGE_TONE_MENU_SECTION, MORE_PROFESSIONAL_MENU_ITEM, MORE_CASUAL_MENU_ITEM, MORE_EMPATHETIC_MENU_ITEM, TRANSLATE_NESTED_MENU, TRANSLATE_MENU_SECTION, TEXT_SECTION, TEXT_FORMATTING_GROUP, TEXT_FORMATTING_HERO_BUTTON, TEXT_FORMATTING_MENU, TEXT_FORMATTING_MENU_SECTION, TEXT_STYLES_GROUP, TEXT_STYLES_MENU, TEXT_STYLES_MENU_SECTION, NORMAL_TEXT_MENU_ITEM, HEADING_1_MENU_ITEM, HEADING_2_MENU_ITEM, HEADING_3_MENU_ITEM, HEADING_4_MENU_ITEM, HEADING_5_MENU_ITEM, HEADING_6_MENU_ITEM, BLOCK_QUOTE_MENU_ITEM, BOLD_MENU_ITEM, ITALIC_MENU_ITEM, UNDERLINE_MENU_ITEM, STRIKE_MENU_ITEM, CODE_MENU_ITEM, SUBSCRIPT_MENU_ITEM, SUPERSCRIPT_MENU_ITEM, CLEAR_FORMARTTING_MENU_SECTION, CLEAR_FORMATTING_MENU_ITEM, LISTS_INDENTATION_GROUP, LISTS_INDENTATION_HERO_BUTTON, LISTS_INDENTATION_MENU, LISTS_INDENTATION_MENU_SECTION, BULLETED_LIST_MENU_ITEM, NUMBERED_LIST_MENU_ITEM, TASK_LIST_MENU_ITEM, INDENT_MENU_ITEM, OUTDENT_MENU_ITEM, INSERT_BLOCK_SECTION, TASK_LIST_BUTTON, TASK_LIST_GROUP, MEDIA_BUTTON, MEDIA_GROUP, MENTION_BUTTON, MENTION_GROUP, EMOJI_BUTTON, EMOJI_GROUP, LAYOUT_BUTTON, LAYOUT_GROUP, TABLE_BUTTON, TABLE_GROUP, TABLE_SIZE_PICKER, LINKING_SECTION, LINKING_GROUP, LINKING_BUTTON, COLLAB_SECTION, COMMENT_GROUP, COMMENT_HERO_BUTTON, APPS_SECTION, OVERFLOW_SECTION, TEXT_COLOR_HIGHLIGHT_GROUP, TEXT_COLOR_HIGHLIGHT_MENU, TEXT_COLOR_HIGHLIGHT_MENU_SECTION, TEXT_COLOR_MENU_ITEM, HIGHLIGHT_MENU_ITEM, OVERFLOW_GROUP, OVERFLOW_MENU, PIN_MENU_SECTION, PIN_MENU_ITEM, ALIGNMENT_GROUP, ALIGNMENT_MENU, ALIGNMENT_MENU_SECTION, ALIGN_LEFT_MENU_ITEM, ALIGN_CENTER_MENU_ITEM, ALIGN_RIGHT_MENU_ITEM, TRACK_CHANGES_GROUP, TRACK_CHANGES_SECTION, UNDO_BUTTON, REDO_BUTTON, TRACK_CHANGES_BUTTON, } from './keys';
3
3
  export { useEditorToolbar, EditorToolbarProvider } from './context';
4
4
  export { EditorToolbarUIProvider } from './EditorToolbarUIProvider';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "107.26.0",
3
+ "version": "107.26.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/"
@@ -90,6 +90,7 @@
90
90
  "./lists": "./src/lists/index.ts",
91
91
  "./element-browser": "./src/element-browser/index.ts",
92
92
  "./floating-toolbar": "./src/floating-toolbar/index.ts",
93
+ "./block-menu": "./src/block-menu/index.ts",
93
94
  "./copy-button": "./src/copy-button/index.ts",
94
95
  "./legacy-rank-plugins": "./src/rank.ts",
95
96
  "./browser": "./src/utils/browser.ts",
@@ -124,7 +125,7 @@
124
125
  },
125
126
  "dependencies": {
126
127
  "@atlaskit/activity-provider": "^2.5.0",
127
- "@atlaskit/adf-schema": "^50.2.0",
128
+ "@atlaskit/adf-schema": "^50.2.1",
128
129
  "@atlaskit/adf-utils": "^19.21.0",
129
130
  "@atlaskit/analytics-listeners": "^9.0.0",
130
131
  "@atlaskit/analytics-namespaced-context": "^7.0.0",
@@ -136,7 +137,7 @@
136
137
  "@atlaskit/css": "^0.12.0",
137
138
  "@atlaskit/custom-steps": "^0.11.0",
138
139
  "@atlaskit/dropdown-menu": "^16.3.0",
139
- "@atlaskit/editor-json-transformer": "^8.25.0",
140
+ "@atlaskit/editor-json-transformer": "^8.27.0",
140
141
  "@atlaskit/editor-palette": "^2.1.0",
141
142
  "@atlaskit/editor-prosemirror": "7.0.0",
142
143
  "@atlaskit/editor-shared-styles": "^3.6.0",
@@ -144,10 +145,10 @@
144
145
  "@atlaskit/editor-toolbar": "^0.3.0",
145
146
  "@atlaskit/editor-toolbar-model": "^0.1.0",
146
147
  "@atlaskit/emoji": "^69.5.0",
147
- "@atlaskit/icon": "^27.12.0",
148
+ "@atlaskit/icon": "^28.0.0",
148
149
  "@atlaskit/icon-object": "^7.2.0",
149
150
  "@atlaskit/link": "^3.2.0",
150
- "@atlaskit/link-datasource": "^4.19.0",
151
+ "@atlaskit/link-datasource": "^4.20.0",
151
152
  "@atlaskit/link-picker": "^3.9.0",
152
153
  "@atlaskit/media-card": "^79.5.0",
153
154
  "@atlaskit/media-client": "^35.3.0",
@@ -167,7 +168,7 @@
167
168
  "@atlaskit/profilecard": "^24.5.0",
168
169
  "@atlaskit/react-ufo": "^4.4.0",
169
170
  "@atlaskit/section-message": "^8.5.0",
170
- "@atlaskit/smart-card": "^40.10.0",
171
+ "@atlaskit/smart-card": "^40.11.0",
171
172
  "@atlaskit/smart-user-picker": "^8.1.0",
172
173
  "@atlaskit/spinner": "^19.0.0",
173
174
  "@atlaskit/status": "^3.0.0",