@atlaskit/rovo-agent-components 8.2.0 → 8.2.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.
- package/CHANGELOG.md +6 -0
- package/dist/cjs/ui/agent-avatar/generated-avatars/index.js +18 -12
- package/dist/es2019/ui/agent-avatar/generated-avatars/index.js +6 -5
- package/dist/esm/ui/agent-avatar/generated-avatars/index.js +17 -11
- package/dist/types/ui/agent-avatar/generated-avatars/index.d.ts +8 -0
- package/package.json +5 -5
package/CHANGELOG.md
CHANGED
|
@@ -5,15 +5,18 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
|
|
|
5
5
|
Object.defineProperty(exports, "__esModule", {
|
|
6
6
|
value: true
|
|
7
7
|
});
|
|
8
|
-
exports.yellowColor = exports.purpleColor = exports.greenColor = exports.getNumberIdForAvatar = exports.blueColor = exports.TOTAL_AVATAR_COMBINATIONS = exports.GeneratedAvatar = exports.AgentBanner = void 0;
|
|
8
|
+
exports.yellowColor = exports.purpleColor = exports.greenColor = exports.getNumberIdForAvatar = exports.getAgentAvatarColor = exports.blueColor = exports.TOTAL_AVATAR_COMBINATIONS = exports.GeneratedAvatar = exports.AgentBanner = void 0;
|
|
9
9
|
require("./index.compiled.css");
|
|
10
10
|
var _runtime = require("@compiled/react/runtime");
|
|
11
11
|
var _typeof2 = _interopRequireDefault(require("@babel/runtime/helpers/typeof"));
|
|
12
|
+
var _defineProperty2 = _interopRequireDefault(require("@babel/runtime/helpers/defineProperty"));
|
|
12
13
|
var _react = _interopRequireWildcard(require("react"));
|
|
13
14
|
var _avatar = require("@atlaskit/avatar");
|
|
14
15
|
var _css = require("@atlaskit/css");
|
|
15
16
|
var _platformFeatureFlags = require("@atlaskit/platform-feature-flags");
|
|
16
17
|
var _compiled = require("@atlaskit/primitives/compiled");
|
|
18
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
19
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { (0, _defineProperty2.default)(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
17
20
|
function _interopRequireWildcard(e, t) { if ("function" == typeof WeakMap) var r = new WeakMap(), n = new WeakMap(); return (_interopRequireWildcard = function _interopRequireWildcard(e, t) { if (!t && e && e.__esModule) return e; var o, i, f = { __proto__: null, default: e }; if (null === e || "object" != (0, _typeof2.default)(e) && "function" != typeof e) return f; if (o = t ? n : r) { if (o.has(e)) return o.get(e); o.set(e, f); } for (var _t in e) "default" !== _t && {}.hasOwnProperty.call(e, _t) && ((i = (o = Object.defineProperty) && Object.getOwnPropertyDescriptor(e, _t)) && (i.get || i.set) ? o(f, _t, i) : f[_t] = e[_t]); return f; })(e, t); }
|
|
18
21
|
var styles = {
|
|
19
22
|
image: "_5ral1dfr _4t3i1osq _1bsb1osq _1e0c1txw _1bah1h6o _4cvr1h6o",
|
|
@@ -689,6 +692,11 @@ var getAvatarRender = function getAvatarRender(_ref3) {
|
|
|
689
692
|
color: blueColor
|
|
690
693
|
};
|
|
691
694
|
};
|
|
695
|
+
var getAgentAvatarColor = exports.getAgentAvatarColor = function getAgentAvatarColor(props) {
|
|
696
|
+
return getAvatarRender(_objectSpread(_objectSpread({}, props), {}, {
|
|
697
|
+
size: 'medium'
|
|
698
|
+
})).color;
|
|
699
|
+
};
|
|
692
700
|
var AgentBanner = exports.AgentBanner = function AgentBanner(_ref4) {
|
|
693
701
|
var agentNamedId = _ref4.agentNamedId,
|
|
694
702
|
agentId = _ref4.agentId,
|
|
@@ -697,14 +705,12 @@ var AgentBanner = exports.AgentBanner = function AgentBanner(_ref4) {
|
|
|
697
705
|
creatorType = _ref4.creatorType,
|
|
698
706
|
height = _ref4.height,
|
|
699
707
|
fillSpace = _ref4.fillSpace;
|
|
700
|
-
var
|
|
701
|
-
|
|
702
|
-
|
|
703
|
-
|
|
704
|
-
|
|
705
|
-
|
|
706
|
-
}),
|
|
707
|
-
color = _getAvatarRender.color;
|
|
708
|
+
var color = getAgentAvatarColor({
|
|
709
|
+
agentNamedId: agentNamedId,
|
|
710
|
+
agentId: agentId,
|
|
711
|
+
agentIdentityAccountId: agentIdentityAccountId,
|
|
712
|
+
isRovoDev: isRovoDev
|
|
713
|
+
});
|
|
708
714
|
var isRemoteA2A = (0, _platformFeatureFlags.fg)('jira_improve_agent_profile_for_a2a') && creatorType === 'REMOTE_A2A';
|
|
709
715
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
710
716
|
xcss: (0, _css.cx)(styles.banner, fillSpace ? styles.bannerFillSpace : undefined, isRemoteA2A ? styles.bannerRemoteA2A : undefined),
|
|
@@ -715,9 +721,9 @@ var AgentBanner = exports.AgentBanner = function AgentBanner(_ref4) {
|
|
|
715
721
|
});
|
|
716
722
|
};
|
|
717
723
|
var GeneratedAvatar = exports.GeneratedAvatar = function GeneratedAvatar(props) {
|
|
718
|
-
var
|
|
719
|
-
render =
|
|
720
|
-
color =
|
|
724
|
+
var _getAvatarRender = getAvatarRender(props),
|
|
725
|
+
render = _getAvatarRender.render,
|
|
726
|
+
color = _getAvatarRender.color;
|
|
721
727
|
var onLoad = props.onLoad;
|
|
722
728
|
return /*#__PURE__*/_react.default.createElement(_compiled.Box, {
|
|
723
729
|
xcss: styles.image,
|
|
@@ -463,6 +463,10 @@ const getAvatarRender = ({
|
|
|
463
463
|
color: blueColor
|
|
464
464
|
};
|
|
465
465
|
};
|
|
466
|
+
export const getAgentAvatarColor = props => getAvatarRender({
|
|
467
|
+
...props,
|
|
468
|
+
size: 'medium'
|
|
469
|
+
}).color;
|
|
466
470
|
export const AgentBanner = ({
|
|
467
471
|
agentNamedId,
|
|
468
472
|
agentId,
|
|
@@ -472,14 +476,11 @@ export const AgentBanner = ({
|
|
|
472
476
|
height,
|
|
473
477
|
fillSpace
|
|
474
478
|
}) => {
|
|
475
|
-
const {
|
|
476
|
-
color
|
|
477
|
-
} = getAvatarRender({
|
|
479
|
+
const color = getAgentAvatarColor({
|
|
478
480
|
agentNamedId,
|
|
479
481
|
agentId,
|
|
480
482
|
agentIdentityAccountId,
|
|
481
|
-
isRovoDev
|
|
482
|
-
size: 'medium'
|
|
483
|
+
isRovoDev
|
|
483
484
|
});
|
|
484
485
|
const isRemoteA2A = fg('jira_improve_agent_profile_for_a2a') && creatorType === 'REMOTE_A2A';
|
|
485
486
|
return /*#__PURE__*/React.createElement(Box, {
|
|
@@ -1,6 +1,9 @@
|
|
|
1
1
|
/* index.tsx generated by @compiled/babel-plugin v0.40.0 */
|
|
2
|
+
import _defineProperty from "@babel/runtime/helpers/defineProperty";
|
|
2
3
|
import "./index.compiled.css";
|
|
3
4
|
import { ax, ix } from "@compiled/react/runtime";
|
|
5
|
+
function ownKeys(e, r) { var t = Object.keys(e); if (Object.getOwnPropertySymbols) { var o = Object.getOwnPropertySymbols(e); r && (o = o.filter(function (r) { return Object.getOwnPropertyDescriptor(e, r).enumerable; })), t.push.apply(t, o); } return t; }
|
|
6
|
+
function _objectSpread(e) { for (var r = 1; r < arguments.length; r++) { var t = null != arguments[r] ? arguments[r] : {}; r % 2 ? ownKeys(Object(t), !0).forEach(function (r) { _defineProperty(e, r, t[r]); }) : Object.getOwnPropertyDescriptors ? Object.defineProperties(e, Object.getOwnPropertyDescriptors(t)) : ownKeys(Object(t)).forEach(function (r) { Object.defineProperty(e, r, Object.getOwnPropertyDescriptor(t, r)); }); } return e; }
|
|
4
7
|
import React, { lazy, Suspense, useEffect } from 'react';
|
|
5
8
|
import { AVATAR_SIZES } from '@atlaskit/avatar';
|
|
6
9
|
import { cx } from '@atlaskit/css';
|
|
@@ -604,6 +607,11 @@ var getAvatarRender = function getAvatarRender(_ref3) {
|
|
|
604
607
|
color: blueColor
|
|
605
608
|
};
|
|
606
609
|
};
|
|
610
|
+
export var getAgentAvatarColor = function getAgentAvatarColor(props) {
|
|
611
|
+
return getAvatarRender(_objectSpread(_objectSpread({}, props), {}, {
|
|
612
|
+
size: 'medium'
|
|
613
|
+
})).color;
|
|
614
|
+
};
|
|
607
615
|
export var AgentBanner = function AgentBanner(_ref4) {
|
|
608
616
|
var agentNamedId = _ref4.agentNamedId,
|
|
609
617
|
agentId = _ref4.agentId,
|
|
@@ -612,14 +620,12 @@ export var AgentBanner = function AgentBanner(_ref4) {
|
|
|
612
620
|
creatorType = _ref4.creatorType,
|
|
613
621
|
height = _ref4.height,
|
|
614
622
|
fillSpace = _ref4.fillSpace;
|
|
615
|
-
var
|
|
616
|
-
|
|
617
|
-
|
|
618
|
-
|
|
619
|
-
|
|
620
|
-
|
|
621
|
-
}),
|
|
622
|
-
color = _getAvatarRender.color;
|
|
623
|
+
var color = getAgentAvatarColor({
|
|
624
|
+
agentNamedId: agentNamedId,
|
|
625
|
+
agentId: agentId,
|
|
626
|
+
agentIdentityAccountId: agentIdentityAccountId,
|
|
627
|
+
isRovoDev: isRovoDev
|
|
628
|
+
});
|
|
623
629
|
var isRemoteA2A = fg('jira_improve_agent_profile_for_a2a') && creatorType === 'REMOTE_A2A';
|
|
624
630
|
return /*#__PURE__*/React.createElement(Box, {
|
|
625
631
|
xcss: cx(styles.banner, fillSpace ? styles.bannerFillSpace : undefined, isRemoteA2A ? styles.bannerRemoteA2A : undefined),
|
|
@@ -630,9 +636,9 @@ export var AgentBanner = function AgentBanner(_ref4) {
|
|
|
630
636
|
});
|
|
631
637
|
};
|
|
632
638
|
export var GeneratedAvatar = function GeneratedAvatar(props) {
|
|
633
|
-
var
|
|
634
|
-
render =
|
|
635
|
-
color =
|
|
639
|
+
var _getAvatarRender = getAvatarRender(props),
|
|
640
|
+
render = _getAvatarRender.render,
|
|
641
|
+
color = _getAvatarRender.color;
|
|
636
642
|
var onLoad = props.onLoad;
|
|
637
643
|
return /*#__PURE__*/React.createElement(Box, {
|
|
638
644
|
xcss: styles.image,
|
|
@@ -1,5 +1,12 @@
|
|
|
1
1
|
import { type SizeType } from '@atlaskit/avatar';
|
|
2
2
|
import type { AgentCreatorType } from '../../../common/types';
|
|
3
|
+
/**
|
|
4
|
+
* OOTB Agents avatars - end
|
|
5
|
+
*/
|
|
6
|
+
export type AgentAvatarColor = {
|
|
7
|
+
primary: string;
|
|
8
|
+
secondary: string;
|
|
9
|
+
};
|
|
3
10
|
export declare const yellowColor: {
|
|
4
11
|
primary: string;
|
|
5
12
|
secondary: string;
|
|
@@ -34,6 +41,7 @@ type GeneratedAvatarProps = {
|
|
|
34
41
|
* cd002f25-46e4-4023-80ff-32e4d90849b4
|
|
35
42
|
*/
|
|
36
43
|
export declare const getNumberIdForAvatar: ({ agentIdentityAccountId, agentId, }: Pick<GeneratedAvatarProps, 'agentIdentityAccountId' | 'agentId'>) => number | null;
|
|
44
|
+
export declare const getAgentAvatarColor: (props: Pick<GeneratedAvatarProps, 'agentNamedId' | 'agentId' | 'agentIdentityAccountId' | 'isRovoDev'>) => AgentAvatarColor;
|
|
37
45
|
type AgentBannerCreatorType = AgentCreatorType | 'ROVO_DEV';
|
|
38
46
|
type AgentBannerProps = Pick<GeneratedAvatarProps, 'agentId' | 'agentNamedId' | 'agentIdentityAccountId' | 'isRovoDev'> & {
|
|
39
47
|
creatorType?: AgentBannerCreatorType | null;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@atlaskit/rovo-agent-components",
|
|
3
|
-
"version": "8.2.
|
|
3
|
+
"version": "8.2.1",
|
|
4
4
|
"description": "This package host public components related to rovo agents, the components here are needed for other public atlaskit packages",
|
|
5
5
|
"repository": "https://bitbucket.org/atlassian/atlassian-frontend-monorepo",
|
|
6
6
|
"atlassian": {
|
|
@@ -39,9 +39,9 @@
|
|
|
39
39
|
"@atlaskit/dropdown-menu": "^17.2.0",
|
|
40
40
|
"@atlaskit/feature-gate-js-client": "^6.0.0",
|
|
41
41
|
"@atlaskit/flag": "^18.2.0",
|
|
42
|
-
"@atlaskit/heading": "^
|
|
42
|
+
"@atlaskit/heading": "^7.0.0",
|
|
43
43
|
"@atlaskit/icon": "^37.2.0",
|
|
44
|
-
"@atlaskit/link": "^
|
|
44
|
+
"@atlaskit/link": "^5.0.0",
|
|
45
45
|
"@atlaskit/logo": "^21.4.0",
|
|
46
46
|
"@atlaskit/platform-feature-flags": "^2.1.0",
|
|
47
47
|
"@atlaskit/primitives": "^22.2.0",
|
|
@@ -49,9 +49,9 @@
|
|
|
49
49
|
"@atlaskit/rovo-agent-analytics": "^6.0.0",
|
|
50
50
|
"@atlaskit/skeleton": "^4.2.0",
|
|
51
51
|
"@atlaskit/spinner": "^20.1.0",
|
|
52
|
-
"@atlaskit/tmp-editor-statsig": "^135.
|
|
52
|
+
"@atlaskit/tmp-editor-statsig": "^135.6.0",
|
|
53
53
|
"@atlaskit/tokens": "^16.3.0",
|
|
54
|
-
"@atlaskit/tooltip": "^
|
|
54
|
+
"@atlaskit/tooltip": "^24.0.0",
|
|
55
55
|
"@babel/runtime": "^7.0.0",
|
|
56
56
|
"@compiled/react": "^1.0.0",
|
|
57
57
|
"react-dom": "^18.2.0",
|