@atlaskit/smart-card 26.48.8 → 26.49.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 (143) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/__tests_external__/page-objects/BaseCard.js +1 -1
  3. package/dist/cjs/__tests_external__/page-objects/BlockCard.js +1 -1
  4. package/dist/cjs/__tests_external__/page-objects/EmbedCard.js +1 -1
  5. package/dist/cjs/__tests_external__/page-objects/InlineCard.js +1 -1
  6. package/dist/cjs/ssr.js +2 -2
  7. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +39 -27
  8. package/dist/cjs/state/hooks/use-ai-summary/index.js +16 -38
  9. package/dist/cjs/state/hooks/use-invoke-client-action/index.js +2 -2
  10. package/dist/cjs/utils/analytics/analytics.js +1 -1
  11. package/dist/cjs/utils/flexible.js +2 -2
  12. package/dist/cjs/utils/index.js +2 -2
  13. package/dist/cjs/utils/mocks.js +1 -1
  14. package/dist/cjs/view/BlockCard/components/ActionList.js +2 -2
  15. package/dist/cjs/view/BlockCard/views/flexible/FlexibleErroredView.js +2 -2
  16. package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenView.js +2 -2
  17. package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +2 -2
  18. package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +2 -2
  19. package/dist/cjs/view/Card/index.js +1 -1
  20. package/dist/cjs/view/CardWithData/component.js +1 -1
  21. package/dist/cjs/view/CardWithData/loader.js +3 -3
  22. package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +2 -2
  23. package/dist/cjs/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +2 -2
  24. package/dist/cjs/view/CardWithUrl/component.js +2 -2
  25. package/dist/cjs/view/CardWithUrl/loader.js +2 -2
  26. package/dist/cjs/view/EmbedCard/EmbedResizeMessageListener.js +1 -1
  27. package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +22 -3
  28. package/dist/cjs/view/EmbedCard/components/Frame.js +2 -2
  29. package/dist/cjs/view/EmbedCard/components/styled.js +103 -23
  30. package/dist/cjs/view/EmbedCard/views/forbidden-view/index.js +2 -2
  31. package/dist/cjs/view/EmbedCard/views/not-found-view/index.js +2 -2
  32. package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +2 -2
  33. package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +2 -2
  34. package/dist/cjs/view/EmbedModal/components/analytics/index.js +2 -2
  35. package/dist/cjs/view/EmbedModal/components/error-boundary/index.js +2 -2
  36. package/dist/cjs/view/EmbedModal/components/link-info/index.js +2 -2
  37. package/dist/cjs/view/EmbedModal/index.js +2 -2
  38. package/dist/cjs/view/EmbedModal/utils.js +2 -2
  39. package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +2 -2
  40. package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +2 -2
  41. package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +2 -2
  42. package/dist/cjs/view/FlexibleCard/components/actions/utils.js +2 -2
  43. package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -2
  44. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-tooltip.js +2 -2
  45. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +39 -31
  46. package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +2 -2
  47. package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +2 -2
  48. package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +2 -2
  49. package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/index.js +2 -2
  50. package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +2 -2
  51. package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/related-url-item/index.js +2 -2
  52. package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +2 -2
  53. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +2 -2
  54. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +2 -2
  55. package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +2 -5
  56. package/dist/cjs/view/FlexibleCard/components/container/hover-card-control/index.js +2 -2
  57. package/dist/cjs/view/FlexibleCard/components/container/index.js +2 -2
  58. package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +2 -2
  59. package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +2 -2
  60. package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +2 -2
  61. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/error-boundary/index.js +2 -2
  62. package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-item/index.js +2 -2
  63. package/dist/cjs/view/FlexibleCard/components/elements/preview/index.js +2 -2
  64. package/dist/cjs/view/FlexibleCard/components/elements/snippet-element/index.js +2 -2
  65. package/dist/cjs/view/FlexibleCard/components/elements/utils.js +2 -2
  66. package/dist/cjs/view/FlexibleCard/index.js +2 -2
  67. package/dist/cjs/view/HoverCard/components/ContentContainer.js +42 -13
  68. package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +2 -2
  69. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +3 -12
  70. package/dist/cjs/view/HoverCard/components/ImagePreview.js +2 -2
  71. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +65 -18
  72. package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +2 -2
  73. package/dist/cjs/view/InlineCard/ErroredView/index.js +1 -1
  74. package/dist/cjs/view/InlineCard/ForbiddenView/index.js +1 -1
  75. package/dist/cjs/view/InlineCard/Frame/index.js +2 -2
  76. package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +1 -1
  77. package/dist/cjs/view/InlineCard/ResolvedView/index.js +1 -1
  78. package/dist/cjs/view/InlineCard/ResolvingView/index.js +1 -1
  79. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +1 -1
  80. package/dist/cjs/view/InlineCard/index.js +2 -2
  81. package/dist/cjs/view/LinkUrl/LinkWarningModal/index.js +2 -2
  82. package/dist/cjs/view/LinkUrl/index.js +1 -1
  83. package/dist/cjs/view/LinkView/index.js +1 -1
  84. package/dist/cjs/view/common/UnauthorisedViewContent.js +2 -2
  85. package/dist/cjs/view/common/ai-prism/ai-glowing-border/animated-svg-container.js +2 -2
  86. package/dist/cjs/view/common/ai-summary/index.js +9 -3
  87. package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +14 -5
  88. package/dist/es2019/state/hooks/use-ai-summary/index.js +17 -35
  89. package/dist/es2019/utils/analytics/analytics.js +1 -1
  90. package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +21 -4
  91. package/dist/es2019/view/EmbedCard/components/styled.js +99 -111
  92. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +33 -26
  93. package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +0 -3
  94. package/dist/es2019/view/HoverCard/components/ContentContainer.js +35 -10
  95. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +2 -7
  96. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +56 -7
  97. package/dist/es2019/view/LinkUrl/index.js +1 -1
  98. package/dist/es2019/view/common/ai-summary/index.js +7 -3
  99. package/dist/esm/__tests_external__/page-objects/BaseCard.js +1 -1
  100. package/dist/esm/__tests_external__/page-objects/BlockCard.js +1 -1
  101. package/dist/esm/__tests_external__/page-objects/EmbedCard.js +1 -1
  102. package/dist/esm/__tests_external__/page-objects/InlineCard.js +1 -1
  103. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +39 -27
  104. package/dist/esm/state/hooks/use-ai-summary/index.js +17 -39
  105. package/dist/esm/utils/analytics/analytics.js +1 -1
  106. package/dist/esm/utils/mocks.js +1 -1
  107. package/dist/esm/view/Card/index.js +1 -1
  108. package/dist/esm/view/CardWithData/component.js +1 -1
  109. package/dist/esm/view/CardWithData/loader.js +1 -1
  110. package/dist/esm/view/EmbedCard/EmbedResizeMessageListener.js +1 -1
  111. package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +23 -4
  112. package/dist/esm/view/EmbedCard/components/styled.js +100 -20
  113. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +38 -30
  114. package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +0 -3
  115. package/dist/esm/view/HoverCard/components/ContentContainer.js +39 -13
  116. package/dist/esm/view/HoverCard/components/HoverCardContent.js +2 -11
  117. package/dist/esm/view/HoverCard/components/views/resolved/index.js +66 -18
  118. package/dist/esm/view/InlineCard/ErroredView/index.js +1 -1
  119. package/dist/esm/view/InlineCard/ForbiddenView/index.js +1 -1
  120. package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +1 -1
  121. package/dist/esm/view/InlineCard/ResolvedView/index.js +1 -1
  122. package/dist/esm/view/InlineCard/ResolvingView/index.js +1 -1
  123. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -1
  124. package/dist/esm/view/LinkUrl/index.js +1 -1
  125. package/dist/esm/view/LinkView/index.js +1 -1
  126. package/dist/esm/view/common/ai-summary/index.js +9 -3
  127. package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +3 -1
  128. package/dist/types/state/hooks/use-ai-summary/index.d.ts +0 -1
  129. package/dist/types/view/EmbedCard/components/styled.d.ts +5 -1
  130. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/types.d.ts +2 -2
  131. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -3
  132. package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +0 -2
  133. package/dist/types/view/HoverCard/types.d.ts +1 -1
  134. package/dist/types/view/common/ai-summary/index.d.ts +4 -0
  135. package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +3 -1
  136. package/dist/types-ts4.5/state/hooks/use-ai-summary/index.d.ts +0 -1
  137. package/dist/types-ts4.5/view/EmbedCard/components/styled.d.ts +5 -1
  138. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/types.d.ts +2 -2
  139. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -3
  140. package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +0 -2
  141. package/dist/types-ts4.5/view/HoverCard/types.d.ts +1 -1
  142. package/dist/types-ts4.5/view/common/ai-summary/index.d.ts +4 -0
  143. package/package.json +5 -2
