@atlaskit/smart-card 43.31.5 → 43.31.7

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 (54) hide show
  1. package/CHANGELOG.md +13 -0
  2. package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-rovo-chat-action--default.png +2 -2
  3. package/dist/cjs/utils/analytics/analytics.js +1 -1
  4. package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +5 -0
  5. package/dist/cjs/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +9 -2
  6. package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +5 -2
  7. package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +5 -1
  8. package/dist/cjs/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js +50 -3
  9. package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +6 -38
  10. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/index.js +14 -33
  11. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +43 -37
  12. package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -1
  13. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +2 -4
  14. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +4 -8
  15. package/dist/cjs/view/LinkUrl/index.js +1 -1
  16. package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-rovo-chat-action--default.png +2 -2
  17. package/dist/es2019/utils/analytics/analytics.js +1 -1
  18. package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +5 -0
  19. package/dist/es2019/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +9 -2
  20. package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +5 -2
  21. package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +6 -2
  22. package/dist/es2019/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js +31 -0
  23. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +6 -34
  24. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/index.js +11 -29
  25. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +44 -38
  26. package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -1
  27. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +2 -4
  28. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +4 -8
  29. package/dist/es2019/view/LinkUrl/index.js +1 -1
  30. package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-rovo-chat-action--default.png +2 -2
  31. package/dist/esm/utils/analytics/analytics.js +1 -1
  32. package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.compiled.css +5 -0
  33. package/dist/esm/view/FlexibleCard/components/actions/action/action-stack-item/action-button.js +9 -2
  34. package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summarise-action.js +5 -2
  35. package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/ai-summary-action-component.js +6 -2
  36. package/dist/esm/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.js +47 -1
  37. package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +6 -38
  38. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/index.js +13 -32
  39. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +44 -38
  40. package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -1
  41. package/dist/esm/view/HoverCard/components/HoverCardContent.js +2 -4
  42. package/dist/esm/view/HoverCard/components/views/resolved/index.js +4 -8
  43. package/dist/esm/view/LinkUrl/index.js +1 -1
  44. package/dist/types/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.d.ts +3 -0
  45. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +2 -10
  46. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +4 -7
  47. package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
  48. package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +0 -1
  49. package/dist/types-ts4.5/view/FlexibleCard/components/actions/ai-summary-action/copy-summary-action.d.ts +3 -0
  50. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +2 -10
  51. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +4 -7
  52. package/dist/types-ts4.5/view/HoverCard/components/views/resolved/index.d.ts +1 -1
  53. package/dist/types-ts4.5/view/HoverCard/components/views/resolved/types.d.ts +0 -1
  54. package/package.json +3 -4
@@ -1,18 +1,13 @@
1
1
  /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
3
2
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
3
  import "./index.compiled.css";
5
4
  import * as React from 'react';
6
5
  import { ax, ix } from "@compiled/react/runtime";
7
- function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
8
- function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
9
6
  import { useCallback, useMemo, useState } from 'react';
10
7
  import { di } from 'react-magnetic-di';
11
- import { FadeIn, StaggeredEntrance } from '@atlaskit/motion';
12
8
  import { fg } from '@atlaskit/platform-feature-flags';
13
9
  import { InternalActionName, SmartLinkSize } from '../../../../../constants';
14
10
  import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
15
- import useAISummaryAction from '../../../../../state/hooks/use-ai-summary-action';
16
11
  import * as Actions from '../../actions';
17
12
  import { ActionFooter } from './action-footer';
18
13
  var ignoreContainerPaddingStyles = null;
@@ -58,7 +53,6 @@ var ActionBlock = function ActionBlock(_ref) {
58
53
  is3PAuthRovoActionsExperimentOn = _ref.is3PAuthRovoActionsExperimentOn;
59
54
  var context = useFlexibleUiContext();
60
55
  var ui = useFlexibleUiOptionContext();
61
- var url = context === null || context === void 0 ? void 0 : context.url;
62
56
  var isRovoChatActionAvailable = is3PAuthRovoActionsExperimentOn && fg('platform_sl_3p_auth_rovo_action_kill_switch') ? (context === null || context === void 0 || (_context$actions = context.actions) === null || _context$actions === void 0 ? void 0 : _context$actions[InternalActionName.RovoChatAction]) !== undefined : undefined;
63
57
  var _useState = useState(),
64
58
  _useState2 = _slicedToArray(_useState, 2),
@@ -87,14 +81,11 @@ var ActionBlock = function ActionBlock(_ref) {
87
81
  return name !== InternalActionName.RovoChatAction;
88
82
  }) : Object.keys(context.actions);
