@atlaskit/smart-card 26.49.0 → 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 (43) hide show
  1. package/CHANGELOG.md +7 -0
  2. package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +39 -27
  3. package/dist/cjs/state/hooks/use-ai-summary/index.js +16 -38
  4. package/dist/cjs/utils/analytics/analytics.js +1 -1
  5. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +37 -29
  6. package/dist/cjs/view/HoverCard/components/ContentContainer.js +42 -13
  7. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +1 -10
  8. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +63 -16
  9. package/dist/cjs/view/LinkUrl/index.js +1 -1
  10. package/dist/cjs/view/common/ai-summary/index.js +9 -3
  11. package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +14 -5
  12. package/dist/es2019/state/hooks/use-ai-summary/index.js +17 -35
  13. package/dist/es2019/utils/analytics/analytics.js +1 -1
  14. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +33 -26
  15. package/dist/es2019/view/HoverCard/components/ContentContainer.js +35 -10
  16. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +2 -7
  17. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +56 -7
  18. package/dist/es2019/view/LinkUrl/index.js +1 -1
  19. package/dist/es2019/view/common/ai-summary/index.js +7 -3
  20. package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +39 -27
  21. package/dist/esm/state/hooks/use-ai-summary/index.js +17 -39
  22. package/dist/esm/utils/analytics/analytics.js +1 -1
  23. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +38 -30
  24. package/dist/esm/view/HoverCard/components/ContentContainer.js +39 -13
  25. package/dist/esm/view/HoverCard/components/HoverCardContent.js +2 -11
  26. package/dist/esm/view/HoverCard/components/views/resolved/index.js +66 -18
  27. package/dist/esm/view/LinkUrl/index.js +1 -1
  28. package/dist/esm/view/common/ai-summary/index.js +9 -3
  29. package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +3 -1
  30. package/dist/types/state/hooks/use-ai-summary/index.d.ts +0 -1
  31. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/types.d.ts +2 -2
  32. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -3
  33. package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +0 -2
  34. package/dist/types/view/HoverCard/types.d.ts +1 -1
  35. package/dist/types/view/common/ai-summary/index.d.ts +4 -0
  36. package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +3 -1
  37. package/dist/types-ts4.5/state/hooks/use-ai-summary/index.d.ts +0 -1
  38. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/types.d.ts +2 -2
  39. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -3
  40. package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +0 -2
  41. package/dist/types-ts4.5/view/HoverCard/types.d.ts +1 -1
  42. package/dist/types-ts4.5/view/common/ai-summary/index.d.ts +4 -0
  43. package/package.json +2 -2
@@ -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.49.0",
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",