@rodrigocoliveira/agno-react 1.0.1 → 1.0.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.
Files changed (158) hide show
  1. package/README.md +363 -83
  2. package/dist/components/GenerativeUIRenderer.d.ts +21 -0
  3. package/dist/components/GenerativeUIRenderer.d.ts.map +1 -0
  4. package/dist/context/AgnoContext.d.ts +16 -0
  5. package/dist/context/AgnoContext.d.ts.map +1 -0
  6. package/dist/context/ToolHandlerContext.d.ts +44 -0
  7. package/dist/context/ToolHandlerContext.d.ts.map +1 -0
  8. package/dist/hooks/useAgnoActions.d.ts +25 -0
  9. package/dist/hooks/useAgnoActions.d.ts.map +1 -0
  10. package/dist/hooks/useAgnoChat.d.ts +22 -0
  11. package/dist/hooks/useAgnoChat.d.ts.map +1 -0
  12. package/dist/hooks/useAgnoCustomEvents.d.ts +38 -0
  13. package/dist/hooks/useAgnoCustomEvents.d.ts.map +1 -0
  14. package/dist/hooks/useAgnoEvals.d.ts +39 -0
  15. package/dist/hooks/useAgnoEvals.d.ts.map +1 -0
  16. package/dist/hooks/useAgnoKnowledge.d.ts +56 -0
  17. package/dist/hooks/useAgnoKnowledge.d.ts.map +1 -0
  18. package/dist/hooks/useAgnoMemory.d.ts +42 -0
  19. package/dist/hooks/useAgnoMemory.d.ts.map +1 -0
  20. package/dist/hooks/useAgnoMetrics.d.ts +51 -0
  21. package/dist/hooks/useAgnoMetrics.d.ts.map +1 -0
  22. package/dist/hooks/useAgnoSession.d.ts +38 -0
  23. package/dist/hooks/useAgnoSession.d.ts.map +1 -0
  24. package/dist/hooks/useAgnoToolExecution.d.ts +70 -0
  25. package/dist/hooks/useAgnoToolExecution.d.ts.map +1 -0
  26. package/dist/hooks/useAgnoTraces.d.ts +51 -0
  27. package/dist/hooks/useAgnoTraces.d.ts.map +1 -0
  28. package/dist/index.d.ts +27 -723
  29. package/dist/index.d.ts.map +1 -0
  30. package/dist/index.js +932 -1052
  31. package/dist/index.js.map +24 -0
  32. package/dist/index.mjs +816 -909
  33. package/dist/index.mjs.map +24 -0
  34. package/dist/ui/components/artifact.d.ts +24 -0
  35. package/dist/ui/components/artifact.d.ts.map +1 -0
  36. package/dist/ui/components/audio-recorder.d.ts +32 -0
  37. package/dist/ui/components/audio-recorder.d.ts.map +1 -0
  38. package/dist/ui/components/code-block.d.ts +15 -0
  39. package/dist/ui/components/code-block.d.ts.map +1 -0
  40. package/dist/ui/components/conversation.d.ts +17 -0
  41. package/dist/ui/components/conversation.d.ts.map +1 -0
  42. package/dist/ui/components/file-preview-card.d.ts +13 -0
  43. package/dist/ui/components/file-preview-card.d.ts.map +1 -0
  44. package/dist/ui/components/file-preview-modal.d.ts +8 -0
  45. package/dist/ui/components/file-preview-modal.d.ts.map +1 -0
  46. package/dist/ui/components/image-lightbox.d.ts +12 -0
  47. package/dist/ui/components/image-lightbox.d.ts.map +1 -0
  48. package/dist/ui/components/message.d.ts +19 -0
  49. package/dist/ui/components/message.d.ts.map +1 -0
  50. package/dist/ui/components/prompt-input/attachments.d.ts +21 -0
  51. package/dist/ui/components/prompt-input/attachments.d.ts.map +1 -0
  52. package/dist/ui/components/prompt-input/buttons.d.ts +19 -0
  53. package/dist/ui/components/prompt-input/buttons.d.ts.map +1 -0
  54. package/dist/ui/components/prompt-input/command.d.ts +17 -0
  55. package/dist/ui/components/prompt-input/command.d.ts.map +1 -0
  56. package/dist/ui/components/prompt-input/context.d.ts +36 -0
  57. package/dist/ui/components/prompt-input/context.d.ts.map +1 -0
  58. package/dist/ui/components/prompt-input/drop-zone.d.ts +7 -0
  59. package/dist/ui/components/prompt-input/drop-zone.d.ts.map +1 -0
  60. package/dist/ui/components/prompt-input/footer.d.ts +11 -0
  61. package/dist/ui/components/prompt-input/footer.d.ts.map +1 -0
  62. package/dist/ui/components/prompt-input/index.d.ts +25 -0
  63. package/dist/ui/components/prompt-input/index.d.ts.map +1 -0
  64. package/dist/ui/components/prompt-input/model-select.d.ts +13 -0
  65. package/dist/ui/components/prompt-input/model-select.d.ts.map +1 -0
  66. package/dist/ui/components/prompt-input/prompt-input.d.ts +22 -0
  67. package/dist/ui/components/prompt-input/prompt-input.d.ts.map +1 -0
  68. package/dist/ui/components/prompt-input/provider.d.ts +6 -0
  69. package/dist/ui/components/prompt-input/provider.d.ts.map +1 -0
  70. package/dist/ui/components/prompt-input/speech.d.ts +51 -0
  71. package/dist/ui/components/prompt-input/speech.d.ts.map +1 -0
  72. package/dist/ui/components/prompt-input/tabs.d.ts +12 -0
  73. package/dist/ui/components/prompt-input/tabs.d.ts.map +1 -0
  74. package/dist/ui/components/prompt-input/textarea.d.ts +5 -0
  75. package/dist/ui/components/prompt-input/textarea.d.ts.map +1 -0
  76. package/dist/ui/components/response.d.ts +5 -0
  77. package/dist/ui/components/response.d.ts.map +1 -0
  78. package/dist/ui/components/smart-timestamp.d.ts +8 -0
  79. package/dist/ui/components/smart-timestamp.d.ts.map +1 -0
  80. package/dist/ui/components/streaming-indicator.d.ts +8 -0
  81. package/dist/ui/components/streaming-indicator.d.ts.map +1 -0
  82. package/dist/ui/components/tool.d.ts +24 -0
  83. package/dist/ui/components/tool.d.ts.map +1 -0
  84. package/dist/ui/composed/AgnoChatInput.d.ts +44 -0
  85. package/dist/ui/composed/AgnoChatInput.d.ts.map +1 -0
  86. package/dist/ui/composed/AgnoChatInterface.d.ts +49 -0
  87. package/dist/ui/composed/AgnoChatInterface.d.ts.map +1 -0
  88. package/dist/ui/composed/AgnoMessageItem.d.ts +38 -0
  89. package/dist/ui/composed/AgnoMessageItem.d.ts.map +1 -0
  90. package/dist/ui/composed/agno-chat/agno-chat.d.ts +9 -0
  91. package/dist/ui/composed/agno-chat/agno-chat.d.ts.map +1 -0
  92. package/dist/ui/composed/agno-chat/context.d.ts +33 -0
  93. package/dist/ui/composed/agno-chat/context.d.ts.map +1 -0
  94. package/dist/ui/composed/agno-chat/empty-state.d.ts +6 -0
  95. package/dist/ui/composed/agno-chat/empty-state.d.ts.map +1 -0
  96. package/dist/ui/composed/agno-chat/error-bar.d.ts +5 -0
  97. package/dist/ui/composed/agno-chat/error-bar.d.ts.map +1 -0
  98. package/dist/ui/composed/agno-chat/index.d.ts +33 -0
  99. package/dist/ui/composed/agno-chat/index.d.ts.map +1 -0
  100. package/dist/ui/composed/agno-chat/input.d.ts +39 -0
  101. package/dist/ui/composed/agno-chat/input.d.ts.map +1 -0
  102. package/dist/ui/composed/agno-chat/messages.d.ts +21 -0
  103. package/dist/ui/composed/agno-chat/messages.d.ts.map +1 -0
  104. package/dist/ui/composed/agno-chat/suggested-prompts.d.ts +7 -0
  105. package/dist/ui/composed/agno-chat/suggested-prompts.d.ts.map +1 -0
  106. package/dist/ui/composed/agno-chat/tool-status.d.ts +5 -0
  107. package/dist/ui/composed/agno-chat/tool-status.d.ts.map +1 -0
  108. package/dist/ui/composed/index.d.ts +9 -0
  109. package/dist/ui/composed/index.d.ts.map +1 -0
  110. package/dist/ui/index.d.ts +59 -0
  111. package/dist/ui/index.d.ts.map +1 -0
  112. package/dist/ui/lib/cn.d.ts +3 -0
  113. package/dist/ui/lib/cn.d.ts.map +1 -0
  114. package/dist/ui/lib/file-utils.d.ts +20 -0
  115. package/dist/ui/lib/file-utils.d.ts.map +1 -0
  116. package/dist/ui/lib/format-timestamp.d.ts +16 -0
  117. package/dist/ui/lib/format-timestamp.d.ts.map +1 -0
  118. package/dist/ui/primitives/accordion.d.ts +8 -0
  119. package/dist/ui/primitives/accordion.d.ts.map +1 -0
  120. package/dist/ui/primitives/avatar.d.ts +7 -0
  121. package/dist/ui/primitives/avatar.d.ts.map +1 -0
  122. package/dist/ui/primitives/badge.d.ts +10 -0
  123. package/dist/ui/primitives/badge.d.ts.map +1 -0
  124. package/dist/ui/primitives/button.d.ts +12 -0
  125. package/dist/ui/primitives/button.d.ts.map +1 -0
  126. package/dist/ui/primitives/collapsible.d.ts +6 -0
  127. package/dist/ui/primitives/collapsible.d.ts.map +1 -0
  128. package/dist/ui/primitives/command.d.ts +79 -0
  129. package/dist/ui/primitives/command.d.ts.map +1 -0
  130. package/dist/ui/primitives/dialog.d.ts +26 -0
  131. package/dist/ui/primitives/dialog.d.ts.map +1 -0
  132. package/dist/ui/primitives/dropdown-menu.d.ts +28 -0
  133. package/dist/ui/primitives/dropdown-menu.d.ts.map +1 -0
  134. package/dist/ui/primitives/hover-card.d.ts +7 -0
  135. package/dist/ui/primitives/hover-card.d.ts.map +1 -0
  136. package/dist/ui/primitives/index.d.ts +16 -0
  137. package/dist/ui/primitives/index.d.ts.map +1 -0
  138. package/dist/ui/primitives/input-group.d.ts +17 -0
  139. package/dist/ui/primitives/input-group.d.ts.map +1 -0
  140. package/dist/ui/primitives/select.d.ts +14 -0
  141. package/dist/ui/primitives/select.d.ts.map +1 -0
  142. package/dist/ui/primitives/tooltip.d.ts +8 -0
  143. package/dist/ui/primitives/tooltip.d.ts.map +1 -0
  144. package/dist/ui/types.d.ts +56 -0
  145. package/dist/ui/types.d.ts.map +1 -0
  146. package/dist/ui.d.ts +2 -0
  147. package/dist/ui.d.ts.map +1 -0
  148. package/dist/ui.js +4059 -0
  149. package/dist/ui.js.map +60 -0
  150. package/dist/ui.mjs +4044 -0
  151. package/dist/ui.mjs.map +60 -0
  152. package/dist/utils/component-registry.d.ts +63 -0
  153. package/dist/utils/component-registry.d.ts.map +1 -0
  154. package/dist/utils/ui-helpers.d.ts +165 -0
  155. package/dist/utils/ui-helpers.d.ts.map +1 -0
  156. package/package.json +122 -17
  157. package/LICENSE +0 -21
  158. package/dist/index.d.mts +0 -724
