@alfadocs/ui-kit 0.45.0 → 0.47.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.
Files changed (85) hide show
  1. package/dist/_chunks/alia-sidebar-CVIPrdc9.js +1125 -0
  2. package/dist/_chunks/{audio-recorder-C1rhKhSN.js → audio-recorder-DC-v9YFW.js} +81 -91
  3. package/dist/_chunks/{chat-input-CQe7nR_v.js → chat-input-CFwc7JxL.js} +2 -1
  4. package/dist/_chunks/{chat-message-ASgGtj-L.js → chat-message-B5JpFj0F.js} +79 -73
  5. package/dist/_chunks/code-block-HoddNOKJ.js +106 -0
  6. package/dist/_chunks/download-CDF1sbL9.js +16 -0
  7. package/dist/_chunks/{editable-currency-cell-renderer-BEBUQl9P.js → editable-currency-cell-renderer-CLil9B29.js} +283 -293
  8. package/dist/_chunks/{freemium-paywall-BYist2sJ.js → freemium-paywall-DzpD63WY.js} +2 -2
  9. package/dist/_chunks/mic-B4Gog3Gi.js +16 -0
  10. package/dist/_chunks/{payment-form-DqEiEJRO.js → payment-form-BNTx4876.js} +225 -196
  11. package/dist/_chunks/pencil-CfQX-0Qc.js +21 -0
  12. package/dist/_chunks/{streaming-text-GH07yIYh.js → streaming-text-CfhDqtIT.js} +49 -45
  13. package/dist/_chunks/{workflow-map-BFNpzTiw.js → workflow-map-Djn1QMJc.js} +135 -150
  14. package/dist/agent-catalog.json +1 -1
  15. package/dist/components/_shared/code-block.d.ts +39 -0
  16. package/dist/components/audio-recorder/index.js +1 -1
  17. package/dist/components/chat-input/index.js +1 -1
  18. package/dist/components/chat-message/chat-message.d.ts +6 -0
  19. package/dist/components/chat-message/index.js +1 -1
  20. package/dist/components/data-table/index.js +1 -1
  21. package/dist/components/freemium-paywall/index.js +1 -1
  22. package/dist/components/payment-form/index.js +1 -1
  23. package/dist/components/payment-form/payment-form.d.ts +6 -0
  24. package/dist/components/streaming-text/index.js +1 -1
  25. package/dist/components/workflow/index.js +1 -1
  26. package/dist/i18n/locales/ar.d.ts +15 -0
  27. package/dist/i18n/locales/ar.js +16 -1
  28. package/dist/i18n/locales/de.d.ts +15 -0
  29. package/dist/i18n/locales/de.js +16 -1
  30. package/dist/i18n/locales/el.d.ts +15 -0
  31. package/dist/i18n/locales/el.js +16 -1
  32. package/dist/i18n/locales/en.d.ts +15 -0
  33. package/dist/i18n/locales/en.js +16 -1
  34. package/dist/i18n/locales/es.d.ts +15 -0
  35. package/dist/i18n/locales/es.js +16 -1
  36. package/dist/i18n/locales/fr.d.ts +15 -0
  37. package/dist/i18n/locales/fr.js +16 -1
  38. package/dist/i18n/locales/hi.d.ts +15 -0
  39. package/dist/i18n/locales/hi.js +16 -1
  40. package/dist/i18n/locales/it.d.ts +15 -0
  41. package/dist/i18n/locales/it.js +16 -1
  42. package/dist/i18n/locales/ja.d.ts +15 -0
  43. package/dist/i18n/locales/ja.js +16 -1
  44. package/dist/i18n/locales/nl.d.ts +15 -0
  45. package/dist/i18n/locales/nl.js +16 -1
  46. package/dist/i18n/locales/pl.d.ts +15 -0
  47. package/dist/i18n/locales/pl.js +16 -1
  48. package/dist/i18n/locales/pt.d.ts +15 -0
  49. package/dist/i18n/locales/pt.js +16 -1
  50. package/dist/i18n/locales/ro.d.ts +15 -0
  51. package/dist/i18n/locales/ro.js +16 -1
  52. package/dist/i18n/locales/ru.d.ts +15 -0
  53. package/dist/i18n/locales/ru.js +16 -1
  54. package/dist/i18n/locales/sq.d.ts +15 -0
  55. package/dist/i18n/locales/sq.js +16 -1
  56. package/dist/i18n/locales/sv.d.ts +15 -0
  57. package/dist/i18n/locales/sv.js +16 -1
  58. package/dist/i18n/locales/tr.d.ts +15 -0
  59. package/dist/i18n/locales/tr.js +16 -1
  60. package/dist/i18n/locales/zh.d.ts +15 -0
  61. package/dist/i18n/locales/zh.js +16 -1
  62. package/dist/index.js +9 -9
  63. package/dist/locales/ar.json +16 -1
  64. package/dist/locales/de.json +16 -1
  65. package/dist/locales/el.json +16 -1
  66. package/dist/locales/en.json +16 -1
  67. package/dist/locales/es.json +16 -1
  68. package/dist/locales/fr.json +16 -1
  69. package/dist/locales/hi.json +16 -1
  70. package/dist/locales/it.json +16 -1
  71. package/dist/locales/ja.json +16 -1
  72. package/dist/locales/nl.json +16 -1
  73. package/dist/locales/pl.json +16 -1
  74. package/dist/locales/pt.json +16 -1
  75. package/dist/locales/ro.json +16 -1
  76. package/dist/locales/ru.json +16 -1
  77. package/dist/locales/sq.json +16 -1
  78. package/dist/locales/sv.json +16 -1
  79. package/dist/locales/tr.json +16 -1
  80. package/dist/locales/zh.json +16 -1
  81. package/dist/patterns/alia-assistant/alia-types.d.ts +61 -0
  82. package/dist/patterns/alia-assistant/index.js +1 -1
  83. package/dist/tokens.css +1 -1
  84. package/package.json +1 -1
  85. package/dist/_chunks/alia-sidebar-Be8FhKYd.js +0 -837
