@alfadocs/ui-kit 1.135.0 → 1.137.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 (216) hide show
  1. package/dist/_chunks/{ai-prompt-input-JIPbrTF3.js → ai-prompt-input-CVNeusoW.js} +2 -2
  2. package/dist/_chunks/ai-summary-panel-BhCo2vZF.js +1045 -0
  3. package/dist/_chunks/{alia-sidebar-CtwhdASP.js → alia-sidebar-CVBlKur9.js} +3 -3
  4. package/dist/_chunks/{anamnesis-summary-rows-CCNmkq55.js → anamnesis-summary-rows-Dr2V1Rtf.js} +3 -3
  5. package/dist/_chunks/appointment-details-panel.history-DrIMDQYf.js +314 -0
  6. package/dist/_chunks/appointment-details-panel.identity-C20Y9xNC.js +223 -0
  7. package/dist/_chunks/{audio-recorder-CsnM_WDy.js → audio-recorder-BOF5YYoC.js} +2 -2
  8. package/dist/_chunks/{balance-badge-cell-DTiMdnCZ.js → balance-badge-cell-BSB02Bwo.js} +4 -4
  9. package/dist/_chunks/{bill-line-table-DHKb_O7c.js → bill-line-table-By-YL2ms.js} +2 -2
  10. package/dist/_chunks/{bishop-score-CKztphVz.js → bishop-score-DWGESRP9.js} +2 -2
  11. package/dist/_chunks/calendar-appointment-editor-dialog-D0n_bVsT.js +5518 -0
  12. package/dist/_chunks/calendar-editor-discard-host-1UfmMOEb.js +1336 -0
  13. package/dist/_chunks/calendar-editor-guard-9fShhNIA.js +31 -0
  14. package/dist/_chunks/calendar-waiting-list-panel-Ckd6tSeu.js +981 -0
  15. package/dist/_chunks/calendar-workspace.model-DrOoxY1b.js +1557 -0
  16. package/dist/_chunks/calendar.sheets-Datc0-IT.js +4585 -0
  17. package/dist/_chunks/call-status-chip-pajxN5eZ.js +180 -0
  18. package/dist/_chunks/calls-panel-BIfatK90.js +1094 -0
  19. package/dist/_chunks/{chat-input-CX4dxBq7.js → chat-input-BmvnuZqj.js} +114 -109
  20. package/dist/_chunks/{chat-message-CfIyXrxA.js → chat-message-B4TMeZ2m.js} +35 -30
  21. package/dist/_chunks/circle-x-W8Enq3i4.js +16 -0
  22. package/dist/_chunks/color-picker-CC8ZfntU.js +582 -0
  23. package/dist/_chunks/communications-panel-SQ-55e3V.js +1079 -0
  24. package/dist/_chunks/{data-grid-B2oaI7Lt.js → data-grid-CxKz8flO.js} +2 -2
  25. package/dist/_chunks/{data-table-FTV3uRjX.js → data-table-_tgj0C_T.js} +2 -2
  26. package/dist/_chunks/{default-tabs-DbebYO04.js → default-tabs-oDWQzbN7.js} +3 -3
  27. package/dist/_chunks/{document-preview-DLVIrOYV.js → document-preview-CirR3C_m.js} +3 -3
  28. package/dist/_chunks/entity-summary-CPUHzyil.js +297 -0
  29. package/dist/_chunks/{file-manager-Bzr5NK1t.js → file-manager-CEi4z2i0.js} +2 -2
  30. package/dist/_chunks/{fiscal-code-input-BBvU7sAo.js → fiscal-code-input-DZlpaMGg.js} +2 -2
  31. package/dist/_chunks/{gestational-age-calculator-mB6brTlp.js → gestational-age-calculator-CHbpC4vL.js} +2 -2
  32. package/dist/_chunks/{heatmap-C5gJin_F.js → heatmap-_546qI2V.js} +2 -2
  33. package/dist/_chunks/{iban-input-DuTwKok5.js → iban-input-CdSLRzQN.js} +2 -2
  34. package/dist/_chunks/{invoice-upload-list-B5aMffTy.js → invoice-upload-list-CQI9MUl6.js} +3 -3
  35. package/dist/_chunks/{kit-extensions-DUaIYyMD.js → kit-extensions-BNBf4m8O.js} +3 -3
  36. package/dist/_chunks/{link-cell-renderer-D3JLPURZ.js → link-cell-renderer-Xx5T8u5Q.js} +3 -3
  37. package/dist/_chunks/list-todo-KWvUhmT_.js +33 -0
  38. package/dist/_chunks/{muscle-scheme-BGJD62op.js → muscle-scheme-D_rSyGDj.js} +2 -2
  39. package/dist/_chunks/{notes-panel-BvjAo4RQ.js → notes-panel-DsEKNtsw.js} +2 -2
  40. package/dist/_chunks/{optical-prescription-Da_r8pMr.js → optical-prescription-DaSbsh4p.js} +2 -2
  41. package/dist/_chunks/palettes-CKVXYTzo.js +172 -0
  42. package/dist/_chunks/{patient-account-settings-B2XbN_Fe.js → patient-account-settings-COybehKx.js} +3 -3
  43. package/dist/_chunks/{patient-card-DTh3QTyS.js → patient-card-Cpr8iD19.js} +4 -4
  44. package/dist/_chunks/{patient-check-in-resume-B7NY-6KI.js → patient-check-in-resume-DZnyYDKH.js} +40 -40
  45. package/dist/_chunks/{patient-details-DBtEITfE.js → patient-details-Dv7EiTCo.js} +2 -2
  46. package/dist/_chunks/{patient-field-row-a5d4QijH.js → patient-field-row-DuHWGlLz.js} +3 -3
  47. package/dist/_chunks/patient-picker-BZJuOgMw.js +173 -0
  48. package/dist/_chunks/{patient-sign-in-pin-CDBqV254.js → patient-sign-in-pin-DmMBwWet.js} +2 -2
  49. package/dist/_chunks/{patient-sign-in-steps-C2JSqlok.js → patient-sign-in-steps-BKcxNkdY.js} +37 -59
  50. package/dist/_chunks/{patient-summary-card-Bl2NknPe.js → patient-summary-card-D-cDzOim.js} +2 -2
  51. package/dist/_chunks/phone-off-DQSTLz4l.js +28 -0
  52. package/dist/_chunks/{portal-details-DCIiGkHA.js → portal-details-DdzvroYP.js} +2 -2
  53. package/dist/_chunks/{portal-documents-DJOH8pZx.js → portal-documents-CNmoYWFc.js} +3 -3
  54. package/dist/_chunks/{pregnancy-dating-BNI32qNw.js → pregnancy-dating-lJbzai73.js} +2 -2
  55. package/dist/_chunks/{privacy-mask-C19dJFMk.js → privacy-mask-C2ZLKrMh.js} +5 -5
  56. package/dist/_chunks/{registration-form-DS3RuKHu.js → registration-form-CuLiTA52.js} +2 -2
  57. package/dist/_chunks/{reserved.agent-DOzOBUW7.js → reserved.agent-CabZHFJC.js} +2 -2
  58. package/dist/_chunks/{rich-text-editor-DjHL1b3E.js → rich-text-editor-C48omVjq.js} +2 -2
  59. package/dist/_chunks/{select-uESzXTX6.js → select-CIXKyUMw.js} +172 -149
  60. package/dist/_chunks/{session-countdown-DOx1IBUB.js → session-countdown-StcyUU5O.js} +56 -66
  61. package/dist/_chunks/{signature-request-CHsM_iWi.js → signature-request-vJDSHZld.js} +2 -2
  62. package/dist/_chunks/{tabs-CRIDBLP7.js → tabs-Czkmw5ou.js} +2 -2
  63. package/dist/_chunks/task-editor-wKbFbGqW.js +1093 -0
  64. package/dist/_chunks/{tasks-panel-6EzdnwT8.js → tasks-panel-DbtJS4QI.js} +2 -2
  65. package/dist/_chunks/{toolbar-CfdoJzMV.js → toolbar-DjG-cpD_.js} +2 -2
  66. package/dist/_chunks/{unit-converter-YKlHyUC2.js → unit-converter-CUAUTu2B.js} +2 -2
  67. package/dist/_chunks/use-appointment-details-read-jGkJalX8.js +1966 -0
  68. package/dist/_chunks/{voice-control-panel-Be_c0CQ0.js → voice-control-panel-Cp4vs1iy.js} +2 -2
  69. package/dist/agent-catalog.json +282 -6
  70. package/dist/agent-i18n/en.json +26 -4
  71. package/dist/appointment-editor-panel/index.js +100 -0
  72. package/dist/booking-tools-data/index.js +82 -0
  73. package/dist/browser-support.js +1 -1
  74. package/dist/calendar-action-buttons/index.js +178 -0
  75. package/dist/components/ai-prompt-input/index.js +1 -1
  76. package/dist/components/ai-summary-panel/ai-summary-panel.d.ts +68 -5
  77. package/dist/components/ai-summary-panel/index.d.ts +1 -1
  78. package/dist/components/ai-summary-panel/index.js +1 -1
  79. package/dist/components/ai-summary-panel/summary-markdown.d.ts +15 -0
  80. package/dist/components/appointment-details-panel/index.js +6 -5
  81. package/dist/components/audio-recorder/index.js +1 -1
  82. package/dist/components/bill-line-table/index.js +1 -1
  83. package/dist/components/bill-table/index.js +1 -1
  84. package/dist/components/bishop-score/index.js +1 -1
  85. package/dist/components/booking/index.js +1 -1
  86. package/dist/components/call-status-chip/call-status-chip.d.ts +30 -0
  87. package/dist/components/call-status-chip/index.d.ts +3 -0
  88. package/dist/components/call-status-chip/index.js +5 -0
  89. package/dist/components/calls-panel/calls-panel.agent.d.ts +4 -0
  90. package/dist/components/calls-panel/calls-panel.d.ts +153 -0
  91. package/dist/components/calls-panel/index.d.ts +4 -0
  92. package/dist/components/calls-panel/index.js +6 -0
  93. package/dist/components/chat-input/chat-input.d.ts +17 -0
  94. package/dist/components/chat-input/index.js +1 -1
  95. package/dist/components/chat-message/index.js +1 -1
  96. package/dist/components/color-picker/index.js +5 -4
  97. package/dist/components/communications-panel/communications-panel.d.ts +15 -3
  98. package/dist/components/communications-panel/index.js +1 -1
  99. package/dist/components/data-grid/index.js +2 -2
  100. package/dist/components/data-table/index.js +2 -2
  101. package/dist/components/document-preview/index.js +1 -1
  102. package/dist/components/entity-summary/entity-summary.d.ts +29 -1
  103. package/dist/components/entity-summary/index.js +1 -1
  104. package/dist/components/file-manager/index.js +1 -1
  105. package/dist/components/fiscal-code-input/index.js +1 -1
  106. package/dist/components/gestational-age-calculator/index.js +1 -1
  107. package/dist/components/heatmap/index.js +1 -1
  108. package/dist/components/iban-input/index.js +1 -1
  109. package/dist/components/index.d.ts +2 -0
  110. package/dist/components/invoice-upload-list/index.js +1 -1
  111. package/dist/components/muscle-scheme/index.js +1 -1
  112. package/dist/components/notes-panel/index.js +1 -1
  113. package/dist/components/optical-prescription/index.js +1 -1
  114. package/dist/components/patient-details/index.js +1 -1
  115. package/dist/components/patient-summary-card/index.js +1 -1
  116. package/dist/components/patient-table/index.js +1 -1
  117. package/dist/components/pregnancy-dating/index.js +1 -1
  118. package/dist/components/rich-text-editor/index.js +2 -2
  119. package/dist/components/select/index.js +1 -1
  120. package/dist/components/select/select.d.ts +8 -0
  121. package/dist/components/session-countdown/index.js +1 -1
  122. package/dist/components/skeleton-scheme/index.js +1 -1
  123. package/dist/components/tabs/index.js +1 -1
  124. package/dist/components/task-editor/index.js +1 -1
  125. package/dist/components/tasks-panel/index.js +1 -1
  126. package/dist/components/unit-converter/index.js +1 -1
  127. package/dist/components/voice-control-panel/index.js +1 -1
  128. package/dist/core.css +1 -1
  129. package/dist/find-free-slots-panel/index.js +58 -0
  130. package/dist/host-compat.css +4 -1
  131. package/dist/i18n/locales/ar.d.ts +72 -3
  132. package/dist/i18n/locales/ar.js +74 -5
  133. package/dist/i18n/locales/de.d.ts +72 -3
  134. package/dist/i18n/locales/de.js +74 -5
  135. package/dist/i18n/locales/el.d.ts +72 -3
  136. package/dist/i18n/locales/el.js +74 -5
  137. package/dist/i18n/locales/en.d.ts +72 -3
  138. package/dist/i18n/locales/en.js +73 -4
  139. package/dist/i18n/locales/es.d.ts +72 -3
  140. package/dist/i18n/locales/es.js +74 -5
  141. package/dist/i18n/locales/fr.d.ts +72 -3
  142. package/dist/i18n/locales/fr.js +74 -5
  143. package/dist/i18n/locales/hi.d.ts +72 -3
  144. package/dist/i18n/locales/hi.js +74 -5
  145. package/dist/i18n/locales/it.d.ts +83 -14
  146. package/dist/i18n/locales/it.js +84 -15
  147. package/dist/i18n/locales/ja.d.ts +72 -3
  148. package/dist/i18n/locales/ja.js +74 -5
  149. package/dist/i18n/locales/nl.d.ts +72 -3
  150. package/dist/i18n/locales/nl.js +74 -5
  151. package/dist/i18n/locales/pl.d.ts +72 -3
  152. package/dist/i18n/locales/pl.js +74 -5
  153. package/dist/i18n/locales/pt.d.ts +72 -3
  154. package/dist/i18n/locales/pt.js +74 -5
  155. package/dist/i18n/locales/ro.d.ts +72 -3
  156. package/dist/i18n/locales/ro.js +74 -5
  157. package/dist/i18n/locales/ru.d.ts +72 -3
  158. package/dist/i18n/locales/ru.js +74 -5
  159. package/dist/i18n/locales/sq.d.ts +72 -3
  160. package/dist/i18n/locales/sq.js +74 -5
  161. package/dist/i18n/locales/sv.d.ts +72 -3
  162. package/dist/i18n/locales/sv.js +74 -5
  163. package/dist/i18n/locales/tr.d.ts +72 -3
  164. package/dist/i18n/locales/tr.js +74 -5
  165. package/dist/i18n/locales/zh.d.ts +72 -3
  166. package/dist/i18n/locales/zh.js +74 -5
  167. package/dist/index.js +1329 -1318
  168. package/dist/locales/ar.json +74 -5
  169. package/dist/locales/de.json +74 -5
  170. package/dist/locales/el.json +74 -5
  171. package/dist/locales/en.json +73 -4
  172. package/dist/locales/es.json +74 -5
  173. package/dist/locales/fr.json +74 -5
  174. package/dist/locales/hi.json +74 -5
  175. package/dist/locales/it.json +84 -15
  176. package/dist/locales/ja.json +74 -5
  177. package/dist/locales/nl.json +74 -5
  178. package/dist/locales/pl.json +74 -5
  179. package/dist/locales/pt.json +74 -5
  180. package/dist/locales/ro.json +74 -5
  181. package/dist/locales/ru.json +74 -5
  182. package/dist/locales/sq.json +74 -5
  183. package/dist/locales/sv.json +74 -5
  184. package/dist/locales/tr.json +74 -5
  185. package/dist/locales/zh.json +74 -5
  186. package/dist/online-bookings-panel/index.js +69 -0
  187. package/dist/patterns/alia-assistant/index.js +1 -1
  188. package/dist/patterns/anamnesis/index.js +1 -1
  189. package/dist/patterns/calendar/booking-tools/appointment-editor-panel.d.ts +46 -0
  190. package/dist/patterns/calendar/booking-tools/booking-tools-data.d.ts +48 -0
  191. package/dist/patterns/calendar/booking-tools/calendar-action-buttons.d.ts +55 -0
  192. package/dist/patterns/calendar/booking-tools/find-free-slots-panel.d.ts +35 -0
  193. package/dist/patterns/calendar/booking-tools/online-bookings-panel.d.ts +61 -0
  194. package/dist/patterns/calendar/booking-tools/waiting-list-panel.d.ts +58 -0
  195. package/dist/patterns/calendar/calendar-editor-discard-host.d.ts +20 -0
  196. package/dist/patterns/calendar/calendar-print-sheet.d.ts +16 -0
  197. package/dist/patterns/calendar/calendar-workspace.model.d.ts +7 -0
  198. package/dist/patterns/calendar/calendar.model.d.ts +9 -0
  199. package/dist/patterns/calendar/calendar.sheets.d.ts +59 -17
  200. package/dist/patterns/calendar/index.js +24 -20
  201. package/dist/patterns/patient-account-settings/index.js +1 -1
  202. package/dist/patterns/patient-check-in/index.js +1 -1
  203. package/dist/patterns/patient-portal/index.js +2 -2
  204. package/dist/patterns/patient-sign-in/index.js +2 -2
  205. package/dist/patterns/registration-form/index.js +1 -1
  206. package/dist/patterns/signature-request/index.js +1 -1
  207. package/dist/tokens.css +1 -1
  208. package/dist/waiting-list-panel/index.js +158 -0
  209. package/package.json +35 -2
  210. package/dist/_chunks/ai-summary-panel-B70S2lgC.js +0 -455
  211. package/dist/_chunks/calendar-appointment-editor-dialog-I5PfWudy.js +0 -13773
  212. package/dist/_chunks/color-picker-AcaWuKah.js +0 -745
  213. package/dist/_chunks/communications-panel-BKPHCiMB.js +0 -973
  214. package/dist/_chunks/entity-summary-CpNk6ybN.js +0 -266
  215. package/dist/_chunks/task-editor-DvwqPfFR.js +0 -1257
  216. package/dist/_chunks/use-appointment-details-read-6_OmOwUs.js +0 -2476
