@devalok/shilp-sutra 0.27.2 → 0.29.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 (250) hide show
  1. package/dist/_chunks/badge-group.js +299 -0
  2. package/dist/_chunks/framer.js +1915 -1980
  3. package/dist/_chunks/keybinding.js +4 -5
  4. package/dist/_chunks/primitives.js +3198 -3272
  5. package/dist/_chunks/sonner.js +29 -31
  6. package/dist/_chunks/stat-row.js +110 -131
  7. package/dist/_chunks/tiptap.js +42 -78
  8. package/dist/_chunks/tree-view.js +138 -149
  9. package/dist/_chunks/typing-indicator.js +565 -0
  10. package/dist/_chunks/use-calendar.js +416 -439
  11. package/dist/_chunks/vendor-client.js +977 -814
  12. package/dist/_chunks/vendor-utils.js +5 -5
  13. package/dist/ai/block-renderer.js +22 -22
  14. package/dist/ai/blocks/loading.d.ts.map +1 -1
  15. package/dist/ai/command-bar.d.ts.map +1 -1
  16. package/dist/ai/command-bar.js +241 -263
  17. package/dist/ai/conversation.d.ts.map +1 -1
  18. package/dist/ai/conversation.js +87 -107
  19. package/dist/composed/activity-feed.d.ts +2 -0
  20. package/dist/composed/activity-feed.d.ts.map +1 -1
  21. package/dist/composed/activity-feed.js +118 -90
  22. package/dist/composed/avatar-group.d.ts +1 -0
  23. package/dist/composed/avatar-group.d.ts.map +1 -1
  24. package/dist/composed/avatar-group.js +91 -67
  25. package/dist/composed/bulk-action-bar.d.ts.map +1 -1
  26. package/dist/composed/bulk-action-bar.js +29 -28
  27. package/dist/composed/command-palette.d.ts.map +1 -1
  28. package/dist/composed/command-palette.js +99 -113
  29. package/dist/composed/content-card.js +1 -1
  30. package/dist/composed/date-picker/calendar-grid.d.ts.map +1 -1
  31. package/dist/composed/date-picker/date-picker.d.ts.map +1 -1
  32. package/dist/composed/date-picker/date-range-picker.d.ts.map +1 -1
  33. package/dist/composed/date-picker/date-time-picker.d.ts.map +1 -1
  34. package/dist/composed/date-picker/time-picker.d.ts.map +1 -1
  35. package/dist/composed/deadline-indicator.d.ts.map +1 -1
  36. package/dist/composed/deadline-indicator.js +29 -28
  37. package/dist/composed/error-boundary.d.ts.map +1 -1
  38. package/dist/composed/error-boundary.js +30 -27
  39. package/dist/composed/extensions/file-attachment.d.ts.map +1 -1
  40. package/dist/composed/file-preview.d.ts.map +1 -1
  41. package/dist/composed/file-preview.js +261 -271
  42. package/dist/composed/filter-bar.d.ts.map +1 -1
  43. package/dist/composed/filter-bar.js +49 -48
  44. package/dist/composed/form-section.d.ts.map +1 -1
  45. package/dist/composed/form-section.js +12 -11
  46. package/dist/composed/global-loading.js +1 -1
  47. package/dist/composed/index.js +63 -63
  48. package/dist/composed/inline-edit.d.ts.map +1 -1
  49. package/dist/composed/inline-edit.js +55 -54
  50. package/dist/composed/markdown-viewer.d.ts.map +1 -1
  51. package/dist/composed/markdown-viewer.js +44 -43
  52. package/dist/composed/master-detail.d.ts.map +1 -1
  53. package/dist/composed/master-detail.js +35 -34
  54. package/dist/composed/multi-select-popover.d.ts.map +1 -1
  55. package/dist/composed/multi-select-popover.js +64 -64
  56. package/dist/composed/page-header.d.ts.map +1 -1
  57. package/dist/composed/page-header.js +31 -37
  58. package/dist/composed/priority-indicator.d.ts.map +1 -1
  59. package/dist/composed/priority-indicator.js +37 -36
  60. package/dist/composed/rich-text-editor.d.ts.map +1 -1
  61. package/dist/composed/rich-text-editor.js +287 -306
  62. package/dist/composed/schedule-view.js +62 -62
  63. package/dist/composed/status-badge.d.ts +4 -2
  64. package/dist/composed/status-badge.d.ts.map +1 -1
  65. package/dist/composed/status-badge.js +58 -45
  66. package/dist/shell/app-command-palette.d.ts.map +1 -1
  67. package/dist/shell/app-command-palette.js +93 -93
  68. package/dist/shell/bottom-navbar.d.ts.map +1 -1
  69. package/dist/shell/bottom-navbar.js +21 -20
  70. package/dist/shell/index.js +18 -18
  71. package/dist/shell/notification-center.d.ts.map +1 -1
  72. package/dist/shell/notification-center.js +96 -95
  73. package/dist/shell/notification-preferences.d.ts.map +1 -1
  74. package/dist/shell/notification-preferences.js +82 -85
  75. package/dist/shell/sidebar.js +59 -60
  76. package/dist/shell/top-bar.d.ts.map +1 -1
  77. package/dist/shell/top-bar.js +103 -103
  78. package/dist/tailwind/index.cjs +37 -4
  79. package/dist/tailwind/preset.d.ts.map +1 -1
  80. package/dist/tailwind/preset.js +38 -5
  81. package/dist/tokens/primitives.css +10 -0
  82. package/dist/tokens/semantic.css +70 -7
  83. package/dist/ui/accordion.d.ts +5 -2
  84. package/dist/ui/accordion.d.ts.map +1 -1
  85. package/dist/ui/accordion.js +44 -39
  86. package/dist/ui/alert-dialog.js +57 -57
  87. package/dist/ui/alert.d.ts +1 -1
  88. package/dist/ui/alert.d.ts.map +1 -1
  89. package/dist/ui/alert.js +30 -29
  90. package/dist/ui/aspect-ratio.js +4 -4
  91. package/dist/ui/autocomplete.js +56 -56
  92. package/dist/ui/avatar.js +2 -2
  93. package/dist/ui/badge-group.d.ts +22 -0
  94. package/dist/ui/badge-group.d.ts.map +1 -0
  95. package/dist/ui/badge-group.js +8 -0
  96. package/dist/ui/badge-indicator.d.ts +32 -0
  97. package/dist/ui/badge-indicator.d.ts.map +1 -0
  98. package/dist/ui/badge-indicator.js +54 -0
  99. package/dist/ui/badge.d.ts +27 -24
  100. package/dist/ui/badge.d.ts.map +1 -1
  101. package/dist/ui/badge.js +13 -129
  102. package/dist/ui/banner.d.ts +1 -1
  103. package/dist/ui/banner.d.ts.map +1 -1
  104. package/dist/ui/banner.js +27 -26
  105. package/dist/ui/breadcrumb.d.ts.map +1 -1
  106. package/dist/ui/breadcrumb.js +37 -36
  107. package/dist/ui/button-group.d.ts +12 -6
  108. package/dist/ui/button-group.d.ts.map +1 -1
  109. package/dist/ui/button-group.js +18 -18
  110. package/dist/ui/button-processing.d.ts +15 -0
  111. package/dist/ui/button-processing.d.ts.map +1 -0
  112. package/dist/ui/button-processing.js +77 -0
  113. package/dist/ui/button.d.ts +50 -25
  114. package/dist/ui/button.d.ts.map +1 -1
  115. package/dist/ui/button.js +243 -127
  116. package/dist/ui/card.js +20 -21
  117. package/dist/ui/charts/index.js +499 -508
  118. package/dist/ui/chat/date-separator.d.ts +12 -0
  119. package/dist/ui/chat/date-separator.d.ts.map +1 -0
  120. package/dist/ui/chat/index.d.ts +9 -0
  121. package/dist/ui/chat/index.d.ts.map +1 -0
  122. package/dist/ui/chat/index.js +12 -0
  123. package/dist/ui/chat/message-input.d.ts +16 -0
  124. package/dist/ui/chat/message-input.d.ts.map +1 -0
  125. package/dist/ui/chat/message-list.d.ts +24 -0
  126. package/dist/ui/chat/message-list.d.ts.map +1 -0
  127. package/dist/ui/chat/message.d.ts +108 -0
  128. package/dist/ui/chat/message.d.ts.map +1 -0
  129. package/dist/ui/chat/system-message.d.ts +11 -0
  130. package/dist/ui/chat/system-message.d.ts.map +1 -0
  131. package/dist/ui/chat/typing-indicator.d.ts +14 -0
  132. package/dist/ui/chat/typing-indicator.d.ts.map +1 -0
  133. package/dist/ui/chat/unread-separator.d.ts +12 -0
  134. package/dist/ui/chat/unread-separator.d.ts.map +1 -0
  135. package/dist/ui/checkbox.js +18 -18
  136. package/dist/ui/chip.d.ts +13 -62
  137. package/dist/ui/chip.d.ts.map +1 -1
  138. package/dist/ui/chip.js +10 -109
  139. package/dist/ui/collapsible.js +4 -4
  140. package/dist/ui/color-input.d.ts +19 -5
  141. package/dist/ui/color-input.d.ts.map +1 -1
  142. package/dist/ui/color-input.js +371 -79
  143. package/dist/ui/color-swatch.js +11 -11
  144. package/dist/ui/combobox.d.ts.map +1 -1
  145. package/dist/ui/combobox.js +74 -80
  146. package/dist/ui/context-menu.d.ts.map +1 -1
  147. package/dist/ui/context-menu.js +86 -85
  148. package/dist/ui/data-table-toolbar.d.ts.map +1 -1
  149. package/dist/ui/data-table-toolbar.js +51 -57
  150. package/dist/ui/data-table.d.ts.map +1 -1
  151. package/dist/ui/data-table.js +268 -296
  152. package/dist/ui/devalok-grain.d.ts +81 -0
  153. package/dist/ui/devalok-grain.d.ts.map +1 -0
  154. package/dist/ui/devalok-grain.js +69 -0
  155. package/dist/ui/dialog.d.ts.map +1 -1
  156. package/dist/ui/dialog.js +73 -72
  157. package/dist/ui/dropdown-menu.d.ts.map +1 -1
  158. package/dist/ui/dropdown-menu.js +93 -92
  159. package/dist/ui/file-upload.d.ts.map +1 -1
  160. package/dist/ui/file-upload.js +82 -82
  161. package/dist/ui/hover-card.js +29 -29
  162. package/dist/ui/icon-button.d.ts +7 -7
  163. package/dist/ui/icon-button.d.ts.map +1 -1
  164. package/dist/ui/icon-context.d.ts +15 -0
  165. package/dist/ui/icon-context.d.ts.map +1 -0
  166. package/dist/ui/icon-context.js +20 -0
  167. package/dist/ui/icon-group.d.ts +22 -0
  168. package/dist/ui/icon-group.d.ts.map +1 -0
  169. package/dist/ui/icon-group.js +32 -0
  170. package/dist/ui/icon.d.ts +57 -0
  171. package/dist/ui/icon.d.ts.map +1 -0
  172. package/dist/ui/icon.js +122 -0
  173. package/dist/ui/index.d.ts +8 -1
  174. package/dist/ui/index.d.ts.map +1 -1
  175. package/dist/ui/index.js +351 -329
  176. package/dist/ui/input-otp.d.ts.map +1 -1
  177. package/dist/ui/input-otp.js +21 -20
  178. package/dist/ui/input.d.ts +32 -11
  179. package/dist/ui/input.d.ts.map +1 -1
  180. package/dist/ui/input.js +149 -44
  181. package/dist/ui/label.js +1 -1
  182. package/dist/ui/lib/motion.d.ts +2 -0
  183. package/dist/ui/lib/motion.d.ts.map +1 -1
  184. package/dist/ui/lib/motion.js +13 -11
  185. package/dist/ui/lib/utils.js +1 -1
  186. package/dist/ui/menubar.d.ts.map +1 -1
  187. package/dist/ui/menubar.js +87 -86
  188. package/dist/ui/navigation-menu.d.ts.map +1 -1
  189. package/dist/ui/navigation-menu.js +23 -28
  190. package/dist/ui/number-input.d.ts.map +1 -1
  191. package/dist/ui/number-input.js +54 -53
  192. package/dist/ui/pagination.d.ts.map +1 -1
  193. package/dist/ui/pagination.js +45 -44
  194. package/dist/ui/popover.js +30 -30
  195. package/dist/ui/progress.d.ts +3 -1
  196. package/dist/ui/progress.d.ts.map +1 -1
  197. package/dist/ui/progress.js +43 -39
  198. package/dist/ui/radio.js +1 -1
  199. package/dist/ui/search-input.d.ts.map +1 -1
  200. package/dist/ui/search-input.js +47 -60
  201. package/dist/ui/segmented-control.js +1 -1
  202. package/dist/ui/select.d.ts.map +1 -1
  203. package/dist/ui/select.js +54 -53
  204. package/dist/ui/separator.js +5 -5
  205. package/dist/ui/sheet.d.ts.map +1 -1
  206. package/dist/ui/sheet.js +46 -45
  207. package/dist/ui/sidebar.d.ts.map +1 -1
  208. package/dist/ui/sidebar.js +196 -193
  209. package/dist/ui/skeleton.js +1 -1
  210. package/dist/ui/slider.js +1 -1
  211. package/dist/ui/spinner.js +74 -74
  212. package/dist/ui/stat-card.d.ts.map +1 -1
  213. package/dist/ui/stat-card.js +85 -86
  214. package/dist/ui/switch.d.ts +3 -0
  215. package/dist/ui/switch.d.ts.map +1 -1
  216. package/dist/ui/switch.js +40 -26
  217. package/dist/ui/tabs.js +43 -43
  218. package/dist/ui/text.js +1 -1
  219. package/dist/ui/textarea.js +10 -10
  220. package/dist/ui/toast.d.ts.map +1 -1
  221. package/dist/ui/toast.js +169 -169
  222. package/dist/ui/toggle-group.js +1 -1
  223. package/dist/ui/toggle.js +5 -5
  224. package/dist/ui/tooltip.js +41 -41
  225. package/dist/ui/tree-view/tree-item.d.ts.map +1 -1
  226. package/docs/components/_header.md +4 -4
  227. package/docs/components/composed/activity-feed.md +7 -0
  228. package/docs/components/composed/avatar-group.md +8 -5
  229. package/docs/components/composed/status-badge.md +14 -1
  230. package/docs/components/ui/accordion.md +5 -2
  231. package/docs/components/ui/badge-group.md +38 -0
  232. package/docs/components/ui/badge-indicator.md +40 -0
  233. package/docs/components/ui/badge.md +36 -5
  234. package/docs/components/ui/button-processing.md +15 -0
  235. package/docs/components/ui/button.md +40 -11
  236. package/docs/components/ui/chat.md +214 -0
  237. package/docs/components/ui/color-input.md +58 -4
  238. package/docs/components/ui/data-table.md +3 -0
  239. package/docs/components/ui/devalok-grain.md +55 -0
  240. package/docs/components/ui/icon-button.md +12 -5
  241. package/docs/components/ui/icon-context.md +38 -0
  242. package/docs/components/ui/icon-group.md +36 -0
  243. package/docs/components/ui/icon.md +47 -0
  244. package/docs/components/ui/input.md +32 -6
  245. package/docs/components/ui/progress.md +5 -0
  246. package/docs/components/ui/spinner.md +3 -0
  247. package/docs/components/ui/switch.md +13 -0
  248. package/llms-full.txt +724 -44
  249. package/llms.txt +38 -19
  250. package/package.json +8 -2
