@atlaskit/editor-common 99.4.2 → 99.5.1

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 (60) hide show
  1. package/CHANGELOG.md +38 -0
  2. package/dist/cjs/analytics/fire-analytics-event.js +8 -3
  3. package/dist/cjs/analytics/types/activity-session-events.js +5 -0
  4. package/dist/cjs/analytics/types/ai-events.js +5 -0
  5. package/dist/cjs/analytics/types/enums.js +6 -0
  6. package/dist/cjs/messages/ai-proactive-setting.js +109 -0
  7. package/dist/cjs/messages/ai-proactive-transform.js +99 -0
  8. package/dist/cjs/messages/ai-proactive.js +159 -0
  9. package/dist/cjs/messages/index.js +21 -0
  10. package/dist/cjs/monitoring/error.js +1 -1
  11. package/dist/cjs/ui/DropList/index.js +1 -1
  12. package/dist/es2019/analytics/fire-analytics-event.js +8 -3
  13. package/dist/es2019/analytics/types/activity-session-events.js +1 -0
  14. package/dist/es2019/analytics/types/ai-events.js +1 -0
  15. package/dist/es2019/analytics/types/enums.js +6 -0
  16. package/dist/es2019/messages/ai-proactive-setting.js +103 -0
  17. package/dist/es2019/messages/ai-proactive-transform.js +93 -0
  18. package/dist/es2019/messages/ai-proactive.js +153 -0
  19. package/dist/es2019/messages/index.js +3 -0
  20. package/dist/es2019/monitoring/error.js +1 -1
  21. package/dist/es2019/ui/DropList/index.js +1 -1
  22. package/dist/esm/analytics/fire-analytics-event.js +8 -3
  23. package/dist/esm/analytics/types/activity-session-events.js +1 -0
  24. package/dist/esm/analytics/types/ai-events.js +1 -0
  25. package/dist/esm/analytics/types/enums.js +6 -0
  26. package/dist/esm/messages/ai-proactive-setting.js +103 -0
  27. package/dist/esm/messages/ai-proactive-transform.js +93 -0
  28. package/dist/esm/messages/ai-proactive.js +153 -0
  29. package/dist/esm/messages/index.js +3 -0
  30. package/dist/esm/monitoring/error.js +1 -1
  31. package/dist/esm/ui/DropList/index.js +1 -1
  32. package/dist/types/analytics/api.d.ts +4 -1
  33. package/dist/types/analytics/index.d.ts +3 -1
  34. package/dist/types/analytics/types/activity-session-events.d.ts +24 -0
  35. package/dist/types/analytics/types/ai-events.d.ts +15 -0
  36. package/dist/types/analytics/types/ai-proactive-events.d.ts +4 -12
  37. package/dist/types/analytics/types/ai-unified-events.d.ts +7 -9
  38. package/dist/types/analytics/types/enums.d.ts +12 -0
  39. package/dist/types/analytics/types/events.d.ts +9 -5
  40. package/dist/types/collab/index.d.ts +1 -0
  41. package/dist/types/messages/ai-proactive-setting.d.ts +102 -0
  42. package/dist/types/messages/ai-proactive-transform.d.ts +92 -0
  43. package/dist/types/messages/ai-proactive.d.ts +152 -0
  44. package/dist/types/messages/index.d.ts +3 -0
  45. package/dist/types/types/feature-flags.d.ts +0 -8
  46. package/dist/types-ts4.5/analytics/api.d.ts +4 -1
  47. package/dist/types-ts4.5/analytics/index.d.ts +3 -1
  48. package/dist/types-ts4.5/analytics/types/activity-session-events.d.ts +24 -0
  49. package/dist/types-ts4.5/analytics/types/ai-events.d.ts +15 -0
  50. package/dist/types-ts4.5/analytics/types/ai-proactive-events.d.ts +4 -12
  51. package/dist/types-ts4.5/analytics/types/ai-unified-events.d.ts +7 -9
  52. package/dist/types-ts4.5/analytics/types/enums.d.ts +12 -0
  53. package/dist/types-ts4.5/analytics/types/events.d.ts +9 -5
  54. package/dist/types-ts4.5/collab/index.d.ts +1 -0
  55. package/dist/types-ts4.5/messages/ai-proactive-setting.d.ts +102 -0
  56. package/dist/types-ts4.5/messages/ai-proactive-transform.d.ts +92 -0
  57. package/dist/types-ts4.5/messages/ai-proactive.d.ts +152 -0
  58. package/dist/types-ts4.5/messages/index.d.ts +3 -0
  59. package/dist/types-ts4.5/types/feature-flags.d.ts +0 -8
  60. package/package.json +9 -9
