@atlaskit/editor-common 130.2.1 → 130.3.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 (58) hide show
  1. package/CHANGELOG.md +23 -0
  2. package/codemods/69.0.0-update-validator-imports.ts +1 -1
  3. package/codemods/migrates/entry-points.ts +1 -1
  4. package/dist/cjs/element-browser/components/ElementList/EmptyState.js +10 -4
  5. package/dist/cjs/element-browser/components/ViewMore.js +2 -2
  6. package/dist/cjs/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +2 -2
  7. package/dist/cjs/extensibility/extensionNodeView.js +2 -1
  8. package/dist/cjs/icons/shared/DynamicStrokeIconDecoration.js +6 -3
  9. package/dist/cjs/media-single/CommentBadgeNext.js +7 -4
  10. package/dist/cjs/media-single/ExternalImageBadge.js +1 -8
  11. package/dist/cjs/monitoring/error.js +1 -1
  12. package/dist/cjs/quick-insert/CompactQuickInsertMenuItem.js +15 -11
  13. package/dist/cjs/quick-insert/ElementBrowserQuickInsertMenuItem.js +21 -16
  14. package/dist/cjs/resizer/ResizerBreakoutModeLabel.js +11 -5
  15. package/dist/cjs/styles/shared/emoji.js +5 -5
  16. package/dist/cjs/ui/Caption/index.js +8 -4
  17. package/dist/cjs/ui/DropList/index.js +1 -1
  18. package/dist/cjs/ui/Emoji/index.js +3 -2
  19. package/dist/cjs/ui/Mention/index.js +4 -1
  20. package/dist/cjs/ui/Mention/mention-with-providers.js +2 -1
  21. package/dist/es2019/element-browser/components/ElementList/EmptyState.js +5 -1
  22. package/dist/es2019/element-browser/components/ViewMore.js +1 -1
  23. package/dist/es2019/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  24. package/dist/es2019/extensibility/extensionNodeView.js +2 -1
  25. package/dist/es2019/icons/shared/DynamicStrokeIconDecoration.js +3 -1
  26. package/dist/es2019/media-single/CommentBadgeNext.js +3 -1
  27. package/dist/es2019/media-single/ExternalImageBadge.js +1 -6
  28. package/dist/es2019/monitoring/error.js +1 -1
  29. package/dist/es2019/quick-insert/CompactQuickInsertMenuItem.js +6 -2
  30. package/dist/es2019/quick-insert/ElementBrowserQuickInsertMenuItem.js +7 -2
  31. package/dist/es2019/resizer/ResizerBreakoutModeLabel.js +5 -1
  32. package/dist/es2019/styles/shared/emoji.js +1 -1
  33. package/dist/es2019/ui/Caption/index.js +5 -1
  34. package/dist/es2019/ui/DropList/index.js +1 -1
  35. package/dist/es2019/ui/Emoji/index.js +1 -1
  36. package/dist/es2019/ui/Mention/index.js +2 -1
  37. package/dist/es2019/ui/Mention/mention-with-providers.js +2 -1
  38. package/dist/esm/element-browser/components/ElementList/EmptyState.js +5 -1
  39. package/dist/esm/element-browser/components/ViewMore.js +1 -1
  40. package/dist/esm/extensibility/Extension/Lozenge/ExtensionFloatingLabel.js +1 -1
  41. package/dist/esm/extensibility/extensionNodeView.js +2 -1
  42. package/dist/esm/icons/shared/DynamicStrokeIconDecoration.js +3 -1
  43. package/dist/esm/media-single/CommentBadgeNext.js +3 -1
  44. package/dist/esm/media-single/ExternalImageBadge.js +1 -8
  45. package/dist/esm/monitoring/error.js +1 -1
  46. package/dist/esm/quick-insert/CompactQuickInsertMenuItem.js +6 -2
  47. package/dist/esm/quick-insert/ElementBrowserQuickInsertMenuItem.js +7 -2
  48. package/dist/esm/resizer/ResizerBreakoutModeLabel.js +5 -1
  49. package/dist/esm/styles/shared/emoji.js +1 -1
  50. package/dist/esm/ui/Caption/index.js +5 -1
  51. package/dist/esm/ui/DropList/index.js +1 -1
  52. package/dist/esm/ui/Emoji/index.js +1 -1
  53. package/dist/esm/ui/Mention/index.js +4 -1
  54. package/dist/esm/ui/Mention/mention-with-providers.js +2 -1
  55. package/dist/types/ui/Emoji/index.d.ts +2 -2
  56. package/dist/types/ui/Mention/index.d.ts +2 -3
  57. package/dist/types/ui/Mention/mention-with-providers.d.ts +2 -3
  58. package/package.json +7 -3
