@app-studio/web 0.9.39 → 0.9.43

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 (95) hide show
  1. package/dist/bot/Bot.d.ts +15 -0
  2. package/dist/bot/Cache.d.ts +13 -0
  3. package/dist/bot/Config.d.ts +13 -0
  4. package/dist/bot/ContentFetcher.d.ts +9 -0
  5. package/dist/bot/DocuCode.d.ts +19 -0
  6. package/dist/bot/FileHandler.d.ts +39 -0
  7. package/dist/bot/ai/AnthropicConnector.d.ts +6 -0
  8. package/dist/bot/ai/GeminiConnector.d.ts +7 -0
  9. package/dist/bot/ai/GroqConnector.d.ts +7 -0
  10. package/dist/bot/ai/HuggingFaceConnector.d.ts +6 -0
  11. package/dist/bot/ai/OpenAIConnector.d.ts +11 -0
  12. package/dist/bot/ai/ReplicateConnector.d.ts +7 -0
  13. package/dist/bot/ai/SambaNovaConnector.d.ts +6 -0
  14. package/dist/bot/ai/ai.config.d.ts +12 -0
  15. package/dist/bot/ai/ai.service.d.ts +36 -0
  16. package/dist/bot/data.d.ts +19 -0
  17. package/dist/bot/extractors.d.ts +8 -0
  18. package/dist/bot/index.d.ts +1 -0
  19. package/dist/bot/prompt/1-project.d.ts +1 -0
  20. package/dist/bot/prompt/2-response.d.ts +1 -0
  21. package/dist/bot/prompt/3-comment.d.ts +1 -0
  22. package/docs/components/Accordion.mdx +74 -121
  23. package/docs/components/Alert.mdx +18 -69
  24. package/docs/components/AspectRatio.mdx +11 -9
  25. package/docs/components/AudioInput.mdx +43 -0
  26. package/docs/components/Avatar.mdx +17 -42
  27. package/docs/components/Background.mdx +99 -491
  28. package/docs/components/Badge.mdx +37 -122
  29. package/docs/components/Button.mdx +71 -123
  30. package/docs/components/Calendar.mdx +7 -7
  31. package/docs/components/Card.mdx +238 -281
  32. package/docs/components/Carousel.mdx +88 -315
  33. package/docs/components/Center.mdx +22 -22
  34. package/docs/components/Chart.mdx +171 -26
  35. package/docs/components/ChatInput.mdx +327 -275
  36. package/docs/components/Checkbox.mdx +3 -5
  37. package/docs/components/ColorInput.mdx +10 -10
  38. package/docs/components/ColorPicker.mdx +452 -0
  39. package/docs/components/ComboBox.mdx +14 -14
  40. package/docs/components/Command.mdx +140 -188
  41. package/docs/components/ContextMenu.mdx +47 -171
  42. package/docs/components/CookieConsent.mdx +53 -0
  43. package/docs/components/CountryPicker.mdx +10 -10
  44. package/docs/components/DatePicker.mdx +4 -4
  45. package/docs/components/DragAndDrop.mdx +279 -463
  46. package/docs/components/Drawer.mdx +401 -100
  47. package/docs/components/DropdownMenu.mdx +37 -155
  48. package/docs/components/EmojiPicker.mdx +84 -0
  49. package/docs/components/File.mdx +130 -4
  50. package/docs/components/Flow.mdx +3 -3
  51. package/docs/components/Form.mdx +4 -4
  52. package/docs/components/Formik.mdx +41 -41
  53. package/docs/components/Gradient.mdx +355 -178
  54. package/docs/components/Horizontal.mdx +1 -2
  55. package/docs/components/HoverCard.mdx +57 -125
  56. package/docs/components/Icon.mdx +10 -10
  57. package/docs/components/KanbanBoard.mdx +12 -12
  58. package/docs/components/Label.mdx +8 -8
  59. package/docs/components/Link.mdx +19 -27
  60. package/docs/components/Loader.mdx +224 -407
  61. package/docs/components/Menubar.mdx +71 -67
  62. package/docs/components/Message.mdx +211 -526
  63. package/docs/components/Modal.mdx +351 -475
  64. package/docs/components/NavigationMenu.mdx +8 -8
  65. package/docs/components/OTPInput.mdx +194 -0
  66. package/docs/components/Pagination.mdx +451 -107
  67. package/docs/components/Password.mdx +8 -8
  68. package/docs/components/ProgressBar.mdx +460 -0
  69. package/docs/components/Resizable.mdx +103 -102
  70. package/docs/components/Select.mdx +5 -5
  71. package/docs/components/Separator.mdx +11 -98
  72. package/docs/components/ShareButton.mdx +29 -0
  73. package/docs/components/Sidebar.mdx +70 -131
  74. package/docs/components/Slider.mdx +99 -185
  75. package/docs/components/StatusIndicator.mdx +373 -0
  76. package/docs/components/Switch.mdx +3 -3
  77. package/docs/components/Table.mdx +25 -105
  78. package/docs/components/Tabs.mdx +40 -143
  79. package/docs/components/TagInput.mdx +32 -32
  80. package/docs/components/Text.mdx +3 -3
  81. package/docs/components/TextArea.mdx +9 -9
  82. package/docs/components/TextField.mdx +17 -17
  83. package/docs/components/Title.mdx +267 -525
  84. package/docs/components/Toast.mdx +65 -142
  85. package/docs/components/Toggle.mdx +34 -46
  86. package/docs/components/ToggleGroup.mdx +29 -50
  87. package/docs/components/Tooltip.mdx +500 -137
  88. package/docs/components/Tree.mdx +4 -4
  89. package/docs/components/Uploader.mdx +205 -351
  90. package/docs/components/Vertical.mdx +22 -22
  91. package/package.json +1 -1
  92. package/dist/components/AuthGuard/AuthGuard.d.ts +0 -35
  93. package/dist/components/AuthGuard/index.d.ts +0 -1
  94. package/docs/adk-components.md +0 -319
  95. package/docs/adk-quick-start.md +0 -268
