@photon-ai/pho-ui 4.25.0 → 4.27.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 (125) hide show
  1. package/README.md +2 -2
  2. package/dist/chunks/{avatar-PgBOfszL.js → avatar-BJvgi8ON.js} +24 -30
  3. package/dist/chunks/avatar-BJvgi8ON.js.map +1 -0
  4. package/dist/chunks/{basic-page-DYBjCadG.js → basic-page-DSPzDKrZ.js} +80 -83
  5. package/dist/chunks/basic-page-DSPzDKrZ.js.map +1 -0
  6. package/dist/chunks/{box-search-CMl5bQ7Y.js → box-search-DD2EPtDy.js} +18 -19
  7. package/dist/chunks/box-search-DD2EPtDy.js.map +1 -0
  8. package/dist/chunks/{calendar-DDWITGo4.js → calendar-s-QRks1Z.js} +66 -69
  9. package/dist/chunks/calendar-s-QRks1Z.js.map +1 -0
  10. package/dist/chunks/{chat-D98GCjbe.js → chat-D6SGRahp.js} +226 -276
  11. package/dist/chunks/chat-D6SGRahp.js.map +1 -0
  12. package/dist/chunks/{checkbox-D8smFViR.js → checkbox-B3fVczYP.js} +2 -2
  13. package/dist/chunks/checkbox-B3fVczYP.js.map +1 -0
  14. package/dist/chunks/{close-button-Ck4rY1Fp.js → close-button-Bwv_OoCZ.js} +2 -2
  15. package/dist/chunks/close-button-Bwv_OoCZ.js.map +1 -0
  16. package/dist/chunks/{code-block-CthLWfxd.js → code-block-CiZWZBO2.js} +169 -238
  17. package/dist/chunks/code-block-CiZWZBO2.js.map +1 -0
  18. package/dist/chunks/copy-button-DNNZu6r4.js +69 -0
  19. package/dist/chunks/copy-button-DNNZu6r4.js.map +1 -0
  20. package/dist/chunks/{data-table-C1tLUdw0.js → data-table-CshUlqIu.js} +11 -12
  21. package/dist/chunks/data-table-CshUlqIu.js.map +1 -0
  22. package/dist/chunks/{date-picker-D-sWo3i8.js → date-picker-BaAkim2u.js} +126 -151
  23. package/dist/chunks/date-picker-BaAkim2u.js.map +1 -0
  24. package/dist/chunks/{description-list-DcTvBHzI.js → description-list-VTNz1MmJ.js} +2 -2
  25. package/dist/chunks/{description-list-DcTvBHzI.js.map → description-list-VTNz1MmJ.js.map} +1 -1
  26. package/dist/chunks/{dialog-H72fZGtf.js → dialog-C116Qr0w.js} +2 -2
  27. package/dist/chunks/{dialog-H72fZGtf.js.map → dialog-C116Qr0w.js.map} +1 -1
  28. package/dist/chunks/{filter-bar-D_sBAT5Y.js → filter-bar-DI5JO1Cd.js} +63 -72
  29. package/dist/chunks/filter-bar-DI5JO1Cd.js.map +1 -0
  30. package/dist/chunks/{ghost-search-CMUI2UH0.js → ghost-search-DhADxaWi.js} +11 -12
  31. package/dist/chunks/ghost-search-DhADxaWi.js.map +1 -0
  32. package/dist/chunks/icons-eq5FZ3Yc.js +1254 -0
  33. package/dist/chunks/icons-eq5FZ3Yc.js.map +1 -0
  34. package/dist/chunks/{input-DWnb33UF.js → input-hrrPhzXp.js} +37 -56
  35. package/dist/chunks/input-hrrPhzXp.js.map +1 -0
  36. package/dist/chunks/{select-Dux2SBVc.js → select-DlyDd7AB.js} +10 -10
  37. package/dist/chunks/select-DlyDd7AB.js.map +1 -0
  38. package/dist/chunks/{sidebar-ttBkgGRh.js → sidebar-DTRcoxrB.js} +95 -111
  39. package/dist/chunks/sidebar-DTRcoxrB.js.map +1 -0
  40. package/dist/chunks/{toast-Cbnn8lcA.js → toast-Btwu5Kjk.js} +7 -7
  41. package/dist/chunks/toast-Btwu5Kjk.js.map +1 -0
  42. package/dist/chunks/{trace-ClMpG82z.js → trace-CKYAff2U.js} +498 -607
  43. package/dist/chunks/trace-CKYAff2U.js.map +1 -0
  44. package/dist/components/avatar.js +1 -1
  45. package/dist/components/button.js +1 -1
  46. package/dist/components/calendar.js +1 -1
  47. package/dist/components/chat.js +1 -1
  48. package/dist/components/checkbox.js +1 -1
  49. package/dist/components/code-block.js +1 -1
  50. package/dist/components/command.js +36 -37
  51. package/dist/components/command.js.map +1 -1
  52. package/dist/components/copy-button.js +1 -1
  53. package/dist/components/data-table.js +2 -2
  54. package/dist/components/date-picker.js +1 -1
  55. package/dist/components/description-list.js +1 -1
  56. package/dist/components/dialog.js +1 -1
  57. package/dist/components/error.js +252 -11
  58. package/dist/components/error.js.map +1 -0
  59. package/dist/components/filter-bar.js +1 -1
  60. package/dist/components/input.js +1 -1
  61. package/dist/components/notification.js +27 -34
  62. package/dist/components/notification.js.map +1 -1
  63. package/dist/components/phone-input.js +3 -4
  64. package/dist/components/phone-input.js.map +1 -1
  65. package/dist/components/scope.js +52 -53
  66. package/dist/components/scope.js.map +1 -1
  67. package/dist/components/select.js +1 -1
  68. package/dist/components/theme-toggle.js +69 -95
  69. package/dist/components/theme-toggle.js.map +1 -1
  70. package/dist/components/toast.js +1 -1
  71. package/dist/components/trace.js +1 -1
  72. package/dist/icons.js +235 -78
  73. package/dist/icons.js.map +1 -1
  74. package/dist/index.js +158 -158
  75. package/dist/sections/basic-page.js +2 -2
  76. package/dist/sections/sidebar.js +1 -1
  77. package/dist/src/components/avatar/avatar.d.ts +1 -1
  78. package/dist/src/components/notification/notification.d.ts +2 -2
  79. package/dist/src/components/trace/decorations.d.ts +3 -3
  80. package/dist/src/icons/index.d.ts +1 -0
  81. package/dist/src/icons/photon/icons.d.ts +315 -0
  82. package/dist/src/icons/photon/index.d.ts +2 -0
  83. package/dist/src/icons/photon/photon-icon.d.ts +51 -0
  84. package/package.json +5 -3
  85. package/src/styles/fonts.css +2 -1
  86. package/src/styles/theme.css +3 -1
  87. package/dist/chunks/IconArrowUpRight-OK8Fp0KQ.js +0 -14
  88. package/dist/chunks/IconArrowUpRight-OK8Fp0KQ.js.map +0 -1
  89. package/dist/chunks/IconCheck-DwSMn1wK.js +0 -11
  90. package/dist/chunks/IconCheck-DwSMn1wK.js.map +0 -1
  91. package/dist/chunks/IconChevronDown-Cd68NnX2.js +0 -11
  92. package/dist/chunks/IconChevronDown-Cd68NnX2.js.map +0 -1
  93. package/dist/chunks/IconChevronLeft-CptqhdxO.js +0 -11
  94. package/dist/chunks/IconChevronLeft-CptqhdxO.js.map +0 -1
  95. package/dist/chunks/IconChevronRight-BNkXCTk6.js +0 -11
  96. package/dist/chunks/IconChevronRight-BNkXCTk6.js.map +0 -1
  97. package/dist/chunks/IconChevronUp-Bxllwz8J.js +0 -11
  98. package/dist/chunks/IconChevronUp-Bxllwz8J.js.map +0 -1
  99. package/dist/chunks/IconInfoCircle-CTAynhe8.js +0 -21
  100. package/dist/chunks/IconInfoCircle-CTAynhe8.js.map +0 -1
  101. package/dist/chunks/IconSearch-DkcWWZ1H.js +0 -14
  102. package/dist/chunks/IconSearch-DkcWWZ1H.js.map +0 -1
  103. package/dist/chunks/IconX-DnPlFC68.js +0 -14
  104. package/dist/chunks/IconX-DnPlFC68.js.map +0 -1
  105. package/dist/chunks/avatar-PgBOfszL.js.map +0 -1
  106. package/dist/chunks/basic-page-DYBjCadG.js.map +0 -1
  107. package/dist/chunks/box-search-CMl5bQ7Y.js.map +0 -1
  108. package/dist/chunks/calendar-DDWITGo4.js.map +0 -1
  109. package/dist/chunks/chat-D98GCjbe.js.map +0 -1
  110. package/dist/chunks/checkbox-D8smFViR.js.map +0 -1
  111. package/dist/chunks/close-button-Ck4rY1Fp.js.map +0 -1
  112. package/dist/chunks/code-block-CthLWfxd.js.map +0 -1
  113. package/dist/chunks/copy-button-BLvirhXk.js +0 -76
  114. package/dist/chunks/copy-button-BLvirhXk.js.map +0 -1
  115. package/dist/chunks/data-table-C1tLUdw0.js.map +0 -1
  116. package/dist/chunks/date-picker-D-sWo3i8.js.map +0 -1
  117. package/dist/chunks/error-BT71wcUd.js +0 -270
  118. package/dist/chunks/error-BT71wcUd.js.map +0 -1
  119. package/dist/chunks/filter-bar-D_sBAT5Y.js.map +0 -1
  120. package/dist/chunks/ghost-search-CMUI2UH0.js.map +0 -1
  121. package/dist/chunks/input-DWnb33UF.js.map +0 -1
  122. package/dist/chunks/select-Dux2SBVc.js.map +0 -1
  123. package/dist/chunks/sidebar-ttBkgGRh.js.map +0 -1
  124. package/dist/chunks/toast-Cbnn8lcA.js.map +0 -1
  125. package/dist/chunks/trace-ClMpG82z.js.map +0 -1
