@atlaskit/smart-card 26.46.0 → 26.46.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 (76) hide show
  1. package/CHANGELOG.md +8 -0
  2. package/dist/cjs/messages.js +5 -0
  3. package/dist/cjs/utils/analytics/analytics.js +1 -1
  4. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/index.js +33 -0
  5. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +73 -0
  6. package/dist/cjs/view/FlexibleCard/components/blocks/ai-summary-block/types.js +5 -0
  7. package/dist/cjs/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +8 -19
  8. package/dist/cjs/view/FlexibleCard/components/blocks/index.js +8 -1
  9. package/dist/cjs/view/FlexibleCard/components/blocks/utils.js +10 -2
  10. package/dist/cjs/view/LinkUrl/index.js +1 -1
  11. package/dist/cjs/view/common/ai-icon/index.js +117 -0
  12. package/dist/cjs/view/common/ai-prism/ai-glowing-border/animated-svg-container.js +249 -0
  13. package/dist/cjs/view/common/ai-prism/ai-glowing-border/index.js +55 -0
  14. package/dist/cjs/view/common/ai-prism/ai-glowing-border/types.js +5 -0
  15. package/dist/cjs/view/common/ai-prism/constants.js +53 -0
  16. package/dist/cjs/view/common/ai-prism/index.js +45 -0
  17. package/dist/cjs/view/common/ai-prism/types.js +5 -0
  18. package/dist/es2019/messages.js +5 -0
  19. package/dist/es2019/utils/analytics/analytics.js +1 -1
  20. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/index.js +25 -0
  21. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +62 -0
  22. package/dist/es2019/view/FlexibleCard/components/blocks/ai-summary-block/types.js +1 -0
  23. package/dist/es2019/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +1 -12
  24. package/dist/es2019/view/FlexibleCard/components/blocks/index.js +2 -1
  25. package/dist/es2019/view/FlexibleCard/components/blocks/utils.js +10 -0
  26. package/dist/es2019/view/LinkUrl/index.js +1 -1
  27. package/dist/es2019/view/common/ai-icon/index.js +108 -0
  28. package/dist/es2019/view/common/ai-prism/ai-glowing-border/animated-svg-container.js +236 -0
  29. package/dist/es2019/view/common/ai-prism/ai-glowing-border/index.js +45 -0
  30. package/dist/es2019/view/common/ai-prism/ai-glowing-border/types.js +1 -0
  31. package/dist/es2019/view/common/ai-prism/constants.js +47 -0
  32. package/dist/es2019/view/common/ai-prism/index.js +36 -0
  33. package/dist/es2019/view/common/ai-prism/types.js +1 -0
  34. package/dist/esm/messages.js +5 -0
  35. package/dist/esm/utils/analytics/analytics.js +1 -1
  36. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/index.js +27 -0
  37. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.js +63 -0
  38. package/dist/esm/view/FlexibleCard/components/blocks/ai-summary-block/types.js +1 -0
  39. package/dist/esm/view/FlexibleCard/components/blocks/footer-block/resolved/index.js +1 -12
  40. package/dist/esm/view/FlexibleCard/components/blocks/index.js +2 -1
  41. package/dist/esm/view/FlexibleCard/components/blocks/utils.js +9 -1
  42. package/dist/esm/view/LinkUrl/index.js +1 -1
  43. package/dist/esm/view/common/ai-icon/index.js +110 -0
  44. package/dist/esm/view/common/ai-prism/ai-glowing-border/animated-svg-container.js +239 -0
  45. package/dist/esm/view/common/ai-prism/ai-glowing-border/index.js +47 -0
  46. package/dist/esm/view/common/ai-prism/ai-glowing-border/types.js +1 -0
  47. package/dist/esm/view/common/ai-prism/constants.js +47 -0
  48. package/dist/esm/view/common/ai-prism/index.js +37 -0
  49. package/dist/esm/view/common/ai-prism/types.js +1 -0
  50. package/dist/types/messages.d.ts +1 -1
  51. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +11 -0
  52. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +4 -0
  53. package/dist/types/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +23 -0
  54. package/dist/types/view/FlexibleCard/components/blocks/index.d.ts +1 -0
  55. package/dist/types/view/FlexibleCard/components/blocks/utils.d.ts +1 -0
  56. package/dist/types/view/common/ai-icon/index.d.ts +9 -0
  57. package/dist/types/view/common/ai-prism/ai-glowing-border/animated-svg-container.d.ts +9 -0
  58. package/dist/types/view/common/ai-prism/ai-glowing-border/index.d.ts +10 -0
  59. package/dist/types/view/common/ai-prism/ai-glowing-border/types.d.ts +25 -0
  60. package/dist/types/view/common/ai-prism/constants.d.ts +30 -0
  61. package/dist/types/view/common/ai-prism/index.d.ts +4 -0
  62. package/dist/types/view/common/ai-prism/types.d.ts +13 -0
  63. package/dist/types-ts4.5/messages.d.ts +1 -1
  64. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/index.d.ts +11 -0
  65. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/resolved/index.d.ts +4 -0
  66. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/ai-summary-block/types.d.ts +23 -0
  67. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/index.d.ts +1 -0
  68. package/dist/types-ts4.5/view/FlexibleCard/components/blocks/utils.d.ts +1 -0
  69. package/dist/types-ts4.5/view/common/ai-icon/index.d.ts +9 -0
  70. package/dist/types-ts4.5/view/common/ai-prism/ai-glowing-border/animated-svg-container.d.ts +9 -0
  71. package/dist/types-ts4.5/view/common/ai-prism/ai-glowing-border/index.d.ts +10 -0
  72. package/dist/types-ts4.5/view/common/ai-prism/ai-glowing-border/types.d.ts +25 -0
  73. package/dist/types-ts4.5/view/common/ai-prism/constants.d.ts +30 -0
  74. package/dist/types-ts4.5/view/common/ai-prism/index.d.ts +4 -0
  75. package/dist/types-ts4.5/view/common/ai-prism/types.d.ts +13 -0
  76. package/package.json +3 -3