@@ -0,0 +1,63 @@
1
+ /**
2
+ * Component Registry for Generative UI
3
+ *
4
+ * Maps component specifications to actual React components.
5
+ * Allows registering custom components at runtime.
6
+ */
7
+ /**
8
+ * Component renderer function type
9
+ */
10
+ export type ComponentRenderer = (props: any) => any;
11
+ /**
12
+ * Component registry class
13
+ */
14
+ export declare class ComponentRegistry {
15
+ private static instance;
16
+ private components;
17
+ private constructor();
18
+ /**
19
+ * Get the singleton instance
20
+ */
21
+ static getInstance(): ComponentRegistry;
22
+ /**
23
+ * Register a component renderer
24
+ */
25
+ register(type: string, renderer: ComponentRenderer): void;
26
+ /**
27
+ * Register multiple components at once
28
+ */
29
+ registerBatch(components: Record<string, ComponentRenderer>): void;
30
+ /**
31
+ * Get a registered component renderer
32
+ */
33
+ get(type: string): ComponentRenderer | undefined;
34
+ /**
35
+ * Check if a component is registered
36
+ */
37
+ has(type: string): boolean;
38
+ /**
39
+ * Unregister a component
40
+ */
41
+ unregister(type: string): void;
42
+ /**
43
+ * Get all registered component types
44
+ */
45
+ getRegisteredTypes(): string[];
46
+ /**
47
+ * Clear all registered components
48
+ */
49
+ clear(): void;
50
+ }
51
+ /**
52
+ * Get the global component registry instance
53
+ */
54
+ export declare function getComponentRegistry(): ComponentRegistry;
55
+ /**
56
+ * Helper to register a chart component
57
+ */
58
+ export declare function registerChartComponent(name: string, renderer: ComponentRenderer): void;
59
+ /**
60
+ * Helper to get a chart component
61
+ */
62
+ export declare function getChartComponent(name: string): ComponentRenderer | undefined;
63
+ //# sourceMappingURL=component-registry.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"component-registry.d.ts","sourceRoot":"","sources":["../../src/utils/component-registry.ts"],"names":[],"mappings":"AAAA;;;;;GAKG;AAEH;;GAEG;AACH,MAAM,MAAM,iBAAiB,GAAG,CAAC,KAAK,EAAE,GAAG,KAAK,GAAG,CAAC;AAEpD;;GAEG;AACH,qBAAa,iBAAiB;IAC5B,OAAO,CAAC,MAAM,CAAC,QAAQ,CAAoB;IAC3C,OAAO,CAAC,UAAU,CAA6C;IAE/D,OAAO;IAIP;;OAEG;IACH,MAAM,CAAC,WAAW,IAAI,iBAAiB;IAOvC;;OAEG;IACH,QAAQ,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI;IAIzD;;OAEG;IACH,aAAa,CAAC,UAAU,EAAE,MAAM,CAAC,MAAM,EAAE,iBAAiB,CAAC,GAAG,IAAI;IAMlE;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS;IAIhD;;OAEG;IACH,GAAG,CAAC,IAAI,EAAE,MAAM,GAAG,OAAO;IAI1B;;OAEG;IACH,UAAU,CAAC,IAAI,EAAE,MAAM,GAAG,IAAI;IAI9B;;OAEG;IACH,kBAAkB,IAAI,MAAM,EAAE;IAI9B;;OAEG;IACH,KAAK,IAAI,IAAI;CAGd;AAED;;GAEG;AACH,wBAAgB,oBAAoB,IAAI,iBAAiB,CAExD;AAED;;GAEG;AACH,wBAAgB,sBAAsB,CAAC,IAAI,EAAE,MAAM,EAAE,QAAQ,EAAE,iBAAiB,GAAG,IAAI,CAEtF;AAED;;GAEG;AACH,wBAAgB,iBAAiB,CAAC,IAAI,EAAE,MAAM,GAAG,iBAAiB,GAAG,SAAS,CAE7E"}
@@ -0,0 +1,165 @@
1
+ /**
2
+ * Helper utilities for creating UI component specifications
3
+ *
4
+ * These helpers make it easy to create common UI patterns without
5
+ * manually constructing the full specification object.
6
+ */
7
+ import type { ChartComponentSpec, CardGridComponentSpec, CardData, TableComponentSpec, TableColumn, MarkdownComponentSpec, ArtifactComponentSpec, UIComponentSpec, ToolHandlerResult } from '@rodrigocoliveira/agno-types';
8
+ /**
9
+ * Chart helper options
10
+ */
11
+ export interface ChartHelperOptions {
12
+ /** Chart title */
13
+ title?: string;
14
+ /** Chart description */
15
+ description?: string;
16
+ /** Layout preference */
17
+ layout?: 'inline' | 'artifact';
18
+ /** Show legend */
19
+ showLegend?: boolean;
20
+ /** Show grid */
21
+ showGrid?: boolean;
22
+ /** Chart height */
23
+ height?: number | string;
24
+ /** Chart width */
25
+ width?: number | string;
26
+ }
27
+ /**
28
+ * Create a bar chart specification
29
+ */
30
+ export declare function createBarChart(data: any[], xKey: string, bars: Array<{
31
+ key: string;
32
+ label?: string;
33
+ color?: string;
34
+ }>, options?: ChartHelperOptions): ChartComponentSpec;
35
+ /**
36
+ * Create a line chart specification
37
+ */
38
+ export declare function createLineChart(data: any[], xKey: string, lines: Array<{
39
+ key: string;
40
+ label?: string;
41
+ color?: string;
42
+ }>, options?: ChartHelperOptions): ChartComponentSpec;
43
+ /**
44
+ * Create a pie chart specification
45
+ */
46
+ export declare function createPieChart(data: any[], dataKey: string, nameKey: string, options?: ChartHelperOptions & {
47
+ showLabel?: boolean;
48
+ }): ChartComponentSpec;
49
+ /**
50
+ * Create an area chart specification
51
+ */
52
+ export declare function createAreaChart(data: any[], xKey: string, areas: Array<{
53
+ key: string;
54
+ label?: string;
55
+ color?: string;
56
+ }>, options?: ChartHelperOptions): ChartComponentSpec;
57
+ /**
58
+ * Card grid helper options
59
+ */
60
+ export interface CardGridHelperOptions {
61
+ title?: string;
62
+ description?: string;
63
+ layout?: 'inline' | 'artifact';
64
+ columns?: {
65
+ default?: number;
66
+ sm?: number;
67
+ md?: number;
68
+ lg?: number;
69
+ xl?: number;
70
+ };
71
+ variant?: 'default' | 'bordered' | 'elevated';
72
+ }
73
+ /**
74
+ * Create a card grid specification
75
+ */
76
+ export declare function createCardGrid(cards: CardData[], options?: CardGridHelperOptions): CardGridComponentSpec;
77
+ /**
78
+ * Create a simple card
79
+ */
80
+ export declare function createCard(id: string, title: string, description?: string, options?: {
81
+ image?: string;
82
+ metadata?: Record<string, any>;
83
+ actions?: CardData['actions'];
84
+ }): CardData;
85
+ /**
86
+ * Table helper options
87
+ */
88
+ export interface TableHelperOptions {
89
+ title?: string;
90
+ description?: string;
91
+ layout?: 'inline' | 'artifact';
92
+ sortable?: boolean;
93
+ filterable?: boolean;
94
+ pagination?: {
95
+ pageSize?: number;
96
+ pageSizeOptions?: number[];
97
+ };
98
+ density?: 'comfortable' | 'compact';
99
+ }
100
+ /**
101
+ * Create a table specification
102
+ */
103
+ export declare function createTable(data: Record<string, any>[], columns: TableColumn[], options?: TableHelperOptions): TableComponentSpec;
104
+ /**
105
+ * Create a table column definition
106
+ */
107
+ export declare function createColumn(key: string, header: string, options?: {
108
+ width?: number | string;
109
+ sortable?: boolean;
110
+ cellType?: 'text' | 'number' | 'date' | 'badge' | 'link';
111
+ format?: TableColumn['format'];
112
+ }): TableColumn;
113
+ /**
114
+ * Create a markdown specification
115
+ */
116
+ export declare function createMarkdown(content: string, options?: {
117
+ title?: string;
118
+ description?: string;
119
+ layout?: 'inline' | 'artifact';
120
+ syntaxHighlight?: boolean;
121
+ }): MarkdownComponentSpec;
122
+ /**
123
+ * Create an artifact container with multiple child components
124
+ */
125
+ export declare function createArtifact(content: UIComponentSpec[], options?: {
126
+ title?: string;
127
+ description?: string;
128
+ variant?: 'default' | 'bordered' | 'elevated';
129
+ }): ArtifactComponentSpec;
130
+ /**
131
+ * Smart chart creator - automatically chooses the best chart type based on data
132
+ */
133
+ export declare function createSmartChart(data: any[], options?: {
134
+ title?: string;
135
+ description?: string;
136
+ layout?: 'inline' | 'artifact';
137
+ xKey?: string;
138
+ yKeys?: string[];
139
+ preferredType?: 'bar' | 'line' | 'area' | 'pie';
140
+ }): ChartComponentSpec;
141
+ /**
142
+ * Wrap data and UI into a ToolHandlerResult
143
+ */
144
+ export declare function createToolResult(data: any, ui: UIComponentSpec): ToolHandlerResult;
145
+ /**
146
+ * Quick helper: create a tool result with a bar chart
147
+ */
148
+ export declare function resultWithBarChart(data: any[], xKey: string, bars: Array<{
149
+ key: string;
150
+ label?: string;
151
+ color?: string;
152
+ }>, options?: ChartHelperOptions): ToolHandlerResult;
153
+ /**
154
+ * Quick helper: create a tool result with a smart chart
155
+ */
156
+ export declare function resultWithSmartChart(data: any[], options?: Parameters<typeof createSmartChart>[1]): ToolHandlerResult;
157
+ /**
158
+ * Quick helper: create a tool result with a card grid
159
+ */
160
+ export declare function resultWithCardGrid(cards: CardData[], options?: CardGridHelperOptions): ToolHandlerResult;
161
+ /**
162
+ * Quick helper: create a tool result with a table
163
+ */
164
+ export declare function resultWithTable(data: Record<string, any>[], columns: TableColumn[], options?: TableHelperOptions): ToolHandlerResult;
165
+ //#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AAoB,CAClC,IAAI,EAAE,GAAG,EAAE,EACX,OAAO,CAAC,EAAE,UAAU,CAAC,OAAO,gBAAgB,CAAC,CAAC,CAAC,CAAC,GAC/C,iBAAiB,CAEnB;AAED;;GAEG;AACH,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,QAAQ,EAAE,EACjB,OAAO,CAAC,EAAE,qBAAqB,GAC9B,iBAAiB,CAEnB;AAED;;GAEG;AACH,wBAAgB,eAAe,CAC7B,IAAI,EAAE,MAAM,CAAC,MAAM,EAAE,GAAG,CAAC,EAAE,EAC3B,OAAO,EAAE,WAAW,EAAE,EACtB,OAAO,CAAC,EAAE,kBAAkB,GAC3B,iBAAiB,CAEnB"}
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@rodrigocoliveira/agno-react",
3
- "version": "1.0.1",
4
- "description": "React hooks for Agno client with frontend tool execution (HITL) support",
3
+ "version": "1.0.3",
4
+ "description": "React hooks and pre-built UI components for Agno client",
5
5
  "author": "rodrigocoliveira",
