@atlaskit/smart-card 45.6.8 → 45.6.10

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 (59) hide show
  1. package/CHANGELOG.md +16 -0
  2. package/dist/cjs/messages.js +45 -40
  3. package/dist/cjs/utils/analytics/analytics.js +1 -1
  4. package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +52 -0
  5. package/dist/cjs/view/EmbedCard/components/carousel/CarouselSlide.js +124 -0
  6. package/dist/cjs/view/EmbedCard/components/carousel/index.compiled.css +12 -0
  7. package/dist/cjs/view/EmbedCard/components/carousel/index.js +122 -0
  8. package/dist/cjs/view/EmbedCard/components/carousel/types.js +5 -0
  9. package/dist/cjs/view/FlexibleCard/components/actions/rovo-chat-action/index.js +1 -2
  10. package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +4 -8
  11. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/index.js +5 -16
  12. package/dist/cjs/view/HoverCard/components/HoverCardContent.js +7 -30
  13. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +2 -11
  14. package/dist/cjs/view/LinkUrl/index.js +1 -1
  15. package/dist/cjs/view/common/rovo-chat-utils/index.js +4 -68
  16. package/dist/es2019/messages.js +45 -40
  17. package/dist/es2019/utils/analytics/analytics.js +1 -1
  18. package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +52 -0
  19. package/dist/es2019/view/EmbedCard/components/carousel/CarouselSlide.js +114 -0
  20. package/dist/es2019/view/EmbedCard/components/carousel/index.compiled.css +12 -0
  21. package/dist/es2019/view/EmbedCard/components/carousel/index.js +101 -0
  22. package/dist/es2019/view/EmbedCard/components/carousel/types.js +1 -0
  23. package/dist/es2019/view/FlexibleCard/components/actions/rovo-chat-action/index.js +2 -3
  24. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +3 -7
  25. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/index.js +3 -12
  26. package/dist/es2019/view/HoverCard/components/HoverCardContent.js +7 -30
  27. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +3 -12
  28. package/dist/es2019/view/LinkUrl/index.js +1 -1
  29. package/dist/es2019/view/common/rovo-chat-utils/index.js +4 -68
  30. package/dist/esm/messages.js +45 -40
  31. package/dist/esm/utils/analytics/analytics.js +1 -1
  32. package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.compiled.css +52 -0
  33. package/dist/esm/view/EmbedCard/components/carousel/CarouselSlide.js +117 -0
  34. package/dist/esm/view/EmbedCard/components/carousel/index.compiled.css +12 -0
  35. package/dist/esm/view/EmbedCard/components/carousel/index.js +113 -0
  36. package/dist/esm/view/EmbedCard/components/carousel/types.js +1 -0
  37. package/dist/esm/view/FlexibleCard/components/actions/rovo-chat-action/index.js +2 -3
  38. package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +4 -8
  39. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/index.js +5 -14
  40. package/dist/esm/view/HoverCard/components/HoverCardContent.js +7 -30
  41. package/dist/esm/view/HoverCard/components/views/resolved/index.js +3 -12
  42. package/dist/esm/view/LinkUrl/index.js +1 -1
  43. package/dist/esm/view/common/rovo-chat-utils/index.js +4 -68
  44. package/dist/types/messages.d.ts +2 -2
  45. package/dist/types/view/EmbedCard/components/carousel/CarouselSlide.d.ts +39 -0
  46. package/dist/types/view/EmbedCard/components/carousel/index.d.ts +22 -0
  47. package/dist/types/view/EmbedCard/components/carousel/types.d.ts +26 -0
  48. package/dist/types/view/FlexibleCard/components/actions/rovo-chat-action/index.d.ts +1 -1
  49. package/dist/types/view/FlexibleCard/components/blocks/action-block/index.d.ts +1 -1
  50. package/dist/types/view/FlexibleCard/components/blocks/action-block/types.d.ts +0 -4
  51. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +1 -1
  52. package/dist/types/view/HoverCard/components/views/resolved/index.d.ts +1 -1
  53. package/dist/types/view/HoverCard/components/views/resolved/types.d.ts +0 -1
  54. package/dist/types/view/HoverCard/types.d.ts +0 -1
  55. package/dist/types/view/common/rovo-chat-utils/index.d.ts +0 -3
  56. package/package.json +2 -2
  57. package/dist/cjs/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +0 -3
  58. package/dist/es2019/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +0 -3
  59. package/dist/esm/__tests__/vr-tests/__snapshots__/hover-card/hover-card-with-google-rovo-chat-action--default.png +0 -3
@@ -14,10 +14,8 @@ var _linkProvider = require("@atlaskit/link-provider");
14
14
  var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
15
  var _platformFeatureFlagsReact = require("@atlaskit/platform-feature-flags-react");
16
16
  var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
17
- var _expValEqualsNoExposure = require("@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure");
18
17
  var _useAnalyticsEvents2 = require("../../../common/analytics/generated/use-analytics-events");
19
18
  var _constants = require("../../../constants");
20
- var _extractRovoChatAction = _interopRequireDefault(require("../../../extractors/flexible/actions/extract-rovo-chat-action"));
21
19
  var _helpers = require("../../../state/helpers");
22
20
  var _useRovoConfig2 = _interopRequireDefault(require("../../../state/hooks/use-rovo-config"));
23
21
  var _useSmartLinkCrossProductUrlWrapper = require("../../../state/hooks/use-smart-link-cross-product-url-wrapper");
@@ -78,8 +76,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
78
76
  onMouseLeave = _ref4.onMouseLeave,
79
77
  onDismiss = _ref4.onDismiss,
80
78
  actionOptions = _ref4.actionOptions,