@@ -0,0 +1,239 @@
1
+ /** @jsx jsx */
2
+ import { css, jsx } from '@emotion/react';
3
+ import React, { useEffect, useRef } from 'react';
4
+ import { GLOW_SIZE, OUTER_BORDER_RADIUS } from '../constants';
5
+ var namespaceUUID = 0;
6
+ var svgStyles = css({
7
+ position: 'absolute',
8
+ borderRadius: OUTER_BORDER_RADIUS
9
+ });
10
+ var blurredStyles = css({
11
+ width: "calc(100% - ".concat(GLOW_SIZE / 2, "px)"),
12
+ height: "calc(100% - ".concat(GLOW_SIZE / 2, "px)"),
13
+ top: GLOW_SIZE / 2,
14
+ left: GLOW_SIZE / 2,
15
+ filter: "blur(".concat(GLOW_SIZE, "px)"),
16
+ // for safari... : https://stackoverflow.com/a/71353198
17
+ backfaceVisibility: 'hidden',
18
+ transform: 'translate3d(0, 0, 0)'
19
+ });
20
+ var notBlurredStyles = css({
21
+ left: 0,
22
+ top: 0,
23
+ width: '100%',
24
+ height: '100%'
25
+ });
26
+
27
+ /**
28
+ * The bulk of this file is originally from
29
+ * https://bitbucket.org/atlassian/barrel/src/master/ui/platform/ui-kit/ai
30
+ * with modifications.
31
+ */
32
+ var AnimatedSvgContainer = function AnimatedSvgContainer(_ref) {
33
+ var palette = _ref.palette,
34
+ isMoving = _ref.isMoving,
35
+ isGlowing = _ref.isGlowing,
36
+ additionalCss = _ref.additionalCss;
37
+ var svgRef = useRef(null);
38
+ var namespaceId = useRef();
39
+ if (namespaceId.current === undefined) {
40
+ namespaceId.current = namespaceUUID;
41
+ namespaceUUID += 1;
42
+ }
43
+ useEffect(function () {
44
+ if (isMoving) {
45
+ var svg = svgRef.current;
46
+
47
+ // Schedule animation to begin before next browser paint
48
+ var beginReq = requestAnimationFrame(function () {
49
+ svg === null || svg === void 0 || svg.querySelectorAll('animate').forEach(function (node) {
50
+ return node.beginElement();
51
+ });
52
+ });
53
+ return function () {
54
+ // Ensure any pending animation frame is cancelled as the element animation does not end properly if it
55
+ // begins in the same event tick, i.e. isLoading synchronously changes to true then false.
56
+ cancelAnimationFrame(beginReq);
57
+ requestAnimationFrame(function () {
58
+ svg === null || svg === void 0 || svg.querySelectorAll('animate').forEach(function (node) {
59
+ return node.endElement();
60
+ });
61
+ });
62
+ };
63
+ }
64
+ return undefined;
65
+ }, [isMoving]);
66
+ return jsx("svg", {
67
+ css: [svgStyles, isGlowing ? blurredStyles : notBlurredStyles, additionalCss],
68
+ ref: svgRef,
69
+ viewBox: "0 0 24 24",
70
+ preserveAspectRatio: "none"
71
+ }, jsx("defs", null, jsx("linearGradient", {
72
+ id: "".concat(namespaceId.current, "_lg1"),
73
+ gradientUnits: "userSpaceOnUse",
74
+ x1: "0%",
75
+ y1: "0",
76
+ x2: "400%",
77
+ y2: "0",
78
+ spreadMethod: "reflect"
79
+ }, jsx("animate", {
80
+ begin: "indefinite",
81
+ attributeName: "x1",
82
+ from: "0%",
83
+ to: "400%",
84
+ repeatCount: "indefinite",
85
+ dur: "3s"
86
+ }), jsx("animate", {
87
+ begin: "indefinite",
88
+ attributeName: "x2",
89
+ from: "400%",
90
+ to: "800%",
91
+ repeatCount: "indefinite",
92
+ dur: "3s"
93
+ }), jsx("stop", {
94
+ offset: "0",
95
+ stopColor: palette.blue
96
+ }), jsx("stop", {
97
+ offset: "0.25",
98
+ stopColor: palette.teal
99
+ }), jsx("stop", {
100
+ offset: "0.5",
101
+ stopColor: palette.yellow
102
+ }), jsx("stop", {
103
+ offset: "0.75",
104
+ stopColor: palette.teal
105
+ }), jsx("stop", {
106
+ offset: "1",
107
+ stopColor: palette.blue
108
+ })), jsx("linearGradient", {
109
+ id: "".concat(namespaceId.current, "_lg2"),
110
+ gradientUnits: "userSpaceOnUse",
111
+ x1: "0",
112
+ y1: "-100%",
113
+ x2: "0",
114
+ y2: "300%",
115
+ spreadMethod: "reflect"
116
+ }, jsx("animate", {
117
+ begin: "indefinite",
118
+ attributeName: "y1",
119
+ from: "-100%",
120
+ to: "300%",
121
+ repeatCount: "indefinite",
122
+ dur: "3s"
123
+ }), jsx("animate", {
124
+ begin: "indefinite",
125
+ attributeName: "y2",
126
+ from: "300%",
127
+ to: "700%",
128
+ repeatCount: "indefinite",
129
+ dur: "3s"
130
+ }), jsx("stop", {
131
+ offset: "0",
132
+ stopColor: palette.blue
133
+ }), jsx("stop", {
134
+ offset: "0.25",
135
+ stopColor: palette.teal
136
+ }), jsx("stop", {
137
+ offset: "0.5",
138
+ stopColor: palette.yellow
139
+ }), jsx("stop", {
140
+ offset: "0.75",
141
+ stopColor: palette.teal
142
+ }), jsx("stop", {
143
+ offset: "1",
144
+ stopColor: palette.blue
145
+ })), jsx("linearGradient", {
146
+ id: "".concat(namespaceId.current, "_lg3"),
147
+ gradientUnits: "userSpaceOnUse",
148
+ x1: "300%",
149
+ y1: "0",
150
+ x2: "700%",
151
+ y2: "0",
152
+ spreadMethod: "reflect"
153
+ }, jsx("animate", {
154
+ begin: "indefinite",
155
+ attributeName: "x1",
156
+ from: "300%",
157
+ to: "-100%",
158
+ repeatCount: "indefinite",
159
+ dur: "3s"
160
+ }), jsx("animate", {
161
+ begin: "indefinite",
162
+ attributeName: "x2",
163
+ from: "700%",
164
+ to: "300%",
165
+ repeatCount: "indefinite",
166
+ dur: "3s"
167
+ }), jsx("stop", {
168
+ offset: "0",
169
+ stopColor: palette.blue
170
+ }), jsx("stop", {
171
+ offset: "0.25",
172
+ stopColor: palette.teal
173
+ }), jsx("stop", {
174
+ offset: "0.5",
175
+ stopColor: palette.yellow
176
+ }), jsx("stop", {
177
+ offset: "0.75",
178
+ stopColor: palette.teal
179
+ }), jsx("stop", {
180
+ offset: "1",
181
+ stopColor: palette.blue
182
+ })), jsx("linearGradient", {
183
+ id: "".concat(namespaceId.current, "_lg4"),
184
+ gradientUnits: "userSpaceOnUse",
185
+ x1: "0",
186
+ y1: "0",
187
+ x2: "0",
188
+ y2: "400%",
189
+ spreadMethod: "reflect"
190
+ }, jsx("animate", {
191
+ begin: "indefinite",
192
+ attributeName: "y1",
193
+ from: "0%",
194
+ to: "-400%",
195
+ repeatCount: "indefinite",
196
+ dur: "3s"
197
+ }), jsx("animate", {
198
+ begin: "indefinite",
199
+ attributeName: "y2",
200
+ from: "400%",
201
+ to: "0%",
202
+ repeatCount: "indefinite",
203
+ dur: "3s"
204
+ }), jsx("stop", {
205
+ offset: "0",
206
+ stopColor: palette.blue
207
+ }), jsx("stop", {
208
+ offset: "0.25",
209
+ stopColor: palette.teal
210
+ }), jsx("stop", {
211
+ offset: "0.5",
212
+ stopColor: palette.yellow
213
+ }), jsx("stop", {
214
+ offset: "0.75",
215
+ stopColor: palette.teal
216
+ }), jsx("stop", {
217
+ offset: "1",
218
+ stopColor: palette.blue
219
+ }))), jsx("g", {
220
+ strokeWidth: "8"
221
+ }, jsx("path", {
222
+ stroke: "url(#".concat(namespaceId.current, "_lg1)"),
223
+ d: "M0 0h24",
224
+ vectorEffect: "non-scaling-stroke"
225
+ }), jsx("path", {
226
+ stroke: "url(#".concat(namespaceId.current, "_lg2)"),
227
+ d: "M24 0v24",
228
+ vectorEffect: "non-scaling-stroke"
229
+ }), jsx("path", {
230
+ stroke: "url(#".concat(namespaceId.current, "_lg3)"),
231
+ d: "M24 24H0",
232
+ vectorEffect: "non-scaling-stroke"
233
+ }), jsx("path", {
234
+ stroke: "url(#".concat(namespaceId.current, "_lg4)"),
235
+ d: "M0 24V0",
236
+ vectorEffect: "non-scaling-stroke"
237
+ })));
238
+ };
239
+ export default AnimatedSvgContainer;
@@ -0,0 +1,47 @@
1
+ /** @jsx jsx */
2
+ import { css, jsx } from '@emotion/react';
3
+ import React from 'react';
4
+ import AnimatedSvgContainer from './animated-svg-container';
5
+ import { INNER_BORDER_RADIUS } from '../constants';
6
+ var borderContainerStyles = css({
7
+ display: 'flex',
8
+ position: 'relative',
9
+ padding: "var(--ds-space-025, 2px)",
10
+ width: 'fit-content'
11
+ });
12
+ export var borderContentStyles = css({
13
+ borderRadius: INNER_BORDER_RADIUS,
14
+ flexGrow: 1,
15
+ zIndex: 1 // needs to be more than the svg container at least
16
+ });
17
+
18
+ /**
19
+ * The bulk of this file is originally from
20
+ * https://bitbucket.org/atlassian/barrel/src/master/ui/platform/ui-kit/ai
21
+ * with modifications.
22
+ */
23
+ var AIGlowingBorder = function AIGlowingBorder(_ref) {
24
+ var children = _ref.children,
25
+ palette = _ref.palette,
26
+ _ref$isMoving = _ref.isMoving,
27
+ isMoving = _ref$isMoving === void 0 ? true : _ref$isMoving,
28
+ isGlowing = _ref.isGlowing,
29
+ testId = _ref.testId,
30
+ additionalCss = _ref.additionalCss;
31
+ return jsx("div", {
32
+ css: [borderContainerStyles, additionalCss === null || additionalCss === void 0 ? void 0 : additionalCss.container],
33
+ "data-testid": testId
34
+ }, jsx(AnimatedSvgContainer, {
35
+ palette: palette,
36
+ isMoving: isMoving,
37
+ additionalCss: additionalCss === null || additionalCss === void 0 ? void 0 : additionalCss.animatedSvgContainer
38
+ }), isGlowing && jsx(AnimatedSvgContainer, {
39
+ palette: palette,
40
+ isMoving: isMoving,
41
+ isGlowing: true,
42
+ additionalCss: additionalCss === null || additionalCss === void 0 ? void 0 : additionalCss.animatedSvgContainer
43
+ }), jsx("div", {
44
+ css: borderContentStyles
45
+ }, children, " "));
46
+ };
47
+ export default AIGlowingBorder;
@@ -0,0 +1,47 @@
1
+ /**
2
+ * The bulk of this file is originally from
3
+ * https://bitbucket.org/atlassian/barrel/src/master/ui/platform/ui-kit/ai
4
+ * with modifications.
5
+ */
6
+
7
+ export var GLOW_SIZE = 8;
8
+ export var INNER_BORDER_RADIUS = 8;
9
+ export var OUTER_BORDER_RADIUS = 10;
10
+
11
+ // We don't yet have design system tokens representing the AI prism colour palette. We should replace this with
12
+ // equivalent tokens when available
13
+ /* eslint-disable @atlaskit/design-system/ensure-design-token-usage */
14
+ export var aiThemeTokens = {
15
+ blueUniqueGradientLight: '#00ACF8',
16
+ blueUniqueGradientDark: '#008BD2',
17
+ blue1000: '#092957',
18
+ blue800: '#0055CC',
19
+ blue700: '#0C66E4',
20
+ blue600: '#1D7AFC',
21
+ blue500: '#388BFF',
22
+ blue300: '#85B8FF',
23
+ blue200: '#CCE0FF',
24
+ blue100: '#E9F2FF',
25
+ teal500: '#37B4C3',
26
+ teal300: '#8BDBE5',
27
+ yellow500: '#CF9F02',
28
+ yellow200: '#F8E6A0',
29
+ red800: '#AE2A19',
30
+ red600: '#E34935',
31
+ orange500: '#F18D13',
32
+ orange300: '#FEC57B'
33
+ };
34
+ /* eslint-enable @atlaskit/design-system/ensure-design-token-usage */
35
+
36
+ export var AI_BORDER_PALETTE = {
37
+ dark: {
38
+ blue: aiThemeTokens.blue800,
39
+ teal: aiThemeTokens.teal500,
40
+ yellow: aiThemeTokens.yellow500
41
+ },
42
+ light: {
43
+ blue: aiThemeTokens.blue600,
44
+ teal: aiThemeTokens.teal300,
45
+ yellow: aiThemeTokens.yellow200
46
+ }
47
+ };
@@ -0,0 +1,37 @@
1
+ /** @jsx jsx */
2
+ import { css, jsx } from '@emotion/react';
3
+ import React from 'react';
4
+ import { useThemeObserver } from '@atlaskit/tokens';
5
+ import { AI_BORDER_PALETTE, INNER_BORDER_RADIUS } from './constants';
6
+ import AIGlowingBorder from './ai-glowing-border';
7
+ var contentStyles = css({
8
+ backgroundColor: "var(--ds-surface-raised, white)",
9
+ borderRadius: INNER_BORDER_RADIUS
10
+ });
11
+ var AIPrism = function AIPrism(_ref) {
12
+ var _AI_BORDER_PALETTE$co;
13
+ var children = _ref.children,
14
+ _ref$isGlowing = _ref.isGlowing,
15
+ isGlowing = _ref$isGlowing === void 0 ? true : _ref$isGlowing,
16
+ _ref$isMoving = _ref.isMoving,
17
+ isMoving = _ref$isMoving === void 0 ? true : _ref$isMoving,
18
+ isVisible = _ref.isVisible,
19
+ testId = _ref.testId;
20
+ var _useThemeObserver = useThemeObserver(),
21
+ _useThemeObserver$col = _useThemeObserver.colorMode,
22
+ colorMode = _useThemeObserver$col === void 0 ? 'light' : _useThemeObserver$col;
23
+ return jsx(AIGlowingBorder, {
24
+ additionalCss: {
25
+ animatedSvgContainer: css({
26
+ opacity: isVisible ? 1 : 0
27
+ })
28
+ },
29
+ palette: (_AI_BORDER_PALETTE$co = AI_BORDER_PALETTE[colorMode]) !== null && _AI_BORDER_PALETTE$co !== void 0 ? _AI_BORDER_PALETTE$co : AI_BORDER_PALETTE.light,
30
+ isGlowing: isGlowing,
31
+ isMoving: isMoving,
32
+ testId: testId
33
+ }, jsx("div", {
34
+ css: contentStyles
35
+ }, children));
36
+ };
37
+ export default AIPrism;
@@ -0,0 +1 @@
1
+ export {};
@@ -1,6 +1,6 @@
1
1
  import { MessageDescriptor } from 'react-intl-next';
