@atlaskit/editor-plugin-undo-redo 1.1.3 → 1.2.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.
- package/CHANGELOG.md +43 -25
- package/LICENSE.md +6 -8
- package/dist/cjs/plugin.js +19 -11
- package/dist/cjs/ui/ToolbarUndoRedo/index.js +2 -1
- package/dist/es2019/plugin.js +25 -15
- package/dist/es2019/ui/ToolbarUndoRedo/index.js +2 -1
- package/dist/esm/plugin.js +19 -11
- package/dist/esm/ui/ToolbarUndoRedo/index.js +2 -1
- package/dist/types/types.d.ts +3 -2
- package/dist/types-ts4.5/types.d.ts +4 -2
- package/package.json +5 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,82 +1,100 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-undo-redo
|
|
2
2
|
|
|
3
|
+
## 1.2.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 1.2.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#101406](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/101406)
|
|
14
|
+
[`6daffd65aec4`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/6daffd65aec4) -
|
|
15
|
+
[ED-23298] Extract primary toolbar components to editor plugin to allow for custom ordering
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
3
21
|
## 1.1.3
|
|
4
22
|
|
|
5
23
|
### Patch Changes
|
|
6
24
|
|
|
7
|
-
-
|
|
25
|
+
- Updated dependencies
|
|
8
26
|
|
|
9
27
|
## 1.1.2
|
|
10
28
|
|
|
11
29
|
### Patch Changes
|
|
12
30
|
|
|
13
|
-
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
31
|
+
- [#97698](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/97698)
|
|
32
|
+
[`1c7b378c0d3b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/1c7b378c0d3b) -
|
|
33
|
+
[HOT-108999] We had an incident where the cursor jumps back a character in table headers for any
|
|
34
|
+
language triggering composition on an empty line.This was fixed in a patch bump of
|
|
35
|
+
prosemirror-view. https://github.com/ProseMirror/prosemirror-view/compare/1.33.4...1.33.5
|
|
18
36
|
|
|
19
37
|
## 1.1.1
|
|
20
38
|
|
|
21
39
|
### Patch Changes
|
|
22
40
|
|
|
23
|
-
-
|
|
41
|
+
- Updated dependencies
|
|
24
42
|
|
|
25
43
|
## 1.1.0
|
|
26
44
|
|
|
27
45
|
### Minor Changes
|
|
28
46
|
|
|
29
|
-
-
|
|
30
|
-
|
|
31
|
-
|
|
47
|
+
- [#91934](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/91934)
|
|
48
|
+
[`b76a78c6a199`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/b76a78c6a199) -
|
|
49
|
+
bumped editor-prosemirror version to 4.0.0
|
|
32
50
|
|
|
33
51
|
### Patch Changes
|
|
34
52
|
|
|
35
|
-
-
|
|
53
|
+
- Updated dependencies
|
|
36
54
|
|
|
37
55
|
## 1.0.2
|
|
38
56
|
|
|
39
57
|
### Patch Changes
|
|
40
58
|
|
|
41
|
-
-
|
|
42
|
-
|
|
43
|
-
|
|
59
|
+
- [#83116](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/83116)
|
|
60
|
+
[`8d4e99057fe0`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8d4e99057fe0) -
|
|
61
|
+
Upgrade Typescript from `4.9.5` to `5.4.2`
|
|
44
62
|
|
|
45
63
|
## 1.0.1
|
|
46
64
|
|
|
47
65
|
### Patch Changes
|
|
48
66
|
|
|
49
|
-
-
|
|
67
|
+
- Updated dependencies
|
|
50
68
|
|
|
51
69
|
## 1.0.0
|
|
52
70
|
|
|
53
71
|
### Major Changes
|
|
54
72
|
|
|
55
|
-
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
73
|
+
- [#72386](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/72386)
|
|
74
|
+
[`0c52b0be40c1`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/0c52b0be40c1) -
|
|
75
|
+
This changeset exists to bump all editor plugins that currently don't have a major version. This
|
|
76
|
+
is to address an issue with Jira plugin consumption.
|
|
59
77
|
|
|
60
78
|
### Patch Changes
|
|
61
79
|
|
|
62
|
-
-
|
|
80
|
+
- Updated dependencies
|
|
63
81
|
|
|
64
82
|
## 0.1.3
|
|
65
83
|
|
|
66
84
|
### Patch Changes
|
|
67
85
|
|
|
68
|
-
-
|
|
69
|
-
|
|
70
|
-
|
|
86
|
+
- [#68572](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/68572)
|
|
87
|
+
[`15d407fe5143`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/15d407fe5143) -
|
|
88
|
+
Upgrading @atlaskit/editor-prosemirror dependency
|
|
71
89
|
|
|
72
90
|
## 0.1.2
|
|
73
91
|
|
|
74
92
|
### Patch Changes
|
|
75
93
|
|
|
76
|
-
-
|
|
94
|
+
- Updated dependencies
|
|
77
95
|
|
|
78
96
|
## 0.1.1
|
|
79
97
|
|
|
80
98
|
### Patch Changes
|
|
81
99
|
|
|
82
|
-
-
|
|
100
|
+
- Updated dependencies
|
package/LICENSE.md
CHANGED
|
@@ -1,13 +1,11 @@
|
|
|
1
1
|
Copyright 2023 Atlassian Pty Ltd
|
|
2
2
|
|
|
3
|
-
Licensed under the Apache License, Version 2.0 (the "License");
|
|
4
|
-
|
|
5
|
-
You may obtain a copy of the License at
|
|
3
|
+
Licensed under the Apache License, Version 2.0 (the "License"); you may not use this file except in
|
|
4
|
+
compliance with the License. You may obtain a copy of the License at
|
|
6
5
|
|
|
7
6
|
http://www.apache.org/licenses/LICENSE-2.0
|
|
8
7
|
|
|
9
|
-
Unless required by applicable law or agreed to in writing, software
|
|
10
|
-
distributed
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
limitations under the License.
|
|
8
|
+
Unless required by applicable law or agreed to in writing, software distributed under the License is
|
|
9
|
+
distributed on an "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
|
|
10
|
+
implied. See the License for the specific language governing permissions and limitations under the
|
|
11
|
+
License.
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -13,6 +13,17 @@ var _ToolbarUndoRedo = _interopRequireDefault(require("./ui/ToolbarUndoRedo"));
|
|
|
13
13
|
|
|
14
14
|
var undoRedoPlugin = exports.undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
15
15
|
var api = _ref.api;
|
|
16
|
+
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
17
|
+
var editorView = _ref2.editorView,
|
|
18
|
+
disabled = _ref2.disabled,
|
|
19
|
+
isToolbarReducedSpacing = _ref2.isToolbarReducedSpacing;
|
|
20
|
+
return /*#__PURE__*/_react.default.createElement(_ToolbarUndoRedo.default, {
|
|
21
|
+
isReducedSpacing: isToolbarReducedSpacing,
|
|
22
|
+
disabled: disabled,
|
|
23
|
+
editorView: editorView,
|
|
24
|
+
api: api
|
|
25
|
+
});
|
|
26
|
+
};
|
|
16
27
|
return {
|
|
17
28
|
name: 'undoRedoPlugin',
|
|
18
29
|
pmPlugins: function pmPlugins() {
|
|
@@ -28,16 +39,13 @@ var undoRedoPlugin = exports.undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
28
39
|
}
|
|
29
40
|
}];
|
|
30
41
|
},
|
|
31
|
-
|
|
32
|
-
var
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
api: api
|
|
40
|
-
});
|
|
41
|
-
}
|
|
42
|
+
usePluginHook: function usePluginHook() {
|
|
43
|
+
var _api$core, _api$primaryToolbar;
|
|
44
|
+
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
|
|
45
|
+
name: 'undoRedoPlugin',
|
|
46
|
+
component: primaryToolbarComponent
|
|
47
|
+
}));
|
|
48
|
+
},
|
|
49
|
+
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
|
|
42
50
|
};
|
|
43
51
|
};
|
|
@@ -95,7 +95,8 @@ var ToolbarUndoRedo = exports.ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
|
|
|
95
95
|
testId: "ak-editor-toolbar-button-redo",
|
|
96
96
|
"aria-label": (0, _keymaps.tooltip)(_keymaps.redo, labelRedo),
|
|
97
97
|
"aria-keyshortcuts": (0, _keymaps.getAriaKeyshortcuts)(_keymaps.redo)
|
|
98
|
-
}), (0
|
|
98
|
+
}), !(api !== null && api !== void 0 && api.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
|
|
99
|
+
(0, _react.jsx)("span", {
|
|
99
100
|
css: _styles.separatorStyles
|
|
100
101
|
}))
|
|
101
102
|
);
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -6,27 +6,37 @@ import { createPlugin } from './pm-plugins/main';
|
|
|
6
6
|
import ToolbarUndoRedo from './ui/ToolbarUndoRedo';
|
|
7
7
|
export const undoRedoPlugin = ({
|
|
8
8
|
api
|
|
9
|
-
}) =>
|
|
10
|
-
|
|
11
|
-
pmPlugins() {
|
|
12
|
-
return [{
|
|
13
|
-
name: 'undoRedoKeyMap',
|
|
14
|
-
plugin: () => keymapPlugin()
|
|
15
|
-
}, {
|
|
16
|
-
name: 'undoRedoPlugin',
|
|
17
|
-
plugin: options => createPlugin(options)
|
|
18
|
-
}];
|
|
19
|
-
},
|
|
20
|
-
primaryToolbarComponent({
|
|
9
|
+
}) => {
|
|
10
|
+
const primaryToolbarComponent = ({
|
|
21
11
|
editorView,
|
|
22
12
|
disabled,
|
|
23
13
|
isToolbarReducedSpacing
|
|
24
|
-
}) {
|
|
14
|
+
}) => {
|
|
25
15
|
return /*#__PURE__*/React.createElement(ToolbarUndoRedo, {
|
|
26
16
|
isReducedSpacing: isToolbarReducedSpacing,
|
|
27
17
|
disabled: disabled,
|
|
28
18
|
editorView: editorView,
|
|
29
19
|
api: api
|
|
30
20
|
});
|
|
31
|
-
}
|
|
32
|
-
|
|
21
|
+
};
|
|
22
|
+
return {
|
|
23
|
+
name: 'undoRedoPlugin',
|
|
24
|
+
pmPlugins() {
|
|
25
|
+
return [{
|
|
26
|
+
name: 'undoRedoKeyMap',
|
|
27
|
+
plugin: () => keymapPlugin()
|
|
28
|
+
}, {
|
|
29
|
+
name: 'undoRedoPlugin',
|
|
30
|
+
plugin: options => createPlugin(options)
|
|
31
|
+
}];
|
|
32
|
+
},
|
|
33
|
+
usePluginHook: () => {
|
|
34
|
+
var _api$core, _api$primaryToolbar;
|
|
35
|
+
api === null || api === void 0 ? void 0 : (_api$core = api.core) === null || _api$core === void 0 ? void 0 : _api$core.actions.execute(api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
|
|
36
|
+
name: 'undoRedoPlugin',
|
|
37
|
+
component: primaryToolbarComponent
|
|
38
|
+
}));
|
|
39
|
+
},
|
|
40
|
+
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
|
|
41
|
+
};
|
|
42
|
+
};
|
|
@@ -88,7 +88,8 @@ export const ToolbarUndoRedo = ({
|
|
|
88
88
|
testId: "ak-editor-toolbar-button-redo",
|
|
89
89
|
"aria-label": tooltip(redoKeymap, labelRedo),
|
|
90
90
|
"aria-keyshortcuts": getAriaKeyshortcuts(redoKeymap)
|
|
91
|
-
}),
|
|
91
|
+
}), !(api !== null && api !== void 0 && api.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
|
|
92
|
+
jsx("span", {
|
|
92
93
|
css: separatorStyles
|
|
93
94
|
}))
|
|
94
95
|
);
|
package/dist/esm/plugin.js
CHANGED
|
@@ -6,6 +6,17 @@ import { createPlugin } from './pm-plugins/main';
|
|
|
6
6
|
import ToolbarUndoRedo from './ui/ToolbarUndoRedo';
|
|
7
7
|
export var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
8
8
|
var api = _ref.api;
|
|
9
|
+
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
10
|
+
var editorView = _ref2.editorView,
|
|
11
|
+
disabled = _ref2.disabled,
|
|
12
|
+
isToolbarReducedSpacing = _ref2.isToolbarReducedSpacing;
|
|
13
|
+
return /*#__PURE__*/React.createElement(ToolbarUndoRedo, {
|
|
14
|
+
isReducedSpacing: isToolbarReducedSpacing,
|
|
15
|
+
disabled: disabled,
|
|
16
|
+
editorView: editorView,
|
|
17
|
+
api: api
|
|
18
|
+
});
|
|
19
|
+
};
|
|
9
20
|
return {
|
|
10
21
|
name: 'undoRedoPlugin',
|
|
11
22
|
pmPlugins: function pmPlugins() {
|
|
@@ -21,16 +32,13 @@ export var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
21
32
|
}
|
|
22
33
|
}];
|
|
23
34
|
},
|
|
24
|
-
|
|
25
|
-
var
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
api: api
|
|
33
|
-
});
|
|
34
|
-
}
|
|
35
|
+
usePluginHook: function usePluginHook() {
|
|
36
|
+
var _api$core, _api$primaryToolbar;
|
|
37
|
+
api === null || api === void 0 || (_api$core = api.core) === null || _api$core === void 0 || _api$core.actions.execute(api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.commands.registerComponent({
|
|
38
|
+
name: 'undoRedoPlugin',
|
|
39
|
+
component: primaryToolbarComponent
|
|
40
|
+
}));
|
|
41
|
+
},
|
|
42
|
+
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
|
|
35
43
|
};
|
|
36
44
|
};
|
|
@@ -87,7 +87,8 @@ export var ToolbarUndoRedo = function ToolbarUndoRedo(_ref) {
|
|
|
87
87
|
testId: "ak-editor-toolbar-button-redo",
|
|
88
88
|
"aria-label": tooltip(redoKeymap, labelRedo),
|
|
89
89
|
"aria-keyshortcuts": getAriaKeyshortcuts(redoKeymap)
|
|
90
|
-
}),
|
|
90
|
+
}), !(api !== null && api !== void 0 && api.primaryToolbar) && /* eslint-disable-next-line @atlaskit/design-system/consistent-css-prop-usage */
|
|
91
|
+
jsx("span", {
|
|
91
92
|
css: separatorStyles
|
|
92
93
|
}))
|
|
93
94
|
);
|
package/dist/types/types.d.ts
CHANGED
|
@@ -1,6 +1,7 @@
|
|
|
1
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { HistoryPlugin } from '@atlaskit/editor-plugin-history';
|
|
3
|
+
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
3
4
|
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
4
5
|
export type UndoRedoPlugin = NextEditorPlugin<'undoRedoPlugin', {
|
|
5
|
-
dependencies: [TypeAheadPlugin, HistoryPlugin];
|
|
6
|
+
dependencies: [TypeAheadPlugin, HistoryPlugin, OptionalPlugin<PrimaryToolbarPlugin>];
|
|
6
7
|
}>;
|
|
@@ -1,9 +1,11 @@
|
|
|
1
|
-
import type { NextEditorPlugin } from '@atlaskit/editor-common/types';
|
|
1
|
+
import type { NextEditorPlugin, OptionalPlugin } from '@atlaskit/editor-common/types';
|
|
2
2
|
import type { HistoryPlugin } from '@atlaskit/editor-plugin-history';
|
|
3
|
+
import type { PrimaryToolbarPlugin } from '@atlaskit/editor-plugin-primary-toolbar';
|
|
3
4
|
import type { TypeAheadPlugin } from '@atlaskit/editor-plugin-type-ahead';
|
|
4
5
|
export type UndoRedoPlugin = NextEditorPlugin<'undoRedoPlugin', {
|
|
5
6
|
dependencies: [
|
|
6
7
|
TypeAheadPlugin,
|
|
7
|
-
HistoryPlugin
|
|
8
|
+
HistoryPlugin,
|
|
9
|
+
OptionalPlugin<PrimaryToolbarPlugin>
|
|
8
10
|
];
|
|
9
11
|
}>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-undo-redo",
|
|
3
|
-
"version": "1.1
|
|
3
|
+
"version": "1.2.1",
|
|
4
4
|
"description": "Undo redo plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,11 +32,12 @@
|
|
|
32
32
|
".": "./src/index.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/editor-common": "^
|
|
35
|
+
"@atlaskit/editor-common": "^82.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-history": "^1.1.0",
|
|
37
|
-
"@atlaskit/editor-plugin-
|
|
37
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^1.1.0",
|
|
38
|
+
"@atlaskit/editor-plugin-type-ahead": "^1.2.0",
|
|
38
39
|
"@atlaskit/editor-prosemirror": "4.0.1",
|
|
39
|
-
"@atlaskit/icon": "^22.
|
|
40
|
+
"@atlaskit/icon": "^22.3.0",
|
|
40
41
|
"@babel/runtime": "^7.0.0",
|
|
41
42
|
"@emotion/react": "^11.7.1"
|
|
42
43
|
},
|
|
@@ -45,7 +46,6 @@
|
|
|
45
46
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
46
47
|
},
|
|
47
48
|
"devDependencies": {
|
|
48
|
-
"@atlassian/atlassian-frontend-prettier-config-1.0.0": "npm:@atlassian/atlassian-frontend-prettier-config@1.0.0",
|
|
49
49
|
"typescript": "~5.4.2"
|
|
50
50
|
},
|
|
51
51
|
"techstack": {
|
|
@@ -81,7 +81,6 @@
|
|
|
81
81
|
]
|
|
82
82
|
}
|
|
83
83
|
},
|
|
84
|
-
"prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.0",
|
|
85
84
|
"stricter": {
|
|
86
85
|
"no-unused-dependencies": {
|
|
87
86
|
"checkDevDependencies": true
|