@atlaskit/smart-card 46.22.3 → 46.23.0

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 (146) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/analytics.spec.yaml +6 -0
  3. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
  4. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
  5. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
  6. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
  7. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
  8. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
  9. package/dist/cjs/constants.js +2 -0
  10. package/dist/cjs/extractors/flexible/actions/extract-remix-action.js +53 -0
  11. package/dist/cjs/extractors/flexible/actions/index.js +11 -2
  12. package/dist/cjs/extractors/flexible/index.js +7 -3
  13. package/dist/cjs/messages.js +4 -9
  14. package/dist/cjs/utils/analytics/analytics.js +1 -1
  15. package/dist/cjs/utils/is-remix-action-enabled.js +48 -0
  16. package/dist/cjs/utils/use-remix-action-exposure.js +16 -0
  17. package/dist/cjs/view/BlockCard/views/ResolvedView.js +18 -13
  18. package/dist/cjs/view/EmbedCard/components/rovo-actions-footer/index.js +58 -10
  19. package/dist/cjs/view/EmbedCard/index.js +2 -0
  20. package/dist/cjs/view/EmbedCard/views/ResolvedView.js +23 -7
  21. package/dist/cjs/view/FlexibleCard/components/actions/remix-action/index.js +81 -0
  22. package/dist/cjs/view/FlexibleCard/components/blocks/action-block/index.js +3 -2
  23. package/dist/cjs/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -1
  24. package/dist/cjs/view/FlexibleCard/components/blocks/action-group/index.js +5 -1
  25. package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +10 -3
  26. package/dist/cjs/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -1
  27. package/dist/cjs/view/FlexibleCard/index.js +9 -3
  28. package/dist/cjs/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +9 -1
  29. package/dist/cjs/view/InlineCard/common/inline-card-action/index.js +70 -0
  30. package/dist/cjs/view/InlineCard/common/remix-action/index.compiled.css +5 -0
  31. package/dist/cjs/view/InlineCard/common/remix-action/index.js +77 -0
  32. package/dist/cjs/view/InlineCard/common/rovo-actions-cta/index.js +1 -24
  33. package/dist/cjs/view/LinkUrl/index.js +1 -1
  34. package/dist/cjs/view/common/rovo-chat-utils/index.js +0 -28
  35. package/dist/cjs/view/common/rovo-post-auth-prompts/index.js +1 -16
  36. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
  37. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
  38. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
  39. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
  40. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
  41. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
  42. package/dist/es2019/constants.js +2 -0
  43. package/dist/es2019/extractors/flexible/actions/extract-remix-action.js +48 -0
  44. package/dist/es2019/extractors/flexible/actions/index.js +12 -0
  45. package/dist/es2019/extractors/flexible/index.js +4 -0
  46. package/dist/es2019/messages.js +4 -9
  47. package/dist/es2019/utils/analytics/analytics.js +1 -1
  48. package/dist/es2019/utils/is-remix-action-enabled.js +39 -0
  49. package/dist/es2019/utils/use-remix-action-exposure.js +11 -0
  50. package/dist/es2019/view/BlockCard/views/ResolvedView.js +19 -14
  51. package/dist/es2019/view/EmbedCard/components/rovo-actions-footer/index.js +43 -11
  52. package/dist/es2019/view/EmbedCard/index.js +2 -0
  53. package/dist/es2019/view/EmbedCard/views/ResolvedView.js +22 -7
  54. package/dist/es2019/view/FlexibleCard/components/actions/remix-action/index.js +54 -0
  55. package/dist/es2019/view/FlexibleCard/components/blocks/action-block/index.js +3 -1
  56. package/dist/es2019/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -0
  57. package/dist/es2019/view/FlexibleCard/components/blocks/action-group/index.js +4 -1
  58. package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +9 -4
  59. package/dist/es2019/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -1
  60. package/dist/es2019/view/FlexibleCard/index.js +8 -1
  61. package/dist/es2019/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +9 -1
  62. package/dist/es2019/view/InlineCard/common/inline-card-action/index.js +61 -0
  63. package/dist/es2019/view/InlineCard/common/remix-action/index.compiled.css +5 -0
  64. package/dist/es2019/view/InlineCard/common/remix-action/index.js +50 -0
  65. package/dist/es2019/view/InlineCard/common/rovo-actions-cta/index.js +1 -24
  66. package/dist/es2019/view/LinkUrl/index.js +1 -1
  67. package/dist/es2019/view/common/rovo-chat-utils/index.js +0 -26
  68. package/dist/es2019/view/common/rovo-post-auth-prompts/index.js +1 -15
  69. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
  70. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
  71. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
  72. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
  73. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-remix-action-and-rovo-chat-action-opted-out--default.png +3 -0
  74. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-remix-action-experiment-on---default.png +3 -0
  75. package/dist/esm/constants.js +2 -0
  76. package/dist/esm/extractors/flexible/actions/extract-remix-action.js +47 -0
  77. package/dist/esm/extractors/flexible/actions/index.js +11 -2
  78. package/dist/esm/extractors/flexible/index.js +7 -3
  79. package/dist/esm/messages.js +4 -9
  80. package/dist/esm/utils/analytics/analytics.js +1 -1
  81. package/dist/esm/utils/is-remix-action-enabled.js +42 -0
  82. package/dist/esm/utils/use-remix-action-exposure.js +11 -0
  83. package/dist/esm/view/BlockCard/views/ResolvedView.js +19 -14
  84. package/dist/esm/view/EmbedCard/components/rovo-actions-footer/index.js +59 -11
  85. package/dist/esm/view/EmbedCard/index.js +2 -0
  86. package/dist/esm/view/EmbedCard/views/ResolvedView.js +23 -7
  87. package/dist/esm/view/FlexibleCard/components/actions/remix-action/index.js +72 -0
  88. package/dist/esm/view/FlexibleCard/components/blocks/action-block/index.js +3 -2
  89. package/dist/esm/view/FlexibleCard/components/blocks/action-group/action-group-item/index.js +2 -1
  90. package/dist/esm/view/FlexibleCard/components/blocks/action-group/index.js +5 -1
  91. package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +11 -4
  92. package/dist/esm/view/FlexibleCard/components/blocks/hover-card-footer-block/index.js +1 -1
  93. package/dist/esm/view/FlexibleCard/index.js +9 -3
  94. package/dist/esm/view/InlineCard/ResolvedView/InlineCardResolvedViewFunctional.js +9 -1
  95. package/dist/esm/view/InlineCard/common/inline-card-action/index.js +61 -0
  96. package/dist/esm/view/InlineCard/common/remix-action/index.compiled.css +5 -0
  97. package/dist/esm/view/InlineCard/common/remix-action/index.js +70 -0
  98. package/dist/esm/view/InlineCard/common/rovo-actions-cta/index.js +1 -24
  99. package/dist/esm/view/LinkUrl/index.js +1 -1
  100. package/dist/esm/view/common/rovo-chat-utils/index.js +0 -28
  101. package/dist/esm/view/common/rovo-post-auth-prompts/index.js +1 -16
  102. package/dist/types/common/analytics/generated/analytics.types.d.ts +11 -1
  103. package/dist/types/constants.d.ts +2 -0
  104. package/dist/types/extractors/flexible/actions/extract-remix-action.d.ts +15 -0
  105. package/dist/types/extractors/flexible/actions/index.d.ts +3 -1
  106. package/dist/types/extractors/flexible/index.d.ts +1 -1
  107. package/dist/types/messages.d.ts +1 -1
  108. package/dist/types/state/flexible-ui-context/types.d.ts +5 -0
  109. package/dist/types/state/hooks/use-invoke-client-action/types.d.ts +1 -1
  110. package/dist/types/utils/is-remix-action-enabled.d.ts +15 -0
  111. package/dist/types/utils/use-remix-action-exposure.d.ts +2 -0
  112. package/dist/types/view/Card/types.d.ts +10 -1
  113. package/dist/types/view/EmbedCard/components/rovo-actions-footer/index.d.ts +5 -4
  114. package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +2 -0
  115. package/dist/types/view/FlexibleCard/components/actions/remix-action/index.d.ts +4 -0
  116. package/dist/types/view/FlexibleCard/components/blocks/action-group/index.d.ts +1 -1
  117. package/dist/types/view/FlexibleCard/components/blocks/action-group/types.d.ts +4 -0
  118. package/dist/types/view/FlexibleCard/components/blocks/types.d.ts +8 -2
  119. package/dist/types/view/FlexibleCard/types.d.ts +2 -1
  120. package/dist/types/view/InlineCard/common/inline-card-action/index.d.ts +11 -0
  121. package/dist/types/view/InlineCard/common/remix-action/index.d.ts +9 -0
  122. package/dist/types/view/common/rovo-chat-utils/index.d.ts +1 -2
  123. package/dist/types/view/common/rovo-post-auth-prompts/index.d.ts +1 -10
  124. package/package.json +2 -2
  125. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
  126. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
  127. package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
  128. package/dist/cjs/utils/is-rovo-chat-action-visualize-enabled.js +0 -43
  129. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
  130. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
  131. package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
  132. package/dist/es2019/utils/is-rovo-chat-action-visualize-enabled.js +0 -34
  133. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/block-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
  134. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/embed-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
  135. package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/inline-card-google-sheets-with-visualize-rovo-action-experiment-on---default.png +0 -3
  136. package/dist/esm/utils/is-rovo-chat-action-visualize-enabled.js +0 -37
  137. package/dist/types/utils/is-rovo-chat-action-visualize-enabled.d.ts +0 -18
  138. /package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{block-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → block-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
  139. /package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{embed-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → embed-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
  140. /package/dist/cjs/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{inline-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → inline-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
  141. /package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{block-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → block-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
  142. /package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{embed-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → embed-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
  143. /package/dist/es2019/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{inline-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → inline-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
  144. /package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{block-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → block-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
  145. /package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{embed-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → embed-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
  146. /package/dist/esm/__tests__/vr-tests/__snapshots__/google-sheets-visualize/{inline-card-google-sheets-without-visualize-rovo-action-experiment-off---default.png → inline-card-google-sheets-without-remix-action-experiment-off---default.png} +0 -0
@@ -0,0 +1,61 @@
1
+ import _extends from "@babel/runtime/helpers/extends";
2
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
+ var _excluded = ["testId"];
4
+ import React, { useMemo } from 'react';
5
+ import { usePlugins } from '@atlaskit/link-provider/use-plugins';
6
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
7
+ import extractRemixAction from '../../../../extractors/flexible/actions/extract-remix-action';
8
+ import useInlineTailoredAction from '../../../../state/hooks/use-inline-tailored-actions';
9
+ import { useSmartCardState } from '../../../../state/store';
10
+ import InlineRemixAction from '../remix-action';
11
+ import { InlineRovoActionButton } from '../rovo-actions-cta';
12
+ var InlineChatAction = function InlineChatAction(_ref) {
13
+ var actionOptions = _ref.actionOptions,
14
+ showHoverPreview = _ref.showHoverPreview,
15
+ testId = _ref.testId,
16
+ url = _ref.url;
17
+ var _useInlineTailoredAct = useInlineTailoredAction(url, showHoverPreview, actionOptions),
18
+ isEnabled = _useInlineTailoredAct.isEnabled;
19
+ return isEnabled ? /*#__PURE__*/React.createElement(InlineRovoActionButton, {
20
+ actionOptions: actionOptions,
21
+ testId: "".concat(testId, "-rovo-actions-cta"),
22
+ url: url
23
+ }) : null;
24
+ };
25
+ var InlineCardActionWithRemix = function InlineCardActionWithRemix(props) {
26
+ var actionOptions = props.actionOptions,
27
+ id = props.id,
28
+ testId = props.testId,
29
+ url = props.url;
30
+ var _usePlugins = usePlugins(),
31
+ remix = _usePlugins.remix;
32
+ var _useSmartCardState = useSmartCardState(url !== null && url !== void 0 ? url : ''),
33
+ details = _useSmartCardState.details;
34
+ var data = useMemo(function () {
35
+ return details ? extractRemixAction({
36
+ response: details,
37
+ url: url,
38
+ actionOptions: actionOptions,
39
+ remix: remix,
40
+ appearance: 'inline',
41
+ id: id
42
+ }) : undefined;
43
+ }, [details, url, actionOptions, remix, id]);
44
+
45
+ // Inline cards have one action slot. Eligible Remix takes priority over chat.
46
+ return data && remix ? /*#__PURE__*/React.createElement(InlineRemixAction, {
47
+ data: data,
48
+ remix: remix,
49
+ testId: "".concat(testId, "-remix-action")
50
+ }) : /*#__PURE__*/React.createElement(InlineChatAction, props);
51
+ };
52
+ export var InlineCardAction = function InlineCardAction(_ref2) {
53
+ var _ref2$testId = _ref2.testId,
54
+ testId = _ref2$testId === void 0 ? 'inline-card' : _ref2$testId,
55
+ props = _objectWithoutProperties(_ref2, _excluded);
56
+ return fg('platform_sl_3p_auth_visualize_killswitch') ? /*#__PURE__*/React.createElement(InlineCardActionWithRemix, _extends({}, props, {
57
+ testId: testId
58
+ })) : /*#__PURE__*/React.createElement(InlineChatAction, _extends({}, props, {
59
+ testId: testId
60
+ }));
61
+ };
@@ -0,0 +1,5 @@
1
+ ._19bv12x7{padding-left:var(--ds-space-075,6px)}
2
+ ._19pk1i6y{margin-top:var(--ds-space-negative-025,-2px)}
3
+ ._1e0c116y{display:inline-flex}
4
+ ._4cvr1h6o{align-items:center}
5
+ ._s7n4nkob{vertical-align:middle}
@@ -0,0 +1,70 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.4 */
2
+ import _asyncToGenerator from "@babel/runtime/helpers/asyncToGenerator";
3
+ import _defineProperty from "@babel/runtime/helpers/defineProperty";
4
+ import "./index.compiled.css";
5
+ import { ax, ix } from "@compiled/react/runtime";
6
+ import _regeneratorRuntime from "@babel/runtime/regenerator";
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
+ import React from 'react';
10
+ import { useIntl } from 'react-intl';
11
+ import RemixIcon from '@atlaskit/icon-lab/core/ai-generative-remix';
12
+ import { Box } from '@atlaskit/primitives/compiled/box';
13
+ import { Text } from '@atlaskit/primitives/compiled/text';
14
+ import { messages } from '../../../../messages';
15
+ import useInvokeClientAction from '../../../../state/hooks/use-invoke-client-action';
16
+ import { useRemixActionExposure } from '../../../../utils/use-remix-action-exposure';
17
+ import { ActionButton } from '../action-button';
18
+ var styles = {
19
+ text: "_19bv12x7 _1e0c116y _4cvr1h6o _s7n4nkob _19pk1i6y"
20
+ };
21
+ var InlineRemixAction = function InlineRemixAction(_ref) {
22
+ var data = _ref.data,
23
+ remix = _ref.remix,
24
+ _ref$testId = _ref.testId,
25
+ testId = _ref$testId === void 0 ? 'inline-remix-action' : _ref$testId;
26
+ var intl = useIntl();
27
+ var invoke = useInvokeClientAction({});
28
+ var label = intl.formatMessage(messages.rovo_prompt_button_remix);
29
+ useRemixActionExposure(true);
30
+ return /*#__PURE__*/React.createElement(ActionButton, {
31
+ "aria-label": label,
32
+ testId: testId,
33
+ onClick: function onClick(event) {
34
+ event.preventDefault();
35
+ event.stopPropagation();
36
+ var anchorElement = event.currentTarget;
37
+ void invoke(_objectSpread(_objectSpread({}, data.invokeAction), {}, {
38
+ actionFn: function () {
39
+ var _actionFn = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee() {
40
+ return _regeneratorRuntime.wrap(function (_context) {
41
+ while (1) switch (_context.prev = _context.next) {
42
+ case 0:
43
+ return _context.abrupt("return", remix.open({
44
+ anchorElement: anchorElement,
45
+ url: data.url
46
+ }));
47
+ case 1:
48
+ case "end":
49
+ return _context.stop();
50
+ }
51
+ }, _callee);
52
+ }));
53
+ function actionFn() {
54
+ return _actionFn.apply(this, arguments);
55
+ }
56
+ return actionFn;
57
+ }()
58
+ }));
59
+ }
60
+ }, /*#__PURE__*/React.createElement(RemixIcon, {
61
+ label: "",
62
+ size: "small"
63
+ }), /*#__PURE__*/React.createElement(Box, {
64
+ as: "span",
65
+ xcss: styles.text
66
+ }, /*#__PURE__*/React.createElement(Text, {
67
+ size: "small"
68
+ }, label)));
69
+ };
70
+ export default InlineRemixAction;
@@ -18,7 +18,6 @@ import useInvokeClientAction from '../../../../state/hooks/use-invoke-client-act
18
18
  import useRovoChat from '../../../../state/hooks/use-rovo-chat';
19
19
  import useRovoConfig from '../../../../state/hooks/use-rovo-config';
20
20
  import { useSmartCardState } from '../../../../state/store';
21
- import { isRovoChatActionVisualizeEnabled } from '../../../../utils/is-rovo-chat-action-visualize-enabled';
22
21
  import { getPromptAction, RovoChatPromptKey } from '../../../common/rovo-chat-utils';
23
22
  import { ActionButton } from '../action-button';
24
23
  import { OneClickChatSpotlightLoader } from '../one-click-chat-spotlight/async';
@@ -57,14 +56,6 @@ var InlineRovoActionButtonLegacy = function InlineRovoActionButtonLegacy(_ref) {
57
56
  switch (extensionKey) {
58
57
  case 'google-object-provider':
59
58
  if ((_cardState$details = cardState.details) !== null && _cardState$details !== void 0 && (_cardState$details = _cardState$details.data) !== null && _cardState$details !== void 0 && (_cardState$details = _cardState$details['@type']) !== null && _cardState$details !== void 0 && _cardState$details.includes('schema:SpreadsheetDigitalDocument')) {
60
- // Only evaluate Visualize (and fire exposure) when the Rovo chat action is available.
61
- if (rovoChatAction && isRovoChatActionVisualizeEnabled({
62
- extensionKey: extensionKey,
63
- product: rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product,
64
- response: cardState.details
65
- })) {
66
- return RovoChatPromptKey.VISUALIZE;
67
- }
68
59
  return;
69
60
  }
70
61
  if ((_cardState$details2 = cardState.details) !== null && _cardState$details2 !== void 0 && (_cardState$details2 = _cardState$details2.data) !== null && _cardState$details2 !== void 0 && (_cardState$details2 = _cardState$details2['@type']) !== null && _cardState$details2 !== void 0 && _cardState$details2.includes('schema:PresentationDigitalDocument')) {
@@ -153,14 +144,6 @@ var InlineRovoActionButtonWithSpotlight = function InlineRovoActionButtonWithSpo
153
144
  var promptKey = useMemo(function () {
154
145
  var _cardState$details3, _cardState$details4;
155
146
  if (extensionKey === 'google-object-provider' && (_cardState$details3 = cardState.details) !== null && _cardState$details3 !== void 0 && (_cardState$details3 = _cardState$details3.data) !== null && _cardState$details3 !== void 0 && (_cardState$details3 = _cardState$details3['@type']) !== null && _cardState$details3 !== void 0 && _cardState$details3.includes('schema:SpreadsheetDigitalDocument')) {
156
- // Only evaluate Visualize (and fire exposure) when the Rovo chat action is available.
157
- if (rovoChatAction && isRovoChatActionVisualizeEnabled({
158
- extensionKey: extensionKey,
159
- product: rovoConfig === null || rovoConfig === void 0 ? void 0 : rovoConfig.product,
160
- response: cardState.details
161
- })) {
162
- return RovoChatPromptKey.VISUALIZE;
163
- }
164
147
  return;
165
148
  }
166
149
  switch (extensionKey) {
@@ -221,7 +204,7 @@ var InlineRovoActionButtonWithSpotlight = function InlineRovoActionButtonWithSpo
221
204
  event.preventDefault();
222
205
  event.stopPropagation();
223
206
  invokePrompt();
224
- }, [invokePrompt]);
207
+ }, [invokePrompt, promptKey]);
225
208
  var button = promptData && content ? /*#__PURE__*/React.createElement(ActionButton, {
226
209
  onClick: handleClick,
227
210
  testId: testId
@@ -230,12 +213,6 @@ var InlineRovoActionButtonWithSpotlight = function InlineRovoActionButtonWithSpo
230
213
  }, /*#__PURE__*/React.createElement(Text, {
231
214
  size: "small"
232
215
  }, content))) : null;
233
-
234
- // Visualize is not part of the spotlight: its copy is generic ("See takeaways") and Sheets
235
- // links are excluded from the spotlight experiment, so render the plain button.
236
- if (promptKey === RovoChatPromptKey.VISUALIZE) {
237
- return button;
238
- }
239
216
  return button && isRovoChatEnabled && rovoChatAction !== null && rovoChatAction !== void 0 && rovoChatAction.invokeAction ? /*#__PURE__*/React.createElement(OneClickChatSpotlightLoader, {
240
217
  key: url,
241
218
  url: url,
@@ -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: "46.22.2",
15
+ packageVersion: "46.22.3",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var LinkUrl = function LinkUrl(_ref) {
@@ -1,11 +1,7 @@
1
- import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
- 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; }
3
- 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; }
4
1
  import React from 'react';
5
2
  import AiSearchIcon from '@atlaskit/icon-lab/core/ai-search';
6
3
  import AiChatIcon from '@atlaskit/icon/core/ai-chat';
7
4
  import AiGenerativeTextSummaryIcon from '@atlaskit/icon/core/ai-generative-text-summary';
8
- import ChartBarIcon from '@atlaskit/icon/core/chart-bar';
9
5
  import RovoChatIcon from '@atlaskit/icon/core/rovo-chat';
10
6
  import { RovoIcon } from '@atlaskit/logo/rovo/icon';
11
7
  import { fg } from '@atlaskit/platform-feature-flags/fg';
@@ -30,7 +26,6 @@ export var RovoChatPromptKey = /*#__PURE__*/function (RovoChatPromptKey) {
30
26
  RovoChatPromptKey["EXPLAIN_CODE"] = "explain-code";
31
27
  RovoChatPromptKey["CATCH_UP"] = "catch-up";
32
28
  RovoChatPromptKey["SALESFORCE_PREP"] = "salesforce-prep";
33
- RovoChatPromptKey["VISUALIZE"] = "visualize";
34
29
  return RovoChatPromptKey;
35
30
  }({});
36
31
  var getContext = function getContext(intl, product) {
@@ -373,28 +368,5 @@ export var getPromptAction = function getPromptAction(_ref) {
373
368
  size: iconSize
374
369
  })
375
370
  };
376
- case RovoChatPromptKey.VISUALIZE:
377
- var label_visualize = intl.formatMessage(messages.rovo_prompt_button_visualize);
378
- var html_visualize = intl.formatMessage(messages.rovo_prompt_message_visualize, {
379
- url: url
380
- }, {
381
- ignoreTag: true
382
- });
383
- var visualizeIconProps = _objectSpread({
384
- label: label_visualize,
385
- size: iconSize
386
- }, cardAppearance === CardDisplay.HoverCardPreview ? {
387
- spacing: 'spacious'
388
- } : {});
389
- return {
390
- content: label_visualize,
391
- tooltipMessage: label_visualize,
392
- data: {
393
- name: label_visualize,
394
- dialogues: [],
395
- prompt: htmlToAdf(html_visualize)
396
- },
397
- icon: /*#__PURE__*/React.createElement(ChartBarIcon, visualizeIconProps)
398
- };
399
371
  }
400
372
  };
@@ -1,24 +1,9 @@
1
- import { isRovoChatActionVisualizeEnabled } from '../../../utils/is-rovo-chat-action-visualize-enabled';
2
1
  import { RovoChatPromptKey } from '../rovo-chat-utils';
3
2
  export var getRovoPostAuthPromptKeys = function getRovoPostAuthPromptKeys(_ref) {
4
- var extensionKey = _ref.extensionKey,
5
- _ref$isRovoChatAction = _ref.isRovoChatActionShown,
6
- isRovoChatActionShown = _ref$isRovoChatAction === void 0 ? false : _ref$isRovoChatAction,
7
- product = _ref.product,
8
- response = _ref.response;
3
+ var extensionKey = _ref.extensionKey;
9
4
  var defaultPrompts = [RovoChatPromptKey.KEY_HIGHLIGHTS];
10
5
  if (extensionKey === 'github-object-provider' || extensionKey === 'gitlab-object-provider') {
11
6
  return [RovoChatPromptKey.EXPLAIN_CODE].concat(defaultPrompts);
12
7
  }
13
- if (isRovoChatActionShown && isRovoChatActionVisualizeEnabled({
14
- extensionKey: extensionKey,
15
- product: product,
16
- response: response
17
- })) {
18
- // Visualize goes first (PM decision). The embed Rovo actions footer hides every prompt after
19
- // the first below 320px (HIDE_SECONDARY_ACTIONS_WIDTH), so this keeps Visualize visible on
20
- // narrow embeds whenever exposure fires.
21
- return [RovoChatPromptKey.VISUALIZE, RovoChatPromptKey.SUMMARIZE_DOCUMENT].concat(defaultPrompts);
22
- }
23
8
  return [RovoChatPromptKey.SUMMARIZE_DOCUMENT].concat(defaultPrompts);
24
9
  };
@@ -3,7 +3,7 @@
3
3
  *
4
4
  * Generates Typescript types for analytics events from analytics.spec.yaml
5
5
  *
6
- * @codegen <<SignedSource::1a4d6462823a71e496639ae84caaae95>>
6
+ * @codegen <<SignedSource::a05096f79880ea0ccdaf8dd61aef67eb>>
7
7
  * @codegenCommand afm workspace @atlassian/analytics-tooling analytics:codegen smart-card
8
8
  */
9
9
  export type PackageMetaDataContextType = {
@@ -86,6 +86,13 @@ export type ButtonClickedRovoChatPromptAttributesType = {
86
86
  prompt?: string | null;
87
87
  interactionSource?: 'spotlightCta' | 'inlineAction' | null;
88
88
  };
89
+ export type ButtonClickedRemixAttributesType = {
90
+ actionType?: string | null;
91
+ id?: string | null;
92
+ definitionId?: string | null;
93
+ display?: 'inline' | 'block' | 'embed' | 'embedPreview' | 'flexible' | 'hoverCardPreview' | 'url' | null;
94
+ resourceType?: string | null;
95
+ };
89
96
  export type ButtonClickedCopySummaryAttributesType = {};
90
97
  export type SummaryViewedAttributesType = {
91
98
  fromCache?: boolean | null;
@@ -324,6 +331,9 @@ export type AnalyticsEventAttributes = {
324
331
  /**
325
332
  * Fired when sending prompt to RovoChat via click */
326
333
  'ui.button.clicked.rovoChatPrompt': ButtonClickedRovoChatPromptAttributesType;
334
+ /**
335
+ * Fired when Remix is opened via click */
336
+ 'ui.button.clicked.remix': ButtonClickedRemixAttributesType;
327
337
  /**
328
338
  * fired when the copy ai summary button is clicked */
329
339
  'ui.button.clicked.copySummary': ButtonClickedCopySummaryAttributesType;
@@ -143,6 +143,7 @@ export declare enum ActionName {
143
143
  }
144
144
  export declare enum InternalActionName {
145
145
  AISummaryAction = "AISummaryAction",
146
+ RemixAction = "RemixAction",
146
147
  UnresolvedAction = "UnresolvedAction",
147
148
  ViewRelatedLinksAction = "ViewRelatedLinksAction"
148
149
  }
@@ -235,6 +236,7 @@ export declare enum CardAction {
235
236
  DownloadAction = "DownloadAction",
236
237
  FollowAction = "FollowAction",
237
238
  PreviewAction = "PreviewAction",
239
+ RemixAction = "RemixAction",
238
240
  RovoChatAction = "RovoChatAction",
239
241
  ViewAction = "ViewAction"
240
242
  }
@@ -0,0 +1,15 @@
1
+ import type { JsonLd } from '@atlaskit/json-ld-types/jsonld';
2
+ import type { LinkProviderRemixPlugin } from '@atlaskit/link-provider/types';
3
+ import type { RemixActionData } from '../../../state/flexible-ui-context/types';
4
+ import { type InternalCardActionOptions as CardActionOptions } from '../../../view/Card/types';
5
+ import type { FlexibleCardProps } from '../../../view/FlexibleCard/types';
6
+ type ExtractRemixActionParam = {
7
+ actionOptions?: CardActionOptions;
8
+ appearance?: FlexibleCardProps['appearance'];
9
+ id?: string;
10
+ remix?: LinkProviderRemixPlugin;
11
+ response: JsonLd.Response;
12
+ url?: string;
13
+ };
14
+ declare const extractRemixAction: ({ actionOptions, appearance, id, remix, response, url, }: ExtractRemixActionParam) => RemixActionData | undefined;
15
+ export default extractRemixAction;
@@ -1,4 +1,5 @@
1
1
  import type { JsonLd } from '@atlaskit/json-ld-types/jsonld';
2
+ import type { LinkProviderRemixPlugin } from '@atlaskit/link-provider/types';
2
3
  import type { ProductType } from '@atlaskit/linking-common/types';
3
4
  import { type FireEventFunction } from '../../../common/analytics/types';
4
5
  import { type FlexibleUiActions } from '../../../state/flexible-ui-context/types';
@@ -30,9 +31,10 @@ export type ExtractActionsParam = {
30
31
  }) => void;
31
32
  origin?: AnalyticsOrigin;
32
33
  product?: ProductType;
34
+ remix?: LinkProviderRemixPlugin;
33
35
  response: JsonLd.Response;
34
36
  rovoConfig?: RovoConfig;
35
37
  transformUrl?: TransformUrlFn;
36
38
  url?: string;
37
39
  };
38
- export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, product, response, rovoConfig, transformUrl, url, isPreviewPanelAvailable, isPreviewRestricted, openPreviewPanel, }: ExtractActionsParam) => FlexibleUiActions | undefined;
40
+ export declare const extractFlexibleCardActions: ({ actionOptions, aiSummaryConfig, appearance, fireEvent, id, origin, product, remix, response, rovoConfig, transformUrl, url, isPreviewPanelAvailable, isPreviewRestricted, openPreviewPanel, }: ExtractActionsParam) => FlexibleUiActions | undefined;
@@ -1,4 +1,4 @@
1
1
  import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
2
2
  import { type ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
3
- declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, onAuxClick, onContextMenu, origin, product, resolve, rovoConfig, actionOptions, response, status, aiSummaryConfig, isPreviewPanelAvailable, isPreviewRestricted, openPreviewPanel, transformUrl, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
3
+ declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, onClick, onAuxClick, onContextMenu, origin, product, resolve, rovoConfig, remix, actionOptions, response, status, aiSummaryConfig, isPreviewPanelAvailable, isPreviewRestricted, openPreviewPanel, transformUrl, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
4
4
  export default extractFlexibleUiContext;
@@ -1,6 +1,6 @@
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_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' | 'rovo_prompt_button_visualize' | 'rovo_prompt_message_visualize';
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' | 'rovo_prompt_button_remix';
4
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_3p_account' | 'connect_inline_provider_to_update' | 'connect_inline_social_proof' | 'connect_inline_to_update' | '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_with_title' | 'preview_modal' | 'preview_modal_with_title' | 'preview_panel' | 'preview_panel_with_title' | '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;
@@ -299,6 +299,7 @@ export type FlexibleUiActions = {
299
299
  [ActionName.PreviewAction]?: PreviewActionData;
300
300
  [ActionName.RovoChatAction]?: RovoChatActionData;
301
301
  [InternalActionName.AISummaryAction]?: AISummaryActionData;
302
+ [InternalActionName.RemixAction]?: RemixActionData;
302
303
  [InternalActionName.UnresolvedAction]?: UnresolvedActionData;
303
304
  [InternalActionName.ViewRelatedLinksAction]?: ViewRelatedLinksActionData;
304
305
  };
@@ -330,6 +331,10 @@ export type RovoChatActionData = {
330
331
  product?: ProductType;
331
332
  url?: string;
332
333
  };
334
+ export type RemixActionData = {
335
+ invokeAction: Omit<InvokeClientActionProps, 'actionFn' | 'prompt'>;
336
+ url: string;
337
+ };
333
338
  export type UnresolvedActionData = RetryOptions;
334
339
  export type ViewRelatedLinksActionData = {
335
340
  ari: string;
@@ -7,7 +7,7 @@ export type UseInvokeClientActionProps = {
7
7
  */
8
8
  fireEvent?: FireEventFunction;
9
9
  };
10
- export type InvokeClientActionSubjectId = 'copyLink' | 'downloadDocument' | 'invokePreviewScreen' | 'rovoChatPrompt' | 'shortcutGoToLink';
10
+ export type InvokeClientActionSubjectId = 'copyLink' | 'downloadDocument' | 'invokePreviewScreen' | 'remix' | 'rovoChatPrompt' | 'shortcutGoToLink';
11
11
  type InvokeRovoChatClientActionProps = {
12
12
  interactionSource?: RovoInteractionSource;
13
13
  prompt?: string;
@@ -0,0 +1,15 @@
1
+ import type { JsonLd } from '@atlaskit/json-ld-types/jsonld';
2
+ import type { LinkProviderRemixPlugin } from '@atlaskit/link-provider/types';
3
+ type IsRemixActionEnabledOptions = {
4
+ extensionKey?: string;
5
+ /** The `remix` link provider plugin, from `usePlugins`. */
6
+ remix?: LinkProviderRemixPlugin;
7
+ response?: JsonLd.Response;
8
+ };
9
+ /**
10
+ * Whether the Remix action is offered for a resolved link.
11
+ *
12
+ * This check does not record exposure. The rendered Remix control owns exposure.
13
+ */
14
+ export declare const isRemixActionEnabled: ({ extensionKey, remix, response, }: IsRemixActionEnabledOptions) => boolean;
15
+ export {};
@@ -0,0 +1,2 @@
1
+ /** Record exposure only once the eligible Remix control has been committed. */
2
+ export declare const useRemixActionExposure: (isRendered: boolean) => void;
@@ -57,7 +57,16 @@ export type CardActionVisibilityOptions = {
57
57
  * This can be used for experiment before the prop become public API after experiment is successful.
58
58
  * Warning: Internal prop can be changed/refactored anytime without notice.
59
59
  */
60
- export type InternalCardActionOptions = CardActionOptions & {};
60
+ export type InternalCardActionOptions = CardActionOptions & {
61
+ /**
62
+ * Remix action opens Google Sheets links in Remix.
63
+ *
64
+ * This is an internal experiment feature and maybe removed any given time.
65
+ */
66
+ remixAction?: {
67
+ optIn: boolean;
68
+ };
69
+ };
61
70
  interface ActionProps {
62
71
  /**
63
72
  * Configure visibility of actions available.
@@ -3,12 +3,13 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import type { RovoChatActionData } from '../../../../state/flexible-ui-context/types';
7
- import { RovoChatPromptKey } from '../../../common/rovo-chat-utils';
6
+ import type { RovoChatActionData, RemixActionData } from '../../../../state/flexible-ui-context/types';
7
+ import { type RovoChatPromptKey } from '../../../common/rovo-chat-utils';
8
8
  type EmbedRovoActionsFooterProps = {
9
- actionData: RovoChatActionData;
9
+ actionData?: RovoChatActionData;
10
10
  prompts: RovoChatPromptKey[];
11
+ remixActionData?: RemixActionData;
11
12
  testId?: string;
12
13
  };
13
- declare const EmbedRovoActionsFooter: ({ actionData, prompts, testId, }: EmbedRovoActionsFooterProps) => React.JSX.Element | null;
14
+ declare const EmbedRovoActionsFooter: ({ actionData, remixActionData, prompts, testId, }: EmbedRovoActionsFooterProps) => React.JSX.Element | null;
14
15
  export default EmbedRovoActionsFooter;
@@ -22,6 +22,8 @@ export interface EmbedCardResolvedViewProps {
22
22
  frameStyle?: FrameStyle;
23
23
  /** For image icons in the title, whether to hide the loading skeleton while the image is loading. */
24
24
  hideIconLoadingSkeleton?: boolean;
25
+ /** The ID used to correlate Smart Link analytics events. */
26
+ id?: string;
25
27
  inheritDimensions?: boolean;
26
28
  /** A flag that determines whether the card is selected in edit mode. */
27
29
  isSelected?: boolean;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { LinkActionProps } from '../types';
3
+ declare const RemixAction: ({ onClick: onClickCallback, ...props }: LinkActionProps) => React.JSX.Element | null;
4
+ export default RemixAction;
@@ -10,5 +10,5 @@ import { type ActionGroupProps } from './types';
10
10
  * @param {ActionGroupProps} ActionGroupProps
11
11
  * @see Action
12
12
  */
13
- declare const ActionGroup: ({ items, size, appearance, visibleButtonsNum, onDropdownOpenChange, containerWidth, }: ActionGroupProps) => JSX.Element | null;
13
+ declare const ActionGroup: ({ items, size, appearance, visibleButtonsNum, showRemainingActionsInOverflow, onDropdownOpenChange, containerWidth, }: ActionGroupProps) => JSX.Element | null;
14
14
  export default ActionGroup;
@@ -23,6 +23,10 @@ export type ActionGroupProps = {
23
23
  * Called when the action dropdown menu (if present) is open/closed.
24
24
  */
25
25
  onDropdownOpenChange?: (isOpen: boolean) => void;
26
+ /**
27
+ * Include every action beyond the inline slots in the overflow menu.
28
+ */
29
+ showRemainingActionsInOverflow?: boolean;
26
30
  /**
27
31
  * Determines the default size of the actions within the Action Group.
28
32
  */
@@ -1,6 +1,7 @@
1
1
  import { type ReactNode, type Ref } from 'react';
2
2
  import type { LozengeProps as AtlaskitLozengeProps } from '@atlaskit/lozenge/lozenge';
3
- import { type ActionName, type CardDisplay, type ElementName, type SmartLinkDirection, type SmartLinkSize } from '../../../../constants';
3
+ import { type ActionName, type InternalActionName, type CardDisplay, type ElementName, type SmartLinkDirection, type SmartLinkSize } from '../../../../constants';
4
+ import type { RovoChatPromptKey } from '../../../common/rovo-chat-utils';
4
5
  import { type ActionProps } from '../actions/action/types';
5
6
  import type { AssignedToGroupElementProps } from '../elements/assigned-to-group-element';
6
7
  import type { BaseAvatarGroupElementProps } from '../elements/common/base-avatar-group-element';
@@ -176,6 +177,7 @@ export type BaseDataActionItem = {
176
177
  */
177
178
  export type NamedDataActionItem = BaseDataActionItem & {
178
179
  name: ActionName.FollowAction | ActionName.PreviewAction | ActionName.DownloadAction | ActionName.AutomationAction | ActionName.CopyLinkAction | ActionName.RovoChatAction;
180
+ prompts?: RovoChatPromptKey[];
179
181
  } & Pick<ActionProps, 'iconSize'>;
180
182
  /**
181
183
  * This represents an action that does not fetch data where Icon and Content are provided implicitly.
@@ -192,7 +194,10 @@ export type CustomActionItem = BaseActionItem & {
192
194
  href?: string;
193
195
  name: ActionName.CustomAction;
194
196
  } & ((Required<Pick<ActionProps, 'icon' | 'iconPosition'>> & Pick<ActionProps, 'content'>) | ((Required<Pick<ActionProps, 'content'>> & Pick<ActionProps, 'icon' | 'iconPosition'>) & Pick<ActionProps, 'tooltipMessage'>));
195
- export type ActionItem = (NamedActionItem | NamedDataActionItem | CustomActionItem) & {
197
+ type InternalDataActionItem = Omit<BaseDataActionItem, 'name'> & {
198
+ name: InternalActionName.RemixAction;
199
+ } & Pick<ActionProps, 'iconSize'>;
200
+ export type ActionItem = (NamedActionItem | NamedDataActionItem | InternalDataActionItem | CustomActionItem) & {
196
201
  entryPointWrapper?: React.FC<{
197
202
  children: React.ReactNode;
198
203
  }>;
@@ -467,3 +472,4 @@ export type UserAttributes = {
467
472
  export type HostName = {
468
473
  name: ElementName.HostName;
469
474
  };
475
+ export {};
@@ -1,5 +1,5 @@
1
1
  import { type MessageDescriptor } from 'react-intl';
2
- import type { CardProviderRenderers } from '@atlaskit/link-provider/types';
2
+ import type { CardProviderRenderers, LinkProviderRemixPlugin } from '@atlaskit/link-provider/types';
3
3
  import type { CardState } from '@atlaskit/linking-common/store';
4
4
  import type { ProductType } from '@atlaskit/linking-common/types';
5
5
  import type { SmartLinkResponse } from '@atlaskit/linking-types/smart-link';
@@ -211,6 +211,7 @@ export type ExtractFlexibleUiDataContextParams = Pick<FlexibleCardProps, 'appear
211
211
  url: string;
212
212
  }) => void;
213
213
  product?: ProductType;
214
+ remix?: LinkProviderRemixPlugin;
214
215
  resolve?: ResolveFunction;
215
216
  response?: SmartLinkResponse;
216
217
  rovoConfig?: RovoConfig;
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import type { InternalCardActionOptions } from '../../../Card/types';
3
+ type InlineCardActionProps = {
4
+ actionOptions?: InternalCardActionOptions;
5
+ id?: string;
6
+ showHoverPreview?: boolean;
7
+ testId?: string;
8
+ url?: string;
9
+ };
10
+ export declare const InlineCardAction: ({ testId, ...props }: InlineCardActionProps) => React.JSX.Element | null;
11
+ export {};
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { LinkProviderRemixPlugin } from '@atlaskit/link-provider/types';
3
+ import type { RemixActionData } from '../../../../state/flexible-ui-context/types';
4
+ declare const InlineRemixAction: ({ data, remix, testId, }: {
5
+ data: RemixActionData;
6
+ remix: LinkProviderRemixPlugin;
7
+ testId?: string;
8
+ }) => React.JSX.Element;
9
+ export default InlineRemixAction;
@@ -20,8 +20,7 @@ export declare enum RovoChatPromptKey {
20
20
  SUMMARIZE_PRESENTATION = "summarize-presentation",
21
21
  EXPLAIN_CODE = "explain-code",
22
22
  CATCH_UP = "catch-up",
23
- SALESFORCE_PREP = "salesforce-prep",
24
- VISUALIZE = "visualize"
23
+ SALESFORCE_PREP = "salesforce-prep"
25
24
  }
26
25
  type PromptActionProps = {
27
26
  cardAppearance?: CardDisplay;
@@ -1,14 +1,5 @@
1
- import type { JsonLd } from '@atlaskit/json-ld-types/jsonld';
2
- import type { ProductType } from '@atlaskit/linking-common/types';
3
1
  import { RovoChatPromptKey } from '../rovo-chat-utils';
4
2
  export type RovoPostAuthPromptKeysOptions = {
5
3
  extensionKey?: string;
6
- /**
7
- * Whether the Rovo chat action will be shown for the link. Prompt experiments
8
- * (e.g. Visualize) are only evaluated, firing exposure, when this is true.
9
- */
10
- isRovoChatActionShown?: boolean;
11
- product?: ProductType;
12
- response?: JsonLd.Response;
13
4
  };
14
- export declare const getRovoPostAuthPromptKeys: ({ extensionKey, isRovoChatActionShown, product, response, }: RovoPostAuthPromptKeysOptions) => RovoChatPromptKey[];
5
+ export declare const getRovoPostAuthPromptKeys: ({ extensionKey, }: RovoPostAuthPromptKeysOptions) => RovoChatPromptKey[];