2
2
  export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title_crossjoin' | 'direct_access_title_crossjoin' | 'direct_access_description_crossjoin' | 'direct_access_crossjoin' | 'request_access_description_crossjoin' | 'request_access_crossjoin' | 'request_access_pending_title_crossjoin' | 'request_access_pending_description_crossjoin' | 'request_access_pending_crossjoin' | 'request_denied_description_crossjoin' | 'access_exists_description_crossjoin' | 'not_found_description_crossjoin' | 'not_found_title_crossjoin';
3
- export type MessageKey = 'assigned_to' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'could_not_load_link' | 'download' | 'follow' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
3
+ export type MessageKey = 'assigned_to' | 'ai_summarize' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'could_not_load_link' | 'download' | 'follow' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
4
4
  type Messages = {
5
5
  [K in MessageKey]: MessageDescriptor;
6
6
  };
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { AISummaryBlockProps } from './types';
3
+ /**
4
+ * Represents an AISummaryBlock, designed to summarising link resource
5
+ * content using AI.
6
+ * @public
7
+ * @param {AISummaryBlockProps} AISummaryBlock
8
+ * @see Block
9
+ */
10
+ declare const AISummaryBlock: React.FC<AISummaryBlockProps>;
11
+ export default AISummaryBlock;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { AISummaryBlockProps } from '../types';
3
+ declare const AISummaryBlockResolvedView: React.FC<AISummaryBlockProps>;
4
+ export default AISummaryBlockResolvedView;
@@ -0,0 +1,23 @@
1
+ import { ActionItem, BlockProps, ElementItem } from '../types';
2
+ import { OnActionMenuOpenChangeOptions } from '../types';
3
+ export type AISummaryBlockProps = {
4
+ /**
5
+ * An array of actions to be displayed on the right
6
+ * after AI Summary button.
7
+ * @see ActionItem
8
+ */
9
+ actions?: ActionItem[];
10
+ /**
11
+ * An array of metadata elements to display on the left.
12
+ * @see ElementItem
13
+ */
14
+ metadata?: ElementItem[];
15
+ /**
16
+ * Function to be called when footer action dropdown open state is changed.
17
+ */
18
+ onActionMenuOpenChange?: (options: OnActionMenuOpenChangeOptions) => void;
19
+ /**
20
+ * Function to be called when AI Summary state changed.
21
+ */
22
+ onAIActionChange?: () => void;
23
+ } & BlockProps;
@@ -6,3 +6,4 @@ export { default as TitleBlock } from './title-block';
6
6
  export { default as CustomBlock } from './block';
