@atlaskit/editor-core 193.29.3 → 193.30.1

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 (100) hide show
  1. package/CHANGELOG.md +22 -0
  2. package/afm-cc/tsconfig.json +0 -3
  3. package/afm-jira/tsconfig.json +0 -3
  4. package/dist/cjs/actions/index.js +1 -2
  5. package/dist/cjs/create-editor/ReactEditorView.js +3 -4
  6. package/dist/cjs/ui/Addon/index.js +0 -7
  7. package/dist/cjs/ui/Appearance/Chromeless.js +2 -2
  8. package/dist/cjs/ui/Appearance/FullPage/StyledComponents.js +2 -2
  9. package/dist/cjs/ui/ContentStyles/index.js +1 -1
  10. package/dist/cjs/ui/ContextPanel/index.js +2 -2
  11. package/dist/cjs/ui/ToolbarFeedback/index.js +4 -4
  12. package/dist/cjs/ui/ToolbarHelp/index.js +2 -2
  13. package/dist/cjs/utils/document.js +0 -6
  14. package/dist/cjs/utils/index.js +0 -157
  15. package/dist/cjs/version-wrapper.js +1 -1
  16. package/dist/es2019/actions/index.js +1 -2
  17. package/dist/es2019/create-editor/ReactEditorView.js +1 -2
  18. package/dist/es2019/ui/Addon/index.js +0 -1
  19. package/dist/es2019/ui/Appearance/Chromeless.js +1 -1
  20. package/dist/es2019/ui/Appearance/FullPage/StyledComponents.js +1 -1
  21. package/dist/es2019/ui/ContentStyles/index.js +1 -1
  22. package/dist/es2019/ui/ContextPanel/index.js +1 -1
  23. package/dist/es2019/ui/ToolbarFeedback/index.js +2 -2
  24. package/dist/es2019/ui/ToolbarHelp/index.js +1 -1
  25. package/dist/es2019/utils/document.js +0 -1
  26. package/dist/es2019/utils/index.js +1 -73
  27. package/dist/es2019/version-wrapper.js +1 -1
  28. package/dist/esm/actions/index.js +1 -2
  29. package/dist/esm/create-editor/ReactEditorView.js +1 -2
  30. package/dist/esm/ui/Addon/index.js +0 -1
  31. package/dist/esm/ui/Appearance/Chromeless.js +1 -1
  32. package/dist/esm/ui/Appearance/FullPage/StyledComponents.js +1 -1
  33. package/dist/esm/ui/ContentStyles/index.js +1 -1
  34. package/dist/esm/ui/ContextPanel/index.js +1 -1
  35. package/dist/esm/ui/ToolbarFeedback/index.js +2 -2
  36. package/dist/esm/ui/ToolbarHelp/index.js +1 -1
  37. package/dist/esm/utils/document.js +0 -1
  38. package/dist/esm/utils/index.js +1 -75
  39. package/dist/esm/version-wrapper.js +1 -1
  40. package/dist/types/actions/index.d.ts +1 -1
  41. package/dist/types/create-editor/create-preset.d.ts +12 -4
  42. package/dist/types/presets/default.d.ts +12 -4
  43. package/dist/types/presets/universal.d.ts +12 -4
  44. package/dist/types/presets/useUniversalPreset.d.ts +12 -4
  45. package/dist/types/ui/Addon/index.d.ts +0 -1
  46. package/dist/types/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  47. package/dist/types/ui/ContentStyles/index.d.ts +2 -2
  48. package/dist/types/utils/document.d.ts +0 -1
  49. package/dist/types/utils/index.d.ts +0 -22
  50. package/dist/types-ts4.5/actions/index.d.ts +1 -1
  51. package/dist/types-ts4.5/create-editor/create-preset.d.ts +16 -4
  52. package/dist/types-ts4.5/presets/default.d.ts +16 -4
  53. package/dist/types-ts4.5/presets/universal.d.ts +16 -4
  54. package/dist/types-ts4.5/presets/useUniversalPreset.d.ts +16 -4
  55. package/dist/types-ts4.5/ui/Addon/index.d.ts +0 -1
  56. package/dist/types-ts4.5/ui/Appearance/FullPage/StyledComponents.d.ts +1 -1
  57. package/dist/types-ts4.5/ui/ContentStyles/index.d.ts +2 -2
  58. package/dist/types-ts4.5/utils/document.d.ts +0 -1
  59. package/dist/types-ts4.5/utils/index.d.ts +0 -22
  60. package/package.json +11 -7
  61. package/dist/cjs/keymaps/index.js +0 -594
  62. package/dist/cjs/ui/Addon/DropdownItem/index.js +0 -24
  63. package/dist/cjs/ui/Addon/DropdownItem/styles.js +0 -27
  64. package/dist/cjs/ui/ToolbarButton/index.js +0 -14
  65. package/dist/cjs/ui/WithPluginState/index.js +0 -8
  66. package/dist/cjs/ui/styles.js +0 -19
  67. package/dist/cjs/ui/with-outer-listeners.js +0 -8
  68. package/dist/cjs/utils/nodes.js +0 -36
  69. package/dist/es2019/keymaps/index.js +0 -1
  70. package/dist/es2019/ui/Addon/DropdownItem/index.js +0 -13
  71. package/dist/es2019/ui/Addon/DropdownItem/styles.js +0 -20
  72. package/dist/es2019/ui/ToolbarButton/index.js +0 -3
  73. package/dist/es2019/ui/WithPluginState/index.js +0 -2
  74. package/dist/es2019/ui/styles.js +0 -2
  75. package/dist/es2019/ui/with-outer-listeners.js +0 -2
  76. package/dist/es2019/utils/nodes.js +0 -1
  77. package/dist/esm/keymaps/index.js +0 -1
  78. package/dist/esm/ui/Addon/DropdownItem/index.js +0 -17
  79. package/dist/esm/ui/Addon/DropdownItem/styles.js +0 -20
  80. package/dist/esm/ui/ToolbarButton/index.js +0 -3
  81. package/dist/esm/ui/WithPluginState/index.js +0 -2
  82. package/dist/esm/ui/styles.js +0 -2
  83. package/dist/esm/ui/with-outer-listeners.js +0 -2
  84. package/dist/esm/utils/nodes.js +0 -1
  85. package/dist/types/keymaps/index.d.ts +0 -2
  86. package/dist/types/ui/Addon/DropdownItem/index.d.ts +0 -5
  87. package/dist/types/ui/Addon/DropdownItem/styles.d.ts +0 -1
  88. package/dist/types/ui/ToolbarButton/index.d.ts +0 -4
  89. package/dist/types/ui/WithPluginState/index.d.ts +0 -4
  90. package/dist/types/ui/styles.d.ts +0 -2
  91. package/dist/types/ui/with-outer-listeners.d.ts +0 -2
  92. package/dist/types/utils/nodes.d.ts +0 -1
  93. package/dist/types-ts4.5/keymaps/index.d.ts +0 -2
  94. package/dist/types-ts4.5/ui/Addon/DropdownItem/index.d.ts +0 -5
  95. package/dist/types-ts4.5/ui/Addon/DropdownItem/styles.d.ts +0 -1
  96. package/dist/types-ts4.5/ui/ToolbarButton/index.d.ts +0 -4
  97. package/dist/types-ts4.5/ui/WithPluginState/index.d.ts +0 -4
  98. package/dist/types-ts4.5/ui/styles.d.ts +0 -2
  99. package/dist/types-ts4.5/ui/with-outer-listeners.d.ts +0 -2
  100. package/dist/types-ts4.5/utils/nodes.d.ts +0 -1
