@atlaskit/editor-plugin-undo-redo 1.3.1 → 1.4.0
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 +14 -0
- package/dist/cjs/plugin.js +5 -7
- package/dist/es2019/plugin.js +5 -7
- package/dist/esm/plugin.js +5 -7
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-undo-redo
|
|
2
2
|
|
|
3
|
+
## 1.4.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#126478](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/126478)
|
|
8
|
+
[`ca1665ebbfe4d`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/ca1665ebbfe4d) -
|
|
9
|
+
[ED-23435] Store primary toolbar component registry in a plugin variable instead of in plugin
|
|
10
|
+
state to avoid having to add effects to all plugins and enable SSR for the toolbar. [Breaking
|
|
11
|
+
change] Converted registerComponent from the primary toolbar plugin into an action.
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 1.3.1
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
package/dist/cjs/plugin.js
CHANGED
|
@@ -12,6 +12,7 @@ var _ToolbarUndoRedo = _interopRequireDefault(require("./ui/ToolbarUndoRedo"));
|
|
|
12
12
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
13
13
|
|
|
14
14
|
var undoRedoPlugin = exports.undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
15
|
+
var _api$primaryToolbar;
|
|
15
16
|
var api = _ref.api;
|
|
16
17
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
17
18
|
var editorView = _ref2.editorView,
|
|
@@ -24,6 +25,10 @@ var undoRedoPlugin = exports.undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
24
25
|
api: api
|
|
25
26
|
});
|
|
26
27
|
};
|
|
28
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
|
29
|
+
name: 'undoRedoPlugin',
|
|
30
|
+
component: primaryToolbarComponent
|
|
31
|
+
});
|
|
27
32
|
return {
|
|
28
33
|
name: 'undoRedoPlugin',
|
|
29
34
|
pmPlugins: function pmPlugins() {
|
|
@@ -39,13 +44,6 @@ var undoRedoPlugin = exports.undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
39
44
|
}
|
|
40
45
|
}];
|
|
41
46
|
},
|
|
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
47
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
|
|
50
48
|
};
|
|
51
49
|
};
|
package/dist/es2019/plugin.js
CHANGED
|
@@ -7,6 +7,7 @@ import ToolbarUndoRedo from './ui/ToolbarUndoRedo';
|
|
|
7
7
|
export const undoRedoPlugin = ({
|
|
8
8
|
api
|
|
9
9
|
}) => {
|
|
10
|
+
var _api$primaryToolbar;
|
|
10
11
|
const primaryToolbarComponent = ({
|
|
11
12
|
editorView,
|
|
12
13
|
disabled,
|
|
@@ -19,6 +20,10 @@ export const undoRedoPlugin = ({
|
|
|
19
20
|
api: api
|
|
20
21
|
});
|
|
21
22
|
};
|
|
23
|
+
api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.actions.registerComponent({
|
|
24
|
+
name: 'undoRedoPlugin',
|
|
25
|
+
component: primaryToolbarComponent
|
|
26
|
+
});
|
|
22
27
|
return {
|
|
23
28
|
name: 'undoRedoPlugin',
|
|
24
29
|
pmPlugins() {
|
|
@@ -30,13 +35,6 @@ export const undoRedoPlugin = ({
|
|
|
30
35
|
plugin: options => createPlugin(options)
|
|
31
36
|
}];
|
|
32
37
|
},
|
|
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
38
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
|
|
41
39
|
};
|
|
42
40
|
};
|
package/dist/esm/plugin.js
CHANGED
|
@@ -5,6 +5,7 @@ import { createPlugin } from './pm-plugins/main';
|
|
|
5
5
|
|
|
6
6
|
import ToolbarUndoRedo from './ui/ToolbarUndoRedo';
|
|
7
7
|
export var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
8
|
+
var _api$primaryToolbar;
|
|
8
9
|
var api = _ref.api;
|
|
9
10
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
10
11
|
var editorView = _ref2.editorView,
|
|
@@ -17,6 +18,10 @@ export var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
17
18
|
api: api
|
|
18
19
|
});
|
|
19
20
|
};
|
|
21
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
|
22
|
+
name: 'undoRedoPlugin',
|
|
23
|
+
component: primaryToolbarComponent
|
|
24
|
+
});
|
|
20
25
|
return {
|
|
21
26
|
name: 'undoRedoPlugin',
|
|
22
27
|
pmPlugins: function pmPlugins() {
|
|
@@ -32,13 +37,6 @@ export var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
32
37
|
}
|
|
33
38
|
}];
|
|
34
39
|
},
|
|
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
40
|
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) ? primaryToolbarComponent : undefined
|
|
43
41
|
};
|
|
44
42
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-undo-redo",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.4.0",
|
|
4
4
|
"description": "Undo redo plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -32,12 +32,12 @@
|
|
|
32
32
|
".": "./src/index.ts"
|
|
33
33
|
},
|
|
34
34
|
"dependencies": {
|
|
35
|
-
"@atlaskit/editor-common": "^87.
|
|
35
|
+
"@atlaskit/editor-common": "^87.3.0",
|
|
36
36
|
"@atlaskit/editor-plugin-history": "^1.2.0",
|
|
37
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
37
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^2.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-type-ahead": "^1.6.0",
|
|
39
39
|
"@atlaskit/editor-prosemirror": "5.0.1",
|
|
40
|
-
"@atlaskit/icon": "^22.
|
|
40
|
+
"@atlaskit/icon": "^22.9.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"@emotion/react": "^11.7.1"
|
|
43
43
|
},
|