@atlaskit/rovo-agent-components 1.12.2 → 1.13.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.
package/CHANGELOG.md CHANGED
@@ -1,5 +1,19 @@
1
1
  # @atlaskit/rovo-agent-components
2
2
 
3
+ ## 1.13.0
4
+
5
+ ### Minor Changes
6
+
7
+ - [#163149](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/pull-requests/163149)
8
+ [`a70d55df6a66b`](https://stash.atlassian.com/projects/CONFCLOUD/repos/confluence-frontend/commits/a70d55df6a66b) -
9
+ Added new UI for empty state in chat
10
+
11
+ ## 1.12.3
12
+
13
+ ### Patch Changes
14
+
15
+ - Updated dependencies
16
+
3
17
  ## 1.12.2
4
18
 
5
19
  ### Patch Changes
@@ -4,7 +4,7 @@ var _interopRequireDefault = require("@babel/runtime/helpers/interopRequireDefau
4
4
  Object.defineProperty(exports, "__esModule", {
5
5
  value: true
6
6
  });
7
- exports.ChatPill = exports.BrowseAgentsPill = void 0;
7
+ exports.ConversationStarterPill = exports.ChatPill = exports.BrowseAgentsPill = void 0;
8
8
  var _extends2 = _interopRequireDefault(require("@babel/runtime/helpers/extends"));
9
9
  var _objectWithoutProperties2 = _interopRequireDefault(require("@babel/runtime/helpers/objectWithoutProperties"));
10
10
  var _react = _interopRequireDefault(require("react"));
@@ -13,7 +13,29 @@ var _aiAgent = _interopRequireDefault(require("@atlaskit/icon/core/ai-agent"));
13
13
  var _primitives = require("@atlaskit/primitives");
14
14
  var _chatIcon = require("../chat-icon");
15
15
  var _messages = _interopRequireDefault(require("./messages"));
16
- var _excluded = ["children", "whiteSpacePreWrap"];
16
+ var _excluded = ["children", "whiteSpacePreWrap"],
17
+ _excluded2 = ["children", "whiteSpacePreWrap"];
18
+ var conversationStarterPillStyles = (0, _primitives.xcss)({
19
+ color: 'color.text',
20
+ padding: 'space.100',
21
+ border: "1px solid ".concat("var(--ds-border, #091E4224)"),
22
+ borderRadius: 'border.radius.200',
23
+ borderBottomRightRadius: "var(--ds-border-radius-050, 2px)",
24
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
25
+ fontWeight: "var(--ds-font-weight-medium, 500)",
26
+ lineHeight: '16px',
27
+ textOverflow: 'ellipsis',
28
+ whiteSpace: 'nowrap',
29
+ flexShrink: 1,
30
+ background: 'none',
31
+ width: '100%',
32
+ ':hover': {
33
+ backgroundColor: 'color.background.neutral.hovered'
34
+ },
35
+ ':active': {
36
+ backgroundColor: 'color.background.neutral.pressed'
37
+ }
38
+ });
17
39
  var buttonStyles = (0, _primitives.xcss)({
18
40
  color: 'color.text',
19
41
  padding: 'space.100',
@@ -75,4 +97,20 @@ var BrowseAgentsPill = exports.BrowseAgentsPill = /*#__PURE__*/_react.default.fo
75
97
  }), /*#__PURE__*/_react.default.createElement(_primitives.Box, {
76
98
  xcss: queryTextStyles
77
99
  }, formatMessage(_messages.default.browseAgentsPillLabel))));
100
+ });
101
+ var ConversationStarterPill = exports.ConversationStarterPill = /*#__PURE__*/_react.default.forwardRef(function (_ref2, ref) {
102
+ var children = _ref2.children,
103
+ _ref2$whiteSpacePreWr = _ref2.whiteSpacePreWrap,
104
+ whiteSpacePreWrap = _ref2$whiteSpacePreWr === void 0 ? true : _ref2$whiteSpacePreWr,
105
+ props = (0, _objectWithoutProperties2.default)(_ref2, _excluded2);
106
+ return /*#__PURE__*/_react.default.createElement(_primitives.Pressable, (0, _extends2.default)({
107
+ ref: ref
108
+ }, props, {
109
+ xcss: conversationStarterPillStyles
110
+ }), /*#__PURE__*/_react.default.createElement(_primitives.Inline, {
111
+ space: "space.050",
112
+ xcss: buttonInlineStyles
113
+ }, /*#__PURE__*/_react.default.createElement(_chatIcon.ChatPillIcon, null), /*#__PURE__*/_react.default.createElement(_primitives.Box, {
114
+ xcss: [queryTextStyles, whiteSpacePreWrap && whiteSpacePreWrapStyles]
115
+ }, children)));
78
116
  });
