@inkeep/agents-ui 0.14.27 → 0.15.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 (117) hide show
  1. package/dist/index.cjs +1 -1
  2. package/dist/index.js +215 -203
  3. package/dist/primitives/atoms/icons/built-in-icons.cjs +1 -1
  4. package/dist/primitives/atoms/icons/built-in-icons.d.ts +1 -0
  5. package/dist/primitives/atoms/icons/built-in-icons.js +44 -43
  6. package/dist/primitives/atoms/icons/checkbox-icon.cjs +1 -1
  7. package/dist/primitives/atoms/icons/checkbox-icon.js +1 -1
  8. package/dist/primitives/atoms/icons/inkeep-default-icons.cjs +1 -1
  9. package/dist/primitives/atoms/icons/inkeep-default-icons.js +3 -2
  10. package/dist/primitives/components/chat-bubble/index.cjs +1 -0
  11. package/dist/primitives/components/chat-bubble/index.d.ts +10 -0
  12. package/dist/primitives/components/chat-bubble/index.js +38 -0
  13. package/dist/primitives/components/chat-button.cjs +1 -1
  14. package/dist/primitives/components/chat-button.d.ts +3 -1
  15. package/dist/primitives/components/chat-button.js +31 -26
  16. package/dist/primitives/components/index.cjs +1 -1
  17. package/dist/primitives/components/index.d.ts +1 -0
  18. package/dist/primitives/components/index.js +19 -17
  19. package/dist/primitives/components/modal/use-inkeep-modal.cjs +1 -1
  20. package/dist/primitives/components/modal/use-inkeep-modal.d.ts +2 -2
  21. package/dist/primitives/components/modal/use-inkeep-modal.js +6 -42
  22. package/dist/primitives/components/modal/widget-auto-focus.cjs +1 -1
  23. package/dist/primitives/components/modal/widget-auto-focus.js +21 -12
  24. package/dist/primitives/components/modal.d.ts +2 -2
  25. package/dist/primitives/components/searchbar.d.ts +3 -3
  26. package/dist/primitives/components/sidebar-chat/index.cjs +1 -1
  27. package/dist/primitives/components/sidebar-chat/index.js +48 -67
  28. package/dist/primitives/components/use-component-trigger.cjs +1 -1
  29. package/dist/primitives/components/use-component-trigger.d.ts +1 -1
  30. package/dist/primitives/components/use-component-trigger.js +4 -3
  31. package/dist/primitives/hooks/index.cjs +1 -1
  32. package/dist/primitives/hooks/index.d.ts +1 -0
  33. package/dist/primitives/hooks/index.js +18 -16
  34. package/dist/primitives/hooks/use-inkeep-open-state.cjs +1 -0
  35. package/dist/primitives/hooks/use-inkeep-open-state.d.ts +18 -0
  36. package/dist/primitives/hooks/use-inkeep-open-state.js +47 -0
  37. package/dist/primitives/index.cjs +1 -1
  38. package/dist/primitives/index.js +140 -130
  39. package/dist/primitives/providers/base-events-provider.cjs +1 -1
  40. package/dist/primitives/providers/base-events-provider.js +1 -1
  41. package/dist/primitives/providers/chat-bubble-provider.cjs +1 -0
  42. package/dist/primitives/providers/chat-bubble-provider.d.ts +22 -0
  43. package/dist/primitives/providers/chat-bubble-provider.js +19 -0
  44. package/dist/primitives/providers/config-provider.cjs +1 -1
  45. package/dist/primitives/providers/config-provider.d.ts +0 -1
  46. package/dist/primitives/providers/config-provider.js +12 -13
  47. package/dist/primitives/providers/index.cjs +1 -1
  48. package/dist/primitives/providers/index.d.ts +1 -0
  49. package/dist/primitives/providers/index.js +27 -22
  50. package/dist/primitives/providers/sidebar-chat-provider.cjs +1 -1
  51. package/dist/primitives/providers/sidebar-chat-provider.d.ts +3 -25
  52. package/dist/primitives/providers/sidebar-chat-provider.js +23 -27
  53. package/dist/primitives/utils/component-ids.cjs +1 -1
  54. package/dist/primitives/utils/component-ids.d.ts +10 -0
  55. package/dist/primitives/utils/component-ids.js +10 -3
  56. package/dist/react/chat-button.cjs +1 -1
  57. package/dist/react/chat-button.d.ts +23 -7
  58. package/dist/react/chat-button.js +55 -46
  59. package/dist/react/embedded-chat.cjs +1 -1
  60. package/dist/react/embedded-chat.d.ts +4 -3
  61. package/dist/react/embedded-chat.js +171 -177
  62. package/dist/react/index.cjs +1 -1
  63. package/dist/react/index.js +215 -203
  64. package/dist/react/modal.chat.cjs +1 -1
  65. package/dist/react/modal.chat.d.ts +6 -3
  66. package/dist/react/modal.chat.js +10 -10
  67. package/dist/react/modal.cjs +1 -1
  68. package/dist/react/modal.d.ts +2 -2
  69. package/dist/react/modal.js +5 -5
  70. package/dist/react/modal.search-and-chat.cjs +1 -1
  71. package/dist/react/modal.search-and-chat.d.ts +2 -2
  72. package/dist/react/modal.search-and-chat.js +15 -15
  73. package/dist/react/modal.search.cjs +1 -1
  74. package/dist/react/modal.search.d.ts +2 -2
  75. package/dist/react/modal.search.js +8 -8
  76. package/dist/react/searchbar.cjs +1 -1
  77. package/dist/react/searchbar.d.ts +4 -4
  78. package/dist/react/searchbar.js +12 -12
  79. package/dist/react/sidebar-chat.d.ts +1 -3
  80. package/dist/styled/components/chat-bubble.cjs +1 -0
  81. package/dist/styled/components/chat-bubble.d.ts +5 -0
  82. package/dist/styled/components/chat-bubble.js +70 -0
  83. package/dist/styled/components/chat-button.cjs +1 -1
  84. package/dist/styled/components/chat-button.d.ts +2 -1
  85. package/dist/styled/components/chat-button.js +10 -6
  86. package/dist/styled/components/embedded-chat.cjs +1 -1
  87. package/dist/styled/components/embedded-chat.js +331 -320
  88. package/dist/styled/components/embedded-search.cjs +1 -1
  89. package/dist/styled/components/embedded-search.js +3 -3
  90. package/dist/styled/components/index.cjs +1 -1
  91. package/dist/styled/components/index.d.ts +1 -0
  92. package/dist/styled/components/index.js +14 -12
  93. package/dist/styled/components/message.cjs +1 -1
  94. package/dist/styled/components/message.js +28 -25
  95. package/dist/styled/components/ui/recipes/button.cjs +1 -1
  96. package/dist/styled/components/ui/recipes/button.js +1 -1
  97. package/dist/styled/components/ui/recipes/checkbox.cjs +1 -1
  98. package/dist/styled/components/ui/recipes/checkbox.js +1 -1
  99. package/dist/styled/components/ui/recipes/input.cjs +1 -1
  100. package/dist/styled/components/ui/recipes/input.js +2 -2
  101. package/dist/styled/components/ui/recipes/markdown.cjs +1 -1
  102. package/dist/styled/components/ui/recipes/markdown.js +3 -3
  103. package/dist/styled/components/ui/recipes/select.cjs +1 -1
  104. package/dist/styled/components/ui/recipes/select.js +2 -2
  105. package/dist/styled/index.cjs +1 -1
  106. package/dist/styled/index.js +174 -162
  107. package/dist/styled/inkeep.css.cjs +218 -99
  108. package/dist/styled/inkeep.css.js +218 -99
  109. package/dist/types/config/open-settings.d.ts +70 -0
  110. package/dist/types/config/settings/form.d.ts +0 -53
  111. package/dist/types/events.d.ts +9 -1
  112. package/dist/types/icons/built-in.d.ts +1 -1
  113. package/dist/types/icons/custom.d.ts +1 -0
  114. package/dist/types/index.d.ts +1 -1
  115. package/dist/types/js/index.d.ts +2 -2
  116. package/package.json +1 -1
  117. package/dist/types/config/modal.d.ts +0 -33
