@atlaskit/editor-common 99.17.4 → 99.18.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.
Files changed (29) hide show
  1. package/CHANGELOG.md +15 -0
  2. package/dist/cjs/analytics/index.js +8 -1
  3. package/dist/cjs/analytics/types/ai-inline-suggestion-events.js +13 -0
  4. package/dist/cjs/analytics/types/enums.js +5 -0
  5. package/dist/cjs/monitoring/error.js +1 -1
  6. package/dist/cjs/ui/DropList/index.js +1 -1
  7. package/dist/es2019/analytics/index.js +2 -1
  8. package/dist/es2019/analytics/types/ai-inline-suggestion-events.js +7 -0
  9. package/dist/es2019/analytics/types/enums.js +5 -0
  10. package/dist/es2019/monitoring/error.js +1 -1
  11. package/dist/es2019/ui/DropList/index.js +1 -1
  12. package/dist/esm/analytics/index.js +2 -1
  13. package/dist/esm/analytics/types/ai-inline-suggestion-events.js +7 -0
  14. package/dist/esm/analytics/types/enums.js +5 -0
  15. package/dist/esm/monitoring/error.js +1 -1
  16. package/dist/esm/ui/DropList/index.js +1 -1
  17. package/dist/types/analytics/index.d.ts +1 -0
  18. package/dist/types/analytics/types/ai-inline-suggestion-events.d.ts +22 -0
  19. package/dist/types/analytics/types/enums.d.ts +12 -2
  20. package/dist/types/analytics/types/events.d.ts +2 -1
  21. package/dist/types/analytics/types/insert-events.d.ts +2 -2
  22. package/dist/types/types/floating-toolbar.d.ts +4 -0
  23. package/dist/types-ts4.5/analytics/index.d.ts +1 -0
  24. package/dist/types-ts4.5/analytics/types/ai-inline-suggestion-events.d.ts +22 -0
  25. package/dist/types-ts4.5/analytics/types/enums.d.ts +12 -2
  26. package/dist/types-ts4.5/analytics/types/events.d.ts +2 -1
  27. package/dist/types-ts4.5/analytics/types/insert-events.d.ts +2 -2
  28. package/dist/types-ts4.5/types/floating-toolbar.d.ts +4 -0
  29. package/package.json +10 -10
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 99.18.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#115259](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/115259)
8
+ [`a3150808f308a`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a3150808f308a) -
9
+ Add new forceStaticToolbar config option to floating toolbar and add it to panel and table. Add
10
+ new contextual toolbar plugin which controls expand and collapse logic for toolbar options.
11
+
12
+ ### Patch Changes
13
+
14
+ - [#115770](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/115770)
15
+ [`18d671ff09f59`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/18d671ff09f59) -
16
+ [EDF-2280] Inline suggestion analytics
17
+
3
18
  ## 99.17.4
4
19
 
5
20
  ### Patch Changes
@@ -21,6 +21,12 @@ Object.defineProperty(exports, "ACTION_SUBJECT_ID", {
21
21
  return _enums.ACTION_SUBJECT_ID;
22
22
  }
23
23
  });
