@atlaskit/smart-card 42.3.3 → 42.3.5

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 (54) hide show
  1. package/CHANGELOG.md +18 -0
  2. package/dist/cjs/messages.js +0 -10
  3. package/dist/cjs/state/actions/index.js +6 -8
  4. package/dist/cjs/state/hooks/useSmartLink.js +3 -3
  5. package/dist/cjs/state/store/index.js +1 -5
  6. package/dist/cjs/utils/analytics/analytics.js +1 -1
  7. package/dist/cjs/view/CardWithUrl/component.js +15 -14
  8. package/dist/cjs/view/FlexibleCard/components/actions/follow-action/index.js +1 -1
  9. package/dist/cjs/view/FlexibleCard/index.js +13 -5
  10. package/dist/cjs/view/LinkUrl/HyperlinkResolver/index.js +3 -26
  11. package/dist/cjs/view/LinkUrl/index.js +23 -30
  12. package/dist/es2019/messages.js +0 -10
  13. package/dist/es2019/state/actions/index.js +4 -6
  14. package/dist/es2019/state/hooks/useSmartLink.js +3 -3
  15. package/dist/es2019/state/store/index.js +1 -5
  16. package/dist/es2019/utils/analytics/analytics.js +1 -1
  17. package/dist/es2019/view/CardWithUrl/component.js +15 -14
  18. package/dist/es2019/view/FlexibleCard/components/actions/follow-action/index.js +1 -1
  19. package/dist/es2019/view/FlexibleCard/index.js +12 -5
  20. package/dist/es2019/view/LinkUrl/HyperlinkResolver/index.js +3 -27
  21. package/dist/es2019/view/LinkUrl/index.js +23 -28
  22. package/dist/esm/messages.js +0 -10
  23. package/dist/esm/state/actions/index.js +6 -8
  24. package/dist/esm/state/hooks/useSmartLink.js +3 -3
  25. package/dist/esm/state/store/index.js +1 -5
  26. package/dist/esm/utils/analytics/analytics.js +1 -1
  27. package/dist/esm/view/CardWithUrl/component.js +15 -14
  28. package/dist/esm/view/FlexibleCard/components/actions/follow-action/index.js +1 -1
  29. package/dist/esm/view/FlexibleCard/index.js +12 -5
  30. package/dist/esm/view/LinkUrl/HyperlinkResolver/index.js +3 -26
  31. package/dist/esm/view/LinkUrl/index.js +23 -28
  32. package/dist/types/messages.d.ts +1 -1
  33. package/dist/types/state/actions/index.d.ts +1 -2
  34. package/dist/types/state/hooks/useSmartLink.d.ts +2 -3
  35. package/dist/types/state/store/index.d.ts +1 -1
  36. package/dist/types/view/FlexibleCard/index.d.ts +13 -1
  37. package/dist/types/view/LinkUrl/HyperlinkResolver/index.d.ts +0 -5
  38. package/dist/types-ts4.5/messages.d.ts +1 -1
  39. package/dist/types-ts4.5/state/actions/index.d.ts +1 -2
  40. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +2 -3
  41. package/dist/types-ts4.5/state/store/index.d.ts +1 -1
  42. package/dist/types-ts4.5/view/FlexibleCard/index.d.ts +13 -1
  43. package/dist/types-ts4.5/view/LinkUrl/HyperlinkResolver/index.d.ts +0 -5
  44. package/package.json +5 -8
  45. package/dist/cjs/view/LinkUrl/HyperlinkResolver/error-boundary.js +0 -18
  46. package/dist/cjs/view/LinkUrl/HyperlinkResolver/resolve-hyperlink.js +0 -70
  47. package/dist/es2019/view/LinkUrl/HyperlinkResolver/error-boundary.js +0 -9
  48. package/dist/es2019/view/LinkUrl/HyperlinkResolver/resolve-hyperlink.js +0 -60
  49. package/dist/esm/view/LinkUrl/HyperlinkResolver/error-boundary.js +0 -11
  50. package/dist/esm/view/LinkUrl/HyperlinkResolver/resolve-hyperlink.js +0 -62
  51. package/dist/types/view/LinkUrl/HyperlinkResolver/error-boundary.d.ts +0 -4
  52. package/dist/types/view/LinkUrl/HyperlinkResolver/resolve-hyperlink.d.ts +0 -3
  53. package/dist/types-ts4.5/view/LinkUrl/HyperlinkResolver/error-boundary.d.ts +0 -4
  54. package/dist/types-ts4.5/view/LinkUrl/HyperlinkResolver/resolve-hyperlink.d.ts +0 -3
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useEffect, useMemo } from 'react';
3
3
  import { useSmartLinkContext } from '@atlaskit/link-provider';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
5
6
  import { InternalActionName, SmartLinkStatus } from '../../constants';
6
7
  import { FlexibleCardContext } from '../../state/flexible-ui-context';
@@ -8,6 +9,7 @@ import { useAISummaryConfig } from '../../state/hooks/use-ai-summary-config';
8
9
  import useResolve from '../../state/hooks/use-resolve';
9
10
  import Container from './components/container';
10
11
  import { getContextByStatus } from './utils';