@@ -72,57 +72,4 @@ export interface IncludeChatSessionField extends BaseFormField {
72
72
  inputType?: 'checkbox';
73
73
  defaultValue?: boolean;
74
74
  }
75
- export type IntelligentFormField = Exclude<FormField, IncludeChatSessionField> & {
76
- /**
77
- * Controls whether to prefill the field with the AI's response
78
- */
79
- shouldPrefillWithAI?: boolean;
80
- };
81
- export interface IntelligentFormSuccessView {
82
- heading: string;
83
- message: string;
84
- icon?: InkeepCustomIcon;
85
- }
86
- export interface IntelligentFormButtons {
87
- /** Callback function called when form is submitted */
88
- submit: {
89
- label?: string;
90
- onSubmit: SubmitCallback;
91
- };
92
- }
93
- export interface IntelligentFormSettings {
94
- /**
95
- * Primary form section that is always shown
96
- */
97
- primary: {
98
- /** Array of form fields to display */
99
- fields: IntelligentFormField[];
100
- /** Optional description text shown above the fields */
101
- description?: string;
102
- };
103
- /**
104
- * Secondary form section that can be conditionally shown
105
- */
106
- secondary: {
107
- /** Array of form fields to display */
108
- fields: IntelligentFormField[];
109
- /**
110
- * Optional description text shown above the fields.
111
- * Can be either a simple string or an object with different messages
112
- * based on AI confidence level
113
- */
114
- description?: string | {
115
- /** Default message shown when AI confidence is low/medium */
116
- default: string;
117
- /** Message shown when AI has high confidence */
118
- confident: string;
119
- };
120
- };
121
- /** Configuration for the success view shown after form submission */
122
- successView: IntelligentFormSuccessView;
123
- /** Configuration for the buttons shown in the form */
124
- buttons: IntelligentFormButtons;
125
- /** Optional name of the assistant shown in the form */
126
- aiAssistantName?: string;
127
- }
128
75
  export {};