24
+ Object.defineProperty(exports, "AI_SUGGESTION_TRIGGERED_FROM", {
25
+ enumerable: true,
26
+ get: function get() {
27
+ return _aiInlineSuggestionEvents.AI_SUGGESTION_TRIGGERED_FROM;
28
+ }
29
+ });
24
30
  Object.defineProperty(exports, "BROWSER_FREEZE_INTERACTION_TYPE", {
25
31
  enumerable: true,
26
32
  get: function get() {
@@ -325,4 +331,5 @@ var _toolbarButton = require("./types/toolbar-button");
325
331
  var _utils = require("./types/utils");
326
332
  var _fireAnalyticsEvent = require("./fire-analytics-event");
327
333
  var _utils2 = require("./utils");
328
- var _linkingUtils = require("./linking-utils");
334
+ var _linkingUtils = require("./linking-utils");
335
+ var _aiInlineSuggestionEvents = require("./types/ai-inline-suggestion-events");
@@ -0,0 +1,13 @@
1
+ "use strict";
2
+
3
+ Object.defineProperty(exports, "__esModule", {
4
+ value: true
5
+ });
6
+ exports.AI_SUGGESTION_TRIGGERED_FROM = void 0;
7
+ var AI_SUGGESTION_TRIGGERED_FROM = exports.AI_SUGGESTION_TRIGGERED_FROM = /*#__PURE__*/function (AI_SUGGESTION_TRIGGERED_FROM) {
8
+ AI_SUGGESTION_TRIGGERED_FROM["ENTER_BUTTON"] = "enterKeydown";
9
+ AI_SUGGESTION_TRIGGERED_FROM["TAB_BUTTON"] = "tabKeydown";
10
+ AI_SUGGESTION_TRIGGERED_FROM["ESCAPE_BUTTON"] = "escapeKeydown";
11
+ AI_SUGGESTION_TRIGGERED_FROM["TOOLBAR"] = "toolbar";
12
+ return AI_SUGGESTION_TRIGGERED_FROM;
13
+ }({});
@@ -167,6 +167,9 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
167
167
  ACTION["RESIZED"] = "resized";
168
168
  ACTION["BLOCKS_DRAG_INIT"] = "blocksDragInit";
169
169
  ACTION["SINGLE_COL_LAYOUT_DETECTED"] = "singleColumLayoutDetected";
170
+ ACTION["SUGGESTION_INSERTED"] = "suggestionInserted";
171
+ ACTION["SUGGESTION_DISMISSED"] = "suggestionDismissed";
172
+ ACTION["SUGGESTION_VIEWED"] = "suggestionViewed";
170
173
  return ACTION;
171
174
  }({});
172
175
  var INPUT_METHOD = exports.INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
@@ -203,6 +206,7 @@ var INPUT_METHOD = exports.INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
203
206
  INPUT_METHOD["MOUSE"] = "mouse";
204
207
  INPUT_METHOD["BROWSER"] = "browser";
205
208
  INPUT_METHOD["DOUBLE_CLICK"] = "doubleClick";
209
+ INPUT_METHOD["INLINE_SUGGESTION_FLOATING_TB"] = "inlineSuggestionFloatingToolbar";
206
210
  return INPUT_METHOD;
207
211
  }({});
208
212
  var INSERT_MEDIA_VIA = exports.INSERT_MEDIA_VIA = /*#__PURE__*/function (INSERT_MEDIA_VIA) {
@@ -294,6 +298,7 @@ var ACTION_SUBJECT_ID = exports.ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTIO
294
298
  ACTION_SUBJECT_ID["ACTIVITY"] = "activity";
295
299
  ACTION_SUBJECT_ID["AI_DEFINITIONS_DEFINE_BUTTON"] = "aiDefinitionsDefineButton";
296
300
  ACTION_SUBJECT_ID["AI_DEFINITIONS_AUTO_HIGHLIGHT"] = "aiDefinitionsAutoHighlight";
301
+ ACTION_SUBJECT_ID["AI_INLINE_SUGGESTION"] = "aiInlineSuggestion";
297
302
  ACTION_SUBJECT_ID["AI_PANELS_BODIED_EXTENSION"] = "aiPanelsBodiedExtension";
298
303
  ACTION_SUBJECT_ID["AI_PROMPT_LINK_PICKER_BUTTON"] = "aiPromptLinkPickerButton";
299
304
  ACTION_SUBJECT_ID["AI_PROMPT_MENTION_BUTTON"] = "aiPromptMentionButton";
@@ -17,7 +17,7 @@ function _getRequireWildcardCache(e) { if ("function" != typeof WeakMap) return
17
17
  function _interopRequireWildcard(e, r) { if (!r && e && e.__esModule) return e; if (null === e || "object" != _typeof(e) && "function" != typeof e) return { default: e }; var t = _getRequireWildcardCache(r); if (t && t.has(e)) return t.get(e); var n = { __proto__: null }, a = Object.defineProperty && Object.getOwnPropertyDescriptor; for (var u in e) if ("default" !== u && {}.hasOwnProperty.call(e, u)) { var i = a ? Object.getOwnPropertyDescriptor(e, u) : null; i && (i.get || i.set) ? Object.defineProperty(n, u, i) : n[u] = e[u]; } return n.default = e, t && t.set(e, n), n; }
18
18
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
19
19
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
20
- var packageVersion = "99.17.4";
20
+ var packageVersion = "99.18.0";
21
21
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
22
22
  // Remove URL as it has UGC
23
23
  // TODO: Sanitise the URL instead of just removing it
@@ -23,7 +23,7 @@ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.
23
23
  * @jsx jsx
24
24
  */ // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled -- Ignored via go/DSP-18766
25
25
  var packageName = "@atlaskit/editor-common";
26
- var packageVersion = "99.17.4";
26
+ var packageVersion = "99.18.0";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -18,4 +18,5 @@ export { TOOLBAR_ACTION_SUBJECT_ID } from './types/toolbar-button';
18
18
  export { SELECTION_POSITION, SELECTION_TYPE } from './types/utils';
19
19
  export { editorAnalyticsChannel, fireAnalyticsEvent } from './fire-analytics-event';
20
20
  export { getAnalyticsEventsFromTransaction } from './utils';
21
- export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload } from './linking-utils';
21
+ export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload } from './linking-utils';
22
+ export { AI_SUGGESTION_TRIGGERED_FROM } from './types/ai-inline-suggestion-events';
@@ -0,0 +1,7 @@
1
+ export let AI_SUGGESTION_TRIGGERED_FROM = /*#__PURE__*/function (AI_SUGGESTION_TRIGGERED_FROM) {
2
+ AI_SUGGESTION_TRIGGERED_FROM["ENTER_BUTTON"] = "enterKeydown";
3
+ AI_SUGGESTION_TRIGGERED_FROM["TAB_BUTTON"] = "tabKeydown";
4
+ AI_SUGGESTION_TRIGGERED_FROM["ESCAPE_BUTTON"] = "escapeKeydown";
5
+ AI_SUGGESTION_TRIGGERED_FROM["TOOLBAR"] = "toolbar";
6
+ return AI_SUGGESTION_TRIGGERED_FROM;
7
+ }({});
@@ -161,6 +161,9 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
161
161
  ACTION["RESIZED"] = "resized";
162
162
  ACTION["BLOCKS_DRAG_INIT"] = "blocksDragInit";
163
163
  ACTION["SINGLE_COL_LAYOUT_DETECTED"] = "singleColumLayoutDetected";
164
+ ACTION["SUGGESTION_INSERTED"] = "suggestionInserted";
165
+ ACTION["SUGGESTION_DISMISSED"] = "suggestionDismissed";
166
+ ACTION["SUGGESTION_VIEWED"] = "suggestionViewed";
164
167
  return ACTION;
165
168
  }({});