12
+ const PENDING_LINK_STATUSES = [SmartLinkStatus.Pending, SmartLinkStatus.Resolving];
11
13
 
12
14
  /**
13
15
  * This represents a Flexible Card: a link represented by a card with metadata.
@@ -18,6 +20,7 @@ import { getContextByStatus } from './utils';
18
20
  const FlexibleCard = ({
19
21
  appearance = 'flexible',
20
22
  cardState,
23
+ placeholderData,
21
24
  children,
22
25
  id,
23
26
  onAuthorize,
@@ -48,11 +51,15 @@ const FlexibleCard = ({
48
51
  details
49
52
  } = cardState;
50
53
  const status = cardType;
54
+ const shouldUsePlaceholderData = PENDING_LINK_STATUSES.includes(status) && placeholderData && fg('platform_initial_data_for_smart_cards');
55
+ // if we have placeholder data it means we can internally use it
56
+ // as resolved data until the actual data comes back as one of the final statuses
57
+ const contextStatus = shouldUsePlaceholderData ? SmartLinkStatus.Resolved : status;
51
58
  const context = useMemo(() => getContextByStatus({
52
59
  aiSummaryConfig,
53
60
  appearance,
54
61
  fireEvent,
55
- response: details,
62
+ response: shouldUsePlaceholderData ? placeholderData.details : details,
56
63
  id,
57
64
  onAuthorize,
58
65
  onClick,
@@ -60,16 +67,16 @@ const FlexibleCard = ({
60
67
  renderers,
61
68
  resolve,
62
69
  actionOptions,
63
- status,
70
+ status: shouldUsePlaceholderData ? contextStatus : status,
64
71
  url,
65
72
  isPreviewPanelAvailable,
66
73
  openPreviewPanel
67
- }), [aiSummaryConfig, appearance, fireEvent, details, id, onAuthorize, onClick, origin, renderers, resolve, actionOptions, status, url, isPreviewPanelAvailable, openPreviewPanel]);
74
+ }), [aiSummaryConfig, appearance, fireEvent, shouldUsePlaceholderData, placeholderData === null || placeholderData === void 0 ? void 0 : placeholderData.details, details, id, onAuthorize, onClick, origin, renderers, resolve, actionOptions, contextStatus, status, url, isPreviewPanelAvailable, openPreviewPanel]);
68
75
  const flexibleCardContext = useMemo(() => ({
69
76
  data: context,
70
- status,
77
+ status: fg('platform_initial_data_for_smart_cards') ? contextStatus : status,
71
78
  ui
72
- }), [context, status, ui]);
79
+ }), [context, contextStatus, status, ui]);
73
80
  const {
74
81
  linkTitle
75
82
  } = context || {};
@@ -1,19 +1,15 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
- import React, { useCallback, useContext } from 'react';
2
+ import React, { useCallback } from 'react';
3
3
  import { withErrorBoundary as withReactErrorBoundary } from 'react-error-boundary';
4
4
  import { injectIntl } from 'react-intl-next';
5
- import FeatureGates from '@atlaskit/feature-gate-js-client';
6
5
  import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
7
6
  import { fg } from '@atlaskit/platform-feature-flags';
8
- import { SmartCardContext } from '../../../state';
9
7
  import { getFirstPartyIdentifier, getServices, getThirdPartyARI } from '../../../state/helpers';
10
8
  import useResolveHyperlink from '../../../state/hooks/use-resolve-hyperlink';
11
- import useResolveHyperlinkValidator, { isGoogleDomain, isSharePointDomain } from '../../../state/hooks/use-resolve-hyperlink/useResolveHyperlinkValidator';
9
+ import useResolveHyperlinkValidator from '../../../state/hooks/use-resolve-hyperlink/useResolveHyperlinkValidator';
12
10
  import withIntlProvider from '../../common/intl-provider';
13
11
  import { useFire3PWorkflowsClickEvent } from '../../SmartLinkEvents/useSmartLinkEvents';
14
12
  import Hyperlink from '../Hyperlink';
15
- import withErrorBoundary from './error-boundary';
16
- import { ResolveHyperlink } from './resolve-hyperlink';
17
13
  import HyperlinkUnauthorizedView from './unauthorize-view';
18
14
  const HyperlinkFallbackComponent = () => null;
19
15
  const withValidator = (Component, DefaultComponent) => props => {
@@ -75,24 +71,4 @@ export const HyperlinkWithSmartLinkResolver = withReactErrorBoundary(withValidat
75
71
  enforceContext: false
76
72
  }), Hyperlink), {
77
73
  FallbackComponent: HyperlinkFallbackComponent
78
- });
79
-
80
- // Remove on navx-1834-refactor-resolved-hyperlink cleanup
81
-
82
- const HyperlinkResolver = ({
83
- href
84
- }) => {
85
- const hasSmartCardProvider = !!useContext(SmartCardContext);
86
- const isSharePointResolveEnabled = FeatureGates.getExperimentValue('platform_editor_resolve_hyperlinks_confluence', 'isEnabled', false) || FeatureGates.getExperimentValue('platform_editor_resolve_hyperlinks_jira', 'isEnabled', false);
87
- const isGoogleResolveEnabled = FeatureGates.getExperimentValue('platform_editor_resolve_google_hyperlinks', 'isEnabled', false);
88
- const shouldResolveSharePoint = isSharePointDomain(href) && isSharePointResolveEnabled;
89
- const shouldResolveGoogle = isGoogleDomain(href) && isGoogleResolveEnabled;
90
- const shouldResolveHyperlink = hasSmartCardProvider && (shouldResolveSharePoint || shouldResolveGoogle);
91
- if (!shouldResolveHyperlink) {
92
- return null;
93
- }
94
- return /*#__PURE__*/React.createElement(ResolveHyperlink, {
95
- href: href
96
- });
97
- };
98
- export default withErrorBoundary(HyperlinkResolver);
74
+ });
@@ -4,16 +4,15 @@ import { di } from 'react-magnetic-di';
4
4
  import { withAnalyticsContext } from '@atlaskit/analytics-next';
