@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
@@ -14,7 +14,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
14
14
  import { fg } from '@atlaskit/platform-feature-flags/fg';
15
15
  import Layer from '../Layer';
16
16
  const packageName = "@atlaskit/editor-common";
17
- const packageVersion = "120.11.3";
17
+ const packageVersion = "120.13.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -77,10 +77,15 @@ export default function MentionWithProfileCard({
77
77
  }
78
78
  if (fg('people-teams_migrate-user-profile-card') || isExperimentEnabled('pt_user_profile_card_migration_exp')) {
79
79
  if (renderUserMentionCard) {
80
+ const prefilledProfileData = isExperimentEnabled('platform_mention_profilecard_accessible_name_exp') ? {
81
+ accountId: id,
82
+ name: text.replace(AT_PREFIX_REGEX, '')
83
+ } : undefined;
80
84
  return /*#__PURE__*/React.createElement(React.Fragment, null, renderUserMentionCard({
81
85
  userId: id,
82
86
  cloudId,
83
- children: mention
87
+ children: mention,
88
+ prefilledProfileData
84
89
  }));
85
90
  }
86
91
  const {
@@ -90,13 +90,21 @@ export class VanillaTooltip {
90
90
  * Not called when the pointer leaves before the tooltip is shown, matching
91
91
  * the `onShow` semantics of "@atlaskit/tooltip".
92
92
  */
93
- onShow) {
93
+ onShow,
94
+ /**
95
+ * Where the tooltip sits relative to the trigger.
96
+ *
97
+ * Defaults to `'top'`, matching the default `position` of "@atlaskit/tooltip". Use
98
+ * `'bottom'` to match its `position="mouse"`, which places the tooltip below the cursor.
99
+ */
100
+ placement = 'top') {
94
101
  _defineProperty(this, "listeners", []);
95
102
  _defineProperty(this, "shouldHidePopover", false);
96
103
  _defineProperty(this, "isDisplayed", false);
97
104
  this.trigger = trigger;
98
105
  this.timeout = timeout;
99
106
  this.onShow = onShow;
107
+ this.placement = placement;
100
108
  // Created in the trigger's own document rather than the global one, so nothing depends on
101
109
  // the parent realm when the editor renders inside an iframe. Gated alongside the Escape
102
110
  // listener's window so the whole iframe fix moves as a single unit.
@@ -172,7 +180,7 @@ export class VanillaTooltip {
172
180
  }
173
181
  createPopperInstance() {
174
182
  this.popperInstance = getCreatePopper()(this.trigger, this.tooltip, {
175
- placement: 'top',
183
+ placement: this.placement,
176
184
  modifiers: [startingOffset]
177
185
  });
178
186
  }
@@ -133,7 +133,7 @@ export var 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',
@@ -4,6 +4,7 @@ function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbol
4
4
  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; }
5
5
  import React from 'react';
6
6
  import { TextSelection } from '@atlaskit/editor-prosemirror/state';
7
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
7
8
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
9
  import { ACTION } from '../../analytics';
9
10
  import { sendMBEAnalyticsEvent } from './utils';
@@ -26,7 +27,7 @@ export var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActi
26
27
  sendMBEAnalyticsEvent(ACTION.CHANGE_ACTIVE, node, eventDispatcher);
27
28
  }
28
29
  var selection = (_options$selection = options === null || options === void 0 ? void 0 : options.selection) !== null && _options$selection !== void 0 ? _options$selection : 'none';
29
- if (selection === 'none') {
30
+ if (selection === 'none' && !isExperimentEnabled('confluence_native_tabs_m15')) {
30
31
  return updateActiveChildResult;
31
32
  }
32
33
  var pos = getPos();
@@ -46,16 +47,22 @@ export var useMultiBodiedExtensionActions = function useMultiBodiedExtensionActi
46
47
  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;
47
48
  }
48
49
  var targetFrame = possiblyMbeNode.content.child(index);
49
- if (selection === 'start') {
50
- // +1 moves past the extensionFrame opening token; TextSelection.near() finds
51
- // the nearest valid text cursor position from there.
52
- dispatch(state.tr.setSelection(TextSelection.near(state.doc.resolve(desiredPos + 1))));
53
- } else {
54
- // Place cursor at the end of the target frame's content.
55
- // -1 bias searches backward from the frame's closing token.
50
+ if (selection === 'end') {
56
51
  dispatch(state.tr.setSelection(TextSelection.near(state.doc.resolve(desiredPos + targetFrame.nodeSize), -1)));
52
+ editorView.focus();
53
+ } else {
54
+ // for 'start' and 'none' selection place a
55
+ // collapsed cursor at the start of the target frame so the ProseMirror
56
+ // selection always points into the active tab. This prevents stale
57
+ // selections from persisting across tab switches (which causes paste to
58
+ // land in the wrong tab).
59
+ // 'none' intentionally skips editorView.focus() so DOM focus can
60
+ // remain on the tab button for keyboard navigation.
61
+ dispatch(state.tr.setSelection(TextSelection.near(state.doc.resolve(desiredPos + 1))));
62
+ if (selection === 'start') {
63
+ editorView.focus();
64
+ }
57
65
  }
58
- editorView.focus();
59
66
  }
60
67
  return updateActiveChildResult;
61
68
  },