7
7
  export { default as InternalFooterBlock } from './footer-block/resolved';
8
8
  export { default as RelatedUrlsBlock } from './related-urls-block';
9
+ export { default as AISummaryBlock } from './ai-summary-block';
@@ -9,6 +9,7 @@ export declare const getGapSize: (size: SmartLinkSize) => number;
9
9
  export declare const getBaseStyles: (direction: SmartLinkDirection, size: SmartLinkSize) => SerializedStyles;
10
10
  export declare const highlightRemoveStyles: SerializedStyles;
11
11
  export declare const isJSXElementNull: (children: JSX.Element) => boolean;
12
+ export declare const getActionGroupStyles: (size: SmartLinkSize) => SerializedStyles | undefined;
12
13
  export declare const filterActionItems: (items?: ActionItem[], context?: FlexibleUiDataContext) => ActionItem[];
13
14
  export declare const renderChildren: (children: React.ReactNode, size: SmartLinkSize) => React.ReactNode;
14
15
  export declare const renderElementItems: (items?: ElementItem[], display?: ElementDisplaySchemaType) => React.ReactNode | undefined;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { SVGProps } from '@atlaskit/icon/types';
3
+ /**
4
+ * The bulk of this file is originally from
5
+ * https://bitbucket.org/atlassian/barrel/src/master/ui/platform/ui-kit/ai
6
+ * with modifications
7
+ */
8
+ declare const AiIcon: (props: SVGProps) => JSX.Element;
9
+ export default AiIcon;
@@ -0,0 +1,9 @@
1
+ import React from 'react';
2
+ import type { AnimatedSvgContainerProps } from './types';
3
+ /**
4
+ * The bulk of this file is originally from
5
+ * https://bitbucket.org/atlassian/barrel/src/master/ui/platform/ui-kit/ai
6
+ * with modifications.
7
+ */
8
+ declare const AnimatedSvgContainer: React.FC<AnimatedSvgContainerProps>;
9
+ export default AnimatedSvgContainer;
@@ -0,0 +1,10 @@
1
+ import React from 'react';
2
+ import type { AIGlowingBorderProps } from './types';
3
+ export declare const borderContentStyles: import("@emotion/react").SerializedStyles;
4
+ /**
5
+ * The bulk of this file is originally from
6
+ * https://bitbucket.org/atlassian/barrel/src/master/ui/platform/ui-kit/ai
7
+ * with modifications.
8
+ */
9
+ declare const AIGlowingBorder: React.FC<AIGlowingBorderProps>;
10
+ export default AIGlowingBorder;
@@ -0,0 +1,25 @@
1
+ import type { ReactNode } from 'react';
2
+ import type { SerializedStyles } from '@emotion/react';
3
+ import type { AIBorderPalette } from '../types';
4
+ /**
5
+ * The bulk of this file is originally from
6
+ * https://bitbucket.org/atlassian/barrel/src/master/ui/platform/ui-kit/ai
7
+ * with modifications.
8
+ */
9
+ export type AIGlowingBorderProps = {
10
+ children: ReactNode;
11
+ palette: AIBorderPalette;
12
+ isMoving?: boolean;
13
+ isGlowing?: boolean;
14
+ testId?: string;
15
+ additionalCss?: {
16
+ container?: SerializedStyles;
17
+ animatedSvgContainer?: SerializedStyles;
18
+ };
19
+ };
20
+ export type AnimatedSvgContainerProps = {
21
+ palette: AIBorderPalette;
22
+ isMoving?: boolean;
23
+ isGlowing?: boolean;
24
+ additionalCss?: SerializedStyles;
25
+ };
@@ -0,0 +1,30 @@
1
+ import { AIThemeBorderPalette } from './types';
2
+ /**
3
+ * The bulk of this file is originally from
4
+ * https://bitbucket.org/atlassian/barrel/src/master/ui/platform/ui-kit/ai
5
+ * with modifications.
6
+ */
7
+ export declare const GLOW_SIZE = 8;
8
+ export declare const INNER_BORDER_RADIUS = 8;
9
+ export declare const OUTER_BORDER_RADIUS = 10;
10
+ export declare const aiThemeTokens: {
11
+ blueUniqueGradientLight: string;
12
+ blueUniqueGradientDark: string;
13
+ blue1000: string;
14
+ blue800: string;
15
+ blue700: string;
16
+ blue600: string;
17
+ blue500: string;
18
+ blue300: string;
19
+ blue200: string;
20
+ blue100: string;
21
+ teal500: string;
22
+ teal300: string;
23
+ yellow500: string;
24
+ yellow200: string;
25
+ red800: string;
26
+ red600: string;
27
+ orange500: string;
28
+ orange300: string;
29
+ };
30
+ export declare const AI_BORDER_PALETTE: AIThemeBorderPalette;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { AIPrismProps } from './types';
3
+ declare const AIPrism: React.FC<AIPrismProps>;
4
+ export default AIPrism;
@@ -0,0 +1,13 @@
1
+ import { AIGlowingBorderProps } from './ai-glowing-border/types';
2
+ export type AIPrismProps = Pick<AIGlowingBorderProps, 'isMoving' | 'isGlowing' | 'testId'> & {
3
+ isVisible?: boolean;
4
+ };
5
+ export type AIBorderPalette = {
6
+ blue: string;
7
+ yellow: string;
8
+ teal: string;
9
+ };
10
+ export type AIThemeBorderPalette = {
11
+ dark: AIBorderPalette;
12
+ light: AIBorderPalette;
13
+ };
@@ -1,6 +1,6 @@
1
1
  import { MessageDescriptor } from 'react-intl-next';
