@atlaskit/editor-plugin-breakout 6.2.3 → 6.2.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
CHANGED
|
@@ -1,5 +1,19 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-breakout
|
|
2
2
|
|
|
3
|
+
## 6.2.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`a774d02e0633f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a774d02e0633f) -
|
|
8
|
+
Remove platform_editor_breakout_resizing_patch_1 FG
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 6.2.4
|
|
12
|
+
|
|
13
|
+
### Patch Changes
|
|
14
|
+
|
|
15
|
+
- Updated dependencies
|
|
16
|
+
|
|
3
17
|
## 6.2.3
|
|
4
18
|
|
|
5
19
|
### Patch Changes
|
|
@@ -11,7 +11,6 @@ var _utils = require("@atlaskit/editor-common/utils");
|
|
|
11
11
|
var _document = require("@atlaskit/editor-common/utils/document");
|
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
13
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
14
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
14
|
var _handleKeyDown = require("./handle-key-down");
|
|
16
15
|
var _resizingMarkView = require("./resizing-mark-view");
|
|
17
16
|
var _singlePlayerExpand = require("./utils/single-player-expand");
|
|
@@ -51,9 +50,9 @@ var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
|
51
50
|
updatedDocChanged = true;
|
|
52
51
|
} else if ((breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === null || (breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === undefined) {
|
|
53
52
|
var mode = breakoutMark.attrs.mode;
|
|
54
|
-
|
|
53
|
+
|
|
55
54
|
// if breakout is present on node, but page appearance is 'full width' force width to full width to maintain backwards compatibility
|
|
56
|
-
isFullWidthEnabled || mode === 'full-width' ? _editorSharedStyles.akEditorFullWidthLayoutWidth : _editorSharedStyles.akEditorCalculatedWideLayoutWidth
|
|
55
|
+
var newWidth = isFullWidthEnabled || mode === 'full-width' ? _editorSharedStyles.akEditorFullWidthLayoutWidth : _editorSharedStyles.akEditorCalculatedWideLayoutWidth;
|
|
57
56
|
updatedTr = newTr.setNodeMarkup(pos, node.type, node.attrs, [breakout.create({
|
|
58
57
|
width: newWidth,
|
|
59
58
|
mode: mode
|
|
@@ -121,17 +120,9 @@ var createResizingPlugin = exports.createResizingPlugin = function createResizin
|
|
|
121
120
|
handleKeyDown: (0, _handleKeyDown.handleKeyDown)(api)
|
|
122
121
|
},
|
|
123
122
|
appendTransaction: function appendTransaction(transactions, oldState, newState) {
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
return;
|
|
128
|
-
}
|
|
129
|
-
} else {
|
|
130
|
-
var _api$editorViewMode2;
|
|
131
|
-
// if editor is in live-view mode don't send transactions
|
|
132
|
-
if ((api === null || api === void 0 || (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 || (_api$editorViewMode2 = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2 === void 0 ? void 0 : _api$editorViewMode2.mode) !== 'edit') {
|
|
133
|
-
return;
|
|
134
|
-
}
|
|
123
|
+
var _api$editorViewMode;
|
|
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) === 'view') {
|
|
125
|
+
return;
|
|
135
126
|
}
|
|
136
127
|
var newTr = newState.tr;
|
|
137
128
|
var hasDocChanged = false;
|
|
@@ -3,7 +3,6 @@ import { stepAddsOneOf } from '@atlaskit/editor-common/utils';
|
|
|
3
3
|
import { getChangedNodes, isReplaceDocOperation } from '@atlaskit/editor-common/utils/document';
|
|
4
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
6
|
import { handleKeyDown } from './handle-key-down';
|
|
8
7
|
import { ResizingMarkView } from './resizing-mark-view';
|
|
9
8
|
import { updateExpandedStateNew } from './utils/single-player-expand';
|
|
@@ -44,9 +43,9 @@ const addBreakoutToResizableNode = ({
|
|
|
44
43
|
updatedDocChanged = true;
|
|
45
44
|
} else if ((breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === null || (breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === undefined) {
|
|
46
45
|
const mode = breakoutMark.attrs.mode;
|
|
47
|
-
|
|
46
|
+
|
|
48
47
|
// if breakout is present on node, but page appearance is 'full width' force width to full width to maintain backwards compatibility
|
|
49
|
-
isFullWidthEnabled || mode === 'full-width' ? akEditorFullWidthLayoutWidth : akEditorCalculatedWideLayoutWidth
|
|
48
|
+
const newWidth = isFullWidthEnabled || mode === 'full-width' ? akEditorFullWidthLayoutWidth : akEditorCalculatedWideLayoutWidth;
|
|
50
49
|
updatedTr = newTr.setNodeMarkup(pos, node.type, node.attrs, [breakout.create({
|
|
51
50
|
width: newWidth,
|
|
52
51
|
mode: mode
|
|
@@ -117,17 +116,9 @@ export const createResizingPlugin = (api, getIntl, nodeViewPortalProviderAPI, op
|
|
|
117
116
|
handleKeyDown: handleKeyDown(api)
|
|
118
117
|
},
|
|
119
118
|
appendTransaction(transactions, oldState, newState) {
|
|
120
|
-
|
|
121
|
-
|
|
122
|
-
|
|
123
|
-
return;
|
|
124
|
-
}
|
|
125
|
-
} else {
|
|
126
|
-
var _api$editorViewMode2, _api$editorViewMode2$;
|
|
127
|
-
// if editor is in live-view mode don't send transactions
|
|
128
|
-
if ((api === null || api === void 0 ? void 0 : (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 ? void 0 : (_api$editorViewMode2$ = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2$ === void 0 ? void 0 : _api$editorViewMode2$.mode) !== 'edit') {
|
|
129
|
-
return;
|
|
130
|
-
}
|
|
119
|
+
var _api$editorViewMode, _api$editorViewMode$s;
|
|
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) === 'view') {
|
|
121
|
+
return;
|
|
131
122
|
}
|
|
132
123
|
let newTr = newState.tr;
|
|
133
124
|
let hasDocChanged = false;
|
|
@@ -6,7 +6,6 @@ import { stepAddsOneOf } from '@atlaskit/editor-common/utils';
|
|
|
6
6
|
import { getChangedNodes, isReplaceDocOperation } from '@atlaskit/editor-common/utils/document';
|
|
7
7
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorCalculatedWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
9
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
9
|
import { handleKeyDown } from './handle-key-down';
|
|
11
10
|
import { ResizingMarkView } from './resizing-mark-view';
|
|
12
11
|
import { updateExpandedStateNew } from './utils/single-player-expand';
|
|
@@ -44,9 +43,9 @@ var addBreakoutToResizableNode = function addBreakoutToResizableNode(_ref) {
|
|
|
44
43
|
updatedDocChanged = true;
|
|
45
44
|
} else if ((breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === null || (breakoutMark === null || breakoutMark === void 0 ? void 0 : breakoutMark.attrs.width) === undefined) {
|
|
46
45
|
var mode = breakoutMark.attrs.mode;
|
|
47
|
-
|
|
46
|
+
|
|
48
47
|
// if breakout is present on node, but page appearance is 'full width' force width to full width to maintain backwards compatibility
|
|
49
|
-
isFullWidthEnabled || mode === 'full-width' ? akEditorFullWidthLayoutWidth : akEditorCalculatedWideLayoutWidth
|
|
48
|
+
var newWidth = isFullWidthEnabled || mode === 'full-width' ? akEditorFullWidthLayoutWidth : akEditorCalculatedWideLayoutWidth;
|
|
50
49
|
updatedTr = newTr.setNodeMarkup(pos, node.type, node.attrs, [breakout.create({
|
|
51
50
|
width: newWidth,
|
|
52
51
|
mode: mode
|
|
@@ -114,17 +113,9 @@ export var createResizingPlugin = function createResizingPlugin(api, getIntl, no
|
|
|
114
113
|
handleKeyDown: handleKeyDown(api)
|
|
115
114
|
},
|
|
116
115
|
appendTransaction: function appendTransaction(transactions, oldState, newState) {
|
|
117
|
-
|
|
118
|
-
|
|
119
|
-
|
|
120
|
-
return;
|
|
121
|
-
}
|
|
122
|
-
} else {
|
|
123
|
-
var _api$editorViewMode2;
|
|
124
|
-
// if editor is in live-view mode don't send transactions
|
|
125
|
-
if ((api === null || api === void 0 || (_api$editorViewMode2 = api.editorViewMode) === null || _api$editorViewMode2 === void 0 || (_api$editorViewMode2 = _api$editorViewMode2.sharedState.currentState()) === null || _api$editorViewMode2 === void 0 ? void 0 : _api$editorViewMode2.mode) !== 'edit') {
|
|
126
|
-
return;
|
|
127
|
-
}
|
|
116
|
+
var _api$editorViewMode;
|
|
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) === 'view') {
|
|
118
|
+
return;
|
|
128
119
|
}
|
|
129
120
|
var newTr = newState.tr;
|
|
130
121
|
var hasDocChanged = false;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-breakout",
|
|
3
|
-
"version": "6.2.
|
|
3
|
+
"version": "6.2.5",
|
|
4
4
|
"description": "Breakout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -30,7 +30,7 @@
|
|
|
30
30
|
"atlaskit:src": "src/index.ts",
|
|
31
31
|
"dependencies": {
|
|
32
32
|
"@atlaskit/adf-schema": "^51.5.1",
|
|
33
|
-
"@atlaskit/editor-plugin-block-controls": "^7.
|
|
33
|
+
"@atlaskit/editor-plugin-block-controls": "^7.13.0",
|
|
34
34
|
"@atlaskit/editor-plugin-editor-disabled": "^6.1.0",
|
|
35
35
|
"@atlaskit/editor-plugin-editor-viewmode": "^8.0.0",
|
|
36
36
|
"@atlaskit/editor-plugin-guideline": "^6.0.0",
|
|
@@ -43,9 +43,9 @@
|
|
|
43
43
|
"@atlaskit/platform-feature-flags": "^1.1.0",
|
|
44
44
|
"@atlaskit/pragmatic-drag-and-drop": "^1.7.0",
|
|
45
45
|
"@atlaskit/theme": "^21.0.0",
|
|
46
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
46
|
+
"@atlaskit/tmp-editor-statsig": "^15.6.0",
|
|
47
47
|
"@atlaskit/tokens": "^8.4.0",
|
|
48
|
-
"@atlaskit/tooltip": "^20.
|
|
48
|
+
"@atlaskit/tooltip": "^20.11.0",
|
|
49
49
|
"@babel/runtime": "^7.0.0",
|
|
50
50
|
"@emotion/react": "^11.7.1",
|
|
51
51
|
"bind-event-listener": "^3.0.0",
|
|
@@ -53,7 +53,7 @@
|
|
|
53
53
|
"uuid": "^3.1.0"
|
|
54
54
|
},
|
|
55
55
|
"peerDependencies": {
|
|
56
|
-
"@atlaskit/editor-common": "^110.
|
|
56
|
+
"@atlaskit/editor-common": "^110.41.0",
|
|
57
57
|
"react": "^18.2.0",
|
|
58
58
|
"react-dom": "^18.2.0",
|
|
59
59
|
"react-intl-next": "npm:react-intl@^5.18.1"
|
|
@@ -102,9 +102,6 @@
|
|
|
102
102
|
"platform-editor-single-player-expand": {
|
|
103
103
|
"type": "boolean"
|
|
104
104
|
},
|
|
105
|
-
"platform_editor_breakout_resizing_patch_1": {
|
|
106
|
-
"type": "boolean"
|
|
107
|
-
},
|
|
108
105
|
"platform_editor_breakout_resizing_width_changes": {
|
|
109
106
|
"type": "boolean"
|
|
110
107
|
}
|