@atlaskit/smart-card 44.3.18 → 44.3.20

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,19 @@
1
1
  # @atlaskit/smart-card
2
2
 
3
+ ## 44.3.20
4
+
5
+ ### Patch Changes
6
+
7
+ - Updated dependencies
8
+
9
+ ## 44.3.19
10
+
11
+ ### Patch Changes
12
+
13
+ - [`041a640067ec8`](https://bitbucket.org/atlassian/atlassian-frontend-monorepo/commits/041a640067ec8) -
14
+ [ux] Fix typo in an unauth hover card content
15
+ - Updated dependencies
16
+
3
17
  ## 44.3.18
4
18
 
5
19
  ### Patch Changes
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:93d879a1d831d0040369d1bbccaa42bb7e8878b0a9a9814d8e676c647a57de8d
3
- size 36408
2
+ oid sha256:bc16d0190282f87a9dd15c3ec2e6c2b98263bdda9f996e1a96e457fe39153f1c
3
+ size 36498
@@ -869,7 +869,7 @@ var messages = exports.messages = (0, _reactIntl.defineMessages)({
869
869
  },
870
870
  rovo_unauthorised_feature_clear_link_names: {
871
871
  id: 'fabric.linking.rovo_unauthorised.feature.clear_link_names',
872
- defaultMessage: 'Turn long URL into clear link names',
872
+ defaultMessage: 'Turn long URLs into clear link names',
873
873
  description: 'First feature bullet in Rovo unauthorised hover card.'
874
874
  },
875
875
  rovo_unauthorised_feature_understand_linked_docs: {
@@ -10,8 +10,8 @@ var _createClass2 = _interopRequireDefault(require("@babel/runtime/helpers/creat
10
10
  var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
11
11
  var context = exports.context = {
12
12
  componentName: 'smart-cards',
13
- packageName: "@atlaskit/smart-card",
14
- packageVersion: "44.3.17"
13
+ packageName: "@atlaskit/smart-card" || '',
14
+ packageVersion: "44.3.19" || ''
15
15
  };
16
16
  var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
17
17
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -22,7 +22,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId", "isLink
22
22
  _excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
23
23
  var PACKAGE_DATA = {
24
24
  packageName: "@atlaskit/smart-card",
25
- packageVersion: "44.3.17",
25
+ packageVersion: "44.3.19",
26
26
  componentName: 'linkUrl'
27
27
  };
28
28
  var Anchor = (0, _click.withLinkClickedEvent)('a');
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:93d879a1d831d0040369d1bbccaa42bb7e8878b0a9a9814d8e676c647a57de8d
3
- size 36408
2
+ oid sha256:bc16d0190282f87a9dd15c3ec2e6c2b98263bdda9f996e1a96e457fe39153f1c
3
+ size 36498
@@ -863,7 +863,7 @@ export const messages = defineMessages({
863
863
  },
864
864
  rovo_unauthorised_feature_clear_link_names: {
865
865
  id: 'fabric.linking.rovo_unauthorised.feature.clear_link_names',
866
- defaultMessage: 'Turn long URL into clear link names',
866
+ defaultMessage: 'Turn long URLs into clear link names',
867
867
  description: 'First feature bullet in Rovo unauthorised hover card.'
868
868
  },
869
869
  rovo_unauthorised_feature_understand_linked_docs: {
@@ -1,8 +1,8 @@
1
1
  export const ANALYTICS_CHANNEL = 'media';
2
2
  export const context = {
3
3
  componentName: 'smart-cards',
4
- packageName: "@atlaskit/smart-card",
5
- packageVersion: "44.3.17"
4
+ packageName: "@atlaskit/smart-card" || '',
5
+ packageVersion: "44.3.19" || ''
6
6
  };
7
7
  export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
8
8
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -12,7 +12,7 @@ import LinkWarningModal from './LinkWarningModal';
12
12
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
13
13
  const PACKAGE_DATA = {
14
14
  packageName: "@atlaskit/smart-card",
15
- packageVersion: "44.3.17",
15
+ packageVersion: "44.3.19",
16
16
  componentName: 'linkUrl'
17
17
  };
18
18
  const Anchor = withLinkClickedEvent('a');
@@ -1,3 +1,3 @@
1
1
  version https://git-lfs.github.com/spec/v1
2
- oid sha256:93d879a1d831d0040369d1bbccaa42bb7e8878b0a9a9814d8e676c647a57de8d
3
- size 36408
2
+ oid sha256:bc16d0190282f87a9dd15c3ec2e6c2b98263bdda9f996e1a96e457fe39153f1c
3
+ size 36498
@@ -863,7 +863,7 @@ export var messages = defineMessages({
863
863
  },
864
864
  rovo_unauthorised_feature_clear_link_names: {
865
865
  id: 'fabric.linking.rovo_unauthorised.feature.clear_link_names',
866
- defaultMessage: 'Turn long URL into clear link names',
866
+ defaultMessage: 'Turn long URLs into clear link names',
867
867
  description: 'First feature bullet in Rovo unauthorised hover card.'
868
868
  },
869
869
  rovo_unauthorised_feature_understand_linked_docs: {
@@ -3,8 +3,8 @@ import _createClass from "@babel/runtime/helpers/createClass";
3
3
  export var ANALYTICS_CHANNEL = 'media';
4
4
  export var context = {
5
5
  componentName: 'smart-cards',
6
- packageName: "@atlaskit/smart-card",
7
- packageVersion: "44.3.17"
6
+ packageName: "@atlaskit/smart-card" || '',
7
+ packageVersion: "44.3.19" || ''
8
8
  };
9
9
  export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
10
10
  TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
@@ -15,7 +15,7 @@ import LinkWarningModal from './LinkWarningModal';
15
15
  import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-modal';
16
16
  var PACKAGE_DATA = {
17
17
  packageName: "@atlaskit/smart-card",
18
- packageVersion: "44.3.17",
18
+ packageVersion: "44.3.19",
19
19
  componentName: 'linkUrl'
20
20
  };
21
21
  var Anchor = withLinkClickedEvent('a');
@@ -3,5 +3,5 @@ import type { CardProps } from '../../Card';
3
3
  type WithCardIntersectionObserverProps = {
4
4
  appearance: CardProps['appearance'];
5
5
  };
6
- declare const _default: <T extends WithCardIntersectionObserverProps>(Component: React.ComponentType<T>) => (props: T) => React.JSX.Element;
6
+ declare const _default: <T extends WithCardIntersectionObserverProps>(Component: React.ComponentType<T>) => ((props: T) => React.JSX.Element);
7
7
  export default _default;
@@ -8,4 +8,4 @@ export interface RovoPostAuthActionsModalProps {
8
8
  title: string;
9
9
  url: string;
10
10
  }
11
- export declare const RovoPostAuthActionsModal: ({ title, url, testId }: RovoPostAuthActionsModalProps) => JSX.Element;
11
+ export declare const RovoPostAuthActionsModal: ({ title, url, testId, }: RovoPostAuthActionsModalProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import type { LinkUrlProps } from '../types';
3
- export declare const HyperlinkWithSmartLinkResolver: React.ForwardRefExoticComponent<LinkUrlProps & React.RefAttributes<any>>;
3
+ export declare const HyperlinkWithSmartLinkResolver: React.ComponentType<LinkUrlProps>;
@@ -3,5 +3,5 @@ import type { CardProps } from '../../Card';
3
3
  type WithCardIntersectionObserverProps = {
4
4
  appearance: CardProps['appearance'];
5
5
  };
6
- declare const _default: <T extends WithCardIntersectionObserverProps>(Component: React.ComponentType<T>) => (props: T) => React.JSX.Element;
6
+ declare const _default: <T extends WithCardIntersectionObserverProps>(Component: React.ComponentType<T>) => ((props: T) => React.JSX.Element);
7
7
  export default _default;
@@ -8,4 +8,4 @@ export interface RovoPostAuthActionsModalProps {
8
8
  title: string;
9
9
  url: string;
10
10
  }
11
- export declare const RovoPostAuthActionsModal: ({ title, url, testId }: RovoPostAuthActionsModalProps) => JSX.Element;
11
+ export declare const RovoPostAuthActionsModal: ({ title, url, testId, }: RovoPostAuthActionsModalProps) => JSX.Element;
@@ -1,3 +1,3 @@
1
1
  import React from 'react';
2
2
  import type { LinkUrlProps } from '../types';
3
- export declare const HyperlinkWithSmartLinkResolver: React.ForwardRefExoticComponent<LinkUrlProps & React.RefAttributes<any>>;
3
+ export declare const HyperlinkWithSmartLinkResolver: React.ComponentType<LinkUrlProps>;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "44.3.18",
3
+ "version": "44.3.20",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -74,8 +74,8 @@
74
74
  "@atlaskit/platform-feature-flags-react": "^0.4.0",
75
75
  "@atlaskit/popup": "^4.17.0",
76
76
  "@atlaskit/primitives": "^19.0.0",
77
- "@atlaskit/react-ufo": "^5.16.0",
78
- "@atlaskit/rovo-triggers": "^5.45.0",
77
+ "@atlaskit/react-ufo": "^5.17.0",
78
+ "@atlaskit/rovo-triggers": "^5.46.0",
79
79
  "@atlaskit/section-message": "^8.12.0",
80
80
  "@atlaskit/select": "^21.10.0",
81
81
  "@atlaskit/spinner": "^19.1.0",
@@ -84,7 +84,7 @@
84
84
  "@atlaskit/textfield": "^8.3.0",
85
85
  "@atlaskit/theme": "^23.2.0",
86
86
  "@atlaskit/tile": "^1.0.0",
87
- "@atlaskit/tmp-editor-statsig": "^71.0.0",
87
+ "@atlaskit/tmp-editor-statsig": "^73.0.0",
88
88
  "@atlaskit/tokens": "^13.0.0",
89
89
  "@atlaskit/tooltip": "^21.2.0",
90
90
  "@atlaskit/ufo": "^0.4.0",
@@ -120,6 +120,7 @@
120
120
  "@atlassian/feature-flags-test-utils": "^1.0.0",
121
121
  "@atlassian/gemini": "^1.44.0",
122
122
  "@atlassian/react-compiler-gating": "workspace:^",
123
+ "@atlassian/structured-docs-types": "workspace:^",
123
124
  "@atlassian/testing-library": "^0.5.0",
124
125
  "@testing-library/dom": "^10.1.0",
125
126
  "@testing-library/jest-dom": "^6.4.5",
@@ -0,0 +1,331 @@
1
+ /**
2
+ * Testing structured MCP docs for review — ignore this file.
3
+ * Contact #dst-structured-content in Slack with questions.
4
+ */
5
+
6
+ import path from 'path';
7
+
8
+ import type { ComponentStructuredContentSource } from '@atlassian/structured-docs-types';
9
+
10
+ import packageJson from './package.json';
11
+
12
+ const packagePath = path.resolve(__dirname);
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: {
21
+ name: 'Card',
22
+ package: '@atlaskit/smart-card',
23
+ type: 'default',
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: 'Inline, block, and embed appearances shown side by side. Requires staging login to resolve links.',
42
+ source: path.resolve(packagePath, './examples/content/card.tsx'),
43
+ },
44
+ {
45
+ name: 'Card (appearance: block)',
46
+ description: 'Block appearance — card-style preview with detailed view of the linked material. In the editor this is referred to as the "Card".',
47
+ source: path.resolve(packagePath, './examples/content/block-card.tsx'),
48
+ },
49
+ {
50
+ name: 'Card (appearance: inline)',
51
+ description: 'Inline appearance — link in text like a hyperlink. Use showHoverPreview for hover preview on inline Smart Links.',
52
+ source: path.resolve(packagePath, './examples/content/inline-card.tsx'),
53
+ },
54
+ {
55
+ name: 'Card (appearance: embed)',
56
+ description: 'Embed appearance — linked content rendered in place. Requires a resolvable embed URL; not all links support embed.',
57
+ source: path.resolve(packagePath, './examples/content/embed-card.tsx'),
58
+ },
59
+ ],
60
+ },
61
+ {
62
+ name: 'HoverCard',
63
+ description:
64
+ '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.',
65
+ status: 'general-availability',
66
+ import: {
67
+ name: 'HoverCard',
68
+ package: '@atlaskit/smart-card/hover-card',
69
+ type: 'default',
70
+ packagePath,
71
+ packageJson,
72
+ },
73
+ usageGuidelines: [
74
+ '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.',
75
+ ],
76
+ contentGuidelines: [],
77
+ accessibilityGuidelines: [
78
+ 'Provide a keyboard-accessible way to open the preview (e.g. focus or explicit trigger); do not rely on hover alone.',
79
+ 'Ensure the trigger element has an accessible name and role (e.g. link or button).',
80
+ 'Ensure the hover card content is announced when shown (e.g. aria-describedby or live region) and can be dismissed via keyboard.',
81
+ ],
82
+ keywords: ['smart-card', 'hover card', 'hover', 'preview', 'smart link'],
83
+ categories: ['linking', 'data-display', 'interaction'],
84
+ examples: [
85
+ {
86
+ name: 'Hover card',
87
+ description: 'HoverCard wrapping a trigger element; shows Smart Link preview on hover. Requires staging login to resolve.',
88
+ source: path.resolve(packagePath, './examples/content/hover-card.tsx'),
89
+ },
90
+ ],
91
+ },
92
+ {
93
+ name: 'LinkUrl',
94
+ description:
95
+ '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.',
96
+ status: 'general-availability',
97
+ import: {
98
+ name: 'LinkUrl',
99
+ package: '@atlaskit/smart-card/link-url',
100
+ type: 'default',
101
+ packagePath,
102
+ packageJson,
103
+ },
104
+ usageGuidelines: [
105
+ '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.',
106
+ ],
107
+ contentGuidelines: [],
108
+ accessibilityGuidelines: [
109
+ 'Use descriptive link text that indicates the destination or action; avoid exposing only the URL when possible.',
110
+ 'Ensure the safety-check warning (when link text and destination differ) is announced to screen readers.',
111
+ ],
112
+ keywords: ['smart-card', 'link', 'url', 'safety', 'hyperlink'],
113
+ categories: ['linking', 'interaction'],
114
+ examples: [
115
+ {
116
+ name: 'Link URL',
117
+ description: 'Link safety: when link text looks like a URL but destination differs (warning) vs when text matches or is plain (no warning).',
118
+ source: path.resolve(packagePath, './examples/content/link-url.tsx'),
119
+ },
120
+ ],
121
+ },
122
+ {
123
+ name: 'FlexibleCard',
124
+ description:
125
+ '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.',
126
+ status: 'general-availability',
127
+ import: {
128
+ name: 'TitleBlock',
129
+ package: '@atlaskit/smart-card',
130
+ type: 'named',
131
+ packagePath,
132
+ packageJson,
133
+ },
134
+ usageGuidelines: [
135
+ '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.',
136
+ ],
137
+ contentGuidelines: [],
138
+ accessibilityGuidelines: [
139
+ 'Use a logical structure (e.g. heading hierarchy) so the card is navigable by assistive tech.',
140
+ 'Ensure all interactive elements inside blocks (links, buttons, actions) are focusable and have accessible names.',
141
+ ],
142
+ keywords: ['smart-card', 'flexible', 'flexible card', 'flexible ui', 'blocks', 'elements', 'composable'],
143
+ categories: ['linking', 'data-display'],
144
+ examples: [
145
+ {
146
+ name: 'Flexible UI card',
147
+ description: 'Custom block layout with TitleBlock, PreviewBlock, MetadataBlock, SnippetBlock, and FooterBlock composed inside Card.',
148
+ source: path.resolve(packagePath, './examples/content/flexible-ui-card.tsx'),
149
+ },
150
+ ],
151
+ },
152
+ {
153
+ name: 'TitleBlock',
154
+ description:
155
+ 'A block component for the Smart Link title row. Used inside FlexibleCard to show title, icon, and optional metadata and actions.',
156
+ status: 'general-availability',
157
+ import: {
158
+ name: 'TitleBlock',
159
+ package: '@atlaskit/smart-card',
160
+ type: 'named',
161
+ packagePath,
162
+ packageJson,
163
+ },
164
+ usageGuidelines: [
165
+ 'Use for the main title row of a block Smart Link when you need title, icon, optional subtitle, metadata, or actions in one row.',
166
+ ],
167
+ contentGuidelines: [],
168
+ accessibilityGuidelines: [
169
+ 'Ensure the title is exposed as a heading or has an accessible name so it is announced as the primary label for the card.',
170
+ 'If the title row icon conveys meaning, give it an accessible name (e.g. aria-label); otherwise mark as decorative.',
171
+ ],
172
+ keywords: ['smart-card', 'title block', 'flexible', 'block'],
173
+ categories: ['linking', 'data-display'],
174
+ examples: [
175
+ {
176
+ name: 'Title block default',
177
+ description: 'TitleBlock with default props; title and icon come from the resolved link data.',
178
+ source: path.resolve(packagePath, './examples/content/title-block-default.tsx'),
179
+ },
180
+ ],
181
+ },
182
+ {
183
+ name: 'MetadataBlock',
184
+ description:
185
+ 'A block component that displays a row of metadata elements (e.g. created by, due date, state) in a Smart Link.',
186
+ status: 'general-availability',
187
+ import: {
188
+ name: 'MetadataBlock',
189
+ package: '@atlaskit/smart-card',
190
+ type: 'named',
191
+ packagePath,
192
+ packageJson,
193
+ },
194
+ usageGuidelines: [
195
+ 'Use when you need a single row of metadata (e.g. created by, due date, state) in a block Smart Link.',
196
+ ],
197
+ contentGuidelines: [],
198
+ accessibilityGuidelines: [
199
+ 'Ensure metadata is available to screen readers (e.g. not conveyed only by color or icon).',
200
+ 'Use a list or group with an accessible name if the metadata row has a specific purpose (e.g. "Contributors", "Dates").',
201
+ ],
202
+ keywords: ['smart-card', 'metadata block', 'flexible', 'block', 'metadata'],
203
+ categories: ['linking', 'data-display'],
204
+ examples: [
205
+ {
206
+ name: 'Metadata block primary',
207
+ description: 'MetadataBlock with a primary row showing CollaboratorGroup and ModifiedOn elements.',
208
+ source: path.resolve(packagePath, './examples/content/metadata-block-primary.tsx'),
209
+ },
210
+ ],
211
+ },
212
+ {
213
+ name: 'PreviewBlock',
214
+ description: 'A block component that displays a preview image or media for the Smart Link.',
215
+ status: 'general-availability',
216
+ import: {
217
+ name: 'PreviewBlock',
218
+ package: '@atlaskit/smart-card',
219
+ type: 'named',
220
+ packagePath,
221
+ packageJson,
222
+ },
223
+ usageGuidelines: [
224
+ 'Use when the linked resource has a preview image or media and you want to surface it in the block card.',
225
+ ],
226
+ contentGuidelines: [],
227
+ accessibilityGuidelines: [
228
+ 'If the preview image conveys information, provide meaningful alt text; if purely decorative, use alt="" or aria-hidden.',
229
+ 'Ensure no critical information is shown only in the preview; duplicate in text or metadata when needed.',
230
+ ],
231
+ keywords: ['smart-card', 'preview block', 'flexible', 'block', 'preview', 'image'],
232
+ categories: ['linking', 'data-display'],
233
+ examples: [
234
+ {
235
+ name: 'Preview block default',
236
+ description: "PreviewBlock showing the resolved link's preview image when available.",
237
+ source: path.resolve(packagePath, './examples/content/preview-block-default.tsx'),
238
+ },
239
+ ],
240
+ },
241
+ {
242
+ name: 'FooterBlock',
243
+ description: 'A block component for the Smart Link footer, typically showing actions (e.g. copy, open, follow).',
244
+ status: 'general-availability',
245
+ import: {
246
+ name: 'FooterBlock',
247
+ package: '@atlaskit/smart-card',
248
+ type: 'named',
249
+ packagePath,
250
+ packageJson,
251
+ },
252
+ usageGuidelines: [
253
+ 'Use at the bottom of a FlexibleCard when you need actions such as copy link, open, or follow.',
254
+ ],
255
+ contentGuidelines: [],
256
+ accessibilityGuidelines: [
257
+ 'Give each action button or control an accessible name (e.g. "Copy link", "Open in new tab") so purpose is clear to screen readers.',
258
+ 'Ensure actions are keyboard operable and appear in a logical tab order.',
259
+ ],
260
+ keywords: ['smart-card', 'footer block', 'flexible', 'block', 'actions'],
261
+ categories: ['linking', 'data-display', 'interaction'],
262
+ examples: [
263
+ {
264
+ name: 'Footer block default',
265
+ description: 'FooterBlock with default actions (e.g. copy, open, follow) at the bottom of the card.',
266
+ source: path.resolve(packagePath, './examples/content/footer-block-default.tsx'),
267
+ },
268
+ ],
269
+ },
270
+ {
271
+ name: 'useSmartLinkEvents',
272
+ description:
273
+ 'Hook that returns a SmartLinkEvents object for dispatching analytics events for a given URL. Currently supports insertSmartLink.',
274
+ status: 'general-availability',
275
+ import: {
276
+ name: 'useSmartLinkEvents',
277
+ package: '@atlaskit/smart-card',
278
+ type: 'named',
279
+ packagePath,
280
+ packageJson,
281
+ },
282
+ usageGuidelines: [
283
+ 'Use when you need to fire Smart Link analytics (e.g. insert events) from custom UI that is not the default Card.',
284
+ ],
285
+ contentGuidelines: [],
286
+ accessibilityGuidelines: [
287
+ 'Use analytics events to understand usage; ensure event wiring does not change focus, interrupt screen readers, or alter semantics.',
288
+ ],
289
+ keywords: ['smart-card', 'hooks', 'analytics', 'useSmartLinkEvents', 'events'],
290
+ categories: ['linking', 'analytics'],
291
+ examples: [
292
+ {
293
+ name: 'Analytics',
294
+ description: 'Card with AnalyticsListener capturing and displaying Smart Link analytics events (e.g. on click).',
295
+ source: path.resolve(packagePath, './examples/content/analytics.tsx'),
296
+ },
297
+ ],
298
+ },
299
+ {
300
+ name: 'useSmartLinkActions',
301
+ description:
302
+ 'Hook that extracts and returns actions for a given URL. Relies on Smart Link context; usages must be wrapped in SmartCardProvider or equivalent.',
303
+ status: 'general-availability',
304
+ import: {
305
+ name: 'useSmartLinkActions',
306
+ package: '@atlaskit/smart-card/hooks',
307
+ type: 'named',
308
+ packagePath,
309
+ packageJson,
310
+ },
311
+ usageGuidelines: [
312
+ 'Use when building custom action UI (buttons, menus) that should expose Smart Link actions (e.g. Preview, Open) for a given URL.',
313
+ ],
314
+ contentGuidelines: [],
315
+ accessibilityGuidelines: [
316
+ 'When rendering actions from this hook (e.g. buttons or menus), provide accessible labels (e.g. from action.text) and ensure keyboard support.',
317
+ ],
318
+ keywords: ['smart-card', 'hooks', 'useSmartLinkActions', 'actions'],
319
+ categories: ['linking', 'interaction'],
320
+ examples: [
321
+ {
322
+ name: 'useSmartLinkActions',
323
+ description: 'useSmartLinkActions used to get actions for a URL and invoke one (e.g. Preview) from a custom button.',
324
+ source: path.resolve(packagePath, './examples/content/useSmartLinkActions.tsx'),
325
+ },
326
+ ],
327
+ },
328
+ ];
329
+
330
+
331
+ export default documentation;