package/dist/cjs/index.js CHANGED
@@ -63,6 +63,12 @@ Object.defineProperty(exports, "ChatPillIcon", {
63
63
  return _chatIcon.ChatPillIcon;
64
64
  }
65
65
  });
66
+ Object.defineProperty(exports, "ConversationStarterPill", {
67
+ enumerable: true,
68
+ get: function get() {
69
+ return _chatPill.ConversationStarterPill;
70
+ }
71
+ });
66
72
  Object.defineProperty(exports, "ConversationStarters", {
67
73
  enumerable: true,
68
74
  get: function get() {
@@ -5,6 +5,27 @@ import AgentIcon from '@atlaskit/icon/core/ai-agent';
5
5
  import { Box, Inline, Pressable, xcss } from '@atlaskit/primitives';
6
6
  import { ChatPillIcon } from '../chat-icon';
7
7
  import messages from './messages';
8
+ const conversationStarterPillStyles = xcss({
9
+ color: 'color.text',
10
+ padding: 'space.100',
11
+ border: `1px solid ${"var(--ds-border, #091E4224)"}`,
12
+ borderRadius: 'border.radius.200',
13
+ borderBottomRightRadius: "var(--ds-border-radius-050, 2px)",
14
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
15
+ fontWeight: "var(--ds-font-weight-medium, 500)",
16
+ lineHeight: '16px',
17
+ textOverflow: 'ellipsis',
18
+ whiteSpace: 'nowrap',
19
+ flexShrink: 1,
20
+ background: 'none',
21
+ width: '100%',
22
+ ':hover': {
23
+ backgroundColor: 'color.background.neutral.hovered'
24
+ },
25
+ ':active': {
26
+ backgroundColor: 'color.background.neutral.pressed'
27
+ }
28
+ });
8
29
  const buttonStyles = xcss({
9
30
  color: 'color.text',
10
31
  padding: 'space.100',
@@ -65,4 +86,18 @@ export const BrowseAgentsPill = /*#__PURE__*/React.forwardRef((props, ref) => {
65
86
  }), /*#__PURE__*/React.createElement(Box, {
66
87
  xcss: queryTextStyles
67
88
  }, formatMessage(messages.browseAgentsPillLabel))));
68
- });
89
+ });
90
+ export const ConversationStarterPill = /*#__PURE__*/React.forwardRef(({
91
+ children,
92
+ whiteSpacePreWrap = true,
93
+ ...props
94
+ }, ref) => /*#__PURE__*/React.createElement(Pressable, _extends({
95
+ ref: ref
96
+ }, props, {
97
+ xcss: conversationStarterPillStyles
98
+ }), /*#__PURE__*/React.createElement(Inline, {
99
+ space: "space.050",
100
+ xcss: buttonInlineStyles
101
+ }, /*#__PURE__*/React.createElement(ChatPillIcon, null), /*#__PURE__*/React.createElement(Box, {
102
+ xcss: [queryTextStyles, whiteSpacePreWrap && whiteSpacePreWrapStyles]
103
+ }, children))));
@@ -1,7 +1,7 @@
1
1
  export { AgentProfileInfo, AgentProfileCreator, AgentStarCount } from './ui/agent-profile-info';
2
2
  export { StarIconButton } from './common/ui/star-icon-button';
3
3
  export { AgentConversationStarters, ConversationStarters, getConversationStarters } from './ui/agent-conversation-starters';
4
- export { ChatPill, BrowseAgentsPill } from './common/ui/chat-pill';
4
+ export { ChatPill, BrowseAgentsPill, ConversationStarterPill } from './common/ui/chat-pill';
5
5
  export { ChatPillIcon } from './common/ui/chat-icon';
6
6
  export { ShowIcon } from './common/ui/show-icon';
7
7
  export { HiddenIcon } from './common/ui/hidden-icon';
@@ -1,12 +1,34 @@
1
1
  import _extends from "@babel/runtime/helpers/extends";