package/CHANGELOG.md CHANGED
@@ -1,5 +1,27 @@
1
1
  # @atlaskit/editor-core
2
2
 
3
+ ## 193.30.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [#115969](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/115969)
8
+ [`761dca055a7af`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/761dca055a7af) -
9
+ Cleanup unused code in editor-core.
10
+
11
+ ## 193.30.0
12
+
13
+ ### Minor Changes
14
+
15
+ - [`955949c077d4f`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/955949c077d4f) -
16
+ [ux] [ED-23627] Text highlighting UI review
17
+
18
+ ### Patch Changes
19
+
20
+ - [#115817](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/115817)
21
+ [`d647eedc6ddd4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/d647eedc6ddd4) -
22
+ [ux] [ED-23275] Feature flag cleanup for allow-extended-panel
23
+ - Updated dependencies
24
+
3
25
  ## 193.29.3
4
26
 
5
27
  ### Patch Changes
@@ -34,9 +34,6 @@
34
34
  {
35
35
  "path": "../../editor-common/afm-cc/tsconfig.json"
36
36
  },
37
- {
38
- "path": "../../editor-json-transformer/afm-cc/tsconfig.json"
39
- },
40
37
  {
41
38
  "path": "../../editor-plugins/afm-cc/tsconfig.json"
42
39
  },
@@ -33,9 +33,6 @@
33
33
  {
34
34
  "path": "../../editor-common/afm-jira/tsconfig.json"
35
35
  },
36
- {
37
- "path": "../../editor-json-transformer/afm-jira/tsconfig.json"
38
- },
39
36
  {
40
37
  "path": "../../editor-plugins/afm-jira/tsconfig.json"
41
38
  },
@@ -15,7 +15,6 @@ var _model = require("@atlaskit/editor-prosemirror/model");
15
15
  var _state = require("@atlaskit/editor-prosemirror/state");
16
16
  var _utils2 = require("@atlaskit/editor-prosemirror/utils");
17
17
  var _eventDispatcher = require("../event-dispatcher");
18
- var _utils3 = require("../utils");
19
18
  var _action = require("../utils/action");
20
19
  var _deprecationWarnings = _interopRequireDefault(require("../utils/deprecation-warnings"));
21
20
  var _document = require("../utils/document");
@@ -255,7 +254,7 @@ var EditorActions = exports.default = /*#__PURE__*/function () {
255
254
  return (0, _action.getEditorValueWithMedia)(editorView);
256
255
  case 5:
257
256
  doc = _context3.sent;
258
- json = (0, _utils3.toJSON)(doc);
257
+ json = (0, _utils.toJSON)(doc);
259
258
  if (this.contentEncode) {
260
259
  _context3.next = 9;
261
260
  break;
@@ -29,7 +29,6 @@ var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
29
29
  var _eventDispatcher = require("../event-dispatcher");
30
30
  var _document = require("../utils/document");
31
31
  var _isFullPage = require("../utils/is-full-page");
32
- var _nodes = require("../utils/nodes");
33
32
  var _RenderTracking = require("../utils/performance/components/RenderTracking");
34
33
  var _measureEnum = _interopRequireDefault(require("../utils/performance/measure-enum"));
35
34
  var _pluginPerformanceObserver = require("../utils/performance/plugin-performance-observer");
@@ -301,8 +300,8 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
301
300
  var _this$experienceStore;
302
301
  (_this$experienceStore = _this.experienceStore) === null || _this$experienceStore === void 0 || _this$experienceStore.start(_ufo.EditorExperience.interaction);
303
302
  }
304
- var nodes = (0, _nodes.findChangedNodesFromTransaction)(unsafeTransaction);
305
- var changedNodesValid = (0, _nodes.validateNodes)(nodes);
303
+ var nodes = (0, _utils.findChangedNodesFromTransaction)(unsafeTransaction);
304
+ var changedNodesValid = (0, _utils.validateNodes)(nodes);
306
305
  var transaction = new Proxy(unsafeTransaction, (0, _saferTransactions.freezeUnsafeTransactionProperties)({
307
306
  dispatchAnalyticsEvent: _this.dispatchAnalyticsEvent,
308
307
  pluginKey: 'unknown-reacteditorview'
@@ -376,7 +375,7 @@ var ReactEditorView = exports.ReactEditorView = /*#__PURE__*/function (_React$Co
376
375
  } else {
377
376
  var _this$experienceStore8;
378
377
  var invalidNodes = nodes.filter(function (node) {
379
- return !(0, _nodes.validNode)(node);
378
+ return !(0, _utils.validNode)(node);
380
379
  }).map(function (node) {
381
380
  return (0, _coreUtils.getDocStructure)(node, {
382
381
  compact: true
@@ -4,12 +4,6 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- Object.defineProperty(exports, "Addon", {
8
- enumerable: true,
9
- get: function get() {
10
- return _DropdownItem.default;
11
- }
12
- });
13
7
  Object.defineProperty(exports, "ClickAreaBlock", {
14
8
  enumerable: true,
15
9
  get: function get() {
@@ -34,7 +28,6 @@ Object.defineProperty(exports, "Dropdown", {
34
28
  return _Dropdown.default;
35
29
  }
36
30
  });
37
- var _DropdownItem = _interopRequireDefault(require("./DropdownItem"));
38
31
  var _Dropdown = _interopRequireDefault(require("./Dropdown"));
39
32
  var _ClickAreaInline = _interopRequireDefault(require("./ClickAreaInline"));
40
33
  var _ClickAreaBlock = _interopRequireDefault(require("./ClickAreaBlock"));
@@ -16,10 +16,10 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
16
16
  var _react = _interopRequireWildcard(require("react"));
17
17
  var _react2 = require("@emotion/react");
18
18
  var _hooks = require("@atlaskit/editor-common/hooks");
19
+ var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
19
20
  var _context = require("../../presets/context");
20
21
  var _ContentStyles = require("../ContentStyles");
21
22
  var _PluginSlot = _interopRequireDefault(require("../PluginSlot"));
22
- var _styles = require("../styles");
23
23
  var _WithFlash = _interopRequireDefault(require("../WithFlash"));
24
24
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
25
25
  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; }
@@ -32,7 +32,7 @@ var chromelessEditorStyles = (0, _react2.css)({
32
32
  overflowY: 'auto'
33
33
  },
34
34
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
35
- _styles.scrollbarStyles, {
35
+ _scrollbar.scrollbarStyles, {
36
36
  maxWidth: 'inherit',
37
37
  boxSizing: 'border-box',
38
38
  wordWrap: 'break-word',
@@ -11,9 +11,9 @@ var _adfSchema = require("@atlaskit/adf-schema");
11
11
  var _commonStyles = require("@atlaskit/editor-plugins/table/ui/common-styles");
12
12
  var _consts = require("@atlaskit/editor-plugins/table/ui/consts");
13
13
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
14
+ var _scrollbar = require("@atlaskit/editor-shared-styles/scrollbar");
14
15
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
16
  var _ContentStyles = require("../../ContentStyles");
16
- var _styles = require("../../styles");
17
17
  var _ProseMirror; // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
18
18
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
19
19
  var SWOOP_ANIMATION = "0.5s ".concat(_editorSharedStyles.akEditorSwoopCubicBezier);
@@ -39,7 +39,7 @@ var scrollStyles = (0, _react.css)({
39
39
  scrollBehavior: 'smooth'
40
40
  },
41
41
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
42
- _styles.scrollbarStyles);
42
+ _scrollbar.scrollbarStyles);
43
43
 
44
44
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles, @atlaskit/design-system/no-exported-css -- Ignored via go/DSP-18766
45
45
  var ScrollContainer = exports.ScrollContainer = (0, _ContentStyles.createEditorContentStyle)(scrollStyles);
@@ -74,7 +74,7 @@ var placeholderStyles = exports.placeholderStyles = (0, _react2.css)({
74
74
  var contentStyles = function contentStyles(props) {
75
75
  return (0, _react2.css)(_templateObject6 || (_templateObject6 = (0, _taggedTemplateLiteral2.default)(["\n\t.ProseMirror {\n\t\toutline: none;\n\t\tfont-size: ", "px;\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t\t", ";\n\t}\n\n\t.ProseMirror[contenteditable='false'] .taskItemView-content-wrap {\n\t\tpointer-events: none;\n\t\topacity: 0.7;\n\t}\n\n\t.ProseMirror-hideselection *::selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-hideselection *::-moz-selection {\n\t\tbackground: transparent;\n\t}\n\n\t.ProseMirror-selectednode {\n\t\toutline: none;\n\t}\n\n\t.ProseMirror-selectednode:empty {\n\t\toutline: 2px solid ", ";\n\t}\n\n\t", "\n\t", "\n ", "\n\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", ";\n\t", "\n\t", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n ", "\n\n .panelView-content-wrap {\n\t\tbox-sizing: border-box;\n\t}\n\n\t.mediaGroupView-content-wrap ul {\n\t\tpadding: 0;\n\t}\n\n\t/** Needed to override any cleared floats, e.g. image wrapping */\n\n\tdiv.fabric-editor-block-mark[class^='fabric-editor-align'] {\n\t\tclear: none !important;\n\t}\n\n\t.fabric-editor-align-end {\n\t\ttext-align: right;\n\t}\n\n\t.fabric-editor-align-start {\n\t\ttext-align: left;\n\t}\n\n\t.fabric-editor-align-center {\n\t\ttext-align: center;\n\t}\n\n\t.pm-table-header-content-wrap :not(.fabric-editor-alignment),\n\t.pm-table-header-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark,\n\t.pm-table-cell-content-wrap :not(p, .fabric-editor-block-mark) + div.fabric-editor-block-mark {\n\t\tp:first-of-type {\n\t\t\tmargin-top: 0;\n\t\t}\n\t}\n\t.pm-table-cell-content-wrap .mediaGroupView-content-wrap {\n\t\tclear: both;\n\t}\n\n\t.hyperlink-floating-toolbar,\n\t.", " {\n\t\tpadding: 0;\n\t}\n\n\t/* Link icon in the Atlaskit package\n is bigger than the others\n */\n\t.hyperlink-open-link {\n\t\tsvg {\n\t\t\tmax-width: 18px;\n\t\t}\n\t\t&[href] {\n\t\t\tpadding: 0 4px;\n\t\t}\n\t}\n"])), (0, _editorSharedStyles.editorFontSize)({
76
76
  theme: props.theme
77
- }), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, _styles.backgroundColorStyles, listsStyles, ruleStyles(), _media.mediaStyles, (0, _layout.layoutStyles)(props.viewMode), _collab.telepointerStyle, _selection.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _panel.panelStyles)(), mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, _status.statusStyles, (0, _styles.annotationSharedStyles)(), _styles.smartCardStyles, _styles.smartCardSharedStyles, _date.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, (0, _aiPanels.aiPanelStyles)(props.colorMode), _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
77
+ }), _styles.whitespaceSharedStyles, _styles.paragraphSharedStyles, _styles.listsSharedStyles, _styles.indentationSharedStyles, _styles.shadowSharedStyle, _getInlineNodeViewProducer.InlineNodeViewSharedStyles, "var(--ds-border-focused, #8cf)", _styles5.placeholderTextStyles, placeholderStyles, (0, _codeBlock.codeBlockStyles)(), (0, _styles2.blocktypeStyles)(), (0, _styles.codeMarkSharedStyles)(), _styles.textColorStyles, (0, _styles.backgroundColorStyles)(), listsStyles, ruleStyles(), _media.mediaStyles, (0, _layout.layoutStyles)(props.viewMode), _collab.telepointerStyle, _selection.gapCursorStyles, (0, _commonStyles.tableStyles)(props), (0, _panel.panelStyles)(), mentionsStyles, emojiStyles, _styles.tasksAndDecisionsStyles, _styles.gridStyles, linkStyles, _styles.blockMarksSharedStyles, _styles.dateSharedStyle, _extension.extensionStyles, (0, _expand.expandStyles)(), _styles3.findReplaceStyles, _styles4.textHighlightStyle, _tasksAndDecisions.taskDecisionStyles, _status.statusStyles, (0, _styles.annotationSharedStyles)(), _styles.smartCardStyles, _styles.smartCardSharedStyles, _date.dateStyles, _styles.embedCardStyles, _styles.unsupportedStyles, _styles.resizerStyles, (0, _aiPanels.aiPanelStyles)(props.colorMode), _styles.MediaSharedClassNames.FLOATING_TOOLBAR_COMPONENT);
78
78
  };
79
79
  var createEditorContentStyle = exports.createEditorContentStyle = function createEditorContentStyle(styles) {
80
80
  return /*#__PURE__*/_react.default.forwardRef(function (props, ref) {
@@ -21,12 +21,12 @@ var _react = _interopRequireWildcard(require("react"));
21
21
  var _react2 = require("@emotion/react");
22
22
  var _Transition = _interopRequireDefault(require("react-transition-group/Transition"));
23
23
  var _ui = require("@atlaskit/editor-common/ui");
24
+ var _withPluginState = require("@atlaskit/editor-common/with-plugin-state");
24
25
  var _utils = require("@atlaskit/editor-prosemirror/utils");
25
26
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
26
27
  var _colors = require("@atlaskit/theme/colors");
27
28
  var _document = require("../../utils/document");
28
29
  var _WithEditorActions = _interopRequireDefault(require("../WithEditorActions"));
29
- var _WithPluginState = _interopRequireDefault(require("../WithPluginState"));
30
30
  var _excluded = ["actions"];
31
31
  function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return null; var r = new WeakMap(), t = new WeakMap(); return (_getRequireWildcardCache = function _getRequireWildcardCache(e) { return e ? t : r; })(e); }
32
32
  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; }
@@ -244,7 +244,7 @@ function ContextPanelWithActions(_ref2) {
244
244
  return (
245
245
  // @ts-ignore - 'WithPluginState' cannot be used as a JSX component.
246
246
  // This error was introduced after upgrading to TypeScript 5
247
- (0, _react2.jsx)(_WithPluginState.default, {
247
+ (0, _react2.jsx)(_withPluginState.WithPluginState, {
248
248
  eventDispatcher: eventDispatcher,
249
249
  plugins: {
250
250
  contextPanel: contextPanelPluginKey,
@@ -23,19 +23,19 @@ var _button = _interopRequireDefault(require("@atlaskit/button"));
23
23
  var _buttonGroup = _interopRequireDefault(require("@atlaskit/button/button-group"));
24
24
  var _analytics = require("@atlaskit/editor-common/analytics");
25
25
  var _ui = require("@atlaskit/editor-common/ui");
26
+ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
27
+ var _uiReact = require("@atlaskit/editor-common/ui-react");
26
28
  var _utils = require("@atlaskit/editor-common/utils");
27
29
  var _spinner = _interopRequireDefault(require("@atlaskit/spinner"));
28
30
  var _eventDispatcher = require("../../event-dispatcher");
29
31
  var _context2 = require("../../presets/context");
30
32
  var _deprecationWarnings = _interopRequireDefault(require("../../utils/deprecation-warnings"));
31
- var _ToolbarButton = _interopRequireDefault(require("../ToolbarButton"));
32
- var _withOuterListeners = _interopRequireDefault(require("../with-outer-listeners"));
33
33
  var _styles = require("./styles");
34
34
  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; }
35
35
  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; }
36
36
  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); }; }
37
37
  function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); } /** @jsx jsx */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
38
- var PopupWithOutsideListeners = (0, _withOuterListeners.default)(_ui.Popup);
38
+ var PopupWithOutsideListeners = (0, _uiReact.withReactEditorViewOuterListeners)(_ui.Popup);
39
39
  var POPUP_HEIGHT = 388;
40
40
  var POPUP_WIDTH = 280;
41
41
  var EDITOR_IMAGE_URL = 'https://confluence.atlassian.com/download/attachments/945114421/editorillustration@2x.png?api=v2';
@@ -167,7 +167,7 @@ var ToolbarFeedbackInternal = /*#__PURE__*/function (_PureComponent) {
167
167
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
168
168
  (0, _react2.jsx)("div", {
169
169
  css: _styles.wrapper
170
- }, (0, _react2.jsx)(_ToolbarButton.default, {
170
+ }, (0, _react2.jsx)(_uiMenu.ToolbarButton, {
171
171
  ref: this.handleRef,
172
172
  iconBefore: iconBefore,
173
173
  onClick: this.collectFeedback,
@@ -7,8 +7,8 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntlNext = require("react-intl-next");
10
+ var _uiMenu = require("@atlaskit/editor-common/ui-menu");
10
11
  var _question = _interopRequireDefault(require("@atlaskit/icon/glyph/question"));
11
- var _ToolbarButton = _interopRequireDefault(require("../ToolbarButton"));
12
12
  var _WithHelpTrigger = _interopRequireDefault(require("../WithHelpTrigger"));
13
13
  var _messages = require("./messages");
14
14
  var TooltipHelpTrigger = function TooltipHelpTrigger(_ref) {
@@ -24,7 +24,7 @@ var TooltipHelpTrigger = function TooltipHelpTrigger(_ref) {
24
24
  }
25
25
  return /*#__PURE__*/_react.default.createElement(_WithHelpTrigger.default, {
26
26
  render: function render(showHelp) {
27
- return /*#__PURE__*/_react.default.createElement(_ToolbarButton.default, {
27
+ return /*#__PURE__*/_react.default.createElement(_uiMenu.ToolbarButton, {
28
28
  onClick: showHelp,
29
29
  title: displayTitle,
30
30
  titlePosition: titlePosition,
@@ -6,12 +6,6 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.getChildBreakoutModes = getChildBreakoutModes;
8
8
  exports.getNodesCount = getNodesCount;
9
- Object.defineProperty(exports, "isInEmptyLine", {
10
- enumerable: true,
11
- get: function get() {
12
- return _utils.isInEmptyLine;
13
- }
14
- });
15
9
  exports.processRawFragmentValue = processRawFragmentValue;
16
10
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
17
11
  var _utils = require("@atlaskit/editor-common/utils");
@@ -4,167 +4,21 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- Object.defineProperty(exports, "SetAttrsStep", {
8
- enumerable: true,
9
- get: function get() {
10
- return _steps.SetAttrsStep;
11
- }
12
- });
13
- Object.defineProperty(exports, "checkNodeDown", {
14
- enumerable: true,
15
- get: function get() {
16
- return _utils.checkNodeDown;
17
- }
18
- });
19
7
  Object.defineProperty(exports, "getNodesCount", {
20
8
  enumerable: true,
21
9
  get: function get() {
22
10
  return _document.getNodesCount;
23
11
  }
24
12
  });
25
- exports.hasOpenEnd = void 0;
26
- Object.defineProperty(exports, "insideTable", {
27
- enumerable: true,
28
- get: function get() {
29
- return _coreUtils.insideTable;
30
- }
31
- });
32
- Object.defineProperty(exports, "insideTableCell", {
33
- enumerable: true,
34
- get: function get() {
35
- return _utils.insideTableCell;
36
- }
37
- });
38
- Object.defineProperty(exports, "isElementInTableCell", {
39
- enumerable: true,
40
- get: function get() {
41
- return _utils.isElementInTableCell;
42
- }
43
- });
44
- Object.defineProperty(exports, "isEmptyNode", {
45
- enumerable: true,
46
- get: function get() {
47
- return _utils.isEmptyNode;
48
- }
49
- });
50
- Object.defineProperty(exports, "isInListItem", {
51
- enumerable: true,
52
- get: function get() {
53
- return _utils.isInListItem;
54
- }
55
- });
56
- Object.defineProperty(exports, "isLastItemMediaGroup", {
57
- enumerable: true,
58
- get: function get() {
59
- return _utils.isLastItemMediaGroup;
60
- }
61
- });
62
- exports.isMarkTypeAllowedInCurrentSelection = isMarkTypeAllowedInCurrentSelection;
63
- Object.defineProperty(exports, "isSelectionInsideLastNodeInDocument", {
64
- enumerable: true,
65
- get: function get() {
66
- return _utils.isSelectionInsideLastNodeInDocument;
67
- }
68
- });
69
- exports.isTemporary = void 0;
70
- Object.defineProperty(exports, "isTextSelection", {
71
- enumerable: true,
72
- get: function get() {
73
- return _utils.isTextSelection;
74
- }
75
- });
76
13
  Object.defineProperty(exports, "measurements", {
77
14
  enumerable: true,
78
15
  get: function get() {
79
16
  return _measureEnum.default;
80
17
  }
81
18
  });
82
- Object.defineProperty(exports, "nodeToJSON", {
83
- enumerable: true,
84
- get: function get() {
85
- return _utils.nodeToJSON;
86
- }
87
- });
88
- Object.defineProperty(exports, "nonNullable", {
89
- enumerable: true,
90
- get: function get() {
91
- return _utils.nonNullable;
92
- }
93
- });
94
- exports.stringRepeat = stringRepeat;
95
- exports.sum = sum;
96
- Object.defineProperty(exports, "toJSON", {
97
- enumerable: true,
98
- get: function get() {
99
- return _utils.toJSON;
100
- }
101
- });
102
19
  exports.whichTransitionEvent = whichTransitionEvent;
103
- var _commands = require("@atlaskit/editor-prosemirror/commands");
104
- var _utils = require("@atlaskit/editor-common/utils");
105
- var _coreUtils = require("@atlaskit/editor-common/core-utils");
106
20
  var _document = require("./document");
107
21
  var _measureEnum = _interopRequireDefault(require("./performance/measure-enum"));
108
- var _steps = require("@atlaskit/adf-schema/steps");
109
- function isMarkTypeCompatibleWithMark(markType, mark) {
110
- return !mark.type.excludes(markType) && !markType.excludes(mark.type);
111
- }
112
- function isMarkTypeAllowedInNode(markType, state) {
113
- return (0, _commands.toggleMark)(markType)(state);
114
- }
115
-
116
- /**
117
- * Check if a mark is allowed at the current selection / cursor based on a given state.
118
- * This method looks at both the currently active marks on the transaction, as well as
119
- * the node and marks at the current selection to determine if the given mark type is
120
- * allowed.
121
- */
122
- function isMarkTypeAllowedInCurrentSelection(markType, state) {
123
- if (!isMarkTypeAllowedInNode(markType, state)) {
124
- return false;
125
- }
126
- var _ref = state.selection,
127
- empty = _ref.empty,
128
- $cursor = _ref.$cursor,
129
- ranges = _ref.ranges;
130
- if (empty && !$cursor) {
131
- return false;
132
- }
133
- var isCompatibleMarkType = function isCompatibleMarkType(mark) {
134
- return isMarkTypeCompatibleWithMark(markType, mark);
135
- };
136
-
137
- // Handle any new marks in the current transaction
138
- if (state.tr.storedMarks && !state.tr.storedMarks.every(isCompatibleMarkType)) {
139
- return false;
140
- }
141
- if ($cursor) {
142
- return $cursor.marks().every(isCompatibleMarkType);
143
- }
144
-
145
- // Check every node in a selection - ensuring that it is compatible with the current mark type
146
- return ranges.every(function (_ref2) {
147
- var $from = _ref2.$from,
148
- $to = _ref2.$to;
149
- var allowedInActiveMarks = $from.depth === 0 ? state.doc.marks.every(isCompatibleMarkType) : true;
150
- state.doc.nodesBetween($from.pos, $to.pos, function (node) {
151
- allowedInActiveMarks = allowedInActiveMarks && node.marks.every(isCompatibleMarkType);
152
- });
153
- return allowedInActiveMarks;
154
- });
155
- }
156
-
157
- /**
158
- * Repeating string for multiple times
159
- */
160
- function stringRepeat(text, length) {
161
- var result = '';
162
- for (var x = 0; x < length; x++) {
163
- result += text;
164
- }
165
- return result;
166
- }
167
-
168
22
  /*
169
23
  * From Modernizr
170
24
  * Returns the kind of transitionevent available for the element
@@ -187,15 +41,4 @@ function whichTransitionEvent() {
187
41
  }
188
42
  }
189
43
  return;
190
- }
191
- var isTemporary = exports.isTemporary = function isTemporary(id) {
192
- return id.indexOf('temporary:') === 0;
193
- };
194
- var hasOpenEnd = exports.hasOpenEnd = function hasOpenEnd(slice) {
195
- return slice.openStart > 0 || slice.openEnd > 0;
196
- };
197
- function sum(arr, f) {
198
- return arr.reduce(function (val, x) {
199
- return val + f(x);
200
- }, 0);
201
44
  }
@@ -5,4 +5,4 @@ Object.defineProperty(exports, "__esModule", {
5
5
  });
6
6
  exports.version = exports.name = void 0;
7
7
  var name = exports.name = "@atlaskit/editor-core";
8
- var version = exports.version = "193.29.3";
8
+ var version = exports.version = "193.30.1";
@@ -1,10 +1,9 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- import { analyticsEventKey, findNodePosByLocalIds, isEmptyDocument, processRawValue } from '@atlaskit/editor-common/utils';
2
+ import { analyticsEventKey, findNodePosByLocalIds, isEmptyDocument, processRawValue, toJSON } from '@atlaskit/editor-common/utils';
3
3
  import { Node } from '@atlaskit/editor-prosemirror/model';
4
4
  import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
5
5
  import { findParentNode, safeInsert } from '@atlaskit/editor-prosemirror/utils';
6
6
  import { createDispatch } from '../event-dispatcher';
7
- import { toJSON } from '../utils';
8
7
  import { __temporaryFixForConfigPanel, getEditorValueWithMedia } from '../utils/action';
9
8
  import deprecationWarnings from '../utils/deprecation-warnings';
10
9
  import { processRawFragmentValue } from '../utils/document';
@@ -8,14 +8,13 @@ import { getEnabledFeatureFlagKeys } from '@atlaskit/editor-common/normalize-fea
8
8
  import { EditorPluginInjectionAPI } from '@atlaskit/editor-common/preset';
9
9
  import { EditorExperience, ExperienceStore, RELIABILITY_INTERVAL } from '@atlaskit/editor-common/ufo';
10
10
  import { EDIT_AREA_ID } from '@atlaskit/editor-common/ui';
11
- import { analyticsEventKey, browser, countNodes, getAnalyticsEventSeverity, getResponseEndTime, measureRender, processRawValue, shouldForceTracking, startMeasure, stopMeasure } from '@atlaskit/editor-common/utils';
11
+ import { analyticsEventKey, browser, countNodes, findChangedNodesFromTransaction, getAnalyticsEventSeverity, getResponseEndTime, measureRender, processRawValue, shouldForceTracking, startMeasure, stopMeasure, validateNodes, validNode } from '@atlaskit/editor-common/utils';
12
12
  import { EditorState, Selection, TextSelection } from '@atlaskit/editor-prosemirror/state';
13
13
  import { EditorView } from '@atlaskit/editor-prosemirror/view';
14
14
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
15
15
  import { createDispatch, EventDispatcher } from '../event-dispatcher';
16
16
  import { getNodesCount } from '../utils/document';
17
17
  import { isFullPage } from '../utils/is-full-page';
18
- import { findChangedNodesFromTransaction, validateNodes, validNode } from '../utils/nodes';
19
18
  import { RenderTracking } from '../utils/performance/components/RenderTracking';
20
19
  import measurements from '../utils/performance/measure-enum';
21
20
  import { PluginPerformanceObserver } from '../utils/performance/plugin-performance-observer';
@@ -1,4 +1,3 @@
1
- export { default as Addon } from './DropdownItem';
2
1
  export { default as Dropdown } from './Dropdown';
3
2
  export { default as ClickAreaInline } from './ClickAreaInline';
4
3
  export { default as ClickAreaBlock } from './ClickAreaBlock';
@@ -5,10 +5,10 @@ import React, { Fragment } from 'react';
5
5
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
6
6
  import { css, jsx } from '@emotion/react';
7
7
  import { useSharedPluginState } from '@atlaskit/editor-common/hooks';
8
+ import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
8
9
  import { usePresetContext } from '../../presets/context';
9
10
  import { createEditorContentStyle } from '../ContentStyles';
10
11
  import PluginSlot from '../PluginSlot';
11
- import { scrollbarStyles } from '../styles';
12
12
  import WithFlash from '../WithFlash';
13
13
  const chromelessEditorStyles = css({
14
14
  lineHeight: '20px',
@@ -4,9 +4,9 @@ import { decisionListSelector, taskListSelector } from '@atlaskit/adf-schema';
4
4
  import { tableFullPageEditorStyles } from '@atlaskit/editor-plugins/table/ui/common-styles';
5
5
  import { tableMarginFullWidthMode } from '@atlaskit/editor-plugins/table/ui/consts';
6
6
  import { akEditorContextPanelWidth, akEditorFullWidthLayoutWidth, akEditorGutterPaddingDynamic, akEditorSwoopCubicBezier, akLayoutGutterOffset, FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
7
+ import { scrollbarStyles } from '@atlaskit/editor-shared-styles/scrollbar';
7
8
  import { getBooleanFF } from '@atlaskit/platform-feature-flags';
8
9
  import { createEditorContentStyle } from '../../ContentStyles';
9
- import { scrollbarStyles } from '../../styles';
10
10
 
11
11
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-unsafe-values -- Ignored via go/DSP-18766
12
12
  const SWOOP_ANIMATION = `0.5s ${akEditorSwoopCubicBezier}`;
@@ -189,7 +189,7 @@ const contentStyles = props => css`
189
189
  ${blocktypeStyles()}
190
190
  ${codeMarkSharedStyles()}
191
191
  ${textColorStyles}
192
- ${backgroundColorStyles}
192
+ ${backgroundColorStyles()}
193
193
  ${listsStyles}
194
194
  ${ruleStyles()}
195
195
  ${mediaStyles}
@@ -7,12 +7,12 @@ import React, { useContext } from 'react';
7
7
  import { css, jsx } from '@emotion/react';
8
8
  import Transition from 'react-transition-group/Transition';
9
9
  import { ContextPanelConsumer, WidthContext } from '@atlaskit/editor-common/ui';
10
+ import { WithPluginState } from '@atlaskit/editor-common/with-plugin-state';
10
11
  import { findChildrenByType } from '@atlaskit/editor-prosemirror/utils';
11
12
  import { akEditorBreakoutPadding, akEditorContextPanelWidth, akEditorDefaultLayoutWidth, akEditorSwoopCubicBezier, akEditorWideLayoutWidth, FULL_PAGE_EDITOR_TOOLBAR_HEIGHT } from '@atlaskit/editor-shared-styles';
12
13
  import { N30 } from '@atlaskit/theme/colors';
13
14
  import { getChildBreakoutModes } from '../../utils/document';
14
15
  import WithEditorActions from '../WithEditorActions';
15
- import WithPluginState from '../WithPluginState';
16
16
  const ANIM_SPEED_MS = 500;
17
17
  const EDITOR_WIDTH = akEditorDefaultLayoutWidth + akEditorBreakoutPadding;
18
18
  const WIDE_EDITOR_WIDTH = akEditorWideLayoutWidth + akEditorBreakoutPadding;
@@ -11,13 +11,13 @@ import Button from '@atlaskit/button';
11
11
  import ButtonGroup from '@atlaskit/button/button-group';
12
12
  import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
13
13
  import { Popup } from '@atlaskit/editor-common/ui';
14
+ import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
15
+ import { withReactEditorViewOuterListeners as withOuterListeners } from '@atlaskit/editor-common/ui-react';
14
16
  import { analyticsEventKey } from '@atlaskit/editor-common/utils';
15
17
  import Spinner from '@atlaskit/spinner';
16
18
  import { createDispatch } from '../../event-dispatcher';
17
19
  import { usePresetContext } from '../../presets/context';
18
20
  import deprecationWarnings from '../../utils/deprecation-warnings';
19
- import ToolbarButton from '../ToolbarButton';
20
- import withOuterListeners from '../with-outer-listeners';
21
21
  import { buttonContent, confirmationHeader, confirmationImg, confirmationPopup, confirmationText, wrapper } from './styles';
22
22
  const PopupWithOutsideListeners = withOuterListeners(Popup);
23
23
  const POPUP_HEIGHT = 388;
@@ -1,7 +1,7 @@
1
1
  import React from 'react';
2
2
  import { injectIntl } from 'react-intl-next';
3
+ import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
3
4
  import QuestionIcon from '@atlaskit/icon/glyph/question';
4
- import ToolbarButton from '../ToolbarButton';
5
5
  import WithHelpTrigger from '../WithHelpTrigger';
6
6
  import { messages } from './messages';
7
7
  const TooltipHelpTrigger = ({
@@ -1,7 +1,6 @@
1
1
  import { processRawValue } from '@atlaskit/editor-common/utils';
2
2
  import { Fragment } from '@atlaskit/editor-prosemirror/model';
3
3
  import { getBreakoutMode } from './node-width';
4
- export { isInEmptyLine } from '@atlaskit/editor-common/utils';
5
4
  export function processRawFragmentValue(schema, value, providerFactory, sanitizePrivateContent, contentTransformer, dispatchAnalyticsEvent) {
6
5
  if (!value) {
7
6
  return;