6
6
  "license": "MIT",
7
7
  "repository": {
@@ -17,38 +17,143 @@
17
17
  "hooks",
18
18
  "hitl",
19
19
  "tool-execution",
20
- "streaming"
20
+ "streaming",
21
+ "chat-ui",
22
+ "components"
21
23
  ],
22
24
  "main": "./dist/index.js",
23
25
  "module": "./dist/index.mjs",
24
26
  "types": "./dist/index.d.ts",
25
27
  "exports": {
26
28
  ".": {
29
+ "types": "./dist/index.d.ts",
27
30
  "import": "./dist/index.mjs",
28
- "require": "./dist/index.js",
29
- "types": "./dist/index.d.ts"
31
+ "require": "./dist/index.js"
32
+ },
33
+ "./ui": {
34
+ "types": "./dist/ui.d.ts",
35
+ "import": "./dist/ui.mjs",
36
+ "require": "./dist/ui.js"
30
37
  }
31
38
  },
32
39
  "files": [
33
40
  "dist",
34
41
  "README.md"
35
42
  ],
43
+ "scripts": {
44
+ "build": "bun run build.ts",
45
+ "dev": "bun build src/index.ts src/ui.ts --outdir dist --format esm --packages external --entry-naming '[name].mjs' --watch",
46
+ "typecheck": "tsc --noEmit"
47
+ },
36
48
  "dependencies": {
37
- "@rodrigocoliveira/agno-types": "1.0.1",
38
- "@rodrigocoliveira/agno-client": "1.0.1"
49
+ "@rodrigocoliveira/agno-client": "workspace:*",
50
+ "@rodrigocoliveira/agno-types": "workspace:*"
51
+ },
52
+ "typesVersions": {
53
+ "*": {
54
+ "ui": [
55
+ "./dist/ui.d.ts"
56
+ ]
57
+ }
39
58
  },
