@atlaskit/editor-common 120.12.0 → 120.13.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 (35) hide show
  1. package/CHANGELOG.md +59 -0
  2. package/dist/cjs/ai-messages/ai-suggestions.js +1 -1
  3. package/dist/cjs/extensibility/MultiBodiedExtension/action-api.js +16 -9
  4. package/dist/cjs/messages/block-controls.js +10 -0
  5. package/dist/cjs/monitoring/error.js +5 -6
  6. package/dist/cjs/quick-insert/ElementBrowserQuickInsertMenuItem.js +26 -17
  7. package/dist/cjs/quick-insert/createQuickInsertMatcher.js +16 -4
  8. package/dist/cjs/ui/DropList/index.js +1 -1
  9. package/dist/cjs/ui/Mention/mention-with-profilecard.js +6 -1
  10. package/dist/cjs/vanilla-tooltip/index.js +3 -1
  11. package/dist/es2019/ai-messages/ai-suggestions.js +1 -1
  12. package/dist/es2019/extensibility/MultiBodiedExtension/action-api.js +16 -9
  13. package/dist/es2019/messages/block-controls.js +10 -0
  14. package/dist/es2019/monitoring/error.js +5 -6
  15. package/dist/es2019/quick-insert/ElementBrowserQuickInsertMenuItem.js +26 -17
  16. package/dist/es2019/quick-insert/createQuickInsertMatcher.js +13 -1
  17. package/dist/es2019/ui/DropList/index.js +1 -1
  18. package/dist/es2019/ui/Mention/mention-with-profilecard.js +6 -1
  19. package/dist/es2019/vanilla-tooltip/index.js +10 -2
  20. package/dist/esm/ai-messages/ai-suggestions.js +1 -1
  21. package/dist/esm/extensibility/MultiBodiedExtension/action-api.js +16 -9
  22. package/dist/esm/messages/block-controls.js +10 -0
  23. package/dist/esm/monitoring/error.js +5 -6
  24. package/dist/esm/quick-insert/ElementBrowserQuickInsertMenuItem.js +26 -17
  25. package/dist/esm/quick-insert/createQuickInsertMatcher.js +18 -5
  26. package/dist/esm/ui/DropList/index.js +1 -1
  27. package/dist/esm/ui/Mention/mention-with-profilecard.js +6 -1
  28. package/dist/esm/vanilla-tooltip/index.js +3 -1
  29. package/dist/types/ai-messages/ai-suggestions.d.ts +4 -0
  30. package/dist/types/messages/block-controls.d.ts +25 -15
  31. package/dist/types/provider-factory/profile-card-provider.d.ts +5 -0
  32. package/dist/types/quick-insert/QuickInsertContext.d.ts +1 -0
  33. package/dist/types/quick-insert/createQuickInsertMatcher.d.ts +12 -3
  34. package/dist/types/vanilla-tooltip/index.d.ts +16 -1
  35. package/package.json +13 -12
package/CHANGELOG.md CHANGED
@@ -1,5 +1,64 @@
1
1
  # @atlaskit/editor-common
2
2
 
