@atlaskit/editor-plugin-expand 31.1.3 → 31.1.5
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 +15 -0
- package/dist/cjs/legacyExpand/pm-plugins/main.js +3 -1
- package/dist/cjs/singlePlayerExpand/pm-plugins/main.js +3 -1
- package/dist/es2019/legacyExpand/pm-plugins/main.js +3 -1
- package/dist/es2019/singlePlayerExpand/pm-plugins/main.js +3 -1
- package/dist/esm/legacyExpand/pm-plugins/main.js +3 -1
- package/dist/esm/singlePlayerExpand/pm-plugins/main.js +3 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-expand
|
|
2
2
|
|
|
3
|
+
## 31.1.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 31.1.4
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`87d171d3ba846`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/87d171d3ba846) -
|
|
14
|
+
Allow the Expand floating toolbar to open Remix while the Expand title has focus under the
|
|
15
|
+
`platform_editor_remix_reliability_improvements` experiment, while preserving Expand keyboard
|
|
16
|
+
navigation.
|
|
17
|
+
|
|
3
18
|
## 31.1.3
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -12,6 +12,7 @@ var _selection = require("@atlaskit/editor-common/selection");
|
|
|
12
12
|
var _expand = require("@atlaskit/editor-common/styles/expand");
|
|
13
13
|
var _transforms = require("@atlaskit/editor-common/transforms");
|
|
14
14
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
15
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
15
16
|
var _commands = require("../commands");
|
|
16
17
|
var _nodeviews = _interopRequireDefault(require("../nodeviews"));
|
|
17
18
|
var _pluginFactory = require("./plugin-factory");
|
|
@@ -73,7 +74,8 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, getInt
|
|
|
73
74
|
},
|
|
74
75
|
// @see ED-8027 to follow up on this work-around
|
|
75
76
|
filterTransaction: function filterTransaction(tr) {
|
|
76
|
-
|
|
77
|
+
// Preserve title editing against selection changes unless explicitly allowed.
|
|
78
|
+
if (containsClass(document.activeElement, _expand.expandClassNames.titleInput) && tr.selectionSet && (!tr.steps.length || tr.isGeneric) && !((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_remix_reliability_improvements') && tr.getMeta('allowSelectionChangeWhileExpandTitleFocused') === true)) {
|
|
77
79
|
return false;
|
|
78
80
|
}
|
|
79
81
|
return true;
|
|
@@ -14,6 +14,7 @@ var _expand = require("@atlaskit/editor-common/styles/expand");
|
|
|
14
14
|
var _transforms = require("@atlaskit/editor-common/transforms");
|
|
15
15
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
16
16
|
var _view2 = require("@atlaskit/editor-prosemirror/view");
|
|
17
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
17
18
|
var _toggleExpandRange = require("../../editor-commands/toggleExpandRange");
|
|
18
19
|
var _nodeViews = _interopRequireDefault(require("../node-views"));
|
|
19
20
|
// Ignored via go/ees005
|
|
@@ -104,7 +105,8 @@ var createPlugin = exports.createPlugin = function createPlugin(dispatch, getInt
|
|
|
104
105
|
},
|
|
105
106
|
// @see ED-8027 to follow up on this work-around
|
|
106
107
|
filterTransaction: function filterTransaction(tr) {
|
|
107
|
-
|
|
108
|
+
// Preserve title editing against selection changes unless explicitly allowed.
|
|
109
|
+
if (containsClass(document.activeElement, _expand.expandClassNames.titleInput) && tr.selectionSet && (!tr.steps.length || tr.isGeneric) && !((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_remix_reliability_improvements') && tr.getMeta('allowSelectionChangeWhileExpandTitleFocused') === true)) {
|
|
108
110
|
return false;
|
|
109
111
|
}
|
|
110
112
|
return true;
|
|
@@ -3,6 +3,7 @@ import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
|
3
3
|
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
4
4
|
import { findExpand, transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
5
5
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
6
7
|
import { setExpandRef } from '../commands';
|
|
7
8
|
// Ignored via go/ees005
|
|
8
9
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -55,7 +56,8 @@ export const createPlugin = (dispatch, getIntl, appearance = 'full-page', useLon
|
|
|
55
56
|
},
|
|
56
57
|
// @see ED-8027 to follow up on this work-around
|
|
57
58
|
filterTransaction(tr) {
|
|
58
|
-
|
|
59
|
+
// Preserve title editing against selection changes unless explicitly allowed.
|
|
60
|
+
if (containsClass(document.activeElement, expandClassNames.titleInput) && tr.selectionSet && (!tr.steps.length || tr.isGeneric) && !(isExperimentEnabled('platform_editor_remix_reliability_improvements') && tr.getMeta('allowSelectionChangeWhileExpandTitleFocused') === true)) {
|
|
59
61
|
return false;
|
|
60
62
|
}
|
|
61
63
|
return true;
|
|
@@ -4,6 +4,7 @@ import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
|
4
4
|
import { transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
7
8
|
import { TOGGLE_EXPAND_RANGE_META_KEY } from '../../editor-commands/toggleExpandRange';
|
|
8
9
|
// Ignored via go/ees005
|
|
9
10
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -85,7 +86,8 @@ export const createPlugin = (dispatch, getIntl, appearance = 'full-page', useLon
|
|
|
85
86
|
},
|
|
86
87
|
// @see ED-8027 to follow up on this work-around
|
|
87
88
|
filterTransaction(tr) {
|
|
88
|
-
|
|
89
|
+
// Preserve title editing against selection changes unless explicitly allowed.
|
|
90
|
+
if (containsClass(document.activeElement, expandClassNames.titleInput) && tr.selectionSet && (!tr.steps.length || tr.isGeneric) && !(isExperimentEnabled('platform_editor_remix_reliability_improvements') && tr.getMeta('allowSelectionChangeWhileExpandTitleFocused') === true)) {
|
|
89
91
|
return false;
|
|
90
92
|
}
|
|
91
93
|
return true;
|
|
@@ -3,6 +3,7 @@ import { createSelectionClickHandler } from '@atlaskit/editor-common/selection';
|
|
|
3
3
|
import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
4
4
|
import { findExpand, transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
5
5
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
6
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
6
7
|
import { setExpandRef } from '../commands';
|
|
7
8
|
// Ignored via go/ees005
|
|
8
9
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -63,7 +64,8 @@ export var createPlugin = function createPlugin(dispatch, getIntl) {
|
|
|
63
64
|
},
|
|
64
65
|
// @see ED-8027 to follow up on this work-around
|
|
65
66
|
filterTransaction: function filterTransaction(tr) {
|
|
66
|
-
|
|
67
|
+
// Preserve title editing against selection changes unless explicitly allowed.
|
|
68
|
+
if (containsClass(document.activeElement, expandClassNames.titleInput) && tr.selectionSet && (!tr.steps.length || tr.isGeneric) && !(isExperimentEnabled('platform_editor_remix_reliability_improvements') && tr.getMeta('allowSelectionChangeWhileExpandTitleFocused') === true)) {
|
|
67
69
|
return false;
|
|
68
70
|
}
|
|
69
71
|
return true;
|
|
@@ -4,6 +4,7 @@ import { expandClassNames } from '@atlaskit/editor-common/styles/expand';
|
|
|
4
4
|
import { transformSliceExpandToNestedExpand, transformSliceNestedExpandToExpand } from '@atlaskit/editor-common/transforms';
|
|
5
5
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
6
6
|
import { Decoration, DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
7
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
7
8
|
import { TOGGLE_EXPAND_RANGE_META_KEY } from '../../editor-commands/toggleExpandRange';
|
|
8
9
|
// Ignored via go/ees005
|
|
9
10
|
// eslint-disable-next-line import/no-named-as-default
|
|
@@ -93,7 +94,8 @@ export var createPlugin = function createPlugin(dispatch, getIntl) {
|
|
|
93
94
|
},
|
|
94
95
|
// @see ED-8027 to follow up on this work-around
|
|
95
96
|
filterTransaction: function filterTransaction(tr) {
|
|
96
|
-
|
|
97
|
+
// Preserve title editing against selection changes unless explicitly allowed.
|
|
98
|
+
if (containsClass(document.activeElement, expandClassNames.titleInput) && tr.selectionSet && (!tr.steps.length || tr.isGeneric) && !(isExperimentEnabled('platform_editor_remix_reliability_improvements') && tr.getMeta('allowSelectionChangeWhileExpandTitleFocused') === true)) {
|
|
97
99
|
return false;
|
|
98
100
|
}
|
|
99
101
|
return true;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "31.1.
|
|
3
|
+
"version": "31.1.5",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -43,7 +43,7 @@
|
|
|
43
43
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
44
44
|
"@atlaskit/platform-feature-flags": "^2.2.0",
|
|
45
45
|
"@atlaskit/prosemirror-history": "^1.3.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^254.0.0",
|
|
47
47
|
"@atlaskit/tokens": "^20.9.0",
|
|
48
48
|
"@atlaskit/tooltip": "^24.4.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
@@ -52,13 +52,13 @@
|
|
|
52
52
|
"w3c-keyname": "^2.1.8"
|
|
53
53
|
},
|
|
54
54
|
"peerDependencies": {
|
|
55
|
-
"@atlaskit/editor-common": "^134.
|
|
55
|
+
"@atlaskit/editor-common": "^134.7.0",
|
|
56
56
|
"react": "^18.2.0 || ^19.2.0",
|
|
57
57
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
58
58
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
59
59
|
},
|
|
60
60
|
"devDependencies": {
|
|
61
|
-
"@atlaskit/editor-common": "^134.
|
|
61
|
+
"@atlaskit/editor-common": "^134.7.0",
|
|
62
62
|
"@testing-library/react": "^16.3.0",
|
|
63
63
|
"react": "^19.2.0",
|
|
64
64
|
"react-dom": "^19.2.0",
|