@atlaskit/smart-card 46.3.0 → 46.3.2

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 (27) hide show
  1. package/CHANGELOG.md +28 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/HoverCard/components/HoverCardComponent.js +14 -1
  4. package/dist/cjs/view/InlineCard/common/one-click-chat-spotlight/async.js +37 -0
  5. package/dist/cjs/view/InlineCard/common/one-click-chat-spotlight/index.compiled.css +36 -0
  6. package/dist/cjs/view/InlineCard/common/one-click-chat-spotlight/index.js +293 -0
  7. package/dist/cjs/view/InlineCard/common/rovo-actions-cta/index.js +109 -3
  8. package/dist/cjs/view/LinkUrl/index.js +1 -1
  9. package/dist/es2019/utils/analytics/analytics.js +1 -1
  10. package/dist/es2019/view/HoverCard/components/HoverCardComponent.js +14 -1
  11. package/dist/es2019/view/InlineCard/common/one-click-chat-spotlight/async.js +21 -0
  12. package/dist/es2019/view/InlineCard/common/one-click-chat-spotlight/index.compiled.css +36 -0
  13. package/dist/es2019/view/InlineCard/common/one-click-chat-spotlight/index.js +267 -0
  14. package/dist/es2019/view/InlineCard/common/rovo-actions-cta/index.js +93 -1
  15. package/dist/es2019/view/LinkUrl/index.js +1 -1
  16. package/dist/esm/utils/analytics/analytics.js +1 -1
  17. package/dist/esm/view/HoverCard/components/HoverCardComponent.js +14 -1
  18. package/dist/esm/view/InlineCard/common/one-click-chat-spotlight/async.js +26 -0
  19. package/dist/esm/view/InlineCard/common/one-click-chat-spotlight/index.compiled.css +36 -0
  20. package/dist/esm/view/InlineCard/common/one-click-chat-spotlight/index.js +284 -0
  21. package/dist/esm/view/InlineCard/common/rovo-actions-cta/index.js +107 -1
  22. package/dist/esm/view/LinkUrl/index.js +1 -1
  23. package/dist/types/state/hooks/use-one-click-chat-spotlight-eligibility/suppression.d.ts +1 -1
  24. package/dist/types/view/InlineCard/common/one-click-chat-spotlight/async.d.ts +6 -0
  25. package/dist/types/view/InlineCard/common/one-click-chat-spotlight/index.d.ts +12 -0
  26. package/dist/types/view/InlineCard/common/rovo-actions-cta/index.d.ts +1 -1
  27. package/package.json +3 -3
