@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
@@ -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,113 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v0.39.1 */
2
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
3
+ import "./index.compiled.css";
4
+ import { ax, ix } from "@compiled/react/runtime";
5
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
6
+ import { Box } from '@atlaskit/primitives/compiled';
7
+ import CarouselSlide from './CarouselSlide';
8
+ var styles = {
9
+ carousel: "_1reo15vq _18m915vq _1e0c1txw _1bsb1osq _4t3i1osq _kqswh2mm"
10
+ };
11
+
12
+ // Slide enters from the right: translates from 40px right + fades in
13
+ var slideInFromRight = null;
14
+ var slideWrapperMap = {
15
+ static: "_1bsb1osq _4t3i1osq",
16
+ animated: "_1bsb1osq _4t3i1osq _j7hql61g _5sagjx92 _1pglafbj _1o511hrf _bl8aglyw _2hwzhgkh"
17
+ };
18
+ /**
19
+ * Derives layout size bucket from pixel dimensions.
20
+ * Used instead of CSS @container queries (which are blocked by the linter)
21
+ * to control which elements are shown at different card sizes.
22
+ */
23
+ var getSize = function getSize(width, height) {
24
+ if (width < 200 || height < 100) {
25
+ return 'minimal';
26
+ }
27
+ if (width < 400 || height < 140) {
28
+ return 'compact';
29
+ }
30
+ return 'full';
31
+ };
32
+ var Carousel = function Carousel(_ref) {
33
+ var icon = _ref.icon,
34
+ iconLabel = _ref.iconLabel,
35
+ items = _ref.items,
36
+ onPrimaryButtonClick = _ref.onPrimaryButtonClick,
37
+ primaryButtonLabel = _ref.primaryButtonLabel,
38
+ _ref$testId = _ref.testId,
39
+ testId = _ref$testId === void 0 ? 'embed-card-teaser-carousel' : _ref$testId;
40
+ var _useState = useState(0),
41
+ _useState2 = _slicedToArray(_useState, 2),
42
+ activeIndex = _useState2[0],
43
+ setActiveIndex = _useState2[1];
44
+ var _useState3 = useState('full'),
45
+ _useState4 = _slicedToArray(_useState3, 2),
46
+ size = _useState4[0],
47
+ setSize = _useState4[1];
48
+
49
+ // Tracks whether the user has navigated at least once.
50
+ // The first slide is rendered statically (no animation) to avoid any
51
+ // CSS animation running during SSR or on the initial paint.
52
+ var hasNavigated = useRef(false);
53
+ var containerRef = useRef(null);
54
+
55
+ // Observe the carousel container's size and update the layout bucket.
56
+ useEffect(function () {
57
+ var el = containerRef.current;
58
+ if (!el) {
59
+ return;
60
+ }
61
+ var observer = new ResizeObserver(function (_ref2) {
62
+ var _ref3 = _slicedToArray(_ref2, 1),
63
+ entry = _ref3[0];
64
+ var _entry$contentRect = entry.contentRect,
65
+ width = _entry$contentRect.width,
66
+ height = _entry$contentRect.height;
67
+ setSize(getSize(width, height));
68
+ });
69
+ observer.observe(el);
70
+ return function () {
71
+ return observer.disconnect();
72
+ };
73
+ }, []);
74
+ var goNext = useCallback(function () {
75
+ hasNavigated.current = true;
76
+ setActiveIndex(function (current) {
77
+ return (current + 1) % items.length;
78
+ });
79
+ }, [items.length]);
80
+ var goTo = useCallback(function (index) {
81
+ if (index === activeIndex) {
82
+ return;
83
+ }
84
+ hasNavigated.current = true;
85
+ setActiveIndex(index);
86
+ }, [activeIndex]);
87
+ var currentSlide = items[activeIndex];
88
+ var isLastSlide = activeIndex === items.length - 1;
89
+ return /*#__PURE__*/React.createElement(Box, {
90
+ ref: containerRef,
91
+ xcss: styles.carousel,
92
+ testId: testId
93
+ }, /*#__PURE__*/React.createElement(Box, {
94
+ key: activeIndex,
95
+ xcss: slideWrapperMap[hasNavigated.current ? 'animated' : 'static'],
96
+ "aria-live": "polite"
97
+ }, /*#__PURE__*/React.createElement(CarouselSlide, {
98
+ primaryButtonLabel: primaryButtonLabel,
99
+ description: currentSlide.description,
100
+ icon: icon,
101
+ iconLabel: iconLabel,
102
+ image: currentSlide.image,
103
+ title: currentSlide.title,
104
+ onPrimaryButtonClick: onPrimaryButtonClick,
105
+ onDotClick: goTo,
106
+ onNextClick: !isLastSlide ? goNext : undefined,
107
+ size: size,
108
+ slideIndex: activeIndex,
109
+ testId: "".concat(testId, "-slide"),
110
+ totalSlides: items.length
111
+ })));
112
+ };
113
+ export default Carousel;
@@ -12,10 +12,9 @@ import { ActionName } from '../../../../../constants';
12
12
  import { useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
13
13
  import useInvokeClientAction from '../../../../../state/hooks/use-invoke-client-action';
14
14
  import useRovoChat from '../../../../../state/hooks/use-rovo-chat';
15
- import { getPromptAction, RovoChatPromptKey } from '../../../../common/rovo-chat-utils';
15
+ import { getPromptAction } from '../../../../common/rovo-chat-utils';
16
16
  import Action from '../action';
17
- var GOOGLE_PROMPTS = [RovoChatPromptKey.RECOMMEND_OTHER_SOURCES, RovoChatPromptKey.SHOW_OTHER_MENTIONS, RovoChatPromptKey.SUGGEST_IMPROVEMENT];
18
- var DEFAULT_PROMPTS = GOOGLE_PROMPTS;
17
+ var DEFAULT_PROMPTS = [];
19
18
  var RovoChatAction = function RovoChatAction(_ref) {
20
19
  var _context$actions;
21
20
  var onClickCallback = _ref.onClick,
@@ -5,7 +5,6 @@ import * as React from 'react';
5
5
  import { ax, ix } from "@compiled/react/runtime";
6
6
  import { useCallback, useMemo, useState } from 'react';
7
7
  import { di } from 'react-magnetic-di';
8
- import { fg } from '@atlaskit/platform-feature-flags';
9
8
  import { ActionName, SmartLinkSize } from '../../../../../constants';
10
9
  import { useFlexibleUiContext, useFlexibleUiOptionContext } from '../../../../../state/flexible-ui-context';
11
10
  import * as Actions from '../../actions';
@@ -42,18 +41,15 @@ export var getPrimitivesPaddingSpaceBySize = function getPrimitivesPaddingSpaceB
42
41
  }
43
42
  };
