@atlaskit/editor-common 125.4.0 → 126.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 126.0.0
4
+
5
+ ### Major Changes
6
+
7
+ - [`f502381f5d221`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/f502381f5d221) -
8
+ Complete AI Suggestions analytics for right-rail lifecycle, empty-state interactions,
9
+ cancellation, suggestion lifecycle and source context, agent attribution, and aggregate
10
+ discard-all actions.
11
+
12
+ ### Patch Changes
13
+
14
+ - Updated dependencies
15
+
3
16
  ## 125.4.0
4
17
 
5
18
  ### Minor Changes
@@ -103,6 +103,9 @@
103
103
  {
104
104
  "path": "../../../linking-platform/link-picker/afm-products/tsconfig.json"
105
105
  },
106
+ {
107
+ "path": "../../../design-system/logo/afm-products/tsconfig.json"
108
+ },
106
109
  {
107
110
  "path": "../../../media/media-card/afm-products/tsconfig.json"
108
111
  },
@@ -43,6 +43,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
43
43
  ACTION["DEACTIVATED"] = "deactivated";
44
44
  ACTION["DECREMENTED"] = "decremented";
45
45
  ACTION["DELETED"] = "deleted";
46
+ ACTION["DISCARD_ALL"] = "discardAll";
46
47
  ACTION["DISCARDED_INVALID_STEPS_FROM_TRANSACTION"] = "discardedInvalidStepsFromTransaction";
47
48
  ACTION["DISCARDED"] = "discarded";
48
49
  /** used in @atlassian/editor-referentiality */
@@ -66,6 +67,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
66
67
  ACTION["ENTERED"] = "entered";
67
68
  ACTION["ERROR"] = "error";
68
69
  ACTION["ERRORED"] = "errored";
70
+ ACTION["EMPTY_STATE_EXPOSED"] = "emptyStateExposed";
69
71
  ACTION["EXPERIENCE_MEASURED"] = "experienceMeasured";
70
72
  ACTION["EXPERIENCE_SAMPLED"] = "experienceSampled";
71
73
  ACTION["EXPOSED"] = "exposed";
