@atlaskit/smart-card 34.6.6 → 34.7.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 (97) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/utils/analytics/analytics.js +1 -1
  3. package/dist/cjs/view/BlockCard/views/ResolvedView.js +2 -1
  4. package/dist/cjs/view/EmbedCard/components/ErrorFrame.compiled.css +28 -0
  5. package/dist/cjs/view/EmbedCard/components/ErrorFrame.js +59 -63
  6. package/dist/cjs/view/EmbedCard/components/ErrorFrameOld.js +100 -0
  7. package/dist/cjs/view/EmbedCard/components/ExpandedFrame.js +24 -10
  8. package/dist/cjs/view/EmbedCard/components/ExpandedFrameOld.js +114 -0
  9. package/dist/cjs/view/EmbedCard/components/Frame.compiled.css +9 -0
  10. package/dist/cjs/view/EmbedCard/components/Frame.js +23 -23
  11. package/dist/cjs/view/EmbedCard/components/FrameOld.js +144 -0
  12. package/dist/cjs/view/EmbedCard/components/ImageIcon.js +20 -9
  13. package/dist/cjs/view/EmbedCard/components/styled.compiled.css +92 -0
  14. package/dist/cjs/view/EmbedCard/components/styled.js +197 -234
  15. package/dist/cjs/view/EmbedCard/components/styledOld.js +261 -0
  16. package/dist/cjs/view/EmbedCard/views/ErroredView.compiled.css +13 -0
  17. package/dist/cjs/view/EmbedCard/views/ErroredView.js +30 -38
  18. package/dist/cjs/view/EmbedCard/views/ErroredViewOld.js +69 -0
  19. package/dist/cjs/view/EmbedCard/views/ResolvedView.js +19 -13
  20. package/dist/cjs/view/EmbedCard/views/ResolvedViewOld.js +82 -0
  21. package/dist/cjs/view/EmbedCard/views/unresolved-view/UnresolvedViewOld.js +129 -0
  22. package/dist/cjs/view/EmbedCard/views/unresolved-view/index.compiled.css +19 -0
  23. package/dist/cjs/view/EmbedCard/views/unresolved-view/index.js +36 -55
  24. package/dist/cjs/view/LinkUrl/index.js +1 -1
  25. package/dist/es2019/utils/analytics/analytics.js +1 -1
  26. package/dist/es2019/view/BlockCard/views/ResolvedView.js +2 -1
  27. package/dist/es2019/view/EmbedCard/components/ErrorFrame.compiled.css +28 -0
  28. package/dist/es2019/view/EmbedCard/components/ErrorFrame.js +48 -61
  29. package/dist/es2019/view/EmbedCard/components/ErrorFrameOld.js +91 -0
  30. package/dist/es2019/view/EmbedCard/components/ExpandedFrame.js +48 -32
  31. package/dist/es2019/view/EmbedCard/components/ExpandedFrameOld.js +96 -0
  32. package/dist/es2019/view/EmbedCard/components/Frame.compiled.css +9 -0
  33. package/dist/es2019/view/EmbedCard/components/Frame.js +23 -22
  34. package/dist/es2019/view/EmbedCard/components/FrameOld.js +114 -0
  35. package/dist/es2019/view/EmbedCard/components/ImageIcon.js +20 -9
  36. package/dist/es2019/view/EmbedCard/components/styled.compiled.css +92 -0
  37. package/dist/es2019/view/EmbedCard/components/styled.js +192 -343
  38. package/dist/es2019/view/EmbedCard/components/styledOld.js +362 -0
  39. package/dist/es2019/view/EmbedCard/views/ErroredView.compiled.css +13 -0
  40. package/dist/es2019/view/EmbedCard/views/ErroredView.js +27 -37
  41. package/dist/es2019/view/EmbedCard/views/ErroredViewOld.js +58 -0
  42. package/dist/es2019/view/EmbedCard/views/ResolvedView.js +19 -12
  43. package/dist/es2019/view/EmbedCard/views/ResolvedViewOld.js +72 -0
  44. package/dist/es2019/view/EmbedCard/views/unresolved-view/UnresolvedViewOld.js +119 -0
  45. package/dist/es2019/view/EmbedCard/views/unresolved-view/index.compiled.css +19 -0
  46. package/dist/es2019/view/EmbedCard/views/unresolved-view/index.js +35 -53
  47. package/dist/es2019/view/LinkUrl/index.js +1 -1
  48. package/dist/esm/utils/analytics/analytics.js +1 -1
  49. package/dist/esm/view/BlockCard/views/ResolvedView.js +2 -1
  50. package/dist/esm/view/EmbedCard/components/ErrorFrame.compiled.css +28 -0
  51. package/dist/esm/view/EmbedCard/components/ErrorFrame.js +59 -62
  52. package/dist/esm/view/EmbedCard/components/ErrorFrameOld.js +92 -0
  53. package/dist/esm/view/EmbedCard/components/ExpandedFrame.js +13 -2
  54. package/dist/esm/view/EmbedCard/components/ExpandedFrameOld.js +104 -0
  55. package/dist/esm/view/EmbedCard/components/Frame.compiled.css +9 -0
  56. package/dist/esm/view/EmbedCard/components/Frame.js +23 -22
  57. package/dist/esm/view/EmbedCard/components/FrameOld.js +133 -0
  58. package/dist/esm/view/EmbedCard/components/ImageIcon.js +20 -9
  59. package/dist/esm/view/EmbedCard/components/styled.compiled.css +92 -0
  60. package/dist/esm/view/EmbedCard/components/styled.js +197 -234
  61. package/dist/esm/view/EmbedCard/components/styledOld.js +252 -0
  62. package/dist/esm/view/EmbedCard/views/ErroredView.compiled.css +13 -0
  63. package/dist/esm/view/EmbedCard/views/ErroredView.js +27 -37
  64. package/dist/esm/view/EmbedCard/views/ErroredViewOld.js +61 -0
  65. package/dist/esm/view/EmbedCard/views/ResolvedView.js +19 -12
  66. package/dist/esm/view/EmbedCard/views/ResolvedViewOld.js +74 -0
  67. package/dist/esm/view/EmbedCard/views/unresolved-view/UnresolvedViewOld.js +118 -0
  68. package/dist/esm/view/EmbedCard/views/unresolved-view/index.compiled.css +19 -0
  69. package/dist/esm/view/EmbedCard/views/unresolved-view/index.js +35 -53
  70. package/dist/esm/view/LinkUrl/index.js +1 -1
  71. package/dist/types/view/EmbedCard/components/ErrorFrame.d.ts +3 -4
  72. package/dist/types/view/EmbedCard/components/ErrorFrameOld.d.ts +19 -0
  73. package/dist/types/view/EmbedCard/components/ExpandedFrame.d.ts +2 -2
  74. package/dist/types/view/EmbedCard/components/ExpandedFrameOld.d.ts +40 -0
  75. package/dist/types/view/EmbedCard/components/FrameOld.d.ts +14 -0
  76. package/dist/types/view/EmbedCard/components/styled.d.ts +15 -77
  77. package/dist/types/view/EmbedCard/components/styledOld.d.ts +109 -0
  78. package/dist/types/view/EmbedCard/views/ErroredView.d.ts +2 -2
  79. package/dist/types/view/EmbedCard/views/ErroredViewOld.d.ts +12 -0
  80. package/dist/types/view/EmbedCard/views/ResolvedView.d.ts +0 -4
  81. package/dist/types/view/EmbedCard/views/ResolvedViewOld.d.ts +36 -0
  82. package/dist/types/view/EmbedCard/views/unresolved-view/UnresolvedViewOld.d.ts +4 -0
  83. package/dist/types/view/EmbedCard/views/unresolved-view/index.d.ts +3 -3
  84. package/dist/types-ts4.5/view/EmbedCard/components/ErrorFrame.d.ts +3 -4
  85. package/dist/types-ts4.5/view/EmbedCard/components/ErrorFrameOld.d.ts +19 -0
  86. package/dist/types-ts4.5/view/EmbedCard/components/ExpandedFrame.d.ts +2 -2
  87. package/dist/types-ts4.5/view/EmbedCard/components/ExpandedFrameOld.d.ts +40 -0
  88. package/dist/types-ts4.5/view/EmbedCard/components/FrameOld.d.ts +14 -0
  89. package/dist/types-ts4.5/view/EmbedCard/components/styled.d.ts +15 -77
  90. package/dist/types-ts4.5/view/EmbedCard/components/styledOld.d.ts +109 -0
  91. package/dist/types-ts4.5/view/EmbedCard/views/ErroredView.d.ts +2 -2
  92. package/dist/types-ts4.5/view/EmbedCard/views/ErroredViewOld.d.ts +12 -0
  93. package/dist/types-ts4.5/view/EmbedCard/views/ResolvedView.d.ts +0 -4
  94. package/dist/types-ts4.5/view/EmbedCard/views/ResolvedViewOld.d.ts +36 -0
  95. package/dist/types-ts4.5/view/EmbedCard/views/unresolved-view/UnresolvedViewOld.d.ts +4 -0
  96. package/dist/types-ts4.5/view/EmbedCard/views/unresolved-view/index.d.ts +3 -3
  97. package/package.json +2 -2
