@atlaskit/editor-common 110.34.1 → 110.34.3

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,21 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 110.34.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`7c690600403b0`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7c690600403b0) -
8
+ EDITOR-2419 fire UnifiedAnalytics Actioned analytics event upon AI content being kept
9
+ - Updated dependencies
10
+
11
+ ## 110.34.2
12
+
13
+ ### Patch Changes
14
+
15
+ - [`0d237a5696b06`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/0d237a5696b06) -
16
+ Uncoupled several block of changes from the aifc FG and moved them behind their own FG so they can
17
+ be rolled out quicker
18
+
3
19
  ## 110.34.1
4
20
 
5
21
  ### Patch Changes
@@ -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 = "110.34.0";
19
+ var packageVersion = "110.34.2";
20
20
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
21
21
  // Remove URL as it has UGC
22
22
  // Ignored via go/ees007
@@ -107,7 +107,7 @@ var corePlugin = exports.corePlugin = function corePlugin(_ref) {
107
107
  if ((_options$scrollIntoVi2 = options === null || options === void 0 ? void 0 : options.scrollIntoView) !== null && _options$scrollIntoVi2 !== void 0 ? _options$scrollIntoVi2 : true) {
108
108
  editorView.dispatch(tr.scrollIntoView());
109
109
  } else {
110
- if ((0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
110
+ if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
111
111
  editorView.dispatch(tr.setMeta('scrollIntoView', false));
112
112
  }
113
113
  }
@@ -33,7 +33,7 @@ function createThrottleSchedule(callback) {
33
33
  }
34
34
  lastArgs = args;
35
35
  if (frameId) {
36
- if ((0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
36
+ if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
37
37
  if (lastArgsBefore) {
38
38
  var _lastArgsBefore = (0, _slicedToArray2.default)(lastArgsBefore, 5),
39
39
  _v = _lastArgsBefore[0],
@@ -54,7 +54,7 @@ function createThrottleSchedule(callback) {
54
54
  frameId = delayFunction(function () {
55
55
  frameId = undefined;
56
56
  if (lastArgs) {
57
- if ((0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
57
+ if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
58
58
  delayedCallbacks.forEach(function (savedArgs) {
59
59
  callback.apply(void 0, (0, _toConsumableArray2.default)(savedArgs));
60
60
  });
@@ -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 = "110.34.0";
27
+ var packageVersion = "110.34.2";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -113,7 +113,7 @@ var calculateToolbarPositionTrackHead = exports.calculateToolbarPositionTrackHea
113
113
  var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
114
114
  var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
115
115
  var range = null;
116
- if (isMoreRovoOptionsButtonVisible && (0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
116
+ if (isMoreRovoOptionsButtonVisible && (0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
117
117
  if (selection && selection.getRangeAt && selection.rangeCount > 0) {
118
118
  var maybeRange = selection.getRangeAt(0);
119
119
  if (maybeRange instanceof Range) {
@@ -24,16 +24,13 @@ var getStepRange = exports.getStepRange = function getStepRange(transaction) {
24
24
  stepMap.forEach(function (oldStart, oldEnd) {
25
25
  var newStart = transaction.mapping.slice(index).map(oldStart, -1);
26
26
  var newEnd = transaction.mapping.slice(index).map(oldEnd);
27
- from = newStart < from || from === -1 ? newStart : from;
28
- to = newEnd > to || to === -1 ? newEnd : to;
29
-
30
- // See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
31
- // PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
32
- // to see why use clamp here
33
- if ((0, _platformFeatureFlags.fg)('aifc_create_enabled')) {
27
+ if ((0, _platformFeatureFlags.fg)('platform_editor_ai_generic_prep_for_aifc')) {
34
28
  var docSize = transaction.doc.content.size;
35
- from = (0, _clamp.default)(from, 0, docSize);
36
- to = (0, _clamp.default)(to, 0, docSize);
29
+ from = (0, _clamp.default)(newStart < from || from === -1 ? newStart : from, 0, docSize);
30
+ to = (0, _clamp.default)(newEnd > to || to === -1 ? newEnd : to, 0, docSize);
31
+ } else {
32
+ from = newStart < from || from === -1 ? newStart : from;
33
+ to = newEnd > to || to === -1 ? newEnd : to;
37
34
  }
38
35
  });
39
36
  });
@@ -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 = "110.34.0";
4
+ const packageVersion = "110.34.2";
5
5
  const sanitiseSentryEvents = (data, _hint) => {
6
6
  // Remove URL as it has UGC
7
7
  // Ignored via go/ees007
@@ -109,7 +109,7 @@ export const corePlugin = ({
109
109
  if ((_options$scrollIntoVi2 = options === null || options === void 0 ? void 0 : options.scrollIntoView) !== null && _options$scrollIntoVi2 !== void 0 ? _options$scrollIntoVi2 : true) {
110
110
  editorView.dispatch(tr.scrollIntoView());
111
111
  } else {
112
- if (fg('aifc_create_enabled')) {
112
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
113
113
  editorView.dispatch(tr.setMeta('scrollIntoView', false));
114
114
  }
115
115
  }
@@ -19,7 +19,7 @@ export function createThrottleSchedule(callback) {
19
19
  const lastArgsBefore = lastArgs;
20
20
  lastArgs = args;
21
21
  if (frameId) {
22
- if (fg('aifc_create_enabled')) {
22
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
23
23
  if (lastArgsBefore) {
24
24
  const [_v, _c, _t, _f, alwaysFire] = lastArgsBefore;
25
25
  if (alwaysFire) {
@@ -35,7 +35,7 @@ export function createThrottleSchedule(callback) {
35
35
  frameId = delayFunction(() => {
36
36
  frameId = undefined;
37
37
  if (lastArgs) {
38
- if (fg('aifc_create_enabled')) {
38
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
39
39
  delayedCallbacks.forEach(savedArgs => {
40
40
  callback(...savedArgs);
41
41
  });
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "110.34.0";
17
+ const packageVersion = "110.34.2";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -106,7 +106,7 @@ export const calculateToolbarPositionTrackHead = toolbarTitle => (editorView, ne
106
106
  const moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
107
107
  const isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
108
108
  let range = null;
109
- if (isMoreRovoOptionsButtonVisible && fg('aifc_create_enabled')) {
109
+ if (isMoreRovoOptionsButtonVisible && fg('platform_editor_ai_generic_prep_for_aifc')) {
110
110
  if (selection && selection.getRangeAt && selection.rangeCount > 0) {
111
111
  const maybeRange = selection.getRangeAt(0);
112
112
  if (maybeRange instanceof Range) {
@@ -9,16 +9,13 @@ export const getStepRange = transaction => {
9
9
  stepMap.forEach((oldStart, oldEnd) => {
10
10
  const newStart = transaction.mapping.slice(index).map(oldStart, -1);
11
11
  const newEnd = transaction.mapping.slice(index).map(oldEnd);
12
- from = newStart < from || from === -1 ? newStart : from;
13
- to = newEnd > to || to === -1 ? newEnd : to;
14
-
15
- // See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
16
- // PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
17
- // to see why use clamp here
18
- if (fg('aifc_create_enabled')) {
12
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
19
13
  const docSize = transaction.doc.content.size;
20
- from = clamp(from, 0, docSize);
21
- to = clamp(to, 0, docSize);
14
+ from = clamp(newStart < from || from === -1 ? newStart : from, 0, docSize);
15
+ to = clamp(newEnd > to || to === -1 ? newEnd : to, 0, docSize);
16
+ } else {
17
+ from = newStart < from || from === -1 ? newStart : from;
18
+ to = newEnd > to || to === -1 ? newEnd : to;
22
19
  }
23
20
  });
24
21
  });
@@ -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 = "110.34.0";
10
+ var packageVersion = "110.34.2";
11
11
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
12
12
  // Remove URL as it has UGC
13
13
  // Ignored via go/ees007
@@ -102,7 +102,7 @@ export var corePlugin = function corePlugin(_ref) {
102
102
  if ((_options$scrollIntoVi2 = options === null || options === void 0 ? void 0 : options.scrollIntoView) !== null && _options$scrollIntoVi2 !== void 0 ? _options$scrollIntoVi2 : true) {
103
103
  editorView.dispatch(tr.scrollIntoView());
104
104
  } else {
105
- if (fg('aifc_create_enabled')) {
105
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
106
106
  editorView.dispatch(tr.setMeta('scrollIntoView', false));
107
107
  }
108
108
  }
@@ -24,7 +24,7 @@ export function createThrottleSchedule(callback) {
24
24
  }
25
25
  lastArgs = args;
26
26
  if (frameId) {
27
- if (fg('aifc_create_enabled')) {
27
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
28
28
  if (lastArgsBefore) {
29
29
  var _lastArgsBefore = _slicedToArray(lastArgsBefore, 5),
30
30
  _v = _lastArgsBefore[0],
@@ -45,7 +45,7 @@ export function createThrottleSchedule(callback) {
45
45
  frameId = delayFunction(function () {
46
46
  frameId = undefined;
47
47
  if (lastArgs) {
48
- if (fg('aifc_create_enabled')) {
48
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
49
49
  delayedCallbacks.forEach(function (savedArgs) {
50
50
  callback.apply(void 0, _toConsumableArray(savedArgs));
51
51
  });
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "110.34.0";
24
+ var packageVersion = "110.34.2";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -107,7 +107,7 @@ export var calculateToolbarPositionTrackHead = function calculateToolbarPosition
107
107
  var moreRovoOptionsButton = document.querySelector('button[aria-label="More Rovo options"], [aria-label="More Rovo options"]');
108
108
  var isMoreRovoOptionsButtonVisible = !!moreRovoOptionsButton && moreRovoOptionsButton instanceof HTMLElement && !!moreRovoOptionsButton.offsetParent;
109
109
  var range = null;
110
- if (isMoreRovoOptionsButtonVisible && fg('aifc_create_enabled')) {
110
+ if (isMoreRovoOptionsButtonVisible && fg('platform_editor_ai_generic_prep_for_aifc')) {
111
111
  if (selection && selection.getRangeAt && selection.rangeCount > 0) {
112
112
  var maybeRange = selection.getRangeAt(0);
113
113
  if (maybeRange instanceof Range) {
@@ -9,16 +9,13 @@ export var getStepRange = function getStepRange(transaction) {
9
9
  stepMap.forEach(function (oldStart, oldEnd) {
10
10
  var newStart = transaction.mapping.slice(index).map(oldStart, -1);
11
11
  var newEnd = transaction.mapping.slice(index).map(oldEnd);
12
- from = newStart < from || from === -1 ? newStart : from;
13
- to = newEnd > to || to === -1 ? newEnd : to;
14
-
15
- // See ticket https://hello.jira.atlassian.cloud/browse/EDITOR-1223 and
16
- // PR https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/208332/overview
17
- // to see why use clamp here
18
- if (fg('aifc_create_enabled')) {
12
+ if (fg('platform_editor_ai_generic_prep_for_aifc')) {
19
13
  var docSize = transaction.doc.content.size;
20
- from = clamp(from, 0, docSize);
21
- to = clamp(to, 0, docSize);
14
+ from = clamp(newStart < from || from === -1 ? newStart : from, 0, docSize);
15
+ to = clamp(newEnd > to || to === -1 ? newEnd : to, 0, docSize);
16
+ } else {
17
+ from = newStart < from || from === -1 ? newStart : from;
18
+ to = newEnd > to || to === -1 ? newEnd : to;
22
19
  }
23
20
  });
24
21
  });
@@ -32,6 +32,7 @@ type AIInteractionInitiatedAEP = TrackAEP<ACTION.INITIATED, ACTION_SUBJECT.AI_IN
32
32
  type AIInteractionDismissedAEP = TrackAEP<ACTION.DISMISSED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
33
33
  type AIResultViewedAEP = TrackAEP<ACTION.VIEWED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
34
34
  type AIResultActionedAEP = TrackAEP<ACTION.ACTIONED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes & {
35
+ aiActionedType?: string;
35
36
  aiResultAction: string;
36
37
  promptType?: string;
37
38
  refinementCount?: number;
@@ -32,6 +32,7 @@ type AIInteractionInitiatedAEP = TrackAEP<ACTION.INITIATED, ACTION_SUBJECT.AI_IN
32
32
  type AIInteractionDismissedAEP = TrackAEP<ACTION.DISMISSED, ACTION_SUBJECT.AI_INTERACTION, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
33
33
  type AIResultViewedAEP = TrackAEP<ACTION.VIEWED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes, undefined>;
34
34
  type AIResultActionedAEP = TrackAEP<ACTION.ACTIONED, ACTION_SUBJECT.AI_RESULT, ACTION_SUBJECT_ID.EDITOR_PLUGIN_AI, AIUnifiedCommonAttributes & AIUnifiedAgentAttributes & {
35
+ aiActionedType?: string;
35
36
  aiResultAction: string;
36
37
  promptType?: string;
37
38
  refinementCount?: number;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "110.34.1",
3
+ "version": "110.34.3",
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/"
@@ -40,7 +40,7 @@
40
40
  "@atlaskit/button": "^23.6.0",
41
41
  "@atlaskit/code": "^17.3.0",
42
42
  "@atlaskit/codemod-utils": "^4.2.0",
43
- "@atlaskit/css": "^0.16.0",
43
+ "@atlaskit/css": "^0.17.0",
44
44
  "@atlaskit/custom-steps": "^0.16.0",
45
45
  "@atlaskit/dropdown-menu": "^16.3.0",
46
46
  "@atlaskit/editor-json-transformer": "^8.31.0",
@@ -70,7 +70,7 @@
70
70
  "@atlaskit/platform-feature-flags": "^1.1.0",
71
71
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
72
72
  "@atlaskit/popper": "^7.1.0",
73
- "@atlaskit/primitives": "^16.2.0",
73
+ "@atlaskit/primitives": "^16.3.0",
74
74
  "@atlaskit/profilecard": "^24.21.0",
75
75
  "@atlaskit/prosemirror-history": "^0.2.0",
76
76
  "@atlaskit/react-ufo": "^4.15.0",
@@ -83,7 +83,7 @@
83
83
  "@atlaskit/textfield": "^8.1.0",
84
84
  "@atlaskit/theme": "^21.0.0",
85
85
  "@atlaskit/tmp-editor-statsig": "^13.42.0",
86
- "@atlaskit/tokens": "^8.2.0",
86
+ "@atlaskit/tokens": "^8.3.0",
87
87
  "@atlaskit/tooltip": "^20.10.0",
88
88
  "@atlaskit/ufo": "^0.4.0",
89
89
  "@atlaskit/width-detector": "^5.0.0",
@@ -180,7 +180,7 @@
180
180
  "platform_editor_blocktaskitem_patch_3": {
181
181
  "type": "boolean"
182
182
  },
183
- "aifc_create_enabled": {
183
+ "platform_editor_ai_generic_prep_for_aifc": {
184
184
  "type": "boolean"
185
185
  },
186
186
  "platform-visual-refresh-icons": {