@altimateai/ui-components 0.0.31-beta.1 → 0.0.31-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,6 +1,7 @@
1
1
  import React__default, { FC } from 'react';
2
- import { j as ChatbotProps, k as ChatbotProviderProps, m as ChatState, A as Artifact, n as ContextOption, I as InteractionRequest, o as ChatMessage, p as AgentAction, q as ChatResponse, r as AgentStreamResponse, i as Citation, s as TodoItem } from '../types-rSkEslHb.js';
3
- export { u as AssistantMeta, v as ChatSession, x as ChatbotUrls, D as Datamate, F as Feedback, w as FileUploadProps, H as FinalResponseData, z as InteractionChoice, y as InteractionType, t as LoadingState, M as Mode, G as ProgressUpdate, E as ToolUsageData, J as agentStreamResponseSchema, B as todoItemSchema } from '../types-rSkEslHb.js';
2
+ import { j as ChatbotProps, k as ChatbotProviderProps, m as ChatState, A as Artifact, n as ContextOption, I as InteractionRequest, o as ChatMessage, p as AgentAction, q as ChatResponse, F as Feedback, r as LoadingState, s as ChatSession, i as Citation, t as TodoItem, u as AgentStreamResponse } from '../types-C8914kq2.js';
3
+ export { v as AssistantMeta, x as ChatbotUrls, D as Datamate, w as FileUploadProps, H as FinalResponseData, z as InteractionChoice, y as InteractionType, M as Mode, G as ProgressUpdate, E as ToolUsageData, J as agentStreamResponseSchema, B as todoItemSchema } from '../types-C8914kq2.js';
4
+ import * as _reduxjs_toolkit from '@reduxjs/toolkit';
4
5
  import { UnknownAction } from '@reduxjs/toolkit';
5
6
  import * as react_jsx_runtime from 'react/jsx-runtime';
6
7
  import 'zod';
@@ -96,6 +97,72 @@ declare const useAgentChat: () => {
96
97
  updateContextAndSendMessage: (message: string, context: Record<string, unknown>) => Promise<void>;
97
98
  };
98
99
 
