@atlaskit/smart-card 36.9.0 → 36.10.1

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 (126) hide show
  1. package/CHANGELOG.md +24 -0
  2. package/dist/cjs/extractors/common/context/index.js +41 -1
  3. package/dist/cjs/extractors/common/icon/extractIconFromDocument.js +7 -61
  4. package/dist/cjs/extractors/embed/index.js +3 -35
  5. package/dist/cjs/extractors/flexible/extract-preview.js +24 -2
  6. package/dist/cjs/extractors/flexible/icon/extract-provider-icon.js +40 -2
  7. package/dist/cjs/extractors/flexible/icon/index.js +15 -1
  8. package/dist/cjs/extractors/flexible/index.js +77 -3
  9. package/dist/cjs/extractors/inline/index.js +5 -1
  10. package/dist/cjs/utils/analytics/analytics.js +1 -1
  11. package/dist/cjs/utils/index.js +2 -256
  12. package/dist/cjs/utils/mocks.js +12 -2
  13. package/dist/cjs/view/BlockCard/views/ErroredView.js +1 -12
  14. package/dist/cjs/view/BlockCard/views/ForbiddenView.js +2 -11
  15. package/dist/cjs/view/BlockCard/views/NotFoundView.js +5 -15
  16. package/dist/cjs/view/BlockCard/views/UnauthorisedView.js +3 -3
  17. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -5
  18. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.js +12 -36
  19. package/dist/cjs/view/FlexibleCard/components/common/image-icon/index.js +4 -17
  20. package/dist/cjs/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -10
  21. package/dist/cjs/view/FlexibleCard/utils.js +21 -10
  22. package/dist/cjs/view/HoverCard/components/ImagePreview.js +16 -3
  23. package/dist/cjs/view/HoverCard/components/views/forbidden/index.js +2 -2
  24. package/dist/cjs/view/HoverCard/components/views/resolved/index.js +2 -2
  25. package/dist/cjs/view/HoverCard/components/views/resolving/index.js +5 -18
  26. package/dist/cjs/view/HoverCard/components/views/unauthorised/index.js +2 -2
  27. package/dist/cjs/view/InlineCard/ErroredView/index.js +5 -15
  28. package/dist/cjs/view/InlineCard/ForbiddenView/index.js +1 -7
  29. package/dist/cjs/view/InlineCard/Icon.compiled.css +0 -1
  30. package/dist/cjs/view/InlineCard/Icon.js +4 -24
  31. package/dist/cjs/view/InlineCard/UnauthorisedView/index.js +7 -15
  32. package/dist/cjs/view/LinkUrl/index.js +1 -1
  33. package/dist/es2019/extractors/common/context/index.js +36 -1
  34. package/dist/es2019/extractors/common/icon/extractIconFromDocument.js +6 -61
  35. package/dist/es2019/extractors/embed/index.js +2 -35
  36. package/dist/es2019/extractors/flexible/extract-preview.js +25 -2
  37. package/dist/es2019/extractors/flexible/icon/extract-provider-icon.js +42 -2
  38. package/dist/es2019/extractors/flexible/icon/index.js +14 -0
  39. package/dist/es2019/extractors/flexible/index.js +75 -5
  40. package/dist/es2019/extractors/inline/index.js +5 -1
  41. package/dist/es2019/utils/analytics/analytics.js +1 -1
  42. package/dist/es2019/utils/index.js +2 -56
  43. package/dist/es2019/utils/mocks.js +13 -2
  44. package/dist/es2019/view/BlockCard/views/ErroredView.js +1 -12
  45. package/dist/es2019/view/BlockCard/views/ForbiddenView.js +3 -12
  46. package/dist/es2019/view/BlockCard/views/NotFoundView.js +8 -16
  47. package/dist/es2019/view/BlockCard/views/UnauthorisedView.js +4 -4
  48. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolved/index.js +4 -6
  49. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.js +11 -33
  50. package/dist/es2019/view/FlexibleCard/components/common/image-icon/index.js +5 -18
  51. package/dist/es2019/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -10
  52. package/dist/es2019/view/FlexibleCard/utils.js +19 -11
  53. package/dist/es2019/view/HoverCard/components/ImagePreview.js +16 -3
  54. package/dist/es2019/view/HoverCard/components/views/forbidden/index.js +3 -3
  55. package/dist/es2019/view/HoverCard/components/views/resolved/index.js +2 -2
  56. package/dist/es2019/view/HoverCard/components/views/resolving/index.js +5 -18
  57. package/dist/es2019/view/HoverCard/components/views/unauthorised/index.js +3 -3
  58. package/dist/es2019/view/InlineCard/ErroredView/index.js +5 -15
  59. package/dist/es2019/view/InlineCard/ForbiddenView/index.js +2 -8
  60. package/dist/es2019/view/InlineCard/Icon.compiled.css +0 -1
  61. package/dist/es2019/view/InlineCard/Icon.js +0 -19
  62. package/dist/es2019/view/InlineCard/UnauthorisedView/index.js +8 -16
  63. package/dist/es2019/view/LinkUrl/index.js +1 -1
  64. package/dist/esm/extractors/common/context/index.js +38 -1
  65. package/dist/esm/extractors/common/icon/extractIconFromDocument.js +6 -61
  66. package/dist/esm/extractors/embed/index.js +2 -34
  67. package/dist/esm/extractors/flexible/extract-preview.js +25 -2
  68. package/dist/esm/extractors/flexible/icon/extract-provider-icon.js +41 -2
  69. package/dist/esm/extractors/flexible/icon/index.js +14 -0
  70. package/dist/esm/extractors/flexible/index.js +76 -5
  71. package/dist/esm/extractors/inline/index.js +5 -1
  72. package/dist/esm/utils/analytics/analytics.js +1 -1
  73. package/dist/esm/utils/index.js +2 -156
  74. package/dist/esm/utils/mocks.js +12 -2
  75. package/dist/esm/view/BlockCard/views/ErroredView.js +1 -12
  76. package/dist/esm/view/BlockCard/views/ForbiddenView.js +3 -12
  77. package/dist/esm/view/BlockCard/views/NotFoundView.js +6 -16
  78. package/dist/esm/view/BlockCard/views/UnauthorisedView.js +4 -4
  79. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolved/index.js +3 -5
  80. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.js +11 -33
  81. package/dist/esm/view/FlexibleCard/components/common/image-icon/index.js +5 -18
  82. package/dist/esm/view/FlexibleCard/components/common/loading-skeleton/index.js +2 -10
  83. package/dist/esm/view/FlexibleCard/utils.js +19 -11
  84. package/dist/esm/view/HoverCard/components/ImagePreview.js +16 -3
  85. package/dist/esm/view/HoverCard/components/views/forbidden/index.js +3 -3
  86. package/dist/esm/view/HoverCard/components/views/resolved/index.js +2 -2
  87. package/dist/esm/view/HoverCard/components/views/resolving/index.js +5 -18
  88. package/dist/esm/view/HoverCard/components/views/unauthorised/index.js +3 -3
  89. package/dist/esm/view/InlineCard/ErroredView/index.js +5 -15
  90. package/dist/esm/view/InlineCard/ForbiddenView/index.js +2 -8
  91. package/dist/esm/view/InlineCard/Icon.compiled.css +0 -1
  92. package/dist/esm/view/InlineCard/Icon.js +3 -23
  93. package/dist/esm/view/InlineCard/UnauthorisedView/index.js +8 -16
  94. package/dist/esm/view/LinkUrl/index.js +1 -1
  95. package/dist/types/__fixtures__/figma-entity.d.ts +58 -0
  96. package/dist/types/extractors/common/context/index.d.ts +8 -0
  97. package/dist/types/extractors/flexible/extract-preview.d.ts +5 -0
  98. package/dist/types/extractors/flexible/icon/extract-provider-icon.d.ts +5 -0
  99. package/dist/types/extractors/flexible/icon/index.d.ts +13 -0
  100. package/dist/types/extractors/flexible/index.d.ts +1 -1
  101. package/dist/types/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +2 -6
  102. package/dist/types/view/FlexibleCard/components/common/loading-skeleton/index.d.ts +2 -4
  103. package/dist/types/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +1 -17
  104. package/dist/types/view/FlexibleCard/types.d.ts +2 -2
  105. package/dist/types/view/FlexibleCard/utils.d.ts +2 -2
  106. package/dist/types/view/HoverCard/components/ImagePreview.d.ts +1 -1
  107. package/dist/types/view/HoverCard/types.d.ts +2 -2
  108. package/dist/types/view/InlineCard/Icon.d.ts +0 -1
  109. package/dist/types-ts4.5/__fixtures__/figma-entity.d.ts +58 -0
  110. package/dist/types-ts4.5/extractors/common/context/index.d.ts +8 -0
  111. package/dist/types-ts4.5/extractors/flexible/extract-preview.d.ts +5 -0
  112. package/dist/types-ts4.5/extractors/flexible/icon/extract-provider-icon.d.ts +5 -0
  113. package/dist/types-ts4.5/extractors/flexible/icon/index.d.ts +13 -0
  114. package/dist/types-ts4.5/extractors/flexible/index.d.ts +1 -1
  115. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/title-block/resolving/index.d.ts +2 -6
  116. package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/index.d.ts +2 -4
  117. package/dist/types-ts4.5/view/FlexibleCard/components/common/loading-skeleton/types.d.ts +1 -17
  118. package/dist/types-ts4.5/view/FlexibleCard/types.d.ts +2 -2
  119. package/dist/types-ts4.5/view/FlexibleCard/utils.d.ts +2 -2
  120. package/dist/types-ts4.5/view/HoverCard/components/ImagePreview.d.ts +1 -1
  121. package/dist/types-ts4.5/view/HoverCard/types.d.ts +2 -2
  122. package/dist/types-ts4.5/view/InlineCard/Icon.d.ts +0 -1
  123. package/package.json +8 -8
  124. package/dist/cjs/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +0 -55
  125. package/dist/es2019/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +0 -55
  126. package/dist/esm/view/FlexibleCard/components/blocks/title-block/resolving/index.compiled.css +0 -55