44
43
  var ActionBlock = function ActionBlock(_ref) {
45
- var _context$actions;
46
44
  var blockRef = _ref.blockRef,
47
45
  onClickCallback = _ref.onClick,
48
46
  size = _ref.size,
49
47
  spaceInline = _ref.spaceInline,
50
48
  className = _ref.className,
51
49
  _ref$testId = _ref.testId,
52
- testId = _ref$testId === void 0 ? 'smart-block-action' : _ref$testId,
53
- isAny3pRovoActionsExperimentOn = _ref.isAny3pRovoActionsExperimentOn;
50
+ testId = _ref$testId === void 0 ? 'smart-block-action' : _ref$testId;
54
51
  var context = useFlexibleUiContext();
55
52
  var ui = useFlexibleUiOptionContext();
56
- var isRovoChatActionAvailable = isAny3pRovoActionsExperimentOn && 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[ActionName.RovoChatAction]) !== undefined : undefined;
57
53
  var _useState = useState(),
58
54
  _useState2 = _slicedToArray(_useState, 2),
59
55
  message = _useState2[0],
@@ -77,9 +73,9 @@ var ActionBlock = function ActionBlock(_ref) {
77
73
  if (!(context !== null && context !== void 0 && context.actions)) {
78
74
  return;
79
75
  }
80
- var arr = fg('platform_sl_3p_auth_rovo_action_kill_switch') ? isRovoChatActionAvailable ? [ActionName.RovoChatAction] : Object.keys(context.actions).filter(function (name) {
76
+ var arr = Object.keys(context.actions).filter(function (name) {
81
77
  return name !== ActionName.RovoChatAction;
82
- }) : Object.keys(context.actions);
78
+ });
83
79
  arr.sort(sort);
84
80
  var renderAction = function renderAction(name) {
85
81
  var Action = name in Actions ? Actions[name] : undefined;
@@ -107,7 +103,7 @@ var ActionBlock = function ActionBlock(_ref) {
107
103
  return arr.map(function (name) {
108
104
  return renderAction(name);
109
105
  });
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]);
106
+ }, [context === null || context === void 0 ? void 0 : context.actions, spaceInline, onError, onLoadingChange, size, ui === null || ui === void 0 ? void 0 : ui.size, padding, isLoading, _onClick]);
111
107
  if (!actions) {
112
108
  return null;
113
109
  }
@@ -1,10 +1,10 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["isAny3pRovoActionsExperimentOn", "testId"];
3
+ var _excluded = ["testId"];
4
4
  import React from 'react';
5
5
  import { InternalActionName, SmartLinkStatus } from '../../../../../constants';
6
6
  import { useFlexibleCardContext, useFlexibleUiContext } from '../../../../../state/flexible-ui-context';
7
- import AISummaryBlockResolvedView, { RovoSummaryBlockResolvedView } from './resolved';
7
+ import AISummaryBlockResolvedView from './resolved';
8
8
  /**
9
9
  * Represents an AISummaryBlock, designed to summarising link resource
10
10
  * content using AI.
@@ -13,9 +13,8 @@ import AISummaryBlockResolvedView, { RovoSummaryBlockResolvedView } from './reso
13
13
  * @see Block
14
14
  */
