@atlaskit/editor-plugin-decorations 6.1.6 → 6.1.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.
- package/CHANGELOG.md +16 -0
- package/dist/cjs/pm-plugins/commands.js +1 -1
- package/dist/cjs/pm-plugins/main.js +1 -5
- package/dist/es2019/pm-plugins/commands.js +1 -1
- package/dist/es2019/pm-plugins/main.js +1 -7
- package/dist/esm/pm-plugins/commands.js +1 -1
- package/dist/esm/pm-plugins/main.js +1 -5
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-decorations
|
|
2
2
|
|
|
3
|
+
## 6.1.8
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`55920a92e882a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/55920a92e882a) -
|
|
8
|
+
tsignores added for help-center local consumpton removed
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 6.1.7
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- [`7583860e8637f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7583860e8637f) -
|
|
16
|
+
EDITOR-3621 Clean up platform_editor_block_menu_keyboard_navigation feature gate
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 6.1.6
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -100,7 +100,7 @@ var hoverDecorationCommand = exports.hoverDecorationCommand = function hoverDeco
|
|
|
100
100
|
tr.setMeta(_main.decorationStateKey, {
|
|
101
101
|
action: add ? _main.ACTIONS.DECORATION_ADD : _main.ACTIONS.DECORATION_REMOVE,
|
|
102
102
|
data: decoration,
|
|
103
|
-
hasDangerDecorations: (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)
|
|
103
|
+
hasDangerDecorations: (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ? className === 'danger' : undefined
|
|
104
104
|
}).setMeta('addToHistory', false);
|
|
105
105
|
return tr;
|
|
106
106
|
};
|
|
@@ -81,7 +81,6 @@ var _default = exports.default = function _default() {
|
|
|
81
81
|
decoration: undefined
|
|
82
82
|
};
|
|
83
83
|
},
|
|
84
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
85
84
|
apply: function apply(tr, pluginState) {
|
|
86
85
|
if (pluginState.decoration && pluginState.decoration instanceof _view.Decoration) {
|
|
87
86
|
var mapResult = tr.mapping.mapResult(pluginState.decoration.from);
|
|
@@ -92,8 +91,6 @@ var _default = exports.default = function _default() {
|
|
|
92
91
|
}
|
|
93
92
|
}
|
|
94
93
|
if (pluginState.decoration && pluginState.decoration instanceof _view.DecorationSet && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)) {
|
|
95
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
96
|
-
|
|
97
94
|
pluginState.decoration = pluginState.decoration.map(tr.mapping, tr.doc);
|
|
98
95
|
}
|
|
99
96
|
var meta = tr.getMeta(decorationStateKey);
|
|
@@ -104,7 +101,7 @@ var _default = exports.default = function _default() {
|
|
|
104
101
|
case ACTIONS.DECORATION_ADD:
|
|
105
102
|
return {
|
|
106
103
|
decoration: meta.data,
|
|
107
|
-
hasDangerDecorations: (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true)
|
|
104
|
+
hasDangerDecorations: (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_editor_block_menu', 'isEnabled', true) ? meta.hasDangerDecorations : undefined
|
|
108
105
|
};
|
|
109
106
|
case ACTIONS.DECORATION_REMOVE:
|
|
110
107
|
return {
|
|
@@ -117,7 +114,6 @@ var _default = exports.default = function _default() {
|
|
|
117
114
|
}
|
|
118
115
|
},
|
|
119
116
|
props: {
|
|
120
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
121
117
|
decorations: function decorations(state) {
|
|
122
118
|
var doc = state.doc;
|
|
123
119
|
var _ref2 = decorationStateKey.getState(state),
|
|
@@ -88,7 +88,7 @@ export const hoverDecorationCommand = ({
|
|
|
88
88
|
tr.setMeta(decorationStateKey, {
|
|
89
89
|
action: add ? ACTIONS.DECORATION_ADD : ACTIONS.DECORATION_REMOVE,
|
|
90
90
|
data: decoration,
|
|
91
|
-
hasDangerDecorations: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)
|
|
91
|
+
hasDangerDecorations: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? className === 'danger' : undefined
|
|
92
92
|
}).setMeta('addToHistory', false);
|
|
93
93
|
return tr;
|
|
94
94
|
};
|
|
@@ -73,8 +73,6 @@ export default (() => {
|
|
|
73
73
|
init: () => ({
|
|
74
74
|
decoration: undefined
|
|
75
75
|
}),
|
|
76
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
77
|
-
|
|
78
76
|
apply(tr, pluginState) {
|
|
79
77
|
if (pluginState.decoration && pluginState.decoration instanceof Decoration) {
|
|
80
78
|
const mapResult = tr.mapping.mapResult(pluginState.decoration.from);
|
|
@@ -85,8 +83,6 @@ export default (() => {
|
|
|
85
83
|
}
|
|
86
84
|
}
|
|
87
85
|
if (pluginState.decoration && pluginState.decoration instanceof DecorationSet && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
|
|
88
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
89
|
-
|
|
90
86
|
pluginState.decoration = pluginState.decoration.map(tr.mapping, tr.doc);
|
|
91
87
|
}
|
|
92
88
|
const meta = tr.getMeta(decorationStateKey);
|
|
@@ -97,7 +93,7 @@ export default (() => {
|
|
|
97
93
|
case ACTIONS.DECORATION_ADD:
|
|
98
94
|
return {
|
|
99
95
|
decoration: meta.data,
|
|
100
|
-
hasDangerDecorations: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)
|
|
96
|
+
hasDangerDecorations: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? meta.hasDangerDecorations : undefined
|
|
101
97
|
};
|
|
102
98
|
case ACTIONS.DECORATION_REMOVE:
|
|
103
99
|
return {
|
|
@@ -110,8 +106,6 @@ export default (() => {
|
|
|
110
106
|
}
|
|
111
107
|
},
|
|
112
108
|
props: {
|
|
113
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
114
|
-
|
|
115
109
|
decorations(state) {
|
|
116
110
|
const {
|
|
117
111
|
doc
|
|
@@ -93,7 +93,7 @@ export var hoverDecorationCommand = function hoverDecorationCommand(_ref) {
|
|
|
93
93
|
tr.setMeta(decorationStateKey, {
|
|
94
94
|
action: add ? ACTIONS.DECORATION_ADD : ACTIONS.DECORATION_REMOVE,
|
|
95
95
|
data: decoration,
|
|
96
|
-
hasDangerDecorations: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)
|
|
96
|
+
hasDangerDecorations: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? className === 'danger' : undefined
|
|
97
97
|
}).setMeta('addToHistory', false);
|
|
98
98
|
return tr;
|
|
99
99
|
};
|
|
@@ -75,7 +75,6 @@ export default (function () {
|
|
|
75
75
|
decoration: undefined
|
|
76
76
|
};
|
|
77
77
|
},
|
|
78
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
79
78
|
apply: function apply(tr, pluginState) {
|
|
80
79
|
if (pluginState.decoration && pluginState.decoration instanceof Decoration) {
|
|
81
80
|
var mapResult = tr.mapping.mapResult(pluginState.decoration.from);
|
|
@@ -86,8 +85,6 @@ export default (function () {
|
|
|
86
85
|
}
|
|
87
86
|
}
|
|
88
87
|
if (pluginState.decoration && pluginState.decoration instanceof DecorationSet && expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)) {
|
|
89
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
90
|
-
|
|
91
88
|
pluginState.decoration = pluginState.decoration.map(tr.mapping, tr.doc);
|
|
92
89
|
}
|
|
93
90
|
var meta = tr.getMeta(decorationStateKey);
|
|
@@ -98,7 +95,7 @@ export default (function () {
|
|
|
98
95
|
case ACTIONS.DECORATION_ADD:
|
|
99
96
|
return {
|
|
100
97
|
decoration: meta.data,
|
|
101
|
-
hasDangerDecorations: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true)
|
|
98
|
+
hasDangerDecorations: expValEqualsNoExposure('platform_editor_block_menu', 'isEnabled', true) ? meta.hasDangerDecorations : undefined
|
|
102
99
|
};
|
|
103
100
|
case ACTIONS.DECORATION_REMOVE:
|
|
104
101
|
return {
|
|
@@ -111,7 +108,6 @@ export default (function () {
|
|
|
111
108
|
}
|
|
112
109
|
},
|
|
113
110
|
props: {
|
|
114
|
-
// @ts-ignore - Workaround for help-center local consumption
|
|
115
111
|
decorations: function decorations(state) {
|
|
116
112
|
var doc = state.doc;
|
|
117
113
|
var _ref2 = decorationStateKey.getState(state),
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-decorations",
|
|
3
|
-
"version": "6.1.
|
|
3
|
+
"version": "6.1.8",
|
|
4
4
|
"description": "Decorations plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"dependencies": {
|
|
22
22
|
"@atlaskit/editor-prosemirror": "7.0.0",
|
|
23
23
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
24
|
-
"@atlaskit/tmp-editor-statsig": "^14.
|
|
24
|
+
"@atlaskit/tmp-editor-statsig": "^14.2.0",
|
|
25
25
|
"@atlaskit/tokens": "^8.4.0",
|
|
26
26
|
"@babel/runtime": "^7.0.0"
|
|
27
27
|
},
|