@@ -0,0 +1,284 @@
1
+ /* index.tsx generated by @compiled/babel-plugin v3.0.2 */
2
+ import _extends from "@babel/runtime/helpers/extends";
3
+ import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
4
+ import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
5
+ var _excluded = ["children", "style", "shouldFitViewport", "shouldRenderToParent", "shouldFitContainer", "appearance", "xcss", "isReferenceHidden"];
6
+ import "./index.compiled.css";
7
+ import { ax, ix } from "@compiled/react/runtime";
8
+ import React, { createContext, forwardRef, useCallback, useContext, useEffect, useRef, useState } from 'react';
9
+ import { defineMessages, useIntl } from 'react-intl';
10
+ import { useAnalyticsEvents } from '@atlaskit/analytics-next/useAnalyticsEvents';
11
+ import { getDocument } from '@atlaskit/browser-apis';
12
+ import CrossIcon from '@atlaskit/icon/core/cross';
13
+ import { Popup } from '@atlaskit/popup/popup';
14
+ import { Box } from '@atlaskit/primitives/compiled/box';
15
+ import { Inline } from '@atlaskit/primitives/compiled/inline';
16
+ import { Pressable } from '@atlaskit/primitives/compiled/pressable';
17
+ import { Stack } from '@atlaskit/primitives/compiled/stack';
18
+ import { Text } from '@atlaskit/primitives/compiled/text';
19
+ import { EVENT_CHANNEL } from '../../../../common/analytics/constants';
20
+ import { getExtensionKey } from '../../../../state/getExtensionKey';
21
+ import useOneClickChatSpotlightEligibility from '../../../../state/hooks/use-one-click-chat-spotlight-eligibility';
22
+ import useRovoConfig from '../../../../state/hooks/use-rovo-config';
23
+ import { useSmartCardState } from '../../../../state/store';
24
+ var messages = defineMessages({
25
+ heading: {
26
+ id: 'smart-card.one-click-chat-spotlight-v2.heading.ai-non-final',
27
+ defaultMessage: 'Explore this link with Rovo',
28
+ description: 'Accessible name of a spotlight introducing the Rovo action beside a resolved Smart Link.'
29
+ },
30
+ drive: {
31
+ id: 'smart-card.one-click-chat-spotlight-v2.drive.ai-non-final',
32
+ defaultMessage: 'Discover insights from your Google Drive Smart Link using Rovo',
33
+ description: 'Spotlight text explaining that the inline action summarizes the linked Google Drive content.'
34
+ },
35
+ github: {
36
+ id: 'smart-card.one-click-chat-spotlight-v2.github.ai-non-final',
37
+ defaultMessage: 'Discover insights from your GitHub Smart Link using Rovo',
38
+ description: 'Spotlight text explaining that the inline action explains the linked GitHub code.'
39
+ },
40
+ dismiss: {
41
+ id: 'smart-card.one-click-chat-spotlight-v2.dismiss.ai-non-final',
42
+ defaultMessage: 'Dismiss spotlight',
43
+ description: 'Dismiss button in the Smart Link spotlight. Hides this spotlight for seven days.'
44
+ },
45
+ action: {
46
+ id: 'smart-card.one-click-chat-spotlight-v2.action.ai-non-final',
47
+ defaultMessage: 'Try Now',
48
+ description: 'Button in the spotlight that invokes the same Rovo action as the highlighted inline button.'
49
+ }
50
+ });
51
+ var styles = {
52
+ surface: "_1reo1wug _18m91wug _kqswh2mm _1bsbkpet _p12f1osq _vchhusvi _ca0qu2gc _n3tdu2gc _19bvu2gc _u5f3u2gc",
53
+ card: "_2rko1qi0 _bfhk1aqn _syaz15cr _16qs130s",
54
+ caret: "_kqswstnw _1bsb7vkz _4t3iftgi _bfhk1aqn _mkrz1oyg _lcxvglyw",
55
+ below: "_154iidpf",
56
+ above: "_94n5idpf _t9ec1sub",
57
+ close: "_2rko12b0 _v564k6bl _kqswstnw _154iu2gc _1xi2u2gc _ca0qv77o _n3tdv77o _19bvv77o _u5f3v77o _syaz15cr _bfhk1aqn _irr31ibz _1ggl5xtf _1di6of27",
58
+ content: "_kqswh2mm",
59
+ body: "_u5f31ejb",
60
+ action: "_2rko12b0 _v564k6bl _1h6d8yml _1dqonqa1 _189ee4h9 _syaz15cr _bfhk1aqn _ca0qv77o _n3tdv77o _19bvu2gc _u5f3u2gc _irr31ibz _1ggl5xtf _1di6of27"
61
+ };
62
+ var TargetContext = /*#__PURE__*/createContext(null);
63
+
64
+ // Keep Popup's inline trigger, dismissal and focus handling. The design-system Spotlight
65
+ // target renders a block element; the Smart Link action must stay inline.
66
+ var SpotlightSurface = /*#__PURE__*/forwardRef(function (_ref, forwardedRef) {
67
+ var children = _ref.children,
68
+ style = _ref.style,
69
+ _fit = _ref.shouldFitViewport,
70
+ _parent = _ref.shouldRenderToParent,
71
+ _container = _ref.shouldFitContainer,
72
+ _appearance = _ref.appearance,
73
+ _xcss = _ref.xcss,
74
+ _hidden = _ref.isReferenceHidden,
75
+ props = _objectWithoutProperties(_ref, _excluded);
76
+ var target = useContext(TargetContext);
77
+ var surface = useRef(null);
78
+ var _useState = useState({
79
+ above: false,
80
+ left: 24
81
+ }),
82
+ _useState2 = _slicedToArray(_useState, 2),
83
+ caret = _useState2[0],
84
+ setCaret = _useState2[1];
85
+ var ref = useCallback(function (node) {
86
+ surface.current = node;
87
+ if (typeof forwardedRef === 'function') forwardedRef(node);else if (forwardedRef) forwardedRef.current = node;
88
+ }, [forwardedRef]);
89
+ useEffect(function () {
90
+ var element = surface.current;
91
+ var anchor = target === null || target === void 0 ? void 0 : target.current;
92
+ if (!element || !anchor) return;
93
+ var frame = 0;
94
+ var measure = function measure() {
95
+ var card = element.getBoundingClientRect();
96
+ var trigger = anchor.getBoundingClientRect();
97
+ if (!card.width) return;
98
+ var above = card.bottom <= trigger.top;
99
+ var left = Math.max(16, Math.min(card.width - 32, trigger.left + trigger.width / 2 - card.left - 8));
100
+ setCaret(function (previous) {
101
+ return previous.above === above && previous.left === left ? previous : {
102
+ above: above,
103
+ left: left
104
+ };
105
+ });
106
+ };
107
+ var schedule = function schedule() {
108
+ cancelAnimationFrame(frame);
109
+ frame = requestAnimationFrame(measure);
110
+ };
111
+ var observer = new ResizeObserver(schedule);
112
+ observer.observe(element);
113
+ observer.observe(anchor);
114
+ window.addEventListener('resize', schedule);
115
+ window.addEventListener('scroll', schedule, true);
116
+ schedule();
117
+ return function () {
118
+ cancelAnimationFrame(frame);
119
+ observer.disconnect();
120
+ window.removeEventListener('resize', schedule);
121
+ window.removeEventListener('scroll', schedule, true);
122
+ };
123
+ }, [target]);
124
+ return /*#__PURE__*/React.createElement("div", _extends({}, props, {
125
+ ref: ref,
126
+ style: style,
127
+ className: ax([styles.surface])
128
+ }), /*#__PURE__*/React.createElement("span", {
129
+ "aria-hidden": "true",
130
+ style: {
131
+ left: caret.left
132
+ },
133
+ className: ax([styles.caret, caret.above ? styles.above : styles.below])
134
+ }), /*#__PURE__*/React.createElement(Box, {
135
+ xcss: styles.card
136
+ }, children));
137
+ });
138
+ function VisibleSpotlightCard(_ref2) {
139
+ var onShown = _ref2.onShown,
140
+ body = _ref2.body,
141
+ dismissLabel = _ref2.dismissLabel,
142
+ actionLabel = _ref2.actionLabel,
143
+ onDismiss = _ref2.onDismiss,
144
+ onAction = _ref2.onAction;
145
+ useEffect(function () {
146
+ return onShown();
147
+ }, [onShown]);
148
+ return /*#__PURE__*/React.createElement(Box, {
149
+ testId: "one-click-chat-spotlight-v2",
150
+ xcss: styles.content,
151
+ padding: "space.150"
152
+ }, /*#__PURE__*/React.createElement(Pressable, {
153
+ xcss: styles.close,
154
+ onClick: onDismiss,
155
+ "aria-label": dismissLabel
156
+ }, /*#__PURE__*/React.createElement(CrossIcon, {
157
+ label: "",
158
+ size: "small"
159
+ })), /*#__PURE__*/React.createElement(Stack, {
160
+ space: "space.050"
161
+ }, /*#__PURE__*/React.createElement(Box, {
162
+ xcss: styles.body
163
+ }, /*#__PURE__*/React.createElement(Text, {
164
+ color: "color.text.inverse"
165
+ }, body)), /*#__PURE__*/React.createElement(Inline, {
166
+ alignInline: "end"
167
+ }, /*#__PURE__*/React.createElement(Pressable, {
168
+ xcss: styles.action,
169
+ onClick: onAction
170
+ }, /*#__PURE__*/React.createElement(Text, {
171
+ color: "color.text.inverse"
172
+ }, actionLabel)))));
173
+ }
174
+ export function OneClickChatSpotlight(_ref3) {
175
+ var children = _ref3.children,
176
+ url = _ref3.url,
177
+ actionOptions = _ref3.actionOptions,
178
+ onInvoke = _ref3.onInvoke;
179
+ var intl = useIntl();
180
+ var target = useRef(null);
181
+ var _useState3 = useState(false),
182
+ _useState4 = _slicedToArray(_useState3, 2),
183
+ isOpportunity = _useState4[0],
184
+ setOpportunity = _useState4[1];
185
+ var _useAnalyticsEvents = useAnalyticsEvents(),
186
+ createAnalyticsEvent = _useAnalyticsEvents.createAnalyticsEvent;
187
+ var _useRovoConfig = useRovoConfig(),
188
+ product = _useRovoConfig.product;
189
+ var card = useSmartCardState(url !== null && url !== void 0 ? url : '');
190
+ var provider = getExtensionKey(card.details);
191
+ var onInteraction = useCallback(function (interaction) {
192
+ createAnalyticsEvent({
193
+ eventType: interaction === 'impression' ? 'track' : 'ui',
194
+ action: interaction === 'impression' ? 'viewed' : interaction,
195
+ actionSubject: 'oneClickChatSpotlight',
196
+ actionSubjectId: 'oneClickChatSpotlightV2',
197
+ attributes: {
198
+ provider: provider === 'google-object-provider' ? 'google-drive' : 'github',
199
+ product: product === 'CONFLUENCE' ? 'confluence_web' : 'jira_web',
200
+ appearance: 'inline',
201
+ cohort: 'treatment',
202
+ variant: 'v2'
203
+ }
204
+ }).fire(EVENT_CHANNEL);
205
+ }, [createAnalyticsEvent, provider, product]);
206
+ var spotlight = useOneClickChatSpotlightEligibility({
207
+ url: url,
208
+ actionOptions: actionOptions,
209
+ isOpportunity: isOpportunity,
210
+ onInteraction: onInteraction
211
+ });
212
+ useEffect(function () {
213
+ var element = target.current;
214
+ var doc = getDocument();
215
+ if (!element || !doc || typeof IntersectionObserver === 'undefined') {
216
+ return;
217
+ }
218
+ var intersects = false;
219
+ var update = function update() {
220
+ return setOpportunity(intersects && doc.visibilityState === 'visible');
221
+ };
222
+ var observer = new IntersectionObserver(function (_ref4) {
223
+ var _ref5 = _slicedToArray(_ref4, 1),
224
+ entry = _ref5[0];
225
+ intersects = entry.isIntersecting;
226
+ update();
227
+ });
228
+ observer.observe(element);
229
+ doc.addEventListener('visibilitychange', update);
230
+ return function () {
231
+ observer.disconnect();
232
+ doc.removeEventListener('visibilitychange', update);
233
+ };
234
+ }, []);
235
+ return /*#__PURE__*/React.createElement("span", {
236
+ ref: target,
237
+ role: "none",
238
+ onClick: function onClick(event) {
239
+ // Top-layer popups remain inside the Smart Link's anchor in the DOM.
240
+ event.preventDefault();
241
+ event.stopPropagation();
242
+ }
243
+ // Match the enclosing Smart Link's keypress handler; leave Escape keydown for Popup.
244
+ ,
245
+ onKeyPress: function onKeyPress(event) {
246
+ return event.stopPropagation();
247
+ }
248
+ }, /*#__PURE__*/React.createElement(TargetContext.Provider, {
249
+ value: target
250
+ }, /*#__PURE__*/React.createElement(Popup, {
251
+ popupComponent: SpotlightSurface,
252
+ shouldFitViewport: true,
253
+ isOpen: spotlight.isEligible,
254
+ onClose: spotlight.onDismiss,
255
+ placement: "bottom-start",
256
+ role: "dialog",
257
+ label: intl.formatMessage(messages.heading),
258
+ trigger: function trigger(_ref6) {
259
+ var ref = _ref6.ref;
260
+ return /*#__PURE__*/React.createElement("span", {
261
+ ref: ref,
262
+ onClickCapture: function onClickCapture() {
263
+ if (spotlight.isEligible) {
264
+ spotlight.onClick();
265
+ }
266
+ }
267
+ }, children);
268
+ },
269
+ content: function content() {
270
+ return /*#__PURE__*/React.createElement(VisibleSpotlightCard, {
271
+ onShown: spotlight.onShown,
272
+ body: intl.formatMessage(provider === 'google-object-provider' ? messages.drive : messages.github),
273
+ dismissLabel: intl.formatMessage(messages.dismiss),
274
+ actionLabel: intl.formatMessage(messages.action),
275
+ onDismiss: spotlight.onDismiss,
276
+ onAction: function onAction() {
277
+ if (spotlight.onClick()) {
278
+ onInvoke();
279
+ }
280
+ }
281
+ });
282
+ }
283
+ })));
284
+ }
@@ -9,6 +9,7 @@ function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t =
9
9
  import React, { useCallback, useMemo } from 'react';