15
15
  var AISummaryBlock = function AISummaryBlock(_ref) {
16
- var _context$actions, _props$size2, _cardContext$ui2;
17
- var isAny3pRovoActionsExperimentOn = _ref.isAny3pRovoActionsExperimentOn,
18
- _ref$testId = _ref.testId,
16
+ var _context$actions, _props$size, _cardContext$ui;
17
+ var _ref$testId = _ref.testId,
19
18
  testId = _ref$testId === void 0 ? 'smart-ai-summary-block' : _ref$testId,
20
19
  props = _objectWithoutProperties(_ref, _excluded);
21
20
  var cardContext = useFlexibleCardContext();
@@ -27,16 +26,8 @@ var AISummaryBlock = function AISummaryBlock(_ref) {
27
26
  if (!(actionData !== null && actionData !== void 0 && actionData.url)) {
28
27
  return null;
29
28
  }
30
- if (isAny3pRovoActionsExperimentOn) {
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
- }));
37
- }
38
29
  return /*#__PURE__*/React.createElement(AISummaryBlockResolvedView, _extends({}, props, {
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,
30
+ 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,
40
31
  testId: testId,
41
32
  url: actionData.url
42
33
  }));
@@ -8,10 +8,8 @@ import { useSmartLinkContext } from '@atlaskit/link-provider';
8
8
  import { fg } from '@atlaskit/platform-feature-flags';
9
9
  import { componentWithCondition, functionUnionWithCondition } from '@atlaskit/platform-feature-flags-react';
10
10
  import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
11
- import { expValEqualsNoExposure } from '@atlaskit/tmp-editor-statsig/exp-val-equals-no-exposure';
12
11
  import { useAnalyticsEvents } from '../../../common/analytics/generated/use-analytics-events';
13
12
  import { CardDisplay, SmartLinkPosition, SmartLinkSize } from '../../../constants';
14
- import extractRovoChatAction from '../../../extractors/flexible/actions/extract-rovo-chat-action';
15
13
  import { getClickUrl, getDefinitionId, getExtensionKey, getServices } from '../../../state/helpers';
16
14
  import useRovoConfig from '../../../state/hooks/use-rovo-config';
17
15
  import { useSmartLinkCrossProductUrlWrapperGated } from '../../../state/hooks/use-smart-link-cross-product-url-wrapper';
@@ -69,8 +67,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
69
67
  onMouseLeave = _ref4.onMouseLeave,
70
68
  onDismiss = _ref4.onDismiss,
71
69
  actionOptions = _ref4.actionOptions,
72
- hoverPreviewOptions = _ref4.hoverPreviewOptions,
73
- showRovoResolvedView = _ref4.showRovoResolvedView;
70
+ hoverPreviewOptions = _ref4.hoverPreviewOptions;
74
71
  var _useAnalyticsEventsNe = useAnalyticsEventsNext(),
75
72
  createAnalyticsEvent = _useAnalyticsEventsNe.createAnalyticsEvent;
76
73
  var _useAnalyticsEvents = useAnalyticsEvents(),
@@ -274,8 +271,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
274
271
  }
