@altimateai/ui-components 0.0.1-beta.2 → 0.0.1-beta.4
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/Accordion.js +43 -114
- package/dist/Badge.js +1 -1
- package/dist/CoachForm.js +6285 -6583
- package/dist/DbtDocsRenderer.js +833 -2651
- package/dist/Tooltip.js +115 -0
- package/dist/assets/icons/index.js +44 -39
- package/dist/chatbot/index.js +100 -96
- package/dist/chatbotV2/index.js +16 -3
- package/dist/flowchart-elk-definition-170a3958.js +2 -2
- package/dist/index.js +16 -16
- package/dist/index2.js +194 -193
- package/dist/is_dark.js +1 -1
- package/dist/lineage/index.js +2284 -2710
- package/dist/main.js +50 -185
- package/dist/mindmap-definition-44684416.js +2 -2
- package/dist/redux-toolkit.modern.js +1 -1
- package/dist/shadcn/index.js +352 -382
- package/dist/timeline-definition-8e5a9bc6.js +1 -1
- package/dist/v4.js +524 -514
- package/package.json +54 -54
- package/readme.md +11 -0
- package/dist/Stack.js +0 -132
- package/dist/assets/icons/index.d.ts +0 -86
- package/dist/chatbot/index.d.ts +0 -39
- package/dist/chatbotV2/index.d.ts +0 -111
- package/dist/index.d.ts +0 -217
- package/dist/lineage/index.d.ts +0 -183
- package/dist/shadcn/index.d.ts +0 -517
- package/dist/storybook/Accordion.stories.tsx +0 -61
- package/dist/storybook/Alert.stories.tsx +0 -65
- package/dist/storybook/AlertDialog.stories.tsx +0 -166
- package/dist/storybook/Avatar.stories.tsx +0 -58
- package/dist/storybook/Badge.stories.tsx +0 -36
- package/dist/storybook/Button.stories.tsx +0 -129
- package/dist/storybook/Card.stories.tsx +0 -76
- package/dist/storybook/Checkbox.stories.tsx +0 -74
- package/dist/storybook/Command.stories.tsx +0 -35
- package/dist/storybook/DropdownMenu.stories.tsx +0 -36
- package/dist/storybook/Form.stories.tsx +0 -120
- package/dist/storybook/HoverCard.stories.tsx +0 -105
- package/dist/storybook/Input.stories.tsx +0 -53
- package/dist/storybook/Label.stories.tsx +0 -42
- package/dist/storybook/Menubar.stories.tsx +0 -159
- package/dist/storybook/Pagination.stories.tsx +0 -155
- package/dist/storybook/Popover.stories.tsx +0 -25
- package/dist/storybook/Progress.stories.tsx +0 -89
- package/dist/storybook/RadioGroup.stories.tsx +0 -61
- package/dist/storybook/Resizable.stories.tsx +0 -119
- package/dist/storybook/ScrollArea.stories.tsx +0 -120
- package/dist/storybook/Select.stories.tsx +0 -95
- package/dist/storybook/Sheet.stories.tsx +0 -75
- package/dist/storybook/Sidebar.stories.tsx +0 -97
- package/dist/storybook/Slider.stories.tsx +0 -81
- package/dist/storybook/Switch.stories.tsx +0 -99
- package/dist/storybook/Textarea.stories.tsx +0 -50
- package/dist/storybook/Toast.stories.tsx +0 -111
- package/dist/storybook/Tooltip.stories.tsx +0 -33
- package/dist/storybook/Typography.stories.tsx +0 -178
- package/dist/types-PVxbm0tZ.d.ts +0 -99
- /package/dist/{Stack.css → v4.css} +0 -0
package/package.json
CHANGED
|
@@ -1,55 +1,55 @@
|
|
|
1
|
-
{
|
|
2
|
-
|
|
3
|
-
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
|
|
28
|
-
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
|
|
51
|
-
|
|
52
|
-
|
|
53
|
-
|
|
54
|
-
|
|
1
|
+
{
|
|
2
|
+
"name": "@altimateai/ui-components",
|
|
3
|
+
"version": "0.0.1-beta.4",
|
|
4
|
+
"repository": {
|
|
5
|
+
"type": "git",
|
|
6
|
+
"url": "git+https://github.com/AltimateAI/altimate-components.git"
|
|
7
|
+
},
|
|
8
|
+
"publishConfig": {
|
|
9
|
+
"registry": "https://registry.npmjs.org/",
|
|
10
|
+
"access": "public"
|
|
11
|
+
},
|
|
12
|
+
"type": "module",
|
|
13
|
+
"main": "./dist/index.js",
|
|
14
|
+
"module": "./dist/index.js",
|
|
15
|
+
"types": "./dist/index.d.ts",
|
|
16
|
+
"files": [
|
|
17
|
+
"dist"
|
|
18
|
+
],
|
|
19
|
+
"exports": {
|
|
20
|
+
".": {
|
|
21
|
+
"import": "./dist/index.js",
|
|
22
|
+
"types": "./dist/index.d.ts",
|
|
23
|
+
"source": "./lib/index.ts"
|
|
24
|
+
},
|
|
25
|
+
"./lineage": {
|
|
26
|
+
"import": "./dist/lineage/index.js",
|
|
27
|
+
"types": "./dist/lineage/index.d.ts",
|
|
28
|
+
"source": "./lib/lineage/index.ts"
|
|
29
|
+
},
|
|
30
|
+
"./chatbot": {
|
|
31
|
+
"import": "./dist/chatbot/index.js",
|
|
32
|
+
"types": "./dist/chatbot/index.d.ts",
|
|
33
|
+
"source": "./lib/chatbot/index.ts"
|
|
34
|
+
},
|
|
35
|
+
"./chatbotV2": {
|
|
36
|
+
"import": "./dist/chatbotV2/index.js",
|
|
37
|
+
"types": "./dist/chatbotV2/index.d.ts",
|
|
38
|
+
"source": "./lib/chatbotV2/index.ts"
|
|
39
|
+
},
|
|
40
|
+
"./shadcn": {
|
|
41
|
+
"import": "./dist/shadcn/index.js",
|
|
42
|
+
"types": "./dist/shadcn/index.d.ts",
|
|
43
|
+
"source": "./lib/shadcn/index.ts"
|
|
44
|
+
},
|
|
45
|
+
"./assets/icons": {
|
|
46
|
+
"import": "./dist/assets/icons/index.js",
|
|
47
|
+
"types": "./dist/assets/icons/index.d.ts",
|
|
48
|
+
"source": "./lib/assets/icons/index.tsx"
|
|
49
|
+
}
|
|
50
|
+
},
|
|
51
|
+
"peerDependencies": {
|
|
52
|
+
"react": "^17.0.0 || ^18.0.0",
|
|
53
|
+
"react-dom": "^17.0.0 || ^18.0.0"
|
|
54
|
+
}
|
|
55
55
|
}
|
package/readme.md
ADDED
package/dist/Stack.js
DELETED
|
@@ -1,132 +0,0 @@
|
|
|
1
|
-
import { j as l } from "./index2.js";
|
|
2
|
-
import { createContext as f, Component as h, createElement as u, isValidElement as m, useState as p, useRef as g, forwardRef as y } from "react";
|
|
3
|
-
import { Tooltip as v } from "reactstrap";
|
|
4
|
-
import './Stack.css';var S = typeof globalThis < "u" ? globalThis : typeof window < "u" ? window : typeof global < "u" ? global : typeof self < "u" ? self : {};
|
|
5
|
-
function T(n) {
|
|
6
|
-
return n && n.__esModule && Object.prototype.hasOwnProperty.call(n, "default") ? n.default : n;
|
|
7
|
-
}
|
|
8
|
-
const E = f(null), c = {
|
|
9
|
-
didCatch: !1,
|
|
10
|
-
error: null
|
|
11
|
-
};
|
|
12
|
-
class b extends h {
|
|
13
|
-
constructor(t) {
|
|
14
|
-
super(t), this.resetErrorBoundary = this.resetErrorBoundary.bind(this), this.state = c;
|
|
15
|
-
}
|
|
16
|
-
static getDerivedStateFromError(t) {
|
|
17
|
-
return {
|
|
18
|
-
didCatch: !0,
|
|
19
|
-
error: t
|
|
20
|
-
};
|
|
21
|
-
}
|
|
22
|
-
resetErrorBoundary() {
|
|
23
|
-
const {
|
|
24
|
-
error: t
|
|
25
|
-
} = this.state;
|
|
26
|
-
if (t !== null) {
|
|
27
|
-
for (var o, e, r = arguments.length, a = new Array(r), s = 0; s < r; s++)
|
|
28
|
-
a[s] = arguments[s];
|
|
29
|
-
(o = (e = this.props).onReset) === null || o === void 0 || o.call(e, {
|
|
30
|
-
args: a,
|
|
31
|
-
reason: "imperative-api"
|
|
32
|
-
}), this.setState(c);
|
|
33
|
-
}
|
|
34
|
-
}
|
|
35
|
-
componentDidCatch(t, o) {
|
|
36
|
-
var e, r;
|
|
37
|
-
(e = (r = this.props).onError) === null || e === void 0 || e.call(r, t, o);
|
|
38
|
-
}
|
|
39
|
-
componentDidUpdate(t, o) {
|
|
40
|
-
const {
|
|
41
|
-
didCatch: e
|
|
42
|
-
} = this.state, {
|
|
43
|
-
resetKeys: r
|
|
44
|
-
} = this.props;
|
|
45
|
-
if (e && o.error !== null && j(t.resetKeys, r)) {
|
|
46
|
-
var a, s;
|
|
47
|
-
(a = (s = this.props).onReset) === null || a === void 0 || a.call(s, {
|
|
48
|
-
next: r,
|
|
49
|
-
prev: t.resetKeys,
|
|
50
|
-
reason: "keys"
|
|
51
|
-
}), this.setState(c);
|
|
52
|
-
}
|
|
53
|
-
}
|
|
54
|
-
render() {
|
|
55
|
-
const {
|
|
56
|
-
children: t,
|
|
57
|
-
fallbackRender: o,
|
|
58
|
-
FallbackComponent: e,
|
|
59
|
-
fallback: r
|
|
60
|
-
} = this.props, {
|
|
61
|
-
didCatch: a,
|
|
62
|
-
error: s
|
|
63
|
-
} = this.state;
|
|
64
|
-
let i = t;
|
|
65
|
-
if (a) {
|
|
66
|
-
const d = {
|
|
67
|
-
error: s,
|
|
68
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
69
|
-
};
|
|
70
|
-
if (typeof o == "function")
|
|
71
|
-
i = o(d);
|
|
72
|
-
else if (e)
|
|
73
|
-
i = u(e, d);
|
|
74
|
-
else if (r === null || m(r))
|
|
75
|
-
i = r;
|
|
76
|
-
else
|
|
77
|
-
throw s;
|
|
78
|
-
}
|
|
79
|
-
return u(E.Provider, {
|
|
80
|
-
value: {
|
|
81
|
-
didCatch: a,
|
|
82
|
-
error: s,
|
|
83
|
-
resetErrorBoundary: this.resetErrorBoundary
|
|
84
|
-
}
|
|
85
|
-
}, i);
|
|
86
|
-
}
|
|
87
|
-
}
|
|
88
|
-
function j() {
|
|
89
|
-
let n = arguments.length > 0 && arguments[0] !== void 0 ? arguments[0] : [], t = arguments.length > 1 && arguments[1] !== void 0 ? arguments[1] : [];
|
|
90
|
-
return n.length !== t.length || n.some((o, e) => !Object.is(o, t[e]));
|
|
91
|
-
}
|
|
92
|
-
const O = (n) => {
|
|
93
|
-
const [t, o] = p(!1), e = () => o(!t), r = g(
|
|
94
|
-
(n.id ?? `tooltip-${Math.random().toString(36).substring(3, 9)}`).replace(/\s/g, "-")
|
|
95
|
-
);
|
|
96
|
-
return /* @__PURE__ */ l.jsxs(b, { fallback: /* @__PURE__ */ l.jsx("span", { id: r.current, children: n.children }), children: [
|
|
97
|
-
/* @__PURE__ */ l.jsx("span", { id: r.current, children: n.children }),
|
|
98
|
-
n.title ? /* @__PURE__ */ l.jsx(
|
|
99
|
-
v,
|
|
100
|
-
{
|
|
101
|
-
isOpen: t,
|
|
102
|
-
target: r.current,
|
|
103
|
-
toggle: e,
|
|
104
|
-
className: n.className,
|
|
105
|
-
placement: "top",
|
|
106
|
-
children: n.title
|
|
107
|
-
}
|
|
108
|
-
) : null
|
|
109
|
-
] });
|
|
110
|
-
}, C = "_stack_73h55_1", k = {
|
|
111
|
-
stack: C
|
|
112
|
-
}, D = y(function({
|
|
113
|
-
children: t,
|
|
114
|
-
direction: o = "row",
|
|
115
|
-
...e
|
|
116
|
-
}, r) {
|
|
117
|
-
return /* @__PURE__ */ l.jsx(
|
|
118
|
-
"div",
|
|
119
|
-
{
|
|
120
|
-
...e,
|
|
121
|
-
className: `${e.className} ${k.stack} stack-${o}`,
|
|
122
|
-
ref: r,
|
|
123
|
-
children: t
|
|
124
|
-
}
|
|
125
|
-
);
|
|
126
|
-
});
|
|
127
|
-
export {
|
|
128
|
-
D as S,
|
|
129
|
-
O as T,
|
|
130
|
-
S as c,
|
|
131
|
-
T as g
|
|
132
|
-
};
|
|
@@ -1,86 +0,0 @@
|
|
|
1
|
-
import { FC, SVGProps } from 'react';
|
|
2
|
-
declare const AddIcon: FC<SVGProps<SVGSVGElement>>;
|
|
3
|
-
declare const AskIcon: FC<SVGProps<SVGSVGElement>>;
|
|
4
|
-
declare const BoltIcon: FC<SVGProps<SVGSVGElement>>;
|
|
5
|
-
declare const BracketsIcon: FC<SVGProps<SVGSVGElement>>;
|
|
6
|
-
declare const CaseSensitiveIcon: FC<SVGProps<SVGSVGElement>>;
|
|
7
|
-
declare const CheckNoOutlineIcon: FC<SVGProps<SVGSVGElement>>;
|
|
8
|
-
declare const CheckedIcon: FC<SVGProps<SVGSVGElement>>;
|
|
9
|
-
declare const ChevronDownIcon: FC<SVGProps<SVGSVGElement>>;
|
|
10
|
-
declare const ChevronLeftIcon: FC<SVGProps<SVGSVGElement>>;
|
|
11
|
-
declare const ChevronRightIcon: FC<SVGProps<SVGSVGElement>>;
|
|
12
|
-
declare const ChevronUpIcon: FC<SVGProps<SVGSVGElement>>;
|
|
13
|
-
declare const CircleIcon: FC<SVGProps<SVGSVGElement>>;
|
|
14
|
-
declare const CloseIcon: FC<SVGProps<SVGSVGElement>>;
|
|
15
|
-
declare const CodeIcon: FC<SVGProps<SVGSVGElement>>;
|
|
16
|
-
declare const CommentAddIcon: FC<SVGProps<SVGSVGElement>>;
|
|
17
|
-
declare const CommentDiscussionIcon: FC<SVGProps<SVGSVGElement>>;
|
|
18
|
-
declare const CommentUnresolvedIcon: FC<SVGProps<SVGSVGElement>>;
|
|
19
|
-
declare const CopyIcon: FC<SVGProps<SVGSVGElement>>;
|
|
20
|
-
declare const DeleteIcon: FC<SVGProps<SVGSVGElement>>;
|
|
21
|
-
declare const EditIcon: FC<SVGProps<SVGSVGElement>>;
|
|
22
|
-
declare const FileUploadIcon: FC<SVGProps<SVGSVGElement>>;
|
|
23
|
-
declare const FilesIcon: FC<SVGProps<SVGSVGElement>>;
|
|
24
|
-
declare const GithubIcon: FC<SVGProps<SVGSVGElement>>;
|
|
25
|
-
declare const GlobeIcon: FC<SVGProps<SVGSVGElement>>;
|
|
26
|
-
declare const GripVerticalIcon: FC<SVGProps<SVGSVGElement>>;
|
|
27
|
-
declare const HalfCircleIcon: FC<SVGProps<SVGSVGElement>>;
|
|
28
|
-
declare const InfoCircleIcon: FC<SVGProps<SVGSVGElement>>;
|
|
29
|
-
declare const LoaderIcon: FC<SVGProps<SVGSVGElement>>;
|
|
30
|
-
declare const MoreIcon: FC<SVGProps<SVGSVGElement>>;
|
|
31
|
-
declare const PanelLeftIcon: FC<SVGProps<SVGSVGElement>>;
|
|
32
|
-
declare const RefreshIcon: FC<SVGProps<SVGSVGElement>>;
|
|
33
|
-
declare const RemoveIcon: FC<SVGProps<SVGSVGElement>>;
|
|
34
|
-
declare const RobotIcon: FC<SVGProps<SVGSVGElement>>;
|
|
35
|
-
declare const SearchIcon: FC<SVGProps<SVGSVGElement>>;
|
|
36
|
-
declare const SettingsIcon: FC<SVGProps<SVGSVGElement>>;
|
|
37
|
-
declare const ShareIcon: FC<SVGProps<SVGSVGElement>>;
|
|
38
|
-
declare const SplitHorizontalIcon: FC<SVGProps<SVGSVGElement>>;
|
|
39
|
-
declare const ThinkingIcon: FC<SVGProps<SVGSVGElement>>;
|
|
40
|
-
declare const ThumbsDownIcon: FC<SVGProps<SVGSVGElement>>;
|
|
41
|
-
declare const ThumbsUpIcon: FC<SVGProps<SVGSVGElement>>;
|
|
42
|
-
declare const UserIcon: FC<SVGProps<SVGSVGElement>>;
|
|
43
|
-
|
|
44
|
-
export {
|
|
45
|
-
AddIcon,
|
|
46
|
-
AskIcon,
|
|
47
|
-
BoltIcon,
|
|
48
|
-
BracketsIcon,
|
|
49
|
-
CaseSensitiveIcon,
|
|
50
|
-
CheckNoOutlineIcon,
|
|
51
|
-
CheckedIcon,
|
|
52
|
-
ChevronDownIcon,
|
|
53
|
-
ChevronLeftIcon,
|
|
54
|
-
ChevronRightIcon,
|
|
55
|
-
ChevronUpIcon,
|
|
56
|
-
CircleIcon,
|
|
57
|
-
CloseIcon,
|
|
58
|
-
CodeIcon,
|
|
59
|
-
CommentAddIcon,
|
|
60
|
-
CommentDiscussionIcon,
|
|
61
|
-
CommentUnresolvedIcon,
|
|
62
|
-
CopyIcon,
|
|
63
|
-
DeleteIcon,
|
|
64
|
-
EditIcon,
|
|
65
|
-
FileUploadIcon,
|
|
66
|
-
FilesIcon,
|
|
67
|
-
GithubIcon,
|
|
68
|
-
GlobeIcon,
|
|
69
|
-
GripVerticalIcon,
|
|
70
|
-
HalfCircleIcon,
|
|
71
|
-
InfoCircleIcon,
|
|
72
|
-
LoaderIcon,
|
|
73
|
-
MoreIcon,
|
|
74
|
-
PanelLeftIcon,
|
|
75
|
-
RefreshIcon,
|
|
76
|
-
RemoveIcon,
|
|
77
|
-
RobotIcon,
|
|
78
|
-
SearchIcon,
|
|
79
|
-
SettingsIcon,
|
|
80
|
-
ShareIcon,
|
|
81
|
-
SplitHorizontalIcon,
|
|
82
|
-
ThinkingIcon,
|
|
83
|
-
ThumbsDownIcon,
|
|
84
|
-
ThumbsUpIcon,
|
|
85
|
-
UserIcon
|
|
86
|
-
};
|
package/dist/chatbot/index.d.ts
DELETED
|
@@ -1,39 +0,0 @@
|
|
|
1
|
-
import * as react_jsx_runtime from 'react/jsx-runtime';
|
|
2
|
-
import { ChatMessage } from '@ant-design/pro-chat';
|
|
3
|
-
import { ProChatProps } from '@ant-design/pro-chat/es/ProChat/container';
|
|
4
|
-
import { T as TaskLabels } from '../types-PVxbm0tZ.js';
|
|
5
|
-
import 'react';
|
|
6
|
-
import '@reduxjs/toolkit';
|
|
7
|
-
import 'zod';
|
|
8
|
-
|
|
9
|
-
interface Citation {
|
|
10
|
-
id: string;
|
|
11
|
-
content: string;
|
|
12
|
-
taskLabel: TaskLabels;
|
|
13
|
-
}
|
|
14
|
-
interface StatusInfoMessage {
|
|
15
|
-
type: "info" | "agent_outcome" | "citations";
|
|
16
|
-
message: string;
|
|
17
|
-
citations?: Citation[];
|
|
18
|
-
id?: string;
|
|
19
|
-
}
|
|
20
|
-
|
|
21
|
-
interface Props extends ProChatProps<any> {
|
|
22
|
-
loading?: boolean;
|
|
23
|
-
onRequest: (messages: ChatMessage[], sessionId: string, onStatusUpdate: (info: StatusInfoMessage) => void) => any;
|
|
24
|
-
sessionId?: string;
|
|
25
|
-
onFollowupRequest?: (sessionId: string) => Promise<string[] | undefined>;
|
|
26
|
-
frontendUrl: string;
|
|
27
|
-
}
|
|
28
|
-
declare const Chatbot: ({ loading, onRequest, sessionId: sessionIdProp, onFollowupRequest, frontendUrl, ...props }: Props) => react_jsx_runtime.JSX.Element;
|
|
29
|
-
|
|
30
|
-
declare const ChatTriggerLink: ({ text }: {
|
|
31
|
-
text: string;
|
|
32
|
-
}) => react_jsx_runtime.JSX.Element;
|
|
33
|
-
|
|
34
|
-
declare const Citations: ({ citations, frontendUrl, }: {
|
|
35
|
-
citations?: Citation[];
|
|
36
|
-
frontendUrl: string;
|
|
37
|
-
}) => JSX.Element | null;
|
|
38
|
-
|
|
39
|
-
export { ChatTriggerLink, Chatbot, type Citation, Citations, type StatusInfoMessage };
|
|
@@ -1,111 +0,0 @@
|
|
|
1
|
-
import React__default, { FC } from 'react';
|
|
2
|
-
import { T as TaskLabels } from '../types-PVxbm0tZ.js';
|
|
3
|
-
import '@reduxjs/toolkit';
|
|
4
|
-
import 'zod';
|
|
5
|
-
|
|
6
|
-
interface AgentAction {
|
|
7
|
-
id?: string;
|
|
8
|
-
type: "info" | "analysis";
|
|
9
|
-
content: string;
|
|
10
|
-
timestamp: number;
|
|
11
|
-
artifacts?: Artifact[];
|
|
12
|
-
}
|
|
13
|
-
declare enum LoadingState {
|
|
14
|
-
LOADING = "LOADING",
|
|
15
|
-
LOADED = "LOADED",
|
|
16
|
-
ERROR = "ERROR",
|
|
17
|
-
UNINITIALIZED = "UNINITIALIZED"
|
|
18
|
-
}
|
|
19
|
-
interface AssistantMeta {
|
|
20
|
-
avatar: string;
|
|
21
|
-
name: string;
|
|
22
|
-
}
|
|
23
|
-
interface Feedback {
|
|
24
|
-
rating?: "up" | "down";
|
|
25
|
-
comment?: string;
|
|
26
|
-
}
|
|
27
|
-
interface ChatSession {
|
|
28
|
-
id: string;
|
|
29
|
-
messages: ChatMessage[];
|
|
30
|
-
context?: {
|
|
31
|
-
files?: File[];
|
|
32
|
-
selectedOptions?: string[];
|
|
33
|
-
[x: string]: unknown;
|
|
34
|
-
};
|
|
35
|
-
}
|
|
36
|
-
interface FileUploadProps {
|
|
37
|
-
allowedFiles: string;
|
|
38
|
-
contextFieldKey: string;
|
|
39
|
-
}
|
|
40
|
-
interface ChatbotProps {
|
|
41
|
-
helloMessage?: React.ReactNode;
|
|
42
|
-
assistantMeta?: AssistantMeta;
|
|
43
|
-
context?: Record<string, unknown>;
|
|
44
|
-
fileUploadProps?: FileUploadProps;
|
|
45
|
-
}
|
|
46
|
-
type InteractionType = "text" | "select" | "multiSelect" | "confirm";
|
|
47
|
-
interface InteractionChoice {
|
|
48
|
-
id: string;
|
|
49
|
-
label: string;
|
|
50
|
-
value: string;
|
|
51
|
-
}
|
|
52
|
-
interface InteractionRequest {
|
|
53
|
-
type: InteractionType;
|
|
54
|
-
id: string;
|
|
55
|
-
prompt: string;
|
|
56
|
-
required?: boolean;
|
|
57
|
-
choices?: InteractionChoice[];
|
|
58
|
-
validation?: {
|
|
59
|
-
pattern?: string;
|
|
60
|
-
message?: string;
|
|
61
|
-
};
|
|
62
|
-
}
|
|
63
|
-
interface ChatMessage {
|
|
64
|
-
id: string;
|
|
65
|
-
content: string;
|
|
66
|
-
role: "user" | "assistant";
|
|
67
|
-
timestamp: number;
|
|
68
|
-
followUpQuestions?: string[];
|
|
69
|
-
actions?: AgentAction[];
|
|
70
|
-
interaction?: InteractionRequest;
|
|
71
|
-
artifacts?: Artifact[];
|
|
72
|
-
heading: string;
|
|
73
|
-
}
|
|
74
|
-
interface Artifact {
|
|
75
|
-
content: string;
|
|
76
|
-
entity: string;
|
|
77
|
-
name: string;
|
|
78
|
-
type: string;
|
|
79
|
-
}
|
|
80
|
-
interface ChatResponse {
|
|
81
|
-
content: string;
|
|
82
|
-
followUpQuestions?: string[];
|
|
83
|
-
actions?: AgentAction[];
|
|
84
|
-
interaction?: InteractionRequest;
|
|
85
|
-
role: "assistant" | "user";
|
|
86
|
-
timestamp: number;
|
|
87
|
-
artifacts?: Artifact[];
|
|
88
|
-
heading: string;
|
|
89
|
-
}
|
|
90
|
-
interface ChatState {
|
|
91
|
-
sessions: Record<string, ChatSession>;
|
|
92
|
-
currentSessionId: string | null;
|
|
93
|
-
loadingState: LoadingState;
|
|
94
|
-
error: string | null;
|
|
95
|
-
abortController: AbortController | null;
|
|
96
|
-
currentActions: AgentAction[];
|
|
97
|
-
taskLabel?: keyof typeof TaskLabels;
|
|
98
|
-
initialValidation?: (data: {
|
|
99
|
-
context: ChatSession["context"];
|
|
100
|
-
}) => Promise<void>;
|
|
101
|
-
}
|
|
102
|
-
|
|
103
|
-
declare const Chatbot: FC<ChatbotProps>;
|
|
104
|
-
|
|
105
|
-
declare const ChatProvider: React__default.FC<{
|
|
106
|
-
children: React__default.ReactNode;
|
|
107
|
-
taskLabel?: keyof typeof TaskLabels;
|
|
108
|
-
initialValidation?: ChatState["initialValidation"];
|
|
109
|
-
}>;
|
|
110
|
-
|
|
111
|
-
export { type AgentAction, type Artifact, type AssistantMeta, type ChatMessage, ChatProvider, type ChatResponse, type ChatSession, type ChatState, type ChatbotProps, Chatbot as ChatbotV2, type Feedback, type InteractionChoice, type InteractionRequest, type InteractionType, LoadingState };
|