@atlaskit/editor-common 122.9.1 → 122.11.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 CHANGED
@@ -1,5 +1,52 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 122.11.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`b51cc398d7701`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/b51cc398d7701) -
8
+ Add the opt-in @mention availability predicate used by the gated Home Search mode, so Search
9
+ preserves existing Chat mentions as inactive content while preventing new mention typeahead and
10
+ `/mention` slash-menu insertion. The `editor-disable-feature` feature gate enables that predicate
11
+ for Home Search.
12
+
13
+ ### Patch Changes
14
+
15
+ - [`8aaca3d7e468b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/8aaca3d7e468b) -
16
+ Behind the `platform_editor_ssr_reuse_requires_content` feature gate, `ExtensionNode` no longer
17
+ adopts an empty server-rendered element on the SSR DOM reuse path
18
+ (`platform_editor_hydration_skip_react_portal`). When the SSR render of an extension node view
19
+ failed and left the element empty, the node view now falls back to the normal React render instead
20
+ of staying blank until the next update (HOT-306707).
21
+ - Updated dependencies
22
+
23
+ ## 122.10.0
24
+
25
+ ### Minor Changes
26
+
27
+ - [`06eb2acdc3b14`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/06eb2acdc3b14) -
28
+ Publish the resolved reviewing agent into aiSuggestions shared state (new `setReviewingAgent`
29
+ action and `reviewingAgent` shared-state field) so products can name the agent in their own
30
+ suggestions loading states, and add a `skipProvisioning` option to the agent resolver so
31
+ identity-only lookups no longer provision an agent. Behind the `content_reviewer_agent` feature
32
+ gate.
33
+
34
+ The thinking bar's rotating statuses now match the sequence products show in their own suggestions
35
+ loading states, and its first status names the reviewing agent ("{agentName} is analyzing
36
+ content"). Adds the new `thinkingReviewingConsistency`, `thinkingCheckingWritingClarity`,
37
+ `thinkingGeneratingAiSuggestions`, `thinkingRefiningAiSuggestions` and
38
+ `thinkingPrioritizingAiSuggestions` messages to `aiSuggestionsMessages`; the statuses they replace
39
+ are still defined but no longer used.
40
+
41
+ ### Patch Changes
42
+
43
+ - [`470aa65623e0d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/470aa65623e0d) -
44
+ Use an opaque surface background for selected editor extension floating and synced-block labels
45
+ when `platform-dst-tokens-finesse` is enabled, preventing the selection outline from showing
46
+ through the labels. Synced blocks also use the semantic selected border colour. Flag-off styling
47
+ is unchanged.
48
+ - Updated dependencies
49
+
3
50
  ## 122.9.1
4
51
 
5
52
  ### Patch Changes
@@ -298,12 +298,12 @@ var aiSuggestionsMessages = exports.aiSuggestionsMessages = (0, _reactIntl.defin
298
298
  },
299
299
  thinkingReviewingContent: {
300
300
  id: 'fabric.editor.ai.suggestions.thinking.reviewingContent.non-final',
301
- defaultMessage: 'Reviewing content',
302
- description: 'Loading message shown while the AI is reviewing the content'
301
+ defaultMessage: 'Rovo is reviewing your page',
302
+ description: 'First loading message on the AI suggestions thinking bar, shown when the name of the reviewing agent is unknown'
303
303
  },
304
304
  thinkingReviewingContentWithAgent: {
305
305
  id: 'fabric.editor.ai.suggestions.thinking.reviewingContentWithAgent.non-final',
306
- defaultMessage: 'Reviewing content with {agentName}',
306
+ defaultMessage: '{agentName} is analyzing',
307
307
  description: 'First loading message on the AI suggestions thinking bar. The {agentName} placeholder is replaced with the reviewing agent name (for example "Content Reviewer"). Shown for a few seconds before the remaining rotating statuses.'
308
308
  },