81
- hoverPreviewOptions = _ref4.hoverPreviewOptions,
82
- showRovoResolvedView = _ref4.showRovoResolvedView;
79
+ hoverPreviewOptions = _ref4.hoverPreviewOptions;
83
80
  var _useAnalyticsEventsNe = (0, _analyticsNext.useAnalyticsEvents)(),
84
81
  createAnalyticsEvent = _useAnalyticsEventsNe.createAnalyticsEvent;
85
82
  var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
@@ -283,8 +280,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
283
280
  }
284
281
  if (isResolved) {
285
282
  return /*#__PURE__*/_react.default.createElement(_resolved.default, (0, _extends2.default)({}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
286
- actionOptions: actionOptions,
287
- showRovoResolvedView: showRovoResolvedView
283
+ actionOptions: actionOptions
288
284
  } : undefined, {
289
285
  cardState: cardState,
290
286
  extensionKey: extensionKey,
@@ -335,8 +331,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
335
331
  }
336
332
  if (cardState.status === 'resolved') {
337
333
  return /*#__PURE__*/_react.default.createElement(_resolved.default, (0, _extends2.default)({}, (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch') ? {
338
- actionOptions: actionOptions,
339
- showRovoResolvedView: showRovoResolvedView
334
+ actionOptions: actionOptions
340
335
  } : undefined, {
341
336
  cardState: cardState,
342
337
  extensionKey: extensionKey,
@@ -359,23 +354,10 @@ var HoverCardContent = function HoverCardContent(_ref4) {
359
354
  }
360
355
  };
361
356
  var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(props) {
362
- var cardState = props.cardState,
363
- actionOptions = props.actionOptions;
364
- var rovoConfig = (0, _useRovoConfig2.default)();
365
- var isResolved = useIsResolvedView(props);
366
357
  var showPreauthBetterHovercard = useIsShowPreauthBetterHovercard(props);
367
- var showRovoResolvedView = (0, _react.useMemo)(function () {
368
- return isResolved && cardState.details && (0, _extractRovoChatAction.default)({
369
- response: cardState.details,
370
- rovoConfig: rovoConfig,
371
- actionOptions: actionOptions
372
- }) !== undefined;
373
- }, [actionOptions, cardState.details, rovoConfig, isResolved]);
374
358
  var data = (0, _react.useMemo)(function () {
375
359
  var viewVariant = 'default';
376
- if (showRovoResolvedView && (0, _expValEqualsNoExposure.expValEqualsNoExposure)('platform_sl_3p_auth_rovo_action', 'isEnabled', true)) {
377
- viewVariant = 'rovo-resolved-view';
378
- } else if (showPreauthBetterHovercard) {
360
+ if (showPreauthBetterHovercard) {
379
361
  viewVariant = 'rovo-unauthorised-view';
380
362
  }
381
363
  return {
@@ -383,17 +365,12 @@ var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(p
383
365
  viewVariant: viewVariant
384
366
  }
385
367
  };
386
- }, [showRovoResolvedView, showPreauthBetterHovercard]);
368
+ }, [showPreauthBetterHovercard]);
387
369
  return /*#__PURE__*/_react.default.createElement(_analyticsNext.AnalyticsContext, {
388
370
  data: data
389
- }, /*#__PURE__*/_react.default.createElement(HoverCardContent, (0, _extends2.default)({}, props, {
390
- showRovoResolvedView: showRovoResolvedView
391
- })));
371
+ }, /*#__PURE__*/_react.default.createElement(HoverCardContent, props));
392
372
  };
393
373
  var _default_1 = (0, _platformFeatureFlagsReact.componentWithCondition)(function () {
394
- // We need to read both of them to sutisfy some of the tests that expect both to be checked.
395
- var flagA = (0, _platformFeatureFlags.fg)('platform_sl_3p_preauth_better_hovercard_killswitch');
396
- var flagB = (0, _platformFeatureFlags.fg)('platform_sl_3p_auth_rovo_action_kill_switch');
397
- return flagA || flagB;
374
+ return (0, _platformFeatureFlags.fg)('platform_sl_3p_preauth_better_hovercard_killswitch');
398
375
  }, HoverCardContentWithViewVariant, HoverCardContent);
399
376
  var _default = exports.default = _default_1;
@@ -12,7 +12,6 @@ var _runtime = require("@compiled/react/runtime");
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
  var _react = _interopRequireWildcard(require("react"));
14
14
  var _reactMagneticDi = require("react-magnetic-di");
15
- var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
16
15
  var _useAnalyticsEvents2 = require("../../../../../common/analytics/generated/use-analytics-events");
17
16
  var _constants = require("../../../../../constants");
18
17
  var _analytics = require("../../../../../state/analytics");
@@ -33,14 +32,10 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
33
32
  flexibleCardProps = _ref.flexibleCardProps,
34
33
  isAISummaryEnabled = _ref.isAISummaryEnabled,
35
34
  onActionClick = _ref.onActionClick,
36
- showRovoResolvedView = _ref.showRovoResolvedView,
37
35
  titleBlockProps = _ref.titleBlockProps,
38
36
  id = _ref.id;
39
37
  var _useAnalyticsEvents = (0, _useAnalyticsEvents2.useAnalyticsEvents)(),
40
38
  fireEvent = _useAnalyticsEvents.fireEvent;
41
- // We want to fire exposure event only for those cases when user otherwise can see the experiment which would be controlled
42
- // by all the other condition defined above as a result of what was defined in actionOptions as well as in CardContext.
43
- var is3PAuthRovoActionsExperimentOn = showRovoResolvedView && (0, _expValEquals.expValEquals)('platform_sl_3p_auth_rovo_action', 'isEnabled', true);
44
39
  (0, _react.useEffect)(function () {
45
40
  // Since this hover view is only rendered on resolved status,
46
41
  // there is no need to check for statuses.
@@ -87,8 +82,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
87
82
  size: _constants.SmartLinkSize.Medium
88
83
  }), isAISummaryEnabled ? /*#__PURE__*/_react.default.createElement(_blocks.AISummaryBlock, {
89
84
  aiSummaryMinHeight: aiSummaryMinHeight,
90
- placeholder: snippet,
91
- isAny3pRovoActionsExperimentOn: is3PAuthRovoActionsExperimentOn
85
+ placeholder: snippet
92
86
  }) : snippet, /*#__PURE__*/_react.default.createElement(_blocks.SnippetBlock, {
93
87
  testId: "hidden-snippet",
94
88
  onRender: onSnippetRender,
@@ -98,10 +92,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
98
92
  }), /*#__PURE__*/_react.default.createElement(_blocks.ActionBlock, {
99
93
  onClick: onActionClick,
100
94
  spaceInline: "space.100",
101
- isAny3pRovoActionsExperimentOn: is3PAuthRovoActionsExperimentOn,
102
95
  className: (0, _runtime.ax)(["_n3td1b66"])
103
- }), is3PAuthRovoActionsExperimentOn ? /*#__PURE__*/_react.default.createElement(_blocks.ResolvedHoverCardFooterBlock, {
104
- onActionClick: onActionClick
105
- }) : /*#__PURE__*/_react.default.createElement(_blocks.AIFooterBlock, null));
96
+ }), /*#__PURE__*/_react.default.createElement(_blocks.AIFooterBlock, null));
106
97
  };
