@atlaskit/editor-plugin-code-block 28.0.4 → 28.0.5

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 (71) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/codeBlockPlugin.js +14 -13
  3. package/dist/cjs/editor-commands/index.js +39 -38
  4. package/dist/cjs/pm-plugins/ide-ux/commands.js +16 -15
  5. package/dist/cjs/pm-plugins/input-rule.js +14 -12
  6. package/dist/cjs/pm-plugins/main.js +2 -2
  7. package/dist/cjs/pm-plugins/toolbar.js +11 -12
  8. package/dist/cjs/pm-plugins/transform-to-code-block.js +5 -4
  9. package/dist/cjs/ui/CodeBlockMenuItem.js +7 -7
  10. package/dist/cjs/ui/FormatCodeErrorFlag.js +5 -5
  11. package/dist/cjs/ui/LanguagePicker.js +4 -4
  12. package/dist/cjs/ui/class-names.js +9 -9
  13. package/dist/cjs/ui/icons/WrapIcon.js +2 -2
  14. package/dist/cjs/ui/language-picker-options.js +4 -4
  15. package/dist/cjs/ui/quick-insert/CodeBlockQuickInsertMenuItem.js +7 -7
  16. package/dist/cjs/ui/quick-insert/getCodeBlockQuickInsertComponents.js +3 -3
  17. package/dist/cjs/ui/recent-languages.js +2 -2
  18. package/dist/cjs/utils/auto-detect-view.js +4 -4
  19. package/dist/es2019/codeBlockPlugin.js +4 -3
  20. package/dist/es2019/editor-commands/index.js +4 -3
  21. package/dist/es2019/pm-plugins/ide-ux/commands.js +2 -1
  22. package/dist/es2019/pm-plugins/input-rule.js +6 -4
  23. package/dist/es2019/pm-plugins/main.js +1 -1
  24. package/dist/es2019/pm-plugins/toolbar.js +2 -1
  25. package/dist/es2019/pm-plugins/transform-to-code-block.js +3 -2
  26. package/dist/es2019/ui/CodeBlockMenuItem.js +3 -3
  27. package/dist/es2019/ui/FormatCodeErrorFlag.js +2 -2
  28. package/dist/es2019/ui/LanguagePicker.js +2 -2
  29. package/dist/es2019/ui/class-names.js +1 -1
  30. package/dist/es2019/ui/icons/WrapIcon.js +1 -1
  31. package/dist/es2019/ui/language-picker-options.js +1 -1
  32. package/dist/es2019/ui/quick-insert/CodeBlockQuickInsertMenuItem.js +2 -2
  33. package/dist/es2019/ui/quick-insert/getCodeBlockQuickInsertComponents.js +1 -1
  34. package/dist/es2019/ui/recent-languages.js +1 -1
  35. package/dist/es2019/utils/auto-detect-view.js +1 -1
  36. package/dist/esm/codeBlockPlugin.js +4 -3
  37. package/dist/esm/editor-commands/index.js +4 -3
  38. package/dist/esm/pm-plugins/ide-ux/commands.js +2 -1
  39. package/dist/esm/pm-plugins/input-rule.js +6 -4
  40. package/dist/esm/pm-plugins/main.js +1 -1
  41. package/dist/esm/pm-plugins/toolbar.js +2 -1
  42. package/dist/esm/pm-plugins/transform-to-code-block.js +3 -2
  43. package/dist/esm/ui/CodeBlockMenuItem.js +3 -3
  44. package/dist/esm/ui/FormatCodeErrorFlag.js +2 -2
  45. package/dist/esm/ui/LanguagePicker.js +2 -2
  46. package/dist/esm/ui/class-names.js +1 -1
  47. package/dist/esm/ui/icons/WrapIcon.js +1 -1
  48. package/dist/esm/ui/language-picker-options.js +1 -1
  49. package/dist/esm/ui/quick-insert/CodeBlockQuickInsertMenuItem.js +2 -2
  50. package/dist/esm/ui/quick-insert/getCodeBlockQuickInsertComponents.js +1 -1
  51. package/dist/esm/ui/recent-languages.js +1 -1
  52. package/dist/esm/utils/auto-detect-view.js +1 -1
  53. package/dist/types/codeBlockPluginType.d.ts +14 -13
  54. package/dist/types/editor-commands/index.d.ts +5 -3
  55. package/dist/types/nodeviews/code-block.d.ts +2 -1
  56. package/dist/types/pm-plugins/auto-detect.d.ts +1 -1
  57. package/dist/types/pm-plugins/ide-ux/commands.d.ts +2 -2
  58. package/dist/types/pm-plugins/ide-ux.d.ts +1 -1
  59. package/dist/types/pm-plugins/input-rule.d.ts +1 -1
  60. package/dist/types/pm-plugins/main.d.ts +1 -1
  61. package/dist/types/pm-plugins/toolbar.d.ts +2 -1
  62. package/dist/types/types/index.d.ts +1 -1
  63. package/dist/types/ui/CodeBlockLanguagePicker.d.ts +1 -1
  64. package/dist/types/ui/CodeBlockMenuItem.d.ts +1 -1
  65. package/dist/types/ui/FormatCodeErrorFlag.d.ts +1 -1
  66. package/dist/types/ui/LanguagePicker.d.ts +1 -1
  67. package/dist/types/ui/quick-insert/CodeBlockQuickInsertMenuItem.d.ts +1 -1
  68. package/dist/types/ui/quick-insert/getCodeBlockQuickInsertComponents.d.ts +1 -1
  69. package/dist/types/utils/auto-detect-view.d.ts +1 -1
  70. package/dist/types/utils/format-code/formatter.d.ts +1 -1
  71. package/package.json +2 -2