@@ -1,21 +1,21 @@
1
- import { jsxs as v, jsx as o, Fragment as ve } from "react/jsx-runtime";
2
- import { forwardRef as ye, useId as be, useRef as w, useCallback as q, useImperativeHandle as xe, useMemo as Ie } from "react";
3
- import { c as ke } from "./index-D2ZczOXr.js";
4
- import { useTranslation as we } from "react-i18next";
5
- import { I as A } from "./icon-button-S8_weU3g.js";
6
- import { u as Ce } from "./use-controllable-state-BiY4xTzM.js";
7
- import { u as Ne } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
8
- import { u as Ve } from "./registry-DvAUVLHh.js";
9
- import { c as je } from "./createLucideIcon-DhHxpK9K.js";
10
- import { C as ze } from "./circle-alert-rGDZ73Wh.js";
11
- import { S as He } from "./send-C5kDJ-Mz.js";
1
+ import { jsxs as v, jsx as o, Fragment as we } from "react/jsx-runtime";
2
+ import { forwardRef as ke, useId as Ce, useRef as C, useCallback as G, useImperativeHandle as Ne, useMemo as Ve } from "react";
3
+ import { c as je } from "./index-D2ZczOXr.js";
4
+ import { useTranslation as ze } from "react-i18next";
5
+ import { I as U } from "./icon-button-S8_weU3g.js";
6
+ import { u as He } from "./use-controllable-state-BiY4xTzM.js";
7
+ import { u as Te } from "./use-isomorphic-layout-effect-BGfaCOP1.js";
8
+ import { u as Ee } from "./registry-DvAUVLHh.js";
9
+ import { c as Me } from "./createLucideIcon-DhHxpK9K.js";
10
+ import { C as Fe } from "./circle-alert-rGDZ73Wh.js";
11
+ import { S as Ke } from "./send-C5kDJ-Mz.js";
12
12
  /**
13
13
  * @license lucide-react v1.22.0 - ISC
14
14
  *
15
15
  * This source code is licensed under the ISC license.
16
16
  * See the LICENSE file in the root directory of this source tree.
17
17
  */