2
2
  export type RequestAccessMessageKey = 'click_to_join' | 'click_to_join_description' | 'forbidden_description' | 'request_access' | 'request_access_description' | 'request_access_pending' | 'request_access_pending_description' | 'request_denied_description' | 'default_no_access_title_crossjoin' | 'direct_access_title_crossjoin' | 'direct_access_description_crossjoin' | 'direct_access_crossjoin' | 'request_access_description_crossjoin' | 'request_access_crossjoin' | 'request_access_pending_title_crossjoin' | 'request_access_pending_description_crossjoin' | 'request_access_pending_crossjoin' | 'request_denied_description_crossjoin' | 'access_exists_description_crossjoin' | 'not_found_description_crossjoin' | 'not_found_title_crossjoin';
3
- export type MessageKey = 'assigned_to' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'could_not_load_link' | 'download' | 'follow' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
3
+ export type MessageKey = 'assigned_to' | 'ai_summarize' | 'cannot_find_link' | 'connect_link_account_card' | 'connect_link_account_card_name' | 'connect_link_account_card_description' | 'connect_unauthorised_account_action' | 'connect_unauthorised_account_description' | 'connect_unauthorised_account_description_no_provider' | 'continue' | 'copy_url_to_clipboard' | 'could_not_load_link' | 'download' | 'follow' | 'go_back' | 'invalid_permissions' | 'invalid_permissions_description' | 'join_to_view' | 'connect_link_account' | 'created_by' | 'created_on_relative' | 'created_on_absolute' | 'check_this_link' | 'delete' | 'edit' | 'learn_more_about_smart_links' | 'learn_more_about_connecting_account' | 'loading' | 'link_safety_warning_message' | 'modified_by' | 'modified_on_relative' | 'modified_on_absolute' | 'more_actions' | 'not_found_title' | 'not_found_description' | 'open_issue_in_jira' | 'open_link_in_a_new_tab' | 'owned_by' | 'preview_improved' | 'preview_close' | 'preview_max_size' | 'preview_min_size' | 'priority_blocker' | 'priority_critical' | 'priority_high' | 'priority_highest' | 'priority_low' | 'priority_lowest' | 'priority_major' | 'priority_medium' | 'priority_minor' | 'priority_trivial' | 'priority_undefined' | 'forbidden_access' | 'pending_request' | 'read_time' | 'restricted_link' | 'request_access_to_view' | 'request_denied' | 'sent_on_relative' | 'sent_on_absolute' | 'status_change_load_error' | 'status_change_permission_error' | 'status_change_update_error' | 'try_again' | 'try_another_account' | 'unauthorised_account_description' | 'unauthorised_account_description_no_provider' | 'unauthorised_account_name' | 'unauthorised_account_name_no_provider' | 'unassigned' | 'unfollow' | 'view' | 'viewIn' | 'viewOriginal' | 'actions' | 'add_account' | 'cancel' | 'close' | 'connect_to' | 'connect_account_description' | 'retry' | 'save' | 'unlink_account' | RequestAccessMessageKey | 'related_work_items_not_found' | 'last_mentioned_in' | 'related' | 'generic_error_message';
4
4
  type Messages = {
5
5
  [K in MessageKey]: MessageDescriptor;
6
6
  };