5
5
  import FeatureGates from '@atlaskit/feature-gate-js-client';
6
6
  import AKLink from '@atlaskit/link';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { withLinkClickedEvent } from '../../utils/analytics/click';
9
8
  import { LinkAnalyticsContext } from '../../utils/analytics/LinkAnalyticsContext';
10
9
  import Hyperlink from './Hyperlink';
11
- import HyperlinkResolver, { HyperlinkWithSmartLinkResolver } from './HyperlinkResolver';
10
+ import { HyperlinkWithSmartLinkResolver } from './HyperlinkResolver';
12
11
  import LinkWarningModal from './LinkWarningModal';
13
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
14
13
  const PACKAGE_DATA = {
15
14
  packageName: "@atlaskit/smart-card",
16
- packageVersion: "0.0.0-development",
15
+ packageVersion: "42.3.4",
17
16
  componentName: 'linkUrl'
18
17
  };
19
18
  const Anchor = withLinkClickedEvent('a');
@@ -34,30 +33,28 @@ const LinkUrl = ({
34
33
  ...linkWarningModalProps
35
34
  } = useLinkWarningModal();
36
35
  const resolveHyperlinkFG = FeatureGates.checkGate('platform_editor_resolve_hyperlinks_killswitch');
37
- if (fg('navx-1834-refactor-resolved-hyperlink')) {
38
- if (resolveHyperlinkFG) {
39
- const Link = enableResolve ? HyperlinkWithSmartLinkResolver : Hyperlink;
40
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LinkAnalyticsContext, {
41
- url: href,
42
- display: "url"
43
- }, /*#__PURE__*/React.createElement(Link, _extends({
44
- href: href,
45
- isLinkComponent: isLinkComponent,
46
- onClick: e => {
47
- if (!checkSafety) {
48
- onClick && onClick(e);
49
- return;
50
- }
36
+ if (resolveHyperlinkFG) {
37
+ const Link = enableResolve ? HyperlinkWithSmartLinkResolver : Hyperlink;
38
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LinkAnalyticsContext, {
39
+ url: href,
40
+ display: "url"
41
+ }, /*#__PURE__*/React.createElement(Link, _extends({
42
+ href: href,
43
+ isLinkComponent: isLinkComponent,
44
+ onClick: e => {
45
+ if (!checkSafety) {
46
+ onClick && onClick(e);
47
+ return;
48
+ }
51
49
 
52
- // Only call the onClick if the link is safe
53
- if (isLinkSafe(e, href)) {
54
- onClick && onClick(e);
55
- } else {
56
- showSafetyWarningModal(e, href);
57
- }
50
+ // Only call the onClick if the link is safe
51
+ if (isLinkSafe(e, href)) {
52
+ onClick && onClick(e);
53
+ } else {
54
+ showSafetyWarningModal(e, href);
58
55
  }
59
- }, props), children)), checkSafety && /*#__PURE__*/React.createElement(LinkWarningModal, linkWarningModalProps));
60
- }
56
+ }
57
+ }, props), children)), checkSafety && /*#__PURE__*/React.createElement(LinkWarningModal, linkWarningModalProps));
61
58
  }
62
59
  const Link = isLinkComponent ? LinkComponent : Anchor;
63
60
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LinkAnalyticsContext, {
@@ -82,8 +79,6 @@ const LinkUrl = ({
82
79
  showSafetyWarningModal(e, href);
83
80
  }
84
81
  }
85
- }, props), children)), checkSafety && /*#__PURE__*/React.createElement(LinkWarningModal, linkWarningModalProps), enableResolve && href && resolveHyperlinkFG && !fg('navx-1834-refactor-resolved-hyperlink') && /*#__PURE__*/React.createElement(HyperlinkResolver, {
86
- href: href
87
- }));
82
+ }, props), children)), checkSafety && /*#__PURE__*/React.createElement(LinkWarningModal, linkWarningModalProps));
88
83
  };
89
84
  export default withAnalyticsContext(PACKAGE_DATA)(LinkUrl);