@@ -44,7 +44,7 @@ export type InkeepEventWithCommon = ExtendPropertiesWithCommon<InkeepEvent>;
44
44
  export type InkeepCallbackEvent = InkeepEventWithCommon;
45
45
  export type SearchEvent = SearchQueryResponseReceivedEvent | SearchQuerySubmittedEvent | SearchResultClickedEvent;
46
46
  export type ChatEvent = AssistantMessageReceivedEvent | AssistantAnswerDisplayedEvent | UserMessageSubmittedEvent | UserEscalationIndicatedEvent | SharedChatLoadedEvent | AssistantPositiveFeedbackSubmittedEvent | AssistantNegativeFeedbackSubmittedEvent | ChatClearButtonClickedEvent | AssistantMessageCopiedEvent | GetHelpOptionClickedEvent | ChatShareButtonClickedEvent | AssistantSourceItemClickedEvent | AssistantMessageLinkOpenedEvent | AssistantCodeBlockCopiedEvent;
47
- export type WidgetEvent = ModalOpenedEvent | ModalClosedEvent;
47
+ export type WidgetEvent = ModalOpenedEvent | ModalClosedEvent | ChatBubbleOpenedEvent | ChatBubbleClosedEvent;
48
48
  export type InkeepEvent = SearchEvent | ChatEvent | WidgetEvent;