@@ -772,7 +772,22 @@
772
772
  "exampleQuestions": "Probeer te vragen",
773
773
  "upgrade": "Upgraden naar hoger abonnement",
774
774
  "headerLabel": "Koptekst assistent",
775
- "panelLabel": "Paneel van Alia-assistent"
775
+ "panelLabel": "Paneel van Alia-assistent",
776
+ "copyMessage": "Bericht kopiëren",
777
+ "copied": "Gekopieerd",
778
+ "downloadMessage": "Downloaden als Markdown",
779
+ "regenerate": "Antwoord opnieuw genereren",
780
+ "dictate": "Dicteren",
781
+ "dictateStop": "Dicteren stoppen",
782
+ "attachmentsLabel": "Bijlagen",
783
+ "removeAttachment": "{{name}} verwijderen",
784
+ "editMessage": "Bericht bewerken",
785
+ "saveEdit": "Opslaan",
786
+ "cancelEdit": "Annuleren"
787
+ },
788
+ "codeBlock": {
789
+ "copy": "Code kopiëren",
790
+ "copied": "Gekopieerd"
776
791
  },
777
792
  "chat": {
778
793
  "typing": "De assistent typt",
@@ -772,7 +772,22 @@
772
772
  "exampleQuestions": "Spróbuj zapytać",
773
773
  "upgrade": "Przejdź na wyższy plan",
774
774
  "headerLabel": "Nagłówek asystenta",
775
- "panelLabel": "Panel asystenta Alia"
775
+ "panelLabel": "Panel asystenta Alia",
776
+ "copyMessage": "Kopiuj wiadomość",
777
+ "copied": "Skopiowano",
778
+ "downloadMessage": "Pobierz jako Markdown",
779
+ "regenerate": "Wygeneruj odpowiedź ponownie",
780
+ "dictate": "Dyktuj",
781
+ "dictateStop": "Zatrzymaj dyktowanie",
782
+ "attachmentsLabel": "Załączniki",
783
+ "removeAttachment": "Usuń {{name}}",
784
+ "editMessage": "Edytuj wiadomość",
785
+ "saveEdit": "Zapisz",
786
+ "cancelEdit": "Anuluj"
787
+ },
788
+ "codeBlock": {
789
+ "copy": "Kopiuj kod",
790
+ "copied": "Skopiowano"
776
791
  },
