@atlaskit/editor-plugin-block-controls 25.0.1 → 25.0.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/pm-plugins/main.js +6 -3
- package/dist/cjs/ui/use-block-controls-surface-drag-source.js +3 -1
- package/dist/es2019/pm-plugins/main.js +6 -3
- package/dist/es2019/ui/use-block-controls-surface-drag-source.js +3 -1
- package/dist/esm/pm-plugins/main.js +6 -3
- package/dist/esm/ui/use-block-controls-surface-drag-source.js +3 -1
- package/package.json +4 -4
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,21 @@
|
|
|
1
1
|
# @atlaskit/editor-plugin-block-controls
|
|
2
2
|
|
|
3
|
+
## 25.0.3
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`797af912eda84`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/797af912eda84) -
|
|
8
|
+
When experiment platform_editor_remove_legacy_perf_events is enabled, skip block drag and drop
|
|
9
|
+
perf measurements so blocksDragInit and the drag ended duration analytics events are no longer
|
|
10
|
+
fired
|
|
11
|
+
- Updated dependencies
|
|
12
|
+
|
|
13
|
+
## 25.0.2
|
|
14
|
+
|
|
15
|
+
### Patch Changes
|
|
16
|
+
|
|
17
|
+
- Updated dependencies
|
|
18
|
+
|
|
3
19
|
## 25.0.1
|
|
4
20
|
|
|
5
21
|
### Patch Changes
|
|
@@ -112,7 +112,8 @@ var destroyFn = function destroyFn(api, editorView) {
|
|
|
112
112
|
if (isHTMLElement(scrollable)) {
|
|
113
113
|
scrollable.style.setProperty('scroll-behavior', null);
|
|
114
114
|
}
|
|
115
|
-
|
|
115
|
+
var shouldMeasureDrop = (0, _fg.fg)('platform_editor_drag_and_drop_perf_analytics') && !(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_remove_legacy_perf_events');
|
|
116
|
+
if (shouldMeasureDrop) {
|
|
116
117
|
(0, _performanceMeasures.startMeasure)(EDITOR_BLOCKS_DROP_INIT);
|
|
117
118
|
}
|
|
118
119
|
if (!api) {
|
|
@@ -179,7 +180,7 @@ var destroyFn = function destroyFn(api, editorView) {
|
|
|
179
180
|
lastDragCancelled: lastDragCancelled
|
|
180
181
|
}));
|
|
181
182
|
});
|
|
182
|
-
if (
|
|
183
|
+
if (shouldMeasureDrop) {
|
|
183
184
|
// wait for the idle callback to ensure that the drag operation has completed
|
|
184
185
|
scheduleCallback(function () {
|
|
185
186
|
if ((0, _performanceMeasures.isMeasuring)(EDITOR_BLOCKS_DROP_INIT)) {
|
|
@@ -1128,7 +1129,9 @@ var createPlugin = exports.createPlugin = function createPlugin(api, getIntl, no
|
|
|
1128
1129
|
if (api !== null && api !== void 0 && (_api$limitedMode5 = api.limitedMode) !== null && _api$limitedMode5 !== void 0 && (_api$limitedMode5 = _api$limitedMode5.sharedState.currentState()) !== null && _api$limitedMode5 !== void 0 && _api$limitedMode5.enabled) {
|
|
1129
1130
|
return;
|
|
1130
1131
|
}
|
|
1131
|
-
(0,
|
|
1132
|
+
if (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_remove_legacy_perf_events')) {
|
|
1133
|
+
(0, _performanceMeasures.startMeasure)(EDITOR_BLOCKS_DRAG_INIT);
|
|
1134
|
+
}
|
|
1132
1135
|
if (isAdvancedLayoutEnabled) {
|
|
1133
1136
|
_activeAnchorTracker.defaultActiveAnchorTracker.reset();
|
|
1134
1137
|
}
|
|
@@ -148,7 +148,9 @@ var useBlockControlsSurfaceDragSource = exports.useBlockControlsSurfaceDragSourc
|
|
|
148
148
|
}
|
|
149
149
|
|
|
150
150
|
// This handle is outside ProseMirror, so it owns the side effects normally started by PM.
|
|
151
|
-
(0,
|
|
151
|
+
if (!(0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_remove_legacy_perf_events')) {
|
|
152
|
+
(0, _performanceMeasures.startMeasure)(EDITOR_BLOCKS_DRAG_INIT);
|
|
153
|
+
}
|
|
152
154
|
_activeAnchorTracker.defaultActiveAnchorTracker.reset();
|
|
153
155
|
api === null || api === void 0 || (_api$core2 = api.core) === null || _api$core2 === void 0 || _api$core2.actions.execute(function (_ref5) {
|
|
154
156
|
var _api$blockControls$sh2, _resolvedMovingNode$n, _api$blockControls2, _api$analytics;
|
|
@@ -100,7 +100,8 @@ const destroyFn = (api, editorView) => {
|
|
|
100
100
|
if (isHTMLElement(scrollable)) {
|
|
101
101
|
scrollable.style.setProperty('scroll-behavior', null);
|
|
102
102
|
}
|
|
103
|
-
|
|
103
|
+
const shouldMeasureDrop = fg('platform_editor_drag_and_drop_perf_analytics') && !isExperimentEnabled('platform_editor_remove_legacy_perf_events');
|
|
104
|
+
if (shouldMeasureDrop) {
|
|
104
105
|
startMeasure(EDITOR_BLOCKS_DROP_INIT);
|
|
105
106
|
}
|
|
106
107
|
if (!api) {
|
|
@@ -173,7 +174,7 @@ const destroyFn = (api, editorView) => {
|
|
|
173
174
|
lastDragCancelled
|
|
174
175
|
});
|
|
175
176
|
});
|
|
176
|
-
if (
|
|
177
|
+
if (shouldMeasureDrop) {
|
|
177
178
|
// wait for the idle callback to ensure that the drag operation has completed
|
|
178
179
|
scheduleCallback(() => {
|
|
179
180
|
if (isMeasuring(EDITOR_BLOCKS_DROP_INIT)) {
|
|
@@ -1032,7 +1033,9 @@ export const createPlugin = (api, getIntl, nodeViewPortalProviderAPI, nodeDecora
|
|
|
1032
1033
|
if (api !== null && api !== void 0 && (_api$limitedMode5 = api.limitedMode) !== null && _api$limitedMode5 !== void 0 && (_api$limitedMode5$sha = _api$limitedMode5.sharedState.currentState()) !== null && _api$limitedMode5$sha !== void 0 && _api$limitedMode5$sha.enabled) {
|
|
1033
1034
|
return;
|
|
1034
1035
|
}
|
|
1035
|
-
|
|
1036
|
+
if (!isExperimentEnabled('platform_editor_remove_legacy_perf_events')) {
|
|
1037
|
+
startMeasure(EDITOR_BLOCKS_DRAG_INIT);
|
|
1038
|
+
}
|
|
1036
1039
|
if (isAdvancedLayoutEnabled) {
|
|
1037
1040
|
defaultActiveAnchorTracker.reset();
|
|
1038
1041
|
}
|
|
@@ -145,7 +145,9 @@ export const useBlockControlsSurfaceDragSource = ({
|
|
|
145
145
|
}
|
|
146
146
|
|
|
147
147
|
// This handle is outside ProseMirror, so it owns the side effects normally started by PM.
|
|
148
|
-
|
|
148
|
+
if (!isExperimentEnabled('platform_editor_remove_legacy_perf_events')) {
|
|
149
|
+
startMeasure(EDITOR_BLOCKS_DRAG_INIT);
|
|
150
|
+
}
|
|
149
151
|
defaultActiveAnchorTracker.reset();
|
|
150
152
|
api === null || api === void 0 ? void 0 : (_api$core2 = api.core) === null || _api$core2 === void 0 ? void 0 : _api$core2.actions.execute(({
|
|
151
153
|
tr
|
|
@@ -105,7 +105,8 @@ var destroyFn = function destroyFn(api, editorView) {
|
|
|
105
105
|
if (isHTMLElement(scrollable)) {
|
|
106
106
|
scrollable.style.setProperty('scroll-behavior', null);
|
|
107
107
|
}
|
|
108
|
-
|
|
108
|
+
var shouldMeasureDrop = fg('platform_editor_drag_and_drop_perf_analytics') && !isExperimentEnabled('platform_editor_remove_legacy_perf_events');
|
|
109
|
+
if (shouldMeasureDrop) {
|
|
109
110
|
startMeasure(EDITOR_BLOCKS_DROP_INIT);
|
|
110
111
|
}
|
|
111
112
|
if (!api) {
|
|
@@ -172,7 +173,7 @@ var destroyFn = function destroyFn(api, editorView) {
|
|
|
172
173
|
lastDragCancelled: lastDragCancelled
|
|
173
174
|
}));
|
|
174
175
|
});
|
|
175
|
-
if (
|
|
176
|
+
if (shouldMeasureDrop) {
|
|
176
177
|
// wait for the idle callback to ensure that the drag operation has completed
|
|
177
178
|
scheduleCallback(function () {
|
|
178
179
|
if (isMeasuring(EDITOR_BLOCKS_DROP_INIT)) {
|
|
@@ -1122,7 +1123,9 @@ export var createPlugin = function createPlugin(api, getIntl, nodeViewPortalProv
|
|
|
1122
1123
|
if (api !== null && api !== void 0 && (_api$limitedMode5 = api.limitedMode) !== null && _api$limitedMode5 !== void 0 && (_api$limitedMode5 = _api$limitedMode5.sharedState.currentState()) !== null && _api$limitedMode5 !== void 0 && _api$limitedMode5.enabled) {
|
|
1123
1124
|
return;
|
|
1124
1125
|
}
|
|
1125
|
-
|
|
1126
|
+
if (!isExperimentEnabled('platform_editor_remove_legacy_perf_events')) {
|
|
1127
|
+
startMeasure(EDITOR_BLOCKS_DRAG_INIT);
|
|
1128
|
+
}
|
|
1126
1129
|
if (isAdvancedLayoutEnabled) {
|
|
1127
1130
|
defaultActiveAnchorTracker.reset();
|
|
1128
1131
|
}
|
|
@@ -142,7 +142,9 @@ export var useBlockControlsSurfaceDragSource = function useBlockControlsSurfaceD
|
|
|
142
142
|
}
|
|
143
143
|
|
|
144
144
|
// This handle is outside ProseMirror, so it owns the side effects normally started by PM.
|
|
145
|
-
|
|
145
|
+
if (!isExperimentEnabled('platform_editor_remove_legacy_perf_events')) {
|
|
146
|
+
startMeasure(EDITOR_BLOCKS_DRAG_INIT);
|
|
147
|
+
}
|
|
146
148
|
defaultActiveAnchorTracker.reset();
|
|
147
149
|
api === null || api === void 0 || (_api$core2 = api.core) === null || _api$core2 === void 0 || _api$core2.actions.execute(function (_ref5) {
|
|
148
150
|
var _api$blockControls$sh2, _resolvedMovingNode$n, _api$blockControls2, _api$analytics;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-plugin-block-controls",
|
|
3
|
-
"version": "25.0.
|
|
3
|
+
"version": "25.0.3",
|
|
4
4
|
"description": "Block controls plugin for @atlaskit/editor-core",
|
|
5
5
|
"author": "Atlassian Pty Ltd",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -61,8 +61,8 @@
|
|
|
61
61
|
"@atlaskit/primitives": "^22.5.0",
|
|
62
62
|
"@atlaskit/section-message": "^10.2.0",
|
|
63
63
|
"@atlaskit/theme": "^28.2.0",
|
|
64
|
-
"@atlaskit/tmp-editor-statsig": "^
|
|
65
|
-
"@atlaskit/tokens": "^20.
|
|
64
|
+
"@atlaskit/tmp-editor-statsig": "^223.0.0",
|
|
65
|
+
"@atlaskit/tokens": "^20.3.0",
|
|
66
66
|
"@atlaskit/tooltip": "^24.4.0",
|
|
67
67
|
"@babel/runtime": "^7.0.0",
|
|
68
68
|
"@compiled/react": "^1.0.2",
|
|
@@ -73,7 +73,7 @@
|
|
|
73
73
|
"uuid": "^11.1.1"
|
|
74
74
|
},
|
|
75
75
|
"peerDependencies": {
|
|
76
|
-
"@atlaskit/editor-common": "^128.
|
|
76
|
+
"@atlaskit/editor-common": "^128.3.0",
|
|
77
77
|
"react": "^18.2.0 || ^19.2.0",
|
|
78
78
|
"react-dom": "^18.2.0 || ^19.2.0",
|
|
79
79
|
"react-intl": "^5.25.1 || ^6.0.0 || ^7.0.0"
|