@@ -9,7 +9,11 @@ import { css, jsx } from '@emotion/react';
9
9
  import { FormattedMessage } from 'react-intl';
10
10
  import LinkButton from '@atlaskit/button/link';
11
11
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
12
- import { Box, Text, xcss } from '@atlaskit/primitives';
12
+ import { Box } from '@atlaskit/primitives/box';
13
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
14
+ import { Text } from '@atlaskit/primitives/text';
15
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
16
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
13
17
  import NotFoundIllustration from './NotFoundIllustration';
14
18
  export default function EmptyState({
15
19
  onExternalLinkClick,
@@ -7,7 +7,7 @@ import { useIntl } from 'react-intl';
7
7
  import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
8
8
  import ButtonItem from '@atlaskit/menu/button-item';
9
9
  import Section from '@atlaskit/menu/section';
10
- import { Text } from '@atlaskit/primitives/compiled';
10
+ import { Text } from '@atlaskit/primitives/compiled/text';
11
11
  import { toolbarInsertBlockMessages } from '../../messages/insert-block';
12
12
  const styles = {
13
13
  iconContainer: "_1e0c1txw _4cvr1h6o _1bah1h6o _1bsbzwfg _4t3i1tcg _2hwx1b66",
@@ -3,7 +3,7 @@ import "./ExtensionFloatingLabel.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { fg } from '@atlaskit/platform-feature-flags/fg';
6
- import { Text } from '@atlaskit/primitives/compiled';
6
+ import { Text } from '@atlaskit/primitives/compiled/text';
7
7
  const floatingLabelStyles = {
8
8
  base: "_2rkofajl _zulp1b66 _4cvr1h6o _bfhkvuon _16qsglyw _1e0c1txw _1bah1h6o _p12f11ux _tzy4kb7n _19bvu2gc _u5f3u2gc _kqswstnw _1xi2utpp _154i14id _3um0ewfl _1pbycs5v",
9
9
  selected: "_bfhk19i6 _n3td1b66 _ca0q1b66 _154id439",
@@ -122,7 +122,8 @@ export class ExtensionNode extends ReactNodeView {
122
122
  const htmlElement = document.createElement('div');
123
123
  const extensionHeight = (_this$reactComponentP = this.reactComponentProps) === null || _this$reactComponentP === void 0 ? void 0 : (_this$reactComponentP2 = _this$reactComponentP.extensionNodeViewOptions) === null || _this$reactComponentP2 === void 0 ? void 0 : (_this$reactComponentP3 = _this$reactComponentP2.getExtensionHeight) === null || _this$reactComponentP3 === void 0 ? void 0 : _this$reactComponentP3.call(_this$reactComponentP2, this.node);
124
124
  if (extensionHeight) {
125
- htmlElement.style.setProperty('min-height', `${extensionHeight}px`);
125
+ const minHeight = extensionHeight.endsWith('px') && fg('confluence_forge_early_render_reserve_height') ? extensionHeight : `${extensionHeight}px`;
126
+ htmlElement.style.setProperty('min-height', minHeight);
126
127
  }
127
128
  return htmlElement;
128
129
  }
@@ -6,7 +6,9 @@
6
6
  import { css, jsx } from '@emotion/react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
9
- import { Box, xcss } from '@atlaskit/primitives';
9
+ import { Box } from '@atlaskit/primitives/box';
10
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
11
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
10
12
  const barStyles = css({
11
13
  position: 'absolute',
12
14
  left: 0,
@@ -3,7 +3,9 @@ import { useIntl } from 'react-intl';
3
3
  import CommentIcon from '@atlaskit/icon/core/comment';
4
4
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
5
5
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
6
- import { Pressable, xcss } from '@atlaskit/primitives';
6
+ import { Pressable } from '@atlaskit/primitives/pressable';
7
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
8
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
7
9
  import Tooltip from '@atlaskit/tooltip/Tooltip';
8
10
  import { commentMessages as messages } from '../media';
9
11
  const baseStyles = xcss({
@@ -3,7 +3,6 @@ import { useIntl } from 'react-intl';
3
3
  import InfoIcon from '@atlaskit/icon/core/status-information';
4
4
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
5
5
  import { Box, xcss } from '@atlaskit/primitives';
6
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
6
  import Tooltip from '@atlaskit/tooltip/Tooltip';
8
7
  import { externalMediaMessages } from '../media';
9
8
  const baseStyles = xcss({
@@ -13,8 +12,7 @@ const baseStyles = xcss({
13
12
  lineHeight: "var(--ds-space-200, 16px)",
14
13
  cursor: 'pointer'
15
14
  });
16
- const NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com'];
17
- const NO_EXTERNAL_BADGE_HOSTS_NEW = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
15
+ const NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
18
16
  export const isUnbadgedUrl = url => {
19
17
  if (!url) {
20
18
  return false;
@@ -34,9 +32,6 @@ export const isUnbadgedUrl = url => {
34
32
  if (protocol === 'data:') {
35
33
  return pathname === null || pathname === void 0 ? void 0 : pathname.startsWith('image/');
36
34
  }
37
- if (expValEquals('platform_editor_media_external_badge_bbc_fix', 'isEnabled', true)) {
38
- return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS_NEW.some(host => hostname === host || hostname.endsWith(`.${host}`)));
39
- }
40
35
  return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS.some(host => hostname === host || hostname.endsWith(`.${host}`)));
41
36
  };
42
37
 
@@ -13,7 +13,7 @@ const NETWORK_FAILURE_REGEX = /^network failure/i;
13
13
  const RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
14
14
  const SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
15
15
  const packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
16
- const packageVersion = "130.2.0";
16
+ const packageVersion = "130.3.0";
17
17
  const sanitiseSentryEvents = (data, _hint) => {
18
18
  // Remove URL as it has UGC
19
19
  // Ignored via go/ees007
@@ -2,9 +2,13 @@
2
2
  import "./CompactQuickInsertMenuItem.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useId, useMemo, useState } from 'react';
5
+ import { Box } from '@atlaskit/primitives/compiled/box';
6
+ import { Inline } from '@atlaskit/primitives/compiled/inline';
7
+ import { Text } from '@atlaskit/primitives/compiled/text';
5
8
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- Compiled primitives do not provide Pressable.
6
- import { Pressable, xcss } from '@atlaskit/primitives';
7
- import { Box, Inline, Text } from '@atlaskit/primitives/compiled';
9
+ import { Pressable } from '@atlaskit/primitives/pressable';
10
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- Compiled primitives do not provide Pressable.
11
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
8
12
  import { QuickInsertHoverPreview } from './QuickInsertHoverPreview';
9
13
  import { useQuickInsertMenuItemSelection } from './quickInsertMenuItemUtils';
10
14
  import { useQuickInsertContext } from './useQuickInsertContext';
@@ -3,8 +3,13 @@ import "./ElementBrowserQuickInsertMenuItem.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useMemo } from 'react';
5
5
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
6
- // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- Compiled primitives do not provide Pressable.
7
- import { Box, Inline, Pressable, Stack, Text, xcss } from '@atlaskit/primitives';
6
+ /* eslint-disable @atlaskit/design-system/no-emotion-primitives -- Compiled primitives do not provide Pressable. */
7
+ import { Box } from '@atlaskit/primitives/box';
8
+ import { Inline } from '@atlaskit/primitives/inline';
9
+ import { Pressable } from '@atlaskit/primitives/pressable';
10
+ import { Stack } from '@atlaskit/primitives/stack';
11
+ import { Text } from '@atlaskit/primitives/text';
12
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
8
13
  import { useQuickInsertMenuItemSelection } from './quickInsertMenuItemUtils';
9
14
  import { useQuickInsertContext } from './useQuickInsertContext';
10
15
  const borderlessItemStyles = xcss({
@@ -2,7 +2,11 @@ import React from 'react';
2
2
  import { useIntl } from 'react-intl';
3
3
 
4
4
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
5
- import { Box, Inline, xcss } from '@atlaskit/primitives';
5
+ import { Box } from '@atlaskit/primitives/box';
6
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
7
+ import { Inline } from '@atlaskit/primitives/inline';
8
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
9
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
6
10
  import { breakoutMessages as messages } from '../messages';
7
11
  const fullWidthLabelWrapperStyles = xcss({
8
12
  height: "var(--ds-space-400, 32px)",
@@ -1,4 +1,4 @@
1
- import { emojiImage, emojiNode, emojiPlaceholder, emojiSprite } from '@atlaskit/emoji';
1
+ import { emojiImage, emojiNodeStyles as emojiNode, placeholder as emojiPlaceholder, emojiSprite } from '@atlaskit/emoji/styles';
2
2
 
3
3
  // Constant variables here has been inlined in css from EditorContentContainer, if you need to make
4
4
  // update here, please also update packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
@@ -10,7 +10,11 @@ import { css, jsx } from '@emotion/react';
10
10
  import { injectIntl } from 'react-intl';
11
11
 
12
12
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
13
- import { Box, Text, xcss } from '@atlaskit/primitives';
13
+ import { Box } from '@atlaskit/primitives/box';
14
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
15
+ import { Text } from '@atlaskit/primitives/text';
16
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
17
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
14
18
  import { messages } from './messages';
15
19
  const captionWrapperStyle = css({
16
20
  marginTop: "var(--ds-space-100, 8px)",
@@ -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 = "130.2.0";
17
+ const packageVersion = "130.3.0";
18
18
  const halfFocusRing = 1;
19
19
  const dropOffset = '0, 8';
20
20
  const fadeIn = keyframes({
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo } from 'react';
2
- import { ResourcedEmoji } from '@atlaskit/emoji/element';
2
+ import ResourcedEmoji from '@atlaskit/emoji/resourced-emoji';
3
3
  import { fg } from '@atlaskit/platform-feature-flags/fg';
4
4
  import { isSingleEmoji } from '../../utils/isSingleEmoji';
5
5
  const EmojiNodeFunctional = props => {
@@ -9,6 +9,7 @@ import { ProviderFactory, WithProviders } from '../../provider-factory';
9
9
  import { MissingMentionAvatarProvider, MentionWithAvatarProviders, MentionWithProviders } from './mention-with-providers';
10
10
  const MENTION_PROVIDERS = ['mentionProvider', 'profilecardProvider'];
11
11
  const GENERIC_MENTION_IDS = ['HipChat', 'all', 'here'];
12
+ const isAgentMentionUserType = userType => userType === 'APP' || userType === 'AGENT';
12
13
  export default class Mention extends PureComponent {
13
14
  constructor(props) {
14
15
  super(props);
@@ -31,7 +32,7 @@ export default class Mention extends PureComponent {
31
32
  const hasProvider = Boolean(mentionNodeDataProvider);
32
33
  const canReportMissingProvider = !hasProvider && fg('platform_editor_mention_avatar_observability');
33
34
  const cohort = expVal('convo_ai_entity_hover_cards_non_hello_exp', 'hover_card_cohort', 'control');
34
- const isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (cohort === 'person' || cohort === 'all' || isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider'));
35
+ const isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (cohort === 'person' || cohort === 'all' || isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider') || isAgentMentionUserType(userType) && isExperimentEnabled('platform_editor_drop3_hexagon_agent_avatar'));
35
36
  if (isAvatarEnabled && mentionNodeDataProvider) {
36
37
  return /*#__PURE__*/React.createElement(MentionWithAvatarProviders, {
37
38
  id: id,
@@ -169,6 +169,7 @@ export const MentionWithProviders = /*#__PURE__*/React.memo(({
169
169
  };
170
170
  }, [id, mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.isRovoChat, mentionProvider]);
171
171
  const MentionComponent = profilecardProvider && profilecardProviderResolver && GENERIC_USER_IDS.indexOf(id) === -1 ? ResourcedMentionWithProfilecard : ResourcedMention;
172
+ const mentionUserType = userType === 'AGENT' ? 'APP' : userType;
172
173
  const ssrPlaceholderId = `mention-${id}`;
173
174
 
174
175
  // A disabled mention is non-interactive, so it bypasses the profile-card
@@ -198,7 +199,7 @@ export const MentionWithProviders = /*#__PURE__*/React.memo(({
198
199
  text: text,
199
200
  accessLevel: accessLevel,
200
201
  localId: localId,
201
- userType: userType,
202
+ userType: mentionUserType,
202
203
  mentionProvider: mentionProvider,
203
204
  appType: mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.appType,
204
205
  avatarUrl: mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.avatarUrl,
@@ -9,7 +9,11 @@ import { css, jsx } from '@emotion/react';
9
9
  import { FormattedMessage } from 'react-intl';
10
10
  import LinkButton from '@atlaskit/button/link';
11
11
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
12
- import { Box, Text, xcss } from '@atlaskit/primitives';
12
+ import { Box } from '@atlaskit/primitives/box';
13
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
14
+ import { Text } from '@atlaskit/primitives/text';
15
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
16
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
13
17
  import NotFoundIllustration from './NotFoundIllustration';
14
18
  export default function EmptyState(_ref) {
15
19
  var onExternalLinkClick = _ref.onExternalLinkClick,
@@ -7,7 +7,7 @@ import { useIntl } from 'react-intl';
7
7
  import ShowMoreHorizontalIcon from '@atlaskit/icon/core/show-more-horizontal';
8
8
  import ButtonItem from '@atlaskit/menu/button-item';
9
9
  import Section from '@atlaskit/menu/section';
10
- import { Text } from '@atlaskit/primitives/compiled';
10
+ import { Text } from '@atlaskit/primitives/compiled/text';
11
11
  import { toolbarInsertBlockMessages } from '../../messages/insert-block';
12
12
  var styles = {
13
13
  iconContainer: "_1e0c1txw _4cvr1h6o _1bah1h6o _1bsbzwfg _4t3i1tcg _2hwx1b66",
@@ -3,7 +3,7 @@ import "./ExtensionFloatingLabel.compiled.css";
3
3
  import * as React from 'react';
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import { fg } from '@atlaskit/platform-feature-flags/fg';
6
- import { Text } from '@atlaskit/primitives/compiled';
6
+ import { Text } from '@atlaskit/primitives/compiled/text';
7
7
  var floatingLabelStyles = {
8
8
  base: "_2rkofajl _zulp1b66 _4cvr1h6o _bfhkvuon _16qsglyw _1e0c1txw _1bah1h6o _p12f11ux _tzy4kb7n _19bvu2gc _u5f3u2gc _kqswstnw _1xi2utpp _154i14id _3um0ewfl _1pbycs5v",
9
9
  selected: "_bfhk19i6 _n3td1b66 _ca0q1b66 _154id439",
@@ -146,7 +146,8 @@ export var ExtensionNode = /*#__PURE__*/function (_ReactNodeView) {
146
146
  var _htmlElement = document.createElement('div');
147
147
  var extensionHeight = (_this$reactComponentP = this.reactComponentProps) === null || _this$reactComponentP === void 0 || (_this$reactComponentP = _this$reactComponentP.extensionNodeViewOptions) === null || _this$reactComponentP === void 0 || (_this$reactComponentP2 = _this$reactComponentP.getExtensionHeight) === null || _this$reactComponentP2 === void 0 ? void 0 : _this$reactComponentP2.call(_this$reactComponentP, this.node);
148
148
  if (extensionHeight) {
149
- _htmlElement.style.setProperty('min-height', "".concat(extensionHeight, "px"));
149
+ var minHeight = extensionHeight.endsWith('px') && fg('confluence_forge_early_render_reserve_height') ? extensionHeight : "".concat(extensionHeight, "px");
150
+ _htmlElement.style.setProperty('min-height', minHeight);
150
151
  }
151
152
  return _htmlElement;
152
153
  }
@@ -6,7 +6,9 @@
6
6
  import { css, jsx } from '@emotion/react';
7
7
 
8
8
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
9
- import { Box, xcss } from '@atlaskit/primitives';
9
+ import { Box } from '@atlaskit/primitives/box';
10
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
11
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
10
12
  var barStyles = css({
11
13
  position: 'absolute',
12
14
  left: 0,
@@ -3,7 +3,9 @@ import { useIntl } from 'react-intl';
3
3
  import CommentIcon from '@atlaskit/icon/core/comment';
4
4
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
5
5
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
6
- import { Pressable, xcss } from '@atlaskit/primitives';
6
+ import { Pressable } from '@atlaskit/primitives/pressable';
7
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
8
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
7
9
  import Tooltip from '@atlaskit/tooltip/Tooltip';
8
10
  import { commentMessages as messages } from '../media';
9
11
  var baseStyles = xcss({
@@ -3,7 +3,6 @@ import { useIntl } from 'react-intl';
3
3
  import InfoIcon from '@atlaskit/icon/core/status-information';
4
4
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
5
5
  import { Box, xcss } from '@atlaskit/primitives';
6
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
7
6
  import Tooltip from '@atlaskit/tooltip/Tooltip';
8
7
  import { externalMediaMessages } from '../media';
9
8
  var baseStyles = xcss({
@@ -13,8 +12,7 @@ var baseStyles = xcss({
13
12
  lineHeight: "var(--ds-space-200, 16px)",
14
13
  cursor: 'pointer'
15
14
  });
16
- var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com'];
17
- var NO_EXTERNAL_BADGE_HOSTS_NEW = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
15
+ var NO_EXTERNAL_BADGE_HOSTS = ['atlassian.com', 'loom.com', 'dam-cdn.atl.orangelogic.com', 'bitbucket.org'];
18
16
  export var isUnbadgedUrl = function isUnbadgedUrl(url) {
19
17
  if (!url) {
20
18
  return false;
@@ -32,11 +30,6 @@ export var isUnbadgedUrl = function isUnbadgedUrl(url) {
32
30
  if (protocol === 'data:') {
33
31
  return pathname === null || pathname === void 0 ? void 0 : pathname.startsWith('image/');
34
32
  }
35
- if (expValEquals('platform_editor_media_external_badge_bbc_fix', 'isEnabled', true)) {
36
- return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS_NEW.some(function (host) {
37
- return hostname === host || hostname.endsWith(".".concat(host));
38
- }));
39
- }
40
33
  return Boolean(hostname && NO_EXTERNAL_BADGE_HOSTS.some(function (host) {
41
34
  return hostname === host || hostname.endsWith(".".concat(host));
42
35
  }));
@@ -19,7 +19,7 @@ var NETWORK_FAILURE_REGEX = /^network failure/i;
19
19
  var RESIZE_OBSERVER_LOOP_REGEX = /ResizeObserver loop completed with undelivered notifications/;
20
20
  var SENTRY_DSN = 'https://0b10c8e02fb44d8796c047b102c9bee8@o55978.ingest.sentry.io/4505129224110080';
21
21
  var packageName = 'editor-common'; // Sentry doesn't accept '/' in its releases https://docs.sentry.io/platforms/javascript/configuration/releases/
22
- var packageVersion = "130.2.0";
22
+ var packageVersion = "130.3.0";
23
23
  var sanitiseSentryEvents = function sanitiseSentryEvents(data, _hint) {
24
24
  // Remove URL as it has UGC
25
25
  // Ignored via go/ees007
@@ -3,9 +3,13 @@ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
3
  import "./CompactQuickInsertMenuItem.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import React, { useId, useMemo, useState } from 'react';
6
+ import { Box } from '@atlaskit/primitives/compiled/box';
7
+ import { Inline } from '@atlaskit/primitives/compiled/inline';
8
+ import { Text } from '@atlaskit/primitives/compiled/text';
6
9
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- Compiled primitives do not provide Pressable.
7
- import { Pressable, xcss } from '@atlaskit/primitives';
8
- import { Box, Inline, Text } from '@atlaskit/primitives/compiled';
10
+ import { Pressable } from '@atlaskit/primitives/pressable';
11
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- Compiled primitives do not provide Pressable.
12
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
9
13
  import { QuickInsertHoverPreview } from './QuickInsertHoverPreview';
10
14
  import { useQuickInsertMenuItemSelection } from './quickInsertMenuItemUtils';
11
15
  import { useQuickInsertContext } from './useQuickInsertContext';
@@ -3,8 +3,13 @@ import "./ElementBrowserQuickInsertMenuItem.compiled.css";
3
3
  import { ax, ix } from "@compiled/react/runtime";
4
4
  import React, { useMemo } from 'react';
5
5
  import { isExperimentEnabled } from '@atlaskit/platform-feature-experiments/is-experiment-enabled';
6
- // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- Compiled primitives do not provide Pressable.
7
- import { Box, Inline, Pressable, Stack, Text, xcss } from '@atlaskit/primitives';
6
+ /* eslint-disable @atlaskit/design-system/no-emotion-primitives -- Compiled primitives do not provide Pressable. */
7
+ import { Box } from '@atlaskit/primitives/box';
8
+ import { Inline } from '@atlaskit/primitives/inline';
9
+ import { Pressable } from '@atlaskit/primitives/pressable';
10
+ import { Stack } from '@atlaskit/primitives/stack';
11
+ import { Text } from '@atlaskit/primitives/text';
12
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
8
13
  import { useQuickInsertMenuItemSelection } from './quickInsertMenuItemUtils';
9
14
  import { useQuickInsertContext } from './useQuickInsertContext';
10
15
  var borderlessItemStyles = xcss({
@@ -2,7 +2,11 @@ import React from 'react';
2
2
  import { useIntl } from 'react-intl';
3
3
 
4
4
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
5
- import { Box, Inline, xcss } from '@atlaskit/primitives';
5
+ import { Box } from '@atlaskit/primitives/box';
6
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
7
+ import { Inline } from '@atlaskit/primitives/inline';
8
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
9
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
6
10
  import { breakoutMessages as messages } from '../messages';
7
11
  var fullWidthLabelWrapperStyles = xcss({
8
12
  height: "var(--ds-space-400, 32px)",
@@ -1,4 +1,4 @@
1
- import { emojiImage, emojiNode, emojiPlaceholder, emojiSprite } from '@atlaskit/emoji';
1
+ import { emojiImage, emojiNodeStyles as emojiNode, placeholder as emojiPlaceholder, emojiSprite } from '@atlaskit/emoji/styles';
2
2
 
3
3
  // Constant variables here has been inlined in css from EditorContentContainer, if you need to make
4
4
  // update here, please also update packages/editor/editor-core/src/ui/EditorContentContainer/EditorContentContainer-compiled.tsx
@@ -17,7 +17,11 @@ import { css, jsx } from '@emotion/react';
17
17
  import { injectIntl } from 'react-intl';
18
18
 
19
19
  // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
20
- import { Box, Text, xcss } from '@atlaskit/primitives';
20
+ import { Box } from '@atlaskit/primitives/box';
21
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
22
+ import { Text } from '@atlaskit/primitives/text';
23
+ // eslint-disable-next-line @atlaskit/design-system/no-emotion-primitives -- to be migrated to @atlaskit/primitives/compiled – go/akcss
24
+ import { xcss } from '@atlaskit/primitives/xcss/xcss';
21
25
  import { messages } from './messages';
22
26
  var captionWrapperStyle = css({
23
27
  marginTop: "var(--ds-space-100, 8px)",
@@ -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 = "130.2.0";
24
+ var packageVersion = "130.3.0";
25
25
  var halfFocusRing = 1;
26
26
  var dropOffset = '0, 8';
27
27
  var fadeIn = keyframes({
@@ -1,5 +1,5 @@
1
1
  import React, { useMemo } from 'react';
2
- import { ResourcedEmoji } from '@atlaskit/emoji/element';
2
+ import ResourcedEmoji from '@atlaskit/emoji/resourced-emoji';
3
3
  import { fg } from '@atlaskit/platform-feature-flags/fg';
4
4
  import { isSingleEmoji } from '../../utils/isSingleEmoji';
5
5
  var EmojiNodeFunctional = function EmojiNodeFunctional(props) {
@@ -16,6 +16,9 @@ import { ProviderFactory, WithProviders } from '../../provider-factory';
16
16
  import { MissingMentionAvatarProvider, MentionWithAvatarProviders, MentionWithProviders } from './mention-with-providers';
17
17
  var MENTION_PROVIDERS = ['mentionProvider', 'profilecardProvider'];
18
18
  var GENERIC_MENTION_IDS = ['HipChat', 'all', 'here'];
19
+ var isAgentMentionUserType = function isAgentMentionUserType(userType) {
20
+ return userType === 'APP' || userType === 'AGENT';
21
+ };
19
22
  var Mention = /*#__PURE__*/function (_PureComponent) {
20
23
  function Mention(props) {
21
24
  var _this;
@@ -37,7 +40,7 @@ var Mention = /*#__PURE__*/function (_PureComponent) {
37
40
  var hasProvider = Boolean(mentionNodeDataProvider);
38
41
  var canReportMissingProvider = !hasProvider && fg('platform_editor_mention_avatar_observability');
39
42
  var cohort = expVal('convo_ai_entity_hover_cards_non_hello_exp', 'hover_card_cohort', 'control');
40
- var isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (cohort === 'person' || cohort === 'all' || isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider'));
43
+ var isAvatarEnabled = (hasProvider || canReportMissingProvider) && userType !== 'SPECIAL' && !GENERIC_MENTION_IDS.includes(id) && (cohort === 'person' || cohort === 'all' || isExperimentEnabled('platform_editor_mention_node_avatar') || isExperimentEnabled('platform_editor_mention_node_graphql_provider') || isAgentMentionUserType(userType) && isExperimentEnabled('platform_editor_drop3_hexagon_agent_avatar'));
41
44
  if (isAvatarEnabled && mentionNodeDataProvider) {
42
45
  return /*#__PURE__*/React.createElement(MentionWithAvatarProviders, {
43
46
  id: id,
@@ -208,6 +208,7 @@ export var MentionWithProviders = /*#__PURE__*/React.memo(function (_ref3) {
208
208
  };
209
209
  }, [id, mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.isRovoChat, mentionProvider]);
210
210
  var MentionComponent = profilecardProvider && profilecardProviderResolver && GENERIC_USER_IDS.indexOf(id) === -1 ? ResourcedMentionWithProfilecard : ResourcedMention;
211
+ var mentionUserType = userType === 'AGENT' ? 'APP' : userType;
211
212
  var ssrPlaceholderId = "mention-".concat(id);
212
213
 
213
214
  // A disabled mention is non-interactive, so it bypasses the profile-card
@@ -237,7 +238,7 @@ export var MentionWithProviders = /*#__PURE__*/React.memo(function (_ref3) {
237
238
  text: text,
238
239
  accessLevel: accessLevel,
239
240
  localId: localId,
240
- userType: userType,
241
+ userType: mentionUserType,
241
242
  mentionProvider: mentionProvider,
242
243
  appType: mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.appType,
243
244
  avatarUrl: mentionNodeData === null || mentionNodeData === void 0 ? void 0 : mentionNodeData.avatarUrl,
@@ -1,6 +1,6 @@
1
1
  import React from 'react';
2
- import type { EmojiProvider, EmojiResourceConfig } from '@atlaskit/emoji/resource';
3
- import type { EmojiId } from '@atlaskit/emoji/types';
2
+ import type { EmojiResourceConfig } from '@atlaskit/emoji/emoji-resource';
3
+ import type { EmojiId, EmojiProvider } from '@atlaskit/emoji/types';
4
4
  import type { ProviderFactory } from '../../provider-factory';
5
5
  export interface EmojiProps extends EmojiId {
6
6
  allowTextFallback?: boolean;
@@ -1,9 +1,8 @@
1
1
  import React, { PureComponent } from 'react';
2
- import type { UserType as MentionUserType } from '@atlaskit/adf-schema/mention';
3
2
  import { ProviderFactory } from '../../provider-factory';
4
3
  import type { ProfilecardProvider } from '../../provider-factory/profile-card-provider';
5
4
  import type { MentionEventHandlers } from '../EventHandlers';
6
- import type { MentionNodeDataProvider } from './mention-node-data-provider';
5
+ import type { MentionNodeDataProvider, MentionNodeDataUserType } from './mention-node-data-provider';
7
6
  export interface MentionProps {
8
7
  accessLevel?: string;
9
8
  disabledTooltip?: string;
@@ -14,7 +13,7 @@ export interface MentionProps {
14
13
  mentionNodeDataProvider?: MentionNodeDataProvider;
15
14
  providers?: ProviderFactory;
16
15
  text: string;
17
- userType?: MentionUserType;
16
+ userType?: MentionNodeDataUserType;
18
17
  }
19
18
  export interface MentionState {
20
19
  profilecardProvider: ProfilecardProvider | null;
@@ -1,9 +1,8 @@
1
1
  import React from 'react';
2
- import type { UserType as MentionUserType } from '@atlaskit/adf-schema/mention';
3
2
  import type { MentionNodeData, MentionProvider } from '@atlaskit/mention/types';
4
3
  import type { ProfilecardProvider } from '../../provider-factory/profile-card-provider';
5
4
  import type { MentionEventHandlers } from '../EventHandlers';
6
- import type { MentionNodeDataProvider } from './mention-node-data-provider';
5
+ import type { MentionNodeDataProvider, MentionNodeDataUserType } from './mention-node-data-provider';
7
6
  export interface Props {
8
7
  accessLevel?: string;
9
8
  disabledTooltip?: string;
@@ -15,7 +14,7 @@ export interface Props {
15
14
  mentionProvider?: Promise<MentionProvider>;
16
15
  profilecardProvider?: Promise<ProfilecardProvider>;
17
16
  text: string;
18
- userType?: MentionUserType;
17
+ userType?: MentionNodeDataUserType;
19
18
  }
20
19
  export interface MentionWithProvidersProps extends Props {
21
20
  mentionNodeData?: MentionNodeData;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/editor-common",
3
- "version": "130.2.1",
3
+ "version": "130.3.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/"
@@ -79,13 +79,13 @@
79
79
  "@atlaskit/react-compiler-gating": "^0.2.0",
80
80
  "@atlaskit/react-ufo": "^8.1.0",
81
81
  "@atlaskit/section-message": "^10.2.0",
82
- "@atlaskit/smart-card": "^46.5.0",
82
+ "@atlaskit/smart-card": "^46.6.0",
83
83
  "@atlaskit/smart-user-picker": "^12.4.0",
84
84
  "@atlaskit/spinner": "^20.4.0",
85
85
  "@atlaskit/task-decision": "^21.12.0",
86
86
  "@atlaskit/teams-app-config": "^3.1.0",
87
87
  "@atlaskit/textfield": "^10.2.0",
88
- "@atlaskit/tmp-editor-statsig": "^228.0.0",
88
+ "@atlaskit/tmp-editor-statsig": "^230.0.0",
89
89
  "@atlaskit/tokens": "^20.4.0",
90
90
  "@atlaskit/tooltip": "^24.4.0",
91
91
  "@atlaskit/width-detector": "^7.2.0",
@@ -194,6 +194,10 @@
194
194
  "platform_editor_bordered_panel_nested_in_table": {
195
195
  "type": "boolean"
196
196
  },
197
+ "confluence_forge_early_render_reserve_height": {
198
+ "type": "boolean",
199
+ "referenceOnly": true
200
+ },
197
201
  "confluence_connect_macro_preset_height": {
198
202
  "type": "boolean"
199
203
  },