40
59
  "peerDependencies": {
41
- "react": "^18.0.0 || ^19.0.0"
60
+ "@radix-ui/react-accordion": "^1.0.0 || ^2.0.0",
61
+ "@radix-ui/react-avatar": "^1.0.0 || ^2.0.0",
62
+ "@radix-ui/react-collapsible": "^1.0.0 || ^2.0.0",
63
+ "@radix-ui/react-dialog": "^1.0.0 || ^2.0.0",
64
+ "@radix-ui/react-dropdown-menu": "^2.0.0",
65
+ "@radix-ui/react-hover-card": "^1.0.0 || ^2.0.0",
66
+ "@radix-ui/react-select": "^2.0.0",
67
+ "@radix-ui/react-slot": "^1.0.0 || ^2.0.0",
68
+ "@radix-ui/react-tooltip": "^1.0.0 || ^2.0.0",
69
+ "class-variance-authority": "^0.7.0",
70
+ "clsx": "^2.0.0",
71
+ "cmdk": "^1.0.0",
72
+ "lucide-react": "^0.400.0 || ^0.500.0",
73
+ "react": "^18.0.0 || ^19.0.0",
74
+ "react-dom": "^18.0.0 || ^19.0.0",
75
+ "shiki": "^1.0.0 || ^2.0.0 || ^3.0.0",
76
+ "streamdown": "^2.0.0",
77
+ "tailwind-merge": "^2.0.0 || ^3.0.0",
78
+ "use-stick-to-bottom": "^1.0.0"
79
+ },
80
+ "peerDependenciesMeta": {
81
+ "react-dom": {
82
+ "optional": false
83
+ },
84
+ "@radix-ui/react-accordion": {
85
+ "optional": true
86
+ },
87
+ "@radix-ui/react-avatar": {
88
+ "optional": true
89
+ },
90
+ "@radix-ui/react-collapsible": {
91
+ "optional": true
92
+ },
93
+ "@radix-ui/react-dialog": {
94
+ "optional": true
95
+ },
96
+ "@radix-ui/react-dropdown-menu": {
97
+ "optional": true
98
+ },
99
+ "@radix-ui/react-hover-card": {
100
+ "optional": true
101
+ },
102
+ "@radix-ui/react-select": {
103
+ "optional": true
104
+ },
105
+ "@radix-ui/react-slot": {
106
+ "optional": true
107
+ },
108
+ "@radix-ui/react-tooltip": {
109
+ "optional": true
110
+ },
111
+ "class-variance-authority": {
112
+ "optional": true
113
+ },
114
+ "clsx": {
115
+ "optional": true
116
+ },
117
+ "tailwind-merge": {
118
+ "optional": true
119
+ },
120
+ "lucide-react": {
121
+ "optional": true
122
+ },
123
+ "shiki": {
124
+ "optional": true
125
+ },
126
+ "streamdown": {
127
+ "optional": true
128
+ },
129
+ "use-stick-to-bottom": {
130
+ "optional": true
131
+ },
132
+ "cmdk": {
133
+ "optional": true
134
+ }
42
135
  },