89
83
  arr.sort(sort);
90
- var renderAction = function renderAction(name, motionStyle) {
84
+ var renderAction = function renderAction(name) {
91
85
  var Action = name in Actions ? Actions[name] : undefined;
92
86
  if (!Action) {
93
87
  return null;
94
88
  }
95
- var style = padding || motionStyle ? _objectSpread(_objectSpread({}, motionStyle || {}), padding && {
96
- paddingInline: padding
97
- }) : undefined;
98
89
  return /*#__PURE__*/React.createElement(Action, {
99
90
  as: "stack-item",
100
91
  spaceInline: spaceInline,
@@ -105,41 +96,18 @@ var ActionBlock = function ActionBlock(_ref) {
105
96
  onError: onError,
106
97
  onLoadingChange: onLoadingChange,
107
98
  size: size || (ui === null || ui === void 0 ? void 0 : ui.size)
108
- // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop, @atlaskit/design-system/no-unsafe-design-token-usage
99
+ // eslint-disable-next-line @atlaskit/ui-styling-standard/enforce-style-prop
109
100
  ,
110
- style: style,
101
+ style: padding && {
102
+ paddingInline: padding
103
+ },
111
104
  hideTooltip: isLoading
112
105
  });
113
106
  };
114
- return isRovoChatActionAvailable ? /*#__PURE__*/React.createElement(StaggeredEntrance, {
115
- columns: 1
116
- }, arr.map(function (name, index) {
117
- return /*#__PURE__*/React.createElement(FadeIn, {
118
- duration: 'large',
119
- key: index
120
- }, function (motion) {
121
- return renderAction(name, motion.style);
122
- });
123
- })) : arr.map(function (name) {
107
+ return arr.map(function (name) {
124
108
  return renderAction(name);
125
109
  });
126
110
  }, [context === null || context === void 0 ? void 0 : context.actions, isRovoChatActionAvailable, spaceInline, onError, onLoadingChange, size, ui === null || ui === void 0 ? void 0 : ui.size, padding, isLoading, _onClick]);
127
- var aiSummaryConfig = fg('platform_sl_3p_auth_rovo_action_kill_switch') ?
128
- // eslint-disable-next-line react-hooks/rules-of-hooks
129
- useAISummaryAction(url !== null && url !== void 0 ? url : '') : undefined;
130
- if (fg('platform_sl_3p_auth_rovo_action_kill_switch')) {
131
- var shouldShowActions = !isRovoChatActionAvailable || isRovoChatActionAvailable && ((aiSummaryConfig === null || aiSummaryConfig === void 0 ? void 0 : aiSummaryConfig.state.status) === 'done' || (aiSummaryConfig === null || aiSummaryConfig === void 0 ? void 0 : aiSummaryConfig.state.status) === 'error');
132
- return actions && shouldShowActions ? /*#__PURE__*/React.createElement("div", {
133
- ref: blockRef,
134
- "data-testid": testId
135
- // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
136
- ,
137
- className: ax(["_1e0c1txw _2lx21bp4 _vchhusvi _16jlkb7n _1bsb129b _18u01ivi _2hwxc10g", className])
138
- }, actions, /*#__PURE__*/React.createElement(ActionFooter, {
139
- message: message,
140
- testId: testId
141
- })) : null;
142
- }
143
111
  return actions ? /*#__PURE__*/React.createElement("div", {
144
112
  ref: blockRef,
145
113
  "data-testid": testId
@@ -1,7 +1,6 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["testId"],
4
- _excluded2 = ["testId", "url"];
3
+ var _excluded = ["is3PAuthRovoActionsExperimentOn", "testId"];
5
4
  import React from 'react';
6
5
  import { InternalActionName, SmartLinkStatus } from '../../../../../constants';
7
6
  import { useFlexibleCardContext, useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
@@ -14,8 +13,9 @@ import AISummaryBlockResolvedView, { RovoSummaryBlockResolvedView } from './reso
14
13
  * @see Block
15
14
  */
16
15
  var AISummaryBlock = function AISummaryBlock(_ref) {
17
- var _context$actions, _props$size, _cardContext$ui;
18
- var _ref$testId = _ref.testId,
16
+ var _context$actions, _props$size2, _cardContext$ui2;
17
+ var is3PAuthRovoActionsExperimentOn = _ref.is3PAuthRovoActionsExperimentOn,
18
+ _ref$testId = _ref.testId,
19
19
  testId = _ref$testId === void 0 ? 'smart-ai-summary-block' : _ref$testId,
20
20
  props = _objectWithoutProperties(_ref, _excluded);
21
21
  var cardContext = useFlexibleCardContext();
@@ -27,37 +27,18 @@ var AISummaryBlock = function AISummaryBlock(_ref) {
27
27
  if (!(actionData !== null && actionData !== void 0 && actionData.url)) {
28
28
  return null;
29
29
  }
30
- return /*#__PURE__*/React.createElement(AISummaryBlockResolvedView, _extends({}, props, {
31
- size: (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : cardContext === null || cardContext === void 0 || (_cardContext$ui = cardContext.ui) === null || _cardContext$ui === void 0 ? void 0 : _cardContext$ui.size,
32
- testId: testId,
33
- url: actionData.url
34
- }));
35
- };
36
-
37
- /**
38
- * Represents an AISummaryBlock, designed to summarising link resource
39
- * content using AI.
40
- * @public
41
- * @param {RovoSummaryBlockProps} RovoSummaryBlock
42
- * @see Block
43
- */
44
- export var RovoSummaryBlock = function RovoSummaryBlock(_ref2) {
45
- var _props$size2, _cardContext$ui2;
46
- var _ref2$testId = _ref2.testId,
47
- testId = _ref2$testId === void 0 ? 'smart-ai-summary-block' : _ref2$testId,
48
- url = _ref2.url,
49
- props = _objectWithoutProperties(_ref2, _excluded2);
50
- var cardContext = useFlexibleCardContext();
51
- if ((cardContext === null || cardContext === void 0 ? void 0 : cardContext.status) !== SmartLinkStatus.Resolved) {
52
- return null;
30
+ if (is3PAuthRovoActionsExperimentOn) {
31
+ var _props$size, _cardContext$ui;
32
+ return /*#__PURE__*/React.createElement(RovoSummaryBlockResolvedView, _extends({}, props, {
33
+ size: (_props$size = props.size) !== null && _props$size !== void 0 ? _props$size : cardContext === null || cardContext === void 0 || (_cardContext$ui = cardContext.ui) === null || _cardContext$ui === void 0 ? void 0 : _cardContext$ui.size,
34
+ testId: testId,
35
+ url: actionData.url
36
+ }));
53
37
  }
54
- if (!url) {
55
- return null;
56
- }
57
- return /*#__PURE__*/React.createElement(RovoSummaryBlockResolvedView, _extends({}, props, {
38
+ return /*#__PURE__*/React.createElement(AISummaryBlockResolvedView, _extends({}, props, {
58
39
  size: (_props$size2 = props.size) !== null && _props$size2 !== void 0 ? _props$size2 : cardContext === null || cardContext === void 0 || (_cardContext$ui2 = cardContext.ui) === null || _cardContext$ui2 === void 0 ? void 0 : _cardContext$ui2.size,
59
40
  testId: testId,
60
- url: url
41
+ url: actionData.url
61
42
  }));
62
43
  };
63
44
  export default AISummaryBlock;
@@ -3,7 +3,7 @@ import _extends from "@babel/runtime/helpers/extends";
3
3
  import "./index.compiled.css";
4
4
  import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
- import { Fragment, useEffect, useRef } from 'react';
6
+ import { Fragment, useRef } from 'react';
7
7
  import { FormattedMessage } from 'react-intl-next';
8
8
  import { di } from 'react-magnetic-di';
9
9
  import { RovoIcon } from '@atlaskit/logo';
@@ -62,29 +62,51 @@ export var RovoSummaryBlockResolvedView = function RovoSummaryBlockResolvedView(
62
62
  var testId = props.testId,
63
63
  _props$aiSummaryMinHe2 = props.aiSummaryMinHeight,
64
64
  aiSummaryMinHeight = _props$aiSummaryMinHe2 === void 0 ? 0 : _props$aiSummaryMinHe2,
65
+ placeholder = props.placeholder,
65
66
  url = props.url;
66
67
  var _useAISummaryAction2 = useAISummaryAction(url),
67
68
  _useAISummaryAction2$ = _useAISummaryAction2.state,
68
69
  content = _useAISummaryAction2$.content,
69
- status = _useAISummaryAction2$.status,
70
- summariseUrl = _useAISummaryAction2.summariseUrl;
71
- var showAISummary = status === 'done' ||
72
- // We want to display the AI Summary component only when there is content available during the loading process.
73
- status === 'loading' && !!content;
70
+ status = _useAISummaryAction2$.status;
74
71
  var isSummarisedOnMountRef = useRef(status === 'done');
75
- useEffect(function () {
76
- if (status !== 'ready' || isSummarisedOnMountRef.current) {
77
- return;
78
- }
79
- isSummarisedOnMountRef.current = true;
80
- summariseUrl();
81
- }, [status, summariseUrl]);
82
72
  var minHeight = isSummarisedOnMountRef.current ? 0 : aiSummaryMinHeight;
83
73
  if (status === 'error') {
84
74
  return null;
85
75
  }
86
- if (!showAISummary) {
87
- return /*#__PURE__*/React.createElement(Inline, {
76
+
77
+ // Show summary when there is content to display
78
+ if (content && content !== '') {
79
+ return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
80
+ direction: SmartLinkDirection.Vertical,
81
+ testId: "".concat(testId, "-resolved-view"),
82
+ className: ax(["_1reoewfl _18m9ewfl"])
83
+ }), /*#__PURE__*/React.createElement(Inline, {
84
+ xcss: newStyles.summaryWrapper
85
+ }, /*#__PURE__*/React.createElement("div", {
86
+ className: ax([newStyles.iconWrapper])
87
+ }, /*#__PURE__*/React.createElement(RovoIcon, {
88
+ shouldUseHexLogo: true,
89
+ size: "xxsmall"
90
+ })), status === 'done' && /*#__PURE__*/React.createElement(AIEventSummaryViewed, {
91
+ fromCache: isSummarisedOnMountRef.current
92
+ }), /*#__PURE__*/React.createElement(MotionWrapper, {
93
+ minHeight: minHeight,
94
+ show: true,
95
+ showTransition: !isSummarisedOnMountRef.current
96
+ }, /*#__PURE__*/React.createElement(AISummary, {
97
+ testId: "".concat(testId, "-ai-summary"),
98
+ minHeight: minHeight,
99
+ content: content
100
+ }), status === 'done' && /*#__PURE__*/React.createElement(AIFooter, null))));
101
+ }
102
+
103
+ // Show loading state on initial request where content hasn't returned yet.
104
+ if (status === 'loading') {
105
+ return /*#__PURE__*/React.createElement(MotionWrapper, {
106
+ minHeight: minHeight,
107
+ show: true,
108
+ showTransition: true
109
+ }, /*#__PURE__*/React.createElement(Inline, {
88
110
  testId: "".concat(testId, "-placeholder"),
89
111
  xcss: newStyles.placeholderWrapper
90
112
  }, /*#__PURE__*/React.createElement("div", {
@@ -99,29 +121,13 @@ export var RovoSummaryBlockResolvedView = function RovoSummaryBlockResolvedView(
99
121
  xcss: newStyles.ellipsesContainer
100
122
  }, /*#__PURE__*/React.createElement(EllipsesAnimation, {
101
123
  isAnimated: true
102
- })));
124
+ }))));
103
125
  }
104
- return /*#__PURE__*/React.createElement(Block, _extends({}, props, {
105
- direction: SmartLinkDirection.Vertical,
106
- testId: "".concat(testId, "-resolved-view"),
107
- className: ax(["_1reoewfl _18m9ewfl"])
108
- }), /*#__PURE__*/React.createElement(Inline, {
109
- xcss: newStyles.summaryWrapper
110
- }, /*#__PURE__*/React.createElement("div", {
111
- className: ax([newStyles.iconWrapper])
112
- }, /*#__PURE__*/React.createElement(RovoIcon, {
113
- shouldUseHexLogo: true,
114
- size: 'xxsmall'
115
- })), status === 'done' && /*#__PURE__*/React.createElement(AIEventSummaryViewed, {
116
- fromCache: isSummarisedOnMountRef.current
117
- }), /*#__PURE__*/React.createElement(MotionWrapper, {
118
- minHeight: minHeight,
119
- show: showAISummary,
120
- showTransition: !isSummarisedOnMountRef.current
121
- }, /*#__PURE__*/React.createElement(AISummary, {
122
- testId: "".concat(testId, "-ai-summary"),
123
- minHeight: minHeight,
124
- content: content
125
- }), status === 'done' && /*#__PURE__*/React.createElement(AIFooter, null))));
126
+
127
+ // Otherwise, show placeholder if provided
128
+ if (placeholder) {
129
+ return /*#__PURE__*/React.createElement(Fragment, null, placeholder);
130
+ }
131
+ return null;
126
132
  };
127
133
  export default AISummaryBlockResolvedView;
@@ -16,7 +16,7 @@ import Block from '../block';
16
16
  * Allowed footer actions for HoverCard, in display order. Fetched from context.
17
17
  * @featureGate platform_sl_3p_auth_rovo_action_kill_switch
18
18
  */
19
- var HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [InternalActionName.AISummaryAction, InternalActionName.RovoChatAction];
19
+ var HIDDEN_HOVER_CARD_FOOTER_ACTIONS = [InternalActionName.RovoChatAction];
20
20
  var ignoreContainerMarginStyles = null;
21
21
  var elevatedFooterStyles = null;
22
22
  var providerStyles = null;
@@ -244,8 +244,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
244
244
  flexibleCardProps: flexibleCardProps,
245
245
  isAISummaryEnabled: isAISummaryEnabled,
246
246
  onActionClick: onActionClick,
247
- titleBlockProps: titleBlockProps,
248
- url: url
247
+ titleBlockProps: titleBlockProps
249
248
  }));
250
249
  }
251
250
  return null;
@@ -297,8 +296,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
297
296
  flexibleCardProps: flexibleCardProps,
298
297
  isAISummaryEnabled: isAISummaryEnabled,
299
298
  onActionClick: onActionClick,
300
- titleBlockProps: titleBlockProps,
301
- url: url
299
+ titleBlockProps: titleBlockProps
302
300
  }));
303
301
  }