@@ -7,7 +7,7 @@ import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstruct
7
7
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
8
8
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
9
9
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
10
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
10
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
11
11
  import Button from '@atlaskit/button/custom-theme-button';
12
12
  import LockIcon from '@atlaskit/icon/glyph/lock-filled';
13
13
  import { N500, R400 } from '@atlaskit/theme/colors';
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
10
10
  import LinkWarningModal from './LinkWarningModal';
11
11
  var PACKAGE_DATA = {
12
12
  packageName: "@atlaskit/smart-card",
13
- packageVersion: "26.48.8",
13
+ packageVersion: "26.49.1",
14
14
  componentName: 'linkUrl'
15
15
  };
16
16
  var Link = withLinkClickedEvent('a');
@@ -5,7 +5,7 @@ import _inherits from "@babel/runtime/helpers/inherits";
5
5
  import _possibleConstructorReturn from "@babel/runtime/helpers/possibleConstructorReturn";
6
6
  import _getPrototypeOf from "@babel/runtime/helpers/getPrototypeOf";
7
7
  function _createSuper(Derived) { var hasNativeReflectConstruct = _isNativeReflectConstruct(); return function _createSuperInternal() { var Super = _getPrototypeOf(Derived), result; if (hasNativeReflectConstruct) { var NewTarget = _getPrototypeOf(this).constructor; result = Reflect.construct(Super, arguments, NewTarget); } else { result = Super.apply(this, arguments); } return _possibleConstructorReturn(this, result); }; }
