@chatsdk-dev/elements 0.0.1

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 (218) hide show
  1. package/README.md +43 -0
  2. package/dist/chunk-2LHKM7RD.js +14 -0
  3. package/dist/chunk-5UMYP6MD.js +10 -0
  4. package/dist/chunk-AP4MG32M.js +36 -0
  5. package/dist/chunk-CFM57HOS.js +358 -0
  6. package/dist/chunk-EGIUE7H2.js +37 -0
  7. package/dist/chunk-M5OONVIO.js +90 -0
  8. package/dist/chunk-MXTBCHYC.js +31 -0
  9. package/dist/chunk-NIC3MOMY.js +55 -0
  10. package/dist/chunk-QTRMNIG3.js +83 -0
  11. package/dist/chunk-R7G3RQLU.js +36 -0
  12. package/dist/chunk-RJG5D2TM.js +113 -0
  13. package/dist/chunk-SLJNKQ2G.js +125 -0
  14. package/dist/chunk-TDEFIW2L.js +9 -0
  15. package/dist/chunk-TDP6D7U7.js +551 -0
  16. package/dist/chunk-V2ITXC65.js +24 -0
  17. package/dist/chunk-VS55HRUS.js +16 -0
  18. package/dist/chunk-VYDYCGJL.js +25 -0
  19. package/dist/chunk-X5YUF2YM.js +113 -0
  20. package/dist/chunk-YX46JVQN.js +78 -0
  21. package/dist/chunk-YXAMLTTT.js +16 -0
  22. package/dist/chunk-YXFVHSY4.js +51 -0
  23. package/dist/chunk-ZCSZX3OI.js +4 -0
  24. package/dist/common/use-copy-to-clipboard.d.ts +3 -0
  25. package/dist/common/use-copy-to-clipboard.js +33 -0
  26. package/dist/common/utilts.d.ts +8 -0
  27. package/dist/common/utilts.js +28 -0
  28. package/dist/components/ai-elements/actions.d.ts +13 -0
  29. package/dist/components/ai-elements/actions.js +42 -0
  30. package/dist/components/ai-elements/agent.d.ts +31 -0
  31. package/dist/components/ai-elements/agent.js +77 -0
  32. package/dist/components/ai-elements/artifact.d.ts +27 -0
  33. package/dist/components/ai-elements/artifact.js +108 -0
  34. package/dist/components/ai-elements/attachments.d.ts +57 -0
  35. package/dist/components/ai-elements/attachments.js +258 -0
  36. package/dist/components/ai-elements/audio-player.d.ts +33 -0
  37. package/dist/components/ai-elements/audio-player.js +199 -0
  38. package/dist/components/ai-elements/canvas.d.ts +10 -0
  39. package/dist/components/ai-elements/canvas.js +24 -0
  40. package/dist/components/ai-elements/chain-of-thought.d.ts +34 -0
  41. package/dist/components/ai-elements/chain-of-thought.js +159 -0
  42. package/dist/components/ai-elements/checkpoint.d.ts +16 -0
  43. package/dist/components/ai-elements/checkpoint.js +47 -0
  44. package/dist/components/ai-elements/code-block.d.ts +48 -0
  45. package/dist/components/ai-elements/code-block.js +1 -0
  46. package/dist/components/ai-elements/commit.d.ts +68 -0
  47. package/dist/components/ai-elements/commit.js +314 -0
  48. package/dist/components/ai-elements/confirmation.d.ts +52 -0
  49. package/dist/components/ai-elements/confirmation.js +76 -0
  50. package/dist/components/ai-elements/connection.d.ts +5 -0
  51. package/dist/components/ai-elements/connection.js +34 -0
  52. package/dist/components/ai-elements/context.d.ts +36 -0
  53. package/dist/components/ai-elements/context.js +320 -0
  54. package/dist/components/ai-elements/controls.d.ts +8 -0
  55. package/dist/components/ai-elements/controls.js +17 -0
  56. package/dist/components/ai-elements/conversation.d.ts +27 -0
  57. package/dist/components/ai-elements/conversation.js +119 -0
  58. package/dist/components/ai-elements/edge.d.ts +9 -0
  59. package/dist/components/ai-elements/edge.js +111 -0
  60. package/dist/components/ai-elements/environment-variables.d.ts +42 -0
  61. package/dist/components/ai-elements/environment-variables.js +208 -0
  62. package/dist/components/ai-elements/file-tree.d.ts +30 -0
  63. package/dist/components/ai-elements/file-tree.js +212 -0
  64. package/dist/components/ai-elements/image.d.ts +10 -0
  65. package/dist/components/ai-elements/image.js +23 -0
  66. package/dist/components/ai-elements/inline-citation.d.ts +42 -0
  67. package/dist/components/ai-elements/inline-citation.js +203 -0
  68. package/dist/components/ai-elements/jsx-preview.d.ts +33 -0
  69. package/dist/components/ai-elements/jsx-preview.js +206 -0
  70. package/dist/components/ai-elements/loader.d.ts +9 -0
  71. package/dist/components/ai-elements/loader.js +115 -0
  72. package/dist/components/ai-elements/message.d.ts +42 -0
  73. package/dist/components/ai-elements/message.js +259 -0
  74. package/dist/components/ai-elements/mic-selector.d.ts +49 -0
  75. package/dist/components/ai-elements/mic-selector.js +252 -0
  76. package/dist/components/ai-elements/model-selector.d.ts +39 -0
  77. package/dist/components/ai-elements/model-selector.js +73 -0
  78. package/dist/components/ai-elements/node.d.ts +25 -0
  79. package/dist/components/ai-elements/node.js +41 -0
  80. package/dist/components/ai-elements/open-in-chat.d.ts +32 -0
  81. package/dist/components/ai-elements/open-in-chat.js +366 -0
  82. package/dist/components/ai-elements/package-info.d.ts +32 -0
  83. package/dist/components/ai-elements/package-info.js +162 -0
  84. package/dist/components/ai-elements/panel.d.ts +8 -0
  85. package/dist/components/ai-elements/panel.js +17 -0
  86. package/dist/components/ai-elements/persona.d.ts +50 -0
  87. package/dist/components/ai-elements/persona.js +209 -0
  88. package/dist/components/ai-elements/plan.d.ts +29 -0
  89. package/dist/components/ai-elements/plan.js +95 -0
  90. package/dist/components/ai-elements/prompt-input.d.ts +153 -0
  91. package/dist/components/ai-elements/prompt-input.js +939 -0
  92. package/dist/components/ai-elements/queue.d.ts +65 -0
  93. package/dist/components/ai-elements/queue.js +179 -0
  94. package/dist/components/ai-elements/reasoning.d.ts +30 -0
  95. package/dist/components/ai-elements/reasoning.js +161 -0
  96. package/dist/components/ai-elements/response.d.ts +9 -0
  97. package/dist/components/ai-elements/response.js +33 -0
  98. package/dist/components/ai-elements/sandbox.d.ts +28 -0
  99. package/dist/components/ai-elements/sandbox.js +98 -0
  100. package/dist/components/ai-elements/schema-display.d.ts +58 -0
  101. package/dist/components/ai-elements/schema-display.js +313 -0
  102. package/dist/components/ai-elements/shimmer.d.ts +14 -0
  103. package/dist/components/ai-elements/shimmer.js +1 -0
  104. package/dist/components/ai-elements/snippet.d.ts +22 -0
  105. package/dist/components/ai-elements/snippet.js +90 -0
  106. package/dist/components/ai-elements/sources.d.ts +16 -0
  107. package/dist/components/ai-elements/sources.js +62 -0
  108. package/dist/components/ai-elements/speech-input.d.ts +57 -0
  109. package/dist/components/ai-elements/speech-input.js +206 -0
  110. package/dist/components/ai-elements/stack-trace.d.ts +42 -0
  111. package/dist/components/ai-elements/stack-trace.js +377 -0
  112. package/dist/components/ai-elements/suggestion.d.ts +14 -0
  113. package/dist/components/ai-elements/suggestion.js +41 -0
  114. package/dist/components/ai-elements/task.d.ts +18 -0
  115. package/dist/components/ai-elements/task.js +60 -0
  116. package/dist/components/ai-elements/terminal.d.ts +31 -0
  117. package/dist/components/ai-elements/terminal.js +203 -0
  118. package/dist/components/ai-elements/test-results.d.ts +61 -0
  119. package/dist/components/ai-elements/test-results.js +349 -0
  120. package/dist/components/ai-elements/tool.d.ts +35 -0
  121. package/dist/components/ai-elements/tool.js +2 -0
  122. package/dist/components/ai-elements/toolbar.d.ts +8 -0
  123. package/dist/components/ai-elements/toolbar.js +18 -0
  124. package/dist/components/ai-elements/transcription.d.ts +19 -0
  125. package/dist/components/ai-elements/transcription.js +90 -0
  126. package/dist/components/ai-elements/voice-selector.d.ts +66 -0
  127. package/dist/components/ai-elements/voice-selector.js +332 -0
  128. package/dist/components/ai-elements/web-preview.d.ts +38 -0
  129. package/dist/components/ai-elements/web-preview.js +214 -0
  130. package/dist/components/info-card.d.ts +14 -0
  131. package/dist/components/info-card.js +1 -0
  132. package/dist/components/responsive-alert-dialog.d.ts +19 -0
  133. package/dist/components/responsive-alert-dialog.js +1 -0
  134. package/dist/components/responsive-dialog.d.ts +14 -0
  135. package/dist/components/responsive-dialog.js +1 -0
  136. package/dist/config-IcWUmjwj.d.ts +239 -0
  137. package/dist/features/chat/chat-card.d.ts +5 -0
  138. package/dist/features/chat/chat-card.js +14 -0
  139. package/dist/features/chat/chat-element/chat-element.d.ts +8 -0
  140. package/dist/features/chat/chat-element/chat-element.js +14 -0
  141. package/dist/features/chat/chat-element/use-chat.d.ts +21 -0
  142. package/dist/features/chat/chat-element/use-chat.js +14 -0
  143. package/dist/features/chat/chat-element/use-initial-messages.d.ts +20 -0
  144. package/dist/features/chat/chat-element/use-initial-messages.js +14 -0
  145. package/dist/features/chat/chat-header/chat-header.d.ts +8 -0
  146. package/dist/features/chat/chat-header/chat-header.js +14 -0
  147. package/dist/features/chat/chat-header/chat-menu.d.ts +5 -0
  148. package/dist/features/chat/chat-header/chat-menu.js +2 -0
  149. package/dist/features/chat/chat-history/chat-history-empty.d.ts +5 -0
  150. package/dist/features/chat/chat-history/chat-history-empty.js +1 -0
  151. package/dist/features/chat/chat-history/chat-history.d.ts +5 -0
  152. package/dist/features/chat/chat-history/chat-history.js +14 -0
  153. package/dist/features/chat/chat-message.d.ts +10 -0
  154. package/dist/features/chat/chat-message.js +1 -0
  155. package/dist/features/chat/chat-molecule.d.ts +35 -0
  156. package/dist/features/chat/chat-molecule.js +14 -0
  157. package/dist/features/chat/chat-prompt-input.d.ts +16 -0
  158. package/dist/features/chat/chat-prompt-input.js +14 -0
  159. package/dist/features/chat/chat.context.d.ts +26 -0
  160. package/dist/features/chat/chat.context.js +13 -0
  161. package/dist/features/chat/index.d.ts +14 -0
  162. package/dist/features/chat/index.js +14 -0
  163. package/dist/features/chat/queries/query-keys.d.ts +8 -0
  164. package/dist/features/chat/queries/query-keys.js +1 -0
  165. package/dist/features/chat/queries/use-create-conversation-mutation.d.ts +29 -0
  166. package/dist/features/chat/queries/use-create-conversation-mutation.js +38 -0
  167. package/dist/features/chat/queries/use-get-chat-query.d.ts +9 -0
  168. package/dist/features/chat/queries/use-get-chat-query.js +14 -0
  169. package/dist/features/chat/queries/use-get-conversation-query.d.ts +62 -0
  170. package/dist/features/chat/queries/use-get-conversation-query.js +14 -0
  171. package/dist/features/chat/queries/use-list-conversations-query.d.ts +29 -0
  172. package/dist/features/chat/queries/use-list-conversations-query.js +14 -0
  173. package/dist/features/chat/store.d.ts +13 -0
  174. package/dist/features/chat/store.js +1 -0
  175. package/dist/features/chat/utils.d.ts +5 -0
  176. package/dist/features/chat/utils.js +1 -0
  177. package/dist/features/data-fetching/use-api-client.d.ts +5 -0
  178. package/dist/features/data-fetching/use-api-client.js +14 -0
  179. package/dist/features/logger/logger.d.ts +9 -0
  180. package/dist/features/logger/logger.js +1 -0
  181. package/dist/features/molecule/chatsdk-provider.d.ts +19 -0
  182. package/dist/features/molecule/chatsdk-provider.js +26 -0
  183. package/dist/features/molecule/constants.d.ts +3 -0
  184. package/dist/features/molecule/constants.js +1 -0
  185. package/dist/features/molecule/molecule-provider.d.ts +39 -0
  186. package/dist/features/molecule/molecule-provider.js +1 -0
  187. package/dist/features/molecule/store.d.ts +53 -0
  188. package/dist/features/molecule/store.js +3 -0
  189. package/dist/features/molecule/types/api.d.ts +8 -0
  190. package/dist/features/molecule/types/api.js +1 -0
  191. package/dist/features/molecule/types/callbacks.d.ts +22 -0
  192. package/dist/features/molecule/types/callbacks.js +1 -0
  193. package/dist/features/molecule/types/config.d.ts +10 -0
  194. package/dist/features/molecule/types/config.js +1 -0
  195. package/dist/features/molecule/types/context.d.ts +11 -0
  196. package/dist/features/molecule/types/context.js +1 -0
  197. package/dist/features/molecule/types/locale.d.ts +9 -0
  198. package/dist/features/molecule/types/locale.js +1 -0
  199. package/dist/features/molecule/types/theme.d.ts +38 -0
  200. package/dist/features/molecule/types/theme.js +1 -0
  201. package/dist/features/molecule/types/translations.d.ts +10 -0
  202. package/dist/features/molecule/types/translations.js +1 -0
  203. package/dist/features/molecule/use-merge-global-config.d.ts +22 -0
  204. package/dist/features/molecule/use-merge-global-config.js +5 -0
  205. package/dist/features/molecule/use-molecule-config.d.ts +41 -0
  206. package/dist/features/molecule/use-molecule-config.js +6 -0
  207. package/dist/features/molecule/utils.d.ts +10 -0
  208. package/dist/features/molecule/utils.js +1 -0
  209. package/dist/i18n/config.d.ts +61 -0
  210. package/dist/i18n/config.js +1 -0
  211. package/dist/i18n/i18next.d.ts +11 -0
  212. package/dist/i18n/i18next.js +2 -0
  213. package/dist/i18n/utils.d.ts +11 -0
  214. package/dist/i18n/utils.js +6 -0
  215. package/dist/index.d.ts +20 -0
  216. package/dist/index.js +20 -0
  217. package/dist/styles.css +6811 -0
  218. package/package.json +123 -0