10
10
  import { useIntl } from 'react-intl';
11
11
  import { extractSmartLinkProvider } from '@atlaskit/link-extractors/extract-smart-link-provider';
12
+ import { fg } from '@atlaskit/platform-feature-flags/fg';
12
13
  import { Box, Text } from '@atlaskit/primitives/compiled';
13
14
  import extractRovoChatAction from '../../../../extractors/flexible/actions/extract-rovo-chat-action';
14
15
  import { getExtensionKey } from '../../../../state/getExtensionKey';
@@ -18,10 +19,16 @@ import useRovoConfig from '../../../../state/hooks/use-rovo-config';
18
19
  import { useSmartCardState } from '../../../../state/store';
19
20
  import { getPromptAction, RovoChatPromptKey } from '../../../common/rovo-chat-utils';
20
21
  import { ActionButton } from '../action-button';
22
+ import { OneClickChatSpotlightLoader } from '../one-click-chat-spotlight/async';
21
23
  var styles = {
22
24
  text: "_19bv12x7 _1e0c116y _4cvr1h6o _s7n4nkob _19pk1i6y"
23
25
  };
24
- export var InlineRovoActionButton = function InlineRovoActionButton(_ref) {
26
+
27
+ // Keep the master implementation intact while the spotlight rollout is disabled.
28
+ export var InlineRovoActionButton = function InlineRovoActionButton(props) {
29
+ return fg('platform_sl_one_click_chat_spotlight_v2_fg') ? /*#__PURE__*/React.createElement(InlineRovoActionButtonWithSpotlight, props) : /*#__PURE__*/React.createElement(InlineRovoActionButtonLegacy, props);
30
+ };
31
+ var InlineRovoActionButtonLegacy = function InlineRovoActionButtonLegacy(_ref) {
25
32
  var testId = _ref.testId,
26
33
  url = _ref.url,
27
34
  actionOptions = _ref.actionOptions;
@@ -110,4 +117,103 @@ export var InlineRovoActionButton = function InlineRovoActionButton(_ref) {
110
117
  }, /*#__PURE__*/React.createElement(Text, {
111
118
  size: "small"
112
119
  }, content))) : null;
