@atlaskit/editor-plugin-breakout 2.7.6 → 2.8.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 +25 -0
- package/dist/cjs/breakoutPlugin.js +2 -1
- package/dist/cjs/pm-plugins/handle-key-down.js +30 -26
- package/dist/cjs/pm-plugins/resizer-callbacks.js +6 -1
- package/dist/cjs/pm-plugins/resizing-plugin.js +25 -1
- package/dist/cjs/ui/LayoutButton.js +25 -2
- package/dist/es2019/breakoutPlugin.js +2 -1
- package/dist/es2019/pm-plugins/handle-key-down.js +4 -2
- package/dist/es2019/pm-plugins/resizer-callbacks.js +6 -1
- package/dist/es2019/pm-plugins/resizing-plugin.js +27 -1
- package/dist/es2019/ui/LayoutButton.js +25 -2
- package/dist/esm/breakoutPlugin.js +2 -1
- package/dist/esm/pm-plugins/handle-key-down.js +30 -26
- package/dist/esm/pm-plugins/resizer-callbacks.js +6 -1
- package/dist/esm/pm-plugins/resizing-plugin.js +25 -1
- package/dist/esm/ui/LayoutButton.js +25 -2
- package/dist/types/pm-plugins/handle-key-down.d.ts +3 -1
- package/dist/types/ui/LayoutButton.d.ts +3 -1
- package/dist/types-ts4.5/pm-plugins/handle-key-down.d.ts +3 -1
- package/dist/types-ts4.5/ui/LayoutButton.d.ts +3 -1
- package/package.json +2 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,30 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-breakout
|
|
2
2
|
|
|
3
|
+
## 2.8.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- Updated dependencies
|
|
8
|
+
|
|
9
|
+
## 2.8.0
|
|
10
|
+
|
|
11
|
+
### Minor Changes
|
|
12
|
+
|
|
13
|
+
- [#173259](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173259)
|
|
14
|
+
[`8c7a6909826be`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8c7a6909826be) -
|
|
15
|
+
Add new Changed Breakout Mode event and hook it up to breakout button
|
|
16
|
+
|
|
17
|
+
### Patch Changes
|
|
18
|
+
|
|
19
|
+
- [#173297](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173297)
|
|
20
|
+
[`c1d3dba68babc`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c1d3dba68babc) -
|
|
21
|
+
[ux] When single player expand FG is disabled, the opened expand should keep expanded state after
|
|
22
|
+
resize.
|
|
23
|
+
- [#173239](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/173239)
|
|
24
|
+
[`75dd671d5fcf6`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/75dd671d5fcf6) -
|
|
25
|
+
Retain an exand nodes expanded state when applying breakout node
|
|
26
|
+
- Updated dependencies
|
|
27
|
+
|
|
3
28
|
## 2.7.6
|
|
4
29
|
|
|
5
30
|
### Patch Changes
|
|
@@ -200,7 +200,8 @@ var LayoutButtonWrapper = function LayoutButtonWrapper(_ref2) {
|
|
|
200
200
|
node: (_breakoutNode$node = breakoutNode === null || breakoutNode === void 0 ? void 0 : breakoutNode.node) !== null && _breakoutNode$node !== void 0 ? _breakoutNode$node : null,
|
|
201
201
|
isLivePage: isEditMode,
|
|
202
202
|
isBreakoutNodePresent: breakoutNodePresent,
|
|
203
|
-
breakoutMode: breakoutMode
|
|
203
|
+
breakoutMode: breakoutMode,
|
|
204
|
+
api: api
|
|
204
205
|
}) : null;
|
|
205
206
|
};
|
|
206
207
|
var breakoutPlugin = exports.breakoutPlugin = function breakoutPlugin(_ref4) {
|
|
@@ -38,34 +38,38 @@ var getAncestorResizableNode = function getAncestorResizableNode(view, breakoutR
|
|
|
38
38
|
}
|
|
39
39
|
return null;
|
|
40
40
|
};
|
|
41
|
-
var handleKeyDown = exports.handleKeyDown = function handleKeyDown(
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
(
|
|
63
|
-
|
|
41
|
+
var handleKeyDown = exports.handleKeyDown = function handleKeyDown(api) {
|
|
42
|
+
return function (view, event) {
|
|
43
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release')) {
|
|
44
|
+
var metaKey = _browser.browser.mac ? event.metaKey : event.ctrlKey;
|
|
45
|
+
var isBracketKey = event.code === 'BracketRight' || event.code === 'BracketLeft';
|
|
46
|
+
if (metaKey && event.altKey && isBracketKey) {
|
|
47
|
+
var _view$state$schema$no = view.state.schema.nodes,
|
|
48
|
+
expand = _view$state$schema$no.expand,
|
|
49
|
+
codeBlock = _view$state$schema$no.codeBlock,
|
|
50
|
+
layoutSection = _view$state$schema$no.layoutSection;
|
|
51
|
+
var breakoutResizableNodes = new Set([expand, codeBlock, layoutSection]);
|
|
52
|
+
var result = getAncestorResizableNode(view, breakoutResizableNodes);
|
|
53
|
+
if (result) {
|
|
54
|
+
var node = result.node,
|
|
55
|
+
pos = result.pos;
|
|
56
|
+
var breakoutMark = node === null || node === void 0 ? void 0 : node.marks.find(function (mark) {
|
|
57
|
+
return mark.type.name === 'breakout';
|
|
58
|
+
});
|
|
59
|
+
if (breakoutMark) {
|
|
60
|
+
var step = event.code === 'BracketRight' ? KEYBOARD_RESIZE_STEP : -KEYBOARD_RESIZE_STEP;
|
|
61
|
+
var newWidth = breakoutMark.attrs.width + step;
|
|
62
|
+
if (newWidth < _editorSharedStyles.akEditorFullWidthLayoutWidth && newWidth > _editorSharedStyles.akEditorDefaultLayoutWidth) {
|
|
63
|
+
var _api$editorViewMode;
|
|
64
|
+
var isEditMode = (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'edit';
|
|
65
|
+
(0, _setBreakoutWidth.setBreakoutWidth)(breakoutMark.attrs.width + step, breakoutMark.attrs.mode, pos, isEditMode)(view.state, view.dispatch);
|
|
66
|
+
view.focus();
|
|
67
|
+
}
|
|
68
|
+
return true;
|
|
64
69
|
}
|
|
65
|
-
return true;
|
|
66
70
|
}
|
|
67
71
|
}
|
|
72
|
+
return false;
|
|
68
73
|
}
|
|
69
|
-
|
|
70
|
-
}
|
|
74
|
+
};
|
|
71
75
|
};
|
|
@@ -163,7 +163,12 @@ function createResizerCallbacks(_ref2) {
|
|
|
163
163
|
api: api,
|
|
164
164
|
source: source
|
|
165
165
|
});
|
|
166
|
-
|
|
166
|
+
var isEditMode;
|
|
167
|
+
if ((0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release')) {
|
|
168
|
+
var _api$editorViewMode;
|
|
169
|
+
isEditMode = (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'edit';
|
|
170
|
+
}
|
|
171
|
+
(0, _setBreakoutWidth.setBreakoutWidth)(newWidth, mode, pos, isEditMode)(view.state, view.dispatch);
|
|
167
172
|
contentDOM.style.removeProperty(_resizingMarkView.LOCAL_RESIZE_PROPERTY);
|
|
168
173
|
if (node && (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release')) {
|
|
169
174
|
var resizedPayload = (0, _analytics.generateResizedEventPayload)({
|
|
@@ -14,6 +14,7 @@ var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
|
14
14
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
15
|
var _handleKeyDown = require("./handle-key-down");
|
|
16
16
|
var _resizingMarkView = require("./resizing-mark-view");
|
|
17
|
+
var _singlePlayerExpand = require("./utils/single-player-expand");
|
|
17
18
|
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
18
19
|
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
19
20
|
var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
@@ -29,14 +30,24 @@ var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
|
29
30
|
var isTopLevelNode = ($pos === null || $pos === void 0 ? void 0 : $pos.depth) === 0;
|
|
30
31
|
if (breakoutResizableNodes.has(node.type) && isTopLevelNode) {
|
|
31
32
|
var breakout = newState.schema.marks.breakout;
|
|
33
|
+
var expand = newState.schema.nodes.expand;
|
|
32
34
|
var breakoutMark = node.marks.find(function (mark) {
|
|
33
35
|
return mark.type === breakout;
|
|
34
36
|
});
|
|
37
|
+
var isExpand = node.type === expand;
|
|
35
38
|
if (!breakoutMark) {
|
|
36
39
|
var width = isFullWidthEnabled ? _editorSharedStyles.akEditorFullWidthLayoutWidth : _editorSharedStyles.akEditorDefaultLayoutWidth;
|
|
37
40
|
updatedTr = newTr.setNodeMarkup(pos, node.type, node.attrs, [breakout.create({
|
|
38
41
|
width: width
|
|
39
42
|
})]);
|
|
43
|
+
if (isExpand && (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release')) {
|
|
44
|
+
(0, _singlePlayerExpand.updateExpandedStateNew)({
|
|
45
|
+
tr: updatedTr,
|
|
46
|
+
node: node,
|
|
47
|
+
pos: pos,
|
|
48
|
+
isLivePage: true
|
|
49
|
+
});
|
|
50
|
+
}
|
|
40
51
|
updatedDocChanged = true;
|
|
41
52
|
} else if ((breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === null || (breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === undefined) {
|
|
42
53
|
var mode = breakoutMark.attrs.mode;
|
|
@@ -45,6 +56,14 @@ var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
|
45
56
|
width: newWidth,
|
|
46
57
|
mode: mode
|
|
47
58
|
})]);
|
|
59
|
+
if (isExpand && (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release')) {
|
|
60
|
+
(0, _singlePlayerExpand.updateExpandedStateNew)({
|
|
61
|
+
tr: updatedTr,
|
|
62
|
+
node: node,
|
|
63
|
+
pos: pos,
|
|
64
|
+
isLivePage: true
|
|
65
|
+
});
|
|
66
|
+
}
|
|
48
67
|
updatedDocChanged = true;
|
|
49
68
|
}
|
|
50
69
|
}
|
|
@@ -97,9 +116,14 @@ var createResizingPlugin = exports.createResizingPlugin = function createResizin
|
|
|
97
116
|
return new _resizingMarkView.ResizingMarkView(mark, view, api, getIntl, nodeViewPortalProviderAPI);
|
|
98
117
|
}
|
|
99
118
|
},
|
|
100
|
-
handleKeyDown: _handleKeyDown.handleKeyDown
|
|
119
|
+
handleKeyDown: (0, _handleKeyDown.handleKeyDown)(api)
|
|
101
120
|
},
|
|
102
121
|
appendTransaction: function appendTransaction(transactions, oldState, newState) {
|
|
122
|
+
var _api$editorViewMode;
|
|
123
|
+
// if editor is in live-view mode don't send transactions
|
|
124
|
+
if ((api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) !== 'edit' && (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_hello_release')) {
|
|
125
|
+
return;
|
|
126
|
+
}
|
|
103
127
|
var newTr = newState.tr;
|
|
104
128
|
var hasDocChanged = false;
|
|
105
129
|
var _newState$schema$node = newState.schema.nodes,
|
|
@@ -8,6 +8,7 @@ exports.default = void 0;
|
|
|
8
8
|
var _react = require("react");
|
|
9
9
|
var _react2 = require("@emotion/react");
|
|
10
10
|
var _reactIntlNext = require("react-intl-next");
|
|
11
|
+
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
11
12
|
var _styles = require("@atlaskit/editor-common/styles");
|
|
12
13
|
var _ui = require("@atlaskit/editor-common/ui");
|
|
13
14
|
var _uiMenu = require("@atlaskit/editor-common/ui-menu");
|
|
@@ -61,6 +62,7 @@ function getBreakoutNodeElement(pluginState, selection, editorView) {
|
|
|
61
62
|
return (0, _utils2.findParentDomRefOfType)(pluginState.breakoutNode.node.type, editorView.domAtPos.bind(editorView))(selection);
|
|
62
63
|
}
|
|
63
64
|
var LayoutButton = function LayoutButton(_ref) {
|
|
65
|
+
var _api$analytics3;
|
|
64
66
|
var formatMessage = _ref.intl.formatMessage,
|
|
65
67
|
mountPoint = _ref.mountPoint,
|
|
66
68
|
boundariesElement = _ref.boundariesElement,
|
|
@@ -69,16 +71,37 @@ var LayoutButton = function LayoutButton(_ref) {
|
|
|
69
71
|
node = _ref.node,
|
|
70
72
|
isLivePage = _ref.isLivePage,
|
|
71
73
|
isBreakoutNodePresent = _ref.isBreakoutNodePresent,
|
|
72
|
-
breakoutModeProp = _ref.breakoutMode
|
|
74
|
+
breakoutModeProp = _ref.breakoutMode,
|
|
75
|
+
api = _ref.api;
|
|
73
76
|
var handleClick = (0, _react.useCallback)(function (breakoutMode) {
|
|
74
77
|
var state = editorView.state,
|
|
75
78
|
dispatch = editorView.dispatch;
|
|
76
79
|
if (['wide', 'full-width'].indexOf(breakoutMode) !== -1) {
|
|
80
|
+
var _api$analytics;
|
|
77
81
|
(0, _setBreakoutMode.setBreakoutMode)(breakoutMode, isLivePage)(state, dispatch);
|
|
82
|
+
api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || _api$analytics.actions.fireAnalyticsEvent({
|
|
83
|
+
action: _analytics.ACTION.CHANGED_BREAKOUT_MODE,
|
|
84
|
+
actionSubject: _analytics.ACTION_SUBJECT.ELEMENT,
|
|
85
|
+
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
86
|
+
attributes: {
|
|
87
|
+
mode: breakoutMode,
|
|
88
|
+
nodeType: node === null || node === void 0 ? void 0 : node.type.name
|
|
89
|
+
}
|
|
90
|
+
});
|
|
78
91
|
} else {
|
|
92
|
+
var _api$analytics2;
|
|
79
93
|
(0, _removeBreakout.removeBreakout)(isLivePage)(state, dispatch);
|
|
94
|
+
api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.fireAnalyticsEvent({
|
|
95
|
+
action: _analytics.ACTION.CHANGED_BREAKOUT_MODE,
|
|
96
|
+
actionSubject: _analytics.ACTION_SUBJECT.ELEMENT,
|
|
97
|
+
eventType: _analytics.EVENT_TYPE.TRACK,
|
|
98
|
+
attributes: {
|
|
99
|
+
mode: 'center',
|
|
100
|
+
nodeType: node === null || node === void 0 ? void 0 : node.type.name
|
|
101
|
+
}
|
|
102
|
+
});
|
|
80
103
|
}
|
|
81
|
-
}, [editorView, isLivePage]);
|
|
104
|
+
}, [api === null || api === void 0 || (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions, editorView, isLivePage, node === null || node === void 0 ? void 0 : node.type.name]);
|
|
82
105
|
var state = editorView.state;
|
|
83
106
|
var exitCondition = (0, _experiments.editorExperiment)('platform_editor_usesharedpluginstateselector', true) ? !isBreakoutNodePresent : !node;
|
|
84
107
|
if (exitCondition || !(0, _isBreakoutMarkAllowed.isBreakoutMarkAllowed)(state)) {
|
|
@@ -186,7 +186,8 @@ const LayoutButtonWrapper = ({
|
|
|
186
186
|
node: (_breakoutNode$node = breakoutNode === null || breakoutNode === void 0 ? void 0 : breakoutNode.node) !== null && _breakoutNode$node !== void 0 ? _breakoutNode$node : null,
|
|
187
187
|
isLivePage: isEditMode,
|
|
188
188
|
isBreakoutNodePresent: breakoutNodePresent,
|
|
189
|
-
breakoutMode: breakoutMode
|
|
189
|
+
breakoutMode: breakoutMode,
|
|
190
|
+
api: api
|
|
190
191
|
}) : null;
|
|
191
192
|
};
|
|
192
193
|
export const breakoutPlugin = ({
|
|
@@ -32,7 +32,7 @@ const getAncestorResizableNode = (view, breakoutResizableNodes) => {
|
|
|
32
32
|
}
|
|
33
33
|
return null;
|
|
34
34
|
};
|
|
35
|
-
export const handleKeyDown = (view, event) => {
|
|
35
|
+
export const handleKeyDown = api => (view, event) => {
|
|
36
36
|
if (fg('platform_editor_breakout_resizing_hello_release')) {
|
|
37
37
|
const metaKey = browser.mac ? event.metaKey : event.ctrlKey;
|
|
38
38
|
const isBracketKey = event.code === 'BracketRight' || event.code === 'BracketLeft';
|
|
@@ -54,7 +54,9 @@ export const handleKeyDown = (view, event) => {
|
|
|
54
54
|
const step = event.code === 'BracketRight' ? KEYBOARD_RESIZE_STEP : -KEYBOARD_RESIZE_STEP;
|
|
55
55
|
const newWidth = breakoutMark.attrs.width + step;
|
|
56
56
|
if (newWidth < akEditorFullWidthLayoutWidth && newWidth > akEditorDefaultLayoutWidth) {
|
|
57
|
-
|
|
57
|
+
var _api$editorViewMode, _api$editorViewMode$s;
|
|
58
|
+
const isEditMode = (api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : (_api$editorViewMode$s = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode$s === void 0 ? void 0 : _api$editorViewMode$s.mode) === 'edit';
|
|
59
|
+
setBreakoutWidth(breakoutMark.attrs.width + step, breakoutMark.attrs.mode, pos, isEditMode)(view.state, view.dispatch);
|
|
58
60
|
view.focus();
|
|
59
61
|
}
|
|
60
62
|
return true;
|
|
@@ -159,7 +159,12 @@ export function createResizerCallbacks({
|
|
|
159
159
|
api,
|
|
160
160
|
source
|
|
161
161
|
});
|
|
162
|
-
|
|
162
|
+
let isEditMode;
|
|
163
|
+
if (fg('platform_editor_breakout_resizing_hello_release')) {
|
|
164
|
+
var _api$editorViewMode, _api$editorViewMode$s;
|
|
165
|
+
isEditMode = (api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : (_api$editorViewMode$s = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode$s === void 0 ? void 0 : _api$editorViewMode$s.mode) === 'edit';
|
|
166
|
+
}
|
|
167
|
+
setBreakoutWidth(newWidth, mode, pos, isEditMode)(view.state, view.dispatch);
|
|
163
168
|
contentDOM.style.removeProperty(LOCAL_RESIZE_PROPERTY);
|
|
164
169
|
if (node && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
165
170
|
const resizedPayload = generateResizedEventPayload({
|
|
@@ -6,6 +6,7 @@ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalcu
|
|
|
6
6
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
7
|
import { handleKeyDown } from './handle-key-down';
|
|
8
8
|
import { ResizingMarkView } from './resizing-mark-view';
|
|
9
|
+
import { updateExpandedStateNew } from './utils/single-player-expand';
|
|
9
10
|
const addBreakoutToResizableNode = ({
|
|
10
11
|
node,
|
|
11
12
|
pos,
|
|
@@ -22,12 +23,24 @@ const addBreakoutToResizableNode = ({
|
|
|
22
23
|
const {
|
|
23
24
|
breakout
|
|
24
25
|
} = newState.schema.marks;
|
|
26
|
+
const {
|
|
27
|
+
expand
|
|
28
|
+
} = newState.schema.nodes;
|
|
25
29
|
const breakoutMark = node.marks.find(mark => mark.type === breakout);
|
|
30
|
+
const isExpand = node.type === expand;
|
|
26
31
|
if (!breakoutMark) {
|
|
27
32
|
const width = isFullWidthEnabled ? akEditorFullWidthLayoutWidth : akEditorDefaultLayoutWidth;
|
|
28
33
|
updatedTr = newTr.setNodeMarkup(pos, node.type, node.attrs, [breakout.create({
|
|
29
34
|
width: width
|
|
30
35
|
})]);
|
|
36
|
+
if (isExpand && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
37
|
+
updateExpandedStateNew({
|
|
38
|
+
tr: updatedTr,
|
|
39
|
+
node,
|
|
40
|
+
pos,
|
|
41
|
+
isLivePage: true
|
|
42
|
+
});
|
|
43
|
+
}
|
|
31
44
|
updatedDocChanged = true;
|
|
32
45
|
} else if ((breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === null || (breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === undefined) {
|
|
33
46
|
const mode = breakoutMark.attrs.mode;
|
|
@@ -36,6 +49,14 @@ const addBreakoutToResizableNode = ({
|
|
|
36
49
|
width: newWidth,
|
|
37
50
|
mode: mode
|
|
38
51
|
})]);
|
|
52
|
+
if (isExpand && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
53
|
+
updateExpandedStateNew({
|
|
54
|
+
tr: updatedTr,
|
|
55
|
+
node,
|
|
56
|
+
pos,
|
|
57
|
+
isLivePage: true
|
|
58
|
+
});
|
|
59
|
+
}
|
|
39
60
|
updatedDocChanged = true;
|
|
40
61
|
}
|
|
41
62
|
}
|
|
@@ -91,9 +112,14 @@ export const createResizingPlugin = (api, getIntl, nodeViewPortalProviderAPI, op
|
|
|
91
112
|
return new ResizingMarkView(mark, view, api, getIntl, nodeViewPortalProviderAPI);
|
|
92
113
|
}
|
|
93
114
|
},
|
|
94
|
-
handleKeyDown
|
|
115
|
+
handleKeyDown: handleKeyDown(api)
|
|
95
116
|
},
|
|
96
117
|
appendTransaction(transactions, oldState, newState) {
|
|
118
|
+
var _api$editorViewMode, _api$editorViewMode$s;
|
|
119
|
+
// if editor is in live-view mode don't send transactions
|
|
120
|
+
if ((api === null || api === void 0 ? void 0 : (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 ? void 0 : (_api$editorViewMode$s = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode$s === void 0 ? void 0 : _api$editorViewMode$s.mode) !== 'edit' && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
121
|
+
return;
|
|
122
|
+
}
|
|
97
123
|
let newTr = newState.tr;
|
|
98
124
|
let hasDocChanged = false;
|
|
99
125
|
const {
|
|
@@ -7,6 +7,7 @@ import { useCallback } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { injectIntl } from 'react-intl-next';
|
|
10
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
10
11
|
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
11
12
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
12
13
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -63,19 +64,41 @@ const LayoutButton = ({
|
|
|
63
64
|
node,
|
|
64
65
|
isLivePage,
|
|
65
66
|
isBreakoutNodePresent,
|
|
66
|
-
breakoutMode: breakoutModeProp
|
|
67
|
+
breakoutMode: breakoutModeProp,
|
|
68
|
+
api
|
|
67
69
|
}) => {
|
|
70
|
+
var _api$analytics3;
|
|
68
71
|
const handleClick = useCallback(breakoutMode => {
|
|
69
72
|
const {
|
|
70
73
|
state,
|
|
71
74
|
dispatch
|
|
72
75
|
} = editorView;
|
|
73
76
|
if (['wide', 'full-width'].indexOf(breakoutMode) !== -1) {
|
|
77
|
+
var _api$analytics;
|
|
74
78
|
setBreakoutMode(breakoutMode, isLivePage)(state, dispatch);
|
|
79
|
+
api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : _api$analytics.actions.fireAnalyticsEvent({
|
|
80
|
+
action: ACTION.CHANGED_BREAKOUT_MODE,
|
|
81
|
+
actionSubject: ACTION_SUBJECT.ELEMENT,
|
|
82
|
+
eventType: EVENT_TYPE.TRACK,
|
|
83
|
+
attributes: {
|
|
84
|
+
mode: breakoutMode,
|
|
85
|
+
nodeType: node === null || node === void 0 ? void 0 : node.type.name
|
|
86
|
+
}
|
|
87
|
+
});
|
|
75
88
|
} else {
|
|
89
|
+
var _api$analytics2;
|
|
76
90
|
removeBreakout(isLivePage)(state, dispatch);
|
|
91
|
+
api === null || api === void 0 ? void 0 : (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 ? void 0 : _api$analytics2.actions.fireAnalyticsEvent({
|
|
92
|
+
action: ACTION.CHANGED_BREAKOUT_MODE,
|
|
93
|
+
actionSubject: ACTION_SUBJECT.ELEMENT,
|
|
94
|
+
eventType: EVENT_TYPE.TRACK,
|
|
95
|
+
attributes: {
|
|
96
|
+
mode: 'center',
|
|
97
|
+
nodeType: node === null || node === void 0 ? void 0 : node.type.name
|
|
98
|
+
}
|
|
99
|
+
});
|
|
77
100
|
}
|
|
78
|
-
}, [editorView, isLivePage]);
|
|
101
|
+
}, [api === null || api === void 0 ? void 0 : (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions, editorView, isLivePage, node === null || node === void 0 ? void 0 : node.type.name]);
|
|
79
102
|
const {
|
|
80
103
|
state
|
|
81
104
|
} = editorView;
|
|
@@ -191,7 +191,8 @@ var LayoutButtonWrapper = function LayoutButtonWrapper(_ref2) {
|
|
|
191
191
|
node: (_breakoutNode$node = breakoutNode === null || breakoutNode === void 0 ? void 0 : breakoutNode.node) !== null && _breakoutNode$node !== void 0 ? _breakoutNode$node : null,
|
|
192
192
|
isLivePage: isEditMode,
|
|
193
193
|
isBreakoutNodePresent: breakoutNodePresent,
|
|
194
|
-
breakoutMode: breakoutMode
|
|
194
|
+
breakoutMode: breakoutMode,
|
|
195
|
+
api: api
|
|
195
196
|
}) : null;
|
|
196
197
|
};
|
|
197
198
|
export var breakoutPlugin = function breakoutPlugin(_ref4) {
|
|
@@ -32,34 +32,38 @@ var getAncestorResizableNode = function getAncestorResizableNode(view, breakoutR
|
|
|
32
32
|
}
|
|
33
33
|
return null;
|
|
34
34
|
};
|
|
35
|
-
export var handleKeyDown = function handleKeyDown(
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
35
|
+
export var handleKeyDown = function handleKeyDown(api) {
|
|
36
|
+
return function (view, event) {
|
|
37
|
+
if (fg('platform_editor_breakout_resizing_hello_release')) {
|
|
38
|
+
var metaKey = browser.mac ? event.metaKey : event.ctrlKey;
|
|
39
|
+
var isBracketKey = event.code === 'BracketRight' || event.code === 'BracketLeft';
|
|
40
|
+
if (metaKey && event.altKey && isBracketKey) {
|
|
41
|
+
var _view$state$schema$no = view.state.schema.nodes,
|
|
42
|
+
expand = _view$state$schema$no.expand,
|
|
43
|
+
codeBlock = _view$state$schema$no.codeBlock,
|
|
44
|
+
layoutSection = _view$state$schema$no.layoutSection;
|
|
45
|
+
var breakoutResizableNodes = new Set([expand, codeBlock, layoutSection]);
|
|
46
|
+
var result = getAncestorResizableNode(view, breakoutResizableNodes);
|
|
47
|
+
if (result) {
|
|
48
|
+
var node = result.node,
|
|
49
|
+
pos = result.pos;
|
|
50
|
+
var breakoutMark = node === null || node === void 0 ? void 0 : node.marks.find(function (mark) {
|
|
51
|
+
return mark.type.name === 'breakout';
|
|
52
|
+
});
|
|
53
|
+
if (breakoutMark) {
|
|
54
|
+
var step = event.code === 'BracketRight' ? KEYBOARD_RESIZE_STEP : -KEYBOARD_RESIZE_STEP;
|
|
55
|
+
var newWidth = breakoutMark.attrs.width + step;
|
|
56
|
+
if (newWidth < akEditorFullWidthLayoutWidth && newWidth > akEditorDefaultLayoutWidth) {
|
|
57
|
+
var _api$editorViewMode;
|
|
58
|
+
var isEditMode = (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'edit';
|
|
59
|
+
setBreakoutWidth(breakoutMark.attrs.width + step, breakoutMark.attrs.mode, pos, isEditMode)(view.state, view.dispatch);
|
|
60
|
+
view.focus();
|
|
61
|
+
}
|
|
62
|
+
return true;
|
|
58
63
|
}
|
|
59
|
-
return true;
|
|
60
64
|
}
|
|
61
65
|
}
|
|
66
|
+
return false;
|
|
62
67
|
}
|
|
63
|
-
|
|
64
|
-
}
|
|
68
|
+
};
|
|
65
69
|
};
|
|
@@ -156,7 +156,12 @@ export function createResizerCallbacks(_ref2) {
|
|
|
156
156
|
api: api,
|
|
157
157
|
source: source
|
|
158
158
|
});
|
|
159
|
-
|
|
159
|
+
var isEditMode;
|
|
160
|
+
if (fg('platform_editor_breakout_resizing_hello_release')) {
|
|
161
|
+
var _api$editorViewMode;
|
|
162
|
+
isEditMode = (api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) === 'edit';
|
|
163
|
+
}
|
|
164
|
+
setBreakoutWidth(newWidth, mode, pos, isEditMode)(view.state, view.dispatch);
|
|
160
165
|
contentDOM.style.removeProperty(LOCAL_RESIZE_PROPERTY);
|
|
161
166
|
if (node && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
162
167
|
var resizedPayload = generateResizedEventPayload({
|
|
@@ -9,6 +9,7 @@ import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalcu
|
|
|
9
9
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
10
|
import { handleKeyDown } from './handle-key-down';
|
|
11
11
|
import { ResizingMarkView } from './resizing-mark-view';
|
|
12
|
+
import { updateExpandedStateNew } from './utils/single-player-expand';
|
|
12
13
|
var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
13
14
|
var node = _ref.node,
|
|
14
15
|
pos = _ref.pos,
|
|
@@ -22,14 +23,24 @@ var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
|
22
23
|
var isTopLevelNode = ($pos === null || $pos === void 0 ? void 0 : $pos.depth) === 0;
|
|
23
24
|
if (breakoutResizableNodes.has(node.type) && isTopLevelNode) {
|
|
24
25
|
var breakout = newState.schema.marks.breakout;
|
|
26
|
+
var expand = newState.schema.nodes.expand;
|
|
25
27
|
var breakoutMark = node.marks.find(function (mark) {
|
|
26
28
|
return mark.type === breakout;
|
|
27
29
|
});
|
|
30
|
+
var isExpand = node.type === expand;
|
|
28
31
|
if (!breakoutMark) {
|
|
29
32
|
var width = isFullWidthEnabled ? akEditorFullWidthLayoutWidth : akEditorDefaultLayoutWidth;
|
|
30
33
|
updatedTr = newTr.setNodeMarkup(pos, node.type, node.attrs, [breakout.create({
|
|
31
34
|
width: width
|
|
32
35
|
})]);
|
|
36
|
+
if (isExpand && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
37
|
+
updateExpandedStateNew({
|
|
38
|
+
tr: updatedTr,
|
|
39
|
+
node: node,
|
|
40
|
+
pos: pos,
|
|
41
|
+
isLivePage: true
|
|
42
|
+
});
|
|
43
|
+
}
|
|
33
44
|
updatedDocChanged = true;
|
|
34
45
|
} else if ((breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === null || (breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === undefined) {
|
|
35
46
|
var mode = breakoutMark.attrs.mode;
|
|
@@ -38,6 +49,14 @@ var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
|
38
49
|
width: newWidth,
|
|
39
50
|
mode: mode
|
|
40
51
|
})]);
|
|
52
|
+
if (isExpand && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
53
|
+
updateExpandedStateNew({
|
|
54
|
+
tr: updatedTr,
|
|
55
|
+
node: node,
|
|
56
|
+
pos: pos,
|
|
57
|
+
isLivePage: true
|
|
58
|
+
});
|
|
59
|
+
}
|
|
41
60
|
updatedDocChanged = true;
|
|
42
61
|
}
|
|
43
62
|
}
|
|
@@ -90,9 +109,14 @@ export var createResizingPlugin = function createResizingPlugin(api, getIntl, no
|
|
|
90
109
|
return new ResizingMarkView(mark, view, api, getIntl, nodeViewPortalProviderAPI);
|
|
91
110
|
}
|
|
92
111
|
},
|
|
93
|
-
handleKeyDown: handleKeyDown
|
|
112
|
+
handleKeyDown: handleKeyDown(api)
|
|
94
113
|
},
|
|
95
114
|
appendTransaction: function appendTransaction(transactions, oldState, newState) {
|
|
115
|
+
var _api$editorViewMode;
|
|
116
|
+
// if editor is in live-view mode don't send transactions
|
|
117
|
+
if ((api === null || api === void 0 || (_api$editorViewMode = api.editorViewMode) === null || _api$editorViewMode === void 0 || (_api$editorViewMode = _api$editorViewMode.sharedState.currentState()) === null || _api$editorViewMode === void 0 ? void 0 : _api$editorViewMode.mode) !== 'edit' && fg('platform_editor_breakout_resizing_hello_release')) {
|
|
118
|
+
return;
|
|
119
|
+
}
|
|
96
120
|
var newTr = newState.tr;
|
|
97
121
|
var hasDocChanged = false;
|
|
98
122
|
var _newState$schema$node = newState.schema.nodes,
|
|
@@ -7,6 +7,7 @@ import { useCallback } from 'react';
|
|
|
7
7
|
// eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { injectIntl } from 'react-intl-next';
|
|
10
|
+
import { ACTION, ACTION_SUBJECT, EVENT_TYPE } from '@atlaskit/editor-common/analytics';
|
|
10
11
|
import { BreakoutCssClassName } from '@atlaskit/editor-common/styles';
|
|
11
12
|
import { Popup } from '@atlaskit/editor-common/ui';
|
|
12
13
|
import { ToolbarButton } from '@atlaskit/editor-common/ui-menu';
|
|
@@ -53,6 +54,7 @@ function getBreakoutNodeElement(pluginState, selection, editorView) {
|
|
|
53
54
|
return findParentDomRefOfType(pluginState.breakoutNode.node.type, editorView.domAtPos.bind(editorView))(selection);
|
|
54
55
|
}
|
|
55
56
|
var LayoutButton = function LayoutButton(_ref) {
|
|
57
|
+
var _api$analytics3;
|
|
56
58
|
var formatMessage = _ref.intl.formatMessage,
|
|
57
59
|
mountPoint = _ref.mountPoint,
|
|
58
60
|
boundariesElement = _ref.boundariesElement,
|
|
@@ -61,16 +63,37 @@ var LayoutButton = function LayoutButton(_ref) {
|
|
|
61
63
|
node = _ref.node,
|
|
62
64
|
isLivePage = _ref.isLivePage,
|
|
63
65
|
isBreakoutNodePresent = _ref.isBreakoutNodePresent,
|
|
64
|
-
breakoutModeProp = _ref.breakoutMode
|
|
66
|
+
breakoutModeProp = _ref.breakoutMode,
|
|
67
|
+
api = _ref.api;
|
|
65
68
|
var handleClick = useCallback(function (breakoutMode) {
|
|
66
69
|
var state = editorView.state,
|
|
67
70
|
dispatch = editorView.dispatch;
|
|
68
71
|
if (['wide', 'full-width'].indexOf(breakoutMode) !== -1) {
|
|
72
|
+
var _api$analytics;
|
|
69
73
|
setBreakoutMode(breakoutMode, isLivePage)(state, dispatch);
|
|
74
|
+
api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || _api$analytics.actions.fireAnalyticsEvent({
|
|
75
|
+
action: ACTION.CHANGED_BREAKOUT_MODE,
|
|
76
|
+
actionSubject: ACTION_SUBJECT.ELEMENT,
|
|
77
|
+
eventType: EVENT_TYPE.TRACK,
|
|
78
|
+
attributes: {
|
|
79
|
+
mode: breakoutMode,
|
|
80
|
+
nodeType: node === null || node === void 0 ? void 0 : node.type.name
|
|
81
|
+
}
|
|
82
|
+
});
|
|
70
83
|
} else {
|
|
84
|
+
var _api$analytics2;
|
|
71
85
|
removeBreakout(isLivePage)(state, dispatch);
|
|
86
|
+
api === null || api === void 0 || (_api$analytics2 = api.analytics) === null || _api$analytics2 === void 0 || _api$analytics2.actions.fireAnalyticsEvent({
|
|
87
|
+
action: ACTION.CHANGED_BREAKOUT_MODE,
|
|
88
|
+
actionSubject: ACTION_SUBJECT.ELEMENT,
|
|
89
|
+
eventType: EVENT_TYPE.TRACK,
|
|
90
|
+
attributes: {
|
|
91
|
+
mode: 'center',
|
|
92
|
+
nodeType: node === null || node === void 0 ? void 0 : node.type.name
|
|
93
|
+
}
|
|
94
|
+
});
|
|
72
95
|
}
|
|
73
|
-
}, [editorView, isLivePage]);
|
|
96
|
+
}, [api === null || api === void 0 || (_api$analytics3 = api.analytics) === null || _api$analytics3 === void 0 ? void 0 : _api$analytics3.actions, editorView, isLivePage, node === null || node === void 0 ? void 0 : node.type.name]);
|
|
74
97
|
var state = editorView.state;
|
|
75
98
|
var exitCondition = editorExperiment('platform_editor_usesharedpluginstateselector', true) ? !isBreakoutNodePresent : !node;
|
|
76
99
|
if (exitCondition || !isBreakoutMarkAllowed(state)) {
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
1
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
|
|
3
|
+
import type { BreakoutPlugin } from '../breakoutPluginType';
|
|
4
|
+
export declare const handleKeyDown: (api: ExtractInjectionAPI<BreakoutPlugin> | undefined) => (view: EditorView, event: KeyboardEvent) => boolean | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
-
import type { BreakoutMode } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { BreakoutMode, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
+
import type { BreakoutPlugin } from '../breakoutPluginType';
|
|
6
7
|
export interface Props {
|
|
7
8
|
editorView: EditorView;
|
|
8
9
|
mountPoint?: HTMLElement;
|
|
@@ -13,6 +14,7 @@ export interface Props {
|
|
|
13
14
|
isLivePage?: boolean;
|
|
14
15
|
isBreakoutNodePresent: boolean;
|
|
15
16
|
breakoutMode: BreakoutMode | undefined;
|
|
17
|
+
api: ExtractInjectionAPI<BreakoutPlugin> | undefined;
|
|
16
18
|
}
|
|
17
19
|
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
18
20
|
WrappedComponent: import("react").ComponentType<Props & WrappedComponentProps>;
|
|
@@ -1,2 +1,4 @@
|
|
|
1
|
+
import type { ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
1
2
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
2
|
-
|
|
3
|
+
import type { BreakoutPlugin } from '../breakoutPluginType';
|
|
4
|
+
export declare const handleKeyDown: (api: ExtractInjectionAPI<BreakoutPlugin> | undefined) => (view: EditorView, event: KeyboardEvent) => boolean | undefined;
|
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/// <reference types="react" />
|
|
2
2
|
import type { WrappedComponentProps } from 'react-intl-next';
|
|
3
|
-
import type { BreakoutMode } from '@atlaskit/editor-common/types';
|
|
3
|
+
import type { BreakoutMode, ExtractInjectionAPI } from '@atlaskit/editor-common/types';
|
|
4
4
|
import type { Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
5
5
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
+
import type { BreakoutPlugin } from '../breakoutPluginType';
|
|
6
7
|
export interface Props {
|
|
7
8
|
editorView: EditorView;
|
|
8
9
|
mountPoint?: HTMLElement;
|
|
@@ -13,6 +14,7 @@ export interface Props {
|
|
|
13
14
|
isLivePage?: boolean;
|
|
14
15
|
isBreakoutNodePresent: boolean;
|
|
15
16
|
breakoutMode: BreakoutMode | undefined;
|
|
17
|
+
api: ExtractInjectionAPI<BreakoutPlugin> | undefined;
|
|
16
18
|
}
|
|
17
19
|
declare const _default: import("react").FC<import("react-intl-next").WithIntlProps<Props & WrappedComponentProps>> & {
|
|
18
20
|
WrappedComponent: import("react").ComponentType<Props & WrappedComponentProps>;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-breakout",
|
|
3
|
-
"version": "2.
|
|
3
|
+
"version": "2.8.1",
|
|
4
4
|
"description": "Breakout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
},
|
|
35
35
|
"dependencies": {
|
|
36
36
|
"@atlaskit/adf-schema": "^47.6.0",
|
|
37
|
-
"@atlaskit/editor-common": "^
|
|
37
|
+
"@atlaskit/editor-common": "^107.0.0",
|
|
38
38
|
"@atlaskit/editor-plugin-block-controls": "^3.19.0",
|
|
39
39
|
"@atlaskit/editor-plugin-editor-disabled": "^2.1.0",
|
|
40
40
|
"@atlaskit/editor-plugin-editor-viewmode": "^4.0.0",
|