@devalok/shilp-sutra 0.44.1 → 0.45.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (142) hide show
  1. package/AGENTS.md +13 -11
  2. package/BREAKING.json +209 -27
  3. package/MIGRATION.md +34 -0
  4. package/README.md +12 -0
  5. package/dist/_chunks/badge-group.js +1 -0
  6. package/dist/_chunks/badge-group.js.map +1 -1
  7. package/dist/_chunks/block-shell.js +25 -0
  8. package/dist/_chunks/block-shell.js.map +1 -0
  9. package/dist/_chunks/chat.js +153 -150
  10. package/dist/_chunks/chat.js.map +1 -1
  11. package/dist/_chunks/document-preview.js +1 -1
  12. package/dist/_chunks/image-preview.js +4 -4
  13. package/dist/_chunks/mention.js +5 -0
  14. package/dist/_chunks/mention.js.map +1 -0
  15. package/dist/_chunks/shared.js +65 -78
  16. package/dist/_chunks/shared.js.map +1 -1
  17. package/dist/_chunks/success.js +108 -106
  18. package/dist/_chunks/success.js.map +1 -1
  19. package/dist/ai/blocks/block-shell.d.ts +19 -0
  20. package/dist/ai/blocks/block-shell.d.ts.map +1 -0
  21. package/dist/ai/blocks/block-table.d.ts.map +1 -1
  22. package/dist/ai/blocks/confirm.d.ts.map +1 -1
  23. package/dist/ai/blocks/error.d.ts.map +1 -1
  24. package/dist/ai/blocks/error.js +5 -5
  25. package/dist/ai/blocks/error.js.map +1 -1
  26. package/dist/ai/blocks/success.d.ts.map +1 -1
  27. package/dist/ai/blocks/text.d.ts.map +1 -1
  28. package/dist/ai/blocks/text.js +4 -3
  29. package/dist/ai/blocks/text.js.map +1 -1
  30. package/dist/composed/activity-feed.d.ts.map +1 -1
  31. package/dist/composed/activity-feed.js +14 -12
  32. package/dist/composed/activity-feed.js.map +1 -1
  33. package/dist/composed/file-preview/audio-preview.d.ts.map +1 -1
  34. package/dist/composed/file-preview/shared.d.ts +10 -0
  35. package/dist/composed/file-preview/shared.d.ts.map +1 -1
  36. package/dist/composed/file-preview/video-preview.d.ts.map +1 -1
  37. package/dist/composed/file-preview.js +151 -188
  38. package/dist/composed/file-preview.js.map +1 -1
  39. package/dist/composed/master-detail.d.ts.map +1 -1
  40. package/dist/composed/master-detail.js +13 -4
  41. package/dist/composed/master-detail.js.map +1 -1
  42. package/dist/composed/rich-chat-input.d.ts.map +1 -1
  43. package/dist/composed/rich-chat-input.js +514 -503
  44. package/dist/composed/rich-chat-input.js.map +1 -1
  45. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  46. package/dist/composed/rich-text-editor.js +144 -143
  47. package/dist/composed/rich-text-editor.js.map +1 -1
  48. package/dist/composed/schedule-view.d.ts.map +1 -1
  49. package/dist/composed/schedule-view.js +52 -39
  50. package/dist/composed/schedule-view.js.map +1 -1
  51. package/dist/shell/notification-preferences.d.ts.map +1 -1
  52. package/dist/shell/notification-preferences.js +115 -114
  53. package/dist/shell/notification-preferences.js.map +1 -1
  54. package/dist/ui/badge-group.d.ts.map +1 -1
  55. package/dist/ui/card.d.ts +66 -16
  56. package/dist/ui/card.d.ts.map +1 -1
  57. package/dist/ui/card.js +85 -60
  58. package/dist/ui/card.js.map +1 -1
  59. package/dist/ui/chat/message.d.ts.map +1 -1
  60. package/dist/ui/color-input.d.ts.map +1 -1
  61. package/dist/ui/color-input.js +18 -18
  62. package/dist/ui/color-input.js.map +1 -1
  63. package/dist/ui/data-table-body.d.ts.map +1 -1
  64. package/dist/ui/data-table-body.js +94 -64
  65. package/dist/ui/data-table-body.js.map +1 -1
  66. package/dist/ui/data-table-card.d.ts.map +1 -1
  67. package/dist/ui/data-table-card.js +50 -43
  68. package/dist/ui/data-table-card.js.map +1 -1
  69. package/dist/ui/data-table-context.d.ts +0 -4
  70. package/dist/ui/data-table-context.d.ts.map +1 -1
  71. package/dist/ui/data-table-context.js +8 -12
  72. package/dist/ui/data-table-context.js.map +1 -1
  73. package/dist/ui/data-table-header.d.ts.map +1 -1
  74. package/dist/ui/data-table-header.js +2 -2
  75. package/dist/ui/data-table-header.js.map +1 -1
  76. package/dist/ui/data-table.d.ts.map +1 -1
  77. package/dist/ui/data-table.js +185 -182
  78. package/dist/ui/data-table.js.map +1 -1
  79. package/dist/ui/index.d.ts +3 -2
  80. package/dist/ui/index.d.ts.map +1 -1
  81. package/dist/ui/index.js +59 -58
  82. package/dist/ui/index.js.map +1 -1
  83. package/dist/ui/lib/mention.d.ts +11 -0
  84. package/dist/ui/lib/mention.d.ts.map +1 -0
  85. package/dist/ui/segmented-control.js +4 -4
  86. package/dist/ui/segmented-control.js.map +1 -1
  87. package/dist/ui/separator.d.ts +6 -5
  88. package/dist/ui/separator.d.ts.map +1 -1
  89. package/dist/ui/separator.js +7 -10
  90. package/dist/ui/separator.js.map +1 -1
  91. package/dist/ui/split-button.d.ts.map +1 -1
  92. package/dist/ui/split-button.js +62 -129
  93. package/dist/ui/split-button.js.map +1 -1
  94. package/dist/ui/stat-card.d.ts +7 -0
  95. package/dist/ui/stat-card.d.ts.map +1 -1
  96. package/dist/ui/stat-card.js +144 -126
  97. package/dist/ui/stat-card.js.map +1 -1
  98. package/dist/ui/table-row-link.d.ts +45 -0
  99. package/dist/ui/table-row-link.d.ts.map +1 -0
  100. package/dist/ui/table-row-link.js +16 -0
  101. package/dist/ui/table-row-link.js.map +1 -0
  102. package/dist/ui/table.d.ts +49 -5
  103. package/dist/ui/table.d.ts.map +1 -1
  104. package/dist/ui/table.js +39 -29
  105. package/dist/ui/table.js.map +1 -1
  106. package/dist/ui/toast-types.d.ts +10 -0
  107. package/dist/ui/toast-types.d.ts.map +1 -1
  108. package/dist/ui/toast.d.ts +6 -2
  109. package/dist/ui/toast.d.ts.map +1 -1
  110. package/dist/ui/toast.js +56 -54
  111. package/dist/ui/toast.js.map +1 -1
  112. package/docs/components/composed/content-card.md +2 -0
  113. package/docs/components/ui/button.md +3 -3
  114. package/docs/components/ui/card.md +27 -10
  115. package/docs/components/ui/chat.md +1 -1
  116. package/docs/components/ui/color-input.md +2 -2
  117. package/docs/components/ui/data-table.md +8 -1
  118. package/docs/components/ui/segmented-control.md +2 -2
  119. package/docs/components/ui/separator.md +3 -1
  120. package/docs/components/ui/split-button.md +3 -0
  121. package/docs/components/ui/stat-card.md +10 -2
  122. package/docs/components/ui/table-row-link.md +41 -0
  123. package/docs/components/ui/table.md +69 -0
  124. package/docs/components/ui/toast.md +10 -6
  125. package/docs/recipes/install-next-app-router.md +1 -1
  126. package/docs/recipes/troubleshoot.md +1 -1
  127. package/llms.txt +159 -781
  128. package/make-kit/components/card.md +54 -16
  129. package/make-kit/components/table.md +45 -7
  130. package/make-kit/foundations/spacing.md +3 -1
  131. package/make-kit/foundations/surfaces.md +1 -1
  132. package/mcp-manifest.json +12349 -0
  133. package/mcp-manifest.schema.json +232 -0
  134. package/package.json +8 -3
  135. package/skill/README.md +0 -1
  136. package/skill/SKILL.md +9 -8
  137. package/skill/references/components.md +159 -781
  138. package/skill/references/setup-next-app-router.md +1 -1
  139. package/skill/references/troubleshoot.md +1 -1
  140. package/llms-full.txt +0 -7198
  141. package/llms-quick.txt +0 -251
  142. package/skill/references/components-full.md +0 -7200
