@atlaskit/editor-common 106.2.0 → 106.3.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,22 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 106.3.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#164625](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/164625)
8
+ [`aac10c2d4c08d`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/aac10c2d4c08d) -
9
+ [ED-26900] Add a new config, getMoreOptionsButtonConfig, to TypeAheadHandler so that it can
10
+ support adding a more option button to typeahead list
11
+ - [#161626](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/161626)
12
+ [`a614421730437`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/a614421730437) -
13
+ [ux] EDITOR-769: Implement first phase of new AI Palette redesigns for Preview modal behind fg
14
+ platform_editor_new_ai_palette
15
+
16
+ ### Patch Changes
17
+
18
+ - Updated dependencies
19
+
3
20
  ## 106.2.0
4
21
 
5
22
  ### Minor Changes
@@ -38,6 +38,11 @@ var aiConfigItemMessages = exports.aiConfigItemMessages = (0, _reactIntlNext.def
38
38
  defaultMessage: 'Insert below',
39
39
  description: 'Inserts the response below the current location'
40
40
  },
41
+ configActionInsertBelowOriginal: {
42
+ id: 'fabric.editor.ai.config.item.action.insertBelowOriginal',
43
+ defaultMessage: 'Insert below original',
44
+ description: 'Inserts the response below the original content'
45
+ },
41
46
  configActionReplace: {
42
47
  id: 'fabric.editor.ai.config.item.action.replace',
43
48
  defaultMessage: 'Replace',
@@ -58,6 +63,11 @@ var aiConfigItemMessages = exports.aiConfigItemMessages = (0, _reactIntlNext.def
58
63
  defaultMessage: 'Open in Chat',
59
64
  description: 'Tooltip and label for Open in Chat button'
60
65
  },
66
+ configActionContinueChatLabel: {
67
+ id: 'fabric.editor.ai.config.item.action.rovoAgents.contineChatLabel',
68
+ defaultMessage: 'Continue in chat',
69
+ description: 'Tooltip and label for Continue in chat button'
70
+ },
61
71
  configActionEdit: {
62
72
  id: 'fabric.editor.ai.config.item.action.edit',
63
73
  defaultMessage: 'Edit',
@@ -16,7 +16,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
16
16
  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); }
17
17
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
18
18
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
19
- var packageVersion = "106.2.0";
19
+ var packageVersion = "106.3.0";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -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 = "106.2.0";
26
+ var packageVersion = "106.3.0";
27
27
  var halfFocusRing = 1;
28
28
  var dropOffset = '0, 8';
29
29
  // Ignored via go/ees005
@@ -32,6 +32,11 @@ export const aiConfigItemMessages = defineMessages({
32
32
  defaultMessage: 'Insert below',
33
33
  description: 'Inserts the response below the current location'
34
34
  },
35
+ configActionInsertBelowOriginal: {
36
+ id: 'fabric.editor.ai.config.item.action.insertBelowOriginal',
37
+ defaultMessage: 'Insert below original',
38
+ description: 'Inserts the response below the original content'
39
+ },
35
40
  configActionReplace: {
36
41
  id: 'fabric.editor.ai.config.item.action.replace',
37
42
  defaultMessage: 'Replace',
@@ -52,6 +57,11 @@ export const aiConfigItemMessages = defineMessages({
52
57
  defaultMessage: 'Open in Chat',
53
58
  description: 'Tooltip and label for Open in Chat button'
54
59
  },
60
+ configActionContinueChatLabel: {
61
+ id: 'fabric.editor.ai.config.item.action.rovoAgents.contineChatLabel',
62
+ defaultMessage: 'Continue in chat',
63
+ description: 'Tooltip and label for Continue in chat button'
64
+ },
55
65
  configActionEdit: {
56
66
  id: 'fabric.editor.ai.config.item.action.edit',
57
67
  defaultMessage: 'Edit',
@@ -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 = "106.2.0";
4
+ const packageVersion = "106.3.0";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -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 = "106.2.0";
16
+ const packageVersion = "106.3.0";
17
17
  const halfFocusRing = 1;
18
18
  const dropOffset = '0, 8';
19
19
  // Ignored via go/ees005
@@ -32,6 +32,11 @@ export var aiConfigItemMessages = defineMessages({
32
32
  defaultMessage: 'Insert below',
33
33
  description: 'Inserts the response below the current location'
34
34
  },
35
+ configActionInsertBelowOriginal: {
36
+ id: 'fabric.editor.ai.config.item.action.insertBelowOriginal',
37
+ defaultMessage: 'Insert below original',
38
+ description: 'Inserts the response below the original content'
39
+ },
35
40
  configActionReplace: {
36
41
  id: 'fabric.editor.ai.config.item.action.replace',
37
42
  defaultMessage: 'Replace',
@@ -52,6 +57,11 @@ export var aiConfigItemMessages = defineMessages({
52
57
  defaultMessage: 'Open in Chat',
53
58
  description: 'Tooltip and label for Open in Chat button'
54
59
  },
60
+ configActionContinueChatLabel: {
61
+ id: 'fabric.editor.ai.config.item.action.rovoAgents.contineChatLabel',
62
+ defaultMessage: 'Continue in chat',
63
+ description: 'Tooltip and label for Continue in chat button'
64
+ },
55
65
  configActionEdit: {
56
66
  id: 'fabric.editor.ai.config.item.action.edit',
57
67
  defaultMessage: 'Edit',
@@ -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 = "106.2.0";
10
+ var packageVersion = "106.3.0";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -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 = "106.2.0";
23
+ var packageVersion = "106.3.0";
24
24
  var halfFocusRing = 1;
25
25
  var dropOffset = '0, 8';
26
26
  // Ignored via go/ees005
@@ -29,6 +29,11 @@ export declare const aiConfigItemMessages: {
29
29
  defaultMessage: string;
30
30
  description: string;
31
31
  };
32
+ configActionInsertBelowOriginal: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
32
37
  configActionReplace: {
33
38
  id: string;
34
39
  defaultMessage: string;
@@ -49,6 +54,11 @@ export declare const aiConfigItemMessages: {
49
54
  defaultMessage: string;
50
55
  description: string;
51
56
  };
57
+ configActionContinueChatLabel: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
52
62
  configActionEdit: {
53
63
  id: string;
54
64
  defaultMessage: string;
@@ -1,8 +1,10 @@
1
- import type { ReactElement } from 'react';
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ import { IntlShape } from 'react-intl-next';
2
3
  import { type Fragment, type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
4
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
4
5
  import type { TypeAheadPayload } from '../analytics/types/type-ahead';
5
6
  import type { SelectItemMode, TypeAheadAvailableNodes } from '../type-ahead';
7
+ import type { EditorCommand } from '../types';
6
8
  type TypeAheadForceSelectProps = {
7
9
  query: string;
8
10
  items: Array<TypeAheadItem>;
@@ -41,6 +43,12 @@ export type TypeAheadItem = {
41
43
  [key: string]: any;
42
44
  };
43
45
  export type TypeAheadForceSelect = (props: TypeAheadForceSelectProps) => TypeAheadItem | undefined;
46
+ export type MoreOptionsButtonConfig = {
47
+ title: string;
48
+ ariaLabel?: string;
49
+ onClick: EditorCommand;
50
+ iconBefore?: ReactNode;
51
+ };
44
52
  export type TypeAheadHandler = {
45
53
  id: TypeAheadAvailableNodes;
46
54
  /** Pattern that will trigger the TypeAhead */
@@ -69,5 +77,6 @@ export type TypeAheadHandler = {
69
77
  wasItemInserted?: boolean;
70
78
  }) => void;
71
79
  getHighlight?: (state: EditorState) => JSX.Element | null;
80
+ getMoreOptionsButtonConfig?: (intl: IntlShape) => MoreOptionsButtonConfig;
72
81
  };
73
82
  export {};
@@ -29,6 +29,11 @@ export declare const aiConfigItemMessages: {
29
29
  defaultMessage: string;
30
30
  description: string;
31
31
  };
32
+ configActionInsertBelowOriginal: {
33
+ id: string;
34
+ defaultMessage: string;
35
+ description: string;
36
+ };
32
37
  configActionReplace: {
33
38
  id: string;
34
39
  defaultMessage: string;
@@ -49,6 +54,11 @@ export declare const aiConfigItemMessages: {
49
54
  defaultMessage: string;
50
55
  description: string;
51
56
  };
57
+ configActionContinueChatLabel: {
58
+ id: string;
59
+ defaultMessage: string;
60
+ description: string;
61
+ };
52
62
  configActionEdit: {
53
63
  id: string;
54
64
  defaultMessage: string;
@@ -1,8 +1,10 @@
1
- import type { ReactElement } from 'react';
1
+ import type { ReactElement, ReactNode } from 'react';
2
+ import { IntlShape } from 'react-intl-next';
2
3
  import { type Fragment, type Node as PMNode } from '@atlaskit/editor-prosemirror/model';
3
4
  import type { EditorState, Transaction } from '@atlaskit/editor-prosemirror/state';
4
5
  import type { TypeAheadPayload } from '../analytics/types/type-ahead';
5
6
  import type { SelectItemMode, TypeAheadAvailableNodes } from '../type-ahead';
7
+ import type { EditorCommand } from '../types';
6
8
  type TypeAheadForceSelectProps = {
7
9
  query: string;
8
10
  items: Array<TypeAheadItem>;
@@ -41,6 +43,12 @@ export type TypeAheadItem = {
41
43
  [key: string]: any;
42
44
  };
43
45
  export type TypeAheadForceSelect = (props: TypeAheadForceSelectProps) => TypeAheadItem | undefined;
46
+ export type MoreOptionsButtonConfig = {
47
+ title: string;
48
+ ariaLabel?: string;
49
+ onClick: EditorCommand;
50
+ iconBefore?: ReactNode;
51
+ };
44
52
  export type TypeAheadHandler = {
45
53
  id: TypeAheadAvailableNodes;
46
54
  /** Pattern that will trigger the TypeAhead */
@@ -69,5 +77,6 @@ export type TypeAheadHandler = {
69
77
  wasItemInserted?: boolean;
70
78
  }) => void;
71
79
  getHighlight?: (state: EditorState) => JSX.Element | null;
80
+ getMoreOptionsButtonConfig?: (intl: IntlShape) => MoreOptionsButtonConfig;
72
81
  };
73
82
  export {};
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "106.2.0",
3
+ "version": "106.3.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/"
@@ -169,7 +169,7 @@
169
169
  "@atlaskit/task-decision": "^19.2.0",
170
170
  "@atlaskit/textfield": "^8.0.0",
171
171
  "@atlaskit/theme": "^18.0.0",
172
- "@atlaskit/tmp-editor-statsig": "^5.12.0",
172
+ "@atlaskit/tmp-editor-statsig": "^5.13.0",
173
173
  "@atlaskit/tokens": "^5.0.0",
174
174
  "@atlaskit/tooltip": "^20.3.0",
175
175
  "@atlaskit/width-detector": "^5.0.0",