@atlaskit/editor-plugin-block-controls 16.1.1 → 16.1.3
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 +16 -0
- package/dist/cjs/blockControlsPlugin.js +6 -6
- package/dist/cjs/editor-commands/move-node.js +2 -2
- package/dist/cjs/editor-commands/move-to-layout.js +3 -3
- package/dist/cjs/pm-plugins/decorations-drag-handle.js +3 -3
- package/dist/cjs/pm-plugins/decorations-quick-insert-button.js +4 -4
- package/dist/cjs/pm-plugins/handle-mouse-over.js +3 -3
- package/dist/cjs/pm-plugins/main.js +14 -14
- package/dist/cjs/pm-plugins/react-root-registry.js +3 -3
- package/dist/cjs/pm-plugins/utils/expand-and-update-selection.js +2 -2
- package/dist/cjs/pm-plugins/utils/getSelection.js +3 -3
- package/dist/cjs/ui/drag-handle.js +15 -15
- package/dist/cjs/ui/drop-target-layout.js +3 -3
- package/dist/cjs/ui/drop-target.js +2 -2
- package/dist/cjs/ui/inline-drop-target.js +2 -2
- package/dist/cjs/ui/quick-insert-button.js +2 -2
- package/dist/cjs/ui/should-use-nested-drag-handle-icon.js +2 -2
- package/dist/es2019/blockControlsPlugin.js +1 -1
- package/dist/es2019/editor-commands/move-node.js +1 -1
- package/dist/es2019/editor-commands/move-to-layout.js +1 -1
- package/dist/es2019/pm-plugins/decorations-drag-handle.js +1 -1
- package/dist/es2019/pm-plugins/decorations-quick-insert-button.js +1 -1
- package/dist/es2019/pm-plugins/handle-mouse-over.js +1 -1
- package/dist/es2019/pm-plugins/main.js +3 -3
- package/dist/es2019/pm-plugins/react-root-registry.js +1 -1
- package/dist/es2019/pm-plugins/utils/expand-and-update-selection.js +1 -1
- package/dist/es2019/pm-plugins/utils/getSelection.js +1 -1
- package/dist/es2019/pm-plugins/utils/update-selection.js +2 -0
- package/dist/es2019/ui/drag-handle.js +4 -4
- package/dist/es2019/ui/drop-target-layout.js +1 -1
- package/dist/es2019/ui/drop-target.js +1 -1
- package/dist/es2019/ui/inline-drop-target.js +1 -1
- package/dist/es2019/ui/quick-insert-button.js +1 -1
- package/dist/es2019/ui/should-use-nested-drag-handle-icon.js +1 -1
- package/dist/esm/blockControlsPlugin.js +1 -1
- package/dist/esm/editor-commands/move-node.js +1 -1
- package/dist/esm/editor-commands/move-to-layout.js +1 -1
- package/dist/esm/pm-plugins/decorations-drag-handle.js +1 -1
- package/dist/esm/pm-plugins/decorations-quick-insert-button.js +1 -1
- package/dist/esm/pm-plugins/handle-mouse-over.js +1 -1
- package/dist/esm/pm-plugins/main.js +3 -3
- package/dist/esm/pm-plugins/react-root-registry.js +1 -1
- package/dist/esm/pm-plugins/utils/expand-and-update-selection.js +1 -1
- package/dist/esm/pm-plugins/utils/getSelection.js +1 -1
- package/dist/esm/pm-plugins/utils/update-selection.js +2 -0
- package/dist/esm/ui/drag-handle.js +4 -4
- package/dist/esm/ui/drop-target-layout.js +1 -1
- package/dist/esm/ui/drop-target.js +1 -1
- package/dist/esm/ui/inline-drop-target.js +1 -1
- package/dist/esm/ui/quick-insert-button.js +1 -1
- package/dist/esm/ui/should-use-nested-drag-handle-icon.js +1 -1
- package/dist/types/pm-plugins/utils/update-selection.d.ts +1 -1
- package/package.json +4 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 16.1.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`656801b9e097c`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/656801b9e097c) -
|
|
8
|
+
VOLTC-331 - Migrate updated package usage in platform/editor: rewrite barrel imports of
|
|
9
|
+
voltCompliant provider packages to deep/subpath imports (consumer-side debarrel). No public API
|
|
10
|
+
changes.
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 16.1.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 16.1.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -12,7 +12,7 @@ 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
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 _handleKeyDownWithPreservedSelection = require("./editor-commands/handle-key-down-with-preserved-selection");
|
|
@@ -195,7 +195,7 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
|
|
|
195
195
|
}
|
|
196
196
|
|
|
197
197
|
// When closing the menu, restart the active session timer
|
|
198
|
-
if (isMenuCurrentlyOpen && (0,
|
|
198
|
+
if (isMenuCurrentlyOpen && (0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
199
199
|
var _api$metrics;
|
|
200
200
|
api === null || api === void 0 || (_api$metrics = api.metrics) === null || _api$metrics === void 0 || _api$metrics.commands.startActiveSessionTimer()({
|
|
201
201
|
tr: tr
|
|
@@ -217,7 +217,7 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
|
|
|
217
217
|
}));
|
|
218
218
|
|
|
219
219
|
// When closing the menu, restart the active session timer
|
|
220
|
-
if (isMenuCurrentlyOpen && (0,
|
|
220
|
+
if (isMenuCurrentlyOpen && (0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
221
221
|
var _api$metrics2;
|
|
222
222
|
api === null || api === void 0 || (_api$metrics2 = api.metrics) === null || _api$metrics2 === void 0 || _api$metrics2.commands.startActiveSessionTimer()({
|
|
223
223
|
tr: tr
|
|
@@ -259,7 +259,7 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
|
|
|
259
259
|
}
|
|
260
260
|
|
|
261
261
|
// When closing the menu, restart the active session timer
|
|
262
|
-
if ((0,
|
|
262
|
+
if ((0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
263
263
|
var _api$metrics3;
|
|
264
264
|
api === null || api === void 0 || (_api$metrics3 = api.metrics) === null || _api$metrics3 === void 0 || _api$metrics3.commands.startActiveSessionTimer()({
|
|
265
265
|
tr: tr
|
|
@@ -267,7 +267,7 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
|
|
|
267
267
|
}
|
|
268
268
|
} else if (!isMenuCurrentlyOpen) {
|
|
269
269
|
// When opening the menu, pause the active session timer
|
|
270
|
-
if ((0,
|
|
270
|
+
if ((0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
271
271
|
var _api$metrics4;
|
|
272
272
|
api === null || api === void 0 || (_api$metrics4 = api.metrics) === null || _api$metrics4 === void 0 || _api$metrics4.commands.handleIntentToStartEdit({
|
|
273
273
|
shouldStartTimer: false,
|
|
@@ -297,7 +297,7 @@ var blockControlsPlugin = exports.blockControlsPlugin = function blockControlsPl
|
|
|
297
297
|
nodeType: nodeType
|
|
298
298
|
}
|
|
299
299
|
}));
|
|
300
|
-
if ((0,
|
|
300
|
+
if ((0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
301
301
|
var _api$metrics5;
|
|
302
302
|
api === null || api === void 0 || (_api$metrics5 = api.metrics) === null || _api$metrics5 === void 0 || _api$metrics5.commands.handleIntentToStartEdit({
|
|
303
303
|
shouldStartTimer: false,
|
|
@@ -20,7 +20,7 @@ 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
22
|
var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
|
|
23
|
-
var
|
|
23
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
24
24
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
25
25
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
26
26
|
var _main = require("../pm-plugins/main");
|
|
@@ -372,7 +372,7 @@ var moveNode = exports.moveNode = function moveNode(api) {
|
|
|
372
372
|
var sliceFrom = start;
|
|
373
373
|
var sliceTo;
|
|
374
374
|
var sourceNodeTypes, hasSelectedMultipleNodes;
|
|
375
|
-
if ((0,
|
|
375
|
+
if ((0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
376
376
|
var _api$metrics;
|
|
377
377
|
api === null || api === void 0 || (_api$metrics = api.metrics) === null || _api$metrics === void 0 || _api$metrics.commands.setContentMoved()({
|
|
378
378
|
tr: tr
|
|
@@ -8,7 +8,7 @@ var _analytics = require("@atlaskit/editor-common/analytics");
|
|
|
8
8
|
var _monitoring = require("@atlaskit/editor-common/monitoring");
|
|
9
9
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
10
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
11
|
-
var
|
|
11
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
12
12
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
13
13
|
var _analytics2 = require("../pm-plugins/utils/analytics");
|
|
14
14
|
var _checkFragment = require("../pm-plugins/utils/check-fragment");
|
|
@@ -275,7 +275,7 @@ var moveToLayout = exports.moveToLayout = function moveToLayout(api) {
|
|
|
275
275
|
if (!fromContentWithoutBreakout) {
|
|
276
276
|
return tr;
|
|
277
277
|
}
|
|
278
|
-
if ((0,
|
|
278
|
+
if ((0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
279
279
|
var _api$metrics;
|
|
280
280
|
api === null || api === void 0 || (_api$metrics = api.metrics) === null || _api$metrics === void 0 || _api$metrics.commands.setContentMoved()({
|
|
281
281
|
tr: tr
|
|
@@ -322,7 +322,7 @@ var moveToLayout = exports.moveToLayout = function moveToLayout(api) {
|
|
|
322
322
|
mode: breakoutMode
|
|
323
323
|
})]);
|
|
324
324
|
}
|
|
325
|
-
if ((0,
|
|
325
|
+
if ((0, _fg.fg)('platform_editor_column_count_analytics')) {
|
|
326
326
|
// layout created via drag and drop will always be 2 columns
|
|
327
327
|
(0, _analytics2.fireInsertLayoutAnalytics)(tr, api, sourceNodeTypes, hasSelectedMultipleNodes, 2);
|
|
328
328
|
} else {
|
|
@@ -10,7 +10,7 @@ var _react = require("react");
|
|
|
10
10
|
var _bindEventListener = require("bind-event-listener");
|
|
11
11
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
12
12
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
13
|
-
var
|
|
13
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
14
14
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
15
15
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
16
16
|
var _consts = require("../ui/consts");
|
|
@@ -93,7 +93,7 @@ var dragHandleDecoration = exports.dragHandleDecoration = function dragHandleDec
|
|
|
93
93
|
var element = document.createElement('span');
|
|
94
94
|
// inline decoration causes focus issues when refocusing Editor into first line
|
|
95
95
|
element.style.display = 'block';
|
|
96
|
-
if ((0,
|
|
96
|
+
if ((0, _fg.fg)('confluence_remix_button_right_side_block_fg')) {
|
|
97
97
|
element.setAttribute('data-blocks-decorator-widget', 'true');
|
|
98
98
|
}
|
|
99
99
|
element.setAttribute('data-testid', 'block-ctrl-decorator-widget');
|
|
@@ -118,7 +118,7 @@ var dragHandleDecoration = exports.dragHandleDecoration = function dragHandleDec
|
|
|
118
118
|
* However, the tooltip for nested drag handle is no long working.
|
|
119
119
|
*/
|
|
120
120
|
if (newPos === undefined || !isTopLevelNode) {
|
|
121
|
-
if ((0,
|
|
121
|
+
if ((0, _fg.fg)('platform_editor_fix_widget_destroy')) {
|
|
122
122
|
element.onmouseover = function (e) {
|
|
123
123
|
e.stopPropagation();
|
|
124
124
|
};
|
|
@@ -9,7 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
|
|
|
9
9
|
var _react = require("react");
|
|
10
10
|
var _uuid = _interopRequireDefault(require("uuid"));
|
|
11
11
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
12
|
-
var
|
|
12
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
13
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
14
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
15
15
|
var _consts = require("../ui/consts");
|
|
@@ -64,7 +64,7 @@ var quickInsertButtonDecoration = exports.quickInsertButtonDecoration = function
|
|
|
64
64
|
|
|
65
65
|
marks: (0, _expValEquals.expValEquals)('platform_editor_small_font_size', 'isEnabled', true) ? (0, _marks.getMatchingBlockMarks)(editorState, rootPos, [editorState.schema.marks.alignment, editorState.schema.marks.fontSize]) : [],
|
|
66
66
|
destroy: function destroy(_) {
|
|
67
|
-
if ((0,
|
|
67
|
+
if ((0, _fg.fg)('platform_editor_fix_widget_destroy')) {
|
|
68
68
|
nodeViewPortalProviderAPI.remove(key);
|
|
69
69
|
}
|
|
70
70
|
cleanupCallbacks.forEach(function (cb) {
|
|
@@ -75,7 +75,7 @@ var quickInsertButtonDecoration = exports.quickInsertButtonDecoration = function
|
|
|
75
75
|
side: -2,
|
|
76
76
|
type: TYPE_QUICK_INSERT,
|
|
77
77
|
destroy: function destroy(_) {
|
|
78
|
-
if ((0,
|
|
78
|
+
if ((0, _fg.fg)('platform_editor_fix_widget_destroy')) {
|
|
79
79
|
nodeViewPortalProviderAPI.remove(key);
|
|
80
80
|
}
|
|
81
81
|
cleanupCallbacks.forEach(function (cb) {
|
|
@@ -92,7 +92,7 @@ var quickInsertButtonDecoration = exports.quickInsertButtonDecoration = function
|
|
|
92
92
|
element.style.clear = 'unset';
|
|
93
93
|
element.contentEditable = 'false';
|
|
94
94
|
element.setAttribute('data-blocks-quick-insert-container', 'true');
|
|
95
|
-
if ((0,
|
|
95
|
+
if ((0, _fg.fg)('confluence_remix_button_right_side_block_fg')) {
|
|
96
96
|
element.setAttribute('data-blocks-quick-insert-button', 'true');
|
|
97
97
|
}
|
|
98
98
|
element.setAttribute('data-testid', 'block-ctrl-quick-insert-button');
|
|
@@ -9,7 +9,7 @@ var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers
|
|
|
9
9
|
var _memoizeOne = _interopRequireDefault(require("memoize-one"));
|
|
10
10
|
var _selection = require("@atlaskit/editor-common/selection");
|
|
11
11
|
var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
|
|
12
|
-
var
|
|
12
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
13
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
14
14
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
15
15
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
@@ -110,7 +110,7 @@ var handleMouseOver = exports.handleMouseOver = function handleMouseOver(view, e
|
|
|
110
110
|
// We shouldn't be firing mouse over transactions when the editor is disabled,
|
|
111
111
|
// except in view mode when right-side controls are enabled (show controls on block hover)
|
|
112
112
|
var rightSideControlsEnabled = (_api$blockControls$sh = api === null || api === void 0 || (_api$blockControls2 = api.blockControls) === null || _api$blockControls2 === void 0 || (_api$blockControls2 = _api$blockControls2.sharedState.currentState()) === null || _api$blockControls2 === void 0 ? void 0 : _api$blockControls2.rightSideControlsEnabled) !== null && _api$blockControls$sh !== void 0 ? _api$blockControls$sh : false;
|
|
113
|
-
if (editorDisabled && (!isViewMode || !(rightSideControlsEnabled && (0,
|
|
113
|
+
if (editorDisabled && (!isViewMode || !(rightSideControlsEnabled && (0, _fg.fg)('confluence_remix_button_right_side_block_fg')))) {
|
|
114
114
|
return false;
|
|
115
115
|
}
|
|
116
116
|
|
|
@@ -151,7 +151,7 @@ var handleMouseOver = exports.handleMouseOver = function handleMouseOver(view, e
|
|
|
151
151
|
|
|
152
152
|
// When hovering over the right-edge button (rendered in a portal outside the block), resolve the
|
|
153
153
|
// block from the container's anchor so activeNode stays set and the button remains visible.
|
|
154
|
-
if (!rootElement && rightSideControlsEnabled && (0,
|
|
154
|
+
if (!rootElement && rightSideControlsEnabled && (0, _fg.fg)('confluence_remix_button_right_side_block_fg')) {
|
|
155
155
|
var rightEdgeContainer = target === null || target === void 0 ? void 0 : target.closest('[data-blocks-right-edge-button-container]');
|
|
156
156
|
if (rightEdgeContainer) {
|
|
157
157
|
var anchor = rightEdgeContainer.getAttribute('data-blocks-right-edge-button-anchor');
|
|
@@ -19,10 +19,10 @@ var _ui = require("@atlaskit/editor-common/ui");
|
|
|
19
19
|
var _utils = require("@atlaskit/editor-common/utils");
|
|
20
20
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
21
21
|
var _view = require("@atlaskit/editor-prosemirror/view");
|
|
22
|
-
var
|
|
22
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
23
23
|
var _element = require("@atlaskit/pragmatic-drag-and-drop-auto-scroll/element");
|
|
24
|
-
var _combine = require("@atlaskit/pragmatic-drag-and-drop/combine");
|
|
25
|
-
var
|
|
24
|
+
var _combine = require("@atlaskit/pragmatic-drag-and-drop/utils/combine");
|
|
25
|
+
var _elementAdapter = require("@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter");
|
|
26
26
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
27
27
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
28
28
|
var _domAttrName = require("../ui/utils/dom-attr-name");
|
|
@@ -66,13 +66,13 @@ var destroyFn = function destroyFn(api, editorView) {
|
|
|
66
66
|
}));
|
|
67
67
|
}
|
|
68
68
|
var dragInitializationDuration = 0;
|
|
69
|
-
cleanupFn.push((0,
|
|
69
|
+
cleanupFn.push((0, _elementAdapter.monitorForElements)({
|
|
70
70
|
canMonitor: function canMonitor(_ref) {
|
|
71
71
|
var source = _ref.source;
|
|
72
72
|
return source.data.type === 'element';
|
|
73
73
|
},
|
|
74
74
|
onDrag: function onDrag() {
|
|
75
|
-
if ((0,
|
|
75
|
+
if ((0, _fg.fg)('platform_editor_drag_and_drop_perf_analytics')) {
|
|
76
76
|
if ((0, _performanceMeasures.isMeasuring)(EDITOR_BLOCKS_DRAG_INIT)) {
|
|
77
77
|
(0, _performanceMeasures.stopMeasure)(EDITOR_BLOCKS_DRAG_INIT, function (duration) {
|
|
78
78
|
dragInitializationDuration = duration;
|
|
@@ -108,7 +108,7 @@ var destroyFn = function destroyFn(api, editorView) {
|
|
|
108
108
|
if (isHTMLElement(scrollable)) {
|
|
109
109
|
scrollable.style.setProperty('scroll-behavior', null);
|
|
110
110
|
}
|
|
111
|
-
if ((0,
|
|
111
|
+
if ((0, _fg.fg)('platform_editor_drag_and_drop_perf_analytics')) {
|
|
112
112
|
(0, _performanceMeasures.startMeasure)(EDITOR_BLOCKS_DROP_INIT);
|
|
113
113
|
}
|
|
114
114
|
if (!api) {
|
|
@@ -160,7 +160,7 @@ var destroyFn = function destroyFn(api, editorView) {
|
|
|
160
160
|
}
|
|
161
161
|
})(tr);
|
|
162
162
|
}
|
|
163
|
-
if ((0,
|
|
163
|
+
if ((0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
164
164
|
var _api$metrics;
|
|
165
165
|
(_api$metrics = api.metrics) === null || _api$metrics === void 0 || _api$metrics.commands.startActiveSessionTimer()({
|
|
166
166
|
tr: tr
|
|
@@ -175,7 +175,7 @@ var destroyFn = function destroyFn(api, editorView) {
|
|
|
175
175
|
lastDragCancelled: lastDragCancelled
|
|
176
176
|
}));
|
|
177
177
|
});
|
|
178
|
-
if ((0,
|
|
178
|
+
if ((0, _fg.fg)('platform_editor_drag_and_drop_perf_analytics')) {
|
|
179
179
|
// wait for the idle callback to ensure that the drag operation has completed
|
|
180
180
|
scheduleCallback(function () {
|
|
181
181
|
if ((0, _performanceMeasures.isMeasuring)(EDITOR_BLOCKS_DROP_INIT)) {
|
|
@@ -482,7 +482,7 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
|
|
|
482
482
|
} finally {
|
|
483
483
|
_iterator.f();
|
|
484
484
|
}
|
|
485
|
-
if (rightSideControlsEnabled && isViewMode && (0,
|
|
485
|
+
if (rightSideControlsEnabled && isViewMode && (0, _fg.fg)('confluence_remix_button_right_side_block_fg')) {
|
|
486
486
|
var _iterator2 = _createForOfIteratorHelper(nodeDecorationRegistry),
|
|
487
487
|
_step2;
|
|
488
488
|
try {
|
|
@@ -727,7 +727,7 @@ var _apply = exports.apply = function apply(api, formatMessage, tr, currentState
|
|
|
727
727
|
} finally {
|
|
728
728
|
_iterator5.f();
|
|
729
729
|
}
|
|
730
|
-
} else if (isViewMode && rightSideControlsEnabled && (0,
|
|
730
|
+
} else if (isViewMode && rightSideControlsEnabled && (0, _fg.fg)('confluence_remix_button_right_side_block_fg')) {
|
|
731
731
|
// Remove view-mode right-side decorations when no active node
|
|
732
732
|
var _iterator6 = _createForOfIteratorHelper(nodeDecorationRegistry),
|
|
733
733
|
_step6;
|
|
@@ -885,7 +885,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
|
|
|
885
885
|
var isDisabled = api === null || api === void 0 || (_api$editorDisabled = api.editorDisabled) === null || _api$editorDisabled === void 0 || (_api$editorDisabled = _api$editorDisabled.sharedState.currentState()) === null || _api$editorDisabled === void 0 ? void 0 : _api$editorDisabled.editorDisabled;
|
|
886
886
|
if (isDisabled) {
|
|
887
887
|
var _api$editorViewMode2;
|
|
888
|
-
var remixRightSideEnabled = rightSideControlsEnabled && (0,
|
|
888
|
+
var remixRightSideEnabled = rightSideControlsEnabled && (0, _fg.fg)('confluence_remix_button_right_side_block_fg');
|
|
889
889
|
// Hide decorations when disabled, except in view mode when right-side controls are enabled
|
|
890
890
|
if (!remixRightSideEnabled || (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) !== 'view') {
|
|
891
891
|
return;
|
|
@@ -913,7 +913,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
|
|
|
913
913
|
var pluginState = key.getState(state);
|
|
914
914
|
var dndDragCancelled = (_pluginState = pluginState) === null || _pluginState === void 0 ? void 0 : _pluginState.lastDragCancelled;
|
|
915
915
|
if ((_pluginState2 = pluginState) !== null && _pluginState2 !== void 0 && _pluginState2.isPMDragging || dndDragCancelled) {
|
|
916
|
-
if ((0,
|
|
916
|
+
if ((0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
917
917
|
var _api$metrics2;
|
|
918
918
|
api === null || api === void 0 || (_api$metrics2 = api.metrics) === null || _api$metrics2 === void 0 || _api$metrics2.commands.startActiveSessionTimer()({
|
|
919
919
|
tr: tr
|
|
@@ -1022,7 +1022,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
|
|
|
1022
1022
|
tr.setMeta(key, _objectSpread(_objectSpread({}, state.tr.getMeta(key)), {}, {
|
|
1023
1023
|
isPMDragging: false
|
|
1024
1024
|
}));
|
|
1025
|
-
if ((0,
|
|
1025
|
+
if ((0, _fg.fg)('platform_editor_ease_of_use_metrics')) {
|
|
1026
1026
|
var _api$metrics3;
|
|
1027
1027
|
api === null || api === void 0 || (_api$metrics3 = api.metrics) === null || _api$metrics3 === void 0 || _api$metrics3.commands.startActiveSessionTimer()({
|
|
1028
1028
|
tr: tr
|
|
@@ -1078,7 +1078,7 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
|
|
|
1078
1078
|
api === null || api === void 0 || api.core.actions.execute(api === null || api === void 0 ? void 0 : api.blockControls.commands.setSelectedViaDragHandle(false));
|
|
1079
1079
|
}
|
|
1080
1080
|
}
|
|
1081
|
-
if (!event.repeat && event.shiftKey && (0,
|
|
1081
|
+
if (!event.repeat && event.shiftKey && (0, _fg.fg)('platform_editor_elements_dnd_shift_click_select')) {
|
|
1082
1082
|
view.dispatch(view.state.tr.setMeta(key, _objectSpread(_objectSpread({}, view.state.tr.getMeta(key)), {}, {
|
|
1083
1083
|
isShiftDown: true
|
|
1084
1084
|
})));
|
|
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
7
7
|
exports.unmountFromMountPoint = exports.renderToMountPoint = void 0;
|
|
8
8
|
var _reactDom = _interopRequireWildcard(require("react-dom"));
|
|
9
9
|
var _client = require("react-dom/client");
|
|
10
|
-
var
|
|
10
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
11
11
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
12
12
|
/**
|
|
13
13
|
* Shared registry of React roots created via `createRoot`.
|
|
@@ -30,7 +30,7 @@ var reactRoots = new WeakMap();
|
|
|
30
30
|
* When the gate is **off**, falls back to the legacy `ReactDOM.render` path.
|
|
31
31
|
*/
|
|
32
32
|
var renderToMountPoint = exports.renderToMountPoint = function renderToMountPoint(element, mountPoint) {
|
|
33
|
-
if ((0,
|
|
33
|
+
if ((0, _fg.fg)('nike_r19_render_unmount')) {
|
|
34
34
|
var root = reactRoots.get(mountPoint);
|
|
35
35
|
if (!root) {
|
|
36
36
|
root = (0, _client.createRoot)(mountPoint);
|
|
@@ -57,7 +57,7 @@ var renderToMountPoint = exports.renderToMountPoint = function renderToMountPoin
|
|
|
57
57
|
* When the gate is **off**, falls back to `ReactDOM.unmountComponentAtNode`.
|
|
58
58
|
*/
|
|
59
59
|
var unmountFromMountPoint = exports.unmountFromMountPoint = function unmountFromMountPoint(mountPoint) {
|
|
60
|
-
if ((0,
|
|
60
|
+
if ((0, _fg.fg)('nike_r19_render_unmount')) {
|
|
61
61
|
var root = reactRoots.get(mountPoint);
|
|
62
62
|
if (root) {
|
|
63
63
|
root.unmount();
|
|
@@ -9,7 +9,7 @@ var _selection = require("@atlaskit/editor-common/selection");
|
|
|
9
9
|
var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
|
|
10
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
11
11
|
var _utils = require("@atlaskit/editor-tables/utils");
|
|
12
|
-
var
|
|
12
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
13
13
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
14
14
|
var _getSelection = require("./getSelection");
|
|
15
15
|
var _selection2 = require("./selection");
|
|
@@ -66,7 +66,7 @@ var expandAndUpdateSelection = exports.expandAndUpdateSelection = function expan
|
|
|
66
66
|
tr.setSelection(_state.TextSelection.create(tr.doc, Math.min(selection.from, expandedRange.$from.pos), Math.max(selection.to, expandedRange.$to.pos)));
|
|
67
67
|
} else if (
|
|
68
68
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
69
|
-
(0,
|
|
69
|
+
(0, _fg.fg)('platform_editor_maui_jira_updates') && ((0, _toolbarFlagCheck.areToolbarFlagsEnabled)(Boolean(api === null || api === void 0 ? void 0 : api.toolbar)) || (0, _experiments.editorExperiment)('platform_editor_block_menu', true))) {
|
|
70
70
|
// Under the gate (and when on the simplified newGetSelection path), use
|
|
71
71
|
// the platform-level composer — same path as open-remix-modal, no drift.
|
|
72
72
|
(0, _nodeSelection.selectNodeAtPos)(tr, startPos, nodeType);
|
|
@@ -10,7 +10,7 @@ var _toolbarFlagCheck = require("@atlaskit/editor-common/toolbar-flag-check");
|
|
|
10
10
|
var _state = require("@atlaskit/editor-prosemirror/state");
|
|
11
11
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
12
12
|
var _utils2 = require("@atlaskit/editor-tables/utils");
|
|
13
|
-
var
|
|
13
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
14
14
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
15
15
|
var getInlineNodePos = exports.getInlineNodePos = function getInlineNodePos(doc, start, nodeSize) {
|
|
16
16
|
var $startPos = doc.resolve(start);
|
|
@@ -100,7 +100,7 @@ var newGetSelection = exports.newGetSelection = function newGetSelection(doc, se
|
|
|
100
100
|
// inline nodes correctly with TextSelection.
|
|
101
101
|
if (
|
|
102
102
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
103
|
-
(0,
|
|
103
|
+
(0, _fg.fg)('platform_editor_maui_jira_updates') && (0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
|
|
104
104
|
return (0, _nodeSelection.getNodeSelectionForPos)(doc, start) || false;
|
|
105
105
|
}
|
|
106
106
|
var node = doc.nodeAt(start);
|
|
@@ -154,7 +154,7 @@ var selectNode = exports.selectNode = function selectNode(tr, start, nodeType, a
|
|
|
154
154
|
// TextSelection) in legacy contexts where those flags are off.
|
|
155
155
|
if (
|
|
156
156
|
// eslint-disable-next-line @atlaskit/platform/no-preconditioning
|
|
157
|
-
(0,
|
|
157
|
+
(0, _fg.fg)('platform_editor_maui_jira_updates') && (0, _experiments.editorExperiment)('platform_editor_block_menu', true)) {
|
|
158
158
|
return (0, _nodeSelection.selectNodeAtPos)(tr, start, nodeType);
|
|
159
159
|
}
|
|
160
160
|
if (nodeType === 'table') {
|
|
@@ -22,14 +22,14 @@ var _state = require("@atlaskit/editor-prosemirror/state");
|
|
|
22
22
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
23
23
|
var _consts = require("@atlaskit/editor-shared-styles/consts");
|
|
24
24
|
var _dragHandleVertical = _interopRequireDefault(require("@atlaskit/icon/core/drag-handle-vertical"));
|
|
25
|
-
var
|
|
26
|
-
var
|
|
27
|
-
var _setCustomNativeDragPreview = require("@atlaskit/pragmatic-drag-and-drop/
|
|
25
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
26
|
+
var _elementAdapter = require("@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter");
|
|
27
|
+
var _setCustomNativeDragPreview = require("@atlaskit/pragmatic-drag-and-drop/utils/set-custom-native-drag-preview");
|
|
28
28
|
var _primitives = require("@atlaskit/primitives");
|
|
29
29
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
30
30
|
var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
|
|
31
31
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
32
|
-
var
|
|
32
|
+
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
33
33
|
var _decorationsCommon = require("../pm-plugins/decorations-common");
|
|
34
34
|
var _main = require("../pm-plugins/main");
|
|
35
35
|
var _pluginKey = require("../pm-plugins/selection-preservation/plugin-key");
|
|
@@ -344,7 +344,7 @@ var getNodeMargins = function getNodeMargins(node) {
|
|
|
344
344
|
var buildToggleLayoutColumnMenuMeta = function buildToggleLayoutColumnMenuMeta(anchorPos, openedViaKeyboard) {
|
|
345
345
|
return _objectSpread(_objectSpread({
|
|
346
346
|
anchorPos: anchorPos
|
|
347
|
-
}, (0,
|
|
347
|
+
}, (0, _fg.fg)('platform_editor_layout_column_menu_kill_switch_1') ? {
|
|
348
348
|
isOpen: true
|
|
349
349
|
} : {}), {}, {
|
|
350
350
|
openedViaKeyboard: openedViaKeyboard
|
|
@@ -547,7 +547,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
547
547
|
var $anchor = (mSelect === null || mSelect === void 0 ? void 0 : mSelect.anchor) !== undefined ? tr.doc.resolve(mSelect === null || mSelect === void 0 ? void 0 : mSelect.anchor) : tr.selection.$anchor;
|
|
548
548
|
if (tr.selection.empty || !e.shiftKey) {
|
|
549
549
|
tr = (0, _getSelection.selectNode)(tr, startPos, nodeType, api);
|
|
550
|
-
} else if (isTopLevelNodeValue && $anchor.depth <= _consts2.DRAG_HANDLE_MAX_SHIFT_CLICK_DEPTH && e.shiftKey && (0,
|
|
550
|
+
} else if (isTopLevelNodeValue && $anchor.depth <= _consts2.DRAG_HANDLE_MAX_SHIFT_CLICK_DEPTH && e.shiftKey && (0, _fg.fg)('platform_editor_elements_dnd_shift_click_select')) {
|
|
551
551
|
var _api$blockControls3;
|
|
552
552
|
var alignAnchorHeadToSel = (0, _selection.alignAnchorHeadInDirectionOfPos)(tr.selection, startPos);
|
|
553
553
|
var selectionWithExpandedHead = (0, _selection.expandSelectionHeadToNodeAtPos)(alignAnchorHeadToSel, startPos);
|
|
@@ -662,7 +662,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
662
662
|
if (!element) {
|
|
663
663
|
return;
|
|
664
664
|
}
|
|
665
|
-
return (0,
|
|
665
|
+
return (0, _elementAdapter.draggable)({
|
|
666
666
|
element: element,
|
|
667
667
|
getInitialData: function getInitialData() {
|
|
668
668
|
return {
|
|
@@ -979,7 +979,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
979
979
|
}, [isReliableAnchorEnabled, calculatePositionOld, view.dom, anchorName, nodeType, docDepForReliableAnchor]);
|
|
980
980
|
var isHandleShown = positionStylesOld.display !== 'none';
|
|
981
981
|
(0, _react.useEffect)(function () {
|
|
982
|
-
if ((0,
|
|
982
|
+
if ((0, _fg.fg)('nike_r19_render_unmount')) {
|
|
983
983
|
return;
|
|
984
984
|
}
|
|
985
985
|
if (handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && buttonRef.current) {
|
|
@@ -994,7 +994,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
994
994
|
}
|
|
995
995
|
}, [buttonRef, handleOptions === null || handleOptions === void 0 ? void 0 : handleOptions.isFocused, view]);
|
|
996
996
|
(0, _react.useEffect)(function () {
|
|
997
|
-
if (!(0,
|
|
997
|
+
if (!(0, _fg.fg)('nike_r19_render_unmount')) {
|
|
998
998
|
return;
|
|
999
999
|
}
|
|
1000
1000
|
if (!(handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused && isHandleShown && buttonRef.current)) {
|
|
@@ -1038,7 +1038,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
1038
1038
|
}, [start, selection, view]);
|
|
1039
1039
|
(0, _react.useEffect)(function () {
|
|
1040
1040
|
var _api$blockControls$sh4;
|
|
1041
|
-
if (isShiftDown === undefined || view.state.selection.empty || !(0,
|
|
1041
|
+
if (isShiftDown === undefined || view.state.selection.empty || !(0, _fg.fg)('platform_editor_elements_dnd_shift_click_select')) {
|
|
1042
1042
|
return;
|
|
1043
1043
|
}
|
|
1044
1044
|
var mSelect = api === null || api === void 0 || (_api$blockControls$sh4 = api.blockControls.sharedState.currentState()) === null || _api$blockControls$sh4 === void 0 ? void 0 : _api$blockControls$sh4.multiSelectDnD;
|
|
@@ -1153,7 +1153,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
1153
1153
|
onDrop: handleOnDrop,
|
|
1154
1154
|
disabled: dragHandleDisabled,
|
|
1155
1155
|
"data-editor-block-ctrl-drag-handle": true,
|
|
1156
|
-
"data-blocks-drag-handle": (0,
|
|
1156
|
+
"data-blocks-drag-handle": (0, _fg.fg)('confluence_remix_button_right_side_block_fg') || undefined,
|
|
1157
1157
|
"data-testid": "block-ctrl-drag-handle",
|
|
1158
1158
|
"aria-label": dragHandleAriaLabel,
|
|
1159
1159
|
onBlur: function onBlur() {
|
|
@@ -1203,11 +1203,11 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
1203
1203
|
testId: "block-ctrl-drag-handle-container"
|
|
1204
1204
|
}, (0, _react2.jsx)("span", {
|
|
1205
1205
|
css: [tooltipContainerStyles, (0, _dragHandlePositions.shouldMaskNodeControls)(nodeType, isTopLevelNodeValue) && ((0, _expValEquals.expValEquals)('platform_editor_table_sticky_header_improvements', 'cohort', 'test_with_overflow') ? tooltipContainerStylesImprovedStickyHeaderWithMask : tooltipContainerStylesStickyHeaderWithMask), !(0, _dragHandlePositions.shouldMaskNodeControls)(nodeType, isTopLevelNodeValue) && tooltipContainerStylesStickyHeaderWithoutMask]
|
|
1206
|
-
}, (0, _react2.jsx)(
|
|
1206
|
+
}, (0, _react2.jsx)(_Tooltip.default, {
|
|
1207
1207
|
content: tooltipContent,
|
|
1208
1208
|
ignoreTooltipPointerEvents: true,
|
|
1209
1209
|
position: 'top',
|
|
1210
|
-
tag: (0,
|
|
1210
|
+
tag: (0, _fg.fg)('platform-dst-top-layer-tooltip') ? 'span' : 'div'
|
|
1211
1211
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
1212
1212
|
,
|
|
1213
1213
|
onShow: function onShow() {
|
|
@@ -1237,7 +1237,7 @@ var DragHandle = exports.DragHandle = function DragHandle(_ref2) {
|
|
|
1237
1237
|
}, renderButton())));
|
|
1238
1238
|
};
|
|
1239
1239
|
var buttonWithTooltip = function buttonWithTooltip() {
|
|
1240
|
-
return (0, _react2.jsx)(
|
|
1240
|
+
return (0, _react2.jsx)(_Tooltip.default, {
|
|
1241
1241
|
content: tooltipContent,
|
|
1242
1242
|
ignoreTooltipPointerEvents: true
|
|
1243
1243
|
// eslint-disable-next-line @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
|
|
@@ -1289,7 +1289,7 @@ var DragHandleWithVisibility = exports.DragHandleWithVisibility = function DragH
|
|
|
1289
1289
|
api: api,
|
|
1290
1290
|
controlSide: !isLayoutColumn && !skipControlSideRestriction && rightSideControlsEnabled ? 'left' : undefined,
|
|
1291
1291
|
forceVisibleOnMouseOut: !!(handleOptions !== null && handleOptions !== void 0 && handleOptions.isFocused),
|
|
1292
|
-
shouldUseDisplayContents: isLayoutColumn && (0,
|
|
1292
|
+
shouldUseDisplayContents: isLayoutColumn && (0, _fg.fg)('platform-dst-top-layer-tooltip')
|
|
1293
1293
|
}, (0, _react2.jsx)(DragHandle, {
|
|
1294
1294
|
view: view,
|
|
1295
1295
|
api: api,
|
|
@@ -11,7 +11,7 @@ var _react = require("react");
|
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
13
13
|
var _box = require("@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box");
|
|
14
|
-
var
|
|
14
|
+
var _elementAdapter = require("@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter");
|
|
15
15
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
16
|
var _decorationsCommon = require("../pm-plugins/decorations-common");
|
|
17
17
|
var _activeAnchorTracker = require("../pm-plugins/utils/active-anchor-tracker");
|
|
@@ -104,7 +104,7 @@ var DropTargetLayout = exports.DropTargetLayout = function DropTargetLayout(prop
|
|
|
104
104
|
}, [api, getPos, activeNode]);
|
|
105
105
|
(0, _react.useEffect)(function () {
|
|
106
106
|
if (ref.current) {
|
|
107
|
-
return (0,
|
|
107
|
+
return (0, _elementAdapter.dropTargetForElements)({
|
|
108
108
|
element: ref.current,
|
|
109
109
|
onDragEnter: function onDragEnter() {
|
|
110
110
|
setIsDraggedOver(true);
|
|
@@ -218,7 +218,7 @@ var DropTargetLayoutNativeAnchorSupport = exports.DropTargetLayoutNativeAnchorSu
|
|
|
218
218
|
}, [api, getPos, activeNode]);
|
|
219
219
|
(0, _react.useEffect)(function () {
|
|
220
220
|
if (ref.current) {
|
|
221
|
-
return (0,
|
|
221
|
+
return (0, _elementAdapter.dropTargetForElements)({
|
|
222
222
|
element: ref.current,
|
|
223
223
|
onDragEnter: function onDragEnter() {
|
|
224
224
|
setIsDraggedOver(true);
|
|
@@ -13,7 +13,7 @@ var _react2 = require("@emotion/react");
|
|
|
13
13
|
var _hooks = require("@atlaskit/editor-common/hooks");
|
|
14
14
|
var _nodeTypeUtils = require("@atlaskit/editor-common/utils/node-type-utils");
|
|
15
15
|
var _box = require("@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box");
|
|
16
|
-
var
|
|
16
|
+
var _elementAdapter = require("@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter");
|
|
17
17
|
var _constants = require("@atlaskit/theme/constants");
|
|
18
18
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
19
19
|
var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
|
|
@@ -111,7 +111,7 @@ var HoverZone = function HoverZone(_ref) {
|
|
|
111
111
|
var isInsideBodiedSyncBlock = (parent === null || parent === void 0 ? void 0 : parent.type.name) === 'bodiedSyncBlock';
|
|
112
112
|
(0, _react.useEffect)(function () {
|
|
113
113
|
if (ref.current) {
|
|
114
|
-
return (0,
|
|
114
|
+
return (0, _elementAdapter.dropTargetForElements)({
|
|
115
115
|
element: ref.current,
|
|
116
116
|
onDragEnter: function onDragEnter() {
|
|
117
117
|
if ((!isNestedDropTarget || isInsideBodiedSyncBlock) && (0, _experiments.editorExperiment)('advanced_layouts', true)) {
|
|
@@ -11,7 +11,7 @@ var _react = require("react");
|
|
|
11
11
|
var _react2 = require("@emotion/react");
|
|
12
12
|
var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
|
|
13
13
|
var _box = require("@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box");
|
|
14
|
-
var
|
|
14
|
+
var _elementAdapter = require("@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter");
|
|
15
15
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
16
16
|
var _decorationsCommon = require("../pm-plugins/decorations-common");
|
|
17
17
|
var _activeAnchorTracker = require("../pm-plugins/utils/active-anchor-tracker");
|
|
@@ -263,7 +263,7 @@ var InlineDropTarget = exports.InlineDropTarget = function InlineDropTarget(_ref
|
|
|
263
263
|
}, [isLeftPosition]);
|
|
264
264
|
(0, _react.useEffect)(function () {
|
|
265
265
|
if (ref.current) {
|
|
266
|
-
return (0,
|
|
266
|
+
return (0, _elementAdapter.dropTargetForElements)({
|
|
267
267
|
element: ref.current,
|
|
268
268
|
onDragEnter: function onDragEnter() {
|
|
269
269
|
setIsDraggedOver(true);
|
|
@@ -22,7 +22,7 @@ var _cellSelection = require("@atlaskit/editor-tables/cell-selection");
|
|
|
22
22
|
var _add = _interopRequireDefault(require("@atlaskit/icon/core/add"));
|
|
23
23
|
var _primitives = require("@atlaskit/primitives");
|
|
24
24
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
25
|
-
var
|
|
25
|
+
var _Tooltip = _interopRequireDefault(require("@atlaskit/tooltip/Tooltip"));
|
|
26
26
|
var _decorationsCommon = require("../pm-plugins/decorations-common");
|
|
27
27
|
var _dragHandlePositions = require("../pm-plugins/utils/drag-handle-positions");
|
|
28
28
|
var _widgetPositions = require("../pm-plugins/utils/widget-positions");
|
|
@@ -356,7 +356,7 @@ var TypeAheadControl = exports.TypeAheadControl = function TypeAheadControl(_ref
|
|
|
356
356
|
}
|
|
357
357
|
}, [api, view.state]);
|
|
358
358
|
var tooltipPressable = function tooltipPressable() {
|
|
359
|
-
return (0, _react2.jsx)(
|
|
359
|
+
return (0, _react2.jsx)(_Tooltip.default, {
|
|
360
360
|
position: "top",
|
|
361
361
|
content: (0, _react2.jsx)(_keymaps.ToolTipContent, {
|
|
362
362
|
description: formatMessage(_messages.blockControlsMessages.insert)
|
|
@@ -4,7 +4,7 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
6
|
exports.shouldUseNestedDragHandleIcon = void 0;
|
|
7
|
-
var
|
|
7
|
+
var _fg = require("@atlaskit/platform-feature-flags/fg");
|
|
8
8
|
var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
|
|
9
9
|
// Nested icon for non-top-level nodes when the experiment is on. Exception: with the
|
|
10
10
|
// kill switch OFF, layout columns use the full block handle instead.
|
|
@@ -17,7 +17,7 @@ var shouldUseNestedDragHandleIcon = exports.shouldUseNestedDragHandleIcon = func
|
|
|
17
17
|
if (isTopLevelNode) {
|
|
18
18
|
return false;
|
|
19
19
|
}
|
|
20
|
-
if (isLayoutColumn && !(0,
|
|
20
|
+
if (isLayoutColumn && !(0, _fg.fg)('platform_editor_layout_column_menu_kill_switch_1')) {
|
|
21
21
|
return false;
|
|
22
22
|
}
|
|
23
23
|
return true;
|
|
@@ -4,7 +4,7 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
|
|
|
4
4
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
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 { handleKeyDownWithPreservedSelection } from './editor-commands/handle-key-down-with-preserved-selection';
|
|
@@ -12,7 +12,7 @@ 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
14
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
15
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
16
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
18
18
|
import { key } from '../pm-plugins/main';
|
|
@@ -2,7 +2,7 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
2
2
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
3
3
|
import { Fragment, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
7
|
import { attachMoveNodeAnalytics, fireInsertLayoutAnalytics, getMultiSelectAnalyticsAttributes } from '../pm-plugins/utils/analytics';
|
|
8
8
|
import { containsNodeOfType, isFragmentOfType } from '../pm-plugins/utils/check-fragment';
|
|
@@ -3,7 +3,7 @@ import { bind } from 'bind-event-listener';
|
|
|
3
3
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
4
4
|
import uuid from 'uuid';
|
|
5
5
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
9
|
import { ACTIVE_DRAG_HANDLE_ATTR } from '../ui/consts';
|
|
@@ -2,7 +2,7 @@ import { createElement } from 'react';
|
|
|
2
2
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
3
3
|
import uuid from 'uuid';
|
|
4
4
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
8
|
import { ACTIVE_QUICK_INSERT_ATTR } from '../ui/consts';
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import memoizeOne from 'memoize-one';
|
|
2
2
|
import { isMultiBlockSelection } from '@atlaskit/editor-common/selection';
|
|
3
3
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
4
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
4
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
5
5
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
6
6
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
7
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -11,10 +11,10 @@ import { EDIT_AREA_ID } from '@atlaskit/editor-common/ui';
|
|
|
11
11
|
import { isEmptyDocument } from '@atlaskit/editor-common/utils';
|
|
12
12
|
import { PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
13
13
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
14
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
14
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
15
15
|
import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
16
|
-
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
17
|
-
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element
|
|
16
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
|
|
17
|
+
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
18
18
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
19
19
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
20
20
|
import { getAnchorAttrName } from '../ui/utils/dom-attr-name';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ReactDOM, { flushSync } from 'react-dom';
|
|
2
2
|
import { createRoot } from 'react-dom/client';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Shared registry of React roots created via `createRoot`.
|
|
@@ -3,7 +3,7 @@ import { expandToBlockRange, isMultiBlockRange } from '@atlaskit/editor-common/s
|
|
|
3
3
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
4
4
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { selectTableClosestToPos } from '@atlaskit/editor-tables/utils';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
8
|
import { selectNode } from './getSelection';
|
|
9
9
|
import { adjustSelectionBoundsForEdgePositions } from './selection';
|
|
@@ -4,7 +4,7 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
|
|
|
4
4
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { selectTableClosestToPos } from '@atlaskit/editor-tables/utils';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
9
|
export const getInlineNodePos = (doc, start, nodeSize) => {
|
|
10
10
|
const $startPos = doc.resolve(start);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { GapCursorSelection, Side } from '@atlaskit/editor-common/selection';
|
|
2
2
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
|
|
3
4
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
5
|
+
|
|
4
6
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
5
7
|
export const getInsertLayoutStep = tr => tr.steps.find(step => {
|
|
6
8
|
var _step$slice$content$f;
|
|
@@ -18,15 +18,15 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
18
18
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
19
19
|
import { akEditorFullPageNarrowBreakout, akEditorTableToolbarSize, relativeSizeToBaseFontSize } from '@atlaskit/editor-shared-styles/consts';
|
|
20
20
|
import DragHandleVerticalIcon from '@atlaskit/icon/core/drag-handle-vertical';
|
|
21
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
|
-
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element
|
|
23
|
-
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/
|
|
21
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
22
|
+
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
23
|
+
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/utils/set-custom-native-drag-preview';
|
|
24
24
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
25
25
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
26
26
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
27
27
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
28
28
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
29
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
29
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
30
30
|
import { getNodeTypeWithLevel } from '../pm-plugins/decorations-common';
|
|
31
31
|
import { key } from '../pm-plugins/main';
|
|
32
32
|
import { selectionPreservationPluginKey } from '../pm-plugins/selection-preservation/plugin-key';
|
|
@@ -8,7 +8,7 @@ import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } fr
|
|
|
8
8
|
import { css, jsx } from '@emotion/react';
|
|
9
9
|
import { layoutBreakpointWidth } from '@atlaskit/editor-shared-styles';
|
|
10
10
|
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
|
|
11
|
-
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element
|
|
11
|
+
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
12
12
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
13
13
|
import { getNodeAnchor } from '../pm-plugins/decorations-common';
|
|
14
14
|
import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
|
|
@@ -9,7 +9,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
9
9
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
10
10
|
import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
|
|
11
11
|
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
|
|
12
|
-
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element
|
|
12
|
+
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
13
13
|
import { layers } from '@atlaskit/theme/constants';
|
|
14
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
15
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -9,7 +9,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
|
9
9
|
import { css, jsx } from '@emotion/react';
|
|
10
10
|
import { akEditorBreakoutPadding } from '@atlaskit/editor-shared-styles';
|
|
11
11
|
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
|
|
12
|
-
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element
|
|
12
|
+
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
13
13
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
14
14
|
import { getNodeAnchor } from '../pm-plugins/decorations-common';
|
|
15
15
|
import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
|
|
@@ -19,7 +19,7 @@ import AddIcon from '@atlaskit/icon/core/add';
|
|
|
19
19
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
20
20
|
import { Box, Pressable, xcss } from '@atlaskit/primitives';
|
|
21
21
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
22
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
22
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
23
23
|
import { getNodeTypeWithLevel } from '../pm-plugins/decorations-common';
|
|
24
24
|
import { getControlBottomCSSValue, getControlHeightCSSValue, getNodeHeight, getTopPosition, shouldBeSticky } from '../pm-plugins/utils/drag-handle-positions';
|
|
25
25
|
import { getLeftPositionForRootElement } from '../pm-plugins/utils/widget-positions';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
2
2
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
3
|
|
|
4
4
|
// Nested icon for non-top-level nodes when the experiment is on. Exception: with the
|
|
@@ -7,7 +7,7 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
|
|
|
7
7
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
8
8
|
import { CellSelection } from '@atlaskit/editor-tables/cell-selection';
|
|
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 { handleKeyDownWithPreservedSelection } from './editor-commands/handle-key-down-with-preserved-selection';
|
|
@@ -15,7 +15,7 @@ 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
17
|
import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
|
|
18
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
18
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
19
19
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
20
20
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
21
21
|
import { key } from '../pm-plugins/main';
|
|
@@ -2,7 +2,7 @@ import { INPUT_METHOD } from '@atlaskit/editor-common/analytics';
|
|
|
2
2
|
import { logException } from '@atlaskit/editor-common/monitoring';
|
|
3
3
|
import { Fragment, Node as PMNode } from '@atlaskit/editor-prosemirror/model';
|
|
4
4
|
import { NodeSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
7
|
import { attachMoveNodeAnalytics, fireInsertLayoutAnalytics, getMultiSelectAnalyticsAttributes } from '../pm-plugins/utils/analytics';
|
|
8
8
|
import { containsNodeOfType, isFragmentOfType } from '../pm-plugins/utils/check-fragment';
|
|
@@ -4,7 +4,7 @@ import { bind } from 'bind-event-listener';
|
|
|
4
4
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
5
5
|
import uuid from 'uuid';
|
|
6
6
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
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 { ACTIVE_DRAG_HANDLE_ATTR } from '../ui/consts';
|
|
@@ -3,7 +3,7 @@ import { createElement } from 'react';
|
|
|
3
3
|
// eslint-disable-next-line @atlaskit/platform/prefer-crypto-random-uuid -- Use crypto.randomUUID instead
|
|
4
4
|
import uuid from 'uuid';
|
|
5
5
|
import { Decoration } from '@atlaskit/editor-prosemirror/view';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
8
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
9
|
import { ACTIVE_QUICK_INSERT_ATTR } from '../ui/consts';
|
|
@@ -2,7 +2,7 @@ import _toConsumableArray from "@babel/runtime/helpers/toConsumableArray";
|
|
|
2
2
|
import memoizeOne from 'memoize-one';
|
|
3
3
|
import { isMultiBlockSelection } from '@atlaskit/editor-common/selection';
|
|
4
4
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
5
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
5
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
6
6
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
7
7
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
8
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -17,10 +17,10 @@ import { EDIT_AREA_ID } from '@atlaskit/editor-common/ui';
|
|
|
17
17
|
import { isEmptyDocument } from '@atlaskit/editor-common/utils';
|
|
18
18
|
import { PluginKey, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
19
19
|
import { DecorationSet } from '@atlaskit/editor-prosemirror/view';
|
|
20
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
20
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
21
21
|
import { autoScrollForElements } from '@atlaskit/pragmatic-drag-and-drop-auto-scroll/element';
|
|
22
|
-
import { combine } from '@atlaskit/pragmatic-drag-and-drop/combine';
|
|
23
|
-
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/element
|
|
22
|
+
import { combine } from '@atlaskit/pragmatic-drag-and-drop/utils/combine';
|
|
23
|
+
import { monitorForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
24
24
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
25
25
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
26
26
|
import { getAnchorAttrName } from '../ui/utils/dom-attr-name';
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import ReactDOM, { flushSync } from 'react-dom';
|
|
2
2
|
import { createRoot } from 'react-dom/client';
|
|
3
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
4
4
|
|
|
5
5
|
/**
|
|
6
6
|
* Shared registry of React roots created via `createRoot`.
|
|
@@ -3,7 +3,7 @@ import { expandToBlockRange, isMultiBlockRange } from '@atlaskit/editor-common/s
|
|
|
3
3
|
import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-check';
|
|
4
4
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { selectTableClosestToPos } from '@atlaskit/editor-tables/utils';
|
|
6
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
6
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
7
7
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
8
8
|
import { selectNode } from './getSelection';
|
|
9
9
|
import { adjustSelectionBoundsForEdgePositions } from './selection';
|
|
@@ -4,7 +4,7 @@ import { areToolbarFlagsEnabled } from '@atlaskit/editor-common/toolbar-flag-che
|
|
|
4
4
|
import { NodeSelection, TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
5
5
|
import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
6
6
|
import { selectTableClosestToPos } from '@atlaskit/editor-tables/utils';
|
|
7
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
7
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
8
8
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
9
9
|
export var getInlineNodePos = function getInlineNodePos(doc, start, nodeSize) {
|
|
10
10
|
var $startPos = doc.resolve(start);
|
|
@@ -1,6 +1,8 @@
|
|
|
1
1
|
import { GapCursorSelection, Side } from '@atlaskit/editor-common/selection';
|
|
2
2
|
import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
3
|
+
|
|
3
4
|
// eslint-disable-next-line @typescript-eslint/consistent-type-imports
|
|
5
|
+
|
|
4
6
|
import { ReplaceStep } from '@atlaskit/editor-prosemirror/transform';
|
|
5
7
|
export var getInsertLayoutStep = function getInsertLayoutStep(tr) {
|
|
6
8
|
return tr.steps.find(function (step) {
|
|
@@ -23,15 +23,15 @@ import { TextSelection } from '@atlaskit/editor-prosemirror/state';
|
|
|
23
23
|
import { findDomRefAtPos } from '@atlaskit/editor-prosemirror/utils';
|
|
24
24
|
import { akEditorFullPageNarrowBreakout, akEditorTableToolbarSize, relativeSizeToBaseFontSize } from '@atlaskit/editor-shared-styles/consts';
|
|
25
25
|
import DragHandleVerticalIcon from '@atlaskit/icon/core/drag-handle-vertical';
|
|
26
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
27
|
-
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/element
|
|
28
|
-
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/
|
|
26
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
27
|
+
import { draggable } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
28
|
+
import { setCustomNativeDragPreview } from '@atlaskit/pragmatic-drag-and-drop/utils/set-custom-native-drag-preview';
|
|
29
29
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
30
30
|
import { Box, xcss } from '@atlaskit/primitives';
|
|
31
31
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
32
32
|
import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
|
|
33
33
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
34
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
34
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
35
35
|
import { getNodeTypeWithLevel } from '../pm-plugins/decorations-common';
|
|
36
36
|
import { key } from '../pm-plugins/main';
|
|
37
37
|
import { selectionPreservationPluginKey } from '../pm-plugins/selection-preservation/plugin-key';
|
|
@@ -10,7 +10,7 @@ import { useCallback, useEffect, useLayoutEffect, useMemo, useRef, useState } fr
|
|
|
10
10
|
import { css, jsx } from '@emotion/react';
|
|
11
11
|
import { layoutBreakpointWidth } from '@atlaskit/editor-shared-styles';
|
|
12
12
|
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
|
|
13
|
-
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element
|
|
13
|
+
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
14
14
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
15
15
|
import { getNodeAnchor } from '../pm-plugins/decorations-common';
|
|
16
16
|
import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
|
|
@@ -11,7 +11,7 @@ import { css, jsx } from '@emotion/react';
|
|
|
11
11
|
import { useSharedPluginStateWithSelector } from '@atlaskit/editor-common/hooks';
|
|
12
12
|
import { getBaseNodeTypeName } from '@atlaskit/editor-common/utils/node-type-utils';
|
|
13
13
|
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
|
|
14
|
-
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element
|
|
14
|
+
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
15
15
|
import { layers } from '@atlaskit/theme/constants';
|
|
16
16
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
17
17
|
import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
|
|
@@ -11,7 +11,7 @@ import { useCallback, useEffect, useMemo, useRef, useState } from 'react';
|
|
|
11
11
|
import { css, jsx } from '@emotion/react';
|
|
12
12
|
import { akEditorBreakoutPadding } from '@atlaskit/editor-shared-styles';
|
|
13
13
|
import { DropIndicator } from '@atlaskit/pragmatic-drag-and-drop-react-drop-indicator/box';
|
|
14
|
-
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/element
|
|
14
|
+
import { dropTargetForElements } from '@atlaskit/pragmatic-drag-and-drop/adapter/element-adapter';
|
|
15
15
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
16
16
|
import { getNodeAnchor } from '../pm-plugins/decorations-common';
|
|
17
17
|
import { useActiveAnchorTracker } from '../pm-plugins/utils/active-anchor-tracker';
|
|
@@ -23,7 +23,7 @@ import AddIcon from '@atlaskit/icon/core/add';
|
|
|
23
23
|
// eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
|
|
24
24
|
import { Box, Pressable, xcss } from '@atlaskit/primitives';
|
|
25
25
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
26
|
-
import Tooltip from '@atlaskit/tooltip';
|
|
26
|
+
import Tooltip from '@atlaskit/tooltip/Tooltip';
|
|
27
27
|
import { getNodeTypeWithLevel } from '../pm-plugins/decorations-common';
|
|
28
28
|
import { getControlBottomCSSValue, getControlHeightCSSValue, getNodeHeight, getTopPosition, shouldBeSticky } from '../pm-plugins/utils/drag-handle-positions';
|
|
29
29
|
import { getLeftPositionForRootElement } from '../pm-plugins/utils/widget-positions';
|
|
@@ -1,4 +1,4 @@
|
|
|
1
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
1
|
+
import { fg } from '@atlaskit/platform-feature-flags/fg';
|
|
2
2
|
import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
|
|
3
3
|
|
|
4
4
|
// Nested icon for non-top-level nodes when the experiment is on. Exception: with the
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import type { Transaction } from '@atlaskit/editor-prosemirror/state';
|
|
2
|
-
import { Step } from '@atlaskit/editor-prosemirror/transform';
|
|
2
|
+
import { Step } from '@atlaskit/editor-prosemirror/transform-override';
|
|
3
3
|
export declare const getInsertLayoutStep: (tr: Transaction) => Step | undefined;
|
|
4
4
|
export declare const updateSelection: (tr: Transaction, to: number, insertAtRight?: boolean) => Transaction;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "16.1.
|
|
3
|
+
"version": "16.1.3",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -22,6 +22,7 @@
|
|
|
22
22
|
"dependencies": {
|
|
23
23
|
"@atlaskit/browser-apis": "^1.2.0",
|
|
24
24
|
"@atlaskit/button": "^25.2.0",
|
|
25
|
+
"@atlaskit/docs": "^12.2.0",
|
|
25
26
|
"@atlaskit/editor-plugin-accessibility-utils": "^15.0.0",
|
|
26
27
|
"@atlaskit/editor-plugin-analytics": "^15.0.0",
|
|
27
28
|
"@atlaskit/editor-plugin-editor-disabled": "^15.0.0",
|
|
@@ -49,8 +50,9 @@
|
|
|
49
50
|
"@atlaskit/pragmatic-drag-and-drop-auto-scroll": "^3.1.0",
|
|
50
51
|
"@atlaskit/pragmatic-drag-and-drop-react-drop-indicator": "^4.1.0",
|
|
51
52
|
"@atlaskit/primitives": "^22.4.0",
|
|
53
|
+
"@atlaskit/section-message": "^10.1.0",
|
|
52
54
|
"@atlaskit/theme": "^28.1.0",
|
|
53
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
55
|
+
"@atlaskit/tmp-editor-statsig": "^159.0.0",
|
|
54
56
|
"@atlaskit/tokens": "^16.8.0",
|
|
55
57
|
"@atlaskit/tooltip": "^24.2.0",
|
|
56
58
|
"@babel/runtime": "^7.0.0",
|