@altimateai/ui-components 0.0.75-beta.1 → 0.0.76
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/dist/CoachForm.js +22944 -16319
- package/dist/Stack.js +27 -53
- package/dist/ToggleGroup.js +2 -2
- package/dist/chatbotV2/index.d.ts +46 -3
- package/dist/index.d.ts +2 -2
- package/dist/lineage/index.js +367 -367
- package/dist/main.js +1 -1
- package/dist/shadcn/index.d.ts +12 -24
- package/dist/shadcn/index.js +2 -9
- package/dist/storybook/Typography.stories.tsx +93 -94
- package/dist/{types-dxSjfpqi.d.ts → types-ByRPUpXR.d.ts} +5 -5
- package/package.json +1 -1
package/dist/Stack.js
CHANGED
|
@@ -6907,42 +6907,31 @@ const ue = Gt("", {
|
|
|
6907
6907
|
h6: "al-text-caption",
|
|
6908
6908
|
subheading: "al-text-subheading",
|
|
6909
6909
|
body: "al-text-body",
|
|
6910
|
-
caption: "al-text-caption"
|
|
6911
|
-
button: "",
|
|
6912
|
-
// Button uses size for styling
|
|
6913
|
-
"table-header": "al-text-table-header",
|
|
6914
|
-
placeholder: ""
|
|
6915
|
-
// Placeholder uses size for styling
|
|
6910
|
+
caption: "al-text-caption"
|
|
6916
6911
|
},
|
|
6917
6912
|
weight: {
|
|
6913
|
+
light: "al-font-light",
|
|
6918
6914
|
regular: "al-font-regular",
|
|
6919
6915
|
medium: "al-font-medium",
|
|
6920
|
-
semibold: "al-font-semibold"
|
|
6916
|
+
semibold: "al-font-semibold",
|
|
6917
|
+
bold: "al-font-bold"
|
|
6921
6918
|
},
|
|
6922
6919
|
size: {
|
|
6923
|
-
|
|
6924
|
-
|
|
6925
|
-
|
|
6926
|
-
|
|
6927
|
-
|
|
6928
|
-
xxs: "al-text-body-xxs",
|
|
6929
|
-
// Button sizes
|
|
6930
|
-
"button-xs": "al-text-button-xs",
|
|
6931
|
-
"button-sm": "al-text-button-sm",
|
|
6932
|
-
"button-md": "al-text-button-md",
|
|
6933
|
-
// Placeholder sizes
|
|
6934
|
-
"placeholder-regular": "al-text-placeholder-regular al-italic",
|
|
6935
|
-
"placeholder-large": "al-text-placeholder-large al-italic"
|
|
6920
|
+
xs: "al-text-xs",
|
|
6921
|
+
sm: "al-text-sm",
|
|
6922
|
+
md: "al-text-md",
|
|
6923
|
+
lg: "al-text-lg",
|
|
6924
|
+
xl: "al-text-xl"
|
|
6936
6925
|
}
|
|
6937
6926
|
}
|
|
6938
6927
|
}), pd = () => ({
|
|
6939
|
-
h1: ue({ variant: "h1", weight: "semibold" }),
|
|
6940
|
-
h2: ue({ variant: "h2", weight: "semibold" }),
|
|
6941
|
-
h3: ue({ variant: "h3", weight: "semibold" }),
|
|
6942
|
-
h4: ue({ variant: "h4", weight: "semibold" }),
|
|
6943
|
-
h5: ue({ variant: "h5", weight: "semibold" }),
|
|
6944
|
-
h6: ue({ variant: "h6", weight: "semibold" }),
|
|
6945
|
-
body: ue({ variant: "body"
|
|
6928
|
+
h1: ue({ variant: "h1", weight: "semibold", size: "xl" }),
|
|
6929
|
+
h2: ue({ variant: "h2", weight: "semibold", size: "lg" }),
|
|
6930
|
+
h3: ue({ variant: "h3", weight: "semibold", size: "md" }),
|
|
6931
|
+
h4: ue({ variant: "h4", weight: "semibold", size: "md" }),
|
|
6932
|
+
h5: ue({ variant: "h5", weight: "semibold", size: "sm" }),
|
|
6933
|
+
h6: ue({ variant: "h6", weight: "semibold", size: "sm" }),
|
|
6934
|
+
body: ue({ variant: "body" }),
|
|
6946
6935
|
// Non-typography classes
|
|
6947
6936
|
link: "al-text-blue-500 al-underline",
|
|
6948
6937
|
list: "al-list-disc al-ml-4 al-mb-4",
|
|
@@ -6956,32 +6945,17 @@ const ue = Gt("", {
|
|
|
6956
6945
|
h4: "h4",
|
|
6957
6946
|
subheading: "h5",
|
|
6958
6947
|
body: "p",
|
|
6959
|
-
caption: "span"
|
|
6960
|
-
|
|
6961
|
-
|
|
6962
|
-
|
|
6963
|
-
|
|
6964
|
-
|
|
6965
|
-
|
|
6966
|
-
|
|
6967
|
-
|
|
6968
|
-
|
|
6969
|
-
|
|
6970
|
-
else if (t === "body") {
|
|
6971
|
-
const c = e;
|
|
6972
|
-
s = c.weight ?? "regular", a = c.size ?? "regular";
|
|
6973
|
-
} else if (t === "caption") {
|
|
6974
|
-
const c = e;
|
|
6975
|
-
s = c.weight ?? "regular", a = c.size;
|
|
6976
|
-
} else if (t === "button") {
|
|
6977
|
-
const c = e;
|
|
6978
|
-
s = "medium", a = c.size ? `button-${c.size}` : "button-sm";
|
|
6979
|
-
} else {
|
|
6980
|
-
const c = e;
|
|
6981
|
-
s = "regular", a = c.size ? `placeholder-${c.size}` : "placeholder-large";
|
|
6982
|
-
}
|
|
6983
|
-
const i = Yu[t];
|
|
6984
|
-
return /* @__PURE__ */ g.jsx(i, { className: M(ue({ variant: t, weight: s, size: a }), r), role: o, children: n });
|
|
6948
|
+
caption: "span"
|
|
6949
|
+
}, md = ({
|
|
6950
|
+
variant: e = "body",
|
|
6951
|
+
children: t,
|
|
6952
|
+
className: n,
|
|
6953
|
+
weight: r,
|
|
6954
|
+
size: o,
|
|
6955
|
+
role: s
|
|
6956
|
+
}) => {
|
|
6957
|
+
const a = Yu[e];
|
|
6958
|
+
return /* @__PURE__ */ g.jsx(a, { className: M(ue({ variant: e, weight: r, size: o }), n), role: s, children: t });
|
|
6985
6959
|
}, gd = H(function({
|
|
6986
6960
|
children: t,
|
|
6987
6961
|
wrap: n = !1,
|
package/dist/ToggleGroup.js
CHANGED
|
@@ -3873,10 +3873,10 @@ const kp = ({
|
|
|
3873
3873
|
filter: C ? (O, he) => O.toLowerCase().includes(he.toLowerCase()) ? 1 : 0 : void 0,
|
|
3874
3874
|
children: [
|
|
3875
3875
|
d && p && /* @__PURE__ */ u.jsxs("div", { className: "al-flex al-justify-between al-items-center al-p-2 al-border-b", children: [
|
|
3876
|
-
/* @__PURE__ */ u.jsx(ho, { children: o ?? r }),
|
|
3876
|
+
/* @__PURE__ */ u.jsx(ho, { variant: "body", children: o ?? r }),
|
|
3877
3877
|
/* @__PURE__ */ u.jsx(xt, { onClick: $, size: "sm", children: "Apply" })
|
|
3878
3878
|
] }),
|
|
3879
|
-
Q && /* @__PURE__ */ u.jsx("div", { className: "al-flex al-items-center al-justify-center al-p-2 al-text-red-600 al-bg-red-50 al-border-b", children: /* @__PURE__ */ u.jsx(ho, { className: "al-text-center al-text-sm", children: "At least one item must be selected." }) }),
|
|
3879
|
+
Q && /* @__PURE__ */ u.jsx("div", { className: "al-flex al-items-center al-justify-center al-p-2 al-text-red-600 al-bg-red-50 al-border-b", children: /* @__PURE__ */ u.jsx(ho, { variant: "body", className: "al-text-center al-text-sm", children: "At least one item must be selected." }) }),
|
|
3880
3880
|
/* @__PURE__ */ u.jsx(
|
|
3881
3881
|
ys,
|
|
3882
3882
|
{
|
|
@@ -1,10 +1,14 @@
|
|
|
1
|
+
import * as React$1 from 'react';
|
|
1
2
|
import React__default, { FC, ReactNode } from 'react';
|
|
2
|
-
import { j as ChatbotProps, k as
|
|
3
|
-
export { x as AssistantMeta, w as ChatEvent, v as ChatEventStatus, z as ChatbotUrls, B as Datamate, G as EntityDetectionRequest, H as EntityDetectionResponse, y as FileUploadProps, W as FinalResponseData, N as InteractionChoice, K as InteractionType, J as Mode, V as ProgressUpdate, R as ToolUsageData, U as UploadedFile, X as agentStreamResponseSchema, O as sessionStatusSchema, Q as todoItemSchema } from '../types-
|
|
3
|
+
import { j as ChatbotProps, k as ChatSession, m as ChatbotProviderProps, n as ChatState, A as Artifact, o as ContextOption, I as InteractionRequest, p as ChatMessage, q as AgentAction, i as Citation, r as TodoItem, s as ChatResponse, F as Feedback, t as LoadingState, M as MessageAttachment, D as DetectedEntity, E as EntityType, u as AgentStreamResponse, S as SessionStatusEnum } from '../types-ByRPUpXR.js';
|
|
4
|
+
export { x as AssistantMeta, w as ChatEvent, v as ChatEventStatus, z as ChatbotUrls, B as Datamate, G as EntityDetectionRequest, H as EntityDetectionResponse, y as FileUploadProps, W as FinalResponseData, N as InteractionChoice, K as InteractionType, J as Mode, V as ProgressUpdate, R as ToolUsageData, U as UploadedFile, X as agentStreamResponseSchema, O as sessionStatusSchema, Q as todoItemSchema } from '../types-ByRPUpXR.js';
|
|
4
5
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
5
6
|
import { UnknownAction } from '@reduxjs/toolkit';
|
|
6
7
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
7
8
|
import { B as ButtonProps } from '../Button-42Dj_nRE.js';
|
|
9
|
+
import * as ai from 'ai';
|
|
10
|
+
import { UIMessage } from '@ai-sdk/react';
|
|
11
|
+
export { UIMessage } from '@ai-sdk/react';
|
|
8
12
|
import 'zod';
|
|
9
13
|
import 'class-variance-authority/types';
|
|
10
14
|
import 'class-variance-authority';
|
|
@@ -18,6 +22,8 @@ interface ChatProviderRef {
|
|
|
18
22
|
resetSession: () => void;
|
|
19
23
|
setUserInput: (text: string) => void;
|
|
20
24
|
resetStatus: () => void;
|
|
25
|
+
getSessionById: (_sessionId: string) => ChatSession | null;
|
|
26
|
+
getSessionId: () => string | null;
|
|
21
27
|
}
|
|
22
28
|
declare const useChatContext: () => ChatContextType;
|
|
23
29
|
declare const ChatProvider: React__default.ForwardRefExoticComponent<ChatbotProviderProps & React__default.RefAttributes<ChatProviderRef>>;
|
|
@@ -112,6 +118,38 @@ declare const ChatTriggerLink: ({ text, buttonProps }: {
|
|
|
112
118
|
buttonProps?: ButtonProps;
|
|
113
119
|
}) => react_jsx_runtime.JSX.Element;
|
|
114
120
|
|
|
121
|
+
/**
|
|
122
|
+
* Chat Transports - Custom transport implementations for AI SDK 6
|
|
123
|
+
*
|
|
124
|
+
* These transports transform our backend's raw JSON format to AI SDK's UIMessageChunk format.
|
|
125
|
+
*
|
|
126
|
+
* - LegacyBackendTransport: For standard agent chat (JSON streaming)
|
|
127
|
+
* - MarkdownStreamTransport: For Query Analysis mode (markdown streaming)
|
|
128
|
+
*/
|
|
129
|
+
|
|
130
|
+
/**
|
|
131
|
+
* Data accumulated during stream processing.
|
|
132
|
+
* This captures all the rich metadata from agent_outcome and other messages.
|
|
133
|
+
*/
|
|
134
|
+
interface AccumulatedStreamData {
|
|
135
|
+
/** Full text content accumulated from all text deltas */
|
|
136
|
+
content: string;
|
|
137
|
+
/** Actions (info/analysis messages) */
|
|
138
|
+
actions: AgentAction[];
|
|
139
|
+
/** Artifacts from agent_outcome */
|
|
140
|
+
artifacts: Artifact[];
|
|
141
|
+
/** Citations from citations messages */
|
|
142
|
+
citations: Citation[];
|
|
143
|
+
/** Todos from tool_use (TodoWrite) messages */
|
|
144
|
+
todos: TodoItem[];
|
|
145
|
+
/** Interaction prompt from require_user_action */
|
|
146
|
+
interaction: InteractionRequest | undefined;
|
|
147
|
+
/** Heading from agent_outcome */
|
|
148
|
+
heading: string;
|
|
149
|
+
/** Confidence string from agent_outcome */
|
|
150
|
+
confidence_str: string | undefined;
|
|
151
|
+
}
|
|
152
|
+
|
|
115
153
|
declare const useAgentChat: () => {
|
|
116
154
|
sendMessage: ({ message, isResponseToPrompt, context: newContext, dontAddUserMessage, }: {
|
|
117
155
|
message: string;
|
|
@@ -120,6 +158,11 @@ declare const useAgentChat: () => {
|
|
|
120
158
|
dontAddUserMessage?: boolean;
|
|
121
159
|
}) => Promise<ChatResponse>;
|
|
122
160
|
updateContextAndSendMessage: (message: string, context: Record<string, unknown>) => Promise<void>;
|
|
161
|
+
loadV1Session: (v1Messages: ChatMessage[]) => void;
|
|
162
|
+
getV1Messages: () => ChatMessage[];
|
|
163
|
+
messages: UIMessage<unknown, ai.UIDataTypes, ai.UITools>[];
|
|
164
|
+
status: ai.ChatStatus;
|
|
165
|
+
accumulatedDataRef: React$1.MutableRefObject<AccumulatedStreamData>;
|
|
123
166
|
};
|
|
124
167
|
|
|
125
168
|
interface AddMessagePayload {
|
|
@@ -313,4 +356,4 @@ declare const Citations: ({ citations, frontEndUrl, }: {
|
|
|
313
356
|
frontEndUrl: string;
|
|
314
357
|
}) => JSX.Element | null;
|
|
315
358
|
|
|
316
|
-
export { AgentAction, AgentStreamResponse, Artifact, Artifacts, CancelGenerationButton, ChatFeedbackActions, ChatLastMessageActions, ChatMessage, ChatMessageEndActions, ChatProvider, ChatResponse, ChatSession, ChatState, ChatTriggerLink, ChatbotProps, ChatbotProviderProps, Chatbot as ChatbotV2, Citations, CoachAI, ContextOption, ContextPanel, DetectedEntity, EntityType, Feedback, InteractionPrompt, InteractionRequest, LoadingIndicator, LoadingState, MessageAttachment, MessageItem, MessageList, QuestionForm, RegenerateButton, SessionStatusEnum, StatusUpdates, TodoItem, addAction, addMessage, clearActions, clearContext, clearHistory, clearTodos, createSession, deleteMessage, initialState, processAgentMessageContent, processAgentStream, processExistingConversation, processPlaygroundSessionTurns, resetSession, sendMessageAndProcessStream, setAbortController, setCurrentSession, setError, setLoadingState, setSelectedModel, setSessions, setTodos, setUserInput, streamResponseToAgentMessages, updateContext, updateDatamateInSession, updateEntities, updateEntityType, updateMessageFeedback, updateMode, useAgentChat, useChatContext };
|
|
359
|
+
export { AgentAction, AgentStreamResponse, Artifact, Artifacts, CancelGenerationButton, ChatFeedbackActions, ChatLastMessageActions, ChatMessage, ChatMessageEndActions, ChatProvider, type ChatProviderRef, ChatResponse, ChatSession, ChatState, ChatTriggerLink, ChatbotProps, ChatbotProviderProps, Chatbot as ChatbotV2, Citations, CoachAI, ContextOption, ContextPanel, DetectedEntity, EntityType, Feedback, InteractionPrompt, InteractionRequest, LoadingIndicator, LoadingState, MessageAttachment, MessageItem, MessageList, QuestionForm, RegenerateButton, SessionStatusEnum, StatusUpdates, TodoItem, addAction, addMessage, clearActions, clearContext, clearHistory, clearTodos, createSession, deleteMessage, initialState, processAgentMessageContent, processAgentStream, processExistingConversation, processPlaygroundSessionTurns, resetSession, sendMessageAndProcessStream, setAbortController, setCurrentSession, setError, setLoadingState, setSelectedModel, setSessions, setTodos, setUserInput, streamResponseToAgentMessages, updateContext, updateDatamateInSession, updateEntities, updateEntityType, updateMessageFeedback, updateMode, useAgentChat, useChatContext };
|
package/dist/index.d.ts
CHANGED
|
@@ -4,8 +4,8 @@ import { B as ButtonProps, a as Button } from './Button-42Dj_nRE.js';
|
|
|
4
4
|
import { Components } from 'react-markdown';
|
|
5
5
|
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
6
6
|
import { PlotParams } from 'react-plotly.js';
|
|
7
|
-
import { T as TaskLabels, a as TeamMateContextProps, b as TeamMateState, c as TeamMateConfig, d as TeamMateActionType, e as TeamMateAvailability } from './types-
|
|
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-
|
|
7
|
+
import { T as TaskLabels, a as TeamMateContextProps, b as TeamMateState, c as TeamMateConfig, d as TeamMateActionType, e as TeamMateAvailability } from './types-ByRPUpXR.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-ByRPUpXR.js';
|
|
9
9
|
import * as _reduxjs_toolkit from '@reduxjs/toolkit';
|
|
10
10
|
import { PayloadAction } from '@reduxjs/toolkit';
|
|
11
11
|
import * as immer from 'immer';
|