49
49
  export interface AssistantMessageReceivedEvent {
50
50
  eventName: 'assistant_message_received';
@@ -170,4 +170,12 @@ export interface ModalClosedEvent {
170
170
  eventName: 'modal_closed';
171
171
  properties: {};
172
172
  }
173
+ export interface ChatBubbleOpenedEvent {
174
+ eventName: 'chat_bubble_opened';
175
+ properties: {};
176
+ }
177
+ export interface ChatBubbleClosedEvent {
178
+ eventName: 'chat_bubble_closed';
179
+ properties: {};
180
+ }
173
181
  export {};
@@ -1 +1 @@
1
- export type AvailableBuiltInIcons = 'FaBook' | 'FaGithub' | 'FaDatabase' | 'FaStackOverflow' | 'FaChrome' | 'FaPhone' | 'FaEnvelope' | 'FaPencil' | 'FaBlog' | 'FaSort' | 'FaPenSquare' | 'FaChevronRight' | 'FaChevronUp' | 'FaFilePdf' | 'FaDiscourse' | 'FaDiscord' | 'FaSlack' | 'IoDocumentTextSharp' | 'IoDocumentSharp' | 'IoSend' | 'IoInformationCircleOutline' | 'IoLinkOutline' | 'IoThumbsUpSharp' | 'IoThumbsDownSharp' | 'IoSearch' | 'IoCopyOutline' | 'IoCopy' | 'IoReturnDownBackOutline' | 'IoChevronForwardOutline' | 'IoReturnDownForward' | 'IoCloseOutline' | 'IoCheckmarkOutline' | 'IoBookOutline' | 'IoReaderOutline' | 'IoHelpBuoyOutline' | 'IoPeopleOutline' | 'IoDocumentTextOutline' | 'IoChatbubblesOutline' | 'FaRegFilePdf' | 'IoLogoDiscord' | 'IoLogoGithub' | 'IoTerminal' | 'FaBriefcase' | 'IoPlayCircleOutline' | 'IoPencilOutline' | 'IoCheckmarkDoneOutline' | 'IoHomeOutline' | 'IoMail' | 'IoOpenOutline' | 'FaTelegram' | 'FaTable' | 'FaMagnifyingGlass' | 'LuArrowLeft' | 'LuCircleCheck' | 'LuCommand' | 'LuCopy' | 'LuCheck' | 'LuCornerDownLeft' | 'LuGlobe' | 'LuLink' | 'LuRepeat' | 'LuThumbsDown' | 'LuThumbsUp' | 'LuUsers' | 'LuUser' | 'LuArrowUpRight' | 'LuBookOpen' | 'LuChevronDown' | 'LuLoaderCircle' | 'FiEdit' | 'LuSparkles' | 'LuCornerDownRight' | 'LuCalendar' | 'LuHeadset';
1
+ export type AvailableBuiltInIcons = 'FaBook' | 'FaGithub' | 'FaDatabase' | 'FaStackOverflow' | 'FaChrome' | 'FaPhone' | 'FaEnvelope' | 'FaPencil' | 'FaBlog' | 'FaSort' | 'FaPenSquare' | 'FaChevronRight' | 'FaChevronUp' | 'FaFilePdf' | 'FaDiscourse' | 'FaDiscord' | 'FaSlack' | 'IoDocumentTextSharp' | 'IoDocumentSharp' | 'IoSend' | 'IoInformationCircleOutline' | 'IoLinkOutline' | 'IoThumbsUpSharp' | 'IoThumbsDownSharp' | 'IoSearch' | 'IoCopyOutline' | 'IoCopy' | 'IoReturnDownBackOutline' | 'IoChevronForwardOutline' | 'IoReturnDownForward' | 'IoCloseOutline' | 'IoCheckmarkOutline' | 'IoBookOutline' | 'IoReaderOutline' | 'IoHelpBuoyOutline' | 'IoPeopleOutline' | 'IoDocumentTextOutline' | 'IoChatbubblesOutline' | 'FaRegFilePdf' | 'IoLogoDiscord' | 'IoLogoGithub' | 'IoTerminal' | 'FaBriefcase' | 'IoPlayCircleOutline' | 'IoPencilOutline' | 'IoCheckmarkDoneOutline' | 'IoHomeOutline' | 'IoMail' | 'IoOpenOutline' | 'FaTelegram' | 'FaTable' | 'FaMagnifyingGlass' | 'LuArrowLeft' | 'LuCircleCheck' | 'LuCommand' | 'LuCopy' | 'LuCheck' | 'LuCornerDownLeft' | 'LuGlobe' | 'LuLink' | 'LuRepeat' | 'LuThumbsDown' | 'LuThumbsUp' | 'LuUsers' | 'LuUser' | 'LuArrowUpRight' | 'LuBookOpen' | 'LuChevronDown' | 'LuLoaderCircle' | 'FiEdit' | 'LuSparkles' | 'LuCornerDownRight' | 'LuCalendar' | 'LuHeadset' | 'LuSend';
@@ -23,6 +23,7 @@ export interface CustomIcons {
23
23
  close: string;
24
24
  info: string;
25
25
  command: string;
26
+ chatButtonClose: string;
26
27
  }
27
28
  export type CustomIconMap = {
28
29
  [K in keyof CustomIcons]?: InkeepCustomIcon;
@@ -6,7 +6,7 @@ export * from './config';
6
6
  export * from './config/ai';
7
7
  export * from './config/base';
8
8
  export * from './config/search';
9
- export * from './config/modal';
9
+ export * from './config/open-settings';
10
10
  export * from './config/components';
11
11
  export * from './config/filters';
12
12
  export * from './message';
@@ -1,6 +1,6 @@
1
1
  import { InkeepAIChatSettings } from '../config/ai';
2
2
  import { InkeepBaseSettings } from '../config/base';
3
- import { InkeepModalSettings } from '../config/modal';
3
+ import { OpenSettingsModal } from '../config/open-settings';
4
4
  import { InkeepSearchSettings } from '../config/search';
5
5
  /**
6
6
  * Represents the available Inkeep component types that can be rendered
@@ -11,7 +11,7 @@ export interface InkeepSettings {
11
11
  baseSettings?: InkeepBaseSettings;
12
12
  aiChatSettings?: InkeepAIChatSettings;
13
13
  searchSettings?: InkeepSearchSettings;
14
- modalSettings?: InkeepModalSettings;
14
+ openSettings?: OpenSettingsModal;
15
15
  }
16
16
  export type InkeepComponentProps = InkeepSettings & {
17
17
  [key: string]: any;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@inkeep/agents-ui",
3
- "version": "0.14.27",
3
+ "version": "0.15.0",
4
4
  "description": "",
5
5
  "homepage": "",
6
6
  "repository": {
@@ -1,33 +0,0 @@
1
- export interface InkeepModalSettings {
2
- /**
3
- * Controls whether the modal is open.
4
- */
5
- isOpen?: boolean;
6
- /**
7
- * Handler called when the modal opens or closes.
8
- */
9
- onOpenChange?: (isOpen: boolean) => void;
10
- /**
11
- * Whether the modal is open by default.
12
- * @default false
13
- */
14
- defaultOpen?: boolean;
15
- /**
16
- * The shortcut key.
17
- *
18
- * The key to trigger the modal when pressed with Cmd (Mac) / Ctrl (Windows).
19
- *
20
- * Set to `null` to disable the shortcut.
21
- *
22
- * @default 'k'
23
- */
24
- shortcutKey?: string | null;
25
- /**
26
- * The trigger selector.
27
- *
28
- * The selector to trigger the modal when clicked.
29
- *
30
- * @default '[data-inkeep-modal-trigger]'
31
- */
32
- triggerSelector?: string;
33
- }