8
- function _isNativeReflectConstruct() { if (typeof Reflect === "undefined" || !Reflect.construct) return false; if (Reflect.construct.sham) return false; if (typeof Proxy === "function") return true; try { Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); return true; } catch (e) { return false; } }
8
+ function _isNativeReflectConstruct() { try { var t = !Boolean.prototype.valueOf.call(Reflect.construct(Boolean, [], function () {})); } catch (t) {} return (_isNativeReflectConstruct = function _isNativeReflectConstruct() { return !!t; })(); }
9
9
  import React from 'react';
10
10
  import { Frame } from '../InlineCard/Frame';
11
11
  export var CardLinkView = /*#__PURE__*/function (_React$PureComponent) {
@@ -23,14 +23,17 @@ var AISummaryCSS = css({
23
23
  */
24
24
 
25
25
  var AISummary = function AISummary(_ref) {
26
- var content = _ref.content,
26
+ var _ref$content = _ref.content,
27
+ content = _ref$content === void 0 ? '' : _ref$content,
27
28
  _ref$showIcon = _ref.showIcon,
28
29
  showIcon = _ref$showIcon === void 0 ? false : _ref$showIcon,
29
30
  iconComponent = _ref.iconComponent,
30
31
  overrideCss = _ref.overrideCss,
31
32
  _ref$testId = _ref.testId,
32
- testId = _ref$testId === void 0 ? 'ai-summary' : _ref$testId;
33
- if (!content) {
33
+ testId = _ref$testId === void 0 ? 'ai-summary' : _ref$testId,
34
+ _ref$minHeight = _ref.minHeight,
35
+ minHeight = _ref$minHeight === void 0 ? 0 : _ref$minHeight;
36
+ if (!content && minHeight === 0) {
34
37
  return null;
35
38
  }
36
39
  return jsx(Markdown, {
@@ -42,6 +45,9 @@ var AISummary = function AISummary(_ref) {
42
45
  overrides: {
43
46
  Icon: iconComponent !== null && iconComponent !== void 0 ? iconComponent : AITooltipIcon
44
47
  }
48
+ },
49
+ style: {
50
+ minHeight: minHeight
45
51
  }
46
52
  });
47
53
  };
@@ -34,7 +34,9 @@ export type StateSetter = (state: AISummaryState) => any;
34
34
  export type StreamMessage = StreamTrace | StreamAnswerPart | StreamResponse | StreamError;
35
35
  export type StreamResponse = {
36
36
  type: 'FINAL_RESPONSE';
37
- message: Message;
37
+ message: {
38
+ message: Message;
39
+ };
38
40
  millisOffset?: number;
39
41
  metadata?: {
40
42
  request_id?: string;
@@ -1,6 +1,5 @@
1
1
  import type { AISummaryServiceProps, AISummaryStatus } from './ai-summary-service/types';
2
2
  export declare const useAISummary: (props: AISummaryServiceProps) => {
3
- isSummarisedOnMount: boolean;
4
3
  summariseUrl: () => Promise<void> | undefined;
5
4
  state: {
6
5
  status: AISummaryStatus;
@@ -39,6 +39,10 @@ export declare const TextWrapper: import("@emotion/styled").StyledComponent<{
39
39
  theme?: import("@emotion/react").Theme | undefined;
40
40
  as?: import("react").ElementType<any> | undefined;
41
41
  } & PlaceholderProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
42
+ export declare const TooltipWrapper: import("@emotion/styled").StyledComponent<{
43
+ theme?: import("@emotion/react").Theme | undefined;
44
+ as?: import("react").ElementType<any> | undefined;
45
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
42
46
  export interface ContentProps {
43
47
  isInteractive: boolean;
44
48
  allowScrollBar: boolean;
@@ -82,7 +86,7 @@ export interface ThumbnailProps {
82
86
  export declare const Thumbnail: import("@emotion/styled").StyledComponent<{
83
87
  theme?: import("@emotion/react").Theme | undefined;
84
88
  as?: import("react").ElementType<any> | undefined;
85
- } & ThumbnailProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
89
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
86
90
  export declare const UsersWrapper: import("@emotion/styled").StyledComponent<{
87
91
  theme?: import("@emotion/react").Theme | undefined;
88
92
  as?: import("react").ElementType<any> | undefined;
@@ -1,11 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import type { XCSS } from '@atlaskit/primitives';
3
3
  import type { TooltipProps } from '@atlaskit/tooltip';
4
- import type { AIState } from '../types';
4
+ import type { AISummaryStatus } from '../../../../../../state/hooks/use-ai-summary/ai-summary-service/types';
5
5
  export type AIStateAppearance = 'default' | 'icon-only';
6
6
  export type AIStateIndicatorProps = {
7
7
  appearance?: AIStateAppearance;
8
- state: AIState;
8
+ state: AISummaryStatus;
9
9
  testId?: string;
10
10
  };
11
11
  export type AIIndicatorContainerProps = {
@@ -1,6 +1,5 @@
1
1
  import { ActionItem, BlockProps, ElementItem } from '../types';
2
2
  import { OnActionMenuOpenChangeOptions } from '../types';
3
- export type AIState = 'ready' | 'loading' | 'error' | 'done';
4
3
  export type AISummaryBlockProps = {
5
4
  /**
6
5
  * An array of actions to be displayed on the right
@@ -18,7 +17,7 @@ export type AISummaryBlockProps = {
18
17
  */
19
18
  onActionMenuOpenChange?: (options: OnActionMenuOpenChangeOptions) => void;
20
19
  /**
21
- * Function to be called when AI Summary state changed.
20
+ * Minimum height requirement for the AISummary component to prevent fluctuations in a card size on the summary action.
22
21
  */
23
- onAIActionChange?: (state: AIState) => void;
22
+ aiSummaryMinHeight?: number;
24
23
  } & BlockProps;
@@ -2,7 +2,6 @@ import { AnalyticsFacade } from '../../../../../state/analytics';
2
2
  import { LinkAction } from '../../../../../state/hooks-external/useSmartLinkActions';
3
3
  import { CardState } from '@atlaskit/linking-common';
4
4
  import { HoverCardLoadingViewProps } from '../resolving/types';
5
- import { AISummaryBlockProps } from '../../../../FlexibleCard/components/blocks/ai-summary-block/types';
6
5
  export type HoverCardResolvedProps = {
7
6
  extensionKey?: string;
8
7
  id?: string;
@@ -12,5 +11,4 @@ export type HoverCardResolvedProps = {
12
11
  cardState: CardState;
13
12
  isAISummaryEnabled?: boolean;
14
13
  onActionClick: (actionId: string) => void;
15
- onAIActionChange?: AISummaryBlockProps['onAIActionChange'];
16
14
  } & HoverCardLoadingViewProps;
@@ -101,8 +101,8 @@ export type HoverCardContentProps = {
101
101
  };
102
102
  export type ContentContainerProps = React.HTMLAttributes<HTMLDivElement> & {
103
103
  isAIEnabled?: boolean;
104
- showPrism?: boolean;
105
104
  testId?: string;
105
+ url: string;
106
106
  };
107
107
  export type ImagePreviewProps = {
108
108
  data: JsonLd.Data.BaseData;
@@ -12,6 +12,10 @@ type AISummaryProps = {
12
12
  * serving as a hook for automated tests
13
13
  */
14
14
  testId?: string;
15
+ /**
16
+ * Minimum height requirement for the AISummary component to prevent fluctuations in a card size on the summary action.
17
+ */
18
+ minHeight?: number;
15
19
  };
16
20
  /**
17
21
  * A component to render a response from AI in markdown text.
@@ -34,7 +34,9 @@ export type StateSetter = (state: AISummaryState) => any;
34
34
  export type StreamMessage = StreamTrace | StreamAnswerPart | StreamResponse | StreamError;
35
35
  export type StreamResponse = {
36
36
  type: 'FINAL_RESPONSE';
37
- message: Message;
37
+ message: {
38
+ message: Message;
39
+ };
38
40
  millisOffset?: number;
39
41
  metadata?: {
40
42
  request_id?: string;
@@ -1,6 +1,5 @@
1
1
  import type { AISummaryServiceProps, AISummaryStatus } from './ai-summary-service/types';
2
2
  export declare const useAISummary: (props: AISummaryServiceProps) => {
3
- isSummarisedOnMount: boolean;
4
3
  summariseUrl: () => Promise<void> | undefined;
5
4
  state: {
6
5
  status: AISummaryStatus;
@@ -39,6 +39,10 @@ export declare const TextWrapper: import("@emotion/styled").StyledComponent<{
39
39
  theme?: import("@emotion/react").Theme | undefined;
40
40
  as?: import("react").ElementType<any> | undefined;
41
41
  } & PlaceholderProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
42
+ export declare const TooltipWrapper: import("@emotion/styled").StyledComponent<{
43
+ theme?: import("@emotion/react").Theme | undefined;
44
+ as?: import("react").ElementType<any> | undefined;
45
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
42
46
  export interface ContentProps {
43
47
  isInteractive: boolean;
44
48
  allowScrollBar: boolean;
@@ -82,7 +86,7 @@ export interface ThumbnailProps {
82
86
  export declare const Thumbnail: import("@emotion/styled").StyledComponent<{
83
87
  theme?: import("@emotion/react").Theme | undefined;
84
88
  as?: import("react").ElementType<any> | undefined;
85
- } & ThumbnailProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
89
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
86
90
  export declare const UsersWrapper: import("@emotion/styled").StyledComponent<{
87
91
  theme?: import("@emotion/react").Theme | undefined;
88
92
  as?: import("react").ElementType<any> | undefined;
@@ -1,11 +1,11 @@
1
1
  /// <reference types="react" />
2
2
  import type { XCSS } from '@atlaskit/primitives';
3
3
  import type { TooltipProps } from '@atlaskit/tooltip';
4
- import type { AIState } from '../types';
4
+ import type { AISummaryStatus } from '../../../../../../state/hooks/use-ai-summary/ai-summary-service/types';
5
5
  export type AIStateAppearance = 'default' | 'icon-only';
6
6
  export type AIStateIndicatorProps = {
7
7
  appearance?: AIStateAppearance;
8
- state: AIState;
8
+ state: AISummaryStatus;
9
9
  testId?: string;
10
10
  };
11
11
  export type AIIndicatorContainerProps = {
@@ -1,6 +1,5 @@
1
1
  import { ActionItem, BlockProps, ElementItem } from '../types';
2
2
  import { OnActionMenuOpenChangeOptions } from '../types';
3
- export type AIState = 'ready' | 'loading' | 'error' | 'done';
4
3
  export type AISummaryBlockProps = {
5
4
  /**
6
5
  * An array of actions to be displayed on the right
@@ -18,7 +17,7 @@ export type AISummaryBlockProps = {
18
17
  */
19
18
  onActionMenuOpenChange?: (options: OnActionMenuOpenChangeOptions) => void;
20
19
  /**
21
- * Function to be called when AI Summary state changed.
20
+ * Minimum height requirement for the AISummary component to prevent fluctuations in a card size on the summary action.
22
21
  */
23
- onAIActionChange?: (state: AIState) => void;
22
+ aiSummaryMinHeight?: number;
24
23
  } & BlockProps;
@@ -2,7 +2,6 @@ import { AnalyticsFacade } from '../../../../../state/analytics';
2
2
  import { LinkAction } from '../../../../../state/hooks-external/useSmartLinkActions';
3
3
  import { CardState } from '@atlaskit/linking-common';
4
4
  import { HoverCardLoadingViewProps } from '../resolving/types';
5
- import { AISummaryBlockProps } from '../../../../FlexibleCard/components/blocks/ai-summary-block/types';
6
5
  export type HoverCardResolvedProps = {
7
6
  extensionKey?: string;
8
7
  id?: string;
@@ -12,5 +11,4 @@ export type HoverCardResolvedProps = {
12
11
  cardState: CardState;
13
12
  isAISummaryEnabled?: boolean;
14
13
  onActionClick: (actionId: string) => void;
15
- onAIActionChange?: AISummaryBlockProps['onAIActionChange'];
16
14
  } & HoverCardLoadingViewProps;
@@ -101,8 +101,8 @@ export type HoverCardContentProps = {
101
101
  };
102
102
  export type ContentContainerProps = React.HTMLAttributes<HTMLDivElement> & {
103
103
  isAIEnabled?: boolean;
104
- showPrism?: boolean;
105
104
  testId?: string;
105
+ url: string;
106
106
  };
107
107
  export type ImagePreviewProps = {
108
108
  data: JsonLd.Data.BaseData;
@@ -12,6 +12,10 @@ type AISummaryProps = {
12
12
  * serving as a hook for automated tests
13
13
  */
14
14
  testId?: string;
15
+ /**
16
+ * Minimum height requirement for the AISummary component to prevent fluctuations in a card size on the summary action.
17
+ */
18
+ minHeight?: number;
15
19
  };
16
20
  /**
17
21
  * A component to render a response from AI in markdown text.
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "26.48.8",
3
+ "version": "26.49.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -54,7 +54,7 @@
54
54
  "@atlaskit/primitives": "^4.0.0",
55
55
  "@atlaskit/spinner": "^16.0.0",
56
56
  "@atlaskit/theme": "^12.6.0",
57
- "@atlaskit/tokens": "^1.39.0",
57
+ "@atlaskit/tokens": "^1.40.0",
58
58
  "@atlaskit/tooltip": "^18.1.0",
59
59
  "@atlaskit/ufo": "^0.2.0",
60
60
  "@babel/runtime": "^7.0.0",
@@ -163,6 +163,9 @@
163
163
  },
164
164
  "platform.linking-platform.smart-card.fix-intersection-observer": {
165
165
  "type": "boolean"
166
+ },
167
+ "platform.linking-platform.smart-card.embed-card-header-tooltip": {
168
+ "type": "boolean"
166
169
  }
167
170
  },
168
171
  "prettier": "@atlassian/atlassian-frontend-prettier-config-1.0.1"