304
302
  return null;
@@ -11,7 +11,6 @@ import { succeedUfoExperience } from '../../../../../state/analytics';
11
11
  import useAISummaryAction from '../../../../../state/hooks/use-ai-summary-action';
12
12
  import FlexibleCard from '../../../../FlexibleCard';
13
13
  import { ActionBlock, AIFooterBlock, AISummaryBlock, ResolvedHoverCardFooterBlock, MetadataBlock, SnippetBlock, TitleBlock } from '../../../../FlexibleCard/components/blocks';
14
- import { RovoSummaryBlock } from '../../../../FlexibleCard/components/blocks/ai-summary-block';
15
14
  import { getMetadata } from '../../../utils';
16
15
  import ImagePreview from '../../ImagePreview';
17
16
  var hiddenSnippetStyles = null;
@@ -27,8 +26,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
27
26
  onActionClick = _ref.onActionClick,
28
27
  showRovoResolvedView = _ref.showRovoResolvedView,
29
28
  titleBlockProps = _ref.titleBlockProps,
30
- id = _ref.id,
31
- url = _ref.url;
29
+ id = _ref.id;
32
30
  var _useAnalyticsEvents = useAnalyticsEvents(),
33
31
  fireEvent = _useAnalyticsEvents.fireEvent;
34
32
 