@@ -0,0 +1,93 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var aiProactiveTransformMessages = defineMessages({
3
+ recommendationDefaultTitle: {
4
+ id: 'fabric.editor.ai.proactive.recommendation.default.title.non-final',
5
+ defaultMessage: 'Suggestion',
6
+ description: 'The default generic title displayed in the side context panel for AI recommendations which have not explicit matching override'
7
+ },
8
+ recommendationDefaultDescription: {
9
+ id: 'fabric.editor.ai.proactive.recommendation.default.description.non-final',
10
+ defaultMessage: 'A suggestion to improve the content.',
11
+ description: 'The default generic description displayed in the side context panel for AI recommendations which have no explicit matching override'
12
+ },
13
+ recommendationConvertToTableTitle: {
14
+ id: 'fabric.editor.ai.proactive.recommendation.convertToTable.title.non-final',
15
+ defaultMessage: 'Format in table',
16
+ description: 'The title displayed in the side context panel for AI recommendations which suggest a conversion to table operation'
17
+ },
18
+ recommendationConvertToTableDescription: {
19
+ id: 'fabric.editor.ai.proactive.recommendation.convertToTable.description.non-final',
20
+ defaultMessage: 'Format content in a table to improve readability.',
21
+ description: 'The description displayed in the side context panel for AI recommendations which suggest a conversion to table operation'
22
+ },
23
+ recommendationConvertToNotePanelTitle: {
24
+ id: 'fabric.editor.ai.proactive.recommendation.convertToNotePanel.title.non-final',
25
+ defaultMessage: 'Frame with note panel',
26
+ description: 'The title displayed in the side context panel for AI recommendations which suggest a conversion to note panel operation'
27
+ },
28
+ recommendationConvertToNotePanelDescription: {
29
+ id: 'fabric.editor.ai.proactive.recommendation.convertToNotePanel.description.non-final',
30
+ defaultMessage: 'Use a purple note panel to make your message stand out.',
31
+ description: 'The description displayed in the side context panel for AI recommendations which suggest a conversion to note panel operation'
32
+ },
33
+ recommendationConvertToInfoPanelTitle: {
34
+ id: 'fabric.editor.ai.proactive.recommendation.convertToInfoPanel.title.non-final',
35
+ defaultMessage: 'Frame with info panel',
36
+ description: 'The title displayed in the side context panel for AI recommendations which suggest a conversion to note panel operation'
37
+ },
38
+ recommendationConvertToInfoPanelDescription: {
39
+ id: 'fabric.editor.ai.proactive.recommendation.convertToInfoPanel.description.non-final',
40
+ defaultMessage: 'Use a blue info panel to make your message stand out. ',
41
+ description: 'The description displayed in the side context panel for AI recommendations which suggest a conversion to info panel operation'
42
+ },
43
+ recommendationConvertToWarnPanelTitle: {
44
+ id: 'fabric.editor.ai.proactive.recommendation.convertToWarnPanel.title.non-final',
45
+ defaultMessage: 'Frame with warning panel',
46
+ description: 'The title displayed in the side context panel for AI recommendations which suggest a conversion to warning panel operation'
47
+ },
48
+ recommendationConvertToWarnPanelDescription: {
49
+ id: 'fabric.editor.ai.proactive.recommendation.convertToWarnPanel.description.non-final',
50
+ defaultMessage: 'Use a yellow warning panel to make your message stand out.',
51
+ description: 'The description displayed in the side context panel for AI recommendations which suggest a conversion to warning panel operation'
52
+ },
53
+ recommendationConvertToErrorPanelTitle: {
54
+ id: 'fabric.editor.ai.proactive.recommendation.convertToErrorPanel.title.non-final',
55
+ defaultMessage: 'Frame with error panel',
56
+ description: 'The title displayed in the side context panel for AI recommendations which suggest a conversion to error panel operation'
57
+ },
58
+ recommendationConvertToErrorPanelDescription: {
59
+ id: 'fabric.editor.ai.proactive.recommendation.convertToErrorPanel.description.non-final',
60
+ defaultMessage: 'Use a red error panel to make your message stand out.',
61
+ description: 'The description displayed in the side context panel for AI recommendations which suggest a conversion to error panel operation'
62
+ },
63
+ recommendationConvertToSuccessPanelTitle: {
64
+ id: 'fabric.editor.ai.proactive.recommendation.convertToSuccessPanel.title.non-final',
65
+ defaultMessage: 'Frame with success panel',
66
+ description: 'The title displayed in the side context panel for AI recommendations which suggest a conversion to success panel operation'
67
+ },
68
+ recommendationConvertToSuccessPanelDescription: {
69
+ id: 'fabric.editor.ai.proactive.recommendation.convertToSuccessPanel.description.non-final',
70
+ defaultMessage: 'Use a green success panel to make your message stand out.',
71
+ description: 'The description displayed in the side context panel for AI recommendations which suggest a conversion to success panel operation'
72
+ },
73
+ recommendationSplitParagraphTitle: {
74
+ id: 'fabric.editor.ai.proactive.recommendation.splitParagraph.title.non-final',
75
+ defaultMessage: 'Divide paragraph',
76
+ description: 'The title displayed in the side context panel for AI recommendations which suggest a split paragraph operation'
77
+ },
78
+ recommendationSplitParagraphDescription: {
79
+ id: 'fabric.editor.ai.proactive.recommendation.splitParagraph.description.non-final',
80
+ defaultMessage: 'Add paragraph breaks to separate key ideas.',
81
+ description: 'The description displayed in the side context panel for AI recommendations which suggest a split paragraph operation'
82
+ },
83
+ recommendationFormatParagraphTitle: {
84
+ id: 'fabric.editor.ai.proactive.recommendation.formatParagraph.title.non-final',
85
+ defaultMessage: 'Improve paragraph',
86
+ description: 'The title displayed in the side context panel for AI recommendations which suggest a format paragraph operation'
87
+ },
88
+ recommendationFormatParagraphDescription: {
89
+ id: 'fabric.editor.ai.proactive.recommendation.formatParagraph.description.non-final',
90
+ defaultMessage: 'Simplify content and fix spelling and grammar.',
91
+ description: 'The description displayed in the side context panel for AI recommendations which suggest a format paragraph operation'
92
+ }
93
+ });
@@ -0,0 +1,153 @@
1
+ import { defineMessages } from 'react-intl-next';
2
+ export var aiProactiveMessages = defineMessages({
3
+ loadingIconAltText: {
4
+ id: 'fabric.editor.ai.proactive.loading.iconAltText.non-final',
5
+ defaultMessage: 'Loading icon',
6
+ description: 'Icon alt text of the Loading icon'
7
+ },
8
+ findingSuggestionsLabel: {
9
+ id: 'fabric.editor.ai.proactive.findingSuggestionsLabel.non-final',
10
+ defaultMessage: 'Finding suggestions',
11
+ description: 'The label next to the spinner which indicates recommendations are being requested.'
12
+ },
13
+ findingSuggestionsLoadingLabel: {
14
+ id: 'fabric.editor.ai.proactive.findingSuggestionsLoadingLabel.non-final',
15
+ defaultMessage: 'Finding suggestions',
16
+ description: 'This is the label under the loading spinner when suggestions are being reloaded.'
17
+ },
18
+ findingMoreSuggestionsLoadingLabel: {
19
+ id: 'fabric.editor.ai.proactive.findingMoreSuggestionsLoadingLabel.non-final',
20
+ defaultMessage: 'Finding more suggestions',
21
+ description: 'The label next to the spinner which indicates more recommendations are being requested.'
22
+ },
23
+ unhandledErrorMessage: {
24
+ id: 'fabric.editor.ai.proactive.error.unhandledErrorMessage',
25
+ defaultMessage: "We're having trouble. Close the dialog and try again.",
26
+ description: 'Message to users that displays when an unexpected error happens'
27
+ },
28
+ markdownErrorMessage: {
29
+ id: 'fabric.editor.ai.proactive.error.markdownErrorMessage',
30
+ defaultMessage: "We're having trouble generating the preview. Close the dialog and try again.",
31
+ description: 'Message to users that displays when an error occurs while generating a preview.'
32
+ },
33
+ recommendationPreviewButtonLabel: {
34
+ id: 'fabric.editor.ai.proactive.recommendation.preview.button.non-final',
35
+ defaultMessage: 'Preview',
36
+ description: 'The preview button label which allows the user to open the preview modal and see the AI recommendation which will be applied when the user inserts'
37
+ },
38
+ recommendationReplaceButtonLabel: {
39
+ id: 'fabric.editor.ai.proactive.recommendation.replace.button.non-final',
40
+ defaultMessage: 'Replace',
41
+ description: 'The replace button label, when clicked the AI recommendation which immediately be inserted'
42
+ },
43
+ recommendationDismissButtonLabel: {
44
+ id: 'fabric.editor.ai.proactive.recommendation.dismiss.button.non-final',
45
+ defaultMessage: 'Dismiss',
46
+ description: 'The dismiss button label,when clicked the AI recommendation will be removed from the list and no longer displayed to the user'
47
+ },
48
+ dismissProactiveRecommendation: {
49
+ id: 'fabric.editor.ai.proactive.preview.dismissProactiveRecommendation.non-final',
50
+ defaultMessage: 'Dismiss',
51
+ description: 'Label for button to dismiss the proactive recommendation'
52
+ },
53
+ insertBelowProactiveRecommendation: {
54
+ id: 'fabric.editor.ai.proactive.preview.insertBelowProactiveRecommendation',
55
+ defaultMessage: 'Insert below',
56
+ description: 'Label for button to insert the proactive recommendation below the user selection'
57
+ },
58
+ replaceProactiveRecommendation: {
59
+ id: 'fabric.editor.ai.proactive.preview.replaceProactiveRecommendation',
60
+ defaultMessage: 'Replace',
61
+ description: 'Label for button to replace selection with proactive recommendation'
62
+ },
63
+ spellingAndGrammarLabel: {
64
+ id: 'fabric.editor.ai.proactive.spellingAndGrammar.label.non-final',
65
+ defaultMessage: 'Spelling and grammar',
66
+ description: 'The label displayed in the context panel on the spelling and grammar item which display the total spelling and grammar issues found'
67
+ },
68
+ ManageSuggestionTitle: {
69
+ id: 'fabric.editor.ai.proactive.moreMenu.manageSuggestionsTitle.non-final',
70
+ defaultMessage: 'Manage suggestions',
71
+ description: 'This is the message displayed in the more menu dropdown in the context panel to allow the user to manage suggestions on the suggestions'
72
+ },
73
+ closeButtonLabel: {
74
+ id: 'fabric.editor.ai.proactive.close.label.non-final',
75
+ defaultMessage: 'Close',
76
+ description: 'This is the text applied to the Close icon button label'
77
+ },
78
+ suggestionsTitle: {
79
+ id: 'fabric.editor.ai.proactive.suggestions.title.non-final',
80
+ defaultMessage: 'Suggestions',
81
+ description: 'The title displayed at the top of the context panel for all recommendations displayed'
82
+ },
83
+ betaLabel: {
84
+ id: 'fabric.editor.ai.proactive.beta.label.non-final',
85
+ defaultMessage: 'BETA',
86
+ description: 'This is a lozenge displayed in the suggested edits header to signify that this is a beta feature'
87
+ },
88
+ moreMenuLabel: {
89
+ id: 'fabric.editor.ai.proactive.moreMenu.label.non-final',
90
+ defaultMessage: 'more',
91
+ description: 'This is the message displayed tooltip in the more menu dropdown in the context panel'
92
+ },
93
+ moreMenuManageSuggestions: {
94
+ id: 'fabric.editor.ai.proactive.moreMenu.manageSuggestions.non-final',
95
+ defaultMessage: 'Manage Suggestions',
96
+ description: 'This is the message displayed in the more menu dropdown in the context panel to allow the user to manage suggestions on the suggestions'
97
+ },
98
+ moreMenuGiveFeedback: {
99
+ id: 'fabric.editor.ai.proactive.moreMenu.giveFeedback.non-final',
100
+ defaultMessage: 'Give feedback',
101
+ description: 'This is the message displayed in the more menu dropdown in the context panel to allow the user to give feedback on the suggestions'
102
+ },
103
+ moreActionsLabel: {
104
+ id: 'fabric.editor.ai.proactive.moreActions.label.non-final',
105
+ defaultMessage: 'More actions',
106
+ description: 'This is the text applied to the More icon button label'
107
+ },
108
+ reloadSuggestionsStateTitle: {
109
+ id: 'fabric.editor.ai.proactive.reloadSuggestionsState.title.non-final',
110
+ defaultMessage: 'Your content’s looking good',
111
+ description: 'This is the title of the message displayed in the suggested edits panel when there are new recommendations left after a user has dismissed them all.'
112
+ },
113
+ reloadSuggestionsStateDescription: {
114
+ id: 'fabric.editor.ai.proactive.reloadSuggestionsState.description.non-final',
115
+ defaultMessage: 'Any new suggestions will appear here.',
116
+ description: 'This is the message displayed in the suggested edits panel when there are no new recommendations left after a user has dismissed them all.'
117
+ },
118
+ reloadSuggestionsButtonLabel: {
119
+ id: 'fabric.editor.ai.proactive.reloadSuggestionsButtonLabel.non-final',
120
+ defaultMessage: 'View past suggestions',
121
+ description: 'This is the button label to reload suggestions when a user has dismised all recommendations.'
122
+ },
123
+ noSuggestionsStateTitle: {
124
+ id: 'fabric.editor.ai.proactive.noSuggestionsState.title.non-final',
125
+ defaultMessage: 'Suggestions will appear here',
126
+ description: 'This is the title of the message displayed in the suggested edits panel when there are no recommendations available.'
127
+ },
128
+ noSuggestionsStateDescription: {
129
+ id: 'fabric.editor.ai.proactive.noSuggestionsState.description.non-final',
130
+ defaultMessage: 'You can also ask AI to improve your page with requests such as <i>Add a table of contents</i> or <i>Create headings</i>.',
131
+ description: 'This is the message displayed in the suggested edits panel when there are no recommendations available'
132
+ },
133
+ askAIButtonLabel: {
134
+ id: 'fabric.editor.ai.proactive.askAIButtonLabel.non-final',
135
+ defaultMessage: 'Ask AI',
136
+ description: 'This is the button label to open the AI modal.'
137
+ },
138
+ enableSuggestionsStateTitle: {
139
+ id: 'fabric.editor.ai.proactive.enableSuggestionsState.title.non-final',
140
+ defaultMessage: 'You create. We polish.',
141
+ description: 'This is the title of the message displayed in the suggested edits panel when suggestions are disabled.'
142
+ },
143
+ enableSuggestionsStateDescription: {
144
+ id: 'fabric.editor.ai.proactive.enableSuggestionsState.description.non-final',
145
+ defaultMessage: 'Turn on suggested edits to quickly preview content improvements.',
146
+ description: 'This is the message displayed in the suggested edits panel when suggestions are disabled.'
147
+ },
148
+ enableSuggestionsButtonLabel: {
149
+ id: 'fabric.editor.ai.proactive.enableSuggestionsButtonLabel.non-final',
150
+ defaultMessage: 'Turn on',
151
+ description: 'This is the button label in the suggested edits panel when suggestions are disabled.'
152
+ }
153
+ });
@@ -3,6 +3,9 @@
3
3
 