@@ -794,11 +794,6 @@ export var messages = defineMessages({
794
794
  defaultMessage: 'Follow to get notifications on this space',
795
795
  description: 'Description on what Follow does'
796
796
  },
797
- follow_projectGalaxia: {
798
- id: 'fabric.linking.follow_project-galaxia',
799
- defaultMessage: 'Follow space',
800
- description: 'Click to follow a project.'
801
- },
802
797
  follow_project_errorGalaxia: {
803
798
  id: 'fabric.linking.follow_project_error-galaxia',
804
799
  defaultMessage: 'We encountered an error while trying to follow the space. Check your connection or refresh the page and try again.',
@@ -809,11 +804,6 @@ export var messages = defineMessages({
809
804
  defaultMessage: 'Unfollow to stop receiving space notifications',
810
805
  description: 'Description on what Unfollow does'
811
806
  },
812
- unfollow_projectGalaxia: {
813
- id: 'fabric.linking.unfollow_project-galaxia',
814
- defaultMessage: 'Unfollow space',
815
- description: 'Click to unfollow a project.'
816
- },
817
807
  unfollow_project_errorGalaxia: {
818
808
  id: 'fabric.linking.unfollow_project_error-galaxia',
819
809
  defaultMessage: 'We encountered an error while trying to unfollow the space. Check your connection or refresh the page and try again.',
@@ -4,14 +4,13 @@ import { useCallback, useMemo } from 'react';
4
4
  import { useSmartLinkContext } from '@atlaskit/link-provider';
5
5
  import { ACTION_RESOLVING, ACTION_UPDATE_METADATA_STATUS, cardAction } from '@atlaskit/linking-common';
6
6
  import { auth } from '@atlaskit/outbound-auth-flow-client';
7
- import { fg } from '@atlaskit/platform-feature-flags';
8
7
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
9
8
  import { SmartLinkStatus } from '../../constants';
10
9
  import { startUfoExperience } from '../analytics';
11
10
  import { getByDefinitionId, getDefinitionId, getExtensionKey, getServices } from '../helpers';
12
11
  import useInvokeClientAction from '../hooks/use-invoke-client-action';
13
12
  import useResolve from '../hooks/use-resolve';
14
- export var useSmartCardActions = function useSmartCardActions(id, url, placeholderData) {
13
+ export var useSmartCardActions = function useSmartCardActions(id, url) {
15
14
  var resolveUrl = useResolve();
16
15
  var invokeClientAction = useInvokeClientAction({});
17
16
  var _useAnalyticsEvents = useAnalyticsEvents(),
@@ -21,9 +20,8 @@ export var useSmartCardActions = function useSmartCardActions(id, url, placehold
21
20
  var getState = store.getState,
22
21
  dispatch = store.dispatch;
23
22
  var getSmartLinkState = useCallback(function () {
24
- var _ref2, _getState$url;
25
- var placeholderObject = fg('platform_initial_data_for_smart_cards') ? placeholderData : undefined;
26
- var _ref = (_ref2 = (_getState$url = getState()[url]) !== null && _getState$url !== void 0 ? _getState$url : placeholderObject) !== null && _ref2 !== void 0 ? _ref2 : {
23
+ var _getState$url;
24
+ var _ref = (_getState$url = getState()[url]) !== null && _getState$url !== void 0 ? _getState$url : {
27
25
  status: SmartLinkStatus.Pending
28
26
  },
29
27
  details = _ref.details,
@@ -34,7 +32,7 @@ export var useSmartCardActions = function useSmartCardActions(id, url, placehold
34
32
  status: status,
35
33
  metadataStatus: metadataStatus
36
34
  };
37
- }, [getState, url, placeholderData]);
35
+ }, [getState, url]);
38
36
  var setMetadataStatus = useCallback(function (metadataStatus) {
39
37
  dispatch(cardAction(ACTION_UPDATE_METADATA_STATUS, {
40
38
  url: url
@@ -147,7 +145,7 @@ export var useSmartCardActions = function useSmartCardActions(id, url, placehold
147
145
  }
148
146
  }, [getSmartLinkState, id, reload, fireEvent]);
149
147
  var invoke = useCallback( /*#__PURE__*/function () {
150
- var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(opts, appearance) {
148
+ var _ref3 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(opts, appearance) {
151
149
  var key, action, source;
152
150
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
153
151
  while (1) switch (_context2.prev = _context2.next) {
@@ -174,7 +172,7 @@ export var useSmartCardActions = function useSmartCardActions(id, url, placehold
174
172
  }, _callee2);
175
173
  }));
176
174
  return function (_x, _x2) {
177
- return _ref4.apply(this, arguments);
175
+ return _ref3.apply(this, arguments);
178
176
  };
179
177
  }(), [invokeClientAction]);
180
178
  return useMemo(function () {
@@ -5,13 +5,13 @@ import { useSmartCardActions as useSmartLinkActions } from '../actions';
5
5
  import { useSmartLinkConfig } from '../config';
6
6
  import { useSmartLinkRenderers } from '../renderers';
7
7
  import { useSmartCardState as useSmartLinkState } from '../store';
8
- export function useSmartLink(id, url, placeholderData) {
9
- var state = useSmartLinkState(url, placeholderData);
8
+ export function useSmartLink(id, url) {
9
+ var state = useSmartLinkState(url);
10
10
  var _useSmartLinkContext = useSmartLinkContext(),
11
11
  store = _useSmartLinkContext.store,
12
12
  isPreviewPanelAvailable = _useSmartLinkContext.isPreviewPanelAvailable,
13
13
  openPreviewPanel = _useSmartLinkContext.openPreviewPanel;
14
- var actions = useSmartLinkActions(id, url, placeholderData);
14
+ var actions = useSmartLinkActions(id, url);
15
15
  var config = useSmartLinkConfig();
16
16
  var renderers = useSmartLinkRenderers();
17
17
 
@@ -1,17 +1,13 @@
1
1
  import { useSyncExternalStoreWithSelector } from 'use-sync-external-store/shim/with-selector';
2
2
  import { useSmartLinkContext } from '@atlaskit/link-provider';
3
- import { fg } from '@atlaskit/platform-feature-flags';
4
3
  var PENDING_STATE = {
5
4
  status: 'pending'
6
5
  };
7
- export function useSmartCardState(url, placeholderData) {
6
+ export function useSmartCardState(url) {
8
7
  var _useSmartLinkContext = useSmartLinkContext(),
9
8
  store = _useSmartLinkContext.store;
10
9
  var cardState = useSyncExternalStoreWithSelector(store.subscribe, store.getState, store.getState, function (state) {
11
10
  return state[url];
12
11
  });
13
- if (fg('platform_initial_data_for_smart_cards')) {
14
- return (cardState === null || cardState === void 0 ? void 0 : cardState.status) !== 'resolved' && placeholderData ? placeholderData : cardState !== null && cardState !== void 0 ? cardState : PENDING_STATE;
15
- }
16
12
  return cardState !== null && cardState !== void 0 ? cardState : PENDING_STATE;
17
13
  }
@@ -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: "0.0.0-development"
7
+ packageVersion: "42.3.4"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -58,22 +58,9 @@ function Component(_ref) {
58
58
  var isFlexibleUi = useMemo(function () {
59
59
  return isFlexibleUiCard(children, ui);
60
60
  }, [children, ui]);
61
- var structuredPlaceholderData = fg('platform_initial_data_for_smart_cards') ?
62
- // eslint-disable-next-line react-hooks/rules-of-hooks
63
- useMemo(function () {
64
- // execute some basic validation logic to ensure we should consider using placeholder data
65
- if (appearance === 'inline' && isValidPlaceholderData(placeholderData)) {
66
- var data = {
67
- status: 'resolved',
68
- metadataStatus: undefined,
69
- details: placeholderData
70
- };
71
- return data;
72
- }
73
- }, [appearance, placeholderData]) : undefined;
74
61
 
75
62
  // Get state, actions for this card.
76
- var _useSmartLink = useSmartLink(id, url, fg('platform_initial_data_for_smart_cards') ? structuredPlaceholderData : undefined),
63
+ var _useSmartLink = useSmartLink(id, url),
77
64
  state = _useSmartLink.state,
78
65
  actions = _useSmartLink.actions,
79
66
  config = _useSmartLink.config,
@@ -233,6 +220,19 @@ function Component(_ref) {
233
220
  display: isFlexibleUi ? 'flexible' : appearance
234
221
  });
235
222
  }, [id, appearance, definitionId, isFlexibleUi, fireEvent]);
223
+ var structuredPlaceholderData = fg('platform_initial_data_for_smart_cards') ?
224
+ // eslint-disable-next-line react-hooks/rules-of-hooks
225
+ useMemo(function () {
226
+ // execute some basic validation logic to ensure we should consider using placeholder data
227
+ if (isFlexibleUi && isValidPlaceholderData(placeholderData)) {
228
+ var data = {
229
+ status: 'resolved',
230
+ metadataStatus: undefined,
231
+ details: placeholderData
232
+ };
233
+ return data;
234
+ }
235
+ }, [isFlexibleUi, placeholderData]) : undefined;
236
236
  if (isFlexibleUi) {
237
237
  var cardState = state;
238
238
  if (error) {
@@ -247,6 +247,7 @@ function Component(_ref) {
247
247
  return /*#__PURE__*/React.createElement(FlexibleCard, {
248
248
  id: id,
249
249
  cardState: cardState,
250
+ placeholderData: fg('platform_initial_data_for_smart_cards') ? structuredPlaceholderData : undefined,
250
251
  onAuthorize: services.length && handleAuthorize || undefined,
251
252
  onClick: handleClickWrapper,
252
253
  origin: "smartLinkCard",
@@ -47,7 +47,7 @@ var FollowAction = function FollowAction(props) {
47
47
  data = _objectWithoutProperties(actionData, _excluded);
48
48
  var isStackItem = props.as === 'stack-item';
49
49
  var message = value ? messages.follow : messages.unfollow;
50
- var projectMessage = value ? FeatureGates.getExperimentValue('project-terminology-refresh', 'isEnabled', false) ? messages.follow_projectGalaxia : messages.follow_project : FeatureGates.getExperimentValue('project-terminology-refresh', 'isEnabled', false) ? messages.unfollow_projectGalaxia : messages.unfollow_project;
50
+ var projectMessage = value ? messages.follow_project : messages.unfollow_project;
51
51
  var goalMessage = value ? messages.follow_goal : messages.unfollow_goal;
52
52
  var stackMessage = isProject ? projectMessage : goalMessage;
53
53
  var label = isStackItem ? stackMessage : message;
@@ -1,6 +1,7 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import React, { useEffect, useMemo } from 'react';
3
3
  import { useSmartLinkContext } from '@atlaskit/link-provider';
4
+ import { fg } from '@atlaskit/platform-feature-flags';
4
5
  import { useAnalyticsEvents } from '../../common/analytics/generated/use-analytics-events';
5
6
  import { InternalActionName, SmartLinkStatus } from '../../constants';
6
7
  import { FlexibleCardContext } from '../../state/flexible-ui-context';
@@ -8,6 +9,7 @@ import { useAISummaryConfig } from '../../state/hooks/use-ai-summary-config';
8
9
  import useResolve from '../../state/hooks/use-resolve';
9
10
  import Container from './components/container';
10
11
  import { getContextByStatus } from './utils';
12
+ var PENDING_LINK_STATUSES = [SmartLinkStatus.Pending, SmartLinkStatus.Resolving];
11
13
 
12
14
  /**
13
15
  * This represents a Flexible Card: a link represented by a card with metadata.
@@ -20,6 +22,7 @@ var FlexibleCard = function FlexibleCard(_ref) {
20
22
  var _ref$appearance = _ref.appearance,
21
23
  appearance = _ref$appearance === void 0 ? 'flexible' : _ref$appearance,
22
24
  cardState = _ref.cardState,
25
+ placeholderData = _ref.placeholderData,
23
26
  children = _ref.children,
24
27
  id = _ref.id,
25
28
  onAuthorize = _ref.onAuthorize,
@@ -44,12 +47,16 @@ var FlexibleCard = function FlexibleCard(_ref) {
44
47
  var cardType = cardState.status,
45
48
  details = cardState.details;
46
49
  var status = cardType;
50
+ var shouldUsePlaceholderData = PENDING_LINK_STATUSES.includes(status) && placeholderData && fg('platform_initial_data_for_smart_cards');
51
+ // if we have placeholder data it means we can internally use it
52
+ // as resolved data until the actual data comes back as one of the final statuses
53
+ var contextStatus = shouldUsePlaceholderData ? SmartLinkStatus.Resolved : status;
47
54
  var context = useMemo(function () {
48
55
  return getContextByStatus({
49
56
  aiSummaryConfig: aiSummaryConfig,
50
57
  appearance: appearance,
51
58
  fireEvent: fireEvent,
52
- response: details,
59
+ response: shouldUsePlaceholderData ? placeholderData.details : details,
53
60
  id: id,
54
61
  onAuthorize: onAuthorize,
55
62
  onClick: onClick,
@@ -57,19 +64,19 @@ var FlexibleCard = function FlexibleCard(_ref) {
57
64
  renderers: renderers,
58
65
  resolve: resolve,
59
66
  actionOptions: actionOptions,
60
- status: status,
67
+ status: shouldUsePlaceholderData ? contextStatus : status,
61
68
  url: url,
62
69
  isPreviewPanelAvailable: isPreviewPanelAvailable,
63
70
  openPreviewPanel: openPreviewPanel
64
71
  });
65
- }, [aiSummaryConfig, appearance, fireEvent, details, id, onAuthorize, onClick, origin, renderers, resolve, actionOptions, status, url, isPreviewPanelAvailable, openPreviewPanel]);
72
+ }, [aiSummaryConfig, appearance, fireEvent, shouldUsePlaceholderData, placeholderData === null || placeholderData === void 0 ? void 0 : placeholderData.details, details, id, onAuthorize, onClick, origin, renderers, resolve, actionOptions, contextStatus, status, url, isPreviewPanelAvailable, openPreviewPanel]);
66
73
  var flexibleCardContext = useMemo(function () {
67
74
  return {
68
75
  data: context,
69
- status: status,
76
+ status: fg('platform_initial_data_for_smart_cards') ? contextStatus : status,
70
77
  ui: ui
71
78
  };
72
- }, [context, status, ui]);
79
+ }, [context, contextStatus, status, ui]);
73
80
  var _ref2 = context || {},
74
81
  linkTitle = _ref2.linkTitle;
75
82
  var title = linkTitle === null || linkTitle === void 0 ? void 0 : linkTitle.text;
@@ -1,21 +1,17 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
3
  var _excluded = ["onClick"];
4
- import React, { useCallback, useContext } from 'react';
4
+ import React, { useCallback } from 'react';
5
5
  import { withErrorBoundary as withReactErrorBoundary } from 'react-error-boundary';
6
6
  import { injectIntl } from 'react-intl-next';
7
- import FeatureGates from '@atlaskit/feature-gate-js-client';
8
7
  import { extractSmartLinkProvider } from '@atlaskit/link-extractors';
9
8
  import { fg } from '@atlaskit/platform-feature-flags';
10
- import { SmartCardContext } from '../../../state';
11
9
  import { getFirstPartyIdentifier, getServices, getThirdPartyARI } from '../../../state/helpers';
12
10
  import useResolveHyperlink from '../../../state/hooks/use-resolve-hyperlink';
13
- import useResolveHyperlinkValidator, { isGoogleDomain, isSharePointDomain } from '../../../state/hooks/use-resolve-hyperlink/useResolveHyperlinkValidator';
11
+ import useResolveHyperlinkValidator from '../../../state/hooks/use-resolve-hyperlink/useResolveHyperlinkValidator';
14
12
  import withIntlProvider from '../../common/intl-provider';
15
13
  import { useFire3PWorkflowsClickEvent } from '../../SmartLinkEvents/useSmartLinkEvents';
16
14
  import Hyperlink from '../Hyperlink';
17
- import withErrorBoundary from './error-boundary';
18
- import { ResolveHyperlink } from './resolve-hyperlink';
19
15
  import HyperlinkUnauthorizedView from './unauthorize-view';
20
16
  var HyperlinkFallbackComponent = function HyperlinkFallbackComponent() {
21
17
  return null;
@@ -82,23 +78,4 @@ export var HyperlinkWithSmartLinkResolver = withReactErrorBoundary(withValidator
82
78
  enforceContext: false
83
79
  }), Hyperlink), {
84
80
  FallbackComponent: HyperlinkFallbackComponent
85
- });
86
-
87
- // Remove on navx-1834-refactor-resolved-hyperlink cleanup
88
-
89
- var HyperlinkResolver = function HyperlinkResolver(_ref2) {
90
- var href = _ref2.href;
91
- var hasSmartCardProvider = !!useContext(SmartCardContext);
92
- var isSharePointResolveEnabled = FeatureGates.getExperimentValue('platform_editor_resolve_hyperlinks_confluence', 'isEnabled', false) || FeatureGates.getExperimentValue('platform_editor_resolve_hyperlinks_jira', 'isEnabled', false);
93
- var isGoogleResolveEnabled = FeatureGates.getExperimentValue('platform_editor_resolve_google_hyperlinks', 'isEnabled', false);
94
- var shouldResolveSharePoint = isSharePointDomain(href) && isSharePointResolveEnabled;
95
- var shouldResolveGoogle = isGoogleDomain(href) && isGoogleResolveEnabled;
96
- var shouldResolveHyperlink = hasSmartCardProvider && (shouldResolveSharePoint || shouldResolveGoogle);
97
- if (!shouldResolveHyperlink) {
98
- return null;
99
- }
100
- return /*#__PURE__*/React.createElement(ResolveHyperlink, {
101
- href: href
102
- });
103
- };
104
- export default withErrorBoundary(HyperlinkResolver);
81
+ });
@@ -7,16 +7,15 @@ import { di } from 'react-magnetic-di';
7
7
  import { withAnalyticsContext } from '@atlaskit/analytics-next';
8
8
  import FeatureGates from '@atlaskit/feature-gate-js-client';
9
9
  import AKLink from '@atlaskit/link';
10
- import { fg } from '@atlaskit/platform-feature-flags';
11
10
  import { withLinkClickedEvent } from '../../utils/analytics/click';
12
11
  import { LinkAnalyticsContext } from '../../utils/analytics/LinkAnalyticsContext';
13
12
  import Hyperlink from './Hyperlink';
14
- import HyperlinkResolver, { HyperlinkWithSmartLinkResolver } from './HyperlinkResolver';
13
+ import { HyperlinkWithSmartLinkResolver } from './HyperlinkResolver';
15
14
  import LinkWarningModal from './LinkWarningModal';
16
15
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
17
16
  var PACKAGE_DATA = {
18
17
  packageName: "@atlaskit/smart-card",
19
- packageVersion: "0.0.0-development",
18
+ packageVersion: "42.3.4",
20
19
  componentName: 'linkUrl'
21
20
  };
22
21
  var Anchor = withLinkClickedEvent('a');
@@ -39,30 +38,28 @@ var LinkUrl = function LinkUrl(_ref) {
39
38
  showSafetyWarningModal = _useLinkWarningModal.showSafetyWarningModal,
40
39
  linkWarningModalProps = _objectWithoutProperties(_useLinkWarningModal, _excluded2);
41
40
  var resolveHyperlinkFG = FeatureGates.checkGate('platform_editor_resolve_hyperlinks_killswitch');
42
- if (fg('navx-1834-refactor-resolved-hyperlink')) {
43
- if (resolveHyperlinkFG) {
44
- var _Link = enableResolve ? HyperlinkWithSmartLinkResolver : Hyperlink;
45
- return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LinkAnalyticsContext, {
46
- url: href,
47
- display: "url"
48
- }, /*#__PURE__*/React.createElement(_Link, _extends({
49
- href: href,
50
- isLinkComponent: isLinkComponent,
51
- onClick: function onClick(e) {
52
- if (!checkSafety) {
53
- _onClick && _onClick(e);
54
- return;
55
- }
41
+ if (resolveHyperlinkFG) {
42
+ var _Link = enableResolve ? HyperlinkWithSmartLinkResolver : Hyperlink;
43
+ return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LinkAnalyticsContext, {
44
+ url: href,
45
+ display: "url"
46
+ }, /*#__PURE__*/React.createElement(_Link, _extends({
47
+ href: href,
48
+ isLinkComponent: isLinkComponent,
49
+ onClick: function onClick(e) {
50
+ if (!checkSafety) {
51
+ _onClick && _onClick(e);
52
+ return;
53
+ }
56
54
 
57
- // Only call the onClick if the link is safe
58
- if (isLinkSafe(e, href)) {
59
- _onClick && _onClick(e);
60
- } else {
61
- showSafetyWarningModal(e, href);
62
- }
55
+ // Only call the onClick if the link is safe
56
+ if (isLinkSafe(e, href)) {
57
+ _onClick && _onClick(e);
58
+ } else {
59
+ showSafetyWarningModal(e, href);
63
60
  }
64
- }, props), children)), checkSafety && /*#__PURE__*/React.createElement(LinkWarningModal, linkWarningModalProps));
65
- }
61
+ }
62
+ }, props), children)), checkSafety && /*#__PURE__*/React.createElement(LinkWarningModal, linkWarningModalProps));
66
63
  }
67
64
  var Link = isLinkComponent ? LinkComponent : Anchor;
68
65
  return /*#__PURE__*/React.createElement(React.Fragment, null, /*#__PURE__*/React.createElement(LinkAnalyticsContext, {
@@ -87,8 +84,6 @@ var LinkUrl = function LinkUrl(_ref) {
87
84
  showSafetyWarningModal(e, href);
88
85
  }
89
86
  }
90
- }, props), children)), checkSafety && /*#__PURE__*/React.createElement(LinkWarningModal, linkWarningModalProps), enableResolve && href && resolveHyperlinkFG && !fg('navx-1834-refactor-resolved-hyperlink') && /*#__PURE__*/React.createElement(HyperlinkResolver, {
91
- href: href
92
- }));
87
+ }, props), children)), checkSafety && /*#__PURE__*/React.createElement(LinkWarningModal, linkWarningModalProps));
93
88
  };
94
89
  export default withAnalyticsContext(PACKAGE_DATA)(LinkUrl);
@@ -1,6 +1,6 @@
1
1
  import { type MessageDescriptor } from 'react-intl-next';
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 MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | '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_unauthorised_account_action' | '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_projectGalaxia' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'unfollow_project_description' | 'unfollow_project_descriptionGalaxia' | 'unfollow_projectGalaxia' | 'unfollow_project' | 'unfollow_projectGalaxia' | 'unfollow_project_error' | 'unfollow_project_errorGalaxia' | 'unfollow_goal' | 'unfollow_goal_description' | 'unfollow_goal_error' | 'user_attributes' | 'view' | 'viewIn' | '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_appify';
3
+ export type MessageKey = 'assigned_to' | 'ai_summarize' | 'ai_summarized' | 'ai_summarized_abbreviation' | 'ai_summarized_info' | 'ai_summarized_info_short' | 'ai_summarizing' | 'ai_summary_error_generic' | 'ai_summary_error_acceptable_use_violation' | 'ai_summary_error_hipaa_content_detected' | 'ai_summary_error_exceeding_context_length_error' | 'ai_summary_action' | 'ai_summary_action_description' | '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_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'copied_url_to_clipboard' | 'could_not_load_link' | 'download' | 'download_description' | 'download_file' | 'follow' | 'follow_project_description' | 'follow_project_descriptionGalaxia' | 'follow_project' | 'follow_goal' | 'follow_goal_description' | 'follow_project_error' | 'follow_project_errorGalaxia' | 'follow_goal_error' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'owned_by_override' | 'preview_description' | 'preview_improved' | 'preview_modal' | 'preview_panel' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | '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' | '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_appify';
4
4
  type Messages = {
5
5
  [K in MessageKey]: MessageDescriptor;
6
6
  };
@@ -1,8 +1,7 @@
1
1
  import { type JsonLd } from '@atlaskit/json-ld-types';
2
- import { type CardState } from '@atlaskit/linking-common';
3
2
  import { type InvokeClientOpts, type InvokeServerOpts } from '../../model/invoke-opts';
4
3
  import { type CardInnerAppearance } from '../../view/Card/types';
5
- export declare const useSmartCardActions: (id: string, url: string, placeholderData?: CardState) => {
4
+ export declare const useSmartCardActions: (id: string, url: string) => {
6
5
  register: () => Promise<void>;
7
6
  reload: () => void;
8
7
  authorize: (appearance: CardInnerAppearance) => void;
@@ -1,6 +1,5 @@
1
- import type { CardState } from '@atlaskit/linking-common';
2
- export declare function useSmartLink(id: string, url: string, placeholderData?: CardState): {
3
- state: CardState;
1
+ export declare function useSmartLink(id: string, url: string): {
2
+ state: import("@atlaskit/linking-common").CardState;
4
3
  actions: {
5
4
  register: () => Promise<void>;
6
5
  reload: () => void;
@@ -1,3 +1,3 @@
1
1
  import { type CardState } from '@atlaskit/linking-common';
2
2
  export type { CardType } from '@atlaskit/linking-common';
3
- export declare function useSmartCardState(url: string, placeholderData?: CardState): CardState;
3
+ export declare function useSmartCardState(url: string): CardState;