@@ -0,0 +1,239 @@
1
+ import { LoggerInput } from './features/logger/logger.js';
2
+ import { APIOptions } from './features/molecule/types/api.js';
3
+ import { Callbacks } from './features/molecule/types/callbacks.js';
4
+ import { Context } from './features/molecule/types/context.js';
5
+ import { LocaleConfig } from './features/molecule/types/locale.js';
6
+ import { ThemeConfig } from './features/molecule/types/theme.js';
7
+ import { Locale, Resource } from '@chatsdk-dev/elements/i18n/config';
8
+
9
+ interface SerializerOptions<T> {
10
+ /**
11
+ * @default true
12
+ */
13
+ explode: boolean;
14
+ style: T;
15
+ }
16
+ type ArrayStyle = 'form' | 'spaceDelimited' | 'pipeDelimited';
17
+ type ObjectStyle = 'form' | 'deepObject';
18
+
19
+ type QuerySerializer = (query: Record<string, unknown>) => string;
20
+ type BodySerializer = (body: unknown) => unknown;
21
+ type QuerySerializerOptionsObject = {
22
+ allowReserved?: boolean;
23
+ array?: Partial<SerializerOptions<ArrayStyle>>;
24
+ object?: Partial<SerializerOptions<ObjectStyle>>;
25
+ };
26
+ type QuerySerializerOptions = QuerySerializerOptionsObject & {
27
+ /**
28
+ * Per-parameter serialization overrides. When provided, these settings
29
+ * override the global array/object settings for specific parameter names.
30
+ */
31
+ parameters?: Record<string, QuerySerializerOptionsObject>;
32
+ };
33
+
34
+ type AuthToken = string | undefined;
35
+ interface Auth {
36
+ /**
37
+ * Which part of the request do we use to send the auth?
38
+ *
39
+ * @default 'header'
40
+ */
41
+ in?: 'header' | 'query' | 'cookie';
42
+ /**
43
+ * Header or query parameter name.
44
+ *
45
+ * @default 'Authorization'
46
+ */
47
+ name?: string;
48
+ scheme?: 'basic' | 'bearer';
49
+ type: 'apiKey' | 'http';
50
+ }
51
+
52
+ type HttpMethod = 'connect' | 'delete' | 'get' | 'head' | 'options' | 'patch' | 'post' | 'put' | 'trace';
53
+
54
+ type ResponseStyle = 'data' | 'fields';
55
+
56
+ type DeepPartial<T> = {
57
+ [P in keyof T]?: T[P] extends object ? DeepPartial<T[P]> : T[P];
58
+ };
59
+ declare function deepMerge<T extends Record<string, any>>(target: T, ...sources: DeepPartial<T>[]): T;
60
+ declare function mergeObjectsOneLevel<T extends object>(a: Partial<T> | undefined, b: Partial<T> | undefined): Partial<T> | undefined;
61
+ declare function mergeFont(...fontConfigurations: Partial<ThemeConfig["font"]>[]): ThemeConfig["font"] | undefined;
62
+ declare function mergeTheme(...args: (RootConfig["theme"] | null)[]): RootConfig["theme"];
63
+ declare function mergeContext(globalContext: Context | undefined, context: Context | undefined): {
64
+ tenant?: {
65
+ id?: string;
66
+ traits?: Record<string, boolean>;
67
+ };
68
+ actor?: {
69
+ id?: string;
70
+ };
71
+ };
72
+ declare function mergeLocale(globalLocale: RootConfig["locale"] | undefined, locale: RootConfig["locale"] | undefined): LocaleConfig | undefined;
73
+ declare function mergeTranslations(...args: (TranslationsConfig | undefined)[]): TranslationsConfig | undefined;
74
+ declare function mergeApi(globalApi: RootConfig["api"] | undefined, api: RootConfig["api"] | undefined): {
75
+ cache?: RequestCache;
76
+ method?: Uppercase<HttpMethod>;
77
+ credentials?: RequestCredentials;
78
+ integrity?: string;
79
+ keepalive?: boolean;
80
+ mode?: RequestMode;
81
+ priority?: RequestPriority;
82
+ redirect?: RequestRedirect;
83
+ referrer?: string;
84
+ referrerPolicy?: ReferrerPolicy;
85
+ signal?: AbortSignal | null;
86
+ window?: null;
87
+ responseTransformer?: (data: unknown) => Promise<unknown>;
88
+ responseValidator?: (data: unknown) => Promise<unknown>;
89
+ auth?: ((auth: Auth) => Promise<AuthToken> | AuthToken) | AuthToken;
90
+ bodySerializer?: BodySerializer | null;
91
+ querySerializer?: QuerySerializer | QuerySerializerOptions;
92
+ requestValidator?: (data: unknown) => Promise<unknown>;
93
+ fetch?: typeof fetch;
94
+ baseUrl?: string | undefined;
95
+ parseAs?: "arrayBuffer" | "auto" | "blob" | "formData" | "json" | "stream" | "text";
96
+ next?: never;
97
+ responseStyle?: ResponseStyle;
98
+ throwOnError?: boolean | undefined;
99
+ version?: "internal" | "v1";
100
+ headers?: Record<string, string>;
101
+ body?: BodyInit | null;
102
+ };
103
+ declare function mergeLogger(globalLogger: RootConfig["logger"] | undefined, logger: RootConfig["logger"] | undefined): LoggerInput | ((message: string) => void) | undefined;
104
+ declare function mergeConfigs(...args: Partial<RootConfig>[]): Partial<RootConfig>;
105
+
106
+ type TranslationsConfig = DeepPartial<Record<Locale, Resource>>;
107
+
108
+ type OptionsConfig = Record<string, object>;
109
+ interface RootConfig {
110
+ /**
111
+ * Context configuration containing reference and other context-specific settings
112
+ * @type Context
113
+ * @category Configuration
114
+ * @details interface Context {
115
+ * tenant?: {
116
+ * id: string;
117
+ * traits?: Record<string, boolean>
118
+ * }
119
+ * user?: {
120
+ * id: string;
121
+ * }
122
+ * }
123
+ */
124
+ context?: Context;
125
+ /**
126
+ * Theme configuration for styling and layout
127
+ * @type ThemeConfig
128
+ * @category Configuration
129
+ * @details interface ThemeConfig {
130
+ * colorScheme: ColorScheme;
131
+ * font: {
132
+ * body: FontConfig;
133
+ * heading: FontConfig;
134
+ * variants: Record<string, FontConfig>;
135
+ * };
136
+ * defaultRadius: Radius;
137
+ * defaultShadow: Size;
138
+ * components?: ConfigComponents;
139
+ *
140
+ *
141
+ * primary: string;
142
+ * ... see shared-styles.css for all variables
143
+ *
144
+ */
145
+ theme?: Partial<ThemeConfig>;
146
+ /**
147
+ * API configuration including version, base URL, credentials, and headers
148
+ * @type APIOptions
149
+ * @category Configuration
150
+ * @details interface APIOptions {
151
+ * base?: string;
152
+ * version?: 'internal' | 'v1';
153
+ * body?: any;
154
+ * credentials?: 'include' | 'same-origin' | 'omit';
155
+ * headers?: Record<string, string>;
156
+ * integrity?: string;
157
+ * keepalive?: boolean;
158
+ * method?: string;
159
+ * mode?: 'cors' | 'no-cors' | 'same-origin' | 'navigate';
160
+ * referrer?: string;
161
+ * window?: any;
162
+ * signal?: any;
163
+ * }
164
+ */
165
+ api?: APIOptions;
166
+ /**
167
+ * Locale configuration for language and currency settings
168
+ * @type LocaleConfig
169
+ * @category Configuration
170
+ * @details type LocaleConfig =
171
+ * | Language
172
+ * | { language: Langugae; formality?: Formality };
173
+ */
174
+ locale?: LocaleConfig;
175
+ /**
176
+ * Custom translations object for overriding default text strings
177
+ * @type Translations
178
+ * @category Configuration
179
+ * @details interface Translations {
180
+ * en: {
181
+ * chat:{
182
+ * initialPrompt: string;
183
+ * }
184
+ * ...
185
+ * };
186
+ * }
187
+ */
188
+ translations?: TranslationsConfig;
189
+ /**
190
+ * Logger callback for logging messages, if provided partially, will reuse from most specific (error) to least specific (info)
191
+ * @type Logger
192
+ * @category Configuration
193
+ * @details interface Logger {
194
+ * info?: (message: string) => void;
195
+ * warn?: (message: string) => void;
196
+ * error?: (message: string) => void;
197
+ * } | (message: string) => void
198
+ */
199
+ logger?: LoggerInput["info"] | LoggerInput;
200
+ /**
201
+ * Options configuration for the component
202
+ * @type OptionsConfig
203
+ * @category Configuration
204
+ * @details type OptionsConfig = Record<string, any>;
205
+ */
206
+ options?: OptionsConfig;
207
+ }
208
+ type MoleculeConfig<T extends object, CallbackDataType = unknown> = T & {
209
+ component?: T & {
210
+ defaultProps?: T;
211
+ };
212
+ /**
213
+ * Default props for the component, will be merged with the component props and the global component props
214
+ * Merge order for props resolution from highest to lowest precedence:
215
+ * 1. passed `props`
216
+ * 2. config level `defaultProps`
217
+ * 3. passed `defaultProps`
218
+ * 4. hard coded defaultProps
219
+ * Keep in mind, merges are shallow!
220
+ *
221
+ * @type T
222
+ */
223
+ defaultProps?: T;
224
+ /** Configuration object to merge and override with global configuration, can be partially overriden by flattened configs (theme, api, locale, etc)
225
+ * @category Configuration
226
+ * @type Config
227
+ * @details interface RootConfig {
228
+ * context?: Context;
229
+ * theme?: ThemeConfig;
230
+ * api?: APIOptions;
231
+ * locale?: LocaleConfig;
232
+ * translations?: TranslationsConfig;
233
+ * logger?: LoggerInput['info'] | LoggerInput;
234
+ * }
235
+ */
236
+ config?: Partial<RootConfig>;
237
+ } & Callbacks<CallbackDataType>;
238
+
239
+ export { type DeepPartial as D, type MoleculeConfig as M, type OptionsConfig as O, type RootConfig as R, type TranslationsConfig as T, mergeConfigs as a, mergeContext as b, mergeFont as c, deepMerge as d, mergeLocale as e, mergeLogger as f, mergeObjectsOneLevel as g, mergeTheme as h, mergeTranslations as i, mergeApi as m };
@@ -0,0 +1,5 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function ChatCard(): react_jsx_runtime.JSX.Element | null;
4
+
5
+ export { ChatCard };
@@ -0,0 +1,14 @@
1
+ export { ChatCard } from '../../chunk-TDP6D7U7.js';
2
+ import '../../chunk-AP4MG32M.js';
3
+ import '../../chunk-YXAMLTTT.js';
4
+ import '../../chunk-TDEFIW2L.js';
5
+ import '../../chunk-M5OONVIO.js';
6
+ import '../../chunk-VYDYCGJL.js';
7
+ import '../../chunk-MXTBCHYC.js';
8
+ import '../../chunk-2LHKM7RD.js';
9
+ import '../../chunk-5UMYP6MD.js';
10
+ import '../../chunk-VS55HRUS.js';
11
+ import '../../chunk-YX46JVQN.js';
12
+ import '../../chunk-RJG5D2TM.js';
13
+ import '../../chunk-ZCSZX3OI.js';
14
+ import '../../chunk-SLJNKQ2G.js';
@@ -0,0 +1,8 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function ChatElement(): react_jsx_runtime.JSX.Element;
4
+ declare namespace ChatElement {
5
+ var displayName: string;
6
+ }
7
+
8
+ export { ChatElement };
@@ -0,0 +1,14 @@
1
+ export { ChatElement } from '../../../chunk-TDP6D7U7.js';
2
+ import '../../../chunk-AP4MG32M.js';
3
+ import '../../../chunk-YXAMLTTT.js';
4
+ import '../../../chunk-TDEFIW2L.js';
5
+ import '../../../chunk-M5OONVIO.js';
6
+ import '../../../chunk-VYDYCGJL.js';
7
+ import '../../../chunk-MXTBCHYC.js';
8
+ import '../../../chunk-2LHKM7RD.js';
9
+ import '../../../chunk-5UMYP6MD.js';
10
+ import '../../../chunk-VS55HRUS.js';
11
+ import '../../../chunk-YX46JVQN.js';
12
+ import '../../../chunk-RJG5D2TM.js';
13
+ import '../../../chunk-ZCSZX3OI.js';
14
+ import '../../../chunk-SLJNKQ2G.js';
@@ -0,0 +1,21 @@
1
+ import * as _ai_sdk_react from '@ai-sdk/react';
2
+ import * as ai from 'ai';
3
+
4
+ declare function useChat(): _ai_sdk_react.UseChatHelpers<ai.UIMessage<unknown, ai.UIDataTypes, ai.UITools> | {
5
+ id: string;
6
+ role: "user" | "assistant" | "system";
7
+ parts: {
8
+ type: "text";
9
+ text: string;
10
+ }[];
11
+ metadata: {
12
+ id: string;
13
+ role: "user" | "assistant" | "system";
14
+ parts: Array<{
15
+ type: "text";
16
+ text: string;
17
+ }>;
18
+ };
19
+ }>;
20
+
21
+ export { useChat };
@@ -0,0 +1,14 @@
1
+ export { useChat } from '../../../chunk-TDP6D7U7.js';
2
+ import '../../../chunk-AP4MG32M.js';
3
+ import '../../../chunk-YXAMLTTT.js';
4
+ import '../../../chunk-TDEFIW2L.js';
5
+ import '../../../chunk-M5OONVIO.js';
6
+ import '../../../chunk-VYDYCGJL.js';
7
+ import '../../../chunk-MXTBCHYC.js';
8
+ import '../../../chunk-2LHKM7RD.js';
9
+ import '../../../chunk-5UMYP6MD.js';
10
+ import '../../../chunk-VS55HRUS.js';
11
+ import '../../../chunk-YX46JVQN.js';
12
+ import '../../../chunk-RJG5D2TM.js';
13
+ import '../../../chunk-ZCSZX3OI.js';
14
+ import '../../../chunk-SLJNKQ2G.js';
@@ -0,0 +1,20 @@
1
+ import * as ai from 'ai';
2
+
3
+ declare function useInitialMessages(): (ai.UIMessage<unknown, ai.UIDataTypes, ai.UITools> | {
4
+ id: string;
5
+ role: "user" | "assistant" | "system";
6
+ parts: {
7
+ type: "text";
8
+ text: string;
9
+ }[];
10
+ metadata: {
11
+ id: string;
12
+ role: "user" | "assistant" | "system";
13
+ parts: Array<{
14
+ type: "text";
15
+ text: string;
16
+ }>;
17
+ };
18
+ })[];
19
+
20
+ export { useInitialMessages };
@@ -0,0 +1,14 @@
1
+ export { useInitialMessages } from '../../../chunk-TDP6D7U7.js';
2
+ import '../../../chunk-AP4MG32M.js';
3
+ import '../../../chunk-YXAMLTTT.js';
4
+ import '../../../chunk-TDEFIW2L.js';
5
+ import '../../../chunk-M5OONVIO.js';
6
+ import '../../../chunk-VYDYCGJL.js';
7
+ import '../../../chunk-MXTBCHYC.js';
8
+ import '../../../chunk-2LHKM7RD.js';
9
+ import '../../../chunk-5UMYP6MD.js';
10
+ import '../../../chunk-VS55HRUS.js';
11
+ import '../../../chunk-YX46JVQN.js';
12
+ import '../../../chunk-RJG5D2TM.js';
13
+ import '../../../chunk-ZCSZX3OI.js';
14
+ import '../../../chunk-SLJNKQ2G.js';
@@ -0,0 +1,8 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ interface ChatTitleProps {
4
+ chatId?: string;
5
+ }
6
+ declare function ChatHeader({ chatId }: ChatTitleProps): react_jsx_runtime.JSX.Element;
7
+
8
+ export { ChatHeader };
@@ -0,0 +1,14 @@
1
+ export { ChatHeader } from '../../../chunk-TDP6D7U7.js';
2
+ import '../../../chunk-AP4MG32M.js';
3
+ import '../../../chunk-YXAMLTTT.js';
4
+ import '../../../chunk-TDEFIW2L.js';
5
+ import '../../../chunk-M5OONVIO.js';
6
+ import '../../../chunk-VYDYCGJL.js';
7
+ import '../../../chunk-MXTBCHYC.js';
8
+ import '../../../chunk-2LHKM7RD.js';
9
+ import '../../../chunk-5UMYP6MD.js';
10
+ import '../../../chunk-VS55HRUS.js';
11
+ import '../../../chunk-YX46JVQN.js';
12
+ import '../../../chunk-RJG5D2TM.js';
13
+ import '../../../chunk-ZCSZX3OI.js';
14
+ import '../../../chunk-SLJNKQ2G.js';
@@ -0,0 +1,5 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function ChatMenu(): react_jsx_runtime.JSX.Element;
4
+
5
+ export { ChatMenu };
@@ -0,0 +1,2 @@
1
+ export { ChatMenu } from '../../../chunk-AP4MG32M.js';
2
+ import '../../../chunk-2LHKM7RD.js';
@@ -0,0 +1,5 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function ChatHistoryEmpty(): react_jsx_runtime.JSX.Element;
4
+
5
+ export { ChatHistoryEmpty };
@@ -0,0 +1 @@
1
+ export { ChatHistoryEmpty } from '../../../chunk-YXAMLTTT.js';
@@ -0,0 +1,5 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+
3
+ declare function ChatHistory(): react_jsx_runtime.JSX.Element;
4
+
5
+ export { ChatHistory };
@@ -0,0 +1,14 @@
1
+ export { ChatHistory } from '../../../chunk-TDP6D7U7.js';
2
+ import '../../../chunk-AP4MG32M.js';
3
+ import '../../../chunk-YXAMLTTT.js';
4
+ import '../../../chunk-TDEFIW2L.js';
5
+ import '../../../chunk-M5OONVIO.js';
6
+ import '../../../chunk-VYDYCGJL.js';
7
+ import '../../../chunk-MXTBCHYC.js';
8
+ import '../../../chunk-2LHKM7RD.js';
9
+ import '../../../chunk-5UMYP6MD.js';
10
+ import '../../../chunk-VS55HRUS.js';
11
+ import '../../../chunk-YX46JVQN.js';
12
+ import '../../../chunk-RJG5D2TM.js';
13
+ import '../../../chunk-ZCSZX3OI.js';
14
+ import '../../../chunk-SLJNKQ2G.js';
@@ -0,0 +1,10 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { UIMessage } from 'ai';
3
+
4
+ interface ChatMessageProps {
5
+ messages: UIMessage[];
6
+ withAvatar?: boolean;
7
+ }
8
+ declare function ChatMessage({ messages, withAvatar, }: ChatMessageProps): (react_jsx_runtime.JSX.Element | null)[];
9
+
10
+ export { ChatMessage };
@@ -0,0 +1 @@
1
+ export { ChatMessage } from '../../chunk-SLJNKQ2G.js';
@@ -0,0 +1,35 @@
1
+ import { Callbacks } from '../molecule/types/callbacks.js';
2
+ import { M as MoleculeConfig, R as RootConfig } from '../../config-IcWUmjwj.js';
3
+ import * as react_jsx_runtime from 'react/jsx-runtime';
4
+ import { MoleculeProviderProps, MoleculeContextType } from '../molecule/molecule-provider.js';
5
+ import '../logger/logger.js';
6
+ import '../molecule/types/api.js';
7
+ import '@chatsdk-dev/api-client';
8
+ import '../molecule/types/context.js';
9
+ import '../molecule/types/locale.js';
10
+ import '@chatsdk-dev/elements/i18n/config';
11
+ import '../molecule/types/theme.js';
12
+ import '@chatsdk-dev/ui/components/typography/text';
13
+ import 'react';
14
+
15
+ type ChatProps = {
16
+ chatId: string;
17
+ };
18
+ type ChatData = {
19
+ chatId: string;
20
+ };
21
+ type ChatMoleculeProps = MoleculeConfig<ChatProps, ChatData>;
22
+ declare const MoleculeProvider: {
23
+ ({ config, component, callbacks, children, }: MoleculeProviderProps<ChatProps, ChatData>): react_jsx_runtime.JSX.Element;
24
+ displayName: string;
25
+ };
26
+ declare const useMolecule: () => MoleculeContextType<ChatProps, ChatData>;
27
+ declare const useMoleculeConfig: () => RootConfig;
28
+ declare const useMoleculeComponent: () => ChatProps;
29
+ declare const useMoleculeCallbacks: () => Callbacks<ChatData>;
30
+ declare function ChatMolecule(props: ChatMoleculeProps): react_jsx_runtime.JSX.Element | null;
31
+ declare namespace ChatMolecule {
32
+ var displayName: string;
33
+ }
34
+
35
+ export { ChatMolecule, MoleculeProvider, useMolecule, useMoleculeCallbacks, useMoleculeComponent, useMoleculeConfig };
@@ -0,0 +1,14 @@
1
+ export { ChatMolecule, MoleculeProvider, useMolecule, useMoleculeCallbacks, useMoleculeComponent, useMoleculeConfig } from '../../chunk-TDP6D7U7.js';
2
+ import '../../chunk-AP4MG32M.js';
3
+ import '../../chunk-YXAMLTTT.js';
4
+ import '../../chunk-TDEFIW2L.js';
5
+ import '../../chunk-M5OONVIO.js';
6
+ import '../../chunk-VYDYCGJL.js';
7
+ import '../../chunk-MXTBCHYC.js';
8
+ import '../../chunk-2LHKM7RD.js';
9
+ import '../../chunk-5UMYP6MD.js';
10
+ import '../../chunk-VS55HRUS.js';
11
+ import '../../chunk-YX46JVQN.js';
12
+ import '../../chunk-RJG5D2TM.js';
13
+ import '../../chunk-ZCSZX3OI.js';
14
+ import '../../chunk-SLJNKQ2G.js';
@@ -0,0 +1,16 @@
1
+ import * as react_jsx_runtime from 'react/jsx-runtime';
2
+ import { ChatStatus } from 'ai';
3
+ import { PromptInputMessage } from '@chatsdk-dev/elements/components/ai-elements/prompt-input';
4
+ import { ChatModelSettings } from '@chatsdk-dev/api-client';
5
+
6
+ interface ChatPromptInputProps {
7
+ chatId?: string;
8
+ onSubmit: (message: PromptInputMessage, event: React.SubmitEvent<HTMLFormElement>) => void;
9
+ onModelChange?: (model: ChatModelSettings["defaultModel"]) => void;
10
+ onWebSearchChange?: (webSearch: boolean) => void;
11
+ status: ChatStatus;
12
+ ref: React.RefObject<HTMLTextAreaElement | null>;
13
+ }
14
+ declare function ChatPromptInput({ chatId, onSubmit, onModelChange, status, ref, }: ChatPromptInputProps): react_jsx_runtime.JSX.Element;
15
+
16
+ export { ChatPromptInput };
@@ -0,0 +1,14 @@
1
+ export { ChatPromptInput } from '../../chunk-TDP6D7U7.js';
2
+ import '../../chunk-AP4MG32M.js';
3
+ import '../../chunk-YXAMLTTT.js';
4
+ import '../../chunk-TDEFIW2L.js';
5
+ import '../../chunk-M5OONVIO.js';
6
+ import '../../chunk-VYDYCGJL.js';
7
+ import '../../chunk-MXTBCHYC.js';
8
+ import '../../chunk-2LHKM7RD.js';
9
+ import '../../chunk-5UMYP6MD.js';
10
+ import '../../chunk-VS55HRUS.js';
11
+ import '../../chunk-YX46JVQN.js';
12
+ import '../../chunk-RJG5D2TM.js';
13
+ import '../../chunk-ZCSZX3OI.js';
14
+ import '../../chunk-SLJNKQ2G.js';
@@ -0,0 +1,26 @@
1
+ type SendMessageData = {
2
+ message: string;
3
+ model: string;
4
+ webSearch: boolean;
5
+ };
6
+ interface ChatBaseSettings {
7
+ displayName: string;
8
+ inputPlaceholder: string;
9
+ initialMessages: string[];
10
+ }
11
+ interface ChatModelSettings {
12
+ model: string;
13
+ temperature: number;
14
+ }
15
+ interface ChatAppearanceSettings {
16
+ colorScheme: string;
17
+ }
18
+ interface ChatElementProps {
19
+ chatId?: string;
20
+ baseSettings?: ChatBaseSettings;
21
+ modelSettings?: ChatModelSettings;
22
+ appearanceSettings?: ChatAppearanceSettings;
23
+ }
24
+ declare const chatElementDefaultProps: ChatElementProps;
25
+
26
+ export { type ChatAppearanceSettings, type ChatBaseSettings, type ChatElementProps, type ChatModelSettings, type SendMessageData, chatElementDefaultProps };
@@ -0,0 +1,13 @@
1
+ // src/features/chat/chat.context.tsx
2
+ var chatElementDefaultProps = {
3
+ baseSettings: {
4
+ // title
5
+ displayName: "AI Assistant",
6
+ inputPlaceholder: "Message...",
7
+ initialMessages: [
8
+ "Hello! If you have any questions, I'm here to help you."
9
+ ]
10
+ }
11
+ };
12
+
13
+ export { chatElementDefaultProps };
@@ -0,0 +1,14 @@
1
+ export { ChatMolecule, MoleculeProvider, useMolecule, useMoleculeCallbacks, useMoleculeComponent, useMoleculeConfig } from './chat-molecule.js';
2
+ import '../molecule/types/callbacks.js';
3
+ import '../../config-IcWUmjwj.js';
4
+ import '../logger/logger.js';
5
+ import '../molecule/types/api.js';
6
+ import '@chatsdk-dev/api-client';
7
+ import '../molecule/types/context.js';
8
+ import '../molecule/types/locale.js';
9
+ import '@chatsdk-dev/elements/i18n/config';
10
+ import '../molecule/types/theme.js';
11
+ import '@chatsdk-dev/ui/components/typography/text';
12
+ import 'react/jsx-runtime';
13
+ import '../molecule/molecule-provider.js';
14
+ import 'react';
@@ -0,0 +1,14 @@
1
+ export { ChatMolecule, MoleculeProvider, useMolecule, useMoleculeCallbacks, useMoleculeComponent, useMoleculeConfig } from '../../chunk-TDP6D7U7.js';
2
+ import '../../chunk-AP4MG32M.js';
3
+ import '../../chunk-YXAMLTTT.js';
4
+ import '../../chunk-TDEFIW2L.js';
5
+ import '../../chunk-M5OONVIO.js';
6
+ import '../../chunk-VYDYCGJL.js';
7
+ import '../../chunk-MXTBCHYC.js';
8
+ import '../../chunk-2LHKM7RD.js';
9
+ import '../../chunk-5UMYP6MD.js';
10
+ import '../../chunk-VS55HRUS.js';
11
+ import '../../chunk-YX46JVQN.js';
12
+ import '../../chunk-RJG5D2TM.js';
13
+ import '../../chunk-ZCSZX3OI.js';
14
+ import '../../chunk-SLJNKQ2G.js';
@@ -0,0 +1,8 @@
1
+ declare const chatQueryKeys: {
2
+ all: () => readonly ["chat"];
3
+ get: (chatId?: string) => readonly ["chat", "get", string | undefined];
4
+ listConversations: (chatId?: string) => readonly ["chat", "get", string | undefined, "conversations"];
5
+ conversation: (chatId?: string, conversationId?: string | null) => readonly ["chat", "get", string | undefined, "conversation", string | null | undefined];
6
+ };
7
+
8
+ export { chatQueryKeys };
@@ -0,0 +1 @@
1
+ export { chatQueryKeys } from '../../../chunk-TDEFIW2L.js';
@@ -0,0 +1,29 @@
1
+ import * as _tanstack_react_query from '@tanstack/react-query';
2
+
3
+ interface UseCreateConversationMutationProps {
4
+ chatId?: string;
5
+ }
6
+ declare function useCreateConversationMutation({ chatId, }: UseCreateConversationMutationProps): _tanstack_react_query.UseMutationResult<{
7
+ actor: {
8
+ id: string;
9
+ type: "default" | "tenant";
10
+ };
11
+ usage: {
12
+ messageCredits: number;
13
+ };
14
+ status: "active" | "archived";
15
+ summary?: string;
16
+ title?: string;
17
+ messages: Array<{
18
+ id: string;
19
+ role: "user" | "assistant" | "system";
20
+ parts: Array<{
21
+ type: "text";
22
+ text: string;
23
+ }>;
24
+ }>;
25
+ _id: string;
26
+ _creationTime: number;
27
+ }, Error, void, unknown>;
28
+
29
+ export { useCreateConversationMutation };