@atlaskit/smart-card 40.9.0 → 40.10.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,20 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 40.10.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [`bd14b2c6330ba`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/bd14b2c6330ba) -
8
+ [https://product-fabric.atlassian.net/browse/ED-28981](ED-28981) - use `CardSSR` component for
9
+ smart card SSR
10
+
11
+ ### Patch Changes
12
+
13
+ - [#194444](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/pull-requests/194444)
14
+ [`04107fe3817c3`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/04107fe3817c3) -
15
+ Cleans up FG twg-graphyte-smart-card-link-theme-fix
16
+ - Updated dependencies
17
+
3
18
  ## 40.9.0
4
19
 
5
20
  ### Minor Changes
@@ -11,7 +11,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
13
  packageName: "@atlaskit/smart-card",
14
- packageVersion: "40.8.3"
14
+ packageVersion: "40.9.0"
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -10,7 +10,6 @@ var _slicedToArray2 = _interopRequireDefault(require("@babel/runtime/helpers/sli
10
10
  var _react = _interopRequireWildcard(require("react"));
11
11
  var _state = require("../../../state");
12
12
  var _ufoExperiences = require("../../../state/analytics/ufoExperiences");
13
- var _store = require("../../../state/store");
14
13
  var _shouldSample = require("../../../utils/shouldSample");
15
14
  var _component = require("../component");
16
15
  var _LoadingCardLink = require("./LoadingCardLink");
@@ -20,25 +19,18 @@ function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r
20
19
  // being compared to. Since the default container is the `document`, we set this
21
20
  // up to check once a Smart Link is within `X` px from the bottom of the viewport.
22
21
  var ROOT_MARGIN_VERTICAL = '360px';
23
- // Returns true on SSR and SPA if page was SSR'd
24
- var isPageSSRd = function isPageSSRd() {
25
- return Boolean(process.env.REACT_SSR || window.__SSR_RENDERED__);
26
- };
27
22
  function LazyIntersectionObserverCard(props) {
28
- var appearance = props.appearance,
29
- url = props.url,
30
- id = props.id;
31
23
  var ref = (0, _react.useRef)(null);
32
- var state = (0, _store.useSmartCardState)(url);
33
- // If page was SSR we don't need to enable intersection for already resolved cards,
34
- // to avoid flickering.
35
- var _useState = (0, _react.useState)(isPageSSRd() && state.status === 'resolved'),
24
+ var _useState = (0, _react.useState)(false),
36
25
  _useState2 = (0, _slicedToArray2.default)(_useState, 2),
37
26
  isIntersecting = _useState2[0],
38
27
  setIsIntersecting = _useState2[1];
39
28
  var _useState3 = (0, _react.useState)((0, _shouldSample.shouldSample)()),
40
29
  _useState4 = (0, _slicedToArray2.default)(_useState3, 1),
41
30
  shouldSendRenderedUFOEvent = _useState4[0];
31
+ var appearance = props.appearance,
32
+ url = props.url,
33
+ id = props.id;
42
34
  var prefetch = (0, _state.usePrefetch)(url);
43
35
  var Component = appearance === 'inline' ? 'span' : 'div';
44
36
  var ComponentObserver = Component;
@@ -47,23 +39,15 @@ function LazyIntersectionObserverCard(props) {
47
39
  return entry.isIntersecting;
48
40
  });
49
41
  if (isVisible) {
42
+ if (shouldSendRenderedUFOEvent) {
43
+ (0, _ufoExperiences.startUfoExperience)('smart-link-rendered', id);
44
+ }
50
45
  setIsIntersecting(true);
51
46
  observer.disconnect();
52
47
  } else {
53
48
  prefetch();
54
49
  }
55
- }, [prefetch]);
56
- var isSartUfoExperienceSend = (0, _react.useRef)(false);
57
- // We need to use `useLayoutEffect` here to ensure that the UFO start event is sent
58
- // before another component is rendered.
59
- (0, _react.useLayoutEffect)(function () {
60
- if (isIntersecting && !isSartUfoExperienceSend.current) {
61
- isSartUfoExperienceSend.current = true;
62
- if (shouldSendRenderedUFOEvent) {
63
- (0, _ufoExperiences.startUfoExperience)('smart-link-rendered', id);
64
- }
65
- }
66
- }, [id, isIntersecting, shouldSendRenderedUFOEvent]);
50
+ }, [id, prefetch, shouldSendRenderedUFOEvent]);
67
51
  (0, _react.useEffect)(function () {
68
52
  if (!ref.current) {
69
53
  return;
@@ -22,13 +22,11 @@ a._10uedcr7{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-seri
22
22
  a._ye10131l{color:var(--ds-text-subtlest,#626f86)}
23
23
  ._1bnx8stv:hover{text-decoration-line:underline}
24
24
  ._30l314q2:hover{color:var(--ds-link,#0c66e4)}
25
- ._30l31gjq:hover{color:var(--ds-text-subtle,#44546f)}
26
25
  ._9oik1r31:hover{text-decoration-color:currentColor}
27
26
  ._jf4cnqa1:hover{text-decoration-style:solid}
28
27
  ._1iohnqa1:active, ._5goinqa1:focus, ._jf4cnqa1:hover, ._1726nqa1:visited{text-decoration-style:solid}
29
28
  ._1nrm1r31:active, ._1a3b1r31:focus, ._9oik1r31:hover, ._1ydc1r31:visited{text-decoration-color:currentColor}
30
29
  ._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
31
- ._9h8h1fxt:active{color:var(--ds-text,#172b4d)}
32
30
  ._9h8h1gjq:active, ._f8pj1gjq:focus, ._30l31gjq:hover, ._10531gjq:visited{color:var(--ds-text-subtle,#44546f)}
33
31
  ._c2wa8stv:active, ._4fpr8stv:focus, ._1bnx8stv:hover, ._1x288stv:visited{text-decoration-line:underline}
34
32
  a._1ray131l:active, a._dlb7131l:focus, a._rnxt131l:hover, a._1h4d131l:visited{color:var(--ds-text-subtlest,#626f86)}
@@ -11,7 +11,6 @@ require("./index.compiled.css");
11
11
  var _runtime = require("@compiled/react/runtime");
12
12
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
13
13
  var _react = _interopRequireWildcard(require("react"));
14
- var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
15
14
  var _tooltip = _interopRequireDefault(require("@atlaskit/tooltip"));
16
15
  var _constants = require("../../../../../../constants");
17
16
  var _useLinkClicked = require("../../../../../../state/analytics/useLinkClicked");
@@ -67,15 +66,6 @@ var anchorLinkLineHeight2Map = {
67
66
  medium: "_102kviql",
68
67
  small: "_102kviql"
69
68
  };
70
-
71
- /**
72
- * Remove on FG clean up of twg-graphyte-smart-card-link-theme-fix
73
- */
74
- var themeStyleMapOld = {
75
- grey: "_fjv61r31 _93u91r31 _g2lk1r31 _pnzf1r31 _hlwq8stv _1e2m8stv _1l4b8stv _ue8d8stv _yni7nqa1 _1bianqa1 _93jhnqa1 _64n6nqa1 _1ray131l _dlb7131l _rnxt131l _1h4d131l _10uedcr7 _ye10131l",
76
- black: "_syaz1gjq _9oik1r31 _1bnx8stv _jf4cnqa1 _30l31gjq _9h8h1fxt",
77
- link: "_syaz14q2 _9oik1r31 _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
78
- };
79
69
  var themeStyleMap = {
80
70
  grey: "_fjv61r31 _93u91r31 _g2lk1r31 _pnzf1r31 _hlwq8stv _1e2m8stv _1l4b8stv _ue8d8stv _yni7nqa1 _1bianqa1 _93jhnqa1 _64n6nqa1 _1ray131l _dlb7131l _rnxt131l _1h4d131l _10uedcr7 _ye10131l",
81
71
  black: "_syaz1gjq _1nrm1r31 _1a3b1r31 _9oik1r31 _1ydc1r31 _c2wa8stv _4fpr8stv _1bnx8stv _1x288stv _1iohnqa1 _5goinqa1 _jf4cnqa1 _1726nqa1 _9h8h1gjq _f8pj1gjq _30l31gjq _10531gjq",
@@ -118,7 +108,7 @@ var BaseLinkElement = function BaseLinkElement(_ref) {
118
108
  href: url
119
109
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
120
110
  ,
121
- className: (0, _runtime.ax)(["_16jlkb7n _1o9zkb7n _i0dl1wug", linkStyleSizeMap[size], anchorLineClampMap[getMaxLines(maxLines)], "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _sudp1e54", workBreakStyleMap[hasSpace ? 'true' : 'false'], getMaxLines(maxLines) === 1 && anchorLinkLineHeight1Map[size], getMaxLines(maxLines) === 2 && anchorLinkLineHeight2Map[size], (0, _platformFeatureFlags.fg)('twg-graphyte-smart-card-link-theme-fix') ? themeStyleMap[theme] : themeStyleMapOld[theme], className])
111
+ className: (0, _runtime.ax)(["_16jlkb7n _1o9zkb7n _i0dl1wug", linkStyleSizeMap[size], anchorLineClampMap[getMaxLines(maxLines)], "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _sudp1e54", workBreakStyleMap[hasSpace ? 'true' : 'false'], getMaxLines(maxLines) === 1 && anchorLinkLineHeight1Map[size], getMaxLines(maxLines) === 2 && anchorLinkLineHeight2Map[size], themeStyleMap[theme], className])
122
112
  // We do not want set the target if it is the default value of '_self'. This prevents link
123
113
  // click issues in Confluence and Trello which rely on it not being set unless necessary.
124
114
  }, target !== '_self' && {
@@ -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: "40.8.3",
22
+ packageVersion: "40.9.0",
23
23
  componentName: 'linkUrl'
24
24
  };
25
25
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -2,7 +2,7 @@ export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
4
  packageName: "@atlaskit/smart-card",
5
- packageVersion: "40.8.3"
5
+ packageVersion: "40.9.0"
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,7 +1,6 @@
1
- import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
1
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
2
2
  import { usePrefetch } from '../../../state';
3
3
  import { startUfoExperience } from '../../../state/analytics/ufoExperiences';
4
- import { useSmartCardState } from '../../../state/store';
5
4
  import { shouldSample } from '../../../utils/shouldSample';
6
5
  import { CardWithUrlContent } from '../component';
7
6
  import { LoadingCardLink } from './LoadingCardLink';
@@ -11,45 +10,30 @@ import { LoadingCardLink } from './LoadingCardLink';
11
10
  // being compared to. Since the default container is the `document`, we set this
12
11
  // up to check once a Smart Link is within `X` px from the bottom of the viewport.
13
12
  const ROOT_MARGIN_VERTICAL = '360px';
14
- // Returns true on SSR and SPA if page was SSR'd
15
- const isPageSSRd = () => {
16
- return Boolean(process.env.REACT_SSR || window.__SSR_RENDERED__);
17
- };
18
13
  export function LazyIntersectionObserverCard(props) {
14
+ const ref = useRef(null);
15
+ const [isIntersecting, setIsIntersecting] = useState(false);
16
+ const [shouldSendRenderedUFOEvent] = useState(shouldSample());
19
17
  const {
20
18
  appearance,
21
19
  url,
22
20
  id
23
21
  } = props;
24
- const ref = useRef(null);
25
- const state = useSmartCardState(url);
26
- // If page was SSR we don't need to enable intersection for already resolved cards,
27
- // to avoid flickering.
28
- const [isIntersecting, setIsIntersecting] = useState(isPageSSRd() && state.status === 'resolved');
29
- const [shouldSendRenderedUFOEvent] = useState(shouldSample());
30
22
  const prefetch = usePrefetch(url);
31
23
  const Component = appearance === 'inline' ? 'span' : 'div';
32
24
  const ComponentObserver = Component;
33
25
  const onIntersection = useCallback((entries, observer) => {
34
26
  const isVisible = entries.some(entry => entry.isIntersecting);
35
27
  if (isVisible) {
28
+ if (shouldSendRenderedUFOEvent) {
29
+ startUfoExperience('smart-link-rendered', id);
30
+ }
36
31
  setIsIntersecting(true);
37
32
  observer.disconnect();
38
33
  } else {
39
34
  prefetch();
40
35
  }
41
- }, [prefetch]);
42
- const isSartUfoExperienceSend = useRef(false);
43
- // We need to use `useLayoutEffect` here to ensure that the UFO start event is sent
44
- // before another component is rendered.
45
- useLayoutEffect(() => {
46
- if (isIntersecting && !isSartUfoExperienceSend.current) {
47
- isSartUfoExperienceSend.current = true;
48
- if (shouldSendRenderedUFOEvent) {
49
- startUfoExperience('smart-link-rendered', id);
50
- }
51
- }
52
- }, [id, isIntersecting, shouldSendRenderedUFOEvent]);
36
+ }, [id, prefetch, shouldSendRenderedUFOEvent]);
53
37
  useEffect(() => {
54
38
  if (!ref.current) {
55
39
  return;
@@ -22,13 +22,11 @@ a._10uedcr7{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-seri
22
22
  a._ye10131l{color:var(--ds-text-subtlest,#626f86)}
23
23
  ._1bnx8stv:hover{text-decoration-line:underline}
24
24
  ._30l314q2:hover{color:var(--ds-link,#0c66e4)}
25
- ._30l31gjq:hover{color:var(--ds-text-subtle,#44546f)}
26
25
  ._9oik1r31:hover{text-decoration-color:currentColor}
27
26
  ._jf4cnqa1:hover{text-decoration-style:solid}
28
27
  ._1iohnqa1:active, ._5goinqa1:focus, ._jf4cnqa1:hover, ._1726nqa1:visited{text-decoration-style:solid}
29
28
  ._1nrm1r31:active, ._1a3b1r31:focus, ._9oik1r31:hover, ._1ydc1r31:visited{text-decoration-color:currentColor}
30
29
  ._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
31
- ._9h8h1fxt:active{color:var(--ds-text,#172b4d)}
32
30
  ._9h8h1gjq:active, ._f8pj1gjq:focus, ._30l31gjq:hover, ._10531gjq:visited{color:var(--ds-text-subtle,#44546f)}
33
31
  ._c2wa8stv:active, ._4fpr8stv:focus, ._1bnx8stv:hover, ._1x288stv:visited{text-decoration-line:underline}
34
32
  a._1ray131l:active, a._dlb7131l:focus, a._rnxt131l:hover, a._1h4d131l:visited{color:var(--ds-text-subtlest,#626f86)}
@@ -6,7 +6,6 @@ import { ax, ix } from "@compiled/react/runtime";
6
6
  /* eslint-disable @atlaskit/design-system/use-tokens-typography */
7
7
 
8
8
  import React, { useMemo } from 'react';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import Tooltip from '@atlaskit/tooltip';
11
10
  import { SmartLinkSize, SmartLinkTheme } from '../../../../../../constants';
12
11
  import { useMouseDownEvent } from '../../../../../../state/analytics/useLinkClicked';
@@ -57,15 +56,6 @@ const anchorLinkLineHeight2Map = {
57
56
  medium: "_102kviql",
58
57
  small: "_102kviql"
59
58
  };
60
-
61
- /**
62
- * Remove on FG clean up of twg-graphyte-smart-card-link-theme-fix
63
- */
64
- const themeStyleMapOld = {
65
- grey: "_fjv61r31 _93u91r31 _g2lk1r31 _pnzf1r31 _hlwq8stv _1e2m8stv _1l4b8stv _ue8d8stv _yni7nqa1 _1bianqa1 _93jhnqa1 _64n6nqa1 _1ray131l _dlb7131l _rnxt131l _1h4d131l _10uedcr7 _ye10131l",
66
- black: "_syaz1gjq _9oik1r31 _1bnx8stv _jf4cnqa1 _30l31gjq _9h8h1fxt",
67
- link: "_syaz14q2 _9oik1r31 _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
68
- };
69
59
  const themeStyleMap = {
70
60
  grey: "_fjv61r31 _93u91r31 _g2lk1r31 _pnzf1r31 _hlwq8stv _1e2m8stv _1l4b8stv _ue8d8stv _yni7nqa1 _1bianqa1 _93jhnqa1 _64n6nqa1 _1ray131l _dlb7131l _rnxt131l _1h4d131l _10uedcr7 _ye10131l",
71
61
  black: "_syaz1gjq _1nrm1r31 _1a3b1r31 _9oik1r31 _1ydc1r31 _c2wa8stv _4fpr8stv _1bnx8stv _1x288stv _1iohnqa1 _5goinqa1 _jf4cnqa1 _1726nqa1 _9h8h1gjq _f8pj1gjq _30l31gjq _10531gjq",
@@ -102,7 +92,7 @@ const BaseLinkElement = ({
102
92
  href: url
103
93
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
104
94
  ,
105
- className: ax(["_16jlkb7n _1o9zkb7n _i0dl1wug", linkStyleSizeMap[size], anchorLineClampMap[getMaxLines(maxLines)], "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _sudp1e54", workBreakStyleMap[hasSpace ? 'true' : 'false'], getMaxLines(maxLines) === 1 && anchorLinkLineHeight1Map[size], getMaxLines(maxLines) === 2 && anchorLinkLineHeight2Map[size], fg('twg-graphyte-smart-card-link-theme-fix') ? themeStyleMap[theme] : themeStyleMapOld[theme], className])
95
+ className: ax(["_16jlkb7n _1o9zkb7n _i0dl1wug", linkStyleSizeMap[size], anchorLineClampMap[getMaxLines(maxLines)], "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _sudp1e54", workBreakStyleMap[hasSpace ? 'true' : 'false'], getMaxLines(maxLines) === 1 && anchorLinkLineHeight1Map[size], getMaxLines(maxLines) === 2 && anchorLinkLineHeight2Map[size], themeStyleMap[theme], className])
106
96
  // We do not want set the target if it is the default value of '_self'. This prevents link
107
97
  // click issues in Confluence and Trello which rely on it not being set unless necessary.
108
98
  }, target !== '_self' && {
@@ -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: "40.8.3",
12
+ packageVersion: "40.9.0",
13
13
  componentName: 'linkUrl'
14
14
  };
15
15
  const Anchor = withLinkClickedEvent('a');
@@ -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: "40.8.3"
7
+ packageVersion: "40.9.0"
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,8 +1,7 @@
1
1
  import _slicedToArray from "@babel/runtime/helpers/slicedToArray";
2
- import React, { useCallback, useEffect, useLayoutEffect, useRef, useState } from 'react';
2
+ import React, { useCallback, useEffect, useRef, useState } from 'react';
3
3
  import { usePrefetch } from '../../../state';
4
4
  import { startUfoExperience } from '../../../state/analytics/ufoExperiences';
5
- import { useSmartCardState } from '../../../state/store';
6
5
  import { shouldSample } from '../../../utils/shouldSample';
7
6
  import { CardWithUrlContent } from '../component';
8
7
  import { LoadingCardLink } from './LoadingCardLink';
@@ -12,25 +11,18 @@ import { LoadingCardLink } from './LoadingCardLink';
12
11
  // being compared to. Since the default container is the `document`, we set this
13
12
  // up to check once a Smart Link is within `X` px from the bottom of the viewport.
14
13
  var ROOT_MARGIN_VERTICAL = '360px';
15
- // Returns true on SSR and SPA if page was SSR'd
16
- var isPageSSRd = function isPageSSRd() {
17
- return Boolean(process.env.REACT_SSR || window.__SSR_RENDERED__);
18
- };
19
14
  export function LazyIntersectionObserverCard(props) {
20
- var appearance = props.appearance,
21
- url = props.url,
22
- id = props.id;
23
15
  var ref = useRef(null);
24
- var state = useSmartCardState(url);
25
- // If page was SSR we don't need to enable intersection for already resolved cards,
26
- // to avoid flickering.
27
- var _useState = useState(isPageSSRd() && state.status === 'resolved'),
16
+ var _useState = useState(false),
28
17
  _useState2 = _slicedToArray(_useState, 2),
29
18
  isIntersecting = _useState2[0],
30
19
  setIsIntersecting = _useState2[1];
31
20
  var _useState3 = useState(shouldSample()),
32
21
  _useState4 = _slicedToArray(_useState3, 1),
33
22
  shouldSendRenderedUFOEvent = _useState4[0];
23
+ var appearance = props.appearance,
24
+ url = props.url,
25
+ id = props.id;
34
26
  var prefetch = usePrefetch(url);
35
27
  var Component = appearance === 'inline' ? 'span' : 'div';
36
28
  var ComponentObserver = Component;
@@ -39,23 +31,15 @@ export function LazyIntersectionObserverCard(props) {
39
31
  return entry.isIntersecting;
40
32
  });
41
33
  if (isVisible) {
34
+ if (shouldSendRenderedUFOEvent) {
35
+ startUfoExperience('smart-link-rendered', id);
36
+ }
42
37
  setIsIntersecting(true);
43
38
  observer.disconnect();
44
39
  } else {
45
40
  prefetch();
46
41
  }
47
- }, [prefetch]);
48
- var isSartUfoExperienceSend = useRef(false);
49
- // We need to use `useLayoutEffect` here to ensure that the UFO start event is sent
50
- // before another component is rendered.
51
- useLayoutEffect(function () {
52
- if (isIntersecting && !isSartUfoExperienceSend.current) {
53
- isSartUfoExperienceSend.current = true;
54
- if (shouldSendRenderedUFOEvent) {
55
- startUfoExperience('smart-link-rendered', id);
56
- }
57
- }
58
- }, [id, isIntersecting, shouldSendRenderedUFOEvent]);
42
+ }, [id, prefetch, shouldSendRenderedUFOEvent]);
59
43
  useEffect(function () {
60
44
  if (!ref.current) {
61
45
  return;
@@ -22,13 +22,11 @@ a._10uedcr7{font:var(--ds-font-body-UNSAFE_small,normal 400 9pt/1pc ui-sans-seri
22
22
  a._ye10131l{color:var(--ds-text-subtlest,#626f86)}
23
23
  ._1bnx8stv:hover{text-decoration-line:underline}
24
24
  ._30l314q2:hover{color:var(--ds-link,#0c66e4)}
25
- ._30l31gjq:hover{color:var(--ds-text-subtle,#44546f)}
26
25
  ._9oik1r31:hover{text-decoration-color:currentColor}
27
26
  ._jf4cnqa1:hover{text-decoration-style:solid}
28
27
  ._1iohnqa1:active, ._5goinqa1:focus, ._jf4cnqa1:hover, ._1726nqa1:visited{text-decoration-style:solid}
29
28
  ._1nrm1r31:active, ._1a3b1r31:focus, ._9oik1r31:hover, ._1ydc1r31:visited{text-decoration-color:currentColor}
30
29
  ._9h8h16c2:active{color:var(--ds-link-pressed,#05c)}
31
- ._9h8h1fxt:active{color:var(--ds-text,#172b4d)}
32
30
  ._9h8h1gjq:active, ._f8pj1gjq:focus, ._30l31gjq:hover, ._10531gjq:visited{color:var(--ds-text-subtle,#44546f)}
33
31
  ._c2wa8stv:active, ._4fpr8stv:focus, ._1bnx8stv:hover, ._1x288stv:visited{text-decoration-line:underline}
34
32
  a._1ray131l:active, a._dlb7131l:focus, a._rnxt131l:hover, a._1h4d131l:visited{color:var(--ds-text-subtlest,#626f86)}
@@ -6,7 +6,6 @@ import { ax, ix } from "@compiled/react/runtime";
6
6
  /* eslint-disable @atlaskit/design-system/use-tokens-typography */
7
7
 
8
8
  import React, { useMemo } from 'react';
9
- import { fg } from '@atlaskit/platform-feature-flags';
10
9
  import Tooltip from '@atlaskit/tooltip';
11
10
  import { SmartLinkSize, SmartLinkTheme } from '../../../../../../constants';
12
11
  import { useMouseDownEvent } from '../../../../../../state/analytics/useLinkClicked';
@@ -59,15 +58,6 @@ var anchorLinkLineHeight2Map = {
59
58
  medium: "_102kviql",
60
59
  small: "_102kviql"
61
60
  };
62
-
63
- /**
64
- * Remove on FG clean up of twg-graphyte-smart-card-link-theme-fix
65
- */
66
- var themeStyleMapOld = {
67
- grey: "_fjv61r31 _93u91r31 _g2lk1r31 _pnzf1r31 _hlwq8stv _1e2m8stv _1l4b8stv _ue8d8stv _yni7nqa1 _1bianqa1 _93jhnqa1 _64n6nqa1 _1ray131l _dlb7131l _rnxt131l _1h4d131l _10uedcr7 _ye10131l",
68
- black: "_syaz1gjq _9oik1r31 _1bnx8stv _jf4cnqa1 _30l31gjq _9h8h1fxt",
69
- link: "_syaz14q2 _9oik1r31 _1bnx8stv _jf4cnqa1 _30l314q2 _9h8h16c2"
70
- };
71
61
  var themeStyleMap = {
72
62
  grey: "_fjv61r31 _93u91r31 _g2lk1r31 _pnzf1r31 _hlwq8stv _1e2m8stv _1l4b8stv _ue8d8stv _yni7nqa1 _1bianqa1 _93jhnqa1 _64n6nqa1 _1ray131l _dlb7131l _rnxt131l _1h4d131l _10uedcr7 _ye10131l",
73
63
  black: "_syaz1gjq _1nrm1r31 _1a3b1r31 _9oik1r31 _1ydc1r31 _c2wa8stv _4fpr8stv _1bnx8stv _1x288stv _1iohnqa1 _5goinqa1 _jf4cnqa1 _1726nqa1 _9h8h1gjq _f8pj1gjq _30l31gjq _10531gjq",
@@ -110,7 +100,7 @@ var BaseLinkElement = function BaseLinkElement(_ref) {
110
100
  href: url
111
101
  // eslint-disable-next-line @atlaskit/ui-styling-standard/no-classname-prop
112
102
  ,
113
- className: ax(["_16jlkb7n _1o9zkb7n _i0dl1wug", linkStyleSizeMap[size], anchorLineClampMap[getMaxLines(maxLines)], "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _sudp1e54", workBreakStyleMap[hasSpace ? 'true' : 'false'], getMaxLines(maxLines) === 1 && anchorLinkLineHeight1Map[size], getMaxLines(maxLines) === 2 && anchorLinkLineHeight2Map[size], fg('twg-graphyte-smart-card-link-theme-fix') ? themeStyleMap[theme] : themeStyleMapOld[theme], className])
103
+ className: ax(["_16jlkb7n _1o9zkb7n _i0dl1wug", linkStyleSizeMap[size], anchorLineClampMap[getMaxLines(maxLines)], "_1reo15vq _18m915vq _1e0ccj1k _1bto1l2s _sudp1e54", workBreakStyleMap[hasSpace ? 'true' : 'false'], getMaxLines(maxLines) === 1 && anchorLinkLineHeight1Map[size], getMaxLines(maxLines) === 2 && anchorLinkLineHeight2Map[size], themeStyleMap[theme], className])
114
104
  // We do not want set the target if it is the default value of '_self'. This prevents link
115
105
  // click issues in Confluence and Trello which rely on it not being set unless necessary.
116
106
  }, target !== '_self' && {
@@ -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: "40.8.3",
15
+ packageVersion: "40.9.0",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var Anchor = withLinkClickedEvent('a');
@@ -1,8 +1,3 @@
1
1
  import React from 'react';
2
2
  import { type CardWithUrlContentProps } from '../types';
3
- declare global {
4
- interface Window {
5
- __SSR_RENDERED__?: boolean;
6
- }
7
- }
8
3
  export declare function LazyIntersectionObserverCard(props: CardWithUrlContentProps): React.JSX.Element;
@@ -1,8 +1,3 @@
1
1
  import React from 'react';
2
2
  import { type CardWithUrlContentProps } from '../types';
3
- declare global {
4
- interface Window {
5
- __SSR_RENDERED__?: boolean;
6
- }
7
- }
8
3
  export declare function LazyIntersectionObserverCard(props: CardWithUrlContentProps): React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "40.9.0",
3
+ "version": "40.10.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,9 +39,9 @@
39
39
  "@atlaskit/form": "^12.0.0",
40
40
  "@atlaskit/frontend-utilities": "^3.1.0",
41
41
  "@atlaskit/heading": "^5.2.0",
42
- "@atlaskit/icon": "^27.11.0",
42
+ "@atlaskit/icon": "^27.12.0",
43
43
  "@atlaskit/icon-file-type": "^7.0.0",
44
- "@atlaskit/icon-lab": "^5.4.0",
44
+ "@atlaskit/icon-lab": "^5.5.0",
45
45
  "@atlaskit/icon-object": "^7.2.0",
46
46
  "@atlaskit/icon-priority": "^6.3.0",
47
47
  "@atlaskit/image": "^3.0.0",
@@ -220,9 +220,6 @@
220
220
  "platform_renderer_blindspots": {
221
221
  "type": "boolean"
222
222
  },
223
- "twg-graphyte-smart-card-link-theme-fix": {
224
- "type": "boolean"
225
- },
226
223
  "platform_editor_preview_panel_linking": {
227
224
  "type": "boolean"
228
225
  },