@altimateai/ui-components 0.0.3-beta.1 → 0.0.3-beta.3

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.
@@ -1,12 +1,16 @@
1
1
  import React__default, { FC } from 'react';
2
- import { j as ChatbotProps, k as ChatbotProviderProps, A as Artifact, I as InteractionRequest, m as ChatMessage, n as AgentAction } from '../types-S_ndM2U1.js';
3
- export { x as AgentStreamResponse, p as AssistantMeta, v as ChatResponse, q as ChatSession, w as ChatState, s as ChatbotUrls, F as Feedback, r as FileUploadProps, u as InteractionChoice, t as InteractionType, o as LoadingState } from '../types-S_ndM2U1.js';
2
+ import { j as ChatbotProps, k as ChatbotProviderProps, m as ChatState, A as Artifact, I as InteractionRequest, n as ChatMessage, o as AgentAction, p as ChatResponse } from '../types-2N1LeUat.js';
3
+ export { x as AgentStreamResponse, r as AssistantMeta, s as ChatSession, u as ChatbotUrls, F as Feedback, t as FileUploadProps, w as InteractionChoice, v as InteractionType, q as LoadingState } from '../types-2N1LeUat.js';
4
+ import { UnknownAction } from '@reduxjs/toolkit';
4
5
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import '@reduxjs/toolkit';
6
6
  import 'zod';
7
7
 
8
8
  declare const Chatbot: FC<ChatbotProps>;
9
9
 
10
+ interface ChatContextType extends ChatState {
11
+ dispatch: React__default.Dispatch<UnknownAction>;
12
+ }
13
+ declare const useChatContext: () => ChatContextType;
10
14
  declare const ChatProvider: React__default.FC<ChatbotProviderProps>;
11
15
 