@@ -1,268 +0,0 @@
1
- # ADK Components Quick Start Guide
2
-
3
- Get up and running with ADK Agent Components in minutes.
4
-
5
- ## Installation
6
-
7
- The ADK components are part of the app-studio component library:
8
-
9
- ```bash
10
- npm install @app-studio/web
11
- ```
12
-
13
- ## Basic Setup
14
-
15
- ### 1. Import Components
16
-
17
- ```tsx
18
- import {
19
- AgentChat,
20
- AgentSession,
21
- AgentTrace,
22
- AgentEval
23
- } from '@app-studio/web';
24
- ```
25
-
26
- ### 2. Use Components
27
-
28
- The ADK components are self-contained and handle their own API communications. Simply add them to your application and provide the necessary props.
29
-
30
- ```tsx
31
- function YourApp() {
32
- return (
33
- <div style={{ display: 'flex', height: '100vh' }}>
34
- {/* Session Management */}
35
- <div style={{ width: '300px' }}>
36
- <AgentSession
37
- appName="my-agent"
38
- userId="user123"
39
- apiBaseUrl="https://your-adk-api.com"
40
- />
41
- </div>
42
-
43
- {/* Chat Interface */}
44
- <div style={{ flex: 1 }}>
45
- <AgentChat
46
- appName="my-agent"
47
- userId="user123"
48
- apiBaseUrl="https://your-adk-api.com"
49
- enableFileUpload={true}
50
- enableStreaming={true}
51
- />
52
- </div>
53
- </div>
54
- );
55
- }
56
- ```
57
-
58
- ## Component Overview
59
-
60
- ### AgentChat
61
- **Purpose**: Real-time chat interface with ADK agents
62
- **Key Features**: File uploads, audio recording, streaming, function calls, code execution
63
-
64
- ```tsx
65
- <AgentChat
66
- appName="my-agent"
67
- userId="user123"
68
- enableFileUpload={true}
69
- enableAudioRecording={true}
70
- enableStreaming={true}
71
- enableThoughts={true}
72
- onMessageSent={(message) => console.log(message)}
73
- />
74
- ```
75
-
76
- ### AgentSession
77
- **Purpose**: Session management and organization
78
- **Key Features**: Create, list, import/export, search sessions
79
-
80
- ```tsx
81
- <AgentSession
82
- appName="my-agent"
83
- userId="user123"
84
- showSessionHistory={true}
85
- enableSessionImport={true}
86
- enableSessionExport={true}
87
- />
88
- ```
89
-
90
- ### AgentTrace
91
- **Purpose**: Visualize agent execution traces
92
- **Key Features**: Timeline view, performance metrics, real-time updates
93
-
94
- ```tsx
95
- <AgentTrace
96
- sessionId="session-123"
97
- userId="user123"
98
- appName="my-agent"
99
- showTimeline={true}
100
- showMetrics={true}
101
- enableFiltering={true}
102
- />
103
- ```
104
-
105
- ### AgentEval
106
- **Purpose**: Run and manage agent evaluations
107
- **Key Features**: Test creation, execution monitoring, results analysis
108
-
109
- ```tsx
110
- <AgentEval
111
- appName="my-agent"
112
- userId="user123"
113
- enableBatchEvaluation={true}
114
- enableMetricsComparison={true}
115
- enableResultExport={true}
116
- />
117
- ```
118
-
119
- ## Common Patterns
120
-
121
- ### 1. Complete Agent Interface
122
-
123
- ```tsx
124
- import { Tabs } from 'app-studio';
125
-
126
- function AgentInterface() {
127
- return (
128
- <Tabs defaultValue="chat">
129
- <Tabs.List>
130
- <Tabs.Trigger value="chat">Chat</Tabs.Trigger>
131
- <Tabs.Trigger value="sessions">Sessions</Tabs.Trigger>
132
- <Tabs.Trigger value="trace">Trace</Tabs.Trigger>
133
- <Tabs.Trigger value="eval">Evaluation</Tabs.Trigger>
134
- </Tabs.List>
135
-
136
- <Tabs.Content value="chat">
137
- <AgentChat appName="my-agent" userId="user123" />
138
- </Tabs.Content>
139
-
140
- <Tabs.Content value="sessions">
141
- <AgentSession appName="my-agent" userId="user123" />
142
- </Tabs.Content>
143
-
144
- <Tabs.Content value="trace">
145
- <AgentTrace sessionId="current-session" userId="user123" appName="my-agent" />
146
- </Tabs.Content>
147
-
148
- <Tabs.Content value="eval">
149
- <AgentEval appName="my-agent" userId="user123" />
150
- </Tabs.Content>
151
- </Tabs>
152
- );
153
- }
154
- ```
155
-
156
- ### 2. Custom Styling
157
-
158
- ```tsx
159
- <AgentChat
160
- appName="my-agent"
161
- userId="user123"
162
- views={{
163
- container: { backgroundColor: 'color.blue.50' },
164
- userMessage: { backgroundColor: 'color.blue.500' },
165
- botMessage: { backgroundColor: 'color.green.100' },
166
- inputField: { borderColor: 'color.blue.300' },
167
- }}
168
- />
169
- ```
170
-
171
- ### 3. Event Handling
172
-
173
- ```tsx
174
- function MyComponent() {
175
- const handleSessionCreate = (session) => {
176
- console.log('New session created:', session);
177
- };
178
-
179
- const handleMessageSent = (message) => {
180
- console.log('Message sent:', message);
181
- };
182
-
183
- const handleError = (error) => {
184
- console.error('Error:', error);
185
- };
186
-
187
- return (
188
- <AgentChat
189
- appName="my-agent"
190
- userId="user123"
191
- onSessionCreate={handleSessionCreate}
192
- onMessageSent={handleMessageSent}
193
- onError={handleError}
194
- />
195
- );
196
- }
197
- ```
198
-
199
- ## Backend Requirements
200
-
201
- Your ADK backend must provide these endpoints:
202
-
203
- ### Session Management
204
- - `POST /sessions` - Create session
205
- - `GET /sessions` - List sessions
206
- - `GET /sessions/:id` - Get session
207
- - `DELETE /sessions/:id` - Delete session
208
-
209
- ### Messaging
210
- - `POST /run` - Send message (non-streaming)
211
- - `POST /run_sse` - Send message (streaming)
212
-
213
- ### Tracing (Optional)
214
- - `GET /trace/events` - Get trace events
215
- - `GET /trace/spans` - Get trace spans
216
- - `GET /trace/metrics` - Get trace metrics
217
-
218
- ### Evaluation (Optional)
219
- - `POST /evaluations` - Create evaluation
220
- - `GET /evaluations` - List evaluations
221
- - `POST /evaluations/:id/start` - Start evaluation
222
-
223
- ## Environment Variables
224
-
225
- ```bash
226
- # .env
227
- REACT_APP_AGENT_API_URL=https://your-adk-api.com
228
- REACT_APP_AGENT_API_KEY=your-api-key
229
- ```
230
-
231
- ## TypeScript Support
232
-
233
- All components include comprehensive TypeScript definitions:
234
-
235
- ```tsx
236
- import type {
237
- AgentChatProps,
238
- AgentSessionProps,
239
- AgentTraceProps,
240
- AgentEvalProps,
241
- AgentMessage,
242
- AgentSession,
243
- TraceEvent,
244
- EvaluationRun
245
- } from '@app-studio/web';
246
- ```
247
-
248
- ## Troubleshooting
249
-
250
- ### Common Issues
251
-
252
- 1. **API errors**: Check the `apiBaseUrl` prop and ensure your backend URL and API endpoints are correct.
253
- 2. **Styling issues**: Verify you're using the app-studio color system.
254
- 3. **TypeScript errors**: Import types from the correct package.
255
-
256
- ## Next Steps
257
-
258
- - Explore the [complete documentation](./adk-components.md)
259
- - Check out the [demo page](../src/pages/adkComponents.page.tsx)
260
- - View component examples in each component's `examples/` directory
261
- - Customize components using the `views` prop system
262
-
263
- ## Support
264
-
265
- For questions or issues:
266
- - Check the component documentation
267
- - Review the example implementations
268
- - Create an issue in the repository