@atlaskit/editor-plugin-block-controls 16.0.11 → 16.1.0
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 +24 -0
- package/dist/cjs/blockControlsPlugin.js +2 -1
- package/dist/cjs/editor-commands/move-node.js +2 -1
- package/dist/cjs/pm-plugins/utils/analytics.js +1 -2
- package/dist/es2019/blockControlsPlugin.js +2 -1
- package/dist/es2019/editor-commands/move-node.js +2 -1
- package/dist/es2019/pm-plugins/utils/analytics.js +1 -2
- package/dist/esm/blockControlsPlugin.js +2 -1
- package/dist/esm/editor-commands/move-node.js +2 -1
- package/dist/esm/pm-plugins/utils/analytics.js +1 -2
- package/package.json +11 -14
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,29 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 16.1.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`d96f86ff344b8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d96f86ff344b8) -
|
|
8
|
+
Use @atlaskit/platform-feature-experiments directly for
|
|
9
|
+
platform_editor_vc90_transition_expand_icon, platform_editor_add_image_editing,
|
|
10
|
+
platform_editor_ai_multi_format_streaming, platform_editor_default_toolbar_state,
|
|
11
|
+
platform_editor_early_exit_return_draft, platform_editor_fix_focus_MediaInsertPicker,
|
|
12
|
+
platform_editor_fix_table_move_shortcut, platform_editor_menu_radius_update,
|
|
13
|
+
platform_editor_react19_migration, and show_mentions_in_suggest_reply.
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
19
|
+
## 16.0.12
|
|
20
|
+
|
|
21
|
+
### Patch Changes
|
|
22
|
+
|
|
23
|
+
- [`7d9913d23d739`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7d9913d23d739) -
|
|
24
|
+
Clean up feature gate `platform_editor_track_node_types`
|
|
25
|
+
- Updated dependencies
|
|
26
|
+
|
|
3
27
|
## 16.0.11
|
|
4
28
|
|
|
5
29
|
### Patch Changes
|
|
@@ -11,6 +11,7 @@ var _selection = require("@atlaskit/editor-common/selection");
|
|
|
11
11
|
var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
|
|
12
12
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
13
13
|
var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
14
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
14
15
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
15
16
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
17
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
@@ -333,7 +334,7 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
|
|
|
333
334
|
var $from = $expandedAnchor.min($expandedHead);
|
|
334
335
|
var $to = $expandedAnchor.max($expandedHead);
|
|
335
336
|
var expandedNormalisedSel;
|
|
336
|
-
if ((0,
|
|
337
|
+
if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_fix_table_move_shortcut') && $from.nodeAfter && $from.nodeAfter === $to.nodeBefore) {
|
|
337
338
|
// Single node
|
|
338
339
|
(0, _getSelection.selectNode)(tr, $from.pos, $from.nodeAfter.type.name, api);
|
|
339
340
|
expandedNormalisedSel = tr.selection;
|
|
@@ -19,6 +19,7 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
19
19
|
var _transform = require("@atlaskit/editor-prosemirror/transform");
|
|
20
20
|
var _utils2 = require("@atlaskit/editor-prosemirror/utils");
|
|
21
21
|
var _utils3 = require("@atlaskit/editor-tables/utils");
|
|
22
|
+
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
22
23
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
23
24
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
24
25
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
@@ -178,7 +179,7 @@ var moveNodeViaShortcut = exports.moveNodeViaShortcut = function moveNodeViaShor
|
|
|
178
179
|
var LAYOUT_COL_DEPTH = 3;
|
|
179
180
|
hoistedPos = state.doc.resolve(from).before(LAYOUT_COL_DEPTH);
|
|
180
181
|
}
|
|
181
|
-
var table = (0,
|
|
182
|
+
var table = (0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_fix_table_move_shortcut') && (0, _utils3.isTableSelected)(selection) ? (0, _utils3.findTable)(selection) : undefined;
|
|
182
183
|
var currentNodePos;
|
|
183
184
|
if (table) {
|
|
184
185
|
currentNodePos = table.pos;
|
|
@@ -7,7 +7,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.getMultiSelectAnalyticsAttributes = exports.fireInsertLayoutAnalytics = exports.attachMoveNodeAnalytics = void 0;
|
|
8
8
|
var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
|
|
9
9
|
var _analytics = require("@atlaskit/editor-common/analytics");
|
|
10
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
11
10
|
var attachMoveNodeAnalytics = exports.attachMoveNodeAnalytics = function attachMoveNodeAnalytics(tr, inputMethod, fromDepth, fromNodeTypes, toDepth, toNodeType, isSameParent, api, hasSelectedMultipleNodes) {
|
|
12
11
|
var _api$analytics;
|
|
13
12
|
return api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || (_api$analytics = _api$analytics.actions) === null || _api$analytics === void 0 ? void 0 : _api$analytics.attachAnalyticsEvent({
|
|
@@ -60,7 +59,7 @@ var getMultiSelectAnalyticsAttributes = exports.getMultiSelectAnalyticsAttribute
|
|
|
60
59
|
return false;
|
|
61
60
|
});
|
|
62
61
|
return {
|
|
63
|
-
nodeTypes: (0,
|
|
62
|
+
nodeTypes: (0, _toConsumableArray2.default)(new Set(nodeTypes)).sort().join(','),
|
|
64
63
|
hasSelectedMultipleNodes: nodeTypes.length > 1
|
|
65
64
|
};
|
|
66
65
|
};
|
|
@@ -3,6 +3,7 @@ import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
|
|
|
3
3
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
4
4
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
6
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
6
7
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
8
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
9
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -326,7 +327,7 @@ export const blockControlsPlugin = ({
|
|
|
326
327
|
const $from = $expandedAnchor.min($expandedHead);
|
|
327
328
|
const $to = $expandedAnchor.max($expandedHead);
|
|
328
329
|
let expandedNormalisedSel;
|
|
329
|
-
if (
|
|
330
|
+
if (isExperimentEnabled('platform_editor_fix_table_move_shortcut') && $from.nodeAfter && $from.nodeAfter === $to.nodeBefore) {
|
|
330
331
|
// Single node
|
|
331
332
|
selectNode(tr, $from.pos, $from.nodeAfter.type.name, api);
|
|
332
333
|
expandedNormalisedSel = tr.selection;
|
|
@@ -11,6 +11,7 @@ import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
|
11
11
|
import { Mapping, StepMap } from '@atlaskit/editor-prosemirror/transform';
|
|
12
12
|
import { findChildrenByType, findParentNodeOfType, findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
13
13
|
import { findTable, isInTable, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
14
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
14
15
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -175,7 +176,7 @@ export const moveNodeViaShortcut = (api, direction, formatMessage) => {
|
|
|
175
176
|
const LAYOUT_COL_DEPTH = 3;
|
|
176
177
|
hoistedPos = state.doc.resolve(from).before(LAYOUT_COL_DEPTH);
|
|
177
178
|
}
|
|
178
|
-
const table =
|
|
179
|
+
const table = isExperimentEnabled('platform_editor_fix_table_move_shortcut') && isTableSelected(selection) ? findTable(selection) : undefined;
|
|
179
180
|
let currentNodePos;
|
|
180
181
|
if (table) {
|
|
181
182
|
currentNodePos = table.pos;
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
export const attachMoveNodeAnalytics = (tr, inputMethod, fromDepth, fromNodeTypes, toDepth, toNodeType, isSameParent, api, hasSelectedMultipleNodes) => {
|
|
4
3
|
var _api$analytics, _api$analytics$action;
|
|
5
4
|
return api === null || api === void 0 ? void 0 : (_api$analytics = api.analytics) === null || _api$analytics === void 0 ? void 0 : (_api$analytics$action = _api$analytics.actions) === null || _api$analytics$action === void 0 ? void 0 : _api$analytics$action.attachAnalyticsEvent({
|
|
@@ -52,7 +51,7 @@ export const getMultiSelectAnalyticsAttributes = (tr, anchor, head) => {
|
|
|
52
51
|
return false;
|
|
53
52
|
});
|
|
54
53
|
return {
|
|
55
|
-
nodeTypes:
|
|
54
|
+
nodeTypes: [...new Set(nodeTypes)].sort().join(','),
|
|
56
55
|
hasSelectedMultipleNodes: nodeTypes.length > 1
|
|
57
56
|
};
|
|
58
57
|
};
|
|
@@ -6,6 +6,7 @@ import { expandSelectionBounds } from '@atlaskit/editor-common/selection';
|
|
|
6
6
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
7
7
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
9
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
9
10
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
10
11
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
11
12
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -326,7 +327,7 @@ export var blockControlsPlugin = function blockControlsPlugin(_ref) {
|
|
|
326
327
|
var $from = $expandedAnchor.min($expandedHead);
|
|
327
328
|
var $to = $expandedAnchor.max($expandedHead);
|
|
328
329
|
var expandedNormalisedSel;
|
|
329
|
-
if (
|
|
330
|
+
if (isExperimentEnabled('platform_editor_fix_table_move_shortcut') && $from.nodeAfter && $from.nodeAfter === $to.nodeBefore) {
|
|
330
331
|
// Single node
|
|
331
332
|
selectNode(tr, $from.pos, $from.nodeAfter.type.name, api);
|
|
332
333
|
expandedNormalisedSel = tr.selection;
|
|
@@ -14,6 +14,7 @@ import { NodeSelection, Selection } from '@atlaskit/editor-prosemirror/state';
|
|
|
14
14
|
import { Mapping, StepMap } from '@atlaskit/editor-prosemirror/transform';
|
|
15
15
|
import { findChildrenByType, findParentNodeOfType, findParentNodeOfTypeClosestToPos } from '@atlaskit/editor-prosemirror/utils';
|
|
16
16
|
import { findTable, isInTable, isTableSelected } from '@atlaskit/editor-tables/utils';
|
|
17
|
+
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
17
18
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
19
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
19
20
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -172,7 +173,7 @@ export var moveNodeViaShortcut = function moveNodeViaShortcut(api, direction, fo
|
|
|
172
173
|
var LAYOUT_COL_DEPTH = 3;
|
|
173
174
|
hoistedPos = state.doc.resolve(from).before(LAYOUT_COL_DEPTH);
|
|
174
175
|
}
|
|
175
|
-
var table =
|
|
176
|
+
var table = isExperimentEnabled('platform_editor_fix_table_move_shortcut') && isTableSelected(selection) ? findTable(selection) : undefined;
|
|
176
177
|
var currentNodePos;
|
|
177
178
|
if (table) {
|
|
178
179
|
currentNodePos = table.pos;
|
|
@@ -1,6 +1,5 @@
|
|
|
1
1
|
import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
2
2
|
import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID, EVENT_TYPE, INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
3
|
export var attachMoveNodeAnalytics = function attachMoveNodeAnalytics(tr, inputMethod, fromDepth, fromNodeTypes, toDepth, toNodeType, isSameParent, api, hasSelectedMultipleNodes) {
|
|
5
4
|
var _api$analytics;
|
|
6
5
|
return api === null || api === void 0 || (_api$analytics = api.analytics) === null || _api$analytics === void 0 || (_api$analytics = _api$analytics.actions) === null || _api$analytics === void 0 ? void 0 : _api$analytics.attachAnalyticsEvent({
|
|
@@ -53,7 +52,7 @@ export var getMultiSelectAnalyticsAttributes = function getMultiSelectAnalyticsA
|
|
|
53
52
|
return false;
|
|
54
53
|
});
|
|
55
54
|
return {
|
|
56
|
-
nodeTypes:
|
|
55
|
+
nodeTypes: _toConsumableArray(new Set(nodeTypes)).sort().join(','),
|
|
57
56
|
hasSelectedMultipleNodes: nodeTypes.length > 1
|
|
58
57
|
};
|
|
59
58
|
};
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "16.0
|
|
3
|
+
"version": "16.1.0",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
"atlaskit:src": "src/index.ts",
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@atlaskit/browser-apis": "^1.2.0",
|
|
24
|
-
"@atlaskit/button": "^25.
|
|
24
|
+
"@atlaskit/button": "^25.2.0",
|
|
25
25
|
"@atlaskit/editor-plugin-accessibility-utils": "^15.0.0",
|
|
26
26
|
"@atlaskit/editor-plugin-analytics": "^15.0.0",
|
|
27
27
|
"@atlaskit/editor-plugin-editor-disabled": "^15.0.0",
|
|
@@ -40,19 +40,19 @@
|
|
|
40
40
|
"@atlaskit/editor-prosemirror": "^8.0.0",
|
|
41
41
|
"@atlaskit/editor-shared-styles": "^4.0.0",
|
|
42
42
|
"@atlaskit/editor-tables": "^3.0.0",
|
|
43
|
-
"@atlaskit/icon": "^37.
|
|
44
|
-
"@atlaskit/icon-lab": "^7.
|
|
45
|
-
"@atlaskit/link": "^5.
|
|
43
|
+
"@atlaskit/icon": "^37.5.0",
|
|
44
|
+
"@atlaskit/icon-lab": "^7.7.0",
|
|
45
|
+
"@atlaskit/link": "^5.1.0",
|
|
46
46
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
47
47
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
48
48
|
"@atlaskit/pragmatic-drag-and-drop": "^3.0.0",
|
|
49
49
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.1.0",
|
|
50
50
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^4.1.0",
|
|
51
|
-
"@atlaskit/primitives": "^22.
|
|
52
|
-
"@atlaskit/theme": "^28.
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
54
|
-
"@atlaskit/tokens": "^16.
|
|
55
|
-
"@atlaskit/tooltip": "^24.
|
|
51
|
+
"@atlaskit/primitives": "^22.4.0",
|
|
52
|
+
"@atlaskit/theme": "^28.1.0",
|
|
53
|
+
"@atlaskit/tmp-editor-statsig": "^157.0.0",
|
|
54
|
+
"@atlaskit/tokens": "^16.8.0",
|
|
55
|
+
"@atlaskit/tooltip": "^24.2.0",
|
|
56
56
|
"@babel/runtime": "^7.0.0",
|
|
57
57
|
"@emotion/react": "^11.7.1",
|
|
58
58
|
"bind-event-listener": "^3.0.0",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"uuid": "^3.1.0"
|
|
62
62
|
},
|
|
63
63
|
"peerDependencies": {
|
|
64
|
-
"@atlaskit/editor-common": "^119.
|
|
64
|
+
"@atlaskit/editor-common": "^119.13.0",
|
|
65
65
|
"react": "^18.2.0 || ^19.2.0",
|
|
66
66
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
67
67
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|
|
@@ -105,9 +105,6 @@
|
|
|
105
105
|
}
|
|
106
106
|
},
|
|
107
107
|
"platform-feature-flags": {
|
|
108
|
-
"platform_editor_track_node_types": {
|
|
109
|
-
"type": "boolean"
|
|
110
|
-
},
|
|
111
108
|
"platform_editor_elements_dnd_shift_click_select": {
|
|
112
109
|
"type": "boolean"
|
|
113
110
|
},
|