4
4
  import { defineMessages } from 'react-intl-next';
5
5
  export { aiDefinitionsMessages } from './ai-definitions';
6
+ export { aiProactiveMessages } from './ai-proactive';
7
+ export { aiProactiveSettingMessages } from './ai-proactive-setting';
8
+ export { aiProactiveTransformMessages } from './ai-proactive-transform';
6
9
  export { alignmentMessages } from './alignment';
7
10
  export { annotationMessages } from './annotation';
8
11
  export { messages as blockTypeMessages } from './block-type';
@@ -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.4.2";
10
+ var packageVersion = "99.5.1";
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.4.2";
23
+ var packageVersion = "99.5.1";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -15,6 +15,9 @@ export type EditorAnalyticsAPI = {
15
15
  *
16
16
  * @param {AnalyticsEventPayload} payload - analytics payload
17
17
  * @param {string} [channel="editor"] - optional channel identifier
18
+ * @param {object} [options] - optional options where immediate is true will fire event immediately
18
19
  */
19
- fireAnalyticsEvent: (payload: AnalyticsEventPayload, channel?: string) => void | undefined;
20
+ fireAnalyticsEvent: (payload: AnalyticsEventPayload, channel?: string, options?: {
21
+ immediate?: boolean;
22
+ }) => void | undefined;
20
23
  };