120
+ };
121
+ var InlineRovoActionButtonWithSpotlight = function InlineRovoActionButtonWithSpotlight(_ref3) {
122
+ var testId = _ref3.testId,
123
+ url = _ref3.url,
124
+ actionOptions = _ref3.actionOptions;
125
+ var _useRovoChat2 = useRovoChat(),
126
+ sendPromptMessage = _useRovoChat2.sendPromptMessage,
127
+ isRovoChatEnabled = _useRovoChat2.isRovoChatEnabled;
128
+ var intl = useIntl();
129
+ var cardState = useSmartCardState(url !== null && url !== void 0 ? url : '');
130
+ var extensionKey = getExtensionKey(cardState.details);
131
+ var rovoConfig = useRovoConfig();
132
+ var rovoChatAction = useMemo(function () {
133
+ return cardState.details && extractRovoChatAction({
134
+ response: cardState.details,
135
+ actionOptions: actionOptions,
136
+ rovoConfig: rovoConfig
137
+ });
138
+ }, [cardState.details, rovoConfig, actionOptions]);
139
+ var provider = useMemo(function () {
140
+ return cardState.details && extractSmartLinkProvider(cardState.details);
141
+ }, [cardState.details]);
142
+ var invoke = useInvokeClientAction({});
143
+ var promptKey = useMemo(function () {
144
+ var _cardState$details3, _cardState$details4;
145
+ 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')) {
146
+ return;
147
+ }
148
+ switch (extensionKey) {
149
+ case 'google-object-provider':
150
+ if ((_cardState$details4 = cardState.details) !== null && _cardState$details4 !== void 0 && (_cardState$details4 = _cardState$details4.data) !== null && _cardState$details4 !== void 0 && (_cardState$details4 = _cardState$details4['@type']) !== null && _cardState$details4 !== void 0 && _cardState$details4.includes('schema:PresentationDigitalDocument')) {
151
+ return RovoChatPromptKey.SUMMARIZE_PRESENTATION;
152
+ }
153
+ return RovoChatPromptKey.SUMMARIZE_DOCUMENT;
154
+ case 'onedrive-object-provider':
155
+ return RovoChatPromptKey.SUMMARIZE_DOCUMENT;
156
+ case 'github-object-provider':
157
+ case 'gitlab-object-provider':
158
+ return RovoChatPromptKey.EXPLAIN_CODE;
159
+ case 'slack-object-provider':
160
+ case 'ms-teams-object-provider':
161
+ return RovoChatPromptKey.CATCH_UP;
162
+ case 'salesforce-object-provider':
163
+ return RovoChatPromptKey.SALESFORCE_PREP;
164
+ }
165
+ }, [extensionKey, cardState]);
166
+ var _ref4 = promptKey ? getPromptAction({
167
+ promptKey: promptKey,
168
+ intl: intl,
169
+ url: url,
170
+ iconSize: 'small',
171
+ provider: provider === null || provider === void 0 ? void 0 : provider.text
172
+ }) || {} : {},
173
+ promptData = _ref4.data,
174
+ content = _ref4.content,
175
+ icon = _ref4.icon;
176
+ var invokePrompt = useCallback(function () {
177
+ if (isRovoChatEnabled && promptData && rovoChatAction !== null && rovoChatAction !== void 0 && rovoChatAction.invokeAction) {
178
+ invoke(_objectSpread(_objectSpread({}, rovoChatAction.invokeAction), {}, {
179
+ actionFn: function () {
180
+ var _actionFn2 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2() {
181
+ return _regeneratorRuntime.wrap(function (_context2) {
182
+ while (1) switch (_context2.prev = _context2.next) {
183
+ case 0:
184
+ return _context2.abrupt("return", sendPromptMessage(promptData));
185
+ case 1:
186
+ case "end":
187
+ return _context2.stop();
188
+ }
189
+ }, _callee2);
190
+ }));
191
+ function actionFn() {
192
+ return _actionFn2.apply(this, arguments);
193
+ }
194
+ return actionFn;
195
+ }(),
196
+ prompt: promptKey
197
+ }));
198
+ }
199
+ }, [sendPromptMessage, isRovoChatEnabled, promptData, rovoChatAction, promptKey, invoke]);
200
+ var handleClick = useCallback(function (event) {
201
+ event.preventDefault();
202
+ event.stopPropagation();
203
+ invokePrompt();
204
+ }, [invokePrompt]);
205
+ var button = promptData && content ? /*#__PURE__*/React.createElement(ActionButton, {
206
+ onClick: handleClick,
207
+ testId: testId
208
+ }, icon, /*#__PURE__*/React.createElement(Box, {
209
+ xcss: styles.text
210
+ }, /*#__PURE__*/React.createElement(Text, {
211
+ size: "small"
212
+ }, content))) : null;
213
+ return button && isRovoChatEnabled && rovoChatAction !== null && rovoChatAction !== void 0 && rovoChatAction.invokeAction ? /*#__PURE__*/React.createElement(OneClickChatSpotlightLoader, {
214
+ key: url,
215
+ url: url,
216
+ actionOptions: actionOptions,
217
+ onInvoke: invokePrompt
218
+ }, button) : button;
113
219
  };
