@atlaskit/smart-card 26.46.4 → 26.46.5
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +7 -0
- package/dist/cjs/utils/analytics/analytics.js +1 -1
- package/dist/cjs/view/LinkUrl/index.js +1 -1
- package/dist/cjs/view/common/ai-summary/index.js +38 -0
- package/dist/es2019/utils/analytics/analytics.js +1 -1
- package/dist/es2019/view/LinkUrl/index.js +1 -1
- package/dist/es2019/view/common/ai-summary/index.js +35 -0
- package/dist/esm/utils/analytics/analytics.js +1 -1
- package/dist/esm/view/LinkUrl/index.js +1 -1
- package/dist/esm/view/common/ai-summary/index.js +31 -0
- package/dist/types/view/common/ai-summary/index.d.ts +20 -0
- package/dist/types-ts4.5/view/common/ai-summary/index.d.ts +20 -0
- package/package.json +3 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
# @atlaskit/smart-card
|
|
2
2
|
|
|
3
|
+
## 26.46.5
|
|
4
|
+
|
|
5
|
+
### Patch Changes
|
|
6
|
+
|
|
7
|
+
- [#71028](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/71028) [`8b1c78df8102`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/8b1c78df8102) - AI Summary Preview component added
|
|
8
|
+
- Updated dependencies
|
|
9
|
+
|
|
3
10
|
## 26.46.4
|
|
4
11
|
|
|
5
12
|
### Patch Changes
|
|
@@ -22,7 +22,7 @@ var ANALYTICS_CHANNEL = exports.ANALYTICS_CHANNEL = 'media';
|
|
|
22
22
|
var context = exports.context = {
|
|
23
23
|
componentName: 'smart-cards',
|
|
24
24
|
packageName: "@atlaskit/smart-card",
|
|
25
|
-
packageVersion: "26.46.
|
|
25
|
+
packageVersion: "26.46.5"
|
|
26
26
|
};
|
|
27
27
|
var TrackQuickActionType = exports.TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
28
28
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -17,7 +17,7 @@ var _excluded = ["href", "children", "checkSafety", "onClick", "testId"],
|
|
|
17
17
|
_excluded2 = ["isLinkSafe", "showSafetyWarningModal"];
|
|
18
18
|
var PACKAGE_DATA = {
|
|
19
19
|
packageName: "@atlaskit/smart-card",
|
|
20
|
-
packageVersion: "26.46.
|
|
20
|
+
packageVersion: "26.46.5",
|
|
21
21
|
componentName: 'linkUrl'
|
|
22
22
|
};
|
|
23
23
|
var Link = (0, _click.withLinkClickedEvent)('a');
|
|
@@ -0,0 +1,38 @@
|
|
|
1
|
+
"use strict";
|
|
2
|
+
|
|
3
|
+
var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefault");
|
|
4
|
+
Object.defineProperty(exports, "__esModule", {
|
|
5
|
+
value: true
|
|
6
|
+
});
|
|
7
|
+
exports.default = void 0;
|
|
8
|
+
var _taggedTemplateLiteral2 = _interopRequireDefault(require("@babel/runtime/helpers/taggedTemplateLiteral"));
|
|
9
|
+
var _react = _interopRequireDefault(require("react"));
|
|
10
|
+
var _markdownToJsx = _interopRequireDefault(require("markdown-to-jsx"));
|
|
11
|
+
var _react2 = require("@emotion/react");
|
|
12
|
+
var _templateObject;
|
|
13
|
+
/** @jsx jsx */
|
|
14
|
+
var AISummaryCSS = (0, _react2.css)(_templateObject || (_templateObject = (0, _taggedTemplateLiteral2.default)(["\n overflow-y: auto;\n font-size: 0.75rem;\n line-height: 1rem;\n word-wrap: break-word;\n white-space: normal;\n"])));
|
|
15
|
+
/**
|
|
16
|
+
* A component to render a response from AI in markdown text.
|
|
17
|
+
* @internal
|
|
18
|
+
* @param {AISummaryProps} AISummaryProps
|
|
19
|
+
*/
|
|
20
|
+
|
|
21
|
+
var AISummary = function AISummary(_ref) {
|
|
22
|
+
var content = _ref.content,
|
|
23
|
+
overrideCss = _ref.overrideCss,
|
|
24
|
+
_ref$testId = _ref.testId,
|
|
25
|
+
testId = _ref$testId === void 0 ? 'ai-summary' : _ref$testId;
|
|
26
|
+
if (!content) {
|
|
27
|
+
return null;
|
|
28
|
+
}
|
|
29
|
+
return (0, _react2.jsx)(_markdownToJsx.default, {
|
|
30
|
+
"data-testid": testId,
|
|
31
|
+
css: [AISummaryCSS, overrideCss],
|
|
32
|
+
children: content,
|
|
33
|
+
options: {
|
|
34
|
+
forceWrapper: true
|
|
35
|
+
}
|
|
36
|
+
});
|
|
37
|
+
};
|
|
38
|
+
var _default = exports.default = AISummary;
|
|
@@ -4,7 +4,7 @@ export const ANALYTICS_CHANNEL = 'media';
|
|
|
4
4
|
export const context = {
|
|
5
5
|
componentName: 'smart-cards',
|
|
6
6
|
packageName: "@atlaskit/smart-card",
|
|
7
|
-
packageVersion: "26.46.
|
|
7
|
+
packageVersion: "26.46.5"
|
|
8
8
|
};
|
|
9
9
|
export let TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
10
10
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -7,7 +7,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
7
7
|
import LinkWarningModal from './LinkWarningModal';
|
|
8
8
|
const PACKAGE_DATA = {
|
|
9
9
|
packageName: "@atlaskit/smart-card",
|
|
10
|
-
packageVersion: "26.46.
|
|
10
|
+
packageVersion: "26.46.5",
|
|
11
11
|
componentName: 'linkUrl'
|
|
12
12
|
};
|
|
13
13
|
const Link = withLinkClickedEvent('a');
|
|
@@ -0,0 +1,35 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import Markdown from 'markdown-to-jsx';
|
|
4
|
+
import { css, jsx } from '@emotion/react';
|
|
5
|
+
const AISummaryCSS = css`
|
|
6
|
+
overflow-y: auto;
|
|
7
|
+
font-size: 0.75rem;
|
|
8
|
+
line-height: 1rem;
|
|
9
|
+
word-wrap: break-word;
|
|
10
|
+
white-space: normal;
|
|
11
|
+
`;
|
|
12
|
+
/**
|
|
13
|
+
* A component to render a response from AI in markdown text.
|
|
14
|
+
* @internal
|
|
15
|
+
* @param {AISummaryProps} AISummaryProps
|
|
16
|
+
*/
|
|
17
|
+
|
|
18
|
+
const AISummary = ({
|
|
19
|
+
content,
|
|
20
|
+
overrideCss,
|
|
21
|
+
testId = 'ai-summary'
|
|
22
|
+
}) => {
|
|
23
|
+
if (!content) {
|
|
24
|
+
return null;
|
|
25
|
+
}
|
|
26
|
+
return jsx(Markdown, {
|
|
27
|
+
"data-testid": testId,
|
|
28
|
+
css: [AISummaryCSS, overrideCss],
|
|
29
|
+
children: content,
|
|
30
|
+
options: {
|
|
31
|
+
forceWrapper: true
|
|
32
|
+
}
|
|
33
|
+
});
|
|
34
|
+
};
|
|
35
|
+
export default AISummary;
|
|
@@ -15,7 +15,7 @@ export var ANALYTICS_CHANNEL = 'media';
|
|
|
15
15
|
export var context = {
|
|
16
16
|
componentName: 'smart-cards',
|
|
17
17
|
packageName: "@atlaskit/smart-card",
|
|
18
|
-
packageVersion: "26.46.
|
|
18
|
+
packageVersion: "26.46.5"
|
|
19
19
|
};
|
|
20
20
|
export var TrackQuickActionType = /*#__PURE__*/function (TrackQuickActionType) {
|
|
21
21
|
TrackQuickActionType["StatusUpdate"] = "StatusUpdate";
|
|
@@ -10,7 +10,7 @@ import { useLinkWarningModal } from './LinkWarningModal/hooks/use-link-warning-m
|
|
|
10
10
|
import LinkWarningModal from './LinkWarningModal';
|
|
11
11
|
var PACKAGE_DATA = {
|
|
12
12
|
packageName: "@atlaskit/smart-card",
|
|
13
|
-
packageVersion: "26.46.
|
|
13
|
+
packageVersion: "26.46.5",
|
|
14
14
|
componentName: 'linkUrl'
|
|
15
15
|
};
|
|
16
16
|
var Link = withLinkClickedEvent('a');
|
|
@@ -0,0 +1,31 @@
|
|
|
1
|
+
import _taggedTemplateLiteral from "@babel/runtime/helpers/taggedTemplateLiteral";
|
|
2
|
+
var _templateObject;
|
|
3
|
+
/** @jsx jsx */
|
|
4
|
+
import React from 'react';
|
|
5
|
+
import Markdown from 'markdown-to-jsx';
|
|
6
|
+
import { css, jsx } from '@emotion/react';
|
|
7
|
+
var AISummaryCSS = css(_templateObject || (_templateObject = _taggedTemplateLiteral(["\n overflow-y: auto;\n font-size: 0.75rem;\n line-height: 1rem;\n word-wrap: break-word;\n white-space: normal;\n"])));
|
|
8
|
+
/**
|
|
9
|
+
* A component to render a response from AI in markdown text.
|
|
10
|
+
* @internal
|
|
11
|
+
* @param {AISummaryProps} AISummaryProps
|
|
12
|
+
*/
|
|
13
|
+
|
|
14
|
+
var AISummary = function AISummary(_ref) {
|
|
15
|
+
var content = _ref.content,
|
|
16
|
+
overrideCss = _ref.overrideCss,
|
|
17
|
+
_ref$testId = _ref.testId,
|
|
18
|
+
testId = _ref$testId === void 0 ? 'ai-summary' : _ref$testId;
|
|
19
|
+
if (!content) {
|
|
20
|
+
return null;
|
|
21
|
+
}
|
|
22
|
+
return jsx(Markdown, {
|
|
23
|
+
"data-testid": testId,
|
|
24
|
+
css: [AISummaryCSS, overrideCss],
|
|
25
|
+
children: content,
|
|
26
|
+
options: {
|
|
27
|
+
forceWrapper: true
|
|
28
|
+
}
|
|
29
|
+
});
|
|
30
|
+
};
|
|
31
|
+
export default AISummary;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SerializedStyles } from '@emotion/react';
|
|
4
|
+
type AISummaryProps = {
|
|
5
|
+
content?: string;
|
|
6
|
+
showAIIcon?: boolean;
|
|
7
|
+
overrideCss?: SerializedStyles;
|
|
8
|
+
/**
|
|
9
|
+
* appears as a data attribute `data-testid` in the rendered code,
|
|
10
|
+
* serving as a hook for automated tests
|
|
11
|
+
*/
|
|
12
|
+
testId?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A component to render a response from AI in markdown text.
|
|
16
|
+
* @internal
|
|
17
|
+
* @param {AISummaryProps} AISummaryProps
|
|
18
|
+
*/
|
|
19
|
+
declare const AISummary: React.FC<AISummaryProps>;
|
|
20
|
+
export default AISummary;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
/** @jsx jsx */
|
|
2
|
+
import React from 'react';
|
|
3
|
+
import { SerializedStyles } from '@emotion/react';
|
|
4
|
+
type AISummaryProps = {
|
|
5
|
+
content?: string;
|
|
6
|
+
showAIIcon?: boolean;
|
|
7
|
+
overrideCss?: SerializedStyles;
|
|
8
|
+
/**
|
|
9
|
+
* appears as a data attribute `data-testid` in the rendered code,
|
|
10
|
+
* serving as a hook for automated tests
|
|
11
|
+
*/
|
|
12
|
+
testId?: string;
|
|
13
|
+
};
|
|
14
|
+
/**
|
|
15
|
+
* A component to render a response from AI in markdown text.
|
|
16
|
+
* @internal
|
|
17
|
+
* @param {AISummaryProps} AISummaryProps
|
|
18
|
+
*/
|
|
19
|
+
declare const AISummary: React.FC<AISummaryProps>;
|
|
20
|
+
export default AISummary;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/smart-card",
|
|
3
|
-
"version": "26.46.
|
|
3
|
+
"version": "26.46.5",
|
|
4
4
|
"description": "Smart card component",
|
|
5
5
|
"publishConfig": {
|
|
6
6
|
"registry": "https://registry.npmjs.org/"
|
|
@@ -31,7 +31,7 @@
|
|
|
31
31
|
"@atlaskit/avatar-group": "^9.5.0",
|
|
32
32
|
"@atlaskit/badge": "^15.2.0",
|
|
33
33
|
"@atlaskit/button": "^17.3.0",
|
|
34
|
-
"@atlaskit/dropdown-menu": "^12.
|
|
34
|
+
"@atlaskit/dropdown-menu": "^12.5.0",
|
|
35
35
|
"@atlaskit/icon": "^22.0.0",
|
|
36
36
|
"@atlaskit/icon-file-type": "^6.4.0",
|
|
37
37
|
"@atlaskit/icon-object": "^6.3.0",
|
|
@@ -60,6 +60,7 @@
|
|
|
60
60
|
"@formatjs/intl-utils": "^3.8.4",
|
|
61
61
|
"facepaint": "^1.2.1",
|
|
62
62
|
"json-ld-types": "^3.11.0",
|
|
63
|
+
"markdown-to-jsx": "^7.1.7",
|
|
63
64
|
"react-error-boundary": "^3.1.3",
|
|
64
65
|
"react-lazily-render": "^1.2.0",
|
|
65
66
|
"react-loadable": "^5.1.0",
|