@atlaskit/smart-card 26.2.2 → 26.3.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.
Files changed (36) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/dist/cjs/state/hooks/use-invoke/index.js +8 -28
  3. package/dist/cjs/utils/analytics/analytics.js +13 -1
  4. package/dist/cjs/version.json +1 -1
  5. package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/index.js +38 -30
  6. package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/lozenge-action-analytics.js +31 -0
  7. package/dist/cjs/view/FlexibleCard/components/common/lozenge-action/lozenge-action-error/styled.js +1 -1
  8. package/dist/es2019/state/hooks/use-invoke/index.js +4 -23
  9. package/dist/es2019/utils/analytics/analytics.js +10 -0
  10. package/dist/es2019/version.json +1 -1
  11. package/dist/es2019/view/FlexibleCard/components/common/lozenge-action/index.js +14 -6
  12. package/dist/es2019/view/FlexibleCard/components/common/lozenge-action/lozenge-action-analytics.js +21 -0
  13. package/dist/es2019/view/FlexibleCard/components/common/lozenge-action/lozenge-action-error/styled.js +1 -0
  14. package/dist/esm/state/hooks/use-invoke/index.js +8 -28
  15. package/dist/esm/utils/analytics/analytics.js +10 -0
  16. package/dist/esm/version.json +1 -1
  17. package/dist/esm/view/FlexibleCard/components/common/lozenge-action/index.js +38 -30
  18. package/dist/esm/view/FlexibleCard/components/common/lozenge-action/lozenge-action-analytics.js +21 -0
  19. package/dist/esm/view/FlexibleCard/components/common/lozenge-action/lozenge-action-error/styled.js +1 -1
  20. package/dist/types/state/analytics/useSmartLinkAnalytics.d.ts +6 -3
  21. package/dist/types/state/flexible-ui-context/index.d.ts +10 -6
  22. package/dist/types/state/hooks/use-invoke/index.d.ts +1 -7
  23. package/dist/types/state/hooks/useSmartLink.d.ts +5 -3
  24. package/dist/types/utils/analytics/analytics.d.ts +11 -3
  25. package/dist/types/utils/mocks.d.ts +5 -3
  26. package/dist/types/view/FlexibleCard/components/common/lozenge-action/lozenge-action-analytics.d.ts +21 -0
  27. package/dist/types-ts4.5/state/analytics/useSmartLinkAnalytics.d.ts +6 -3
  28. package/dist/types-ts4.5/state/flexible-ui-context/index.d.ts +10 -6
  29. package/dist/types-ts4.5/state/hooks/use-invoke/index.d.ts +1 -7
  30. package/dist/types-ts4.5/state/hooks/useSmartLink.d.ts +5 -3
  31. package/dist/types-ts4.5/utils/analytics/analytics.d.ts +11 -3
  32. package/dist/types-ts4.5/utils/mocks.d.ts +5 -3
  33. package/dist/types-ts4.5/view/FlexibleCard/components/common/lozenge-action/lozenge-action-analytics.d.ts +21 -0
  34. package/package.json +1 -1
  35. package/report.api.md +21 -3
  36. package/tmp/api-report-tmp.d.ts +927 -0