@@ -20,6 +20,16 @@ export var 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',
@@ -5,7 +5,6 @@ import _regeneratorRuntime from "@babel/runtime/regenerator";
5
5
  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; }
6
6
  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; }
7
7
  import { Integrations } from '@sentry/browser';
8
- import { fg } from '@atlaskit/platform-feature-flags/fg';
9
8
  import { isFedRamp } from './environment';
10
9
  import { normaliseSentryBreadcrumbs, SERIALIZABLE_ATTRIBUTES } from './normalise-sentry-breadcrumbs';
11
10
 
@@ -20,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
20
19
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
21
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
22
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
23
- var packageVersion = "120.11.3";
22
+ var packageVersion = "120.13.0";
24
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
25
24
  // Remove URL as it has UGC
26
25
  // Ignored via go/ees007
@@ -56,7 +55,7 @@ export var logException = /*#__PURE__*/function () {
56
55
  case 3:
57
56
  _yield$import2 = _context.sent;
58
57
  ExtraErrorData = _yield$import2.ExtraErrorData;
59
- breadcrumbsIntegration = fg('platform_editor_sentry_breadcrumbs') ? new Integrations.Breadcrumbs({
58
+ breadcrumbsIntegration = new Integrations.Breadcrumbs({
60
59
  // only enable breadcrumbs for dom (UI clicks and inputs)
61
60
  // include 'data-test-id', 'data-testid' in the breadcrumbs if they are found
62
61
  dom: {
@@ -67,12 +66,12 @@ export var logException = /*#__PURE__*/function () {
67
66
  console: false,
68
67
  history: false,
69
68
  sentry: false
70
- }) : undefined;
69
+ });
71
70
  sentryOptions = {
72
71
  dsn: isFedRamp() ? undefined : SENTRY_DSN,
73
72
  release: "".concat(packageName, "@").concat(packageVersion),
74
73
  environment: (_process$env$CLOUD_EN = process.env.CLOUD_ENV) !== null && _process$env$CLOUD_EN !== void 0 ? _process$env$CLOUD_EN : 'unknown',
75
- beforeBreadcrumb: fg('platform_editor_sentry_breadcrumbs') ? normaliseSentryBreadcrumbs : undefined,
74
+ beforeBreadcrumb: normaliseSentryBreadcrumbs,
76
75
  ignoreErrors: [
77
76
  // Network issues
78
77
  NETWORK_ERROR_REGEX, NETWORK_FAILURE_REGEX, 'TypeError: Failed to fetch',
@@ -83,7 +82,7 @@ export var logException = /*#__PURE__*/function () {
83
82
  return [].concat(_toConsumableArray(defaultIntegrations.filter(function (_ref2) {
84
83
  var name = _ref2.name;
85
84
  return name !== 'Breadcrumbs';
86
- })), _toConsumableArray(breadcrumbsIntegration ? [breadcrumbsIntegration] : []), [
85
+ })), [breadcrumbsIntegration,
87
86
  // Extracts all non-native attributes from the error object and attaches them to the event as the extra data
88
87
  // https://docs.sentry.io/platforms/javascript/configuration/integrations/plugin/?original_referrer=https%3A%2F%2Fduckduckgo.com%2F#extraerrordata
89
88
  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
- var itemStyles = xcss({
7
+ var 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
- var selectedItemStyles = xcss({
20
+ var 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
- var disabledItemStyles = xcss({
44
+ var 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%'
@@ -92,6 +97,7 @@ export var ElementBrowserQuickInsertMenuItem = function ElementBrowserQuickInser
92
97
  },
93
98
  id = _ref2.id,
94
99
  isSelected = _ref2.isSelected;
100
+ var itemDescription = description !== null && description !== void 0 ? description : item === null || item === void 0 ? void 0 : item.description;
95
101
  var handleClick = useQuickInsertMenuItemSelection(onSelect);
96
102
  return /*#__PURE__*/React.createElement(Pressable, {
97
103
  "aria-label": ariaLabel,
@@ -100,7 +106,7 @@ export var ElementBrowserQuickInsertMenuItem = function ElementBrowserQuickInser
100
106
  isDisabled: isDisabled,
101
107
  onClick: handleClick,
102
108
  role: "option",
103
- xcss: isDisabled ? disabledItemStyles : isSelected ? selectedItemStyles : itemStyles
109
+ xcss: isDisabled ? borderlessDisabledItemStyles : isSelected ? borderlessSelectedItemStyles : borderlessItemStyles
104
110
  }, iconBefore && shouldWrapIcon ? /*#__PURE__*/React.createElement(Box, {
105
111
  xcss: iconStyles
106
112
  }, iconBefore) : iconBefore, /*#__PURE__*/React.createElement(Stack, {
@@ -111,11 +117,14 @@ export var ElementBrowserQuickInsertMenuItem = function ElementBrowserQuickInser
111
117
  spread: "space-between",
112
118
  space: "space.100"
113
119
  }, /*#__PURE__*/React.createElement(Text, {
120
+ maxLines: 1,
114
121
  weight: "medium"
115
122
  }, title), shortcut && /*#__PURE__*/React.createElement(Box, {
116
123
  as: "span",
117
124
  xcss: shortcutStyles
118
- }, shortcut)), description && /*#__PURE__*/React.createElement(Box, {
125
+ }, shortcut)), itemDescription && /*#__PURE__*/React.createElement(Box, {
119
126
  xcss: descriptionStyles
120
- }, /*#__PURE__*/React.createElement(Text, null, description))));
127
+ }, /*#__PURE__*/React.createElement(Text, {
128
+ maxLines: 2
129
+ }, itemDescription))));
121
130
  };
@@ -1,4 +1,5 @@
1
1
  import Fuse from 'fuse.js';
2
+ import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
2
3
  var options = {
3
4
  includeScore: true,
4
5
  keys: [{
@@ -19,14 +20,20 @@ var options = {
19
20
  var normalizeScore = function normalizeScore(score) {
20
21
  return Math.min(1, Math.max(0, score !== null && score !== void 0 ? score : 1));
21
22
  };
23
+ var getDescription = function getDescription(matcher, formatMessage) {
24
+ var _getSearchData, _ref;
25
+ return matcher === null || matcher === void 0 || (_getSearchData = (_ref = matcher).getSearchData) === null || _getSearchData === void 0 ? void 0 : _getSearchData.call(_ref, {
26
+ formatMessage: formatMessage
27
+ }).description;
28
+ };
22
29
 
23
30
  /** Creates a cached matcher using consumer-formatted Quick Insert search data. */
24
- export var createQuickInsertMatcher = function createQuickInsertMatcher(getSearchData) {
31
+ var _createQuickInsertMatcher = function createQuickInsertMatcher(getSearchData) {
25
32
  var cachedFormatMessage;
26
33
  var fuse;
27
- return function (_ref) {
28
- var formatMessage = _ref.formatMessage,
29
- query = _ref.query;
34
+ var matcher = function matcher(_ref2) {
35
+ var formatMessage = _ref2.formatMessage,
36
+ query = _ref2.query;
30
37
  var normalizedQuery = query.trim();
31
38
  if (!normalizedQuery) {
32
39
  return {
@@ -44,4 +51,10 @@ export var createQuickInsertMatcher = function createQuickInsertMatcher(getSearc
44
51
  score: normalizeScore(result.score)
45
52
  } : null;
46
53
  };
47
- };
54
+ if (isExperimentEnabled('platform_editor_slash_command')) {
55
+ matcher.getSearchData = getSearchData;
56
+ _createQuickInsertMatcher.getDescription = getDescription;
57
+ }
58
+ return matcher;
59
+ };
60
+ export { _createQuickInsertMatcher as createQuickInsertMatcher };
@@ -21,7 +21,7 @@ import withAnalyticsEvents from '@atlaskit/analytics-next/withAnalyticsEvents';
21
21
  import { fg } from '@atlaskit/platform-feature-flags/fg';
22
22
  import Layer from '../Layer';
23
23
  var packageName = "@atlaskit/editor-common";
24
- var packageVersion = "120.11.3";
24
+ var packageVersion = "120.13.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -82,10 +82,15 @@ export default function MentionWithProfileCard(_ref) {
82
82
  }
83
83
  if (fg('people-teams_migrate-user-profile-card') || isExperimentEnabled('pt_user_profile_card_migration_exp')) {
84
84
  if (renderUserMentionCard) {
85
+ var prefilledProfileData = isExperimentEnabled('platform_mention_profilecard_accessible_name_exp') ? {
86
+ accountId: id,
87
+ name: text.replace(AT_PREFIX_REGEX, '')
88
+ } : undefined;
85
89
  return /*#__PURE__*/React.createElement(React.Fragment, null, renderUserMentionCard({
86
90
  userId: id,
87
91
  cloudId: cloudId,
88
- children: mention
92
+ children: mention,
93
+ prefilledProfileData: prefilledProfileData
89
94
  }));
90
95
  }
91
96
  var _navigateToTeamsApp = navigateToTeamsApp({
@@ -101,6 +101,7 @@ export var VanillaTooltip = /*#__PURE__*/function () {
101
101
  * the `onShow` semantics of "@atlaskit/tooltip".
102
102
  */
103
103
  onShow = arguments.length > 6 ? arguments[6] : undefined;
104
+ var placement = arguments.length > 7 && arguments[7] !== undefined ? arguments[7] : 'top';
104
105
  _classCallCheck(this, VanillaTooltip);
105
106
  _defineProperty(this, "listeners", []);
106
107
  _defineProperty(this, "shouldHidePopover", false);
@@ -108,6 +109,7 @@ export var VanillaTooltip = /*#__PURE__*/function () {
108
109
  this.trigger = trigger;
109
110
  this.timeout = timeout;
110
111
  this.onShow = onShow;
112
+ this.placement = placement;
111
113
  // Created in the trigger's own document rather than the global one, so nothing depends on
112
114
  // the parent realm when the editor renders inside an iframe. Gated alongside the Escape
113
115
  // listener's window so the whole iframe fix moves as a single unit.
@@ -191,7 +193,7 @@ export var VanillaTooltip = /*#__PURE__*/function () {
191
193
  key: "createPopperInstance",
192
194
  value: function createPopperInstance() {
193
195
  this.popperInstance = getCreatePopper()(this.trigger, this.tooltip, {
194
- placement: 'top',
196
+ placement: this.placement,
195
197
  modifiers: [startingOffset]
196
198
  });
197
199
  }
@@ -84,6 +84,10 @@ export declare const aiSuggestionsMessages: {
84
84
  description: string;
85
85
  id: string;
86
86
  };
87
+ /**
88
+ * @private
89
+ * @deprecated The suggestion card no longer displays a Rovo text label.
90
+ */
87
91
  cardRovoTitle: {
88
92
  defaultMessage: string;
89
93
  description: string;
@@ -1,57 +1,67 @@
1
1
  export declare const messages: {
2
- dragToMove: {
2
+ collapseSection: {
3
+ defaultMessage: string;
4
+ description: string;
3
5
  id: string;
6
+ };
7
+ delete: {
4
8
  defaultMessage: string;
5
9
  description: string;
10
+ id: string;
6
11
  };
7
- dragToMoveClickToOpen: {
12
+ dragToMove: {
13
+ defaultMessage: string;
14
+ description: string;
8
15
  id: string;
16
+ };
17
+ dragToMoveClickToOpen: {
9
18
  defaultMessage: string;
10
19
  description: string;
20
+ id: string;
11
21
  };
12
22
  dragToRearrange: {
23
+ defaultMessage: string;
24
+ description: string;
13
25
  id: string;
26
+ };
27
+ expandSection: {
14
28
  defaultMessage: string;
15
29
  description: string;
30
+ id: string;
16
31
  };
17
32
  insert: {
18
- id: string;
19
33
  defaultMessage: string;
20
34
  description: string;
21
- };
22
- moveUp: {
23
35
  id: string;
36
+ };
37
+ movedDown: {
24
38
  defaultMessage: string;
25
39
  description: string;
40
+ id: string;
26
41
  };
27
42
  moveDown: {
28
- id: string;
29
43
  defaultMessage: string;
30
44
  description: string;
45
+ id: string;
31
46
  };
32
47
  movedup: {
33
- id: string;
34
48
  defaultMessage: string;
35
49
  description: string;
36
- };
37
- movedDown: {
38
50
  id: string;
39
- defaultMessage: string;
40
- description: string;
41
51
  };
42
52
  moveLeft: {
43
- id: string;
44
53
  defaultMessage: string;
45
54
  description: string;
55
+ id: string;
46
56
  };
47
57
  moveRight: {
48
- id: string;
49
58
  defaultMessage: string;
50
59
  description: string;
51
- };
52
- delete: {
53
60
  id: string;
61
+ };
62
+ moveUp: {
54
63
  defaultMessage: string;
55
64
  description: string;
65
+ id: string;
56
66
  };
57
67
  };
@@ -16,6 +16,11 @@ import type ProfileClient from '@atlaskit/profilecard/profile-card-client';
16
16
  export type RenderUserMentionCard = (props: {
17
17
  children: ReactNode;
18
18
  cloudId: string;
19
+ /** Known identity to prefill the card with, giving its trigger a concrete accessible name. */
20
+ prefilledProfileData?: {
21
+ accountId: string;
22
+ name: string;
23
+ };
19
24
  referenceElement?: HTMLElement;
20
25
  userId: string;
21
26
  }) => ReactNode;
@@ -12,6 +12,7 @@ export type QuickInsertContextValue = {
12
12
  editorView: EditorView;
13
13
  isOffline: boolean;
14
14
  item?: {
15
+ description?: string;
15
16
  id: string;
16
17
  isSelected: boolean;
17
18
  };
@@ -6,8 +6,17 @@ type QuickInsertSearchData = {
6
6
  title: string;
7
7
  };
8
8
  type FormatMessage = Parameters<RegisterMenuItemMatch>[0]['formatMessage'];
9
+ type QuickInsertMatcher = RegisterMenuItemMatch & {
10
+ getSearchData?: (context: {
11
+ formatMessage: FormatMessage;
12
+ }) => QuickInsertSearchData;
13
+ };
14
+ type QuickInsertMatcherFactory = {
15
+ (getSearchData: (context: {
16
+ formatMessage: FormatMessage;
17
+ }) => QuickInsertSearchData): QuickInsertMatcher;
18
+ getDescription?: (matcher: RegisterMenuItemMatch | undefined, formatMessage: FormatMessage) => string | undefined;
19
+ };
9
20
  /** Creates a cached matcher using consumer-formatted Quick Insert search data. */
10
- export declare const createQuickInsertMatcher: (getSearchData: (context: {
11
- formatMessage: FormatMessage;
12
- }) => QuickInsertSearchData) => RegisterMenuItemMatch;
21
+ export declare const createQuickInsertMatcher: QuickInsertMatcherFactory;
13
22
  export {};
@@ -1,3 +1,4 @@
1
+ import { type Placement } from '@popperjs/core';
1
2
  /**
2
3
  * A tooltip component similar to "@atlaskit/tooltip" but built for vanilla scenarios
3
4
  *
@@ -27,6 +28,13 @@ export declare class VanillaTooltip {
27
28
  * the `onShow` semantics of "@atlaskit/tooltip".
28
29
  */
29
30
  private onShow?;
31
+ /**
32
+ * Where the tooltip sits relative to the trigger.
33
+ *
34
+ * Defaults to `'top'`, matching the default `position` of "@atlaskit/tooltip". Use
35
+ * `'bottom'` to match its `position="mouse"`, which places the tooltip below the cursor.
36
+ */
37
+ private placement;
30
38
  private popperInstance;
31
39
  private listeners;
32
40
  private currentTimeoutId;
@@ -75,7 +83,14 @@ export declare class VanillaTooltip {
75
83
  * Not called when the pointer leaves before the tooltip is shown, matching
76
84
  * the `onShow` semantics of "@atlaskit/tooltip".
77
85
  */
78
- onShow?: (() => void) | undefined);
86
+ onShow?: (() => void) | undefined,
87
+ /**
88
+ * Where the tooltip sits relative to the trigger.
89
+ *
90
+ * Defaults to `'top'`, matching the default `position` of "@atlaskit/tooltip". Use
91
+ * `'bottom'` to match its `position="mouse"`, which places the tooltip below the cursor.
92
+ */
93
+ placement?: Placement);
79
94
  /**
80
95
  * Closes the popover, tolerating it already being closed.
81
96
  *
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "120.12.0",
3
+ "version": "120.13.1",
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/"
@@ -29,8 +29,8 @@
29
29
  },
30
30
  "dependencies": {
31
31
  "@atlaskit/activity-provider": "^3.1.0",
32
- "@atlaskit/adf-schema": "^57.2.0",
33
- "@atlaskit/adf-utils": "^20.8.0",
32
+ "@atlaskit/adf-schema": "^57.3.0",
33
+ "@atlaskit/adf-utils": "^20.9.0",
34
34
  "@atlaskit/afm-i18n-platform-editor-editor-common": "2.200.0",
35
35
  "@atlaskit/analytics-listeners": "^11.3.0",
36
36
  "@atlaskit/analytics-namespaced-context": "^8.2.0",
@@ -54,10 +54,10 @@
54
54
  "@atlaskit/feature-gate-js-client": "^6.0.0",
55
55
  "@atlaskit/icon": "^37.6.0",
56
56
  "@atlaskit/link": "^5.1.0",
57
- "@atlaskit/link-datasource": "^6.10.0",
58
- "@atlaskit/link-picker": "^6.6.0",
59
- "@atlaskit/media-card": "^81.9.0",
60
- "@atlaskit/media-client": "^37.6.0",
57
+ "@atlaskit/link-datasource": "^6.11.0",
58
+ "@atlaskit/link-picker": "^6.7.0",
59
+ "@atlaskit/media-card": "^81.10.0",
60
+ "@atlaskit/media-client": "^37.7.0",
61
61
  "@atlaskit/media-client-react": "^6.4.0",
62
62
  "@atlaskit/media-common": "^14.6.0",
63
63
  "@atlaskit/media-file-preview": "^1.3.0",
@@ -78,8 +78,8 @@
78
78
  "@atlaskit/react-compiler-gating": "^0.2.0",
79
79
  "@atlaskit/react-ufo": "^7.8.0",
80
80
  "@atlaskit/section-message": "^10.2.0",
81
- "@atlaskit/smart-card": "^45.19.0",
82
- "@atlaskit/smart-user-picker": "^11.6.0",
81
+ "@atlaskit/smart-card": "^45.20.0",
82
+ "@atlaskit/smart-user-picker": "^11.7.0",
83
83
  "@atlaskit/spinner": "^20.4.0",
84
84
  "@atlaskit/task-decision": "^21.9.0",
85
85
  "@atlaskit/teams-app-config": "^3.1.0",
@@ -220,9 +220,6 @@
220
220
  "platform_editor_fix_mixed_types_column_sort": {
221
221
  "type": "boolean"
222
222
  },
223
- "platform_editor_sentry_breadcrumbs": {
224
- "type": "boolean"
225
- },
226
223
  "platform_fix_macro_renders_in_layouts": {
227
224
  "type": "boolean"
228
225
  },
@@ -268,6 +265,10 @@
268
265
  "platform_editor_mention_node_avatar": {
269
266
  "param": "isEnabled",
270
267
  "defaultValue": false
268
+ },
269
+ "platform_mention_profilecard_accessible_name_exp": {
270
+ "param": "isEnabled",
271
+ "defaultValue": false
271
272
  }
272
273
  }
273
274
  }