@atlaskit/smart-card 44.5.1 → 44.5.3
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 +15 -0
- package/dist/cjs/state/hooks/use-current-site-cloud-id/index.js +71 -0
- package/dist/cjs/state/hooks/use-social-proof/index.js +60 -0
- package/dist/cjs/state/services/current-site-cloud-id/index.js +182 -0
- package/dist/cjs/state/services/personalization/index.js +267 -0
- package/dist/cjs/state/services/personalization/types.js +1 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/es2019/state/hooks/use-current-site-cloud-id/index.js +28 -0
- package/dist/es2019/state/hooks/use-social-proof/index.js +45 -0
- package/dist/es2019/state/services/current-site-cloud-id/index.js +118 -0
- package/dist/es2019/state/services/personalization/index.js +164 -0
- package/dist/es2019/state/services/personalization/types.js +0 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/esm/state/hooks/use-current-site-cloud-id/index.js +35 -0
- package/dist/esm/state/hooks/use-social-proof/index.js +53 -0
- package/dist/esm/state/services/current-site-cloud-id/index.js +174 -0
- package/dist/esm/state/services/personalization/index.js +258 -0
- package/dist/esm/state/services/personalization/types.js +0 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/types/common/ui/icons/blog-icon.d.ts +1 -1
- package/dist/types/common/ui/icons/live-document-icon.d.ts +1 -1
- package/dist/types/state/hooks/use-current-site-cloud-id/index.d.ts +6 -0
- package/dist/types/state/hooks/use-social-proof/index.d.ts +13 -0
- package/dist/types/state/services/current-site-cloud-id/index.d.ts +46 -0
- package/dist/types/state/services/personalization/index.d.ts +41 -0
- package/dist/types/state/services/personalization/types.d.ts +10 -0
- package/dist/types/view/FlexibleCard/assets/ai-chapter-icon.d.ts +3 -2
- package/dist/types/view/FlexibleCard/assets/ai-edit-icon.d.ts +3 -2
- package/dist/types/view/FlexibleCard/assets/ai-search-icon.d.ts +3 -2
- package/dist/types/view/FlexibleCard/assets/rovo-hex-logo.d.ts +4 -3
- package/dist/types-ts4.5/common/ui/icons/blog-icon.d.ts +1 -1
- package/dist/types-ts4.5/common/ui/icons/live-document-icon.d.ts +1 -1
- package/dist/types-ts4.5/state/hooks/use-current-site-cloud-id/index.d.ts +6 -0
- package/dist/types-ts4.5/state/hooks/use-social-proof/index.d.ts +13 -0
- package/dist/types-ts4.5/state/services/current-site-cloud-id/index.d.ts +46 -0
- package/dist/types-ts4.5/state/services/personalization/index.d.ts +41 -0
- package/dist/types-ts4.5/state/services/personalization/types.d.ts +10 -0
- package/dist/types-ts4.5/view/FlexibleCard/assets/ai-chapter-icon.d.ts +3 -2
- package/dist/types-ts4.5/view/FlexibleCard/assets/ai-edit-icon.d.ts +3 -2
- package/dist/types-ts4.5/view/FlexibleCard/assets/ai-search-icon.d.ts +3 -2
- package/dist/types-ts4.5/view/FlexibleCard/assets/rovo-hex-logo.d.ts +4 -3
- package/package.json +4 -4
- package/smart-card.docs.tsx +35 -15
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "44.5.
|
|
3
|
+
"version": "44.5.3",
|
|
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.
|
|
38
|
+
"@atlaskit/adf-utils": "^19.29.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",
|
|
@@ -85,9 +85,9 @@
|
|
|
85
85
|
"@atlaskit/textfield": "^8.3.0",
|
|
86
86
|
"@atlaskit/theme": "^23.2.0",
|
|
87
87
|
"@atlaskit/tile": "^1.1.0",
|
|
88
|
-
"@atlaskit/tmp-editor-statsig": "^74.
|
|
88
|
+
"@atlaskit/tmp-editor-statsig": "^74.7.0",
|
|
89
89
|
"@atlaskit/tokens": "^13.0.0",
|
|
90
|
-
"@atlaskit/tooltip": "^
|
|
90
|
+
"@atlaskit/tooltip": "^22.0.0",
|
|
91
91
|
"@atlaskit/ufo": "^0.4.0",
|
|
92
92
|
"@atlaskit/width-detector": "^5.1.0",
|
|
93
93
|
"@babel/runtime": "^7.0.0",
|
package/smart-card.docs.tsx
CHANGED
|
@@ -38,22 +38,26 @@ const documentation: ComponentStructuredContentSource[] = [
|
|
|
38
38
|
examples: [
|
|
39
39
|
{
|
|
40
40
|
name: 'Card (basic)',
|
|
41
|
-
description:
|
|
41
|
+
description:
|
|
42
|
+
'Inline, block, and embed appearances shown side by side. Requires staging login to resolve links.',
|
|
42
43
|
source: path.resolve(packagePath, './examples/content/card.tsx'),
|
|
43
44
|
},
|
|
44
45
|
{
|
|
45
46
|
name: 'Card (appearance: block)',
|
|
46
|
-
description:
|
|
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".',
|
|
47
49
|
source: path.resolve(packagePath, './examples/content/block-card.tsx'),
|
|
48
50
|
},
|
|
49
51
|
{
|
|
50
52
|
name: 'Card (appearance: inline)',
|
|
51
|
-
description:
|
|
53
|
+
description:
|
|
54
|
+
'Inline appearance — link in text like a hyperlink. Use showHoverPreview for hover preview on inline Smart Links.',
|
|
52
55
|
source: path.resolve(packagePath, './examples/content/inline-card.tsx'),
|
|
53
56
|
},
|
|
54
57
|
{
|
|
55
58
|
name: 'Card (appearance: embed)',
|
|
56
|
-
description:
|
|
59
|
+
description:
|
|
60
|
+
'Embed appearance — linked content rendered in place. Requires a resolvable embed URL; not all links support embed.',
|
|
57
61
|
source: path.resolve(packagePath, './examples/content/embed-card.tsx'),
|
|
58
62
|
},
|
|
59
63
|
],
|
|
@@ -84,7 +88,8 @@ const documentation: ComponentStructuredContentSource[] = [
|
|
|
84
88
|
examples: [
|
|
85
89
|
{
|
|
86
90
|
name: 'Hover card',
|
|
87
|
-
description:
|
|
91
|
+
description:
|
|
92
|
+
'HoverCard wrapping a trigger element; shows Smart Link preview on hover. Requires staging login to resolve.',
|
|
88
93
|
source: path.resolve(packagePath, './examples/content/hover-card.tsx'),
|
|
89
94
|
},
|
|
90
95
|
],
|
|
@@ -114,7 +119,8 @@ const documentation: ComponentStructuredContentSource[] = [
|
|
|
114
119
|
examples: [
|
|
115
120
|
{
|
|
116
121
|
name: 'Link URL',
|
|
117
|
-
description:
|
|
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).',
|
|
118
124
|
source: path.resolve(packagePath, './examples/content/link-url.tsx'),
|
|
119
125
|
},
|
|
120
126
|
],
|
|
@@ -139,12 +145,21 @@ const documentation: ComponentStructuredContentSource[] = [
|
|
|
139
145
|
'Use a logical structure (e.g. heading hierarchy) so the card is navigable by assistive tech.',
|
|
140
146
|
'Ensure all interactive elements inside blocks (links, buttons, actions) are focusable and have accessible names.',
|
|
141
147
|
],
|
|
142
|
-
keywords: [
|
|
148
|
+
keywords: [
|
|
149
|
+
'smart-card',
|
|
150
|
+
'flexible',
|
|
151
|
+
'flexible card',
|
|
152
|
+
'flexible ui',
|
|
153
|
+
'blocks',
|
|
154
|
+
'elements',
|
|
155
|
+
'composable',
|
|
156
|
+
],
|
|
143
157
|
categories: ['linking', 'data-display'],
|
|
144
158
|
examples: [
|
|
145
159
|
{
|
|
146
160
|
name: 'Flexible UI card',
|
|
147
|
-
description:
|
|
161
|
+
description:
|
|
162
|
+
'Custom block layout with TitleBlock, PreviewBlock, MetadataBlock, SnippetBlock, and FooterBlock composed inside Card.',
|
|
148
163
|
source: path.resolve(packagePath, './examples/content/flexible-ui-card.tsx'),
|
|
149
164
|
},
|
|
150
165
|
],
|
|
@@ -174,7 +189,8 @@ const documentation: ComponentStructuredContentSource[] = [
|
|
|
174
189
|
examples: [
|
|
175
190
|
{
|
|
176
191
|
name: 'Title block default',
|
|
177
|
-
description:
|
|
192
|
+
description:
|
|
193
|
+
'TitleBlock with default props; title and icon come from the resolved link data.',
|
|
178
194
|
source: path.resolve(packagePath, './examples/content/title-block-default.tsx'),
|
|
179
195
|
},
|
|
180
196
|
],
|
|
@@ -204,7 +220,8 @@ const documentation: ComponentStructuredContentSource[] = [
|
|
|
204
220
|
examples: [
|
|
205
221
|
{
|
|
206
222
|
name: 'Metadata block primary',
|
|
207
|
-
description:
|
|
223
|
+
description:
|
|
224
|
+
'MetadataBlock with a primary row showing CollaboratorGroup and ModifiedOn elements.',
|
|
208
225
|
source: path.resolve(packagePath, './examples/content/metadata-block-primary.tsx'),
|
|
209
226
|
},
|
|
210
227
|
],
|
|
@@ -240,7 +257,8 @@ const documentation: ComponentStructuredContentSource[] = [
|
|
|
240
257
|
},
|
|
241
258
|
{
|
|
242
259
|
name: 'FooterBlock',
|
|
243
|
-
description:
|
|
260
|
+
description:
|
|
261
|
+
'A block component for the Smart Link footer, typically showing actions (e.g. copy, open, follow).',
|
|
244
262
|
status: 'general-availability',
|
|
245
263
|
import: {
|
|
246
264
|
name: 'FooterBlock',
|
|
@@ -262,7 +280,8 @@ const documentation: ComponentStructuredContentSource[] = [
|
|
|
262
280
|
examples: [
|
|
263
281
|
{
|
|
264
282
|
name: 'Footer block default',
|
|
265
|
-
description:
|
|
283
|
+
description:
|
|
284
|
+
'FooterBlock with default actions (e.g. copy, open, follow) at the bottom of the card.',
|
|
266
285
|
source: path.resolve(packagePath, './examples/content/footer-block-default.tsx'),
|
|
267
286
|
},
|
|
268
287
|
],
|
|
@@ -291,7 +310,8 @@ const documentation: ComponentStructuredContentSource[] = [
|
|
|
291
310
|
examples: [
|
|
292
311
|
{
|
|
293
312
|
name: 'Analytics',
|
|
294
|
-
description:
|
|
313
|
+
description:
|
|
314
|
+
'Card with AnalyticsListener capturing and displaying Smart Link analytics events (e.g. on click).',
|
|
295
315
|
source: path.resolve(packagePath, './examples/content/analytics.tsx'),
|
|
296
316
|
},
|
|
297
317
|
],
|
|
@@ -320,12 +340,12 @@ const documentation: ComponentStructuredContentSource[] = [
|
|
|
320
340
|
examples: [
|
|
321
341
|
{
|
|
322
342
|
name: 'useSmartLinkActions',
|
|
323
|
-
description:
|
|
343
|
+
description:
|
|
344
|
+
'useSmartLinkActions used to get actions for a URL and invoke one (e.g. Preview) from a custom button.',
|
|
324
345
|
source: path.resolve(packagePath, './examples/content/useSmartLinkActions.tsx'),
|
|
325
346
|
},
|
|
326
347
|
],
|
|
327
348
|
},
|
|
328
349
|
];
|
|
329
350
|
|
|
330
|
-
|
|
331
351
|
export default documentation;
|