@@ -0,0 +1,927 @@
1
+ ## API Report File for "@atlaskit/smart-card"
2
+
3
+ > Do not edit this file. It is a report generated by [API Extractor](https://api-extractor.com/).
4
+
5
+ ```ts
6
+
7
+ /// <reference types="react" />
8
+
9
+ import { APIError } from '@atlaskit/linking-common';
10
+ import { Appearance } from '@atlaskit/button/types';
11
+ import { BlockCardAdf } from '@atlaskit/linking-common';
12
+ import { CardAdf } from '@atlaskit/linking-common';
13
+ import { CardAppearance } from '@atlaskit/linking-common';
14
+ import { CardContext } from '@atlaskit/link-provider';
15
+ import { CardPlatform } from '@atlaskit/linking-common';
16
+ import { CardType } from '@atlaskit/linking-common';
17
+ import { CardClient as Client } from '@atlaskit/link-provider';
18
+ import { CreateUIAnalyticsEvent } from '@atlaskit/analytics-next';
19
+ import { EditorCardProvider } from '@atlaskit/link-provider';
20
+ import { editorCardProvider } from '@atlaskit/link-provider';
21
+ import { EmbedCardAdf } from '@atlaskit/linking-common';
22
+ import { ErrorInfo } from 'react';
23
+ import { GasPayload } from '@atlaskit/analytics-gas-types';
24
+ import { InlineCardAdf } from '@atlaskit/linking-common';
25
+ import { JsonLd } from 'json-ld-types';
26
+ import { MessageDescriptor } from 'react-intl-next';
27
+ import { SmartCardProvider as Provider } from '@atlaskit/link-provider';
28
+ import { ProviderProps } from '@atlaskit/link-provider';
29
+ import { default as React_2 } from 'react';
30
+ import { ReactChild } from 'react';
31
+ import { Ref } from 'react';
32
+ import { SerializedStyles } from '@emotion/react';
33
+ import { SmartCardContext } from '@atlaskit/link-provider';
34
+ import { SmartLinkActionType } from '@atlaskit/linking-types';
35
+ import { WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
36
+ import { WithContextProps } from '@atlaskit/analytics-next';
37
+ import { WithIntlProps } from 'react-intl-next';
38
+ import { WrappedComponentProps } from 'react-intl-next';
39
+
40
+ // @public (undocumented)
41
+ export type ActionItem = CustomActionItem | NamedActionItem | NamedDataActionItem;
42
+
43
+ // @public
44
+ export enum ActionName {
45
+ // (undocumented)
46
+ CustomAction = "CustomAction",
47
+ // (undocumented)
48
+ DeleteAction = "DeleteAction",
49
+ // (undocumented)
50
+ DownloadAction = "DownloadAction",
51
+ // (undocumented)
52
+ EditAction = "EditAction",
53
+ // (undocumented)
54
+ PreviewAction = "PreviewAction",
55
+ // (undocumented)
56
+ ViewAction = "ViewAction"
57
+ }
58
+
59
+ // @public (undocumented)
60
+ type ActionProps = {
61
+ size?: SmartLinkSize;
62
+ content?: React.ReactNode;
63
+ appearance?: Appearance;
64
+ onClick: () => any;
65
+ icon?: ReactChild;
66
+ iconPosition?: 'after' | 'before';
67
+ tooltipMessage?: React.ReactNode;
68
+ asDropDownItem?: boolean;
69
+ overrideCss?: SerializedStyles;
70
+ testId?: string;
71
+ };
72
+
73
+ // @public (undocumented)
74
+ export type AnalyticsAction = 'authStarted' | 'chunkLoadFailed' | 'clicked' | 'closed' | 'connectFailed' | 'connectSucceeded' | 'connected' | 'created' | 'dismissed' | 'dwelled' | 'failed' | 'focused' | 'inserted' | 'renderFailed' | 'renderSuccess' | 'renderWithStatus' | 'resolved' | 'started' | 'success' | 'unresolved' | 'updated' | 'viewed';
75
+
76
+ // @public (undocumented)
77
+ export type AnalyticsActionSubject = 'applicationAccount' | 'button' | 'consentModal' | 'embedPreviewModal' | 'hoverCard' | 'link' | 'modal' | 'smartLink' | 'smartLinkAction' | 'smartLinkIframe' | 'smartLinkQuickAction';
78
+
79
+ // @public (undocumented)
80
+ type AnalyticsFacade = ReturnType<typeof useSmartLinkAnalytics>;
81
+
82
+ // @public (undocumented)
83
+ export type AnalyticsHandler = (event: AnalyticsPayload) => void;
84
+
85
+ // @public (undocumented)
86
+ type AnalyticsName = 'embedPreviewModal';
87
+
88
+ // @public (undocumented)
89
+ export type AnalyticsPayload = GasPayload & {
90
+ action?: AnalyticsAction;
91
+ actionSubject: AnalyticsActionSubject;
92
+ attributes: GasPayload['attributes'] & {
93
+ display?: CardInnerAppearance;
94
+ };
95
+ };
96
+
97
+ // @public (undocumented)
98
+ type AnchorTarget = '_blank' | '_parent' | '_self' | '_top';
99
+
100
+ export { APIError }
101
+
102
+ // @public
103
+ type AttachmentCount = {
104
+ name: ElementName.AttachmentCount;
105
+ };
106
+
107
+ // @public
108
+ type AuthorGroup = {
109
+ name: ElementName.AuthorGroup;
110
+ };
111
+
112
+ // @public
113
+ type BaseActionItem = {
114
+ hideContent?: boolean;
115
+ hideIcon?: boolean;
116
+ name: ActionName;
117
+ onClick: () => any;
118
+ overrideCss?: SerializedStyles;
119
+ size?: SmartLinkSize;
120
+ testId?: string;
121
+ };
122
+
123
+ // @public
124
+ type BaseDataActionItem = {
125
+ hideContent?: boolean;
126
+ hideIcon?: boolean;
127
+ name: ActionName;
128
+ onClick?: () => any;
129
+ overrideCss?: SerializedStyles;
130
+ size?: SmartLinkSize;
131
+ testId?: string;
132
+ };
133
+
134
+ export { BlockCardAdf }
135
+
136
+ // @public (undocumented)
137
+ export const blockCardContentClassName = "block-card-content";
138
+
139
+ // @public (undocumented)
140
+ export const blockCardContentHeaderClassName = "block-card-content-header";
141
+
142
+ // @public (undocumented)
143
+ export const blockCardContentHeaderNameClassName = "block-card-content-header-name";
144
+
145
+ // @public (undocumented)
146
+ export const blockCardErroredViewClassName = "block-card-errored-view";
147
+
148
+ // @public (undocumented)
149
+ export const blockCardForbiddenViewClassName = "block-card-forbidden-view";
150
+
151
+ // @public (undocumented)
152
+ export const blockCardForbiddenViewLinkClassName = "block-card-forbidden-view-link";
153
+
154
+ // @public (undocumented)
155
+ export const blockCardIconImageClassName = "block-card-icon-image";
156
+
157
+ // @public (undocumented)
158
+ export const blockCardNotFoundViewClassName = "block-card-not-found-view";
159
+
160
+ // @public (undocumented)
161
+ export const blockCardResolvedViewByClassName = "block-card-resolved-view-by";
162
+
163
+ // @public (undocumented)
164
+ export const blockCardResolvedViewClassName = "block-card-resolved-view";
165
+
166
+ // @public (undocumented)
167
+ export const blockCardResolvingViewClassName = "block-card-resolving-view";
168
+
169
+ // @public (undocumented)
170
+ type BlockProps = {
171
+ direction?: SmartLinkDirection;
172
+ overrideCss?: SerializedStyles;
173
+ size?: SmartLinkSize;
174
+ status?: SmartLinkStatus;
175
+ testId?: string;
176
+ blockRef?: Ref<HTMLDivElement>;
177
+ onRender?: () => void;
178
+ onTransitionEnd?: () => void;
179
+ };
180
+
181
+ // @public (undocumented)
182
+ export const Card: React_2.ForwardRefExoticComponent<Pick<Omit<React_2.PropsWithChildren<WithIntlProps<CardProps & WrappedComponentProps<"intl">>>, keyof WithAnalyticsEventsProps> & React_2.RefAttributes<any> & WithContextProps, "analyticsContext" | "analyticsEvents" | "appearance" | "children" | "container" | "data" | "embedIframeRef" | "embedIframeUrlType" | "forwardedRef" | "frameStyle" | "id" | "importer" | "inheritDimensions" | "inlinePreloaderStyle" | "isFrameVisible" | "isSelected" | "key" | "onClick" | "onError" | "onResolve" | "placeholder" | "platform" | "showActions" | "showAuthTooltip" | "showHoverPreview" | "showServerActions" | "testId" | "ui" | "url"> & React_2.RefAttributes<any>>;
183
+
184
+ export { CardAdf }
185
+
186
+ export { CardAppearance }
187
+
188
+ export { CardContext }
189
+
190
+ // @public (undocumented)
191
+ type CardInnerAppearance = 'embedPreview' | 'flexible' | 'hoverCardPreview' | CardAppearance;
192
+
193
+ export { CardPlatform }
194
+
195
+ // @public (undocumented)
196
+ export interface CardProps extends WithAnalyticsEventsProps {
197
+ // @deprecated (undocumented)
198
+ analyticsEvents?: AnalyticsFacade;
199
+ // (undocumented)
200
+ appearance: CardAppearance;
201
+ // (undocumented)
202
+ children?: React.ReactNode;
203
+ // (undocumented)
204
+ container?: HTMLElement;
205
+ // (undocumented)
206
+ data?: any;
207
+ // (undocumented)
208
+ embedIframeRef?: React.Ref<HTMLIFrameElement>;
209
+ // (undocumented)
210
+ embedIframeUrlType?: EmbedIframeUrlType;
211
+ frameStyle?: FrameStyle;
212
+ // (undocumented)
213
+ id?: string;
214
+ // (undocumented)
215
+ importer?: (target: any) => void;
216
+ inheritDimensions?: boolean;
217
+ // (undocumented)
218
+ inlinePreloaderStyle?: InlinePreloaderStyle;
219
+ // @deprecated (undocumented)
220
+ isFrameVisible?: boolean;
221
+ // (undocumented)
222
+ isSelected?: boolean;
223
+ // (undocumented)
224
+ onClick?: React.EventHandler<React.KeyboardEvent | React.MouseEvent>;
225
+ // (undocumented)
226
+ onError?: OnErrorCallback;
227
+ // (undocumented)
228
+ onResolve?: OnResolveCallback;
229
+ // (undocumented)
230
+ placeholder?: string;
231
+ // (undocumented)
232
+ platform?: CardPlatform;
233
+ showActions?: boolean;
234
+ // (undocumented)
235
+ showAuthTooltip?: boolean;
236
+ // (undocumented)
237
+ showHoverPreview?: boolean;
238
+ showServerActions?: boolean;
239
+ // (undocumented)
240
+ testId?: string;
241
+ // (undocumented)
242
+ ui?: FlexibleUiOptions;
243
+ // (undocumented)
244
+ url?: string;
245
+ }
246
+
247
+ export { CardType }
248
+
249
+ // @public
250
+ type ChecklistProgress = {
251
+ name: ElementName.ChecklistProgress;
252
+ };
253
+
254
+ export { Client }
255
+
256
+ // @public
257
+ type CollaboratorGroup = {
258
+ name: ElementName.CollaboratorGroup;
259
+ };
260
+
261
+ // @public
262
+ type CommentCount = {
263
+ name: ElementName.CommentCount;
264
+ };
265
+
266
+ // @public (undocumented)
267
+ interface CommonEventProps {
268
+ // (undocumented)
269
+ definitionId?: string;
270
+ // (undocumented)
271
+ destinatinoObjectType?: string;
272
+ // (undocumented)
273
+ destinationProduct?: DestinationProduct | string;
274
+ // (undocumented)
275
+ destinationSubproduct?: DestinationSubproduct | string;
276
+ // (undocumented)
277
+ extensionKey?: string;
278
+ // (undocumented)
279
+ id?: string;
280
+ // (undocumented)
281
+ location?: string;
282
+ // (undocumented)
283
+ resourceType?: string;
284
+ }
285
+
286
+ // @public (undocumented)
287
+ type ConnectFailedEventProps = CommonEventProps & {
288
+ id?: string;
289
+ reason?: string;
290
+ };
291
+
292
+ // @public (undocumented)
293
+ type ConnectSucceededEventProps = CommonEventProps & {
294
+ id?: string;
295
+ };
296
+
297
+ // @public (undocumented)
298
+ export const contentFooterClassName = "smart-link-content-footer";
299
+
300
+ // @public
301
+ type CreatedBy = {
302
+ name: ElementName.CreatedBy;
303
+ };
304
+
305
+ // @public
306
+ type CreatedOn = {
307
+ name: ElementName.CreatedOn;
308
+ text?: string;
309
+ };
310
+
311
+ // @public
312
+ type CustomActionItem = BaseActionItem & {
313
+ name: ActionName.CustomAction;
314
+ } & (((Required<Pick<ActionProps, 'content'>> & Pick<ActionProps, 'icon' | 'iconPosition'>) & Pick<ActionProps, 'tooltipMessage'>) | (Required<Pick<ActionProps, 'icon' | 'iconPosition'>> & Pick<ActionProps, 'content'>));
315
+
316
+ // @public (undocumented)
317
+ type DestinationProduct = 'bitbucket' | 'confluence' | 'jira' | 'trello';
318
+
319
+ // @public (undocumented)
320
+ type DestinationSubproduct = 'core' | 'servicedesk' | 'software';
321
+
322
+ // @public
323
+ type DueOn = {
324
+ name: ElementName.DueOn;
325
+ };
326
+
327
+ export { EditorCardProvider }
328
+
329
+ export { editorCardProvider }
330
+
331
+ // @public
332
+ export type ElementItem = {
333
+ overrideCss?: SerializedStyles;
334
+ size?: SmartLinkSize;
335
+ testId?: string;
336
+ } & ElementItemProps;
337
+
338
+ // @public
339
+ type ElementItemProps = AttachmentCount | AuthorGroup | ChecklistProgress | CollaboratorGroup | CommentCount | CreatedBy | CreatedOn | DueOn | LatestCommit | LinkIcon | Location_2 | ModifiedBy | ModifiedOn | OwnedBy | Preview | Priority | ProgrammingLanguage | Provider_2 | ReactCount | Snippet | SourceBranch | State_2 | SubscriberCount | TargetBranch | Title | ViewCount | VoteCount;
340
+
341
+ // @public
342
+ export enum ElementName {
343
+ // (undocumented)
344
+ AttachmentCount = "AttachmentCount",
345
+ // (undocumented)
346
+ AuthorGroup = "AuthorGroup",
347
+ // (undocumented)
348
+ ChecklistProgress = "ChecklistProgress",
349
+ // (undocumented)
350
+ CollaboratorGroup = "CollaboratorGroup",
351
+ // (undocumented)
352
+ CommentCount = "CommentCount",
353
+ // (undocumented)
354
+ CreatedBy = "CreatedBy",
355
+ // (undocumented)
356
+ CreatedOn = "CreatedOn",
357
+ // (undocumented)
358
+ DueOn = "DueOn",
359
+ // (undocumented)
360
+ LatestCommit = "LatestCommit",
361
+ // (undocumented)
362
+ LinkIcon = "LinkIcon",
363
+ // (undocumented)
364
+ Location = "Location",
365
+ // (undocumented)
366
+ ModifiedBy = "ModifiedBy",
367
+ // (undocumented)
368
+ ModifiedOn = "ModifiedOn",
369
+ // (undocumented)
370
+ OwnedBy = "OwnedBy",
371
+ // (undocumented)
372
+ Preview = "Preview",
373
+ // (undocumented)
374
+ Priority = "Priority",
375
+ // (undocumented)
376
+ ProgrammingLanguage = "ProgrammingLanguage",
377
+ // (undocumented)
378
+ Provider = "Provider",
379
+ // (undocumented)
380
+ ReactCount = "ReactCount",
381
+ // (undocumented)
382
+ Snippet = "Snippet",
383
+ // (undocumented)
384
+ SourceBranch = "SourceBranch",
385
+ // (undocumented)
386
+ State = "State",
387
+ // (undocumented)
388
+ SubscriberCount = "SubscriberCount",
389
+ // (undocumented)
390
+ TargetBranch = "TargetBranch",
391
+ // (undocumented)
392
+ Title = "Title",
393
+ // (undocumented)
394
+ ViewCount = "ViewCount",
395
+ // (undocumented)
396
+ VoteCount = "VoteCount"
397
+ }
398
+
399
+ export { EmbedCardAdf }
400
+
401
+ // @public (undocumented)
402
+ export const embedHeaderHeight = 32;
403
+
404
+ // @public (undocumented)
405
+ type EmbedIframeUrlType = 'href' | 'interactiveHref';
406
+
407
+ // @public (undocumented)
408
+ export class EmbedResizeMessageListener extends React_2.Component<Props, State> {
409
+ // (undocumented)
410
+ componentDidMount(): void;
411
+ // (undocumented)
412
+ componentWillUnmount(): void;
413
+ // (undocumented)
414
+ render(): React_2.ReactNode;
415
+ }
416
+
417
+ // @public (undocumented)
418
+ type ErrorCardType = 'errored' | 'fallback' | 'forbidden' | 'not_found' | 'unauthorized';
419
+
420
+ // @public (undocumented)
421
+ type FlexibleUiOptions = {
422
+ clickableContainer?: boolean;
423
+ hideElevation?: boolean;
424
+ hideHoverCardPreviewButton?: boolean;
425
+ hidePadding?: boolean;
426
+ hideBackground?: boolean;
427
+ size?: SmartLinkSize;
428
+ theme?: SmartLinkTheme;
429
+ zIndex?: number;
430
+ };
431
+
432
+ // @public
433
+ export const FooterBlock: React_2.FC<FooterBlockProps>;
434
+
435
+ // @public (undocumented)
436
+ type FooterBlockProps = {
437
+ actions?: ActionItem[];
438
+ onActionMenuOpenChange?: (options: OnActionMenuOpenChangeOptions) => void;
439
+ } & BlockProps;
440
+
441
+ // @public (undocumented)
442
+ type FrameStyle = 'hide' | 'show' | 'showOnHover';
443
+
444
+ export { InlineCardAdf }
445
+
446
+ // @public (undocumented)
447
+ type InlinePreloaderStyle = 'on-left-with-skeleton' | 'on-right-without-skeleton';
448
+
449
+ // @public (undocumented)
450
+ type InstrumentEventProps = CommonEventProps & {
451
+ error?: APIError;
452
+ status: CardType;
453
+ id: string;
454
+ };
455
+
456
+ // @public (undocumented)
457
+ type InvokeFailedEventProps = CommonEventProps & {
458
+ id: string;
459
+ actionType: string;
460
+ display: CardInnerAppearance;
461
+ reason: string;
462
+ };
463
+
464
+ // @public (undocumented)
465
+ type InvokeSucceededEventProps = CommonEventProps & {
466
+ id: string;
467
+ actionType: string;
468
+ display: CardInnerAppearance;
469
+ };
470
+
471
+ // @public (undocumented)
472
+ type InvokeType = 'client' | 'server';
473
+
474
+ // @public
475
+ type LatestCommit = {
476
+ name: ElementName.LatestCommit;
477
+ };
478
+
479
+ // @public
480
+ type LinkIcon = {
481
+ name: ElementName.LinkIcon;
482
+ };
483
+
484
+ // @public (undocumented)
485
+ export const loadingPlaceholderClassName = "smart-link-loading-placeholder";
486
+
487
+ // @public
488
+ type Location_2 = {
489
+ name: ElementName.Location;
490
+ };
491
+
492
+ // @public (undocumented)
493
+ export enum MediaPlacement {
494
+ // (undocumented)
495
+ Left = "left",
496
+ // (undocumented)
497
+ Right = "right"
498
+ }
499
+
500
+ // @public
501
+ export const MetadataBlock: React_2.FC<MetadataBlockProps>;
502
+
503
+ // @public (undocumented)
504
+ type MetadataBlockProps = {
505
+ maxLines?: number;
506
+ primary?: ElementItem[];
507
+ secondary?: ElementItem[];
508
+ } & BlockProps;
509
+
510
+ // @public (undocumented)
511
+ export const metadataListClassName = "smart-link-metadata-list";
512
+
513
+ // @public
514
+ type ModifiedBy = {
515
+ name: ElementName.ModifiedBy;
516
+ };
517
+
518
+ // @public
519
+ type ModifiedOn = {
520
+ name: ElementName.ModifiedOn;
521
+ text?: string;
522
+ };
523
+
524
+ // @public
525
+ type NamedActionItem = BaseActionItem & {
526
+ name: ActionName.DeleteAction | ActionName.EditAction;
527
+ };
528
+
529
+ // @public
530
+ type NamedDataActionItem = BaseDataActionItem & {
531
+ name: ActionName.DownloadAction | ActionName.PreviewAction | ActionName.ViewAction;
532
+ };
533
+
534
+ // @public (undocumented)
535
+ export type OnActionMenuOpenChangeOptions = {
536
+ isOpen: boolean;
537
+ };
538
+
539
+ // @public (undocumented)
540
+ type OnErrorCallback = (data: {
541
+ status: Extract<CardType, ErrorCardType>;
542
+ url: string;
543
+ }) => void;
544
+
545
+ // @public (undocumented)
546
+ type OnResolveCallback = (data: {
547
+ url?: string;
548
+ title?: string;
549
+ aspectRatio?: number;
550
+ }) => void;
551
+
552
+ // @public
553
+ type OwnedBy = {
554
+ name: ElementName.OwnedBy;
555
+ };
556
+
557
+ // @public
558
+ type Preview = {
559
+ name: ElementName.Preview;
560
+ };
561
+
562
+ // @public
563
+ export const PreviewBlock: React_2.FC<PreviewBlockProps>;
564
+
565
+ // @public (undocumented)
566
+ type PreviewBlockProps = {
567
+ ignoreContainerPadding?: boolean;
568
+ onError?: () => void;
569
+ placement?: MediaPlacement;
570
+ } & BlockProps;
571
+
572
+ // @public (undocumented)
573
+ type PreviewDisplay = 'card' | 'embed';
574
+
575
+ // @public (undocumented)
576
+ type PreviewInvokeMethod = 'keyboard' | 'mouse_click' | 'mouse_hover';
577
+
578
+ // @public
579
+ type Priority = {
580
+ name: ElementName.Priority;
581
+ };
582
+
583
+ // @public
584
+ type ProgrammingLanguage = {
585
+ name: ElementName.ProgrammingLanguage;
586
+ };
587
+
588
+ // @public (undocumented)
589
+ interface Props {
590
+ // (undocumented)
591
+ embedIframeRef: React_2.RefObject<HTMLIFrameElement>;
592
+ // (undocumented)
593
+ onHeightUpdate: (height: number) => void;
594
+ }
595
+
596
+ export { Provider }
597
+
598
+ // @public
599
+ type Provider_2 = {
600
+ name: ElementName.Provider;
601
+ };
602
+
603
+ export { ProviderProps }
604
+
605
+ // @public
606
+ type ReactCount = {
607
+ name: ElementName.ReactCount;
608
+ };
609
+
610
+ // @public (undocumented)
611
+ export type ResolveResponse = JsonLd.Response;
612
+
613
+ // @public
614
+ type RetryOptions = {
615
+ descriptor?: MessageDescriptor;
616
+ onClick?: ((e: React.MouseEvent<HTMLElement>) => void) | undefined;
617
+ values?: Record<string, string>;
618
+ };
619
+
620
+ // @public (undocumented)
621
+ type ScreenAuthPopupEventProps = CommonEventProps;
622
+
623
+ export { SmartCardContext as Context }
624
+ export { SmartCardContext }
625
+
626
+ // @public
627
+ export enum SmartLinkDirection {
628
+ // (undocumented)
629
+ Horizontal = "horizontal",
630
+ // (undocumented)
631
+ Vertical = "vertical"
632
+ }
633
+
634
+ // @public (undocumented)
635
+ export class SmartLinkEvents {
636
+ // (undocumented)
637
+ insertSmartLink(url: string, type: CardInnerAppearance, createAnalyticsEvent?: CreateUIAnalyticsEvent): void;
638
+ }
639
+
640
+ // @public
641
+ export enum SmartLinkPosition {
642
+ // (undocumented)
643
+ Center = "center",
644
+ // (undocumented)
645
+ Top = "top"
646
+ }
647
+
648
+ // @public
649
+ export enum SmartLinkSize {
650
+ // (undocumented)
651
+ Large = "large",
652
+ // (undocumented)
653
+ Medium = "medium",
654
+ // (undocumented)
655
+ Small = "small",
656
+ // (undocumented)
657
+ XLarge = "xlarge"
658
+ }
659
+
660
+ // @public
661
+ enum SmartLinkStatus {
662
+ // (undocumented)
663
+ Errored = "errored",
664
+ // (undocumented)
665
+ Fallback = "fallback",
666
+ // (undocumented)
667
+ Forbidden = "forbidden",
668
+ // (undocumented)
669
+ NotFound = "not_found",
670
+ // (undocumented)
671
+ Pending = "pending",
672
+ // (undocumented)
673
+ Resolved = "resolved",
674
+ // (undocumented)
675
+ Resolving = "resolving",
676
+ // (undocumented)
677
+ Unauthorized = "unauthorized"
678
+ }
679
+
680
+ // @public
681
+ export enum SmartLinkTheme {
682
+ // (undocumented)
683
+ Black = "black",
684
+ // (undocumented)
685
+ Link = "link"
686
+ }
687
+
688
+ // @public
689
+ type Snippet = {
690
+ name: ElementName.Snippet;
691
+ };
692
+
693
+ // @public
694
+ export const SnippetBlock: React_2.FC<SnippetBlockProps>;
695
+
696
+ // @public (undocumented)
697
+ type SnippetBlockProps = {
698
+ maxLines?: number;
699
+ } & BlockProps;
700
+
701
+ // @public
702
+ type SourceBranch = {
703
+ name: ElementName.SourceBranch;
704
+ };
705
+
706
+ // @public (undocumented)
707
+ interface State {
708
+ }
709
+
710
+ // @public
711
+ type State_2 = {
712
+ name: ElementName.State;
713
+ };
714
+
715
+ // @public
716
+ type SubscriberCount = {
717
+ name: ElementName.SubscriberCount;
718
+ };
719
+
720
+ // @public
721
+ type TargetBranch = {
722
+ name: ElementName.TargetBranch;
723
+ };
724
+
725
+ // @public
726
+ type Title = {
727
+ name: ElementName.Title;
728
+ };
729
+
730
+ // @public
731
+ export const TitleBlock: React_2.FC<TitleBlockProps>;
732
+
733
+ // @public (undocumented)
734
+ type TitleBlockProps = {
735
+ actions?: ActionItem[];
736
+ anchorTarget?: AnchorTarget;
737
+ hideTitleTooltip?: boolean;
738
+ maxLines?: number;
739
+ metadata?: ElementItem[];
740
+ onActionMenuOpenChange?: (options: OnActionMenuOpenChangeOptions) => void;
741
+ position?: SmartLinkPosition;
742
+ onClick?: React_2.EventHandler<React_2.KeyboardEvent | React_2.MouseEvent>;
743
+ retry?: RetryOptions;
744
+ hideRetry?: boolean;
745
+ showActionOnHover?: boolean;
746
+ subtitle?: ElementItem[];
747
+ text?: string;
748
+ theme?: SmartLinkTheme;
749
+ } & BlockProps;
750
+
751
+ // @public (undocumented)
752
+ type TrackAppAccountConnectedProps = CommonEventProps;
753
+
754
+ // @public (undocumented)
755
+ enum TrackQuickActionFailureReason {
756
+ // (undocumented)
757
+ PermissionError = "PermissionError",
758
+ // (undocumented)
759
+ UnknownError = "UnknownError",
760
+ // (undocumented)
761
+ ValidationError = "ValidationError"
762
+ }
763
+
764
+ // @public (undocumented)
765
+ enum TrackQuickActionType {
766
+ // (undocumented)
767
+ StatusUpdate = "StatusUpdate"
768
+ }
769
+
770
+ // @public (undocumented)
771
+ type UiActionClickedEventProps = CommonEventProps & {
772
+ id: string;
773
+ display: CardInnerAppearance;
774
+ actionType: string;
775
+ invokeType?: InvokeType;
776
+ };
777
+
778
+ // @public (undocumented)
779
+ type UiAuthAlternateAccountEventProps = CommonEventProps & {
780
+ display: CardInnerAppearance;
781
+ };
782
+
783
+ // @public (undocumented)
784
+ type UiAuthEventProps = CommonEventProps & {
785
+ display: CardInnerAppearance;
786
+ };
787
+
788
+ // @public (undocumented)
789
+ type UiCardClickedEventProps = CommonEventProps & {
790
+ id: string;
791
+ display: CardInnerAppearance;
792
+ status: CardType;
793
+ isModifierKeyPressed?: boolean;
794
+ actionSubjectId?: string;
795
+ };
796
+
797
+ // @public (undocumented)
798
+ type UiClosedAuthEventProps = CommonEventProps & {
799
+ display: CardInnerAppearance;
800
+ };
801
+
802
+ // @public (undocumented)
803
+ type UiHoverCardDismissedEventProps = CommonEventProps & {
804
+ previewDisplay: PreviewDisplay;
805
+ hoverTime: number;
806
+ previewInvokeMethod?: PreviewInvokeMethod;
807
+ status: CardType;
808
+ };
809
+
810
+ // @public (undocumented)
811
+ type UiHoverCardOpenLinkClickedEventProps = CommonEventProps & {
812
+ previewDisplay: PreviewDisplay;
813
+ previewInvokeMethod?: PreviewInvokeMethod;
814
+ };
815
+
816
+ // @public (undocumented)
817
+ type UiHoverCardViewedEventProps = CommonEventProps & {
818
+ previewDisplay: PreviewDisplay;
819
+ previewInvokeMethod?: PreviewInvokeMethod;
820
+ status: CardType;
821
+ };
822
+
823
+ // @public (undocumented)
824
+ type UiIframeDwelledEventProps = CommonEventProps & {
825
+ id: string;
826
+ display: CardInnerAppearance;
827
+ status: CardType;
828
+ dwellTime: number;
829
+ dwellPercentVisible: number;
830
+ };
831
+
832
+ // @public (undocumented)
833
+ type UiIframeFocusedEventProps = CommonEventProps & {
834
+ id: string;
835
+ display: CardInnerAppearance;
836
+ status: CardType;
837
+ };
838
+
839
+ // @public (undocumented)
840
+ type UiRenderFailedEventProps = CommonEventProps & {
841
+ display: CardInnerAppearance;
842
+ error: Error;
843
+ errorInfo: ErrorInfo;
844
+ };
845
+
846
+ // @public (undocumented)
847
+ type UiRenderSuccessEventProps = CommonEventProps & {
848
+ display: CardInnerAppearance;
849
+ status: CardType;
850
+ };
851
+
852
+ // @public @deprecated
853
+ export const useSmartLinkAnalytics: (url: string, _dispatchAnalytics?: AnalyticsHandler, id?: string, defaultLocation?: string) => {
854
+ ui: {
855
+ authEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthEventProps) => void;
856
+ authAlternateAccountEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiAuthAlternateAccountEventProps) => void;
857
+ buttonClickedEvent: (data: Partial<AnalyticsPayload> & {
858
+ actionSubjectId: Required<string>;
859
+ }) => void;
860
+ cardClickedEvent: ({ id, display, status, definitionId, extensionKey, isModifierKeyPressed, location, destinationProduct, destinationSubproduct, actionSubjectId, }: UiCardClickedEventProps) => void;
861
+ iframeDwelledEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, dwellTime, dwellPercentVisible, }: UiIframeDwelledEventProps) => void;
862
+ iframeFocusedEvent: ({ id, display, status, definitionId, extensionKey, location, destinationProduct, destinationSubproduct, }: UiIframeFocusedEventProps) => void;
863
+ actionClickedEvent: ({ id, actionType, display, invokeType, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiActionClickedEventProps) => void;
864
+ hoverCardOpenLinkClickedEvent: ({ previewDisplay, definitionId, extensionKey, destinationProduct, destinationSubproduct, location, previewInvokeMethod, }: UiHoverCardOpenLinkClickedEventProps) => void;
865
+ closedAuthEvent: ({ display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiClosedAuthEventProps) => void;
866
+ modalClosedEvent: (data: Partial<AnalyticsPayload> & {
867
+ actionSubjectId: Required<string>;
868
+ }) => void;
869
+ renderSuccessEvent: ({ display, status, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderSuccessEventProps) => void;
870
+ renderFailedEvent: ({ display, id, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => void;
871
+ hoverCardViewedEvent: ({ previewDisplay, previewInvokeMethod, id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardViewedEventProps) => void;
872
+ hoverCardDismissedEvent: ({ id, previewDisplay, hoverTime, previewInvokeMethod, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, status, }: UiHoverCardDismissedEventProps) => void;
873
+ learnMoreClickedEvent: () => void;
874
+ smartLinkLozengeActionClickedEvent: () => void;
875
+ smartLinkLozengeActionListItemClickedEvent: () => void;
876
+ smartLinkLozengeActionErrorOpenPreviewClickedEvent: () => void;
877
+ };
878
+ operational: {
879
+ invokeSucceededEvent: ({ id, actionType, display, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeSucceededEventProps) => void;
880
+ invokeFailedEvent: ({ id, actionType, display, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: InvokeFailedEventProps) => void;
881
+ connectSucceededEvent: ({ id, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectSucceededEventProps) => void;
882
+ connectFailedEvent: ({ id, reason, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ConnectFailedEventProps) => void;
883
+ instrument: ({ id, status, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, error, }: InstrumentEventProps) => void;
884
+ chunkloadFailedEvent: ({ display, error, errorInfo, extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: UiRenderFailedEventProps) => void;
885
+ };
886
+ track: {
887
+ appAccountConnected: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: TrackAppAccountConnectedProps) => void;
888
+ appAccountAuthStarted: ({ extensionKey, location, }: TrackAppAccountConnectedProps) => void;
889
+ linkUpdated: (props: CommonEventProps & {
890
+ [key: string]: any;
891
+ }) => void;
892
+ smartLinkQuickActionStarted: (props: {
893
+ smartLinkActionType: SmartLinkActionType | TrackQuickActionType;
894
+ }) => void;
895
+ smartLinkQuickActionSuccess: (props: {
896
+ smartLinkActionType: SmartLinkActionType | TrackQuickActionType;
897
+ }) => void;
898
+ smartLinkQuickActionFailed: (props: {
899
+ smartLinkActionType: SmartLinkActionType | TrackQuickActionType;
900
+ reason?: TrackQuickActionFailureReason;
901
+ step?: string;
902
+ }) => void;
903
+ };
904
+ screen: {
905
+ authPopupEvent: ({ extensionKey, definitionId, resourceType, destinationProduct, destinationSubproduct, location, }: ScreenAuthPopupEventProps) => void;
906
+ modalViewedEvent: (data: Partial<AnalyticsPayload> & {
907
+ name: Extract<AnalyticsName, 'embedPreviewModal'>;
908
+ }) => void;
909
+ };
910
+ };
911
+
912
+ // @public (undocumented)
913
+ export function useSmartLinkEvents(): SmartLinkEvents;
914
+
915
+ // @public
916
+ type ViewCount = {
917
+ name: ElementName.ViewCount;
918
+ };
919
+
920
+ // @public
921
+ type VoteCount = {
922
+ name: ElementName.VoteCount;
923
+ };
924
+
925
+ // (No @packageDocumentation comment for this package)
926
+
927
+ ```