@citron-systems/citron-ui 1.22.0 → 1.23.0

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/index.d.cts CHANGED
@@ -67,10 +67,15 @@ interface CenteredAIChatComposePayload {
67
67
  }
68
68
  interface CenteredAIChatProps {
69
69
  messages?: CenteredAIChatMessage[];
70
- onSend?: (content: string) => void;
71
70
  /**
72
- * Prefer this when you need text + files in one step. Files stay in a preview queue until send.
73
- * When set, it is used on send instead of calling `onSend` / `onFilesAttach` separately.
71
+ * Igual que `GlobalAssistantChat` / `CenteredAssistantChat`: texto y archivos en un solo callback.
72
+ */
73
+ onSend?: (payload: {
74
+ text: string;
75
+ files: File[];
76
+ }) => void;
77
+ /**
78
+ * Si está definido, se usa al enviar en lugar de `onSend` (misma forma de payload).
74
79
  */
75
80
  onComposeSubmit?: (payload: CenteredAIChatComposePayload) => void;
76
81
  isProcessing?: boolean;
@@ -79,8 +84,8 @@ interface CenteredAIChatProps {
79
84
  activeAgent?: string;
80
85
  onAgentChange?: (agentId: string) => void;
81
86
  /**
82
- * Legacy: invoked when the user sends and there are pending attachments (after preview).
83
- * Ignored if `onComposeSubmit` is provided.
87
+ * Solo si no hay `onSend` ni `onComposeSubmit`: se llama con los archivos al enviar (el texto no tiene destino).
88
+ * @deprecated Prefer `onSend` con `{ text, files }`.
84
89
  */
85
90
  onFilesAttach?: (files: File[]) => void;
86
91
  onVoiceClick?: () => void;
package/dist/index.d.ts CHANGED
@@ -67,10 +67,15 @@ interface CenteredAIChatComposePayload {
67
67
  }
68
68
  interface CenteredAIChatProps {
69
69
  messages?: CenteredAIChatMessage[];
70
- onSend?: (content: string) => void;
71
70
  /**
72
- * Prefer this when you need text + files in one step. Files stay in a preview queue until send.
73
- * When set, it is used on send instead of calling `onSend` / `onFilesAttach` separately.
71
+ * Igual que `GlobalAssistantChat` / `CenteredAssistantChat`: texto y archivos en un solo callback.
72
+ */
73
+ onSend?: (payload: {
74
+ text: string;
75
+ files: File[];
76
+ }) => void;
77
+ /**
78
+ * Si está definido, se usa al enviar en lugar de `onSend` (misma forma de payload).
74
79
  */
75
80
  onComposeSubmit?: (payload: CenteredAIChatComposePayload) => void;
76
81
  isProcessing?: boolean;
@@ -79,8 +84,8 @@ interface CenteredAIChatProps {
79
84
  activeAgent?: string;
80
85
  onAgentChange?: (agentId: string) => void;
81
86
  /**
82
- * Legacy: invoked when the user sends and there are pending attachments (after preview).
83
- * Ignored if `onComposeSubmit` is provided.
87
+ * Solo si no hay `onSend` ni `onComposeSubmit`: se llama con los archivos al enviar (el texto no tiene destino).
88
+ * @deprecated Prefer `onSend` con `{ text, files }`.
84
89
  */
85
90
  onFilesAttach?: (files: File[]) => void;
86
91
  onVoiceClick?: () => void;