@atlaskit/editor-common 117.5.1 → 118.0.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +58 -0
- package/dist/cjs/ai-messages/ai-suggestions.js +35 -0
- package/dist/cjs/analytics/types/enums.js +1 -0
- package/dist/cjs/expand/index.js +40 -1
- package/dist/cjs/monitoring/error.js +1 -1
- package/dist/cjs/ui/DropList/index.js +1 -1
- package/dist/es2019/ai-messages/ai-suggestions.js +35 -0
- package/dist/es2019/analytics/types/enums.js +1 -0
- package/dist/es2019/expand/index.js +38 -0
- package/dist/es2019/monitoring/error.js +1 -1
- package/dist/es2019/ui/DropList/index.js +1 -1
- package/dist/esm/ai-messages/ai-suggestions.js +35 -0
- package/dist/esm/analytics/types/enums.js +1 -0
- package/dist/esm/expand/index.js +39 -0
- package/dist/esm/monitoring/error.js +1 -1
- package/dist/esm/ui/DropList/index.js +1 -1
- package/dist/types/ai-messages/ai-suggestions.d.ts +35 -0
- package/dist/types/analytics/types/enums.d.ts +1 -0
- package/dist/types/expand/index.d.ts +4 -0
- package/dist/types/types/feature-flags.d.ts +0 -10
- package/package.json +7 -7
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,63 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 118.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [`b31485c214f8d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b31485c214f8d) -
|
|
8
|
+
Clean up feature gate `platform_editor_disable_rerender_tracking_jira`.
|
|
9
|
+
|
|
10
|
+
The `lcmPreventRenderTracking` field has been removed from the public `FeatureFlags` type. Remove
|
|
11
|
+
the field from any feature flag configuration because render tracking is no longer conditional:
|
|
12
|
+
|
|
13
|
+
```tsx
|
|
14
|
+
// Before
|
|
15
|
+
const featureFlags: FeatureFlags = { lcmPreventRenderTracking: true };
|
|
16
|
+
|
|
17
|
+
// After
|
|
18
|
+
const featureFlags: FeatureFlags = {};
|
|
19
|
+
```
|
|
20
|
+
|
|
21
|
+
### Minor Changes
|
|
22
|
+
|
|
23
|
+
- [`1db4a5f3ed39f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/1db4a5f3ed39f) -
|
|
24
|
+
Add analytics for collapsible heading toggles
|
|
25
|
+
|
|
26
|
+
### Patch Changes
|
|
27
|
+
|
|
28
|
+
- Updated dependencies
|
|
29
|
+
|
|
30
|
+
## 117.6.0
|
|
31
|
+
|
|
32
|
+
### Minor Changes
|
|
33
|
+
|
|
34
|
+
- [`0376d79724390`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0376d79724390) -
|
|
35
|
+
EDITOR-8136: Add the agreed 11-message suggested-edits loading rotation, with expectation-setting
|
|
36
|
+
copy as the second message.
|
|
37
|
+
|
|
38
|
+
### Patch Changes
|
|
39
|
+
|
|
40
|
+
- [`d1b5e85073e48`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d1b5e85073e48) -
|
|
41
|
+
[ED-7926] Fix block controls hover jitter when viewing an AI Suggested Edits diff.
|
|
42
|
+
|
|
43
|
+
While a diff is on screen the block controls UI is hidden, but the hover handlers kept running:
|
|
44
|
+
`handleMouseOver` dispatched `showDragHandleAt` (flip-flopping the active node between
|
|
45
|
+
neighbouring blocks) and the right-side hover-side tracker kept dispatching
|
|
46
|
+
`setHoverSide`/`mouseEnter`, both causing visible jitter. Block controls now suppress both hover
|
|
47
|
+
paths (and hide the drag handle) while a diff is displayed, detected via the show-diff plugin's
|
|
48
|
+
`isDisplayingChanges` shared state (plus the `reviewing` user intent for AI suggestions with no
|
|
49
|
+
diff decorations), gated behind `platform_editor_diff_plugin_extended`.
|
|
50
|
+
|
|
51
|
+
To let block controls read that state without forming a circular project reference
|
|
52
|
+
(`block-controls -> show-diff -> expand -> block-controls`), the `toggleExpandRange` command and
|
|
53
|
+
`TOGGLE_EXPAND_RANGE_META_KEY` were moved from `@atlaskit/editor-plugin-expand` into
|
|
54
|
+
`@atlaskit/editor-common` (re-exported from expand for backwards compatibility).
|
|
55
|
+
`@atlaskit/editor-plugin-show-diff` no longer depends on `@atlaskit/editor-plugin-expand`, and
|
|
56
|
+
`@atlaskit/editor-plugin-block-controls` now takes an optional dependency on
|
|
57
|
+
`@atlaskit/editor-plugin-show-diff`.
|
|
58
|
+
|
|
59
|
+
- Updated dependencies
|
|
60
|
+
|
|
3
61
|
## 117.5.1
|
|
4
62
|
|
|
5
63
|
### Patch Changes
|
|
@@ -241,21 +241,56 @@ var aiSuggestionsMessages = exports.aiSuggestionsMessages = (0, _reactIntl.defin
|
|
|
241
241
|
defaultMessage: 'Reviewing content',
|
|
242
242
|
description: 'Loading message shown while the AI is reviewing the content'
|
|
243
243
|
},
|
|
244
|
+
thinkingMayTakeAFewMinutes: {
|
|
245
|
+
id: 'fabric.editor.ai.suggestions.thinking.mayTakeAFewMinutes.non-final',
|
|
246
|
+
defaultMessage: 'This may take a few minutes',
|
|
247
|
+
description: 'Loading message setting expectations that the AI review may take a few minutes'
|
|
248
|
+
},
|
|
249
|
+
thinkingAnalyzingStructure: {
|
|
250
|
+
id: 'fabric.editor.ai.suggestions.thinking.analyzingStructure.non-final',
|
|
251
|
+
defaultMessage: 'Analyzing structure',
|
|
252
|
+
description: 'Loading message shown while the AI is analyzing the content structure'
|
|
253
|
+
},
|
|
244
254
|
thinkingCheckingRelatedSources: {
|
|
245
255
|
id: 'fabric.editor.ai.suggestions.thinking.checkingRelatedSources.non-final',
|
|
246
256
|
defaultMessage: 'Checking related sources',
|
|
247
257
|
description: 'Loading message shown while the AI is checking related sources'
|
|
248
258
|
},
|
|
259
|
+
thinkingGatheringContext: {
|
|
260
|
+
id: 'fabric.editor.ai.suggestions.thinking.gatheringContext.non-final',
|
|
261
|
+
defaultMessage: 'Gathering context',
|
|
262
|
+
description: 'Loading message shown while the AI is gathering context'
|
|
263
|
+
},
|
|
249
264
|
thinkingIdentifyingImprovements: {
|
|
250
265
|
id: 'fabric.editor.ai.suggestions.thinking.identifyingImprovements.non-final',
|
|
251
266
|
defaultMessage: 'Identifying improvements',
|
|
252
267
|
description: 'Loading message shown while the AI is identifying improvements'
|
|
253
268
|
},
|
|
269
|
+
thinkingEvaluatingOptions: {
|
|
270
|
+
id: 'fabric.editor.ai.suggestions.thinking.evaluatingOptions.non-final',
|
|
271
|
+
defaultMessage: 'Evaluating options',
|
|
272
|
+
description: 'Loading message shown while the AI is evaluating possible suggestions'
|
|
273
|
+
},
|
|
274
|
+
thinkingCheckingConsistency: {
|
|
275
|
+
id: 'fabric.editor.ai.suggestions.thinking.checkingConsistency.non-final',
|
|
276
|
+
defaultMessage: 'Checking consistency',
|
|
277
|
+
description: 'Loading message shown while the AI is checking content consistency'
|
|
278
|
+
},
|
|
254
279
|
thinkingPreparingSuggestions: {
|
|
255
280
|
id: 'fabric.editor.ai.suggestions.thinking.preparingSuggestions.non-final',
|
|
256
281
|
defaultMessage: 'Preparing suggestions',
|
|
257
282
|
description: 'Loading message shown while the AI is preparing suggestions'
|
|
258
283
|
},
|
|
284
|
+
thinkingRefiningSuggestions: {
|
|
285
|
+
id: 'fabric.editor.ai.suggestions.thinking.refiningSuggestions.non-final',
|
|
286
|
+
defaultMessage: 'Refining suggestions',
|
|
287
|
+
description: 'Loading message shown while the AI is refining suggestions'
|
|
288
|
+
},
|
|
289
|
+
thinkingFinalizingSuggestionsForReview: {
|
|
290
|
+
id: 'fabric.editor.ai.suggestions.thinking.finalizingSuggestionsForReview.non-final',
|
|
291
|
+
defaultMessage: 'Finalizing suggestions for review',
|
|
292
|
+
description: 'Loading message shown while the AI is finalizing suggestions for review'
|
|
293
|
+
},
|
|
259
294
|
thinkingCompleteReviewComplete: {
|
|
260
295
|
id: 'fabric.editor.ai.suggestions.thinkingComplete.reviewComplete.non-final',
|
|
261
296
|
defaultMessage: 'Suggestions ready',
|
|
@@ -336,6 +336,7 @@ var ACTION_SUBJECT = exports.ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJ
|
|
|
336
336
|
ACTION_SUBJECT["FIND_REPLACE_DIALOG"] = "findReplaceDialog";
|
|
337
337
|
ACTION_SUBJECT["FLOATING_CONTEXTUAL_BUTTON"] = "floatingContextualButton";
|
|
338
338
|
ACTION_SUBJECT["FLOATING_TOOLBAR_PLUGIN"] = "floatingToolbarPlugin";
|
|
339
|
+
ACTION_SUBJECT["HEADING"] = "heading";
|
|
339
340
|
ACTION_SUBJECT["HELP"] = "help";
|
|
340
341
|
ACTION_SUBJECT["INVITE_ITEM"] = "inviteItem";
|
|
341
342
|
ACTION_SUBJECT["LAYOUT"] = "layout";
|
package/dist/cjs/expand/index.js
CHANGED
|
@@ -3,11 +3,50 @@
|
|
|
3
3
|
Object.defineProperty(exports, "__esModule", {
|
|
4
4
|
value: true
|
|
5
5
|
});
|
|
6
|
-
exports.isExpandCollapsed = exports.getNextNodeExpandPos = exports.expandedState = void 0;
|
|
6
|
+
exports.toggleExpandRange = exports.isExpandCollapsed = exports.getNextNodeExpandPos = exports.expandedState = exports.TOGGLE_EXPAND_RANGE_META_KEY = void 0;
|
|
7
7
|
var _utils = require("@atlaskit/editor-prosemirror/utils");
|
|
8
8
|
// Used to store the state of the new single player expand node
|
|
9
9
|
var expandedState = exports.expandedState = new WeakMap();
|
|
10
10
|
|
|
11
|
+
// EDITOR-7926: lives here (not editor-plugin-expand) so plugins can drive expand open/close without
|
|
12
|
+
// depending on the expand plugin, which would be a circular reference.
|
|
13
|
+
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
14
|
+
var TOGGLE_EXPAND_RANGE_META_KEY = exports.TOGGLE_EXPAND_RANGE_META_KEY = 'toggleExpandRange';
|
|
15
|
+
|
|
16
|
+
/** Opens/closes all expand/nestedExpand nodes in a range via the shared expand meta signal. */
|
|
17
|
+
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
18
|
+
var toggleExpandRange = exports.toggleExpandRange = function toggleExpandRange(from, to) {
|
|
19
|
+
var open = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
20
|
+
return function (_ref) {
|
|
21
|
+
var tr = _ref.tr;
|
|
22
|
+
var _tr$doc$type$schema$n = tr.doc.type.schema.nodes,
|
|
23
|
+
expand = _tr$doc$type$schema$n.expand,
|
|
24
|
+
nestedExpand = _tr$doc$type$schema$n.nestedExpand;
|
|
25
|
+
var fromClamped = from && from >= 0 ? from : 0;
|
|
26
|
+
var toClamped = to && to <= tr.doc.content.size ? to : tr.doc.content.size;
|
|
27
|
+
var positions = [];
|
|
28
|
+
tr.doc.nodesBetween(fromClamped, toClamped, function (node, pos) {
|
|
29
|
+
if ([expand, nestedExpand].includes(node.type)) {
|
|
30
|
+
expandedState.set(node, open);
|
|
31
|
+
positions.push(pos);
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
if (positions.length === 0) {
|
|
35
|
+
// No expand nodes found in the range — nothing to dispatch.
|
|
36
|
+
return null;
|
|
37
|
+
}
|
|
38
|
+
|
|
39
|
+
// Set meta so the expand PM plugin can add node decorations.
|
|
40
|
+
// This ensures ExpandNodeView.update() receives the decoration and visually
|
|
41
|
+
// opens or closes the expand.
|
|
42
|
+
tr.setMeta(TOGGLE_EXPAND_RANGE_META_KEY, {
|
|
43
|
+
positions: positions,
|
|
44
|
+
open: open
|
|
45
|
+
});
|
|
46
|
+
return tr;
|
|
47
|
+
};
|
|
48
|
+
};
|
|
49
|
+
|
|
11
50
|
// used to determine if the expand is expanded or collapsed
|
|
12
51
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
13
52
|
var isExpandCollapsed = exports.isExpandCollapsed = function isExpandCollapsed(node) {
|
|
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
28
28
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
29
29
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
30
30
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
31
|
-
var packageVersion = "117.
|
|
31
|
+
var packageVersion = "117.6.0";
|
|
32
32
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
33
33
|
// Remove URL as it has UGC
|
|
34
34
|
// Ignored via go/ees007
|
|
@@ -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 = "117.
|
|
27
|
+
var packageVersion = "117.6.0";
|
|
28
28
|
var halfFocusRing = 1;
|
|
29
29
|
var dropOffset = '0, 8';
|
|
30
30
|
var fadeIn = (0, _react2.keyframes)({
|
|
@@ -235,21 +235,56 @@ export const aiSuggestionsMessages = defineMessages({
|
|
|
235
235
|
defaultMessage: 'Reviewing content',
|
|
236
236
|
description: 'Loading message shown while the AI is reviewing the content'
|
|
237
237
|
},
|
|
238
|
+
thinkingMayTakeAFewMinutes: {
|
|
239
|
+
id: 'fabric.editor.ai.suggestions.thinking.mayTakeAFewMinutes.non-final',
|
|
240
|
+
defaultMessage: 'This may take a few minutes',
|
|
241
|
+
description: 'Loading message setting expectations that the AI review may take a few minutes'
|
|
242
|
+
},
|
|
243
|
+
thinkingAnalyzingStructure: {
|
|
244
|
+
id: 'fabric.editor.ai.suggestions.thinking.analyzingStructure.non-final',
|
|
245
|
+
defaultMessage: 'Analyzing structure',
|
|
246
|
+
description: 'Loading message shown while the AI is analyzing the content structure'
|
|
247
|
+
},
|
|
238
248
|
thinkingCheckingRelatedSources: {
|
|
239
249
|
id: 'fabric.editor.ai.suggestions.thinking.checkingRelatedSources.non-final',
|
|
240
250
|
defaultMessage: 'Checking related sources',
|
|
241
251
|
description: 'Loading message shown while the AI is checking related sources'
|
|
242
252
|
},
|
|
253
|
+
thinkingGatheringContext: {
|
|
254
|
+
id: 'fabric.editor.ai.suggestions.thinking.gatheringContext.non-final',
|
|
255
|
+
defaultMessage: 'Gathering context',
|
|
256
|
+
description: 'Loading message shown while the AI is gathering context'
|
|
257
|
+
},
|
|
243
258
|
thinkingIdentifyingImprovements: {
|
|
244
259
|
id: 'fabric.editor.ai.suggestions.thinking.identifyingImprovements.non-final',
|
|
245
260
|
defaultMessage: 'Identifying improvements',
|
|
246
261
|
description: 'Loading message shown while the AI is identifying improvements'
|
|
247
262
|
},
|
|
263
|
+
thinkingEvaluatingOptions: {
|
|
264
|
+
id: 'fabric.editor.ai.suggestions.thinking.evaluatingOptions.non-final',
|
|
265
|
+
defaultMessage: 'Evaluating options',
|
|
266
|
+
description: 'Loading message shown while the AI is evaluating possible suggestions'
|
|
267
|
+
},
|
|
268
|
+
thinkingCheckingConsistency: {
|
|
269
|
+
id: 'fabric.editor.ai.suggestions.thinking.checkingConsistency.non-final',
|
|
270
|
+
defaultMessage: 'Checking consistency',
|
|
271
|
+
description: 'Loading message shown while the AI is checking content consistency'
|
|
272
|
+
},
|
|
248
273
|
thinkingPreparingSuggestions: {
|
|
249
274
|
id: 'fabric.editor.ai.suggestions.thinking.preparingSuggestions.non-final',
|
|
250
275
|
defaultMessage: 'Preparing suggestions',
|
|
251
276
|
description: 'Loading message shown while the AI is preparing suggestions'
|
|
252
277
|
},
|
|
278
|
+
thinkingRefiningSuggestions: {
|
|
279
|
+
id: 'fabric.editor.ai.suggestions.thinking.refiningSuggestions.non-final',
|
|
280
|
+
defaultMessage: 'Refining suggestions',
|
|
281
|
+
description: 'Loading message shown while the AI is refining suggestions'
|
|
282
|
+
},
|
|
283
|
+
thinkingFinalizingSuggestionsForReview: {
|
|
284
|
+
id: 'fabric.editor.ai.suggestions.thinking.finalizingSuggestionsForReview.non-final',
|
|
285
|
+
defaultMessage: 'Finalizing suggestions for review',
|
|
286
|
+
description: 'Loading message shown while the AI is finalizing suggestions for review'
|
|
287
|
+
},
|
|
253
288
|
thinkingCompleteReviewComplete: {
|
|
254
289
|
id: 'fabric.editor.ai.suggestions.thinkingComplete.reviewComplete.non-final',
|
|
255
290
|
defaultMessage: 'Suggestions ready',
|
|
@@ -342,6 +342,7 @@ export let ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
342
342
|
ACTION_SUBJECT["FIND_REPLACE_DIALOG"] = "findReplaceDialog";
|
|
343
343
|
ACTION_SUBJECT["FLOATING_CONTEXTUAL_BUTTON"] = "floatingContextualButton";
|
|
344
344
|
ACTION_SUBJECT["FLOATING_TOOLBAR_PLUGIN"] = "floatingToolbarPlugin";
|
|
345
|
+
ACTION_SUBJECT["HEADING"] = "heading";
|
|
345
346
|
ACTION_SUBJECT["HELP"] = "help";
|
|
346
347
|
ACTION_SUBJECT["INVITE_ITEM"] = "inviteItem";
|
|
347
348
|
ACTION_SUBJECT["LAYOUT"] = "layout";
|
|
@@ -2,6 +2,44 @@ import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
|
2
2
|
// Used to store the state of the new single player expand node
|
|
3
3
|
export const expandedState = new WeakMap();
|
|
4
4
|
|
|
5
|
+
// EDITOR-7926: lives here (not editor-plugin-expand) so plugins can drive expand open/close without
|
|
6
|
+
// depending on the expand plugin, which would be a circular reference.
|
|
7
|
+
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
8
|
+
export const TOGGLE_EXPAND_RANGE_META_KEY = 'toggleExpandRange';
|
|
9
|
+
|
|
10
|
+
/** Opens/closes all expand/nestedExpand nodes in a range via the shared expand meta signal. */
|
|
11
|
+
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
12
|
+
export const toggleExpandRange = (from, to, open = true) => ({
|
|
13
|
+
tr
|
|
14
|
+
}) => {
|
|
15
|
+
const {
|
|
16
|
+
expand,
|
|
17
|
+
nestedExpand
|
|
18
|
+
} = tr.doc.type.schema.nodes;
|
|
19
|
+
const fromClamped = from && from >= 0 ? from : 0;
|
|
20
|
+
const toClamped = to && to <= tr.doc.content.size ? to : tr.doc.content.size;
|
|
21
|
+
const positions = [];
|
|
22
|
+
tr.doc.nodesBetween(fromClamped, toClamped, (node, pos) => {
|
|
23
|
+
if ([expand, nestedExpand].includes(node.type)) {
|
|
24
|
+
expandedState.set(node, open);
|
|
25
|
+
positions.push(pos);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
if (positions.length === 0) {
|
|
29
|
+
// No expand nodes found in the range — nothing to dispatch.
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Set meta so the expand PM plugin can add node decorations.
|
|
34
|
+
// This ensures ExpandNodeView.update() receives the decoration and visually
|
|
35
|
+
// opens or closes the expand.
|
|
36
|
+
tr.setMeta(TOGGLE_EXPAND_RANGE_META_KEY, {
|
|
37
|
+
positions,
|
|
38
|
+
open
|
|
39
|
+
});
|
|
40
|
+
return tr;
|
|
41
|
+
};
|
|
42
|
+
|
|
5
43
|
// used to determine if the expand is expanded or collapsed
|
|
6
44
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
7
45
|
export const isExpandCollapsed = node => {
|
|
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
14
14
|
const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
15
15
|
const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
16
16
|
const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
17
|
-
const packageVersion = "117.
|
|
17
|
+
const packageVersion = "117.6.0";
|
|
18
18
|
const sanitiseSentryEvents = (data, _hint) => {
|
|
19
19
|
// Remove URL as it has UGC
|
|
20
20
|
// Ignored via go/ees007
|
|
@@ -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 = "117.
|
|
17
|
+
const packageVersion = "117.6.0";
|
|
18
18
|
const halfFocusRing = 1;
|
|
19
19
|
const dropOffset = '0, 8';
|
|
20
20
|
const fadeIn = keyframes({
|
|
@@ -235,21 +235,56 @@ export var aiSuggestionsMessages = defineMessages({
|
|
|
235
235
|
defaultMessage: 'Reviewing content',
|
|
236
236
|
description: 'Loading message shown while the AI is reviewing the content'
|
|
237
237
|
},
|
|
238
|
+
thinkingMayTakeAFewMinutes: {
|
|
239
|
+
id: 'fabric.editor.ai.suggestions.thinking.mayTakeAFewMinutes.non-final',
|
|
240
|
+
defaultMessage: 'This may take a few minutes',
|
|
241
|
+
description: 'Loading message setting expectations that the AI review may take a few minutes'
|
|
242
|
+
},
|
|
243
|
+
thinkingAnalyzingStructure: {
|
|
244
|
+
id: 'fabric.editor.ai.suggestions.thinking.analyzingStructure.non-final',
|
|
245
|
+
defaultMessage: 'Analyzing structure',
|
|
246
|
+
description: 'Loading message shown while the AI is analyzing the content structure'
|
|
247
|
+
},
|
|
238
248
|
thinkingCheckingRelatedSources: {
|
|
239
249
|
id: 'fabric.editor.ai.suggestions.thinking.checkingRelatedSources.non-final',
|
|
240
250
|
defaultMessage: 'Checking related sources',
|
|
241
251
|
description: 'Loading message shown while the AI is checking related sources'
|
|
242
252
|
},
|
|
253
|
+
thinkingGatheringContext: {
|
|
254
|
+
id: 'fabric.editor.ai.suggestions.thinking.gatheringContext.non-final',
|
|
255
|
+
defaultMessage: 'Gathering context',
|
|
256
|
+
description: 'Loading message shown while the AI is gathering context'
|
|
257
|
+
},
|
|
243
258
|
thinkingIdentifyingImprovements: {
|
|
244
259
|
id: 'fabric.editor.ai.suggestions.thinking.identifyingImprovements.non-final',
|
|
245
260
|
defaultMessage: 'Identifying improvements',
|
|
246
261
|
description: 'Loading message shown while the AI is identifying improvements'
|
|
247
262
|
},
|
|
263
|
+
thinkingEvaluatingOptions: {
|
|
264
|
+
id: 'fabric.editor.ai.suggestions.thinking.evaluatingOptions.non-final',
|
|
265
|
+
defaultMessage: 'Evaluating options',
|
|
266
|
+
description: 'Loading message shown while the AI is evaluating possible suggestions'
|
|
267
|
+
},
|
|
268
|
+
thinkingCheckingConsistency: {
|
|
269
|
+
id: 'fabric.editor.ai.suggestions.thinking.checkingConsistency.non-final',
|
|
270
|
+
defaultMessage: 'Checking consistency',
|
|
271
|
+
description: 'Loading message shown while the AI is checking content consistency'
|
|
272
|
+
},
|
|
248
273
|
thinkingPreparingSuggestions: {
|
|
249
274
|
id: 'fabric.editor.ai.suggestions.thinking.preparingSuggestions.non-final',
|
|
250
275
|
defaultMessage: 'Preparing suggestions',
|
|
251
276
|
description: 'Loading message shown while the AI is preparing suggestions'
|
|
252
277
|
},
|
|
278
|
+
thinkingRefiningSuggestions: {
|
|
279
|
+
id: 'fabric.editor.ai.suggestions.thinking.refiningSuggestions.non-final',
|
|
280
|
+
defaultMessage: 'Refining suggestions',
|
|
281
|
+
description: 'Loading message shown while the AI is refining suggestions'
|
|
282
|
+
},
|
|
283
|
+
thinkingFinalizingSuggestionsForReview: {
|
|
284
|
+
id: 'fabric.editor.ai.suggestions.thinking.finalizingSuggestionsForReview.non-final',
|
|
285
|
+
defaultMessage: 'Finalizing suggestions for review',
|
|
286
|
+
description: 'Loading message shown while the AI is finalizing suggestions for review'
|
|
287
|
+
},
|
|
253
288
|
thinkingCompleteReviewComplete: {
|
|
254
289
|
id: 'fabric.editor.ai.suggestions.thinkingComplete.reviewComplete.non-final',
|
|
255
290
|
defaultMessage: 'Suggestions ready',
|
|
@@ -342,6 +342,7 @@ export var ACTION_SUBJECT = /*#__PURE__*/function (ACTION_SUBJECT) {
|
|
|
342
342
|
ACTION_SUBJECT["FIND_REPLACE_DIALOG"] = "findReplaceDialog";
|
|
343
343
|
ACTION_SUBJECT["FLOATING_CONTEXTUAL_BUTTON"] = "floatingContextualButton";
|
|
344
344
|
ACTION_SUBJECT["FLOATING_TOOLBAR_PLUGIN"] = "floatingToolbarPlugin";
|
|
345
|
+
ACTION_SUBJECT["HEADING"] = "heading";
|
|
345
346
|
ACTION_SUBJECT["HELP"] = "help";
|
|
346
347
|
ACTION_SUBJECT["INVITE_ITEM"] = "inviteItem";
|
|
347
348
|
ACTION_SUBJECT["LAYOUT"] = "layout";
|
package/dist/esm/expand/index.js
CHANGED
|
@@ -2,6 +2,45 @@ import { findParentNodeOfType } from '@atlaskit/editor-prosemirror/utils';
|
|
|
2
2
|
// Used to store the state of the new single player expand node
|
|
3
3
|
export var expandedState = new WeakMap();
|
|
4
4
|
|
|
5
|
+
// EDITOR-7926: lives here (not editor-plugin-expand) so plugins can drive expand open/close without
|
|
6
|
+
// depending on the expand plugin, which would be a circular reference.
|
|
7
|
+
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
8
|
+
export var TOGGLE_EXPAND_RANGE_META_KEY = 'toggleExpandRange';
|
|
9
|
+
|
|
10
|
+
/** Opens/closes all expand/nestedExpand nodes in a range via the shared expand meta signal. */
|
|
11
|
+
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
12
|
+
export var toggleExpandRange = function toggleExpandRange(from, to) {
|
|
13
|
+
var open = arguments.length > 2 && arguments[2] !== undefined ? arguments[2] : true;
|
|
14
|
+
return function (_ref) {
|
|
15
|
+
var tr = _ref.tr;
|
|
16
|
+
var _tr$doc$type$schema$n = tr.doc.type.schema.nodes,
|
|
17
|
+
expand = _tr$doc$type$schema$n.expand,
|
|
18
|
+
nestedExpand = _tr$doc$type$schema$n.nestedExpand;
|
|
19
|
+
var fromClamped = from && from >= 0 ? from : 0;
|
|
20
|
+
var toClamped = to && to <= tr.doc.content.size ? to : tr.doc.content.size;
|
|
21
|
+
var positions = [];
|
|
22
|
+
tr.doc.nodesBetween(fromClamped, toClamped, function (node, pos) {
|
|
23
|
+
if ([expand, nestedExpand].includes(node.type)) {
|
|
24
|
+
expandedState.set(node, open);
|
|
25
|
+
positions.push(pos);
|
|
26
|
+
}
|
|
27
|
+
});
|
|
28
|
+
if (positions.length === 0) {
|
|
29
|
+
// No expand nodes found in the range — nothing to dispatch.
|
|
30
|
+
return null;
|
|
31
|
+
}
|
|
32
|
+
|
|
33
|
+
// Set meta so the expand PM plugin can add node decorations.
|
|
34
|
+
// This ensures ExpandNodeView.update() receives the decoration and visually
|
|
35
|
+
// opens or closes the expand.
|
|
36
|
+
tr.setMeta(TOGGLE_EXPAND_RANGE_META_KEY, {
|
|
37
|
+
positions: positions,
|
|
38
|
+
open: open
|
|
39
|
+
});
|
|
40
|
+
return tr;
|
|
41
|
+
};
|
|
42
|
+
};
|
|
43
|
+
|
|
5
44
|
// used to determine if the expand is expanded or collapsed
|
|
6
45
|
// eslint-disable-next-line @atlaskit/volt-strict-mode/no-multiple-exports
|
|
7
46
|
export var isExpandCollapsed = function isExpandCollapsed(node) {
|
|
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
|
|
|
20
20
|
var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
|
|
21
21
|
var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
|
|
22
22
|
var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
|
|
23
|
-
var packageVersion = "117.
|
|
23
|
+
var packageVersion = "117.6.0";
|
|
24
24
|
var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
|
|
25
25
|
// Remove URL as it has UGC
|
|
26
26
|
// Ignored via go/ees007
|
|
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
|
|
|
21
21
|
import { fg } from '@atlaskit/platform-feature-flags';
|
|
22
22
|
import Layer from '../Layer';
|
|
23
23
|
var packageName = "@atlaskit/editor-common";
|
|
24
|
-
var packageVersion = "117.
|
|
24
|
+
var packageVersion = "117.6.0";
|
|
25
25
|
var halfFocusRing = 1;
|
|
26
26
|
var dropOffset = '0, 8';
|
|
27
27
|
var fadeIn = keyframes({
|
|
@@ -214,6 +214,16 @@ export declare const aiSuggestionsMessages: {
|
|
|
214
214
|
description: string;
|
|
215
215
|
id: string;
|
|
216
216
|
};
|
|
217
|
+
thinkingAnalyzingStructure: {
|
|
218
|
+
defaultMessage: string;
|
|
219
|
+
description: string;
|
|
220
|
+
id: string;
|
|
221
|
+
};
|
|
222
|
+
thinkingCheckingConsistency: {
|
|
223
|
+
defaultMessage: string;
|
|
224
|
+
description: string;
|
|
225
|
+
id: string;
|
|
226
|
+
};
|
|
217
227
|
thinkingCheckingRelatedSources: {
|
|
218
228
|
defaultMessage: string;
|
|
219
229
|
description: string;
|
|
@@ -244,16 +254,41 @@ export declare const aiSuggestionsMessages: {
|
|
|
244
254
|
description: string;
|
|
245
255
|
id: string;
|
|
246
256
|
};
|
|
257
|
+
thinkingEvaluatingOptions: {
|
|
258
|
+
defaultMessage: string;
|
|
259
|
+
description: string;
|
|
260
|
+
id: string;
|
|
261
|
+
};
|
|
262
|
+
thinkingFinalizingSuggestionsForReview: {
|
|
263
|
+
defaultMessage: string;
|
|
264
|
+
description: string;
|
|
265
|
+
id: string;
|
|
266
|
+
};
|
|
267
|
+
thinkingGatheringContext: {
|
|
268
|
+
defaultMessage: string;
|
|
269
|
+
description: string;
|
|
270
|
+
id: string;
|
|
271
|
+
};
|
|
247
272
|
thinkingIdentifyingImprovements: {
|
|
248
273
|
defaultMessage: string;
|
|
249
274
|
description: string;
|
|
250
275
|
id: string;
|
|
251
276
|
};
|
|
277
|
+
thinkingMayTakeAFewMinutes: {
|
|
278
|
+
defaultMessage: string;
|
|
279
|
+
description: string;
|
|
280
|
+
id: string;
|
|
281
|
+
};
|
|
252
282
|
thinkingPreparingSuggestions: {
|
|
253
283
|
defaultMessage: string;
|
|
254
284
|
description: string;
|
|
255
285
|
id: string;
|
|
256
286
|
};
|
|
287
|
+
thinkingRefiningSuggestions: {
|
|
288
|
+
defaultMessage: string;
|
|
289
|
+
description: string;
|
|
290
|
+
id: string;
|
|
291
|
+
};
|
|
257
292
|
thinkingReviewingContent: {
|
|
258
293
|
defaultMessage: string;
|
|
259
294
|
description: string;
|
|
@@ -319,6 +319,7 @@ export declare enum ACTION_SUBJECT {
|
|
|
319
319
|
FIND_REPLACE_DIALOG = "findReplaceDialog",
|
|
320
320
|
FLOATING_CONTEXTUAL_BUTTON = "floatingContextualButton",
|
|
321
321
|
FLOATING_TOOLBAR_PLUGIN = "floatingToolbarPlugin",
|
|
322
|
+
HEADING = "heading",
|
|
322
323
|
HELP = "help",
|
|
323
324
|
INVITE_ITEM = "inviteItem",
|
|
324
325
|
LAYOUT = "layout",
|
|
@@ -1,6 +1,10 @@
|
|
|
1
1
|
import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
|
|
2
2
|
import type { Selection } from '@atlaskit/editor-prosemirror/state';
|
|
3
3
|
import type { EditorView } from '@atlaskit/editor-prosemirror/view';
|
|
4
|
+
import type { EditorCommand } from '../types';
|
|
4
5
|
export declare const expandedState: WeakMap<PmNode, boolean>;
|
|
6
|
+
export declare const TOGGLE_EXPAND_RANGE_META_KEY = "toggleExpandRange";
|
|
7
|
+
/** Opens/closes all expand/nestedExpand nodes in a range via the shared expand meta signal. */
|
|
8
|
+
export declare const toggleExpandRange: (from?: number, to?: number, open?: boolean) => EditorCommand;
|
|
5
9
|
export declare const isExpandCollapsed: (node: PmNode) => boolean;
|
|
6
10
|
export declare const getNextNodeExpandPos: (editorView: EditorView, selection: Selection) => number | undefined;
|
|
@@ -125,16 +125,6 @@ export type FeatureFlags = {
|
|
|
125
125
|
* @default false
|
|
126
126
|
*/
|
|
127
127
|
extensionLocalIdGeneration?: boolean;
|
|
128
|
-
/**
|
|
129
|
-
* @description
|
|
130
|
-
* Used by the legacy content macro to disable render tracking due to excessive logs.
|
|
131
|
-
* Will be removed once re-rendering issue is resolved.
|
|
132
|
-
* Note: This is hardcoded into the LCM code, it does not exist in Switcheroo.
|
|
133
|
-
*
|
|
134
|
-
* @see https://product-fabric.atlassian.net/browse/ED-26650
|
|
135
|
-
* @default false
|
|
136
|
-
*/
|
|
137
|
-
lcmPreventRenderTracking?: boolean;
|
|
138
128
|
/**
|
|
139
129
|
* @description
|
|
140
130
|
* Use the linking platform link picker for link insertion and edit
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "118.0.0",
|
|
4
4
|
"description": "A package that contains common classes and components for editor and renderer",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -55,7 +55,7 @@
|
|
|
55
55
|
"@atlaskit/link": "^5.0.0",
|
|
56
56
|
"@atlaskit/link-datasource": "^6.4.0",
|
|
57
57
|
"@atlaskit/link-picker": "^6.4.0",
|
|
58
|
-
"@atlaskit/media-card": "^81.
|
|
58
|
+
"@atlaskit/media-card": "^81.6.0",
|
|
59
59
|
"@atlaskit/media-client": "^37.2.0",
|
|
60
60
|
"@atlaskit/media-client-react": "^6.1.0",
|
|
61
61
|
"@atlaskit/media-common": "^14.4.0",
|
|
@@ -63,22 +63,22 @@
|
|
|
63
63
|
"@atlaskit/media-picker": "^72.1.0",
|
|
64
64
|
"@atlaskit/media-ui": "^30.11.0",
|
|
65
65
|
"@atlaskit/media-viewer": "^54.5.0",
|
|
66
|
-
"@atlaskit/mention": "^27.
|
|
66
|
+
"@atlaskit/mention": "^27.13.0",
|
|
67
67
|
"@atlaskit/menu": "^10.0.0",
|
|
68
68
|
"@atlaskit/object": "^2.2.0",
|
|
69
69
|
"@atlaskit/onboarding": "^15.1.0",
|
|
70
70
|
"@atlaskit/platform-feature-experiments": "^0.3.0",
|
|
71
71
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
72
72
|
"@atlaskit/platform-feature-flags-react": "^1.1.0",
|
|
73
|
-
"@atlaskit/popper": "^9.
|
|
73
|
+
"@atlaskit/popper": "^9.1.0",
|
|
74
74
|
"@atlaskit/primitives": "^22.2.0",
|
|
75
|
-
"@atlaskit/profilecard": "^26.
|
|
75
|
+
"@atlaskit/profilecard": "^26.16.0",
|
|
76
76
|
"@atlaskit/prosemirror-history": "^1.1.0",
|
|
77
77
|
"@atlaskit/react-compiler-gating": "^0.2.0",
|
|
78
78
|
"@atlaskit/react-ufo": "^7.3.0",
|
|
79
79
|
"@atlaskit/section-message": "^10.0.0",
|
|
80
80
|
"@atlaskit/smart-card": "^45.17.0",
|
|
81
|
-
"@atlaskit/smart-user-picker": "^11.
|
|
81
|
+
"@atlaskit/smart-user-picker": "^11.5.0",
|
|
82
82
|
"@atlaskit/spinner": "^20.1.0",
|
|
83
83
|
"@atlaskit/task-decision": "^21.8.0",
|
|
84
84
|
"@atlaskit/teams-app-config": "^2.2.0",
|
|
@@ -124,7 +124,7 @@
|
|
|
124
124
|
},
|
|
125
125
|
"devDependencies": {
|
|
126
126
|
"@atlaskit/media-core": "^38.0.0",
|
|
127
|
-
"@atlassian/a11y-jest-testing": "^0.
|
|
127
|
+
"@atlassian/a11y-jest-testing": "^0.15.0",
|
|
128
128
|
"@atlassian/experiment-test-utils": "^0.2.0",
|
|
129
129
|
"@atlassian/feature-flags-test-utils": "^1.2.0",
|
|
130
130
|
"@atlassian/testing-library": "^0.11.0",
|