275
272
  if (isResolved) {
276
273
  return /*#__PURE__*/React.createElement(HoverCardResolvedView, _extends({}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
277
- actionOptions: actionOptions,
278
- showRovoResolvedView: showRovoResolvedView
274
+ actionOptions: actionOptions
279
275
  } : undefined, {
280
276
  cardState: cardState,
281
277
  extensionKey: extensionKey,
@@ -326,8 +322,7 @@ var HoverCardContent = function HoverCardContent(_ref4) {
326
322
  }
327
323
  if (cardState.status === 'resolved') {
328
324
  return /*#__PURE__*/React.createElement(HoverCardResolvedView, _extends({}, fg('platform_sl_3p_auth_rovo_action_kill_switch') ? {
329
- actionOptions: actionOptions,
330
- showRovoResolvedView: showRovoResolvedView
325
+ actionOptions: actionOptions
331
326
  } : undefined, {
332
327
  cardState: cardState,
333
328
  extensionKey: extensionKey,
@@ -350,23 +345,10 @@ var HoverCardContent = function HoverCardContent(_ref4) {
350
345
  }
351
346
  };
352
347
  var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(props) {
353
- var cardState = props.cardState,
354
- actionOptions = props.actionOptions;
355
- var rovoConfig = useRovoConfig();
356
- var isResolved = useIsResolvedView(props);
357
348
  var showPreauthBetterHovercard = useIsShowPreauthBetterHovercard(props);
358
- var showRovoResolvedView = useMemo(function () {
359
- return isResolved && cardState.details && extractRovoChatAction({
360
- response: cardState.details,
361
- rovoConfig: rovoConfig,
362
- actionOptions: actionOptions
363
- }) !== undefined;
364
- }, [actionOptions, cardState.details, rovoConfig, isResolved]);
365
349
  var data = useMemo(function () {
366
350
  var viewVariant = 'default';
367
- if (showRovoResolvedView && expValEqualsNoExposure('platform_sl_3p_auth_rovo_action', 'isEnabled', true)) {
368
- viewVariant = 'rovo-resolved-view';
369
- } else if (showPreauthBetterHovercard) {
351
+ if (showPreauthBetterHovercard) {
370
352
  viewVariant = 'rovo-unauthorised-view';
371
353
  }
372
354
  return {
@@ -374,17 +356,12 @@ var HoverCardContentWithViewVariant = function HoverCardContentWithViewVariant(p
374
356
  viewVariant: viewVariant
375
357
  }
376
358
  };
377
- }, [showRovoResolvedView, showPreauthBetterHovercard]);
359
+ }, [showPreauthBetterHovercard]);
378
360
  return /*#__PURE__*/React.createElement(AnalyticsContext, {
379
361
  data: data
380
- }, /*#__PURE__*/React.createElement(HoverCardContent, _extends({}, props, {
381
- showRovoResolvedView: showRovoResolvedView
382
- })));
362
+ }, /*#__PURE__*/React.createElement(HoverCardContent, props));
383
363
  };
384
364
  var _default_1 = componentWithCondition(function () {
385
- // We need to read both of them to sutisfy some of the tests that expect both to be checked.
386
- var flagA = fg('platform_sl_3p_preauth_better_hovercard_killswitch');
387
- var flagB = fg('platform_sl_3p_auth_rovo_action_kill_switch');
388
- return flagA || flagB;
365
+ return fg('platform_sl_3p_preauth_better_hovercard_killswitch');
389
366
  }, HoverCardContentWithViewVariant, HoverCardContent);
390
367
  export default _default_1;
@@ -4,13 +4,12 @@ import "./index.compiled.css";
4
4
  import { ax, ix } from "@compiled/react/runtime";
5
5
  import React, { useCallback, useEffect, useMemo, useRef } from 'react';
6
6
  import { di } from 'react-magnetic-di';
7
- import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
8
7
  import { useAnalyticsEvents } from '../../../../../common/analytics/generated/use-analytics-events';
9
8
  import { CardDisplay, SmartLinkPosition, SmartLinkSize } from '../../../../../constants';
10
9
  import { succeedUfoExperience } from '../../../../../state/analytics';
11
10
  import useAISummaryAction from '../../../../../state/hooks/use-ai-summary-action';
12
11
  import FlexibleCard from '../../../../FlexibleCard';
13
- import { ActionBlock, AIFooterBlock, AISummaryBlock, ResolvedHoverCardFooterBlock, MetadataBlock, SnippetBlock, TitleBlock } from '../../../../FlexibleCard/components/blocks';
12
+ import { ActionBlock, AIFooterBlock, AISummaryBlock, MetadataBlock, SnippetBlock, TitleBlock } from '../../../../FlexibleCard/components/blocks';
14
13
  import { getMetadata } from '../../../utils';
15
14
  import ImagePreview from '../../ImagePreview';
16
15
  var hiddenSnippetStyles = null;
@@ -24,14 +23,10 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
24
23
  flexibleCardProps = _ref.flexibleCardProps,
25
24
  isAISummaryEnabled = _ref.isAISummaryEnabled,
26
25
  onActionClick = _ref.onActionClick,
27
- showRovoResolvedView = _ref.showRovoResolvedView,
28
26
  titleBlockProps = _ref.titleBlockProps,
29
27
  id = _ref.id;
30
28
  var _useAnalyticsEvents = useAnalyticsEvents(),
31
29
  fireEvent = _useAnalyticsEvents.fireEvent;
32
- // We want to fire exposure event only for those cases when user otherwise can see the experiment which would be controlled
33
- // by all the other condition defined above as a result of what was defined in actionOptions as well as in CardContext.
34
- var is3PAuthRovoActionsExperimentOn = showRovoResolvedView && expValEquals('platform_sl_3p_auth_rovo_action', 'isEnabled', true);
35
30
  useEffect(function () {
36
31
  // Since this hover view is only rendered on resolved status,
37
32
  // there is no need to check for statuses.
@@ -78,8 +73,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
78
73
  size: SmartLinkSize.Medium
79
74
  }), isAISummaryEnabled ? /*#__PURE__*/React.createElement(AISummaryBlock, {
80
75
  aiSummaryMinHeight: aiSummaryMinHeight,
81
- placeholder: snippet,
82
- isAny3pRovoActionsExperimentOn: is3PAuthRovoActionsExperimentOn
76
+ placeholder: snippet
83
77
  }) : snippet, /*#__PURE__*/React.createElement(SnippetBlock, {
84
78
  testId: "hidden-snippet",
85
79
  onRender: onSnippetRender,
@@ -89,10 +83,7 @@ var HoverCardResolvedView = function HoverCardResolvedView(_ref) {
89
83
  }), /*#__PURE__*/React.createElement(ActionBlock, {
90
84
  onClick: onActionClick,
91
85
  spaceInline: "space.100",
92
- isAny3pRovoActionsExperimentOn: is3PAuthRovoActionsExperimentOn,
93
86
  className: ax(["_n3td1b66"])
94
- }), is3PAuthRovoActionsExperimentOn ? /*#__PURE__*/React.createElement(ResolvedHoverCardFooterBlock, {
95
- onActionClick: onActionClick
96
- }) : /*#__PURE__*/React.createElement(AIFooterBlock, null));
87
+ }), /*#__PURE__*/React.createElement(AIFooterBlock, null));
97
88
  };
