@atlaskit/editor-plugin-expand 3.2.16 → 3.3.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 +15 -0
- package/dist/cjs/legacyExpand/nodeviews/index.js +13 -0
- package/dist/cjs/singlePlayerExpand/node-views/index.js +12 -0
- package/dist/es2019/legacyExpand/nodeviews/index.js +13 -0
- package/dist/es2019/singlePlayerExpand/node-views/index.js +12 -0
- package/dist/esm/legacyExpand/nodeviews/index.js +13 -0
- package/dist/esm/singlePlayerExpand/node-views/index.js +12 -0
- package/package.json +7 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,20 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-expand
|
|
2
2
|
|
|
3
|
+
## 3.3.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 3.3.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#166502](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/166502)
|
|
14
|
+
[`ea1ed63fc9615`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/ea1ed63fc9615) -
|
|
15
|
+
ED-28032 add keyboard shortcuts for new resizing experience behind
|
|
16
|
+
platform_editor_breakout_resizing
|
|
17
|
+
|
|
3
18
|
## 3.2.16
|
|
4
19
|
|
|
5
20
|
### Patch Changes
|
|
@@ -19,6 +19,8 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
19
19
|
var _history = require("@atlaskit/editor-prosemirror/history");
|
|
20
20
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
21
21
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
22
|
+
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
22
24
|
var _commands = require("../commands");
|
|
23
25
|
var _ExpandIconButton = require("../ui/ExpandIconButton");
|
|
24
26
|
function buildExpandClassName(type, expanded) {
|
|
@@ -202,6 +204,17 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
202
204
|
_this.handleUndoFromTitle(event);
|
|
203
205
|
return;
|
|
204
206
|
}
|
|
207
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_breakout_resizing', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release')) {
|
|
208
|
+
if ((event.ctrlKey || event.metaKey) && event.altKey && (event.code === 'BracketLeft' || event.code === 'BracketRight')) {
|
|
209
|
+
_this.view.dispatchEvent(new KeyboardEvent('keydown', {
|
|
210
|
+
key: event.key,
|
|
211
|
+
code: event.code,
|
|
212
|
+
metaKey: event.metaKey,
|
|
213
|
+
ctrlKey: event.ctrlKey,
|
|
214
|
+
altKey: event.altKey
|
|
215
|
+
}));
|
|
216
|
+
}
|
|
217
|
+
}
|
|
205
218
|
});
|
|
206
219
|
(0, _defineProperty2.default)(this, "deleteExpand", function (event) {
|
|
207
220
|
if (!_this.input) {
|
|
@@ -20,6 +20,7 @@ var _history = require("@atlaskit/editor-prosemirror/history");
|
|
|
20
20
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
21
21
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
22
22
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
|
+
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
23
24
|
var _commands = require("../commands");
|
|
24
25
|
var _ExpandButton = require("../ui/ExpandButton");
|
|
25
26
|
var _NodeView = require("../ui/NodeView");
|
|
@@ -162,6 +163,17 @@ var ExpandNodeView = exports.ExpandNodeView = /*#__PURE__*/function () {
|
|
|
162
163
|
_this.handleUndoFromTitle(event);
|
|
163
164
|
return;
|
|
164
165
|
}
|
|
166
|
+
if ((0, _expValEquals.expValEquals)('platform_editor_breakout_resizing', 'isEnabled', true) && (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release')) {
|
|
167
|
+
if ((event.ctrlKey || event.metaKey) && event.altKey && (event.code === 'BracketLeft' || event.code === 'BracketRight')) {
|
|
168
|
+
_this.view.dispatchEvent(new KeyboardEvent('keydown', {
|
|
169
|
+
key: event.key,
|
|
170
|
+
code: event.code,
|
|
171
|
+
metaKey: event.metaKey,
|
|
172
|
+
ctrlKey: event.ctrlKey,
|
|
173
|
+
altKey: event.altKey
|
|
174
|
+
}));
|
|
175
|
+
}
|
|
176
|
+
}
|
|
165
177
|
});
|
|
166
178
|
(0, _defineProperty2.default)(this, "deleteEmptyExpand", function () {
|
|
167
179
|
var state = _this.view.state;
|
|
@@ -9,6 +9,8 @@ import { closestElement, isEmptyNode } from '@atlaskit/editor-common/utils';
|
|
|
9
9
|
import { redo, undo } from '@atlaskit/editor-prosemirror/history';
|
|
10
10
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
11
11
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
12
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
14
|
import { deleteExpandAtPos, setSelectionInsideExpand, toggleExpandExpanded, updateExpandTitle } from '../commands';
|
|
13
15
|
import { ExpandIconButton } from '../ui/ExpandIconButton';
|
|
14
16
|
function buildExpandClassName(type, expanded) {
|
|
@@ -188,6 +190,17 @@ export class ExpandNodeView {
|
|
|
188
190
|
this.handleUndoFromTitle(event);
|
|
189
191
|
return;
|
|
190
192
|
}
|
|
193
|
+
if (expValEquals('platform_editor_breakout_resizing', 'isEnabled', true) && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
194
|
+
if ((event.ctrlKey || event.metaKey) && event.altKey && (event.code === 'BracketLeft' || event.code === 'BracketRight')) {
|
|
195
|
+
this.view.dispatchEvent(new KeyboardEvent('keydown', {
|
|
196
|
+
key: event.key,
|
|
197
|
+
code: event.code,
|
|
198
|
+
metaKey: event.metaKey,
|
|
199
|
+
ctrlKey: event.ctrlKey,
|
|
200
|
+
altKey: event.altKey
|
|
201
|
+
}));
|
|
202
|
+
}
|
|
203
|
+
}
|
|
191
204
|
});
|
|
192
205
|
_defineProperty(this, "deleteExpand", event => {
|
|
193
206
|
if (!this.input) {
|
|
@@ -10,6 +10,7 @@ import { redo, undo } from '@atlaskit/editor-prosemirror/history';
|
|
|
10
10
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
11
11
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
12
12
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
13
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
14
|
import { deleteExpand, setSelectionInsideExpand, toggleExpandExpanded, updateExpandTitle } from '../commands';
|
|
14
15
|
import { ExpandButton } from '../ui/ExpandButton';
|
|
15
16
|
import { buildExpandClassName, toDOM } from '../ui/NodeView';
|
|
@@ -148,6 +149,17 @@ export class ExpandNodeView {
|
|
|
148
149
|
this.handleUndoFromTitle(event);
|
|
149
150
|
return;
|
|
150
151
|
}
|
|
152
|
+
if (expValEquals('platform_editor_breakout_resizing', 'isEnabled', true) && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
153
|
+
if ((event.ctrlKey || event.metaKey) && event.altKey && (event.code === 'BracketLeft' || event.code === 'BracketRight')) {
|
|
154
|
+
this.view.dispatchEvent(new KeyboardEvent('keydown', {
|
|
155
|
+
key: event.key,
|
|
156
|
+
code: event.code,
|
|
157
|
+
metaKey: event.metaKey,
|
|
158
|
+
ctrlKey: event.ctrlKey,
|
|
159
|
+
altKey: event.altKey
|
|
160
|
+
}));
|
|
161
|
+
}
|
|
162
|
+
}
|
|
151
163
|
});
|
|
152
164
|
_defineProperty(this, "deleteEmptyExpand", () => {
|
|
153
165
|
const {
|
|
@@ -11,6 +11,8 @@ import { closestElement, isEmptyNode } from '@atlaskit/editor-common/utils';
|
|
|
11
11
|
import { redo, undo } from '@atlaskit/editor-prosemirror/history';
|
|
12
12
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
13
13
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
16
|
import { deleteExpandAtPos, setSelectionInsideExpand, toggleExpandExpanded, updateExpandTitle } from '../commands';
|
|
15
17
|
import { ExpandIconButton } from '../ui/ExpandIconButton';
|
|
16
18
|
function buildExpandClassName(type, expanded) {
|
|
@@ -194,6 +196,17 @@ export var ExpandNodeView = /*#__PURE__*/function () {
|
|
|
194
196
|
_this.handleUndoFromTitle(event);
|
|
195
197
|
return;
|
|
196
198
|
}
|
|
199
|
+
if (expValEquals('platform_editor_breakout_resizing', 'isEnabled', true) && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
200
|
+
if ((event.ctrlKey || event.metaKey) && event.altKey && (event.code === 'BracketLeft' || event.code === 'BracketRight')) {
|
|
201
|
+
_this.view.dispatchEvent(new KeyboardEvent('keydown', {
|
|
202
|
+
key: event.key,
|
|
203
|
+
code: event.code,
|
|
204
|
+
metaKey: event.metaKey,
|
|
205
|
+
ctrlKey: event.ctrlKey,
|
|
206
|
+
altKey: event.altKey
|
|
207
|
+
}));
|
|
208
|
+
}
|
|
209
|
+
}
|
|
197
210
|
});
|
|
198
211
|
_defineProperty(this, "deleteExpand", function (event) {
|
|
199
212
|
if (!_this.input) {
|
|
@@ -12,6 +12,7 @@ import { redo, undo } from '@atlaskit/editor-prosemirror/history';
|
|
|
12
12
|
import { DOMSerializer } from '@atlaskit/editor-prosemirror/model';
|
|
13
13
|
import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
+
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
16
|
import { deleteExpand, setSelectionInsideExpand, toggleExpandExpanded, updateExpandTitle } from '../commands';
|
|
16
17
|
import { ExpandButton } from '../ui/ExpandButton';
|
|
17
18
|
import { buildExpandClassName, toDOM } from '../ui/NodeView';
|
|
@@ -154,6 +155,17 @@ export var ExpandNodeView = /*#__PURE__*/function () {
|
|
|
154
155
|
_this.handleUndoFromTitle(event);
|
|
155
156
|
return;
|
|
156
157
|
}
|
|
158
|
+
if (expValEquals('platform_editor_breakout_resizing', 'isEnabled', true) && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
159
|
+
if ((event.ctrlKey || event.metaKey) && event.altKey && (event.code === 'BracketLeft' || event.code === 'BracketRight')) {
|
|
160
|
+
_this.view.dispatchEvent(new KeyboardEvent('keydown', {
|
|
161
|
+
key: event.key,
|
|
162
|
+
code: event.code,
|
|
163
|
+
metaKey: event.metaKey,
|
|
164
|
+
ctrlKey: event.ctrlKey,
|
|
165
|
+
altKey: event.altKey
|
|
166
|
+
}));
|
|
167
|
+
}
|
|
168
|
+
}
|
|
157
169
|
});
|
|
158
170
|
_defineProperty(this, "deleteEmptyExpand", function () {
|
|
159
171
|
var state = _this.view.state;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-expand",
|
|
3
|
-
"version": "3.
|
|
3
|
+
"version": "3.3.1",
|
|
4
4
|
"description": "Expand plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -35,7 +35,7 @@
|
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
37
37
|
"@atlaskit/button": "^23.2.0",
|
|
38
|
-
"@atlaskit/editor-common": "^106.
|
|
38
|
+
"@atlaskit/editor-common": "^106.5.0",
|
|
39
39
|
"@atlaskit/editor-plugin-analytics": "^2.3.0",
|
|
40
40
|
"@atlaskit/editor-plugin-decorations": "^2.0.0",
|
|
41
41
|
"@atlaskit/editor-plugin-editor-disabled": "^2.0.0",
|
|
@@ -47,7 +47,7 @@
|
|
|
47
47
|
"@atlaskit/editor-tables": "^2.9.0",
|
|
48
48
|
"@atlaskit/icon": "^26.4.0",
|
|
49
49
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
50
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
50
|
+
"@atlaskit/tmp-editor-statsig": "^6.0.0",
|
|
51
51
|
"@atlaskit/tokens": "^5.1.0",
|
|
52
52
|
"@atlaskit/tooltip": "^20.3.0",
|
|
53
53
|
"@babel/runtime": "^7.0.0",
|
|
@@ -65,7 +65,7 @@
|
|
|
65
65
|
"@atlaskit/editor-plugin-content-insertion": "^2.1.0",
|
|
66
66
|
"@atlaskit/editor-plugin-guideline": "^2.0.0",
|
|
67
67
|
"@atlaskit/editor-plugin-quick-insert": "^2.5.0",
|
|
68
|
-
"@atlaskit/editor-plugin-table": "^10.
|
|
68
|
+
"@atlaskit/editor-plugin-table": "^10.12.0",
|
|
69
69
|
"@atlaskit/editor-plugin-type-ahead": "^2.7.0",
|
|
70
70
|
"@atlaskit/editor-plugin-width": "^3.0.0",
|
|
71
71
|
"@testing-library/react": "^13.4.0",
|
|
@@ -111,6 +111,9 @@
|
|
|
111
111
|
},
|
|
112
112
|
"platform_editor_disable_unnecessary_expand_renders": {
|
|
113
113
|
"type": "boolean"
|
|
114
|
+
},
|
|
115
|
+
"platform_editor_breakout_resizing_hello_release": {
|
|
116
|
+
"type": "boolean"
|
|
114
117
|
}
|
|
115
118
|
}
|
|
116
119
|
}
|