@atlaskit/smart-card 26.49.0 → 26.49.2
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 +13 -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/FlexibleCard/components/blocks/block/index.js +1 -4
- package/dist/cjs/view/FlexibleCard/components/blocks/element-group/index.js +8 -9
- package/dist/cjs/view/HoverCard/components/ContentContainer.js +39 -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-prism/index.js +0 -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/FlexibleCard/components/blocks/block/index.js +1 -1
- package/dist/es2019/view/FlexibleCard/components/blocks/element-group/index.js +0 -1
- 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-prism/index.js +0 -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/FlexibleCard/components/blocks/block/index.js +1 -1
- package/dist/esm/view/FlexibleCard/components/blocks/element-group/index.js +0 -1
- 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-prism/index.js +0 -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/BlockCard/views/flexible/unresolved-view/index.d.ts +2 -2
- package/dist/types/view/BlockCard/views/flexible/unresolved-view/types.d.ts +3 -2
- package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/ai-event-error-viewed/index.d.ts +1 -2
- 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/FlexibleCard/components/blocks/block/index.d.ts +2 -3
- package/dist/types/view/FlexibleCard/components/blocks/element-group/index.d.ts +2 -3
- package/dist/types/view/FlexibleCard/components/blocks/element-group/types.d.ts +3 -2
- package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +3 -3
- package/dist/types/view/FlexibleCard/components/container/hover-card-control/index.d.ts +2 -2
- package/dist/types/view/FlexibleCard/components/container/hover-card-control/types.d.ts +3 -2
- package/dist/types/view/FlexibleCard/components/container/index.d.ts +2 -4
- package/dist/types/view/FlexibleCard/components/container/types.d.ts +3 -2
- package/dist/types/view/HoverCard/components/ContentContainer.d.ts +3 -2
- 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-prism/index.d.ts +3 -2
- package/dist/types/view/common/ai-prism/types.d.ts +3 -2
- 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/BlockCard/views/flexible/unresolved-view/index.d.ts +2 -2
- package/dist/types-ts4.5/view/BlockCard/views/flexible/unresolved-view/types.d.ts +3 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/ai-event-error-viewed/index.d.ts +1 -2
- 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/FlexibleCard/components/blocks/block/index.d.ts +2 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/element-group/index.d.ts +2 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/element-group/types.d.ts +3 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/blocks/types.d.ts +3 -3
- package/dist/types-ts4.5/view/FlexibleCard/components/container/hover-card-control/index.d.ts +2 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/container/hover-card-control/types.d.ts +3 -2
- package/dist/types-ts4.5/view/FlexibleCard/components/container/index.d.ts +2 -4
- package/dist/types-ts4.5/view/FlexibleCard/components/container/types.d.ts +3 -2
- package/dist/types-ts4.5/view/HoverCard/components/ContentContainer.d.ts +3 -2
- 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-prism/index.d.ts +3 -2
- package/dist/types-ts4.5/view/common/ai-prism/types.d.ts +3 -2
- package/dist/types-ts4.5/view/common/ai-summary/index.d.ts +4 -0
- package/package.json +5 -5
|
@@ -1,6 +1,4 @@
|
|
|
1
|
-
|
|
2
|
-
import React from 'react';
|
|
3
|
-
import { SerializedStyles } from '@emotion/react';
|
|
1
|
+
import { jsx, SerializedStyles } from '@emotion/react';
|
|
4
2
|
import { SmartLinkSize } from '../../../../constants';
|
|
5
3
|
import { ChildrenOptions, ContainerProps } from './types';
|
|
6
4
|
export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: boolean, hideElevation: boolean, hidePadding: boolean, clickableContainer: boolean, childrenOptions: ChildrenOptions) => SerializedStyles;
|
|
@@ -12,5 +10,5 @@ export declare const getContainerStyles: (size: SmartLinkSize, hideBackground: b
|
|
|
12
10
|
* @internal
|
|
13
11
|
* @see Block
|
|
14
12
|
*/
|
|
15
|
-
declare const Container:
|
|
13
|
+
declare const Container: ({ children, clickableContainer, hideBackground, hideElevation, hideHoverCardPreviewButton, hidePadding, onClick, retry, showAuthTooltip, showHoverPreview, actionOptions, size, status, testId, theme, }: ContainerProps) => jsx.JSX.Element;
|
|
16
14
|
export default Container;
|
|
@@ -1,6 +1,7 @@
|
|
|
1
|
+
import { PropsWithChildren } from 'react';
|
|
1
2
|
import { SmartLinkStatus } from '../../../../constants';
|
|
2
3
|
import { FlexibleCardProps, FlexibleUiOptions, RetryOptions } from '../../types';
|
|
3
|
-
export type ContainerProps = Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'actionOptions' | 'showAuthTooltip'> & FlexibleUiOptions & {
|
|
4
|
+
export type ContainerProps = PropsWithChildren<Pick<FlexibleCardProps, 'onClick' | 'showHoverPreview' | 'actionOptions' | 'showAuthTooltip'> & FlexibleUiOptions & {
|
|
4
5
|
/**
|
|
5
6
|
* The options that determine the retry behaviour when a Smart Link errors.
|
|
6
7
|
*/
|
|
@@ -16,7 +17,7 @@ export type ContainerProps = Pick<FlexibleCardProps, 'onClick' | 'showHoverPrevi
|
|
|
16
17
|
* serving as a hook for automated tests
|
|
17
18
|
*/
|
|
18
19
|
testId?: string;
|
|
19
|
-
}
|
|
20
|
+
}>;
|
|
20
21
|
export type ChildrenOptions = {
|
|
21
22
|
previewOnLeft?: boolean;
|
|
22
23
|
previewOnRight?: boolean;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
import type { ContentContainerProps } from '../types';
|
|
3
|
-
declare const ContentContainer:
|
|
4
|
+
declare const ContentContainer: ({ children, isAIEnabled, testId, url, ...props }: ContentContainerProps) => jsx.JSX.Element;
|
|
4
5
|
export default ContentContainer;
|
|
@@ -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;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import { jsx } from '@emotion/react';
|
|
2
3
|
import type { AIPrismProps } from './types';
|
|
3
|
-
declare const AIPrism:
|
|
4
|
+
declare const AIPrism: ({ children, isGlowing, isMoving, isVisible, testId, }: AIPrismProps) => jsx.JSX.Element;
|
|
4
5
|
export default AIPrism;
|
|
@@ -1,7 +1,8 @@
|
|
|
1
|
+
import { type PropsWithChildren } from 'react';
|
|
1
2
|
import { AIGlowingBorderProps } from './ai-glowing-border/types';
|
|
2
|
-
export type AIPrismProps = Pick<AIGlowingBorderProps, 'isMoving' | 'isGlowing' | 'testId'> & {
|
|
3
|
+
export type AIPrismProps = PropsWithChildren<Pick<AIGlowingBorderProps, 'isMoving' | 'isGlowing' | 'testId'> & {
|
|
3
4
|
isVisible?: boolean;
|
|
4
|
-
}
|
|
5
|
+
}>;
|
|
5
6
|
export type AIBorderPalette = {
|
|
6
7
|
blue: string;
|
|
7
8
|
yellow: string;
|
|
@@ -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.2",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -34,7 +34,7 @@
|
|
|
34
34
|
"@atlaskit/avatar-group": "^9.5.0",
|
|
35
35
|
"@atlaskit/badge": "^15.2.0",
|
|
36
36
|
"@atlaskit/button": "^17.7.0",
|
|
37
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
37
|
+
"@atlaskit/dropdown-menu": "^12.8.0",
|
|
38
38
|
"@atlaskit/icon": "^22.1.0",
|
|
39
39
|
"@atlaskit/icon-file-type": "^6.4.0",
|
|
40
40
|
"@atlaskit/icon-object": "^6.3.0",
|
|
@@ -51,10 +51,10 @@
|
|
|
51
51
|
"@atlaskit/outbound-auth-flow-client": "^3.4.0",
|
|
52
52
|
"@atlaskit/platform-feature-flags": "^0.2.1",
|
|
53
53
|
"@atlaskit/popup": "^1.13.0",
|
|
54
|
-
"@atlaskit/primitives": "^4.
|
|
54
|
+
"@atlaskit/primitives": "^4.1.0",
|
|
55
55
|
"@atlaskit/spinner": "^16.0.0",
|
|
56
56
|
"@atlaskit/theme": "^12.6.0",
|
|
57
|
-
"@atlaskit/tokens": "^1.
|
|
57
|
+
"@atlaskit/tokens": "^1.41.0",
|
|
58
58
|
"@atlaskit/tooltip": "^18.1.0",
|
|
59
59
|
"@atlaskit/ufo": "^0.2.0",
|
|
60
60
|
"@babel/runtime": "^7.0.0",
|
|
@@ -83,7 +83,7 @@
|
|
|
83
83
|
"@af/integration-testing": "*",
|
|
84
84
|
"@af/visual-regression": "*",
|
|
85
85
|
"@atlaskit/analytics-listeners": "^8.9.0",
|
|
86
|
-
"@atlaskit/css-reset": "^6.
|
|
86
|
+
"@atlaskit/css-reset": "^6.7.0",
|
|
87
87
|
"@atlaskit/link-test-helpers": "^6.2.0",
|
|
88
88
|
"@atlaskit/media-test-helpers": "^33.0.0",
|
|
89
89
|
"@atlaskit/ssr": "*",
|