@@ -122,6 +124,7 @@ var ACTION = exports.ACTION = /*#__PURE__*/function (ACTION) {
122
124
  ACTION["REFERENCE_SYNCED_BLOCK_UPDATE"] = "referenceSyncedBlockUpdate";
123
125
  ACTION["REFERENCE_SYNCED_BLOCK_UNSYNC"] = "referenceSyncedBlockUnsync";
124
126
  ACTION["REFERENCE_SYNCED_BLOCK_COPY"] = "referenceSyncedBlockCopy";
127
+ ACTION["RIGHT_RAIL_CLOSED"] = "rightRailClosed";
125
128
  ACTION["RIGHT_RAIL_VIEWED"] = "rightRailViewed";
126
129
  ACTION["REPLACED_ALL"] = "replacedAll";
127
130
  ACTION["REPLACED_ONE"] = "replacedOne";
@@ -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 = "125.3.0";
30
+ var packageVersion = "125.4.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 = "125.3.0";
27
+ var packageVersion = "125.4.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -19,6 +19,8 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
19
19
 
20
20
  // eslint-disable-next-line @atlaskit/ui-styling-standard/use-compiled, @typescript-eslint/consistent-type-imports -- Ignored via go/DSP-18766; jsx required at runtime for @jsxRuntime classic
21
21
 
22
+ // oxlint-disable-next-line eslint/no-redeclare
23
+
22
24
  /*
23
25
  ** The context is used to handle the keydown events of submenus.
24
26
  ** Because the keyboard navigation is explicitly managed for main toolbar items
@@ -39,6 +39,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
39
39
  ACTION["DEACTIVATED"] = "deactivated";
40
40
  ACTION["DECREMENTED"] = "decremented";
41
41
  ACTION["DELETED"] = "deleted";
42
+ ACTION["DISCARD_ALL"] = "discardAll";
42
43
  ACTION["DISCARDED_INVALID_STEPS_FROM_TRANSACTION"] = "discardedInvalidStepsFromTransaction";
43
44
  ACTION["DISCARDED"] = "discarded";
44
45
  /** used in @atlassian/editor-referentiality */
@@ -62,6 +63,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
62
63
  ACTION["ENTERED"] = "entered";
63
64
  ACTION["ERROR"] = "error";
64
65
  ACTION["ERRORED"] = "errored";
66
+ ACTION["EMPTY_STATE_EXPOSED"] = "emptyStateExposed";
65
67
  ACTION["EXPERIENCE_MEASURED"] = "experienceMeasured";
66
68
  ACTION["EXPERIENCE_SAMPLED"] = "experienceSampled";
67
69
  ACTION["EXPOSED"] = "exposed";
@@ -118,6 +120,7 @@ export let ACTION = /*#__PURE__*/function (ACTION) {
118
120
  ACTION["REFERENCE_SYNCED_BLOCK_UPDATE"] = "referenceSyncedBlockUpdate";
119
121
  ACTION["REFERENCE_SYNCED_BLOCK_UNSYNC"] = "referenceSyncedBlockUnsync";
120
122
  ACTION["REFERENCE_SYNCED_BLOCK_COPY"] = "referenceSyncedBlockCopy";
123
+ ACTION["RIGHT_RAIL_CLOSED"] = "rightRailClosed";
121
124
  ACTION["RIGHT_RAIL_VIEWED"] = "rightRailViewed";
122
125
  ACTION["REPLACED_ALL"] = "replacedAll";
123
126
  ACTION["REPLACED_ONE"] = "replacedOne";
@@ -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 = "125.3.0";
16
+ const packageVersion = "125.4.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 = "125.3.0";
17
+ const packageVersion = "125.4.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -11,6 +11,9 @@ import { ELEMENT_BROWSER_ID } from '../../element-browser';
11
11
  import { fullPageMessages } from '../../messages';
12
12
  import { mediaInsertMessages } from '../../messages/media-insert';
13
13
  import { EDIT_AREA_ID } from '../../ui';
14
+
15
+ // oxlint-disable-next-line eslint/no-redeclare
16
+
14
17
  /*
15
18
  ** The context is used to handle the keydown events of submenus.
16
19
  ** Because the keyboard navigation is explicitly managed for main toolbar items
@@ -39,6 +39,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
39
39
  ACTION["DEACTIVATED"] = "deactivated";
40
40
  ACTION["DECREMENTED"] = "decremented";
41
41
  ACTION["DELETED"] = "deleted";
42
+ ACTION["DISCARD_ALL"] = "discardAll";
42
43
  ACTION["DISCARDED_INVALID_STEPS_FROM_TRANSACTION"] = "discardedInvalidStepsFromTransaction";
43
44
  ACTION["DISCARDED"] = "discarded";
44
45
  /** used in @atlassian/editor-referentiality */
@@ -62,6 +63,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
62
63
  ACTION["ENTERED"] = "entered";
63
64
  ACTION["ERROR"] = "error";
64
65
  ACTION["ERRORED"] = "errored";
66
+ ACTION["EMPTY_STATE_EXPOSED"] = "emptyStateExposed";
65
67
  ACTION["EXPERIENCE_MEASURED"] = "experienceMeasured";
66
68
  ACTION["EXPERIENCE_SAMPLED"] = "experienceSampled";
67
69
  ACTION["EXPOSED"] = "exposed";
@@ -118,6 +120,7 @@ export var ACTION = /*#__PURE__*/function (ACTION) {
118
120
  ACTION["REFERENCE_SYNCED_BLOCK_UPDATE"] = "referenceSyncedBlockUpdate";
119
121
  ACTION["REFERENCE_SYNCED_BLOCK_UNSYNC"] = "referenceSyncedBlockUnsync";
120
122
  ACTION["REFERENCE_SYNCED_BLOCK_COPY"] = "referenceSyncedBlockCopy";
123
+ ACTION["RIGHT_RAIL_CLOSED"] = "rightRailClosed";
121
124
  ACTION["RIGHT_RAIL_VIEWED"] = "rightRailViewed";
122
125
  ACTION["REPLACED_ALL"] = "replacedAll";
123
126
  ACTION["REPLACED_ONE"] = "replacedOne";
@@ -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 = "125.3.0";
22
+ var packageVersion = "125.4.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 = "125.3.0";
24
+ var packageVersion = "125.4.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -11,6 +11,9 @@ import { ELEMENT_BROWSER_ID } from '../../element-browser';
11
11
  import { fullPageMessages } from '../../messages';
12
12
  import { mediaInsertMessages } from '../../messages/media-insert';
13
13
  import { EDIT_AREA_ID } from '../../ui';
14
+
15
+ // oxlint-disable-next-line eslint/no-redeclare
16
+
14
17
  /*
15
18
  ** The context is used to handle the keydown events of submenus.
16
19
  ** Because the keyboard navigation is explicitly managed for main toolbar items
@@ -59,4 +59,4 @@ export { type NcsSessionStepEventAEP, type NcsSessionStepMetrics, } from './type
59
59
  export type { BlockMenuEventPayload } from './types/block-menu-events';
60
60
  export type { BreakoutEventPayload, BreakoutSupportedNodes } from './types/breakout-events';
61
61
  export type { RendererSyncBlockEventPayload, SyncBlockEventPayload, SyncedBlockSSRErrorAEP, } from './types/sync-block-events';
62
- export type { AiSuggestionsConversationErrorReason, AiSuggestionInteractionPoint, AiSuggestionsEntryPoint, AiSuggestionsEventPayload, AiSuggestionsRightRailEntryPoint, } from './types/ai-suggestions-events';
62
+ export type { AiSuggestionsConversationErrorReason, AiSuggestionInteractionPoint, AiSuggestionsEntryPoint, AiSuggestionsEventPayload, AiSuggestionsEmptyStateType, AiSuggestionsRightRailEntryPoint, } from './types/ai-suggestions-events';
@@ -19,6 +19,7 @@ export type AiSuggestionsEntryPoint = 'primaryToolbar'
19
19
  | 'followUpCard';
20
20
  export type AiSuggestionInteractionPoint = 'sidebar' | 'card' | 'statusBar';
21
21
  export type AiSuggestionsRightRailEntryPoint = 'suggestionsPanel' | 'suggestionsTab' | 'suggestionCard';
22
+ export type AiSuggestionsEmptyStateType = 'initial' | 'noSuggestionsFound' | 'suggestionsResolved';
22
23
  export type AiSuggestionsConversationErrorReason = 'agentDeactivated' | 'agentProvisioning' | 'agentExternalConfigReference' | 'conversationSetup' | 'streamError';
23
24
  type NoDiffSuggestionAEP = OperationalAEP<ACTION.NO_DIFF_FOUND, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, {
24
25
  suggestionType: string;
@@ -53,30 +54,50 @@ type EntryPointExposureAEP = TrackAEP<ACTION.EXPOSED, ACTION_SUBJECT.AI_SUGGESTI
53
54
  }, undefined>;
54
55
  type AcceptSuggestionAEP = TrackAEP<ACTION.ACCEPTED, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, {
55
56
  affectedBlocks: number;
57
+ agentId?: string;
56
58
  charactersAdded?: number;
57
59
  charactersRemoved?: number;
60
+ hasSources: boolean;
58
61
  interactionPoint: AiSuggestionInteractionPoint;
62
+ isDiffHidden: boolean;
63
+ suggestionId: string;
59
64
  suggestionType: string;
60
65
  }, undefined>;
61
- type DiscardSuggestionAEP = TrackAEP<ACTION.DISCARDED, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, {
66
+ type DiscardedSuggestionAttributes = {
62
67
  actionKind: string;
63
68
  affectedBlocks: number;
69
+ agentId?: string;
70
+ hasSources: boolean;
64
71
  interactionPoint: AiSuggestionInteractionPoint;
72
+ suggestionId: string;
65
73
  suggestionType: string;
74
+ };
75
+ type CancelSuggestionsAEP = TrackAEP<ACTION.CANCELLED, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, {
76
+ interactionPoint: AiSuggestionInteractionPoint;
77
+ }, undefined>;
78
+ type DiscardSuggestionAEP = TrackAEP<ACTION.DISCARDED, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, DiscardedSuggestionAttributes, undefined>;
79
+ type DiscardAllSuggestionsAEP = TrackAEP<ACTION.DISCARD_ALL, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, {
80
+ numberOfSuggestions: number;
81
+ suggestionDetails: DiscardedSuggestionAttributes[];
66
82
  }, undefined>;
67
83
  type DismissSuggestionAEP = TrackAEP<ACTION.DISMISSED, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, {
68
84
  affectedBlocks: number;
85
+ hasSources: boolean;
69
86
  interactionPoint: AiSuggestionInteractionPoint;
87
+ suggestionId: string;
70
88
  suggestionType: string;
71
89
  }, undefined>;
72
90
  type ViewSuggestionAEP = TrackAEP<ACTION.VIEWED, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, {
73
91
  actionKind: string;
74
92
  affectedBlocks: number;
93
+ agentId?: string;
75
94
  blockTypes: string[];
76
95
  charactersToAdd?: number;
77
96
  charactersToRemove?: number;
97
+ hasSources: boolean;
78
98
  interactionPoint: AiSuggestionInteractionPoint;
79
99
  suggestionCardCharacterCount: number;
100
+ suggestionId: string;
80
101
  suggestionType: string;
81
102
  }, undefined>;
82
103
  type RightRailViewedAEP = TrackAEP<ACTION.RIGHT_RAIL_VIEWED, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, {
@@ -88,11 +109,16 @@ type RightRailViewedAEP = TrackAEP<ACTION.RIGHT_RAIL_VIEWED, ACTION_SUBJECT.AI_S
88
109
  suggestionType: string;
89
110
  }>;
90
111
  }, undefined>;
112
+ type RightRailClosedAEP = TrackAEP<ACTION.RIGHT_RAIL_CLOSED, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, undefined, undefined>;
91
113
  type ViewSuggestionReasoningAEP = TrackAEP<ACTION.REASONING_VIEWED, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, {
92
114
  affectedBlocks: number;
115
+ hasSources: boolean;
93
116
  interactionPoint: AiSuggestionInteractionPoint;
94
117
  reasoningCharacterCount: number;
95
118
  suggestionType: string;
96
119
  }, undefined>;
97
- export type AiSuggestionsEventPayload = NoDiffSuggestionAEP | ConversationErrorAEP | RegenerateSuggestionsErrorAEP | EntryPointClickedAEP | SuggestionsErrorRetryClickedAEP | EntryPointExposureAEP | AcceptSuggestionAEP | DiscardSuggestionAEP | DismissSuggestionAEP | ViewSuggestionAEP | RightRailViewedAEP | ViewSuggestionReasoningAEP;
120
+ type EmptyStateExposedAEP = TrackAEP<ACTION.EMPTY_STATE_EXPOSED, ACTION_SUBJECT.AI_SUGGESTIONS, undefined, {
121
+ emptyStateType: AiSuggestionsEmptyStateType;
122
+ }, undefined>;
123
+ export type AiSuggestionsEventPayload = NoDiffSuggestionAEP | ConversationErrorAEP | RegenerateSuggestionsErrorAEP | EntryPointClickedAEP | SuggestionsErrorRetryClickedAEP | EntryPointExposureAEP | CancelSuggestionsAEP | AcceptSuggestionAEP | DiscardSuggestionAEP | DiscardAllSuggestionsAEP | DismissSuggestionAEP | ViewSuggestionAEP | RightRailViewedAEP | RightRailClosedAEP | ViewSuggestionReasoningAEP | EmptyStateExposedAEP;
98
124
  export {};
@@ -36,6 +36,7 @@ export declare enum ACTION {
36
36
  DEACTIVATED = "deactivated",
37
37
  DECREMENTED = "decremented",
38
38
  DELETED = "deleted",
39
+ DISCARD_ALL = "discardAll",
39
40
  DISCARDED_INVALID_STEPS_FROM_TRANSACTION = "discardedInvalidStepsFromTransaction",
40
41
  DISCARDED = "discarded",
41
42
  /** used in @atlassian/editor-referentiality */
@@ -59,6 +60,7 @@ export declare enum ACTION {
59
60
  ENTERED = "entered",
60
61
  ERROR = "error",
61
62
  ERRORED = "errored",
63
+ EMPTY_STATE_EXPOSED = "emptyStateExposed",
62
64
  EXPERIENCE_MEASURED = "experienceMeasured",
63
65
  EXPERIENCE_SAMPLED = "experienceSampled",
64
66
  EXPOSED = "exposed",
@@ -115,6 +117,7 @@ export declare enum ACTION {
115
117
  REFERENCE_SYNCED_BLOCK_UPDATE = "referenceSyncedBlockUpdate",
116
118
  REFERENCE_SYNCED_BLOCK_UNSYNC = "referenceSyncedBlockUnsync",
117
119
  REFERENCE_SYNCED_BLOCK_COPY = "referenceSyncedBlockCopy",
120
+ RIGHT_RAIL_CLOSED = "rightRailClosed",
118
121
  RIGHT_RAIL_VIEWED = "rightRailViewed",
119
122
  REPLACED_ALL = "replacedAll",
120
123
  REPLACED_ONE = "replacedOne",
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "125.4.0",
3
+ "version": "126.0.0",
4
4
  "description": "A package that contains common classes and components for editor and renderer",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"