2
2
  import _objectWithoutProperties from "@babel/runtime/helpers/objectWithoutProperties";
3
- var _excluded = ["children", "whiteSpacePreWrap"];
3
+ var _excluded = ["children", "whiteSpacePreWrap"],
4
+ _excluded2 = ["children", "whiteSpacePreWrap"];
4
5
  import React from 'react';
5
6
  import { useIntl } from 'react-intl-next';
6
7
  import AgentIcon from '@atlaskit/icon/core/ai-agent';
7
8
  import { Box, Inline, Pressable, xcss } from '@atlaskit/primitives';
8
9
  import { ChatPillIcon } from '../chat-icon';
9
10
  import messages from './messages';
11
+ var conversationStarterPillStyles = xcss({
12
+ color: 'color.text',
13
+ padding: 'space.100',
14
+ border: "1px solid ".concat("var(--ds-border, #091E4224)"),
15
+ borderRadius: 'border.radius.200',
16
+ borderBottomRightRadius: "var(--ds-border-radius-050, 2px)",
17
+ font: "var(--ds-font-body, normal 400 14px/20px ui-sans-serif, -apple-system, BlinkMacSystemFont, \"Segoe UI\", Ubuntu, system-ui, \"Helvetica Neue\", sans-serif)",
18
+ fontWeight: "var(--ds-font-weight-medium, 500)",
19
+ lineHeight: '16px',
20
+ textOverflow: 'ellipsis',
21
+ whiteSpace: 'nowrap',
22
+ flexShrink: 1,
23
+ background: 'none',
24
+ width: '100%',
25
+ ':hover': {
26
+ backgroundColor: 'color.background.neutral.hovered'
27
+ },
28
+ ':active': {
29
+ backgroundColor: 'color.background.neutral.pressed'
30
+ }
31
+ });
10
32
  var buttonStyles = xcss({
11
33
  color: 'color.text',
12
34
  padding: 'space.100',
@@ -68,4 +90,20 @@ export var BrowseAgentsPill = /*#__PURE__*/React.forwardRef(function (props, ref
68
90
  }), /*#__PURE__*/React.createElement(Box, {
69
91
  xcss: queryTextStyles
70
92
  }, formatMessage(messages.browseAgentsPillLabel))));
93
+ });
94
+ export var ConversationStarterPill = /*#__PURE__*/React.forwardRef(function (_ref2, ref) {
95
+ var children = _ref2.children,
96
+ _ref2$whiteSpacePreWr = _ref2.whiteSpacePreWrap,
97
+ whiteSpacePreWrap = _ref2$whiteSpacePreWr === void 0 ? true : _ref2$whiteSpacePreWr,
98
+ props = _objectWithoutProperties(_ref2, _excluded2);
99
+ return /*#__PURE__*/React.createElement(Pressable, _extends({
100
+ ref: ref
101
+ }, props, {
102
+ xcss: conversationStarterPillStyles
103
+ }), /*#__PURE__*/React.createElement(Inline, {
104
+ space: "space.050",
105
+ xcss: buttonInlineStyles
106
+ }, /*#__PURE__*/React.createElement(ChatPillIcon, null), /*#__PURE__*/React.createElement(Box, {
107
+ xcss: [queryTextStyles, whiteSpacePreWrap && whiteSpacePreWrapStyles]
108
+ }, children)));
71
109
  });
package/dist/esm/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  export { AgentProfileInfo, AgentProfileCreator, AgentStarCount } from './ui/agent-profile-info';
2
2
  export { StarIconButton } from './common/ui/star-icon-button';
3
3
  export { AgentConversationStarters, ConversationStarters, getConversationStarters } from './ui/agent-conversation-starters';
4
- export { ChatPill, BrowseAgentsPill } from './common/ui/chat-pill';
4
+ export { ChatPill, BrowseAgentsPill, ConversationStarterPill } from './common/ui/chat-pill';
5
5
  export { ChatPillIcon } from './common/ui/chat-icon';
6
6
  export { ShowIcon } from './common/ui/show-icon';
7
7
  export { HiddenIcon } from './common/ui/hidden-icon';
@@ -8,3 +8,6 @@ export declare const ChatPill: React.ForwardRefExoticComponent<Omit<ButtonProps,
8
8
  } & React.RefAttributes<HTMLButtonElement>>;