@@ -1,20 +1,4 @@
1
- export type LoadingSkeletonPropsOld = {
2
- /**
3
- * A `testId` prop is provided for specified elements, which is a unique
4
- * string that appears as a data attribute `data-testid` in the rendered
5
- * code, serving as a hook for automated tests
6
- */
7
- testId?: string;
8
- /**
9
- * Width of the loading skeleton, defaults to width of the parent element
10
- */
11
- width?: number;
12
- /**
13
- * Height of loading skeleton, defaults to height of the parent element
14
- */
15
- height?: number;
16
- };
17
- export type LoadingSkeletonPropsNew = {
1
+ export type LoadingSkeletonProps = {
18
2
  /**
19
3
  * A `testId` prop is provided for specified elements, which is a unique
20
4
  * string that appears as a data attribute `data-testid` in the rendered
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { type MessageDescriptor } from 'react-intl-next';
3
- import { type JsonLd } from '@atlaskit/json-ld-types';
4
3
  import { type CardProviderRenderers } from '@atlaskit/link-provider';
5
4
  import { type CardState, type LinkingPlatformFeatureFlags } from '@atlaskit/linking-common';
5
+ import { SmartLinkResponse } from '@atlaskit/linking-types';
6
6
  import { type FireEventFunction } from '../../common/analytics/types';
7
7
  import { type SmartLinkSize, type SmartLinkStatus, type SmartLinkTheme } from '../../constants';
8
8
  import { type AISummaryConfig } from '../../state/hooks/use-ai-summary-config/types';
@@ -151,7 +151,7 @@ export type RetryOptions = {
151
151
  export type ExtractFlexibleUiDataContextParams = Pick<FlexibleCardProps, 'appearance' | 'id' | 'actionOptions' | 'origin' | 'renderers' | 'url'> & {
152
152
  fireEvent?: FireEventFunction;
153
153
  status?: SmartLinkStatus;
154
- response?: JsonLd.Response;
154
+ response?: SmartLinkResponse;
155
155
  resolve?: ResolveFunction;
156
156
  featureFlags?: Partial<LinkingPlatformFeatureFlags>;
157
157
  aiSummaryConfig?: AISummaryConfig;
@@ -1,6 +1,6 @@
1
- import { type JsonLd } from '@atlaskit/json-ld-types';
1
+ import { SmartLinkResponse } from '@atlaskit/linking-types';
2
2
  import { SmartLinkStatus } from '../../constants';
3
3
  import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
4
4
  import { type ExtractFlexibleUiDataContextParams, type RetryOptions } from './types';
5
5
  export declare const getContextByStatus: (params: ExtractFlexibleUiDataContextParams) => FlexibleUiDataContext | undefined;
6
- export declare const getRetryOptions: (url: string, status?: SmartLinkStatus, response?: JsonLd.Response, onAuthorize?: (() => void) | undefined) => RetryOptions | undefined;
6
+ export declare const getRetryOptions: (url: string, status?: SmartLinkStatus, response?: SmartLinkResponse, onAuthorize?: (() => void) | undefined) => RetryOptions | undefined;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { type ImagePreviewProps } from '../types';
3
- declare const ImagePreview: ({ data, fallbackElementHeight }: ImagePreviewProps) => React.JSX.Element | null;
3
+ declare const ImagePreview: ({ fallbackElementHeight, response }: ImagePreviewProps) => React.JSX.Element | null;
4
4
  export default ImagePreview;
@@ -1,8 +1,8 @@
1
1
  import { type MouseEventHandler, type ReactElement } from 'react';
2
2
  import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- import { type JsonLd } from '@atlaskit/json-ld-types';
4
3
  import { type CardProviderRenderers } from '@atlaskit/link-provider';
5
4
  import { type CardState } from '@atlaskit/linking-common';
5
+ import { type SmartLinkResponse } from '@atlaskit/linking-types';
6
6
  import type { ActionName } from '../../constants';
7
7
  import { type AnalyticsHandler } from '../../utils/types';
8
8
  import type { CardActionOptions } from '../Card/types';
@@ -101,8 +101,8 @@ export type ContentContainerProps = React.HTMLAttributes<HTMLDivElement> & {
101
101
  url: string;
102
102
  };
103
103
  export type ImagePreviewProps = {
104
- data: JsonLd.Data.BaseData;
105
104
  fallbackElementHeight: number;
105
+ response?: SmartLinkResponse;
106
106
  };
107
107
  export interface HoverPreviewOptions {
108
108
  /**
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  export declare const Icon: React.ComponentType<React.ClassAttributes<HTMLImageElement> & React.ImgHTMLAttributes<HTMLImageElement> & import("@compiled/react").StyledProps>;
3
- export declare const AKIconWrapper: React.ComponentType<React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement> & import("@compiled/react").StyledProps>;
4
3
  export declare const Shimmer: ({ testId }: {
5
4
  testId: string;
6
5
  }) => React.JSX.Element;
@@ -0,0 +1,58 @@
1
+ declare const _default: {
2
+ meta: {
3
+ access: string;
4
+ visibility: string;
5
+ auth: {
6
+ key: string;
7
+ displayName: string;
8
+ url: string;
9
+ }[];
10
+ definitionId: string;
11
+ key: string;
12
+ resourceType: string;
13
+ version: string;
14
+ };
15
+ data: {
16
+ url: string;
17
+ '@context': {
18
+ '@vocab': string;
19
+ atlassian: string;
20
+ schema: string;
21
+ };
22
+ '@type': string;
23
+ name: string;
24
+ updated: string;
25
+ image: {
26
+ '@type': string;
27
+ url: string;
28
+ };
29
+ generator: {
30
+ '@type': string;
31
+ name: string;
32
+ icon: {
33
+ '@type': string;
34
+ url: string;
35
+ };
36
+ };
37
+ preview: {
38
+ '@type': string;
39
+ href: string;
40
+ };
41
+ };
42
+ nounData: {
43
+ id: string;
44
+ displayName: string;
45
+ url: string;
46
+ lastUpdatedAt: string;
47
+ thumbnail: {
48
+ externalUrl: string;
49
+ };
50
+ 'atlassian:design': {
51
+ liveEmbedUrl: string;
52
+ type: string;
53
+ inspectUrl: string;
54
+ iconUrl: string;
55
+ };
56
+ };
57
+ };
58
+ export default _default;
@@ -1 +1,9 @@
1
+ import { JsonLd } from '@atlaskit/json-ld-types';
2
+ import { LinkProvider } from '@atlaskit/link-extractors';
3
+ import { SmartLinkResponse } from '@atlaskit/linking-types';
1
4
  export { extractRequestAccessContextImproved } from './extractAccessContext';
5
+ export declare function generateContext(jsonLd: JsonLd.Data.BaseData): LinkProvider | undefined;
6
+ /**
7
+ * Should be moved to link-extractors when jsonLd is deprecated
8
+ */
9
+ export declare function extractSmartLinkContext(response?: SmartLinkResponse): LinkProvider | undefined;
@@ -1,4 +1,9 @@
1
1
  import { type JsonLd } from '@atlaskit/json-ld-types';
2
+ import { SmartLinkResponse } from '@atlaskit/linking-types';
2
3
  import { type Media } from '../../state/flexible-ui-context/types';
3
4
  declare const extractPreview: (data: JsonLd.Data.BaseData) => Media | undefined;
4
5
  export default extractPreview;
6
+ /**
7
+ * Should be moved to link-extractors when jsonLd is deprecated
8
+ */
9
+ export declare const extractSmartLinkPreviewImage: (response?: SmartLinkResponse) => Media | undefined;
@@ -1,4 +1,5 @@
1
1
  import { type JsonLd } from '@atlaskit/json-ld-types';
2
+ import { SmartLinkResponse } from '@atlaskit/linking-types';
2
3
  import { type IconDescriptor } from './types';
3
4
  /**
4
5
  * Extracts the provider icon and label from the given JSON-LD data.
@@ -12,3 +13,7 @@ import { type IconDescriptor } from './types';
12
13
  */
13
14
  declare const extractProviderIcon: (data?: JsonLd.Data.BaseData) => IconDescriptor | undefined;
14
15
  export default extractProviderIcon;
16
+ /**
17
+ * Should be moved to link-extractors when jsonLd is deprecated
18
+ */
19
+ export declare const extractSmartLinkProviderIcon: (response?: SmartLinkResponse) => IconDescriptor | undefined;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
2
  import { type JsonLd } from '@atlaskit/json-ld-types';
3
3
  import { type CardProviderRenderers } from '@atlaskit/link-provider';
4
+ import { SmartLinkResponse } from '@atlaskit/linking-types';
4
5
  import { IconType, SmartLinkStatus } from '../../../constants';
5
6
  export declare const extractLinkIcon: (response: JsonLd.Response, renderers?: CardProviderRenderers) => {
6
7
  render: (() => import("react").ReactNode) | undefined;
@@ -15,3 +16,15 @@ export declare const extractErrorIcon: (response?: JsonLd.Response, status?: Sma
15
16
  icon: IconType;
16
17
  url?: undefined;
17
18
  };
19
+ /**
20
+ * Should be moved to link-extractors when jsonLd is deprecated
21
+ */
22
+ export declare const extractSmartLinkIcon: (response?: SmartLinkResponse, renderers?: CardProviderRenderers) => {
23
+ render: (() => import("react").ReactNode) | undefined;
24
+ icon?: IconType | undefined;
25
+ label?: string | undefined;
26
+ url?: string | undefined;
27
+ } | {
28
+ url: string | undefined;
29
+ label: string | undefined;
30
+ } | undefined;
@@ -1,4 +1,4 @@
1
1
  import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
2
2
  import { type ExtractFlexibleUiDataContextParams } from '../../view/FlexibleCard/types';
3
- declare const extractFlexibleUiContext: ({ appearance, fireEvent, id, origin, renderers, resolve, actionOptions, response, aiSummaryConfig, ...props }?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
3
+ declare const extractFlexibleUiContext: (props?: Partial<ExtractFlexibleUiDataContextParams>) => FlexibleUiDataContext | undefined;
4
4
  export default extractFlexibleUiContext;
@@ -1,8 +1,4 @@
1
- /// <reference types="react" />
2
- /**
3
- * @jsxRuntime classic
4
- * @jsx jsx
5
- */
1
+ import React from 'react';
6
2
  import { type TitleBlockViewProps } from '../types';
7
3
  /**
8
4
  * This represents a TitleBlock for a Smart Link that is currently waiting
@@ -10,5 +6,5 @@ import { type TitleBlockViewProps } from '../types';
10
6
  * This should render when a Smart Link has sent a request.
11
7
  * @see TitleBlock
12
8
  */
13
- declare const TitleBlockResolvingView: ({ actionGroup, testId, title, hideIcon, ...blockProps }: TitleBlockViewProps) => JSX.Element;
9
+ declare const TitleBlockResolvingView: ({ actionGroup, testId, title, hideIcon, ...blockProps }: TitleBlockViewProps) => React.JSX.Element;
14
10
  export default TitleBlockResolvingView;
@@ -1,5 +1,3 @@
1
1
  /// <reference types="react" />
2
- import type { LoadingSkeletonPropsNew, LoadingSkeletonPropsOld } from './types';
3
- declare const LoadingSkeletonNew: ({ testId, width, height }: LoadingSkeletonPropsNew) => JSX.Element;
4
- declare const LoadingSkeletonOld: (props: LoadingSkeletonPropsOld) => JSX.Element;
5
- export { LoadingSkeletonOld, LoadingSkeletonNew };
2
+ import type { LoadingSkeletonProps } from './types';
3
+ export declare const LoadingSkeleton: ({ testId, width, height }: LoadingSkeletonProps) => JSX.Element;
@@ -1,20 +1,4 @@
1
- export type LoadingSkeletonPropsOld = {
2
- /**
3
- * A `testId` prop is provided for specified elements, which is a unique
4
- * string that appears as a data attribute `data-testid` in the rendered
5
- * code, serving as a hook for automated tests
6
- */
7
- testId?: string;
8
- /**
9
- * Width of the loading skeleton, defaults to width of the parent element
10
- */
11
- width?: number;
12
- /**
13
- * Height of loading skeleton, defaults to height of the parent element
14
- */
15
- height?: number;
16
- };
17
- export type LoadingSkeletonPropsNew = {
1
+ export type LoadingSkeletonProps = {
18
2
  /**
19
3
  * A `testId` prop is provided for specified elements, which is a unique
20
4
  * string that appears as a data attribute `data-testid` in the rendered
@@ -1,8 +1,8 @@
1
1
  /// <reference types="react" />
2
2
  import { type MessageDescriptor } from 'react-intl-next';
3
- import { type JsonLd } from '@atlaskit/json-ld-types';
4
3
  import { type CardProviderRenderers } from '@atlaskit/link-provider';
5
4
  import { type CardState, type LinkingPlatformFeatureFlags } from '@atlaskit/linking-common';
5
+ import { SmartLinkResponse } from '@atlaskit/linking-types';
6
6
  import { type FireEventFunction } from '../../common/analytics/types';
7
7
  import { type SmartLinkSize, type SmartLinkStatus, type SmartLinkTheme } from '../../constants';
8
8
  import { type AISummaryConfig } from '../../state/hooks/use-ai-summary-config/types';
@@ -151,7 +151,7 @@ export type RetryOptions = {
151
151
  export type ExtractFlexibleUiDataContextParams = Pick<FlexibleCardProps, 'appearance' | 'id' | 'actionOptions' | 'origin' | 'renderers' | 'url'> & {
152
152
  fireEvent?: FireEventFunction;
153
153
  status?: SmartLinkStatus;
154
- response?: JsonLd.Response;
154
+ response?: SmartLinkResponse;
155
155
  resolve?: ResolveFunction;
156
156
  featureFlags?: Partial<LinkingPlatformFeatureFlags>;
157
157
  aiSummaryConfig?: AISummaryConfig;
@@ -1,6 +1,6 @@
1
- import { type JsonLd } from '@atlaskit/json-ld-types';
1
+ import { SmartLinkResponse } from '@atlaskit/linking-types';
2
2
  import { SmartLinkStatus } from '../../constants';
3
3
  import { type FlexibleUiDataContext } from '../../state/flexible-ui-context/types';
4
4
  import { type ExtractFlexibleUiDataContextParams, type RetryOptions } from './types';
5
5
  export declare const getContextByStatus: (params: ExtractFlexibleUiDataContextParams) => FlexibleUiDataContext | undefined;
6
- export declare const getRetryOptions: (url: string, status?: SmartLinkStatus, response?: JsonLd.Response, onAuthorize?: (() => void) | undefined) => RetryOptions | undefined;
6
+ export declare const getRetryOptions: (url: string, status?: SmartLinkStatus, response?: SmartLinkResponse, onAuthorize?: (() => void) | undefined) => RetryOptions | undefined;
@@ -1,4 +1,4 @@
1
1
  import React from 'react';
2
2
  import { type ImagePreviewProps } from '../types';
3
- declare const ImagePreview: ({ data, fallbackElementHeight }: ImagePreviewProps) => React.JSX.Element | null;
3
+ declare const ImagePreview: ({ fallbackElementHeight, response }: ImagePreviewProps) => React.JSX.Element | null;
4
4
  export default ImagePreview;
@@ -1,8 +1,8 @@
1
1
  import { type MouseEventHandler, type ReactElement } from 'react';
2
2
  import { type WithAnalyticsEventsProps } from '@atlaskit/analytics-next';
3
- import { type JsonLd } from '@atlaskit/json-ld-types';
4
3
  import { type CardProviderRenderers } from '@atlaskit/link-provider';
5
4
  import { type CardState } from '@atlaskit/linking-common';
5
+ import { type SmartLinkResponse } from '@atlaskit/linking-types';
6
6
  import type { ActionName } from '../../constants';
7
7
  import { type AnalyticsHandler } from '../../utils/types';
8
8
  import type { CardActionOptions } from '../Card/types';
@@ -101,8 +101,8 @@ export type ContentContainerProps = React.HTMLAttributes<HTMLDivElement> & {
101
101
  url: string;
102
102
  };
103
103
  export type ImagePreviewProps = {
104
- data: JsonLd.Data.BaseData;
105
104
  fallbackElementHeight: number;
105
+ response?: SmartLinkResponse;
106
106
  };
107
107
  export interface HoverPreviewOptions {
108
108
  /**
@@ -1,6 +1,5 @@
1
1
  import React from 'react';
2
2
  export declare const Icon: React.ComponentType<React.ClassAttributes<HTMLImageElement> & React.ImgHTMLAttributes<HTMLImageElement> & import("@compiled/react").StyledProps>;
3
- export declare const AKIconWrapper: React.ComponentType<React.ClassAttributes<HTMLSpanElement> & React.HTMLAttributes<HTMLSpanElement> & import("@compiled/react").StyledProps>;
4
3
  export declare const Shimmer: ({ testId }: {
5
4
  testId: string;
6
5
  }) => React.JSX.Element;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "36.9.0",
3
+ "version": "36.10.1",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -50,9 +50,9 @@
50
50
  "@atlaskit/link": "^3.1.0",
51
51
  "@atlaskit/link-analytics": "^9.1.0",
52
52
  "@atlaskit/link-client-extension": "^4.0.0",
53
- "@atlaskit/link-extractors": "^2.2.0",
53
+ "@atlaskit/link-extractors": "^2.3.0",
54
54
  "@atlaskit/linking-common": "^8.0.0",
55
- "@atlaskit/linking-types": "^9.9.0",
55
+ "@atlaskit/linking-types": "^9.10.0",
56
56
  "@atlaskit/logo": "^16.0.0",
57
57
  "@atlaskit/lozenge": "^12.2.0",
58
58
  "@atlaskit/menu": "^3.2.0",
@@ -91,15 +91,15 @@
91
91
  "react-intl-next": "npm:react-intl@^5.18.1"
92
92
  },
93
93
  "devDependencies": {
94
- "@af/integration-testing": "^0.5.0",
95
- "@af/visual-regression": "^1.3.0",
94
+ "@af/integration-testing": "workspace:^",
95
+ "@af/visual-regression": "workspace:^",
96
96
  "@atlaskit/analytics-listeners": "^9.0.0",
97
97
  "@atlaskit/css-reset": "^7.2.0",
98
98
  "@atlaskit/link-test-helpers": "^8.0.0",
99
99
  "@atlaskit/media-test-helpers": "^35.0.0",
100
- "@atlaskit/react-ufo": "^3.6.0",
101
- "@atlaskit/ssr": "^0.4.0",
102
- "@atlaskit/visual-regression": "^0.10.0",
100
+ "@atlaskit/react-ufo": "^3.7.0",
101
+ "@atlaskit/ssr": "workspace:^",
102
+ "@atlaskit/visual-regression": "workspace:^",
103
103
  "@atlassian/analytics-tooling": "^0.5.0",
104
104
  "@atlassian/feature-flags-test-utils": "^0.3.0",
105
105
  "@atlassian/gemini": "^1.17.0",
@@ -1,55 +0,0 @@
1
- ._16jlidpf{flex-grow:0}
2
- ._19l31j6v img, ._1pr21j6v span, ._1u5t1j6v svg{max-height:1rem}
3
- ._19l31k8s img, ._1pr21k8s span, ._1u5t1k8s svg{max-height:1.5rem}
4
- ._19l3oqnp img, ._1pr2oqnp span, ._1u5toqnp svg{max-height:.75rem}
5
- ._19l3viql img, ._1pr2viql span, ._1u5tviql svg{max-height:2rem}
6
- ._1bsb1j6v{width:1rem}
7
- ._1bsb1k8s{width:1.5rem}
8
- ._1bsboqnp{width:.75rem}
9
- ._1bsbviql{width:2rem}
10
- ._1o9zidpf{flex-shrink:0}
11
- ._1rg21j6v img, ._q7cv1j6v span, ._xwbj1j6v svg{min-width:1rem}
12
- ._1rg21k8s img, ._q7cv1k8s span, ._xwbj1k8s svg{min-width:1.5rem}
13
- ._1rg2oqnp img, ._q7cvoqnp span, ._xwbjoqnp svg{min-width:.75rem}
14
- ._1rg2viql img, ._q7cvviql span, ._xwbjviql svg{min-width:2rem}
15
- ._1tke1j6v{min-height:1rem}
16
- ._1tke1k8s{min-height:1.5rem}
17
- ._1tkeoqnp{min-height:.75rem}
18
- ._1tkeviql{min-height:2rem}
19
- ._1ul91j6v{min-width:1rem}
20
- ._1ul91k8s{min-width:1.5rem}
21
- ._1ul9oqnp{min-width:.75rem}
22
- ._1ul9viql{min-width:2rem}
23
- ._4t3i1j6v{height:1rem}
24
- ._4t3i1k8s{height:1.5rem}
25
- ._4t3ioqnp{height:.75rem}
26
- ._4t3iviql{height:2rem}
27
- ._5jw9idpf svg{padding-bottom:0}
28
- ._7wy9idpf svg{padding-left:0}
29
- ._bna71j6v img, ._1xjx1j6v span, ._17521j6v svg{height:1rem}
30
- ._bna71k8s img, ._1xjx1k8s span, ._17521k8s svg{height:1.5rem}
31
- ._bna7oqnp img, ._1xjxoqnp span, ._1752oqnp svg{height:.75rem}
32
- ._bna7viql img, ._1xjxviql span, ._1752viql svg{height:2rem}
33
- ._c71l1j6v{max-height:1rem}
34
- ._c71l1k8s{max-height:1.5rem}
35
- ._c71loqnp{max-height:.75rem}
36
- ._c71lviql{max-height:2rem}
37
- ._i0dl1wug{flex-basis:auto}
38
- ._i2i3idpf svg{padding-top:0}
39
- ._mezj1j6v img, ._e2oo1j6v span, ._w8l51j6v svg{width:1rem}
40
- ._mezj1k8s img, ._e2oo1k8s span, ._w8l51k8s svg{width:1.5rem}
41
- ._mezjoqnp img, ._e2oooqnp span, ._w8l5oqnp svg{width:.75rem}
42
- ._mezjviql img, ._e2ooviql span, ._w8l5viql svg{width:2rem}
43
- ._p12f1j6v{max-width:1rem}
44
- ._p12f1k8s{max-width:1.5rem}
45
- ._p12foqnp{max-width:.75rem}
46
- ._p12fviql{max-width:2rem}
47
- ._qci81j6v img, ._15iz1j6v span, ._erub1j6v svg{min-height:1rem}
48
- ._qci81k8s img, ._15iz1k8s span, ._erub1k8s svg{min-height:1.5rem}
49
- ._qci8oqnp img, ._15izoqnp span, ._eruboqnp svg{min-height:.75rem}
50
- ._qci8viql img, ._15izviql span, ._erubviql svg{min-height:2rem}
51
- ._rtys1j6v img, ._b8nk1j6v span, ._4x201j6v svg{max-width:1rem}
52
- ._rtys1k8s img, ._b8nk1k8s span, ._4x201k8s svg{max-width:1.5rem}
53
- ._rtysoqnp img, ._b8nkoqnp span, ._4x20oqnp svg{max-width:.75rem}
54
- ._rtysviql img, ._b8nkviql span, ._4x20viql svg{max-width:2rem}
55
- ._uhasidpf svg{padding-right:0}
@@ -1,55 +0,0 @@
1
- ._16jlidpf{flex-grow:0}
2
- ._19l31j6v img, ._1pr21j6v span, ._1u5t1j6v svg{max-height:1rem}
3
- ._19l31k8s img, ._1pr21k8s span, ._1u5t1k8s svg{max-height:1.5rem}
4
- ._19l3oqnp img, ._1pr2oqnp span, ._1u5toqnp svg{max-height:.75rem}
5
- ._19l3viql img, ._1pr2viql span, ._1u5tviql svg{max-height:2rem}
6
- ._1bsb1j6v{width:1rem}
7
- ._1bsb1k8s{width:1.5rem}
8
- ._1bsboqnp{width:.75rem}
9
- ._1bsbviql{width:2rem}
10
- ._1o9zidpf{flex-shrink:0}
11
- ._1rg21j6v img, ._q7cv1j6v span, ._xwbj1j6v svg{min-width:1rem}
12
- ._1rg21k8s img, ._q7cv1k8s span, ._xwbj1k8s svg{min-width:1.5rem}
13
- ._1rg2oqnp img, ._q7cvoqnp span, ._xwbjoqnp svg{min-width:.75rem}
14
- ._1rg2viql img, ._q7cvviql span, ._xwbjviql svg{min-width:2rem}
15
- ._1tke1j6v{min-height:1rem}
16
- ._1tke1k8s{min-height:1.5rem}
17
- ._1tkeoqnp{min-height:.75rem}
18
- ._1tkeviql{min-height:2rem}
19
- ._1ul91j6v{min-width:1rem}
20
- ._1ul91k8s{min-width:1.5rem}
21
- ._1ul9oqnp{min-width:.75rem}
22
- ._1ul9viql{min-width:2rem}
23
- ._4t3i1j6v{height:1rem}
24
- ._4t3i1k8s{height:1.5rem}
25
- ._4t3ioqnp{height:.75rem}
26
- ._4t3iviql{height:2rem}
27
- ._5jw9idpf svg{padding-bottom:0}
28
- ._7wy9idpf svg{padding-left:0}
29
- ._bna71j6v img, ._1xjx1j6v span, ._17521j6v svg{height:1rem}
30
- ._bna71k8s img, ._1xjx1k8s span, ._17521k8s svg{height:1.5rem}
31
- ._bna7oqnp img, ._1xjxoqnp span, ._1752oqnp svg{height:.75rem}
32
- ._bna7viql img, ._1xjxviql span, ._1752viql svg{height:2rem}
33
- ._c71l1j6v{max-height:1rem}
34
- ._c71l1k8s{max-height:1.5rem}
35
- ._c71loqnp{max-height:.75rem}
36
- ._c71lviql{max-height:2rem}
37
- ._i0dl1wug{flex-basis:auto}
38
- ._i2i3idpf svg{padding-top:0}
39
- ._mezj1j6v img, ._e2oo1j6v span, ._w8l51j6v svg{width:1rem}
40
- ._mezj1k8s img, ._e2oo1k8s span, ._w8l51k8s svg{width:1.5rem}
41
- ._mezjoqnp img, ._e2oooqnp span, ._w8l5oqnp svg{width:.75rem}
42
- ._mezjviql img, ._e2ooviql span, ._w8l5viql svg{width:2rem}
43
- ._p12f1j6v{max-width:1rem}
44
- ._p12f1k8s{max-width:1.5rem}
45
- ._p12foqnp{max-width:.75rem}
46
- ._p12fviql{max-width:2rem}
47
- ._qci81j6v img, ._15iz1j6v span, ._erub1j6v svg{min-height:1rem}
48
- ._qci81k8s img, ._15iz1k8s span, ._erub1k8s svg{min-height:1.5rem}
49
- ._qci8oqnp img, ._15izoqnp span, ._eruboqnp svg{min-height:.75rem}
50
- ._qci8viql img, ._15izviql span, ._erubviql svg{min-height:2rem}
51
- ._rtys1j6v img, ._b8nk1j6v span, ._4x201j6v svg{max-width:1rem}
52
- ._rtys1k8s img, ._b8nk1k8s span, ._4x201k8s svg{max-width:1.5rem}
53
- ._rtysoqnp img, ._b8nkoqnp span, ._4x20oqnp svg{max-width:.75rem}
54
- ._rtysviql img, ._b8nkviql span, ._4x20viql svg{max-width:2rem}
55
- ._uhasidpf svg{padding-right:0}
@@ -1,55 +0,0 @@
1
- ._16jlidpf{flex-grow:0}
2
- ._19l31j6v img, ._1pr21j6v span, ._1u5t1j6v svg{max-height:1rem}
3
- ._19l31k8s img, ._1pr21k8s span, ._1u5t1k8s svg{max-height:1.5rem}
4
- ._19l3oqnp img, ._1pr2oqnp span, ._1u5toqnp svg{max-height:.75rem}
5
- ._19l3viql img, ._1pr2viql span, ._1u5tviql svg{max-height:2rem}
6
- ._1bsb1j6v{width:1rem}
7
- ._1bsb1k8s{width:1.5rem}
8
- ._1bsboqnp{width:.75rem}
9
- ._1bsbviql{width:2rem}
10
- ._1o9zidpf{flex-shrink:0}
11
- ._1rg21j6v img, ._q7cv1j6v span, ._xwbj1j6v svg{min-width:1rem}
12
- ._1rg21k8s img, ._q7cv1k8s span, ._xwbj1k8s svg{min-width:1.5rem}
13
- ._1rg2oqnp img, ._q7cvoqnp span, ._xwbjoqnp svg{min-width:.75rem}
14
- ._1rg2viql img, ._q7cvviql span, ._xwbjviql svg{min-width:2rem}
15
- ._1tke1j6v{min-height:1rem}
16
- ._1tke1k8s{min-height:1.5rem}
17
- ._1tkeoqnp{min-height:.75rem}
18
- ._1tkeviql{min-height:2rem}
19
- ._1ul91j6v{min-width:1rem}
20
- ._1ul91k8s{min-width:1.5rem}
21
- ._1ul9oqnp{min-width:.75rem}
22
- ._1ul9viql{min-width:2rem}
23
- ._4t3i1j6v{height:1rem}
24
- ._4t3i1k8s{height:1.5rem}
25
- ._4t3ioqnp{height:.75rem}
26
- ._4t3iviql{height:2rem}
27
- ._5jw9idpf svg{padding-bottom:0}
28
- ._7wy9idpf svg{padding-left:0}
29
- ._bna71j6v img, ._1xjx1j6v span, ._17521j6v svg{height:1rem}
30
- ._bna71k8s img, ._1xjx1k8s span, ._17521k8s svg{height:1.5rem}
31
- ._bna7oqnp img, ._1xjxoqnp span, ._1752oqnp svg{height:.75rem}
32
- ._bna7viql img, ._1xjxviql span, ._1752viql svg{height:2rem}
33
- ._c71l1j6v{max-height:1rem}
34
- ._c71l1k8s{max-height:1.5rem}
35
- ._c71loqnp{max-height:.75rem}
36
- ._c71lviql{max-height:2rem}
37
- ._i0dl1wug{flex-basis:auto}
38
- ._i2i3idpf svg{padding-top:0}
39
- ._mezj1j6v img, ._e2oo1j6v span, ._w8l51j6v svg{width:1rem}
40
- ._mezj1k8s img, ._e2oo1k8s span, ._w8l51k8s svg{width:1.5rem}
41
- ._mezjoqnp img, ._e2oooqnp span, ._w8l5oqnp svg{width:.75rem}
42
- ._mezjviql img, ._e2ooviql span, ._w8l5viql svg{width:2rem}
43
- ._p12f1j6v{max-width:1rem}
44
- ._p12f1k8s{max-width:1.5rem}
45
- ._p12foqnp{max-width:.75rem}
46
- ._p12fviql{max-width:2rem}
47
- ._qci81j6v img, ._15iz1j6v span, ._erub1j6v svg{min-height:1rem}
48
- ._qci81k8s img, ._15iz1k8s span, ._erub1k8s svg{min-height:1.5rem}
49
- ._qci8oqnp img, ._15izoqnp span, ._eruboqnp svg{min-height:.75rem}
50
- ._qci8viql img, ._15izviql span, ._erubviql svg{min-height:2rem}
51
- ._rtys1j6v img, ._b8nk1j6v span, ._4x201j6v svg{max-width:1rem}
52
- ._rtys1k8s img, ._b8nk1k8s span, ._4x201k8s svg{max-width:1.5rem}
53
- ._rtysoqnp img, ._b8nkoqnp span, ._4x20oqnp svg{max-width:.75rem}
54
- ._rtysviql img, ._b8nkviql span, ._4x20viql svg{max-width:2rem}
55
- ._uhasidpf svg{padding-right:0}