@atlaskit/editor-common 117.5.0 → 117.6.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 +38 -0
- package/dist/cjs/ai-messages/ai-suggestions.js +35 -0
- package/dist/cjs/expand/index.js +40 -1
- package/dist/cjs/extensions/extension-handlers.js +1 -3
- 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/expand/index.js +38 -0
- package/dist/es2019/extensions/extension-handlers.js +1 -3
- 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/expand/index.js +39 -0
- package/dist/esm/extensions/extension-handlers.js +1 -3
- 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/expand/index.d.ts +4 -0
- package/package.json +7 -10
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,43 @@
|
|
|
1
1
|
# @atlaskit/editor-common
|
|
2
2
|
|
|
3
|
+
## 117.6.0
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [`0376d79724390`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0376d79724390) -
|
|
8
|
+
EDITOR-8136: Add the agreed 11-message suggested-edits loading rotation, with expectation-setting
|
|
9
|
+
copy as the second message.
|
|
10
|
+
|
|
11
|
+
### Patch Changes
|
|
12
|
+
|
|
13
|
+
- [`d1b5e85073e48`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d1b5e85073e48) -
|
|
14
|
+
[ED-7926] Fix block controls hover jitter when viewing an AI Suggested Edits diff.
|
|
15
|
+
|
|
16
|
+
While a diff is on screen the block controls UI is hidden, but the hover handlers kept running:
|
|
17
|
+
`handleMouseOver` dispatched `showDragHandleAt` (flip-flopping the active node between
|
|
18
|
+
neighbouring blocks) and the right-side hover-side tracker kept dispatching
|
|
19
|
+
`setHoverSide`/`mouseEnter`, both causing visible jitter. Block controls now suppress both hover
|
|
20
|
+
paths (and hide the drag handle) while a diff is displayed, detected via the show-diff plugin's
|
|
21
|
+
`isDisplayingChanges` shared state (plus the `reviewing` user intent for AI suggestions with no
|
|
22
|
+
diff decorations), gated behind `platform_editor_diff_plugin_extended`.
|
|
23
|
+
|
|
24
|
+
To let block controls read that state without forming a circular project reference
|
|
25
|
+
(`block-controls -> show-diff -> expand -> block-controls`), the `toggleExpandRange` command and
|
|
26
|
+
`TOGGLE_EXPAND_RANGE_META_KEY` were moved from `@atlaskit/editor-plugin-expand` into
|
|
27
|
+
`@atlaskit/editor-common` (re-exported from expand for backwards compatibility).
|
|
28
|
+
`@atlaskit/editor-plugin-show-diff` no longer depends on `@atlaskit/editor-plugin-expand`, and
|
|
29
|
+
`@atlaskit/editor-plugin-block-controls` now takes an optional dependency on
|
|
30
|
+
`@atlaskit/editor-plugin-show-diff`.
|
|
31
|
+
|
|
32
|
+
- Updated dependencies
|
|
33
|
+
|
|
34
|
+
## 117.5.1
|
|
35
|
+
|
|
36
|
+
### Patch Changes
|
|
37
|
+
|
|
38
|
+
- [`08de2fab410d7`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/08de2fab410d7) -
|
|
39
|
+
Remove the obsolete extension renderer Promise handling fix.
|
|
40
|
+
|
|
3
41
|
## 117.5.0
|
|
4
42
|
|
|
5
43
|
### Minor 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',
|
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) {
|
|
@@ -155,9 +155,7 @@ function getNodeRenderer(extensionProvider, extensionType, extensionKey) {
|
|
|
155
155
|
var preloaded = maybePromise === null || maybePromise === void 0 || (_renderSync = (_ref = maybePromise).renderSync) === null || _renderSync === void 0 ? void 0 : _renderSync.call(_ref);
|
|
156
156
|
// Only product implemented preloading will return sync result
|
|
157
157
|
// However the out-of-box won't handle this. Confluence uses a custom implementation
|
|
158
|
-
return preloaded ?
|
|
159
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
160
|
-
Promise.resolve((0, _resolveImportSync.resolveImportSync)(preloaded)) :
|
|
158
|
+
return preloaded ?
|
|
161
159
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
162
160
|
(0, _resolveImportSync.resolveImportSync)(preloaded) : (0, _manifestHelpers.resolveImport)(maybePromise.render());
|
|
163
161
|
}
|
|
@@ -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.5.1";
|
|
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.5.1";
|
|
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',
|
|
@@ -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 => {
|
|
@@ -92,9 +92,7 @@ export function getNodeRenderer(extensionProvider, extensionType, extensionKey)
|
|
|
92
92
|
const preloaded = maybePromise === null || maybePromise === void 0 ? void 0 : (_renderSync = (_ref = maybePromise).renderSync) === null || _renderSync === void 0 ? void 0 : _renderSync.call(_ref);
|
|
93
93
|
// Only product implemented preloading will return sync result
|
|
94
94
|
// However the out-of-box won't handle this. Confluence uses a custom implementation
|
|
95
|
-
return preloaded ?
|
|
96
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
97
|
-
Promise.resolve(resolveImportSync(preloaded)) :
|
|
95
|
+
return preloaded ?
|
|
98
96
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
99
97
|
resolveImportSync(preloaded) : resolveImport(maybePromise.render());
|
|
100
98
|
}
|
|
@@ -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.5.1";
|
|
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.5.1";
|
|
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',
|
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) {
|
|
@@ -140,9 +140,7 @@ export function getNodeRenderer(extensionProvider, extensionType, extensionKey)
|
|
|
140
140
|
var preloaded = maybePromise === null || maybePromise === void 0 || (_renderSync = (_ref = maybePromise).renderSync) === null || _renderSync === void 0 ? void 0 : _renderSync.call(_ref);
|
|
141
141
|
// Only product implemented preloading will return sync result
|
|
142
142
|
// However the out-of-box won't handle this. Confluence uses a custom implementation
|
|
143
|
-
return preloaded ?
|
|
144
|
-
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
145
|
-
Promise.resolve(resolveImportSync(preloaded)) :
|
|
143
|
+
return preloaded ?
|
|
146
144
|
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
|
147
145
|
resolveImportSync(preloaded) : resolveImport(maybePromise.render());
|
|
148
146
|
}
|
|
@@ -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.5.1";
|
|
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.5.1";
|
|
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;
|
|
@@ -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;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/editor-common",
|
|
3
|
-
"version": "117.
|
|
3
|
+
"version": "117.6.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.4.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",
|
|
@@ -238,9 +238,6 @@
|
|
|
238
238
|
"tinymce_display_unknown_macro_body_content": {
|
|
239
239
|
"type": "boolean"
|
|
240
240
|
},
|
|
241
|
-
"platform_editor_extension_renderer_promise_fix": {
|
|
242
|
-
"type": "boolean"
|
|
243
|
-
},
|
|
244
241
|
"platform_editor_media_border_radius_fix": {
|
|
245
242
|
"type": "boolean"
|
|
246
243
|
},
|