98
89
  export default HoverCardResolvedView;
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  var PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "45.6.7",
15
+ packageVersion: "45.6.9",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var LinkUrl = function LinkUrl(_ref) {
@@ -7,13 +7,9 @@ import { RovoIcon } from '@atlaskit/logo';
7
7
  import { CardDisplay } from '../../../constants';
8
8
  import { messages } from '../../../messages';
9
9
  import AiChapterIcon from '../../FlexibleCard/assets/ai-chapter-icon';
10
- import AIEditIcon from '../../FlexibleCard/assets/ai-edit-icon';
11
10
  import AISearchIcon from '../../FlexibleCard/assets/ai-search-icon';
12
11
  import htmlToAdf from '../../FlexibleCard/components/actions/rovo-chat-action/html-to-adf';
13
12
  export var RovoChatPromptKey = /*#__PURE__*/function (RovoChatPromptKey) {
14
- RovoChatPromptKey["RECOMMEND_OTHER_SOURCES"] = "recommend-other-sources";
15
- RovoChatPromptKey["SHOW_OTHER_MENTIONS"] = "show-other-mentions";
16
- RovoChatPromptKey["SUGGEST_IMPROVEMENT"] = "suggest-improvement";
17
13
  RovoChatPromptKey["SUMMARIZE_LINK"] = "summarize-link";
18
14
  RovoChatPromptKey["KEY_HIGHLIGHTS"] = "key-highlights";
19
15
  RovoChatPromptKey["ASK_ROVO_ANYTHING"] = "ask-rovo-anything";
@@ -35,16 +31,14 @@ var getContext = function getContext(intl, product) {
35
31
  switch (product) {
36
32
  case 'CONFLUENCE':
37
33
  return {
38
- contextLong: intl.formatMessage(messages.rovo_prompt_context_confluence_page),
39
- contextShort: intl.formatMessage(messages.rovo_prompt_context_confluence_page_short)
34
+ contextLong: intl.formatMessage(messages.rovo_prompt_context_confluence_page)
40
35
  };
41
36
  case 'JSW':
42
37
  case 'JWM':
43
38
  case 'JSM':
44
39
  case 'JPD':
45
40
  return {
46
- contextLong: intl.formatMessage(messages.rovo_prompt_context_jira_work_item),
47
- contextShort: intl.formatMessage(messages.rovo_prompt_context_jira_work_item_short)
41
+ contextLong: intl.formatMessage(messages.rovo_prompt_context_jira_work_item)
48
42
  };
49
43
  }
50
44
  };
@@ -59,68 +53,10 @@ export var getPromptAction = function getPromptAction(_ref) {
59
53
  cardAppearance = _ref.cardAppearance,
60
54
  provider = _ref.provider;
61
55
  var _ref2 = (_getContext = getContext(intl, product)) !== null && _getContext !== void 0 ? _getContext : {
62
- contextLong: intl.formatMessage(messages.rovo_prompt_context_generic),
63
- contextShort: intl.formatMessage(messages.rovo_prompt_context_generic)
56
+ contextLong: intl.formatMessage(messages.rovo_prompt_context_generic)
64
57
  },
65
- contextLong = _ref2.contextLong,
66
- contextShort = _ref2.contextShort;
58
+ contextLong = _ref2.contextLong;
67
59
  switch (promptKey) {
68
- case RovoChatPromptKey.RECOMMEND_OTHER_SOURCES:
69
- var label_recommend = intl.formatMessage(messages.rovo_prompt_button_recommend_other_sources);
70
- var html_recommend = intl.formatMessage(messages.rovo_prompt_message_recommend_other_sources, {
71
- context: contextLong,
72
- url: url
73
- }, {
74
- ignoreTag: true
75
- });
76
- return {
77
- icon: /*#__PURE__*/React.createElement(AIEditIcon, null),
78
- content: label_recommend,
79
- tooltipMessage: label_recommend,
80
- data: {
81
- name: label_recommend,
82
- dialogues: [],
83
- prompt: htmlToAdf(html_recommend)
84
- }
85
- };
86
- case RovoChatPromptKey.SHOW_OTHER_MENTIONS:
87
- var label_other_mentions = intl.formatMessage(messages.rovo_prompt_button_show_other_mentions);
88
- var html_other_mentions = intl.formatMessage(messages.rovo_prompt_message_show_other_mentions, {
89
- context: contextLong,
90
- url: url
91
- }, {
92
- ignoreTag: true
93
- });
94
- return {
95
- icon: /*#__PURE__*/React.createElement(AiChapterIcon, null),
96
- content: label_other_mentions,
97
- tooltipMessage: label_other_mentions,
98
- data: {
99
- name: label_other_mentions,
100
- dialogues: [],
101
- prompt: htmlToAdf(html_other_mentions)
102
- }
103
- };
104
- case RovoChatPromptKey.SUGGEST_IMPROVEMENT:
105
- var label_improvement = intl.formatMessage(messages.rovo_prompt_button_suggest_improvement, {
106
- context: contextShort
107
- });
108
- var html_improvement = intl.formatMessage(messages.rovo_prompt_message_suggest_improvement, {
109
- context: contextLong,
110
- url: url
111
- }, {
112
- ignoreTag: true
113
- });
114
- return {
115
- icon: /*#__PURE__*/React.createElement(AISearchIcon, null),
116
- content: label_improvement,
117
- tooltipMessage: label_improvement,
118
- data: {
119
- name: label_improvement,
120
- dialogues: [],
121
- prompt: htmlToAdf(html_improvement)
122
- }
123
- };
124
60
  case RovoChatPromptKey.SUMMARIZE_LINK:
125
61
  var label_summarize = intl.formatMessage(messages.ai_summarize);
126
62
  var html_summarize = intl.formatMessage(messages.rovo_prompt_message_summarize, {
@@ -1,7 +1,7 @@
1
1
  import { type MessageDescriptor } from 'react-intl';
2
2
  export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_title' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title' | 'direct_access_title' | 'direct_access_description' | 'direct_access' | 'access_exists_description' | 'not_found_description' | 'not_found_title';
3
- export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | 'rovo_prompt_context_confluence_page_short' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_context_jira_work_item_short' | 'rovo_prompt_button_recommend_other_sources' | 'rovo_prompt_message_recommend_other_sources' | 'rovo_prompt_button_show_other_mentions' | 'rovo_prompt_message_show_other_mentions' | 'rovo_prompt_button_suggest_improvement' | 'rovo_prompt_message_suggest_improvement' | 'rovo_prompt_message_summarize' | 'rovo_prompt_button_ask_rovo_anything' | 'rovo_prompt_message_ask_rovo_anything' | 'rovo_prompt_button_highlight_relevant_content' | 'rovo_prompt_message_highlight_relevant_content' | 'rovo_prompt_button_identify_key_trends' | 'rovo_prompt_message_identify_key_trends' | 'rovo_prompt_button_identify_key_points' | 'rovo_prompt_message_identify_key_points' | 'rovo_prompt_button_find_open_questions' | 'rovo_prompt_message_find_open_questions' | 'rovo_prompt_button_key_highlights' | 'rovo_prompt_message_key_highlights' | 'rovo_prompt_message_summarize_document' | 'rovo_prompt_message_summarize_presentation' | 'rovo_prompt_button_explain_code' | 'rovo_prompt_message_explain_code' | 'rovo_prompt_button_catch_up' | 'rovo_prompt_message_catch_up' | 'rovo_prompt_button_salesforce_prep' | 'rovo_prompt_message_salesforce_prep';
4
- export type MessageKey = 'assigned_to' | 'ai_summarize' | 'change_status' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summary_error_generic_rebrand' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action_rebrand' | 'ai_summary_action_description' | 'ai_summary_action_description_rebrand' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_link_account_success_flag_description' | 'connect_link_account_success_flag_title' | 'connect_link_account_success_flag_title_default' | 'connect_unauthorised_account_action' | 'connect_inline_social_proof' | 'social_proof_inline_cta_tag_high_with_context' | 'social_proof_inline_cta_tag_high_no_context' | 'social_proof_inline_cta_tag_low_with_context' | 'social_proof_inline_cta_tag_low_no_context' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project_descriptionGalaxia' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'rovo_actions_explore' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project_descriptionGalaxia' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewInProvider' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh' | 'connect_unauthorised_account_description_appify' | 'connect_unauthorised_account_description_no_provider_appify' | 'learn_more_about_connecting_account_experiment_shorter' | 'learn_more_about_connecting_account_appify' | 'rovo_summary_loading' | 'ai_disclaimer' | 'rovo_unauthorised_title' | 'rovo_unauthorised_title_no_provider' | 'rovo_unauthorised_feature_clear_link_names' | 'rovo_unauthorised_feature_understand_linked_docs' | 'rovo_unauthorised_feature_go_deeper_smart_suggestions' | 'rovo_unauthorised_connect_account' | 'rovo_unauthorised_not_now' | 'rovo_chat_action_section_header' | 'rovo_prompt_button_summarize_this' | 'rovo_prompt_button_ask_a_specific_question' | 'rovo_prompt_button_show_me_whats_relevant' | RovoChatActionMessageKey | 'pre_auth_block_social_proof_not_low' | 'pre_auth_block_social_proof_low';
3
+ export type RovoChatActionMessageKey = 'rovo_prompt_context_generic' | 'rovo_prompt_context_generic_plural' | 'rovo_prompt_context_confluence_page' | 'rovo_prompt_context_jira_work_item' | 'rovo_prompt_message_summarize' | 'rovo_prompt_button_ask_rovo_anything' | 'rovo_prompt_message_ask_rovo_anything' | 'rovo_prompt_button_highlight_relevant_content' | 'rovo_prompt_message_highlight_relevant_content' | 'rovo_prompt_button_identify_key_trends' | 'rovo_prompt_message_identify_key_trends' | 'rovo_prompt_button_identify_key_points' | 'rovo_prompt_message_identify_key_points' | 'rovo_prompt_button_find_open_questions' | 'rovo_prompt_message_find_open_questions' | 'rovo_prompt_button_key_highlights' | 'rovo_prompt_message_key_highlights' | 'rovo_prompt_message_summarize_document' | 'rovo_prompt_message_summarize_presentation' | 'rovo_prompt_button_explain_code' | 'rovo_prompt_message_explain_code' | 'rovo_prompt_button_catch_up' | 'rovo_prompt_message_catch_up' | 'rovo_prompt_button_salesforce_prep' | 'rovo_prompt_message_salesforce_prep';
4
+ export type MessageKey = 'assigned_to' | 'ai_summarize' | 'change_status' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summary_error_generic_rebrand' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action_rebrand' | 'ai_summary_action_description' | 'ai_summary_action_description_rebrand' | 'automation_action_title' | 'automation_action_tooltip' | 'automation_action_icon_label' | 'automation_action_confluence_page_modal_title' | 'automation_action_confluence_page_modal_description' | 'copy_summary_action' | 'copy_summary_action_description' | 'copied_summary_action_description' | 'beta' | 'cannot_find_link' | 'compass_applied_components_count' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_link_account_embed_teaser_button_next' | 'connect_link_account_embed_teaser_dot_label' | 'connect_link_account_embed_teaser_dot_row_label' | 'connect_link_account_embed_teaser_slide_1_description' | 'connect_link_account_embed_teaser_slide_1_title' | 'connect_link_account_embed_teaser_slide_2_description' | 'connect_link_account_embed_teaser_slide_2_title' | 'connect_link_account_embed_teaser_slide_3_description' | 'connect_link_account_embed_teaser_slide_3_title' | 'connect_link_account_success_flag_description' | 'connect_link_account_success_flag_title' | 'connect_link_account_success_flag_title_default' | 'connect_unauthorised_account_action' | 'connect_inline_social_proof' | 'social_proof_inline_cta_tag_high_with_context' | 'social_proof_inline_cta_tag_high_no_context' | 'social_proof_inline_cta_tag_low_with_context' | 'social_proof_inline_cta_tag_low_no_context' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project_descriptionGalaxia' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'rovo_actions_explore' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project_descriptionGalaxia' | 'unfollow_project' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | 'viewInProvider' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related' | 'generic_error_message' | 'related_links_modal_error_title' | 'related_links_modal_error_description' | 'related_links_modal_unavailable_title' | 'related_links_modal_unavailable_description' | 'related_links_modal_title' | 'related_links_view_related_urls' | 'related_links_view_related_links' | 'related_links_found_in' | 'related_links_includes_links_to' | 'related_links_not_found' | 'join_to_viewIssueTermRefresh' | 'open_issue_in_jiraIssueTermRefresh' | 'request_access_to_viewIssueTermRefresh' | 'team_members_count' | 'status_change_permission_errorIssueTermRefresh' | 'connect_unauthorised_account_description_appify' | 'connect_unauthorised_account_description_no_provider_appify' | 'learn_more_about_connecting_account_experiment_shorter' | 'learn_more_about_connecting_account_appify' | 'rovo_summary_loading' | 'ai_disclaimer' | 'rovo_unauthorised_title' | 'rovo_unauthorised_title_no_provider' | 'rovo_unauthorised_feature_clear_link_names' | 'rovo_unauthorised_feature_understand_linked_docs' | 'rovo_unauthorised_feature_go_deeper_smart_suggestions' | 'rovo_unauthorised_connect_account' | 'rovo_unauthorised_not_now' | 'rovo_chat_action_section_header' | 'rovo_prompt_button_summarize_this' | 'rovo_prompt_button_ask_a_specific_question' | 'rovo_prompt_button_show_me_whats_relevant' | RovoChatActionMessageKey | 'pre_auth_block_social_proof_not_low' | 'pre_auth_block_social_proof_low';
5
5
  type Messages = {
6
6
  [K in MessageKey]: MessageDescriptor;
7
7
  };
@@ -0,0 +1,39 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ import type { CarouselSize } from './types';
7
+ type CarouselSlideProps = {
8
+ /** Resolved description string (already injected with provider name) */
9
+ description: string;
10
+ /** Provider icon — a React element or an image URL */
11
+ icon?: React.ReactNode | string;
12
+ /** Alt for the icon, e.g. "Figma" */
13
+ iconLabel?: string;
14
+ /** Large hero image — a React element (e.g. SVG/img) or a URL string */
15
+ image: React.ReactNode | string;
16
+ /** Called when the user clicks a dot indicator to jump to that slide index */
17
+ onDotClick?: (index: number) => void;
18
+ /** Called when the user clicks the secondary "See next" button; omit on last slide */
19
+ onNextClick?: () => void;
20
+ /** Called when the user clicks the primary connect button */
21
+ onPrimaryButtonClick?: () => void;
22
+ /** Text label for the connect button (e.g. "Connect to Figma") */
23
+ primaryButtonLabel: string;
24
+ /**
25
+ * Layout size bucket derived from the carousel container's measured dimensions.
26
+ * Controls which elements are shown at different card sizes.
27
+ */
28
+ size: CarouselSize;
29
+ /** 0-based index of this slide */
30
+ slideIndex: number;
31
+ /** testId prefix */
32
+ testId?: string;
33
+ /** Resolved title string (already injected with provider name) */
34
+ title: string;
35
+ /** Total number of slides (for the dot indicators) */
36
+ totalSlides: number;
37
+ };
38
+ declare const CarouselSlide: ({ icon, iconLabel, title, description, image, primaryButtonLabel, onPrimaryButtonClick, onDotClick, onNextClick, slideIndex, totalSlides, size, testId, }: CarouselSlideProps) => React.JSX.Element;
39
+ export default CarouselSlide;
@@ -0,0 +1,22 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ import type { CarouselItem } from './types';
7
+ type CarouselProps = {
8
+ /** Provider icon element or URL — passed through to each slide */
9
+ icon?: React.ReactNode | string;
10
+ /** Alt for the icon, e.g. "Figma" */
11
+ iconLabel?: string;
12
+ /** Ordered list of teaser slides */
13
+ items: CarouselItem[];
14
+ /** Called when the user clicks the primary button */
15
+ onPrimaryButtonClick?: () => void;
16
+ /** Text for the auth button, e.g. "Connect to Figma" */
17
+ primaryButtonLabel: string;
18
+ /** testId prefix */
19
+ testId?: string;
20
+ };
21
+ declare const Carousel: ({ icon, iconLabel, items, onPrimaryButtonClick, primaryButtonLabel, testId, }: CarouselProps) => React.JSX.Element;
22
+ export default Carousel;
@@ -0,0 +1,26 @@
1
+ import type { ReactNode } from 'react';
2
+ /**
3
+ * Layout size bucket derived from the carousel container's pixel dimensions
4
+ * via ResizeObserver (replaces CSS @container queries which are lint-blocked).
5
+ *
6
+ * full — wide (> 400px) AND tall (> 140px): two-column layout with image panel
7
+ * compact — medium width/height: image hidden, button moves above title
8
+ * minimal — very small: description + dots hidden, button only
9
+ */
10
+ export type CarouselSize = 'full' | 'compact' | 'minimal';
11
+ export type CarouselItem = {
12
+ /**
13
+ * Body text describing the benefit.
14
+ * Pass a plain string for static copy, or a function that receives the
15
+ * provider name (e.g. "Google Drive") and returns the final string.
16
+ */
17
+ description: string;
18
+ /** Large hero image — either a React element (e.g. SVG) or an image URL */
19
+ image: ReactNode | string;
20
+ /**
21
+ * Title of the teaser slide.
22
+ * Pass a plain string for static copy, or a function that receives the
23
+ * provider name (e.g. "Google Drive") and returns the final string.
24
+ */
25
+ title: string;
26
+ };
@@ -1,5 +1,5 @@
1
1
  import React from 'react';
2
- import { RovoChatPromptKey } from '../../../../common/rovo-chat-utils';
2
+ import { type RovoChatPromptKey } from '../../../../common/rovo-chat-utils';
3
3
  import { type LinkActionProps } from '../types';
4
4
  type RovoChatActionProps = LinkActionProps & {
5
5
  prompts?: RovoChatPromptKey[];
@@ -5,5 +5,5 @@ import type { ActionBlockProps } from './types';
5
5
  * To replace container/index.tsx getPadding() with space token for primitives
6
6
  */
7
7
  export declare const getPrimitivesPaddingSpaceBySize: (size: SmartLinkSize) => "var(--ds-space-100)" | "var(--ds-space-200)" | "var(--ds-space-250)" | "var(--ds-space-300)";
8
- declare const ActionBlock: ({ blockRef, onClick: onClickCallback, size, spaceInline, className, testId, isAny3pRovoActionsExperimentOn, }: ActionBlockProps) => JSX.Element | null;
8
+ declare const ActionBlock: ({ blockRef, onClick: onClickCallback, size, spaceInline, className, testId, }: ActionBlockProps) => JSX.Element | null;
9
9
  export default ActionBlock;