3
+ ## 120.13.1
4
+
5
+ ### Patch Changes
6
+
7
+ - [`c744811e22b13`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/c744811e22b13) -
8
+ Clean up feature gate `platform_editor_sentry_breadcrumbs`
9
+ - [`6bcbe7ce95706`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6bcbe7ce95706) -
10
+ Deprecate cardRovoTitle after removing the visible Rovo label from suggestion cards.
11
+ - Updated dependencies
12
+
13
+ ## 120.13.0
14
+
15
+ ### Minor Changes
16
+
17
+ - [`5d007e10ca06f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/5d007e10ca06f) -
18
+ Add collapsible heading behavior, tooltip messaging, and controls behind the
19
+ `platform_editor_collapsible_headings` experiment.
20
+ - [`7a5578f056f2b`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/7a5578f056f2b) -
21
+ Under `platform_editor_slash_command`, enhance the registry element browser with a responsive
22
+ 968px modal, a clearable search field, category navigation, and responsive item grids. Unselected
23
+ element cards have no border, while selected cards retain their selected border. Item descriptions
24
+ appear below titles when registration metadata supplies one.
25
+ - [`4b796b0158182`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/4b796b0158182) -
26
+ EDITOR-8561 Render the breakout resize handle tooltip with `VanillaTooltip` behind the
27
+ `platform_editor_use_vanilla_components` experiment, replacing a React tree per resize handle.
28
+ When the experiment is off the tooltip is still rendered with React through the node view portal
29
+ provider.
30
+
31
+ The tooltip is anchored to a zero-height element parked where the pointer entered the rail, rather
32
+ than to the rail itself, which spans the node's full height. This matches the ADS tooltip's
33
+ `position="mouse"`, which latches the cursor position as the tooltip opens and does not move it
34
+ afterwards. The anchor is positioned by `.pm-breakout-resize-tooltip-anchor` in the editor's
35
+ resizer styles, which reads the pointer's offset from a custom property; the rule is inert while
36
+ the experiment is off, because nothing carries the class.
37
+
38
+ On the experiment the tooltip always mounts on the first hover, whatever
39
+ `platform_editor_reduce_event_listener_count` is set to: there is no portal to defer, and the
40
+ handles are built before ProseMirror populates `contentDOM`, so mounting any earlier would label
41
+ the tooltip with a generic "node" rather than the node being resized.
42
+
43
+ `VanillaTooltip` accepts an optional `placement`, forwarded to Popper when the tooltip is
44
+ positioned. Defaults to `top`, so existing callers are unaffected.
45
+
46
+ ## 120.12.1
47
+
48
+ ### Patch Changes
49
+
50
+ - [`43445b6289c3f`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/43445b6289c3f) -
51
+ Fix stale ProseMirror selection persisting across MultiBodiedExtension tab switches. Gated behind
52
+ confluence_native_tabs_m15.
53
+ - [`d9b0aa59b7c39`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/d9b0aa59b7c39) -
54
+ Fix mention accessibility: the profile-card trigger wrapping an @mention is now prefilled with the
55
+ mention's known identity (display name + account id), so screen readers announce the concrete name
56
+ (e.g. "More information about Jane Smith") instead of the generic "More information about this
57
+ user". Threaded via a new optional prefilledProfileData on RenderUserMentionCard /
58
+ UserProfileCardForMention. Behind the platform_mention_profilecard_accessible_name_exp experiment
59
+ (JRACLOUD-99229).
60
+ - Updated dependencies
61
+
3
62
  ## 120.12.0
4
63
 
5
64
  ### Minor Changes
@@ -139,7 +139,7 @@ var aiSuggestionsMessages = exports.aiSuggestionsMessages = (0, _reactIntl.defin
139
139
  cardRovoTitle: {
140
140
  id: 'fabric.editor.ai.suggestions.card.rovoTitle.non-final',
141
141
  defaultMessage: 'Rovo',
142
- description: 'Title for Rovo branding on the AI suggestions card'
142
+ description: 'Deprecated title for Rovo branding on the AI suggestions card'
143
143
  },
144
144
  cardPrivateLabel: {
145
145
  id: 'fabric.editor.ai.suggestions.card.privateLabel.non-final',
@@ -9,6 +9,7 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
9
9
  var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/slicedToArray"));
10
10
  var _react = _interopRequireDefault(require("react"));
11
11
  var _state = require("@atlaskit/editor-prosemirror/state");
12
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
12
13
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
13
14
  var _analytics = require("../../analytics");
14
15
  var _utils = require("./utils");
@@ -33,7 +34,7 @@ var useMultiBodiedExtensionActions = exports.useMultiBodiedExtensionActions = fu
33
34
  (0, _utils.sendMBEAnalyticsEvent)(_analytics.ACTION.CHANGE_ACTIVE, node, eventDispatcher);
34
35
  }
35
36
  var selection = (_options$selection = options === null || options === void 0 ? void 0 : options.selection) !== null && _options$selection !== void 0 ? _options$selection : 'none';
36
- if (selection === 'none') {
37
+ if (selection === 'none' && !(0, _isExperimentEnabled.isExperimentEnabled)('confluence_native_tabs_m15')) {
37
38
  return updateActiveChildResult;
38
39
  }
39
40
  var pos = getPos();
@@ -53,16 +54,22 @@ var useMultiBodiedExtensionActions = exports.useMultiBodiedExtensionActions = fu
53
54
  desiredPos += (possiblyMbeNode === null || possiblyMbeNode === void 0 || (_possiblyMbeNode$cont4 = possiblyMbeNode.content) === null || _possiblyMbeNode$cont4 === void 0 || (_possiblyMbeNode$cont4 = _possiblyMbeNode$cont4.child(i)) === null || _possiblyMbeNode$cont4 === void 0 ? void 0 : _possiblyMbeNode$cont4.nodeSize) || 0;
54
55
  }
55
56
  var targetFrame = possiblyMbeNode.content.child(index);
56
- if (selection === 'start') {
57
- // +1 moves past the extensionFrame opening token; TextSelection.near() finds
58
- // the nearest valid text cursor position from there.
59
- dispatch(state.tr.setSelection(_state.TextSelection.near(state.doc.resolve(desiredPos + 1))));
60
- } else {
61
- // Place cursor at the end of the target frame's content.
62
- // -1 bias searches backward from the frame's closing token.
57
+ if (selection === 'end') {
63
58
  dispatch(state.tr.setSelection(_state.TextSelection.near(state.doc.resolve(desiredPos + targetFrame.nodeSize), -1)));
59
+ editorView.focus();
60
+ } else {
61
+ // for 'start' and 'none' selection place a
62
+ // collapsed cursor at the start of the target frame so the ProseMirror
63
+ // selection always points into the active tab. This prevents stale
64
+ // selections from persisting across tab switches (which causes paste to
65
+ // land in the wrong tab).
66
+ // 'none' intentionally skips editorView.focus() so DOM focus can
67
+ // remain on the tab button for keyboard navigation.
68
+ dispatch(state.tr.setSelection(_state.TextSelection.near(state.doc.resolve(desiredPos + 1))));
69
+ if (selection === 'start') {
70
+ editorView.focus();
71
+ }
64
72
  }
65
- editorView.focus();
66
73
  }
67
74
  return updateActiveChildResult;
68
75
  },
@@ -26,6 +26,16 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
26
26
  defaultMessage: 'Insert',
27
27
  description: 'Label on button to insert content at the current cursor position'
28
28
  },
29
+ collapseSection: {
30
+ id: 'editor-common.messages.block-controls.collapseSection',
31
+ defaultMessage: 'Collapse section',
32
+ description: 'Accessible label for the button that collapses a heading section.'
33
+ },
34
+ expandSection: {
35
+ id: 'editor-common.messages.block-controls.expandSection',
36
+ defaultMessage: 'Expand section',
37
+ description: 'Accessible label for the button that expands a heading section.'
38
+ },
29
39
  moveUp: {
30
40
  id: 'fabric.editor.blockControlMoveUp',
31
41
  defaultMessage: 'Move up',
@@ -11,7 +11,6 @@ var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/de
11
11
  var _toConsumableArray2 = _interopRequireDefault(require("@babel/runtime/helpers/toConsumableArray"));
12
12
  var _asyncToGenerator2 = _interopRequireDefault(require("@babel/runtime/helpers/asyncToGenerator"));
13
13
  var _browser = require("@sentry/browser");
14
- var _fg = require("@atlaskit/platform-feature-flags/fg");
15
14
  var _environment = require("./environment");
16
15
  var _normaliseSentryBreadcrumbs = require("./normalise-sentry-breadcrumbs");
17
16
  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; }
@@ -28,7 +27,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
28
27
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
29
28
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
30
29
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
31
- var packageVersion = "120.11.3";
30
+ var packageVersion = "120.13.0";
32
31
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
33
32
  // Remove URL as it has UGC
34
33
  // Ignored via go/ees007
@@ -68,7 +67,7 @@ var logException = exports.logException = /*#__PURE__*/function () {
68
67
  case 3:
69
68
  _yield$import2 = _context.sent;
70
69
  ExtraErrorData = _yield$import2.ExtraErrorData;
71
- breadcrumbsIntegration = (0, _fg.fg)('platform_editor_sentry_breadcrumbs') ? new _browser.Integrations.Breadcrumbs({
70
+ breadcrumbsIntegration = new _browser.Integrations.Breadcrumbs({
72
71
  // only enable breadcrumbs for dom (UI clicks and inputs)
73
72
  // include 'data-test-id', 'data-testid' in the breadcrumbs if they are found
74
73
  dom: {
@@ -79,12 +78,12 @@ var logException = exports.logException = /*#__PURE__*/function () {
79
78
  console: false,
80
79
  history: false,
81
80
  sentry: false
82
- }) : undefined;
81
+ });
83
82
  sentryOptions = {
84
83
  dsn: (0, _environment.isFedRamp)() ? undefined : SENTRY_DSN,
85
84
  release: "".concat(packageName, "@").concat(packageVersion),
86
85
  environment: (_process$env$CLOUD_EN = process.env.CLOUD_ENV) !== null && _process$env$CLOUD_EN !== void 0 ? _process$env$CLOUD_EN : 'unknown',
87
- beforeBreadcrumb: (0, _fg.fg)('platform_editor_sentry_breadcrumbs') ? _normaliseSentryBreadcrumbs.normaliseSentryBreadcrumbs : undefined,
86
+ beforeBreadcrumb: _normaliseSentryBreadcrumbs.normaliseSentryBreadcrumbs,
88
87
  ignoreErrors: [
89
88
  // Network issues
90
89
  NETWORK_ERROR_REGEX, NETWORK_FAILURE_REGEX, 'TypeError: Failed to fetch',
@@ -95,7 +94,7 @@ var logException = exports.logException = /*#__PURE__*/function () {
95
94
  return [].concat((0, _toConsumableArray2.default)(defaultIntegrations.filter(function (_ref2) {
96
95
  var name = _ref2.name;
97
96
  return name !== 'Breadcrumbs';
98
- })), (0, _toConsumableArray2.default)(breadcrumbsIntegration ? [breadcrumbsIntegration] : []), [
97
+ })), [breadcrumbsIntegration,
99
98
  // Extracts all non-native attributes from the error object and attaches them to the event as the extra data
100
99
  // https://docs.sentry.io/platforms/javascript/configuration/integrations/plugin/?original_referrer=https%3A%2F%2Fduckduckgo.com%2F#extraerrordata
101
100
  new ExtraErrorData()]);
@@ -11,47 +11,52 @@ var _quickInsertMenuItemUtils = require("./quickInsertMenuItemUtils");
11
11
  var _useQuickInsertContext = require("./useQuickInsertContext");
12
12
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- Compiled primitives do not provide Pressable.
13
13
 
14
- var itemStyles = (0, _primitives.xcss)({
14
+ var borderlessItemStyles = (0, _primitives.xcss)({
15
15
  alignItems: 'start',
16
16
  backgroundColor: 'color.background.neutral.subtle',
17
- borderColor: 'color.border',
18
17
  borderRadius: 'radius.medium',
19
- borderStyle: 'solid',
20
- borderWidth: 'border.width',
21
18
  color: 'color.text',
22
19
  cursor: 'pointer',
23
20
  display: 'flex',
24
21
  gap: 'space.150',
22
+ height: '88px',
25
23
  padding: 'space.150',
26
24
  textAlign: 'start',
27
25
  width: '100%'
28
26
  });
29
- var selectedItemStyles = (0, _primitives.xcss)({
27
+ var borderlessSelectedItemStyles = (0, _primitives.xcss)({
30
28
  alignItems: 'start',
31
29
  backgroundColor: 'color.background.selected',
32
- borderColor: 'color.border.selected',
33
- borderRadius: 'radius.medium',
34
- borderStyle: 'solid',
35
- borderWidth: 'border.width',
30
+ borderRadius: 0,
36
31
  color: 'color.text',
37
32
  cursor: 'pointer',
38
33
  display: 'flex',
39
34
  gap: 'space.150',
35
+ height: '88px',
40
36
  padding: 'space.150',
37
+ position: 'relative',
41
38
  textAlign: 'start',
42
- width: '100%'
39
+ width: '100%',
40
+ '::before': {
41
+ borderInlineStartColor: 'color.border.selected',
42
+ borderInlineStartStyle: 'solid',
43
+ borderInlineStartWidth: 'border.width.selected',
44
+ content: "''",
45
+ insetBlock: 'space.0',
46
+ insetInlineStart: 'space.0',
47
+ pointerEvents: 'none',
48
+ position: 'absolute'
49
+ }
43
50
  });
44
- var disabledItemStyles = (0, _primitives.xcss)({
51
+ var borderlessDisabledItemStyles = (0, _primitives.xcss)({
45
52
  alignItems: 'start',
46
53
  backgroundColor: 'color.background.neutral.subtle',
47
- borderColor: 'color.border',
48
54
  borderRadius: 'radius.medium',
49
- borderStyle: 'solid',
50
- borderWidth: 'border.width',
51
55
  color: 'color.text.disabled',
52
56
  cursor: 'not-allowed',
53
57
  display: 'flex',
54
58
  gap: 'space.150',
59
+ height: '88px',
55
60
  padding: 'space.150',
56
61
  textAlign: 'start',
57
62
  width: '100%'
@@ -99,6 +104,7 @@ var ElementBrowserQuickInsertMenuItem = exports.ElementBrowserQuickInsertMenuIte
99
104
  },
100
105
  id = _ref2.id,
101
106
  isSelected = _ref2.isSelected;
107
+ var itemDescription = description !== null && description !== void 0 ? description : item === null || item === void 0 ? void 0 : item.description;
102
108
  var handleClick = (0, _quickInsertMenuItemUtils.useQuickInsertMenuItemSelection)(onSelect);
103
109
  return /*#__PURE__*/_react.default.createElement(_primitives.Pressable, {
104
110
  "aria-label": ariaLabel,
@@ -107,7 +113,7 @@ var ElementBrowserQuickInsertMenuItem = exports.ElementBrowserQuickInsertMenuIte
107
113
  isDisabled: isDisabled,
108
114
  onClick: handleClick,
109
115
  role: "option",
110
- xcss: isDisabled ? disabledItemStyles : isSelected ? selectedItemStyles : itemStyles
116
+ xcss: isDisabled ? borderlessDisabledItemStyles : isSelected ? borderlessSelectedItemStyles : borderlessItemStyles
111
117
  }, iconBefore && shouldWrapIcon ? /*#__PURE__*/_react.default.createElement(_primitives.Box, {
112
118
  xcss: iconStyles
113
119
  }, iconBefore) : iconBefore, /*#__PURE__*/_react.default.createElement(_primitives.Stack, {
@@ -118,11 +124,14 @@ var ElementBrowserQuickInsertMenuItem = exports.ElementBrowserQuickInsertMenuIte
118
124
  spread: "space-between",
119
125
  space: "space.100"
120
126
  }, /*#__PURE__*/_react.default.createElement(_primitives.Text, {
127
+ maxLines: 1,
121
128
  weight: "medium"
122
129
  }, title), shortcut && /*#__PURE__*/_react.default.createElement(_primitives.Box, {
123
130
  as: "span",
124
131
  xcss: shortcutStyles
125
- }, shortcut)), description && /*#__PURE__*/_react.default.createElement(_primitives.Box, {
132
+ }, shortcut)), itemDescription && /*#__PURE__*/_react.default.createElement(_primitives.Box, {
126
133
  xcss: descriptionStyles
127
- }, /*#__PURE__*/_react.default.createElement(_primitives.Text, null, description))));
134
+ }, /*#__PURE__*/_react.default.createElement(_primitives.Text, {
135
+ maxLines: 2
136
+ }, itemDescription))));
128
137
  };
@@ -6,6 +6,7 @@ Object.defineProperty(exports, "__esModule", {
6
6
  });
7
7
  exports.createQuickInsertMatcher = void 0;
8
8
  var _fuse = _interopRequireDefault(require("fuse.js"));
9
+ var _isExperimentEnabled = require("@atlaskit/platform-feature-experiments/is-experiment-enabled");
9
10
  var options = {
10
11
  includeScore: true,
11
12
  keys: [{
@@ -26,14 +27,20 @@ var options = {
26
27
  var normalizeScore = function normalizeScore(score) {
27
28
  return Math.min(1, Math.max(0, score !== null && score !== void 0 ? score : 1));
28
29
  };
30
+ var getDescription = function getDescription(matcher, formatMessage) {
31
+ var _getSearchData, _ref;
32
+ return matcher === null || matcher === void 0 || (_getSearchData = (_ref = matcher).getSearchData) === null || _getSearchData === void 0 ? void 0 : _getSearchData.call(_ref, {
33
+ formatMessage: formatMessage
34
+ }).description;
35
+ };
29
36
 
30
37
  /** Creates a cached matcher using consumer-formatted Quick Insert search data. */
31
- var createQuickInsertMatcher = exports.createQuickInsertMatcher = function createQuickInsertMatcher(getSearchData) {
38
+ var _createQuickInsertMatcher = exports.createQuickInsertMatcher = function createQuickInsertMatcher(getSearchData) {
32
39
  var cachedFormatMessage;
33
40
  var fuse;
34
- return function (_ref) {
35
- var formatMessage = _ref.formatMessage,
36
- query = _ref.query;
41
+ var matcher = function matcher(_ref2) {
42
+ var formatMessage = _ref2.formatMessage,
43
+ query = _ref2.query;
37
44
  var normalizedQuery = query.trim();
38
45
  if (!normalizedQuery) {
39
46
  return {
@@ -51,4 +58,9 @@ var createQuickInsertMatcher = exports.createQuickInsertMatcher = function creat
51
58
  score: normalizeScore(result.score)
52
59
  } : null;
53
60
  };
61
+ if ((0, _isExperimentEnabled.isExperimentEnabled)('platform_editor_slash_command')) {
62
+ matcher.getSearchData = getSearchData;
63
+ _createQuickInsertMatcher.getDescription = getDescription;
64
+ }
65
+ return matcher;
54
66
  };
@@ -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 = "120.11.3";
27
+ var packageVersion = "120.13.0";
28
28
  var halfFocusRing = 1;
29
29
  var dropOffset = '0, 8';
30
30
  var fadeIn = (0, _react2.keyframes)({
@@ -92,10 +92,15 @@ function MentionWithProfileCard(_ref) {
92
92
  }
93
93
  if ((0, _fg.fg)('people-teams_migrate-user-profile-card') || (0, _isExperimentEnabled.isExperimentEnabled)('pt_user_profile_card_migration_exp')) {
94
94
  if (renderUserMentionCard) {
95
+ var prefilledProfileData = (0, _isExperimentEnabled.isExperimentEnabled)('platform_mention_profilecard_accessible_name_exp') ? {
96
+ accountId: id,
97
+ name: text.replace(AT_PREFIX_REGEX, '')
98
+ } : undefined;
95
99
  return /*#__PURE__*/_react.default.createElement(_react.default.Fragment, null, renderUserMentionCard({
96
100
  userId: id,
97
101
  cloudId: cloudId,
98
- children: mention
102
+ children: mention,
103
+ prefilledProfileData: prefilledProfileData
99
104
  }));
100
105
  }
101
106
  var _navigateToTeamsApp = (0, _navigation.navigateToTeamsApp)({
@@ -108,6 +108,7 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
108
108
  * the `onShow` semantics of "@atlaskit/tooltip".
109
109
  */
110
110
  onShow = arguments.length > 6 ? arguments[6] : undefined;
111
+ var placement = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 'top';
111
112
  (0, _classCallCheck2.default)(this, VanillaTooltip);
112
113
  (0, _defineProperty2.default)(this, "listeners", []);
113
114
  (0, _defineProperty2.default)(this, "shouldHidePopover", false);
@@ -115,6 +116,7 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
115
116
  this.trigger = trigger;
116
117
  this.timeout = timeout;
117
118
  this.onShow = onShow;
119
+ this.placement = placement;
118
120
  // Created in the trigger's own document rather than the global one, so nothing depends on
119
121
  // the parent realm when the editor renders inside an iframe. Gated alongside the Escape
120
122
  // listener's window so the whole iframe fix moves as a single unit.
@@ -198,7 +200,7 @@ var VanillaTooltip = exports.VanillaTooltip = /*#__PURE__*/function () {
198
200
  key: "createPopperInstance",
199
201
  value: function createPopperInstance() {
200
202
  this.popperInstance = getCreatePopper()(this.trigger, this.tooltip, {
201
- placement: 'top',
203
+ placement: this.placement,
202
204
  modifiers: [startingOffset]
203
205
  });
204
206
  }
@@ -133,7 +133,7 @@ export const aiSuggestionsMessages = defineMessages({
133
133
  cardRovoTitle: {
134
134
  id: 'fabric.editor.ai.suggestions.card.rovoTitle.non-final',
135
135
  defaultMessage: 'Rovo',
136
- description: 'Title for Rovo branding on the AI suggestions card'
136
+ description: 'Deprecated title for Rovo branding on the AI suggestions card'
137
137
  },
138
138
  cardPrivateLabel: {
139
139
  id: 'fabric.editor.ai.suggestions.card.privateLabel.non-final',
@@ -1,5 +1,6 @@
1
1
  import React from 'react';
2
2
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
3
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
3
4
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
4
5
  import { ACTION } from '../../analytics';
5
6
  import { sendMBEAnalyticsEvent } from './utils';
@@ -25,7 +26,7 @@ export const useMultiBodiedExtensionActions = ({
25
26
  sendMBEAnalyticsEvent(ACTION.CHANGE_ACTIVE, node, eventDispatcher);
26
27
  }
27
28
  const selection = (_options$selection = options === null || options === void 0 ? void 0 : options.selection) !== null && _options$selection !== void 0 ? _options$selection : 'none';
28
- if (selection === 'none') {
29
+ if (selection === 'none' && !isExperimentEnabled('confluence_native_tabs_m15')) {
29
30
  return updateActiveChildResult;
30
31
  }
31
32
  const pos = getPos();
@@ -45,16 +46,22 @@ export const useMultiBodiedExtensionActions = ({
45
46
  desiredPos += (possiblyMbeNode === null || possiblyMbeNode === void 0 ? void 0 : (_possiblyMbeNode$cont4 = possiblyMbeNode.content) === null || _possiblyMbeNode$cont4 === void 0 ? void 0 : (_possiblyMbeNode$cont5 = _possiblyMbeNode$cont4.child(i)) === null || _possiblyMbeNode$cont5 === void 0 ? void 0 : _possiblyMbeNode$cont5.nodeSize) || 0;
46
47
  }
47
48
  const targetFrame = possiblyMbeNode.content.child(index);
48
- if (selection === 'start') {
49
- // +1 moves past the extensionFrame opening token; TextSelection.near() finds
50
- // the nearest valid text cursor position from there.
51
- dispatch(state.tr.setSelection(TextSelection.near(state.doc.resolve(desiredPos + 1))));
52
- } else {
53
- // Place cursor at the end of the target frame's content.
54
- // -1 bias searches backward from the frame's closing token.
49
+ if (selection === 'end') {
55
50
  dispatch(state.tr.setSelection(TextSelection.near(state.doc.resolve(desiredPos + targetFrame.nodeSize), -1)));
51
+ editorView.focus();
52
+ } else {
53
+ // for 'start' and 'none' selection place a
54
+ // collapsed cursor at the start of the target frame so the ProseMirror
55
+ // selection always points into the active tab. This prevents stale
56
+ // selections from persisting across tab switches (which causes paste to
57
+ // land in the wrong tab).
58
+ // 'none' intentionally skips editorView.focus() so DOM focus can
59
+ // remain on the tab button for keyboard navigation.
60
+ dispatch(state.tr.setSelection(TextSelection.near(state.doc.resolve(desiredPos + 1))));
61
+ if (selection === 'start') {
62
+ editorView.focus();
63
+ }
56
64
  }
57
- editorView.focus();
58
65
  }
59
66
  return updateActiveChildResult;
60
67
  },
@@ -20,6 +20,16 @@ export const messages = defineMessages({
20
20
  defaultMessage: 'Insert',
21
21
  description: 'Label on button to insert content at the current cursor position'
22
22
  },
23
+ collapseSection: {
24
+ id: 'editor-common.messages.block-controls.collapseSection',
25
+ defaultMessage: 'Collapse section',
26
+ description: 'Accessible label for the button that collapses a heading section.'
27
+ },
28
+ expandSection: {
29
+ id: 'editor-common.messages.block-controls.expandSection',
30
+ defaultMessage: 'Expand section',
31
+ description: 'Accessible label for the button that expands a heading section.'
32
+ },
23
33
  moveUp: {
24
34
  id: 'fabric.editor.blockControlMoveUp',
25
35
  defaultMessage: 'Move up',
@@ -1,5 +1,4 @@
1
1
  import { Integrations } from '@sentry/browser';
2
- import { fg } from '@atlaskit/platform-feature-flags/fg';
3
2
  import { isFedRamp } from './environment';
4
3
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
5
4
 
@@ -14,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
14
13
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
15
14
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
16
15
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
17
- const packageVersion = "120.11.3";
16
+ const packageVersion = "120.13.0";
18
17
  const sanitiseSentryEvents = (data, _hint) => {
19
18
  // Remove URL as it has UGC
20
19
  // Ignored via go/ees007
@@ -40,7 +39,7 @@ export const logException = async (error, tags) => {
40
39
  const {
41
40
  ExtraErrorData
42
41
  } = await import( /* webpackChunkName: "@atlaskit-internal_editor-sentryintegrations" */'@sentry/integrations');
43
- const breadcrumbsIntegration = fg('platform_editor_sentry_breadcrumbs') ? new Integrations.Breadcrumbs({
42
+ const breadcrumbsIntegration = new Integrations.Breadcrumbs({
44
43
  // only enable breadcrumbs for dom (UI clicks and inputs)
45
44
  // include 'data-test-id', 'data-testid' in the breadcrumbs if they are found
46
45
  dom: {
@@ -51,12 +50,12 @@ export const logException = async (error, tags) => {
51
50
  console: false,
52
51
  history: false,
53
52
  sentry: false
54
- }) : undefined;
53
+ });
55
54
  const sentryOptions = {
56
55
  dsn: isFedRamp() ? undefined : SENTRY_DSN,
57
56
  release: `${packageName}@${packageVersion}`,
58
57
  environment: (_process$env$CLOUD_EN = process.env.CLOUD_ENV) !== null && _process$env$CLOUD_EN !== void 0 ? _process$env$CLOUD_EN : 'unknown',
59
- beforeBreadcrumb: fg('platform_editor_sentry_breadcrumbs') ? normaliseSentryBreadcrumbs : undefined,
58
+ beforeBreadcrumb: normaliseSentryBreadcrumbs,
60
59
  ignoreErrors: [
61
60
  // Network issues
62
61
  NETWORK_ERROR_REGEX, NETWORK_FAILURE_REGEX, 'TypeError: Failed to fetch',
@@ -68,7 +67,7 @@ export const logException = async (error, tags) => {
68
67
  // https://docs.sentry.io/platforms/javascript/configuration/integrations/default/
69
68
  ...defaultIntegrations.filter(({
70
69
  name
71
- }) => name !== 'Breadcrumbs'), ...(breadcrumbsIntegration ? [breadcrumbsIntegration] : []),
70
+ }) => name !== 'Breadcrumbs'), breadcrumbsIntegration,
72
71
  // Extracts all non-native attributes from the error object and attaches them to the event as the extra data
73
72
  // https://docs.sentry.io/platforms/javascript/configuration/integrations/plugin/?original_referrer=https%3A%2F%2Fduckduckgo.com%2F#extraerrordata
74
73
  new ExtraErrorData()],
@@ -4,47 +4,52 @@ import React from 'react';
4
4
  import { Box, Inline, Pressable, Stack, Text, xcss } from '@atlaskit/primitives';
5
5
  import { useQuickInsertMenuItemSelection } from './quickInsertMenuItemUtils';
6
6
  import { useQuickInsertContext } from './useQuickInsertContext';
7
- const itemStyles = xcss({
7
+ const borderlessItemStyles = xcss({
8
8
  alignItems: 'start',
9
9
  backgroundColor: 'color.background.neutral.subtle',
10
- borderColor: 'color.border',
11
10
  borderRadius: 'radius.medium',
12
- borderStyle: 'solid',
13
- borderWidth: 'border.width',
14
11
  color: 'color.text',
15
12
  cursor: 'pointer',
16
13
  display: 'flex',
17
14
  gap: 'space.150',
15
+ height: '88px',
18
16
  padding: 'space.150',
19
17
  textAlign: 'start',
20
18
  width: '100%'
21
19
  });
22
- const selectedItemStyles = xcss({
20
+ const borderlessSelectedItemStyles = xcss({
23
21
  alignItems: 'start',
24
22
  backgroundColor: 'color.background.selected',
25
- borderColor: 'color.border.selected',
26
- borderRadius: 'radius.medium',
27
- borderStyle: 'solid',
28
- borderWidth: 'border.width',
23
+ borderRadius: 0,
29
24
  color: 'color.text',
30
25
  cursor: 'pointer',
31
26
  display: 'flex',
32
27
  gap: 'space.150',
28
+ height: '88px',
33
29
  padding: 'space.150',
30
+ position: 'relative',
34
31
  textAlign: 'start',
35
- width: '100%'
32
+ width: '100%',
33
+ '::before': {
34
+ borderInlineStartColor: 'color.border.selected',
35
+ borderInlineStartStyle: 'solid',
36
+ borderInlineStartWidth: 'border.width.selected',
37
+ content: "''",
38
+ insetBlock: 'space.0',
39
+ insetInlineStart: 'space.0',
40
+ pointerEvents: 'none',
41
+ position: 'absolute'
42
+ }
36
43
  });
37
- const disabledItemStyles = xcss({
44
+ const borderlessDisabledItemStyles = xcss({
38
45
  alignItems: 'start',
39
46
  backgroundColor: 'color.background.neutral.subtle',
40
- borderColor: 'color.border',
41
47
  borderRadius: 'radius.medium',
42
- borderStyle: 'solid',
43
- borderWidth: 'border.width',
44
48
  color: 'color.text.disabled',
45
49
  cursor: 'not-allowed',
46
50
  display: 'flex',
47
51
  gap: 'space.150',
52
+ height: '88px',
48
53
  padding: 'space.150',
49
54
  textAlign: 'start',
50
55
  width: '100%'
@@ -94,6 +99,7 @@ export const ElementBrowserQuickInsertMenuItem = ({
94
99
  id: undefined,
95
100
  isSelected: false
96
101
  };
102
+ const itemDescription = description !== null && description !== void 0 ? description : item === null || item === void 0 ? void 0 : item.description;
97
103
  const handleClick = useQuickInsertMenuItemSelection(onSelect);
98
104
  return /*#__PURE__*/React.createElement(Pressable, {
99
105
  "aria-label": ariaLabel,
@@ -102,7 +108,7 @@ export const ElementBrowserQuickInsertMenuItem = ({
102
108
  isDisabled: isDisabled,
103
109
  onClick: handleClick,
104
110
  role: "option",
105
- xcss: isDisabled ? disabledItemStyles : isSelected ? selectedItemStyles : itemStyles
111
+ xcss: isDisabled ? borderlessDisabledItemStyles : isSelected ? borderlessSelectedItemStyles : borderlessItemStyles
106
112
  }, iconBefore && shouldWrapIcon ? /*#__PURE__*/React.createElement(Box, {
107
113
  xcss: iconStyles
108
114
  }, iconBefore) : iconBefore, /*#__PURE__*/React.createElement(Stack, {
@@ -113,11 +119,14 @@ export const ElementBrowserQuickInsertMenuItem = ({
113
119
  spread: "space-between",
114
120
  space: "space.100"
115
121
  }, /*#__PURE__*/React.createElement(Text, {
122
+ maxLines: 1,
116
123
  weight: "medium"
117
124
  }, title), shortcut && /*#__PURE__*/React.createElement(Box, {
118
125
  as: "span",
119
126
  xcss: shortcutStyles
120
- }, shortcut)), description && /*#__PURE__*/React.createElement(Box, {
127
+ }, shortcut)), itemDescription && /*#__PURE__*/React.createElement(Box, {
121
128
  xcss: descriptionStyles
122
- }, /*#__PURE__*/React.createElement(Text, null, description))));
129
+ }, /*#__PURE__*/React.createElement(Text, {
130
+ maxLines: 2
131
+ }, itemDescription))));
123
132
  };
@@ -1,4 +1,5 @@
1
1
  import Fuse from 'fuse.js';
2
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
2
3
  const options = {
3
4
  includeScore: true,
4
5
  keys: [{
@@ -17,12 +18,18 @@ const options = {
17
18
  threshold: 0.3
18
19
  };
19
20
  const normalizeScore = score => Math.min(1, Math.max(0, score !== null && score !== void 0 ? score : 1));
21
+ const getDescription = (matcher, formatMessage) => {
22
+ var _getSearchData, _ref;
23
+ return matcher === null || matcher === void 0 ? void 0 : (_getSearchData = (_ref = matcher).getSearchData) === null || _getSearchData === void 0 ? void 0 : _getSearchData.call(_ref, {
24
+ formatMessage
25
+ }).description;
26
+ };
20
27
 
21
28
  /** Creates a cached matcher using consumer-formatted Quick Insert search data. */
22
29
  export const createQuickInsertMatcher = getSearchData => {
23
30
  let cachedFormatMessage;
24
31
  let fuse;
25
- return ({
32
+ const matcher = ({
26
33
  formatMessage,
27
34
  query
28
35
  }) => {
@@ -43,4 +50,9 @@ export const createQuickInsertMatcher = getSearchData => {
43
50
  score: normalizeScore(result.score)
44
51
  } : null;
45
52
  };
53
+ if (isExperimentEnabled('platform_editor_slash_command')) {
54
+ matcher.getSearchData = getSearchData;
55
+ createQuickInsertMatcher.getDescription = getDescription;
56
+ }
57
+ return matcher;
46
58
  };