@atlaskit/editor-plugin-breakout 6.2.4 → 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,13 @@
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
+
3
11
  ## 6.2.4
4
12
 
5
13
  ### 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
- var newWidth = (0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_patch_1') ?
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 : mode === 'wide' ? _editorSharedStyles.akEditorCalculatedWideLayoutWidth : _editorSharedStyles.akEditorFullWidthLayoutWidth;
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
- if ((0, _platformFeatureFlags.fg)('platform_editor_breakout_resizing_patch_1')) {
125
- var _api$editorViewMode;
126
- 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') {
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
- const newWidth = fg('platform_editor_breakout_resizing_patch_1') ?
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 : mode === 'wide' ? akEditorCalculatedWideLayoutWidth : akEditorFullWidthLayoutWidth;
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
- if (fg('platform_editor_breakout_resizing_patch_1')) {
121
- var _api$editorViewMode, _api$editorViewMode$s;
122
- 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') {
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
- var newWidth = fg('platform_editor_breakout_resizing_patch_1') ?
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 : mode === 'wide' ? akEditorCalculatedWideLayoutWidth : akEditorFullWidthLayoutWidth;
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
- if (fg('platform_editor_breakout_resizing_patch_1')) {
118
- var _api$editorViewMode;
119
- 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') {
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.4",
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",
@@ -43,7 +43,7 @@
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": "^15.0.0",
46
+ "@atlaskit/tmp-editor-statsig": "^15.6.0",
47
47
  "@atlaskit/tokens": "^8.4.0",
48
48
  "@atlaskit/tooltip": "^20.11.0",
49
49
  "@babel/runtime": "^7.0.0",
@@ -53,7 +53,7 @@
53
53
  "uuid": "^3.1.0"
54
54
  },
55
55
  "peerDependencies": {
56
- "@atlaskit/editor-common": "^110.40.0",
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
  }