@@ -0,0 +1,11 @@
1
+ import React from 'react';
2
+ import { AISummaryBlockProps } from './types';
3
+ /**
4
+ * Represents an AISummaryBlock, designed to summarising link resource
5
+ * content using AI.
6
+ * @public
7
+ * @param {AISummaryBlockProps} AISummaryBlock
8
+ * @see Block
9
+ */
10
+ declare const AISummaryBlock: React.FC<AISummaryBlockProps>;
11
+ export default AISummaryBlock;
@@ -0,0 +1,4 @@
1
+ import React from 'react';
2
+ import type { AISummaryBlockProps } from '../types';
3
+ declare const AISummaryBlockResolvedView: React.FC<AISummaryBlockProps>;
4
+ export default AISummaryBlockResolvedView;
@@ -0,0 +1,23 @@
1
+ import { ActionItem, BlockProps, ElementItem } from '../types';
2
+ import { OnActionMenuOpenChangeOptions } from '../types';
3
+ export type AISummaryBlockProps = {
4
+ /**
5
+ * An array of actions to be displayed on the right
6
+ * after AI Summary button.
7
+ * @see ActionItem
8
+ */
9
+ actions?: ActionItem[];
10
+ /**
11
+ * An array of metadata elements to display on the left.
12
+ * @see ElementItem
13
+ */
14
+ metadata?: ElementItem[];
15
+ /**
16
+ * Function to be called when footer action dropdown open state is changed.
17
+ */
18
+ onActionMenuOpenChange?: (options: OnActionMenuOpenChangeOptions) => void;
19
+ /**
20
+ * Function to be called when AI Summary state changed.
21
+ */
22
+ onAIActionChange?: () => void;
23
+ } & BlockProps;
@@ -6,3 +6,4 @@ export { default as TitleBlock } from './title-block';
6
6
  export { default as CustomBlock } from './block';
