@atlaskit/editor-plugin-breakout 14.0.6 → 14.0.7
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,12 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-breakout
|
|
2
2
|
|
|
3
|
+
## 14.0.7
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`d434a260a890c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d434a260a890c) -
|
|
8
|
+
Prevent automatic breakout normalization from affecting Undo history
|
|
9
|
+
|
|
3
10
|
## 14.0.6
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -12,7 +12,7 @@ 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
14
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
15
|
-
var
|
|
15
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
16
16
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
17
17
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
18
18
|
var _handleKeyDown = require("./handle-key-down");
|
|
@@ -150,7 +150,7 @@ var createResizingPlugin = exports.createResizingPlugin = function createResizin
|
|
|
150
150
|
var _api$editorViewMode2;
|
|
151
151
|
var isPageLoadNormalizationEnabled = (0, _expValEquals.expValEquals)('platform_editor_add_breakout_marks_on_page_load', 'isEnabled', true) || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_resize_extensions');
|
|
152
152
|
var isRuleAndPanelResizingEnabled = (0, _expValEquals.expValEquals)('platform_editor_lovability_resize_dividers_panels', 'isEnabled', true);
|
|
153
|
-
var isPanelAndDividerNormalizationEnabled = isRuleAndPanelResizingEnabled && !(0,
|
|
153
|
+
var isPanelAndDividerNormalizationEnabled = isRuleAndPanelResizingEnabled && !(0, _fg.fg)('platform_editor_lovability_resize_patch_1');
|
|
154
154
|
if (!isPageLoadNormalizationEnabled && !isPanelAndDividerNormalizationEnabled) {
|
|
155
155
|
return {};
|
|
156
156
|
}
|
|
@@ -244,7 +244,7 @@ var createResizingPlugin = exports.createResizingPlugin = function createResizin
|
|
|
244
244
|
var isFullWidthEnabled = !((options === null || options === void 0 ? void 0 : options.allowBreakoutButton) === true);
|
|
245
245
|
var isMaxWidthEnabled = (options === null || options === void 0 ? void 0 : options.appearance) === 'max' && (0, _expValEquals.expValEquals)('confluence_max_width_content_appearance', 'isEnabled', true) && (0, _expValEquals.expValEquals)('platform_editor_lovability_breakout_resizing_fixes', 'isEnabled', true);
|
|
246
246
|
var isPageLoadNormalizationEnabled = (0, _expValEquals.expValEquals)('platform_editor_add_breakout_marks_on_page_load', 'isEnabled', true) || (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_lovability_resize_extensions');
|
|
247
|
-
var isPanelAndDividerNormalizationEnabled = isRuleAndPanelResizingEnabled && !(0,
|
|
247
|
+
var isPanelAndDividerNormalizationEnabled = isRuleAndPanelResizingEnabled && !(0, _fg.fg)('platform_editor_lovability_resize_patch_1');
|
|
248
248
|
if (!isPageLoadNormalizationEnabled && !isPanelAndDividerNormalizationEnabled && (0, _document.isReplaceDocOperation)(transactions, oldState)) {
|
|
249
249
|
newState.doc.forEach(function (node, pos) {
|
|
250
250
|
var _addBreakoutToResizab2 = addBreakoutToResizableNode({
|
|
@@ -289,7 +289,10 @@ var createResizingPlugin = exports.createResizingPlugin = function createResizin
|
|
|
289
289
|
});
|
|
290
290
|
}
|
|
291
291
|
if (hasDocChanged) {
|
|
292
|
-
|
|
292
|
+
// This transaction normalizes a newly inserted node to the editor's default breakout
|
|
293
|
+
// width. It is not a user resize and must not become an undo step — in particular, a
|
|
294
|
+
// source synced block can be deleted permanently before Undo reaches this normalization.
|
|
295
|
+
return (0, _fg.fg)('platform_editor_breakout_auto_normalization_history_patch') ? newTr.setMeta('addToHistory', false) : newTr;
|
|
293
296
|
}
|
|
294
297
|
}
|
|
295
298
|
});
|
|
@@ -4,7 +4,7 @@ import { getChangedNodes, isReplaceDocOperation } from '@atlaskit/editor-common/
|
|
|
4
4
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorMaxWidthLayoutWidth, akEditorCalculatedWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
6
6
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
9
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
10
10
|
import { handleKeyDown } from './handle-key-down';
|
|
@@ -292,7 +292,10 @@ export const createResizingPlugin = (api, getIntl, nodeViewPortalProviderAPI, op
|
|
|
292
292
|
});
|
|
293
293
|
}
|
|
294
294
|
if (hasDocChanged) {
|
|
295
|
-
|
|
295
|
+
// This transaction normalizes a newly inserted node to the editor's default breakout
|
|
296
|
+
// width. It is not a user resize and must not become an undo step — in particular, a
|
|
297
|
+
// source synced block can be deleted permanently before Undo reaches this normalization.
|
|
298
|
+
return fg('platform_editor_breakout_auto_normalization_history_patch') ? newTr.setMeta('addToHistory', false) : newTr;
|
|
296
299
|
}
|
|
297
300
|
}
|
|
298
301
|
});
|
|
@@ -7,7 +7,7 @@ import { getChangedNodes, isReplaceDocOperation } from '@atlaskit/editor-common/
|
|
|
7
7
|
import { PluginKey } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { akEditorDefaultLayoutWidth, akEditorFullWidthLayoutWidth, akEditorMaxWidthLayoutWidth, akEditorCalculatedWideLayoutWidth } from '@atlaskit/editor-shared-styles';
|
|
9
9
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
10
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
11
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
12
12
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
13
13
|
import { handleKeyDown } from './handle-key-down';
|
|
@@ -282,7 +282,10 @@ export var createResizingPlugin = function createResizingPlugin(api, getIntl, no
|
|
|
282
282
|
});
|
|
283
283
|
}
|
|
284
284
|
if (hasDocChanged) {
|
|
285
|
-
|
|
285
|
+
// This transaction normalizes a newly inserted node to the editor's default breakout
|
|
286
|
+
// width. It is not a user resize and must not become an undo step — in particular, a
|
|
287
|
+
// source synced block can be deleted permanently before Undo reaches this normalization.
|
|
288
|
+
return fg('platform_editor_breakout_auto_normalization_history_patch') ? newTr.setMeta('addToHistory', false) : newTr;
|
|
286
289
|
}
|
|
287
290
|
}
|
|
288
291
|
});
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-breakout",
|
|
3
|
-
"version": "14.0.
|
|
3
|
+
"version": "14.0.7",
|
|
4
4
|
"description": "Breakout plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -46,7 +46,7 @@
|
|
|
46
46
|
"uuid": "^3.1.0"
|
|
47
47
|
},
|
|
48
48
|
"peerDependencies": {
|
|
49
|
-
"@atlaskit/editor-common": "^118.
|
|
49
|
+
"@atlaskit/editor-common": "^118.5.0",
|
|
50
50
|
"react": "^18.2.0 || ^19.2.0",
|
|
51
51
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
52
52
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -103,6 +103,9 @@
|
|
|
103
103
|
},
|
|
104
104
|
"platform_editor_lovability_resize_patch_1": {
|
|
105
105
|
"type": "boolean"
|
|
106
|
+
},
|
|
107
|
+
"platform_editor_breakout_auto_normalization_history_patch": {
|
|
108
|
+
"type": "boolean"
|
|
106
109
|
}
|
|
107
110
|
}
|
|
108
111
|
}
|