@@ -79,12 +77,10 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
79
77
  secondary: secondary,
80
78
  maxLines: 1,
81
79
  size: SmartLinkSize.Medium
82
- }), is3PAuthRovoActionsExperimentOn ? /*#__PURE__*/React.createElement(RovoSummaryBlock, {
80
+ }), isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, {
83
81
  aiSummaryMinHeight: aiSummaryMinHeight,
84
- url: url
85
- }) : isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, {
86
- aiSummaryMinHeight: aiSummaryMinHeight,
87
- placeholder: snippet
82
+ placeholder: snippet,
83
+ is3PAuthRovoActionsExperimentOn: is3PAuthRovoActionsExperimentOn
88
84
  }) : snippet, /*#__PURE__*/React.createElement(SnippetBlock, {
89
85
  testId: "hidden-snippet",
90
86
  onRender: onSnippetRender,
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
15
15
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
16
16
  var PACKAGE_DATA = {
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "43.31.4",
18
+ packageVersion: "43.31.6",
19
19
  componentName: 'linkUrl'
20
20
  };
21
21
  var Anchor = withLinkClickedEvent('a');
@@ -4,3 +4,6 @@ import type { AISummaryActionProps } from './types';
4
4
  export declare function CopySummaryAction({ url, onClick: onClickCallback, testId, content, ...props }: AISummaryActionProps & AISummaryActionData & {
5
5
  content: string;
6
6
  }): React.JSX.Element;
7
+ export declare function CopySummaryActionNew({ url, onClick: onClickCallback, summary, testId, ...props }: AISummaryActionProps & AISummaryActionData & {
8
+ summary?: string;
9
+ }): React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type AISummaryBlockProps, type RovoSummaryBlockProps } from './types';
2
+ import { type AISummaryBlockProps } from './types';
3
3
  /**
4
4
  * Represents an AISummaryBlock, designed to summarising link resource
5
5
  * content using AI.
@@ -7,13 +7,5 @@ import { type AISummaryBlockProps, type RovoSummaryBlockProps } from './types';
7
7
  * @param {AISummaryBlockProps} AISummaryBlock
8
8
  * @see Block
9
9
  */
10
- declare const AISummaryBlock: ({ testId, ...props }: AISummaryBlockProps) => React.JSX.Element | null;
11
- /**
12
- * Represents an AISummaryBlock, designed to summarising link resource
13
- * content using AI.
14
- * @public
15
- * @param {RovoSummaryBlockProps} RovoSummaryBlock
16
- * @see Block
17
- */
18
- export declare const RovoSummaryBlock: ({ testId, url, ...props }: RovoSummaryBlockProps) => React.JSX.Element | null;
10
+ declare const AISummaryBlock: ({ is3PAuthRovoActionsExperimentOn, testId, ...props }: AISummaryBlockProps) => React.JSX.Element | null;
19
11
  export default AISummaryBlock;
@@ -6,14 +6,11 @@ export type AISummaryBlockProps = {
6
6
  */
7
7
  aiSummaryMinHeight?: number;
8
8
  /**
9
- * Placeholder to show when summary is not available
9
+ * Whether platform_sl_3p_auth_rovo_action experiment value is ON for current runtime
10
10
  */
11
- placeholder?: ReactNode;
12
- } & BlockProps;
13
- export type RovoSummaryBlockProps = {
11
+ is3PAuthRovoActionsExperimentOn?: boolean;
14
12
  /**
15
- * Minimum height requirement for the AISummary component to prevent fluctuations in a card size on the summary action.
13
+ * Placeholder to show when summary is not available
16
14
  */
17
- aiSummaryMinHeight?: number;
18
- url?: string;
15
+ placeholder?: ReactNode;
19
16
  } & BlockProps;
@@ -1,3 +1,3 @@
1
1
  import { type HoverCardResolvedProps } from './types';
2
- declare const HoverCardResolvedView: ({ cardState, extensionKey, flexibleCardProps, isAISummaryEnabled, onActionClick, showRovoResolvedView, titleBlockProps, id, url, }: HoverCardResolvedProps) => JSX.Element;
2
+ declare const HoverCardResolvedView: ({ cardState, extensionKey, flexibleCardProps, isAISummaryEnabled, onActionClick, showRovoResolvedView, titleBlockProps, id, }: HoverCardResolvedProps) => JSX.Element;
3
3
  export default HoverCardResolvedView;
@@ -12,5 +12,4 @@ export type HoverCardResolvedProps = {
12
12
  isAISummaryEnabled?: boolean;
13
13
  onActionClick: (actionId: string | ActionName) => void;
14
14
  showRovoResolvedView?: boolean;
15
- url: string;
16
15
  } & HoverCardLoadingViewProps;
@@ -4,3 +4,6 @@ import type { AISummaryActionProps } from './types';
4
4
  export declare function CopySummaryAction({ url, onClick: onClickCallback, testId, content, ...props }: AISummaryActionProps & AISummaryActionData & {
5
5
  content: string;
6
6
  }): React.JSX.Element;
7
+ export declare function CopySummaryActionNew({ url, onClick: onClickCallback, summary, testId, ...props }: AISummaryActionProps & AISummaryActionData & {
8
+ summary?: string;
9
+ }): React.JSX.Element;
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { type AISummaryBlockProps, type RovoSummaryBlockProps } from './types';
2
+ import { type AISummaryBlockProps } from './types';
3
3
  /**
4
4
  * Represents an AISummaryBlock, designed to summarising link resource
5
5
  * content using AI.
@@ -7,13 +7,5 @@ import { type AISummaryBlockProps, type RovoSummaryBlockProps } from './types';
7
7
  * @param {AISummaryBlockProps} AISummaryBlock
8
8
  * @see Block
9
9
  */
10
- declare const AISummaryBlock: ({ testId, ...props }: AISummaryBlockProps) => React.JSX.Element | null;
11
- /**
12
- * Represents an AISummaryBlock, designed to summarising link resource
13
- * content using AI.
14
- * @public
15
- * @param {RovoSummaryBlockProps} RovoSummaryBlock
16
- * @see Block
17
- */
18
- export declare const RovoSummaryBlock: ({ testId, url, ...props }: RovoSummaryBlockProps) => React.JSX.Element | null;
10
+ declare const AISummaryBlock: ({ is3PAuthRovoActionsExperimentOn, testId, ...props }: AISummaryBlockProps) => React.JSX.Element | null;
19
11
  export default AISummaryBlock;
@@ -6,14 +6,11 @@ export type AISummaryBlockProps = {
6
6
  */
7
7
  aiSummaryMinHeight?: number;
8
8
  /**
9
- * Placeholder to show when summary is not available
9
+ * Whether platform_sl_3p_auth_rovo_action experiment value is ON for current runtime
10
10
  */
11
- placeholder?: ReactNode;
12
- } & BlockProps;
13
- export type RovoSummaryBlockProps = {
11
+ is3PAuthRovoActionsExperimentOn?: boolean;
14
12
  /**
15
- * Minimum height requirement for the AISummary component to prevent fluctuations in a card size on the summary action.
13
+ * Placeholder to show when summary is not available
16
14
  */
17
- aiSummaryMinHeight?: number;
18
- url?: string;
15
+ placeholder?: ReactNode;
19
16
  } & BlockProps;
@@ -1,3 +1,3 @@
1
1
  import { type HoverCardResolvedProps } from './types';
2
- declare const HoverCardResolvedView: ({ cardState, extensionKey, flexibleCardProps, isAISummaryEnabled, onActionClick, showRovoResolvedView, titleBlockProps, id, url, }: HoverCardResolvedProps) => JSX.Element;
2
+ declare const HoverCardResolvedView: ({ cardState, extensionKey, flexibleCardProps, isAISummaryEnabled, onActionClick, showRovoResolvedView, titleBlockProps, id, }: HoverCardResolvedProps) => JSX.Element;
3
3
  export default HoverCardResolvedView;
@@ -12,5 +12,4 @@ export type HoverCardResolvedProps = {
12
12
  isAISummaryEnabled?: boolean;
13
13
  onActionClick: (actionId: string | ActionName) => void;
14
14
  showRovoResolvedView?: boolean;
15
- url: string;
16
15
  } & HoverCardLoadingViewProps;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "43.31.5",
3
+ "version": "43.31.7",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -65,10 +65,9 @@
65
65
  "@atlaskit/linking-common": "^9.11.0",
66
66
  "@atlaskit/linking-types": "^14.2.0",
67
67
  "@atlaskit/logo": "^20.0.0",
68
- "@atlaskit/lozenge": "^13.5.0",
68
+ "@atlaskit/lozenge": "^13.6.0",
69
69
  "@atlaskit/menu": "^8.4.0",
70
70
  "@atlaskit/modal-dialog": "^14.15.0",
71
- "@atlaskit/motion": "^5.5.0",
72
71
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
73
72
  "@atlaskit/platform-feature-flags": "^1.1.0",
74
73
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
@@ -84,7 +83,7 @@
84
83
  "@atlaskit/textfield": "^8.3.0",
85
84
  "@atlaskit/theme": "^23.0.0",
86
85
  "@atlaskit/tile": "^1.0.0",
87
- "@atlaskit/tmp-editor-statsig": "^55.1.0",
86
+ "@atlaskit/tmp-editor-statsig": "^56.1.0",
88
87
  "@atlaskit/tokens": "^12.0.0",
89
88
  "@atlaskit/tooltip": "^21.1.0",
90
89
  "@atlaskit/ufo": "^0.4.0",