@@ -1,88 +1,38 @@
1
1
  "use client";
2
- import { t as g } from "./cn-CPbhpG1q.js";
3
- import { n as de } from "./link-provider-DXzDQ08N.js";
4
- import { FADE_SWAP as Q, PRESS_SCALE_ROW as fe, SPRING_PRESS as pe, TRAVEL_LINEAR as he } from "../motion.js";
5
- import { n as me } from "./spinner-BSutFL4l.js";
2
+ import { t as b } from "./cn-CPbhpG1q.js";
3
+ import { n as ue } from "./link-provider-DXzDQ08N.js";
4
+ import { FADE_SWAP as q, PRESS_SCALE_ROW as de, SPRING_PRESS as fe, TRAVEL_LINEAR as pe } from "../motion.js";
5
+ import { n as he } from "./spinner-BSutFL4l.js";
6
6
  import { a as F } from "./button-KM0lAQ4x.js";
7
- import { t as D } from "./createReactComponent-yKZn9MIX.js";
8
- import { t as ve } from "./input-DWnb33UF.js";
9
- import { n as J } from "./avatar-PgBOfszL.js";
10
- import { t as xe } from "./IconSearch-DkcWWZ1H.js";
11
- import { t as k } from "./scroll-area-DjdSnx2p.js";
12
- import { i as ge } from "./status-view-Buhh1UBJ.js";
7
+ import { Vn as me, _n as xe, d as ve, p as be, zn as we } from "./icons-eq5FZ3Yc.js";
8
+ import { t as ge } from "./input-hrrPhzXp.js";
9
+ import { t as R } from "./scroll-area-DjdSnx2p.js";
10
+ import { i as ye } from "./status-view-Buhh1UBJ.js";
11
+ import { n as Q } from "./avatar-BJvgi8ON.js";
13
12
  import { t as A } from "./skeleton-CqZlGphn.js";