7
7
  export { default as InternalFooterBlock } from './footer-block/resolved';
8
8
  export { default as RelatedUrlsBlock } from './related-urls-block';
9
+ export { default as AISummaryBlock } from './ai-summary-block';
@@ -9,6 +9,7 @@ export declare const getGapSize: (size: SmartLinkSize) => number;
9
9
  export declare const getBaseStyles: (direction: SmartLinkDirection, size: SmartLinkSize) => SerializedStyles;
10
10
  export declare const highlightRemoveStyles: SerializedStyles;
11
11
  export declare const isJSXElementNull: (children: JSX.Element) => boolean;
12
+ export declare const getActionGroupStyles: (size: SmartLinkSize) => SerializedStyles | undefined;
12
13
  export declare const filterActionItems: (items?: ActionItem[], context?: FlexibleUiDataContext) => ActionItem[];
13
14
  export declare const renderChildren: (children: React.ReactNode, size: SmartLinkSize) => React.ReactNode;
14
15
  export declare const renderElementItems: (items?: ElementItem[], display?: ElementDisplaySchemaType) => React.ReactNode | undefined;
@@ -0,0 +1,9 @@
1
+ /// <reference types="react" />
2
+ import type { SVGProps } from '@atlaskit/icon/types';
3
+ /**
4
+ * The bulk of this file is originally from
5
+ * https://bitbucket.org/atlassian/barrel/src/master/ui/platform/ui-kit/ai
6
+ * with modifications
7
+ */
8
+ declare const AiIcon: (props: SVGProps) => JSX.Element;
9
+ export default AiIcon;