166
169
  export let INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
@@ -197,6 +200,7 @@ export let INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
197
200
  INPUT_METHOD["MOUSE"] = "mouse";
198
201
  INPUT_METHOD["BROWSER"] = "browser";
199
202
  INPUT_METHOD["DOUBLE_CLICK"] = "doubleClick";
203
+ INPUT_METHOD["INLINE_SUGGESTION_FLOATING_TB"] = "inlineSuggestionFloatingToolbar";
200
204
  return INPUT_METHOD;
201
205
  }({});
202
206
  export let INSERT_MEDIA_VIA = /*#__PURE__*/function (INSERT_MEDIA_VIA) {
@@ -288,6 +292,7 @@ export let ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
288
292
  ACTION_SUBJECT_ID["ACTIVITY"] = "activity";
289
293
  ACTION_SUBJECT_ID["AI_DEFINITIONS_DEFINE_BUTTON"] = "aiDefinitionsDefineButton";
290
294
  ACTION_SUBJECT_ID["AI_DEFINITIONS_AUTO_HIGHLIGHT"] = "aiDefinitionsAutoHighlight";
295
+ ACTION_SUBJECT_ID["AI_INLINE_SUGGESTION"] = "aiInlineSuggestion";
291
296
  ACTION_SUBJECT_ID["AI_PANELS_BODIED_EXTENSION"] = "aiPanelsBodiedExtension";
292
297
  ACTION_SUBJECT_ID["AI_PROMPT_LINK_PICKER_BUTTON"] = "aiPromptLinkPickerButton";
293
298
  ACTION_SUBJECT_ID["AI_PROMPT_MENTION_BUTTON"] = "aiPromptMentionButton";
@@ -1,7 +1,7 @@
1
1
  import { isFedRamp } from './environment';
2
2
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
3
3
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
4
- const packageVersion = "99.17.4";
4
+ const packageVersion = "99.18.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // TODO: Sanitise the URL instead of just removing it
@@ -13,7 +13,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
13
13
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import Layer from '../Layer';
15
15
  const packageName = "@atlaskit/editor-common";
16
- const packageVersion = "99.17.4";
16
+ const packageVersion = "99.18.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -18,4 +18,5 @@ export { TOOLBAR_ACTION_SUBJECT_ID } from './types/toolbar-button';
18
18
  export { SELECTION_POSITION, SELECTION_TYPE } from './types/utils';
19
19
  export { editorAnalyticsChannel, fireAnalyticsEvent } from './fire-analytics-event';
20
20
  export { getAnalyticsEventsFromTransaction } from './utils';
21
- export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload } from './linking-utils';
21
+ export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload } from './linking-utils';
22
+ export { AI_SUGGESTION_TRIGGERED_FROM } from './types/ai-inline-suggestion-events';
@@ -0,0 +1,7 @@
1
+ export var AI_SUGGESTION_TRIGGERED_FROM = /*#__PURE__*/function (AI_SUGGESTION_TRIGGERED_FROM) {
2
+ AI_SUGGESTION_TRIGGERED_FROM["ENTER_BUTTON"] = "enterKeydown";
3
+ AI_SUGGESTION_TRIGGERED_FROM["TAB_BUTTON"] = "tabKeydown";
4
+ AI_SUGGESTION_TRIGGERED_FROM["ESCAPE_BUTTON"] = "escapeKeydown";
5
+ AI_SUGGESTION_TRIGGERED_FROM["TOOLBAR"] = "toolbar";
6
+ return AI_SUGGESTION_TRIGGERED_FROM;
7
+ }({});
@@ -161,6 +161,9 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
161
161
  ACTION["RESIZED"] = "resized";