@@ -42,6 +42,8 @@ export { getAnalyticsEventsFromTransaction } from './utils';
42
42
  export { buildEditLinkPayload, buildVisitedLinkPayload, buildOpenedSettingsPayload, unlinkPayload, } from './linking-utils';
43
43
  export type { LinkType } from './linking-utils';
44
44
  export type { RequestToEditAEP } from './types/general-events';
45
+ export type { AIEventPayload, AIMarkdownConversionErrorCaughtAttributes } from './types/ai-events';
45
46
  export type { AIProactiveEventPayload } from './types/ai-proactive-events';
46
47
  export type { AIDefinitionsEventPayload } from './types/ai-definitions-events';
47
- export type { AIUnifiedEventPayload } from './types/ai-unified-events';
48
+ export type { AIUnifiedEventPayload, AIUnifiedCommonAttributes } from './types/ai-unified-events';
49
+ export type { ActiveSessionEventPayload, ActiveSessionEventAttributes, } from './types/activity-session-events';
@@ -0,0 +1,24 @@
1
+ import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
2
+ import type { TrackAEP } from './utils';
3
+ export type ActiveSessionEventAttributes = {
4
+ efficiency: {
5
+ totalActiveTime: number;
6
+ totalActionCount: number;
7
+ actionByTypeCount?: {
8
+ textInputCount: number;
9
+ nodeInsertionCount: number;
10
+ nodeAttributeChangeCount: number;
11
+ contentMovedCount: number;
12
+ nodeDeletionCount: number;
13
+ undoCount: number;
14
+ };
15
+ };
16
+ effectiveness: {
17
+ undoCount: number;
18
+ repeatedActionCount: number;
19
+ safeInsertCount: number;
20
+ };
21
+ contentSizeChanged: number;
22
+ };
23
+ export type ActiveSessionEventAEP = TrackAEP<ACTION.ENDED, ACTION_SUBJECT.ACTIVITY_SESSION, ACTION_SUBJECT_ID.ACTIVITY, ActiveSessionEventAttributes, undefined>;
24
+ export type ActiveSessionEventPayload = ActiveSessionEventAEP;
@@ -0,0 +1,15 @@
1
+ import { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
2
+ import type { OperationalAEP } from './utils';
3
+ type AIUnhandledErrorCaughtAEP = OperationalAEP<ACTION.UNHANDLED_ERROR_CAUGHT, ACTION_SUBJECT.EDITOR_PLUGIN_AI, ACTION_SUBJECT_ID.EXPERIENCE_APPLICATION, {
4
+ componentStack: string;
5
+ errorMessage?: string;
6
+ }>;
7
+ export type AIMarkdownConversionErrorCaughtAttributes = {
8
+ errorType: 'markdownToProseMirrorError';
9
+ errorSubType?: 'noProseMirrorDoc' | 'emptyProseMirrorDoc' | 'invalidProseMirrorDoc';
10
+ componentStack: string;
11
+ errorMessage?: string;
12
+ };
13
+ export type AIMarkdownConversionErrorCaughtAEP = OperationalAEP<ACTION.UNHANDLED_ERROR_CAUGHT, ACTION_SUBJECT.EDITOR_PLUGIN_AI, ACTION_SUBJECT_ID.EXPERIENCE_APPLICATION, AIMarkdownConversionErrorCaughtAttributes>;
14
+ export type AIEventPayload = AIUnhandledErrorCaughtAEP | AIMarkdownConversionErrorCaughtAEP;
15
+ export {};
@@ -45,16 +45,8 @@ type AIProactiveApiErrorAEP = OperationalAEP<ACTION.API_ERROR, ACTION_SUBJECT.ED
45
45
  reason: string;
46
46
  statusCode: number;
47
47
  }>;