@@ -4,14 +4,14 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.codeBlockClassNames = void 0;
7
- var _styles = require("@atlaskit/editor-common/styles");
7
+ var _codeBlock = require("@atlaskit/editor-common/styles/code-block");
8
8
  var codeBlockClassNames = exports.codeBlockClassNames = {
9
- container: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER,
10
- start: _styles.CodeBlockSharedCssClassName.CODEBLOCK_START,
11
- end: _styles.CodeBlockSharedCssClassName.CODEBLOCK_END,
12
- contentWrapper: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER,
13
- contentWrapped: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED,
14
- gutter: _styles.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER,
15
- content: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT,
16
- lineNumberWidget: _styles.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET
9
+ container: _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER,
10
+ start: _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_START,
11
+ end: _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_END,
12
+ contentWrapper: _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPER,
13
+ contentWrapped: _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT_WRAPPED,
14
+ gutter: _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_LINE_NUMBER_GUTTER,
15
+ content: _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTENT,
16
+ lineNumberWidget: _codeBlock.CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER_LINE_NUMBER_WIDGET
17
17
  };
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.WrapIcon = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntl = require("react-intl");
10
- var _messages = require("@atlaskit/editor-common/messages");
10
+ var _blockMenu = require("@atlaskit/editor-common/messages/block-menu");
11
11
  var CustomGlyph = function CustomGlyph() {
12
12
  return /*#__PURE__*/_react.default.createElement("svg", {
13
13
  width: "24",
@@ -26,6 +26,6 @@ var CustomGlyph = function CustomGlyph() {
26
26
  var WrapIcon = exports.WrapIcon = function WrapIcon() {
27
27
  var intl = (0, _reactIntl.useIntl)();
28
28
  return /*#__PURE__*/_react.default.createElement(CustomGlyph, {
29
- "aria-label": intl.formatMessage(_messages.blockMenuMessages.wrapIcon)
29
+ "aria-label": intl.formatMessage(_blockMenu.messages.wrapIcon)
30
30
  });
31
31
  };
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getDetectLanguageOption = exports.createGroupedLanguageOptions = exports.PLAIN_TEXT_LANGUAGE_VALUE = exports.NONE_LANGUAGE_VALUE = exports.DETECT_LANGUAGE_VALUE = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _messages = require("@atlaskit/editor-common/messages");
10
+ var _codeBlockButton = require("@atlaskit/editor-common/messages/codeBlockButton");
11
11
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
12
12
  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) { (0, _defineProperty2.default)(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; }
13
13
  var NONE_LANGUAGE_VALUE = exports.NONE_LANGUAGE_VALUE = 'none';
@@ -16,7 +16,7 @@ var PLAIN_TEXT_LANGUAGE_VALUE = exports.PLAIN_TEXT_LANGUAGE_VALUE = 'text';
16
16
  var getDetectLanguageOption = exports.getDetectLanguageOption = function getDetectLanguageOption(formatMessage) {
17
17
  return {
18
18
  alias: [DETECT_LANGUAGE_VALUE],
19
- label: formatMessage(_messages.codeBlockButtonMessages.detectLanguage),
19
+ label: formatMessage(_codeBlockButton.codeBlockButtonMessages.detectLanguage),
20
20
  selectionSource: 'pinned',
21
21
  value: DETECT_LANGUAGE_VALUE
22
22
  };
@@ -45,14 +45,14 @@ var createGroupedLanguageOptions = exports.createGroupedLanguageOptions = functi
45
45
  label: '',
46
46
  options: pinnedOptions
47
47
  }].concat((0, _toConsumableArray2.default)(recentlyUsedLanguages.length > 0 ? [{
48
- label: formatMessage(_messages.codeBlockButtonMessages.recentlyUsed),
48
+ label: formatMessage(_codeBlockButton.codeBlockButtonMessages.recentlyUsed),
49
49
  options: recentlyUsedLanguages.map(function (language) {
50
50
  return _objectSpread(_objectSpread({}, language), {}, {
51
51
  selectionSource: 'recentlyUsed'
52
52
  });
53
53
  })
54
54
  }] : []), [{
55
- label: formatMessage(_messages.codeBlockButtonMessages.all),
55
+ label: formatMessage(_codeBlockButton.codeBlockButtonMessages.all),
56
56
  options: allLanguages.map(function (language) {
57
57
  return _objectSpread(_objectSpread({}, language), {}, {
58
58
  selectionSource: 'all'
@@ -8,10 +8,10 @@ Object.defineProperty(exports, "__esModule", {
8
8
  exports.CodeBlockQuickInsertMenuItem = void 0;
9
9
  var _react = _interopRequireWildcard(require("react"));
10
10
  var _reactIntl = require("react-intl");
11
- var _hooks = require("@atlaskit/editor-common/hooks");
12
- var _messages = require("@atlaskit/editor-common/messages");
11
+ var _blockType = require("@atlaskit/editor-common/messages/block-type");
13
12
  var _menuItem = require("@atlaskit/editor-common/quick-insert/menu-item");
14
- var _messages2 = require("@atlaskit/editor-common/quick-insert/messages");
13
+ var _messages = require("@atlaskit/editor-common/quick-insert/messages");
14
+ var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
15
15
  var _angleBrackets = _interopRequireDefault(require("@atlaskit/icon/core/angle-brackets"));
16
16
  var _editorCommands = require("../../editor-commands");
17
17
  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); }
@@ -24,11 +24,11 @@ var CodeBlockQuickInsertMenuItem = exports.CodeBlockQuickInsertMenuItem = functi
24
24
  return previewImageUrls ? {
25
25
  image: previewImageUrls,
26
26
  attribution: {
27
- name: formatMessage(_messages2.messages.previewAttributionAtlassian)
27
+ name: formatMessage(_messages.messages.previewAttributionAtlassian)
28
28
  }
29
29
  } : undefined;
30
30
  }, [formatMessage, previewImageUrls]);
31
- var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['editorDisabled'], function (states) {
31
+ var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(api, ['editorDisabled'], function (states) {
32
32
  var _states$editorDisable;
33
33
  return {
34
34
  editorDisabled: (_states$editorDisable = states.editorDisabledState) === null || _states$editorDisable === void 0 ? void 0 : _states$editorDisable.editorDisabled
@@ -46,7 +46,7 @@ var CodeBlockQuickInsertMenuItem = exports.CodeBlockQuickInsertMenuItem = functi
46
46
  });
47
47
  }, [api]);
48
48
  return /*#__PURE__*/_react.default.createElement(_menuItem.QuickInsertMenuItem, {
49
- description: formatMessage(_messages.blockTypeMessages.codeblockDescription),
49
+ description: formatMessage(_blockType.messages.codeblockDescription),
50
50
  iconBefore: /*#__PURE__*/_react.default.createElement(_angleBrackets.default, {
51
51
  label: ""
52
52
  }),
@@ -54,6 +54,6 @@ var CodeBlockQuickInsertMenuItem = exports.CodeBlockQuickInsertMenuItem = functi
54
54
  onSelect: onSelect,
55
55
  preview: preview,
56
56
  shortcut: "```",
57
- title: formatMessage(_messages.blockTypeMessages.codeblock)
57
+ title: formatMessage(_blockType.messages.codeblock)
58
58
  });
59
59
  };
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.getCodeBlockQuickInsertComponents = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _messages = require("@atlaskit/editor-common/messages");
9
+ var _blockType = require("@atlaskit/editor-common/messages/block-type");
10
10
  var _createQuickInsertMatcher = require("@atlaskit/editor-common/quick-insert/create-quick-insert-matcher");
11
11
  var _keys = require("@atlaskit/editor-common/quick-insert/keys");
12
12
  var _rank = require("@atlaskit/editor-common/quick-insert/rank");
@@ -28,10 +28,10 @@ var getCodeBlockQuickInsertComponents = exports.getCodeBlockQuickInsertComponent
28
28
  match: (0, _createQuickInsertMatcher.createQuickInsertMatcher)(function (_ref2) {
29
29
  var formatMessage = _ref2.formatMessage;
30
30
  return {
31
- description: formatMessage(_messages.blockTypeMessages.codeblockDescription),
31
+ description: formatMessage(_blockType.messages.codeblockDescription),
32
32
  keywords: ['code block'],
33
33
  shortcut: '```',
34
- title: formatMessage(_messages.blockTypeMessages.codeblock)
34
+ title: formatMessage(_blockType.messages.codeblock)
35
35
  };
36
36
  }),
37
37
  component: function component() {
@@ -6,7 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.saveRecentLanguage = exports.getRecentLanguages = exports.clearRecentLanguages = exports.RECENT_LANGUAGES_STORAGE_KEY = void 0;
8
8
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
9
- var _storageClient = require("@atlaskit/frontend-utilities/storage-client");
9
+ var _StorageClient = require("@atlaskit/frontend-utilities/StorageClient");
10
10
  var _languageList = require("../pm-plugins/language-list");
11
11
  var _languagePickerOptions = require("./language-picker-options");
12
12
  var RECENT_LANGUAGES_STORAGE_KEY = exports.RECENT_LANGUAGES_STORAGE_KEY = 'recently-used-languages';
@@ -16,7 +16,7 @@ var RECENT_LANGUAGE_BLOCKLIST = new Set([_languagePickerOptions.DETECT_LANGUAGE_
16
16
  var KNOWN_LANGUAGE_VALUES = new Set(_languageList.DEFAULT_LANGUAGES.map(function (language) {
17
17
  return (0, _languageList.getLanguageIdentifier)(language);
18
18
  }));
19
- var recentLanguagesStorageClient = new _storageClient.StorageClient(RECENT_LANGUAGES_STORAGE_CLIENT_KEY);
19
+ var recentLanguagesStorageClient = new _StorageClient.StorageClient(RECENT_LANGUAGES_STORAGE_CLIENT_KEY);
20
20
  var isValidRecentLanguage = function isValidRecentLanguage(language) {
21
21
  return KNOWN_LANGUAGE_VALUES.has(language) && !RECENT_LANGUAGE_BLOCKLIST.has(language);
22
22
  };
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.syncPendingDetectionTimers = void 0;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
9
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
10
- var _analytics = require("@atlaskit/editor-common/analytics");
10
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
11
11
  var _actions = require("../pm-plugins/actions");
12
12
  var _autoDetectState = require("../pm-plugins/auto-detect-state");
13
13
  var _autoDetectState2 = require("./auto-detect-state");
@@ -61,14 +61,14 @@ var runPendingDetection = function runPendingDetection(view, localId, api) {
61
61
  language: detectedLanguage
62
62
  }), found.node.marks);
63
63
  api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || _api$analytics.actions.attachAnalyticsEvent({
64
- action: _analytics.ACTION.LANGUAGE_AUTO_DETECTED,
65
- actionSubject: _analytics.ACTION_SUBJECT.CODE_BLOCK,
64
+ action: _enums.ACTION.LANGUAGE_AUTO_DETECTED,
65
+ actionSubject: _enums.ACTION_SUBJECT.CODE_BLOCK,
66
66
  attributes: {
67
67
  language: detectedLanguage !== null && detectedLanguage !== void 0 ? detectedLanguage : 'none',
68
68
  detectionResult: detectionResult,
69
69
  detectionPhase: detectionPhase
70
70
  },
71
- eventType: _analytics.EVENT_TYPE.TRACK
71
+ eventType: _enums.EVENT_TYPE.TRACK
72
72
  })(tr);
73
73
  }
74
74
  tr.setMeta(_autoDetectState.autoDetectPluginKey, {
@@ -1,9 +1,10 @@
1
1
  import React from 'react';
2
2
  import { codeBlock, codeBlockWithLocalId } from '@atlaskit/adf-schema/code-block';
3
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
3
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
4
4
  import { IconCode } from '@atlaskit/editor-common/assets';
5
- import { TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION_RANK } from '@atlaskit/editor-common/block-menu';
6
- import { blockTypeMessages } from '@atlaskit/editor-common/messages';
5
+ import { TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM } from '@atlaskit/editor-common/block-menu/key';
6
+ import { TRANSFORM_STRUCTURE_MENU_SECTION_RANK } from '@atlaskit/editor-common/block-menu/rank';
7
+ import { messages as blockTypeMessages } from '@atlaskit/editor-common/messages/block-type';
7
8
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
8
9
  import { fg } from '@atlaskit/platform-feature-flags/fg';
9
10
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
@@ -1,10 +1,11 @@
1
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, MODE, PLATFORMS, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
+ import { MODE, PLATFORMS } from '@atlaskit/editor-common/analytics/types/general-events';
2
3
  import { copyToClipboard, getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
3
4
  import { codeBlockWrappedStates, getDefaultCodeBlockAttrs, isCodeBlockWordWrapEnabled } from '@atlaskit/editor-common/code-block';
4
- import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
5
5
  import { contentAllowedInCodeBlock, shouldSplitSelectedNodeOnNodeInsertion } from '@atlaskit/editor-common/insert';
6
- import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset';
6
+ import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset/editor-commands';
7
7
  import { findCodeBlock } from '@atlaskit/editor-common/transforms';
8
+ import { withAnalytics } from '@atlaskit/editor-common/withAnalytics';
8
9
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
9
10
  import { findParentNodeOfType, findSelectedNodeOfType, isNodeSelection, removeParentNodeOfType, removeSelectedNode, safeInsert } from '@atlaskit/editor-prosemirror/utils';
10
11
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -1,4 +1,5 @@
1
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
+ import { INDENT_DIRECTION, INDENT_TYPE } from '@atlaskit/editor-common/analytics/types/format-events';
2
3
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
4
  import { forEachLine, getLineInfo, getLinesFromSelection, getStartOfCurrentLine } from './line-handling';
4
5
 
@@ -1,10 +1,12 @@
1
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
2
  import { getDefaultCodeBlockAttrs } from '@atlaskit/editor-common/code-block';
3
- import { insertBlock } from '@atlaskit/editor-common/commands';
3
+ import { insertBlock } from '@atlaskit/editor-common/commands/insert-block';
4
4
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
- import { createRule, inputRuleWithAnalytics } from '@atlaskit/editor-common/utils';
5
+ import { createRule } from '@atlaskit/editor-common/utils';
6
+ import { inputRuleWithAnalytics } from '@atlaskit/editor-common/utils/input-rules';
6
7
  import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
7
- import { createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
8
+ import { leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules/constants';
9
+ import { createPlugin } from '@atlaskit/prosemirror-input-rules/utils';
8
10
  import { isConvertableToCodeBlock, transformToCodeBlockAction } from './transform-to-code-block';
9
11
 
10
12
  // eslint-disable-next-line require-unicode-regexp
@@ -1,6 +1,6 @@
1
1
  import { getBrowserInfo } from '@atlaskit/editor-common/browser';
2
2
  import { updateCodeBlockWrappedStateNodeKeys } from '@atlaskit/editor-common/code-block';
3
- import { blockTypeMessages } from '@atlaskit/editor-common/messages';
3
+ import { messages as blockTypeMessages } from '@atlaskit/editor-common/messages/block-type';
4
4
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
5
  import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
6
6
  import { findCodeBlock } from '@atlaskit/editor-common/transforms';
@@ -1,6 +1,7 @@
1
1
  import React from 'react';
2
2
  import { areCodeBlockLineNumbersVisible, isCodeBlockWordWrapEnabled } from '@atlaskit/editor-common/code-block';
3
- import commonMessages, { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
3
+ import commonMessages from '@atlaskit/editor-common/messages';
4
+ import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages/codeBlockButton';
4
5
  import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
5
6
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
6
7
  import AngleBracketsIcon from '@atlaskit/icon/core/angle-brackets';
@@ -1,5 +1,6 @@
1
- import { GapCursorSelection } from '@atlaskit/editor-common/selection';
2
- import { mapSlice, timestampToString } from '@atlaskit/editor-common/utils';
1
+ import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
2
+ import { timestampToString } from '@atlaskit/editor-common/utils/date';
3
+ import { mapSlice } from '@atlaskit/editor-common/utils/slice';
3
4
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
4
5
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
5
6
  export function transformToCodeBlockAction(state, start,
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
- import { blockMenuMessages } from '@atlaskit/editor-common/messages';
5
- import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
3
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
4
+ import { messages as blockMenuMessages } from '@atlaskit/editor-common/messages/block-menu';
5
+ import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
6
6
  import AngleBracketsIcon from '@atlaskit/icon/core/angle-brackets';
7
7
  const NODE_NAME = 'codeBlock';
8
8
  const CodeBlockMenuItem = ({
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
- import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
3
+ import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages/codeBlockButton';
4
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
5
5
  import AkFlag from '@atlaskit/flag/flag';
6
6
  import { FlagGroup } from '@atlaskit/flag/flag-group';
7
7
  import StatusErrorIcon from '@atlaskit/icon/core/status-error';
@@ -3,8 +3,8 @@ import "./LanguagePicker.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { Fragment, useCallback, useMemo, useRef, useState } from 'react';
5
5
  import Button from '@atlaskit/button/default/button';
6
- import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
7
- import { akEditorLineHeight } from '@atlaskit/editor-shared-styles';
6
+ import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages/codeBlockButton';
7
+ import { akEditorLineHeight } from '@atlaskit/editor-shared-styles/constants';
8
8
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
9
9
  import { Box } from '@atlaskit/primitives/compiled';
10
10
  import { components } from '@atlaskit/react-select/components';
@@ -1,4 +1,4 @@
1
- import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
1
+ import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles/code-block';
2
2
  export const codeBlockClassNames = {
3
3
  container: CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER,
4
4
  start: CodeBlockSharedCssClassName.CODEBLOCK_START,
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { blockMenuMessages } from '@atlaskit/editor-common/messages';
3
+ import { messages as blockMenuMessages } from '@atlaskit/editor-common/messages/block-menu';
4
4
  const CustomGlyph = () => /*#__PURE__*/React.createElement("svg", {
5
5
  width: "24",
6
6
  height: "24",
@@ -1,4 +1,4 @@
1
- import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
1
+ import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages/codeBlockButton';
2
2
  export const NONE_LANGUAGE_VALUE = 'none';
3
3
  export const DETECT_LANGUAGE_VALUE = 'autodetect';
4
4
  export const PLAIN_TEXT_LANGUAGE_VALUE = 'text';
@@ -1,9 +1,9 @@
1
1
  import React, { useCallback, useMemo } from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
- import { blockTypeMessages } from '@atlaskit/editor-common/messages';
3
+ import { messages as blockTypeMessages } from '@atlaskit/editor-common/messages/block-type';
5
4
  import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
6
5
  import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
6
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
7
7
  import AngleBracketsIcon from '@atlaskit/icon/core/angle-brackets';
8
8
  import { createInsertCodeBlockTransactionWithAnalytics } from '../../editor-commands';
9
9
  export const CodeBlockQuickInsertMenuItem = ({
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { blockTypeMessages } from '@atlaskit/editor-common/messages';
2
+ import { messages as blockTypeMessages } from '@atlaskit/editor-common/messages/block-type';
3
3
  import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
4
4
  import { CODE_BLOCK_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
5
5
  import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
@@ -1,4 +1,4 @@
1
- import { StorageClient } from '@atlaskit/frontend-utilities/storage-client';
1
+ import { StorageClient } from '@atlaskit/frontend-utilities/StorageClient';
2
2
  import { DEFAULT_LANGUAGES, getLanguageIdentifier } from '../pm-plugins/language-list';
3
3
  import { DETECT_LANGUAGE_VALUE, NONE_LANGUAGE_VALUE, PLAIN_TEXT_LANGUAGE_VALUE } from './language-picker-options';
4
4
  export const RECENT_LANGUAGES_STORAGE_KEY = 'recently-used-languages';
@@ -1,4 +1,4 @@
1
- import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
1
+ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
2
2
  import { ACTIONS } from '../pm-plugins/actions';
3
3
  import { autoDetectPluginKey } from '../pm-plugins/auto-detect-state';
4
4
  import { createAutoDetectEntry } from './auto-detect-state';
@@ -4,10 +4,11 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
4
4
  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; }
5
5
  import React from 'react';
6
6
  import { codeBlock, codeBlockWithLocalId } from '@atlaskit/adf-schema/code-block';
7
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
7
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
8
8
  import { IconCode } from '@atlaskit/editor-common/assets';
9
- import { TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM, TRANSFORM_STRUCTURE_MENU_SECTION_RANK } from '@atlaskit/editor-common/block-menu';
10
- import { blockTypeMessages } from '@atlaskit/editor-common/messages';
9
+ import { TRANSFORM_STRUCTURE_MENU_SECTION, TRANSFORM_STRUCTURE_CODE_BLOCK_MENU_ITEM } from '@atlaskit/editor-common/block-menu/key';
10
+ import { TRANSFORM_STRUCTURE_MENU_SECTION_RANK } from '@atlaskit/editor-common/block-menu/rank';
11
+ import { messages as blockTypeMessages } from '@atlaskit/editor-common/messages/block-type';
11
12
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
12
13
  import { fg } from '@atlaskit/platform-feature-flags/fg';
13
14
  import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
@@ -1,13 +1,14 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  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; }
4
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, MODE, PLATFORMS, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
5
+ import { MODE, PLATFORMS } from '@atlaskit/editor-common/analytics/types/general-events';
5
6
  import { copyToClipboard, getAnalyticsPayload } from '@atlaskit/editor-common/clipboard';
6
7
  import { codeBlockWrappedStates, getDefaultCodeBlockAttrs, isCodeBlockWordWrapEnabled } from '@atlaskit/editor-common/code-block';
7
- import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
8
8
  import { contentAllowedInCodeBlock, shouldSplitSelectedNodeOnNodeInsertion } from '@atlaskit/editor-common/insert';
9
- import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset';
9
+ import { editorCommandToPMCommand } from '@atlaskit/editor-common/preset/editor-commands';
10
10
  import { findCodeBlock } from '@atlaskit/editor-common/transforms';
11
+ import { withAnalytics } from '@atlaskit/editor-common/withAnalytics';
11
12
  import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
12
13
  import { findParentNodeOfType, findSelectedNodeOfType, isNodeSelection, removeParentNodeOfType, removeSelectedNode, safeInsert } from '@atlaskit/editor-prosemirror/utils';
13
14
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
@@ -1,4 +1,5 @@
1
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INDENT_DIRECTION, INDENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
+ import { INDENT_DIRECTION, INDENT_TYPE } from '@atlaskit/editor-common/analytics/types/format-events';
2
3
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
4
  import { forEachLine, getLineInfo, getLinesFromSelection, getStartOfCurrentLine } from './line-handling';
4
5
 
@@ -1,10 +1,12 @@
1
- import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
2
2
  import { getDefaultCodeBlockAttrs } from '@atlaskit/editor-common/code-block';
3
- import { insertBlock } from '@atlaskit/editor-common/commands';
3
+ import { insertBlock } from '@atlaskit/editor-common/commands/insert-block';
4
4
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
5
- import { createRule, inputRuleWithAnalytics } from '@atlaskit/editor-common/utils';
5
+ import { createRule } from '@atlaskit/editor-common/utils';
6
+ import { inputRuleWithAnalytics } from '@atlaskit/editor-common/utils/input-rules';
6
7
  import { safeInsert } from '@atlaskit/editor-prosemirror/utils';
7
- import { createPlugin, leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules';
8
+ import { leafNodeReplacementCharacter } from '@atlaskit/prosemirror-input-rules/constants';
9
+ import { createPlugin } from '@atlaskit/prosemirror-input-rules/utils';
8
10
  import { isConvertableToCodeBlock, transformToCodeBlockAction } from './transform-to-code-block';
9
11
 
10
12
  // eslint-disable-next-line require-unicode-regexp
@@ -3,7 +3,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
3
3
  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; }
4
4
  import { getBrowserInfo } from '@atlaskit/editor-common/browser';
5
5
  import { updateCodeBlockWrappedStateNodeKeys } from '@atlaskit/editor-common/code-block';
6
- import { blockTypeMessages } from '@atlaskit/editor-common/messages';
6
+ import { messages as blockTypeMessages } from '@atlaskit/editor-common/messages/block-type';
7
7
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
8
8
  import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
9
9
  import { findCodeBlock } from '@atlaskit/editor-common/transforms';
@@ -4,7 +4,8 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
4
4
  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; }
5
5
  import React from 'react';
6
6
  import { areCodeBlockLineNumbersVisible, isCodeBlockWordWrapEnabled } from '@atlaskit/editor-common/code-block';
7
- import commonMessages, { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
7
+ import commonMessages from '@atlaskit/editor-common/messages';
8
+ import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages/codeBlockButton';
8
9
  import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
9
10
  import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
10
11
  import AngleBracketsIcon from '@atlaskit/icon/core/angle-brackets';
@@ -1,5 +1,6 @@
1
- import { GapCursorSelection } from '@atlaskit/editor-common/selection';
2
- import { mapSlice, timestampToString } from '@atlaskit/editor-common/utils';
1
+ import { GapCursorSelection } from '@atlaskit/editor-common/selection/gap-cursor/selection';
2
+ import { timestampToString } from '@atlaskit/editor-common/utils/date';
3
+ import { mapSlice } from '@atlaskit/editor-common/utils/slice';
3
4
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
4
5
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
5
6
  export function transformToCodeBlockAction(state, start,
@@ -1,8 +1,8 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
4
- import { blockMenuMessages } from '@atlaskit/editor-common/messages';
5
- import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar';
3
+ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
4
+ import { messages as blockMenuMessages } from '@atlaskit/editor-common/messages/block-menu';
5
+ import { ToolbarDropdownItem } from '@atlaskit/editor-toolbar/toolbar-dropdown-item';
6
6
  import AngleBracketsIcon from '@atlaskit/icon/core/angle-brackets';
7
7
  var NODE_NAME = 'codeBlock';
8
8
  var CodeBlockMenuItem = function CodeBlockMenuItem(_ref) {
@@ -1,7 +1,7 @@
1
1
  import React, { useCallback } from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
- import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
3
+ import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages/codeBlockButton';
4
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
5
5
  import AkFlag from '@atlaskit/flag/flag';
6
6
  import { FlagGroup } from '@atlaskit/flag/flag-group';
7
7
  import StatusErrorIcon from '@atlaskit/icon/core/status-error';
@@ -8,8 +8,8 @@ function _unsupportedIterableToArray(r, a) { if (r) { if ("string" == typeof r)
8
8
  function _arrayLikeToArray(r, a) { (null == a || a > r.length) && (a = r.length); for (var e = 0, n = Array(a); e < a; e++) n[e] = r[e]; return n; }
9
9
  import React, { Fragment, useCallback, useMemo, useRef, useState } from 'react';
10
10
  import Button from '@atlaskit/button/default/button';
11
- import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
12
- import { akEditorLineHeight } from '@atlaskit/editor-shared-styles';
11
+ import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages/codeBlockButton';
12
+ import { akEditorLineHeight } from '@atlaskit/editor-shared-styles/constants';
13
13
  import ChevronDownIcon from '@atlaskit/icon/core/chevron-down';
14
14
  import { Box } from '@atlaskit/primitives/compiled';
15
15
  import { components } from '@atlaskit/react-select/components';
@@ -1,4 +1,4 @@
1
- import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles';
1
+ import { CodeBlockSharedCssClassName } from '@atlaskit/editor-common/styles/code-block';
2
2
  export var codeBlockClassNames = {
3
3
  container: CodeBlockSharedCssClassName.CODEBLOCK_CONTAINER,
4
4
  start: CodeBlockSharedCssClassName.CODEBLOCK_START,
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { blockMenuMessages } from '@atlaskit/editor-common/messages';
3
+ import { messages as blockMenuMessages } from '@atlaskit/editor-common/messages/block-menu';
4
4
  var CustomGlyph = function CustomGlyph() {
5
5
  return /*#__PURE__*/React.createElement("svg", {
6
6
  width: "24",
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  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; }
5
- import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages';
5
+ import { codeBlockButtonMessages } from '@atlaskit/editor-common/messages/codeBlockButton';
6
6
  export var NONE_LANGUAGE_VALUE = 'none';
7
7
  export var DETECT_LANGUAGE_VALUE = 'autodetect';
8
8
  export var PLAIN_TEXT_LANGUAGE_VALUE = 'text';
@@ -1,9 +1,9 @@
1
1
  import React, { useCallback, useMemo } from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
- import { blockTypeMessages } from '@atlaskit/editor-common/messages';
3
+ import { messages as blockTypeMessages } from '@atlaskit/editor-common/messages/block-type';
5
4
  import { QuickInsertMenuItem } from '@atlaskit/editor-common/quick-insert/menu-item';
6
5
  import { messages as quickInsertMessages } from '@atlaskit/editor-common/quick-insert/messages';
6
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
7
7
  import AngleBracketsIcon from '@atlaskit/icon/core/angle-brackets';
8
8
  import { createInsertCodeBlockTransactionWithAnalytics } from '../../editor-commands';
9
9
  export var CodeBlockQuickInsertMenuItem = function CodeBlockQuickInsertMenuItem(_ref) {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { blockTypeMessages } from '@atlaskit/editor-common/messages';
2
+ import { messages as blockTypeMessages } from '@atlaskit/editor-common/messages/block-type';
3
3
  import { createQuickInsertMatcher } from '@atlaskit/editor-common/quick-insert/create-quick-insert-matcher';
4
4
  import { CODE_BLOCK_MENU_ITEM, STRUCTURE_SECTION } from '@atlaskit/editor-common/quick-insert/keys';
5
5
  import { STRUCTURE_SECTION_RANK } from '@atlaskit/editor-common/quick-insert/rank';
@@ -1,5 +1,5 @@
1
1
  import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
2
- import { StorageClient } from '@atlaskit/frontend-utilities/storage-client';
2
+ import { StorageClient } from '@atlaskit/frontend-utilities/StorageClient';
3
3
  import { DEFAULT_LANGUAGES, getLanguageIdentifier } from '../pm-plugins/language-list';
4
4
  import { DETECT_LANGUAGE_VALUE, NONE_LANGUAGE_VALUE, PLAIN_TEXT_LANGUAGE_VALUE } from './language-picker-options';
5
5
  export var RECENT_LANGUAGES_STORAGE_KEY = 'recently-used-languages';
@@ -2,7 +2,7 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
2
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
3
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
4
4
  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; }
5
- import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
5
+ import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics/types/enums';
6
6
  import { ACTIONS } from '../pm-plugins/actions';
7
7
  import { autoDetectPluginKey } from '../pm-plugins/auto-detect-state';
8
8
  import { createAutoDetectEntry } from './auto-detect-state';