777
792
  "chat": {
778
793
  "typing": "Asystent pisze",
@@ -772,7 +772,22 @@
772
772
  "exampleQuestions": "Tente perguntar",
773
773
  "upgrade": "Passar para o plano superior",
774
774
  "headerLabel": "Cabeçalho do assistente",
775
- "panelLabel": "Painel do assistente Alia"
775
+ "panelLabel": "Painel do assistente Alia",
776
+ "copyMessage": "Copiar mensagem",
777
+ "copied": "Copiado",
778
+ "downloadMessage": "Descarregar como Markdown",
779
+ "regenerate": "Gerar resposta novamente",
780
+ "dictate": "Ditar",
781
+ "dictateStop": "Parar de ditar",
782
+ "attachmentsLabel": "Anexos",
783
+ "removeAttachment": "Remover {{name}}",
784
+ "editMessage": "Editar mensagem",
785
+ "saveEdit": "Guardar",
786
+ "cancelEdit": "Cancelar"
787
+ },
788
+ "codeBlock": {
789
+ "copy": "Copiar código",
790
+ "copied": "Copiado"
776
791
  },
777
792
  "chat": {
778
793
  "typing": "O assistente está a escrever",
@@ -772,7 +772,22 @@
772
772
  "exampleQuestions": "Încearcă să întrebi",
773
773
  "upgrade": "Treci la planul superior",
774
774
  "headerLabel": "Antet asistent",
775
- "panelLabel": "Panou asistent Alia"
775
+ "panelLabel": "Panou asistent Alia",
776
+ "copyMessage": "Copiază mesajul",
777
+ "copied": "Copiat",
778
+ "downloadMessage": "Descarcă în format Markdown",
779
+ "regenerate": "Regenerează răspunsul",
780
+ "dictate": "Dictează",
781
+ "dictateStop": "Oprește dictarea",
782
+ "attachmentsLabel": "Atașamente",
783
+ "removeAttachment": "Elimină {{name}}",
784
+ "editMessage": "Editează mesajul",
785
+ "saveEdit": "Salvează",
786
+ "cancelEdit": "Anulează"
787
+ },
788
+ "codeBlock": {
789
+ "copy": "Copiază codul",
790
+ "copied": "Copiat"
776
791
  },
777
792
  "chat": {
778
793
  "typing": "Asistentul scrie",
@@ -772,7 +772,22 @@
772
772
  "exampleQuestions": "Попробуйте спросить",
773
773
  "upgrade": "Перейти на более высокий тариф",
774
774
  "headerLabel": "Заголовок ассистента",
775
- "panelLabel": "Панель ассистента Alia"
775
+ "panelLabel": "Панель ассистента Alia",
776
+ "copyMessage": "Копировать сообщение",
777
+ "copied": "Скопировано",
778
+ "downloadMessage": "Скачать в формате Markdown",
779
+ "regenerate": "Сгенерировать ответ заново",
780
+ "dictate": "Диктовать",
781
+ "dictateStop": "Остановить диктовку",
782
+ "attachmentsLabel": "Вложения",
783
+ "removeAttachment": "Удалить {{name}}",
784
+ "editMessage": "Изменить сообщение",
785
+ "saveEdit": "Сохранить",
786
+ "cancelEdit": "Отмена"
787
+ },
788
+ "codeBlock": {
789
+ "copy": "Копировать код",
790
+ "copied": "Скопировано"
776
791
  },