48
- type AIProactiveAIResultErrorAEP = TrackAEP<ACTION.ERROR, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, {
49
- singleInstrumentationID: string;
50
- aiInteractionID: string;
51
- aiFeatureName: string;
52
- aiExperienceName: string;
53
- proactiveAIGenerated: number;
54
- userGeneratedAI: number;
55
- isAIFeature: number;
56
- aiErrorMessage: string;
57
- aiErrorCode: number;
58
- }, undefined>;
59
- export type AIProactiveEventPayload = AIProactiveApiReceivedAEP | AIProactiveSuggestionDisplayToggledAEP | AIProactiveSuggestionInsertedAEP | AIProactiveSuggestionDismissedAEP | AIProactiveSuggestionFeedbackClickedAEP | AIProactiveSuggestionCopiedAEP | AIProactiveApiPurgedAEP | AIProactiveApiErrorAEP | AIProactiveAIResultErrorAEP;
48
+ type AIProactiveFeedbackFailedAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.EDITOR, ACTION_SUBJECT_ID.AI_PROACTIVE_FEEDBACK_DIALOG, {
49
+ errorMessage?: string;
50
+ }>;
51
+ export type AIProactiveEventPayload = AIProactiveApiReceivedAEP | AIProactiveSuggestionDisplayToggledAEP | AIProactiveSuggestionInsertedAEP | AIProactiveSuggestionDismissedAEP | AIProactiveSuggestionFeedbackClickedAEP | AIProactiveSuggestionCopiedAEP | AIProactiveApiPurgedAEP | AIProactiveApiErrorAEP | AIProactiveFeedbackFailedAEP;
60
52
  export {};
