@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,27 +0,0 @@
1
- // src/utilities/use-intersection.svelte.ts
2
- import * as $ from "svelte/internal/server";
3
- function useIntersection(onIntersect, options = {}) {
4
- const {
5
- root = null,
6
- rootMargin = "0px",
7
- threshold = 0,
8
- enabled = () => true
9
- } = options;
10
- return (node) => {
11
- if (typeof IntersectionObserver === "undefined") {
12
- return () => {};
13
- }
14
- let observer = null;
15
- const disconnectObserver = () => {
16
- observer?.disconnect();
17
- observer = null;
18
- };
19
- return () => {
20
- disconnectObserver();
21
- };
22
- };
23
- }
24
-
25
- export { useIntersection };
26
-
27
- //# debugId=681277AEDE71FF7F64756E2164756E21
@@ -1,76 +0,0 @@
1
- import {
2
- Conversation_export_actions
3
- } from "./index.server-8rmtb8vx.js";
4
- import {
5
- deriveConversationSummary
6
- } from "./index.server-2bbwajb2.js";
7
- import {
8
- classNames
9
- } from "./index.server-z7nvkz8v.js";
10
-
11
- // src/components/chat-conversation-header/chat-conversation-header.svelte
12
- import * as $ from "svelte/internal/server";
13
- function Chat_conversation_header($$renderer, $$props) {
14
- $$renderer.component(($$renderer2) => {
15
- let {
16
- conversation,
17
- headingLevel = 2,
18
- showExportActions = true,
19
- class: className,
20
- actions,
21
- $$slots,
22
- $$events,
23
- ...rest
24
- } = $$props;
25
- const summary = $.derived(() => deriveConversationSummary(conversation));
26
- const headingTag = $.derived(() => `h${headingLevel}`);
27
- const participantLabel = $.derived(() => summary().participantNames.length === 0 ? undefined : summary().participantNames.length <= 2 ? summary().participantNames.join(", ") : `${summary().participantNames.slice(0, 2).join(", ")} +${summary().participantNames.length - 2}`);
28
- const fullParticipantLabel = $.derived(() => summary().participantNames.join(", "));
29
- $$renderer2.push(`<header${$.attributes({
30
- class: $.clsx(classNames("cinder-chat-conversation-header", className)),
31
- ...rest
32
- })}><div class="cinder-chat-conversation-header__main">`);
33
- $.element($$renderer2, headingTag(), () => {
34
- $$renderer2.push(` class="cinder-chat-conversation-header__title"`);
35
- }, () => {
36
- $$renderer2.push(`${$.escape(summary().title)}`);
37
- });
38
- $$renderer2.push(` <p class="cinder-chat-conversation-header__meta">${$.escape(summary().messageCount)}
39
- ${$.escape(summary().messageCount === 1 ? "message" : "messages")} <span aria-hidden="true">·</span> <span class="cinder-chat-conversation-header__status">${$.escape(summary().status)}</span> `);
40
- if (participantLabel()) {
41
- $$renderer2.push("<!--[0-->");
42
- $$renderer2.push(`<span aria-hidden="true">·</span> <span${$.attr("title", fullParticipantLabel())}${$.attr("aria-label", fullParticipantLabel())}>${$.escape(participantLabel())}</span>`);
43
- } else {
44
- $$renderer2.push("<!--[-1-->");
45
- }
46
- $$renderer2.push(`<!--]--></p></div> `);
47
- if (showExportActions || actions) {
48
- $$renderer2.push("<!--[0-->");
49
- $$renderer2.push(`<div class="cinder-chat-conversation-header__actions">`);
50
- if (showExportActions) {
51
- $$renderer2.push("<!--[0-->");
52
- Conversation_export_actions($$renderer2, { id: `${conversation.id}-export-actions`, conversation });
53
- } else {
54
- $$renderer2.push("<!--[-1-->");
55
- }
56
- $$renderer2.push(`<!--]--> `);
57
- if (actions) {
58
- $$renderer2.push("<!--[0-->");
59
- actions($$renderer2, summary());
60
- $$renderer2.push(`<!---->`);
61
- } else {
62
- $$renderer2.push("<!--[-1-->");
63
- }
64
- $$renderer2.push(`<!--]--></div>`);
65
- } else {
66
- $$renderer2.push("<!--[-1-->");
67
- }
68
- $$renderer2.push(`<!--]--></header>`);
69
- }, Chat_conversation_header);
70
- }
71
-
72
- // src/components/chat-conversation-header/index.ts
73
- var chat_conversation_header_default = Chat_conversation_header;
74
- export { Chat_conversation_header, chat_conversation_header_default };
75
-
76
- //# debugId=9B338210C31306D564756E2164756E21
@@ -1,2 +0,0 @@
1
-
2
- //# debugId=61617A15FEA0026A64756E2164756E21
@@ -1,2 +0,0 @@
1
-
2
- //# debugId=63726E9735A1097864756E2164756E21
@@ -1,37 +0,0 @@
1
- import {
2
- Icon
3
- } from "./index.server-s4ynjgep.js";
4
-
5
- // ../../node_modules/lucide-svelte/dist/icons/file-code.svelte
6
- import * as $ from "svelte/internal/server";
7
- function File_code($$renderer, $$props) {
8
- const $$sanitized_props = $.sanitize_props($$props);
9
- const iconNode = [
10
- ["path", { d: "M10 12.5 8 15l2 2.5" }],
11
- ["path", { d: "m14 12.5 2 2.5-2 2.5" }],
12
- ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }],
13
- [
14
- "path",
15
- {
16
- d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7z"
17
- }
18
- ]
19
- ];
20
- Icon($$renderer, $.spread_props([
21
- { name: "file-code" },
22
- $$sanitized_props,
23
- {
24
- iconNode,
25
- children: ($$renderer2) => {
26
- $$renderer2.push(`<!--[-->`);
27
- $.slot($$renderer2, $$props, "default", {}, null);
28
- $$renderer2.push(`<!--]-->`);
29
- },
30
- $$slots: { default: true }
31
- }
32
- ]));
33
- }
34
-
35
- export { File_code };
36
-
37
- //# debugId=D500C779F923382864756E2164756E21
@@ -1,315 +0,0 @@
1
- import {
2
- Command_item
3
- } from "./index.server-krqvnt6p.js";
4
- import {
5
- Command_menu,
6
- detectTrigger
7
- } from "./index.server-rga8sc7j.js";
8
-
9
- // src/components/chat-composer-popover/chat-composer-popover.svelte
10
- import * as $ from "svelte/internal/server";
11
- import { onDestroy } from "svelte";
12
-
13
- // src/components/chat-composer-popover/chat-composer-popover-filter.ts
14
- function normalize(value) {
15
- return value.trim().toLowerCase();
16
- }
17
- function fuzzySubsequenceScore(candidate, query) {
18
- const normalizedCandidate = normalize(candidate);
19
- const normalizedQuery = normalize(query);
20
- if (normalizedQuery.length === 0)
21
- return 0;
22
- if (normalizedCandidate.length === 0)
23
- return null;
24
- let score = 0;
25
- let searchIndex = 0;
26
- let previousMatchIndex = -1;
27
- for (const character of normalizedQuery) {
28
- const matchIndex = normalizedCandidate.indexOf(character, searchIndex);
29
- if (matchIndex === -1)
30
- return null;
31
- score += matchIndex === previousMatchIndex + 1 ? 4 : 1;
32
- if (matchIndex === 0)
33
- score += 2;
34
- if (/[\s/_-]/u.test(normalizedCandidate[matchIndex - 1] ?? ""))
35
- score += 2;
36
- previousMatchIndex = matchIndex;
37
- searchIndex = matchIndex + 1;
38
- }
39
- return score - normalizedCandidate.length * 0.01;
40
- }
41
- function filterFuzzySubsequence(items, query) {
42
- const normalizedQuery = normalize(query);
43
- if (normalizedQuery.length === 0)
44
- return [...items];
45
- const matchedItems = items.map((item, index) => {
46
- const candidates = [item.label, item.value, ...item.keywords ?? []];
47
- let bestScore = null;
48
- for (const candidate of candidates) {
49
- const score = fuzzySubsequenceScore(candidate, normalizedQuery);
50
- if (score !== null && (bestScore === null || score > bestScore)) {
51
- bestScore = score;
52
- }
53
- }
54
- return bestScore === null ? null : { item, index, score: bestScore };
55
- }).filter((result) => result !== null);
56
- matchedItems.sort((a, b) => b.score - a.score || a.index - b.index);
57
- return matchedItems.map((result) => result.item);
58
- }
59
-
60
- // src/components/chat-composer-popover/chat-composer-popover.svelte
61
- function Chat_composer_popover($$renderer, $$props) {
62
- $$renderer.component(($$renderer2) => {
63
- let {
64
- id,
65
- value = "",
66
- items,
67
- triggers = ["/", "@"],
68
- label = "Composer suggestions",
69
- placement = "bottom-start",
70
- offset = 6,
71
- composer,
72
- item,
73
- empty,
74
- detectTrigger: detectTrigger2,
75
- filter = filterFuzzySubsequence,
76
- onselect,
77
- ondismiss
78
- } = $$props;
79
- let open = false;
80
- let anchor = null;
81
- let caretIndex = 0;
82
- const listboxId = $.derived(() => `${id}-listbox`);
83
- let activeItemId = null;
84
- let activeMatch = null;
85
- let composerSyncTimer = null;
86
- let lastSyncedValue = value;
87
- let suppressNextValueSync = false;
88
- const emptyContent = $.derived(() => empty);
89
- const query = $.derived(() => activeMatch?.query ?? "");
90
- const trigger = $.derived(() => activeMatch?.trigger ?? triggers[0] ?? "/");
91
- const filteredItems = $.derived(() => {
92
- if (!activeMatch)
93
- return [];
94
- return [...filter(items, activeMatch.query, activeMatch.trigger)];
95
- });
96
- const composerProps = $.derived(() => ({
97
- composerRole: "combobox",
98
- composerAriaExpanded: open,
99
- composerAriaControls: open ? listboxId() : undefined,
100
- composerAriaActiveDescendant: open ? activeItemId ?? undefined : undefined,
101
- composerAriaAutocomplete: "list",
102
- oncomposerinput: handleComposerInput,
103
- oncomposerkeydown: handleComposerKeydown,
104
- oncomposerselectionchange: handleComposerSelectionChange,
105
- oncomposerblur: handleComposerBlur
106
- }));
107
- function getComposerElement(event) {
108
- const target = event.currentTarget ?? event.target;
109
- if (target instanceof HTMLTextAreaElement || target instanceof HTMLInputElement) {
110
- return target;
111
- }
112
- return null;
113
- }
114
- function findTriggerMatch(text, selectionStart, selectionEnd) {
115
- if (detectTrigger2)
116
- return detectTrigger2(text, selectionStart, selectionEnd);
117
- for (const triggerChar of triggers) {
118
- const match = detectTrigger({ text, selectionStart, selectionEnd, triggerChar });
119
- if (match) {
120
- return { ...match, trigger: triggerChar };
121
- }
122
- }
123
- return null;
124
- }
125
- function updateFromComposer(composerElement, nextValue) {
126
- if (composerElement)
127
- anchor = composerElement;
128
- const selectionStart = composerElement?.selectionStart ?? nextValue.length;
129
- const selectionEnd = composerElement?.selectionEnd ?? selectionStart;
130
- lastSyncedValue = nextValue;
131
- value = nextValue;
132
- caretIndex = selectionEnd;
133
- activeMatch = findTriggerMatch(nextValue, selectionStart, selectionEnd);
134
- const wasOpen = open;
135
- open = activeMatch !== null && anchor !== null;
136
- if (!open) {
137
- activeItemId = null;
138
- if (wasOpen)
139
- ondismiss?.();
140
- }
141
- }
142
- function dismiss({ restoreFocus = true } = {}) {
143
- if (!open && !activeMatch && !activeItemId)
144
- return;
145
- clearComposerSyncTimer();
146
- open = false;
147
- activeItemId = null;
148
- activeMatch = null;
149
- if (restoreFocus)
150
- anchor?.focus();
151
- ondismiss?.();
152
- }
153
- function handleComposerInput(nextValue, event) {
154
- suppressNextValueSync = false;
155
- updateFromComposer(event ? getComposerElement(event) : anchor, nextValue);
156
- }
157
- function handleComposerSelectionChange(event) {
158
- suppressNextValueSync = false;
159
- const composerElement = getComposerElement(event);
160
- if (!composerElement)
161
- return;
162
- syncComposerSelectionAfterNativeNavigation(composerElement);
163
- }
164
- function handleComposerBlur(event) {
165
- if (event.currentTarget === anchor) {
166
- dismiss({ restoreFocus: false });
167
- }
168
- }
169
- function syncComposerSelectionAfterNativeNavigation(composerElement) {
170
- clearComposerSyncTimer();
171
- composerSyncTimer = setTimeout(() => {
172
- composerSyncTimer = null;
173
- updateFromComposer(composerElement, composerElement.value);
174
- }, 0);
175
- }
176
- function clearComposerSyncTimer() {
177
- if (composerSyncTimer === null)
178
- return;
179
- clearTimeout(composerSyncTimer);
180
- composerSyncTimer = null;
181
- }
182
- function handleComposerKeydown(event) {
183
- const composerElement = event.currentTarget instanceof HTMLTextAreaElement || event.currentTarget instanceof HTMLInputElement ? event.currentTarget : null;
184
- if (composerElement) {
185
- anchor = composerElement;
186
- caretIndex = composerElement.selectionEnd ?? value.length;
187
- }
188
- if (!open || event.isComposing || event.keyCode === 229)
189
- return;
190
- if (event.key === "Escape") {
191
- event.preventDefault();
192
- event.stopPropagation();
193
- dismiss();
194
- return;
195
- }
196
- const isNavigationKey = event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "ArrowLeft" || event.key === "ArrowRight" || event.key === "Home" || event.key === "End";
197
- const isMenuNavigationKey = event.key === "ArrowDown" || event.key === "ArrowUp" || event.key === "Home" || event.key === "End";
198
- const isModifiedNavigation = isNavigationKey && (event.altKey || event.ctrlKey || event.metaKey || event.shiftKey);
199
- if (isMenuNavigationKey && !isModifiedNavigation || event.key === "Enter" && activeItemId) {
200
- event.preventDefault();
201
- }
202
- if (composerElement && isNavigationKey && (isModifiedNavigation || !isMenuNavigationKey)) {
203
- syncComposerSelectionAfterNativeNavigation(composerElement);
204
- }
205
- }
206
- onDestroy(() => {
207
- clearComposerSyncTimer();
208
- });
209
- function handleStateChange(state) {
210
- activeItemId = state.activeItemId;
211
- }
212
- function handleSelect(selection) {
213
- const selectedItem = filteredItems().find((candidate) => candidate.value === selection.value);
214
- if (!selectedItem || !activeMatch)
215
- return;
216
- const detail = {
217
- item: selectedItem,
218
- value: selection.value,
219
- query: activeMatch.query,
220
- trigger: activeMatch.trigger,
221
- range: { start: activeMatch.start, end: activeMatch.end }
222
- };
223
- open = false;
224
- activeItemId = null;
225
- activeMatch = null;
226
- anchor?.focus();
227
- suppressNextValueSync = true;
228
- queueMicrotask(() => {
229
- suppressNextValueSync = false;
230
- });
231
- onselect?.(detail);
232
- }
233
- let $$settled = true;
234
- let $$inner_renderer;
235
- function $$render_inner($$renderer3) {
236
- composer($$renderer3, composerProps());
237
- $$renderer3.push(`<!----> `);
238
- {
239
- let items2 = function($$renderer4) {
240
- $$renderer4.push(`<!--[-->`);
241
- const each_array = $.ensure_array_like(filteredItems());
242
- for (let $$index = 0, $$length = each_array.length;$$index < $$length; $$index++) {
243
- let command = each_array[$$index];
244
- Command_item($$renderer4, {
245
- value: command.value,
246
- disabled: command.disabled === true,
247
- description: item ? "" : command.description ?? "",
248
- accessibleLabel: command.description ? `${command.label}, ${command.description}` : command.label,
249
- selectionMode: "parent",
250
- children: ($$renderer5) => {
251
- if (item) {
252
- $$renderer5.push("<!--[0-->");
253
- item($$renderer5, { item: command, query: query(), trigger: trigger() });
254
- $$renderer5.push(`<!---->`);
255
- } else {
256
- $$renderer5.push("<!--[-1-->");
257
- $$renderer5.push(`${$.escape(command.label)}`);
258
- }
259
- $$renderer5.push(`<!--]-->`);
260
- },
261
- $$slots: { default: true }
262
- });
263
- }
264
- $$renderer4.push(`<!--]-->`);
265
- }, empty2 = function($$renderer4) {
266
- if (emptyContent()) {
267
- $$renderer4.push("<!--[0-->");
268
- emptyContent()($$renderer4);
269
- $$renderer4.push(`<!---->`);
270
- } else {
271
- $$renderer4.push("<!--[-1-->");
272
- $$renderer4.push(`No suggestions`);
273
- }
274
- $$renderer4.push(`<!--]-->`);
275
- };
276
- Command_menu($$renderer3, {
277
- anchor,
278
- caretIndex,
279
- query: query(),
280
- placement,
281
- offset,
282
- label,
283
- listboxId: listboxId(),
284
- onselect: handleSelect,
285
- ondismiss: () => dismiss({ restoreFocus: false }),
286
- onstatechange: handleStateChange,
287
- get open() {
288
- return open;
289
- },
290
- set open($$value) {
291
- open = $$value;
292
- $$settled = false;
293
- },
294
- items: items2,
295
- empty: empty2,
296
- $$slots: { items: true, empty: true }
297
- });
298
- }
299
- $$renderer3.push(`<!---->`);
300
- }
301
- do {
302
- $$settled = true;
303
- $$inner_renderer = $$renderer2.copy();
304
- $$render_inner($$inner_renderer);
305
- } while (!$$settled);
306
- $$renderer2.subsume($$inner_renderer);
307
- $.bind_props($$props, { value });
308
- }, Chat_composer_popover);
309
- }
310
-
311
- // src/components/chat-composer-popover/index.ts
312
- var chat_composer_popover_default = Chat_composer_popover;
313
- export { fuzzySubsequenceScore, filterFuzzySubsequence, Chat_composer_popover, chat_composer_popover_default };
314
-
315
- //# debugId=A26051A42F206F7F64756E2164756E21
@@ -1,38 +0,0 @@
1
- import {
2
- Icon
3
- } from "./index.server-s4ynjgep.js";
4
-
5
- // ../../node_modules/lucide-svelte/dist/icons/file-text.svelte
6
- import * as $ from "svelte/internal/server";
7
- function File_text($$renderer, $$props) {
8
- const $$sanitized_props = $.sanitize_props($$props);
9
- const iconNode = [
10
- [
11
- "path",
12
- {
13
- d: "M15 2H6a2 2 0 0 0-2 2v16a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2V7Z"
14
- }
15
- ],
16
- ["path", { d: "M14 2v4a2 2 0 0 0 2 2h4" }],
17
- ["path", { d: "M10 9H8" }],
18
- ["path", { d: "M16 13H8" }],
19
- ["path", { d: "M16 17H8" }]
20
- ];
21
- Icon($$renderer, $.spread_props([
22
- { name: "file-text" },
23
- $$sanitized_props,
24
- {
25
- iconNode,
26
- children: ($$renderer2) => {
27
- $$renderer2.push(`<!--[-->`);
28
- $.slot($$renderer2, $$props, "default", {}, null);
29
- $$renderer2.push(`<!--]-->`);
30
- },
31
- $$slots: { default: true }
32
- }
33
- ]));
34
- }
35
-
36
- export { File_text };
37
-
38
- //# debugId=76476D060B23FD9964756E2164756E21
@@ -1,74 +0,0 @@
1
- import {
2
- copyToClipboard
3
- } from "./index.server-vmsmaztb.js";
4
- // src/utilities/stringify.ts
5
- function stringify(value, indent = 2) {
6
- if (typeof value === "string")
7
- return value;
8
- if (value === null || value === undefined)
9
- return "";
10
- try {
11
- const serializedValue = JSON.stringify(value, null, indent);
12
- if (serializedValue !== undefined)
13
- return serializedValue;
14
- return typeof value === "number" || typeof value === "boolean" || typeof value === "symbol" ? String(value) : "[Unserializable value]";
15
- } catch {
16
- if (typeof value === "number" || typeof value === "boolean" || typeof value === "bigint" || typeof value === "symbol") {
17
- return String(value);
18
- }
19
- return "[Unserializable value]";
20
- }
21
- }
22
- function stringifyOrNull(value, indent = 2) {
23
- if (value === null || value === undefined)
24
- return null;
25
- if (typeof value === "string")
26
- return value;
27
- try {
28
- return JSON.stringify(value, null, indent) ?? null;
29
- } catch {
30
- return null;
31
- }
32
- }
33
-
34
- // src/components/copy-button/use-copy-state.svelte.ts
35
- import * as $ from "svelte/internal/server";
36
- import { onDestroy } from "svelte";
37
- function createCopyState(confirmDuration = 2000) {
38
- let copiedKey = null;
39
- let resetTimer;
40
- function clearTimer() {
41
- if (resetTimer !== undefined) {
42
- clearTimeout(resetTimer);
43
- resetTimer = undefined;
44
- }
45
- }
46
- function reset() {
47
- clearTimer();
48
- copiedKey = null;
49
- }
50
- async function trigger(key, text) {
51
- const succeeded = await copyToClipboard(text);
52
- if (!succeeded)
53
- return false;
54
- clearTimer();
55
- copiedKey = key;
56
- resetTimer = setTimeout(() => {
57
- copiedKey = null;
58
- }, confirmDuration);
59
- return true;
60
- }
61
- onDestroy(clearTimer);
62
- return {
63
- get copiedKey() {
64
- return copiedKey;
65
- },
66
- trigger,
67
- reset,
68
- destroy: clearTimer
69
- };
70
- }
71
-
72
- export { stringify, stringifyOrNull, createCopyState };
73
-
74
- //# debugId=53586601F21116F964756E2164756E21
@@ -1,83 +0,0 @@
1
- import {
2
- conversationSummaryTimestamp
3
- } from "./index.server-2bbwajb2.js";
4
- import {
5
- classNames
6
- } from "./index.server-z7nvkz8v.js";
7
-
8
- // src/components/chat-conversation-list/chat-conversation-list.svelte
9
- import * as $ from "svelte/internal/server";
10
- function Chat_conversation_list($$renderer, $$props) {
11
- $$renderer.component(($$renderer2) => {
12
- let {
13
- conversations,
14
- activeConversationId = null,
15
- ariaLabel = "Conversations",
16
- emptyText = "No conversations",
17
- class: className,
18
- onselectconversation,
19
- $$slots,
20
- $$events,
21
- ...rest
22
- } = $$props;
23
- const sortedConversations = $.derived(() => [...conversations].sort((a, b) => conversationSummaryTimestamp(b) - conversationSummaryTimestamp(a)));
24
- function preview(summary) {
25
- const text = summary.lastMessageText?.trim();
26
- if (!text)
27
- return summary.messageCount === 1 ? "1 message" : `${summary.messageCount} messages`;
28
- return text.length > 96 ? `${text.slice(0, 93)}...` : text;
29
- }
30
- function unreadMessageLabel(unreadCount) {
31
- return unreadCount === 1 ? "1 unread message" : `${unreadCount} unread messages`;
32
- }
33
- const resolvedAriaLabel = $.derived(() => typeof ariaLabel === "string" && ariaLabel.trim().length > 0 ? ariaLabel : undefined);
34
- $$renderer2.push(`<nav${$.attributes({
35
- ...rest,
36
- class: $.clsx(classNames("cinder-chat-conversation-list", className)),
37
- "aria-label": resolvedAriaLabel()
38
- })}>`);
39
- if (sortedConversations().length === 0) {
40
- $$renderer2.push("<!--[0-->");
41
- $$renderer2.push(`<p class="cinder-chat-conversation-list__empty" role="status">${$.escape(emptyText)}</p>`);
42
- } else {
43
- $$renderer2.push("<!--[-1-->");
44
- $$renderer2.push(`<ul class="cinder-chat-conversation-list__items"><!--[-->`);
45
- const each_array = $.ensure_array_like(sortedConversations());
46
- for (let $$index = 0, $$length = each_array.length;$$index < $$length; $$index++) {
47
- let conversation = each_array[$$index];
48
- const isActive = conversation.id === activeConversationId;
49
- $$renderer2.push(`<li class="cinder-chat-conversation-list__item">`);
50
- if (onselectconversation) {
51
- $$renderer2.push("<!--[0-->");
52
- $$renderer2.push(`<button type="button" class="cinder-chat-conversation-list__button"${$.attr("aria-current", isActive ? "page" : undefined)} data-cinder-conversation-item="" data-cinder-conversation-interactive=""${$.attr("data-cinder-conversation-selected", isActive ? "" : undefined)}><span class="cinder-chat-conversation-list__title">${$.escape(conversation.title)}</span> <span class="cinder-chat-conversation-list__preview">${$.escape(preview(conversation))}</span> `);
53
- if (conversation.unreadCount > 0) {
54
- $$renderer2.push("<!--[0-->");
55
- $$renderer2.push(`<span class="cinder-chat-conversation-list__badge" aria-hidden="true">${$.escape(conversation.unreadCount > 99 ? "99+" : conversation.unreadCount)}</span> <span class="sr-only">, ${$.escape(unreadMessageLabel(conversation.unreadCount))}</span>`);
56
- } else {
57
- $$renderer2.push("<!--[-1-->");
58
- }
59
- $$renderer2.push(`<!--]--></button>`);
60
- } else {
61
- $$renderer2.push("<!--[-1-->");
62
- $$renderer2.push(`<div class="cinder-chat-conversation-list__button"${$.attr("aria-current", isActive ? "page" : undefined)} data-cinder-conversation-item="" data-cinder-conversation-static=""${$.attr("data-cinder-conversation-selected", isActive ? "" : undefined)}><span class="cinder-chat-conversation-list__title">${$.escape(conversation.title)}</span> <span class="cinder-chat-conversation-list__preview">${$.escape(preview(conversation))}</span> `);
63
- if (conversation.unreadCount > 0) {
64
- $$renderer2.push("<!--[0-->");
65
- $$renderer2.push(`<span class="cinder-chat-conversation-list__badge" aria-hidden="true">${$.escape(conversation.unreadCount > 99 ? "99+" : conversation.unreadCount)}</span> <span class="sr-only">, ${$.escape(unreadMessageLabel(conversation.unreadCount))}</span>`);
66
- } else {
67
- $$renderer2.push("<!--[-1-->");
68
- }
69
- $$renderer2.push(`<!--]--></div>`);
70
- }
71
- $$renderer2.push(`<!--]--></li>`);
72
- }
73
- $$renderer2.push(`<!--]--></ul>`);
74
- }
75
- $$renderer2.push(`<!--]--></nav>`);
76
- }, Chat_conversation_list);
77
- }
78
-
79
- // src/components/chat-conversation-list/index.ts
80
- var chat_conversation_list_default = Chat_conversation_list;
81
- export { Chat_conversation_list, chat_conversation_list_default };
82
-
83
- //# debugId=84AAC1EFDAD0615464756E2164756E21