@@ -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.2.1",
15
+ packageVersion: "46.3.1",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var LinkUrl = function LinkUrl(_ref) {
@@ -10,4 +10,4 @@ export declare function createSuppressionStore(storage: StorageClient, isAvailab
10
10
  export declare function getSuppressionStore(): SpotlightSuppression | undefined;
11
11
  export declare function claimSpotlight(owner: symbol): boolean;
12
12
  export declare function releaseSpotlight(owner: symbol): void;
13
- export declare function isSpotlightActive(owner: symbol): boolean;
13
+ export declare function isSpotlightActive(owner?: symbol): boolean;
@@ -0,0 +1,6 @@
1
+ import React from 'react';
2
+ import type { OneClickChatSpotlight } from './index';
3
+ type SpotlightComponent = typeof OneClickChatSpotlight;
4
+ /** Keep the existing action usable during SSR, loading and chunk failures. */
5
+ export declare function OneClickChatSpotlightLoader(props: React.ComponentProps<SpotlightComponent>): React.JSX.Element;
6
+ export {};
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ import type { InternalCardActionOptions } from '../../../Card/types';
7
+ export declare function OneClickChatSpotlight({ children, url, actionOptions, onInvoke, }: {
8
+ actionOptions?: InternalCardActionOptions;
9
+ children: React.ReactNode;
10
+ onInvoke: () => void;
11
+ url?: string;
12
+ }): React.JSX.Element;
@@ -3,7 +3,7 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import type { InternalCardActionOptions as CardActionOptions } from '../../../Card/types';
6
- export declare const InlineRovoActionButton: ({ testId, url, actionOptions, }: {
6
+ export declare const InlineRovoActionButton: (props: {
7
7
  actionOptions?: CardActionOptions;
8
8
  testId?: string;
9
9
  url?: string;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "46.3.0",
3
+ "version": "46.3.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -73,7 +73,7 @@
73
73
  "@atlaskit/lozenge": "^17.0.0",
74
74
  "@atlaskit/menu": "^11.0.0",
75
75
  "@atlaskit/modal-dialog": "^17.0.0",
76
- "@atlaskit/motion": "^9.1.0",
76
+ "@atlaskit/motion": "^9.2.0",
77
77
  "@atlaskit/object": "^2.3.0",
78
78
  "@atlaskit/outbound-auth-flow-client": "^4.2.0",
79
79
  "@atlaskit/platform-feature-experiments": "^0.3.0",
@@ -93,7 +93,7 @@
93
93
  "@atlaskit/textfield": "^10.2.0",
94
94
  "@atlaskit/theme": "^28.2.0",
95
95
  "@atlaskit/tile": "^5.0.0",
96
- "@atlaskit/tmp-editor-statsig": "^219.0.0",
96
+ "@atlaskit/tmp-editor-statsig": "^220.0.0",
97
97
  "@atlaskit/tokens": "^20.1.0",
98
98
  "@atlaskit/tooltip": "^24.4.0",
99
99
  "@atlaskit/ufo": "^2.0.0",