@@ -1 +1 @@
1
- {"version":3,"file":"conversation.d.ts","sourceRoot":"","sources":["../../src/ai/conversation.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAa9B,OAAO,KAAK,EACV,mBAAmB,EACnB,cAAc,EACd,mBAAmB,EACpB,MAAM,SAAS,CAAA;AAIhB,MAAM,WAAW,mBAAmB;IAClC,QAAQ,EAAE,mBAAmB,EAAE,CAAA;IAC/B,YAAY,CAAC,EAAE,OAAO,CAAA;IACtB,eAAe,CAAC,EAAE,cAAc,EAAE,CAAA;IAClC,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;KAAE,CAAA;IAChD,QAAQ,CAAC,EAAE,CAAC,QAAQ,EAAE,MAAM,EAAE,IAAI,EAAE,SAAS,GAAG,QAAQ,GAAG,MAAM,KAAK,IAAI,CAAA;IAC1E,YAAY,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,KAAK,CAAC,aAAa,CAAC,mBAAmB,CAAC,GAAG,CAAC,CAAC,CAAC,CAAA;IAC5E,SAAS,CAAC,EAAE,MAAM,GAAG,MAAM,CAAA;IAC3B,UAAU,CAAC,EAAE,OAAO,CAAA;IACpB,SAAS,CAAC,EAAE,MAAM,CAAA;CACnB;AA4ND,iBAAS,cAAc,CAAC,EACtB,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 @@
1
1
  "use client";
2
- import { jsxs as o, jsx as e } from "react/jsx-runtime";
3
- import * as i from "react";
2
+ import { jsxs as c, jsx as e } from "react/jsx-runtime";
3
+ import * as a from "react";
4
4
  import { IconCircle as T, IconCircleX as O, IconLoader2 as S, IconCircleCheck as L } from "@tabler/icons-react";
5
- import { cn as A } from "../ui/lib/utils.js";
6
- import { springs as C } from "../ui/lib/motion.js";
5
+ import { Icon as f } from "../ui/icon.js";
6
+ import { cn as w } from "../ui/lib/utils.js";
7
+ import { springs as B } from "../ui/lib/motion.js";
7
8
  import { u as U } from "../_chunks/motion-provider.js";
8
9
  import { BlockRenderer as V } from "./block-renderer.js";
9
10
  import { useAICommand as $ } from "./ai-command-provider.js";
10
- import { A as z, m as u } from "../_chunks/framer.js";
11
- function D({ status: t }) {
11
+ import { A as D, m as l } from "../_chunks/framer.js";
12
+ function F({ status: t }) {
12
13
  switch (t) {
13
14
  case "done":
14
- return /* @__PURE__ */ e(
15
- L,
16
- {
17
- className: "h-4 w-4 text-success-11",
18
- "aria-hidden": "true"
19
- }
20
- );
15
+ return /* @__PURE__ */ e(f, { icon: L, size: "sm", className: "text-success-11" });
21
16
  case "active":
22
17
  return /* @__PURE__ */ e(
23
- u.span,
18
+ l.span,
24
19
  {
25
- className: "inline-flex h-4 w-4 items-center justify-center text-accent-9",
20
+ className: "inline-flex items-center justify-center text-accent-9",
26
21
  animate: { rotate: 360 },
27
22
  transition: { repeat: 1 / 0, duration: 1, ease: "linear" },
28
23
  "aria-hidden": "true",
29
- children: /* @__PURE__ */ e(S, { className: "h-4 w-4" })
24
+ children: /* @__PURE__ */ e(f, { icon: S, size: "sm" })
30
25
  }
31
26
  );
32
27
  case "error":
33
- return /* @__PURE__ */ e(
34
- O,
35
- {
36
- className: "h-4 w-4 text-error-11",
37
- "aria-hidden": "true"
38
- }
39
- );
40
- case "pending":
28
+ return /* @__PURE__ */ e(f, { icon: O, size: "sm", className: "text-error-11" });
41
29
  default:
42
- return /* @__PURE__ */ e(
43
- T,
44
- {
45
- className: "h-4 w-4 text-surface-fg-subtle opacity-50",
46
- "aria-hidden": "true"
47
- }
48
- );
30
+ return /* @__PURE__ */ e(f, { icon: T, size: "sm", className: "text-surface-fg-subtle opacity-50" });
49
31
  }
50
32
  }
51
- function x({
33
+ function b({
52
34
  name: t,
53
35
  icon: n
54
36
  }) {
55
- return /* @__PURE__ */ o("div", { className: "flex items-center gap-ds-02b mb-ds-03", children: [
37
+ return /* @__PURE__ */ c("div", { className: "flex items-center gap-ds-02b mb-ds-03", children: [
56
38
  n && /* @__PURE__ */ e("span", { className: "h-4 w-4 flex items-center justify-center", children: n }),
57
39
  /* @__PURE__ */ e("span", { className: "text-ds-xs font-semibold uppercase tracking-wider text-surface-fg-subtle", children: t })
58
40
  ] });
59
41
  }
60
- function F({
42
+ function G({
61
43
  message: t,
62
44
  reducedMotion: n
63
45
  }) {
64
46
  return n ? /* @__PURE__ */ e("div", { className: "bg-surface-raised rounded-ds-lg px-ds-05 py-ds-04", children: /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg", children: t.content }) }) : /* @__PURE__ */ e(
65
- u.div,
47
+ l.div,
66
48
  {
67
49
  className: "bg-surface-raised rounded-ds-lg px-ds-05 py-ds-04",
68
50
  initial: { opacity: 0, y: 8 },
69
51
  animate: { opacity: 1, y: 0 },
70
- transition: C.snappy,
52
+ transition: B.snappy,
71
53
  children: /* @__PURE__ */ e("p", { className: "text-ds-sm text-surface-fg", children: t.content })
72
54
  }
73
55
  );
74
56
  }
75
- function G({
57
+ function P({
76
58
  message: t,
77
59
  agent: n,
78
- onAction: c,
79
- customBlocks: a
60
+ onAction: o,
61
+ customBlocks: s
80
62
  }) {
81
- return /* @__PURE__ */ o("div", { children: [
82
- /* @__PURE__ */ e(x, { name: n.name, icon: n.icon }),
63
+ return /* @__PURE__ */ c("div", { children: [
64
+ /* @__PURE__ */ e(b, { name: n.name, icon: n.icon }),
83
65
  t.blocks && /* @__PURE__ */ e(
84
66
  V,
85
67
  {
86
68
  blocks: t.blocks,
87
- onAction: c,
88
- customBlocks: a
69
+ onAction: o,
70
+ customBlocks: s
89
71
  }
90
72
  )
91
73
  ] });
92
74
  }
93
- function P({
75
+ function X({
94
76
  steps: t,
95
77
  agent: n,
96
- reducedMotion: c
78
+ reducedMotion: o
97
79
  }) {
98
- return t && t.length > 0 ? /* @__PURE__ */ o("div", { role: "status", "aria-busy": "true", "aria-label": "Processing", children: [
99
- /* @__PURE__ */ e(x, { name: n.name, icon: n.icon }),
100
- /* @__PURE__ */ e("div", { className: "flex flex-col gap-ds-02b", children: t.map((a, p) => /* @__PURE__ */ o(
101
- u.div,
80
+ return t && t.length > 0 ? /* @__PURE__ */ c("div", { role: "status", "aria-busy": "true", "aria-label": "Processing", children: [
81
+ /* @__PURE__ */ e(b, { name: n.name, icon: n.icon }),
82
+ /* @__PURE__ */ e("div", { className: "flex flex-col gap-ds-02b", children: t.map((s, p) => /* @__PURE__ */ c(
83
+ l.div,
102
84
  {
103
85
  className: "flex items-center gap-ds-02b",
104
- initial: c ? void 0 : { opacity: 0, x: -8 },
86
+ initial: o ? void 0 : { opacity: 0, x: -8 },
105
87
  animate: { opacity: 1, x: 0 },
106
- transition: c ? { duration: 0 } : { duration: 0.2, delay: p * 0.05 },
88
+ transition: o ? { duration: 0 } : { duration: 0.2, delay: p * 0.05 },
107
89
  children: [
108
- /* @__PURE__ */ e(D, { status: a.status }),
90
+ /* @__PURE__ */ e(F, { status: s.status }),
109
91
  /* @__PURE__ */ e(
110
92
  "span",
111
93
  {
112
- className: A(
94
+ className: w(
113
95
  "text-ds-sm",
114
- a.status === "pending" ? "text-surface-fg-subtle" : "text-surface-fg"
96
+ s.status === "pending" ? "text-surface-fg-subtle" : "text-surface-fg"
115
97
  ),
116
- children: a.label
98
+ children: s.label
117
99
  }
118
100
  )
119
101
  ]
120
102
  },
121
- a.id
103
+ s.id
122
104
  )) })
123
- ] }) : /* @__PURE__ */ o(
105
+ ] }) : /* @__PURE__ */ c(
124
106
  "div",
125
107
  {
126
108
  role: "status",
127
109
  "aria-busy": "true",
128
110
  "aria-label": `${n.name} is processing`,
129
111
  children: [
130
- /* @__PURE__ */ e(x, { name: n.name, icon: n.icon }),
131
- /* @__PURE__ */ o("div", { className: "flex items-center gap-ds-02", children: [
132
- !c && [0, 1, 2].map((a) => /* @__PURE__ */ e(
133
- u.span,
112
+ /* @__PURE__ */ e(b, { name: n.name, icon: n.icon }),
113
+ /* @__PURE__ */ c("div", { className: "flex items-center gap-ds-02", children: [
114
+ !o && [0, 1, 2].map((s) => /* @__PURE__ */ e(
115
+ l.span,
134
116
  {
135
117
  className: "h-1.5 w-1.5 rounded-full bg-accent-9",
136
118
  animate: { scale: [1, 1.4, 1], opacity: [0.4, 1, 0.4] },
@@ -138,12 +120,12 @@ function P({
138
120
  duration: 1.4,
139
121
  repeat: 1 / 0,
140
122
  ease: "easeInOut",
141
- delay: a * 0.16
123
+ delay: s * 0.16
142
124
  }
143
125
  },
144
- a
126
+ s
145
127
  )),
146
- /* @__PURE__ */ o("span", { className: "ml-ds-02b text-ds-sm text-surface-fg-subtle", children: [
128
+ /* @__PURE__ */ c("span", { className: "ml-ds-02b text-ds-sm text-surface-fg-subtle", children: [
147
129
  n.name,
148
130
  " is thinking..."
149
131
  ] })
@@ -152,9 +134,9 @@ function P({
152
134
  }
153
135
  );
154
136
  }
155
- function X({ onClick: t }) {
156
- return /* @__PURE__ */ o(
157
- u.button,
137
+ function _({ onClick: t }) {
138
+ return /* @__PURE__ */ c(
139
+ l.button,
158
140
  {
159
141
  role: "button",
160
142
  "aria-label": "Scroll to latest response",
@@ -162,7 +144,7 @@ function X({ onClick: t }) {
162
144
  initial: { opacity: 0, y: 8 },
163
145
  animate: { opacity: 1, y: 0 },
164
146
  exit: { opacity: 0, y: 8 },
165
- transition: C.snappy,
147
+ transition: B.snappy,
166
148
  onClick: t,
167
149
  children: [
168
150
  "↓",
@@ -171,85 +153,83 @@ function X({ onClick: t }) {
171
153
  }
172
154
  );
173
155
  }
174
- const _ = { name: "Assistant" };
175
- function ee({
156
+ const q = { name: "Assistant" };
157
+ function ne({
176
158
  messages: t,
177
159
  isProcessing: n = !1,
178
- processingSteps: c,
179
- agent: a,
160
+ processingSteps: o,
161
+ agent: s,
180
162
  onAction: p,
181
163
  customBlocks: y,
182
- maxHeight: m,
183
- autoScroll: f = !0,
184
- className: B
164
+ maxHeight: u,
165
+ autoScroll: d = !0,
166
+ className: R
185
167
  }) {
186
- const r = $(), { reducedMotion: v } = U(), N = a ?? (r == null ? void 0 : r.agent) ?? _, R = p ?? (r == null ? void 0 : r.onAction), j = i.useMemo(() => ({ ...(r == null ? void 0 : r.customBlocks) ?? {}, ...y }), [r == null ? void 0 : r.customBlocks, y]), g = i.useRef(null), l = i.useRef(null), [h, w] = i.useState(!0), [E, b] = i.useState(!1), I = i.useRef(t.length), k = i.useRef(n);
187
- i.useEffect(() => {
188
- if (!f || !l.current) return;
189
- const s = new IntersectionObserver(
190
- ([d]) => {
191
- w(d.isIntersecting), d.isIntersecting && b(!1);
168
+ const m = $(), { reducedMotion: v } = U(), N = s ?? m?.agent ?? q, z = p ?? m?.onAction, j = a.useMemo(() => ({ ...m?.customBlocks ?? {}, ...y }), [m?.customBlocks, y]), g = a.useRef(null), i = a.useRef(null), [x, I] = a.useState(!0), [E, h] = a.useState(!1), k = a.useRef(t.length), A = a.useRef(n);
169
+ a.useEffect(() => {
170
+ if (!d || !i.current) return;
171
+ const r = new IntersectionObserver(
172
+ ([C]) => {
173
+ I(C.isIntersecting), C.isIntersecting && h(!1);
192
174
  },
193
175
  {
194
176
  root: g.current,
195
177
  threshold: 0.1
196
178
  }
197
179
  );
198
- return s.observe(l.current), () => s.disconnect();
199
- }, [f]), i.useEffect(() => {
200
- var d;
201
- const s = t.length !== I.current || n !== k.current;
202
- I.current = t.length, k.current = n, !(!s || !f) && (h ? (d = l.current) == null || d.scrollIntoView({ behavior: "smooth", block: "end" }) : b(!0));
203
- }, [t, n, h, f]);
204
- const M = i.useCallback(() => {
205
- var s;
206
- (s = l.current) == null || s.scrollIntoView({ behavior: "smooth", block: "end" }), w(!0), b(!1);
180
+ return r.observe(i.current), () => r.disconnect();
181
+ }, [d]), a.useEffect(() => {
182
+ const r = t.length !== k.current || n !== A.current;
183
+ k.current = t.length, A.current = n, !(!r || !d) && (x ? i.current?.scrollIntoView({ behavior: "smooth", block: "end" }) : h(!0));
184
+ }, [t, n, x, d]);
185
+ const M = a.useCallback(() => {
186
+ i.current?.scrollIntoView({ behavior: "smooth", block: "end" }), I(!0), h(!1);
207
187
  }, []);
208
- return /* @__PURE__ */ o("div", { className: A("relative", B), children: [
209
- /* @__PURE__ */ o(
188
+ return /* @__PURE__ */ c("div", { className: w("relative", R), children: [
189
+ /* @__PURE__ */ c(
210
190
  "div",
211
191
  {
212
192
  ref: g,
213
193
  className: "flex flex-col gap-ds-05 overflow-y-auto",
214
194
  "aria-live": "polite",
215
- style: m ? {
216
- maxHeight: typeof m == "number" ? `${m}px` : m
195
+ style: u ? {
196
+ maxHeight: typeof u == "number" ? `${u}px` : u
217
197
  } : void 0,
218
198
  children: [
219
199
  t.map(
220
- (s) => s.role === "user" ? /* @__PURE__ */ e(
221
- F,
200
+ (r) => r.role === "user" ? /* @__PURE__ */ e(
201
+ G,
222
202
  {
223
- message: s,
203
+ message: r,
224
204
  reducedMotion: v
225
205
  },
226
- s.id
206
+ r.id
227
207
  ) : /* @__PURE__ */ e(
228
- G,
208
+ P,
229
209
  {
230
- message: s,
210
+ message: r,
231
211
  agent: N,
232
- onAction: R,
212
+ onAction: z,
233
213
  customBlocks: j
234
214
  },
235
- s.id
215
+ r.id
236
216
  )
237
217
  ),
238
218
  n && /* @__PURE__ */ e(
239
- P,
219
+ X,
240
220
  {
241
- steps: c,
221
+ steps: o,
242
222
  agent: N,
243
223
  reducedMotion: v
244
224
  }
245
225
  ),
246
- /* @__PURE__ */ e("div", { ref: l, className: "h-px" })
226
+ /* @__PURE__ */ e("div", { ref: i, className: "h-px" })
247
227
  ]
248
228
  }
249
229
  ),
250
- /* @__PURE__ */ e(z, { children: !h && E && /* @__PURE__ */ e(X, { onClick: M }) })
230
+ /* @__PURE__ */ e(D, { children: !x && E && /* @__PURE__ */ e(_, { onClick: M }) })
251
231
  ] });
252
232
  }
253
233
  export {
254
- ee as AIConversation
234
+ ne as AIConversation
255
235
  };
@@ -28,6 +28,8 @@ export interface ActivityFeedProps extends React.HTMLAttributes<HTMLDivElement>
28
28
  maxInitialItems?: number;
29
29
  groupBy?: 'time' | 'none';
30
30
  groupLabels?: GroupLabels;
31
+ /** Custom renderer per item. Return ReactNode for custom rendering, undefined to use default ActivityEntry. */
32
+ renderItem?: (item: ActivityItem, index: number) => React.ReactNode | undefined;
31
33
  }
32
34
  /**
33
35
  * Buckets items into time-based groups: today, yesterday, earlier this week (since Monday), older.
@@ -1 +1 @@
1
- {"version":3,"file":"activity-feed.d.ts","sourceRoot":"","sources":["../../src/composed/activity-feed.tsx"],"names":[],"mappings":"AAEA,OAAO,KAAK,KAAK,MAAM,OAAO,CAAA;AAW9B,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAC;QAAC,KAAK,CAAC,EAAE,MAAM,CAAA;KAAE,CAAA;IACxC,MAAM,EAAE,MAAM,GAAG,KAAK,CAAC,SAAS,CAAA;IAChC,SAAS,EAAE,IAAI,GAAG,MAAM,CAAA;IACxB,IAAI,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;IACtB,KAAK,CAAC,EAAE,SAAS,GAAG,SAAS,GAAG,SAAS,GAAG,OAAO,GAAG,MAAM,CAAA;IAC5D,MAAM,CAAC,EAAE,KAAK,CAAC,SAAS,CAAA;CACzB;AAED,MAAM,WAAW,WAAW;IAC1B,KAAK,CAAC,EAAE,MAAM,CAAA;IACd,SAAS,CAAC,EAAE,MAAM,CAAA;IAClB,QAAQ,CAAC,EAAE,MAAM,CAAA;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