@@ -4,7 +4,7 @@
4
4
  */
5
5
  import type { ACTION, ACTION_SUBJECT, ACTION_SUBJECT_ID } from './enums';
6
6
  import type { TrackAEP } from './utils';
7
- type CommonAttributes = {
7
+ export type AIUnifiedCommonAttributes = {
8
8
  singleInstrumentationID: string;
9
9
  aiInteractionID: string;
10
10
  aiFeatureName: string;
@@ -13,21 +13,19 @@ type CommonAttributes = {
13
13
  isAIFeature: 1;
14
14
  aiExperienceName?: string;
15
15
  };
16
- export type AIInteractionInitiatedAEP = TrackAEP<ACTION.INITIATED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes, undefined>;
17
- export type AIInteractionDismissedAEP = TrackAEP<ACTION.DISMISSED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes, undefined>;
18
- export type AIResultViewedAEP = TrackAEP<ACTION.VIEWED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes, undefined>;
19
- export type AIResultActionedAEP = TrackAEP<ACTION.ACTIONED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes & {
16
+ type AIInteractionInitiatedAEP = TrackAEP<ACTION.INITIATED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes, undefined>;
17
+ type AIInteractionDismissedAEP = TrackAEP<ACTION.DISMISSED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes, undefined>;
18
+ type AIResultViewedAEP = TrackAEP<ACTION.VIEWED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes, undefined>;
19
+ type AIResultActionedAEP = TrackAEP<ACTION.ACTIONED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & {
20
20
  promptType?: string;
21
21
  refinementCount?: number;
22
22
  aiResultAction: string;
23
23
  }, undefined>;
24
- export type AIResultErrorAEP = TrackAEP<ACTION.ERROR, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes & {
24
+ type AIResultErrorAEP = TrackAEP<ACTION.ERROR, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & {
25
25
  aiErrorMessage?: string;
26
26
  aiErrorCode?: number;
27
- aiExperienceName?: string;
28
27
  }, undefined>;
29
- export type AIFeedbackSubmittedAEP = TrackAEP<ACTION.SUBMITTED, ACTION_SUBJECT.AI_FEEDBACK, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, CommonAttributes & {
30
- aiExperienceName?: string;
28
+ type AIFeedbackSubmittedAEP = TrackAEP<ACTION.SUBMITTED, ACTION_SUBJECT.AI_FEEDBACK, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & {
31
29
  aiFeedbackResult: 'up' | 'down';
32
30
  }, undefined>;
33
31
  export type AIUnifiedEventPayload = AIInteractionInitiatedAEP | AIResultViewedAEP | AIResultErrorAEP | AIInteractionDismissedAEP | AIResultActionedAEP | AIFeedbackSubmittedAEP;
@@ -51,6 +51,7 @@ export declare enum ACTION {
51
51
  EDITOR_TTI = "tti",
52
52
  EDITOR_CONTENT_RETRIEVAL_PERFORMED = "contentRetrievalPerformed",
53
53
  RE_RENDERED = "reRendered",
54
+ ENDED = "ended",
54
55
  ENTERED = "entered",
55
56
  ERROR = "error",
56
57
  ERRORED = "errored",
@@ -117,6 +118,7 @@ export declare enum ACTION {
117
118
  TRANSACTION_MUTATED_AFTER_DISPATCH = "transactionMutatedAfterDispatched",
118
119
  TYPING_FINISHED = "typingFinished",
119
120
  TYPING_STARTED = "typingStarted",
121
+ UNHANDLED_ERROR_CAUGHT = "unhandledErrorCaught",
120
122
  UNLINK = "unlinked",
121
123
  UNSUPPORTED_CONTENT_ENCOUNTERED = "unsupportedContentEncounteredV2",
122
124
  UPDATED = "updated",
@@ -132,6 +134,12 @@ export declare enum ACTION {
132
134
  WITH_PLUGIN_STATE_CALLED = "withPluginStateCalled",
133
135
  RENDERED = "rendered",
134
136
  ON_EDITOR_READY_CALLBACK = "onEditorReadyCallback",
137
+ /**
138
+ * @private
139
+ * @deprecated
140
+ *
141
+ * This is no longer used and can be removed at a later date
142
+ */
135
143
  ON_CHANGE_CALLBACK = "onChangeCalled",
136
144
  NESTED_TABLE_TRANSFORMED = "nestedTableTransformed",
137
145
  NEW_COLLAB_SYNC_UP_ERROR_NO_STEPS = "newCollabSyncUpErrorNoSteps",
@@ -226,6 +234,7 @@ export declare enum ACTION_SUBJECT {
226
234
  DATE_SEGMENT = "dateSegment",
227
235
  DOCUMENT = "document",
228
236
  EDITOR = "editor",
237
+ ACTIVITY_SESSION = "activitySession",
229
238
  ELEMENT_BROWSER = "elementBrowser",
230
239
  EMBEDS = "embeds",
231
240
  EXPAND = "expand",
@@ -285,11 +294,13 @@ export declare enum ACTION_SUBJECT {
285
294
  }
286
295
  export declare enum ACTION_SUBJECT_ID {
287
296
  ACTION = "action",
297
+ ACTIVITY = "activity",
288
298
  AI_DEFINITIONS_DEFINE_BUTTON = "aiDefinitionsDefineButton",
289
299
  AI_DEFINITIONS_AUTO_HIGHLIGHT = "aiDefinitionsAutoHighlight",
290
300
  AI_PANELS_BODIED_EXTENSION = "aiPanelsBodiedExtension",
291
301
  AI_PROMPT_LINK_PICKER_BUTTON = "aiPromptLinkPickerButton",
292
302
  AI_PROMPT_MENTION_BUTTON = "aiPromptMentionButton",
303
+ AI_PROACTIVE_FEEDBACK_DIALOG = "aiProactiveFeedbackDialog",
293
304
  ALL = "all",
294
305
  ALT_TEXT = "altText",
295
306
  ANNOTATE_BUTTON = "annotateButton",
@@ -324,6 +335,7 @@ export declare enum ACTION_SUBJECT_ID {
324
335
  EMBEDS = "embeds",
325
336
  EMOJI = "emoji",
326
337
  EXPAND = "expand",
338
+ EXPERIENCE_APPLICATION = "experienceApplication",
327
339
  EXTENSION = "extension",
328
340
  EXTENSION_API = "extensionApi",
329
341
  EXTENSION_BLOCK = "extension",
@@ -3,9 +3,11 @@ import type { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next/types';
3
3
  import type { EditorState, PluginKey } from '@atlaskit/editor-prosemirror/state';
4
4
  import type { NewCollabSyncUpErrorAttributes } from '../../collab';
5
5
  import type { UnsupportedContentPayload, UnsupportedContentTooltipPayload, UserBrowserExtensionResults } from '../../utils';
6
- import { type AICommandPaletteEventPayload } from './ai-command-palette-events';
7
- import { type AIDefinitionsEventPayload } from './ai-definitions-events';
8
- import { type AIProactiveEventPayload } from './ai-proactive-events';
6
+ import type { ActiveSessionEventPayload } from './activity-session-events';
7
+ import type { AICommandPaletteEventPayload } from './ai-command-palette-events';
8
+ import type { AIDefinitionsEventPayload } from './ai-definitions-events';
9
+ import type { AIEventPayload } from './ai-events';
10
+ import type { AIProactiveEventPayload } from './ai-proactive-events';
9
11
  import type { AIUnifiedEventPayload } from './ai-unified-events';
10
12
  import type { AvatarEventPayload } from './avatar';
11
13
  import { type BreakoutEventPayload } from './breakout-events';
@@ -52,7 +54,7 @@ export type SimplifiedNode = {
52
54
  marks?: string[];
53
55
  content?: SimplifiedNode[];
54
56
  };
55
- 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 | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload;
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 | ContextMenuEventPayload | VisitedLinkAEP | ViewEventPayload | MediaUploadEventPayload | MentionEventPayload | EngagementPlatformEventPayload | NestedTableActionsEventPayload | AICommandPaletteEventPayload | AIDefinitionsEventPayload | AIEventPayload | AIProactiveEventPayload | AIUnifiedEventPayload | BreakoutEventPayload | ActiveSessionEventPayload;
56
58
  type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION.CHANGED_ICON | ACTION.REMOVE_ICON, ACTION_SUBJECT.PANEL, ACTION_SUBJECT_ID.PANEL, {
57
59
  previousColor: string;
58
60
  newColor: string;
@@ -146,7 +148,9 @@ type SmartLinkErrorAEP = OperationalAEP<ACTION.ERRORED, ACTION_SUBJECT.SMART_LIN
146
148
  export type ErrorEventPayload = InvalidTransactionErrorAEP | InvalidTransactionStepErrorAEP | FailedToUnmountErrorAEP | SynchronyErrorAEP | InvalidDocumentEncounteredAEP | SynchronyEntityErrorAEP | ContentComponentErrorAEP | PickerErrorAEP | ComponentCrashErrorAEP | ComponentCrashAdditionalInfoErrorAEP | SmartLinkErrorAEP;
147
149
  export type AnalyticsEventPayloadCallback = (state: EditorState) => AnalyticsEventPayload | undefined;
148
150
  export type FireAnalyticsCallback = <T>(payload: FireAnalyticsEventPayload<T>) => void | undefined;
149
- export type FireAnalyticsEvent = (createAnalyticsEvent?: CreateUIAnalyticsEvent) => FireAnalyticsCallback;
151
+ export type FireAnalyticsEvent = (createAnalyticsEvent?: CreateUIAnalyticsEvent, options?: {
152
+ immediate?: boolean;
153
+ }) => FireAnalyticsCallback;
150
154
  export type FireAnalyticsEventPayload<T = void> = {
151
155
  payload: AnalyticsEventPayload<T>;
152
156
  channel?: string;
@@ -279,6 +279,7 @@ export interface StepMetadata {
279
279
  traceId?: string;
280
280
  reqId?: string;
281
281
  schemaVersion?: string;
282
+ unconfirmedStepAfterRecovery?: boolean;
282
283
  };
283
284
  }
284
285
  export interface BaseStepPM extends StepMetadata {
@@ -0,0 +1,102 @@
1
+ export declare const aiProactiveSettingMessages: {
2
+ toggleAllSuggestionsTitle: {
3
+ id: string;
4
+ defaultMessage: string;
5
+ description: string;
6
+ };
7
+ toggleAllSuggestionsDescription: {
8
+ id: string;
9
+ defaultMessage: string;
10
+ description: string;
11
+ };
12
+ toggleAllPanelSuggestionsTitle: {
13
+ id: string;
14
+ defaultMessage: string;
15
+ description: string;
16
+ };
17
+ toggleAllPanelSuggestionsDescription: {
18
+ id: string;
19
+ defaultMessage: string;
20
+ description: string;
21
+ };
22
+ toggleErrorPanelTitle: {
23
+ id: string;
24
+ defaultMessage: string;
25
+ description: string;
26
+ };
27
+ toggleErrorPanelDescription: {
28
+ id: string;
29
+ defaultMessage: string;
30
+ description: string;
31
+ };
32
+ toggleInfoPanelTitle: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
37
+ toggleInfoPanelDescription: {
38
+ id: string;
39
+ defaultMessage: string;
40
+ description: string;
41
+ };
42
+ toggleNotePanelTitle: {
43
+ id: string;
44
+ defaultMessage: string;
45
+ description: string;
46
+ };
47
+ toggleNotePanelDescription: {
48
+ id: string;
49
+ defaultMessage: string;
50
+ description: string;
51
+ };
52
+ toggleSuccessPanelTitle: {
53
+ id: string;
54
+ defaultMessage: string;
55
+ description: string;
56
+ };
57
+ toggleSuccessPanelDescription: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
62
+ toggleWarningPanelTitle: {
63
+ id: string;
64
+ defaultMessage: string;
65
+ description: string;
66
+ };
67
+ toggleWarningPanelDescription: {
68
+ id: string;
69
+ defaultMessage: string;
70
+ description: string;
71
+ };
72
+ toggleTableTitle: {
73
+ id: string;
74
+ defaultMessage: string;
75
+ description: string;
76
+ };
77
+ toggleTableDescription: {
78
+ id: string;
79
+ defaultMessage: string;
80
+ description: string;
81
+ };
82
+ toggleSplitParagraphTitle: {
83
+ id: string;
84
+ defaultMessage: string;
85
+ description: string;
86
+ };
87
+ toggleSplitParagraphDescription: {
88
+ id: string;
89
+ defaultMessage: string;
90
+ description: string;
91
+ };
92
+ toggleFormatParagraphTitle: {
93
+ id: string;
94
+ defaultMessage: string;
95
+ description: string;
96
+ };
97
+ toggleFormatParagraphDescription: {
98
+ id: string;
99
+ defaultMessage: string;
100
+ description: string;
101
+ };
102
+ };