777
792
  "chat": {
778
793
  "typing": "Ассистент печатает",
@@ -772,7 +772,22 @@
772
772
  "exampleQuestions": "Provoni të pyesni",
773
773
  "upgrade": "Kalo në planin superior",
774
774
  "headerLabel": "Titulli i asistentit",
775
- "panelLabel": "Paneli i asistentit Alia"
775
+ "panelLabel": "Paneli i asistentit Alia",
776
+ "copyMessage": "Kopjo mesazhin",
777
+ "copied": "Kopjuar",
778
+ "downloadMessage": "Shkarko si Markdown",
779
+ "regenerate": "Rigjenero përgjigjen",
780
+ "dictate": "Dikto",
781
+ "dictateStop": "Ndalo diktimin",
782
+ "attachmentsLabel": "Bashkëngjitjet",
783
+ "removeAttachment": "Hiq {{name}}",
784
+ "editMessage": "Ndrysho mesazhin",
785
+ "saveEdit": "Ruaj",
786
+ "cancelEdit": "Anulo"
787
+ },
788
+ "codeBlock": {
789
+ "copy": "Kopjo kodin",
790
+ "copied": "Kopjuar"
776
791
  },
777
792
  "chat": {
778
793
  "typing": "Asistenti po shkruan",
@@ -772,7 +772,22 @@
772
772
  "exampleQuestions": "Prova att fråga",
773
773
  "upgrade": "Uppgradera till högre plan",
774
774
  "headerLabel": "Assistentens rubrik",
775
- "panelLabel": "Alia assistentpanel"
775
+ "panelLabel": "Alia assistentpanel",
776
+ "copyMessage": "Kopiera meddelande",
777
+ "copied": "Kopierat",
778
+ "downloadMessage": "Ladda ner som Markdown",
779
+ "regenerate": "Generera svar igen",
780
+ "dictate": "Diktera",
781
+ "dictateStop": "Stoppa diktering",
782
+ "attachmentsLabel": "Bifogade filer",
783
+ "removeAttachment": "Ta bort {{name}}",
784
+ "editMessage": "Redigera meddelande",
785
+ "saveEdit": "Spara",
786
+ "cancelEdit": "Avbryt"
787
+ },
788
+ "codeBlock": {
789
+ "copy": "Kopiera kod",
790
+ "copied": "Kopierat"
776
791
  },
777
792
  "chat": {
778
793
  "typing": "Assistenten skriver",
@@ -772,7 +772,22 @@
772
772
  "exampleQuestions": "Sormayı deneyin",
773
773
  "upgrade": "Üst plana geçin",
774
774
  "headerLabel": "Asistan başlığı",
775
- "panelLabel": "Alia asistan paneli"
775
+ "panelLabel": "Alia asistan paneli",
776
+ "copyMessage": "Mesajı kopyala",
777
+ "copied": "Kopyalandı",
778
+ "downloadMessage": "Markdown olarak indir",
779
+ "regenerate": "Yanıtı yeniden oluştur",
780
+ "dictate": "Sesle yaz",
781
+ "dictateStop": "Dikteyi durdur",
782
+ "attachmentsLabel": "Ekler",
783
+ "removeAttachment": "{{name}} dosyasını kaldır",
784
+ "editMessage": "Mesajı düzenle",
785
+ "saveEdit": "Kaydet",
786
+ "cancelEdit": "İptal"
787
+ },
788
+ "codeBlock": {
789
+ "copy": "Kodu kopyala",
790
+ "copied": "Kopyalandı"
776
791
  },
777
792
  "chat": {
778
793
  "typing": "Asistan yazıyor",
@@ -772,7 +772,22 @@
772
772
  "exampleQuestions": "尝试提问",
773
773
  "upgrade": "升级到更高套餐",
774
774
  "headerLabel": "助手标题",
775
- "panelLabel": "Alia 助手面板"
775
+ "panelLabel": "Alia 助手面板",
776
+ "copyMessage": "复制消息",
777
+ "copied": "已复制",
778
+ "downloadMessage": "下载为 Markdown",
779
+ "regenerate": "重新生成回复",
780
+ "dictate": "语音输入",
781
+ "dictateStop": "停止语音输入",
782
+ "attachmentsLabel": "附件",
783
+ "removeAttachment": "移除 {{name}}",
784
+ "editMessage": "编辑消息",
785
+ "saveEdit": "保存",
786
+ "cancelEdit": "取消"
787
+ },
788
+ "codeBlock": {
789
+ "copy": "复制代码",
790
+ "copied": "已复制"
776
791
  },