18
- const Se = [
18
+ const Re = [
19
19
  [
20
20
  "path",
21
21
  {
@@ -23,7 +23,7 @@ const Se = [
23
23
  key: "1miecu"
24
24
  }
25
25
  ]
26
- ], Te = je("paperclip", Se), Ee = {
26
+ ], Se = Me("paperclip", Re), Be = {
27
27
  id: "chat-input",
28
28
  capabilities: ["edit_inline", "submit"],
29
29
  state: {
@@ -77,7 +77,7 @@ const Se = [
77
77
  // the message to a backend / model — an external side effect.
78
78
  openWorld: !0,
79
79
  descriptionKey: "ui.agent.chatInput.actions.submit",
80
- description: "Submit the current composer state via onSubmit.",
80
+ description: "Submit the current composer state via onSubmit. An empty composer is submitted only when allowEmptySubmit is set; otherwise nothing is sent.",
81
81
  invoke: (t) => {
82
82
  t.submit();
83
83
  }
@@ -103,15 +103,15 @@ const Se = [
103
103
  description: "Sourced from the id prop."
104
104
  }
105
105
  }
106
- }, Me = ke(
106
+ }, Pe = je(
107
107
  [
108
108
  "ds:flex ds:flex-col ds:gap-[var(--spacing-xs)] ds:w-full",
109
- // Uses the kit's shared input-chrome tokens — `--input` for fill,
110
- // `--shadow-input` for the halo. The 1px edge is `--control-border`
109
+ // A raised composer: the card surface and `--shadow-card`, the same
110
+ // elevation as the ChatMessage bubbles above it. The 1px edge is `--control-border`
111
111
  // (3:1 in every theme), so the field reads by its edge alone and the
112
112
  // focus-within override and forced-colors fallback still paint over it.
113
113
  "ds:rounded-[var(--radius-md)] ds:border ds:border-[color:var(--control-border)]",
114
- "ds:bg-input ds:shadow-[var(--shadow-input)]",
114
+ "ds:bg-[var(--card)] ds:shadow-[var(--shadow-card)]",
115
115
  "ds:focus-within:border-[color:var(--primary)]",
116
116
  // The focus ring goes round the whole box, as PhoneInput's does: on the
117
117
  // textarea it drew a second outline across the box's own edge. The 1px
@@ -134,7 +134,7 @@ const Se = [
134
134
  defaultVariants: { size: "md" }
135
135
  }
136
136
  );
137
- function Fe(t, a) {
137
+ function _e(t, a) {
138
138
  if (typeof Intl < "u" && typeof Intl.Segmenter == "function")
139
139
  try {
140
140
  const l = new Intl.Segmenter(a, { granularity: "grapheme" });
@@ -145,7 +145,7 @@ function Fe(t, a) {
145
145
  }
146
146
  return Array.from(t).length;
147
147
  }
148
- function Ke(t, a, l) {
148
+ function $e(t, a, l) {
149
149
  if (typeof Intl < "u" && typeof Intl.Segmenter == "function")
150
150
  try {
151
151
  const y = new Intl.Segmenter(l, { granularity: "grapheme" }), i = [];
@@ -158,7 +158,7 @@ function Ke(t, a, l) {
158
158
  const r = Array.from(t);
159
159
  return r.length <= a ? t : r.slice(0, a).join("");
160
160
  }
161
- const Re = ye(
161
+ const We = ke(
162
162
  ({
163
163
  size: t = "md",
164
164
  value: a,
@@ -169,117 +169,122 @@ const Re = ye(
169
169
  maxRows: d = 8,
170
170
  onSubmit: u,
171
171
  onAttach: b,
172
- accept: G,
172
+ accept: Y,
173
173
  disabled: x,
174
- submitDisabled: T = !1,
175
- toolbar: U,
176
- label: E,
177
- placeholder: Y,
178
- className: J,
179
- onChange: C,
180
- onKeyDown: N,
181
- onCompositionStart: V,
182
- onCompositionEnd: j,
183
- id: z,
184
- ...L
185
- }, O) => {
186
- const { t: c, i18n: M } = we("ui"), Q = be(), p = w(!1), F = w(null), I = w(null), X = q((e) => {
187
- I.current = e;
188
- }, []), [Z, m] = Ce({
174
+ submitDisabled: M = !1,
175
+ toolbar: J,
176
+ label: F,
177
+ hideLabel: L = !1,
178
+ sendLabel: O,
179
+ sendIcon: Q,
180
+ allowEmptySubmit: K = !1,
181
+ submitShortcut: I = !0,
182
+ placeholder: X,
183
+ className: Z,
184
+ onChange: N,
185
+ onKeyDown: V,
186
+ onCompositionStart: j,
187
+ onCompositionEnd: z,
188
+ id: H,
189
+ ...D
190
+ }, ee) => {
191
+ const { t: c, i18n: R } = ze("ui"), te = Ce(), p = C(!1), S = C(null), w = C(null), se = G((e) => {
192
+ w.current = e;
193
+ }, []), [re, f] = He({
189
194
  value: a === void 0 ? void 0 : String(a),
190
195
  defaultValue: String(l ?? "")
191
- }), n = Z ?? "", H = Fe(n, M.language), f = typeof r == "number" && r > 0, D = f ? Math.max(0, r - H) : 0, ee = f && H > r * 0.9, h = f && H >= r, K = q(() => {
192
- const e = I.current;
196
+ }), n = re ?? "", T = _e(n, R.language), m = typeof r == "number" && r > 0, ae = m ? Math.max(0, r - T) : 0, ne = m && T > r * 0.9, h = m && T >= r, B = G(() => {
197
+ const e = w.current;
193
198
  if (!e) return;
194
- const s = window.getComputedStyle(e), k = parseFloat(s.lineHeight) || 24, ue = parseFloat(s.paddingTop) || 0, pe = parseFloat(s.paddingBottom) || 0, me = parseFloat(s.borderTopWidth) || 0, fe = parseFloat(s.borderBottomWidth) || 0, $ = ue + pe + me + fe, he = k * i + $, W = k * d + $;
199
+ const s = window.getComputedStyle(e), k = parseFloat(s.lineHeight) || 24, ge = parseFloat(s.paddingTop) || 0, ve = parseFloat(s.paddingBottom) || 0, ye = parseFloat(s.borderTopWidth) || 0, be = parseFloat(s.borderBottomWidth) || 0, A = ge + ve + ye + be, xe = k * i + A, q = k * d + A;
195
200
  e.style.height = "auto";
196
- const ge = Math.max(he, Math.min(e.scrollHeight, W));
197
- e.style.height = `${ge}px`, e.style.overflowY = e.scrollHeight > W ? "auto" : "hidden";
201
+ const Ie = Math.max(xe, Math.min(e.scrollHeight, q));
202
+ e.style.height = `${Ie}px`, e.style.overflowY = e.scrollHeight > q ? "auto" : "hidden";
198
203
  }, [i, d]);
199
- Ne(() => {
200
- K();
201
- }, [K, n]);
202
- const te = (e) => {
204
+ Te(() => {
205
+ B();
206
+ }, [B, n]);
207
+ const oe = (e) => {
203
208
  let s = e.target.value;
204
- f && !p.current && (s = Ke(s, r, M.language)), m(s), !p.current && (C == null || C(e));
205
- }, se = (e) => {
206
- p.current = !0, V == null || V(e);
207
- }, re = (e) => {
208
- p.current = !1, j == null || j(e);
209
- }, ae = (e) => e.nativeEvent.isComposing || e.keyCode === 229 || p.current, S = () => {
209
+ m && !p.current && (s = $e(s, r, R.language)), f(s), !p.current && (N == null || N(e));
210
+ }, ie = (e) => {
211
+ p.current = !0, j == null || j(e);
212
+ }, ce = (e) => {
213
+ p.current = !1, z == null || z(e);
214
+ }, le = (e) => e.nativeEvent.isComposing || e.keyCode === 229 || p.current, E = () => {
210
215
  var s;
211
- !n.trim() || x || T || h || (u == null || u(n), m(""), (s = I.current) == null || s.focus());
212
- }, R = w(null);
213
- xe(O, () => R.current, []);
214
- const ne = Ie(
216
+ !n.trim() && !K || x || M || h || (u == null || u(n), f(""), (s = w.current) == null || s.focus());
217
+ }, P = C(null);
218
+ Ne(ee, () => P.current, []);
219
+ const de = Ve(
215
220
  () => ({
216
221
  getValue: () => n,
217
222
  isEmpty: () => !n.trim(),
218
223
  setValue: (e) => {
219
- m(e);
224
+ f(e);
220
225
  },
221
226
  clear: () => {
222
- m("");
227
+ f("");
223
228
  },
224
229
  submit: () => {
225
- S();
230
+ E();
226
231
  },
227
232
  focus: () => {
228
233
  var e;
229
- (e = I.current) == null || e.focus();
234
+ (e = w.current) == null || e.focus();
230
235
  }
231
236
  }),
232
237
  // `submit` is a local closure that always sees the latest currentValue
233
238
  // via React's render cycle — depend on currentValue so the handle
234
239
  // picks up new values across renders.
235
240
  // eslint-disable-next-line react-hooks/exhaustive-deps
236
- [n, m]
241
+ [n, f]
237
242
  );
238
- Ve(Ee, ne, z);
239
- const oe = (e) => {
240
- if (N == null || N(e), !e.defaultPrevented && !ae(e) && e.key === "Enter") {
241
- const s = e.metaKey || e.ctrlKey, k = y && !e.shiftKey;
242
- (s || k) && (e.preventDefault(), S());
243
+ Ee(Be, de, H);
244
+ const ue = (e) => {
245
+ if (V == null || V(e), !e.defaultPrevented && !le(e) && e.key === "Enter") {
246
+ const s = I && (e.metaKey || e.ctrlKey), k = y && !e.shiftKey;
247
+ (s || k) && (e.preventDefault(), E());
243
248
  }
244
- }, ie = () => {
249
+ }, pe = () => {
245
250
  var e;
246
- (e = F.current) == null || e.click();
247
- }, ce = (e) => {
251
+ (e = S.current) == null || e.click();
252
+ }, fe = (e) => {
248
253
  e.target.files && e.target.files.length > 0 && (b == null || b(e.target.files)), e.target.value = "";
249
- }, g = z ?? Q, B = `${g}-label`, P = f ? `${g}-counter` : void 0, _ = `${g}-hint`, le = Y ?? c("chat.input.placeholder"), de = E ?? c("chat.prompt");
254
+ }, g = H ?? te, _ = `${g}-label`, $ = m ? `${g}-counter` : void 0, W = `${g}-hint`, me = X ?? c("chat.input.placeholder"), he = F ?? c("chat.prompt");
250
255
  return /* @__PURE__ */ v(
251
256
  "div",
252
257
  {
253
- ref: R,
258
+ ref: P,
254
259
  "data-component": "chat-input",
255
- "data-component-id": z,
256
- className: Me({ size: t, className: J }),
260
+ "data-component-id": H,
261
+ className: Pe({ size: t, className: Z }),
257
262
  children: [
258
263
  /* @__PURE__ */ o(
259
264
  "label",
260
265
  {
261
- id: B,
266
+ id: _,
262
267
  htmlFor: g,
263
- className: E ? "type-label ds:ps-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)]" : "ds:sr-only",
264
- children: de
268
+ className: F && !L ? "type-label ds:ps-[var(--spacing-sm)] ds:pt-[var(--spacing-sm)]" : "ds:sr-only",
269
+ children: he
265
270
  }
266
271
  ),
267
272
  /* @__PURE__ */ o(
268
273
  "textarea",
269
274
  {
270
- ref: X,
275
+ ref: se,
271
276
  id: g,
272
277
  value: n,
273
278
  disabled: x,
274
279
  rows: i,
275
- placeholder: le,
276
- "aria-labelledby": B,
277
- "aria-describedby": [P, _].filter(Boolean).join(" ") || void 0,
280
+ placeholder: me,
281
+ "aria-labelledby": _,
282
+ "aria-describedby": [$, I ? W : void 0].filter(Boolean).join(" ") || void 0,
278
283
  "aria-invalid": h || void 0,
279
- onChange: te,
280
- onKeyDown: oe,
281
- onCompositionStart: se,
282
- onCompositionEnd: re,
284
+ onChange: oe,
285
+ onKeyDown: ue,
286
+ onCompositionStart: ie,
287
+ onCompositionEnd: ce,
283
288
  className: [
284
289
  "ds:w-full ds:resize-none ds:bg-transparent",
285
290
  "ds:ps-[var(--spacing-md)] ds:pe-[var(--spacing-md)] ds:pt-[var(--spacing-sm)] ds:pb-[var(--spacing-xs)]",
@@ -289,42 +294,42 @@ const Re = ye(
289
294
  // The box draws the focus ring (see rootVariants).
290
295
  "ds:outline-none"
291
296
  ].join(" "),
292
- ...L
297
+ ...D
293
298
  }
294
299
  ),
295
300
  /* @__PURE__ */ v("div", { className: "ds:flex ds:items-center ds:gap-[var(--spacing-xs)] ds:ps-[var(--spacing-xs)] ds:pe-[var(--spacing-xs)] ds:pb-[var(--spacing-xs)]", children: [
296
- b ? /* @__PURE__ */ v(ve, { children: [
301
+ b ? /* @__PURE__ */ v(we, { children: [
297
302
  /* @__PURE__ */ o(
298
303
  "input",
299
304
  {
300
- ref: F,
305
+ ref: S,
301
306
  type: "file",
302
307
  className: "ds:sr-only",
303
308
  multiple: !0,
304
- accept: G,
305
- onChange: ce,
309
+ accept: Y,
310
+ onChange: fe,
306
311
  "aria-label": c("chat.input.attach"),
307
312
  tabIndex: -1
308
313
  }
309
314
  ),
310
315
  /* @__PURE__ */ o(
311
- A,
316
+ U,
312
317
  {
313
- icon: /* @__PURE__ */ o(Te, {}),
318
+ icon: /* @__PURE__ */ o(Se, {}),
314
319
  "aria-label": c("chat.input.attach"),
315
320
  intent: "ghost",
316
321
  size: "sm",
317
- onClick: ie,
322
+ onClick: pe,
318
323
  disabled: x
319
324
  }
320
325
  )
321
326
  ] }) : null,
322
- U,
327
+ J,
323
328
  /* @__PURE__ */ v("div", { className: "ds:ms-auto ds:inline-flex ds:items-center ds:gap-[var(--spacing-sm)]", children: [
324
- ee ? /* @__PURE__ */ v(
329
+ ne ? /* @__PURE__ */ v(
325
330
  "span",
326
331
  {
327
- id: P,
332
+ id: $,
328
333
  "aria-live": "polite",
329
334
  className: [
330
335
  "ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]",
@@ -335,23 +340,23 @@ const Re = ye(
335
340
  h ? (
336
341
  // Icon pairs with --destructive colour so the at-limit
337
342
  // state is not conveyed by hue alone (WCAG 1.4.1).
338
- /* @__PURE__ */ o(ze, { "aria-hidden": "true", className: "ds:size-3.5" })
343
+ /* @__PURE__ */ o(Fe, { "aria-hidden": "true", className: "ds:size-3.5" })
339
344
  ) : null,
340
- c("chat.input.remaining", { count: D })
345
+ c("chat.input.remaining", { count: ae })
341
346
  ]
342
347
  }
343
348
  ) : null,
344
- /* @__PURE__ */ o("span", { id: _, className: "ds:sr-only", children: c("chat.input.sendHint") }),
349
+ I ? /* @__PURE__ */ o("span", { id: W, className: "ds:sr-only", children: c("chat.input.sendHint") }) : null,
345
350
  /* @__PURE__ */ o(
346
- A,
351
+ U,
347
352
  {
348
- icon: /* @__PURE__ */ o(He, {}),
349
- "aria-label": c("chat.send"),
353
+ icon: Q ?? /* @__PURE__ */ o(Ke, {}),
354
+ "aria-label": O ?? c("chat.send"),
350
355
  intent: "primary",
351
356
  size: "sm",
352
- disabled: x || T || !n.trim() || h,
353
- onClick: S,
354
- "aria-keyshortcuts": "Meta+Enter Control+Enter"
357
+ disabled: x || M || !n.trim() && !K || h,
358
+ onClick: E,
359
+ "aria-keyshortcuts": I ? "Meta+Enter Control+Enter" : void 0
355
360
  }
356
361
  )
357
362
  ] })
@@ -361,10 +366,10 @@ const Re = ye(
361
366
  );
362
367
  }
363
368
  );
364
- Re.displayName = "ChatInput";
369
+ We.displayName = "ChatInput";
365
370
  export {
366
- Re as C,
367
- Te as P,
368
- Ee as c
371
+ We as C,
372
+ Se as P,
373
+ Be as c
369
374
  };
370
- //# sourceMappingURL=chat-input-CX4dxBq7.js.map
375
+ //# sourceMappingURL=chat-input-BmvnuZqj.js.map
@@ -1,5 +1,5 @@
1
- import { jsxs as d, jsx as a } from "react/jsx-runtime";
2
- import { forwardRef as T, useMemo as z, Fragment as l } from "react";
1
+ import { jsxs as i, jsx as a } from "react/jsx-runtime";
2
+ import { forwardRef as j, useMemo as z, Fragment as l } from "react";
3
3
  import { c as h } from "./index-D2ZczOXr.js";
4
4
  import { useTranslation as B } from "react-i18next";
5
5
  import { B as F } from "./button-DohK_Ak_.js";
@@ -38,8 +38,13 @@ const _ = h(
38
38
  {
39
39
  variants: {
40
40
  role: {
41
- user: "ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:rounded-[var(--radius-md)] ds:rounded-ee-[var(--radius-sm)]",
42
- assistant: "ds:bg-muted/40 ds:text-foreground ds:rounded-[var(--radius-md)] ds:rounded-es-[var(--radius-sm)]",
41
+ // Both bubbles rest on the card elevation (`--shadow-card`). The
42
+ // received one is a card surface with the `--card-border` hairline,
43
+ // so it still reads where shadows are off (accessible themes, forced
44
+ // colours). The sent one stays on `--primary`; its edge is the same
45
+ // colour as its fill, so it adds no visible outline.
46
+ user: "ds:bg-[color:var(--primary)] ds:text-[color:var(--primary-foreground)] ds:rounded-[var(--radius-md)] ds:rounded-ee-[var(--radius-sm)] ds:shadow-[var(--shadow-card)] ds:forced-colors:border ds:forced-colors:border-[CanvasText]",
47
+ assistant: "ds:bg-[var(--card)] ds:text-[color:var(--card-foreground)] ds:border ds:border-[color:var(--card-border)] ds:shadow-[var(--shadow-card)] ds:rounded-[var(--radius-md)] ds:rounded-es-[var(--radius-sm)]",
43
48
  system: "ds:bg-transparent ds:text-[color:var(--muted-foreground)] type-body-sm ds:italic"
44
49
  }
45
50
  },
@@ -84,38 +89,38 @@ function q(n) {
84
89
  function G(n) {
85
90
  return M(n).map((e, r) => e.type === "code" ? /* @__PURE__ */ a(S, { code: e.value, language: e.lang }, r) : /* @__PURE__ */ a(l, { children: q(e.value) }, r));
86
91
  }
87
- const J = T(
92
+ const J = j(
88
93
  ({
89
94
  role: n,
90
95
  content: e,
91
96
  avatar: r,
92
97
  timestamp: t,
93
98
  status: s,
94
- renderMarkdown: x = !1,
95
- onRetry: m,
96
- actions: c,
97
- body: b,
99
+ renderMarkdown: b = !1,
100
+ onRetry: c,
101
+ actions: m,
102
+ body: x,
98
103
  className: y,
99
- ...N
100
- }, w) => {
101
- const { t: i, i18n: u } = B("ui"), o = z(() => {
104
+ ...w
105
+ }, N) => {
106
+ const { t: d, i18n: u } = B("ui"), o = z(() => {
102
107
  if (!t) return null;
103
- const v = t instanceof Date ? t : new Date(t);
104
- return Number.isNaN(v.getTime()) ? null : new Intl.DateTimeFormat(u.language, {
108
+ const g = t instanceof Date ? t : new Date(t);
109
+ return Number.isNaN(g.getTime()) ? null : new Intl.DateTimeFormat(u.language, {
105
110
  hour: "2-digit",
106
111
  minute: "2-digit"
107
- }).format(v);
108
- }, [t, u.language]), f = i(`chat.message.role.${n}`), C = o ? i("chat.message.label", { role: f, time: o }) : i("chat.message.labelNoTime", { role: f }), j = b ?? (x ? G(e) : e), p = !s || s === "edited" ? null : s === "sending" ? /* @__PURE__ */ a(E, { "aria-hidden": "true", className: "ds:size-3.5" }) : s === "sent" ? /* @__PURE__ */ a(L, { "aria-hidden": "true", className: "ds:size-3.5" }) : /* @__PURE__ */ a(
112
+ }).format(g);
113
+ }, [t, u.language]), f = d(`chat.message.role.${n}`), C = o ? d("chat.message.label", { role: f, time: o }) : d("chat.message.labelNoTime", { role: f }), T = x ?? (b ? G(e) : e), p = !s || s === "edited" ? null : s === "sending" ? /* @__PURE__ */ a(E, { "aria-hidden": "true", className: "ds:size-3.5" }) : s === "sent" ? /* @__PURE__ */ a(L, { "aria-hidden": "true", className: "ds:size-3.5" }) : /* @__PURE__ */ a(
109
114
  R,
110
115
  {
111
116
  "aria-hidden": "true",
112
117
  className: "ds:size-3.5 ds:text-[color:var(--destructive)]"
113
118
  }
114
- ), g = s ? i(`chat.message.status.${s}`) : null;
115
- return /* @__PURE__ */ d(
119
+ ), v = s ? d(`chat.message.status.${s}`) : null;
120
+ return /* @__PURE__ */ i(
116
121
  "article",
117
122
  {
118
- ref: w,
123
+ ref: N,
119
124
  "aria-label": C,
120
125
  "data-component": "chat-message",
121
126
  "data-role": n,
@@ -128,7 +133,7 @@ const J = T(
128
133
  "ds:motion-safe:animate-in ds:motion-safe:fade-in-0 ds:motion-safe:slide-in-from-bottom-2",
129
134
  "ds:duration-[var(--animation-duration)] ds:ease-[var(--ease-out)]"
130
135
  ].join(" "),
131
- ...N,
136
+ ...w,
132
137
  children: [
133
138
  n !== "system" && r ? r.slot ? (
134
139
  // Consumer-supplied avatar node (e.g. Alia's Astroid tile).
@@ -146,7 +151,7 @@ const J = T(
146
151
  }
147
152
  )
148
153
  ) : null,
149
- /* @__PURE__ */ d(
154
+ /* @__PURE__ */ i(
150
155
  "div",
151
156
  {
152
157
  className: [
@@ -170,10 +175,10 @@ const J = T(
170
175
  // bubble wider than its parent in narrow docks like Alia.
171
176
  "ds:[overflow-wrap:anywhere]"
172
177
  ].join(" "),
173
- children: j
178
+ children: T
174
179
  }
175
180
  ),
176
- (o || g) && n !== "system" ? /* @__PURE__ */ d(
181
+ (o || v) && n !== "system" ? /* @__PURE__ */ i(
177
182
  "div",
178
183
  {
179
184
  className: [
@@ -194,7 +199,7 @@ const J = T(
194
199
  // `key={status}` re-mounts the span on every status change so
195
200
  // `animate-in` re-runs — gives the sending → sent → error
196
201
  // swap a subtle cross-fade instead of an abrupt pop.
197
- /* @__PURE__ */ d(
202
+ /* @__PURE__ */ i(
198
203
  "span",
199
204
  {
200
205
  className: [
@@ -204,26 +209,26 @@ const J = T(
204
209
  ].join(" "),
205
210
  children: [
206
211
  p,
207
- /* @__PURE__ */ a("span", { className: "ds:sr-only", children: g })
212
+ /* @__PURE__ */ a("span", { className: "ds:sr-only", children: v })
208
213
  ]
209
214
  },
210
215
  s
211
216
  )
212
217
  ) : null,
213
- s === "error" && m ? /* @__PURE__ */ a(
218
+ s === "error" && c ? /* @__PURE__ */ a(
214
219
  F,
215
220
  {
216
221
  intent: "ghost",
217
222
  size: "sm",
218
- onClick: m,
223
+ onClick: c,
219
224
  startIcon: /* @__PURE__ */ a(D, {}),
220
- children: i("chat.message.retry")
225
+ children: d("chat.message.retry")
221
226
  }
222
227
  ) : null
223
228
  ]
224
229
  }
225
230
  ) : null,
226
- c ? /* @__PURE__ */ a("div", { className: "ds:mt-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: c }) : null
231
+ m ? /* @__PURE__ */ a("div", { className: "ds:mt-[var(--spacing-xs)] ds:inline-flex ds:items-center ds:gap-[var(--spacing-xs)]", children: m }) : null
227
232
  ]
228
233
  }
229
234
  )
@@ -236,4 +241,4 @@ J.displayName = "ChatMessage";
236
241
  export {
237
242
  J as C
238
243
  };
239
- //# sourceMappingURL=chat-message-CfIyXrxA.js.map
244
+ //# sourceMappingURL=chat-message-B4TMeZ2m.js.map
@@ -0,0 +1,16 @@
1
+ import { c } from "./createLucideIcon-DhHxpK9K.js";
2
+ /**
3
+ * @license lucide-react v1.22.0 - ISC
4
+ *
5
+ * This source code is licensed under the ISC license.
6
+ * See the LICENSE file in the root directory of this source tree.
7
+ */
8
+ const e = [
9
+ ["circle", { cx: "12", cy: "12", r: "10", key: "1mglay" }],
10
+ ["path", { d: "m15 9-6 6", key: "1uzhvr" }],
11
+ ["path", { d: "m9 9 6 6", key: "z0biqf" }]
12
+ ], o = c("circle-x", e);
13
+ export {
14
+ o as C
15
+ };
16
+ //# sourceMappingURL=circle-x-W8Enq3i4.js.map