@atlaskit/editor-common 112.13.0 → 112.13.2

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/ai-messages/ai-autocomplete.js +30 -0
  3. package/dist/cjs/ai-messages/index.js +8 -1
  4. package/dist/cjs/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +6 -0
  5. package/dist/cjs/link/LinkSearch/LinkSearchList.js +3 -1
  6. package/dist/cjs/link/LinkSearch/LinkSearchListItem.js +4 -3
  7. package/dist/cjs/monitoring/error.js +1 -1
  8. package/dist/cjs/ui/DropList/index.js +1 -1
  9. package/dist/es2019/ai-messages/ai-autocomplete.js +25 -0
  10. package/dist/es2019/ai-messages/index.js +2 -1
  11. package/dist/es2019/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +6 -0
  12. package/dist/es2019/link/LinkSearch/LinkSearchList.js +3 -1
  13. package/dist/es2019/link/LinkSearch/LinkSearchListItem.js +4 -3
  14. package/dist/es2019/monitoring/error.js +1 -1
  15. package/dist/es2019/ui/DropList/index.js +1 -1
  16. package/dist/esm/ai-messages/ai-autocomplete.js +25 -0
  17. package/dist/esm/ai-messages/index.js +2 -1
  18. package/dist/esm/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.js +6 -0
  19. package/dist/esm/link/LinkSearch/LinkSearchList.js +3 -1
  20. package/dist/esm/link/LinkSearch/LinkSearchListItem.js +4 -3
  21. package/dist/esm/monitoring/error.js +1 -1
  22. package/dist/esm/ui/DropList/index.js +1 -1
  23. package/dist/types/ai-messages/ai-autocomplete.d.ts +22 -0
  24. package/dist/types/ai-messages/index.d.ts +1 -0
  25. package/dist/types/analytics/types/node-events.d.ts +5 -1
  26. package/dist/types/card/types.d.ts +1 -0
  27. package/dist/types/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +1 -0
  28. package/dist/types/link/LinkSearch/LinkSearchList.d.ts +2 -1
  29. package/dist/types/link/LinkSearch/LinkSearchListItem.d.ts +1 -0
  30. package/dist/types-ts4.5/ai-messages/ai-autocomplete.d.ts +22 -0
  31. package/dist/types-ts4.5/ai-messages/index.d.ts +1 -0
  32. package/dist/types-ts4.5/analytics/types/node-events.d.ts +5 -1
  33. package/dist/types-ts4.5/card/types.d.ts +1 -0
  34. package/dist/types-ts4.5/link/LinkPicker/HyperlinkAddToolbar/HyperlinkAddToolbar.d.ts +1 -0
  35. package/dist/types-ts4.5/link/LinkSearch/LinkSearchList.d.ts +2 -1
  36. package/dist/types-ts4.5/link/LinkSearch/LinkSearchListItem.d.ts +1 -0
  37. package/package.json +2 -2
package/CHANGELOG.md CHANGED
@@ -1,5 +1,21 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 112.13.2
4
+
5
+ ### Patch Changes
6
+
7
+ - [`afe721737a588`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/afe721737a588) -
8
+ [ux] Fix @atlassian/a11y/mouse-events-have-key-events violation in LinkSeachListItem by
9
+ implementing onBlur
10
+ - Updated dependencies
11
+
12
+ ## 112.13.1
13
+
14
+ ### Patch Changes
15
+
16
+ - [`9571b24edc635`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/9571b24edc635) -
17
+ Add i18n messages for trigger keywords
18
+
3
19
  ## 112.13.0
4
20
 
5
21
  ### Minor Changes