777
792
  "chat": {
778
793
  "typing": "助手正在输入",
@@ -23,6 +23,16 @@ export interface AliaSuggestion {
23
23
  /** Optional icon (e.g. from lucide-react). */
24
24
  icon?: ReactNode;
25
25
  }
26
+ /**
27
+ * A composer attachment chip. Presentational only — the consuming app owns the
28
+ * attachment list (adds via `onAttach`, removes via `onRemoveAttachment`).
29
+ */
30
+ export interface AliaAttachment {
31
+ /** Stable id — chip key + the `onRemoveAttachment` argument. */
32
+ id: string;
33
+ /** Display filename. */
34
+ name: string;
35
+ }
26
36
  export interface AliaAssistantAvatar {
27
37
  name?: string;
28
38
  src?: string;
@@ -138,5 +148,56 @@ export interface AliaChatSurfaceProps {
138
148
  /** Consumer-provided notice shown in the locked end divider. */
139
149
  note: ReactNode;
140
150
  };
151
+ /**
152
+ * Per-assistant-message action row. Pass any of `'copy'` / `'download'` to
153
+ * render those icon-buttons under each assistant message. Both are pure
154
+ * client actions handled internally: `'copy'` writes the message's raw
155
+ * markdown to the clipboard (brief "Copied" confirmation, graceful fallback
156
+ * when the clipboard API is unavailable); `'download'` saves it as
157
+ * `<assistantName>-prompt-<YYYY-MM-DD>.md`. Default off → no action row.
158
+ */
159
+ messageActions?: Array<'copy' | 'download'>;
160
+ /** Analytics-only hook fired after an assistant message is copied. */
161
+ onCopyMessage?: (messageId: string) => void;
162
+ /** Analytics-only hook fired after an assistant message is downloaded. */
163
+ onDownloadMessage?: (messageId: string) => void;
164
+ /**
165
+ * Enable the composer voice-dictation mic (Web Speech API). It transcribes
166
+ * speech into the composer text. Feature-detected: when `SpeechRecognition`
167
+ * is unsupported the mic is not rendered (no broken button). Opt-in.
168
+ *
169
+ * PRIVACY: Chrome's `SpeechRecognition` streams audio to Google's servers.
170
+ * Do not enable in contexts where sensitive audio could be dictated.
171
+ */
172
+ voiceInput?: boolean;
173
+ /**
174
+ * Optional hook receiving each finalised transcript chunk. The transcript is
175
+ * appended to the composer regardless; this is for analytics or swapping in
176
+ * a different speech engine later.
177
+ */
178
+ onVoiceTranscript?: (text: string) => void;
179
+ /**
180
+ * Attachment chips shown above the composer (filename + remove). Presentational
181
+ * — the consumer owns the list: add via `onAttach`, remove via
182
+ * `onRemoveAttachment`. Omit to render no chip row.
183
+ */
184
+ attachments?: AliaAttachment[];
185
+ /** Fires when the user removes an attachment chip. */
186
+ onRemoveAttachment?: (id: string) => void;
187
+ /** Show a "jump to latest" affordance when the user has scrolled up. Opt-in. */
188
+ showScrollToLatest?: boolean;
189
+ /**
190
+ * Regenerate the LAST assistant message. When set, a Regenerate action is
191
+ * added to that message's action row (distinct from `onRetry`, the
192
+ * failed-message retry). Omit to hide it.
193
+ */
194
+ onRegenerate?: (messageId: string) => void;
195
+ /**
196
+ * Edit & resend a user message. When set, user messages gain an Edit action;
197
+ * on save the surface calls this with the message id + the new text. The
198
+ * surface owns the transient edit-draft state; the consumer owns the
199
+ * resulting conversation update.
200
+ */
201
+ onEditMessage?: (messageId: string, text: string) => void;
141
202
  }
142
203
  //# sourceMappingURL=alia-types.d.ts.map
@@ -1,4 +1,4 @@
1
- import { A as i, a as A, b as d, c as l } from "../../_chunks/alia-sidebar-Be8FhKYd.js";
1
+ import { A as i, a as A, b as d, c as l } from "../../_chunks/alia-sidebar-CVIPrdc9.js";
2
2
  export {
3
3
  i as AliaChatSurface,
4
4
  A as AliaEmbedded,