12
16
  interface ArtifactsProps {
@@ -77,4 +81,14 @@ declare const ChatTriggerLink: ({ text }: {
77
81
  text: string;
78
82
  }) => react_jsx_runtime.JSX.Element;
79
83
 
80
- export { AgentAction, Artifact, Artifacts, CancelGenerationButton, ChatMessage, ChatProvider, ChatTriggerLink, ChatbotProps, ChatbotProviderProps, Chatbot as ChatbotV2, CoachAI, ContextPanel, FeedbackButtons, InteractionPrompt, InteractionRequest, LoadingIndicator, MessageItem, MessageList, MessageMenu, QuestionForm, RegenerateButton, StatusUpdates };
84
+ declare const useAgentChat: () => {
85
+ sendMessage: ({ message, isResponseToPrompt, context: newContext, dontAddUserMessage, }: {
86
+ message: string;
87
+ isResponseToPrompt?: boolean;
88
+ context?: Record<string, unknown>;
89
+ dontAddUserMessage?: boolean;
90
+ }) => Promise<ChatResponse>;
91
+ updateContextAndSendMessage: (message: string, context: Record<string, unknown>) => Promise<void>;
92
+ };
93
+
94
+ export { AgentAction, Artifact, Artifacts, CancelGenerationButton, ChatMessage, ChatProvider, ChatResponse, ChatState, ChatTriggerLink, ChatbotProps, ChatbotProviderProps, Chatbot as ChatbotV2, CoachAI, ContextPanel, FeedbackButtons, InteractionPrompt, InteractionRequest, LoadingIndicator, MessageItem, MessageList, MessageMenu, QuestionForm, RegenerateButton, StatusUpdates, useAgentChat, useChatContext };
@@ -1,20 +1,22 @@
1
- import { A as t, b as e, a as n, g as o, C as r, c as i, d as g, F as c, I as d, L as C, h as u, M as h, e as I, f as L, Q as M, R as m, S as b } from "../CoachForm.js";
1
+ import { A as s, b as e, a as n, g as o, C as r, c as i, d as g, F as C, I as u, L as c, i as d, M as h, e as I, f as L, Q as M, R as m, S as A, h as b, u as f } from "../CoachForm.js";
2
2
  export {
3
- t as Artifacts,
3
+ s as Artifacts,
4
4
  e as CancelGenerationButton,
5
5
  n as ChatProvider,
6
6
  o as ChatTriggerLink,
7
7
  r as ChatbotV2,
8
8
  i as CoachAI,
9
9
  g as ContextPanel,
10
- c as FeedbackButtons,
11
- d as InteractionPrompt,
12
- C as LoadingIndicator,
13
- u as LoadingState,
10
+ C as FeedbackButtons,
11
+ u as InteractionPrompt,
12
+ c as LoadingIndicator,
13
+ d as LoadingState,
14
14
  h as MessageItem,
15
15
  I as MessageList,
16
16
  L as MessageMenu,
17
17
  M as QuestionForm,
18
18
  m as RegenerateButton,
19
- b as StatusUpdates
19
+ A as StatusUpdates,
20
+ b as useAgentChat,
21
+ f as useChatContext
20
22
  };
@@ -1,4 +1,4 @@
1
- import { q as DH, r as wMe, t as gMe, l as K1, k as J1n, u as pMe, s as vMe, v as Y1n, w as mMe, x as kMe, y as Uee, z as yMe, B as Q1n, D as $H, E as jMe, G as EMe } from "./CoachForm.js";
1
+ import { r as DH, t as wMe, v as gMe, m as K1, l as J1n, w as pMe, s as vMe, x as Y1n, y as mMe, z as kMe, B as Uee, D as yMe, E as Q1n, G as $H, H as jMe, J as EMe } from "./CoachForm.js";
2
2
  import { c as Hee, g as CMe, s as bI } from "./redux-toolkit.modern.js";
3
3
  var Wee = { exports: {} };
4
4
  (function(Ae, It) {
package/dist/index.d.ts CHANGED
@@ -4,8 +4,8 @@ import * as React$1 from 'react';
4
4
  import { ButtonHTMLAttributes, ReactNode, HTMLAttributes, FC, MouseEvent } from 'react';
5
5
  import { B as ButtonProps } from './Button-Dln4BC6y.js';
6
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
7
- import { T as TaskLabels, a as TeamMateContextProps, b as TeamMateState, c as TeamMateConfig, d as TeamMateActionType, e as TeamMateAvailability } from './types-S_ndM2U1.js';
8
- export { i as Citation, f as CoachAiConfirmationResponse, C as CoachAiResponse, g as ContentCategory, L as Learning, P as PersonalizationScope, h as TeamMateComponentProps, l as learningSchema } from './types-S_ndM2U1.js';
7
+ import { T as TaskLabels, a as TeamMateContextProps, b as TeamMateState, c as TeamMateConfig, d as TeamMateActionType, e as TeamMateAvailability } from './types-2N1LeUat.js';
8
+ export { i as Citation, f as CoachAiConfirmationResponse, C as CoachAiResponse, g as ContentCategory, L as Learning, P as PersonalizationScope, h as TeamMateComponentProps, l as learningSchema } from './types-2N1LeUat.js';
9
9
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
10
10
  import { PayloadAction } from '@reduxjs/toolkit';
11
11
  import * as immer from 'immer';
package/dist/index.js CHANGED
@@ -1,21 +1,21 @@
1
1
  import { j as e, i as r, h as s, C as t, D as n, L as i, T as m, m as d, l as p, k as C } from "./main.js";
2
- import { Alert as l, Card as v, CardBody as T, CardFooter as u, CardImg as f, CardSubtitle as P, CardText as F, CardTitle as M, Col as k, Container as B, Fade as L, Form as g, FormFeedback as y, FormGroup as G, Input as I, InputGroup as h, Label as A, List as S, ListGroup as b, ListGroupItem as x, Modal as j, ModalBody as D, Nav as w, NavItem as H, NavLink as N, Offcanvas as O, OffcanvasBody as z, OffcanvasHeader as K, Popover as R, PopoverBody as V, PopoverHeader as W, Row as X, Spinner as Y } from "reactstrap";
3
- import { A as $, C as q, I as E, T as J } from "./redux-toolkit.modern.js";
4
- import { _ as U, a4 as Z, X as aa, K as oa, a3 as ea, a2 as ra, Y as sa, W as ta, a7 as na, a8 as ia, a6 as ma, V as da, a5 as pa, $ as Ca, a0 as ca, a1 as la, P as va } from "./CoachForm.js";
2
+ import { Alert as l, Card as v, CardBody as T, CardFooter as u, CardImg as f, CardSubtitle as F, CardText as M, CardTitle as P, Col as k, Container as B, Fade as L, Form as g, FormFeedback as y, FormGroup as G, Input as I, InputGroup as h, Label as A, List as S, ListGroup as b, ListGroupItem as x, Modal as j, ModalBody as D, Nav as O, NavItem as w, NavLink as H, Offcanvas as N, OffcanvasBody as z, OffcanvasHeader as R, Popover as V, PopoverBody as X, PopoverHeader as Y, Row as Z, Spinner as _ } from "reactstrap";
3
+ import { A as E, C as J, I as K, T as Q } from "./redux-toolkit.modern.js";
4
+ import { a0 as W, a6 as $, Z as aa, O as oa, a5 as ea, a4 as ra, _ as sa, Y as ta, a9 as na, aa as ia, a8 as ma, X as da, a7 as pa, a1 as Ca, a2 as ca, a3 as la, V as va } from "./CoachForm.js";
5
5
  export {
6
6
  l as Alert,
7
- $ as ApiHelper,
8
- U as Badge,
7
+ E as ApiHelper,
8
+ W as Badge,
9
9
  v as Card,
10
10
  T as CardBody,
11
11
  u as CardFooter,
12
12
  f as CardImg,
13
- P as CardSubtitle,
14
- F as CardText,
15
- M as CardTitle,
16
- Z as CoachForm,
13
+ F as CardSubtitle,
14
+ M as CardText,
15
+ P as CardTitle,
16
+ $ as CoachForm,
17
17
  e as CoachFormButton,
18
- q as CodeBlock,
18
+ J as CodeBlock,
19
19
  k as Col,
20
20
  B as Container,
21
21
  aa as ContentCategory,
@@ -27,7 +27,7 @@ export {
27
27
  g as Form,
28
28
  y as FormFeedback,
29
29
  G as FormGroup,
30
- E as IconButton,
30
+ K as IconButton,
31
31
  I as Input,
32
32
  h as InputGroup,
33
33
  A as Label,
@@ -40,22 +40,22 @@ export {
40
40
  ra as MermaidDiagram,
41
41
  j as Modal,
42
42
  D as ModalBody,
43
- w as Nav,
44
- H as NavItem,
45
- N as NavLink,
46
- O as Offcanvas,
43
+ O as Nav,
44
+ w as NavItem,
45
+ H as NavLink,
46
+ N as Offcanvas,
47
47
  z as OffcanvasBody,
48
- K as OffcanvasHeader,
48
+ R as OffcanvasHeader,
49
49
  sa as PersonalizationScope,
50
50
  ta as Popconfirm,
51
- R as Popover,
52
- V as PopoverBody,
53
- W as PopoverHeader,
51
+ V as Popover,
52
+ X as PopoverBody,
53
+ Y as PopoverHeader,
54
54
  na as ProjectGovernorAllowedFiles,
55
55
  ia as ProjectGovernorCheckSchema,
56
56
  ma as ProjectGovernorCheckTypes,
57
- X as Row,
58
- Y as Spinner,
57
+ Z as Row,
58
+ _ as Spinner,
59
59
  da as Stack,
60
60
  pa as TaskLabels,
61
61
  Ca as TeamMateActionType,
@@ -64,7 +64,7 @@ export {
64
64
  d as TeamMates,
65
65
  la as TeamMatesConfig,
66
66
  p as TeammateActions,
67
- J as Tooltip,
67
+ Q as Tooltip,
68
68
  va as learningSchema,
69
69
  C as useTeamMateContext
70
70
  };
package/dist/is_dark.js CHANGED
@@ -1,4 +1,4 @@
1
- import { H as s, U as r } from "./CoachForm.js";
1
+ import { K as s, U as r } from "./CoachForm.js";
2
2
  const i = (n) => {
3
3
  const { r: t, g: a, b: o } = s.parse(n), e = 0.2126 * r.channel.toLinear(t) + 0.7152 * r.channel.toLinear(a) + 0.0722 * r.channel.toLinear(o);
4
4
  return r.lang.round(e);
package/dist/main.js CHANGED
@@ -1,6 +1,6 @@
1
1
  import { Card as vt, CardBody as an, CardTitle as un, FormGroup as Pt, Input as Ft, FormFeedback as Xn, Collapse as Gn, Alert as ln, Col as Zn, CardImg as Qn, CardSubtitle as Jn, CardText as er, Row as tr } from "reactstrap";
2
2
  import { g as mt, a as cn, A as ve, C as nr, I as Ie, T as rr } from "./redux-toolkit.modern.js";
3
- import { K as dn, N as lt, O as or, P as ir, T as fn, V as se, W as sr, X as ar, Y as ur, Z as lr, _ as cr, $ as tt, a0 as dr, a1 as fr } from "./CoachForm.js";
3
+ import { O as dn, P as lt, T as or, V as ir, W as fn, X as se, Y as sr, Z as ar, _ as ur, $ as lr, a0 as cr, a1 as tt, a2 as dr, a3 as fr } from "./CoachForm.js";
4
4
  import { j as v, A as pn, i as pr, k as gr, b as hr, C as vr, D as mr, E as Er, e as yr, d as br } from "./index2.js";
5
5
  import * as te from "react";
6
6
  import Z, { createContext as _e, useReducer as gn, useCallback as we, useMemo as fe, useContext as be, useLayoutEffect as Cr, useEffect as le, useRef as Se, useId as hn, useInsertionEffect as Sr, Children as De, isValidElement as _r, useState as re, lazy as Ar } from "react";
@@ -1,4 +1,4 @@
1
- import { J as Zy, k as Dn, l as fa, s as Qy, m as Jy, n as jy } from "./CoachForm.js";
1
+ import { N as Zy, l as Dn, m as fa, s as Qy, n as Jy, o as jy } from "./CoachForm.js";
2
2
  import { c as za, g as Vu, s as Cn } from "./redux-toolkit.modern.js";
3
3
  import { i as em } from "./is_dark.js";
4
4
  var Uu = { exports: {} };
@@ -1026,12 +1026,12 @@ const ku = ({ options: e, value: t, onChange: a, placeholder: r, buttonProps: n,
1026
1026
  variant: "outline",
1027
1027
  role: "combobox",
1028
1028
  "aria-expanded": i,
1029
- id: `${o}-combobox`,
1029
+ id: o ? `${o}-combobox` : "default-combobox",
1030
1030
  ...n,
1031
1031
  className: `al-w-auto al-justify-start al-font-normal ${n == null ? void 0 : n.className}`,
1032
1032
  children: [
1033
1033
  s && /* @__PURE__ */ l.jsx("div", { children: s }),
1034
- t ? (f = e.find((m) => m.value === t)) == null ? void 0 : f.label : r || r,
1034
+ t ? (f = e.find((m) => m.value === t)) == null ? void 0 : f.label : r,
1035
1035
  /* @__PURE__ */ l.jsx(Us, { className: "al-opacity-50" })
1036
1036
  ]
1037
1037
  }
@@ -11,7 +11,7 @@ import {
11
11
  NativeSelect,
12
12
  } from "../shadcn";
13
13
  import { DatabaseIcon } from "@ac-assets/icons";
14
- import Combobox from "./combobox";
14
+ import Combobox from "./Combobox";
15
15
  import { useState } from "react";
16
16
 
17
17
  export default {
@@ -18,7 +18,7 @@ const Template: StoryFn = ({ side = "right" }) => (
18
18
  <SheetTrigger asChild>
19
19
  <Button variant="outline">Open Sheet</Button>
20
20
  </SheetTrigger>
21
- <SheetContent side={side}>
21
+ <SheetContent side={side} className="al-w-full">
22
22
  <SheetHeader>
23
23
  <SheetTitle>Sheet Title</SheetTitle>
24
24
  </SheetHeader>
@@ -1,4 +1,4 @@
1
- import { i as kt, p as vt, j as wt, k as rt, l as I, s as St, m as Et, n as Tt, o as et } from "./CoachForm.js";
1
+ import { j as kt, p as vt, k as wt, l as rt, m as I, s as St, n as Et, o as Tt, q as et } from "./CoachForm.js";
2
2
  import { s as q } from "./redux-toolkit.modern.js";
3
3
  import { i as It } from "./is_dark.js";
4
4
  var X = function() {
@@ -59,6 +59,7 @@ interface ChatbotProviderProps extends ChatbotProps {
59
59
  components?: {
60
60
  feedback?: ReactNode;
61
61
  };
62
+ isMarkdownResponse?: boolean;
62
63
  }
63
64
  type InteractionType = "text" | "select" | "multiSelect" | "confirm";
64
65
  interface InteractionChoice {
@@ -117,6 +118,7 @@ interface ChatState {
117
118
  urls?: ChatbotUrls;
118
119
  disableContext?: boolean;
119
120
  requestParams?: RequestInit;
121
+ isMarkdownResponse?: boolean;
120
122
  components?: {
121
123
  feedback?: ReactNode;
122
124
  };
@@ -247,4 +249,4 @@ interface Citation {
247
249
  taskLabel: TaskLabels;
248
250
  }
249
251
 
250
- export { type Artifact as A, type CoachAiResponse as C, type Feedback as F, type InteractionRequest as I, type Learning as L, PersonalizationScope as P, TaskLabels as T, type TeamMateContextProps as a, type TeamMateState as b, type TeamMateConfig as c, TeamMateActionType as d, TeamMateAvailability as e, type CoachAiConfirmationResponse as f, ContentCategory as g, type TeamMateComponentProps as h, type Citation as i, type ChatbotProps as j, type ChatbotProviderProps as k, learningSchema as l, type ChatMessage as m, type AgentAction as n, LoadingState as o, type AssistantMeta as p, type ChatSession as q, type FileUploadProps as r, type ChatbotUrls as s, type InteractionType as t, type InteractionChoice as u, type ChatResponse as v, type ChatState as w, type AgentStreamResponse as x };
252
+ export { type Artifact as A, type CoachAiResponse as C, type Feedback as F, type InteractionRequest as I, type Learning as L, PersonalizationScope as P, TaskLabels as T, type TeamMateContextProps as a, type TeamMateState as b, type TeamMateConfig as c, TeamMateActionType as d, TeamMateAvailability as e, type CoachAiConfirmationResponse as f, ContentCategory as g, type TeamMateComponentProps as h, type Citation as i, type ChatbotProps as j, type ChatbotProviderProps as k, learningSchema as l, type ChatState as m, type ChatMessage as n, type AgentAction as o, type ChatResponse as p, LoadingState as q, type AssistantMeta as r, type ChatSession as s, type FileUploadProps as t, type ChatbotUrls as u, type InteractionType as v, type InteractionChoice as w, type AgentStreamResponse as x };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altimateai/ui-components",
3
- "version": "0.0.3-beta.1",
3
+ "version": "0.0.3-beta.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/AltimateAI/altimate-components.git"