@@ -0,0 +1,30 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.aiAutocompleteMessages = void 0;
7
+ var _reactIntlNext = require("react-intl-next");
8
+ /**
9
+ * Default keyword lists omit longer phrases when a shorter phrase in the same list already
10
+ * matches as a whole word within them (case-insensitive), e.g. drop `in summary` when `summary`
11
+ * is present.
12
+ */
13
+
14
+ var aiAutocompleteMessages = exports.aiAutocompleteMessages = (0, _reactIntlNext.defineMessages)({
15
+ summaryKeywords: {
16
+ id: 'fabric.editor.ai.autocomplete.summary.trigger.keywords.non-final',
17
+ defaultMessage: 'summary, tldr, tl;dr, tl dr, overview, synopsis, recap, abstract, brief, outline, quick, in short, rundown, review, roundup, highlights, key points, snapshot, at a glance, in essence, takeaways, to summarize, to summarise',
18
+ description: 'Comma-separated heading phrases that trigger AI autocomplete when the user finishes typing one as a whole token at the cursor. Translators may reorder or localize phrases; keep comma separation.'
19
+ },
20
+ conclusionKeywords: {
21
+ id: 'fabric.editor.ai.autocomplete.conclusion.trigger.keywords.non-final',
22
+ defaultMessage: 'conclusion, conclusions, findings, results, outcome, outcomes, final thoughts, takeaway, takeaways, verdict, determination, resolution, final analysis, deduction, judgment, decision, culmination, end result, bottom line, final word, closing, to conclude, final notes, learnings, what we learned, overall',
23
+ description: 'Comma-separated phrases that trigger AI autocomplete for a conclusion-style completion when typed in the last lines of the document. Translators may reorder or localize; keep comma separation.'
24
+ },
25
+ nextStepsKeywords: {
26
+ id: 'fabric.editor.ai.autocomplete.next.steps.trigger.keywords.non-final',
27
+ defaultMessage: "recommendations, follow-through, implementation, moving forward, going forward, deliverables, path forward, what is next, way forward, what's next, next steps, priorities, whats next, task list, follow-up, follow up, next step, followup, priority, next up, up next, roadmap, actions, action, tasks, todos, to do, to-do, todo, plan",
28
+ description: 'Comma-separated phrases that trigger AI autocomplete for a next-steps-style completion when typed in the last lines of the document. Translators may reorder or localize; keep comma separation. Prefer longer phrases before shorter ones that are suffixes.'
29
+ }
30
+ });
@@ -3,6 +3,12 @@
3
3
  Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
+ Object.defineProperty(exports, "aiAutocompleteMessages", {
7
+ enumerable: true,
8
+ get: function get() {
9
+ return _aiAutocomplete.aiAutocompleteMessages;
10
+ }
11
+ });
6
12
  Object.defineProperty(exports, "aiConfigItemMessages", {
7
13
  enumerable: true,
8
14
  get: function get() {
@@ -79,4 +85,5 @@ var _ai = require("./ai");
79
85
  var _aiProactiveSetting = require("./ai-proactive-setting");
80
86
  var _aiProactiveTransform = require("./ai-proactive-transform");
81
87
  var _aiQuickPrompt = require("./ai-quick-prompt");
82
- var _aiSuggestions = require("./ai-suggestions");
88
+ var _aiSuggestions = require("./ai-suggestions");
89
+ var _aiAutocomplete = require("./ai-autocomplete");
@@ -561,6 +561,11 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
561
561
  selectedIndex: index
562
562
  });
563
563
  });
564
+ (0, _defineProperty2.default)(_this, "handleListItemBlur", function () {
565
+ _this.setState({
566
+ selectedIndex: -1
567
+ });
568
+ });
564
569
  // Ignored via go/ees005