100
+ interface AddMessagePayload {
101
+ sessionId: string;
102
+ id: string;
103
+ content: string;
104
+ role: "user" | "assistant";
105
+ timestamp: number;
106
+ actions?: AgentAction[];
107
+ interaction?: InteractionRequest;
108
+ artifacts?: Artifact[];
109
+ heading: string;
110
+ citations?: Citation[];
111
+ todos?: TodoItem[];
112
+ }
113
+ interface DeleteMessagePayload {
114
+ sessionId: string;
115
+ messageId: string;
116
+ }
117
+ interface UpdateContextPayload {
118
+ sessionId: string;
119
+ context: Record<string, unknown>;
120
+ }
121
+ interface UpdateModePayload {
122
+ sessionId: string;
123
+ mode: string;
124
+ }
125
+ interface UpdateDatamatesPayload {
126
+ sessionId: string;
127
+ datamates?: string[];
128
+ }
129
+ declare const initialState: ChatState;
130
+ declare const createSession: _reduxjs_toolkit.ActionCreatorWithPayload<{
131
+ context?: Record<string, unknown>;
132
+ models?: {
133
+ label: string;
134
+ value: string;
135
+ }[];
136
+ }, "chat/createSession">;
137
+ declare const setSelectedModel: _reduxjs_toolkit.ActionCreatorWithPayload<{
138
+ sessionId: string;
139
+ model: string;
140
+ }, "chat/setSelectedModel">;
141
+ declare const setCurrentSession: _reduxjs_toolkit.ActionCreatorWithPayload<string | null, "chat/setCurrentSession">;
142
+ declare const addMessage: _reduxjs_toolkit.ActionCreatorWithPayload<AddMessagePayload, "chat/addMessage">;
143
+ declare const updateMessageFeedback: _reduxjs_toolkit.ActionCreatorWithPayload<{
144
+ messageId: string;
145
+ feedback: Feedback;
146
+ }, "chat/updateMessageFeedback">;
147
+ declare const clearHistory: _reduxjs_toolkit.ActionCreatorWithoutPayload<"chat/clearHistory">;
148
+ declare const deleteMessage: _reduxjs_toolkit.ActionCreatorWithPayload<DeleteMessagePayload, "chat/deleteMessage">;
149
+ declare const setLoadingState: _reduxjs_toolkit.ActionCreatorWithPayload<LoadingState, "chat/setLoadingState">;
150
+ declare const setError: _reduxjs_toolkit.ActionCreatorWithPayload<string | null, "chat/setError">;
151
+ declare const setAbortController: _reduxjs_toolkit.ActionCreatorWithPayload<AbortController | null, "chat/setAbortController">;
152
+ declare const addAction: _reduxjs_toolkit.ActionCreatorWithPayload<AgentAction, "chat/addAction">;
153
+ declare const clearActions: _reduxjs_toolkit.ActionCreatorWithoutPayload<"chat/clearActions">;
154
+ declare const setTodos: _reduxjs_toolkit.ActionCreatorWithPayload<{
155
+ id: string;
156
+ content: string;
157
+ status: "pending" | "in_progress" | "completed";
158
+ priority: "high" | "low" | "medium";
159
+ }[], "chat/setTodos">;
160
+ declare const clearTodos: _reduxjs_toolkit.ActionCreatorWithoutPayload<"chat/clearTodos">;
161
+ declare const updateContext: _reduxjs_toolkit.ActionCreatorWithPayload<UpdateContextPayload, "chat/updateContext">;
162
+ declare const updateMode: _reduxjs_toolkit.ActionCreatorWithPayload<UpdateModePayload, "chat/updateMode">;
163
+ declare const updateDatamates: _reduxjs_toolkit.ActionCreatorWithPayload<UpdateDatamatesPayload, "chat/updateDatamates">;
164
+ declare const setSessions: _reduxjs_toolkit.ActionCreatorWithPayload<Record<string, ChatSession>, "chat/setSessions">;
165
+
99
166
  interface StreamProcessorCallbacks {
100
167
  onAction?: (action: AgentAction) => void;
101
168
  onCitation?: (citations: Citation[]) => void;
@@ -186,4 +253,4 @@ declare const Citations: ({ citations, frontEndUrl, }: {
186
253
  frontEndUrl: string;
187
254
  }) => JSX.Element | null;
188
255
 
189
- export { AgentAction, AgentStreamResponse, Artifact, Artifacts, CancelGenerationButton, ChatMessage, ChatProvider, ChatResponse, ChatState, ChatTriggerLink, ChatbotProps, ChatbotProviderProps, Chatbot as ChatbotV2, Citations, CoachAI, ContextOption, ContextPanel, FeedbackButtons, InteractionPrompt, InteractionRequest, LoadingIndicator, MessageItem, MessageList, MessageMenu, QuestionForm, RegenerateButton, StatusUpdates, TodoItem, processAgentMessageContent, processAgentStream, processExistingConversation, processPlaygroundSessionTurns, sendMessageAndProcessStream, streamResponseToAgentMessages, useAgentChat, useChatContext };
256
+ export { AgentAction, AgentStreamResponse, Artifact, Artifacts, CancelGenerationButton, ChatMessage, ChatProvider, ChatResponse, ChatSession, ChatState, ChatTriggerLink, ChatbotProps, ChatbotProviderProps, Chatbot as ChatbotV2, Citations, CoachAI, ContextOption, ContextPanel, Feedback, FeedbackButtons, InteractionPrompt, InteractionRequest, LoadingIndicator, LoadingState, MessageItem, MessageList, MessageMenu, QuestionForm, RegenerateButton, StatusUpdates, TodoItem, addAction, addMessage, clearActions, clearHistory, clearTodos, createSession, deleteMessage, initialState, processAgentMessageContent, processAgentStream, processExistingConversation, processPlaygroundSessionTurns, sendMessageAndProcessStream, setAbortController, setCurrentSession, setError, setLoadingState, setSelectedModel, setSessions, setTodos, streamResponseToAgentMessages, updateContext, updateDatamates, updateMessageFeedback, updateMode, useAgentChat, useChatContext };
@@ -1,31 +1,50 @@
1
- import { A as e, b as t, a as n, g as o, C as r, m as g, c as i, d as c, F as C, I as m, L as d, n as u, M as p, e as h, f as S, Q as A, R as M, S as I, o as L, k as P, p as l, j as x, l as R, s as b, i as f, t as k, h as B, u as F } from "../CoachForm.js";
1
+ import { A as e, b as t, a as o, g as n, C as r, m as i, c as d, d as g, F as c, I as u, L as C, n as S, M as p, e as l, f as m, Q as M, R as A, S as h, H as x, x as I, o as L, J as P, z as T, N as b, r as k, B, q as F, k as R, p as f, j as v, l as y, s as E, G as D, w as G, E as H, D as Q, v as U, U as j, K as q, i as w, t as z, O as J, T as K, y as N, P as O, h as V, u as W } from "../CoachForm.js";
2
2
  export {
3
3
  e as Artifacts,
4
4
  t as CancelGenerationButton,
5
- n as ChatProvider,
6
- o as ChatTriggerLink,
5
+ o as ChatProvider,
6
+ n as ChatTriggerLink,
7
7
  r as ChatbotV2,
8
- g as Citations,
9
- i as CoachAI,
10
- c as ContextPanel,
11
- C as FeedbackButtons,
12
- m as InteractionPrompt,
13
- d as LoadingIndicator,
14
- u as LoadingState,
8
+ i as Citations,
9
+ d as CoachAI,
10
+ g as ContextPanel,
11
+ c as FeedbackButtons,
12
+ u as InteractionPrompt,
13
+ C as LoadingIndicator,
14
+ S as LoadingState,
15
15
  p as MessageItem,
16
- h as MessageList,
17
- S as MessageMenu,
18
- A as QuestionForm,
19
- M as RegenerateButton,
20
- I as StatusUpdates,
16
+ l as MessageList,
17
+ m as MessageMenu,
18
+ M as QuestionForm,
19
+ A as RegenerateButton,
20
+ h as StatusUpdates,
21
+ x as addAction,
22
+ I as addMessage,
21
23
  L as agentStreamResponseSchema,
22
- P as processAgentMessageContent,
23
- l as processAgentStream,
24
- x as processExistingConversation,
25
- R as processPlaygroundSessionTurns,
26
- b as sendMessageAndProcessStream,
27
- f as streamResponseToAgentMessages,
28
- k as todoItemSchema,
29
- B as useAgentChat,
30
- F as useChatContext
24
+ P as clearActions,
25
+ T as clearHistory,
26
+ b as clearTodos,
27
+ k as createSession,
28
+ B as deleteMessage,
29
+ F as initialState,
30
+ R as processAgentMessageContent,
31
+ f as processAgentStream,
32
+ v as processExistingConversation,
33
+ y as processPlaygroundSessionTurns,
34
+ E as sendMessageAndProcessStream,
35
+ D as setAbortController,
36
+ G as setCurrentSession,
37
+ H as setError,
38
+ Q as setLoadingState,
39
+ U as setSelectedModel,
40
+ j as setSessions,
41
+ q as setTodos,
42
+ w as streamResponseToAgentMessages,
43
+ z as todoItemSchema,
44
+ J as updateContext,
45
+ K as updateDatamates,
46
+ N as updateMessageFeedback,
47
+ O as updateMode,
48
+ V as useAgentChat,
49
+ W as useChatContext
31
50
  };
@@ -1,4 +1,4 @@
1
- import { E as DH, G as wMe, H as gMe, x as K1, w as J1n, J as pMe, y as vMe, K as Y1n, N as mMe, O as kMe, P as Uee, T as yMe, U as Q1n, V as $H, W as jMe, X as EMe } from "./CoachForm.js";
1
+ import { a2 as DH, a3 as wMe, a4 as gMe, Z as K1, Y as J1n, a5 as pMe, _ as vMe, a6 as Y1n, a7 as mMe, a8 as kMe, a9 as Uee, aa as yMe, ab as Q1n, ac as $H, ad as jMe, ae 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
@@ -2,8 +2,8 @@ import * as React$1 from 'react';
2
2
  import { HTMLAttributes, ButtonHTMLAttributes, ReactNode, FC, MouseEvent } from 'react';
3
3
  import { B as ButtonProps } from './Button-C4jhPGlR.js';
4
4
  import * as react_jsx_runtime from 'react/jsx-runtime';
5
- import { T as TaskLabels, a as TeamMateContextProps, b as TeamMateState, c as TeamMateConfig, d as TeamMateActionType, e as TeamMateAvailability } from './types-rSkEslHb.js';
6
- 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-rSkEslHb.js';
5
+ import { T as TaskLabels, a as TeamMateContextProps, b as TeamMateState, c as TeamMateConfig, d as TeamMateActionType, e as TeamMateAvailability } from './types-C8914kq2.js';
6
+ 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-C8914kq2.js';
7
7
  import * as _reduxjs_toolkit from '@reduxjs/toolkit';
8
8
  import { PayloadAction } from '@reduxjs/toolkit';
9
9
  import * as immer from 'immer';
package/dist/index.js CHANGED
@@ -1,39 +1,39 @@
1
- import { j as o, i as s, h as r, C as t, D as n, L as i, T as m, m as c, l as C, k as p } from "./main.js";
1
+ import { j as e, i as s, h as r, C as t, D as n, L as i, T as m, m as c, l as p, k as C } from "./main.js";
2
2
  import { C as T, T as v } from "./Table.js";
3
- import { ac as f, a2 as M, $ as g, ab as h, aa as k, a3 as u, a1 as P, af as x, ag as A, ae as S, a9 as b, ad as j, a6 as y, a7 as B, a8 as D, a5 as F } from "./CoachForm.js";
4
- import { A as L, C as I, I as w } from "./redux-toolkit.modern.js";
5
- import { Z as H } from "./Stack.js";
3
+ import { av as u, al as M, ai as d, au as f, at as h, am as x, ak as P, ay as g, az as A, ax as S, as as y, aw as b, ap as j, aq as B, ar as D, ao as F } from "./CoachForm.js";
4
+ import { A as L, C as w, I } from "./redux-toolkit.modern.js";
5
+ import { Z as q } from "./Stack.js";
6
6
  export {
7
7
  L as ApiHelper,
8
- f as CoachForm,
9
- o as CoachFormButton,
10
- I as CodeBlock,
8
+ u as CoachForm,
9
+ e as CoachFormButton,
10
+ w as CodeBlock,
11
11
  T as Collapse,
12
12
  M as ContentCategory,
13
13
  s as ConversationGroupProvider,
14
14
  r as ConversationInputForm,
15
15
  t as ConversationSources,
16
16
  n as DbtDocs,
17
- w as IconButton,
17
+ I as IconButton,
18
18
  i as Learnings,
19
- g as LoadingButton,
20
- h as Markdown,
21
- k as MermaidDiagram,
22
- u as PersonalizationScope,
19
+ d as LoadingButton,
20
+ f as Markdown,
21
+ h as MermaidDiagram,
22
+ x as PersonalizationScope,
23
23
  P as Popconfirm,
24
- x as ProjectGovernorAllowedFiles,
24
+ g as ProjectGovernorAllowedFiles,
25
25
  A as ProjectGovernorCheckSchema,
26
26
  S as ProjectGovernorCheckTypes,
27
- b as Spinner,
28
- H as Stack,
27
+ y as Spinner,
28
+ q as Stack,
29
29
  v as Table,
30
- j as TaskLabels,
31
- y as TeamMateActionType,
30
+ b as TaskLabels,
31
+ j as TeamMateActionType,
32
32
  B as TeamMateAvailability,
33
33
  m as TeamMateProvider,
34
34
  c as TeamMates,
35
35
  D as TeamMatesConfig,
36
- C as TeammateActions,
36
+ p as TeammateActions,
37
37
  F as learningSchema,
38
- p as useTeamMateContext
38
+ C as useTeamMateContext
39
39
  };
package/dist/is_dark.js CHANGED
@@ -1,6 +1,6 @@
1
- import { Y as s, Z as r } from "./CoachForm.js";
1
+ import { af as s, ag as r } from "./CoachForm.js";
2
2
  const i = (n) => {
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);
3
+ const { r: a, g: t, b: o } = s.parse(n), e = 0.2126 * r.channel.toLinear(a) + 0.7152 * r.channel.toLinear(t) + 0.0722 * r.channel.toLinear(o);
4
4
  return r.lang.round(e);
5
5
  }, c = (n) => i(n) >= 0.5, u = (n) => !c(n);
6
6
  export {
package/dist/main.js CHANGED
@@ -1,5 +1,5 @@
1
1
  import { C as Yn } from "./Table.js";
2
- import { $ as un, a0 as dt, a1 as Wn, a2 as Xn, a3 as Kn, a4 as Zn, a5 as Gn, a6 as rt, a7 as Qn, a8 as Jn } from "./CoachForm.js";
2
+ import { ai as un, aj as dt, ak as Wn, al as Xn, am as Kn, an as Zn, ao as Gn, ap as rt, aq as Qn, ar as Jn } from "./CoachForm.js";
3
3
  import { g as yt, a as ln, A as ve, C as er, I as Ie, u as cn, b as tr } from "./redux-toolkit.modern.js";
4
4
  import { Q as ye, U as $e, X as He, Y as nr, Z as oe, _ as rr, $ as or, a0 as ft, a1 as ir } from "./Stack.js";
5
5
  import { j as h, A as dn, f as sr, g as ar, b as ur, C as lr, D as cr, E as dr, e as fr, d as pr } from "./index2.js";
@@ -1,4 +1,4 @@
1
- import { _ as Zy, w as Dn, x as fa, y as Qy, z as Jy, B as jy } from "./CoachForm.js";
1
+ import { ah as Zy, Y as Dn, Z as fa, _ as Qy, $ as Jy, a0 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: {} };
@@ -1,5 +1,5 @@
1
- import { q as kt, r as vt, v as wt, w as rt, x as I, y as St, z as Et, B as Tt, D as et } from "./CoachForm.js";
2
- import { s as q } from "./redux-toolkit.modern.js";
1
+ import { V as kt, W as vt, X as wt, Y as rt, Z as I, _ as St, $ as Et, a0 as Tt, a1 as et } from "./CoachForm.js";
2
+ import { s as Z } from "./redux-toolkit.modern.js";
3
3
  import { i as It } from "./is_dark.js";
4
4
  var X = function() {
5
5
  var n = function(k, r, a, h) {
@@ -76,7 +76,7 @@ var X = function() {
76
76
  }
77
77
  },
78
78
  parse: function(r) {
79
- var a = this, h = [0], u = [], y = [null], c = [], M = this.table, x = "", N = 0, S = 0, L = 2, z = 1, H = c.slice.call(arguments, 1), m = Object.create(this.lexer), C = { yy: {} };
79
+ var a = this, h = [0], u = [], y = [null], c = [], M = this.table, x = "", N = 0, S = 0, L = 2, V = 1, H = c.slice.call(arguments, 1), m = Object.create(this.lexer), C = { yy: {} };
80
80
  for (var O in this.yy)
81
81
  Object.prototype.hasOwnProperty.call(this.yy, O) && (C.yy[O] = this.yy[O]);
82
82
  m.setInput(r, C.yy), C.yy.lexer = m, C.yy.parser = this, typeof m.yylloc > "u" && (m.yylloc = {});
@@ -86,17 +86,17 @@ var X = function() {
86
86
  typeof C.yy.parseError == "function" ? this.parseError = C.yy.parseError : this.parseError = Object.getPrototypeOf(this).parseError;
87
87
  function bt() {
88
88
  var P;
89
- return P = u.pop() || m.lex() || z, typeof P != "number" && (P instanceof Array && (u = P, P = u.pop()), P = a.symbols_[P] || P), P;
89
+ return P = u.pop() || m.lex() || V, typeof P != "number" && (P instanceof Array && (u = P, P = u.pop()), P = a.symbols_[P] || P), P;
90
90
  }
91
- for (var T, V, $, K, W = {}, j, A, tt, G; ; ) {
92
- if (V = h[h.length - 1], this.defaultActions[V] ? $ = this.defaultActions[V] : ((T === null || typeof T > "u") && (T = bt()), $ = M[V] && M[V][T]), typeof $ > "u" || !$.length || !$[0]) {
91
+ for (var T, z, $, K, W = {}, j, A, tt, G; ; ) {
92
+ if (z = h[h.length - 1], this.defaultActions[z] ? $ = this.defaultActions[z] : ((T === null || typeof T > "u") && (T = bt()), $ = M[z] && M[z][T]), typeof $ > "u" || !$.length || !$[0]) {
93
93
  var Q = "";
94
94
  G = [];
95
- for (j in M[V])
95
+ for (j in M[z])
96
96
  this.terminals_[j] && j > L && G.push("'" + this.terminals_[j] + "'");
97
97
  m.showPosition ? Q = "Parse error on line " + (N + 1) + `:
98
98
  ` + m.showPosition() + `
99
- Expecting ` + G.join(", ") + ", got '" + (this.terminals_[T] || T) + "'" : Q = "Parse error on line " + (N + 1) + ": Unexpected " + (T == z ? "end of input" : "'" + (this.terminals_[T] || T) + "'"), this.parseError(Q, {
99
+ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[T] || T) + "'" : Q = "Parse error on line " + (N + 1) + ": Unexpected " + (T == V ? "end of input" : "'" + (this.terminals_[T] || T) + "'"), this.parseError(Q, {
100
100
  text: m.match,
101
101
  token: this.terminals_[T] || T,
102
102
  line: m.yylineno,
@@ -105,7 +105,7 @@ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[T] || T) + "'" : Q = "
105
105
  });
106
106
  }
107
107
  if ($[0] instanceof Array && $.length > 1)
108
- throw new Error("Parse Error: multiple actions possible at state: " + V + ", token: " + T);
108
+ throw new Error("Parse Error: multiple actions possible at state: " + z + ", token: " + T);
109
109
  switch ($[0]) {
110
110
  case 1:
111
111
  h.push(T), y.push(m.yytext), c.push(m.yylloc), h.push($[1]), T = null, S = m.yyleng, x = m.yytext, N = m.yylineno, J = m.yylloc;
@@ -375,10 +375,10 @@ Expecting ` + G.join(", ") + ", got '" + (this.terminals_[T] || T) + "'" : Q = "
375
375
  X.parser = X;
376
376
  const $t = X;
377
377
  let F = "", at = 0;
378
- const Y = [], U = [], B = [], ct = () => kt, ot = (n, t, e) => {
378
+ const Y = [], q = [], B = [], ct = () => kt, ot = (n, t, e) => {
379
379
  vt(globalThis, n, t, e);
380
380
  }, lt = function() {
381
- Y.length = 0, U.length = 0, F = "", B.length = 0, wt();
381
+ Y.length = 0, q.length = 0, F = "", B.length = 0, wt();
382
382
  }, ht = function(n) {
383
383
  F = n, Y.push(n);
384
384
  }, dt = function() {
@@ -389,7 +389,7 @@ const Y = [], U = [], B = [], ct = () => kt, ot = (n, t, e) => {
389
389
  let e = 0;
390
390
  for (; !n && e < t; )
391
391
  n = nt(), e++;
392
- return U.push(...B), U;
392
+ return q.push(...B), q;
393
393
  }, pt = function(n, t, e) {
394
394
  const s = {
395
395
  id: at++,
@@ -411,7 +411,7 @@ const Y = [], U = [], B = [], ct = () => kt, ot = (n, t, e) => {
411
411
  task: n,
412
412
  classes: []
413
413
  };
414
- U.push(t);
414
+ q.push(t);
415
415
  }, nt = function() {
416
416
  const n = function(e) {
417
417
  return B[e].processed;
@@ -442,7 +442,7 @@ const Y = [], U = [], B = [], ct = () => kt, ot = (n, t, e) => {
442
442
  getSections: dt,
443
443
  getTasks: ut,
444
444
  parseDirective: ot
445
- }, Symbol.toStringTag, { value: "Module" })), Lt = 12, Z = function(n, t) {
445
+ }, Symbol.toStringTag, { value: "Module" })), Lt = 12, U = function(n, t) {
446
446
  const e = n.append("rect");
447
447
  return e.attr("x", t.x), e.attr("y", t.y), e.attr("fill", t.fill), e.attr("stroke", t.stroke), e.attr("width", t.width), e.attr("height", t.height), e.attr("rx", t.rx), e.attr("ry", t.ry), t.class !== void 0 && e.attr("class", t.class), e;
448
448
  }, At = function(n, t) {
@@ -476,7 +476,7 @@ const Y = [], U = [], B = [], ct = () => kt, ot = (n, t, e) => {
476
476
  s.attr("points", e(t.x, t.y, 50, 20, 7)), s.attr("class", "labelBox"), t.y = t.y + t.labelMargin, t.x = t.x + 0.5 * t.labelMargin, ft(n, t);
477
477
  }, Ct = function(n, t, e) {
478
478
  const s = n.append("g"), i = D();
479
- i.x = t.x, i.y = t.y, i.fill = t.fill, i.width = e.width, i.height = e.height, i.class = "journey-section section-type-" + t.num, i.rx = 3, i.ry = 3, Z(s, i), mt(e)(
479
+ i.x = t.x, i.y = t.y, i.fill = t.fill, i.width = e.width, i.height = e.height, i.class = "journey-section section-type-" + t.num, i.rx = 3, i.ry = 3, U(s, i), mt(e)(
480
480
  t.text,
481
481
  s,
482
482
  i.x,
@@ -489,7 +489,7 @@ const Y = [], U = [], B = [], ct = () => kt, ot = (n, t, e) => {
489
489
  );
490
490
  };
491
491
  let it = -1;
492
- const zt = function(n, t, e) {
492
+ const Vt = function(n, t, e) {
493
493
  const s = t.x + e.width / 2, i = n.append("g");
494
494
  it++;
495
495
  const o = 300 + 5 * 30;
@@ -499,7 +499,7 @@ const zt = function(n, t, e) {
499
499
  score: t.score
500
500
  });
501
501
  const l = D();
502
- l.x = t.x, l.y = t.y, l.fill = t.fill, l.width = e.width, l.height = e.height, l.class = "task task-type-" + t.num, l.rx = 3, l.ry = 3, Z(i, l), t.x + 14, mt(e)(
502
+ l.x = t.x, l.y = t.y, l.fill = t.fill, l.width = e.width, l.height = e.height, l.class = "task task-type-" + t.num, l.rx = 3, l.ry = 3, U(i, l), t.x + 14, mt(e)(
503
503
  t.task,
504
504
  i,
505
505
  l.x,
@@ -510,8 +510,8 @@ const zt = function(n, t, e) {
510
510
  e,
511
511
  t.colour
512
512
  );
513
- }, Vt = function(n, t) {
514
- Z(n, {
513
+ }, zt = function(n, t) {
514
+ U(n, {
515
515
  x: t.startx,
516
516
  y: t.starty,
517
517
  width: t.stopx - t.startx,
@@ -569,7 +569,7 @@ const zt = function(n, t, e) {
569
569
  };
570
570
  function xt(n, t) {
571
571
  n.each(function() {
572
- var e = q(this), s = e.text().split(/(\s+|<br>)/).reverse(), i, o = [], l = 1.1, p = e.attr("y"), g = parseFloat(e.attr("dy")), d = e.text(null).append("tspan").attr("x", 0).attr("y", p).attr("dy", g + "em");
572
+ var e = Z(this), s = e.text().split(/(\s+|<br>)/).reverse(), i, o = [], l = 1.1, p = e.attr("y"), g = parseFloat(e.attr("dy")), d = e.text(null).append("tspan").attr("x", 0).attr("y", p).attr("dy", g + "em");
573
573
  for (let f = 0; f < s.length; f++)
574
574
  i = s[s.length - 1 - f], o.push(i), d.text(o.join(" ").trim()), (d.node().getComputedTextLength() > t || i === "<br>") && (o.pop(), d.text(o.join(" ").trim()), i === "<br>" ? o = [""] : o = [i], d = e.append("tspan").attr("x", 0).attr("y", p).attr("dy", l + "em").text(i));
575
575
  });
@@ -591,13 +591,13 @@ const Ft = function(n, t, e, s) {
591
591
  `M0 ${t.height - 5} v${-t.height + 2 * 5} q0,-5 5,-5 h${t.width - 2 * 5} q5,0 5,5 v${t.height - 5} H0 Z`
592
592
  ), n.append("line").attr("class", "node-line-" + e).attr("x1", 0).attr("y1", t.height).attr("x2", t.width).attr("y2", t.height);
593
593
  }, R = {
594
- drawRect: Z,
594
+ drawRect: U,
595
595
  drawCircle: Pt,
596
596
  drawSection: Ct,
597
597
  drawText: ft,
598
598
  drawLabel: Ht,
599
- drawTask: zt,
600
- drawBackgroundRect: Vt,
599
+ drawTask: Vt,
600
+ drawBackgroundRect: zt,
601
601
  getTextObj: Rt,
602
602
  getNoteRect: D,
603
603
  initGraphics: Wt,
@@ -613,8 +613,8 @@ const Ft = function(n, t, e, s) {
613
613
  `), I.debug("timeline", s.db);
614
614
  const l = i.securityLevel;
615
615
  let p;
616
- l === "sandbox" && (p = q("#i" + t));
617
- const d = (l === "sandbox" ? q(p.nodes()[0].contentDocument.body) : q("body")).select("#" + t);
616
+ l === "sandbox" && (p = Z("#i" + t));
617
+ const d = (l === "sandbox" ? Z(p.nodes()[0].contentDocument.body) : Z("body")).select("#" + t);
618
618
  d.append("g");
619
619
  const f = s.db.getTasks(), v = s.db.getCommonDb().getDiagramTitle();
620
620
  I.debug("task", f), R.initGraphics(d);
@@ -644,8 +644,8 @@ const Ft = function(n, t, e, s) {
644
644
  width: 150,
645
645
  padding: 20,
646
646
  maxHeight: w
647
- }, z = R.getVirtualNodeHeight(d, L, i);
648
- I.debug("taskHeight before draw", z), w = Math.max(w, z + 20), y = Math.max(y, S.events.length);
647
+ }, V = R.getVirtualNodeHeight(d, L, i);
648
+ I.debug("taskHeight before draw", V), w = Math.max(w, V + 20), y = Math.max(y, S.events.length);
649
649
  let H = 0;
650
650
  for (let m = 0; m < S.events.length; m++) {
651
651
  const O = {
@@ -670,8 +670,8 @@ const Ft = function(n, t, e, s) {
670
670
  maxHeight: b
671
671
  };
672
672
  I.debug("sectionNode", S);
673
- const L = d.append("g"), z = R.drawNode(L, S, h, i);
674
- I.debug("sectionNode output", z), L.attr("transform", `translate(${r}, ${k})`), a += b + 50;
673
+ const L = d.append("g"), V = R.drawNode(L, S, h, i);
674
+ I.debug("sectionNode output", V), L.attr("transform", `translate(${r}, ${k})`), a += b + 50;
675
675
  const H = f.filter((m) => m.section === N);
676
676
  H.length > 0 && st(
677
677
  d,
@@ -721,7 +721,7 @@ const Ft = function(n, t, e, s) {
721
721
  if (I.debug("taskHeight after draw", E), b.attr("transform", `translate(${s}, ${i})`), o = Math.max(o, E), v.events) {
722
722
  const k = n.append("g").attr("class", "lineWrapper");
723
723
  let r = o;
724
- i += 100, r = r + qt(n, v.events, e, s, i, l), i -= 100, k.append("line").attr("x1", s + 190 / 2).attr("y1", i + o).attr("x2", s + 190 / 2).attr(
724
+ i += 100, r = r + Zt(n, v.events, e, s, i, l), i -= 100, k.append("line").attr("x1", s + 190 / 2).attr("y1", i + o).attr("x2", s + 190 / 2).attr(
725
725
  "y2",
726
726
  i + o + (f ? o : d) + g + 120
727
727
  ).attr("stroke-width", 2).attr("stroke", "black").attr("marker-end", "url(#arrowhead)").attr("stroke-dasharray", "5,5");
@@ -729,7 +729,7 @@ const Ft = function(n, t, e, s) {
729
729
  s = s + 200, f && !rt().timeline.disableMulticolor && e++;
730
730
  }
731
731
  i = i - 10;
732
- }, qt = function(n, t, e, s, i, o) {
732
+ }, Zt = function(n, t, e, s, i, o) {
733
733
  let l = 0;
734
734
  const p = i;
735
735
  i = i + 100;
@@ -747,10 +747,10 @@ const Ft = function(n, t, e, s) {
747
747
  l = l + _, f.attr("transform", `translate(${s}, ${i})`), i = i + 10 + _;
748
748
  }
749
749
  return i = p, l;
750
- }, Ut = {
750
+ }, qt = {
751
751
  setConf: jt,
752
752
  draw: Gt
753
- }, Zt = (n) => {
753
+ }, Ut = (n) => {
754
754
  let t = "";
755
755
  for (let e = 0; e < n.THEME_COLOR_LIMIT; e++)
756
756
  n["lineColor" + e] = n["lineColor" + e] || n["cScaleInv" + e], It(n["lineColor" + e]) ? n["lineColor" + e] = Et(n["lineColor" + e], 20) : n["lineColor" + e] = Tt(n["lineColor" + e], 20);
@@ -795,7 +795,7 @@ const Ft = function(n, t, e, s) {
795
795
  .edge {
796
796
  stroke-width: 3;
797
797
  }
798
- ${Zt(n)}
798
+ ${Ut(n)}
799
799
  .section-root rect, .section-root path, .section-root circle {
800
800
  fill: ${n.git0};
801
801
  }
@@ -816,7 +816,7 @@ const Ft = function(n, t, e, s) {
816
816
  }
817
817
  `, Kt = Jt, Dt = {
818
818
  db: Mt,
819
- renderer: Ut,
819
+ renderer: qt,
820
820
  parser: $t,
821
821
  styles: Kt
822
822
  };
@@ -542,4 +542,4 @@ interface Citation {
542
542
  taskLabel: TaskLabels;
543
543
  }
544
544
 
545
- export { type Artifact as A, todoItemSchema as B, type CoachAiResponse as C, type Datamate as D, type ToolUsageData as E, type Feedback as F, type ProgressUpdate as G, type FinalResponseData as H, type InteractionRequest as I, agentStreamResponseSchema as J, type Learning as L, type Mode as M, 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 ContextOption as n, type ChatMessage as o, type AgentAction as p, type ChatResponse as q, type AgentStreamResponse as r, type TodoItem as s, LoadingState as t, type AssistantMeta as u, type ChatSession as v, type FileUploadProps as w, type ChatbotUrls as x, type InteractionType as y, type InteractionChoice as z };
545
+ export { type Artifact as A, todoItemSchema as B, type CoachAiResponse as C, type Datamate as D, type ToolUsageData as E, type Feedback as F, type ProgressUpdate as G, type FinalResponseData as H, type InteractionRequest as I, agentStreamResponseSchema as J, type Learning as L, type Mode as M, 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 ContextOption as n, type ChatMessage as o, type AgentAction as p, type ChatResponse as q, LoadingState as r, type ChatSession as s, type TodoItem as t, type AgentStreamResponse as u, type AssistantMeta as v, type FileUploadProps as w, type ChatbotUrls as x, type InteractionType as y, type InteractionChoice as z };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@altimateai/ui-components",
3
- "version": "0.0.31-beta.1",
3
+ "version": "0.0.31-beta.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/AltimateAI/altimate-components.git"