@atlaskit/smart-card 44.16.0 → 44.16.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,18 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 44.16.2
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 44.16.1
10
+
11
+ ### Patch Changes
12
+
13
+ - [`6912c1730a806`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/6912c1730a806) -
14
+ Fix block card social proof experiment exposure to use the exposure-firing experiment helper.
15
+
3
16
  ## 44.16.0
4
17
 
5
18
  ### Minor Changes
@@ -7,7 +7,7 @@ Object.defineProperty(exports, "__esModule", {
7
7
  exports.getSocialProofTier = exports.getSocialProofExperimentMeta = exports.getInlineSocialProofExperimentMeta = exports.default = exports.SOCIAL_PROOF_TIER_THRESHOLD = exports.SOCIAL_PROOF_3P_UNAUTH_BLOCK_EXPERIMENT_KEY = exports.INLINE_SOCIAL_PROOF_EXPERIMENT_KEY = void 0;
8
8
  var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
9
9
  var _react = require("react");
10
- var _experiments = require("@atlaskit/tmp-editor-statsig/experiments");
10
+ var _expValEquals = require("@atlaskit/tmp-editor-statsig/exp-val-equals");
11
11
  var _currentSiteCloudId = require("../../services/current-site-cloud-id");
12
12
  var _personalization = require("../../services/personalization");
13
13
  var _useSocialProof2 = _interopRequireDefault(require("../use-social-proof"));
@@ -73,7 +73,7 @@ var useSocialProofExperiment = function useSocialProofExperiment(extensionKey) {
73
73
  var hasSocialProofData = connectedPct !== undefined;
74
74
 
75
75
  // Only fire exposure when data has loaded (prevents exposure inflation)
76
- var isTreatment = isEnabled && !isLoading && hasSocialProofData ? (0, _experiments.editorExperiment)('social_proof_3p_unauth_block_exp', true) : false;
76
+ var isTreatment = isEnabled && !isLoading && hasSocialProofData ? (0, _expValEquals.expValEquals)(SOCIAL_PROOF_3P_UNAUTH_BLOCK_EXPERIMENT_KEY, 'isEnabled', true) : false;
77
77
  var tier = (_getSocialProofTier = getSocialProofTier(connectedPct)) !== null && _getSocialProofTier !== void 0 ? _getSocialProofTier : 'low';
78
78
  return {
79
79
  isTreatment: isTreatment,
@@ -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: "44.15.0" || ''
14
+ packageVersion: "44.16.1" || ''
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -135,7 +135,6 @@ var InlineCard = exports.InlineCard = function InlineCard(_ref2) {
135
135
  isSelected: isSelected,
136
136
  isHovered: isHovered,
137
137
  onClick: handleFrameClick
138
-
139
138
  // Support middle-/right-clicks for "resolved" only — the vast majority of clicks happen here.
140
139
  // Other states (e.g. "resolving") could be added later for completeness.
141
140
  ,
@@ -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: "44.15.0",
22
+ packageVersion: "44.16.1",
23
23
  componentName: 'linkUrl'
24
24
  };
25
25
  var LinkUrl = function LinkUrl(_ref) {
@@ -1,5 +1,5 @@
1
1
  import { useMemo } from 'react';
2
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
2
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
3
3
  import { getCurrentSiteCloudIdSync } from '../../services/current-site-cloud-id';
4
4
  import { getProviderPctMapSync, SOCIAL_PROOF_TRAIT_NAME } from '../../services/personalization';
5
5
  import useSocialProof from '../use-social-proof';
@@ -64,7 +64,7 @@ const useSocialProofExperiment = (extensionKey, baseUriWithNoTrailingSlash = '')
64
64
  const hasSocialProofData = connectedPct !== undefined;
65
65
 
66
66
  // Only fire exposure when data has loaded (prevents exposure inflation)
67
- const isTreatment = isEnabled && !isLoading && hasSocialProofData ? editorExperiment('social_proof_3p_unauth_block_exp', true) : false;
67
+ const isTreatment = isEnabled && !isLoading && hasSocialProofData ? expValEquals(SOCIAL_PROOF_3P_UNAUTH_BLOCK_EXPERIMENT_KEY, 'isEnabled', true) : false;
68
68
  const tier = (_getSocialProofTier = getSocialProofTier(connectedPct)) !== null && _getSocialProofTier !== void 0 ? _getSocialProofTier : 'low';
69
69
  return {
70
70
  isTreatment,
@@ -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: "44.15.0" || ''
5
+ packageVersion: "44.16.1" || ''
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,7 +1,7 @@
1
- import { fg } from "@atlaskit/platform-feature-flags";
2
- import { useSmartLinkContext } from "../../../state";
3
- import { getExtensionKey } from "../../../state/helpers";
4
- import { getSocialProofExperimentMeta, getInlineSocialProofExperimentMeta } from "../../../state/hooks/use-social-proof-experiment";
1
+ import { fg } from '@atlaskit/platform-feature-flags';
2
+ import { useSmartLinkContext } from '../../../state';
3
+ import { getExtensionKey } from '../../../state/helpers';
4
+ import { getSocialProofExperimentMeta, getInlineSocialProofExperimentMeta } from '../../../state/hooks/use-social-proof-experiment';
5
5
  const useExperimentMetaEventAttributes = ({
6
6
  appearance,
7
7
  state
@@ -100,7 +100,6 @@ export const InlineCard = ({
100
100
  isSelected: isSelected,
101
101
  isHovered: isHovered,
102
102
  onClick: handleFrameClick
103
-
104
103
  // Support middle-/right-clicks for "resolved" only — the vast majority of clicks happen here.
105
104
  // Other states (e.g. "resolving") could be added later for completeness.
106
105
  ,
@@ -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: "44.15.0",
12
+ packageVersion: "44.16.1",
13
13
  componentName: 'linkUrl'
14
14
  };
15
15
  const LinkUrl = ({
@@ -2,7 +2,7 @@ import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
4
  import { useMemo } from 'react';
5
- import { editorExperiment } from '@atlaskit/tmp-editor-statsig/experiments';
5
+ import { expValEquals } from '@atlaskit/tmp-editor-statsig/exp-val-equals';
6
6
  import { getCurrentSiteCloudIdSync } from '../../services/current-site-cloud-id';
7
7
  import { getProviderPctMapSync, SOCIAL_PROOF_TRAIT_NAME } from '../../services/personalization';
8
8
  import useSocialProof from '../use-social-proof';
@@ -66,7 +66,7 @@ var useSocialProofExperiment = function useSocialProofExperiment(extensionKey) {
66
66
  var hasSocialProofData = connectedPct !== undefined;
67
67
 
68
68
  // Only fire exposure when data has loaded (prevents exposure inflation)
69
- var isTreatment = isEnabled && !isLoading && hasSocialProofData ? editorExperiment('social_proof_3p_unauth_block_exp', true) : false;
69
+ var isTreatment = isEnabled && !isLoading && hasSocialProofData ? expValEquals(SOCIAL_PROOF_3P_UNAUTH_BLOCK_EXPERIMENT_KEY, 'isEnabled', true) : false;
70
70
  var tier = (_getSocialProofTier = getSocialProofTier(connectedPct)) !== null && _getSocialProofTier !== void 0 ? _getSocialProofTier : 'low';
71
71
  return {
72
72
  isTreatment: isTreatment,
@@ -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: "44.15.0" || ''
7
+ packageVersion: "44.16.1" || ''
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -1,10 +1,10 @@
1
1
  import _defineProperty from "@babel/runtime/helpers/defineProperty";
2
2
  function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
3
3
  function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
4
- import { fg } from "@atlaskit/platform-feature-flags";
5
- import { useSmartLinkContext } from "../../../state";
6
- import { getExtensionKey } from "../../../state/helpers";
7
- import { getSocialProofExperimentMeta, getInlineSocialProofExperimentMeta } from "../../../state/hooks/use-social-proof-experiment";
4
+ import { fg } from '@atlaskit/platform-feature-flags';
5
+ import { useSmartLinkContext } from '../../../state';
6
+ import { getExtensionKey } from '../../../state/helpers';
7
+ import { getSocialProofExperimentMeta, getInlineSocialProofExperimentMeta } from '../../../state/hooks/use-social-proof-experiment';
8
8
  var useExperimentMetaEventAttributes = function useExperimentMetaEventAttributes(_ref) {
9
9
  var appearance = _ref.appearance,
10
10
  state = _ref.state;
@@ -97,7 +97,6 @@ export var InlineCard = function InlineCard(_ref2) {
97
97
  isSelected: isSelected,
98
98
  isHovered: isHovered,
99
99
  onClick: handleFrameClick
100
-
101
100
  // Support middle-/right-clicks for "resolved" only — the vast majority of clicks happen here.
102
101
  // Other states (e.g. "resolving") could be added later for completeness.
103
102
  ,
@@ -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: "44.15.0",
15
+ packageVersion: "44.16.1",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  var LinkUrl = function LinkUrl(_ref) {
@@ -8,7 +8,7 @@ export {
8
8
  /** @deprecated Use @atlaskit/link-provider */
9
9
  type ProviderProps,
10
10
  /** @deprecated Use @atlaskit/linking-common */
11
- type CardType } from './state';
11
+ type CardType, } from './state';
12
12
  /** @deprecated Use @atlaskit/smart-card/card/types */
13
13
  export { type CardProps, type CardAppearance, type CardPlatform } from './view/Card/types';
14
14
  /** @deprecated Use @atlaskit/smart-card/card/types CardProps['inlinePreloaderStyle'] */
@@ -1,5 +1,5 @@
1
- import type { CardAppearance, CardState } from "@atlaskit/linking-common";
2
- import { type BlockCardSocialProofExperimentMeta, type InlineSocialProofExperimentMeta } from "../../../state/hooks/use-social-proof-experiment";
1
+ import type { CardAppearance, CardState } from '@atlaskit/linking-common';
2
+ import { type BlockCardSocialProofExperimentMeta, type InlineSocialProofExperimentMeta } from '../../../state/hooks/use-social-proof-experiment';
3
3
  type ExperimentMetaEventAttributes = Partial<BlockCardSocialProofExperimentMeta & InlineSocialProofExperimentMeta>;
4
4
  type ExperimentMetaEventAttributesParams = {
5
5
  appearance: CardAppearance;
@@ -8,7 +8,7 @@ export {
8
8
  /** @deprecated Use @atlaskit/link-provider */
9
9
  type ProviderProps,
10
10
  /** @deprecated Use @atlaskit/linking-common */
11
- type CardType } from './state';
11
+ type CardType, } from './state';
12
12
  /** @deprecated Use @atlaskit/smart-card/card/types */
13
13
  export { type CardProps, type CardAppearance, type CardPlatform } from './view/Card/types';
14
14
  /** @deprecated Use @atlaskit/smart-card/card/types CardProps['inlinePreloaderStyle'] */
@@ -1,5 +1,5 @@
1
- import type { CardAppearance, CardState } from "@atlaskit/linking-common";
2
- import { type BlockCardSocialProofExperimentMeta, type InlineSocialProofExperimentMeta } from "../../../state/hooks/use-social-proof-experiment";
1
+ import type { CardAppearance, CardState } from '@atlaskit/linking-common';
2
+ import { type BlockCardSocialProofExperimentMeta, type InlineSocialProofExperimentMeta } from '../../../state/hooks/use-social-proof-experiment';
3
3
  type ExperimentMetaEventAttributes = Partial<BlockCardSocialProofExperimentMeta & InlineSocialProofExperimentMeta>;
4
4
  type ExperimentMetaEventAttributesParams = {
5
5
  appearance: CardAppearance;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "44.16.0",
3
+ "version": "44.16.2",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -35,7 +35,7 @@
35
35
  "ak-postbuild": "ls -d dist/* | xargs -n 1 copyfiles -u 1 -V src/**/*.{svg,png}"
36
36
  },
37
37
  "dependencies": {
38
- "@atlaskit/adf-utils": "^19.30.0",
38
+ "@atlaskit/adf-utils": "^19.31.0",
39
39
  "@atlaskit/afm-i18n-platform-linking-platform-smart-card": "2.6.0",
40
40
  "@atlaskit/analytics-gas-types": "^5.1.0",
41
41
  "@atlaskit/analytics-next": "^11.2.0",
@@ -53,42 +53,42 @@
53
53
  "@atlaskit/form": "^15.5.0",
54
54
  "@atlaskit/frontend-utilities": "^3.3.0",
55
55
  "@atlaskit/heading": "^5.4.0",
56
- "@atlaskit/icon": "^35.0.0",
56
+ "@atlaskit/icon": "^35.1.0",
57
57
  "@atlaskit/icon-file-type": "^7.0.0",
58
- "@atlaskit/icon-lab": "^6.9.0",
58
+ "@atlaskit/icon-lab": "^6.10.0",
59
59
  "@atlaskit/image": "^3.0.0",
60
60
  "@atlaskit/json-ld-types": "^1.5.0",
61
61
  "@atlaskit/link": "^3.4.0",
62
62
  "@atlaskit/link-analytics": "^11.1.0",
63
63
  "@atlaskit/link-client-extension": "^6.1.0",
64
- "@atlaskit/link-extractors": "^2.6.0",
64
+ "@atlaskit/link-extractors": "^2.7.0",
65
65
  "@atlaskit/link-test-helpers": "^10.3.0",
66
66
  "@atlaskit/linking-common": "^9.11.0",
67
67
  "@atlaskit/linking-types": "^14.4.0",
68
68
  "@atlaskit/logo": "^20.1.0",
69
69
  "@atlaskit/lozenge": "^13.8.0",
70
70
  "@atlaskit/menu": "^8.5.0",
71
- "@atlaskit/modal-dialog": "^15.1.0",
71
+ "@atlaskit/modal-dialog": "^15.2.0",
72
72
  "@atlaskit/motion": "^6.2.0",
73
73
  "@atlaskit/object": "^1.0.0",
74
74
  "@atlaskit/outbound-auth-flow-client": "^3.4.0",
75
75
  "@atlaskit/platform-feature-flags": "^1.1.0",
76
76
  "@atlaskit/platform-feature-flags-react": "^0.5.0",
77
- "@atlaskit/popup": "^4.20.0",
77
+ "@atlaskit/popup": "^4.21.0",
78
78
  "@atlaskit/primitives": "^19.0.0",
79
- "@atlaskit/react-ufo": "^6.0.0",
79
+ "@atlaskit/react-ufo": "^6.1.0",
80
80
  "@atlaskit/rovo-triggers": "^6.3.0",
81
81
  "@atlaskit/section-message": "^8.13.0",
82
82
  "@atlaskit/select": "^21.12.0",
83
83
  "@atlaskit/spinner": "^19.1.0",
84
- "@atlaskit/tag": "^14.13.0",
84
+ "@atlaskit/tag": "^14.14.0",
85
85
  "@atlaskit/textarea": "^8.3.0",
86
86
  "@atlaskit/textfield": "^8.3.0",
87
- "@atlaskit/theme": "^24.0.0",
87
+ "@atlaskit/theme": "^25.0.0",
88
88
  "@atlaskit/tile": "^1.1.0",
89
- "@atlaskit/tmp-editor-statsig": "^82.4.0",
89
+ "@atlaskit/tmp-editor-statsig": "^83.0.0",
90
90
  "@atlaskit/tokens": "^13.0.0",
91
- "@atlaskit/tooltip": "^22.2.0",
91
+ "@atlaskit/tooltip": "^22.3.0",
92
92
  "@atlaskit/ufo": "^0.5.0",
93
93
  "@atlaskit/width-detector": "^5.1.0",
94
94
  "@babel/runtime": "^7.0.0",
@@ -116,7 +116,7 @@
116
116
  "@af/visual-regression": "workspace:^",
117
117
  "@atlaskit/analytics-listeners": "^10.1.0",
118
118
  "@atlaskit/css-reset": "^7.4.0",
119
- "@atlaskit/media-test-helpers": "^41.1.0",
119
+ "@atlaskit/media-test-helpers": "^41.2.0",
120
120
  "@atlaskit/ssr": "workspace:^",
121
121
  "@atlassian/a11y-jest-testing": "^0.11.0",
122
122
  "@atlassian/analytics-tooling": "workspace:^",
@@ -5,347 +5,349 @@
5
5
 
6
6
  import path from 'path';
7
7
 
8
- import type { ComponentStructuredContentSource } from '@atlassian/structured-docs-types';
8
+ import type { StructuredContentSource } from '@atlassian/structured-docs-types/types';
9
9
 
10
10
  import packageJson from './package.json';
11
11
 
12
12
  const packagePath = path.resolve(__dirname);
13
13
 
14
- const documentation: ComponentStructuredContentSource[] = [
15
- {
16
- name: 'Card',
17
- description:
18
- 'Smart Links enhance URLs into interactive previews, offering a contextualized experience within Atlassian products. They come in inline, block, and embed formats, respecting content permissions and compliance settings.',
19
- status: 'general-availability',
20
- import: {
14
+ const documentation: StructuredContentSource = {
15
+ components: [
16
+ {
21
17
  name: 'Card',
22
- package: '@atlaskit/smart-card',
23
- type: 'named',
24
- packagePath,
25
- packageJson,
26
- },
27
- usageGuidelines: [
28
- 'Use inline for links in body text; block when you need extra context or a card-style preview; embed when users should engage with the linked content in place.',
29
- ],
30
- contentGuidelines: [],
31
- accessibilityGuidelines: [
32
- 'Use descriptive link text for inline appearance; avoid generic "click here" or the raw URL when possible.',
33
- 'Ensure the card container is keyboard focusable and has a clear accessible name indicating it is a link or preview.',
34
- 'Ensure loading and error states are announced to screen readers (e.g. aria-live or status text).',
35
- ],
36
- keywords: ['smart-card', 'card', 'smart link', 'inline', 'block', 'embed', 'link', 'preview'],
37
- categories: ['linking', 'data-display'],
38
- examples: [
39
- {
40
- name: 'Card (basic)',
41
- description:
42
- 'Inline, block, and embed appearances shown side by side. Requires staging login to resolve links.',
43
- source: path.resolve(packagePath, './examples/content/card.tsx'),
44
- },
45
- {
46
- name: 'Card (appearance: block)',
47
- description:
48
- 'Block appearance — card-style preview with detailed view of the linked material. In the editor this is referred to as the "Card".',
49
- source: path.resolve(packagePath, './examples/content/block-card.tsx'),
50
- },
51
- {
52
- name: 'Card (appearance: inline)',
53
- description:
54
- 'Inline appearance — link in text like a hyperlink. Use showHoverPreview for hover preview on inline Smart Links.',
55
- source: path.resolve(packagePath, './examples/content/inline-card.tsx'),
18
+ description:
19
+ 'Smart Links enhance URLs into interactive previews, offering a contextualized experience within Atlassian products. They come in inline, block, and embed formats, respecting content permissions and compliance settings.',
20
+ status: 'general-availability',
21
+ import: {
22
+ name: 'Card',
23
+ package: '@atlaskit/smart-card',
24
+ type: 'named',
25
+ packagePath,
26
+ packageJson,
56
27
  },
57
- {
58
- name: 'Card (appearance: embed)',
59
- description:
60
- 'Embed appearance — linked content rendered in place. Requires a resolvable embed URL; not all links support embed.',
61
- source: path.resolve(packagePath, './examples/content/embed-card.tsx'),
62
- },
63
- ],
64
- },
65
- {
66
- name: 'HoverCard',
67
- description:
68
- 'Hover cards can be used as a standalone component to wrap any React component and display information about a supplied URL when the user hovers over the child. Different actions are shown depending on the resource type.',
69
- status: 'general-availability',
70
- import: {
71
- name: 'HoverCard',
72
- package: '@atlaskit/smart-card/hover-card',
73
- type: 'named',
74
- packagePath,
75
- packageJson,
28
+ usageGuidelines: [
29
+ 'Use inline for links in body text; block when you need extra context or a card-style preview; embed when users should engage with the linked content in place.',
30
+ ],
31
+ contentGuidelines: [],
32
+ accessibilityGuidelines: [
33
+ 'Use descriptive link text for inline appearance; avoid generic "click here" or the raw URL when possible.',
34
+ 'Ensure the card container is keyboard focusable and has a clear accessible name indicating it is a link or preview.',
35
+ 'Ensure loading and error states are announced to screen readers (e.g. aria-live or status text).',
36
+ ],
37
+ keywords: ['smart-card', 'card', 'smart link', 'inline', 'block', 'embed', 'link', 'preview'],
38
+ categories: ['linking', 'data-display'],
39
+ examples: [
40
+ {
41
+ name: 'Card (basic)',
42
+ description:
43
+ 'Inline, block, and embed appearances shown side by side. Requires staging login to resolve links.',
44
+ source: path.resolve(packagePath, './examples/content/card.tsx'),
45
+ },
46
+ {
47
+ name: 'Card (appearance: block)',
48
+ description:
49
+ 'Block appearance — card-style preview with detailed view of the linked material. In the editor this is referred to as the "Card".',
50
+ source: path.resolve(packagePath, './examples/content/block-card.tsx'),
51
+ },
52
+ {
53
+ name: 'Card (appearance: inline)',
54
+ description:
55
+ 'Inline appearance — link in text like a hyperlink. Use showHoverPreview for hover preview on inline Smart Links.',
56
+ source: path.resolve(packagePath, './examples/content/inline-card.tsx'),
57
+ },
58
+ {
59
+ name: 'Card (appearance: embed)',
60
+ description:
61
+ 'Embed appearance — linked content rendered in place. Requires a resolvable embed URL; not all links support embed.',
62
+ source: path.resolve(packagePath, './examples/content/embed-card.tsx'),
63
+ },
64
+ ],
76
65
  },
77
- usageGuidelines: [
78
- 'Use when you need a Smart Link preview on hover over a custom trigger (e.g. text, icon). For hover preview on inline Smart Links in body text, use Card with showHoverPreview instead.',
79
- ],
80
- contentGuidelines: [],
81
- accessibilityGuidelines: [
82
- 'Provide a keyboard-accessible way to open the preview (e.g. focus or explicit trigger); do not rely on hover alone.',
83
- 'Ensure the trigger element has an accessible name and role (e.g. link or button).',
84
- 'Ensure the hover card content is announced when shown (e.g. aria-describedby or live region) and can be dismissed via keyboard.',
85
- ],
86
- keywords: ['smart-card', 'hover card', 'hover', 'preview', 'smart link'],
87
- categories: ['linking', 'data-display', 'interaction'],
88
- examples: [
89
- {
90
- name: 'Hover card',
91
- description:
92
- 'HoverCard wrapping a trigger element; shows Smart Link preview on hover. Requires staging login to resolve.',
93
- source: path.resolve(packagePath, './examples/content/hover-card.tsx'),
66
+ {
67
+ name: 'HoverCard',
68
+ description:
69
+ 'Hover cards can be used as a standalone component to wrap any React component and display information about a supplied URL when the user hovers over the child. Different actions are shown depending on the resource type.',
70
+ status: 'general-availability',
71
+ import: {
72
+ name: 'HoverCard',
73
+ package: '@atlaskit/smart-card/hover-card',
74
+ type: 'named',
75
+ packagePath,
76
+ packageJson,
94
77
  },
95
- ],
96
- },
97
- {
98
- name: 'LinkUrl',
99
- description:
100
- 'LinkUrl is a plain hyperlink (<a>) with a built-in safety check. Use it when you want to warn users if the link description looks like one URL but the actual destination is different.',
101
- status: 'general-availability',
102
- import: {
103
- name: 'LinkUrl',
104
- package: '@atlaskit/smart-card/link-url',
105
- type: 'default',
106
- packagePath,
107
- packageJson,
78
+ usageGuidelines: [
79
+ 'Use when you need a Smart Link preview on hover over a custom trigger (e.g. text, icon). For hover preview on inline Smart Links in body text, use Card with showHoverPreview instead.',
80
+ ],
81
+ contentGuidelines: [],
82
+ accessibilityGuidelines: [
83
+ 'Provide a keyboard-accessible way to open the preview (e.g. focus or explicit trigger); do not rely on hover alone.',
84
+ 'Ensure the trigger element has an accessible name and role (e.g. link or button).',
85
+ 'Ensure the hover card content is announced when shown (e.g. aria-describedby or live region) and can be dismissed via keyboard.',
86
+ ],
87
+ keywords: ['smart-card', 'hover card', 'hover', 'preview', 'smart link'],
88
+ categories: ['linking', 'data-display', 'interaction'],
89
+ examples: [
90
+ {
91
+ name: 'Hover card',
92
+ description:
93
+ 'HoverCard wrapping a trigger element; shows Smart Link preview on hover. Requires staging login to resolve.',
94
+ source: path.resolve(packagePath, './examples/content/hover-card.tsx'),
95
+ },
96
+ ],
108
97
  },
109
- usageGuidelines: [
110
- 'Use when the link text might look like one URL but point elsewhere—e.g. user-generated or external links—so users get a warning before navigating.',
111
- ],
112
- contentGuidelines: [],
113
- accessibilityGuidelines: [
114
- 'Use descriptive link text that indicates the destination or action; avoid exposing only the URL when possible.',
115
- 'Ensure the safety-check warning (when link text and destination differ) is announced to screen readers.',
116
- ],
117
- keywords: ['smart-card', 'link', 'url', 'safety', 'hyperlink'],
118
- categories: ['linking', 'interaction'],
119
- examples: [
120
- {
121
- name: 'Link URL',
122
- description:
123
- 'Link safety: when link text looks like a URL but destination differs (warning) vs when text matches or is plain (no warning).',
124
- source: path.resolve(packagePath, './examples/content/link-url.tsx'),
98
+ {
99
+ name: 'LinkUrl',
100
+ description:
101
+ 'LinkUrl is a plain hyperlink (<a>) with a built-in safety check. Use it when you want to warn users if the link description looks like one URL but the actual destination is different.',
102
+ status: 'general-availability',
103
+ import: {
104
+ name: 'LinkUrl',
105
+ package: '@atlaskit/smart-card/link-url',
106
+ type: 'default',
107
+ packagePath,
108
+ packageJson,
125
109
  },
126
- ],
127
- },
128
- {
129
- name: 'FlexibleCard',
130
- description:
131
- 'Flexible Smart Links (FlexibleCard / Flexible UI) is a composable system of data elements inside UI blocks for building custom Smart Link views. It does not affect inline, block, or embed appearance.',
132
- status: 'general-availability',
133
- import: {
134
- name: 'TitleBlock',
135
- package: '@atlaskit/smart-card',
136
- type: 'named',
137
- packagePath,
138
- packageJson,
110
+ usageGuidelines: [
111
+ 'Use when the link text might look like one URL but point elsewhere—e.g. user-generated or external links—so users get a warning before navigating.',
112
+ ],
113
+ contentGuidelines: [],
114
+ accessibilityGuidelines: [
115
+ 'Use descriptive link text that indicates the destination or action; avoid exposing only the URL when possible.',
116
+ 'Ensure the safety-check warning (when link text and destination differ) is announced to screen readers.',
117
+ ],
118
+ keywords: ['smart-card', 'link', 'url', 'safety', 'hyperlink'],
119
+ categories: ['linking', 'interaction'],
120
+ examples: [
121
+ {
122
+ name: 'Link URL',
123
+ description:
124
+ 'Link safety: when link text looks like a URL but destination differs (warning) vs when text matches or is plain (no warning).',
125
+ source: path.resolve(packagePath, './examples/content/link-url.tsx'),
126
+ },
127
+ ],
139
128
  },
140
- usageGuidelines: [
141
- 'Use when you need a custom block-style Smart Link layout. Define the layout with blocks first (title, metadata, preview, footer), then add elements inside blocks for granular content.',
142
- ],
143
- contentGuidelines: [],
144
- accessibilityGuidelines: [
145
- 'Use a logical structure (e.g. heading hierarchy) so the card is navigable by assistive tech.',
146
- 'Ensure all interactive elements inside blocks (links, buttons, actions) are focusable and have accessible names.',
147
- ],
148
- keywords: [
149
- 'smart-card',
150
- 'flexible',
151
- 'flexible card',
152
- 'flexible ui',
153
- 'blocks',
154
- 'elements',
155
- 'composable',
156
- ],
157
- categories: ['linking', 'data-display'],
158
- examples: [
159
- {
160
- name: 'Flexible UI card',
161
- description:
162
- 'Custom block layout with TitleBlock, PreviewBlock, MetadataBlock, SnippetBlock, and FooterBlock composed inside Card.',
163
- source: path.resolve(packagePath, './examples/content/flexible-ui-card.tsx'),
129
+ {
130
+ name: 'FlexibleCard',
131
+ description:
132
+ 'Flexible Smart Links (FlexibleCard / Flexible UI) is a composable system of data elements inside UI blocks for building custom Smart Link views. It does not affect inline, block, or embed appearance.',
133
+ status: 'general-availability',
134
+ import: {
135
+ name: 'TitleBlock',
136
+ package: '@atlaskit/smart-card',
137
+ type: 'named',
138
+ packagePath,
139
+ packageJson,
164
140
  },
165
- ],
166
- },
167
- {
168
- name: 'TitleBlock',
169
- description:
170
- 'A block component for the Smart Link title row. Used inside FlexibleCard to show title, icon, and optional metadata and actions.',
171
- status: 'general-availability',
172
- import: {
173
- name: 'TitleBlock',
174
- package: '@atlaskit/smart-card',
175
- type: 'named',
176
- packagePath,
177
- packageJson,
141
+ usageGuidelines: [
142
+ 'Use when you need a custom block-style Smart Link layout. Define the layout with blocks first (title, metadata, preview, footer), then add elements inside blocks for granular content.',
143
+ ],
144
+ contentGuidelines: [],
145
+ accessibilityGuidelines: [
146
+ 'Use a logical structure (e.g. heading hierarchy) so the card is navigable by assistive tech.',
147
+ 'Ensure all interactive elements inside blocks (links, buttons, actions) are focusable and have accessible names.',
148
+ ],
149
+ keywords: [
150
+ 'smart-card',
151
+ 'flexible',
152
+ 'flexible card',
153
+ 'flexible ui',
154
+ 'blocks',
155
+ 'elements',
156
+ 'composable',
157
+ ],
158
+ categories: ['linking', 'data-display'],
159
+ examples: [
160
+ {
161
+ name: 'Flexible UI card',
162
+ description:
163
+ 'Custom block layout with TitleBlock, PreviewBlock, MetadataBlock, SnippetBlock, and FooterBlock composed inside Card.',
164
+ source: path.resolve(packagePath, './examples/content/flexible-ui-card.tsx'),
165
+ },
166
+ ],
178
167
  },
179
- usageGuidelines: [
180
- 'Use for the main title row of a block Smart Link when you need title, icon, optional subtitle, metadata, or actions in one row.',
181
- ],
182
- contentGuidelines: [],
183
- accessibilityGuidelines: [
184
- 'Ensure the title is exposed as a heading or has an accessible name so it is announced as the primary label for the card.',
185
- 'If the title row icon conveys meaning, give it an accessible name (e.g. aria-label); otherwise mark as decorative.',
186
- ],
187
- keywords: ['smart-card', 'title block', 'flexible', 'block'],
188
- categories: ['linking', 'data-display'],
189
- examples: [
190
- {
191
- name: 'Title block default',
192
- description:
193
- 'TitleBlock with default props; title and icon come from the resolved link data.',
194
- source: path.resolve(packagePath, './examples/content/title-block-default.tsx'),
168
+ {
169
+ name: 'TitleBlock',
170
+ description:
171
+ 'A block component for the Smart Link title row. Used inside FlexibleCard to show title, icon, and optional metadata and actions.',
172
+ status: 'general-availability',
173
+ import: {
174
+ name: 'TitleBlock',
175
+ package: '@atlaskit/smart-card',
176
+ type: 'named',
177
+ packagePath,
178
+ packageJson,
195
179
  },
196
- ],
197
- },
198
- {
199
- name: 'MetadataBlock',
200
- description:
201
- 'A block component that displays a row of metadata elements (e.g. created by, due date, state) in a Smart Link.',
202
- status: 'general-availability',
203
- import: {
204
- name: 'MetadataBlock',
205
- package: '@atlaskit/smart-card',
206
- type: 'named',
207
- packagePath,
208
- packageJson,
180
+ usageGuidelines: [
181
+ 'Use for the main title row of a block Smart Link when you need title, icon, optional subtitle, metadata, or actions in one row.',
182
+ ],
183
+ contentGuidelines: [],
184
+ accessibilityGuidelines: [
185
+ 'Ensure the title is exposed as a heading or has an accessible name so it is announced as the primary label for the card.',
186
+ 'If the title row icon conveys meaning, give it an accessible name (e.g. aria-label); otherwise mark as decorative.',
187
+ ],
188
+ keywords: ['smart-card', 'title block', 'flexible', 'block'],
189
+ categories: ['linking', 'data-display'],
190
+ examples: [
191
+ {
192
+ name: 'Title block default',
193
+ description:
194
+ 'TitleBlock with default props; title and icon come from the resolved link data.',
195
+ source: path.resolve(packagePath, './examples/content/title-block-default.tsx'),
196
+ },
197
+ ],
209
198
  },
210
- usageGuidelines: [
211
- 'Use when you need a single row of metadata (e.g. created by, due date, state) in a block Smart Link.',
212
- ],
213
- contentGuidelines: [],
214
- accessibilityGuidelines: [
215
- 'Ensure metadata is available to screen readers (e.g. not conveyed only by color or icon).',
216
- 'Use a list or group with an accessible name if the metadata row has a specific purpose (e.g. "Contributors", "Dates").',
217
- ],
218
- keywords: ['smart-card', 'metadata block', 'flexible', 'block', 'metadata'],
219
- categories: ['linking', 'data-display'],
220
- examples: [
221
- {
222
- name: 'Metadata block primary',
223
- description:
224
- 'MetadataBlock with a primary row showing CollaboratorGroup and ModifiedOn elements.',
225
- source: path.resolve(packagePath, './examples/content/metadata-block-primary.tsx'),
199
+ {
200
+ name: 'MetadataBlock',
201
+ description:
202
+ 'A block component that displays a row of metadata elements (e.g. created by, due date, state) in a Smart Link.',
203
+ status: 'general-availability',
204
+ import: {
205
+ name: 'MetadataBlock',
206
+ package: '@atlaskit/smart-card',
207
+ type: 'named',
208
+ packagePath,
209
+ packageJson,
226
210
  },
227
- ],
228
- },
229
- {
230
- name: 'PreviewBlock',
231
- description: 'A block component that displays a preview image or media for the Smart Link.',
232
- status: 'general-availability',
233
- import: {
234
- name: 'PreviewBlock',
235
- package: '@atlaskit/smart-card',
236
- type: 'named',
237
- packagePath,
238
- packageJson,
211
+ usageGuidelines: [
212
+ 'Use when you need a single row of metadata (e.g. created by, due date, state) in a block Smart Link.',
213
+ ],
214
+ contentGuidelines: [],
215
+ accessibilityGuidelines: [
216
+ 'Ensure metadata is available to screen readers (e.g. not conveyed only by color or icon).',
217
+ 'Use a list or group with an accessible name if the metadata row has a specific purpose (e.g. "Contributors", "Dates").',
218
+ ],
219
+ keywords: ['smart-card', 'metadata block', 'flexible', 'block', 'metadata'],
220
+ categories: ['linking', 'data-display'],
221
+ examples: [
222
+ {
223
+ name: 'Metadata block primary',
224
+ description:
225
+ 'MetadataBlock with a primary row showing CollaboratorGroup and ModifiedOn elements.',
226
+ source: path.resolve(packagePath, './examples/content/metadata-block-primary.tsx'),
227
+ },
228
+ ],
239
229
  },
240
- usageGuidelines: [
241
- 'Use when the linked resource has a preview image or media and you want to surface it in the block card.',
242
- ],
243
- contentGuidelines: [],
244
- accessibilityGuidelines: [
245
- 'If the preview image conveys information, provide meaningful alt text; if purely decorative, use alt="" or aria-hidden.',
246
- 'Ensure no critical information is shown only in the preview; duplicate in text or metadata when needed.',
247
- ],
248
- keywords: ['smart-card', 'preview block', 'flexible', 'block', 'preview', 'image'],
249
- categories: ['linking', 'data-display'],
250
- examples: [
251
- {
252
- name: 'Preview block default',
253
- description: "PreviewBlock showing the resolved link's preview image when available.",
254
- source: path.resolve(packagePath, './examples/content/preview-block-default.tsx'),
230
+ {
231
+ name: 'PreviewBlock',
232
+ description: 'A block component that displays a preview image or media for the Smart Link.',
233
+ status: 'general-availability',
234
+ import: {
235
+ name: 'PreviewBlock',
236
+ package: '@atlaskit/smart-card',
237
+ type: 'named',
238
+ packagePath,
239
+ packageJson,
255
240
  },
256
- ],
257
- },
258
- {
259
- name: 'FooterBlock',
260
- description:
261
- 'A block component for the Smart Link footer, typically showing actions (e.g. copy, open, follow).',
262
- status: 'general-availability',
263
- import: {
264
- name: 'FooterBlock',
265
- package: '@atlaskit/smart-card',
266
- type: 'named',
267
- packagePath,
268
- packageJson,
241
+ usageGuidelines: [
242
+ 'Use when the linked resource has a preview image or media and you want to surface it in the block card.',
243
+ ],
244
+ contentGuidelines: [],
245
+ accessibilityGuidelines: [
246
+ 'If the preview image conveys information, provide meaningful alt text; if purely decorative, use alt="" or aria-hidden.',
247
+ 'Ensure no critical information is shown only in the preview; duplicate in text or metadata when needed.',
248
+ ],
249
+ keywords: ['smart-card', 'preview block', 'flexible', 'block', 'preview', 'image'],
250
+ categories: ['linking', 'data-display'],
251
+ examples: [
252
+ {
253
+ name: 'Preview block default',
254
+ description: "PreviewBlock showing the resolved link's preview image when available.",
255
+ source: path.resolve(packagePath, './examples/content/preview-block-default.tsx'),
256
+ },
257
+ ],
269
258
  },
270
- usageGuidelines: [
271
- 'Use at the bottom of a FlexibleCard when you need actions such as copy link, open, or follow.',
272
- ],
273
- contentGuidelines: [],
274
- accessibilityGuidelines: [
275
- 'Give each action button or control an accessible name (e.g. "Copy link", "Open in new tab") so purpose is clear to screen readers.',
276
- 'Ensure actions are keyboard operable and appear in a logical tab order.',
277
- ],
278
- keywords: ['smart-card', 'footer block', 'flexible', 'block', 'actions'],
279
- categories: ['linking', 'data-display', 'interaction'],
280
- examples: [
281
- {
282
- name: 'Footer block default',
283
- description:
284
- 'FooterBlock with default actions (e.g. copy, open, follow) at the bottom of the card.',
285
- source: path.resolve(packagePath, './examples/content/footer-block-default.tsx'),
259
+ {
260
+ name: 'FooterBlock',
261
+ description:
262
+ 'A block component for the Smart Link footer, typically showing actions (e.g. copy, open, follow).',
263
+ status: 'general-availability',
264
+ import: {
265
+ name: 'FooterBlock',
266
+ package: '@atlaskit/smart-card',
267
+ type: 'named',
268
+ packagePath,
269
+ packageJson,
286
270
  },
287
- ],
288
- },
289
- {
290
- name: 'useSmartLinkEvents',
291
- description:
292
- 'Hook that returns a SmartLinkEvents object for dispatching analytics events for a given URL. Currently supports insertSmartLink.',
293
- status: 'general-availability',
294
- import: {
295
- name: 'useSmartLinkEvents',
296
- package: '@atlaskit/smart-card',
297
- type: 'named',
298
- packagePath,
299
- packageJson,
271
+ usageGuidelines: [
272
+ 'Use at the bottom of a FlexibleCard when you need actions such as copy link, open, or follow.',
273
+ ],
274
+ contentGuidelines: [],
275
+ accessibilityGuidelines: [
276
+ 'Give each action button or control an accessible name (e.g. "Copy link", "Open in new tab") so purpose is clear to screen readers.',
277
+ 'Ensure actions are keyboard operable and appear in a logical tab order.',
278
+ ],
279
+ keywords: ['smart-card', 'footer block', 'flexible', 'block', 'actions'],
280
+ categories: ['linking', 'data-display', 'interaction'],
281
+ examples: [
282
+ {
283
+ name: 'Footer block default',
284
+ description:
285
+ 'FooterBlock with default actions (e.g. copy, open, follow) at the bottom of the card.',
286
+ source: path.resolve(packagePath, './examples/content/footer-block-default.tsx'),
287
+ },
288
+ ],
300
289
  },
301
- usageGuidelines: [
302
- 'Use when you need to fire Smart Link analytics (e.g. insert events) from custom UI that is not the default Card.',
303
- ],
304
- contentGuidelines: [],
305
- accessibilityGuidelines: [
306
- 'Use analytics events to understand usage; ensure event wiring does not change focus, interrupt screen readers, or alter semantics.',
307
- ],
308
- keywords: ['smart-card', 'hooks', 'analytics', 'useSmartLinkEvents', 'events'],
309
- categories: ['linking', 'analytics'],
310
- examples: [
311
- {
312
- name: 'Analytics',
313
- description:
314
- 'Card with AnalyticsListener capturing and displaying Smart Link analytics events (e.g. on click).',
315
- source: path.resolve(packagePath, './examples/content/analytics.tsx'),
290
+ {
291
+ name: 'useSmartLinkEvents',
292
+ description:
293
+ 'Hook that returns a SmartLinkEvents object for dispatching analytics events for a given URL. Currently supports insertSmartLink.',
294
+ status: 'general-availability',
295
+ import: {
296
+ name: 'useSmartLinkEvents',
297
+ package: '@atlaskit/smart-card',
298
+ type: 'named',
299
+ packagePath,
300
+ packageJson,
316
301
  },
317
- ],
318
- },
319
- {
320
- name: 'useSmartLinkActions',
321
- description:
322
- 'Hook that extracts and returns actions for a given URL. Relies on Smart Link context; usages must be wrapped in SmartCardProvider or equivalent.',
323
- status: 'general-availability',
324
- import: {
325
- name: 'useSmartLinkActions',
326
- package: '@atlaskit/smart-card/hooks',
327
- type: 'named',
328
- packagePath,
329
- packageJson,
302
+ usageGuidelines: [
303
+ 'Use when you need to fire Smart Link analytics (e.g. insert events) from custom UI that is not the default Card.',
304
+ ],
305
+ contentGuidelines: [],
306
+ accessibilityGuidelines: [
307
+ 'Use analytics events to understand usage; ensure event wiring does not change focus, interrupt screen readers, or alter semantics.',
308
+ ],
309
+ keywords: ['smart-card', 'hooks', 'analytics', 'useSmartLinkEvents', 'events'],
310
+ categories: ['linking', 'analytics'],
311
+ examples: [
312
+ {
313
+ name: 'Analytics',
314
+ description:
315
+ 'Card with AnalyticsListener capturing and displaying Smart Link analytics events (e.g. on click).',
316
+ source: path.resolve(packagePath, './examples/content/analytics.tsx'),
317
+ },
318
+ ],
330
319
  },
331
- usageGuidelines: [
332
- 'Use when building custom action UI (buttons, menus) that should expose Smart Link actions (e.g. Preview, Open) for a given URL.',
333
- ],
334
- contentGuidelines: [],
335
- accessibilityGuidelines: [
336
- 'When rendering actions from this hook (e.g. buttons or menus), provide accessible labels (e.g. from action.text) and ensure keyboard support.',
337
- ],
338
- keywords: ['smart-card', 'hooks', 'useSmartLinkActions', 'actions'],
339
- categories: ['linking', 'interaction'],
340
- examples: [
341
- {
320
+ {
321
+ name: 'useSmartLinkActions',
322
+ description:
323
+ 'Hook that extracts and returns actions for a given URL. Relies on Smart Link context; usages must be wrapped in SmartCardProvider or equivalent.',
324
+ status: 'general-availability',
325
+ import: {
342
326
  name: 'useSmartLinkActions',
343
- description:
344
- 'useSmartLinkActions used to get actions for a URL and invoke one (e.g. Preview) from a custom button.',
345
- source: path.resolve(packagePath, './examples/content/useSmartLinkActions.tsx'),
327
+ package: '@atlaskit/smart-card/hooks',
328
+ type: 'named',
329
+ packagePath,
330
+ packageJson,
346
331
  },
347
- ],
348
- },
349
- ];
332
+ usageGuidelines: [
333
+ 'Use when building custom action UI (buttons, menus) that should expose Smart Link actions (e.g. Preview, Open) for a given URL.',
334
+ ],
335
+ contentGuidelines: [],
336
+ accessibilityGuidelines: [
337
+ 'When rendering actions from this hook (e.g. buttons or menus), provide accessible labels (e.g. from action.text) and ensure keyboard support.',
338
+ ],
339
+ keywords: ['smart-card', 'hooks', 'useSmartLinkActions', 'actions'],
340
+ categories: ['linking', 'interaction'],
341
+ examples: [
342
+ {
343
+ name: 'useSmartLinkActions',
344
+ description:
345
+ 'useSmartLinkActions used to get actions for a URL and invoke one (e.g. Preview) from a custom button.',
346
+ source: path.resolve(packagePath, './examples/content/useSmartLinkActions.tsx'),
347
+ },
348
+ ],
349
+ },
350
+ ],
351
+ };
350
352
 
351
353
  export default documentation;