43
136
  "devDependencies": {
44
- "@types/react": "^18.3.3",
137
+ "@radix-ui/react-accordion": "^1.2.12",
138
+ "@radix-ui/react-avatar": "^1.1.11",
139
+ "@radix-ui/react-collapsible": "^1.1.12",
140
+ "@radix-ui/react-dialog": "^1.1.15",
141
+ "@radix-ui/react-dropdown-menu": "^2.1.16",
142
+ "@radix-ui/react-hover-card": "^1.1.15",
143
+ "@radix-ui/react-select": "^2.2.6",
144
+ "@radix-ui/react-slot": "^1.2.4",
145
+ "@radix-ui/react-tooltip": "^1.2.8",
146
+ "@types/react": "^18.3.3 || ^19.0.0",
147
+ "@types/react-dom": "^18.3.7",
148
+ "class-variance-authority": "^0.7.1",
149
+ "clsx": "^2.1.1",
150
+ "cmdk": "^1.1.1",
151
+ "lucide-react": "^0.563.0",
45
152
  "react": "^19.2.1",
46
- "tsup": "^8.0.1",
47
- "typescript": "^5.3.3"
48
- },
49
- "scripts": {
50
- "build": "tsup src/index.ts --format cjs,esm --dts --external react",
51
- "dev": "tsup src/index.ts --format cjs,esm --dts --external react --watch",
52
- "typecheck": "tsc --noEmit"
153
+ "shiki": "^3.2.1",
154
+ "streamdown": "^2.2.0",
155
+ "tailwind-merge": "^3.0.2",
156
+ "typescript": "^5.3.3",
157
+ "use-stick-to-bottom": "^1.1.3"
53
158
  }
54
- }
159
+ }
package/LICENSE DELETED
@@ -1,21 +0,0 @@
1
- MIT License
2
-
3
- Copyright (c) 2025 rodrigocoliveira
4
-
5
- Permission is hereby granted, free of charge, to any person obtaining a copy
6
- of this software and associated documentation files (the "Software"), to deal
7
- in the Software without restriction, including without limitation the rights
8
- to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
- copies of the Software, and to permit persons to whom the Software is
10
- furnished to do so, subject to the following conditions:
11
-
12
- The above copyright notice and this permission notice shall be included in all
13
- copies or substantial portions of the Software.
14
-
15
- THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
- IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
- FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
- AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
- LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
- OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
- SOFTWARE.