@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.
- package/CHANGELOG.md +13 -0
- package/dist/cjs/__tests_external__/page-objects/BaseCard.js +1 -1
- package/dist/cjs/__tests_external__/page-objects/BlockCard.js +1 -1
- package/dist/cjs/__tests_external__/page-objects/EmbedCard.js +1 -1
- package/dist/cjs/__tests_external__/page-objects/InlineCard.js +1 -1
- package/dist/cjs/ssr.js +2 -2
- 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/state/hooks/use-invoke-client-action/index.js +2 -2
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/utils/flexible.js +2 -2
- package/dist/cjs/utils/index.js +2 -2
- package/dist/cjs/utils/mocks.js +1 -1
- package/dist/cjs/view/BlockCard/components/ActionList.js +2 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleErroredView.js +2 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleForbiddenView.js +2 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleNotFoundView.js +2 -2
- package/dist/cjs/view/BlockCard/views/flexible/FlexibleResolvedView.js +2 -2
- package/dist/cjs/view/Card/index.js +1 -1
- package/dist/cjs/view/CardWithData/component.js +1 -1
- package/dist/cjs/view/CardWithData/loader.js +3 -3
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyIntersectionObserverCard.js +2 -2
- package/dist/cjs/view/CardWithUrl/component-lazy/LazyLazilyRenderCard.js +2 -2
- package/dist/cjs/view/CardWithUrl/component.js +2 -2
- package/dist/cjs/view/CardWithUrl/loader.js +2 -2
- package/dist/cjs/view/EmbedCard/EmbedResizeMessageListener.js +1 -1
- package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +22 -3
- package/dist/cjs/view/EmbedCard/components/Frame.js +2 -2
- package/dist/cjs/view/EmbedCard/components/styled.js +103 -23
- package/dist/cjs/view/EmbedCard/views/forbidden-view/index.js +2 -2
- package/dist/cjs/view/EmbedCard/views/not-found-view/index.js +2 -2
- package/dist/cjs/view/EmbedCard/views/unauthorized-view/index.js +2 -2
- package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +2 -2
- package/dist/cjs/view/EmbedModal/components/analytics/index.js +2 -2
- package/dist/cjs/view/EmbedModal/components/error-boundary/index.js +2 -2
- package/dist/cjs/view/EmbedModal/components/link-info/index.js +2 -2
- package/dist/cjs/view/EmbedModal/index.js +2 -2
- package/dist/cjs/view/EmbedModal/utils.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/action-button/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/actions/action/server-action/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/actions/utils.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/ai-state-indicator/ai-indicator-tooltip.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +39 -31
- package/dist/cjs/view/FlexibleCard/components/blocks/block/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/preview-block/resolved/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/related-url-item/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/related-urls-block/resolved/related-url-list/resolved-result-stack/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/title-block/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/common/atlaskit-icon/index.js +2 -5
- package/dist/cjs/view/FlexibleCard/components/container/hover-card-control/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/container/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/avatar-group/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/icon/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/link/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/error-boundary/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/lozenge/lozenge-action/lozenge-action-item/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/preview/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/snippet-element/index.js +2 -2
- package/dist/cjs/view/FlexibleCard/components/elements/utils.js +2 -2
- package/dist/cjs/view/FlexibleCard/index.js +2 -2
- package/dist/cjs/view/HoverCard/components/ContentContainer.js +42 -13
- package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +2 -2
- package/dist/cjs/view/HoverCard/components/HoverCardContent.js +3 -12
- package/dist/cjs/view/HoverCard/components/ImagePreview.js +2 -2
- package/dist/cjs/view/HoverCard/components/views/resolved/index.js +65 -18
- package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +2 -2
- package/dist/cjs/view/InlineCard/ErroredView/index.js +1 -1
- package/dist/cjs/view/InlineCard/ForbiddenView/index.js +1 -1
- package/dist/cjs/view/InlineCard/Frame/index.js +2 -2
- package/dist/cjs/view/InlineCard/IconAndTitleLayout/index.js +1 -1
- package/dist/cjs/view/InlineCard/ResolvedView/index.js +1 -1
- package/dist/cjs/view/InlineCard/ResolvingView/index.js +1 -1
- package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +1 -1
- package/dist/cjs/view/InlineCard/index.js +2 -2
- package/dist/cjs/view/LinkUrl/LinkWarningModal/index.js +2 -2
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/LinkView/index.js +1 -1
- package/dist/cjs/view/common/UnauthorisedViewContent.js +2 -2
- package/dist/cjs/view/common/ai-prism/ai-glowing-border/animated-svg-container.js +2 -2
- 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/EmbedCard/components/ExpandedFrame.js +21 -4
- package/dist/es2019/view/EmbedCard/components/styled.js +99 -111
- package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +33 -26
- package/dist/es2019/view/FlexibleCard/components/common/atlaskit-icon/index.js +0 -3
- 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/__tests_external__/page-objects/BaseCard.js +1 -1
- package/dist/esm/__tests_external__/page-objects/BlockCard.js +1 -1
- package/dist/esm/__tests_external__/page-objects/EmbedCard.js +1 -1
- package/dist/esm/__tests_external__/page-objects/InlineCard.js +1 -1
- 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/utils/mocks.js +1 -1
- package/dist/esm/view/Card/index.js +1 -1
- package/dist/esm/view/CardWithData/component.js +1 -1
- package/dist/esm/view/CardWithData/loader.js +1 -1
- package/dist/esm/view/EmbedCard/EmbedResizeMessageListener.js +1 -1
- package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +23 -4
- package/dist/esm/view/EmbedCard/components/styled.js +100 -20
- package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +38 -30
- package/dist/esm/view/FlexibleCard/components/common/atlaskit-icon/index.js +0 -3
- 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/InlineCard/ErroredView/index.js +1 -1
- package/dist/esm/view/InlineCard/ForbiddenView/index.js +1 -1
- package/dist/esm/view/InlineCard/IconAndTitleLayout/index.js +1 -1
- package/dist/esm/view/InlineCard/ResolvedView/index.js +1 -1
- package/dist/esm/view/InlineCard/ResolvingView/index.js +1 -1
- package/dist/esm/view/InlineCard/UnauthorisedView/index.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/LinkView/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/EmbedCard/components/styled.d.ts +5 -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/EmbedCard/components/styled.d.ts +5 -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 +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() {
|
|
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.
|
|
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() {
|
|
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
|
-
|
|
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:
|
|
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
|
-
}
|
|
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 {
|
|
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:
|
|
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
|
-
*
|
|
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.
|
|
@@ -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:
|
|
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
|
-
}
|
|
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 {
|
|
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:
|
|
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
|
-
*
|
|
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.
|
|
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",
|
|
@@ -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"
|