@atlaskit/smart-card 46.14.2 → 46.14.3

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 (20) hide show
  1. package/CHANGELOG.md +9 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/InlineCard/common/one-click-chat-spotlight/assets/rovo-snapshot-illustration-dark@2x.png +0 -0
  4. package/dist/cjs/view/InlineCard/common/one-click-chat-spotlight/assets/rovo-snapshot-illustration@2x.png +0 -0
  5. package/dist/cjs/view/InlineCard/common/one-click-chat-spotlight/index.compiled.css +10 -4
  6. package/dist/cjs/view/InlineCard/common/one-click-chat-spotlight/index.js +43 -18
  7. package/dist/cjs/view/LinkUrl/index.js +1 -1
  8. package/dist/es2019/utils/analytics/analytics.js +1 -1
  9. package/dist/es2019/view/InlineCard/common/one-click-chat-spotlight/assets/rovo-snapshot-illustration-dark@2x.png +0 -0
  10. package/dist/es2019/view/InlineCard/common/one-click-chat-spotlight/assets/rovo-snapshot-illustration@2x.png +0 -0
  11. package/dist/es2019/view/InlineCard/common/one-click-chat-spotlight/index.compiled.css +10 -4
  12. package/dist/es2019/view/InlineCard/common/one-click-chat-spotlight/index.js +44 -17
  13. package/dist/es2019/view/LinkUrl/index.js +1 -1
  14. package/dist/esm/utils/analytics/analytics.js +1 -1
  15. package/dist/esm/view/InlineCard/common/one-click-chat-spotlight/assets/rovo-snapshot-illustration-dark@2x.png +0 -0
  16. package/dist/esm/view/InlineCard/common/one-click-chat-spotlight/assets/rovo-snapshot-illustration@2x.png +0 -0
  17. package/dist/esm/view/InlineCard/common/one-click-chat-spotlight/index.compiled.css +10 -4
  18. package/dist/esm/view/InlineCard/common/one-click-chat-spotlight/index.js +43 -17
  19. package/dist/esm/view/LinkUrl/index.js +1 -1
  20. package/package.json +5 -5
package/CHANGELOG.md CHANGED
@@ -1,5 +1,14 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 46.14.3
4
+
5
+ ### Patch Changes
6
+
7
+ - [`68e34ed4b53ae`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/68e34ed4b53ae) -
8
+ Add light and dark Rovo snapshot illustrations and updated heading and body to the One Click Chat
9
+ spotlight behind platform_sl_one_click_chat_spotlight_v2_fg.
10
+ - Updated dependencies
11
+
3
12
  ## 46.14.2
4
13
 
5
14
  ### Patch Changes
@@ -25,7 +25,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
25
25
  var context = exports.context = {
26
26
  componentName: 'smart-cards',
27
27
  packageName: "@atlaskit/smart-card" || '',
28
- packageVersion: "46.14.1" || ''
28
+ packageVersion: "46.14.2" || ''
29
29
  };
30
30
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
31
31
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,30 +1,36 @@
1
1
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
2
2
  ._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
3
3
  ._v564k6bl{transition:var(--ds-button-hovered,background-color border-color .15s cubic-bezier(.4,1,.6,1))}._154iidpf{top:0}
4
- ._154iu2gc{top:var(--ds-space-100,8px)}
4
+ ._154ipxbi{top:var(--ds-space-200,1pc)}
5
5
  ._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
6
6
  ._18m91wug{overflow-y:auto}
7
+ ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
7
8
  ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
8
9
  ._19bvv77o{padding-left:var(--ds-space-025,2px)}
10
+ ._1bsb1osq{width:100%}
9
11
  ._1bsb7vkz{width:1pc}
10
- ._1bsbkpet{width:296px}
12
+ ._1bsbi4q4{width:311px}
13
+ ._1e0c1ule{display:block}
11
14
  ._1reo1wug{overflow-x:auto}
12
- ._1xi2u2gc{right:var(--ds-space-100,8px)}
15
+ ._1xi2pxbi{right:var(--ds-space-200,1pc)}
16
+ ._4t3i1wug{height:auto}
13
17
  ._4t3iftgi{height:8px}
14
18
  ._94n5idpf{bottom:0}
