@atlaskit/editor-common 111.18.1 → 111.19.1
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 +21 -0
- package/dist/cjs/annotation/manager.js +9 -9
- package/dist/cjs/messages/syncBlock.js +0 -30
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/node-anchor/node-anchor-provider.js +0 -6
- package/dist/cjs/preset/core-plugin/index.js +17 -37
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/cjs/utils/compareNodes.js +3 -3
- package/dist/es2019/annotation/manager.js +9 -9
- package/dist/es2019/messages/syncBlock.js +0 -30
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/node-anchor/node-anchor-provider.js +0 -6
- package/dist/es2019/preset/core-plugin/index.js +17 -37
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/annotation/manager.js +9 -9
- package/dist/esm/messages/syncBlock.js +0 -30
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/node-anchor/node-anchor-provider.js +0 -6
- package/dist/esm/preset/core-plugin/index.js +17 -37
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/esm/utils/compareNodes.js +3 -3
- package/dist/types/annotation/index.d.ts +12 -10
- package/dist/types/collab/index.d.ts +11 -11
- package/dist/types/extensions/types/extension-handler.d.ts +2 -2
- package/dist/types/extensions/types/extension-provider.d.ts +6 -6
- package/dist/types/link/LinkSearch/types.d.ts +8 -8
- package/dist/types/messages/syncBlock.d.ts +0 -30
- package/dist/types/provider-factory/autoformatting-provider.d.ts +1 -1
- package/dist/types/provider-factory/card-provider.d.ts +2 -2
- package/dist/types/provider-factory/macro-provider.d.ts +2 -2
- package/dist/types/provider-factory/search-provider.d.ts +1 -1
- package/dist/types/types/editor-actions.d.ts +12 -12
- package/dist/types/types/next-editor-plugin.d.ts +5 -5
- package/dist/types/types/user-preferences.d.ts +3 -3
- package/dist/types/utils/compareNodes.d.ts +1 -1
- package/dist/types/utils/get-performance-options.d.ts +1 -1
- package/dist/types-ts4.5/annotation/index.d.ts +12 -10
- package/dist/types-ts4.5/collab/index.d.ts +11 -11
- package/dist/types-ts4.5/extensions/types/extension-handler.d.ts +2 -2
- package/dist/types-ts4.5/extensions/types/extension-provider.d.ts +6 -6
- package/dist/types-ts4.5/link/LinkSearch/types.d.ts +8 -8
- package/dist/types-ts4.5/messages/syncBlock.d.ts +0 -30
- package/dist/types-ts4.5/provider-factory/autoformatting-provider.d.ts +1 -1
- package/dist/types-ts4.5/provider-factory/card-provider.d.ts +2 -2
- package/dist/types-ts4.5/provider-factory/macro-provider.d.ts +2 -2
- package/dist/types-ts4.5/provider-factory/search-provider.d.ts +1 -1
- package/dist/types-ts4.5/types/editor-actions.d.ts +12 -12
- package/dist/types-ts4.5/types/next-editor-plugin.d.ts +5 -5
- package/dist/types-ts4.5/types/user-preferences.d.ts +3 -3
- package/dist/types-ts4.5/utils/compareNodes.d.ts +1 -1
- package/dist/types-ts4.5/utils/get-performance-options.d.ts +1 -1
- package/package.json +3 -6
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,26 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 111.19.1
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [`85444e8a5672a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/85444e8a5672a) -
|
|
8
|
+
EDITOR-5526 clean up platform_synced_block_patch_2
|
|
9
|
+
- Updated dependencies
|
|
10
|
+
|
|
11
|
+
## 111.19.0
|
|
12
|
+
|
|
13
|
+
### Minor Changes
|
|
14
|
+
|
|
15
|
+
- [`46efd73fe9c9d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/46efd73fe9c9d) -
|
|
16
|
+
[ux] Cleanup fg: platform_editor_fix_node_anchor_dom_cache
|
|
17
|
+
|
|
18
|
+
### Patch Changes
|
|
19
|
+
|
|
20
|
+
- [`2d2e663457f9a`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2d2e663457f9a) -
|
|
21
|
+
Convert method signatures to property signature syntax to comply with
|
|
22
|
+
@typescript-eslint/method-signature-style rule. Removed 62 eslint-disable comments.
|
|
23
|
+
|
|
3
24
|
## 111.18.1
|
|
4
25
|
|
|
5
26
|
### Patch Changes
|
|
@@ -77,7 +77,7 @@ var SharedAnnotationManager = exports.SharedAnnotationManager = /*#__PURE__*/fun
|
|
|
77
77
|
}, {
|
|
78
78
|
key: "emit",
|
|
79
79
|
value: function emit(event) {
|
|
80
|
-
this.emitter.emit(event.name, event.data);
|
|
80
|
+
this.emitter.emit(event.name, 'data' in event ? event.data : undefined);
|
|
81
81
|
return this;
|
|
82
82
|
}
|
|
83
83
|
}, {
|
|
@@ -104,7 +104,7 @@ var SharedAnnotationManager = exports.SharedAnnotationManager = /*#__PURE__*/fun
|
|
|
104
104
|
}
|
|
105
105
|
try {
|
|
106
106
|
return fn();
|
|
107
|
-
} catch (
|
|
107
|
+
} catch (_unused) {
|
|
108
108
|
return false;
|
|
109
109
|
}
|
|
110
110
|
}
|
|
@@ -120,7 +120,7 @@ var SharedAnnotationManager = exports.SharedAnnotationManager = /*#__PURE__*/fun
|
|
|
120
120
|
}
|
|
121
121
|
try {
|
|
122
122
|
return fn();
|
|
123
|
-
} catch (
|
|
123
|
+
} catch (_unused2) {
|
|
124
124
|
return {
|
|
125
125
|
success: false,
|
|
126
126
|
reason: 'hook-execution-error'
|
|
@@ -139,7 +139,7 @@ var SharedAnnotationManager = exports.SharedAnnotationManager = /*#__PURE__*/fun
|
|
|
139
139
|
}
|
|
140
140
|
try {
|
|
141
141
|
return fn();
|
|
142
|
-
} catch (
|
|
142
|
+
} catch (_unused3) {
|
|
143
143
|
return {
|
|
144
144
|
success: false,
|
|
145
145
|
reason: 'hook-execution-error'
|
|
@@ -158,7 +158,7 @@ var SharedAnnotationManager = exports.SharedAnnotationManager = /*#__PURE__*/fun
|
|
|
158
158
|
}
|
|
159
159
|
try {
|
|
160
160
|
return fn(id);
|
|
161
|
-
} catch (
|
|
161
|
+
} catch (_unused4) {
|
|
162
162
|
return {
|
|
163
163
|
success: false,
|
|
164
164
|
reason: 'hook-execution-error'
|
|
@@ -177,7 +177,7 @@ var SharedAnnotationManager = exports.SharedAnnotationManager = /*#__PURE__*/fun
|
|
|
177
177
|
}
|
|
178
178
|
try {
|
|
179
179
|
return fn();
|
|
180
|
-
} catch (
|
|
180
|
+
} catch (_unused5) {
|
|
181
181
|
return {
|
|
182
182
|
success: false,
|
|
183
183
|
reason: 'hook-execution-error'
|
|
@@ -199,7 +199,7 @@ var SharedAnnotationManager = exports.SharedAnnotationManager = /*#__PURE__*/fun
|
|
|
199
199
|
// because the hook is responsible for the state of the selection. The manager is not responsible for the state of
|
|
200
200
|
// the selection.
|
|
201
201
|
return fn(id, isSelected);
|
|
202
|
-
} catch (
|
|
202
|
+
} catch (_unused6) {
|
|
203
203
|
return {
|
|
204
204
|
success: false,
|
|
205
205
|
reason: 'hook-execution-error'
|
|
@@ -218,7 +218,7 @@ var SharedAnnotationManager = exports.SharedAnnotationManager = /*#__PURE__*/fun
|
|
|
218
218
|
}
|
|
219
219
|
try {
|
|
220
220
|
return fn(id, isHovered);
|
|
221
|
-
} catch (
|
|
221
|
+
} catch (_unused7) {
|
|
222
222
|
return {
|
|
223
223
|
success: false,
|
|
224
224
|
reason: 'hook-execution-error'
|
|
@@ -237,7 +237,7 @@ var SharedAnnotationManager = exports.SharedAnnotationManager = /*#__PURE__*/fun
|
|
|
237
237
|
}
|
|
238
238
|
try {
|
|
239
239
|
return fn(id);
|
|
240
|
-
} catch (
|
|
240
|
+
} catch (_unused8) {
|
|
241
241
|
return {
|
|
242
242
|
success: false,
|
|
243
243
|
reason: 'hook-execution-error'
|
|
@@ -101,11 +101,6 @@ var syncBlockMessages = exports.syncBlockMessages = (0, _reactIntlNext.defineMes
|
|
|
101
101
|
defaultMessage: 'This content is synced. Edit it at the source.',
|
|
102
102
|
description: 'Tooltip that shows when you hover over a task in the destination synced block'
|
|
103
103
|
},
|
|
104
|
-
deleteConfirmationModalTitleSingle: {
|
|
105
|
-
id: 'fabric.editor.deleteConfirmationModalTitleSingle',
|
|
106
|
-
defaultMessage: 'Delete synced block?',
|
|
107
|
-
description: 'Title of delete confirmation modal that appears when user tries to delete source synced block that has no reference'
|
|
108
|
-
},
|
|
109
104
|
deletionConfirmationModalTitleSingle: {
|
|
110
105
|
id: 'fabric.editor.deletionConfirmationModalTitleSingle',
|
|
111
106
|
defaultMessage: 'Delete synced content?',
|
|
@@ -131,26 +126,11 @@ var syncBlockMessages = exports.syncBlockMessages = (0, _reactIntlNext.defineMes
|
|
|
131
126
|
defaultMessage: 'Try again',
|
|
132
127
|
description: 'Text on button which retries deleting the sync block when the previous deletion failed'
|
|
133
128
|
},
|
|
134
|
-
deleteConfirmationModalDescriptionMultiple: {
|
|
135
|
-
id: 'fabric.editor.deleteConfirmationModalDescriptionMultiple',
|
|
136
|
-
defaultMessage: 'Deleting this content will also remove it from synced locations, where it will appear as an “Unsynced block”.',
|
|
137
|
-
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
138
|
-
},
|
|
139
|
-
deleteConfirmationModalDescription: {
|
|
140
|
-
id: 'fabric.editor.deleteConfirmationModalDescriptionSingle',
|
|
141
|
-
defaultMessage: 'Deleting this content will also remove {syncBlockCount, plural, one {a synced block. References to this block} other {# synced blocks. References to these blocks}} in other locations will show an error. Continue with deletion?',
|
|
142
|
-
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
143
|
-
},
|
|
144
129
|
deletionConfirmationModalDescription: {
|
|
145
130
|
id: 'fabric.editor.deletionConfirmationModalDescription',
|
|
146
131
|
defaultMessage: 'If you delete this synced block, it will become an “Unsynced block” in other locations. This action is permanent and cannot be undone.',
|
|
147
132
|
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
148
133
|
},
|
|
149
|
-
deleteConfirmationModalDescriptionNoRef: {
|
|
150
|
-
id: 'fabric.editor.deleteConfirmationModalDescriptionNoRef',
|
|
151
|
-
defaultMessage: "You'll no longer be able to reuse this synced block to keep content updated across locations. ",
|
|
152
|
-
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
153
|
-
},
|
|
154
134
|
deletionConfirmationModalDescriptionNoRef: {
|
|
155
135
|
id: 'fabric.editor.deletionConfirmationModalDescriptionNoRef',
|
|
156
136
|
defaultMessage: 'Your content will no longer appear, and the synced block will be deleted. This action is permanent and cannot be undone.',
|
|
@@ -346,21 +326,11 @@ var syncBlockMessages = exports.syncBlockMessages = (0, _reactIntlNext.defineMes
|
|
|
346
326
|
defaultMessage: 'Unsync this content?',
|
|
347
327
|
description: 'Title of unsync confirmation modal that appears when user tries to unsync source synced block'
|
|
348
328
|
},
|
|
349
|
-
unsyncConfirmationModalDescriptionSingle: {
|
|
350
|
-
id: 'fabric.editor.unsyncConfirmationModalDescriptionSingle',
|
|
351
|
-
defaultMessage: 'Your content will stay here. It will no longer be a synced block.',
|
|
352
|
-
description: 'Description of unsync confirmation modal that appears when user tries to unsync source synced block with no reference'
|
|
353
|
-
},
|
|
354
329
|
unsyncConfirmModalDescriptionSingle: {
|
|
355
330
|
id: 'fabric.editor.unsyncConfirmModalDescriptionSingle',
|
|
356
331
|
defaultMessage: 'Your content will stay here. It will no longer be a synced block. This action is permanent and cannot be undone.',
|
|
357
332
|
description: 'Description of unsync confirmation modal that appears when user tries to unsync source synced block with no reference'
|
|
358
333
|
},
|
|
359
|
-
unsyncConfirmationModalDescriptionMultiple: {
|
|
360
|
-
id: 'fabric.editor.unsyncConfirmationModalDescriptionMultiple',
|
|
361
|
-
defaultMessage: 'Your content will stay here. In {syncBlockCount, plural, one {1 other synced location} other {# other synced locations}} it will appear as an “Unsynced block”. ',
|
|
362
|
-
description: 'Description of unsync confirmation modal that appears when user tries to unsync source synced block with multiple references'
|
|
363
|
-
},
|
|
364
334
|
unsyncConfirmModalDescriptionMultiple: {
|
|
365
335
|
id: 'fabric.editor.unsyncConfirmModalDescriptionMultiple',
|
|
366
336
|
defaultMessage: 'Your content will stay here. In {syncBlockCount, plural, one {1 other synced location} other {# other synced locations}} it will appear as an “Unsynced block”. This action is permanent and cannot be undone.',
|
|
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
|
|
|
19
19
|
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); }
|
|
20
20
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
21
21
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
22
|
-
var packageVersion = "111.
|
|
22
|
+
var packageVersion = "111.19.0";
|
|
23
23
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
24
24
|
// Remove URL as it has UGC
|
|
25
25
|
// Ignored via go/ees007
|
|
@@ -92,12 +92,6 @@ var NodeAnchorProvider = exports.NodeAnchorProvider = /*#__PURE__*/function () {
|
|
|
92
92
|
}, {
|
|
93
93
|
key: "setIdForNode",
|
|
94
94
|
value: function setIdForNode(node, id) {
|
|
95
|
-
// [FEATURE FLAG: platform_editor_fix_node_anchor_dom_cache]
|
|
96
|
-
// This method is part of the fix to prevent drag handle misalignment.
|
|
97
|
-
// To clean up: remove the feature flag check, keep the method body
|
|
98
|
-
if (!(0, _platformFeatureFlags.fg)('platform_editor_fix_node_anchor_dom_cache')) {
|
|
99
|
-
return;
|
|
100
|
-
}
|
|
101
95
|
if (this.limitedMode) {
|
|
102
96
|
return;
|
|
103
97
|
}
|
|
@@ -5,7 +5,6 @@ Object.defineProperty(exports, "__esModule", {
|
|
|
5
5
|
});
|
|
6
6
|
exports.corePlugin = void 0;
|
|
7
7
|
var _model = require("@atlaskit/editor-prosemirror/model");
|
|
8
|
-
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
9
8
|
var _nodeAnchorProvider = require("../../node-anchor/node-anchor-provider");
|
|
10
9
|
var _processRawValue = require("../../utils/processRawValue");
|
|
11
10
|
var _editorCommands = require("../editor-commands");
|
|
@@ -153,45 +152,26 @@ var corePlugin = exports.corePlugin = function corePlugin(_ref) {
|
|
|
153
152
|
return undefined;
|
|
154
153
|
}
|
|
155
154
|
|
|
156
|
-
//
|
|
157
|
-
//
|
|
158
|
-
//
|
|
159
|
-
|
|
160
|
-
if (
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
if (domAnchor) {
|
|
168
|
-
// Cache the DOM anchor for this node to maintain consistency
|
|
169
|
-
// This ensures subsequent calls return the same anchor
|
|
170
|
-
nodeIdProvider.setIdForNode(node, domAnchor);
|
|
171
|
-
return domAnchor;
|
|
172
|
-
}
|
|
155
|
+
// Check DOM first to avoid generating a new ID with a collision suffix
|
|
156
|
+
// when the DOM already has a valid anchor. This prevents misalignment
|
|
157
|
+
// of drag handles on first focus after clicking from the title.
|
|
158
|
+
var nodeDOM = view.nodeDOM(pos);
|
|
159
|
+
if (nodeDOM instanceof HTMLElement) {
|
|
160
|
+
var domAnchor = nodeDOM.getAttribute('data-node-anchor');
|
|
161
|
+
if (domAnchor) {
|
|
162
|
+
// Cache the DOM anchor for this node to maintain consistency
|
|
163
|
+
// This ensures subsequent calls return the same anchor
|
|
164
|
+
nodeIdProvider.setIdForNode(node, domAnchor);
|
|
165
|
+
return domAnchor;
|
|
173
166
|
}
|
|
167
|
+
}
|
|
174
168
|
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
}
|
|
180
|
-
return undefined;
|
|
181
|
-
} else {
|
|
182
|
-
// OLD BEHAVIOR (to be removed when flag is cleaned up)
|
|
183
|
-
// This approach can generate incorrect IDs with collision suffixes when
|
|
184
|
-
// the DOM already has a valid anchor, causing drag handle misalignment
|
|
185
|
-
var _generatedId = nodeIdProvider.getOrGenerateId(node, pos);
|
|
186
|
-
if (_generatedId) {
|
|
187
|
-
return _generatedId;
|
|
188
|
-
}
|
|
189
|
-
var _nodeDOM = view.nodeDOM(pos);
|
|
190
|
-
if (_nodeDOM instanceof HTMLElement) {
|
|
191
|
-
return _nodeDOM.getAttribute('data-node-anchor') || undefined;
|
|
192
|
-
}
|
|
193
|
-
return undefined;
|
|
169
|
+
// Only generate a new ID if DOM doesn't have one
|
|
170
|
+
var generatedId = nodeIdProvider.getOrGenerateId(node, pos);
|
|
171
|
+
if (generatedId) {
|
|
172
|
+
return generatedId;
|
|
194
173
|
}
|
|
174
|
+
return undefined;
|
|
195
175
|
}
|
|
196
176
|
}
|
|
197
177
|
};
|
|
@@ -24,7 +24,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
|
|
|
24
24
|
* @jsx jsx
|
|
25
25
|
*/ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
|
|
26
26
|
var packageName = "@atlaskit/editor-common";
|
|
27
|
-
var packageVersion = "111.
|
|
27
|
+
var packageVersion = "111.19.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -135,15 +135,15 @@ function getMetaFromNode(node, options, normalizeTextParser) {
|
|
|
135
135
|
}
|
|
136
136
|
case 'inlineCard':
|
|
137
137
|
{
|
|
138
|
-
var
|
|
139
|
-
var maybeTitle = options.getInlineCardTextFromStore(
|
|
138
|
+
var attrs = firstChild.attrs;
|
|
139
|
+
var maybeTitle = options.getInlineCardTextFromStore(attrs);
|
|
140
140
|
if (maybeTitle) {
|
|
141
141
|
return {
|
|
142
142
|
type: ContentType.LINK,
|
|
143
143
|
value: maybeTitle
|
|
144
144
|
};
|
|
145
145
|
}
|
|
146
|
-
var url =
|
|
146
|
+
var url = attrs.url;
|
|
147
147
|
return {
|
|
148
148
|
type: ContentType.LINK,
|
|
149
149
|
value: url ? url : ''
|
|
@@ -50,7 +50,7 @@ export class SharedAnnotationManager {
|
|
|
50
50
|
return this;
|
|
51
51
|
}
|
|
52
52
|
emit(event) {
|
|
53
|
-
this.emitter.emit(event.name, event.data);
|
|
53
|
+
this.emitter.emit(event.name, 'data' in event ? event.data : undefined);
|
|
54
54
|
return this;
|
|
55
55
|
}
|
|
56
56
|
hook(method, handler) {
|
|
@@ -71,7 +71,7 @@ export class SharedAnnotationManager {
|
|
|
71
71
|
}
|
|
72
72
|
try {
|
|
73
73
|
return fn();
|
|
74
|
-
} catch
|
|
74
|
+
} catch {
|
|
75
75
|
return false;
|
|
76
76
|
}
|
|
77
77
|
}
|
|
@@ -85,7 +85,7 @@ export class SharedAnnotationManager {
|
|
|
85
85
|
}
|
|
86
86
|
try {
|
|
87
87
|
return fn();
|
|
88
|
-
} catch
|
|
88
|
+
} catch {
|
|
89
89
|
return {
|
|
90
90
|
success: false,
|
|
91
91
|
reason: 'hook-execution-error'
|
|
@@ -102,7 +102,7 @@ export class SharedAnnotationManager {
|
|
|
102
102
|
}
|
|
103
103
|
try {
|
|
104
104
|
return fn();
|
|
105
|
-
} catch
|
|
105
|
+
} catch {
|
|
106
106
|
return {
|
|
107
107
|
success: false,
|
|
108
108
|
reason: 'hook-execution-error'
|
|
@@ -119,7 +119,7 @@ export class SharedAnnotationManager {
|
|
|
119
119
|
}
|
|
120
120
|
try {
|
|
121
121
|
return fn(id);
|
|
122
|
-
} catch
|
|
122
|
+
} catch {
|
|
123
123
|
return {
|
|
124
124
|
success: false,
|
|
125
125
|
reason: 'hook-execution-error'
|
|
@@ -136,7 +136,7 @@ export class SharedAnnotationManager {
|
|
|
136
136
|
}
|
|
137
137
|
try {
|
|
138
138
|
return fn();
|
|
139
|
-
} catch
|
|
139
|
+
} catch {
|
|
140
140
|
return {
|
|
141
141
|
success: false,
|
|
142
142
|
reason: 'hook-execution-error'
|
|
@@ -156,7 +156,7 @@ export class SharedAnnotationManager {
|
|
|
156
156
|
// because the hook is responsible for the state of the selection. The manager is not responsible for the state of
|
|
157
157
|
// the selection.
|
|
158
158
|
return fn(id, isSelected);
|
|
159
|
-
} catch
|
|
159
|
+
} catch {
|
|
160
160
|
return {
|
|
161
161
|
success: false,
|
|
162
162
|
reason: 'hook-execution-error'
|
|
@@ -173,7 +173,7 @@ export class SharedAnnotationManager {
|
|
|
173
173
|
}
|
|
174
174
|
try {
|
|
175
175
|
return fn(id, isHovered);
|
|
176
|
-
} catch
|
|
176
|
+
} catch {
|
|
177
177
|
return {
|
|
178
178
|
success: false,
|
|
179
179
|
reason: 'hook-execution-error'
|
|
@@ -190,7 +190,7 @@ export class SharedAnnotationManager {
|
|
|
190
190
|
}
|
|
191
191
|
try {
|
|
192
192
|
return fn(id);
|
|
193
|
-
} catch
|
|
193
|
+
} catch {
|
|
194
194
|
return {
|
|
195
195
|
success: false,
|
|
196
196
|
reason: 'hook-execution-error'
|
|
@@ -95,11 +95,6 @@ export const syncBlockMessages = defineMessages({
|
|
|
95
95
|
defaultMessage: 'This content is synced. Edit it at the source.',
|
|
96
96
|
description: 'Tooltip that shows when you hover over a task in the destination synced block'
|
|
97
97
|
},
|
|
98
|
-
deleteConfirmationModalTitleSingle: {
|
|
99
|
-
id: 'fabric.editor.deleteConfirmationModalTitleSingle',
|
|
100
|
-
defaultMessage: 'Delete synced block?',
|
|
101
|
-
description: 'Title of delete confirmation modal that appears when user tries to delete source synced block that has no reference'
|
|
102
|
-
},
|
|
103
98
|
deletionConfirmationModalTitleSingle: {
|
|
104
99
|
id: 'fabric.editor.deletionConfirmationModalTitleSingle',
|
|
105
100
|
defaultMessage: 'Delete synced content?',
|
|
@@ -125,26 +120,11 @@ export const syncBlockMessages = defineMessages({
|
|
|
125
120
|
defaultMessage: 'Try again',
|
|
126
121
|
description: 'Text on button which retries deleting the sync block when the previous deletion failed'
|
|
127
122
|
},
|
|
128
|
-
deleteConfirmationModalDescriptionMultiple: {
|
|
129
|
-
id: 'fabric.editor.deleteConfirmationModalDescriptionMultiple',
|
|
130
|
-
defaultMessage: 'Deleting this content will also remove it from synced locations, where it will appear as an “Unsynced block”.',
|
|
131
|
-
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
132
|
-
},
|
|
133
|
-
deleteConfirmationModalDescription: {
|
|
134
|
-
id: 'fabric.editor.deleteConfirmationModalDescriptionSingle',
|
|
135
|
-
defaultMessage: 'Deleting this content will also remove {syncBlockCount, plural, one {a synced block. References to this block} other {# synced blocks. References to these blocks}} in other locations will show an error. Continue with deletion?',
|
|
136
|
-
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
137
|
-
},
|
|
138
123
|
deletionConfirmationModalDescription: {
|
|
139
124
|
id: 'fabric.editor.deletionConfirmationModalDescription',
|
|
140
125
|
defaultMessage: 'If you delete this synced block, it will become an “Unsynced block” in other locations. This action is permanent and cannot be undone.',
|
|
141
126
|
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
142
127
|
},
|
|
143
|
-
deleteConfirmationModalDescriptionNoRef: {
|
|
144
|
-
id: 'fabric.editor.deleteConfirmationModalDescriptionNoRef',
|
|
145
|
-
defaultMessage: "You'll no longer be able to reuse this synced block to keep content updated across locations. ",
|
|
146
|
-
description: 'Description of delete confirmation modal that appears when user tries to delete source synced block'
|
|
147
|
-
},
|
|
148
128
|
deletionConfirmationModalDescriptionNoRef: {
|
|
149
129
|
id: 'fabric.editor.deletionConfirmationModalDescriptionNoRef',
|
|
150
130
|
defaultMessage: 'Your content will no longer appear, and the synced block will be deleted. This action is permanent and cannot be undone.',
|
|
@@ -340,21 +320,11 @@ export const syncBlockMessages = defineMessages({
|
|
|
340
320
|
defaultMessage: 'Unsync this content?',
|
|
341
321
|
description: 'Title of unsync confirmation modal that appears when user tries to unsync source synced block'
|
|
342
322
|
},
|
|
343
|
-
unsyncConfirmationModalDescriptionSingle: {
|
|
344
|
-
id: 'fabric.editor.unsyncConfirmationModalDescriptionSingle',
|
|
345
|
-
defaultMessage: 'Your content will stay here. It will no longer be a synced block.',
|
|
346
|
-
description: 'Description of unsync confirmation modal that appears when user tries to unsync source synced block with no reference'
|
|
347
|
-
},
|
|
348
323
|
unsyncConfirmModalDescriptionSingle: {
|
|
349
324
|
id: 'fabric.editor.unsyncConfirmModalDescriptionSingle',
|
|
350
325
|
defaultMessage: 'Your content will stay here. It will no longer be a synced block. This action is permanent and cannot be undone.',
|
|
351
326
|
description: 'Description of unsync confirmation modal that appears when user tries to unsync source synced block with no reference'
|
|
352
327
|
},
|
|
353
|
-
unsyncConfirmationModalDescriptionMultiple: {
|
|
354
|
-
id: 'fabric.editor.unsyncConfirmationModalDescriptionMultiple',
|
|
355
|
-
defaultMessage: 'Your content will stay here. In {syncBlockCount, plural, one {1 other synced location} other {# other synced locations}} it will appear as an “Unsynced block”. ',
|
|
356
|
-
description: 'Description of unsync confirmation modal that appears when user tries to unsync source synced block with multiple references'
|
|
357
|
-
},
|
|
358
328
|
unsyncConfirmModalDescriptionMultiple: {
|
|
359
329
|
id: 'fabric.editor.unsyncConfirmModalDescriptionMultiple',
|
|
360
330
|
defaultMessage: 'Your content will stay here. In {syncBlockCount, plural, one {1 other synced location} other {# other synced locations}} it will appear as an “Unsynced block”. This action is permanent and cannot be undone.',
|
|
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
|
|
|
4
4
|
import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
|
|
5
5
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
6
6
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
7
|
-
const packageVersion = "111.
|
|
7
|
+
const packageVersion = "111.19.0";
|
|
8
8
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
9
9
|
// Remove URL as it has UGC
|
|
10
10
|
// Ignored via go/ees007
|
|
@@ -69,12 +69,6 @@ export class NodeAnchorProvider {
|
|
|
69
69
|
return this.cache.get(node);
|
|
70
70
|
}
|
|
71
71
|
setIdForNode(node, id) {
|
|
72
|
-
// [FEATURE FLAG: platform_editor_fix_node_anchor_dom_cache]
|
|
73
|
-
// This method is part of the fix to prevent drag handle misalignment.
|
|
74
|
-
// To clean up: remove the feature flag check, keep the method body
|
|
75
|
-
if (!fg('platform_editor_fix_node_anchor_dom_cache')) {
|
|
76
|
-
return;
|
|
77
|
-
}
|
|
78
72
|
if (this.limitedMode) {
|
|
79
73
|
return;
|
|
80
74
|
}
|
|
@@ -1,5 +1,4 @@
|
|
|
1
1
|
import { Node } from '@atlaskit/editor-prosemirror/model';
|
|
2
|
-
import { fg } from '@atlaskit/platform-feature-flags';
|
|
3
2
|
import { getNodeIdProvider } from '../../node-anchor/node-anchor-provider';
|
|
4
3
|
import { processRawFragmentValue, processRawValue, processRawValueWithoutValidation } from '../../utils/processRawValue';
|
|
5
4
|
import { editorCommandToPMCommand } from '../editor-commands';
|
|
@@ -155,45 +154,26 @@ export const corePlugin = ({
|
|
|
155
154
|
return undefined;
|
|
156
155
|
}
|
|
157
156
|
|
|
158
|
-
//
|
|
159
|
-
//
|
|
160
|
-
//
|
|
161
|
-
|
|
162
|
-
if (
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
if (domAnchor) {
|
|
170
|
-
// Cache the DOM anchor for this node to maintain consistency
|
|
171
|
-
// This ensures subsequent calls return the same anchor
|
|
172
|
-
nodeIdProvider.setIdForNode(node, domAnchor);
|
|
173
|
-
return domAnchor;
|
|
174
|
-
}
|
|
157
|
+
// Check DOM first to avoid generating a new ID with a collision suffix
|
|
158
|
+
// when the DOM already has a valid anchor. This prevents misalignment
|
|
159
|
+
// of drag handles on first focus after clicking from the title.
|
|
160
|
+
const nodeDOM = view.nodeDOM(pos);
|
|
161
|
+
if (nodeDOM instanceof HTMLElement) {
|
|
162
|
+
const domAnchor = nodeDOM.getAttribute('data-node-anchor');
|
|
163
|
+
if (domAnchor) {
|
|
164
|
+
// Cache the DOM anchor for this node to maintain consistency
|
|
165
|
+
// This ensures subsequent calls return the same anchor
|
|
166
|
+
nodeIdProvider.setIdForNode(node, domAnchor);
|
|
167
|
+
return domAnchor;
|
|
175
168
|
}
|
|
169
|
+
}
|
|
176
170
|
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
}
|
|
182
|
-
return undefined;
|
|
183
|
-
} else {
|
|
184
|
-
// OLD BEHAVIOR (to be removed when flag is cleaned up)
|
|
185
|
-
// This approach can generate incorrect IDs with collision suffixes when
|
|
186
|
-
// the DOM already has a valid anchor, causing drag handle misalignment
|
|
187
|
-
const generatedId = nodeIdProvider.getOrGenerateId(node, pos);
|
|
188
|
-
if (generatedId) {
|
|
189
|
-
return generatedId;
|
|
190
|
-
}
|
|
191
|
-
const nodeDOM = view.nodeDOM(pos);
|
|
192
|
-
if (nodeDOM instanceof HTMLElement) {
|
|
193
|
-
return nodeDOM.getAttribute('data-node-anchor') || undefined;
|
|
194
|
-
}
|
|
195
|
-
return undefined;
|
|
171
|
+
// Only generate a new ID if DOM doesn't have one
|
|
172
|
+
const generatedId = nodeIdProvider.getOrGenerateId(node, pos);
|
|
173
|
+
if (generatedId) {
|
|
174
|
+
return generatedId;
|
|
196
175
|
}
|
|
176
|
+
return undefined;
|
|
197
177
|
}
|
|
198
178
|
}
|
|
199
179
|
};
|
|
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
14
14
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
15
15
|
import Layer from '../Layer';
|
|
16
16
|
const packageName = "@atlaskit/editor-common";
|
|
17
|
-
const packageVersion = "111.
|
|
17
|
+
const packageVersion = "111.19.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -70,7 +70,7 @@ export var SharedAnnotationManager = /*#__PURE__*/function () {
|
|
|
70
70
|
}, {
|
|
71
71
|
key: "emit",
|
|
72
72
|
value: function emit(event) {
|
|
73
|
-
this.emitter.emit(event.name, event.data);
|
|
73
|
+
this.emitter.emit(event.name, 'data' in event ? event.data : undefined);
|
|
74
74
|
return this;
|
|
75
75
|
}
|
|
76
76
|
}, {
|
|
@@ -97,7 +97,7 @@ export var SharedAnnotationManager = /*#__PURE__*/function () {
|
|
|
97
97
|
}
|
|
98
98
|
try {
|
|
99
99
|
return fn();
|
|
100
|
-
} catch (
|
|
100
|
+
} catch (_unused) {
|
|
101
101
|
return false;
|
|
102
102
|
}
|
|
103
103
|
}
|
|
@@ -113,7 +113,7 @@ export var SharedAnnotationManager = /*#__PURE__*/function () {
|
|
|
113
113
|
}
|
|
114
114
|
try {
|
|
115
115
|
return fn();
|
|
116
|
-
} catch (
|
|
116
|
+
} catch (_unused2) {
|
|
117
117
|
return {
|
|
118
118
|
success: false,
|
|
119
119
|
reason: 'hook-execution-error'
|
|
@@ -132,7 +132,7 @@ export var SharedAnnotationManager = /*#__PURE__*/function () {
|
|
|
132
132
|
}
|
|
133
133
|
try {
|
|
134
134
|
return fn();
|
|
135
|
-
} catch (
|
|
135
|
+
} catch (_unused3) {
|
|
136
136
|
return {
|
|
137
137
|
success: false,
|
|
138
138
|
reason: 'hook-execution-error'
|
|
@@ -151,7 +151,7 @@ export var SharedAnnotationManager = /*#__PURE__*/function () {
|
|
|
151
151
|
}
|
|
152
152
|
try {
|
|
153
153
|
return fn(id);
|
|
154
|
-
} catch (
|
|
154
|
+
} catch (_unused4) {
|
|
155
155
|
return {
|
|
156
156
|
success: false,
|
|
157
157
|
reason: 'hook-execution-error'
|
|
@@ -170,7 +170,7 @@ export var SharedAnnotationManager = /*#__PURE__*/function () {
|
|
|
170
170
|
}
|
|
171
171
|
try {
|
|
172
172
|
return fn();
|
|
173
|
-
} catch (
|
|
173
|
+
} catch (_unused5) {
|
|
174
174
|
return {
|
|
175
175
|
success: false,
|
|
176
176
|
reason: 'hook-execution-error'
|
|
@@ -192,7 +192,7 @@ export var SharedAnnotationManager = /*#__PURE__*/function () {
|
|
|
192
192
|
// because the hook is responsible for the state of the selection. The manager is not responsible for the state of
|
|
193
193
|
// the selection.
|
|
194
194
|
return fn(id, isSelected);
|
|
195
|
-
} catch (
|
|
195
|
+
} catch (_unused6) {
|
|
196
196
|
return {
|
|
197
197
|
success: false,
|
|
198
198
|
reason: 'hook-execution-error'
|
|
@@ -211,7 +211,7 @@ export var SharedAnnotationManager = /*#__PURE__*/function () {
|
|
|
211
211
|
}
|
|
212
212
|
try {
|
|
213
213
|
return fn(id, isHovered);
|
|
214
|
-
} catch (
|
|
214
|
+
} catch (_unused7) {
|
|
215
215
|
return {
|
|
216
216
|
success: false,
|
|
217
217
|
reason: 'hook-execution-error'
|
|
@@ -230,7 +230,7 @@ export var SharedAnnotationManager = /*#__PURE__*/function () {
|
|
|
230
230
|
}
|
|
231
231
|
try {
|
|
232
232
|
return fn(id);
|
|
233
|
-
} catch (
|
|
233
|
+
} catch (_unused8) {
|
|
234
234
|
return {
|
|
235
235
|
success: false,
|
|
236
236
|
reason: 'hook-execution-error'
|