@atlaskit/editor-common 116.17.2 → 116.17.4

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,25 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 116.17.4
4
+
5
+ ### Patch Changes
6
+
7
+ - [`2e62212873ddd`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/2e62212873ddd) -
8
+ Clean up experiment `platform_editor_macro_placeholder_array_guard`
9
+ - [`d4d3ad611bb7b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d4d3ad611bb7b) -
10
+ Add multi-bodied extension action analytics for active child changes and parameter updates.
11
+ - [`3f159bc172788`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/3f159bc172788) -
12
+ Fix quick insert reranker misclassifying high-priority native items (e.g. Link) as skills. The
13
+ reranker now identifies skills by their AI category instead of a priority threshold, preventing
14
+ experiment interactions where native items with elevated priority were incorrectly demoted.
15
+ - Updated dependencies
16
+
17
+ ## 116.17.3
18
+
19
+ ### Patch Changes
20
+
21
+ - Updated dependencies
22
+
3
23
  ## 116.17.2
4
24
 
5
25
  ### Patch Changes
@@ -164,7 +164,7 @@ var useMultiBodiedExtensionActions = exports.useMultiBodiedExtensionActions = fu
164
164
  dispatch(tr);
165
165
  return true;
166
166
  },
167
- updateParameters: function updateParameters(parameters) {
167
+ updateParameters: function updateParameters(parameters, analyticsChangedParam) {
168
168
  var state = editorView.state,
169
169
  dispatch = editorView.dispatch;
170
170
  var pos = getPos();
@@ -182,7 +182,9 @@ var useMultiBodiedExtensionActions = exports.useMultiBodiedExtensionActions = fu
182
182
  var tr = state.tr.setNodeMarkup(pos, null, updatedParameters);
183
183
  dispatch(tr);
184
184
  if (eventDispatcher) {
185
- (0, _utils.sendMBEAnalyticsEvent)(_analytics.ACTION.UPDATE_PARAMETERS, node, eventDispatcher);
185
+ (0, _utils.sendMBEAnalyticsEvent)(_analytics.ACTION.UPDATE_PARAMETERS, node, eventDispatcher, analyticsChangedParam && (0, _platformFeatureFlags.fg)('confluence_frontend_native_tabs_extension') ? {
186
+ changedParams: analyticsChangedParam
187
+ } : undefined);
186
188
  }
187
189
  return true;
188
190
  },
@@ -1,25 +1,29 @@
1
1
  "use strict";
2
2
 
3
+ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
3
4
  Object.defineProperty(exports, "__esModule", {
4
5
  value: true
5
6
  });
6
7
  exports.sendMBEAnalyticsEvent = void 0;
8
+ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
7
9
  var _analytics = require("../../analytics");
8
10
  var _eventDispatcher = require("../../event-dispatcher");
9
11
  var _utils = require("../../utils");
10
- var sendMBEAnalyticsEvent = exports.sendMBEAnalyticsEvent = function sendMBEAnalyticsEvent(action, node, eventDispatcher) {
12
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
13
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
14
+ var sendMBEAnalyticsEvent = exports.sendMBEAnalyticsEvent = function sendMBEAnalyticsEvent(action, node, eventDispatcher, attributes) {
11
15
  var analyticsDispatch = (0, _eventDispatcher.createDispatch)(eventDispatcher);
12
16
  analyticsDispatch(_utils.analyticsEventKey, {
13
17
  payload: {
14
18
  action: action,
15
19
  actionSubject: _analytics.ACTION_SUBJECT.MULTI_BODIED_EXTENSION,
16
20
  eventType: _analytics.EVENT_TYPE.TRACK,
17
- attributes: {
21
+ attributes: _objectSpread({
18
22
  extensionType: node.attrs.extensionType,
19
23
  extensionKey: node.attrs.extensionKey,
20
24
  localId: node.attrs.localId,
21
25
  currentFramesCount: node.content.childCount
22
- }
26
+ }, attributes)
23
27
  }
24
28
  });
25
29
  };
@@ -28,7 +28,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
28
28
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
29
29
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
30
30
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
31
- var packageVersion = "116.17.1";
31
+ var packageVersion = "116.17.3";
32
32
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
33
33
  // Remove URL as it has UGC
34
34
  // Ignored via go/ees007
@@ -6,28 +6,37 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.boostNativeResultsAboveSkills = boostNativeResultsAboveSkills;
8
8
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
9
- // Items with priority >= this threshold are treated as extension-provided
10
- // items (e.g. Rovo skills) and demoted below native editor elements.
11
- // Coupled with priority: 9000 set in
12
- // platform/packages/ai-mate/rovo-skills/src/services/insert-menu-provider/extension-manifest.tsx
13
- var SKILL_PRIORITY_THRESHOLD = 1000;
14
9
  var SCORE_PROXIMITY_THRESHOLD = 0.2;
15
10
 
16
11
  /**
17
- * Promotes native editor elements above extension-provided items (e.g. Rovo
18
- * skills) in search results when their Fuse scores are close.
12
+ * The extension type for Rovo skills, used to identify skill items in the
13
+ * quick insert menu. Matches the value defined in
14
+ * @atlassian/conversation-assistant-content-transformer/utils/skills.
19
15
  *
20
- * Skills set a high priority value (e.g. 9000) while native items have no
21
- * priority (undefined / 0). When a skill and a native item have similar scores
22
- * (within the proximity threshold), the native item is promoted above the
23
- * skill. But when a skill is a significantly better match (e.g. searching
24
- * "research" and the skill is "Research Insights" while the native item is
25
- * "Live search"), the skill keeps its higher rank.
16
+ * Intentionally duplicated here to avoid adding a runtime dependency from
17
+ * editor-common to the conversation-assistant packages.
18
+ */
19
+ var ROVO_SKILL_EXTENSION_TYPE = 'com.atlassian.rovo.skill';
20
+
21
+ /**
22
+ * Promotes native editor elements above Rovo skill items in search results
23
+ * when their Fuse scores are close.
24
+ *
25
+ * An item is classified as a Rovo skill when its `extensionType` property
26
+ * (set by `buildMenuItem` for all extension manifest items) matches the
27
+ * Rovo skill extension type. Native editor items (Link, Code snippet, Table,
28
+ * etc.) and other non-Rovo extensions are unaffected, regardless of their
29
+ * priority value.
30
+ *
31
+ * When a skill and a native item have similar scores (within the proximity
32
+ * threshold), the native item is promoted above the skill. But when a skill
33
+ * is a significantly better match (e.g. searching "research" and the skill is
34
+ * "Research Insights" while the native item is "Live search"), the skill keeps
35
+ * its higher rank.
26
36
  */
27
37
  function boostNativeResultsAboveSkills(results) {
28
38
  var isSkill = function isSkill(r) {
29
- var _r$item$priority;
30
- return ((_r$item$priority = r.item.priority) !== null && _r$item$priority !== void 0 ? _r$item$priority : 0) >= SKILL_PRIORITY_THRESHOLD;
39
+ return r.item.extensionType === ROVO_SKILL_EXTENSION_TYPE;
31
40
  };
32
41
  var reordered = results.slice(0);
33
42
  for (var i = 1; i < reordered.length; i++) {
@@ -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 = "116.17.1";
27
+ var packageVersion = "116.17.3";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -4,7 +4,6 @@ Object.defineProperty(exports, "__esModule", {
4
4
  value: true
5
5
  });
6
6
  exports.getExtensionLozengeData = void 0;
7
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
8
7
  var getExtensionLozengeData = exports.getExtensionLozengeData = function getExtensionLozengeData(_ref) {
9
8
  var node = _ref.node,
10
9
  type = _ref.type;
@@ -13,7 +12,7 @@ var getExtensionLozengeData = exports.getExtensionLozengeData = function getExte
13
12
  }
14
13
  var macroMetadata = node.attrs.parameters.macroMetadata;
15
14
  // EDITOR-4007: guard against non-array placeholder to prevent `TypeError: ... forEach is not a function`.
16
- var hasValidPlaceholder = (0, _expValEquals.expValEquals)('platform_editor_macro_placeholder_array_guard', 'isEnabled', true) ? macroMetadata && Array.isArray(macroMetadata.placeholder) : macroMetadata && macroMetadata.placeholder;
15
+ var hasValidPlaceholder = macroMetadata && Array.isArray(macroMetadata.placeholder);
17
16
  if (hasValidPlaceholder) {
18
17
  var placeholderData;
19
18
  // Ignored via go/ees005
@@ -160,7 +160,7 @@ export const useMultiBodiedExtensionActions = ({
160
160
  dispatch(tr);
161
161
  return true;
162
162
  },
163
- updateParameters(parameters) {
163
+ updateParameters(parameters, analyticsChangedParam) {
164
164
  const {
165
165
  state,
166
166
  dispatch
@@ -186,7 +186,9 @@ export const useMultiBodiedExtensionActions = ({
186
186
  const tr = state.tr.setNodeMarkup(pos, null, updatedParameters);
187
187
  dispatch(tr);
188
188
  if (eventDispatcher) {
189
- sendMBEAnalyticsEvent(ACTION.UPDATE_PARAMETERS, node, eventDispatcher);
189
+ sendMBEAnalyticsEvent(ACTION.UPDATE_PARAMETERS, node, eventDispatcher, analyticsChangedParam && fg('confluence_frontend_native_tabs_extension') ? {
190
+ changedParams: analyticsChangedParam
191
+ } : undefined);
190
192
  }
191
193
  return true;
192
194
  },
@@ -1,7 +1,7 @@
1
1
  import { ACTION_SUBJECT, EVENT_TYPE } from '../../analytics';
2
2
  import { createDispatch } from '../../event-dispatcher';
3
3
  import { analyticsEventKey } from '../../utils';
4
- export const sendMBEAnalyticsEvent = (action, node, eventDispatcher) => {
4
+ export const sendMBEAnalyticsEvent = (action, node, eventDispatcher, attributes) => {
5
5
  const analyticsDispatch = createDispatch(eventDispatcher);
6
6
  analyticsDispatch(analyticsEventKey, {
7
7
  payload: {
@@ -12,7 +12,8 @@ export const sendMBEAnalyticsEvent = (action, node, eventDispatcher) => {
12
12
  extensionType: node.attrs.extensionType,
13
13
  extensionKey: node.attrs.extensionKey,
14
14
  localId: node.attrs.localId,
15
- currentFramesCount: node.content.childCount
15
+ currentFramesCount: node.content.childCount,
16
+ ...attributes
16
17
  }
17
18
  }
18
19
  });
@@ -14,7 +14,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
14
14
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
15
15
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
16
16
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
17
- const packageVersion = "116.17.1";
17
+ const packageVersion = "116.17.3";
18
18
  const sanitiseSentryEvents = (data, _hint) => {
19
19
  // Remove URL as it has UGC
20
20
  // Ignored via go/ees007
@@ -1,26 +1,33 @@
1
- // Items with priority >= this threshold are treated as extension-provided
2
- // items (e.g. Rovo skills) and demoted below native editor elements.
3
- // Coupled with priority: 9000 set in
4
- // platform/packages/ai-mate/rovo-skills/src/services/insert-menu-provider/extension-manifest.tsx
5
- const SKILL_PRIORITY_THRESHOLD = 1000;
6
1
  const SCORE_PROXIMITY_THRESHOLD = 0.2;
7
2
 
8
3
  /**
9
- * Promotes native editor elements above extension-provided items (e.g. Rovo
10
- * skills) in search results when their Fuse scores are close.
4
+ * The extension type for Rovo skills, used to identify skill items in the
5
+ * quick insert menu. Matches the value defined in
6
+ * @atlassian/conversation-assistant-content-transformer/utils/skills.
11
7
  *
12
- * Skills set a high priority value (e.g. 9000) while native items have no
13
- * priority (undefined / 0). When a skill and a native item have similar scores
14
- * (within the proximity threshold), the native item is promoted above the
15
- * skill. But when a skill is a significantly better match (e.g. searching
16
- * "research" and the skill is "Research Insights" while the native item is
17
- * "Live search"), the skill keeps its higher rank.
8
+ * Intentionally duplicated here to avoid adding a runtime dependency from
9
+ * editor-common to the conversation-assistant packages.
10
+ */
11
+ const ROVO_SKILL_EXTENSION_TYPE = 'com.atlassian.rovo.skill';
12
+
13
+ /**
14
+ * Promotes native editor elements above Rovo skill items in search results
15
+ * when their Fuse scores are close.
16
+ *
17
+ * An item is classified as a Rovo skill when its `extensionType` property
18
+ * (set by `buildMenuItem` for all extension manifest items) matches the
19
+ * Rovo skill extension type. Native editor items (Link, Code snippet, Table,
20
+ * etc.) and other non-Rovo extensions are unaffected, regardless of their
21
+ * priority value.
22
+ *
23
+ * When a skill and a native item have similar scores (within the proximity
24
+ * threshold), the native item is promoted above the skill. But when a skill
25
+ * is a significantly better match (e.g. searching "research" and the skill is
26
+ * "Research Insights" while the native item is "Live search"), the skill keeps
27
+ * its higher rank.
18
28
  */
19
29
  export function boostNativeResultsAboveSkills(results) {
20
- const isSkill = r => {
21
- var _r$item$priority;
22
- return ((_r$item$priority = r.item.priority) !== null && _r$item$priority !== void 0 ? _r$item$priority : 0) >= SKILL_PRIORITY_THRESHOLD;
23
- };
30
+ const isSkill = r => r.item.extensionType === ROVO_SKILL_EXTENSION_TYPE;
24
31
  const reordered = results.slice(0);
25
32
  for (let i = 1; i < reordered.length; i++) {
26
33
  if (isSkill(reordered[i])) {
@@ -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 = "116.17.1";
17
+ const packageVersion = "116.17.3";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -1,4 +1,3 @@
1
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
1
  export const getExtensionLozengeData = ({
3
2
  node,
4
3
  type
@@ -10,7 +9,7 @@ export const getExtensionLozengeData = ({
10
9
  macroMetadata
11
10
  } = node.attrs.parameters;
12
11
  // EDITOR-4007: guard against non-array placeholder to prevent `TypeError: ... forEach is not a function`.
13
- const hasValidPlaceholder = expValEquals('platform_editor_macro_placeholder_array_guard', 'isEnabled', true) ? macroMetadata && Array.isArray(macroMetadata.placeholder) : macroMetadata && macroMetadata.placeholder;
12
+ const hasValidPlaceholder = macroMetadata && Array.isArray(macroMetadata.placeholder);
14
13
  if (hasValidPlaceholder) {
15
14
  let placeholderData;
16
15
  // Ignored via go/ees005
@@ -157,7 +157,7 @@ export var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActi
157
157
  dispatch(tr);
158
158
  return true;
159
159
  },
160
- updateParameters: function updateParameters(parameters) {
160
+ updateParameters: function updateParameters(parameters, analyticsChangedParam) {
161
161
  var state = editorView.state,
162
162
  dispatch = editorView.dispatch;
163
163
  var pos = getPos();
@@ -175,7 +175,9 @@ export var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActi
175
175
  var tr = state.tr.setNodeMarkup(pos, null, updatedParameters);
176
176
  dispatch(tr);
177
177
  if (eventDispatcher) {
178
- sendMBEAnalyticsEvent(ACTION.UPDATE_PARAMETERS, node, eventDispatcher);
178
+ sendMBEAnalyticsEvent(ACTION.UPDATE_PARAMETERS, node, eventDispatcher, analyticsChangedParam && fg('confluence_frontend_native_tabs_extension') ? {
179
+ changedParams: analyticsChangedParam
180
+ } : undefined);
179
181
  }
180
182
  return true;
181
183
  },
@@ -1,19 +1,22 @@
1
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
+ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
+ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
1
4
  import { ACTION_SUBJECT, EVENT_TYPE } from '../../analytics';
2
5
  import { createDispatch } from '../../event-dispatcher';
3
6
  import { analyticsEventKey } from '../../utils';
4
- export var sendMBEAnalyticsEvent = function sendMBEAnalyticsEvent(action, node, eventDispatcher) {
7
+ export var sendMBEAnalyticsEvent = function sendMBEAnalyticsEvent(action, node, eventDispatcher, attributes) {
5
8
  var analyticsDispatch = createDispatch(eventDispatcher);
6
9
  analyticsDispatch(analyticsEventKey, {
7
10
  payload: {
8
11
  action: action,
9
12
  actionSubject: ACTION_SUBJECT.MULTI_BODIED_EXTENSION,
10
13
  eventType: EVENT_TYPE.TRACK,
11
- attributes: {
14
+ attributes: _objectSpread({
12
15
  extensionType: node.attrs.extensionType,
13
16
  extensionKey: node.attrs.extensionKey,
14
17
  localId: node.attrs.localId,
15
18
  currentFramesCount: node.content.childCount
16
- }
19
+ }, attributes)
17
20
  }
18
21
  });
19
22
  };
@@ -20,7 +20,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
20
20
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
21
21
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
22
22
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
23
- var packageVersion = "116.17.1";
23
+ var packageVersion = "116.17.3";
24
24
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
25
25
  // Remove URL as it has UGC
26
26
  // Ignored via go/ees007
@@ -1,26 +1,35 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- // Items with priority >= this threshold are treated as extension-provided
3
- // items (e.g. Rovo skills) and demoted below native editor elements.
4
- // Coupled with priority: 9000 set in
5
- // platform/packages/ai-mate/rovo-skills/src/services/insert-menu-provider/extension-manifest.tsx
6
- var SKILL_PRIORITY_THRESHOLD = 1000;
7
2
  var SCORE_PROXIMITY_THRESHOLD = 0.2;
8
3
 
9
4
  /**
10
- * Promotes native editor elements above extension-provided items (e.g. Rovo
11
- * skills) in search results when their Fuse scores are close.
5
+ * The extension type for Rovo skills, used to identify skill items in the
6
+ * quick insert menu. Matches the value defined in
7
+ * @atlassian/conversation-assistant-content-transformer/utils/skills.
12
8
  *
13
- * Skills set a high priority value (e.g. 9000) while native items have no
14
- * priority (undefined / 0). When a skill and a native item have similar scores
15
- * (within the proximity threshold), the native item is promoted above the
16
- * skill. But when a skill is a significantly better match (e.g. searching
17
- * "research" and the skill is "Research Insights" while the native item is
18
- * "Live search"), the skill keeps its higher rank.
9
+ * Intentionally duplicated here to avoid adding a runtime dependency from
10
+ * editor-common to the conversation-assistant packages.
11
+ */
12
+ var ROVO_SKILL_EXTENSION_TYPE = 'com.atlassian.rovo.skill';
13
+
14
+ /**
15
+ * Promotes native editor elements above Rovo skill items in search results
16
+ * when their Fuse scores are close.
17
+ *
18
+ * An item is classified as a Rovo skill when its `extensionType` property
19
+ * (set by `buildMenuItem` for all extension manifest items) matches the
20
+ * Rovo skill extension type. Native editor items (Link, Code snippet, Table,
21
+ * etc.) and other non-Rovo extensions are unaffected, regardless of their
22
+ * priority value.
23
+ *
24
+ * When a skill and a native item have similar scores (within the proximity
25
+ * threshold), the native item is promoted above the skill. But when a skill
26
+ * is a significantly better match (e.g. searching "research" and the skill is
27
+ * "Research Insights" while the native item is "Live search"), the skill keeps
28
+ * its higher rank.
19
29
  */
20
30
  export function boostNativeResultsAboveSkills(results) {
21
31
  var isSkill = function isSkill(r) {
22
- var _r$item$priority;
23
- return ((_r$item$priority = r.item.priority) !== null && _r$item$priority !== void 0 ? _r$item$priority : 0) >= SKILL_PRIORITY_THRESHOLD;
32
+ return r.item.extensionType === ROVO_SKILL_EXTENSION_TYPE;
24
33
  };
25
34
  var reordered = results.slice(0);
26
35
  for (var i = 1; i < reordered.length; i++) {
@@ -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 = "116.17.1";
24
+ var packageVersion = "116.17.3";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -1,4 +1,3 @@
1
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
2
1
  export var getExtensionLozengeData = function getExtensionLozengeData(_ref) {
3
2
  var node = _ref.node,
4
3
  type = _ref.type;
@@ -7,7 +6,7 @@ export var getExtensionLozengeData = function getExtensionLozengeData(_ref) {
7
6
  }
8
7
  var macroMetadata = node.attrs.parameters.macroMetadata;
9
8
  // EDITOR-4007: guard against non-array placeholder to prevent `TypeError: ... forEach is not a function`.
10
- var hasValidPlaceholder = expValEquals('platform_editor_macro_placeholder_array_guard', 'isEnabled', true) ? macroMetadata && Array.isArray(macroMetadata.placeholder) : macroMetadata && macroMetadata.placeholder;
9
+ var hasValidPlaceholder = macroMetadata && Array.isArray(macroMetadata.placeholder);
11
10
  if (hasValidPlaceholder) {
12
11
  var placeholderData;
13
12
  // Ignored via go/ees005
@@ -82,6 +82,7 @@ type CustomPanelEventPayload = TrackAEP<ACTION.CHANGED_BACKGROUND_COLOR | ACTION
82
82
  icon: string;
83
83
  }, undefined>;
84
84
  type MBEEventPayload = TrackAEP<ACTION.ADD_CHILD | ACTION.CHANGE_ACTIVE | ACTION.DELETED | ACTION.REMOVE_CHILD | ACTION.UPDATE_PARAMETERS | ACTION.GET_CHILDREN | ACTION.GET_CHILDREN_CONTAINER, ACTION_SUBJECT.MULTI_BODIED_EXTENSION, undefined, {
85
+ changedParams?: string;
85
86
  currentFramesCount: number;
86
87
  extensionKey: string;
87
88
  extensionType: string;
@@ -2,5 +2,8 @@ import type { Node as PmNode } from '@atlaskit/editor-prosemirror/model';
2
2
  import type { ACTION } from '../../analytics';
3
3
  import type { EventDispatcher } from '../../event-dispatcher';
4
4
  type AnalyticsActionTypes = ACTION.ADD_CHILD | ACTION.CHANGE_ACTIVE | ACTION.DELETED | ACTION.REMOVE_CHILD | ACTION.UPDATE_PARAMETERS | ACTION.GET_CHILDREN | ACTION.GET_CHILDREN_CONTAINER;
5
- export declare const sendMBEAnalyticsEvent: (action: AnalyticsActionTypes, node: PmNode, eventDispatcher: EventDispatcher) => void;
5
+ type AnalyticsAttributes = {
6
+ changedParams?: string;
7
+ };
8
+ export declare const sendMBEAnalyticsEvent: (action: AnalyticsActionTypes, node: PmNode, eventDispatcher: EventDispatcher, attributes?: AnalyticsAttributes) => void;
6
9
  export {};
@@ -55,7 +55,12 @@ export type MultiBodiedExtensionActions = {
55
55
  getChildrenCount: () => number;
56
56
  removeChild: (index: number) => boolean;
57
57
  reorderChildren: (fromIndex: number, toIndex: number) => boolean;
58
- updateParameters: (parameters: Parameters) => boolean;
58
+ /**
59
+ * `analyticsChangedParam` is the optional name/key of the parameter changed by the client.
60
+ * It is reported in analytics as `changedParams`.
61
+ * Example: `updateParameters({ tabs: updatedTabs }, '+tabColor,~tabTitle')`.
62
+ */
63
+ updateParameters: (parameters: Parameters, analyticsChangedParam?: string) => boolean;
59
64
  };
60
65
  export type ParametersGetter<T extends Parameters = Parameters> = TransformBefore<T>;
61
66
  export type AsyncParametersGetter<T extends Parameters = Parameters> = TransformAfter<T>;
@@ -1,14 +1,19 @@
1
1
  import type { QuickInsertItem } from '../provider-factory';
2
2
  /**
3
- * Promotes native editor elements above extension-provided items (e.g. Rovo
4
- * skills) in search results when their Fuse scores are close.
3
+ * Promotes native editor elements above Rovo skill items in search results
4
+ * when their Fuse scores are close.
5
5
  *
6
- * Skills set a high priority value (e.g. 9000) while native items have no
7
- * priority (undefined / 0). When a skill and a native item have similar scores
8
- * (within the proximity threshold), the native item is promoted above the
9
- * skill. But when a skill is a significantly better match (e.g. searching
10
- * "research" and the skill is "Research Insights" while the native item is
11
- * "Live search"), the skill keeps its higher rank.
6
+ * An item is classified as a Rovo skill when its `extensionType` property
7
+ * (set by `buildMenuItem` for all extension manifest items) matches the
8
+ * Rovo skill extension type. Native editor items (Link, Code snippet, Table,
9
+ * etc.) and other non-Rovo extensions are unaffected, regardless of their
10
+ * priority value.
11
+ *
12
+ * When a skill and a native item have similar scores (within the proximity
13
+ * threshold), the native item is promoted above the skill. But when a skill
14
+ * is a significantly better match (e.g. searching "research" and the skill is
15
+ * "Research Insights" while the native item is "Live search"), the skill keeps
16
+ * its higher rank.
12
17
  */
13
18
  export declare function boostNativeResultsAboveSkills<T extends {
14
19
  item: QuickInsertItem;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "116.17.2",
3
+ "version": "116.17.4",
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/"
@@ -69,7 +69,7 @@
69
69
  "@atlaskit/platform-feature-flags": "^2.0.0",
70
70
  "@atlaskit/platform-feature-flags-react": "^1.1.0",
71
71
  "@atlaskit/primitives": "^20.2.0",
72
- "@atlaskit/profilecard": "^26.4.0",
72
+ "@atlaskit/profilecard": "^26.5.0",
73
73
  "@atlaskit/prosemirror-history": "^1.0.0",
74
74
  "@atlaskit/react-compiler-gating": "^0.2.0",
75
75
  "@atlaskit/react-ufo": "^7.3.0",
@@ -80,7 +80,7 @@
80
80
  "@atlaskit/task-decision": "^21.4.0",
81
81
  "@atlaskit/teams-app-config": "^2.1.0",
82
82
  "@atlaskit/textfield": "^9.1.0",
83
- "@atlaskit/tmp-editor-statsig": "^114.6.0",
83
+ "@atlaskit/tmp-editor-statsig": "^116.0.0",
84
84
  "@atlaskit/tokens": "^15.2.0",
85
85
  "@atlaskit/tooltip": "^23.1.0",
86
86
  "@atlaskit/width-detector": "^6.1.0",