162
162
  ACTION["BLOCKS_DRAG_INIT"] = "blocksDragInit";
163
163
  ACTION["SINGLE_COL_LAYOUT_DETECTED"] = "singleColumLayoutDetected";
164
+ ACTION["SUGGESTION_INSERTED"] = "suggestionInserted";
165
+ ACTION["SUGGESTION_DISMISSED"] = "suggestionDismissed";
166
+ ACTION["SUGGESTION_VIEWED"] = "suggestionViewed";
164
167
  return ACTION;
165
168
  }({});
166
169
  export var INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
@@ -197,6 +200,7 @@ export var INPUT_METHOD = /*#__PURE__*/function (INPUT_METHOD) {
197
200
  INPUT_METHOD["MOUSE"] = "mouse";
198
201
  INPUT_METHOD["BROWSER"] = "browser";
199
202
  INPUT_METHOD["DOUBLE_CLICK"] = "doubleClick";
203
+ INPUT_METHOD["INLINE_SUGGESTION_FLOATING_TB"] = "inlineSuggestionFloatingToolbar";
200
204
  return INPUT_METHOD;
201
205
  }({});
202
206
  export var INSERT_MEDIA_VIA = /*#__PURE__*/function (INSERT_MEDIA_VIA) {
@@ -288,6 +292,7 @@ export var ACTION_SUBJECT_ID = /*#__PURE__*/function (ACTION_SUBJECT_ID) {
288
292
  ACTION_SUBJECT_ID["ACTIVITY"] = "activity";
289
293
  ACTION_SUBJECT_ID["AI_DEFINITIONS_DEFINE_BUTTON"] = "aiDefinitionsDefineButton";
290
294
  ACTION_SUBJECT_ID["AI_DEFINITIONS_AUTO_HIGHLIGHT"] = "aiDefinitionsAutoHighlight";
295
+ ACTION_SUBJECT_ID["AI_INLINE_SUGGESTION"] = "aiInlineSuggestion";
291
296
  ACTION_SUBJECT_ID["AI_PANELS_BODIED_EXTENSION"] = "aiPanelsBodiedExtension";
292
297
  ACTION_SUBJECT_ID["AI_PROMPT_LINK_PICKER_BUTTON"] = "aiPromptLinkPickerButton";
293
298
  ACTION_SUBJECT_ID["AI_PROMPT_MENTION_BUTTON"] = "aiPromptMentionButton";
@@ -7,7 +7,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
7
7
  import { isFedRamp } from './environment';
8
8
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
9
9
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
10
- var packageVersion = "99.17.4";
10
+ var packageVersion = "99.18.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // TODO: Sanitise the URL instead of just removing it
@@ -20,7 +20,7 @@ import withAnalyticsContext from '@atlaskit/analytics-next/withAnalyticsContext'
20
20
  import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import Layer from '../Layer';
22
22
  var packageName = "@atlaskit/editor-common";
23
- var packageVersion = "99.17.4";
23
+ var packageVersion = "99.18.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -47,3 +47,4 @@ export type { AIProactiveEventPayload } from './types/ai-proactive-events';
47
47
  export type { AIDefinitionsEventPayload } from './types/ai-definitions-events';
48
48
  export type { AIUnifiedEventPayload, AIUnifiedCommonAttributes } from './types/ai-unified-events';
49
49
  export type { ActiveSessionEventPayload, ActiveSessionEventAttributes, } from './types/activity-session-events';
50
+ export { type AIInlineSuggestionPayload, AI_SUGGESTION_TRIGGERED_FROM, } from './types/ai-inline-suggestion-events';
@@ -0,0 +1,22 @@
1
+ import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
2
+ import { type InsertDateAEP } from './insert-events';
3
+ import { type TrackAEP } from './utils';
4
+ export declare enum AI_SUGGESTION_TRIGGERED_FROM {
5
+ ENTER_BUTTON = "enterKeydown",
6
+ TAB_BUTTON = "tabKeydown",
7
+ ESCAPE_BUTTON = "escapeKeydown",
8
+ TOOLBAR = "toolbar"
9
+ }
10
+ type SuggestionPayload = BaseLineSuggestionPayload & {
11
+ triggeredFrom?: AI_SUGGESTION_TRIGGERED_FROM;
12
+ };
13
+ type BaseLineSuggestionPayload = {
14
+ locale: string;
15
+ suggestionType?: string;
16
+ matchedFormat?: string;
17
+ };
18
+ type InsertSuggestionAEP = TrackAEP<ACTION.SUGGESTION_INSERTED, ACTION_SUBJECT.EDITOR_PLUGIN_AI, ACTION_SUBJECT_ID.AI_INLINE_SUGGESTION, SuggestionPayload, undefined>;
19
+ type DismissSuggestionAEP = TrackAEP<ACTION.SUGGESTION_DISMISSED, ACTION_SUBJECT.EDITOR_PLUGIN_AI, ACTION_SUBJECT_ID.AI_INLINE_SUGGESTION, SuggestionPayload, undefined>;
20
+ type ViewedSuggestionAEP = TrackAEP<ACTION.SUGGESTION_VIEWED, ACTION_SUBJECT.EDITOR_PLUGIN_AI, ACTION_SUBJECT_ID.AI_INLINE_SUGGESTION, BaseLineSuggestionPayload, undefined>;
21
+ export type AIInlineSuggestionPayload = InsertSuggestionAEP | DismissSuggestionAEP | ViewedSuggestionAEP | InsertDateAEP;
22
+ export {};
@@ -173,7 +173,15 @@ export declare enum ACTION {
173
173
  TOGGLE_CODE_BLOCK_WRAP = "toggleCodeBlockWrap",
174
174
  RESIZED = "resized",
175
175
  BLOCKS_DRAG_INIT = "blocksDragInit",
176
- SINGLE_COL_LAYOUT_DETECTED = "singleColumLayoutDetected"
176
+ SINGLE_COL_LAYOUT_DETECTED = "singleColumLayoutDetected",
177
+ /**
178
+ * used in Editor AI inline suggestion for a track event when a suggestion is inserted
179
+ * previously tracked events being used by Editor AI proactive suggestion
180
+ *
181
+ */
182
+ SUGGESTION_INSERTED = "suggestionInserted",
183
+ SUGGESTION_DISMISSED = "suggestionDismissed",
184
+ SUGGESTION_VIEWED = "suggestionViewed"
177
185
  }
178
186
  export declare enum INPUT_METHOD {
179
187
  ASCII = "ascii",
@@ -208,7 +216,8 @@ export declare enum INPUT_METHOD {
208
216
  TABLE_CONTEXT_MENU = "tableContextMenu",
209
217
  MOUSE = "mouse",
210
218
  BROWSER = "browser",
211
- DOUBLE_CLICK = "doubleClick"
219
+ DOUBLE_CLICK = "doubleClick",
220
+ INLINE_SUGGESTION_FLOATING_TB = "inlineSuggestionFloatingToolbar"
212
221
  }
213
222
  export declare enum INSERT_MEDIA_VIA {
214
223
  LOCAL_UPLOAD = "localUpload",
@@ -296,6 +305,7 @@ export declare enum ACTION_SUBJECT_ID {
296
305
  ACTIVITY = "activity",
297
306
  AI_DEFINITIONS_DEFINE_BUTTON = "aiDefinitionsDefineButton",
298
307
  AI_DEFINITIONS_AUTO_HIGHLIGHT = "aiDefinitionsAutoHighlight",
308
+ AI_INLINE_SUGGESTION = "aiInlineSuggestion",
299
309
  AI_PANELS_BODIED_EXTENSION = "aiPanelsBodiedExtension",
300
310
  AI_PROMPT_LINK_PICKER_BUTTON = "aiPromptLinkPickerButton",
301
311
  AI_PROMPT_MENTION_BUTTON = "aiPromptMentionButton",
@@ -7,6 +7,7 @@ import type { ActiveSessionEventPayload } from './activity-session-events';
7
7
  import type { AICommandPaletteEventPayload } from './ai-command-palette-events';
8
8
  import type { AIDefinitionsEventPayload } from './ai-definitions-events';
9
9
  import type { AIEventPayload } from './ai-events';
10
+ import type { AIInlineSuggestionPayload } from './ai-inline-suggestion-events';
10
11
  import type { AIProactiveEventPayload } from './ai-proactive-events';
11
12
  import type { AIUnifiedEventPayload } from './ai-unified-events';
12
13
  import type { AvatarEventPayload } from './avatar';
@@ -53,7 +54,7 @@ export type SimplifiedNode = {
53
54
  marks?: string[];
54
55
  content?: SimplifiedNode[];
55
56
  };
56
- export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload;
57
+ export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload;
57
58
  type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
58
59
  previousColor: string;
59
60
  newColor: string;
@@ -109,8 +109,8 @@ type InsertLayoutAEP = InsertAEP<ACTION_SUBJECT_ID.LAYOUT, {
109
109
  nodeTypes?: string;
110
110
  hasSelectedMultipleNodes?: boolean;
111
111
  }, undefined>;
112
- type InsertDateAEP = InsertAEP<ACTION_SUBJECT_ID.DATE, {
113
- inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU;
112
+ export type InsertDateAEP = InsertAEP<ACTION_SUBJECT_ID.DATE, {
113
+ inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.INLINE_SUGGESTION_FLOATING_TB;
114
114
  }, undefined>;
115
115
  type InsertExtensionAEP = InsertAEP<ACTION_SUBJECT_ID.EXTENSION, {
116
116
  extensionType: string;
@@ -326,6 +326,10 @@ export interface FloatingToolbarConfig {
326
326
  preventPopupOverflow?: boolean;
327
327
  mediaAssistiveMessage?: string;
328
328
  stick?: boolean;
329
+ /**
330
+ * Used in `platform_editor_controls` experiment - force new contextual toolbar to display without collapse and expand functionality
331
+ */
332
+ forceStaticToolbar?: boolean;
329
333
  }
330
334
  export type FloatingToolbarHandler = (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory, processedConfigs?: Array<FloatingToolbarConfig>) => FloatingToolbarConfig | undefined;
331
335
  export {};
@@ -47,3 +47,4 @@ export type { AIProactiveEventPayload } from './types/ai-proactive-events';
47
47
  export type { AIDefinitionsEventPayload } from './types/ai-definitions-events';
48
48
  export type { AIUnifiedEventPayload, AIUnifiedCommonAttributes } from './types/ai-unified-events';
49
49
  export type { ActiveSessionEventPayload, ActiveSessionEventAttributes, } from './types/activity-session-events';
50
+ export { type AIInlineSuggestionPayload, AI_SUGGESTION_TRIGGERED_FROM, } from './types/ai-inline-suggestion-events';
@@ -0,0 +1,22 @@
1
+ import { type ACTION, type ACTION_SUBJECT, type ACTION_SUBJECT_ID } from './enums';
2
+ import { type InsertDateAEP } from './insert-events';
3
+ import { type TrackAEP } from './utils';
4
+ export declare enum AI_SUGGESTION_TRIGGERED_FROM {
5
+ ENTER_BUTTON = "enterKeydown",
6
+ TAB_BUTTON = "tabKeydown",
7
+ ESCAPE_BUTTON = "escapeKeydown",
8
+ TOOLBAR = "toolbar"
9
+ }
10
+ type SuggestionPayload = BaseLineSuggestionPayload & {
11
+ triggeredFrom?: AI_SUGGESTION_TRIGGERED_FROM;
12
+ };
13
+ type BaseLineSuggestionPayload = {
14
+ locale: string;
15
+ suggestionType?: string;
16
+ matchedFormat?: string;
17
+ };
18
+ type InsertSuggestionAEP = TrackAEP<ACTION.SUGGESTION_INSERTED, ACTION_SUBJECT.EDITOR_PLUGIN_AI, ACTION_SUBJECT_ID.AI_INLINE_SUGGESTION, SuggestionPayload, undefined>;
19
+ type DismissSuggestionAEP = TrackAEP<ACTION.SUGGESTION_DISMISSED, ACTION_SUBJECT.EDITOR_PLUGIN_AI, ACTION_SUBJECT_ID.AI_INLINE_SUGGESTION, SuggestionPayload, undefined>;
20
+ type ViewedSuggestionAEP = TrackAEP<ACTION.SUGGESTION_VIEWED, ACTION_SUBJECT.EDITOR_PLUGIN_AI, ACTION_SUBJECT_ID.AI_INLINE_SUGGESTION, BaseLineSuggestionPayload, undefined>;
21
+ export type AIInlineSuggestionPayload = InsertSuggestionAEP | DismissSuggestionAEP | ViewedSuggestionAEP | InsertDateAEP;
22
+ export {};
@@ -173,7 +173,15 @@ export declare enum ACTION {
173
173
  TOGGLE_CODE_BLOCK_WRAP = "toggleCodeBlockWrap",
174
174
  RESIZED = "resized",
175
175
  BLOCKS_DRAG_INIT = "blocksDragInit",
176
- SINGLE_COL_LAYOUT_DETECTED = "singleColumLayoutDetected"
176
+ SINGLE_COL_LAYOUT_DETECTED = "singleColumLayoutDetected",
177
+ /**
178
+ * used in Editor AI inline suggestion for a track event when a suggestion is inserted
179
+ * previously tracked events being used by Editor AI proactive suggestion
180
+ *
181
+ */
182
+ SUGGESTION_INSERTED = "suggestionInserted",
183
+ SUGGESTION_DISMISSED = "suggestionDismissed",
184
+ SUGGESTION_VIEWED = "suggestionViewed"
177
185
  }
178
186
  export declare enum INPUT_METHOD {
179
187
  ASCII = "ascii",
@@ -208,7 +216,8 @@ export declare enum INPUT_METHOD {
208
216
  TABLE_CONTEXT_MENU = "tableContextMenu",
209
217
  MOUSE = "mouse",
210
218
  BROWSER = "browser",
211
- DOUBLE_CLICK = "doubleClick"
219
+ DOUBLE_CLICK = "doubleClick",
220
+ INLINE_SUGGESTION_FLOATING_TB = "inlineSuggestionFloatingToolbar"
212
221
  }
213
222
  export declare enum INSERT_MEDIA_VIA {
214
223
  LOCAL_UPLOAD = "localUpload",
@@ -296,6 +305,7 @@ export declare enum ACTION_SUBJECT_ID {
296
305
  ACTIVITY = "activity",
297
306
  AI_DEFINITIONS_DEFINE_BUTTON = "aiDefinitionsDefineButton",
298
307
  AI_DEFINITIONS_AUTO_HIGHLIGHT = "aiDefinitionsAutoHighlight",
308
+ AI_INLINE_SUGGESTION = "aiInlineSuggestion",
299
309
  AI_PANELS_BODIED_EXTENSION = "aiPanelsBodiedExtension",
300
310
  AI_PROMPT_LINK_PICKER_BUTTON = "aiPromptLinkPickerButton",
301
311
  AI_PROMPT_MENTION_BUTTON = "aiPromptMentionButton",
@@ -7,6 +7,7 @@ import type { ActiveSessionEventPayload } from './activity-session-events';
7
7
  import type { AICommandPaletteEventPayload } from './ai-command-palette-events';
8
8
  import type { AIDefinitionsEventPayload } from './ai-definitions-events';
9
9
  import type { AIEventPayload } from './ai-events';
10
+ import type { AIInlineSuggestionPayload } from './ai-inline-suggestion-events';
10
11
  import type { AIProactiveEventPayload } from './ai-proactive-events';
11
12
  import type { AIUnifiedEventPayload } from './ai-unified-events';
12
13
  import type { AvatarEventPayload } from './avatar';
@@ -53,7 +54,7 @@ export type SimplifiedNode = {
53
54
  marks?: string[];
54
55
  content?: SimplifiedNode[];
55
56
  };
56
- export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload;
57
+ export type AnalyticsEventPayload<T = void> = AvatarEventPayload | GeneralEventPayload<T> | FormatEventPayload | SubstituteEventPayload | InsertEventPayload | NodeEventPayload | MoveContentEventPayload | MediaEventPayload | TableEventPayload | PasteEventPayload | CutCopyEventPayload | ErrorEventPayload | ExperimentalEventPayload | FindReplaceEventPayload | DateEventPayload | SelectionEventPayload | ListEventPayload | ConfigPanelEventPayload | ElementBrowserEventPayload | CreateLinkInlineDialogEventPayload | HighlightActionsEventPayload | UnsupportedContentPayload | ExtensionEventPayload | TransactionEventPayload | TypeAheadPayload | UnlinkToolbarAEP | EditLinkToolbarAEP | OpenSettingsToolbarAEP | CustomPanelEventPayload | FeatureExposureAEP | NewCollabSyncUpErrorAEP | UnsupportedContentTooltipPayload | ReferentialityEventPayload | LoomEventPayload | MBEEventPayload | HighlightEventPayload | DatasourceClickedPayload | ElementEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload | AIInlineSuggestionPayload;
57
58
  type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
58
59
  previousColor: string;
59
60
  newColor: string;
@@ -109,8 +109,8 @@ type InsertLayoutAEP = InsertAEP<ACTION_SUBJECT_ID.LAYOUT, {
109
109
  nodeTypes?: string;
110
110
  hasSelectedMultipleNodes?: boolean;
111
111
  }, undefined>;
112
- type InsertDateAEP = InsertAEP<ACTION_SUBJECT_ID.DATE, {
113
- inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU;
112
+ export type InsertDateAEP = InsertAEP<ACTION_SUBJECT_ID.DATE, {
113
+ inputMethod: INPUT_METHOD.QUICK_INSERT | INPUT_METHOD.TOOLBAR | INPUT_METHOD.INSERT_MENU | INPUT_METHOD.INLINE_SUGGESTION_FLOATING_TB;
114
114
  }, undefined>;
115
115
  type InsertExtensionAEP = InsertAEP<ACTION_SUBJECT_ID.EXTENSION, {
116
116
  extensionType: string;
@@ -329,6 +329,10 @@ export interface FloatingToolbarConfig {
329
329
  preventPopupOverflow?: boolean;
330
330
  mediaAssistiveMessage?: string;
331
331
  stick?: boolean;
332
+ /**
333
+ * Used in `platform_editor_controls` experiment - force new contextual toolbar to display without collapse and expand functionality
334
+ */
335
+ forceStaticToolbar?: boolean;
332
336
  }
333
337
  export type FloatingToolbarHandler = (state: EditorState, intl: IntlShape, providerFactory: ProviderFactory, processedConfigs?: Array<FloatingToolbarConfig>) => FloatingToolbarConfig | undefined;
334
338
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "99.17.4",
3
+ "version": "99.18.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/"
@@ -120,7 +120,7 @@
120
120
  "@atlaskit/analytics-next": "^10.3.0",
121
121
  "@atlaskit/atlassian-context": "^0.1.0",
122
122
  "@atlaskit/button": "^20.5.0",
123
- "@atlaskit/code": "^15.7.0",
123
+ "@atlaskit/code": "^15.8.0",
124
124
  "@atlaskit/codemod-utils": "^4.2.0",
125
125
  "@atlaskit/custom-steps": "^0.10.0",
126
126
  "@atlaskit/dropdown-menu": "^12.26.0",
@@ -130,34 +130,34 @@
130
130
  "@atlaskit/editor-shared-styles": "^3.3.0",
131
131
  "@atlaskit/editor-tables": "^2.9.0",
132
132
  "@atlaskit/emoji": "^67.14.0",
133
- "@atlaskit/icon": "^23.9.0",
133
+ "@atlaskit/icon": "^23.10.0",
134
134
  "@atlaskit/icon-object": "^6.11.0",
135
- "@atlaskit/link-datasource": "^3.20.0",
136
- "@atlaskit/link-picker": "^1.49.0",
135
+ "@atlaskit/link-datasource": "^3.21.0",
136
+ "@atlaskit/link-picker": "^1.50.0",
137
137
  "@atlaskit/media-card": "^78.19.0",
138
138
  "@atlaskit/media-client": "^31.1.0",
139
139
  "@atlaskit/media-client-react": "^3.0.0",
140
140
  "@atlaskit/media-common": "^11.8.0",
141
141
  "@atlaskit/media-file-preview": "^0.10.0",
142
142
  "@atlaskit/media-picker": "^67.1.0",
143
- "@atlaskit/media-ui": "^27.4.0",
143
+ "@atlaskit/media-ui": "^27.5.0",
144
144
  "@atlaskit/media-viewer": "50.1.8",
145
145
  "@atlaskit/mention": "^23.11.0",
146
146
  "@atlaskit/menu": "^2.14.0",
147
147
  "@atlaskit/onboarding": "^12.3.0",
148
148
  "@atlaskit/platform-feature-flags": "^1.1.0",
149
149
  "@atlaskit/popper": "^6.4.0",
150
- "@atlaskit/primitives": "^13.5.0",
150
+ "@atlaskit/primitives": "^13.6.0",
151
151
  "@atlaskit/profilecard": "^22.2.0",
152
152
  "@atlaskit/section-message": "^6.9.0",
153
- "@atlaskit/smart-card": "^34.10.0",
153
+ "@atlaskit/smart-card": "^34.11.0",
154
154
  "@atlaskit/smart-user-picker": "^7.0.0",
155
- "@atlaskit/spinner": "^17.1.0",
155
+ "@atlaskit/spinner": "^17.2.0",
156
156
  "@atlaskit/task-decision": "^17.12.0",
157
157
  "@atlaskit/textfield": "^7.0.0",
158
158
  "@atlaskit/tmp-editor-statsig": "^2.47.0",
159
159
  "@atlaskit/tokens": "^3.3.0",
160
- "@atlaskit/tooltip": "^19.1.0",
160
+ "@atlaskit/tooltip": "^19.2.0",
161
161
  "@atlaskit/width-detector": "^4.4.0",
162
162
  "@babel/runtime": "^7.0.0",
163
163
  "@emotion/react": "^11.7.1",