9
9
  export type BrowseAgentsPillProps = Omit<ButtonProps, 'iconBefore' | 'children'>;
10
10
  export declare const BrowseAgentsPill: React.ForwardRefExoticComponent<BrowseAgentsPillProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export declare const ConversationStarterPill: React.ForwardRefExoticComponent<Omit<ButtonProps, "iconBefore"> & {
12
+ whiteSpacePreWrap?: boolean | undefined;
13
+ } & React.RefAttributes<HTMLButtonElement>>;
@@ -1,7 +1,7 @@
1
1
  export { AgentProfileInfo, AgentProfileCreator, AgentStarCount } from './ui/agent-profile-info';
2
2
  export { StarIconButton } from './common/ui/star-icon-button';
3
3
  export { AgentConversationStarters, ConversationStarters, type AgentConversationStartersProps, type ConversationStarter, type StaticAgentConversationStarter, type ConversationStartersProps, getConversationStarters, } from './ui/agent-conversation-starters';
4
- export { ChatPill, type ChatPillProps, BrowseAgentsPill } from './common/ui/chat-pill';
4
+ export { ChatPill, type ChatPillProps, BrowseAgentsPill, ConversationStarterPill, } from './common/ui/chat-pill';
5
5
  export type { BrowseAgentsPillProps } from './common/ui/chat-pill';
6
6
  export { ChatPillIcon } from './common/ui/chat-icon';
7
7
  export { ShowIcon } from './common/ui/show-icon';
@@ -8,3 +8,6 @@ export declare const ChatPill: React.ForwardRefExoticComponent<Omit<ButtonProps,
8
8
  } & React.RefAttributes<HTMLButtonElement>>;
9
9
  export type BrowseAgentsPillProps = Omit<ButtonProps, 'iconBefore' | 'children'>;
10
10
  export declare const BrowseAgentsPill: React.ForwardRefExoticComponent<BrowseAgentsPillProps & React.RefAttributes<HTMLButtonElement>>;
11
+ export declare const ConversationStarterPill: React.ForwardRefExoticComponent<Omit<ButtonProps, "iconBefore"> & {
12
+ whiteSpacePreWrap?: boolean | undefined;
13
+ } & React.RefAttributes<HTMLButtonElement>>;
@@ -1,7 +1,7 @@
1
1
  export { AgentProfileInfo, AgentProfileCreator, AgentStarCount } from './ui/agent-profile-info';
2
2
  export { StarIconButton } from './common/ui/star-icon-button';
3
3
  export { AgentConversationStarters, ConversationStarters, type AgentConversationStartersProps, type ConversationStarter, type StaticAgentConversationStarter, type ConversationStartersProps, getConversationStarters, } from './ui/agent-conversation-starters';
4
- export { ChatPill, type ChatPillProps, BrowseAgentsPill } from './common/ui/chat-pill';
4
+ export { ChatPill, type ChatPillProps, BrowseAgentsPill, ConversationStarterPill, } from './common/ui/chat-pill';
5
5
  export type { BrowseAgentsPillProps } from './common/ui/chat-pill';
6
6
  export { ChatPillIcon } from './common/ui/chat-icon';
7
7
  export { ShowIcon } from './common/ui/show-icon';
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@atlaskit/rovo-agent-components",
3
- "version": "1.12.2",
3
+ "version": "1.13.0",
4
4
  "description": "This package host public components related to rovo agents, the components here are needed for other public atlaskit packages",
5
5
  "author": "Atlassian Pty Ltd",
6
6
  "license": "Apache-2.0",
@@ -42,10 +42,10 @@
42
42
  "@atlaskit/dropdown-menu": "^12.22.0",
43
43
  "@atlaskit/heading": "^2.4.3",
44
44
  "@atlaskit/icon": "^22.24.0",
45
- "@atlaskit/legacy-custom-icons": "^0.15.0",
45
+ "@atlaskit/legacy-custom-icons": "^0.16.0",
46
46
  "@atlaskit/logo": "^14.3.0",
47
47
  "@atlaskit/platform-feature-flags": "^0.3.0",
48
- "@atlaskit/primitives": "^13.1.0",
48
+ "@atlaskit/primitives": "^13.2.0",
49
49
  "@atlaskit/skeleton": "^0.5.0",
50
50
  "@atlaskit/tokens": "^2.2.0",
51
51
  "@atlaskit/tooltip": "^18.9.0",