565
570
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
566
571
  (0, _defineProperty2.default)(_this, "handleKeyDown", function (event) {
@@ -989,6 +994,7 @@ var HyperlinkLinkAddToolbar = exports.HyperlinkLinkAddToolbar = /*#__PURE__*/fun
989
994
  selectedIndex: selectedIndex,
990
995
  listItemRefCallback: this.listItemRefCallback,
991
996
  onFocus: this.handleListItemFocus,
997
+ onBlur: this.handleListItemBlur,
992
998
  onKeyDown: this.handleKeyDown,
993
999
  onSelect: this.handleSelected,
994
1000
  onMouseEnter: this.handleMouseEnterResultItem,
@@ -34,6 +34,7 @@ var linkSearchList = exports.linkSearchList = (0, _react.css)({
34
34
  });
35
35
  var LinkSearchList = function LinkSearchList(_ref) {
36
36
  var listItemRefCallback = _ref.listItemRefCallback,
37
+ onBlur = _ref.onBlur,
37
38
  _onFocus = _ref.onFocus,
38
39
  onKeyDown = _ref.onKeyDown,
39
40
  onSelect = _ref.onSelect,
@@ -59,7 +60,8 @@ var LinkSearchList = function LinkSearchList(_ref) {
59
60
  return (0, _react.jsx)(_LinkSearchListItem.default, {
60
61
  id: "link-search-list-item-".concat(index),
61
62
  item: item,
62
- selected: selectedIndex === index
63
+ selected: selectedIndex === index,
64
+ onBlur: onBlur
63
65
  // eslint-disable-next-line @atlassian/perf-linting/detect-unnecessary-rerenders, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
64
66
  ,
65
67
  onFocus: function onFocus() {
@@ -9,6 +9,7 @@ var _react = _interopRequireWildcard(require("react"));
9
9
  var _react2 = require("@emotion/react");
10
10
  var _reactIntlNext = require("react-intl-next");
11
11
  var _editorSharedStyles = require("@atlaskit/editor-shared-styles");
12
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
12
13
  var _listItemAlts = require("./listItemAlts");
13
14
  var _transformTimeStamp = require("./transformTimeStamp");
14
15
  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); }
@@ -70,6 +71,7 @@ var iconStyle = (0, _react2.css)({
70
71
  var LinkSearchListItem = function LinkSearchListItem(props, ref) {
71
72
  var id = props.id,
72
73
  item = props.item,
74
+ onBlur = props.onBlur,
73
75
  onFocus = props.onFocus,
74
76
  onKeyDown = props.onKeyDown,
75
77
  onMouseEnter = props.onMouseEnter,
@@ -129,12 +131,11 @@ var LinkSearchListItem = function LinkSearchListItem(props, ref) {
129
131
  id: id,
130
132
  "aria-selected": selected,
131
133
  "data-testid": "link-search-list-item",
134
+ onBlur: (0, _expValEquals.expValEquals)('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? onBlur : undefined,
132
135
  onFocus: onFocus,
133
136
  onKeyDown: handleKeyDown,
134
137
  onMouseMove: handleMouseMove,
135
- onMouseEnter: handleMouseEnter
136
- // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
137
- ,
138
+ onMouseEnter: handleMouseEnter,
138
139
  onMouseLeave: handleMouseLeave,
139
140
  onClick: handleSelect
140
141
  }, renderIcon(), (0, _react2.jsx)("span", {
@@ -19,7 +19,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
19
19
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "112.13.0";
22
+ var packageVersion = "112.13.1";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // 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 = "112.13.0";
27
+ var packageVersion = "112.13.1";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -0,0 +1,25 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+
3
+ /**
4
+ * Default keyword lists omit longer phrases when a shorter phrase in the same list already
5
+ * matches as a whole word within them (case-insensitive), e.g. drop `in summary` when `summary`
6
+ * is present.
7
+ */
8
+
9
+ export const aiAutocompleteMessages = defineMessages({
10
+ summaryKeywords: {
11
+ id: 'fabric.editor.ai.autocomplete.summary.trigger.keywords.non-final',
12
+ defaultMessage: 'summary, tldr, tl;dr, tl dr, overview, synopsis, recap, abstract, brief, outline, quick, in short, rundown, review, roundup, highlights, key points, snapshot, at a glance, in essence, takeaways, to summarize, to summarise',
13
+ description: 'Comma-separated heading phrases that trigger AI autocomplete when the user finishes typing one as a whole token at the cursor. Translators may reorder or localize phrases; keep comma separation.'
14
+ },
15
+ conclusionKeywords: {
16
+ id: 'fabric.editor.ai.autocomplete.conclusion.trigger.keywords.non-final',
17
+ defaultMessage: 'conclusion, conclusions, findings, results, outcome, outcomes, final thoughts, takeaway, takeaways, verdict, determination, resolution, final analysis, deduction, judgment, decision, culmination, end result, bottom line, final word, closing, to conclude, final notes, learnings, what we learned, overall',
18
+ description: 'Comma-separated phrases that trigger AI autocomplete for a conclusion-style completion when typed in the last lines of the document. Translators may reorder or localize; keep comma separation.'
19
+ },
20
+ nextStepsKeywords: {
21
+ id: 'fabric.editor.ai.autocomplete.next.steps.trigger.keywords.non-final',
22
+ defaultMessage: "recommendations, follow-through, implementation, moving forward, going forward, deliverables, path forward, what is next, way forward, what's next, next steps, priorities, whats next, task list, follow-up, follow up, next step, followup, priority, next up, up next, roadmap, actions, action, tasks, todos, to do, to-do, todo, plan",
23
+ description: 'Comma-separated phrases that trigger AI autocomplete for a next-steps-style completion when typed in the last lines of the document. Translators may reorder or localize; keep comma separation. Prefer longer phrases before shorter ones that are suffixes.'
24
+ }
25
+ });
@@ -11,4 +11,5 @@ export { aiMessages } from './ai';
11
11
  export { aiProactiveSettingMessages } from './ai-proactive-setting';
12
12
  export { aiProactiveTransformMessages } from './ai-proactive-transform';
13
13
  export { aiQuickPromptMessages } from './ai-quick-prompt';
14
- export { aiSuggestionsMessages } from './ai-suggestions';
14
+ export { aiSuggestionsMessages } from './ai-suggestions';
15
+ export { aiAutocompleteMessages } from './ai-autocomplete';
@@ -481,6 +481,11 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
481
481
  selectedIndex: index
482
482
  });
483
483
  });
484
+ _defineProperty(this, "handleListItemBlur", () => {
485
+ this.setState({
486
+ selectedIndex: -1
487
+ });
488
+ });
484
489
  // Ignored via go/ees005
485
490
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
486
491
  _defineProperty(this, "handleKeyDown", event => {
@@ -838,6 +843,7 @@ export class HyperlinkLinkAddToolbar extends PureComponent {
838
843
  selectedIndex: selectedIndex,
839
844
  listItemRefCallback: this.listItemRefCallback,
840
845
  onFocus: this.handleListItemFocus,
846
+ onBlur: this.handleListItemBlur,
841
847
  onKeyDown: this.handleKeyDown,
842
848
  onSelect: this.handleSelected,
843
849
  onMouseEnter: this.handleMouseEnterResultItem,
@@ -26,6 +26,7 @@ export const linkSearchList = css({
26
26
  });
27
27
  const LinkSearchList = ({
28
28
  listItemRefCallback,
29
+ onBlur,
29
30
  onFocus,
30
31
  onKeyDown,
31
32
  onSelect,
@@ -51,7 +52,8 @@ const LinkSearchList = ({
51
52
  }, items.map((item, index) => jsx(ForwardedLinkSearchListItemNextWithIntl, {
52
53
  id: `link-search-list-item-${index}`,
53
54
  item: item,
54
- selected: selectedIndex === index
55
+ selected: selectedIndex === index,
56
+ onBlur: onBlur
55
57
  // eslint-disable-next-line @atlassian/perf-linting/detect-unnecessary-rerenders, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
56
58
  ,
57
59
  onFocus: () => onFocus === null || onFocus === void 0 ? void 0 : onFocus(index),
@@ -12,6 +12,7 @@ import { css, jsx } from '@emotion/react';
12
12
 
13
13
  import { injectIntl } from 'react-intl-next';
14
14
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
15
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
16
  import { getCorrectAltByIconUrl } from './listItemAlts';
16
17
  import { transformTimeStamp } from './transformTimeStamp';
17
18
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -62,6 +63,7 @@ const LinkSearchListItem = (props, ref) => {
62
63
  const {
63
64
  id,
64
65
  item,
66
+ onBlur,
65
67
  onFocus,
66
68
  onKeyDown,
67
69
  onMouseEnter,
@@ -122,12 +124,11 @@ const LinkSearchListItem = (props, ref) => {
122
124
  id: id,
123
125
  "aria-selected": selected,
124
126
  "data-testid": "link-search-list-item",
127
+ onBlur: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? onBlur : undefined,
125
128
  onFocus: onFocus,
126
129
  onKeyDown: handleKeyDown,
127
130
  onMouseMove: handleMouseMove,
128
- onMouseEnter: handleMouseEnter
129
- // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
130
- ,
131
+ onMouseEnter: handleMouseEnter,
131
132
  onMouseLeave: handleMouseLeave,
132
133
  onClick: handleSelect
133
134
  }, renderIcon(), jsx("span", {
@@ -4,7 +4,7 @@ import { isFedRamp } from './environment';
4
4
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
5
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
6
6
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
7
- const packageVersion = "112.13.0";
7
+ const packageVersion = "112.13.1";
8
8
  const sanitiseSentryEvents = (data, _hint) => {
9
9
  // Remove URL as it has UGC
10
10
  // 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 = "112.13.0";
17
+ const packageVersion = "112.13.1";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -0,0 +1,25 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+
3
+ /**
4
+ * Default keyword lists omit longer phrases when a shorter phrase in the same list already
5
+ * matches as a whole word within them (case-insensitive), e.g. drop `in summary` when `summary`
6
+ * is present.
7
+ */
8
+
9
+ export var aiAutocompleteMessages = defineMessages({
10
+ summaryKeywords: {
11
+ id: 'fabric.editor.ai.autocomplete.summary.trigger.keywords.non-final',
12
+ defaultMessage: 'summary, tldr, tl;dr, tl dr, overview, synopsis, recap, abstract, brief, outline, quick, in short, rundown, review, roundup, highlights, key points, snapshot, at a glance, in essence, takeaways, to summarize, to summarise',
13
+ description: 'Comma-separated heading phrases that trigger AI autocomplete when the user finishes typing one as a whole token at the cursor. Translators may reorder or localize phrases; keep comma separation.'
14
+ },
15
+ conclusionKeywords: {
16
+ id: 'fabric.editor.ai.autocomplete.conclusion.trigger.keywords.non-final',
17
+ defaultMessage: 'conclusion, conclusions, findings, results, outcome, outcomes, final thoughts, takeaway, takeaways, verdict, determination, resolution, final analysis, deduction, judgment, decision, culmination, end result, bottom line, final word, closing, to conclude, final notes, learnings, what we learned, overall',
18
+ description: 'Comma-separated phrases that trigger AI autocomplete for a conclusion-style completion when typed in the last lines of the document. Translators may reorder or localize; keep comma separation.'
19
+ },
20
+ nextStepsKeywords: {
21
+ id: 'fabric.editor.ai.autocomplete.next.steps.trigger.keywords.non-final',
22
+ defaultMessage: "recommendations, follow-through, implementation, moving forward, going forward, deliverables, path forward, what is next, way forward, what's next, next steps, priorities, whats next, task list, follow-up, follow up, next step, followup, priority, next up, up next, roadmap, actions, action, tasks, todos, to do, to-do, todo, plan",
23
+ description: 'Comma-separated phrases that trigger AI autocomplete for a next-steps-style completion when typed in the last lines of the document. Translators may reorder or localize; keep comma separation. Prefer longer phrases before shorter ones that are suffixes.'
24
+ }
25
+ });
@@ -11,4 +11,5 @@ export { aiMessages } from './ai';
11
11
  export { aiProactiveSettingMessages } from './ai-proactive-setting';
12
12
  export { aiProactiveTransformMessages } from './ai-proactive-transform';
13
13
  export { aiQuickPromptMessages } from './ai-quick-prompt';
14
- export { aiSuggestionsMessages } from './ai-suggestions';
14
+ export { aiSuggestionsMessages } from './ai-suggestions';
15
+ export { aiAutocompleteMessages } from './ai-autocomplete';
@@ -558,6 +558,11 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
558
558
  selectedIndex: index
559
559
  });
560
560
  });
561
+ _defineProperty(_this, "handleListItemBlur", function () {
562
+ _this.setState({
563
+ selectedIndex: -1
564
+ });
565
+ });
561
566
  // Ignored via go/ees005
562
567
  // eslint-disable-next-line @typescript-eslint/no-explicit-any
563
568
  _defineProperty(_this, "handleKeyDown", function (event) {
@@ -986,6 +991,7 @@ export var HyperlinkLinkAddToolbar = /*#__PURE__*/function (_PureComponent) {
986
991
  selectedIndex: selectedIndex,
987
992
  listItemRefCallback: this.listItemRefCallback,
988
993
  onFocus: this.handleListItemFocus,
994
+ onBlur: this.handleListItemBlur,
989
995
  onKeyDown: this.handleKeyDown,
990
996
  onSelect: this.handleSelected,
991
997
  onMouseEnter: this.handleMouseEnterResultItem,
@@ -26,6 +26,7 @@ export var linkSearchList = css({
26
26
  });
27
27
  var LinkSearchList = function LinkSearchList(_ref) {
28
28
  var listItemRefCallback = _ref.listItemRefCallback,
29
+ onBlur = _ref.onBlur,
29
30
  _onFocus = _ref.onFocus,
30
31
  onKeyDown = _ref.onKeyDown,
31
32
  onSelect = _ref.onSelect,
@@ -51,7 +52,8 @@ var LinkSearchList = function LinkSearchList(_ref) {
51
52
  return jsx(ForwardedLinkSearchListItemNextWithIntl, {
52
53
  id: "link-search-list-item-".concat(index),
53
54
  item: item,
54
- selected: selectedIndex === index
55
+ selected: selectedIndex === index,
56
+ onBlur: onBlur
55
57
  // eslint-disable-next-line @atlassian/perf-linting/detect-unnecessary-rerenders, @atlassian/perf-linting/no-unstable-inline-props -- Ignored via go/ees017 (to be fixed)
56
58
  ,
57
59
  onFocus: function onFocus() {
@@ -12,6 +12,7 @@ import { css, jsx } from '@emotion/react';
12
12
 
13
13
  import { injectIntl } from 'react-intl-next';
14
14
  import { relativeFontSizeToBase16 } from '@atlaskit/editor-shared-styles';
15
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
15
16
  import { getCorrectAltByIconUrl } from './listItemAlts';
16
17
  import { transformTimeStamp } from './transformTimeStamp';
17
18
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-exported-styles -- Ignored via go/DSP-18766
@@ -61,6 +62,7 @@ var iconStyle = css({
61
62
  var LinkSearchListItem = function LinkSearchListItem(props, ref) {
62
63
  var id = props.id,
63
64
  item = props.item,
65
+ onBlur = props.onBlur,
64
66
  onFocus = props.onFocus,
65
67
  onKeyDown = props.onKeyDown,
66
68
  onMouseEnter = props.onMouseEnter,
@@ -120,12 +122,11 @@ var LinkSearchListItem = function LinkSearchListItem(props, ref) {
120
122
  id: id,
121
123
  "aria-selected": selected,
122
124
  "data-testid": "link-search-list-item",
125
+ onBlur: expValEquals('editor_a11y__enghealth-46814_fy26', 'isEnabled', true) ? onBlur : undefined,
123
126
  onFocus: onFocus,
124
127
  onKeyDown: handleKeyDown,
125
128
  onMouseMove: handleMouseMove,
126
- onMouseEnter: handleMouseEnter
127
- // eslint-disable-next-line @atlassian/a11y/mouse-events-have-key-events
128
- ,
129
+ onMouseEnter: handleMouseEnter,
129
130
  onMouseLeave: handleMouseLeave,
130
131
  onClick: handleSelect
131
132
  }, renderIcon(), jsx("span", {
@@ -10,7 +10,7 @@ import { isFedRamp } from './environment';
10
10
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
11
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
12
12
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
13
- var packageVersion = "112.13.0";
13
+ var packageVersion = "112.13.1";
14
14
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
15
15
  // Remove URL as it has UGC
16
16
  // 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 = "112.13.0";
24
+ var packageVersion = "112.13.1";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Default keyword lists omit longer phrases when a shorter phrase in the same list already
3
+ * matches as a whole word within them (case-insensitive), e.g. drop `in summary` when `summary`
4
+ * is present.
5
+ */
6
+ export declare const aiAutocompleteMessages: {
7
+ conclusionKeywords: {
8
+ defaultMessage: string;
9
+ description: string;
10
+ id: string;
11
+ };
12
+ nextStepsKeywords: {
13
+ defaultMessage: string;
14
+ description: string;
15
+ id: string;
16
+ };
17
+ summaryKeywords: {
18
+ defaultMessage: string;
19
+ description: string;
20
+ id: string;
21
+ };
22
+ };
@@ -9,3 +9,4 @@ export { aiProactiveSettingMessages } from './ai-proactive-setting';
9
9
  export { aiProactiveTransformMessages } from './ai-proactive-transform';
10
10
  export { aiQuickPromptMessages } from './ai-quick-prompt';
11
11
  export { aiSuggestionsMessages } from './ai-suggestions';
12
+ export { aiAutocompleteMessages } from './ai-autocomplete';
@@ -23,6 +23,10 @@ type ChangePanelAEP = ChangeTypeAEP<ACTION_SUBJECT.PANEL, undefined, {
23
23
  newType: PanelType;
24
24
  previousType: PanelType;
25
25
  }, undefined>;
26
+ type ChangeNativeEmbedAEP = ChangeTypeAEP<ACTION_SUBJECT.NATIVE_EMBED, undefined, {
27
+ newType: 'nativeEmbed' | SMART_LINK_TYPE;
28
+ previousType: 'nativeEmbed' | SMART_LINK_TYPE;
29
+ }, undefined>;
26
30
  type ChangeSmartLinkAEP = ChangeTypeAEP<ACTION_SUBJECT.SMART_LINK, undefined, {
27
31
  newType: SMART_LINK_TYPE;
28
32
  previousType: SMART_LINK_TYPE;
@@ -60,5 +64,5 @@ type UnsupportedContentAEP = TrackAEP<ACTION.UNSUPPORTED_CONTENT_ENCOUNTERED, AC
60
64
  type: string;
61
65
  };
62
66
  }, undefined>;
63
- export type NodeEventPayload = ChangePanelAEP | DeletePanelAEP | DeletedSmartLink | VisitedSmartLink | VisitedHyperlink | ChangedLayoutAEP | DeletedLayoutAEP | DeletedExpandAEP | NodeDeletedAEP | ChangeSmartLinkAEP | UnsupportedContentAEP;
67
+ export type NodeEventPayload = ChangePanelAEP | DeletePanelAEP | DeletedSmartLink | VisitedSmartLink | VisitedHyperlink | ChangedLayoutAEP | DeletedLayoutAEP | DeletedExpandAEP | NodeDeletedAEP | ChangeSmartLinkAEP | ChangeNativeEmbedAEP | UnsupportedContentAEP;
64
68
  export {};
@@ -55,6 +55,7 @@ export type EmbedCardTransformCommandOptions = {
55
55
  * (e.g. analytics events, datasource stash updates, link metadata).
56
56
  */
57
57
  augmentTransaction?: (tr: Transaction, state: EditorState) => void;
58
+ editorAnalyticsApi?: EditorAnalyticsAPI;
58
59
  };
59
60
  /**
60
61
  * A factory function that creates a Command to replace the currently selected
@@ -118,6 +118,7 @@ export declare class HyperlinkLinkAddToolbar extends PureComponent<Props, State>
118
118
  private handleSubmit;
119
119
  private handleClearTextKeyDown;
120
120
  private handleListItemFocus;
121
+ private handleListItemBlur;
121
122
  private handleKeyDown;
122
123
  private updateTextInput;
123
124
  private handleCancel;
@@ -13,6 +13,7 @@ export interface Props {
13
13
  isLoading: boolean;
14
14
  items?: LinkSearchListItemData[];
15
15
  listItemRefCallback?: (el: HTMLElement | null, id: string) => void;
16
+ onBlur?: () => void;
16
17
  onFocus?: (index: number) => void;
17
18
  onKeyDown?: (e: KeyboardEvent<HTMLDivElement>) => void;
18
19
  onMouseEnter?: (objectId: string) => void;
@@ -22,5 +23,5 @@ export interface Props {
22
23
  role?: string;
23
24
  selectedIndex: number;
24
25
  }
25
- declare const LinkSearchList: ({ listItemRefCallback, onFocus, onKeyDown, onSelect, onMouseMove, onMouseEnter, onMouseLeave, items, selectedIndex, isLoading, ariaControls, role, id, }: Props) => jsx.JSX.Element;
26
+ declare const LinkSearchList: ({ listItemRefCallback, onBlur, onFocus, onKeyDown, onSelect, onMouseMove, onMouseEnter, onMouseLeave, items, selectedIndex, isLoading, ariaControls, role, id, }: Props) => jsx.JSX.Element;
26
27
  export default LinkSearchList;
@@ -14,6 +14,7 @@ export declare const containerName: SerializedStyles;
14
14
  export interface Props {
15
15
  id?: string;
16
16
  item: LinkSearchListItemData;
17
+ onBlur?: () => void;
17
18
  onFocus?: () => void;
18
19
  onKeyDown?: (e: KeyboardEvent<HTMLDivElement>) => void;
19
20
  onMouseEnter?: (objectId: string) => void;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * Default keyword lists omit longer phrases when a shorter phrase in the same list already
3
+ * matches as a whole word within them (case-insensitive), e.g. drop `in summary` when `summary`
4
+ * is present.
5
+ */
6
+ export declare const aiAutocompleteMessages: {
7
+ conclusionKeywords: {
8
+ defaultMessage: string;
9
+ description: string;
10
+ id: string;
11
+ };
12
+ nextStepsKeywords: {
13
+ defaultMessage: string;
14
+ description: string;
15
+ id: string;
16
+ };
17
+ summaryKeywords: {
18
+ defaultMessage: string;
19
+ description: string;
20
+ id: string;
21
+ };
22
+ };
@@ -9,3 +9,4 @@ export { aiProactiveSettingMessages } from './ai-proactive-setting';
9
9
  export { aiProactiveTransformMessages } from './ai-proactive-transform';
10
10
  export { aiQuickPromptMessages } from './ai-quick-prompt';
11
11
  export { aiSuggestionsMessages } from './ai-suggestions';
12
+ export { aiAutocompleteMessages } from './ai-autocomplete';
@@ -23,6 +23,10 @@ type ChangePanelAEP = ChangeTypeAEP<ACTION_SUBJECT.PANEL, undefined, {
23
23
  newType: PanelType;
24
24
  previousType: PanelType;
25
25
  }, undefined>;
26
+ type ChangeNativeEmbedAEP = ChangeTypeAEP<ACTION_SUBJECT.NATIVE_EMBED, undefined, {
27
+ newType: 'nativeEmbed' | SMART_LINK_TYPE;
28
+ previousType: 'nativeEmbed' | SMART_LINK_TYPE;
29
+ }, undefined>;
26
30
  type ChangeSmartLinkAEP = ChangeTypeAEP<ACTION_SUBJECT.SMART_LINK, undefined, {
27
31
  newType: SMART_LINK_TYPE;
28
32
  previousType: SMART_LINK_TYPE;
@@ -60,5 +64,5 @@ type UnsupportedContentAEP = TrackAEP<ACTION.UNSUPPORTED_CONTENT_ENCOUNTERED, AC
60
64
  type: string;
61
65
  };
62
66
  }, undefined>;
63
- export type NodeEventPayload = ChangePanelAEP | DeletePanelAEP | DeletedSmartLink | VisitedSmartLink | VisitedHyperlink | ChangedLayoutAEP | DeletedLayoutAEP | DeletedExpandAEP | NodeDeletedAEP | ChangeSmartLinkAEP | UnsupportedContentAEP;
67
+ export type NodeEventPayload = ChangePanelAEP | DeletePanelAEP | DeletedSmartLink | VisitedSmartLink | VisitedHyperlink | ChangedLayoutAEP | DeletedLayoutAEP | DeletedExpandAEP | NodeDeletedAEP | ChangeSmartLinkAEP | ChangeNativeEmbedAEP | UnsupportedContentAEP;
64
68
  export {};
@@ -55,6 +55,7 @@ export type EmbedCardTransformCommandOptions = {
55
55
  * (e.g. analytics events, datasource stash updates, link metadata).
56
56
  */
57
57
  augmentTransaction?: (tr: Transaction, state: EditorState) => void;
58
+ editorAnalyticsApi?: EditorAnalyticsAPI;
58
59
  };
59
60
  /**
60
61
  * A factory function that creates a Command to replace the currently selected
@@ -118,6 +118,7 @@ export declare class HyperlinkLinkAddToolbar extends PureComponent<Props, State>
118
118
  private handleSubmit;
119
119
  private handleClearTextKeyDown;
120
120
  private handleListItemFocus;
121
+ private handleListItemBlur;
121
122
  private handleKeyDown;
122
123
  private updateTextInput;
123
124
  private handleCancel;
@@ -13,6 +13,7 @@ export interface Props {
13
13
  isLoading: boolean;
14
14
  items?: LinkSearchListItemData[];
15
15
  listItemRefCallback?: (el: HTMLElement | null, id: string) => void;
16
+ onBlur?: () => void;
16
17
  onFocus?: (index: number) => void;
17
18
  onKeyDown?: (e: KeyboardEvent<HTMLDivElement>) => void;
18
19
  onMouseEnter?: (objectId: string) => void;
@@ -22,5 +23,5 @@ export interface Props {
22
23
  role?: string;
23
24
  selectedIndex: number;
24
25
  }
25
- declare const LinkSearchList: ({ listItemRefCallback, onFocus, onKeyDown, onSelect, onMouseMove, onMouseEnter, onMouseLeave, items, selectedIndex, isLoading, ariaControls, role, id, }: Props) => jsx.JSX.Element;
26
+ declare const LinkSearchList: ({ listItemRefCallback, onBlur, onFocus, onKeyDown, onSelect, onMouseMove, onMouseEnter, onMouseLeave, items, selectedIndex, isLoading, ariaControls, role, id, }: Props) => jsx.JSX.Element;
26
27
  export default LinkSearchList;
@@ -14,6 +14,7 @@ export declare const containerName: SerializedStyles;
14
14
  export interface Props {
15
15
  id?: string;
16
16
  item: LinkSearchListItemData;
17
+ onBlur?: () => void;
17
18
  onFocus?: () => void;
18
19
  onKeyDown?: (e: KeyboardEvent<HTMLDivElement>) => void;
19
20
  onMouseEnter?: (objectId: string) => void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "112.13.0",
3
+ "version": "112.13.2",
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/"
@@ -81,7 +81,7 @@
81
81
  "@atlaskit/status": "^3.2.0",
82
82
  "@atlaskit/task-decision": "^19.3.0",
83
83
  "@atlaskit/textfield": "^8.2.0",
84
- "@atlaskit/tmp-editor-statsig": "^49.0.0",
84
+ "@atlaskit/tmp-editor-statsig": "^50.0.0",
85
85
  "@atlaskit/tokens": "^11.4.0",
86
86
  "@atlaskit/tooltip": "^21.0.0",
87
87
  "@atlaskit/width-detector": "^5.0.0",