@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.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/state/hooks/use-ai-summary/ai-summary-service/index.js +39 -27
- package/dist/cjs/state/hooks/use-ai-summary/index.js +16 -38
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +37 -29
- package/dist/cjs/view/HoverCard/components/ContentContainer.js +42 -13
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +1 -10
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +63 -16
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/ai-summary/index.js +9 -3
- package/dist/es2019/state/hooks/use-ai-summary/ai-summary-service/index.js +14 -5
- package/dist/es2019/state/hooks/use-ai-summary/index.js +17 -35
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +33 -26
- package/dist/es2019/view/HoverCard/components/ContentContainer.js +35 -10
- package/dist/es2019/view/HoverCard/components/HoverCardContent.js +2 -7
- package/dist/es2019/view/HoverCard/components/views/resolved/index.js +56 -7
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/ai-summary/index.js +7 -3
- package/dist/esm/state/hooks/use-ai-summary/ai-summary-service/index.js +39 -27
- package/dist/esm/state/hooks/use-ai-summary/index.js +17 -39
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +38 -30
- package/dist/esm/view/HoverCard/components/ContentContainer.js +39 -13
- package/dist/esm/view/HoverCard/components/HoverCardContent.js +2 -11
- package/dist/esm/view/HoverCard/components/views/resolved/index.js +66 -18
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/ai-summary/index.js +9 -3
- package/dist/types/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +3 -1
- package/dist/types/state/hooks/use-ai-summary/index.d.ts +0 -1
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/types.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -3
- package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +0 -2
- package/dist/types/view/HoverCard/types.d.ts +1 -1
- package/dist/types/view/common/ai-summary/index.d.ts +4 -0
- package/dist/types-ts4.5/state/hooks/use-ai-summary/ai-summary-service/types.d.ts +3 -1
- package/dist/types-ts4.5/state/hooks/use-ai-summary/index.d.ts +0 -1
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/types.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +2 -3
- package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +0 -2
- package/dist/types-ts4.5/view/HoverCard/types.d.ts +1 -1
- package/dist/types-ts4.5/view/common/ai-summary/index.d.ts +4 -0
- 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
|
-
*
|
|
20
|
+
* Minimum height requirement for the AISummary component to prevent fluctuations in a card size on the summary action.
|
|
22
21
|
*/
|
|
23
|
-
|
|
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.
|
|
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.
|
|
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",
|