@@ -9,45 +9,46 @@ import { t as u } from "./normalize-icon.js";
9
9
  import { Button as d } from "../ui/button.js";
10
10
  import { Textarea as f } from "../ui/textarea.js";
11
11
  import { Tooltip as p, TooltipContent as m, TooltipTrigger as h } from "../ui/tooltip.js";
12
- import * as g from "react";
13
- import { jsx as _, jsxs as v } from "react/jsx-runtime";
14
- import { IconAlertCircle as y, IconSend as b, IconSquare as x, IconTrash as S } from "@tabler/icons-react";
15
- import { AnimatePresence as C, motion as w } from "framer-motion";
12
+ import { t as g } from "./mention.js";
13
+ import * as _ from "react";
14
+ import { jsx as v, jsxs as y } from "react/jsx-runtime";
15
+ import { IconAlertCircle as b, IconSend as x, IconSquare as S, IconTrash as C } from "@tabler/icons-react";
16
+ import { AnimatePresence as w, motion as T } from "framer-motion";
16
17
  //#region src/ui/chat/date-separator.tsx
17
- function T(e) {
18
+ function E(e) {
18
19
  let t = /* @__PURE__ */ new Date(), n = new Date(t.getFullYear(), t.getMonth(), t.getDate()), r = new Date(e.getFullYear(), e.getMonth(), e.getDate()), i = n.getTime() - r.getTime(), a = Math.round(i / (1e3 * 60 * 60 * 24));
19
20
  if (a === 0) return "Today";
20
21
  if (a === 1) return "Yesterday";
21
22
  let o = e.toLocaleString("en-US", { month: "short" }), s = e.getDate();
22
23
  return e.getFullYear() === t.getFullYear() ? `${o} ${s}` : `${o} ${s}, ${e.getFullYear()}`;
23
24
  }
24
- function E({ date: e, format: t, className: n }) {
25
- let r = typeof e == "string" ? new Date(e) : e, a = t ? t(r) : T(r);
26
- return /* @__PURE__ */ v("div", {
25
+ function D({ date: e, format: t, className: n }) {
26
+ let r = typeof e == "string" ? new Date(e) : e, a = t ? t(r) : E(r);
27
+ return /* @__PURE__ */ y("div", {
27
28
  className: i("flex items-center gap-ds-03 py-ds-03", n),
28
29
  children: [
29
- /* @__PURE__ */ _("div", { className: "flex-1 border-t border-surface-border-subtle" }),
30
- /* @__PURE__ */ _("span", {
30
+ /* @__PURE__ */ v("div", { className: "flex-1 border-t border-surface-border-subtle" }),
31
+ /* @__PURE__ */ v("span", {
31
32
  className: "text-ds-xs font-medium text-surface-fg-subtle/50 uppercase tracking-wider",
32
33
  children: a
33
34
  }),
34
- /* @__PURE__ */ _("div", { className: "flex-1 border-t border-surface-border-subtle" })
35
+ /* @__PURE__ */ v("div", { className: "flex-1 border-t border-surface-border-subtle" })
35
36
  ]
36
37
  });
37
38
  }
38
- E.displayName = "DateSeparator";
39
+ D.displayName = "DateSeparator";
39
40
  //#endregion
40
41
  //#region src/ui/chat/message.tsx
41
- var D = g.createContext({
42
+ var O = _.createContext({
42
43
  variant: "flat",
43
44
  placement: "start",
44
45
  grouped: !1
45
46
  });
46
- function O() {
47
- return g.useContext(D);
47
+ function k() {
48
+ return _.useContext(O);
48
49
  }
49
- var k = g.forwardRef(({ children: e, variant: r = "flat", placement: a = "start", highlight: s, grouped: c = !1, deleted: l = !1, deletedText: u = "This message was deleted", className: d, ...f }, p) => {
50
- let m = g.useMemo(() => ({
50
+ var A = _.forwardRef(({ children: e, variant: r = "flat", placement: a = "start", highlight: s, grouped: c = !1, deleted: l = !1, deletedText: u = "This message was deleted", className: d, ...f }, p) => {
51
+ let m = _.useMemo(() => ({
51
52
  variant: r,
52
53
  placement: a,
53
54
  grouped: c,
@@ -58,7 +59,7 @@ var k = g.forwardRef(({ children: e, variant: r = "flat", placement: a = "start"
58
59
  c,
59
60
  s
60
61
  ]);
61
- return l ? /* @__PURE__ */ v(w.div, {
62
+ return l ? /* @__PURE__ */ y(T.div, {
62
63
  ref: p,
63
64
  initial: {
64
65
  opacity: 0,
@@ -71,14 +72,15 @@ var k = g.forwardRef(({ children: e, variant: r = "flat", placement: a = "start"
71
72
  transition: n.snappy,
72
73
  className: i("flex items-center gap-ds-02 py-ds-02 text-ds-xs text-surface-fg-subtle/50 italic", d),
73
74
  ...t(f),
74
- children: [/* @__PURE__ */ _(o, {
75
- icon: S,
75
+ children: [/* @__PURE__ */ v(o, {
76
+ icon: C,
76
77
  size: "xs"
77
78
  }), u]
78
- }) : r === "bubble" ? /* @__PURE__ */ _(D.Provider, {
79
+ }) : r === "bubble" ? /* @__PURE__ */ v(O.Provider, {
79
80
  value: m,
80
- children: /* @__PURE__ */ _(w.div, {
81
+ children: /* @__PURE__ */ v(T.div, {
81
82
  ref: p,
83
+ "data-highlight": s,
82
84
  initial: {
83
85
  opacity: 0,
84
86
  y: 8
@@ -88,17 +90,18 @@ var k = g.forwardRef(({ children: e, variant: r = "flat", placement: a = "start"
88
90
  y: 0
89
91
  },
90
92
  transition: n.snappy,
91
- className: i("group/message relative flex", a === "end" ? "justify-end" : "justify-start", s === "mention" && "bg-accent-2 pl-ds-03 rounded-control-inner", s === "internal" && "bg-warning-2/50 rounded-control-inner", d),
93
+ className: i("group/message relative flex", a === "end" ? "justify-end" : "justify-start", g, s === "internal" && "bg-warning-2/50 rounded-control-inner", d),
92
94
  ...t(f),
93
- children: /* @__PURE__ */ _("div", {
95
+ children: /* @__PURE__ */ v("div", {
94
96
  className: i("max-w-[85%] rounded-bubble px-ds-04 py-ds-03", a === "end" ? "bg-accent-3 text-surface-fg" : "bg-surface-raised text-surface-fg"),
95
97
  children: e
96
98
  })
97
99
  })
98
- }) : /* @__PURE__ */ _(D.Provider, {
100
+ }) : /* @__PURE__ */ v(O.Provider, {
99
101
  value: m,
100
- children: /* @__PURE__ */ _(w.div, {
102
+ children: /* @__PURE__ */ v(T.div, {
101
103
  ref: p,
104
+ "data-highlight": s,
102
105
  initial: {
103
106
  opacity: 0,
104
107
  y: 8
@@ -108,100 +111,100 @@ var k = g.forwardRef(({ children: e, variant: r = "flat", placement: a = "start"
108
111
  y: 0
109
112
  },
110
113
  transition: n.snappy,
111
- className: i("group/message relative flex gap-ds-04", c && "-mt-ds-01", s === "mention" && "border-l-2 border-l-accent-9 bg-accent-2 pl-ds-03 rounded-control-inner", s === "internal" && "bg-warning-2/50 rounded-control-inner", d),
114
+ className: i("group/message relative flex gap-ds-04", c && "-mt-ds-01", g, s === "internal" && "bg-warning-2/50 rounded-control-inner", d),
112
115
  ...t(f),
113
116
  children: e
114
117
  })
115
118
  });
116
119
  });
117
- k.displayName = "Message";
118
- function A({ src: t, fallback: n, icon: r, size: a = "md", children: o }) {
119
- let { grouped: d } = O(), f = a === "sm" ? "w-5" : "w-6";
120
- return d ? /* @__PURE__ */ _("div", { className: i(f, a === "sm" ? "h-5" : "h-6", "shrink-0") }) : o ? /* @__PURE__ */ _("div", {
120
+ A.displayName = "Message";
121
+ function j({ src: t, fallback: n, icon: r, size: a = "md", children: o }) {
122
+ let { grouped: d } = k(), f = a === "sm" ? "w-5" : "w-6";
123
+ return d ? /* @__PURE__ */ v("div", { className: i(f, a === "sm" ? "h-5" : "h-6", "shrink-0") }) : o ? /* @__PURE__ */ v("div", {
121
124
  className: i(f, "shrink-0 flex items-start"),
122
125
  children: o
123
- }) : r ? /* @__PURE__ */ _("div", {
126
+ }) : r ? /* @__PURE__ */ v("div", {
124
127
  className: i(f, a === "sm" ? "h-5" : "h-6", "shrink-0 flex items-center justify-center rounded-pill bg-surface-raised-hover"),
125
- children: /* @__PURE__ */ _(e, {
128
+ children: /* @__PURE__ */ v(e, {
126
129
  size: a === "sm" ? "xs" : "sm",
127
130
  children: u(r)
128
131
  })
129
- }) : /* @__PURE__ */ _("div", {
132
+ }) : /* @__PURE__ */ v("div", {
130
133
  className: i(f, "shrink-0"),
131
- children: /* @__PURE__ */ v(s, {
134
+ children: /* @__PURE__ */ y(s, {
132
135
  size: a === "sm" ? "xs" : "sm",
133
- children: [t && /* @__PURE__ */ _(l, {
136
+ children: [t && /* @__PURE__ */ v(l, {
134
137
  src: t,
135
138
  alt: n ?? ""
136
- }), /* @__PURE__ */ _(c, { children: n ?? "" })]
139
+ }), /* @__PURE__ */ v(c, { children: n ?? "" })]
137
140
  })
138
141
  });
139
142
  }
140
- A.displayName = "Message.Avatar";
141
- function j({ children: e, className: t, ...n }) {
142
- return /* @__PURE__ */ _("div", {
143
+ j.displayName = "Message.Avatar";
144
+ function M({ children: e, className: t, ...n }) {
145
+ return /* @__PURE__ */ v("div", {
143
146
  className: i("min-w-0 flex-1 flex flex-col gap-ds-02", t),
144
147
  ...n,
145
148
  children: e
146
149
  });
147
150
  }
148
- j.displayName = "Message.Content";
149
- function M(e) {
151
+ M.displayName = "Message.Content";
152
+ function N(e) {
150
153
  return e.toLocaleTimeString("en-US", {
151
154
  hour: "numeric",
152
155
  minute: "2-digit"
153
156
  });
154
157
  }
155
- function N({ name: e, badge: t, timestamp: n, formattedTimestamp: r, timestampFormat: i = M }) {
156
- let { grouped: a } = O();
158
+ function P({ name: e, badge: t, timestamp: n, formattedTimestamp: r, timestampFormat: i = N }) {
159
+ let { grouped: a } = k();
157
160
  if (a) return null;
158
161
  let o = r ?? (n ? i(n) : void 0);
159
- return /* @__PURE__ */ v("div", {
162
+ return /* @__PURE__ */ y("div", {
160
163
  className: "flex items-baseline gap-ds-02",
161
164
  children: [
162
- /* @__PURE__ */ _("span", {
165
+ /* @__PURE__ */ v("span", {
163
166
  className: "font-semibold text-[13px] text-surface-fg",
164
167
  children: e
165
168
  }),
166
169
  t,
167
- o && /* @__PURE__ */ _("span", {
170
+ o && /* @__PURE__ */ v("span", {
168
171
  className: "text-[11px] text-surface-fg-subtle/50",
169
172
  children: o
170
173
  })
171
174
  ]
172
175
  });
173
176
  }
174
- N.displayName = "Message.Author";
175
- function P({ children: e, className: t, ...n }) {
176
- return /* @__PURE__ */ _("div", {
177
+ P.displayName = "Message.Author";
178
+ function F({ children: e, className: t, ...n }) {
179
+ return /* @__PURE__ */ v("div", {
177
180
  className: i("text-[13px] leading-relaxed text-surface-fg whitespace-pre-wrap", t),
178
181
  ...n,
179
182
  children: e
180
183
  });
181
184
  }
182
- P.displayName = "Message.Body";
183
- function F({ content: e, onSave: t, onCancel: n, canEdit: r = !1, renderContent: a }) {
184
- let [o, s] = g.useState(!1), [c, l] = g.useState(e), u = g.useRef(null);
185
- g.useEffect(() => {
185
+ F.displayName = "Message.Body";
186
+ function I({ content: e, onSave: t, onCancel: n, canEdit: r = !1, renderContent: a }) {
187
+ let [o, s] = _.useState(!1), [c, l] = _.useState(e), u = _.useRef(null);
188
+ _.useEffect(() => {
186
189
  o && u.current && (u.current.focus(), u.current.select());
187
190
  }, [o]);
188
- let d = g.useCallback(() => {
191
+ let d = _.useCallback(() => {
189
192
  r && (l(e), s(!0));
190
- }, [r, e]), p = g.useCallback(() => {
193
+ }, [r, e]), p = _.useCallback(() => {
191
194
  let n = c.trim();
192
195
  n && n !== e && t(n), s(!1);
193
196
  }, [
194
197
  c,
195
198
  e,
196
199
  t
197
- ]), m = g.useCallback(() => {
200
+ ]), m = _.useCallback(() => {
198
201
  s(!1), l(e), n?.();
199
- }, [e, n]), h = g.useCallback((e) => {
202
+ }, [e, n]), h = _.useCallback((e) => {
200
203
  e.key === "Enter" && !e.shiftKey ? (e.preventDefault(), p()) : e.key === "Escape" && (e.preventDefault(), m());
201
204
  }, [p, m]);
202
- return o ? /* @__PURE__ */ v("div", {
205
+ return o ? /* @__PURE__ */ y("div", {
203
206
  className: "text-[13px] leading-relaxed",
204
- children: [/* @__PURE__ */ _(f, {
207
+ children: [/* @__PURE__ */ v(f, {
205
208
  ref: u,
206
209
  value: c,
207
210
  onChange: (e) => l(e.target.value),
@@ -209,11 +212,11 @@ function F({ content: e, onSave: t, onCancel: n, canEdit: r = !1, renderContent:
209
212
  onBlur: p,
210
213
  className: "resize-none rounded-control-inner bg-surface-raised-hover px-ds-02 py-ds-01 text-[13px] leading-relaxed",
211
214
  rows: 2
212
- }), /* @__PURE__ */ _("div", {
215
+ }), /* @__PURE__ */ v("div", {
213
216
  className: "mt-ds-01 text-ds-xs text-surface-fg-subtle/50",
214
217
  children: "Enter to save · Escape to cancel"
215
218
  })]
216
- }) : /* @__PURE__ */ _("div", {
219
+ }) : /* @__PURE__ */ v("div", {
217
220
  className: i("text-[13px] leading-relaxed text-surface-fg whitespace-pre-wrap", r && "cursor-pointer hover:bg-surface-raised-hover rounded-control-inner transition-colors"),
218
221
  onClick: d,
219
222
  role: r ? "button" : void 0,
@@ -224,79 +227,79 @@ function F({ content: e, onSave: t, onCancel: n, canEdit: r = !1, renderContent:
224
227
  children: a ? a(e) : e
225
228
  });
226
229
  }
227
- F.displayName = "Message.EditableBody";
228
- function I({ reactions: e, onReact: t }) {
229
- return e.length === 0 ? null : /* @__PURE__ */ _("div", {
230
+ I.displayName = "Message.EditableBody";
231
+ function L({ reactions: e, onReact: t }) {
232
+ return e.length === 0 ? null : /* @__PURE__ */ v("div", {
230
233
  className: "flex flex-wrap gap-ds-02 mt-ds-03",
231
- children: e.map((e) => /* @__PURE__ */ v("button", {
234
+ children: e.map((e) => /* @__PURE__ */ y("button", {
232
235
  type: "button",
233
236
  onClick: () => t(e.emoji),
234
237
  "aria-label": `${e.emoji} ${e.count} reaction${e.count === 1 ? "" : "s"}${e.reacted ? ", you reacted" : ""}`,
235
238
  className: i("inline-flex items-center gap-ds-01 rounded-pill px-ds-02 py-ds-01 text-ds-xs transition-colors", e.reacted ? "bg-accent-3 ring-1 ring-accent-6" : "bg-surface-raised-hover hover:bg-surface-raised-active"),
236
- children: [/* @__PURE__ */ _("span", { children: e.emoji }), /* @__PURE__ */ _("span", { children: e.count })]
239
+ children: [/* @__PURE__ */ v("span", { children: e.emoji }), /* @__PURE__ */ v("span", { children: e.count })]
237
240
  }, e.emoji))
238
241
  });
239
242
  }
240
- I.displayName = "Message.Reactions";
241
- function L({ children: e, delay: t = 100 }) {
242
- return /* @__PURE__ */ _("div", {
243
+ L.displayName = "Message.Reactions";
244
+ function R({ children: e, delay: t = 100 }) {
245
+ return /* @__PURE__ */ v("div", {
243
246
  className: i("absolute -top-2 right-0 z-10", "flex items-center gap-ds-01 rounded-control bg-surface-raised px-ds-01 py-ds-01 shadow-raised", "opacity-0 group-hover/message:opacity-100 group-focus-within/message:opacity-100 transition-opacity duration-150"),
244
247
  style: { transitionDelay: `${t}ms` },
245
248
  children: e
246
249
  });
247
250
  }
248
- L.displayName = "Message.Actions";
249
- function R({ icon: t, label: n, onClick: r, variant: a = "default" }) {
250
- return /* @__PURE__ */ v(p, { children: [/* @__PURE__ */ _(h, {
251
+ R.displayName = "Message.Actions";
252
+ function z({ icon: t, label: n, onClick: r, variant: a = "default" }) {
253
+ return /* @__PURE__ */ y(p, { children: [/* @__PURE__ */ v(h, {
251
254
  asChild: !0,
252
- children: /* @__PURE__ */ _("button", {
255
+ children: /* @__PURE__ */ v("button", {
253
256
  type: "button",
254
257
  onClick: r,
255
258
  "aria-label": n,
256
259
  className: i("p-ds-02 rounded-control-inner transition-colors", a === "default" && "text-surface-fg-subtle hover:text-surface-fg hover:bg-surface-raised-hover", a === "danger" && "text-surface-fg-subtle hover:text-error-11 hover:bg-surface-raised-hover"),
257
- children: /* @__PURE__ */ _(e, {
260
+ children: /* @__PURE__ */ v(e, {
258
261
  size: "xs",
259
262
  children: u(t)
260
263
  })
261
264
  })
262
- }), /* @__PURE__ */ _(m, { children: n })] });
265
+ }), /* @__PURE__ */ v(m, { children: n })] });
263
266
  }
264
- R.displayName = "Message.Action";
265
- var z = Object.assign(k, {
266
- Avatar: A,
267
- Content: j,
268
- Author: N,
269
- Body: P,
270
- EditableBody: F,
271
- Reactions: I,
272
- Actions: L,
273
- Action: R
274
- }), B = g.forwardRef(({ onSubmit: e, placeholder: t = "Type a message...", disabled: n = !1, isStreaming: r = !1, onCancel: a, leadingSlot: s, trailingSlot: c, disclaimer: l, sendIcon: u, className: f, ...p }, m) => {
275
- let [h, y] = g.useState(""), S = g.useRef(null), C = g.useCallback(() => {
276
- let e = S.current;
267
+ z.displayName = "Message.Action";
268
+ var B = Object.assign(A, {
269
+ Avatar: j,
270
+ Content: M,
271
+ Author: P,
272
+ Body: F,
273
+ EditableBody: I,
274
+ Reactions: L,
275
+ Actions: R,
276
+ Action: z
277
+ }), V = _.forwardRef(({ onSubmit: e, placeholder: t = "Type a message...", disabled: n = !1, isStreaming: r = !1, onCancel: a, leadingSlot: s, trailingSlot: c, disclaimer: l, sendIcon: u, className: f, ...p }, m) => {
278
+ let [h, g] = _.useState(""), b = _.useRef(null), C = _.useCallback(() => {
279
+ let e = b.current;
277
280
  e && (e.style.height = "auto", e.style.height = `${Math.min(e.scrollHeight, 160)}px`);
278
- }, []), w = g.useCallback((e) => {
279
- y(e.target.value), C();
280
- }, [C]), T = g.useCallback(() => {
281
+ }, []), w = _.useCallback((e) => {
282
+ g(e.target.value), C();
283
+ }, [C]), T = _.useCallback(() => {
281
284
  let t = h.trim();
282
- !t || r || (e(t), y(""), S.current && (S.current.style.height = "auto"));
285
+ !t || r || (e(t), g(""), b.current && (b.current.style.height = "auto"));
283
286
  }, [
284
287
  h,
285
288
  r,
286
289
  e
287
- ]), E = g.useCallback((e) => {
290
+ ]), E = _.useCallback((e) => {
288
291
  e.key === "Enter" && !e.shiftKey && (e.preventDefault(), r || T());
289
292
  }, [r, T]), D = h.trim().length === 0;
290
- return /* @__PURE__ */ v("div", {
293
+ return /* @__PURE__ */ y("div", {
291
294
  ref: m,
292
295
  className: i("border-t border-surface-border-subtle px-ds-05 py-ds-04", f),
293
296
  ...p,
294
- children: [/* @__PURE__ */ v("div", {
297
+ children: [/* @__PURE__ */ y("div", {
295
298
  className: "flex items-end gap-ds-02 rounded-overlay-lg border border-surface-border bg-surface-base p-ds-03",
296
299
  children: [
297
300
  s,
298
- /* @__PURE__ */ _("textarea", {
299
- ref: S,
301
+ /* @__PURE__ */ v("textarea", {
302
+ ref: b,
300
303
  value: h,
301
304
  onChange: w,
302
305
  onKeyDown: E,
@@ -307,74 +310,74 @@ var z = Object.assign(k, {
307
310
  className: "flex-1 resize-none bg-transparent px-ds-02 py-ds-01 text-ds-sm text-surface-fg placeholder:text-surface-fg-subtle/50 focus:outline-hidden disabled:opacity-50",
308
311
  style: { maxHeight: 160 }
309
312
  }),
310
- r ? /* @__PURE__ */ _(d, {
313
+ r ? /* @__PURE__ */ v(d, {
311
314
  variant: "ghost",
312
315
  size: "icon-sm",
313
316
  color: "error",
314
317
  onClick: a,
315
318
  "aria-label": "Stop",
316
- children: /* @__PURE__ */ _(o, {
317
- icon: x,
319
+ children: /* @__PURE__ */ v(o, {
320
+ icon: S,
318
321
  size: "sm"
319
322
  })
320
- }) : /* @__PURE__ */ _(d, {
323
+ }) : /* @__PURE__ */ v(d, {
321
324
  variant: "ghost",
322
325
  size: "icon-sm",
323
326
  onClick: T,
324
327
  disabled: D || n,
325
328
  "aria-label": "Send",
326
- children: u ?? /* @__PURE__ */ _(o, {
327
- icon: b,
329
+ children: u ?? /* @__PURE__ */ v(o, {
330
+ icon: x,
328
331
  size: "sm"
329
332
  })
330
333
  }),
331
334
  c
332
335
  ]
333
- }), l && /* @__PURE__ */ _("p", {
336
+ }), l && /* @__PURE__ */ v("p", {
334
337
  className: "mt-ds-02 text-center text-ds-xs text-surface-fg-subtle/50",
335
338
  children: l
336
339
  })]
337
340
  });
338
341
  });
339
- B.displayName = "MessageInput";
342
+ V.displayName = "MessageInput";
340
343
  //#endregion
341
344
  //#region src/ui/chat/message-list.tsx
342
- var V = g.forwardRef(({ children: e, autoScroll: t = !0, newMessageCount: n = 0, onScrollToBottom: o, onLoadMore: s, loadingMore: c = !1, emptySlot: l, scrollToBottomSlot: u, headerSlot: d, className: f, ...p }, m) => {
343
- let h = g.useRef(null), y = g.useRef(!0), [b, x] = g.useState(!0), S = g.useRef(!1), T = g.useRef(0), E = g.Children.count(e) === 0 && !c, D = g.useCallback(() => {
345
+ var H = _.forwardRef(({ children: e, autoScroll: t = !0, newMessageCount: n = 0, onScrollToBottom: o, onLoadMore: s, loadingMore: c = !1, emptySlot: l, scrollToBottomSlot: u, headerSlot: d, className: f, ...p }, m) => {
346
+ let h = _.useRef(null), g = _.useRef(!0), [b, x] = _.useState(!0), S = _.useRef(!1), C = _.useRef(0), E = _.Children.count(e) === 0 && !c, D = _.useCallback(() => {
344
347
  let e = h.current;
345
348
  if (!e) return;
346
349
  let t = e.scrollHeight - e.scrollTop - e.clientHeight < 40;
347
- y.current = t, x(t), e.scrollTop < 100 && s && !S.current && (S.current = !0, T.current = e.scrollHeight, s());
350
+ g.current = t, x(t), e.scrollTop < 100 && s && !S.current && (S.current = !0, C.current = e.scrollHeight, s());
348
351
  }, [s]);
349
- g.useLayoutEffect(() => {
352
+ _.useLayoutEffect(() => {
350
353
  let e = h.current;
351
354
  if (e) {
352
355
  if (S.current) {
353
- e.scrollTop = e.scrollHeight - T.current, S.current = !1;
356
+ e.scrollTop = e.scrollHeight - C.current, S.current = !1;
354
357
  return;
355
358
  }
356
- t && y.current && e.scrollTo({
359
+ t && g.current && e.scrollTo({
357
360
  top: e.scrollHeight,
358
361
  behavior: "smooth"
359
362
  });
360
363
  }
361
- }, [e, t]), g.useEffect(() => {
364
+ }, [e, t]), _.useEffect(() => {
362
365
  c || (S.current = !1);
363
366
  }, [c]);
364
- let O = n > 0 && !b, k = g.useCallback(() => {
367
+ let O = n > 0 && !b, k = _.useCallback(() => {
365
368
  let e = h.current;
366
369
  e && e.scrollTo({
367
370
  top: e.scrollHeight,
368
371
  behavior: "smooth"
369
372
  }), o?.();
370
373
  }, [o]);
371
- return /* @__PURE__ */ v("div", {
374
+ return /* @__PURE__ */ y("div", {
372
375
  ref: m,
373
376
  className: i("relative flex flex-1 flex-col overflow-hidden", f),
374
377
  ...p,
375
378
  children: [
376
379
  d,
377
- /* @__PURE__ */ v("div", {
380
+ /* @__PURE__ */ y("div", {
378
381
  ref: h,
379
382
  role: "log",
380
383
  "aria-live": "polite",
@@ -385,18 +388,18 @@ var V = g.forwardRef(({ children: e, autoScroll: t = !0, newMessageCount: n = 0,
385
388
  scrollbarColor: "var(--color-surface-border) transparent"
386
389
  },
387
390
  onScroll: D,
388
- children: [c && /* @__PURE__ */ _("div", {
391
+ children: [c && /* @__PURE__ */ v("div", {
389
392
  className: "flex justify-center py-ds-03",
390
- children: /* @__PURE__ */ _(a, { size: "sm" })
391
- }), E ? l : /* @__PURE__ */ _("div", {
393
+ children: /* @__PURE__ */ v(a, { size: "sm" })
394
+ }), E ? l : /* @__PURE__ */ v("div", {
392
395
  className: "flex flex-col gap-ds-04",
393
- children: /* @__PURE__ */ _(C, {
396
+ children: /* @__PURE__ */ v(w, {
394
397
  initial: !1,
395
398
  children: e
396
399
  })
397
400
  })]
398
401
  }),
399
- /* @__PURE__ */ _(C, { children: O && /* @__PURE__ */ v(w.button, {
402
+ /* @__PURE__ */ v(w, { children: O && /* @__PURE__ */ y(T.button, {
400
403
  initial: {
401
404
  opacity: 0,
402
405
  y: 10
@@ -417,76 +420,76 @@ var V = g.forwardRef(({ children: e, autoScroll: t = !0, newMessageCount: n = 0,
417
420
  ]
418
421
  });
419
422
  });
420
- V.displayName = "MessageList";
423
+ H.displayName = "MessageList";
421
424
  //#endregion
422
425
  //#region src/ui/chat/system-message.tsx
423
- function H(e) {
426
+ function U(e) {
424
427
  return new Date(e).toLocaleTimeString("en-US", {
425
428
  hour: "numeric",
426
429
  minute: "2-digit"
427
430
  });
428
431
  }
429
- var U = g.forwardRef(({ icon: t, timestamp: n, variant: r = "event", children: a, className: s, ...c }, l) => r === "alert" ? /* @__PURE__ */ _("div", {
432
+ var W = _.forwardRef(({ icon: t, timestamp: n, variant: r = "event", children: a, className: s, ...c }, l) => r === "alert" ? /* @__PURE__ */ v("div", {
430
433
  ref: l,
431
434
  role: "alert",
432
435
  className: i("flex justify-center", s),
433
436
  ...c,
434
- children: /* @__PURE__ */ v("div", {
437
+ children: /* @__PURE__ */ y("div", {
435
438
  className: "flex items-center gap-ds-03 rounded-surface bg-error-3 px-ds-04 py-ds-03",
436
439
  children: [
437
- /* @__PURE__ */ _(e, {
440
+ /* @__PURE__ */ v(e, {
438
441
  size: "sm",
439
- children: u(t) ?? /* @__PURE__ */ _(o, { icon: y })
442
+ children: u(t) ?? /* @__PURE__ */ v(o, { icon: b })
440
443
  }),
441
- /* @__PURE__ */ _("span", {
444
+ /* @__PURE__ */ v("span", {
442
445
  className: "text-ds-sm text-error-11",
443
446
  children: a
444
447
  }),
445
- n && /* @__PURE__ */ _("span", {
448
+ n && /* @__PURE__ */ v("span", {
446
449
  className: "text-ds-sm text-error-11/60",
447
- children: H(n)
450
+ children: U(n)
448
451
  })
449
452
  ]
450
453
  })
451
- }) : /* @__PURE__ */ v("div", {
454
+ }) : /* @__PURE__ */ y("div", {
452
455
  ref: l,
453
456
  className: i("flex items-center gap-ds-02 rounded-control-inner bg-surface-raised-hover/30 px-ds-02 py-ds-01 -mx-ds-02 text-ds-sm text-surface-fg-subtle/60", s),
454
457
  ...c,
455
458
  children: [
456
- /* @__PURE__ */ _(e, {
459
+ /* @__PURE__ */ v(e, {
457
460
  size: "xs",
458
461
  children: u(t)
459
462
  }),
460
- /* @__PURE__ */ _("span", {
463
+ /* @__PURE__ */ v("span", {
461
464
  className: "flex-1",
462
465
  children: a
463
466
  }),
464
- n && /* @__PURE__ */ _("span", { children: H(n) })
467
+ n && /* @__PURE__ */ v("span", { children: U(n) })
465
468
  ]
466
469
  }));
467
- U.displayName = "SystemMessage";
470
+ W.displayName = "SystemMessage";
468
471
  //#endregion
469
472
  //#region src/ui/chat/typing-indicator.tsx
470
- function W(e) {
473
+ function G(e) {
471
474
  return e.length === 1 ? `${e[0].name} is typing...` : e.length === 2 ? `${e[0].name} and ${e[1].name} are typing...` : "Several people are typing...";
472
475
  }
473
- function G({ users: e, className: t }) {
474
- return /* @__PURE__ */ _("div", {
476
+ function K({ users: e, className: t }) {
477
+ return /* @__PURE__ */ v("div", {
475
478
  className: i("min-h-[24px] px-ds-05", t),
476
479
  role: "status",
477
480
  "aria-live": "polite",
478
- children: /* @__PURE__ */ _(C, { children: e.length > 0 && /* @__PURE__ */ v(w.div, {
481
+ children: /* @__PURE__ */ v(w, { children: e.length > 0 && /* @__PURE__ */ y(T.div, {
479
482
  initial: { opacity: 0 },
480
483
  animate: { opacity: 1 },
481
484
  exit: { opacity: 0 },
482
485
  className: "flex items-center gap-ds-02 text-ds-xs text-surface-fg-subtle",
483
- children: [/* @__PURE__ */ _("span", {
486
+ children: [/* @__PURE__ */ v("span", {
484
487
  className: "flex items-center gap-ds-01",
485
488
  children: [
486
489
  0,
487
490
  1,
488
491
  2
489
- ].map((e) => /* @__PURE__ */ _(w.span, {
492
+ ].map((e) => /* @__PURE__ */ v(T.span, {
490
493
  className: "h-1 w-1 rounded-pill bg-surface-fg-subtle",
491
494
  animate: { y: [
492
495
  0,
@@ -499,26 +502,26 @@ function G({ users: e, className: t }) {
499
502
  delay: e * .15
500
503
  }
501
504
  }, e))
502
- }), /* @__PURE__ */ _("span", { children: W(e) })]
505
+ }), /* @__PURE__ */ v("span", { children: G(e) })]
503
506
  }) })
504
507
  });
505
508
  }
506
- G.displayName = "TypingIndicator";
509
+ K.displayName = "TypingIndicator";
507
510
  //#endregion
508
511
  //#region src/ui/chat/unread-separator.tsx
509
- function K({ label: e = "NEW", count: t, className: n }) {
510
- return /* @__PURE__ */ v("div", {
512
+ function q({ label: e = "NEW", count: t, className: n }) {
513
+ return /* @__PURE__ */ y("div", {
511
514
  className: i("relative flex items-center py-ds-02", n),
512
515
  children: [
513
- /* @__PURE__ */ _("div", { className: "flex-1 border-t-2 border-accent-7" }),
514
- /* @__PURE__ */ _("span", {
516
+ /* @__PURE__ */ v("div", { className: "flex-1 border-t-2 border-accent-7" }),
517
+ /* @__PURE__ */ v("span", {
515
518
  className: "px-ds-03 text-ds-xs font-semibold text-accent-11",
516
519
  children: t ? `${t} ${e}` : e
517
520
  }),
518
- /* @__PURE__ */ _("div", { className: "flex-1 border-t-2 border-accent-7" })
521
+ /* @__PURE__ */ v("div", { className: "flex-1 border-t-2 border-accent-7" })
519
522
  ]
520
523
  });
521
524
  }
522
- K.displayName = "UnreadSeparator";
525
+ q.displayName = "UnreadSeparator";
523
526
  //#endregion
524
- export { B as a, E as c, V as i, G as n, z as o, U as r, O as s, K as t };
527
+ export { V as a, D as c, H as i, K as n, B as o, W as r, k as s, q as t };