14
- import { n as we } from "./box-search-CMl5bQ7Y.js";
15
- import { createContext as be, useCallback as O, useContext as ye, useEffect as re, useId as Ne, useLayoutEffect as Ce, useMemo as ne, useRef as S, useState as I } from "react";
16
- import { Fragment as ae, jsx as r, jsxs as N } from "react/jsx-runtime";
17
- import { AnimatePresence as Se, motion as z, useReducedMotion as ie } from "motion/react";
18
- var ke = [
19
- ["path", {
20
- d: "M5 12l14 0",
21
- key: "svg-0"
22
- }],
23
- ["path", {
24
- d: "M5 12l6 6",
25
- key: "svg-1"
26
- }],
27
- ["path", {
28
- d: "M5 12l6 -6",
29
- key: "svg-2"
30
- }]
31
- ], Re = D("outline", "arrow-left", "ArrowLeft", ke), _e = [
32
- ["path", {
33
- d: "M12 5l0 14",
34
- key: "svg-0"
35
- }],
36
- ["path", {
37
- d: "M18 11l-6 -6",
38
- key: "svg-1"
39
- }],
40
- ["path", {
41
- d: "M6 11l6 -6",
42
- key: "svg-2"
43
- }]
44
- ], Ae = D("outline", "arrow-up", "ArrowUp", _e), Pe = [["path", {
45
- d: "M8 7a4 4 0 1 0 8 0a4 4 0 0 0 -8 0",
46
- key: "svg-0"
47
- }], ["path", {
48
- d: "M6 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",
49
- key: "svg-1"
50
- }]], Ie = D("outline", "user", "User", Pe), Te = [
51
- ["path", {
52
- d: "M5 7a4 4 0 1 0 8 0a4 4 0 1 0 -8 0",
53
- key: "svg-0"
54
- }],
55
- ["path", {
56
- d: "M3 21v-2a4 4 0 0 1 4 -4h4a4 4 0 0 1 4 4v2",
57
- key: "svg-1"
58
- }],
59
- ["path", {
60
- d: "M16 3.13a4 4 0 0 1 0 7.75",
61
- key: "svg-2"
62
- }],
63
- ["path", {
64
- d: "M21 21v-2a4 4 0 0 0 -3 -3.85",
65
- key: "svg-3"
66
- }]
67
- ], Me = D("outline", "users", "Users", Te), Le = "rounded-base border border-pho-secondary bg-pho-primary", Ee = 672, Oe = 24, ze = 8, oe = "min-h-[61px]", De = 273, P = 256, V = 320, He = 16;
68
- function Y(t, e) {
69
- const a = Math.max(P, t);
70
- return e <= 0 ? Number.isFinite(a) ? a : P : Math.min(a, Math.max(P, e - V));
13
+ import { n as Ne } from "./box-search-DD2EPtDy.js";
14
+ import { createContext as Ce, useCallback as M, useContext as Se, useEffect as te, useId as Re, useLayoutEffect as Pe, useMemo as re, useRef as S, useState as T } from "react";
15
+ import { Fragment as ne, jsx as r, jsxs as N } from "react/jsx-runtime";
16
+ import { AnimatePresence as _e, motion as z, useReducedMotion as ae } from "motion/react";
17
+ var Ae = "rounded-base border border-pho-secondary bg-pho-primary", Ie = 672, Te = 24, ke = 8, ie = "min-h-[61px]", Ee = 273, I = 256, V = 320, Le = 16;
18
+ function J(t, e) {
19
+ const a = Math.max(I, t);
20
+ return e <= 0 ? Number.isFinite(a) ? a : I : Math.min(a, Math.max(I, e - V));
71
21
  }
72
- var se = be(null);
73
- function M(t) {
74
- const e = ye(se);
22
+ var se = Ce(null);
23
+ function E(t) {
24
+ const e = Se(se);
75
25
  if (e == null) throw new Error(`Chat.${t} must be used inside Chat.Root`);
76
26
  return e;
77
27
  }
78
- var T = typeof window > "u" ? re : Ce;
79
- function W(t) {
28
+ var k = typeof window > "u" ? te : Pe;
29
+ function H(t) {
80
30
  return t === "thread" ? 1 : -1;
81
31
  }
82
- function We(t, e) {
83
- return t === "compact" || t === "auto" && e > 0 && e < Ee;
32
+ function Oe(t, e) {
33
+ return t === "compact" || t === "auto" && e > 0 && e < Ie;
84
34
  }
85
- function E(t, e) {
35
+ function O(t, e) {
86
36
  return e ? {
87
37
  initial: { opacity: 0 },
88
38
  animate: { opacity: 1 },
@@ -90,7 +40,7 @@ function E(t, e) {
90
40
  transition: { duration: 0 }
91
41
  } : {
92
42
  initial: {
93
- x: t * Oe,
43
+ x: t * Te,
94
44
  opacity: 0,
95
45
  filter: "blur(1px)"
96
46
  },
@@ -100,122 +50,122 @@ function E(t, e) {
100
50
  filter: "blur(0px)"
101
51
  },
102
52
  exit: {
103
- x: -t * ze,
53
+ x: -t * ke,
104
54
  opacity: 0,
105
55
  filter: "blur(1px)"
106
56
  },
107
57
  transition: {
108
- x: he,
109
- opacity: Q,
110
- filter: Q
58
+ x: pe,
59
+ opacity: q,
60
+ filter: q
111
61
  }
112
62
  };
113
63
  }
114
- function Ue(t) {
64
+ function Me(t) {
115
65
  return {
116
- enter: (e) => E(e, t).initial,
117
- rest: (e) => E(e, t).animate,
118
- leave: (e) => E(e, t).exit
66
+ enter: (e) => O(e, t).initial,
67
+ rest: (e) => O(e, t).animate,
68
+ leave: (e) => O(e, t).exit
119
69
  };
120
70
  }
121
- function le({ as: t, show: e, swapped: a, direction: s, reduceMotion: o, children: d, ...c }) {
122
- const u = E(s, o), h = {
123
- custom: s,
124
- variants: Ue(o),
71
+ function oe({ as: t, show: e, swapped: a, direction: o, reduceMotion: s, children: d, ...l }) {
72
+ const u = O(o, s), h = {
73
+ custom: o,
74
+ variants: Me(s),
125
75
  initial: "enter",
126
76
  animate: "rest",
127
77
  exit: "leave",
128
78
  transition: u.transition
129
79
  };
130
- return /* @__PURE__ */ r(Se, {
80
+ return /* @__PURE__ */ r(_e, {
131
81
  initial: !a && e ? !1 : void 0,
132
82
  mode: "popLayout",
133
- custom: s,
83
+ custom: o,
134
84
  children: e ? t === "aside" ? /* @__PURE__ */ r(z.aside, {
135
- ...c,
85
+ ...l,
136
86
  ...h,
137
87
  children: d
138
88
  }, "list") : /* @__PURE__ */ r(z.section, {
139
- ...c,
89
+ ...l,
140
90
  ...h,
141
91
  children: d
142
92
  }, "thread") : null
143
93
  });
144
94
  }
145
- function Ve({ layout: t = "default", pane: e, defaultPane: a = "list", onPaneChange: s, className: o, style: d, ref: c, ...u }) {
146
- const [h, w] = I(a), [y, m] = I(De), [i, p] = I(0), f = S(null), v = e !== void 0, x = v ? e : h, [b, n] = I(() => W(x)), [l, R] = I(!1), L = S(x);
147
- let _ = b, H = l;
148
- L.current !== x && (_ = W(x), H = !0, L.current = x, _ !== b && n(_), l || R(!0));
149
- const $ = O((C) => {
150
- n(W(C)), v || w(C), s?.(C);
151
- }, [v, s]), j = O((C) => {
152
- m(Y(C, f.current?.clientWidth ?? 0));
153
- }, []), B = We(t, i);
154
- T(() => {
95
+ function ze({ layout: t = "default", pane: e, defaultPane: a = "list", onPaneChange: o, className: s, style: d, ref: l, ...u }) {
96
+ const [h, w] = T(a), [y, m] = T(Ee), [i, p] = T(0), f = S(null), x = e !== void 0, v = x ? e : h, [g, n] = T(() => H(v)), [c, P] = T(!1), L = S(v);
97
+ let _ = g, D = c;
98
+ L.current !== v && (_ = H(v), D = !0, L.current = v, _ !== g && n(_), c || P(!0));
99
+ const U = M((C) => {
100
+ n(H(C)), x || w(C), o?.(C);
101
+ }, [x, o]), $ = M((C) => {
102
+ m(J(C, f.current?.clientWidth ?? 0));
103
+ }, []), j = Oe(t, i);
104
+ k(() => {
155
105
  const C = f.current;
156
106
  if (!C || typeof ResizeObserver > "u") return;
157
- const K = () => {
158
- const q = C.clientWidth;
159
- p(q), m((ue) => Y(ue, q));
107
+ const B = () => {
108
+ const G = C.clientWidth;
109
+ p(G), m((le) => J(le, G));
160
110
  };
161
- K();
162
- const G = new ResizeObserver(K);
163
- return G.observe(C), () => G.disconnect();
111
+ B();
112
+ const K = new ResizeObserver(B);
113
+ return K.observe(C), () => K.disconnect();
164
114
  }, []);
165
- const ce = ne(() => ({
115
+ const ce = re(() => ({
166
116
  layout: t,
167
- pane: x,
168
- setPane: $,
117
+ pane: v,
118
+ setPane: U,
169
119
  direction: _,
170
- swap: B,
171
- swapped: H,
120
+ swap: j,
121
+ swapped: D,
172
122
  listWidth: y,
173
123
  frameWidth: i,
174
- resizeList: j,
124
+ resizeList: $,
175
125
  rootRef: f
176
126
  }), [
177
127
  t,
178
- x,
179
- $,
128
+ v,
129
+ U,
180
130
  _,
181
- B,
182
- H,
131
+ j,
132
+ D,
183
133
  y,
184
134
  i,
185
- j
135
+ $
186
136
  ]);
187
137
  return /* @__PURE__ */ r(se.Provider, {
188
138
  value: ce,
189
139
  children: /* @__PURE__ */ r("div", {
190
140
  ref: (C) => {
191
- f.current = C, typeof c == "function" ? c(C) : c && (c.current = C);
141
+ f.current = C, typeof l == "function" ? l(C) : l && (l.current = C);
192
142
  },
193
143
  "data-chat": "",
194
144
  "data-basic-page-card": "",
195
145
  "data-layout": t,
196
- "data-pane": x,
146
+ "data-pane": v,
197
147
  style: {
198
148
  ...d,
199
149
  "--chat-list-width": `${y}px`
200
150
  },
201
- className: g(Le, "@container relative flex min-h-0 min-w-0 overflow-hidden", o),
151
+ className: b(Ae, "@container relative flex min-h-0 min-w-0 overflow-hidden", s),
202
152
  ...u
203
153
  })
204
154
  });
205
155
  }
206
- function Xe({ className: t, children: e, id: a, ...s }) {
207
- const { layout: o, pane: d, direction: c, swap: u, swapped: h } = M("List"), w = ie(), y = Ne(), m = a ?? y, i = g("border-pho-secondary bg-pho-page relative z-10 flex min-h-0 shrink-0 flex-col", o === "default" && "min-w-64 w-[var(--chat-list-width)] border-r", o === "compact" && "w-full", o === "auto" && g("w-full @2xl:min-w-64 @2xl:w-[var(--chat-list-width)] @2xl:border-r", !u && d === "thread" && "@max-2xl:hidden"), t), p = /* @__PURE__ */ N(ae, { children: [e, o !== "compact" && /* @__PURE__ */ r(Fe, { controlsId: m })] }), f = {
156
+ function De({ className: t, children: e, id: a, ...o }) {
157
+ const { layout: s, pane: d, direction: l, swap: u, swapped: h } = E("List"), w = ae(), y = Re(), m = a ?? y, i = b("border-pho-secondary bg-pho-page relative z-10 flex min-h-0 shrink-0 flex-col", s === "default" && "min-w-64 w-[var(--chat-list-width)] border-r", s === "compact" && "w-full", s === "auto" && b("w-full @2xl:min-w-64 @2xl:w-[var(--chat-list-width)] @2xl:border-r", !u && d === "thread" && "@max-2xl:hidden"), t), p = /* @__PURE__ */ N(ne, { children: [e, s !== "compact" && /* @__PURE__ */ r(He, { controlsId: m })] }), f = {
208
158
  id: m,
209
159
  "aria-label": "Conversations",
210
160
  "data-chat-list": "",
211
161
  className: i,
212
- ...s
162
+ ...o
213
163
  };
214
- return u ? /* @__PURE__ */ r(le, {
164
+ return u ? /* @__PURE__ */ r(oe, {
215
165
  as: "aside",
216
166
  show: d === "list",
217
167
  swapped: h,
218
- direction: c,
168
+ direction: l,
219
169
  reduceMotion: w,
220
170
  ...f,
221
171
  children: p
@@ -224,40 +174,40 @@ function Xe({ className: t, children: e, id: a, ...s }) {
224
174
  children: p
225
175
  });
226
176
  }
227
- function Fe({ controlsId: t }) {
228
- const { layout: e, listWidth: a, frameWidth: s, resizeList: o, rootRef: d } = M("Splitter"), c = S(null), u = (i) => {
229
- i.button === 0 && (i.currentTarget.setPointerCapture?.(i.pointerId), c.current = {
177
+ function He({ controlsId: t }) {
178
+ const { layout: e, listWidth: a, frameWidth: o, resizeList: s, rootRef: d } = E("Splitter"), l = S(null), u = (i) => {
179
+ i.button === 0 && (i.currentTarget.setPointerCapture?.(i.pointerId), l.current = {
230
180
  x: i.clientX,
231
181
  width: a
232
182
  });
233
183
  }, h = (i) => {
234
- const p = c.current;
184
+ const p = l.current;
235
185
  if (p == null) return;
236
- const f = d.current, v = f != null && getComputedStyle(f).direction === "rtl", x = (i.clientX - p.x) * (v ? -1 : 1);
237
- o(p.width + x);
186
+ const f = d.current, x = f != null && getComputedStyle(f).direction === "rtl", v = (i.clientX - p.x) * (x ? -1 : 1);
187
+ s(p.width + v);
238
188
  }, w = () => {
239
- c.current = null;
189
+ l.current = null;
240
190
  }, y = (i) => {
241
- const p = d.current, f = p != null && getComputedStyle(p).direction === "rtl", v = f ? "ArrowRight" : "ArrowLeft", x = f ? "ArrowLeft" : "ArrowRight", b = i.shiftKey ? 32 : He;
242
- if (i.key === v)
243
- i.preventDefault(), o(a - b);
244
- else if (i.key === x)
245
- i.preventDefault(), o(a + b);
191
+ const p = d.current, f = p != null && getComputedStyle(p).direction === "rtl", x = f ? "ArrowRight" : "ArrowLeft", v = f ? "ArrowLeft" : "ArrowRight", g = i.shiftKey ? 32 : Le;
192
+ if (i.key === x)
193
+ i.preventDefault(), s(a - g);
194
+ else if (i.key === v)
195
+ i.preventDefault(), s(a + g);
246
196
  else if (i.key === "Home")
247
- i.preventDefault(), o(P);
197
+ i.preventDefault(), s(I);
248
198
  else if (i.key === "End") {
249
199
  i.preventDefault();
250
200
  const n = p?.clientWidth ?? 0;
251
- n > 0 && o(n - V);
201
+ n > 0 && s(n - V);
252
202
  }
253
- }, m = s > 0 ? Math.max(P, s - V) : a;
203
+ }, m = o > 0 ? Math.max(I, o - V) : a;
254
204
  return /* @__PURE__ */ r("div", {
255
205
  role: "separator",
256
206
  "aria-orientation": "vertical",
257
207
  "aria-label": "Resize conversation list",
258
208
  "aria-controls": t,
259
209
  "aria-valuenow": a,
260
- "aria-valuemin": P,
210
+ "aria-valuemin": I,
261
211
  "aria-valuemax": m,
262
212
  "aria-valuetext": `${a} pixels`,
263
213
  tabIndex: 0,
@@ -267,61 +217,61 @@ function Fe({ controlsId: t }) {
267
217
  onPointerUp: w,
268
218
  onPointerCancel: w,
269
219
  onKeyDown: y,
270
- className: g("absolute inset-y-0 -right-3 z-10 w-6 cursor-col-resize touch-none select-none", "outline-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-2", "after:absolute after:inset-y-0 after:left-1/2 after:w-px after:-translate-x-1/2 after:bg-transparent", "[@media(hover:hover)]:hover:after:bg-pho-brand focus-visible:after:bg-pho-brand", e === "auto" && "@max-2xl:hidden")
220
+ className: b("absolute inset-y-0 -right-3 z-10 w-6 cursor-col-resize touch-none select-none", "outline-pho-brand focus-visible:outline-2 focus-visible:-outline-offset-2", "after:absolute after:inset-y-0 after:left-1/2 after:w-px after:-translate-x-1/2 after:bg-transparent", "[@media(hover:hover)]:hover:after:bg-pho-brand focus-visible:after:bg-pho-brand", e === "auto" && "@max-2xl:hidden")
271
221
  });
272
222
  }
273
- function $e({ className: t, wrapperClassName: e, placeholder: a = "Search", ...s }) {
223
+ function We({ className: t, wrapperClassName: e, placeholder: a = "Search", ...o }) {
274
224
  return /* @__PURE__ */ r("div", {
275
225
  "data-chat-search": "",
276
- className: g("p-3", oe, t),
277
- children: /* @__PURE__ */ r(ve, {
226
+ className: b("p-3", ie, t),
227
+ children: /* @__PURE__ */ r(ge, {
278
228
  size: "sm",
279
229
  icon: xe,
280
230
  placeholder: a,
281
231
  "aria-label": "Search conversations",
282
232
  autoComplete: "off",
283
233
  spellCheck: !1,
284
- wrapperClassName: g(we, "[&:focus-within>svg]:text-pho-primary [&>svg]:transition-colors [&>svg]:duration-100", e),
285
- ...s
234
+ wrapperClassName: b(Ne, "[&:focus-within>svg]:text-pho-primary [&>svg]:transition-colors [&>svg]:duration-100", e),
235
+ ...o
286
236
  })
287
237
  });
288
238
  }
289
- function je({ className: t, children: e, ...a }) {
239
+ function Ve({ className: t, children: e, ...a }) {
290
240
  return /* @__PURE__ */ r("div", {
291
241
  "data-chat-conversations": "",
292
- className: g("flex min-h-0 flex-1 flex-col", t),
242
+ className: b("flex min-h-0 flex-1 flex-col", t),
293
243
  ...a,
294
- children: /* @__PURE__ */ N(k.Root, {
244
+ children: /* @__PURE__ */ N(R.Root, {
295
245
  className: "min-h-0 flex-1",
296
- children: [/* @__PURE__ */ r(k.Viewport, { children: /* @__PURE__ */ r(k.Content, {
246
+ children: [/* @__PURE__ */ r(R.Viewport, { children: /* @__PURE__ */ r(R.Content, {
297
247
  style: { minWidth: 0 },
298
248
  className: "flex min-h-full flex-col px-3 py-1",
299
249
  children: e
300
- }) }), /* @__PURE__ */ r(k.Scrollbar, { children: /* @__PURE__ */ r(k.Thumb, {}) })]
250
+ }) }), /* @__PURE__ */ r(R.Scrollbar, { children: /* @__PURE__ */ r(R.Thumb, {}) })]
301
251
  })
302
252
  });
303
253
  }
304
- function Be({ className: t, ...e }) {
254
+ function Xe({ className: t, ...e }) {
305
255
  return /* @__PURE__ */ r("ul", {
306
256
  "data-chat-conversation-list": "",
307
- className: g("m-0 flex list-none flex-col gap-0.5 *:m-0", t),
257
+ className: b("m-0 flex list-none flex-col gap-0.5 *:m-0", t),
308
258
  ...e
309
259
  });
310
260
  }
311
- var Ke = "outline-pho-brand rounded-base flex w-full cursor-pointer items-center gap-3 px-2 py-2.5 text-left transition-colors focus-visible:outline-2 focus-visible:-outline-offset-1", Ge = "bg-pho-primary text-pho-primary ring-pho-secondary ring-1 ring-inset *:data-icon:text-pho-primary", qe = "hover:bg-pho-ghost-hover", Z = {
261
+ var Fe = "outline-pho-brand rounded-base flex w-full cursor-pointer items-center gap-3 px-2 py-2.5 text-left transition-colors focus-visible:outline-2 focus-visible:-outline-offset-1", Ue = "bg-pho-primary text-pho-primary ring-pho-secondary ring-1 ring-inset *:data-icon:text-pho-primary", $e = "hover:bg-pho-ghost-hover", Y = {
312
262
  initial: !1,
313
- whileTap: { scale: fe },
314
- transition: pe
263
+ whileTap: { scale: de },
264
+ transition: fe
315
265
  };
316
- function Qe({ title: t, time: e, preview: a, avatar: s, group: o, active: d, className: c, href: u, onClick: h, ...w }) {
317
- const { layout: y, setPane: m } = M("Conversation"), i = de(), p = ne(() => z.create(i), [i]), f = g(Ke, d ? Ge : qe, c), v = () => {
266
+ function je({ title: t, time: e, preview: a, avatar: o, group: s, active: d, className: l, href: u, onClick: h, ...w }) {
267
+ const { layout: y, setPane: m } = E("Conversation"), i = ue(), p = re(() => z.create(i), [i]), f = b(Fe, d ? Ue : $e, l), x = () => {
318
268
  y !== "default" && m("thread");
319
- }, x = /* @__PURE__ */ N(ae, { children: [s ?? /* @__PURE__ */ r(J.Root, {
269
+ }, v = /* @__PURE__ */ N(ne, { children: [o ?? /* @__PURE__ */ r(Q.Root, {
320
270
  size: "sm",
321
- children: /* @__PURE__ */ r(J.Fallback, { children: o ? /* @__PURE__ */ r(Me, {
271
+ children: /* @__PURE__ */ r(Q.Fallback, { children: s ? /* @__PURE__ */ r(me, {
322
272
  className: "size-4",
323
273
  "aria-hidden": !0
324
- }) : /* @__PURE__ */ r(Ie, {
274
+ }) : /* @__PURE__ */ r(we, {
325
275
  className: "size-4",
326
276
  "aria-hidden": !0
327
277
  }) })
@@ -345,29 +295,29 @@ function Qe({ title: t, time: e, preview: a, avatar: s, group: o, active: d, cla
345
295
  href: u,
346
296
  "aria-current": d ? "page" : void 0,
347
297
  ...w,
348
- onClick: (b) => {
349
- h?.(b), b.defaultPrevented || v();
298
+ onClick: (g) => {
299
+ h?.(g), g.defaultPrevented || x();
350
300
  },
351
301
  className: f,
352
- ...Z,
353
- children: x
302
+ ...Y,
303
+ children: v
354
304
  }) }) : /* @__PURE__ */ r("li", { children: /* @__PURE__ */ r(z.button, {
355
305
  type: "button",
356
306
  "aria-current": d ? "true" : void 0,
357
307
  ...w,
358
- onClick: (b) => {
359
- h?.(b), b.defaultPrevented || v();
308
+ onClick: (g) => {
309
+ h?.(g), g.defaultPrevented || x();
360
310
  },
361
311
  className: f,
362
- ...Z,
363
- children: x
312
+ ...Y,
313
+ children: v
364
314
  }) });
365
315
  }
366
- function Je({ className: t, children: e, ...a }) {
367
- const { layout: s, pane: o, direction: d, swap: c, swapped: u } = M("Thread"), h = ie(), w = g("bg-pho-primary flex min-h-0 flex-1 flex-col", s === "default" && "min-w-80", s === "compact" && "min-w-0", s === "auto" && "min-w-0 @2xl:min-w-80", !c && s === "auto" && o === "list" && "@max-2xl:hidden", t);
368
- return c ? /* @__PURE__ */ r(le, {
316
+ function Be({ className: t, children: e, ...a }) {
317
+ const { layout: o, pane: s, direction: d, swap: l, swapped: u } = E("Thread"), h = ae(), w = b("bg-pho-primary flex min-h-0 flex-1 flex-col", o === "default" && "min-w-80", o === "compact" && "min-w-0", o === "auto" && "min-w-0 @2xl:min-w-80", !l && o === "auto" && s === "list" && "@max-2xl:hidden", t);
318
+ return l ? /* @__PURE__ */ r(oe, {
369
319
  as: "section",
370
- show: o === "thread",
320
+ show: s === "thread",
371
321
  swapped: u,
372
322
  direction: d,
373
323
  reduceMotion: h,
@@ -384,28 +334,28 @@ function Je({ className: t, children: e, ...a }) {
384
334
  children: e
385
335
  });
386
336
  }
387
- function Ye({ avatar: t, actions: e, backLabel: a = "Back to conversations", className: s, children: o, ...d }) {
388
- const { layout: c, setPane: u } = M("Header");
337
+ function Ke({ avatar: t, actions: e, backLabel: a = "Back to conversations", className: o, children: s, ...d }) {
338
+ const { layout: l, setPane: u } = E("Header");
389
339
  return /* @__PURE__ */ N("header", {
390
340
  "data-chat-header": "",
391
- className: g("flex shrink-0 items-center gap-3 px-4 py-1.5", oe, s),
341
+ className: b("flex shrink-0 items-center gap-3 px-4 py-1.5", ie, o),
392
342
  ...d,
393
343
  children: [
394
- c !== "default" && /* @__PURE__ */ r(F, {
344
+ l !== "default" && /* @__PURE__ */ r(F, {
395
345
  variant: "ghost",
396
346
  size: "sm",
397
347
  shape: "circle",
398
348
  svgOnly: !0,
399
349
  "aria-label": a,
400
350
  "data-chat-back": "",
401
- className: g("-ml-1 shrink-0", c === "auto" && "@2xl:hidden"),
351
+ className: b("-ml-1 shrink-0", l === "auto" && "@2xl:hidden"),
402
352
  onClick: () => u("list"),
403
- children: /* @__PURE__ */ r(Re, {})
353
+ children: /* @__PURE__ */ r(ve, {})
404
354
  }),
405
355
  t,
406
356
  /* @__PURE__ */ r("div", {
407
357
  className: "flex min-w-0 flex-1 flex-col",
408
- children: o
358
+ children: s
409
359
  }),
410
360
  e != null && /* @__PURE__ */ r("div", {
411
361
  className: "flex shrink-0 items-center gap-1",
@@ -414,104 +364,104 @@ function Ye({ avatar: t, actions: e, backLabel: a = "Back to conversations", cla
414
364
  ]
415
365
  });
416
366
  }
417
- function Ze({ className: t, children: e, ...a }) {
367
+ function Ge({ className: t, children: e, ...a }) {
418
368
  return /* @__PURE__ */ r("h2", {
419
369
  "data-chat-title": "",
420
- className: g("text-pho-primary font-heading m-0 flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 overflow-visible text-base font-medium", t),
370
+ className: b("text-pho-primary font-heading m-0 flex min-w-0 flex-wrap items-center gap-x-2 gap-y-0.5 overflow-visible text-base font-medium", t),
421
371
  ...a,
422
372
  children: e
423
373
  });
424
374
  }
425
- function et({ className: t, ...e }) {
375
+ function qe({ className: t, ...e }) {
426
376
  return /* @__PURE__ */ r("p", {
427
377
  "data-chat-description": "",
428
- className: g("text-pho-description m-0 min-w-0 truncate text-xs", t),
378
+ className: b("text-pho-description m-0 min-w-0 truncate text-xs", t),
429
379
  ...e
430
380
  });
431
381
  }
432
- var ee = 40, tt = "200px 0px 0px 0px";
433
- function U(t, e) {
382
+ var Z = 40, Qe = "200px 0px 0px 0px";
383
+ function W(t, e) {
434
384
  return e.getBoundingClientRect().top - t.getBoundingClientRect().top;
435
385
  }
436
386
  function X(t) {
437
387
  return t != null && t.isConnected && t.getClientRects().length > 0;
438
388
  }
439
- function te(t) {
389
+ function ee(t) {
440
390
  const e = t?.querySelector("[data-message]") ?? null;
441
391
  return X(e) ? e : null;
442
392
  }
443
- function rt({ hasEarlier: t = !1, loadingEarlier: e = !1, onLoadEarlier: a, earlierLabel: s = "Load earlier messages", className: o, children: d, ...c }) {
393
+ function Je({ hasEarlier: t = !1, loadingEarlier: e = !1, onLoadEarlier: a, earlierLabel: o = "Load earlier messages", className: s, children: d, ...l }) {
444
394
  const u = S(null), h = S(null), w = S(null), y = S(!0), m = S(null), i = S(e), p = S(!1), f = S(a);
445
- T(() => {
395
+ k(() => {
446
396
  f.current = a;
447
397
  });
448
- const v = O(() => {
398
+ const x = M(() => {
449
399
  const n = u.current;
450
400
  if (!n) return;
451
- const l = m.current;
452
- if (l) {
453
- if (X(l.row) ? n.scrollTop += U(n, l.row) - l.offset : n.scrollTop = n.scrollHeight - l.height + l.top, i.current) return;
454
- m.current = null, y.current = n.scrollHeight - n.scrollTop - n.clientHeight < ee;
401
+ const c = m.current;
402
+ if (c) {
403
+ if (X(c.row) ? n.scrollTop += W(n, c.row) - c.offset : n.scrollTop = n.scrollHeight - c.height + c.top, i.current) return;
404
+ m.current = null, y.current = n.scrollHeight - n.scrollTop - n.clientHeight < Z;
455
405
  return;
456
406
  }
457
407
  y.current && (n.scrollTop = n.scrollHeight);
458
408
  }, []);
459
- T(() => {
460
- const n = u.current, l = h.current;
461
- if (!n || !l || (v(), typeof ResizeObserver > "u")) return;
462
- const R = new ResizeObserver(v);
463
- return R.observe(l), R.observe(n), () => R.disconnect();
464
- }, [v]), T(() => {
409
+ k(() => {
410
+ const n = u.current, c = h.current;
411
+ if (!n || !c || (x(), typeof ResizeObserver > "u")) return;
412
+ const P = new ResizeObserver(x);
413
+ return P.observe(c), P.observe(n), () => P.disconnect();
414
+ }, [x]), k(() => {
465
415
  if (i.current = e, e) return;
466
416
  const n = m.current;
467
- n && (p.current = te(h.current) === n.row), v();
468
- }, [e, v]);
469
- const x = () => {
417
+ n && (p.current = ee(h.current) === n.row), x();
418
+ }, [e, x]);
419
+ const v = () => {
470
420
  const n = u.current;
471
421
  if (!n) return;
472
- const l = m.current;
473
- l && (l.height = n.scrollHeight, l.top = n.scrollTop, X(l.row) && (l.offset = U(n, l.row))), y.current = n.scrollHeight - n.scrollTop - n.clientHeight < ee;
474
- }, b = O(() => {
422
+ const c = m.current;
423
+ c && (c.height = n.scrollHeight, c.top = n.scrollTop, X(c.row) && (c.offset = W(n, c.row))), y.current = n.scrollHeight - n.scrollTop - n.clientHeight < Z;
424
+ }, g = M(() => {
475
425
  const n = u.current;
476
426
  if (n) {
477
- const l = te(h.current);
427
+ const c = ee(h.current);
478
428
  m.current = {
479
- row: l,
480
- offset: l ? U(n, l) : 0,
429
+ row: c,
430
+ offset: c ? W(n, c) : 0,
481
431
  height: n.scrollHeight,
482
432
  top: n.scrollTop
483
433
  };
484
434
  }
485
435
  y.current = !1, f.current?.();
486
436
  }, []);
487
- return re(() => {
488
- const n = u.current, l = w.current;
437
+ return te(() => {
438
+ const n = u.current, c = w.current;
489
439
  if (!t) {
490
440
  p.current = !1;
491
441
  return;
492
442
  }
493
- if (e || p.current || !n || !l || typeof IntersectionObserver > "u") return;
494
- const R = new IntersectionObserver((L) => {
495
- L.some((_) => _.isIntersecting) && b();
443
+ if (e || p.current || !n || !c || typeof IntersectionObserver > "u") return;
444
+ const P = new IntersectionObserver((L) => {
445
+ L.some((_) => _.isIntersecting) && g();
496
446
  }, {
497
447
  root: n,
498
- rootMargin: tt
448
+ rootMargin: Qe
499
449
  });
500
- return R.observe(l), () => R.disconnect();
450
+ return P.observe(c), () => P.disconnect();
501
451
  }, [
502
452
  t,
503
453
  e,
504
- b
454
+ g
505
455
  ]), /* @__PURE__ */ r("div", {
506
456
  "data-chat-messages": "",
507
- className: g("flex min-h-0 flex-1 flex-col [--pho-bubble-backdrop:var(--background-color-pho-primary)]", o),
508
- ...c,
509
- children: /* @__PURE__ */ N(k.Root, {
457
+ className: b("flex min-h-0 flex-1 flex-col [--pho-bubble-backdrop:var(--background-color-pho-primary)]", s),
458
+ ...l,
459
+ children: /* @__PURE__ */ N(R.Root, {
510
460
  className: "min-h-0 flex-1",
511
- children: [/* @__PURE__ */ r(k.Viewport, {
461
+ children: [/* @__PURE__ */ r(R.Viewport, {
512
462
  ref: u,
513
- onScroll: x,
514
- children: /* @__PURE__ */ N(k.Content, {
463
+ onScroll: v,
464
+ children: /* @__PURE__ */ N(R.Content, {
515
465
  ref: h,
516
466
  style: { minWidth: 0 },
517
467
  className: "flex min-h-full flex-col gap-1 p-4",
@@ -520,55 +470,55 @@ function rt({ hasEarlier: t = !1, loadingEarlier: e = !1, onLoadEarlier: a, earl
520
470
  "data-chat-earlier": "",
521
471
  "aria-busy": e || void 0,
522
472
  className: "flex min-h-8 items-center justify-center",
523
- children: e ? /* @__PURE__ */ r(me, {
473
+ children: e ? /* @__PURE__ */ r(he, {
524
474
  "aria-label": "Loading earlier messages",
525
475
  className: "text-pho-secondary"
526
476
  }) : /* @__PURE__ */ r(F, {
527
477
  variant: "outlined",
528
478
  size: "sm",
529
479
  onClick: (n) => {
530
- n.currentTarget === document.activeElement && u.current?.focus({ preventScroll: !0 }), p.current = !1, b();
480
+ n.currentTarget === document.activeElement && u.current?.focus({ preventScroll: !0 }), p.current = !1, g();
531
481
  },
532
- children: s
482
+ children: o
533
483
  })
534
484
  }), d]
535
485
  })
536
- }), /* @__PURE__ */ r(k.Scrollbar, { children: /* @__PURE__ */ r(k.Thumb, {}) })]
486
+ }), /* @__PURE__ */ r(R.Scrollbar, { children: /* @__PURE__ */ r(R.Thumb, {}) })]
537
487
  })
538
488
  });
539
489
  }
540
- function nt({ className: t, children: e, ...a }) {
490
+ function Ye({ className: t, children: e, ...a }) {
541
491
  return /* @__PURE__ */ r("div", {
542
492
  "data-chat-divider": "",
543
- className: g("text-pho-description py-1 text-center text-xs", t),
493
+ className: b("text-pho-description py-1 text-center text-xs", t),
544
494
  ...a,
545
495
  children: e
546
496
  });
547
497
  }
548
- function at({ className: t, ...e }) {
498
+ function Ze({ className: t, ...e }) {
549
499
  return /* @__PURE__ */ r("footer", {
550
500
  "data-chat-footer": "",
551
- className: g("shrink-0 px-4 py-3", t),
501
+ className: b("shrink-0 px-4 py-3", t),
552
502
  ...e
553
503
  });
554
504
  }
555
- var it = 200;
556
- function ot({ value: t, onValueChange: e, onSend: a, placeholder: s = "Message", sending: o = !1, disabled: d = !1, canSend: c, prefix: u, meta: h, sendLabel: w = "Send", children: y, textareaRef: m, className: i, ...p }) {
557
- const f = S(null), v = !o && !d && (c ?? t.trim().length > 0);
558
- T(() => {
505
+ var et = 200;
506
+ function tt({ value: t, onValueChange: e, onSend: a, placeholder: o = "Message", sending: s = !1, disabled: d = !1, canSend: l, prefix: u, meta: h, sendLabel: w = "Send", children: y, textareaRef: m, className: i, ...p }) {
507
+ const f = S(null), x = !s && !d && (l ?? t.trim().length > 0);
508
+ k(() => {
559
509
  const n = f.current;
560
- n && (n.style.height = "0px", n.style.height = `${Math.min(n.scrollHeight, it)}px`);
510
+ n && (n.style.height = "0px", n.style.height = `${Math.min(n.scrollHeight, et)}px`);
561
511
  }, [t]);
562
- const x = (n) => {
563
- n.preventDefault(), v && a();
564
- }, b = (n) => {
565
- n.key === "Enter" && !n.shiftKey && !n.nativeEvent.isComposing && (n.preventDefault(), v && a());
512
+ const v = (n) => {
513
+ n.preventDefault(), x && a();
514
+ }, g = (n) => {
515
+ n.key === "Enter" && !n.shiftKey && !n.nativeEvent.isComposing && (n.preventDefault(), x && a());
566
516
  };
567
517
  return /* @__PURE__ */ N("form", {
568
518
  "aria-label": "Message composer",
569
519
  "data-chat-composer": "",
570
- onSubmit: x,
571
- className: g("rounded-base bg-pho-primary ring-pho-primary focus-within:ring-pho-brand ring-1 transition-shadow duration-100 ease-linear ring-inset focus-within:ring-2", d && "opacity-50", i),
520
+ onSubmit: v,
521
+ className: b("rounded-base bg-pho-primary ring-pho-primary focus-within:ring-pho-brand ring-1 transition-shadow duration-100 ease-linear ring-inset focus-within:ring-2", d && "opacity-50", i),
572
522
  ...p,
573
523
  children: [
574
524
  y,
@@ -578,12 +528,12 @@ function ot({ value: t, onValueChange: e, onSend: a, placeholder: s = "Message",
578
528
  },
579
529
  value: t,
580
530
  onChange: (n) => e(n.target.value),
581
- onKeyDown: b,
531
+ onKeyDown: g,
582
532
  rows: 1,
583
- placeholder: s,
533
+ placeholder: o,
584
534
  "aria-label": "Message",
585
535
  disabled: d,
586
- readOnly: o,
536
+ readOnly: s,
587
537
  className: "text-pho-primary placeholder:text-pho-placeholder m-0 block w-full resize-none bg-transparent px-4 pt-3 pb-1 text-base outline-none disabled:cursor-not-allowed"
588
538
  }),
589
539
  /* @__PURE__ */ N("div", {
@@ -600,26 +550,26 @@ function ot({ value: t, onValueChange: e, onSend: a, placeholder: s = "Message",
600
550
  shape: "circle",
601
551
  svgOnly: !0,
602
552
  "aria-label": w,
603
- disabled: !v,
604
- loading: o,
605
- children: /* @__PURE__ */ r(Ae, {})
553
+ disabled: !x,
554
+ loading: s,
555
+ children: /* @__PURE__ */ r(be, {})
606
556
  })
607
557
  ]
608
558
  })
609
559
  ]
610
560
  });
611
561
  }
612
- function st({ className: t, size: e = "sm", ...a }) {
562
+ function rt({ className: t, size: e = "sm", ...a }) {
613
563
  return /* @__PURE__ */ r("div", {
614
564
  "data-chat-empty": "",
615
- className: g("flex flex-1 flex-col items-center justify-center px-6 py-8", t),
616
- children: /* @__PURE__ */ r(ge, {
565
+ className: b("flex flex-1 flex-col items-center justify-center px-6 py-8", t),
566
+ children: /* @__PURE__ */ r(ye, {
617
567
  size: e,
618
568
  ...a
619
569
  })
620
570
  });
621
571
  }
622
- function lt({ rows: t = 5 }) {
572
+ function nt({ rows: t = 5 }) {
623
573
  return /* @__PURE__ */ r("div", {
624
574
  "aria-hidden": !0,
625
575
  "data-chat-conversations-loading": "",
@@ -636,7 +586,7 @@ function lt({ rows: t = 5 }) {
636
586
  }, a))
637
587
  });
638
588
  }
639
- function ct() {
589
+ function at() {
640
590
  return /* @__PURE__ */ N("div", {
641
591
  "aria-hidden": !0,
642
592
  "data-chat-messages-loading": "",
@@ -648,27 +598,27 @@ function ct() {
648
598
  ]
649
599
  });
650
600
  }
651
- var _t = {
652
- Root: Ve,
653
- List: Xe,
654
- Search: $e,
655
- Conversations: je,
656
- ConversationList: Be,
657
- Conversation: Qe,
658
- Thread: Je,
659
- Header: Ye,
660
- Title: Ze,
661
- Description: et,
662
- Messages: rt,
663
- Divider: nt,
664
- Footer: at,
665
- Composer: ot,
666
- Empty: st,
667
- ConversationsLoading: lt,
668
- MessagesLoading: ct
601
+ var yt = {
602
+ Root: ze,
603
+ List: De,
604
+ Search: We,
605
+ Conversations: Ve,
606
+ ConversationList: Xe,
607
+ Conversation: je,
608
+ Thread: Be,
609
+ Header: Ke,
610
+ Title: Ge,
611
+ Description: qe,
612
+ Messages: Je,
613
+ Divider: Ye,
614
+ Footer: Ze,
615
+ Composer: tt,
616
+ Empty: rt,
617
+ ConversationsLoading: nt,
618
+ MessagesLoading: at
669
619
  };
670
620
  export {
671
- _t as t
621
+ yt as t
672
622
  };
673
623
 
674
- //# sourceMappingURL=chat-D98GCjbe.js.map
624
+ //# sourceMappingURL=chat-D6SGRahp.js.map