15
19
  ._bfhk1aqn{background-color:var(--ds-background-neutral-bold,#292a2e)}
20
+ ._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
16
21
  ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
17
22
  ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
18
23
  ._kqswh2mm{position:relative}
19
24
  ._kqswstnw{position:absolute}
20
25
  ._lcxvglyw{pointer-events:none}
21
26
  ._mkrz1oyg{clip-path:polygon(50% 0,100% 100%,0 100%)}
27
+ ._n3tdpxbi{padding-bottom:var(--ds-space-200,1pc)}
22
28
  ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
23
29
  ._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
24
30
  ._p12f1osq{max-width:100%}
25
31
  ._syaz15cr{color:var(--ds-text-inverse,#fff)}
26
32
  ._t9ec1sub{transform:rotate(180deg)}
27
- ._u5f31ejb{padding-right:var(--ds-space-300,24px)}
33
+ ._u5f3oahv{padding-right:var(--ds-space-600,3pc)}
28
34
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
29
35
  ._u5f3v77o{padding-right:var(--ds-space-025,2px)}
30
36
  ._vchhusvi{box-sizing:border-box}
@@ -18,6 +18,7 @@ var _reactIntl = require("react-intl");
18
18
  var _useAnalyticsEvents2 = require("@atlaskit/analytics-next/useAnalyticsEvents");
19
19
  var _browserApis = require("@atlaskit/browser-apis");
20
20
  var _button = _interopRequireDefault(require("@atlaskit/button/default/button"));
21
+ var _heading = _interopRequireDefault(require("@atlaskit/heading/heading"));
21
22
  var _cross = _interopRequireDefault(require("@atlaskit/icon/core/cross"));
22
23
  var _choreographedContent = require("@atlaskit/link-provider/choreographed-content");
23
24
  var _popup = require("@atlaskit/popup/popup");
@@ -26,25 +27,29 @@ var _inline = require("@atlaskit/primitives/compiled/inline");
26
27
  var _pressable = require("@atlaskit/primitives/compiled/pressable");
27
28
  var _stack = require("@atlaskit/primitives/compiled/stack");
28
29
  var _text = require("@atlaskit/primitives/compiled/text");
30
+ var _useThemeObserver2 = require("@atlaskit/tokens/use-theme-observer");
29
31
  var _constants = require("../../../../common/analytics/constants");
30
32
  var _getExtensionKey = require("../../../../state/getExtensionKey");
31
33
  var _useOneClickChatSpotlightEligibility = _interopRequireDefault(require("../../../../state/hooks/use-one-click-chat-spotlight-eligibility"));
32
34
  var _useRovoConfig2 = _interopRequireDefault(require("../../../../state/hooks/use-rovo-config"));
33
35
  var _store = require("../../../../state/store");
34
- var _excluded = ["children", "style", "shouldFitViewport", "shouldRenderToParent", "shouldFitContainer", "appearance", "xcss", "isReferenceHidden"];
36
+ var _rovoSnapshotIllustrationDark2x = _interopRequireDefault(require("./assets/rovo-snapshot-illustration-dark@2x.png"));
37
+ var _rovoSnapshotIllustration2x = _interopRequireDefault(require("./assets/rovo-snapshot-illustration@2x.png"));
38
+ var _excluded = ["children", "style", "shouldFitViewport", "shouldRenderToParent", "shouldFitContainer", "appearance", "xcss", "isReferenceHidden"]; // oxlint-disable-next-line import/extensions -- Asset imports require an explicit extension.
39
+ // oxlint-disable-next-line import/extensions -- Asset imports require an explicit extension.
35
40
  function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != _typeof(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
36
41
  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; }
37
42
  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) { (0, _defineProperty2.default)(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; }
38
43
  var messages = (0, _reactIntl.defineMessages)({
39
44
  heading: {
40
- id: 'smart-card.one-click-chat-spotlight-v2.heading.ai-non-final',
41
- defaultMessage: 'Explore this link with Rovo',
42
- description: 'Accessible name of a spotlight introducing the Rovo action beside a resolved Smart Link.'
45
+ id: 'smart-card.one-click-chat-spotlight-v2.gist-heading.ai-non-final',
46
+ defaultMessage: 'Get the gist from this link',
47
+ description: 'Heading and accessible name of the Smart Link spotlight. Invites users to get a short summary of the linked content with Rovo.'
43
48
  },
44
49
  body: {
45
- id: 'smart-card.one-click-chat-spotlight-v2.takeaways-body.ai-non-final',
46
- defaultMessage: 'Get key decisions and next steps from this link.',
47
- description: 'Spotlight body inviting users to get key decisions and next steps from a linked document or code using Rovo.'
50
+ id: 'smart-card.one-click-chat-spotlight-v2.insights-body.ai-non-final',
51
+ defaultMessage: 'See key insights, context, and next steps.',
52
+ description: 'Smart Link spotlight body describing the insights, context, and next steps users can get from the linked content with Rovo.'
48
53
  },
49
54
  dismiss: {
50
55
  id: 'smart-card.one-click-chat-spotlight-v2.dismiss.ai-non-final',
@@ -58,14 +63,15 @@ var messages = (0, _reactIntl.defineMessages)({
58
63
  }
59
64
  });
60
65
  var styles = {
61
- surface: "_1reo1wug _18m91wug _kqswh2mm _1bsbkpet _p12f1osq _vchhusvi _ca0qu2gc _n3tdu2gc _19bvu2gc _u5f3u2gc",
66
+ surface: "_1reo1wug _18m91wug _kqswh2mm _1bsbi4q4 _p12f1osq _vchhusvi _ca0qu2gc _n3tdu2gc _19bvu2gc _u5f3u2gc",
62
67
  card: "_2rko1qi0 _bfhk1aqn _syaz15cr _16qs130s",
63
68
  caret: "_kqswstnw _1bsb7vkz _4t3iftgi _bfhk1aqn _mkrz1oyg _lcxvglyw",
64
69
  below: "_154iidpf",
65
70
  above: "_94n5idpf _t9ec1sub",
66
- close: "_2rko12b0 _v564k6bl _kqswstnw _154iu2gc _1xi2u2gc _ca0qv77o _n3tdv77o _19bvv77o _u5f3v77o _syaz15cr _bfhk1aqn _irr31ibz _1ggl5xtf _1di6of27",
71
+ close: "_2rko12b0 _v564k6bl _kqswstnw _154ipxbi _1xi2pxbi _ca0qv77o _n3tdv77o _19bvv77o _u5f3v77o _syaz15cr _bfhk1aqn _irr31ibz _1ggl5xtf _1di6of27",
67
72
  content: "_kqswh2mm",
68
- body: "_u5f31ejb"
73
+ header: "_ca0qpxbi _n3tdpxbi _19bvpxbi _u5f3oahv",
74
+ illustration: "_1e0c1ule _1bsb1osq _4t3i1wug"
69
75
  };
70
76
  var SpotlightOpenContext = /*#__PURE__*/(0, _react.createContext)(false);
71
77
  var TargetContext = /*#__PURE__*/(0, _react.createContext)(null);
@@ -162,18 +168,21 @@ var SpotlightSurface = /*#__PURE__*/(0, _react.forwardRef)(function (_ref2, forw
162
168
  });
163
169
  function VisibleSpotlightCard(_ref3) {
164
170
  var onShown = _ref3.onShown,
171
+ heading = _ref3.heading,
165
172
  body = _ref3.body,
166
173
  dismissLabel = _ref3.dismissLabel,
167
174
  actionLabel = _ref3.actionLabel,
168
175
  onDismiss = _ref3.onDismiss,
169
176
  onAction = _ref3.onAction;
177
+ var _useThemeObserver = (0, _useThemeObserver2.useThemeObserver)(),
178
+ colorMode = _useThemeObserver.colorMode;
179
+ var illustration = colorMode === 'dark' ? _rovoSnapshotIllustrationDark2x.default : _rovoSnapshotIllustration2x.default;
170
180
  (0, _react.useEffect)(function () {
171
181
  return onShown();
172
182
  }, [onShown]);
173
183
  return /*#__PURE__*/_react.default.createElement(_box.Box, {
174
184
  testId: "one-click-chat-spotlight-v2",
175
- xcss: styles.content,
176
- padding: "space.150"
185
+ xcss: styles.content
177
186
  }, /*#__PURE__*/_react.default.createElement(_pressable.Pressable, {
178
187
  xcss: styles.close,
179
188
  onClick: onDismiss,
@@ -181,19 +190,34 @@ function VisibleSpotlightCard(_ref3) {
181
190
  }, /*#__PURE__*/_react.default.createElement(_cross.default, {
182
191
  label: "",
183
192
  size: "small"
184
- })), /*#__PURE__*/_react.default.createElement(_stack.Stack, {
185
- space: "space.050"
186
- }, /*#__PURE__*/_react.default.createElement(_box.Box, {
187
- xcss: styles.body
193
+ })), /*#__PURE__*/_react.default.createElement(_box.Box, {
194
+ xcss: styles.header
195
+ }, /*#__PURE__*/_react.default.createElement(_heading.default, {
196
+ as: "h2",
197
+ size: "xsmall",
198
+ color: "color.text.inverse"
199
+ }, heading)), /*#__PURE__*/_react.default.createElement("img", {
200
+ alt: "",
201
+ "aria-hidden": "true",
202
+ "data-testid": "one-click-chat-spotlight-v2-illustration",
203
+ height: 135,
204
+ src: illustration,
205
+ srcSet: "".concat(illustration, " 2x"),
206
+ width: 295,
207
+ className: (0, _runtime.ax)([styles.illustration])
208
+ }), /*#__PURE__*/_react.default.createElement(_box.Box, {
209
+ padding: "space.200"
210
+ }, /*#__PURE__*/_react.default.createElement(_stack.Stack, {
211
+ space: "space.200"
188
212
  }, /*#__PURE__*/_react.default.createElement(_text.Text, {
189
213
  color: "color.text.inverse"
190
- }, body)), /*#__PURE__*/_react.default.createElement(_inline.Inline, {
214
+ }, body), /*#__PURE__*/_react.default.createElement(_inline.Inline, {
191
215
  alignInline: "end"
192
216
  }, /*#__PURE__*/_react.default.createElement(_button.default, {
193
217
  appearance: "primary",
194
218
  spacing: "compact",
195
219
  onClick: onAction
196
- }, actionLabel))));
220
+ }, actionLabel)))));
197
221
  }
198
222
  function OneClickChatSpotlight(_ref4) {
199
223
  var children = _ref4.children,
@@ -266,6 +290,7 @@ function OneClickChatSpotlight(_ref4) {
266
290
  }, children);
267
291
  var _content = /*#__PURE__*/_react.default.createElement(VisibleSpotlightCard, {
268
292
  onShown: spotlight.onShown,
293
+ heading: intl.formatMessage(messages.heading),
269
294
  body: intl.formatMessage(messages.body),
270
295
  dismissLabel: intl.formatMessage(messages.dismiss),
271
296
  actionLabel: intl.formatMessage(messages.action),
@@ -19,7 +19,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
19
19
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
20
20
  var PACKAGE_DATA = {
21
21
  packageName: "@atlaskit/smart-card",
22
- packageVersion: "46.14.1",
22
+ packageVersion: "46.14.2",
23
23
  componentName: 'linkUrl'
24
24
  };
25
25
  var LinkUrl = function LinkUrl(_ref) {
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
4
4
  export const context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card" || '',
7
- packageVersion: "46.14.1" || ''
7
+ packageVersion: "46.14.2" || ''
8
8
  };
9
9
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,30 +1,36 @@
1
1
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
2
2
  ._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
3
3
  ._v564k6bl{transition:var(--ds-button-hovered,background-color border-color .15s cubic-bezier(.4,1,.6,1))}._154iidpf{top:0}
4
- ._154iu2gc{top:var(--ds-space-100,8px)}
4
+ ._154ipxbi{top:var(--ds-space-200,1pc)}
5
5
  ._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
6
6
  ._18m91wug{overflow-y:auto}
7
+ ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
7
8
  ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
8
9
  ._19bvv77o{padding-left:var(--ds-space-025,2px)}
10
+ ._1bsb1osq{width:100%}
9
11
  ._1bsb7vkz{width:1pc}
10
- ._1bsbkpet{width:296px}
12
+ ._1bsbi4q4{width:311px}
13
+ ._1e0c1ule{display:block}
11
14
  ._1reo1wug{overflow-x:auto}
12
- ._1xi2u2gc{right:var(--ds-space-100,8px)}
15
+ ._1xi2pxbi{right:var(--ds-space-200,1pc)}
16
+ ._4t3i1wug{height:auto}
13
17
  ._4t3iftgi{height:8px}
14
18
  ._94n5idpf{bottom:0}
15
19
  ._bfhk1aqn{background-color:var(--ds-background-neutral-bold,#292a2e)}
20
+ ._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
16
21
  ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
17
22
  ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
18
23
  ._kqswh2mm{position:relative}
19
24
  ._kqswstnw{position:absolute}
20
25
  ._lcxvglyw{pointer-events:none}
21
26
  ._mkrz1oyg{clip-path:polygon(50% 0,100% 100%,0 100%)}
27
+ ._n3tdpxbi{padding-bottom:var(--ds-space-200,1pc)}
22
28
  ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
23
29
  ._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
24
30
  ._p12f1osq{max-width:100%}
25
31
  ._syaz15cr{color:var(--ds-text-inverse,#fff)}
26
32
  ._t9ec1sub{transform:rotate(180deg)}
27
- ._u5f31ejb{padding-right:var(--ds-space-300,24px)}
33
+ ._u5f3oahv{padding-right:var(--ds-space-600,3pc)}
28
34
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
29
35
  ._u5f3v77o{padding-right:var(--ds-space-025,2px)}
30
36
  ._vchhusvi{box-sizing:border-box}
@@ -7,6 +7,7 @@ import { defineMessages, useIntl } from 'react-intl';
7
7
  import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
8
8
  import { getDocument } from '@atlaskit/browser-apis';
9
9
  import Button from '@atlaskit/button/default/button';
10
+ import Heading from '@atlaskit/heading/heading';
10
11
  import CrossIcon from '@atlaskit/icon/core/cross';
11
12
  import { ChoreographedContent } from '@atlaskit/link-provider/choreographed-content';
12
13
  import { Popup } from '@atlaskit/popup/popup';
@@ -15,21 +16,26 @@ import { Inline } from '@atlaskit/primitives/compiled/inline';
15
16
  import { Pressable } from '@atlaskit/primitives/compiled/pressable';
16
17
  import { Stack } from '@atlaskit/primitives/compiled/stack';
17
18
  import { Text } from '@atlaskit/primitives/compiled/text';
19
+ import { useThemeObserver } from '@atlaskit/tokens/use-theme-observer';
18
20
  import { EVENT_CHANNEL } from '../../../../common/analytics/constants';
19
21
  import { getExtensionKey } from '../../../../state/getExtensionKey';
20
22
  import useOneClickChatSpotlightEligibility from '../../../../state/hooks/use-one-click-chat-spotlight-eligibility';
21
23
  import useRovoConfig from '../../../../state/hooks/use-rovo-config';
22
24
  import { useSmartCardState } from '../../../../state/store';
25
+ // oxlint-disable-next-line import/extensions -- Asset imports require an explicit extension.
26
+ import rovoSnapshotIllustrationDark from './assets/rovo-snapshot-illustration-dark@2x.png';
27
+ // oxlint-disable-next-line import/extensions -- Asset imports require an explicit extension.
28
+ import rovoSnapshotIllustration from './assets/rovo-snapshot-illustration@2x.png';
23
29
  const messages = defineMessages({
24
30
  heading: {
25
- id: 'smart-card.one-click-chat-spotlight-v2.heading.ai-non-final',
26
- defaultMessage: 'Explore this link with Rovo',
27
- description: 'Accessible name of a spotlight introducing the Rovo action beside a resolved Smart Link.'
31
+ id: 'smart-card.one-click-chat-spotlight-v2.gist-heading.ai-non-final',
32
+ defaultMessage: 'Get the gist from this link',
33
+ description: 'Heading and accessible name of the Smart Link spotlight. Invites users to get a short summary of the linked content with Rovo.'
28
34
  },
29
35
  body: {
30
- id: 'smart-card.one-click-chat-spotlight-v2.takeaways-body.ai-non-final',
31
- defaultMessage: 'Get key decisions and next steps from this link.',
32
- description: 'Spotlight body inviting users to get key decisions and next steps from a linked document or code using Rovo.'
36
+ id: 'smart-card.one-click-chat-spotlight-v2.insights-body.ai-non-final',
37
+ defaultMessage: 'See key insights, context, and next steps.',
38
+ description: 'Smart Link spotlight body describing the insights, context, and next steps users can get from the linked content with Rovo.'
33
39
  },
34
40
  dismiss: {
35
41
  id: 'smart-card.one-click-chat-spotlight-v2.dismiss.ai-non-final',
@@ -43,14 +49,15 @@ const messages = defineMessages({
43
49
  }
44
50
  });
45
51
  const styles = {
46
- surface: "_1reo1wug _18m91wug _kqswh2mm _1bsbkpet _p12f1osq _vchhusvi _ca0qu2gc _n3tdu2gc _19bvu2gc _u5f3u2gc",
52
+ surface: "_1reo1wug _18m91wug _kqswh2mm _1bsbi4q4 _p12f1osq _vchhusvi _ca0qu2gc _n3tdu2gc _19bvu2gc _u5f3u2gc",
47
53
  card: "_2rko1qi0 _bfhk1aqn _syaz15cr _16qs130s",
48
54
  caret: "_kqswstnw _1bsb7vkz _4t3iftgi _bfhk1aqn _mkrz1oyg _lcxvglyw",
49
55
  below: "_154iidpf",
50
56
  above: "_94n5idpf _t9ec1sub",
51
- close: "_2rko12b0 _v564k6bl _kqswstnw _154iu2gc _1xi2u2gc _ca0qv77o _n3tdv77o _19bvv77o _u5f3v77o _syaz15cr _bfhk1aqn _irr31ibz _1ggl5xtf _1di6of27",
57
+ close: "_2rko12b0 _v564k6bl _kqswstnw _154ipxbi _1xi2pxbi _ca0qv77o _n3tdv77o _19bvv77o _u5f3v77o _syaz15cr _bfhk1aqn _irr31ibz _1ggl5xtf _1di6of27",
52
58
  content: "_kqswh2mm",
53
- body: "_u5f31ejb"
59
+ header: "_ca0qpxbi _n3tdpxbi _19bvpxbi _u5f3oahv",
60
+ illustration: "_1e0c1ule _1bsb1osq _4t3i1wug"
54
61
  };
55
62
  const SpotlightOpenContext = /*#__PURE__*/createContext(false);
56
63
  const TargetContext = /*#__PURE__*/createContext(null);
@@ -144,17 +151,21 @@ const SpotlightSurface = /*#__PURE__*/forwardRef(({
144
151
  });
145
152
  function VisibleSpotlightCard({
146
153
  onShown,
154
+ heading,
147
155
  body,
148
156
  dismissLabel,
149
157
  actionLabel,
150
158
  onDismiss,
151
159
  onAction
152
160
  }) {
161
+ const {
162
+ colorMode
163
+ } = useThemeObserver();
164
+ const illustration = colorMode === 'dark' ? rovoSnapshotIllustrationDark : rovoSnapshotIllustration;
153
165
  useEffect(() => onShown(), [onShown]);
154
166
  return /*#__PURE__*/React.createElement(Box, {
155
167
  testId: "one-click-chat-spotlight-v2",
156
- xcss: styles.content,
157
- padding: "space.150"
168
+ xcss: styles.content
158
169
  }, /*#__PURE__*/React.createElement(Pressable, {
159
170
  xcss: styles.close,
160
171
  onClick: onDismiss,
@@ -162,19 +173,34 @@ function VisibleSpotlightCard({
162
173
  }, /*#__PURE__*/React.createElement(CrossIcon, {
163
174
  label: "",
164
175
  size: "small"
165
- })), /*#__PURE__*/React.createElement(Stack, {
166
- space: "space.050"
167
- }, /*#__PURE__*/React.createElement(Box, {
168
- xcss: styles.body
176
+ })), /*#__PURE__*/React.createElement(Box, {
177
+ xcss: styles.header
178
+ }, /*#__PURE__*/React.createElement(Heading, {
179
+ as: "h2",
180
+ size: "xsmall",
181
+ color: "color.text.inverse"
182
+ }, heading)), /*#__PURE__*/React.createElement("img", {
183
+ alt: "",
184
+ "aria-hidden": "true",
185
+ "data-testid": "one-click-chat-spotlight-v2-illustration",
186
+ height: 135,
187
+ src: illustration,
188
+ srcSet: `${illustration} 2x`,
189
+ width: 295,
190
+ className: ax([styles.illustration])
191
+ }), /*#__PURE__*/React.createElement(Box, {
192
+ padding: "space.200"
193
+ }, /*#__PURE__*/React.createElement(Stack, {
194
+ space: "space.200"
169
195
  }, /*#__PURE__*/React.createElement(Text, {
170
196
  color: "color.text.inverse"
171
- }, body)), /*#__PURE__*/React.createElement(Inline, {
197
+ }, body), /*#__PURE__*/React.createElement(Inline, {
172
198
  alignInline: "end"
173
199
  }, /*#__PURE__*/React.createElement(Button, {
174
200
  appearance: "primary",
175
201
  spacing: "compact",
176
202
  onClick: onAction
177
- }, actionLabel))));
203
+ }, actionLabel)))));
178
204
  }
179
205
  export function OneClickChatSpotlight({
180
206
  children,
@@ -244,6 +270,7 @@ export function OneClickChatSpotlight({
244
270
  }, children);
245
271
  const content = /*#__PURE__*/React.createElement(VisibleSpotlightCard, {
246
272
  onShown: spotlight.onShown,
273
+ heading: intl.formatMessage(messages.heading),
247
274
  body: intl.formatMessage(messages.body),
248
275
  dismissLabel: intl.formatMessage(messages.dismiss),
249
276
  actionLabel: intl.formatMessage(messages.action),
@@ -9,7 +9,7 @@ import LinkWarningModal from './LinkWarningModal';
9
9
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
10
10
  const PACKAGE_DATA = {
11
11
  packageName: "@atlaskit/smart-card",
12
- packageVersion: "46.14.1",
12
+ packageVersion: "46.14.2",
13
13
  componentName: 'linkUrl'
14
14
  };
15
15
  const LinkUrl = ({
@@ -4,7 +4,7 @@ export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
6
  packageName: "@atlaskit/smart-card" || '',
7
- packageVersion: "46.14.1" || ''
7
+ packageVersion: "46.14.2" || ''
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,30 +1,36 @@
1
1
  ._2rko12b0{border-radius:var(--ds-radius-small,4px)}
2
2
  ._2rko1qi0{border-radius:var(--ds-radius-medium,6px)}
3
3
  ._v564k6bl{transition:var(--ds-button-hovered,background-color border-color .15s cubic-bezier(.4,1,.6,1))}._154iidpf{top:0}
4
- ._154iu2gc{top:var(--ds-space-100,8px)}
4
+ ._154ipxbi{top:var(--ds-space-200,1pc)}
5
5
  ._16qs130s{box-shadow:var(--ds-shadow-overlay,0 8px 9pt #1e1f2126,0 0 1px #1e1f214f)}
6
6
  ._18m91wug{overflow-y:auto}
7
+ ._19bvpxbi{padding-left:var(--ds-space-200,1pc)}
7
8
  ._19bvu2gc{padding-left:var(--ds-space-100,8px)}
8
9
  ._19bvv77o{padding-left:var(--ds-space-025,2px)}
10
+ ._1bsb1osq{width:100%}
9
11
  ._1bsb7vkz{width:1pc}
10
- ._1bsbkpet{width:296px}
12
+ ._1bsbi4q4{width:311px}
13
+ ._1e0c1ule{display:block}
11
14
  ._1reo1wug{overflow-x:auto}
12
- ._1xi2u2gc{right:var(--ds-space-100,8px)}
15
+ ._1xi2pxbi{right:var(--ds-space-200,1pc)}
16
+ ._4t3i1wug{height:auto}
13
17
  ._4t3iftgi{height:8px}
14
18
  ._94n5idpf{bottom:0}
15
19
  ._bfhk1aqn{background-color:var(--ds-background-neutral-bold,#292a2e)}
20
+ ._ca0qpxbi{padding-top:var(--ds-space-200,1pc)}
16
21
  ._ca0qu2gc{padding-top:var(--ds-space-100,8px)}
17
22
  ._ca0qv77o{padding-top:var(--ds-space-025,2px)}
18
23
  ._kqswh2mm{position:relative}
19
24
  ._kqswstnw{position:absolute}
20
25
  ._lcxvglyw{pointer-events:none}
21
26
  ._mkrz1oyg{clip-path:polygon(50% 0,100% 100%,0 100%)}
27
+ ._n3tdpxbi{padding-bottom:var(--ds-space-200,1pc)}
22
28
  ._n3tdu2gc{padding-bottom:var(--ds-space-100,8px)}
23
29
  ._n3tdv77o{padding-bottom:var(--ds-space-025,2px)}
24
30
  ._p12f1osq{max-width:100%}
25
31
  ._syaz15cr{color:var(--ds-text-inverse,#fff)}
26
32
  ._t9ec1sub{transform:rotate(180deg)}
27
- ._u5f31ejb{padding-right:var(--ds-space-300,24px)}
33
+ ._u5f3oahv{padding-right:var(--ds-space-600,3pc)}
28
34
  ._u5f3u2gc{padding-right:var(--ds-space-100,8px)}
29
35
  ._u5f3v77o{padding-right:var(--ds-space-025,2px)}
30
36
  ._vchhusvi{box-sizing:border-box}
@@ -13,6 +13,7 @@ import { defineMessages, useIntl } from 'react-intl';
13
13
  import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
14
14
  import { getDocument } from '@atlaskit/browser-apis';
15
15
  import Button from '@atlaskit/button/default/button';
16
+ import Heading from '@atlaskit/heading/heading';
16
17
  import CrossIcon from '@atlaskit/icon/core/cross';
17
18
  import { ChoreographedContent } from '@atlaskit/link-provider/choreographed-content';
18
19
  import { Popup } from '@atlaskit/popup/popup';
@@ -21,21 +22,26 @@ import { Inline } from '@atlaskit/primitives/compiled/inline';
21
22
  import { Pressable } from '@atlaskit/primitives/compiled/pressable';
22
23
  import { Stack } from '@atlaskit/primitives/compiled/stack';
23
24
  import { Text } from '@atlaskit/primitives/compiled/text';
25
+ import { useThemeObserver } from '@atlaskit/tokens/use-theme-observer';
24
26
  import { EVENT_CHANNEL } from '../../../../common/analytics/constants';
25
27
  import { getExtensionKey } from '../../../../state/getExtensionKey';
26
28
  import useOneClickChatSpotlightEligibility from '../../../../state/hooks/use-one-click-chat-spotlight-eligibility';
27
29
  import useRovoConfig from '../../../../state/hooks/use-rovo-config';
28
30
  import { useSmartCardState } from '../../../../state/store';
31
+ // oxlint-disable-next-line import/extensions -- Asset imports require an explicit extension.
32
+ import rovoSnapshotIllustrationDark from './assets/rovo-snapshot-illustration-dark@2x.png';
33
+ // oxlint-disable-next-line import/extensions -- Asset imports require an explicit extension.
34
+ import rovoSnapshotIllustration from './assets/rovo-snapshot-illustration@2x.png';
29
35
  var messages = defineMessages({
30
36
  heading: {
31
- id: 'smart-card.one-click-chat-spotlight-v2.heading.ai-non-final',
32
- defaultMessage: 'Explore this link with Rovo',
33
- description: 'Accessible name of a spotlight introducing the Rovo action beside a resolved Smart Link.'
37
+ id: 'smart-card.one-click-chat-spotlight-v2.gist-heading.ai-non-final',
38
+ defaultMessage: 'Get the gist from this link',
39
+ description: 'Heading and accessible name of the Smart Link spotlight. Invites users to get a short summary of the linked content with Rovo.'
34
40
  },
35
41
  body: {
36
- id: 'smart-card.one-click-chat-spotlight-v2.takeaways-body.ai-non-final',
37
- defaultMessage: 'Get key decisions and next steps from this link.',
38
- description: 'Spotlight body inviting users to get key decisions and next steps from a linked document or code using Rovo.'
42
+ id: 'smart-card.one-click-chat-spotlight-v2.insights-body.ai-non-final',
43
+ defaultMessage: 'See key insights, context, and next steps.',
44
+ description: 'Smart Link spotlight body describing the insights, context, and next steps users can get from the linked content with Rovo.'
39
45
  },
40
46
  dismiss: {
41
47
  id: 'smart-card.one-click-chat-spotlight-v2.dismiss.ai-non-final',
@@ -49,14 +55,15 @@ var messages = defineMessages({
49
55
  }
50
56
  });
51
57
  var styles = {
52
- surface: "_1reo1wug _18m91wug _kqswh2mm _1bsbkpet _p12f1osq _vchhusvi _ca0qu2gc _n3tdu2gc _19bvu2gc _u5f3u2gc",
58
+ surface: "_1reo1wug _18m91wug _kqswh2mm _1bsbi4q4 _p12f1osq _vchhusvi _ca0qu2gc _n3tdu2gc _19bvu2gc _u5f3u2gc",
53
59
  card: "_2rko1qi0 _bfhk1aqn _syaz15cr _16qs130s",
54
60
  caret: "_kqswstnw _1bsb7vkz _4t3iftgi _bfhk1aqn _mkrz1oyg _lcxvglyw",
55
61
  below: "_154iidpf",
56
62
  above: "_94n5idpf _t9ec1sub",
57
- close: "_2rko12b0 _v564k6bl _kqswstnw _154iu2gc _1xi2u2gc _ca0qv77o _n3tdv77o _19bvv77o _u5f3v77o _syaz15cr _bfhk1aqn _irr31ibz _1ggl5xtf _1di6of27",
63
+ close: "_2rko12b0 _v564k6bl _kqswstnw _154ipxbi _1xi2pxbi _ca0qv77o _n3tdv77o _19bvv77o _u5f3v77o _syaz15cr _bfhk1aqn _irr31ibz _1ggl5xtf _1di6of27",
58
64
  content: "_kqswh2mm",
59
- body: "_u5f31ejb"
65
+ header: "_ca0qpxbi _n3tdpxbi _19bvpxbi _u5f3oahv",
66
+ illustration: "_1e0c1ule _1bsb1osq _4t3i1wug"
60
67
  };
61
68
  var SpotlightOpenContext = /*#__PURE__*/createContext(false);
62
69
  var TargetContext = /*#__PURE__*/createContext(null);
@@ -153,18 +160,21 @@ var SpotlightSurface = /*#__PURE__*/forwardRef(function (_ref2, forwardedRef) {
153
160
  });
154
161
  function VisibleSpotlightCard(_ref3) {
155
162
  var onShown = _ref3.onShown,
163
+ heading = _ref3.heading,
156
164
  body = _ref3.body,
157
165
  dismissLabel = _ref3.dismissLabel,
158
166
  actionLabel = _ref3.actionLabel,
159
167
  onDismiss = _ref3.onDismiss,
160
168
  onAction = _ref3.onAction;
169
+ var _useThemeObserver = useThemeObserver(),
170
+ colorMode = _useThemeObserver.colorMode;
171
+ var illustration = colorMode === 'dark' ? rovoSnapshotIllustrationDark : rovoSnapshotIllustration;
161
172
  useEffect(function () {
162
173
  return onShown();
163
174
  }, [onShown]);
164
175
  return /*#__PURE__*/React.createElement(Box, {
165
176
  testId: "one-click-chat-spotlight-v2",
166
- xcss: styles.content,
167
- padding: "space.150"
177
+ xcss: styles.content
168
178
  }, /*#__PURE__*/React.createElement(Pressable, {
169
179
  xcss: styles.close,
170
180
  onClick: onDismiss,
@@ -172,19 +182,34 @@ function VisibleSpotlightCard(_ref3) {
172
182
  }, /*#__PURE__*/React.createElement(CrossIcon, {
173
183
  label: "",
174
184
  size: "small"
175
- })), /*#__PURE__*/React.createElement(Stack, {
176
- space: "space.050"
177
- }, /*#__PURE__*/React.createElement(Box, {
178
- xcss: styles.body
185
+ })), /*#__PURE__*/React.createElement(Box, {
186
+ xcss: styles.header
187
+ }, /*#__PURE__*/React.createElement(Heading, {
188
+ as: "h2",
189
+ size: "xsmall",
190
+ color: "color.text.inverse"
191
+ }, heading)), /*#__PURE__*/React.createElement("img", {
192
+ alt: "",
193
+ "aria-hidden": "true",
194
+ "data-testid": "one-click-chat-spotlight-v2-illustration",
195
+ height: 135,
196
+ src: illustration,
197
+ srcSet: "".concat(illustration, " 2x"),
198
+ width: 295,
199
+ className: ax([styles.illustration])
200
+ }), /*#__PURE__*/React.createElement(Box, {
201
+ padding: "space.200"
202
+ }, /*#__PURE__*/React.createElement(Stack, {
203
+ space: "space.200"
179
204
  }, /*#__PURE__*/React.createElement(Text, {
180
205
  color: "color.text.inverse"
181
- }, body)), /*#__PURE__*/React.createElement(Inline, {
206
+ }, body), /*#__PURE__*/React.createElement(Inline, {
182
207
  alignInline: "end"
183
208
  }, /*#__PURE__*/React.createElement(Button, {
184
209
  appearance: "primary",
185
210
  spacing: "compact",
186
211
  onClick: onAction
187
- }, actionLabel))));
212
+ }, actionLabel)))));
188
213
  }
189
214
  export function OneClickChatSpotlight(_ref4) {
190
215
  var children = _ref4.children,
@@ -257,6 +282,7 @@ export function OneClickChatSpotlight(_ref4) {
257
282
  }, children);
258
283
  var _content = /*#__PURE__*/React.createElement(VisibleSpotlightCard, {
259
284
  onShown: spotlight.onShown,
285
+ heading: intl.formatMessage(messages.heading),
260
286
  body: intl.formatMessage(messages.body),
261
287
  dismissLabel: intl.formatMessage(messages.dismiss),
262
288
  actionLabel: intl.formatMessage(messages.action),
@@ -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.14.1",
15
+ packageVersion: "46.14.2",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var LinkUrl = function LinkUrl(_ref) {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "46.14.2",
3
+ "version": "46.14.3",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -58,7 +58,7 @@
58
58
  "@atlaskit/form": "^18.3.0",
59
59
  "@atlaskit/frontend-utilities": "^5.1.0",
60
60
  "@atlaskit/heading": "^8.0.0",
61
- "@atlaskit/icon": "^38.0.0",
61
+ "@atlaskit/icon": "^38.1.0",
62
62
  "@atlaskit/icon-file-type": "^8.3.0",
63
63
  "@atlaskit/icon-lab": "^7.11.0",
64
64
  "@atlaskit/image": "^5.2.0",
@@ -83,9 +83,9 @@
83
83
  "@atlaskit/popup": "^10.2.0",
84
84
  "@atlaskit/primitives": "^22.7.0",
85
85
  "@atlaskit/react-compiler-gating": "^0.2.0",
86
- "@atlaskit/react-ufo": "^8.4.0",
86
+ "@atlaskit/react-ufo": "^8.5.0",
87
87
  "@atlaskit/rovo-triggers": "^12.14.0",
88
- "@atlaskit/section-message": "^10.2.0",
88
+ "@atlaskit/section-message": "^10.3.0",
89
89
  "@atlaskit/select": "^23.2.0",
90
90
  "@atlaskit/spinner": "^20.4.0",
91
91
  "@atlaskit/tabs": "^21.3.0",
@@ -95,7 +95,7 @@
95
95
  "@atlaskit/theme": "^28.2.0",
96
96
  "@atlaskit/tile": "^5.0.0",
97
97
  "@atlaskit/tmp-editor-statsig": "^262.0.0",
98
- "@atlaskit/tokens": "^20.11.0",
98
+ "@atlaskit/tokens": "^20.12.0",
99
99
  "@atlaskit/tooltip": "^24.4.0",
100
100
  "@atlaskit/top-layer": "^7.2.0",
101
101
  "@atlaskit/ufo": "^2.0.0",