107
98
  var _default = exports.default = HoverCardResolvedView;
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
19
19
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
20
20
  var PACKAGE_DATA = {
21
21
  packageName: "@atlaskit/smart-card",
22
- packageVersion: "45.6.7",
22
+ packageVersion: "45.6.9",
23
23
  componentName: 'linkUrl'
24
24
  };
25
25
  var LinkUrl = function LinkUrl(_ref) {
@@ -14,13 +14,9 @@ var _logo = require("@atlaskit/logo");
14
14
  var _constants = require("../../../constants");
15
15
  var _messages = require("../../../messages");
16
16
  var _aiChapterIcon = _interopRequireDefault(require("../../FlexibleCard/assets/ai-chapter-icon"));
17
- var _aiEditIcon = _interopRequireDefault(require("../../FlexibleCard/assets/ai-edit-icon"));
18
17
  var _aiSearchIcon = _interopRequireDefault(require("../../FlexibleCard/assets/ai-search-icon"));
19
18
  var _htmlToAdf = _interopRequireDefault(require("../../FlexibleCard/components/actions/rovo-chat-action/html-to-adf"));
20
19
  var RovoChatPromptKey = exports.RovoChatPromptKey = /*#__PURE__*/function (RovoChatPromptKey) {
21
- RovoChatPromptKey["RECOMMEND_OTHER_SOURCES"] = "recommend-other-sources";
22
- RovoChatPromptKey["SHOW_OTHER_MENTIONS"] = "show-other-mentions";
23
- RovoChatPromptKey["SUGGEST_IMPROVEMENT"] = "suggest-improvement";
24
20
  RovoChatPromptKey["SUMMARIZE_LINK"] = "summarize-link";
25
21
  RovoChatPromptKey["KEY_HIGHLIGHTS"] = "key-highlights";
26
22
  RovoChatPromptKey["ASK_ROVO_ANYTHING"] = "ask-rovo-anything";
@@ -42,16 +38,14 @@ var getContext = function getContext(intl, product) {
42
38
  switch (product) {
43
39
  case 'CONFLUENCE':
44
40
  return {
45
- contextLong: intl.formatMessage(_messages.messages.rovo_prompt_context_confluence_page),
46
- contextShort: intl.formatMessage(_messages.messages.rovo_prompt_context_confluence_page_short)
41
+ contextLong: intl.formatMessage(_messages.messages.rovo_prompt_context_confluence_page)
47
42
  };
48
43
  case 'JSW':
49
44
  case 'JWM':
50
45
  case 'JSM':
51
46
  case 'JPD':
52
47
  return {
53
- contextLong: intl.formatMessage(_messages.messages.rovo_prompt_context_jira_work_item),
54
- contextShort: intl.formatMessage(_messages.messages.rovo_prompt_context_jira_work_item_short)
48
+ contextLong: intl.formatMessage(_messages.messages.rovo_prompt_context_jira_work_item)
55
49
  };
56
50
  }
57
51
  };
@@ -66,68 +60,10 @@ var getPromptAction = exports.getPromptAction = function getPromptAction(_ref) {
66
60
  cardAppearance = _ref.cardAppearance,
67
61
  provider = _ref.provider;
68
62
  var _ref2 = (_getContext = getContext(intl, product)) !== null && _getContext !== void 0 ? _getContext : {
69
- contextLong: intl.formatMessage(_messages.messages.rovo_prompt_context_generic),
70
- contextShort: intl.formatMessage(_messages.messages.rovo_prompt_context_generic)
63
+ contextLong: intl.formatMessage(_messages.messages.rovo_prompt_context_generic)
71
64
  },
72
- contextLong = _ref2.contextLong,
73
- contextShort = _ref2.contextShort;
65
+ contextLong = _ref2.contextLong;
74
66
  switch (promptKey) {
75
- case RovoChatPromptKey.RECOMMEND_OTHER_SOURCES:
76
- var label_recommend = intl.formatMessage(_messages.messages.rovo_prompt_button_recommend_other_sources);
77
- var html_recommend = intl.formatMessage(_messages.messages.rovo_prompt_message_recommend_other_sources, {
78
- context: contextLong,
79
- url: url
80
- }, {
81
- ignoreTag: true
82
- });
83
- return {
84
- icon: /*#__PURE__*/_react.default.createElement(_aiEditIcon.default, null),
85
- content: label_recommend,
86
- tooltipMessage: label_recommend,
87
- data: {
88
- name: label_recommend,
89
- dialogues: [],
90
- prompt: (0, _htmlToAdf.default)(html_recommend)
91
- }
92
- };
93
- case RovoChatPromptKey.SHOW_OTHER_MENTIONS:
94
- var label_other_mentions = intl.formatMessage(_messages.messages.rovo_prompt_button_show_other_mentions);
95
- var html_other_mentions = intl.formatMessage(_messages.messages.rovo_prompt_message_show_other_mentions, {
96
- context: contextLong,
97
- url: url
98
- }, {
99
- ignoreTag: true
100
- });
101
- return {
102
- icon: /*#__PURE__*/_react.default.createElement(_aiChapterIcon.default, null),
103
- content: label_other_mentions,
104
- tooltipMessage: label_other_mentions,
105
- data: {
106
- name: label_other_mentions,
107
- dialogues: [],
108
- prompt: (0, _htmlToAdf.default)(html_other_mentions)
109
- }
110
- };
111
- case RovoChatPromptKey.SUGGEST_IMPROVEMENT:
112
- var label_improvement = intl.formatMessage(_messages.messages.rovo_prompt_button_suggest_improvement, {
113
- context: contextShort
114
- });
115
- var html_improvement = intl.formatMessage(_messages.messages.rovo_prompt_message_suggest_improvement, {
116
- context: contextLong,
117
- url: url
118
- }, {
119
- ignoreTag: true
120
- });
121
- return {
122
- icon: /*#__PURE__*/_react.default.createElement(_aiSearchIcon.default, null),
123
- content: label_improvement,
124
- tooltipMessage: label_improvement,
125
- data: {
126
- name: label_improvement,
127
- dialogues: [],
128
- prompt: (0, _htmlToAdf.default)(html_improvement)
129
- }
130
- };
131
67
  case RovoChatPromptKey.SUMMARIZE_LINK:
132
68
  var label_summarize = intl.formatMessage(_messages.messages.ai_summarize);
133
69
  var html_summarize = intl.formatMessage(_messages.messages.rovo_prompt_message_summarize, {
@@ -160,6 +160,51 @@ export const messages = defineMessages({
160
160
  defaultMessage: 'To show a preview of this link, connect your {context} account.',
161
161
  description: 'Shown when a user does not have access to a link, but can connect their external account to view the link on card view. Displayed in byline.'
162
162
  },
163
+ connect_link_account_embed_teaser_dot_label: {
164
+ id: 'fabric.linking.connect_link_account_embed_teaser_dot_label.non-final',
165
+ defaultMessage: 'Go to slide {index} of {total}',
166
+ description: 'Accessible label for a dot indicator button in the teaser carousel, describing which slide it navigates to'
167
+ },
168
+ connect_link_account_embed_teaser_dot_row_label: {
169
+ id: 'fabric.linking.connect_link_account_embed_teaser_dot_row_label.non-final',
170
+ defaultMessage: 'Slides',
171
+ description: 'Accessible label for the group of dot indicator buttons in the teaser carousel'
172
+ },
173
+ connect_link_account_embed_teaser_button_next: {
174
+ id: 'fabric.linking.connect_link_account_embed_teaser_button_next.non-final',
175
+ defaultMessage: 'Next',
176
+ description: 'A button to view next teaser on benefit of connecting account on Smart Link embed'
177
+ },
178
+ connect_link_account_embed_teaser_slide_1_description: {
179
+ id: 'fabric.linking.connect_link_account_embed_teaser_slide_1_description.non-final',
180
+ defaultMessage: 'Connect your account to preview {context} files and documents directly inside Atlassian. No more context switching.',
181
+ description: 'A description on a teaser slide 1 on benefit of connecting account on Smart Link embed'
182
+ },
183
+ connect_link_account_embed_teaser_slide_1_title: {
184
+ id: 'fabric.linking.connect_link_account_embed_teaser_slide_1_title.non-final',
185
+ defaultMessage: 'See your {context} work without leaving Atlassian',
186
+ description: 'A title on a teaser slide 1 on benefit of connecting account on Smart Link embed'
187
+ },
188
+ connect_link_account_embed_teaser_slide_2_title: {
189
+ id: 'fabric.linking.connect_link_account_embed_teaser_slide_2_title.non-final',
190
+ defaultMessage: 'Search once, find it everywhere',
191
+ description: 'A title on a teaser slide 2 on benefit of connecting account on Smart Link embed'
192
+ },
193
+ connect_link_account_embed_teaser_slide_2_description: {
194
+ id: 'fabric.linking.connect_link_account_embed_teaser_slide_2_description.non-final',
195
+ defaultMessage: 'Search relevant {context} files alongside your Confluence pages and Jira issues, always respecting your {context} permissions.',
196
+ description: 'A description on a teaser slide 2 on benefit of connecting account on Smart Link embed'
197
+ },
198
+ connect_link_account_embed_teaser_slide_3_title: {
199
+ id: 'fabric.linking.connect_link_account_embed_teaser_slide_3_title.non-final',
200
+ defaultMessage: 'Get help from Rovo',
201
+ description: 'A title on a teaser slide 3 on benefit of connecting account on Smart Link embed'
202
+ },
203
+ connect_link_account_embed_teaser_slide_3_description: {
204
+ id: 'fabric.linking.connect_link_account_embed_teaser_slide_3_description.non-final',
205
+ defaultMessage: "Rovo uses your {context} content to answer questions, summarise docs, and draft updates using the work you've already done.",
206
+ description: 'A description on a teaser slide 3 on benefit of connecting account on Smart Link embed'
207
+ },
163
208
  connect_link_account_success_flag_description: {
164
209
  id: 'fabric.linking.connect_link_account_success_flag_description',
165
210
  defaultMessage: 'Shared links now display rich previews.',
@@ -941,51 +986,11 @@ export const messages = defineMessages({
941
986
  defaultMessage: 'Confluence page',
942
987
  description: 'The Confluence page the user see Smart Link in, to be used as the {context} for Rovo prompt message'
943
988
  },
944
- rovo_prompt_context_confluence_page_short: {
945
- id: 'fabric.linking.rovo_prompt_context_confluence_page_short.non-final',
946
- defaultMessage: 'page',
947
- description: 'The Confluence page the user see Smart Link in, to be used as the {context} for Rovo prompt message'
948
- },
949
989
  rovo_prompt_context_jira_work_item: {
950
990
  id: 'fabric.linking.rovo_prompt_context_jira_work_item.non-final',
951
991
  defaultMessage: 'Jira work item',
952
992
  description: 'The Jira work item the user see Smart Link in, to be used as the {context} for Rovo prompt message'
953
993
  },
954
- rovo_prompt_context_jira_work_item_short: {
955
- id: 'fabric.linking.rovo_prompt_context_jira_work_item_short.non-final',
956
- defaultMessage: 'work item',
957
- description: 'The Jira work item the user see Smart Link in, to be used as the {context} for Rovo prompt message'
958
- },
959
- rovo_prompt_button_recommend_other_sources: {
960
- id: 'fabric.linking.rovo_prompt_button_recommend_other_sources.non-final',
961
- defaultMessage: 'Recommend other sources',
962
- description: 'The name of the action to send prompt message to Rovo Chat in relation to current Smart Link'
963
- },
964
- rovo_prompt_message_recommend_other_sources: {
965
- id: 'fabric.linking.rovo_prompt_message_recommend_other_sources.non-final',
966
- defaultMessage: '<p>From this <a>{url}</a> and the {context} I’m viewing now as context:</p><ul><li><p>Search across all sources I can access for items that discuss <b>similar concepts, themes, or problems</b>, or that <b>reference similar or closely related sources</b> (including links to the same or related pages, issues, or docs).</p></li><li><p>Return the results as a list or table with columns: <code>Item</code>, <code>Type</code>, <code>Short summary</code>, and <code>Why it’s similar</code>.</p></li><li><p>For each result, give a one‑sentence <b>Short summary</b> of what the item is about.</p></li><li><p>In <b>Why it’s similar</b>, briefly explain (in a phrase or short sentence) what makes it related to this Smart Link and/or the item I’m viewing (for example: same project, similar decision, shared requirements, overlapping stakeholders, similar metrics, or referencing related docs).</p></li><li><p>Order the list from <b>most to least relevant</b> based on Rovo’s assessment of semantic similarity to both the Smart Link target and the current item. Prioritize items that I do not own or have not contributed to.</p></li><li><p>If there are more than 5 results, show the <b>5 most relevant</b> and state how many additional items you found.</p></li></ul>',
967
- description: 'The prompt message to send to Rovo Chat. {context} refers to the content the user triggered from, e.g. Confluence page or Jira work item. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
968
- },
969
- rovo_prompt_button_show_other_mentions: {
970
- id: 'fabric.linking.rovo_prompt_button_show_other_mentions.non-final',
971
- defaultMessage: 'Show other mentions',
972
- description: 'The name of the action to send prompt message to Rovo Chat in relation to current Smart Link'
973
- },
974
- rovo_prompt_message_show_other_mentions: {
975
- id: 'fabric.linking.rovo_prompt_message_show_other_mentions.non-final',
976
- defaultMessage: '<p>From <a>{url}</a> and the {context} I’m viewing now:</p><ul><li><p>Search across all Confluence pages and Jira work items I can access for other items that contain this exact Smart Link (same underlying URL/resource).</p></li><li><p>List all matching items in a table with columns: <code>Item</code>, <code>Type</code>, <code>Short summary</code>, <code>How this item uses the link</code>, and <code>Relevance to current item</code>.</p></li><li><p>For <code>Short summary</code>, give a one‑sentence description of what the {context} is about.</p></li><li><p>For <code>How this item uses the link</code>, briefly explain the role this link plays there (e.g., decision doc, background context, implementation details, status update).</p></li><li><p>For <code>Relevance to current item</code>, compare each item to the {context} I’m viewing now and label it <code>High</code>, <code>Medium</code>, or <code>Low</code> relevance, with a short reason (a phrase or single clause).</p></li><li><p>If there are more than 15 matches, show the 15 most relevant and tell me how many additional matches exist.</p></li></ul>',
977
- description: 'The prompt message to send to Rovo Chat. {context} refers to the content the user triggered from, e.g. Confluence page or Jira work item. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
978
- },
979
- rovo_prompt_button_suggest_improvement: {
980
- id: 'fabric.linking.rovo_prompt_button_suggest_improvement.non-final',
981
- defaultMessage: 'Suggest {context} improvement',
982
- description: 'The name of the action to send prompt message to Rovo Chat in relation to current Smart Link'
983
- },
984
- rovo_prompt_message_suggest_improvement: {
985
- id: 'fabric.linking.rovo_prompt_message_suggest_improvement.non-final',
986
- defaultMessage: '<p>Using the {context} I’m viewing now, plus all files and links referenced in it (including <a>{url}</a>):</p><ul><li><p>Identify unclear reasoning, missing context, or contradictions between the item and its linked files.</p></li><li><p>Call out any places where assumptions are not backed up by data or prior docs.</p></li><li><p>Stay concise: summarize your findings in <b>no more than three short paragraphs of content listed as bullets</b> of no more than a couple of sentences long focused only on the two points above.</p></li><li><p>After presenting that summary, <b>ask me explicitly</b> if I want you to go deeper. Only if I say yes, then:</p><ul><li><p>Suggest concrete rewrites (bullets or short paragraphs) to make the argument clearer, more concise, and better aligned with the supporting files.</p></li><li><p>Propose 3–5 follow‑up edits or additions that would make this item and its linked docs “share‑ready” for stakeholders.</p></li></ul></li></ul>',
987
- description: 'The prompt message to send to Rovo Chat. {context} refers to the content the user triggered from, e.g. Confluence page or Jira work item. {url} refers to Smart Link that the user triggers this action from. (Please make sure all html tags remain the same.)'
988
- },
989
994
  rovo_prompt_message_summarize: {
990
995
  id: 'fabric.linking.rovo_prompt_message_summarize.non-final',
991
996
  defaultMessage: '<p>Summarize the main ideas and key points of <a>{url}</a> in 3-5 clear, complete bullet points (markdown list).</p><p>Preserve important details such as names, dates, and key decisions.</p>',
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card" || '',
5
- packageVersion: "45.6.7" || ''
5
+ packageVersion: "45.6.9" || ''
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -0,0 +1,52 @@
1
+
2
+ ._2rko1rr0{border-radius:var(--ds-radius-full,9999px)}
3
+ ._zulp1ejb{gap:var(--ds-space-300,24px)}
4
+ ._zulpu2gc{gap:var(--ds-space-100,8px)}
5
+ ._zulpze3t{gap:var(--ds-space-0,0)}._16jlkb7n{flex-grow:1}
6
+ ._18m91wug{overflow-y:auto}
7
+ ._19bv1jfw{padding-left:var(--ds-space-500,40px)}
8
+ ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
9
+ ._19bvze3t{padding-left:var(--ds-space-0,0)}
10
+ ._1bah1h6o{justify-content:center}
11
+ ._1bsb1osq{width:100%}
12
+ ._1bsb1tcg{width:24px}
13
+ ._1bsb7vkz{width:1pc}
14
+ ._1bsbi2wt{width:6px}
15
+ ._1e0c1txw{display:flex}
16
+ ._1e0c1ule{display:block}
17
+ ._1n261g80{flex-wrap:wrap}
18
+ ._1o9zidpf{flex-shrink:0}
19
+ ._1o9zkb7n{flex-shrink:1}
20
+ ._1oecfnf5{transition-duration:.2s}
21
+ ._1reo1wug{overflow-x:auto}
22
+ ._2lx21bp4{flex-direction:column}
23
+ ._2lx2vrvc{flex-direction:row}
24
+ ._4cvr1fhb{align-items:stretch}
25
+ ._4cvr1h6o{align-items:center}
26
+ ._4cvr1y6m{align-items:flex-start}
27
+ ._4t3i1osq{height:100%}
28
+ ._4t3i1tcg{height:24px}
29
+ ._4t3i7vkz{height:1pc}
30
+ ._4t3ii2wt{height:6px}
31
+ ._5ral1f51{object-fit:contain}
32
+ ._6fl45ucs{transition-timing-function:ease}
33
+ ._bfhk1dy8{background-color:var(--ds-background-accent-blue-subtler,#cfe1fd)}
34
+ ._bfhki8nm{background-color:var(--ds-background-neutral,#0515240f)}
35
+ ._bfhkjmqp{background-color:var(--ds-background-selected-bold,#1868db)}
36
+ ._bfhksm61{background-color:var(--ds-background-neutral-subtle,#00000000)}
37
+ ._c71l1wdt{max-height:220px}
38
+ ._ca0q1jfw{padding-top:var(--ds-space-500,40px)}
39
+ ._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
40
+ ._ca0qze3t{padding-top:var(--ds-space-0,0)}
41
+ ._i0dlghg7{flex-basis:240px}
42
+ ._i0dluuw1{flex-basis:200px}
43
+ ._k8m01k61{transition-property:background-color}
44
+ ._lcxvglyw{pointer-events:none}
45
+ ._n3td1jfw{padding-bottom:var(--ds-space-500,40px)}
46
+ ._n3tdpxbi{padding-bottom:var(--ds-space-200,1pc)}
47
+ ._n3tdze3t{padding-bottom:var(--ds-space-0,0)}
48
+ ._rsufaqso{object-position:center center}
49
+ ._u5f31jfw{padding-right:var(--ds-space-500,40px)}
50
+ ._u5f3pxbi{padding-right:var(--ds-space-200,1pc)}
51
+ ._u5f3ze3t{padding-right:var(--ds-space-0,0)}
52
+ ._vchhusvi{box-sizing:border-box}
@@ -0,0 +1,114 @@
1
+ /* CarouselSlide.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ import "./CarouselSlide.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React from 'react';
5
+ import { useIntl } from 'react-intl';
6
+ import Button from '@atlaskit/button/new';
7
+ import { cx } from '@atlaskit/css';
8
+ import Heading from '@atlaskit/heading';
9
+ import Image from '@atlaskit/image';
10
+ import { Box, Pressable, Text } from '@atlaskit/primitives/compiled';
11
+ import { messages } from '../../../../messages';
12
+ const styles = {
13
+ columnImage: "_16jlkb7n _1o9zkb7n _i0dlghg7 _1e0c1txw _4cvr1h6o _1bah1h6o _ca0qpxbi _u5f3pxbi _n3tdpxbi _19bvpxbi _bfhk1dy8",
14
+ columnContent: "_zulp1ejb _16jlkb7n _1o9zkb7n _i0dluuw1 _1e0c1txw _2lx21bp4 _ca0q1jfw _u5f31jfw _n3td1jfw _19bv1jfw _4cvr1y6m _1bah1h6o",
15
+ columnContentCompact: "_ca0qpxbi _u5f3pxbi _n3tdpxbi _19bvpxbi",
16
+ dot: "_2rko1rr0 _1bsbi2wt _4t3ii2wt _bfhki8nm _1oecfnf5 _k8m01k61 _6fl45ucs _lcxvglyw",
17
+ dotActive: "_bfhkjmqp",
18
+ dotPassable: "_2rko1rr0 _1e0c1txw _4cvr1h6o _1bah1h6o _1bsb7vkz _4t3i7vkz _bfhksm61 _ca0qze3t _u5f3ze3t _n3tdze3t _19bvze3t",
19
+ icon: "_1o9zidpf _1bsb1tcg _4t3i1tcg _1e0c1txw _4cvr1h6o _1bah1h6o",
20
+ iconImage: "_1bsb1osq _4t3i1osq _5ral1f51",
21
+ image: "_1bsb1osq _c71l1wdt _5ral1f51 _rsufaqso _1e0c1ule",
22
+ rowButton: "_zulpu2gc _1e0c1txw _2lx2vrvc _1n261g80 _4cvr1h6o",
23
+ rowButtonCompact: "_1bsb1osq",
24
+ rowDot: "_zulpze3t _1e0c1txw _2lx2vrvc _4cvr1h6o",
25
+ rowIcon: "_zulpu2gc _1e0c1txw _4cvr1h6o",
26
+ slide: "_1reo1wug _18m91wug _1e0c1txw _1n261g80 _1bsb1osq _4t3i1osq _4cvr1fhb _vchhusvi"
27
+ };
28
+ const CarouselSlide = ({
29
+ icon,
30
+ iconLabel,
31
+ title,
32
+ description,
33
+ image,
34
+ primaryButtonLabel,
35
+ onPrimaryButtonClick,
36
+ onDotClick,
37
+ onNextClick,
38
+ slideIndex,
39
+ totalSlides,
40
+ size,
41
+ testId = 'embed-card-teaser-slide'
42
+ }) => {
43
+ const {
44
+ formatMessage
45
+ } = useIntl();
46
+ const isCompact = size !== 'full';
47
+ const showNavigation = totalSlides > 1;
48
+ const renderedIcon = icon == null ? null : typeof icon === 'string' ? /*#__PURE__*/React.createElement(Box, {
49
+ xcss: styles.icon
50
+ }, /*#__PURE__*/React.createElement(Image, {
51
+ src: icon,
52
+ alt: iconLabel,
53
+ className: ax([styles.iconImage])
54
+ })) : /*#__PURE__*/React.createElement(Box, {
55
+ xcss: styles.icon
56
+ }, icon);
57
+ const renderedImage = image == null ? null : typeof image === 'string' ? /*#__PURE__*/React.createElement(Image, {
58
+ src: image,
59
+ alt: title,
60
+ className: ax([styles.image])
61
+ }) : image;
62
+ return /*#__PURE__*/React.createElement(Box, {
63
+ xcss: styles.slide,
64
+ testId: testId
65
+ }, /*#__PURE__*/React.createElement(Box, {
66
+ xcss: cx(styles.columnContent, isCompact && styles.columnContentCompact)
67
+ }, isCompact && /*#__PURE__*/React.createElement(Box, {
68
+ xcss: cx(styles.rowButton, styles.rowButtonCompact)
69
+ }, /*#__PURE__*/React.createElement(Button, {
70
+ appearance: "primary",
71
+ onClick: onPrimaryButtonClick,
72
+ shouldFitContainer: true,
73
+ testId: `${testId}-connect-compact`
74
+ }, primaryButtonLabel)), renderedIcon && /*#__PURE__*/React.createElement(Box, {
75
+ xcss: styles.rowIcon
76
+ }, renderedIcon), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Heading, {
77
+ size: "medium",
78
+ testId: `${testId}-title`
79
+ }, title)), /*#__PURE__*/React.createElement(Box, null, /*#__PURE__*/React.createElement(Text, {
80
+ testId: `${testId}-description`
81
+ }, description)), /*#__PURE__*/React.createElement(Box, {
82
+ xcss: styles.rowButton
83
+ }, !isCompact && /*#__PURE__*/React.createElement(Button, {
84
+ appearance: "primary",
85
+ onClick: onPrimaryButtonClick,
86
+ testId: `${testId}-connect`
87
+ }, primaryButtonLabel), showNavigation && onNextClick && /*#__PURE__*/React.createElement(Button, {
88
+ appearance: "subtle",
89
+ onClick: onNextClick,
90
+ testId: `${testId}-next`
91
+ }, formatMessage(messages.connect_link_account_embed_teaser_button_next)), showNavigation && /*#__PURE__*/React.createElement(Box, {
92
+ xcss: styles.rowDot,
93
+ role: "group",
94
+ "aria-label": formatMessage(messages.connect_link_account_embed_teaser_dot_row_label)
95
+ }, Array.from({
96
+ length: totalSlides
97
+ }, (_, i) => /*#__PURE__*/React.createElement(Pressable, {
98
+ key: i,
99
+ xcss: styles.dotPassable,
100
+ onClick: () => onDotClick === null || onDotClick === void 0 ? void 0 : onDotClick(i),
101
+ "aria-label": formatMessage(messages.connect_link_account_embed_teaser_dot_label, {
102
+ index: i + 1,
103
+ total: totalSlides
104
+ }),
105
+ "aria-current": i === slideIndex ? 'true' : undefined,
106
+ testId: `${testId}-dot-${i}`
107
+ }, /*#__PURE__*/React.createElement(Box, {
108
+ xcss: cx(styles.dot, i === slideIndex && styles.dotActive)
109
+ })))))), !isCompact && /*#__PURE__*/React.createElement(Box, {
110
+ xcss: styles.columnImage,
111
+ testId: `${testId}-image-panel`
112
+ }, renderedImage));
113
+ };
114
+ export default CarouselSlide;
@@ -0,0 +1,12 @@
1
+ ._18m915vq{overflow-y:hidden}
2
+ ._1bsb1osq{width:100%}
3
+ ._1e0c1txw{display:flex}
4
+ ._1o511hrf{animation-fill-mode:both}
5
+ ._1pglafbj{animation-timing-function:cubic-bezier(.25,.46,.45,.94)}
6
+ ._1reo15vq{overflow-x:hidden}
7
+ ._4t3i1osq{height:100%}
8
+ ._5sagjx92{animation-duration:.28s}
9
+ ._j7hql61g{animation-name:kjqoltm}
10
+ ._kqswh2mm{position:relative}
11
+ @keyframes kjqoltm{0%{opacity:0;transform:translateX(40px)}to{opacity:1;transform:translateX(0)}}
12
+ @media (prefers-reduced-motion:reduce){._bl8aglyw{animation-name:none}._2hwzhgkh{animation-duration:.01ms}}
@@ -0,0 +1,101 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ import "./index.compiled.css";
3
+ import { ax, ix } from "@compiled/react/runtime";
4
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
5
+ import { Box } from '@atlaskit/primitives/compiled';
6
+ import CarouselSlide from './CarouselSlide';
7
+ const styles = {
8
+ carousel: "_1reo15vq _18m915vq _1e0c1txw _1bsb1osq _4t3i1osq _kqswh2mm"
9
+ };
10
+
11
+ // Slide enters from the right: translates from 40px right + fades in
12
+ const slideInFromRight = null;
13
+ const slideWrapperMap = {
14
+ static: "_1bsb1osq _4t3i1osq",
15
+ animated: "_1bsb1osq _4t3i1osq _j7hql61g _5sagjx92 _1pglafbj _1o511hrf _bl8aglyw _2hwzhgkh"
16
+ };
17
+ /**
18
+ * Derives layout size bucket from pixel dimensions.
19
+ * Used instead of CSS @container queries (which are blocked by the linter)
20
+ * to control which elements are shown at different card sizes.
21
+ */
22
+ const getSize = (width, height) => {
23
+ if (width < 200 || height < 100) {
24
+ return 'minimal';
25
+ }
26
+ if (width < 400 || height < 140) {
27
+ return 'compact';
28
+ }
29
+ return 'full';
30
+ };
31
+ const Carousel = ({
32
+ icon,
33
+ iconLabel,
34
+ items,
35
+ onPrimaryButtonClick,
36
+ primaryButtonLabel,
37
+ testId = 'embed-card-teaser-carousel'
38
+ }) => {
39
+ const [activeIndex, setActiveIndex] = useState(0);
40
+ const [size, setSize] = useState('full');
41
+
42
+ // Tracks whether the user has navigated at least once.
43
+ // The first slide is rendered statically (no animation) to avoid any
44
+ // CSS animation running during SSR or on the initial paint.
45
+ const hasNavigated = useRef(false);
46
+ const containerRef = useRef(null);
47
+
48
+ // Observe the carousel container's size and update the layout bucket.
49
+ useEffect(() => {
50
+ const el = containerRef.current;
51
+ if (!el) {
52
+ return;
53
+ }
54
+ const observer = new ResizeObserver(([entry]) => {
55
+ const {
56
+ width,
57
+ height
58
+ } = entry.contentRect;
59
+ setSize(getSize(width, height));
60
+ });
61
+ observer.observe(el);
62
+ return () => observer.disconnect();
63
+ }, []);
64
+ const goNext = useCallback(() => {
65
+ hasNavigated.current = true;
66
+ setActiveIndex(current => (current + 1) % items.length);
67
+ }, [items.length]);
68
+ const goTo = useCallback(index => {
69
+ if (index === activeIndex) {
70
+ return;
71
+ }
72
+ hasNavigated.current = true;
73
+ setActiveIndex(index);
74
+ }, [activeIndex]);
75
+ const currentSlide = items[activeIndex];
76
+ const isLastSlide = activeIndex === items.length - 1;
77
+ return /*#__PURE__*/React.createElement(Box, {
78
+ ref: containerRef,
79
+ xcss: styles.carousel,
80
+ testId: testId
81
+ }, /*#__PURE__*/React.createElement(Box, {
82
+ key: activeIndex,
83
+ xcss: slideWrapperMap[hasNavigated.current ? 'animated' : 'static'],
84
+ "aria-live": "polite"
85
+ }, /*#__PURE__*/React.createElement(CarouselSlide, {
86
+ primaryButtonLabel: primaryButtonLabel,
87
+ description: currentSlide.description,
88
+ icon: icon,
89
+ iconLabel: iconLabel,
90
+ image: currentSlide.image,
91
+ title: currentSlide.title,
92
+ onPrimaryButtonClick: onPrimaryButtonClick,
93
+ onDotClick: goTo,
94
+ onNextClick: !isLastSlide ? goNext : undefined,
95
+ size: size,
96
+ slideIndex: activeIndex,
97
+ testId: `${testId}-slide`,
98
+ totalSlides: items.length
99
+ })));
100
+ };
101
+ export default Carousel;