309
309
  thinkingMayTakeAFewMinutes: {
@@ -311,6 +311,34 @@ var aiSuggestionsMessages = exports.aiSuggestionsMessages = (0, _reactIntl.defin
311
311
  defaultMessage: 'This may take a few minutes',
312
312
  description: 'Loading message setting expectations that the AI review may take a few minutes'
313
313
  },
314
+ thinkingReviewingConsistency: {
315
+ id: 'fabric.editor.ai.suggestions.thinking.reviewingConsistency.non-final',
316
+ defaultMessage: 'Reviewing consistency',
317
+ description: 'Loading message shown while the AI is reviewing content consistency'
318
+ },
319
+ thinkingCheckingWritingClarity: {
320
+ id: 'fabric.editor.ai.suggestions.thinking.checkingWritingClarity.non-final',
321
+ defaultMessage: 'Checking writing clarity',
322
+ description: 'Loading message shown while the AI is checking the clarity of the writing'
323
+ },
324
+ thinkingGeneratingAiSuggestions: {
325
+ id: 'fabric.editor.ai.suggestions.thinking.generatingAiSuggestions.non-final',
326
+ defaultMessage: 'Generating AI suggestions',
327
+ description: 'Loading message shown while the AI is generating suggestions'
328
+ },
329
+ thinkingRefiningAiSuggestions: {
330
+ id: 'fabric.editor.ai.suggestions.thinking.refiningAiSuggestions.non-final',
331
+ defaultMessage: 'Refining AI suggestions',
332
+ description: 'Loading message shown while the AI is refining the suggestions it generated'
333
+ },
334
+ thinkingPrioritizingAiSuggestions: {
335
+ id: 'fabric.editor.ai.suggestions.thinking.prioritizingAiSuggestions.non-final',
336
+ defaultMessage: 'Prioritizing AI suggestions',
337
+ description: 'Loading message shown while the AI is prioritizing the suggestions it generated'
338
+ },
339
+ // Superseded in the rotating list by the messages above, which match the product's
340
+ // suggestions panel. Kept defined so removing them from `aiSuggestionsMessages` isn't a
341
+ // breaking change to this shared map; safe to delete once nothing can reach for them.
314
342
  thinkingAnalyzingStructure: {
315
343
  id: 'fabric.editor.ai.suggestions.thinking.analyzingStructure.non-final',
316
344
  defaultMessage: 'Analyzing structure',
@@ -10,6 +10,7 @@
10
10
  ._3um0ewfl{visibility:visible}
11
11
  ._4cvr1h6o{align-items:center}
12
12
  ._bfhk15s3{background-color:var(--ds-background-selected,#e9f2fe)}
13
+ ._bfhk19i6{background-color:var(--ds-surface-hovered,#f0f1f2)}
13
14
  ._bfhkvuon{background-color:var(--ds-surface,#fff)}
14
15
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
15
16
  ._kqswstnw{position:absolute}
@@ -9,11 +9,13 @@ exports.ExtensionFloatingLabel = void 0;
9
9
  require("./ExtensionFloatingLabel.compiled.css");
10
10
  var React = _interopRequireWildcard(require("react"));
11
11
  var _runtime = require("@compiled/react/runtime");
12
+ var _fg = require("@atlaskit/platform-feature-flags/fg");
12
13
  var _compiled = require("@atlaskit/primitives/compiled");
13
14
  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); }
14
15
  var floatingLabelStyles = {
15
16
  base: "_2rkofajl _zulp1b66 _4cvr1h6o _bfhkvuon _16qsglyw _1e0c1txw _1bah1h6o _p12f11ux _tzy4kb7n _19bvu2gc _u5f3u2gc _kqswstnw _1xi2utpp _154i14id _3um0ewfl _1pbycs5v",
16
- selected: "_bfhk15s3 _n3td1b66 _ca0q1b66 _154id439"
17
+ selected: "_bfhk19i6 _n3td1b66 _ca0q1b66 _154id439",
18
+ selectedOld: "_bfhk15s3 _n3td1b66 _ca0q1b66 _154id439"
17
19
  };
18
20
  var ExtensionFloatingLabel = exports.ExtensionFloatingLabel = function ExtensionFloatingLabel(_ref) {
19
21
  var isSelected = _ref.isSelected,
@@ -22,7 +24,7 @@ var ExtensionFloatingLabel = exports.ExtensionFloatingLabel = function Extension
22
24
  return /*#__PURE__*/React.createElement("div", {
23
25
  contentEditable: false,
24
26
  "data-testid": testId,
25
- className: (0, _runtime.ax)([floatingLabelStyles.base, isSelected && floatingLabelStyles.selected])
27
+ className: (0, _runtime.ax)([floatingLabelStyles.base, isSelected && (0, _fg.fg)('platform-dst-tokens-finesse') && floatingLabelStyles.selected, isSelected && !(0, _fg.fg)('platform-dst-tokens-finesse') && floatingLabelStyles.selectedOld])
26
28
  }, /*#__PURE__*/React.createElement(_compiled.Text, {
27
29
  maxLines: 1,
28
30
  size: "small",
@@ -185,6 +185,17 @@ var ExtensionNode = exports.ExtensionNode = /*#__PURE__*/function (_ReactNodeVie
185
185
  var selector = "[extensionkey=\"".concat(extensionKey, "\"][localid=\"").concat(localId, "\"]");
186
186
  var element = editorDom.querySelector(selector);
187
187
  if (element && element instanceof HTMLElement) {
188
+ // A server-rendered element is only worth adopting if React actually rendered into it.
189
+ // The SSR pass renders each node view through an isolated `renderToStaticMarkup`; when
190
+ // that render throws, the portal provider swallows the error and leaves the container
191
+ // empty. Adopting an empty element and skipping the React portal leaves the extension
192
+ // invisible until the next `update()`, which for an untouched node only happens on user
193
+ // interaction (HOT-306707). Treat an empty element as "no SSR DOM" so the node view takes
194
+ // the normal React render path instead.
195
+ if ((0, _fg.fg)('platform_editor_ssr_reuse_requires_content') && !element.querySelector('[data-testid="extension-node-wrapper"]')) {
196
+ this.cachedSsrElement = null;
197
+ return null;
198
+ }
188
199
  this.cachedSsrElement = element;
189
200
  return element;
190
201
  }
@@ -27,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
27
27
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
28
28
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
29
29
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
30
- var packageVersion = "122.9.0";
30
+ var packageVersion = "122.10.0";
31
31
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
32
32
  // Remove URL as it has UGC
33
33
  // 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 = "122.9.0";
27
+ var packageVersion = "122.10.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -292,12 +292,12 @@ export const aiSuggestionsMessages = defineMessages({
292
292
  },
293
293
  thinkingReviewingContent: {
294
294
  id: 'fabric.editor.ai.suggestions.thinking.reviewingContent.non-final',
295
- defaultMessage: 'Reviewing content',
296
- description: 'Loading message shown while the AI is reviewing the content'
295
+ defaultMessage: 'Rovo is reviewing your page',
296
+ description: 'First loading message on the AI suggestions thinking bar, shown when the name of the reviewing agent is unknown'
297
297
  },
298
298
  thinkingReviewingContentWithAgent: {
299
299
  id: 'fabric.editor.ai.suggestions.thinking.reviewingContentWithAgent.non-final',
300
- defaultMessage: 'Reviewing content with {agentName}',
300
+ defaultMessage: '{agentName} is analyzing',
301
301
  description: 'First loading message on the AI suggestions thinking bar. The {agentName} placeholder is replaced with the reviewing agent name (for example "Content Reviewer"). Shown for a few seconds before the remaining rotating statuses.'
302
302
  },
303
303
  thinkingMayTakeAFewMinutes: {
@@ -305,6 +305,34 @@ export const aiSuggestionsMessages = defineMessages({
305
305
  defaultMessage: 'This may take a few minutes',
306
306
  description: 'Loading message setting expectations that the AI review may take a few minutes'
307
307
  },
308
+ thinkingReviewingConsistency: {
309
+ id: 'fabric.editor.ai.suggestions.thinking.reviewingConsistency.non-final',
310
+ defaultMessage: 'Reviewing consistency',
311
+ description: 'Loading message shown while the AI is reviewing content consistency'
312
+ },
313
+ thinkingCheckingWritingClarity: {
314
+ id: 'fabric.editor.ai.suggestions.thinking.checkingWritingClarity.non-final',
315
+ defaultMessage: 'Checking writing clarity',
316
+ description: 'Loading message shown while the AI is checking the clarity of the writing'
317
+ },
318
+ thinkingGeneratingAiSuggestions: {
319
+ id: 'fabric.editor.ai.suggestions.thinking.generatingAiSuggestions.non-final',
320
+ defaultMessage: 'Generating AI suggestions',
321
+ description: 'Loading message shown while the AI is generating suggestions'
322
+ },
323
+ thinkingRefiningAiSuggestions: {
324
+ id: 'fabric.editor.ai.suggestions.thinking.refiningAiSuggestions.non-final',
325
+ defaultMessage: 'Refining AI suggestions',
326
+ description: 'Loading message shown while the AI is refining the suggestions it generated'
327
+ },
328
+ thinkingPrioritizingAiSuggestions: {
329
+ id: 'fabric.editor.ai.suggestions.thinking.prioritizingAiSuggestions.non-final',
330
+ defaultMessage: 'Prioritizing AI suggestions',
331
+ description: 'Loading message shown while the AI is prioritizing the suggestions it generated'
332
+ },
333
+ // Superseded in the rotating list by the messages above, which match the product's
334
+ // suggestions panel. Kept defined so removing them from `aiSuggestionsMessages` isn't a
335
+ // breaking change to this shared map; safe to delete once nothing can reach for them.
308
336
  thinkingAnalyzingStructure: {
309
337
  id: 'fabric.editor.ai.suggestions.thinking.analyzingStructure.non-final',
310
338
  defaultMessage: 'Analyzing structure',
@@ -10,6 +10,7 @@
10
10
  ._3um0ewfl{visibility:visible}
11
11
  ._4cvr1h6o{align-items:center}
12
12
  ._bfhk15s3{background-color:var(--ds-background-selected,#e9f2fe)}
13
+ ._bfhk19i6{background-color:var(--ds-surface-hovered,#f0f1f2)}
13
14
  ._bfhkvuon{background-color:var(--ds-surface,#fff)}
14
15
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
15
16
  ._kqswstnw{position:absolute}
@@ -2,10 +2,12 @@
2
2
  import "./ExtensionFloatingLabel.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
5
6
  import { Text } from '@atlaskit/primitives/compiled';
6
7
  const floatingLabelStyles = {
7
8
  base: "_2rkofajl _zulp1b66 _4cvr1h6o _bfhkvuon _16qsglyw _1e0c1txw _1bah1h6o _p12f11ux _tzy4kb7n _19bvu2gc _u5f3u2gc _kqswstnw _1xi2utpp _154i14id _3um0ewfl _1pbycs5v",
8
- selected: "_bfhk15s3 _n3td1b66 _ca0q1b66 _154id439"
9
+ selected: "_bfhk19i6 _n3td1b66 _ca0q1b66 _154id439",
10
+ selectedOld: "_bfhk15s3 _n3td1b66 _ca0q1b66 _154id439"
9
11
  };
10
12
  export const ExtensionFloatingLabel = ({
11
13
  isSelected,
@@ -14,7 +16,7 @@ export const ExtensionFloatingLabel = ({
14
16
  }) => /*#__PURE__*/React.createElement("div", {
15
17
  contentEditable: false,
16
18
  "data-testid": testId,
17
- className: ax([floatingLabelStyles.base, isSelected && floatingLabelStyles.selected])
19
+ className: ax([floatingLabelStyles.base, isSelected && fg('platform-dst-tokens-finesse') && floatingLabelStyles.selected, isSelected && !fg('platform-dst-tokens-finesse') && floatingLabelStyles.selectedOld])
18
20
  }, /*#__PURE__*/React.createElement(Text, {
19
21
  maxLines: 1,
20
22
  size: "small",
@@ -152,6 +152,17 @@ export class ExtensionNode extends ReactNodeView {
152
152
  const selector = `[extensionkey="${extensionKey}"][localid="${localId}"]`;
153
153
  const element = editorDom.querySelector(selector);
154
154
  if (element && element instanceof HTMLElement) {
155
+ // A server-rendered element is only worth adopting if React actually rendered into it.
156
+ // The SSR pass renders each node view through an isolated `renderToStaticMarkup`; when
157
+ // that render throws, the portal provider swallows the error and leaves the container
158
+ // empty. Adopting an empty element and skipping the React portal leaves the extension
159
+ // invisible until the next `update()`, which for an untouched node only happens on user
160
+ // interaction (HOT-306707). Treat an empty element as "no SSR DOM" so the node view takes
161
+ // the normal React render path instead.
162
+ if (fg('platform_editor_ssr_reuse_requires_content') && !element.querySelector('[data-testid="extension-node-wrapper"]')) {
163
+ this.cachedSsrElement = null;
164
+ return null;
165
+ }
155
166
  this.cachedSsrElement = element;
156
167
  return element;
157
168
  }
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
13
13
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
14
14
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
15
15
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
16
- const packageVersion = "122.9.0";
16
+ const packageVersion = "122.10.0";
17
17
  const sanitiseSentryEvents = (data, _hint) => {
18
18
  // Remove URL as it has UGC
19
19
  // Ignored via go/ees007
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags/fg';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "122.9.0";
17
+ const packageVersion = "122.10.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -292,12 +292,12 @@ export var aiSuggestionsMessages = defineMessages({
292
292
  },
293
293
  thinkingReviewingContent: {
294
294
  id: 'fabric.editor.ai.suggestions.thinking.reviewingContent.non-final',
295
- defaultMessage: 'Reviewing content',
296
- description: 'Loading message shown while the AI is reviewing the content'
295
+ defaultMessage: 'Rovo is reviewing your page',
296
+ description: 'First loading message on the AI suggestions thinking bar, shown when the name of the reviewing agent is unknown'
297
297
  },
298
298
  thinkingReviewingContentWithAgent: {
299
299
  id: 'fabric.editor.ai.suggestions.thinking.reviewingContentWithAgent.non-final',
300
- defaultMessage: 'Reviewing content with {agentName}',
300
+ defaultMessage: '{agentName} is analyzing',
301
301
  description: 'First loading message on the AI suggestions thinking bar. The {agentName} placeholder is replaced with the reviewing agent name (for example "Content Reviewer"). Shown for a few seconds before the remaining rotating statuses.'
302
302
  },
303
303
  thinkingMayTakeAFewMinutes: {
@@ -305,6 +305,34 @@ export var aiSuggestionsMessages = defineMessages({
305
305
  defaultMessage: 'This may take a few minutes',
306
306
  description: 'Loading message setting expectations that the AI review may take a few minutes'
307
307
  },
308
+ thinkingReviewingConsistency: {
309
+ id: 'fabric.editor.ai.suggestions.thinking.reviewingConsistency.non-final',
310
+ defaultMessage: 'Reviewing consistency',
311
+ description: 'Loading message shown while the AI is reviewing content consistency'
312
+ },
313
+ thinkingCheckingWritingClarity: {
314
+ id: 'fabric.editor.ai.suggestions.thinking.checkingWritingClarity.non-final',
315
+ defaultMessage: 'Checking writing clarity',
316
+ description: 'Loading message shown while the AI is checking the clarity of the writing'
317
+ },
318
+ thinkingGeneratingAiSuggestions: {
319
+ id: 'fabric.editor.ai.suggestions.thinking.generatingAiSuggestions.non-final',
320
+ defaultMessage: 'Generating AI suggestions',
321
+ description: 'Loading message shown while the AI is generating suggestions'
322
+ },
323
+ thinkingRefiningAiSuggestions: {
324
+ id: 'fabric.editor.ai.suggestions.thinking.refiningAiSuggestions.non-final',
325
+ defaultMessage: 'Refining AI suggestions',
326
+ description: 'Loading message shown while the AI is refining the suggestions it generated'
327
+ },
328
+ thinkingPrioritizingAiSuggestions: {
329
+ id: 'fabric.editor.ai.suggestions.thinking.prioritizingAiSuggestions.non-final',
330
+ defaultMessage: 'Prioritizing AI suggestions',
331
+ description: 'Loading message shown while the AI is prioritizing the suggestions it generated'
332
+ },
333
+ // Superseded in the rotating list by the messages above, which match the product's
334
+ // suggestions panel. Kept defined so removing them from `aiSuggestionsMessages` isn't a
335
+ // breaking change to this shared map; safe to delete once nothing can reach for them.
308
336
  thinkingAnalyzingStructure: {
309
337
  id: 'fabric.editor.ai.suggestions.thinking.analyzingStructure.non-final',
310
338
  defaultMessage: 'Analyzing structure',
@@ -10,6 +10,7 @@
10
10
  ._3um0ewfl{visibility:visible}
11
11
  ._4cvr1h6o{align-items:center}
12
12
  ._bfhk15s3{background-color:var(--ds-background-selected,#e9f2fe)}
13
+ ._bfhk19i6{background-color:var(--ds-surface-hovered,#f0f1f2)}
13
14
  ._bfhkvuon{background-color:var(--ds-surface,#fff)}
14
15
  ._ca0q1b66{padding-top:var(--ds-space-050,4px)}
15
16
  ._kqswstnw{position:absolute}
@@ -2,10 +2,12 @@
2
2
  import "./ExtensionFloatingLabel.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
5
6
  import { Text } from '@atlaskit/primitives/compiled';
6
7
  var floatingLabelStyles = {
7
8
  base: "_2rkofajl _zulp1b66 _4cvr1h6o _bfhkvuon _16qsglyw _1e0c1txw _1bah1h6o _p12f11ux _tzy4kb7n _19bvu2gc _u5f3u2gc _kqswstnw _1xi2utpp _154i14id _3um0ewfl _1pbycs5v",
8
- selected: "_bfhk15s3 _n3td1b66 _ca0q1b66 _154id439"
9
+ selected: "_bfhk19i6 _n3td1b66 _ca0q1b66 _154id439",
10
+ selectedOld: "_bfhk15s3 _n3td1b66 _ca0q1b66 _154id439"
9
11
  };
10
12
  export var ExtensionFloatingLabel = function ExtensionFloatingLabel(_ref) {
11
13
  var isSelected = _ref.isSelected,
@@ -14,7 +16,7 @@ export var ExtensionFloatingLabel = function ExtensionFloatingLabel(_ref) {
14
16
  return /*#__PURE__*/React.createElement("div", {
15
17
  contentEditable: false,
16
18
  "data-testid": testId,
17
- className: ax([floatingLabelStyles.base, isSelected && floatingLabelStyles.selected])
19
+ className: ax([floatingLabelStyles.base, isSelected && fg('platform-dst-tokens-finesse') && floatingLabelStyles.selected, isSelected && !fg('platform-dst-tokens-finesse') && floatingLabelStyles.selectedOld])
18
20
  }, /*#__PURE__*/React.createElement(Text, {
19
21
  maxLines: 1,
20
22
  size: "small",
@@ -177,6 +177,17 @@ export var ExtensionNode = /*#__PURE__*/function (_ReactNodeView) {
177
177
  var selector = "[extensionkey=\"".concat(extensionKey, "\"][localid=\"").concat(localId, "\"]");
178
178
  var element = editorDom.querySelector(selector);
179
179
  if (element && element instanceof HTMLElement) {
180
+ // A server-rendered element is only worth adopting if React actually rendered into it.
181
+ // The SSR pass renders each node view through an isolated `renderToStaticMarkup`; when
182
+ // that render throws, the portal provider swallows the error and leaves the container
183
+ // empty. Adopting an empty element and skipping the React portal leaves the extension
184
+ // invisible until the next `update()`, which for an untouched node only happens on user
185
+ // interaction (HOT-306707). Treat an empty element as "no SSR DOM" so the node view takes
186
+ // the normal React render path instead.
187
+ if (fg('platform_editor_ssr_reuse_requires_content') && !element.querySelector('[data-testid="extension-node-wrapper"]')) {
188
+ this.cachedSsrElement = null;
189
+ return null;
190
+ }
180
191
  this.cachedSsrElement = element;
181
192
  return element;
182
193
  }
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
19
19
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
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 = "122.9.0";
22
+ var packageVersion = "122.10.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags/fg';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "122.9.0";
24
+ var packageVersion = "122.10.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -293,6 +293,11 @@ export declare const aiSuggestionsMessages: {
293
293
  description: string;
294
294
  id: string;
295
295
  };
296
+ thinkingCheckingWritingClarity: {
297
+ defaultMessage: string;
298
+ description: string;
299
+ id: string;
300
+ };
296
301
  thinkingCompleteClose: {
297
302
  defaultMessage: string;
298
303
  description: string;
@@ -368,6 +373,11 @@ export declare const aiSuggestionsMessages: {
368
373
  description: string;
369
374
  id: string;
370
375
  };
376
+ thinkingGeneratingAiSuggestions: {
377
+ defaultMessage: string;
378
+ description: string;
379
+ id: string;
380
+ };
371
381
  thinkingIdentifyingImprovements: {
372
382
  defaultMessage: string;
373
383
  description: string;
@@ -383,11 +393,26 @@ export declare const aiSuggestionsMessages: {
383
393
  description: string;
384
394
  id: string;
385
395
  };
396
+ thinkingPrioritizingAiSuggestions: {
397
+ defaultMessage: string;
398
+ description: string;
399
+ id: string;
400
+ };
401
+ thinkingRefiningAiSuggestions: {
402
+ defaultMessage: string;
403
+ description: string;
404
+ id: string;
405
+ };
386
406
  thinkingRefiningSuggestions: {
387
407
  defaultMessage: string;
388
408
  description: string;
389
409
  id: string;
390
410
  };
411
+ thinkingReviewingConsistency: {
412
+ defaultMessage: string;
413
+ description: string;
414
+ id: string;
415
+ };
391
416
  thinkingReviewingContent: {
392
417
  defaultMessage: string;
393
418
  description: string;
@@ -30,6 +30,8 @@ export type QuickInsertItem = TypeAheadItem & {
30
30
  featured?: boolean;
31
31
  /** optional identifier */
32
32
  id?: QuickInsertItemId;
33
+ /** Returns true when the item should not be shown in Quick Insert results. */
34
+ isHidden?: () => boolean;
33
35
  /** other names used to find the item */
34
36
  keywords?: Array<string>;
35
37
  };
@@ -109,6 +109,11 @@ export type MoreOptionsButtonConfig = {
109
109
  title: string;
110
110
  };
111
111
  export type TypeAheadHandler = {
112
+ /**
113
+ * Optional predicate evaluated before the typeahead opens. When false, the
114
+ * trigger remains as ordinary editor text.
115
+ */
116
+ canOpen?: () => boolean;
112
117
  /** Custom regex must have a capture group around trigger so it's possible to
113
118
  * use it without needing to scan through all triggers again */
114
119
  customRegex?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "122.9.1",
3
+ "version": "122.11.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/"
@@ -29,7 +29,7 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@atlaskit/activity-provider": "^3.1.0",
32
- "@atlaskit/adf-schema": "^57.4.0",
32
+ "@atlaskit/adf-schema": "^57.5.0",
33
33
  "@atlaskit/adf-utils": "^20.9.0",
34
34
  "@atlaskit/afm-i18n-platform-editor-editor-common": "2.249.0",
35
35
  "@atlaskit/analytics-listeners": "^11.3.0",
@@ -84,7 +84,7 @@
84
84
  "@atlaskit/task-decision": "^21.10.0",
85
85
  "@atlaskit/teams-app-config": "^3.1.0",
86
86
  "@atlaskit/textfield": "^10.2.0",
87
- "@atlaskit/tmp-editor-statsig": "^197.0.0",
87
+ "@atlaskit/tmp-editor-statsig": "^198.0.0",
88
88
  "@atlaskit/tokens": "^17.0.0",
89
89
  "@atlaskit/tooltip": "^24.3.0",
90
90
  "@atlaskit/width-detector": "^7.2.0",
@@ -177,6 +177,10 @@
177
177
  "type": "boolean",
178
178
  "referenceOnly": true
179
179
  },
180
+ "platform-dst-tokens-finesse": {
181
+ "type": "boolean",
182
+ "referenceOnly": true
183
+ },
180
184
  "platform_editor_lovability_text_bg_color_patch_2": {
181
185
  "type": "boolean"
182
186
  },
@@ -201,6 +205,9 @@
201
205
  "confluence_connect_macro_preset_height": {
202
206
  "type": "boolean"
203
207
  },
208
+ "platform_editor_ssr_reuse_requires_content": {
209
+ "type": "boolean"
210
+ },
204
211
  "cc_comments_log_draft_annotation_ancestor_nodes": {
205
212
  "type": "boolean"
206
213
  },