@@ -1,7 +1,3 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import React from 'react';
6
2
  import { type ContextViewModel, type FrameStyle } from '../types';
7
3
  export interface EmbedCardResolvedViewProps {
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ import { type ContextViewModel, type FrameStyle } from '../types';
7
+ export interface EmbedCardResolvedViewProps {
8
+ /** The title of the link */
9
+ title?: string;
10
+ /** The context view model */
11
+ context?: ContextViewModel;
12
+ /** The link to display */
13
+ link: string;
14
+ /** A flag that determines whether the card is selected in edit mode. */
15
+ isSelected?: boolean;
16
+ /** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
17
+ frameStyle?: FrameStyle;
18
+ /** The src to be used for the `iframe` */
19
+ preview?: {
20
+ src: string;
21
+ aspectRatio?: number;
22
+ };
23
+ /** A flag that determines whether link source can be trusted in iframe **/
24
+ isTrusted?: boolean;
25
+ /** The optional click handler */
26
+ onClick?: (evt: React.MouseEvent) => void;
27
+ /** For testing purposes only. */
28
+ testId?: string;
29
+ isSupportTheming?: boolean;
30
+ inheritDimensions?: boolean;
31
+ /** Optional callback for when user dwells cursor over iframe - for analytics **/
32
+ onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
33
+ /** Optional callback for when user navigates into an iframe - for analytics **/
34
+ onIframeFocus?: () => void;
35
+ }
36
+ export declare const EmbedCardResolvedViewOld: React.ForwardRefExoticComponent<EmbedCardResolvedViewProps & React.RefAttributes<HTMLIFrameElement>>;
@@ -0,0 +1,4 @@
1
+ import { jsx } from '@emotion/react';
2
+ import type { UnresolvedViewProps } from './types';
3
+ declare const UnresolvedViewOld: ({ button, description, frameStyle, icon: iconUrlOrElement, image: imageUrlOrElement, inheritDimensions, isSelected, onClick, testId, text, title, url, }: UnresolvedViewProps) => jsx.JSX.Element;
4
+ export default UnresolvedViewOld;
@@ -1,4 +1,4 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import type { UnresolvedViewProps } from './types';
3
- declare const UnresolvedView: ({ button, description, frameStyle, icon: iconUrlOrElement, image: imageUrlOrElement, inheritDimensions, isSelected, onClick, testId, text, title, url, }: UnresolvedViewProps) => jsx.JSX.Element;
4
- export default UnresolvedView;
3
+ export declare const UnresolvedViewExported: (props: UnresolvedViewProps) => JSX.Element;
4
+ export default UnresolvedViewExported;
@@ -3,7 +3,6 @@
3
3
  * @jsx jsx
4
4
  */
5
5
  import React from 'react';
6
- import { jsx } from '@emotion/react';
7
6
  export interface FrameProps {
8
7
  children?: React.ReactNode;
9
8
  compact?: boolean;
@@ -14,6 +13,6 @@ export interface FrameProps {
14
13
  className?: string;
15
14
  inheritDimensions?: boolean;
16
15
  }
17
- export declare const Frame: (props?: FrameProps) => jsx.JSX.Element;
18
- export declare const ExpandedFrame: ({ children, isSelected, isHoverable, testId, className, isFluidHeight, }: FrameProps) => jsx.JSX.Element;
19
- export declare const CompactFrame: ({ children, isHoverable, isSelected, testId, className, inheritDimensions, }: FrameProps) => jsx.JSX.Element;
16
+ export declare const ExpandedFrame: (props: FrameProps) => JSX.Element;
17
+ export declare const CompactFrame: (props: FrameProps) => JSX.Element;
18
+ export declare const Frame: (props: FrameProps) => JSX.Element;
@@ -0,0 +1,19 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ import { jsx } from '@emotion/react';
7
+ export interface FrameProps {
8
+ children?: React.ReactNode;
9
+ compact?: boolean;
10
+ isSelected?: boolean;
11
+ isHoverable?: boolean;
12
+ isFluidHeight?: boolean;
13
+ testId?: string;
14
+ className?: string;
15
+ inheritDimensions?: boolean;
16
+ }
17
+ export declare const FrameOld: (props?: FrameProps) => jsx.JSX.Element;
18
+ export declare const ExpandedFrameOld: ({ children, isSelected, isHoverable, testId, className, isFluidHeight, }: FrameProps) => jsx.JSX.Element;
19
+ export declare const CompactFrameOld: ({ children, isHoverable, isSelected, testId, className, inheritDimensions, }: FrameProps) => jsx.JSX.Element;
@@ -1,4 +1,4 @@
1
- import React from 'react';
1
+ /// <reference types="react" />
2
2
  import { type FrameStyle } from '../types';
3
3
  export interface ExpandedFrameProps {
4
4
  isPlaceholder?: boolean;
@@ -37,4 +37,4 @@ export interface ExpandedFrameProps {
37
37
  */
38
38
  setOverflow?: boolean;
39
39
  }
40
- export declare const ExpandedFrame: ({ isPlaceholder, children, onClick, icon, text, isSelected, frameStyle, href, minWidth, maxWidth, testId, inheritDimensions, allowScrollBar, setOverflow, }: ExpandedFrameProps) => JSX.Element;
40
+ export declare const ExpandedFrame: (props: ExpandedFrameProps) => JSX.Element;
@@ -0,0 +1,40 @@
1
+ /// <reference types="react" />
2
+ import { type FrameStyle } from '../types';
3
+ export interface ExpandedFrameProps {
4
+ isPlaceholder?: boolean;
5
+ href?: string;
6
+ icon?: React.ReactNode;
7
+ text?: React.ReactNode;
8
+ minWidth?: number;
9
+ maxWidth?: number;
10
+ children?: React.ReactNode;
11
+ /** A flag that determines whether the card is selected in edit mode. */
12
+ isSelected?: boolean;
13
+ /** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
14
+ frameStyle?: FrameStyle;
15
+ /** The optional click handler */
16
+ onClick?: (evt: React.MouseEvent) => void;
17
+ /** For testing purposes only */
18
+ testId?: string;
19
+ /** If dimensions of the card are to be inherited from the parent */
20
+ inheritDimensions?: boolean;
21
+ /**
22
+ * To enable scrolling in use cases where the content will not have it's own scrollbar.
23
+ *
24
+ * Requires `setOverflow` to be set to true.
25
+ *
26
+ * Always enable this when when the card is not resolved so the connect account button is not hiddden.
27
+ */
28
+ allowScrollBar?: boolean;
29
+ /**
30
+ * Should the CSS `overflow` property be set to hidden or auto (clipping or
31
+ * supporting a scroll bar), or left out altogether.
32
+ *
33
+ * Set to true when embed is unresolved to prevent account connection button being unreachable.
34
+ *
35
+ * Set to false when the card is resolved to mitigate blurry embed card issue (EDM-7188).
36
+ * @default true
37
+ */
38
+ setOverflow?: boolean;
39
+ }
40
+ export declare const ExpandedFrameOld: ({ isPlaceholder, children, onClick, icon, text, isSelected, frameStyle, href, minWidth, maxWidth, testId, inheritDimensions, allowScrollBar, setOverflow, }: ExpandedFrameProps) => JSX.Element;
@@ -0,0 +1,14 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ export interface FrameProps {
7
+ url?: string;
8
+ isTrusted?: boolean;
9
+ testId?: string;
10
+ onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
11
+ onIframeFocus?: () => void;
12
+ title?: string;
13
+ }
14
+ export declare const FrameOld: React.ForwardRefExoticComponent<FrameProps & React.RefAttributes<HTMLIFrameElement>>;
@@ -1,6 +1,7 @@
1
1
  /// <reference types="react" />
2
- import { type FrameStyle } from '../types';
2
+ import type { FrameStyle } from '../types';
3
3
  export declare const className = "media-card-frame";
4
+ export declare const embedHeaderHeight = 32;
4
5
  export interface WrapperProps {
5
6
  minWidth?: number;
6
7
  maxWidth?: number;
@@ -8,41 +9,11 @@ export interface WrapperProps {
8
9
  isSelected?: boolean;
9
10
  frameStyle?: FrameStyle;
10
11
  inheritDimensions?: boolean;
12
+ className?: string;
11
13
  }
12
- export declare const borderRadius: string;
13
- export declare const ellipsis: (maxWidth?: string | number) => string;
14
- export declare const csssize: (value?: string | number) => string;
15
- export declare const LinkWrapper: import("@emotion/styled").StyledComponent<{
16
- theme?: import("@emotion/react").Theme | undefined;
17
- as?: import("react").ElementType<any> | undefined;
18
- } & WrapperProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
19
- export declare const Wrapper: import("@emotion/styled").StyledComponent<{
20
- theme?: import("@emotion/react").Theme | undefined;
21
- as?: import("react").ElementType<any> | undefined;
22
- } & WrapperProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
23
14
  export interface HeaderProps {
24
15
  frameStyle?: FrameStyle;
25
16
  }
26
- export declare const embedHeaderHeight = 32;
27
- export declare const Header: import("@emotion/styled").StyledComponent<{
28
- theme?: import("@emotion/react").Theme | undefined;
29
- as?: import("react").ElementType<any> | undefined;
30
- } & HeaderProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
31
- export interface PlaceholderProps {
32
- isPlaceholder: boolean;
33
- }
34
- export declare const IconWrapper: import("@emotion/styled").StyledComponent<{
35
- theme?: import("@emotion/react").Theme | undefined;
36
- as?: import("react").ElementType<any> | undefined;
37
- } & PlaceholderProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
38
- export declare const TextWrapper: import("@emotion/styled").StyledComponent<{
39
- theme?: import("@emotion/react").Theme | undefined;
40
- as?: import("react").ElementType<any> | undefined;
41
- } & PlaceholderProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
42
- export declare const TooltipWrapper: import("@emotion/styled").StyledComponent<{
43
- theme?: import("@emotion/react").Theme | undefined;
44
- as?: import("react").ElementType<any> | undefined;
45
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
46
17
  export interface ContentProps {
47
18
  isInteractive: boolean;
48
19
  /**
@@ -56,54 +27,21 @@ export interface ContentProps {
56
27
  removeOverflow?: boolean;
57
28
  frameStyle?: FrameStyle;
58
29
  }
59
- export declare const Content: import("@emotion/styled").StyledComponent<{
60
- theme?: import("@emotion/react").Theme | undefined;
61
- as?: import("react").ElementType<any> | undefined;
62
- } & ContentProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
63
30
  export interface ImageProps {
64
31
  size: number;
65
32
  }
66
- export declare const Image: import("@emotion/styled").StyledComponent<{
67
- theme?: import("@emotion/react").Theme | undefined;
68
- as?: import("react").ElementType<any> | undefined;
69
- } & ImageProps, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
70
- export declare const maxAvatarCount = 6;
71
- export declare const ContentWrapper: import("@emotion/styled").StyledComponent<{
72
- theme?: import("@emotion/react").Theme | undefined;
73
- as?: import("react").ElementType<any> | undefined;
74
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
75
- export declare const Title: import("@emotion/styled").StyledComponent<{
76
- theme?: import("@emotion/react").Theme | undefined;
77
- as?: import("react").ElementType<any> | undefined;
78
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
79
- export declare const Byline: import("@emotion/styled").StyledComponent<{
80
- theme?: import("@emotion/react").Theme | undefined;
81
- as?: import("react").ElementType<any> | undefined;
82
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
83
- export declare const Description: import("@emotion/styled").StyledComponent<{
84
- theme?: import("@emotion/react").Theme | undefined;
85
- as?: import("react").ElementType<any> | undefined;
86
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
87
- export declare const ResolvedViewIconWrapper: import("@emotion/styled").StyledComponent<{
88
- theme?: import("@emotion/react").Theme | undefined;
89
- as?: import("react").ElementType<any> | undefined;
90
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
91
33
  export interface ThumbnailProps {
92
34
  src: string;
93
35
  }
94
- export declare const Thumbnail: import("@emotion/styled").StyledComponent<{
95
- theme?: import("@emotion/react").Theme | undefined;
96
- as?: import("react").ElementType<any> | undefined;
97
- } & ThumbnailProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
98
- export declare const UsersWrapper: import("@emotion/styled").StyledComponent<{
99
- theme?: import("@emotion/react").Theme | undefined;
100
- as?: import("react").ElementType<any> | undefined;
101
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
102
- export declare const ActionsWrapper: import("@emotion/styled").StyledComponent<{
103
- theme?: import("@emotion/react").Theme | undefined;
104
- as?: import("react").ElementType<any> | undefined;
105
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
106
- export declare const AlertWrapper: import("@emotion/styled").StyledComponent<{
107
- theme?: import("@emotion/react").Theme | undefined;
108
- as?: import("react").ElementType<any> | undefined;
109
- }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
36
+ export interface PlaceholderProps {
37
+ isPlaceholder: boolean;
38
+ }
39
+ export declare const LinkWrapper: import("react").ComponentType<WrapperProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
40
+ export declare const Wrapper: import("react").ComponentType<WrapperProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
41
+ export declare const Header: import("react").ComponentType<HeaderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
42
+ export declare const IconWrapper: import("react").ComponentType<PlaceholderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
43
+ export declare const TextWrapper: import("react").ComponentType<PlaceholderProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
44
+ export declare const TooltipWrapper: import("react").ComponentType<import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
45
+ export declare const Content: import("react").ComponentType<ContentProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
46
+ export declare const Image: import("react").ComponentType<ImageProps & import("react").ClassAttributes<HTMLImageElement> & import("react").ImgHTMLAttributes<HTMLImageElement> & import("@compiled/react").StyledProps>;
47
+ export declare const Thumbnail: import("react").ComponentType<ThumbnailProps & import("react").ClassAttributes<HTMLDivElement> & import("react").HTMLAttributes<HTMLDivElement> & import("@compiled/react").StyledProps>;
@@ -0,0 +1,109 @@
1
+ /// <reference types="react" />
2
+ import { type FrameStyle } from '../types';
3
+ export declare const className = "media-card-frame";
4
+ export interface WrapperProps {
5
+ minWidth?: number;
6
+ maxWidth?: number;
7
+ isInteractive?: boolean;
8
+ isSelected?: boolean;
9
+ frameStyle?: FrameStyle;
10
+ inheritDimensions?: boolean;
11
+ }
12
+ export declare const borderRadius: string;
13
+ export declare const ellipsis: (maxWidth?: string | number) => string;
14
+ export declare const csssize: (value?: string | number) => string;
15
+ export declare const LinkWrapper: import("@emotion/styled").StyledComponent<{
16
+ theme?: import("@emotion/react").Theme | undefined;
17
+ as?: import("react").ElementType<any> | undefined;
18
+ } & WrapperProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
19
+ export declare const Wrapper: import("@emotion/styled").StyledComponent<{
20
+ theme?: import("@emotion/react").Theme | undefined;
21
+ as?: import("react").ElementType<any> | undefined;
22
+ } & WrapperProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
23
+ export interface HeaderProps {
24
+ frameStyle?: FrameStyle;
25
+ }
26
+ export declare const embedHeaderHeight = 32;
27
+ export declare const Header: import("@emotion/styled").StyledComponent<{
28
+ theme?: import("@emotion/react").Theme | undefined;
29
+ as?: import("react").ElementType<any> | undefined;
30
+ } & HeaderProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
31
+ export interface PlaceholderProps {
32
+ isPlaceholder: boolean;
33
+ }
34
+ export declare const IconWrapper: import("@emotion/styled").StyledComponent<{
35
+ theme?: import("@emotion/react").Theme | undefined;
36
+ as?: import("react").ElementType<any> | undefined;
37
+ } & PlaceholderProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
38
+ export declare const TextWrapper: import("@emotion/styled").StyledComponent<{
39
+ theme?: import("@emotion/react").Theme | undefined;
40
+ as?: import("react").ElementType<any> | undefined;
41
+ } & PlaceholderProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
42
+ export declare const TooltipWrapper: import("@emotion/styled").StyledComponent<{
43
+ theme?: import("@emotion/react").Theme | undefined;
44
+ as?: import("react").ElementType<any> | undefined;
45
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
46
+ export interface ContentProps {
47
+ isInteractive: boolean;
48
+ /**
49
+ * Whether to show a scroll bar (use overflow: auto) or hide overflow (overflow:hidden).
50
+ * Always set to true for unresolved embeds, otherwise the connect account button may be hidden and unreachable.
51
+ */
52
+ allowScrollBar: boolean;
53
+ /**
54
+ * Remove the overflow: ... CSS property altogether.
55
+ */
56
+ removeOverflow?: boolean;
57
+ frameStyle?: FrameStyle;
58
+ }
59
+ export declare const Content: import("@emotion/styled").StyledComponent<{
60
+ theme?: import("@emotion/react").Theme | undefined;
61
+ as?: import("react").ElementType<any> | undefined;
62
+ } & ContentProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
63
+ export interface ImageProps {
64
+ size: number;
65
+ }
66
+ export declare const Image: import("@emotion/styled").StyledComponent<{
67
+ theme?: import("@emotion/react").Theme | undefined;
68
+ as?: import("react").ElementType<any> | undefined;
69
+ } & ImageProps, import("react").DetailedHTMLProps<import("react").ImgHTMLAttributes<HTMLImageElement>, HTMLImageElement>, {}>;
70
+ export declare const maxAvatarCount = 6;
71
+ export declare const ContentWrapper: import("@emotion/styled").StyledComponent<{
72
+ theme?: import("@emotion/react").Theme | undefined;
73
+ as?: import("react").ElementType<any> | undefined;
74
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
75
+ export declare const Title: import("@emotion/styled").StyledComponent<{
76
+ theme?: import("@emotion/react").Theme | undefined;
77
+ as?: import("react").ElementType<any> | undefined;
78
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
79
+ export declare const Byline: import("@emotion/styled").StyledComponent<{
80
+ theme?: import("@emotion/react").Theme | undefined;
81
+ as?: import("react").ElementType<any> | undefined;
82
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
83
+ export declare const Description: import("@emotion/styled").StyledComponent<{
84
+ theme?: import("@emotion/react").Theme | undefined;
85
+ as?: import("react").ElementType<any> | undefined;
86
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
87
+ export declare const ResolvedViewIconWrapper: import("@emotion/styled").StyledComponent<{
88
+ theme?: import("@emotion/react").Theme | undefined;
89
+ as?: import("react").ElementType<any> | undefined;
90
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
91
+ export interface ThumbnailProps {
92
+ src: string;
93
+ }
94
+ export declare const Thumbnail: import("@emotion/styled").StyledComponent<{
95
+ theme?: import("@emotion/react").Theme | undefined;
96
+ as?: import("react").ElementType<any> | undefined;
97
+ } & ThumbnailProps, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
98
+ export declare const UsersWrapper: import("@emotion/styled").StyledComponent<{
99
+ theme?: import("@emotion/react").Theme | undefined;
100
+ as?: import("react").ElementType<any> | undefined;
101
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
102
+ export declare const ActionsWrapper: import("@emotion/styled").StyledComponent<{
103
+ theme?: import("@emotion/react").Theme | undefined;
104
+ as?: import("react").ElementType<any> | undefined;
105
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
106
+ export declare const AlertWrapper: import("@emotion/styled").StyledComponent<{
107
+ theme?: import("@emotion/react").Theme | undefined;
108
+ as?: import("react").ElementType<any> | undefined;
109
+ }, import("react").DetailedHTMLProps<import("react").HTMLAttributes<HTMLDivElement>, HTMLDivElement>, {}>;
@@ -1,12 +1,12 @@
1
+ /// <reference types="react" />
1
2
  /**
2
3
  * @jsxRuntime classic
3
4
  * @jsx jsx
4
5
  */
5
- import { jsx } from '@emotion/react';
6
6
  export interface ErroredViewProps {
7
7
  onRetry?: (val: any) => void;
8
8
  isSelected?: boolean;
9
9
  testId?: string;
10
10
  inheritDimensions?: boolean;
11
11
  }
12
- export declare const EmbedCardErroredView: ({ onRetry, isSelected, testId, inheritDimensions, }: ErroredViewProps) => jsx.JSX.Element;
12
+ export declare const EmbedCardErroredView: (props: ErroredViewProps) => JSX.Element;
@@ -0,0 +1,12 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import { jsx } from '@emotion/react';
6
+ export interface ErroredViewProps {
7
+ onRetry?: (val: any) => void;
8
+ isSelected?: boolean;
9
+ testId?: string;
10
+ inheritDimensions?: boolean;
11
+ }
12
+ export declare const EmbedCardErroredViewOld: ({ onRetry, isSelected, testId, inheritDimensions, }: ErroredViewProps) => jsx.JSX.Element;
@@ -1,7 +1,3 @@
1
- /**
2
- * @jsxRuntime classic
3
- * @jsx jsx
4
- */
5
1
  import React from 'react';
6
2
  import { type ContextViewModel, type FrameStyle } from '../types';
7
3
  export interface EmbedCardResolvedViewProps {
@@ -0,0 +1,36 @@
1
+ /**
2
+ * @jsxRuntime classic
3
+ * @jsx jsx
4
+ */
5
+ import React from 'react';
6
+ import { type ContextViewModel, type FrameStyle } from '../types';
7
+ export interface EmbedCardResolvedViewProps {
8
+ /** The title of the link */
9
+ title?: string;
10
+ /** The context view model */
11
+ context?: ContextViewModel;
12
+ /** The link to display */
13
+ link: string;
14
+ /** A flag that determines whether the card is selected in edit mode. */
15
+ isSelected?: boolean;
16
+ /** A prop that determines the style of a frame: whether to show it, hide it or only show it when a user hovers over embed */
17
+ frameStyle?: FrameStyle;
18
+ /** The src to be used for the `iframe` */
19
+ preview?: {
20
+ src: string;
21
+ aspectRatio?: number;
22
+ };
23
+ /** A flag that determines whether link source can be trusted in iframe **/
24
+ isTrusted?: boolean;
25
+ /** The optional click handler */
26
+ onClick?: (evt: React.MouseEvent) => void;
27
+ /** For testing purposes only. */
28
+ testId?: string;
29
+ isSupportTheming?: boolean;
30
+ inheritDimensions?: boolean;
31
+ /** Optional callback for when user dwells cursor over iframe - for analytics **/
32
+ onIframeDwell?: (dwellTime: number, dwellPercentVisible: number) => void;
33
+ /** Optional callback for when user navigates into an iframe - for analytics **/
34
+ onIframeFocus?: () => void;
35
+ }
36
+ export declare const EmbedCardResolvedViewOld: React.ForwardRefExoticComponent<EmbedCardResolvedViewProps & React.RefAttributes<HTMLIFrameElement>>;
@@ -0,0 +1,4 @@
1
+ import { jsx } from '@emotion/react';
2
+ import type { UnresolvedViewProps } from './types';
3
+ declare const UnresolvedViewOld: ({ button, description, frameStyle, icon: iconUrlOrElement, image: imageUrlOrElement, inheritDimensions, isSelected, onClick, testId, text, title, url, }: UnresolvedViewProps) => jsx.JSX.Element;
4
+ export default UnresolvedViewOld;
@@ -1,4 +1,4 @@
1
- import { jsx } from '@emotion/react';
1
+ /// <reference types="react" />
2
2
  import type { UnresolvedViewProps } from './types';
3
- declare const UnresolvedView: ({ button, description, frameStyle, icon: iconUrlOrElement, image: imageUrlOrElement, inheritDimensions, isSelected, onClick, testId, text, title, url, }: UnresolvedViewProps) => jsx.JSX.Element;
4
- export default UnresolvedView;
3
+ export declare const UnresolvedViewExported: (props: UnresolvedViewProps) => JSX.Element;
4
+ export default UnresolvedViewExported;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/smart-card",
3
- "version": "34.6.6",
3
+ "version": "34.7.0",
4
4
  "description": "Smart card component",
5
5
  "publishConfig": {
6
6
  "registry": "https://registry.npmjs.org/"
@@ -97,7 +97,7 @@
97
97
  "@atlaskit/css-reset": "^6.11.0",
98
98
  "@atlaskit/link-test-helpers": "^7.5.0",
99
99
  "@atlaskit/media-test-helpers": "^34.7.0",
100
- "@atlaskit/react-ufo": "^2.12.0",
100
+ "@atlaskit/react-ufo": "^2.13.0",
101
101
  "@atlaskit/ssr": "*",
102
102
  "@atlaskit/visual-regression": "*",
103
103
  "@atlassian/analytics-tooling": "*",