@atlaskit/editor-plugin-undo-redo 1.7.1 → 2.0.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 +30 -0
- package/dist/cjs/undoRedoPlugin.js +13 -6
- package/dist/es2019/undoRedoPlugin.js +13 -6
- package/dist/esm/undoRedoPlugin.js +13 -6
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,35 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-undo-redo
|
|
2
2
|
|
|
3
|
+
## 2.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#117363](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/117363)
|
|
8
|
+
[`10a0f7f6c2027`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/10a0f7f6c2027) -
|
|
9
|
+
This package's `peerDependencies` have been adjusted for `react` and/or `react-dom` to reflect the
|
|
10
|
+
status of only supporting React 18 going forward. No explicit breaking change to React support has
|
|
11
|
+
been made in this release, but this is to signify going forward, breaking changes for React 16 or
|
|
12
|
+
React 17 may come via non-major semver releases.
|
|
13
|
+
|
|
14
|
+
Please refer this community post for more details:
|
|
15
|
+
https://community.developer.atlassian.com/t/rfc-78-dropping-support-for-react-16-and-rendering-in-a-react-18-concurrent-root-in-jira-and-confluence/87026
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- Updated dependencies
|
|
20
|
+
|
|
21
|
+
## 1.8.0
|
|
22
|
+
|
|
23
|
+
### Minor Changes
|
|
24
|
+
|
|
25
|
+
- [#116013](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/116013)
|
|
26
|
+
[`18e022766bfd3`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/18e022766bfd3) -
|
|
27
|
+
[ux] ED-26464 Hiding primary toolbar and docking contextual toolbar items to top
|
|
28
|
+
|
|
29
|
+
### Patch Changes
|
|
30
|
+
|
|
31
|
+
- Updated dependencies
|
|
32
|
+
|
|
3
33
|
## 1.7.1
|
|
4
34
|
|
|
5
35
|
### Patch Changes
|
|
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
6
6
|
});
|
|
7
7
|
exports.undoRedoPlugin = void 0;
|
|
8
8
|
var _react = _interopRequireDefault(require("react"));
|
|
9
|
+
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
9
10
|
var _keymaps = require("./pm-plugins/keymaps");
|
|
10
11
|
var _main = require("./pm-plugins/main");
|
|
11
12
|
var _ToolbarUndoRedo = _interopRequireDefault(require("./ui/ToolbarUndoRedo"));
|
|
@@ -14,7 +15,6 @@ var _ToolbarUndoRedo = _interopRequireDefault(require("./ui/ToolbarUndoRedo"));
|
|
|
14
15
|
// eslint-disable-next-line import/no-named-as-default
|
|
15
16
|
|
|
16
17
|
var undoRedoPlugin = exports.undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
17
|
-
var _api$primaryToolbar;
|
|
18
18
|
var api = _ref.api;
|
|
19
19
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
20
20
|
var editorView = _ref2.editorView,
|
|
@@ -27,10 +27,15 @@ var undoRedoPlugin = exports.undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
27
27
|
api: api
|
|
28
28
|
});
|
|
29
29
|
};
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
30
|
+
if ((0, _experiments.editorExperiment)('platform_editor_controls', 'control', {
|
|
31
|
+
exposure: true
|
|
32
|
+
})) {
|
|
33
|
+
var _api$primaryToolbar;
|
|
34
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
|
35
|
+
name: 'undoRedoPlugin',
|
|
36
|
+
component: primaryToolbarComponent
|
|
37
|
+
});
|
|
38
|
+
}
|
|
34
39
|
return {
|
|
35
40
|
name: 'undoRedoPlugin',
|
|
36
41
|
pmPlugins: function pmPlugins() {
|
|
@@ -46,6 +51,8 @@ var undoRedoPlugin = exports.undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
46
51
|
}
|
|
47
52
|
}];
|
|
48
53
|
},
|
|
49
|
-
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar)
|
|
54
|
+
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) && (0, _experiments.editorExperiment)('platform_editor_controls', 'control', {
|
|
55
|
+
exposure: true
|
|
56
|
+
}) ? primaryToolbarComponent : undefined
|
|
50
57
|
};
|
|
51
58
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
2
3
|
import { keymapPlugin } from './pm-plugins/keymaps';
|
|
3
4
|
import { createPlugin } from './pm-plugins/main';
|
|
4
5
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
@@ -8,7 +9,6 @@ import ToolbarUndoRedo from './ui/ToolbarUndoRedo';
|
|
|
8
9
|
export const undoRedoPlugin = ({
|
|
9
10
|
api
|
|
10
11
|
}) => {
|
|
11
|
-
var _api$primaryToolbar;
|
|
12
12
|
const primaryToolbarComponent = ({
|
|
13
13
|
editorView,
|
|
14
14
|
disabled,
|
|
@@ -21,10 +21,15 @@ export const undoRedoPlugin = ({
|
|
|
21
21
|
api: api
|
|
22
22
|
});
|
|
23
23
|
};
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
24
|
+
if (editorExperiment('platform_editor_controls', 'control', {
|
|
25
|
+
exposure: true
|
|
26
|
+
})) {
|
|
27
|
+
var _api$primaryToolbar;
|
|
28
|
+
api === null || api === void 0 ? void 0 : (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 ? void 0 : _api$primaryToolbar.actions.registerComponent({
|
|
29
|
+
name: 'undoRedoPlugin',
|
|
30
|
+
component: primaryToolbarComponent
|
|
31
|
+
});
|
|
32
|
+
}
|
|
28
33
|
return {
|
|
29
34
|
name: 'undoRedoPlugin',
|
|
30
35
|
pmPlugins() {
|
|
@@ -36,6 +41,8 @@ export const undoRedoPlugin = ({
|
|
|
36
41
|
plugin: options => createPlugin(options)
|
|
37
42
|
}];
|
|
38
43
|
},
|
|
39
|
-
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar)
|
|
44
|
+
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) && editorExperiment('platform_editor_controls', 'control', {
|
|
45
|
+
exposure: true
|
|
46
|
+
}) ? primaryToolbarComponent : undefined
|
|
40
47
|
};
|
|
41
48
|
};
|
|
@@ -1,4 +1,5 @@
|
|
|
1
1
|
import React from 'react';
|
|
2
|
+
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
2
3
|
import { keymapPlugin } from './pm-plugins/keymaps';
|
|
3
4
|
import { createPlugin } from './pm-plugins/main';
|
|
4
5
|
// eslint-disable-next-line @atlassian/tangerine/import/entry-points
|
|
@@ -6,7 +7,6 @@ import { createPlugin } from './pm-plugins/main';
|
|
|
6
7
|
// eslint-disable-next-line import/no-named-as-default
|
|
7
8
|
import ToolbarUndoRedo from './ui/ToolbarUndoRedo';
|
|
8
9
|
export var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
9
|
-
var _api$primaryToolbar;
|
|
10
10
|
var api = _ref.api;
|
|
11
11
|
var primaryToolbarComponent = function primaryToolbarComponent(_ref2) {
|
|
12
12
|
var editorView = _ref2.editorView,
|
|
@@ -19,10 +19,15 @@ export var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
19
19
|
api: api
|
|
20
20
|
});
|
|
21
21
|
};
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
22
|
+
if (editorExperiment('platform_editor_controls', 'control', {
|
|
23
|
+
exposure: true
|
|
24
|
+
})) {
|
|
25
|
+
var _api$primaryToolbar;
|
|
26
|
+
api === null || api === void 0 || (_api$primaryToolbar = api.primaryToolbar) === null || _api$primaryToolbar === void 0 || _api$primaryToolbar.actions.registerComponent({
|
|
27
|
+
name: 'undoRedoPlugin',
|
|
28
|
+
component: primaryToolbarComponent
|
|
29
|
+
});
|
|
30
|
+
}
|
|
26
31
|
return {
|
|
27
32
|
name: 'undoRedoPlugin',
|
|
28
33
|
pmPlugins: function pmPlugins() {
|
|
@@ -38,6 +43,8 @@ export var undoRedoPlugin = function undoRedoPlugin(_ref) {
|
|
|
38
43
|
}
|
|
39
44
|
}];
|
|
40
45
|
},
|
|
41
|
-
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar)
|
|
46
|
+
primaryToolbarComponent: !(api !== null && api !== void 0 && api.primaryToolbar) && editorExperiment('platform_editor_controls', 'control', {
|
|
47
|
+
exposure: true
|
|
48
|
+
}) ? primaryToolbarComponent : undefined
|
|
42
49
|
};
|
|
43
50
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-undo-redo",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "2.0.0",
|
|
4
4
|
"description": "Undo redo plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -31,18 +31,18 @@
|
|
|
31
31
|
".": "./src/index.ts"
|
|
32
32
|
},
|
|
33
33
|
"dependencies": {
|
|
34
|
-
"@atlaskit/editor-common": "^
|
|
35
|
-
"@atlaskit/editor-plugin-history": "^
|
|
36
|
-
"@atlaskit/editor-plugin-primary-toolbar": "^
|
|
37
|
-
"@atlaskit/editor-plugin-type-ahead": "^
|
|
34
|
+
"@atlaskit/editor-common": "^100.0.0",
|
|
35
|
+
"@atlaskit/editor-plugin-history": "^2.0.0",
|
|
36
|
+
"@atlaskit/editor-plugin-primary-toolbar": "^3.0.0",
|
|
37
|
+
"@atlaskit/editor-plugin-type-ahead": "^2.0.0",
|
|
38
38
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
39
|
-
"@atlaskit/icon": "^
|
|
39
|
+
"@atlaskit/icon": "^24.0.0",
|
|
40
40
|
"@atlaskit/platform-feature-flags": "1.1.0",
|
|
41
41
|
"@babel/runtime": "^7.0.0",
|
|
42
42
|
"@emotion/react": "^11.7.1"
|
|
43
43
|
},
|
|
44
44
|
"peerDependencies": {
|
|
45
|
-
"react": "^
|
|
45
|
+
"react": "^18.2.0",
|
|
46
46
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
47
47
|
},
|
|
48
48
|
"devDependencies": {
|