@lostgradient/cinder 0.15.0 → 0.16.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 (325) hide show
  1. package/CHANGELOG.md +6 -0
  2. package/README.md +3 -3
  3. package/components.json +2 -143
  4. package/dist/components/access-gate/index.js +379 -327
  5. package/dist/components/alert-dialog/index.js +170 -172
  6. package/dist/components/confirm-dialog/index.js +170 -172
  7. package/dist/components/drawer/index.js +11 -11
  8. package/dist/components/focus-trap/index.d.ts +1 -0
  9. package/dist/components/focus-trap/index.js +171 -1
  10. package/dist/components/icons/index.d.ts +80 -1
  11. package/dist/components/icons/index.js +1256 -0
  12. package/dist/components/markdown-editor/index.js +170 -170
  13. package/dist/components/modal/index.js +20 -20
  14. package/dist/components/review-editor/index.js +170 -187
  15. package/dist/components/sheet/index.js +11 -11
  16. package/dist/components/sidebar/index.js +37 -37
  17. package/dist/index.d.ts +0 -8
  18. package/dist/index.js +23202 -30173
  19. package/dist/server/components/access-gate/index.js +7 -10
  20. package/dist/server/components/alert-dialog/index.js +4 -4
  21. package/dist/server/components/approval-card/index.js +6 -6
  22. package/dist/server/components/autocomplete/index.js +4 -4
  23. package/dist/server/components/choice-grid/index.js +2 -2
  24. package/dist/server/components/color-field/index.js +2 -2
  25. package/dist/server/components/combobox/index.js +3 -3
  26. package/dist/server/components/command-item/index.js +3 -5
  27. package/dist/server/components/command-menu/index.js +3 -5
  28. package/dist/server/components/confirm-dialog/index.js +4 -4
  29. package/dist/server/components/context-menu/index.js +7 -7
  30. package/dist/server/components/data-table/index.js +3 -3
  31. package/dist/server/components/date-picker/index.js +4 -4
  32. package/dist/server/components/date-range-field/index.js +4 -4
  33. package/dist/server/components/diff-viewer/index.js +9 -11
  34. package/dist/server/components/drawer/index.js +4 -4
  35. package/dist/server/components/dropdown/index.js +7 -7
  36. package/dist/server/components/faceted-filter-bar/index.js +2 -2
  37. package/dist/server/components/focus-trap/index.js +7 -2
  38. package/dist/server/components/icons/index.js +156 -0
  39. package/dist/server/components/inline-loading/index.js +1 -1
  40. package/dist/server/components/json-schema-editor/index.js +11 -13
  41. package/dist/server/components/load-more/index.js +2 -3
  42. package/dist/server/components/markdown-editor/index.js +13 -12
  43. package/dist/server/components/menu-bar/index.js +4 -4
  44. package/dist/server/components/modal/index.js +4 -4
  45. package/dist/server/components/popover/index.js +3 -3
  46. package/dist/server/components/review-editor/index.js +169 -122
  47. package/dist/server/components/schedule-builder/index.js +5 -5
  48. package/dist/server/components/schema-form/index.js +1 -1
  49. package/dist/server/components/segment/index.js +3 -3
  50. package/dist/server/components/segmented-control/index.js +4 -4
  51. package/dist/server/components/selection-popover/index.js +3 -3
  52. package/dist/server/components/sheet/index.js +3 -3
  53. package/dist/server/components/sidebar/index.js +4 -4
  54. package/dist/server/components/table/index.js +3 -3
  55. package/dist/server/components/tag-input/index.js +2 -2
  56. package/dist/server/index.js +272 -316
  57. package/dist/server/{index.server-dwwqssey.js → index.server-0qh3v3nq.js} +1 -1
  58. package/dist/server/index.server-25wmev4e.js +2 -0
  59. package/dist/server/{index.server-zdm63dt8.js → index.server-2c56kqws.js} +107 -25
  60. package/dist/server/{index.server-y4n8vc08.js → index.server-2pc5cv6c.js} +1 -1
  61. package/dist/server/{index.server-1vsv7ngz.js → index.server-3g76h7z7.js} +12 -2
  62. package/dist/server/{index.server-xz99aed4.js → index.server-45n4s30n.js} +12 -12
  63. package/dist/server/{index.server-zzd5wpbw.js → index.server-4dfs3xwn.js} +1 -1
  64. package/dist/server/{index.server-vhyjjx9z.js → index.server-4jkqgp17.js} +7 -9
  65. package/dist/server/{index.server-bmxbsk4y.js → index.server-51sxnete.js} +18 -18
  66. package/dist/server/{index.server-1bwvsnjk.js → index.server-6rv1rfwq.js} +37 -14
  67. package/dist/server/{index.server-np3c7kx0.js → index.server-7798gc22.js} +1 -1
  68. package/dist/server/{index.server-2m1kenak.js → index.server-7kjw6qw5.js} +1 -1
  69. package/dist/server/{index.server-tfftb7hs.js → index.server-7zpzspk6.js} +1 -1
  70. package/dist/server/{index.server-7yvpb6z7.js → index.server-894t97kv.js} +4 -4
  71. package/dist/server/{index.server-47v2fhp4.js → index.server-8b35ekqg.js} +1 -1
  72. package/dist/server/{index.server-j5hn2qds.js → index.server-8nm871y8.js} +80 -30
  73. package/dist/server/{index.server-h0cvwvhy.js → index.server-9drzqktm.js} +1 -1
  74. package/dist/server/{index.server-x9s4m9eg.js → index.server-agsdwg53.js} +1 -1
  75. package/dist/server/{index.server-hpeavvnq.js → index.server-b4gp066a.js} +1 -1
  76. package/dist/server/{index.server-gkazv439.js → index.server-bf7d81b4.js} +7 -7
  77. package/dist/server/{index.server-krqvnt6p.js → index.server-d4ft97bx.js} +4 -2
  78. package/dist/server/{index.server-t1x9h8cb.js → index.server-dg19y3m7.js} +1 -1
  79. package/dist/server/{index.server-jt1twhgk.js → index.server-dq0k0qf6.js} +10 -10
  80. package/dist/server/{index.server-pxq277t5.js → index.server-frb9e55d.js} +1 -1
  81. package/dist/server/{index.server-9kz37z89.js → index.server-g3726bja.js} +1 -1
  82. package/dist/server/index.server-gyzmkrnz.js +2 -0
  83. package/dist/server/{index.server-mr68brd6.js → index.server-jgdtsvz2.js} +1 -1
  84. package/dist/server/{index.server-p56xxef1.js → index.server-m8ya4p7w.js} +1 -1
  85. package/dist/server/{index.server-1nq7z1qw.js → index.server-mda2y5g6.js} +1 -1
  86. package/dist/server/{index.server-jdcq5zza.js → index.server-mehav5vs.js} +7 -7
  87. package/dist/server/{index.server-e89qfamd.js → index.server-mknhgg07.js} +4 -4
  88. package/dist/server/{index.server-j570vb03.js → index.server-mvjzcna5.js} +1 -1
  89. package/dist/server/index.server-n4jxy52q.js +2 -0
  90. package/dist/server/{index.server-h89zk5ev.js → index.server-ne4gzxvz.js} +7 -7
  91. package/dist/server/{index.server-eftvmq3f.js → index.server-pfbzz3x7.js} +1 -1
  92. package/dist/server/{index.server-zrh23kty.js → index.server-pyjzfjfn.js} +1 -1
  93. package/dist/server/{index.server-rga8sc7j.js → index.server-q1d48s9t.js} +40 -36
  94. package/dist/server/{index.server-46cjwcqw.js → index.server-qv0kkre4.js} +5 -5
  95. package/dist/server/{index.server-yhzydqxe.js → index.server-r82zjq88.js} +5 -5
  96. package/dist/server/{index.server-9ykk1kbg.js → index.server-rbd5ys4z.js} +1 -1
  97. package/dist/server/{index.server-tcay903b.js → index.server-tnecnach.js} +4 -4
  98. package/dist/server/{index.server-9ra3xv88.js → index.server-x66zvjfc.js} +9 -9
  99. package/dist/server/{index.server-6sh11ap6.js → index.server-y4kfz0er.js} +1 -1
  100. package/dist/server/{index.server-n82rcv0m.js → index.server-z721a5gp.js} +4 -4
  101. package/dist/server/{index.server-mm1xa3kr.js → index.server-zdhv33ph.js} +51 -20
  102. package/dist/server/{index.server-t3hknp1c.js → index.server-zm04d9eq.js} +4 -4
  103. package/dist/server/{index.server-nx9c2ep1.js → index.server-zncgb7mw.js} +2 -2
  104. package/package.json +10 -130
  105. package/src/components/focus-trap/index.ts +1 -0
  106. package/src/components/icons/index.ts +82 -40
  107. package/src/index.ts +0 -34
  108. package/src/styles/components.css +0 -4
  109. package/dist/components/chat/adapter/chat-adapter.d.ts +0 -123
  110. package/dist/components/chat/adapter/index.d.ts +0 -8
  111. package/dist/components/chat/artifact/artifact-panel.svelte.d.ts +0 -15
  112. package/dist/components/chat/artifact/artifact-viewer.svelte.d.ts +0 -10
  113. package/dist/components/chat/artifact/chat-artifact-layout.svelte.d.ts +0 -23
  114. package/dist/components/chat/artifact/index.d.ts +0 -3
  115. package/dist/components/chat/builders.d.ts +0 -25
  116. package/dist/components/chat/chat.css +0 -16
  117. package/dist/components/chat/chat.css.d.ts +0 -1
  118. package/dist/components/chat/chat.schema.d.ts +0 -3
  119. package/dist/components/chat/chat.schema.js +0 -366
  120. package/dist/components/chat/chat.svelte.d.ts +0 -31
  121. package/dist/components/chat/chat.types.d.ts +0 -268
  122. package/dist/components/chat/chat.variables.d.ts +0 -2
  123. package/dist/components/chat/chat.variables.js +0 -61
  124. package/dist/components/chat/container/chat-events.d.ts +0 -22
  125. package/dist/components/chat/container/chat-history-trigger.svelte.d.ts +0 -15
  126. package/dist/components/chat/container/chat-jump-controls.svelte.d.ts +0 -24
  127. package/dist/components/chat/container/chat-participant-typing.svelte.d.ts +0 -31
  128. package/dist/components/chat/container/chat-search-bar.svelte.d.ts +0 -38
  129. package/dist/components/chat/container/chat-status-announcer.svelte.d.ts +0 -21
  130. package/dist/components/chat/container/chat.svelte.d.ts +0 -17
  131. package/dist/components/chat/container/index.d.ts +0 -12
  132. package/dist/components/chat/container/scroll-utilities.d.ts +0 -119
  133. package/dist/components/chat/container/use-chat-disclosure-state.svelte.d.ts +0 -58
  134. package/dist/components/chat/container/use-chat-keyboard-nav.svelte.d.ts +0 -57
  135. package/dist/components/chat/container/use-chat-message-groups.svelte.d.ts +0 -74
  136. package/dist/components/chat/container/use-chat-read-receipts.svelte.d.ts +0 -51
  137. package/dist/components/chat/container/use-chat-scroll-state.svelte.d.ts +0 -111
  138. package/dist/components/chat/container/use-chat-search.svelte.d.ts +0 -82
  139. package/dist/components/chat/container/use-chat-typing-indicator.svelte.d.ts +0 -76
  140. package/dist/components/chat/container/use-chat-unread-state.svelte.d.ts +0 -80
  141. package/dist/components/chat/container/use-chat-virtualizer.svelte.d.ts +0 -47
  142. package/dist/components/chat/conversation-model.d.ts +0 -16
  143. package/dist/components/chat/export/conversation-export-actions.svelte.d.ts +0 -17
  144. package/dist/components/chat/export/index.d.ts +0 -8
  145. package/dist/components/chat/index.d.ts +0 -25
  146. package/dist/components/chat/index.js +0 -11319
  147. package/dist/components/chat/input/attachment-kind.d.ts +0 -10
  148. package/dist/components/chat/input/chat-attachment-preview.svelte.d.ts +0 -8
  149. package/dist/components/chat/input/chat-attachment-serialization.d.ts +0 -9
  150. package/dist/components/chat/input/chat-attachment.d.ts +0 -11
  151. package/dist/components/chat/input/chat-input.svelte.d.ts +0 -79
  152. package/dist/components/chat/input/index.d.ts +0 -5
  153. package/dist/components/chat/message/chat-date-separator.svelte.d.ts +0 -12
  154. package/dist/components/chat/message/chat-message-parts-renderer.svelte.d.ts +0 -4
  155. package/dist/components/chat/message/chat-message-parts.d.ts +0 -96
  156. package/dist/components/chat/message/chat-message.svelte.d.ts +0 -91
  157. package/dist/components/chat/message/chat-read-receipt.svelte.d.ts +0 -27
  158. package/dist/components/chat/message/image-lightbox.svelte.d.ts +0 -17
  159. package/dist/components/chat/message/index.d.ts +0 -6
  160. package/dist/components/chat/message/markdown-preview.svelte.d.ts +0 -8
  161. package/dist/components/chat/message/message-attachments.svelte.d.ts +0 -17
  162. package/dist/components/chat/message/message-content.svelte.d.ts +0 -18
  163. package/dist/components/chat/message/parts/image-part.svelte.d.ts +0 -17
  164. package/dist/components/chat/message/parts/markdown-part.svelte.d.ts +0 -8
  165. package/dist/components/chat/message/parts/reasoning-part.svelte.d.ts +0 -12
  166. package/dist/components/chat/message/parts/step-part.svelte.d.ts +0 -8
  167. package/dist/components/chat/message/parts/suggestion-part.svelte.d.ts +0 -18
  168. package/dist/components/chat/message/parts/tool-approval-part.svelte.d.ts +0 -12
  169. package/dist/components/chat/message/parts/tool-call-part.svelte.d.ts +0 -12
  170. package/dist/components/chat/message/parts/tool-result-part.svelte.d.ts +0 -8
  171. package/dist/components/chat/message/tool-call-group.svelte.d.ts +0 -15
  172. package/dist/components/chat/message/tool-payload-code.svelte.d.ts +0 -9
  173. package/dist/components/chat/utilities/conversation.d.ts +0 -12
  174. package/dist/components/chat/utilities/index.d.ts +0 -9
  175. package/dist/components/chat/utilities/types.d.ts +0 -262
  176. package/dist/components/chat/utilities/utilities.d.ts +0 -140
  177. package/dist/components/chat-composer-popover/chat-composer-popover-filter.d.ts +0 -11
  178. package/dist/components/chat-composer-popover/chat-composer-popover.css +0 -7
  179. package/dist/components/chat-composer-popover/chat-composer-popover.css.d.ts +0 -1
  180. package/dist/components/chat-composer-popover/chat-composer-popover.schema.d.ts +0 -3
  181. package/dist/components/chat-composer-popover/chat-composer-popover.schema.js +0 -150
  182. package/dist/components/chat-composer-popover/chat-composer-popover.svelte.d.ts +0 -46
  183. package/dist/components/chat-composer-popover/chat-composer-popover.types.d.ts +0 -77
  184. package/dist/components/chat-composer-popover/chat-composer-popover.variables.d.ts +0 -2
  185. package/dist/components/chat-composer-popover/chat-composer-popover.variables.js +0 -61
  186. package/dist/components/chat-composer-popover/index.d.ts +0 -6
  187. package/dist/components/chat-composer-popover/index.js +0 -3285
  188. package/dist/components/chat-conversation-header/chat-conversation-header.css +0 -51
  189. package/dist/components/chat-conversation-header/chat-conversation-header.css.d.ts +0 -1
  190. package/dist/components/chat-conversation-header/chat-conversation-header.schema.d.ts +0 -3
  191. package/dist/components/chat-conversation-header/chat-conversation-header.schema.js +0 -94
  192. package/dist/components/chat-conversation-header/chat-conversation-header.svelte.d.ts +0 -19
  193. package/dist/components/chat-conversation-header/chat-conversation-header.types.d.ts +0 -18
  194. package/dist/components/chat-conversation-header/chat-conversation-header.variables.d.ts +0 -2
  195. package/dist/components/chat-conversation-header/chat-conversation-header.variables.js +0 -61
  196. package/dist/components/chat-conversation-header/index.d.ts +0 -5
  197. package/dist/components/chat-conversation-header/index.js +0 -4278
  198. package/dist/components/chat-conversation-list/chat-conversation-list.css +0 -127
  199. package/dist/components/chat-conversation-list/chat-conversation-list.css.d.ts +0 -1
  200. package/dist/components/chat-conversation-list/chat-conversation-list.schema.d.ts +0 -3
  201. package/dist/components/chat-conversation-list/chat-conversation-list.schema.js +0 -105
  202. package/dist/components/chat-conversation-list/chat-conversation-list.svelte.d.ts +0 -21
  203. package/dist/components/chat-conversation-list/chat-conversation-list.types.d.ts +0 -17
  204. package/dist/components/chat-conversation-list/chat-conversation-list.variables.d.ts +0 -2
  205. package/dist/components/chat-conversation-list/chat-conversation-list.variables.js +0 -61
  206. package/dist/components/chat-conversation-list/conversation-summary.d.ts +0 -30
  207. package/dist/components/chat-conversation-list/index.d.ts +0 -6
  208. package/dist/components/chat-conversation-list/index.js +0 -536
  209. package/dist/server/components/chat/index.js +0 -131
  210. package/dist/server/components/chat-composer-popover/index.js +0 -26
  211. package/dist/server/components/chat-conversation-header/index.js +0 -41
  212. package/dist/server/components/chat-conversation-list/index.js +0 -19
  213. package/dist/server/index.server-2bbwajb2.js +0 -54
  214. package/dist/server/index.server-2hqrv7ca.js +0 -9
  215. package/dist/server/index.server-67qgdypc.js +0 -9
  216. package/dist/server/index.server-6hnfzc7f.js +0 -263
  217. package/dist/server/index.server-8rmtb8vx.js +0 -175
  218. package/dist/server/index.server-a59y47rw.js +0 -59
  219. package/dist/server/index.server-bfkka7x4.js +0 -2
  220. package/dist/server/index.server-czf35aba.js +0 -4241
  221. package/dist/server/index.server-kb6w1a7c.js +0 -27
  222. package/dist/server/index.server-nphtb2ey.js +0 -76
  223. package/dist/server/index.server-qkfd0qa7.js +0 -2
  224. package/dist/server/index.server-rf67m8v5.js +0 -2
  225. package/dist/server/index.server-rqe5bqgm.js +0 -37
  226. package/dist/server/index.server-xtjjmsyq.js +0 -315
  227. package/dist/server/index.server-yq9evnp4.js +0 -38
  228. package/dist/server/index.server-z1qvwaem.js +0 -74
  229. package/dist/server/index.server-z7hxtqs1.js +0 -83
  230. package/src/components/chat/adapter/chat-adapter.ts +0 -132
  231. package/src/components/chat/adapter/index.ts +0 -15
  232. package/src/components/chat/artifact/artifact-panel.svelte +0 -112
  233. package/src/components/chat/artifact/artifact-viewer.svelte +0 -101
  234. package/src/components/chat/artifact/chat-artifact-layout.svelte +0 -56
  235. package/src/components/chat/artifact/index.ts +0 -3
  236. package/src/components/chat/builders.ts +0 -464
  237. package/src/components/chat/chat.css +0 -16
  238. package/src/components/chat/chat.examples.json +0 -67
  239. package/src/components/chat/chat.schema.json +0 -290
  240. package/src/components/chat/chat.schema.ts +0 -335
  241. package/src/components/chat/chat.svelte +0 -67
  242. package/src/components/chat/chat.types.ts +0 -284
  243. package/src/components/chat/chat.variables.json +0 -1
  244. package/src/components/chat/chat.variables.ts +0 -3
  245. package/src/components/chat/container/chat-events.ts +0 -26
  246. package/src/components/chat/container/chat-history-trigger.svelte +0 -95
  247. package/src/components/chat/container/chat-jump-controls.svelte +0 -191
  248. package/src/components/chat/container/chat-participant-typing.svelte +0 -128
  249. package/src/components/chat/container/chat-search-bar.svelte +0 -219
  250. package/src/components/chat/container/chat-status-announcer.svelte +0 -22
  251. package/src/components/chat/container/chat.svelte +0 -1879
  252. package/src/components/chat/container/index.ts +0 -64
  253. package/src/components/chat/container/scroll-utilities.ts +0 -204
  254. package/src/components/chat/container/use-chat-disclosure-state.svelte.ts +0 -62
  255. package/src/components/chat/container/use-chat-keyboard-nav.svelte.ts +0 -153
  256. package/src/components/chat/container/use-chat-message-groups.svelte.ts +0 -146
  257. package/src/components/chat/container/use-chat-read-receipts.svelte.ts +0 -62
  258. package/src/components/chat/container/use-chat-scroll-state.svelte.ts +0 -292
  259. package/src/components/chat/container/use-chat-search.svelte.ts +0 -116
  260. package/src/components/chat/container/use-chat-typing-indicator.svelte.ts +0 -153
  261. package/src/components/chat/container/use-chat-unread-state.svelte.ts +0 -170
  262. package/src/components/chat/container/use-chat-virtualizer.svelte.ts +0 -260
  263. package/src/components/chat/conversation-model.ts +0 -56
  264. package/src/components/chat/export/conversation-export-actions.svelte +0 -174
  265. package/src/components/chat/export/index.ts +0 -9
  266. package/src/components/chat/index.ts +0 -160
  267. package/src/components/chat/input/attachment-kind.ts +0 -28
  268. package/src/components/chat/input/chat-attachment-preview.svelte +0 -223
  269. package/src/components/chat/input/chat-attachment-serialization.ts +0 -63
  270. package/src/components/chat/input/chat-attachment.ts +0 -12
  271. package/src/components/chat/input/chat-input.svelte +0 -810
  272. package/src/components/chat/input/index.ts +0 -9
  273. package/src/components/chat/message/chat-date-separator.svelte +0 -87
  274. package/src/components/chat/message/chat-message-parts-renderer.svelte +0 -139
  275. package/src/components/chat/message/chat-message-parts.ts +0 -163
  276. package/src/components/chat/message/chat-message.svelte +0 -861
  277. package/src/components/chat/message/chat-read-receipt.svelte +0 -85
  278. package/src/components/chat/message/image-lightbox.svelte +0 -255
  279. package/src/components/chat/message/index.ts +0 -6
  280. package/src/components/chat/message/markdown-preview.svelte +0 -77
  281. package/src/components/chat/message/message-attachments.svelte +0 -178
  282. package/src/components/chat/message/message-content.svelte +0 -132
  283. package/src/components/chat/message/parts/image-part.svelte +0 -11
  284. package/src/components/chat/message/parts/markdown-part.svelte +0 -17
  285. package/src/components/chat/message/parts/reasoning-part.svelte +0 -274
  286. package/src/components/chat/message/parts/step-part.svelte +0 -127
  287. package/src/components/chat/message/parts/suggestion-part.svelte +0 -83
  288. package/src/components/chat/message/parts/tool-approval-part.svelte +0 -298
  289. package/src/components/chat/message/parts/tool-call-part.svelte +0 -19
  290. package/src/components/chat/message/parts/tool-result-part.svelte +0 -65
  291. package/src/components/chat/message/tool-call-group.svelte +0 -274
  292. package/src/components/chat/message/tool-payload-code.svelte +0 -35
  293. package/src/components/chat/utilities/conversation.ts +0 -44
  294. package/src/components/chat/utilities/index.ts +0 -33
  295. package/src/components/chat/utilities/types.ts +0 -288
  296. package/src/components/chat/utilities/utilities.ts +0 -507
  297. package/src/components/chat-composer-popover/chat-composer-popover-filter.ts +0 -68
  298. package/src/components/chat-composer-popover/chat-composer-popover.css +0 -7
  299. package/src/components/chat-composer-popover/chat-composer-popover.examples.json +0 -13
  300. package/src/components/chat-composer-popover/chat-composer-popover.schema.json +0 -90
  301. package/src/components/chat-composer-popover/chat-composer-popover.schema.ts +0 -95
  302. package/src/components/chat-composer-popover/chat-composer-popover.svelte +0 -234
  303. package/src/components/chat-composer-popover/chat-composer-popover.types.ts +0 -88
  304. package/src/components/chat-composer-popover/chat-composer-popover.variables.json +0 -1
  305. package/src/components/chat-composer-popover/chat-composer-popover.variables.ts +0 -3
  306. package/src/components/chat-composer-popover/index.ts +0 -19
  307. package/src/components/chat-conversation-header/chat-conversation-header.css +0 -51
  308. package/src/components/chat-conversation-header/chat-conversation-header.examples.json +0 -13
  309. package/src/components/chat-conversation-header/chat-conversation-header.schema.json +0 -34
  310. package/src/components/chat-conversation-header/chat-conversation-header.schema.ts +0 -38
  311. package/src/components/chat-conversation-header/chat-conversation-header.svelte +0 -49
  312. package/src/components/chat-conversation-header/chat-conversation-header.types.ts +0 -20
  313. package/src/components/chat-conversation-header/chat-conversation-header.variables.json +0 -1
  314. package/src/components/chat-conversation-header/chat-conversation-header.variables.ts +0 -3
  315. package/src/components/chat-conversation-header/index.ts +0 -9
  316. package/src/components/chat-conversation-list/chat-conversation-list.css +0 -127
  317. package/src/components/chat-conversation-list/chat-conversation-list.examples.json +0 -13
  318. package/src/components/chat-conversation-list/chat-conversation-list.schema.json +0 -45
  319. package/src/components/chat-conversation-list/chat-conversation-list.schema.ts +0 -52
  320. package/src/components/chat-conversation-list/chat-conversation-list.svelte +0 -75
  321. package/src/components/chat-conversation-list/chat-conversation-list.types.ts +0 -18
  322. package/src/components/chat-conversation-list/chat-conversation-list.variables.json +0 -1
  323. package/src/components/chat-conversation-list/chat-conversation-list.variables.ts +0 -3
  324. package/src/components/chat-conversation-list/conversation-summary.ts +0 -88
  325. package/src/components/chat-conversation-list/index.ts +0 -11
