@atlaskit/editor-plugin-undo-redo 26.0.5 → 26.0.8

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 (33) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/pm-plugins/attach-input-meta.js +13 -13
  3. package/dist/cjs/pm-plugins/commands.js +10 -10
  4. package/dist/cjs/ui/ToolbarUndoRedo/RedoButton.js +13 -11
  5. package/dist/cjs/ui/ToolbarUndoRedo/UndoButton.js +13 -11
  6. package/dist/cjs/ui/ToolbarUndoRedo/index.js +14 -13
  7. package/dist/cjs/ui/ToolbarUndoRedo/toolbar-components.js +28 -26
  8. package/dist/cjs/undoRedoPlugin.js +4 -4
  9. package/dist/es2019/pm-plugins/attach-input-meta.js +2 -2
  10. package/dist/es2019/pm-plugins/commands.js +1 -1
  11. package/dist/es2019/ui/ToolbarUndoRedo/RedoButton.js +6 -4
  12. package/dist/es2019/ui/ToolbarUndoRedo/UndoButton.js +6 -4
  13. package/dist/es2019/ui/ToolbarUndoRedo/index.js +5 -4
  14. package/dist/es2019/ui/ToolbarUndoRedo/toolbar-components.js +4 -2
  15. package/dist/es2019/undoRedoPlugin.js +1 -1
  16. package/dist/esm/pm-plugins/attach-input-meta.js +2 -2
  17. package/dist/esm/pm-plugins/commands.js +1 -1
  18. package/dist/esm/ui/ToolbarUndoRedo/RedoButton.js +6 -4
  19. package/dist/esm/ui/ToolbarUndoRedo/UndoButton.js +6 -4
  20. package/dist/esm/ui/ToolbarUndoRedo/index.js +5 -4
  21. package/dist/esm/ui/ToolbarUndoRedo/toolbar-components.js +4 -2
  22. package/dist/esm/undoRedoPlugin.js +1 -1
  23. package/dist/types/pm-plugins/attach-input-meta.d.ts +3 -2
  24. package/dist/types/pm-plugins/commands.d.ts +2 -2
  25. package/dist/types/pm-plugins/keymaps.d.ts +1 -1
  26. package/dist/types/pm-plugins/main.d.ts +1 -1
  27. package/dist/types/pm-plugins/utils.d.ts +2 -1
  28. package/dist/types/ui/ToolbarUndoRedo/RedoButton.d.ts +1 -1
  29. package/dist/types/ui/ToolbarUndoRedo/UndoButton.d.ts +1 -1
  30. package/dist/types/ui/ToolbarUndoRedo/index.d.ts +1 -1
  31. package/dist/types/ui/ToolbarUndoRedo/toolbar-components.d.ts +2 -2
  32. package/dist/types/undoRedoPluginType.d.ts +6 -6
  33. package/package.json +3 -3
package/CHANGELOG.md CHANGED
@@ -1,5 +1,23 @@
1
1
  # @atlaskit/editor-plugin-undo-redo
2
2
 
3
+ ## 26.0.8
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 26.0.7
10
+
11
+ ### Patch Changes
12
+
13
+ - Updated dependencies
14
+
15
+ ## 26.0.6
16
+
17
+ ### Patch Changes
18
+
19
+ - Updated dependencies
20
+
3
21
  ## 26.0.5
4
22
 
5
23
  ### Patch Changes
@@ -8,10 +8,10 @@ exports.attachInputMetaWithAnalytics = exports.attachInputMeta = void 0;
8
8
  exports.getChanges = getChanges;
9
9
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
10
10
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
11
- var _analytics = require("@atlaskit/editor-common/analytics");
12
- var _editorAnalytics = require("@atlaskit/editor-common/editor-analytics");
11
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
13
12
  var _document = require("@atlaskit/editor-common/utils/document");
14
- var _enums = require("./enums");
13
+ var _withAnalytics = require("@atlaskit/editor-common/withAnalytics");
14
+ var _enums2 = require("./enums");
15
15
  var _pluginKey = require("./plugin-key");
16
16
  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; }
17
17
  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,14 +36,14 @@ var attachInputMeta = exports.attachInputMeta = function attachInputMeta(inputSo
36
36
  };
37
37
  var inputSourceToInputMethod = function inputSourceToInputMethod(inputSource) {
38
38
  switch (inputSource) {
39
- case _enums.InputSource.EXTERNAL:
40
- return _analytics.INPUT_METHOD.EXTERNAL;
41
- case _enums.InputSource.KEYBOARD:
42
- return _analytics.INPUT_METHOD.KEYBOARD;
43
- case _enums.InputSource.TOOLBAR:
44
- return _analytics.INPUT_METHOD.TOOLBAR;
39
+ case _enums2.InputSource.EXTERNAL:
40
+ return _enums.INPUT_METHOD.EXTERNAL;
41
+ case _enums2.InputSource.KEYBOARD:
42
+ return _enums.INPUT_METHOD.KEYBOARD;
43
+ case _enums2.InputSource.TOOLBAR:
44
+ return _enums.INPUT_METHOD.TOOLBAR;
45
45
  default:
46
- return _analytics.INPUT_METHOD.EXTERNAL;
46
+ return _enums.INPUT_METHOD.EXTERNAL;
47
47
  }
48
48
  };
49
49
  function getNodesWithDifferingAttributes(_ref) {
@@ -91,13 +91,13 @@ function getChanges(_ref2) {
91
91
  var attachInputMetaWithAnalytics = exports.attachInputMetaWithAnalytics = function attachInputMetaWithAnalytics(editorAnalyticsAPI) {
92
92
  return function (inputSource, action) {
93
93
  return function (command) {
94
- return attachInputMeta(inputSource)((0, _editorAnalytics.withAnalytics)(editorAnalyticsAPI, function (_ref3, _ref4) {
94
+ return attachInputMeta(inputSource)((0, _withAnalytics.withAnalytics)(editorAnalyticsAPI, function (_ref3, _ref4) {
95
95
  var before = _ref3.doc;
96
96
  var after = _ref4.currentDoc;
97
97
  return {
98
- eventType: _analytics.EVENT_TYPE.TRACK,
98
+ eventType: _enums.EVENT_TYPE.TRACK,
99
99
  action: action,
100
- actionSubject: _analytics.ACTION_SUBJECT.EDITOR,
100
+ actionSubject: _enums.ACTION_SUBJECT.EDITOR,
101
101
  attributes: _objectSpread({
102
102
  inputMethod: inputSourceToInputMethod(inputSource)
103
103
  }, getChanges({
@@ -4,24 +4,24 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.undoFromToolbarWithAnalytics = exports.undoFromToolbar = exports.undoFromKeyboardWithAnalytics = exports.undoFromKeyboard = exports.redoFromToolbarWithAnalytics = exports.redoFromToolbar = exports.redoFromKeyboardWithAnalytics = exports.redoFromKeyboard = void 0;
7
- var _analytics = require("@atlaskit/editor-common/analytics");
7
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
8
8
  var _redo = require("@atlaskit/prosemirror-history/redo");
9
9
  var _undo = require("@atlaskit/prosemirror-history/undo");
10
10
  var _attachInputMeta = require("./attach-input-meta");
11
- var _enums = require("./enums");
12
- var undoFromKeyboard = exports.undoFromKeyboard = (0, _attachInputMeta.attachInputMeta)(_enums.InputSource.KEYBOARD)(_undo.undo);
13
- var redoFromKeyboard = exports.redoFromKeyboard = (0, _attachInputMeta.attachInputMeta)(_enums.InputSource.KEYBOARD)(_redo.redo);
14
- var undoFromToolbar = exports.undoFromToolbar = (0, _attachInputMeta.attachInputMeta)(_enums.InputSource.TOOLBAR)(_undo.undo);
15
- var redoFromToolbar = exports.redoFromToolbar = (0, _attachInputMeta.attachInputMeta)(_enums.InputSource.TOOLBAR)(_redo.redo);
11
+ var _enums2 = require("./enums");
12
+ var undoFromKeyboard = exports.undoFromKeyboard = (0, _attachInputMeta.attachInputMeta)(_enums2.InputSource.KEYBOARD)(_undo.undo);
13
+ var redoFromKeyboard = exports.redoFromKeyboard = (0, _attachInputMeta.attachInputMeta)(_enums2.InputSource.KEYBOARD)(_redo.redo);
14
+ var undoFromToolbar = exports.undoFromToolbar = (0, _attachInputMeta.attachInputMeta)(_enums2.InputSource.TOOLBAR)(_undo.undo);
15
+ var redoFromToolbar = exports.redoFromToolbar = (0, _attachInputMeta.attachInputMeta)(_enums2.InputSource.TOOLBAR)(_redo.redo);
16
16
  var undoFromKeyboardWithAnalytics = exports.undoFromKeyboardWithAnalytics = function undoFromKeyboardWithAnalytics(editorAnalyticsAPI) {
17
- return (0, _attachInputMeta.attachInputMetaWithAnalytics)(editorAnalyticsAPI)(_enums.InputSource.KEYBOARD, _analytics.ACTION.UNDO_PERFORMED)(_undo.undo);
17
+ return (0, _attachInputMeta.attachInputMetaWithAnalytics)(editorAnalyticsAPI)(_enums2.InputSource.KEYBOARD, _enums.ACTION.UNDO_PERFORMED)(_undo.undo);
18
18
  };
19
19
  var redoFromKeyboardWithAnalytics = exports.redoFromKeyboardWithAnalytics = function redoFromKeyboardWithAnalytics(editorAnalyticsAPI) {
20
- return (0, _attachInputMeta.attachInputMetaWithAnalytics)(editorAnalyticsAPI)(_enums.InputSource.KEYBOARD, _analytics.ACTION.REDO_PERFORMED)(_redo.redo);
20
+ return (0, _attachInputMeta.attachInputMetaWithAnalytics)(editorAnalyticsAPI)(_enums2.InputSource.KEYBOARD, _enums.ACTION.REDO_PERFORMED)(_redo.redo);
21
21
  };
22
22
  var undoFromToolbarWithAnalytics = exports.undoFromToolbarWithAnalytics = function undoFromToolbarWithAnalytics(editorAnalyticsAPI) {
23
- return (0, _attachInputMeta.attachInputMetaWithAnalytics)(editorAnalyticsAPI)(_enums.InputSource.TOOLBAR, _analytics.ACTION.UNDO_PERFORMED)(_undo.undo);
23
+ return (0, _attachInputMeta.attachInputMetaWithAnalytics)(editorAnalyticsAPI)(_enums2.InputSource.TOOLBAR, _enums.ACTION.UNDO_PERFORMED)(_undo.undo);
24
24
  };
25
25
  var redoFromToolbarWithAnalytics = exports.redoFromToolbarWithAnalytics = function redoFromToolbarWithAnalytics(editorAnalyticsAPI) {
26
- return (0, _attachInputMeta.attachInputMetaWithAnalytics)(editorAnalyticsAPI)(_enums.InputSource.TOOLBAR, _analytics.ACTION.REDO_PERFORMED)(_redo.redo);
26
+ return (0, _attachInputMeta.attachInputMetaWithAnalytics)(editorAnalyticsAPI)(_enums2.InputSource.TOOLBAR, _enums.ACTION.REDO_PERFORMED)(_redo.redo);
27
27
  };
@@ -7,20 +7,22 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.RedoButton = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntl = require("react-intl");
10
- var _hooks = require("@atlaskit/editor-common/hooks");
11
10
  var _keymaps = require("@atlaskit/editor-common/keymaps");
12
- var _messages = require("@atlaskit/editor-common/messages");
13
- var _toolbar = require("@atlaskit/editor-common/toolbar");
14
- var _editorToolbar = require("@atlaskit/editor-toolbar");
11
+ var _undoRedo = require("@atlaskit/editor-common/messages/undo-redo");
12
+ var _context = require("@atlaskit/editor-common/toolbar/context");
13
+ var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
14
+ var _redoIcon = require("@atlaskit/editor-toolbar/redo-icon");
15
+ var _toolbarButton = require("@atlaskit/editor-toolbar/toolbar-button");
16
+ var _toolbarTooltip = require("@atlaskit/editor-toolbar/toolbar-tooltip");
15
17
  var _commands = require("../../pm-plugins/commands");
16
18
  var _utils = require("../../pm-plugins/utils");
17
19
  var RedoButton = exports.RedoButton = function RedoButton(_ref) {
18
20
  var api = _ref.api;
19
21
  var _useIntl = (0, _reactIntl.useIntl)(),
20
22
  formatMessage = _useIntl.formatMessage;
21
- var _useEditorToolbar = (0, _toolbar.useEditorToolbar)(),
23
+ var _useEditorToolbar = (0, _context.useEditorToolbar)(),
22
24
  editorView = _useEditorToolbar.editorView;
23
- var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['history'], function (states) {
25
+ var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(api, ['history'], function (states) {
24
26
  var _states$historyState;
25
27
  return {
26
28
  canRedo: (_states$historyState = states.historyState) === null || _states$historyState === void 0 ? void 0 : _states$historyState.canRedo
@@ -33,14 +35,14 @@ var RedoButton = exports.RedoButton = function RedoButton(_ref) {
33
35
  (0, _utils.forceFocus)(editorView, api)((0, _commands.redoFromToolbarWithAnalytics)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions));
34
36
  }
35
37
  };
36
- return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
38
+ return /*#__PURE__*/_react.default.createElement(_toolbarTooltip.ToolbarTooltip, {
37
39
  content: /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
38
- description: formatMessage(_messages.undoRedoMessages.redo),
40
+ description: formatMessage(_undoRedo.messages.redo),
39
41
  keymap: _keymaps.redo
40
42
  })
41
- }, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButton, {
42
- iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.RedoIcon, {
43
- label: formatMessage(_messages.undoRedoMessages.redo),
43
+ }, /*#__PURE__*/_react.default.createElement(_toolbarButton.ToolbarButton, {
44
+ iconBefore: /*#__PURE__*/_react.default.createElement(_redoIcon.RedoIcon, {
45
+ label: formatMessage(_undoRedo.messages.redo),
44
46
  size: "small"
45
47
  }),
46
48
  onClick: handleRedo,
@@ -7,20 +7,22 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.UndoButton = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
9
  var _reactIntl = require("react-intl");
10
- var _hooks = require("@atlaskit/editor-common/hooks");
11
10
  var _keymaps = require("@atlaskit/editor-common/keymaps");
12
- var _messages = require("@atlaskit/editor-common/messages");
13
- var _toolbar = require("@atlaskit/editor-common/toolbar");
14
- var _editorToolbar = require("@atlaskit/editor-toolbar");
11
+ var _undoRedo = require("@atlaskit/editor-common/messages/undo-redo");
12
+ var _context = require("@atlaskit/editor-common/toolbar/context");
13
+ var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
14
+ var _toolbarButton = require("@atlaskit/editor-toolbar/toolbar-button");
15
+ var _toolbarTooltip = require("@atlaskit/editor-toolbar/toolbar-tooltip");
16
+ var _undoIcon = require("@atlaskit/editor-toolbar/undo-icon");
15
17
  var _commands = require("../../pm-plugins/commands");
16
18
  var _utils = require("../../pm-plugins/utils");
17
19
  var UndoButton = exports.UndoButton = function UndoButton(_ref) {
18
20
  var api = _ref.api;
19
21
  var _useIntl = (0, _reactIntl.useIntl)(),
20
22
  formatMessage = _useIntl.formatMessage;
21
- var _useEditorToolbar = (0, _toolbar.useEditorToolbar)(),
23
+ var _useEditorToolbar = (0, _context.useEditorToolbar)(),
22
24
  editorView = _useEditorToolbar.editorView;
23
- var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['history'], function (states) {
25
+ var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(api, ['history'], function (states) {
24
26
  var _states$historyState;
25
27
  return {
26
28
  canUndo: (_states$historyState = states.historyState) === null || _states$historyState === void 0 ? void 0 : _states$historyState.canUndo
@@ -33,14 +35,14 @@ var UndoButton = exports.UndoButton = function UndoButton(_ref) {
33
35
  (0, _utils.forceFocus)(editorView, api)((0, _commands.undoFromToolbarWithAnalytics)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions));
34
36
  }
35
37
  };
36
- return /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarTooltip, {
38
+ return /*#__PURE__*/_react.default.createElement(_toolbarTooltip.ToolbarTooltip, {
37
39
  content: /*#__PURE__*/_react.default.createElement(_keymaps.ToolTipContent, {
38
- description: formatMessage(_messages.undoRedoMessages.undo),
40
+ description: formatMessage(_undoRedo.messages.undo),
39
41
  keymap: _keymaps.undo
40
42
  })
41
- }, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButton, {
42
- iconBefore: /*#__PURE__*/_react.default.createElement(_editorToolbar.UndoIcon, {
43
- label: formatMessage(_messages.undoRedoMessages.undo),
43
+ }, /*#__PURE__*/_react.default.createElement(_toolbarButton.ToolbarButton, {
44
+ iconBefore: /*#__PURE__*/_react.default.createElement(_undoIcon.UndoIcon, {
45
+ label: formatMessage(_undoRedo.messages.undo),
44
46
  size: "small"
45
47
  }),
46
48
  onClick: handleUndo,
@@ -7,11 +7,12 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.default = exports.ToolbarUndoRedo = void 0;
8
8
  var _react = require("@emotion/react");
9
9
  var _reactIntl = require("react-intl");
10
- var _hooks = require("@atlaskit/editor-common/hooks");
10
+ var _toolbarButton = require("@atlaskit/editor-common/analytics/types/toolbar-button");
11
11
  var _keymaps = require("@atlaskit/editor-common/keymaps");
12
- var _messages = require("@atlaskit/editor-common/messages");
13
- var _styles = require("@atlaskit/editor-common/styles");
14
- var _uiMenu = require("@atlaskit/editor-common/ui-menu");
12
+ var _undoRedo = require("@atlaskit/editor-common/messages/undo-redo");
13
+ var _plugins = require("@atlaskit/editor-common/styles/plugins");
14
+ var _ToolbarButton = _interopRequireDefault(require("@atlaskit/editor-common/ui-menu/ToolbarButton"));
15
+ var _useSharedPluginStateWithSelector = require("@atlaskit/editor-common/useSharedPluginStateWithSelector");
15
16
  var _redo = _interopRequireDefault(require("@atlaskit/icon/core/redo"));
16
17
  var _undo = _interopRequireDefault(require("@atlaskit/icon/core/undo"));
17
18
  var _commands = require("../../pm-plugins/commands");
@@ -29,7 +30,7 @@ var ToolbarUndoRedo = exports.ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
29
30
  editorView = _ref.editorView,
30
31
  api = _ref.api,
31
32
  formatMessage = _ref.intl.formatMessage;
32
- var _useSharedPluginState = (0, _hooks.useSharedPluginStateWithSelector)(api, ['history'], function (states) {
33
+ var _useSharedPluginState = (0, _useSharedPluginStateWithSelector.useSharedPluginStateWithSelector)(api, ['history'], function (states) {
33
34
  var _states$historyState, _states$historyState2;
34
35
  return {
35
36
  canUndo: (_states$historyState = states.historyState) === null || _states$historyState === void 0 ? void 0 : _states$historyState.canUndo,
@@ -46,16 +47,16 @@ var ToolbarUndoRedo = exports.ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
46
47
  var _api$analytics2;
47
48
  (0, _utils.forceFocus)(editorView, api)((0, _commands.redoFromToolbarWithAnalytics)(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions));
48
49
  };
49
- var labelUndo = formatMessage(_messages.undoRedoMessages.undo);
50
- var labelRedo = formatMessage(_messages.undoRedoMessages.redo);
50
+ var labelUndo = formatMessage(_undoRedo.messages.undo);
51
+ var labelRedo = formatMessage(_undoRedo.messages.redo);
51
52
  return (
52
53
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values -- Ignored via go/DSP-18766
53
54
  (0, _react.jsx)("span", {
54
55
  css:
55
56
  // eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage, @atlaskit/ui-styling-standard/no-imported-style-values
56
- _styles.buttonGroupStyle
57
- }, (0, _react.jsx)(_uiMenu.ToolbarButton, {
58
- buttonId: _uiMenu.TOOLBAR_BUTTON.UNDO,
57
+ _plugins.buttonGroupStyle
58
+ }, (0, _react.jsx)(_ToolbarButton.default, {
59
+ buttonId: _toolbarButton.TOOLBAR_ACTION_SUBJECT_ID.UNDO,
59
60
  spacing: isReducedSpacing ? 'none' : 'default',
60
61
  onClick: handleUndo,
61
62
  disabled: !canUndo || disabled,
@@ -71,9 +72,9 @@ var ToolbarUndoRedo = exports.ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
71
72
  spacing: "spacious"
72
73
  }),
73
74
  testId: "ak-editor-toolbar-button-undo"
74
- }), (0, _react.jsx)(_uiMenu.ToolbarButton, {
75
+ }), (0, _react.jsx)(_ToolbarButton.default, {
75
76
  spacing: isReducedSpacing ? 'none' : 'default',
76
- buttonId: _uiMenu.TOOLBAR_BUTTON.REDO,
77
+ buttonId: _toolbarButton.TOOLBAR_ACTION_SUBJECT_ID.REDO,
77
78
  onClick: handleRedo,
78
79
  disabled: !canRedo || disabled,
79
80
  title: (0, _react.jsx)(_keymaps.ToolTipContent, {
@@ -91,7 +92,7 @@ var ToolbarUndoRedo = exports.ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
91
92
  }), !(api !== null && api !== void 0 && api.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
92
93
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-imported-style-values, @atlaskit/design-system/consistent-css-prop-usage -- Ignored via go/DSP-18766
93
94
  (0, _react.jsx)("span", {
94
- css: _styles.separatorStyles
95
+ css: _plugins.separatorStyles
95
96
  }))
96
97
  );
97
98
  };
@@ -6,34 +6,36 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.getToolbarComponents = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _toolbar = require("@atlaskit/editor-common/toolbar");
10
- var _editorToolbar = require("@atlaskit/editor-toolbar");
9
+ var _keys = require("@atlaskit/editor-common/toolbar/keys");
10
+ var _rank = require("@atlaskit/editor-common/toolbar/rank");
11
+ var _show = require("@atlaskit/editor-toolbar/show");
12
+ var _toolbarButtonGroup = require("@atlaskit/editor-toolbar/toolbar-button-group");
11
13
  var _RedoButton = require("./RedoButton");
12
14
  var _UndoButton = require("./UndoButton");
13
15
  var getToolbarComponents = exports.getToolbarComponents = function getToolbarComponents(api) {
14
16
  var _api$toolbar;
15
17
  var breakpointPreset = api === null || api === void 0 || (_api$toolbar = api.toolbar) === null || _api$toolbar === void 0 ? void 0 : _api$toolbar.actions.getBreakpointPreset();
16
18
  return [{
17
- type: _toolbar.UNDO_CHANGES_GROUP.type,
18
- key: _toolbar.UNDO_CHANGES_GROUP.key,
19
+ type: _keys.UNDO_CHANGES_GROUP.type,
20
+ key: _keys.UNDO_CHANGES_GROUP.key,
19
21
  parents: [{
20
- type: _toolbar.TRACK_CHANGES_SECTION.type,
21
- key: _toolbar.TRACK_CHANGES_SECTION.key,
22
- rank: _toolbar.TRACK_CHANGES_SECTION_RANK[_toolbar.UNDO_CHANGES_GROUP.key]
22
+ type: _keys.TRACK_CHANGES_SECTION.type,
23
+ key: _keys.TRACK_CHANGES_SECTION.key,
24
+ rank: _rank.TRACK_CHANGES_SECTION_RANK[_keys.UNDO_CHANGES_GROUP.key]
23
25
  }],
24
26
  component: function component(_ref) {
25
27
  var children = _ref.children;
26
- return breakpointPreset === 'jsm-comment' ? /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
28
+ return breakpointPreset === 'jsm-comment' ? /*#__PURE__*/_react.default.createElement(_show.Show, {
27
29
  above: "lg"
28
- }, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButtonGroup, null, children)) : /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButtonGroup, null, children);
30
+ }, /*#__PURE__*/_react.default.createElement(_toolbarButtonGroup.ToolbarButtonGroup, null, children)) : /*#__PURE__*/_react.default.createElement(_toolbarButtonGroup.ToolbarButtonGroup, null, children);
29
31
  }
30
32
  }, {
31
- type: _toolbar.UNDO_BUTTON.type,
32
- key: _toolbar.UNDO_BUTTON.key,
33
+ type: _keys.UNDO_BUTTON.type,
34
+ key: _keys.UNDO_BUTTON.key,
33
35
  parents: [{
34
- type: _toolbar.UNDO_CHANGES_GROUP.type,
35
- key: _toolbar.UNDO_CHANGES_GROUP.key,
36
- rank: _toolbar.UNDO_CHANGES_GROUP_RANK[_toolbar.UNDO_BUTTON.key]
36
+ type: _keys.UNDO_CHANGES_GROUP.type,
37
+ key: _keys.UNDO_CHANGES_GROUP.key,
38
+ rank: _rank.UNDO_CHANGES_GROUP_RANK[_keys.UNDO_BUTTON.key]
37
39
  }],
38
40
  component: function component() {
39
41
  return /*#__PURE__*/_react.default.createElement(_UndoButton.UndoButton, {
@@ -41,26 +43,26 @@ var getToolbarComponents = exports.getToolbarComponents = function getToolbarCom
41
43
  });
42
44
  }
43
45
  }, {
44
- type: _toolbar.REDO_CHANGES_GROUP.type,
45
- key: _toolbar.REDO_CHANGES_GROUP.key,
46
+ type: _keys.REDO_CHANGES_GROUP.type,
47
+ key: _keys.REDO_CHANGES_GROUP.key,
46
48
  parents: [{
47
- type: _toolbar.TRACK_CHANGES_SECTION.type,
48
- key: _toolbar.TRACK_CHANGES_SECTION.key,
49
- rank: _toolbar.TRACK_CHANGES_SECTION_RANK[_toolbar.REDO_CHANGES_GROUP.key]
49
+ type: _keys.TRACK_CHANGES_SECTION.type,
50
+ key: _keys.TRACK_CHANGES_SECTION.key,
51
+ rank: _rank.TRACK_CHANGES_SECTION_RANK[_keys.REDO_CHANGES_GROUP.key]
50
52
  }],
51
53
  component: function component(_ref2) {
52
54
  var children = _ref2.children;
53
- return breakpointPreset === 'jsm-comment' ? /*#__PURE__*/_react.default.createElement(_editorToolbar.Show, {
55
+ return breakpointPreset === 'jsm-comment' ? /*#__PURE__*/_react.default.createElement(_show.Show, {
54
56
  above: "lg"
55
- }, /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButtonGroup, null, children)) : /*#__PURE__*/_react.default.createElement(_editorToolbar.ToolbarButtonGroup, null, children);
57
+ }, /*#__PURE__*/_react.default.createElement(_toolbarButtonGroup.ToolbarButtonGroup, null, children)) : /*#__PURE__*/_react.default.createElement(_toolbarButtonGroup.ToolbarButtonGroup, null, children);
56
58
  }
57
59
  }, {
58
- type: _toolbar.REDO_BUTTON.type,
59
- key: _toolbar.REDO_BUTTON.key,
60
+ type: _keys.REDO_BUTTON.type,
61
+ key: _keys.REDO_BUTTON.key,
60
62
  parents: [{
61
- type: _toolbar.REDO_CHANGES_GROUP.type,
62
- key: _toolbar.REDO_CHANGES_GROUP.key,
63
- rank: _toolbar.REDO_CHANGES_GROUP_RANK[_toolbar.REDO_BUTTON.key]
63
+ type: _keys.REDO_CHANGES_GROUP.type,
64
+ key: _keys.REDO_CHANGES_GROUP.key,
65
+ rank: _rank.REDO_CHANGES_GROUP_RANK[_keys.REDO_BUTTON.key]
64
66
  }],
65
67
  component: function component() {
66
68
  return /*#__PURE__*/_react.default.createElement(_RedoButton.RedoButton, {
@@ -6,13 +6,13 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.undoRedoPlugin = void 0;
8
8
  var _react = _interopRequireDefault(require("react"));
9
- var _analytics = require("@atlaskit/editor-common/analytics");
9
+ var _enums = require("@atlaskit/editor-common/analytics/types/enums");
10
10
  var _safePlugin = require("@atlaskit/editor-common/safe-plugin");
11
11
  var _redo = require("@atlaskit/prosemirror-history/redo");
12
12
  var _undo = require("@atlaskit/prosemirror-history/undo");
13
13
  var _editorExperiment = require("@atlaskit/tmp-editor-statsig/editor-experiment");
14
14
  var _attachInputMeta = require("./pm-plugins/attach-input-meta");
15
- var _enums = require("./pm-plugins/enums");
15
+ var _enums2 = require("./pm-plugins/enums");
16
16
  var _keymaps = require("./pm-plugins/keymaps");
17
17
  var _main = require("./pm-plugins/main");
18
18
  var _utils = require("./pm-plugins/utils");
@@ -61,14 +61,14 @@ var undoRedoPlugin = exports.undoRedoPlugin = function undoRedoPlugin(_ref) {
61
61
  if (!editorViewRef.current) {
62
62
  return false;
63
63
  }
64
- return (0, _utils.forceFocus)(editorViewRef.current, api)((0, _attachInputMeta.attachInputMetaWithAnalytics)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)(inputSource || _enums.InputSource.EXTERNAL, _analytics.ACTION.UNDO_PERFORMED)(_undo.undo));
64
+ return (0, _utils.forceFocus)(editorViewRef.current, api)((0, _attachInputMeta.attachInputMetaWithAnalytics)(api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions)(inputSource || _enums2.InputSource.EXTERNAL, _enums.ACTION.UNDO_PERFORMED)(_undo.undo));
65
65
  };
66
66
  var handleRedo = function handleRedo(inputSource) {
67
67
  var _api$analytics2;
68
68
  if (!editorViewRef.current) {
69
69
  return false;
70
70
  }
71
- return (0, _utils.forceFocus)(editorViewRef.current, api)((0, _attachInputMeta.attachInputMetaWithAnalytics)(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)(inputSource || _enums.InputSource.EXTERNAL, _analytics.ACTION.REDO_PERFORMED)(_redo.redo));
71
+ return (0, _utils.forceFocus)(editorViewRef.current, api)((0, _attachInputMeta.attachInputMetaWithAnalytics)(api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions)(inputSource || _enums2.InputSource.EXTERNAL, _enums.ACTION.REDO_PERFORMED)(_redo.redo));
72
72
  };
73
73
  var showPrimaryToolbarComponent = !(api !== null && api !== void 0 && api.primaryToolbar) && !isToolbarAIFCEnabled && showToolbarButton;
74
74
  return {
@@ -1,6 +1,6 @@
1
- import { ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
2
- import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
1
+ import { ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
3
2
  import { areNodesEqualIgnoreAttrs } from '@atlaskit/editor-common/utils/document';
3
+ import { withAnalytics } from '@atlaskit/editor-common/withAnalytics';
4
4
  import { InputSource } from './enums';
5
5
  import { pluginKey as undoPluginKey } from './plugin-key';
6
6
  export const attachInputMeta = inputSource => command => (state, dispatch) => {
@@ -1,4 +1,4 @@
1
- import { ACTION } from '@atlaskit/editor-common/analytics';
1
+ import { ACTION } from '@atlaskit/editor-common/analytics/types/enums';
2
2
  import { redo } from '@atlaskit/prosemirror-history/redo';
3
3
  import { undo } from '@atlaskit/prosemirror-history/undo';
4
4
  import { attachInputMeta, attachInputMetaWithAnalytics } from './attach-input-meta';
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
3
  import { getAriaKeyshortcuts, redo as redoKeymap, ToolTipContent } from '@atlaskit/editor-common/keymaps';
5
- import { undoRedoMessages } from '@atlaskit/editor-common/messages';
6
- import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
7
- import { ToolbarButton, RedoIcon, ToolbarTooltip } from '@atlaskit/editor-toolbar';
4
+ import { messages as undoRedoMessages } from '@atlaskit/editor-common/messages/undo-redo';
5
+ import { useEditorToolbar } from '@atlaskit/editor-common/toolbar/context';
6
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
7
+ import { RedoIcon } from '@atlaskit/editor-toolbar/redo-icon';
8
+ import { ToolbarButton } from '@atlaskit/editor-toolbar/toolbar-button';
9
+ import { ToolbarTooltip } from '@atlaskit/editor-toolbar/toolbar-tooltip';
8
10
  import { redoFromToolbarWithAnalytics } from '../../pm-plugins/commands';
9
11
  import { forceFocus } from '../../pm-plugins/utils';
10
12
  export const RedoButton = ({
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
3
  import { getAriaKeyshortcuts, ToolTipContent, undo as undoKeymap } from '@atlaskit/editor-common/keymaps';
5
- import { undoRedoMessages } from '@atlaskit/editor-common/messages';
6
- import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
7
- import { ToolbarButton, ToolbarTooltip, UndoIcon } from '@atlaskit/editor-toolbar';
4
+ import { messages as undoRedoMessages } from '@atlaskit/editor-common/messages/undo-redo';
5
+ import { useEditorToolbar } from '@atlaskit/editor-common/toolbar/context';
6
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
7
+ import { ToolbarButton } from '@atlaskit/editor-toolbar/toolbar-button';
8
+ import { ToolbarTooltip } from '@atlaskit/editor-toolbar/toolbar-tooltip';
9
+ import { UndoIcon } from '@atlaskit/editor-toolbar/undo-icon';
8
10
  import { undoFromToolbarWithAnalytics } from '../../pm-plugins/commands';
9
11
  import { forceFocus } from '../../pm-plugins/utils';
10
12
  export const UndoButton = ({
@@ -6,11 +6,12 @@
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
7
7
  import { jsx } from '@emotion/react';
8
8
  import { injectIntl } from 'react-intl';
9
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
9
+ import { TOOLBAR_ACTION_SUBJECT_ID as TOOLBAR_BUTTON } from '@atlaskit/editor-common/analytics/types/toolbar-button';
10
10
  import { getAriaKeyshortcuts, redoAlt, tooltip, ToolTipContent, undo as undoKeymap } from '@atlaskit/editor-common/keymaps';
11
- import { undoRedoMessages } from '@atlaskit/editor-common/messages';
12
- import { buttonGroupStyle, separatorStyles } from '@atlaskit/editor-common/styles';
13
- import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
11
+ import { messages as undoRedoMessages } from '@atlaskit/editor-common/messages/undo-redo';
12
+ import { buttonGroupStyle, separatorStyles } from '@atlaskit/editor-common/styles/plugins';
13
+ import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
14
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
14
15
  import RedoIcon from '@atlaskit/icon/core/redo';
15
16
  import UndoIcon from '@atlaskit/icon/core/undo';
16
17
  import { redoFromToolbarWithAnalytics, undoFromToolbarWithAnalytics } from '../../pm-plugins/commands';
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
- import { UNDO_BUTTON, REDO_BUTTON, UNDO_CHANGES_GROUP_RANK, UNDO_CHANGES_GROUP, REDO_CHANGES_GROUP_RANK, REDO_CHANGES_GROUP, TRACK_CHANGES_SECTION, TRACK_CHANGES_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
3
- import { Show, ToolbarButtonGroup } from '@atlaskit/editor-toolbar';
2
+ import { UNDO_BUTTON, REDO_BUTTON, UNDO_CHANGES_GROUP, REDO_CHANGES_GROUP, TRACK_CHANGES_SECTION } from '@atlaskit/editor-common/toolbar/keys';
3
+ import { UNDO_CHANGES_GROUP_RANK, REDO_CHANGES_GROUP_RANK, TRACK_CHANGES_SECTION_RANK } from '@atlaskit/editor-common/toolbar/rank';
4
+ import { Show } from '@atlaskit/editor-toolbar/show';
5
+ import { ToolbarButtonGroup } from '@atlaskit/editor-toolbar/toolbar-button-group';
4
6
  import { RedoButton } from './RedoButton';
5
7
  import { UndoButton } from './UndoButton';
6
8
  export const getToolbarComponents = api => {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ACTION } from '@atlaskit/editor-common/analytics';
2
+ import { ACTION } from '@atlaskit/editor-common/analytics/types/enums';
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { redo } from '@atlaskit/prosemirror-history/redo';
5
5
  import { undo } from '@atlaskit/prosemirror-history/undo';
@@ -2,9 +2,9 @@ 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 { ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
6
- import { withAnalytics } from '@atlaskit/editor-common/editor-analytics';
5
+ import { ACTION_SUBJECT, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics/types/enums';
7
6
  import { areNodesEqualIgnoreAttrs } from '@atlaskit/editor-common/utils/document';
7
+ import { withAnalytics } from '@atlaskit/editor-common/withAnalytics';
8
8
  import { InputSource } from './enums';
9
9
  import { pluginKey as undoPluginKey } from './plugin-key';
10
10
  export var attachInputMeta = function attachInputMeta(inputSource) {
@@ -1,4 +1,4 @@
1
- import { ACTION } from '@atlaskit/editor-common/analytics';
1
+ import { ACTION } from '@atlaskit/editor-common/analytics/types/enums';
2
2
  import { redo } from '@atlaskit/prosemirror-history/redo';
3
3
  import { undo } from '@atlaskit/prosemirror-history/undo';
4
4
  import { attachInputMeta, attachInputMetaWithAnalytics } from './attach-input-meta';
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
3
  import { getAriaKeyshortcuts, redo as redoKeymap, ToolTipContent } from '@atlaskit/editor-common/keymaps';
5
- import { undoRedoMessages } from '@atlaskit/editor-common/messages';
6
- import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
7
- import { ToolbarButton, RedoIcon, ToolbarTooltip } from '@atlaskit/editor-toolbar';
4
+ import { messages as undoRedoMessages } from '@atlaskit/editor-common/messages/undo-redo';
5
+ import { useEditorToolbar } from '@atlaskit/editor-common/toolbar/context';
6
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
7
+ import { RedoIcon } from '@atlaskit/editor-toolbar/redo-icon';
8
+ import { ToolbarButton } from '@atlaskit/editor-toolbar/toolbar-button';
9
+ import { ToolbarTooltip } from '@atlaskit/editor-toolbar/toolbar-tooltip';
8
10
  import { redoFromToolbarWithAnalytics } from '../../pm-plugins/commands';
9
11
  import { forceFocus } from '../../pm-plugins/utils';
10
12
  export var RedoButton = function RedoButton(_ref) {
@@ -1,10 +1,12 @@
1
1
  import React from 'react';
2
2
  import { useIntl } from 'react-intl';
3
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
4
3
  import { getAriaKeyshortcuts, ToolTipContent, undo as undoKeymap } from '@atlaskit/editor-common/keymaps';
5
- import { undoRedoMessages } from '@atlaskit/editor-common/messages';
6
- import { useEditorToolbar } from '@atlaskit/editor-common/toolbar';
7
- import { ToolbarButton, ToolbarTooltip, UndoIcon } from '@atlaskit/editor-toolbar';
4
+ import { messages as undoRedoMessages } from '@atlaskit/editor-common/messages/undo-redo';
5
+ import { useEditorToolbar } from '@atlaskit/editor-common/toolbar/context';
6
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
7
+ import { ToolbarButton } from '@atlaskit/editor-toolbar/toolbar-button';
8
+ import { ToolbarTooltip } from '@atlaskit/editor-toolbar/toolbar-tooltip';
9
+ import { UndoIcon } from '@atlaskit/editor-toolbar/undo-icon';
8
10
  import { undoFromToolbarWithAnalytics } from '../../pm-plugins/commands';
9
11
  import { forceFocus } from '../../pm-plugins/utils';
10
12
  export var UndoButton = function UndoButton(_ref) {
@@ -6,11 +6,12 @@
6
6
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports
7
7
  import { jsx } from '@emotion/react';
8
8
  import { injectIntl } from 'react-intl';
9
- import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
9
+ import { TOOLBAR_ACTION_SUBJECT_ID as TOOLBAR_BUTTON } from '@atlaskit/editor-common/analytics/types/toolbar-button';
10
10
  import { getAriaKeyshortcuts, redoAlt, tooltip, ToolTipContent, undo as undoKeymap } from '@atlaskit/editor-common/keymaps';
11
- import { undoRedoMessages } from '@atlaskit/editor-common/messages';
12
- import { buttonGroupStyle, separatorStyles } from '@atlaskit/editor-common/styles';
13
- import { TOOLBAR_BUTTON, ToolbarButton } from '@atlaskit/editor-common/ui-menu';
11
+ import { messages as undoRedoMessages } from '@atlaskit/editor-common/messages/undo-redo';
12
+ import { buttonGroupStyle, separatorStyles } from '@atlaskit/editor-common/styles/plugins';
13
+ import ToolbarButton from '@atlaskit/editor-common/ui-menu/ToolbarButton';
14
+ import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/useSharedPluginStateWithSelector';
14
15
  import RedoIcon from '@atlaskit/icon/core/redo';
15
16
  import UndoIcon from '@atlaskit/icon/core/undo';
16
17
  import { redoFromToolbarWithAnalytics, undoFromToolbarWithAnalytics } from '../../pm-plugins/commands';
@@ -1,6 +1,8 @@
1
1
  import React from 'react';
2
- import { UNDO_BUTTON, REDO_BUTTON, UNDO_CHANGES_GROUP_RANK, UNDO_CHANGES_GROUP, REDO_CHANGES_GROUP_RANK, REDO_CHANGES_GROUP, TRACK_CHANGES_SECTION, TRACK_CHANGES_SECTION_RANK } from '@atlaskit/editor-common/toolbar';
3
- import { Show, ToolbarButtonGroup } from '@atlaskit/editor-toolbar';
2
+ import { UNDO_BUTTON, REDO_BUTTON, UNDO_CHANGES_GROUP, REDO_CHANGES_GROUP, TRACK_CHANGES_SECTION } from '@atlaskit/editor-common/toolbar/keys';
3
+ import { UNDO_CHANGES_GROUP_RANK, REDO_CHANGES_GROUP_RANK, TRACK_CHANGES_SECTION_RANK } from '@atlaskit/editor-common/toolbar/rank';
4
+ import { Show } from '@atlaskit/editor-toolbar/show';
5
+ import { ToolbarButtonGroup } from '@atlaskit/editor-toolbar/toolbar-button-group';
4
6
  import { RedoButton } from './RedoButton';
5
7
  import { UndoButton } from './UndoButton';
6
8
  export var getToolbarComponents = function getToolbarComponents(api) {
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { ACTION } from '@atlaskit/editor-common/analytics';
2
+ import { ACTION } from '@atlaskit/editor-common/analytics/types/enums';
3
3
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
4
4
  import { redo } from '@atlaskit/prosemirror-history/redo';
5
5
  import { undo } from '@atlaskit/prosemirror-history/undo';
@@ -1,5 +1,6 @@
1
- import type { EditorAnalyticsAPI, ACTION } from '@atlaskit/editor-common/analytics';
2
- import type { HigherOrderCommand, Command } from '@atlaskit/editor-common/types';
1
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
2
+ import type { ACTION } from '@atlaskit/editor-common/analytics/types/enums';
3
+ import type { HigherOrderCommand, Command } from '@atlaskit/editor-common/types/command';
3
4
  import type { Node } from '@atlaskit/editor-prosemirror/model';
4
5
  import { InputSource } from './enums';
5
6
  type AttachInputMeta = (inputSource: InputSource) => HigherOrderCommand;
@@ -1,5 +1,5 @@
1
- import { type EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics';
2
- import type { Command } from '@atlaskit/editor-common/types';
1
+ import type { EditorAnalyticsAPI } from '@atlaskit/editor-common/analytics/api';
2
+ import type { Command } from '@atlaskit/editor-common/types/command';
3
3
  export declare const undoFromKeyboard: Command;
4
4
  export declare const redoFromKeyboard: Command;
5
5
  export declare const undoFromToolbar: Command;
@@ -1,5 +1,5 @@
1
1
  import { SafePlugin } from '@atlaskit/editor-common/safe-plugin';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
3
3
  import type { UndoRedoPlugin } from '../undoRedoPluginType';
4
4
  /**
5
5
  *
@@ -1,2 +1,2 @@
1
- import type { PMPluginFactory } from '@atlaskit/editor-common/types';
1
+ import type { PMPluginFactory } from '@atlaskit/editor-common/types/plugin-factory';
2
2
  export declare const createPlugin: PMPluginFactory;
@@ -1,4 +1,5 @@
1
- import type { Command, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
1
+ import type { Command } from '@atlaskit/editor-common/types/command';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
2
3
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
3
4
  import type { UndoRedoPlugin } from '../undoRedoPluginType';
4
5
  export declare const closeTypeAheadAndRunCommand: (editorView: EditorView, api: ExtractInjectionAPI<UndoRedoPlugin> | undefined) => (command: Command) => boolean;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
3
3
  import type { UndoRedoPlugin } from '../../undoRedoPluginType';
4
4
  type RedoButtonProps = {
5
5
  api?: ExtractInjectionAPI<UndoRedoPlugin>;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
3
3
  import type { UndoRedoPlugin } from '../../undoRedoPluginType';
4
4
  type UndoButtonProps = {
5
5
  api?: ExtractInjectionAPI<UndoRedoPlugin>;
@@ -5,7 +5,7 @@
5
5
  import type { ComponentType, FC } from 'react';
6
6
  import { jsx } from '@emotion/react';
7
7
  import type { WithIntlProps, WrappedComponentProps } from 'react-intl';
8
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
8
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
9
9
  import type { EditorView } from '@atlaskit/editor-prosemirror/view';
10
10
  import type { UndoRedoPlugin } from '../../undoRedoPluginType';
11
11
  export interface Props {
@@ -1,4 +1,4 @@
1
- import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
2
- import type { RegisterComponent } from '@atlaskit/editor-toolbar-model';
1
+ import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types/next-editor-plugin';
2
+ import type { RegisterComponent } from '@atlaskit/editor-toolbar-model/types';
3
3
  import type { UndoRedoPlugin } from '../../undoRedoPluginType';
4
4
  export declare const getToolbarComponents: (api?: ExtractInjectionAPI<UndoRedoPlugin>) => RegisterComponent[];
@@ -1,9 +1,9 @@
1
- import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
2
- import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics';
3
- import type { HistoryPlugin } from '@atlaskit/editor-plugin-history';
4
- import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
5
- import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar';
6
- import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
1
+ import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types/next-editor-plugin';
2
+ import type { AnalyticsPlugin } from '@atlaskit/editor-plugin-analytics/analyticsPluginType';
3
+ import type { HistoryPlugin } from '@atlaskit/editor-plugin-history/historyPluginType';
4
+ import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar/primary-toolbar-plugin-type';
5
+ import type { ToolbarPlugin } from '@atlaskit/editor-plugin-toolbar/toolbar-plugin-type';
6
+ import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead/type-ahead-plugin-type';
7
7
  import type { InputSource } from './pm-plugins/enums';
8
8
  export type UndoRedoAction = (inputSource?: InputSource) => boolean;
9
9
  export type UndoRedoPlugin = NextEditorPlugin<'undoRedoPlugin', {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-plugin-undo-redo",
3
- "version": "26.0.5",
3
+ "version": "26.0.8",
4
4
  "description": "Undo redo plugin for @atlaskit/editor-core",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -31,12 +31,12 @@
31
31
  "@atlaskit/icon": "^38.0.0",
32
32
  "@atlaskit/platform-feature-flags": "^2.2.0",
33
33
  "@atlaskit/prosemirror-history": "^1.3.0",
34
- "@atlaskit/tmp-editor-statsig": "^231.0.0",
34
+ "@atlaskit/tmp-editor-statsig": "^234.0.0",
35
35
  "@babel/runtime": "^7.0.0",
36
36
  "@emotion/react": "^11.7.1"
37
37
  },
38
38
  "peerDependencies": {
39
- "@atlaskit/editor-common": "^130.3.0",
39
+ "@atlaskit/editor-common": "^130.5.0",
40
40
  "react": "^18.2.0 || ^19.2.0",
41
41
  "react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
42
42
  },