@@ -1,67 +0,0 @@
1
- <script lang="ts" module>
2
- export {};
3
- </script>
4
-
5
- <script lang="ts">
6
- import { classNames } from '../../utilities/class-names.ts';
7
- import ChatImplementation from './container/chat.svelte';
8
- let { class: className, ...rest } = $props();
9
- const mergedClassName = $derived(classNames(className));
10
- // The inner implementation owns the imperative streaming + scroll API. The
11
- // public wrapper forwards it so consumers using `@lostgradient/cinder/chat` can drive
12
- // streaming through a `bind:this` to <Chat> (the inner component is not
13
- // exported).
14
- // Plain `let` (not `$state`): the instance ref is only read inside the
15
- // imperative forwarders, never in the template or a derivation, so it needs
16
- // no reactivity.
17
- let impl;
18
- /**
19
- * Begin streaming content into an existing assistant message. No-op until the
20
- * component is mounted (a call via a stale ref after teardown is safe).
21
- */
22
- export function beginStreaming(messageId) {
23
- impl?.beginStreaming(messageId);
24
- }
25
- /** Append a token to the active streaming buffer. No-op until mounted. */
26
- export function pushToken(token) {
27
- impl?.pushToken(token);
28
- }
29
- /** End the active streaming session. No-op until mounted. */
30
- export function endStreaming() {
31
- impl?.endStreaming();
32
- }
33
- /**
34
- * Announce consumer-rendered status text through Chat's existing live regions.
35
- * No-op until mounted. Built-in tool-approval announcements take precedence
36
- * over consumer assertive announcements to avoid duplicate urgent output.
37
- */
38
- export function announce(message, level = 'polite') {
39
- impl?.announce(message, level);
40
- }
41
- /** Scroll the message viewport to the bottom. No-op until mounted. */
42
- export function scrollToBottom() {
43
- impl?.scrollToBottom();
44
- }
45
- /** Scroll the message viewport to the top. No-op until mounted. */
46
- export function scrollToTop() {
47
- impl?.scrollToTop();
48
- }
49
- /** Focus the composer input. No-op until mounted. */
50
- export function focusInput() {
51
- impl?.focusInput();
52
- }
53
- /** Clear the composer's current content. No-op until mounted. */
54
- export function clearInput() {
55
- impl?.clearInput();
56
- }
57
- /** Read the composer's current plain-text value. Returns '' until mounted. */
58
- export function getComposerValue() {
59
- return impl?.getComposerValue() ?? '';
60
- }
61
- /** Read the composer textarea element. Returns null until mounted. */
62
- export function getEditorElement() {
63
- return impl?.getEditorElement() ?? null;
64
- }
65
- </script>
66
-
67
- <ChatImplementation bind:this={impl} class={mergedClassName} {...rest} />
@@ -1,284 +0,0 @@
1
- import type { Snippet } from 'svelte';
2
- import type { Attachment } from 'svelte/attachments';
3
- import type { HTMLAttributes } from 'svelte/elements';
4
-
5
- import type {
6
- ChatAdapter,
7
- ChatAdapterErrorEvent,
8
- ChatReadReceiptEvent,
9
- } from './adapter/chat-adapter.ts';
10
- import type {
11
- ChatScrollStateChangeEvent,
12
- ChatStopGeneratingEvent,
13
- ChatSubmitEvent,
14
- ChatUnreadIndicatorChangeEvent,
15
- } from './container/chat-events.ts';
16
- import type { ConversationHistory, Message } from './conversation-model.ts';
17
- import type { ChatAttachment } from './input/chat-attachment.ts';
18
- import type { MessagePartOverride } from './message/chat-message-parts.ts';
19
- import type { StepInfo } from './utilities/types.ts';
20
-
21
- /**
22
- * A participant who is currently typing. Out-of-band UI state — NOT stored on
23
- * `Message` or `ConversationHistory`. Flows in as a plain (non-bindable) prop or
24
- * via the adapter's `onTypingChange` push handler.
25
- */
26
- export type TypingParticipant = {
27
- /** Unique identifier for the participant (e.g. user id). */
28
- id: string;
29
- /** Display name shown in the typing indicator label. */
30
- name: string;
31
- };
32
-
33
- /**
34
- * Read-receipt state for a single message. Out-of-band UI state — NOT stored on
35
- * `Message`. Flows in as a plain (non-bindable) `readReceipts` prop keyed by
36
- * message id, or accumulated from the adapter's `onReadReceipt` push handler.
37
- *
38
- * Render rules: shown only on `user` messages; color alone never conveys state
39
- * (icon + text label always present).
40
- */
41
- export type ReadReceipt = {
42
- /** Delivery/read status for this message. */
43
- status: 'sent' | 'delivered' | 'read';
44
- /**
45
- * Names of participants who have read the message. Used to compose the
46
- * accessible text (e.g. "Read by Alice, Bob"). May be empty when status is
47
- * `sent` or `delivered`.
48
- */
49
- readBy?: string[];
50
- };
51
-
52
- /** Live-region channel for imperative Chat announcements. */
53
- export type ChatAnnounceLevel = 'polite' | 'assertive';
54
-
55
- /**
56
- * Full-row override snippet. Inversion of control: receives the message AND a
57
- * `renderDefault` snippet that renders the built-in row, so a consumer can wrap
58
- * or replace a row while still delegating to the default when it chooses.
59
- */
60
- export type ChatRowOverride = Snippet<[message: Message, renderDefault: Snippet]>;
61
-
62
- /**
63
- * Feature-capability flags for the Chat component. Grouped here so consumers
64
- * pass a single object instead of five scattered boolean props.
65
- *
66
- * All flags default to `true` when the `capabilities` prop is omitted or when
67
- * an individual key is absent from the object.
68
- */
69
- export type ChatCapabilities = {
70
- /** Whether file attachments are enabled in the composer. When `false`, the attachment button is hidden and drag-and-drop onto the chat surface is suppressed. Default `true`. */
71
- attachments?: boolean;
72
- /** Whether in-conversation search is enabled. When `true`, pressing Ctrl+F / Cmd+F opens a search bar that highlights matching messages. Default `true`. */
73
- search?: boolean;
74
- /** Whether per-message copy buttons are shown in the message action bar. Default `true`. */
75
- copy?: boolean;
76
- /** Whether user messages can be edited inline. Default `true`. */
77
- editing?: boolean;
78
- /** Whether failed assistant messages show a retry button. Default `true`. */
79
- retry?: boolean;
80
- };
81
-
82
- /** Props for the Chat component. */
83
- // `onsubmit` is redefined below with a ChatSubmitEvent payload, so strip the
84
- // native DOM SubmitEvent handler from the base attributes to avoid an
85
- // intersection that no handler can satisfy.
86
- export type ChatProps = Omit<HTMLAttributes<HTMLElement>, 'class' | 'onsubmit'> & {
87
- /** Unique identifier used to scope accessibility attributes across the chat surface. */
88
- id: string;
89
- /**
90
- * The conversation transcript to render. Pass a {@link ConversationHistory}
91
- * snapshot; consumers holding a stateful conversation object pass its current
92
- * snapshot (e.g. `conversation.current`).
93
- */
94
- conversation: ConversationHistory;
95
- /** Whether the message viewport is scrolled to the bottom. Bindable; updated automatically as the user scrolls. Default `true`. */
96
- atBottom?: boolean;
97
- /** Number of messages received while the viewport was scrolled away from the bottom. Bindable; resets to `0` when the user scrolls to the bottom. Default `0`. */
98
- unreadCount?: number;
99
- /** Whether the "new messages" indicator is currently visible above the composer. Bindable; cleared automatically when the viewport reaches the bottom. Default `false`. */
100
- newMessageIndicatorVisible?: boolean;
101
- /** Additional class name merged onto the `.chat-container` root element. */
102
- class?: string;
103
- /** Controls the background of the chat surface. Use `'transparent'` to inherit the host element's background when embedding chat inside a card or panel. Default `'default'`. */
104
- surfaceMode?: 'default' | 'transparent';
105
- /**
106
- * Controls spacing density of the message timeline.
107
- * - `'comfortable'` (default): standard padding and gap.
108
- * - `'compact'`: tighter spacing for data-dense contexts (e.g., embedded panels).
109
- * Action buttons keep `min-height: var(--cinder-touch-target-min)` regardless.
110
- */
111
- density?: 'comfortable' | 'compact';
112
- /**
113
- * Visual treatment for message bubbles.
114
- * - `'bubble'` (default): colored backgrounds differentiate user from assistant.
115
- * - `'flat'`: no bubble backgrounds; role is communicated via alignment and role label.
116
- * Text-on-surface contrast meets WCAG AA via `--cinder-text` on `--cinder-surface-inset`.
117
- */
118
- variant?: 'bubble' | 'flat';
119
- /** Distance in pixels from the bottom of the scroll viewport within which the chat is considered "at bottom" and will auto-scroll on new messages. Default `150`. */
120
- bottomThreshold?: number;
121
- /** Distance in pixels scrolled up from the bottom required before the jump-to-latest button appears. Must be greater than `bottomThreshold` to prevent button flickering. Default `200`. */
122
- jumpThreshold?: number;
123
- /** Whether a streaming response is currently in progress. When `true`, the composer is disabled and a stop-generating button is shown. Default `false`. */
124
- streaming?: boolean;
125
- /** Optional status label displayed in the typing indicator while `streaming` is `true` and no streaming content has arrived yet (e.g. `"Thinking…"` or `"Analyzing file…"`). When omitted, three animated dots are shown. */
126
- streamingStatus?: string;
127
- /**
128
- * Feature-capability flags. Pass a `ChatCapabilities` object to enable or disable
129
- * individual Chat features (attachments, search, copy, editing, retry) as a group
130
- * rather than as five separate boolean props.
131
- */
132
- capabilities?: ChatCapabilities;
133
- /** Explicit role for the composer textarea, for overlay patterns such as ARIA comboboxes. */
134
- composerRole?: string | undefined;
135
- /** `aria-expanded` passed to the composer textarea for overlays such as slash-command menus. */
136
- composerAriaExpanded?: boolean | 'true' | 'false' | undefined;
137
- /** `aria-controls` passed to the composer textarea for overlays such as slash-command menus. */
138
- composerAriaControls?: string | undefined;
139
- /** `aria-activedescendant` passed to the composer textarea for overlays such as slash-command menus. */
140
- composerAriaActiveDescendant?: string | undefined;
141
- /** `aria-autocomplete` passed to the composer textarea for overlays such as slash-command menus. */
142
- composerAriaAutocomplete?: 'none' | 'inline' | 'list' | 'both' | undefined;
143
- /** Use the virtualized message render path for long transcripts. The complete `ConversationHistory` remains unchanged; only the DOM window is reduced. Default `false`. */
144
- virtualized?: boolean;
145
- /** Estimated row height in pixels for virtualized message rows. Default `88`. */
146
- virtualizationEstimatedRowHeight?: number;
147
- /** Number of extra virtual rows rendered before and after the viewport. Default `3`. */
148
- virtualizationOverscan?: number;
149
- /** Initial virtualized viewport height used before measurement. Default `640`. */
150
- virtualizationInitialHeight?: number;
151
- /** Whether the explicit "Load earlier messages" trigger is shown when a load handler exists. Default `true`. */
152
- moreHistoryAvailable?: boolean;
153
- /** Label for the history pagination trigger. Default `"Load earlier messages"`. */
154
- loadEarlierLabel?: string;
155
- /** Status text while older messages are loading. Default `"Loading earlier messages"`. */
156
- loadingEarlierLabel?: string;
157
- header?: Snippet;
158
- empty?: Snippet;
159
- /** List of suggested starter prompt strings shown as clickable buttons in the default empty state. Clicking a prompt submits it immediately as a user message. Has no effect when a custom `empty` snippet is provided. */
160
- emptyPrompts?: string[];
161
- messageActions?: Snippet<[Message]>;
162
- messageStatus?: Snippet<[Message]>;
163
- /**
164
- * Full-row override. Renders an entire message row; receives the message and
165
- * a `renderDefault` snippet for the built-in row (inversion of control), so a
166
- * consumer can wrap or fully replace specific rows.
167
- */
168
- row?: ChatRowOverride;
169
- /**
170
- * Per-message-part override. Replaces the rendering of an individual body part
171
- * (markdown, tool call, tool result) while delegating the rest to the built-ins
172
- * via the `renderDefault` snippet it receives. Image parts are excluded — they
173
- * render through the grouped attachment grid, not this override.
174
- */
175
- messagePart?: MessagePartOverride;
176
- viewportAttachment?: Attachment<HTMLElement>;
177
- /**
178
- * Participants who are currently typing. Out-of-band UI state — NOT stored on
179
- * `Message`. Pass an array of {@link TypingParticipant} objects; the component
180
- * renders a per-participant typing indicator above the input. The adapter's
181
- * `onTypingChange` push handler feeds the same indicator when an adapter is
182
- * wired. Default `undefined` (indicator hidden).
183
- */
184
- typingParticipants?: TypingParticipant[];
185
- /**
186
- * Per-message read receipt state. Out-of-band UI state — NOT stored on `Message`.
187
- * Pass a `Map` keyed by message id with a {@link ReadReceipt} value; the
188
- * component renders a receipt badge on USER messages only. The adapter's
189
- * `onReadReceipt` push handler populates the same state when an adapter is wired.
190
- * Default `undefined` (no receipts shown).
191
- */
192
- readReceipts?: Map<string, ReadReceipt>;
193
- /**
194
- * Optional command/transport boundary around `conversation`. Its methods take
195
- * precedence over the matching callback props (e.g. `sendMessage` over
196
- * `onsubmit`); omit it and Chat behaves exactly as with plain callbacks.
197
- */
198
- adapter?: ChatAdapter;
199
- /** Called when an adapter command fails — either a rejected promise or a synchronous throw from the method. */
200
- onadaptererror?: (event: ChatAdapterErrorEvent) => void;
201
- /** Forwarded from the adapter's real-time `onMessage` push (consumer owns the transcript). */
202
- onpushmessage?: (message: Message) => void;
203
- /** Forwarded from the adapter's real-time `onTypingChange` push. */
204
- ontypingchange?: (isTyping: boolean) => void;
205
- /** Forwarded from the adapter's real-time `onReadReceipt` push. */
206
- onreadreceipt?: (event: ChatReadReceiptEvent) => void;
207
- onsubmit?: (event: ChatSubmitEvent) => void;
208
- onretry?: (messageId: string) => void;
209
- onedit?: (event: { messageId: string; content: string }) => void;
210
- /**
211
- * Called when the user approves an action-required tool call. The
212
- * consumer is responsible for updating its transcript (e.g. calling
213
- * conversationalist to unblock the pending tool) and triggering a new
214
- * generation. When an adapter is also wired, Chat calls
215
- * `adapter.approveToolCall(toolCallId)` first and then this callback.
216
- */
217
- onapprove?: (toolCallId: string) => void;
218
- /**
219
- * Called when the user denies an action-required tool call. When an
220
- * adapter is also wired, Chat calls `adapter.denyToolCall(toolCallId)` first
221
- * and then this callback.
222
- */
223
- ondeny?: (toolCallId: string) => void;
224
- /**
225
- * Override or supplement the reasoning text for a message. Called per-message;
226
- * return a non-empty string to show a reasoning block, `undefined` to fall back
227
- * to `message.metadata['cinder:reasoning']`, empty string to suppress reasoning.
228
- */
229
- messageReasoning?: (message: Message) => string | undefined;
230
- /**
231
- * Override or supplement the step list for a message. Called per-message;
232
- * return an array to show step indicators, `undefined` to fall back to
233
- * `message.metadata['cinder:steps']`. An empty array suppresses steps.
234
- */
235
- messageSteps?: (message: Message) => StepInfo[] | undefined;
236
- /**
237
- * Override or supplement the suggestion list for a message. Called
238
- * per-message; return an array of label strings to show suggestion chips,
239
- * `undefined` to fall back to `message.metadata['cinder:suggestions']`. An
240
- * empty array suppresses suggestions.
241
- */
242
- messageSuggestions?: (message: Message) => string[] | undefined;
243
- /**
244
- * Called when the user selects a suggestion chip. The label string is
245
- * passed back. The consumer is responsible for submitting it as a new user
246
- * message.
247
- */
248
- onsuggestionselect?: (label: string) => void;
249
- /** Called when the explicit history trigger is activated. The consumer prepends compatible messages into `conversation`. */
250
- onloadhistory?: () => void | Promise<void>;
251
- onstopgenerating?: (event: ChatStopGeneratingEvent) => void;
252
- onjumptolatest?: () => void;
253
- onscrollstatechange?: (event: ChatScrollStateChangeEvent) => void;
254
- onunreadindicatorchange?: (event: ChatUnreadIndicatorChangeEvent) => void;
255
- onexpandedchange?: (expanded: boolean) => void;
256
- onattachmentadd?: (attachment: ChatAttachment) => void;
257
- onattachmentremove?: (attachment: ChatAttachment) => void;
258
- onattachmentfailure?: (file: File, error: string) => void;
259
- /**
260
- * Called with the composer's current plain-text value on every composer
261
- * input event. The optional event exposes the textarea for composer-bound
262
- * overlays without reaching into `.chat-input-editor` DOM directly.
263
- */
264
- oncomposerinput?: (value: string, event?: Event) => void;
265
- /**
266
- * Called before Chat's internal composer key handling when a keydown
267
- * originates from the composer textarea. Call `event.preventDefault()` to
268
- * let an overlay consume Arrow keys, Enter, or Escape before Enter-to-send.
269
- * Chat does not call this hook during IME composition, so Enter can still
270
- * confirm the active candidate instead of sending.
271
- */
272
- oncomposerkeydown?: (event: KeyboardEvent) => void;
273
- /**
274
- * Called after pointer or selection activity may have moved the composer
275
- * caret without changing text. Overlay primitives can resync their active
276
- * token from the textarea selection.
277
- */
278
- oncomposerselectionchange?: (event: Event) => void;
279
- /**
280
- * Called when focus leaves the composer textarea. Overlay primitives can use
281
- * this to dismiss without preventing native focus movement.
282
- */
283
- oncomposerblur?: (event: FocusEvent) => void;
284
- };
@@ -1 +0,0 @@
1
- []
@@ -1,3 +0,0 @@
1
- const variables: readonly string[] = [];
2
-
3
- export default variables;
@@ -1,26 +0,0 @@
1
- import type { MessageInput } from '../conversation-model.ts';
2
- import type { ChatAttachment } from '../input/chat-attachment.ts';
3
-
4
- /** Event fired when a message is submitted. */
5
- export type ChatSubmitEvent = {
6
- message: MessageInput;
7
- attachments: ChatAttachment[];
8
- };
9
-
10
- /** Event fired when stop generating is requested. */
11
- export type ChatStopGeneratingEvent = {
12
- messageId: string;
13
- };
14
-
15
- /** Event fired when scroll state changes. */
16
- export type ChatScrollStateChangeEvent = {
17
- atBottom: boolean;
18
- scrollTop: number;
19
- scrollHeight: number;
20
- };
21
-
22
- /** Event fired when unread indicator state changes. */
23
- export type ChatUnreadIndicatorChangeEvent = {
24
- unreadCount: number;
25
- newMessageIndicatorVisible: boolean;
26
- };
@@ -1,95 +0,0 @@
1
- <script lang="ts" module>
2
- export {};
3
- </script>
4
-
5
- <script lang="ts">
6
- let { loading = false, label = 'Load earlier messages', loadingLabel = 'Loading earlier messages', onload, } = $props();
7
- let buttonElement = null;
8
- const buttonAttachment = (node) => {
9
- buttonElement = node;
10
- return () => {
11
- if (buttonElement === node) {
12
- buttonElement = null;
13
- }
14
- };
15
- };
16
- export function focus(options = undefined) {
17
- buttonElement?.focus(options);
18
- }
19
- </script>
20
-
21
- <div class="chat-history-trigger" data-cinder-history-trigger>
22
- <button
23
- {@attach buttonAttachment}
24
- type="button"
25
- class="chat-history-trigger-button"
26
- disabled={loading}
27
- aria-busy={loading ? 'true' : undefined}
28
- onclick={() => onload?.()}
29
- >
30
- {loading ? loadingLabel : label}
31
- </button>
32
- {#if loading}
33
- <span class="sr-only" role="status">{loadingLabel}</span>
34
- {/if}
35
- </div>
36
-
37
- <style>
38
- .chat-history-trigger {
39
- display: flex;
40
- justify-content: center;
41
- padding-block: var(--cinder-space-2);
42
- }
43
-
44
- .chat-history-trigger-button {
45
- display: inline-flex;
46
- align-items: center;
47
- justify-content: center;
48
- min-height: 2.25rem;
49
- padding: var(--cinder-space-1-5) var(--cinder-space-3);
50
- font-size: var(--cinder-text-sm);
51
- font-weight: var(--cinder-font-medium);
52
- color: var(--cinder-text);
53
- background: var(--cinder-surface-raised);
54
- border: 1px solid var(--cinder-border);
55
- border-radius: var(--cinder-radius-md);
56
- cursor: pointer;
57
- }
58
-
59
- .chat-history-trigger-button:disabled {
60
- cursor: progress;
61
- opacity: 0.7;
62
- }
63
-
64
- @media (hover: hover) {
65
- .chat-history-trigger-button:not(:disabled):hover {
66
- background: var(--cinder-surface-hover);
67
- border-color: var(--cinder-accent);
68
- }
69
- }
70
-
71
- .chat-history-trigger-button:focus-visible {
72
- outline: var(--cinder-ring-width) solid transparent;
73
- box-shadow: var(--_cinder-focus-ring-shadow);
74
- }
75
-
76
- @media (forced-colors: active) {
77
- .chat-history-trigger-button:focus-visible {
78
- outline: var(--cinder-ring-width) solid ButtonText;
79
- outline-offset: 3px;
80
- box-shadow: none;
81
- }
82
- }
83
-
84
- .sr-only {
85
- position: absolute;
86
- width: 1px;
87
- height: 1px;
88
- padding: 0;
89
- margin: -1px;
90
- overflow: hidden;
91
- clip: rect(0, 0, 0, 0);
92
- white-space: nowrap;
93
- border: 0;
94
- }
95
- </style>
@@ -1,191 +0,0 @@
1
- <script lang="ts" module>
2
- export {};
3
- </script>
4
-
5
- <script lang="ts">
6
- import ChevronDown from 'lucide-svelte/icons/chevron-down';
7
- let { showJumpButton, hasNewMessageIndicator, unreadCount, displayUnreadCount, hasLargeCount, onjumptolatest, } = $props();
8
- function handleJump() {
9
- onjumptolatest?.();
10
- }
11
- </script>
12
-
13
- <!-- Jump to Latest Button (shown when scrolled far enough) -->
14
- {#if showJumpButton}
15
- <button
16
- type="button"
17
- class="chat-jump-button"
18
- onclick={handleJump}
19
- aria-label={unreadCount > 0
20
- ? `Jump to ${unreadCount} new message${unreadCount !== 1 ? 's' : ''}`
21
- : 'Jump to latest'}
22
- >
23
- <ChevronDown class="cinder-icon-sm" />
24
- {#if unreadCount > 0}
25
- <span class="chat-jump-badge" data-large={hasLargeCount || undefined}>
26
- {displayUnreadCount}
27
- </span>
28
- {/if}
29
- </button>
30
- {/if}
31
-
32
- <!-- New Message Indicator (centered toast-style, shows in hysteresis zone) -->
33
- {#if hasNewMessageIndicator && !showJumpButton}
34
- <button
35
- type="button"
36
- class="chat-new-indicator"
37
- onclick={handleJump}
38
- aria-label="Jump to {displayUnreadCount} new message{unreadCount !== 1 ? 's' : ''}"
39
- >
40
- <ChevronDown class="cinder-icon-xs" />
41
- <span aria-hidden="true">{displayUnreadCount} new message{unreadCount !== 1 ? 's' : ''}</span>
42
- </button>
43
- {/if}
44
-
45
- <style>
46
- /* Jump to Latest Button
47
- * Uses --cinder-touch-target-min (44px) for WCAG 2.2 AA touch target compliance */
48
- .chat-jump-button {
49
- position: absolute;
50
- bottom: 100%;
51
- right: var(--cinder-space-4);
52
- margin-bottom: var(--cinder-space-2);
53
- display: flex;
54
- align-items: center;
55
- justify-content: center;
56
- width: var(--cinder-touch-target-min);
57
- height: var(--cinder-touch-target-min);
58
- padding: 0;
59
- /* --cinder-surface-raised does not exist in tokens; use --cinder-surface and
60
- * lean on the shadow + border for elevation against the inset chat timeline. */
61
- background: var(--cinder-surface);
62
- border: 1px solid var(--cinder-border);
63
- border-radius: var(--cinder-radius-full);
64
- box-shadow: var(--cinder-shadow-md);
65
- color: var(--cinder-text);
66
- cursor: pointer;
67
- transition:
68
- background var(--cinder-duration-fast) var(--cinder-ease-standard),
69
- box-shadow var(--cinder-duration-fast) var(--cinder-ease-standard),
70
- opacity var(--cinder-duration-fast) var(--cinder-ease-standard),
71
- transform var(--cinder-duration-fast) var(--cinder-ease-standard);
72
- z-index: var(--cinder-z-dropdown);
73
- animation: jump-button-enter var(--cinder-duration) var(--cinder-ease-decelerate);
74
- }
75
-
76
- @keyframes jump-button-enter {
77
- from {
78
- opacity: 0;
79
- transform: scale(0.8) translateY(0.5rem);
80
- }
81
- to {
82
- opacity: 1;
83
- transform: scale(1) translateY(0);
84
- }
85
- }
86
-
87
- @media (hover: hover) {
88
- .chat-jump-button:hover {
89
- background: var(--cinder-surface-hover);
90
- box-shadow: var(--cinder-shadow-lg);
91
- }
92
- }
93
-
94
- .chat-jump-button:focus-visible {
95
- outline: var(--cinder-ring-width) solid transparent;
96
- box-shadow: var(--_cinder-focus-ring-shadow);
97
- }
98
-
99
- /* Unread Count Badge */
100
- .chat-jump-badge {
101
- position: absolute;
102
- top: calc(-1 * var(--cinder-space-1));
103
- right: calc(-1 * var(--cinder-space-1));
104
- display: flex;
105
- align-items: center;
106
- justify-content: center;
107
- min-width: 1.25rem;
108
- height: 1.25rem;
109
- padding: 0 var(--cinder-space-1);
110
- font-size: var(--cinder-text-3xs);
111
- font-weight: var(--cinder-font-semibold);
112
- background: var(--cinder-accent);
113
- color: var(--cinder-accent-contrast);
114
- border-radius: var(--cinder-radius-full);
115
- }
116
-
117
- .chat-jump-badge[data-large] {
118
- font-size: var(--cinder-text-4xs);
119
- padding: 0 var(--cinder-space-0-5);
120
- }
121
-
122
- /* New Message Indicator (centered)
123
- * Uses min-height for WCAG 2.2 AA touch target compliance */
124
- .chat-new-indicator {
125
- position: absolute;
126
- bottom: 100%;
127
- left: 50%;
128
- transform: translateX(-50%);
129
- margin-bottom: var(--cinder-space-2);
130
- display: inline-flex;
131
- align-items: center;
132
- gap: var(--cinder-space-1);
133
- min-height: var(--cinder-touch-target-min);
134
- padding: var(--cinder-space-1-5) var(--cinder-space-3);
135
- background: var(--cinder-accent);
136
- color: var(--cinder-accent-contrast);
137
- font-size: var(--cinder-text-xs);
138
- font-weight: var(--cinder-font-medium);
139
- border: none;
140
- border-radius: var(--cinder-radius-full);
141
- box-shadow: var(--cinder-shadow-lg);
142
- cursor: pointer;
143
- z-index: var(--cinder-z-dropdown);
144
- animation: slide-up var(--cinder-duration) var(--cinder-ease-decelerate);
145
- }
146
-
147
- .chat-new-indicator:hover {
148
- filter: brightness(0.95);
149
- }
150
-
151
- .chat-new-indicator:focus-visible {
152
- outline: var(--cinder-ring-width) solid transparent;
153
- box-shadow: var(--_cinder-focus-ring-shadow), var(--cinder-shadow-lg);
154
- }
155
-
156
- @media (forced-colors: active) {
157
- .chat-jump-button:focus-visible,
158
- .chat-new-indicator:focus-visible {
159
- outline: var(--cinder-ring-width) solid ButtonText;
160
- outline-offset: 3px;
161
- }
162
- }
163
-
164
- @keyframes slide-up {
165
- from {
166
- opacity: 0;
167
- transform: translateX(-50%) translateY(100%);
168
- }
169
- to {
170
- opacity: 1;
171
- transform: translateX(-50%) translateY(0);
172
- }
173
- }
174
-
175
- @media (prefers-reduced-motion: reduce) {
176
- .chat-jump-button {
177
- animation: none;
178
- }
179
-
180
- .chat-new-indicator {
181
- animation: none;
182
- }
183
- }
184
-
185
- /* Responsive adjustments */
186
- @container (max-width: 480px) {
187
- .chat-jump-button {
188
- right: var(--cinder-space-3);
189
- }
190
- }
191
- </style>