@carbon/ai-chat-components 0.6.2 → 0.7.0-rc.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 (415) hide show
  1. package/custom-elements.json +2611 -3856
  2. package/dist/16-BZMv8BLP.js +91 -0
  3. package/dist/16-DTIyOew7.js +91 -0
  4. package/dist/button-VYkJ5dwm.js +157 -0
  5. package/dist/button-skeleton-C44ojFOx.js +131 -0
  6. package/dist/card.min.js +193 -0
  7. package/dist/chain-of-thought.min.js +173 -155
  8. package/dist/chat-button.min.js +23 -23
  9. package/dist/checkbox-skeleton-B1dsTlWl.js +166 -0
  10. package/dist/{lit-element-DibNdm1l.js → class-map-CAQcKAyP.js} +38 -22
  11. package/dist/code-snippet.min.js +21 -21
  12. package/dist/codemirror-runtime-DjJTvK74.js +173 -0
  13. package/dist/{dockerfile-CKwmNxGw.js → dockerfile-C5Ju62-g.js} +21 -21
  14. package/dist/{factor-PwV725w2.js → factor-BLzOdeEw.js} +21 -21
  15. package/dist/feedback.min.js +68 -87
  16. package/dist/{icon-button-Ddd1Ihho.js → icon-button-B9XqYdUx.js} +33 -33
  17. package/dist/{icon-loader-DuM8rfP3.js → icon-loader-tzlfALFt.js} +23 -23
  18. package/dist/{if-defined-CbQ0hWcL.js → if-defined-DvPtK2Df.js} +22 -22
  19. package/dist/index--QAAkyqA.js +91 -0
  20. package/dist/{index-B1YAtZGR.js → index-1zAoDu0L.js} +21 -21
  21. package/dist/{index-BtI1vT4z.js → index-B6ll86Y6.js} +21 -21
  22. package/dist/index-B9DVtGsv.js +278 -0
  23. package/dist/index-BPU5uHmK.js +91 -0
  24. package/dist/index-BbWtDXd9.js +91 -0
  25. package/dist/index-BjsxSbgO.js +91 -0
  26. package/dist/index-BwI8x9E4.js +91 -0
  27. package/dist/index-C3KNlXVv.js +168 -0
  28. package/dist/index-CAdio42O.js +91 -0
  29. package/dist/index-CSMhs9Fm.js +91 -0
  30. package/dist/index-CU0IEHyz.js +91 -0
  31. package/dist/index-Cj-ZmC-W.js +91 -0
  32. package/dist/index-Ctl66nQF.js +91 -0
  33. package/dist/index-D7MLs7w5.js +91 -0
  34. package/dist/index-DH8wnvUn.js +91 -0
  35. package/dist/index-DWn_nnHo.js +91 -0
  36. package/dist/index-DpqlVRJ7.js +91 -0
  37. package/dist/index-Dx9Ms_uJ.js +91 -0
  38. package/dist/index-EwTPqhmw.js +91 -0
  39. package/dist/index-P1vutKel.js +91 -0
  40. package/dist/index-WQxGinYJ.js +91 -0
  41. package/dist/index-cK4rXRw-.js +91 -0
  42. package/dist/index-o-THaGga.js +91 -0
  43. package/dist/loading-icon-CRrLjNZH.js +106 -0
  44. package/dist/markdown.min.js +72 -70
  45. package/dist/{nsis-CWLatKhG.js → nsis-Biw-VyZu.js} +21 -21
  46. package/dist/processing.min.js +23 -23
  47. package/dist/{pug-DiwBvjDI.js → pug-BuYdIlne.js} +21 -21
  48. package/dist/reasoning-steps.min.js +69 -38
  49. package/dist/{state-B20s9hJU.js → state-CBq0UPBm.js} +21 -21
  50. package/dist/{table-runtime-CzipYmcB.js → table-runtime-CzXXhWmg.js} +86 -86
  51. package/dist/table.min.js +21 -21
  52. package/dist/text-input-VC8mmTlR.js +158 -0
  53. package/dist/toolbar.min.js +54 -56
  54. package/dist/workspace-shell.min.js +46 -51
  55. package/es/components/card/index.d.ts +11 -0
  56. package/es/components/{tile-container → card}/index.js +3 -1
  57. package/es/components/{tile-container → card}/index.js.map +1 -1
  58. package/es/components/card/src/card-footer.d.ts +43 -0
  59. package/es/components/card/src/card-footer.js +140 -0
  60. package/es/components/card/src/card-footer.js.map +1 -0
  61. package/es/components/card/src/card-footer.scss.js +13 -0
  62. package/es/components/card/src/card-footer.scss.js.map +1 -0
  63. package/es/components/card/src/card-steps.d.ts +28 -0
  64. package/es/components/card/src/card-steps.js +90 -0
  65. package/es/components/card/src/card-steps.js.map +1 -0
  66. package/es/components/{tile-container/src/tile-container.scss.js → card/src/card-steps.scss.js} +2 -2
  67. package/es/components/card/src/card-steps.scss.js.map +1 -0
  68. package/es/components/card/src/card.d.ts +27 -0
  69. package/es/components/card/src/card.js +65 -0
  70. package/es/components/card/src/card.js.map +1 -0
  71. package/es/components/card/src/card.scss.js +13 -0
  72. package/es/components/card/src/card.scss.js.map +1 -0
  73. package/es/components/chain-of-thought/defs.d.ts +54 -0
  74. package/es/components/chain-of-thought/{src/types.js → defs.js} +10 -1
  75. package/es/components/chain-of-thought/defs.js.map +1 -0
  76. package/es/components/chain-of-thought/index.d.ts +10 -4
  77. package/es/components/chain-of-thought/index.js +5 -3
  78. package/es/components/chain-of-thought/index.js.map +1 -1
  79. package/es/components/chain-of-thought/src/chain-of-thought-step.d.ts +43 -0
  80. package/es/components/chain-of-thought/src/chain-of-thought-step.js +351 -0
  81. package/es/components/chain-of-thought/src/chain-of-thought-step.js.map +1 -0
  82. package/es/components/chain-of-thought/src/chain-of-thought-step.scss.js +13 -0
  83. package/es/components/chain-of-thought/src/chain-of-thought-step.scss.js.map +1 -0
  84. package/es/components/chain-of-thought/src/chain-of-thought-toggle.d.ts +33 -0
  85. package/es/components/chain-of-thought/src/chain-of-thought-toggle.js +107 -0
  86. package/es/components/chain-of-thought/src/chain-of-thought-toggle.js.map +1 -0
  87. package/es/components/chain-of-thought/src/chain-of-thought-toggle.scss.js +13 -0
  88. package/es/components/chain-of-thought/src/chain-of-thought-toggle.scss.js.map +1 -0
  89. package/es/components/chain-of-thought/src/chain-of-thought.d.ts +23 -69
  90. package/es/components/chain-of-thought/src/chain-of-thought.js +88 -145
  91. package/es/components/chain-of-thought/src/chain-of-thought.js.map +1 -1
  92. package/es/components/chain-of-thought/src/chain-of-thought.scss.js +1 -1
  93. package/es/components/chain-of-thought/src/tool-call-data.d.ts +33 -0
  94. package/es/components/chain-of-thought/src/tool-call-data.js +179 -0
  95. package/es/components/chain-of-thought/src/tool-call-data.js.map +1 -0
  96. package/es/components/chain-of-thought/src/tool-call-data.scss.js +13 -0
  97. package/es/components/chain-of-thought/src/tool-call-data.scss.js.map +1 -0
  98. package/es/components/chat-button/src/chat-button.d.ts +11 -3
  99. package/es/components/chat-button/src/chat-button.js +15 -11
  100. package/es/components/chat-button/src/chat-button.js.map +1 -1
  101. package/es/components/code-snippet/index.d.ts +2 -2
  102. package/es/components/code-snippet/index.js +1 -1
  103. package/es/components/code-snippet/src/code-snippet-card.d.ts +63 -0
  104. package/es/components/code-snippet/src/code-snippet-card.js +186 -0
  105. package/es/components/code-snippet/src/code-snippet-card.js.map +1 -0
  106. package/es/components/code-snippet/src/code-snippet.d.ts +32 -31
  107. package/es/components/code-snippet/src/code-snippet.js +115 -29
  108. package/es/components/code-snippet/src/code-snippet.js.map +1 -1
  109. package/es/components/code-snippet/src/code-snippet.scss.js +1 -1
  110. package/es/components/feedback/index.d.ts +4 -7
  111. package/es/components/feedback/index.js +2 -4
  112. package/es/components/feedback/index.js.map +1 -1
  113. package/es/components/feedback/src/feedback-buttons.d.ts +9 -2
  114. package/es/components/feedback/src/feedback-buttons.js +24 -15
  115. package/es/components/feedback/src/feedback-buttons.js.map +1 -1
  116. package/es/components/feedback/src/feedback-buttons.template.d.ts +2 -2
  117. package/es/components/feedback/src/feedback-buttons.template.js.map +1 -1
  118. package/es/components/feedback/src/feedback.d.ts +9 -10
  119. package/es/components/feedback/src/feedback.js +35 -22
  120. package/es/components/feedback/src/feedback.js.map +1 -1
  121. package/es/components/feedback/src/feedback.scss.js +1 -1
  122. package/es/components/feedback/src/feedback.template.d.ts +2 -2
  123. package/es/components/feedback/src/feedback.template.js +4 -4
  124. package/es/components/feedback/src/feedback.template.js.map +1 -1
  125. package/es/components/markdown/index.d.ts +2 -2
  126. package/es/components/markdown/index.js +1 -1
  127. package/es/components/markdown/src/markdown-renderer.d.ts +4 -0
  128. package/es/components/markdown/src/markdown-renderer.js +16 -11
  129. package/es/components/markdown/src/markdown-renderer.js.map +1 -1
  130. package/es/components/markdown/src/markdown.d.ts +42 -14
  131. package/es/components/markdown/src/markdown.js +146 -42
  132. package/es/components/markdown/src/markdown.js.map +1 -1
  133. package/es/components/markdown/src/markdown.scss.js +1 -1
  134. package/es/components/markdown/src/markdown.template.d.ts +5 -2
  135. package/es/components/markdown/src/markdown.template.js +8 -3
  136. package/es/components/markdown/src/markdown.template.js.map +1 -1
  137. package/es/components/processing/src/processing.d.ts +8 -1
  138. package/es/components/processing/src/processing.js +7 -10
  139. package/es/components/processing/src/processing.js.map +1 -1
  140. package/es/components/processing/src/processing.scss.js +1 -1
  141. package/es/components/reasoning-steps/index.d.ts +4 -2
  142. package/es/components/reasoning-steps/index.js +3 -2
  143. package/es/components/reasoning-steps/index.js.map +1 -1
  144. package/es/components/reasoning-steps/src/{cds-aichat-reasoning-step.d.ts → reasoning-step.d.ts} +6 -7
  145. package/es/components/reasoning-steps/src/{cds-aichat-reasoning-step.js → reasoning-step.js} +24 -26
  146. package/es/components/reasoning-steps/src/reasoning-step.js.map +1 -0
  147. package/es/components/reasoning-steps/src/{cds-aichat-reasoning-step.scss.js → reasoning-step.scss.js} +1 -1
  148. package/es/components/reasoning-steps/src/reasoning-step.scss.js.map +1 -0
  149. package/es/components/reasoning-steps/src/reasoning-steps-toggle.d.ts +36 -0
  150. package/es/components/reasoning-steps/src/reasoning-steps-toggle.js +81 -0
  151. package/es/components/reasoning-steps/src/reasoning-steps-toggle.js.map +1 -0
  152. package/es/components/reasoning-steps/src/reasoning-steps-toggle.scss.js +13 -0
  153. package/es/components/reasoning-steps/src/reasoning-steps-toggle.scss.js.map +1 -0
  154. package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.d.ts +3 -0
  155. package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js +43 -0
  156. package/es/components/reasoning-steps/src/reasoning-steps-toggle.template.js.map +1 -0
  157. package/es/components/reasoning-steps/src/{cds-aichat-reasoning-steps.d.ts → reasoning-steps.d.ts} +6 -1
  158. package/es/components/reasoning-steps/src/{cds-aichat-reasoning-steps.js → reasoning-steps.js} +9 -6
  159. package/es/components/reasoning-steps/src/reasoning-steps.js.map +1 -0
  160. package/es/components/reasoning-steps/src/{cds-aichat-reasoning-steps.scss.js → reasoning-steps.scss.js} +1 -1
  161. package/es/components/reasoning-steps/src/reasoning-steps.scss.js.map +1 -0
  162. package/es/components/table/index.d.ts +2 -2
  163. package/es/components/table/index.js +1 -1
  164. package/es/components/table/src/table-pagination.template.d.ts +1 -1
  165. package/es/components/table/src/{cds-aichat-table.d.ts → table.d.ts} +12 -90
  166. package/es/components/table/src/{cds-aichat-table.js → table.js} +69 -37
  167. package/es/components/table/src/table.js.map +1 -0
  168. package/es/components/table/src/table.template.d.ts +2 -2
  169. package/es/components/table/src/table.template.js +2 -2
  170. package/es/components/table/src/table.template.js.map +1 -1
  171. package/es/components/toolbar/src/toolbar.d.ts +4 -5
  172. package/es/components/toolbar/src/toolbar.js +51 -40
  173. package/es/components/toolbar/src/toolbar.js.map +1 -1
  174. package/es/components/toolbar/src/toolbar.scss.js +1 -1
  175. package/es/components/workspace-shell/index.d.ts +0 -1
  176. package/es/components/workspace-shell/index.js +0 -1
  177. package/es/components/workspace-shell/index.js.map +1 -1
  178. package/es/components/workspace-shell/src/workspace-shell-body.d.ts +1 -0
  179. package/es/components/workspace-shell/src/workspace-shell-body.js +3 -4
  180. package/es/components/workspace-shell/src/workspace-shell-body.js.map +1 -1
  181. package/es/components/workspace-shell/src/workspace-shell-footer.d.ts +26 -5
  182. package/es/components/workspace-shell/src/workspace-shell-footer.js +101 -11
  183. package/es/components/workspace-shell/src/workspace-shell-footer.js.map +1 -1
  184. package/es/components/workspace-shell/src/workspace-shell-footer.scss.js +13 -0
  185. package/es/components/workspace-shell/src/workspace-shell-footer.scss.js.map +1 -0
  186. package/es/components/workspace-shell/src/workspace-shell-header.d.ts +1 -0
  187. package/es/components/workspace-shell/src/workspace-shell-header.js +4 -4
  188. package/es/components/workspace-shell/src/workspace-shell-header.js.map +1 -1
  189. package/es/components/workspace-shell/src/workspace-shell-header.scss.js +13 -0
  190. package/es/components/workspace-shell/src/workspace-shell-header.scss.js.map +1 -0
  191. package/es/components/workspace-shell/src/workspace-shell.d.ts +1 -2
  192. package/es/components/workspace-shell/src/workspace-shell.js +3 -30
  193. package/es/components/workspace-shell/src/workspace-shell.js.map +1 -1
  194. package/es/components/workspace-shell/src/workspace-shell.scss.js +1 -1
  195. package/es/react/card.d.ts +9 -0
  196. package/es/react/card.js +43 -0
  197. package/es/react/card.js.map +1 -0
  198. package/es/react/chain-of-thought-step.d.ts +4 -0
  199. package/es/react/chain-of-thought-step.js +32 -0
  200. package/es/react/chain-of-thought-step.js.map +1 -0
  201. package/es/react/chain-of-thought-toggle.d.ts +6 -0
  202. package/es/react/chain-of-thought-toggle.js +31 -0
  203. package/es/react/chain-of-thought-toggle.js.map +1 -0
  204. package/es/react/chain-of-thought.d.ts +4 -4
  205. package/es/react/chain-of-thought.js +7 -3
  206. package/es/react/chain-of-thought.js.map +1 -1
  207. package/es/react/code-snippet-card.d.ts +4 -0
  208. package/es/react/{code-snippet-tile-container.js → code-snippet-card.js} +8 -7
  209. package/es/react/code-snippet-card.js.map +1 -0
  210. package/es/react/feedback-buttons.d.ts +2 -2
  211. package/es/react/feedback-buttons.js +2 -2
  212. package/es/react/feedback-buttons.js.map +1 -1
  213. package/es/react/feedback.d.ts +2 -2
  214. package/es/react/feedback.js +2 -2
  215. package/es/react/feedback.js.map +1 -1
  216. package/es/react/inline-notification.d.ts +4 -0
  217. package/es/react/inline-notification.js +28 -0
  218. package/es/react/inline-notification.js.map +1 -0
  219. package/es/react/markdown.d.ts +1 -1
  220. package/es/react/markdown.js +1 -1
  221. package/es/react/reasoning-step.d.ts +3 -5
  222. package/es/react/reasoning-step.js +6 -5
  223. package/es/react/reasoning-step.js.map +1 -1
  224. package/es/react/reasoning-steps-toggle.d.ts +6 -0
  225. package/es/react/reasoning-steps-toggle.js +31 -0
  226. package/es/react/reasoning-steps-toggle.js.map +1 -0
  227. package/es/react/reasoning-steps.d.ts +3 -2
  228. package/es/react/reasoning-steps.js +4 -3
  229. package/es/react/reasoning-steps.js.map +1 -1
  230. package/es/react/tag.d.ts +4 -0
  231. package/es/react/{tile-container.js → tag.js} +6 -6
  232. package/es/react/tag.js.map +1 -0
  233. package/es/react/tile.js +2 -2
  234. package/es/react/tile.js.map +1 -1
  235. package/es/react/tool-call-data.d.ts +4 -0
  236. package/es/react/tool-call-data.js +28 -0
  237. package/es/react/tool-call-data.js.map +1 -0
  238. package/es/react/workspace-shell.d.ts +11 -0
  239. package/es/react/workspace-shell.js +49 -0
  240. package/es/react/workspace-shell.js.map +1 -0
  241. package/package.json +3 -3
  242. package/dist/button-D0B6NYRE.js +0 -157
  243. package/dist/button-skeleton-DtWa12gC.js +0 -116
  244. package/dist/checkbox-skeleton-BRqpmcmn.js +0 -166
  245. package/dist/class-map-BFgXCWx_.js +0 -106
  246. package/dist/codemirror-runtime-DCCflgzA.js +0 -173
  247. package/dist/index-B6_FOiFX.js +0 -91
  248. package/dist/index-BBF0opyU.js +0 -91
  249. package/dist/index-BIpfdWsb.js +0 -91
  250. package/dist/index-BamxlG85.js +0 -91
  251. package/dist/index-BnJifpJy.js +0 -91
  252. package/dist/index-BychCoXU.js +0 -91
  253. package/dist/index-CBCqx8Ps.js +0 -91
  254. package/dist/index-CBqFie3c.js +0 -91
  255. package/dist/index-CDTaA9BR.js +0 -91
  256. package/dist/index-CQp4LKsc.js +0 -91
  257. package/dist/index-CmBp-bbC.js +0 -168
  258. package/dist/index-D0SnJ7Ma.js +0 -91
  259. package/dist/index-D4zxQxf2.js +0 -91
  260. package/dist/index-DMzbawFt.js +0 -91
  261. package/dist/index-DTqHKU78.js +0 -91
  262. package/dist/index-Dj8jVVfA.js +0 -91
  263. package/dist/index-DqC-5dY5.js +0 -91
  264. package/dist/index-LHYDalJY.js +0 -91
  265. package/dist/index-MyumuXWu.js +0 -91
  266. package/dist/index-hvhxkyxb.js +0 -91
  267. package/dist/index-tpV6AVN_.js +0 -91
  268. package/dist/index-zZ0xfJxK.js +0 -367
  269. package/dist/query-Sqf3k5tK.js +0 -101
  270. package/dist/radio-group-manager-BqksDnno.js +0 -91
  271. package/dist/repeat-Cu9vY9y8.js +0 -96
  272. package/dist/text-input-BlvU8QGo.js +0 -158
  273. package/dist/tile-container.min.js +0 -100
  274. package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.d.ts +0 -15
  275. package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.js +0 -36
  276. package/es/components/chain-of-thought/src/cds-aichat-chain-of-thought.js.map +0 -1
  277. package/es/components/chain-of-thought/src/chain-of-thought.template.d.ts +0 -5
  278. package/es/components/chain-of-thought/src/chain-of-thought.template.js +0 -206
  279. package/es/components/chain-of-thought/src/chain-of-thought.template.js.map +0 -1
  280. package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.d.ts +0 -10
  281. package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.js +0 -50
  282. package/es/components/chain-of-thought/src/parse-unknown-data-to-markdown.js.map +0 -1
  283. package/es/components/chain-of-thought/src/types.d.ts +0 -73
  284. package/es/components/chain-of-thought/src/types.js.map +0 -1
  285. package/es/components/code-snippet/src/code-snippet-tile-container.d.ts +0 -32
  286. package/es/components/code-snippet/src/code-snippet-tile-container.js +0 -143
  287. package/es/components/code-snippet/src/code-snippet-tile-container.js.map +0 -1
  288. package/es/components/feedback/src/cds-aichat-feedback-buttons.d.ts +0 -15
  289. package/es/components/feedback/src/cds-aichat-feedback-buttons.js +0 -36
  290. package/es/components/feedback/src/cds-aichat-feedback-buttons.js.map +0 -1
  291. package/es/components/feedback/src/cds-aichat-feedback.d.ts +0 -15
  292. package/es/components/feedback/src/cds-aichat-feedback.js +0 -36
  293. package/es/components/feedback/src/cds-aichat-feedback.js.map +0 -1
  294. package/es/components/markdown/src/cds-aichat-markdown.d.ts +0 -13
  295. package/es/components/markdown/src/cds-aichat-markdown.js +0 -35
  296. package/es/components/markdown/src/cds-aichat-markdown.js.map +0 -1
  297. package/es/components/reasoning-steps/src/cds-aichat-reasoning-step.js.map +0 -1
  298. package/es/components/reasoning-steps/src/cds-aichat-reasoning-step.scss.js.map +0 -1
  299. package/es/components/reasoning-steps/src/cds-aichat-reasoning-steps.js.map +0 -1
  300. package/es/components/reasoning-steps/src/cds-aichat-reasoning-steps.scss.js.map +0 -1
  301. package/es/components/table/src/cds-aichat-table.js.map +0 -1
  302. package/es/components/tile-container/index.d.ts +0 -1
  303. package/es/components/tile-container/src/styles.scss.js +0 -13
  304. package/es/components/tile-container/src/styles.scss.js.map +0 -1
  305. package/es/components/tile-container/src/tile-container.d.ts +0 -12
  306. package/es/components/tile-container/src/tile-container.js +0 -85
  307. package/es/components/tile-container/src/tile-container.js.map +0 -1
  308. package/es/components/tile-container/src/tile-container.scss.js.map +0 -1
  309. package/es/components/workspace-shell/src/styles.scss.js +0 -13
  310. package/es/components/workspace-shell/src/styles.scss.js.map +0 -1
  311. package/es/components/workspace-shell/src/workspace-shell-toolbar.d.ts +0 -22
  312. package/es/components/workspace-shell/src/workspace-shell-toolbar.js +0 -61
  313. package/es/components/workspace-shell/src/workspace-shell-toolbar.js.map +0 -1
  314. package/es/react/code-snippet-tile-container.d.ts +0 -5
  315. package/es/react/code-snippet-tile-container.js.map +0 -1
  316. package/es/react/tile-container.d.ts +0 -4
  317. package/es/react/tile-container.js.map +0 -1
  318. package/dist/{16-Qupth_aH.js → 16-D66oSSKJ.js} +20 -20
  319. package/dist/{apl-BgtIAmDL.js → apl-Cq2qnGBp.js} +20 -20
  320. package/dist/{asciiarmor-tEIRKlaD.js → asciiarmor-Cb5hNJXm.js} +20 -20
  321. package/dist/{asn1-sXfvlwbA.js → asn1-ObfPhj90.js} +20 -20
  322. package/dist/{asterisk-CkP9KBn_.js → asterisk-CGEdhmtE.js} +20 -20
  323. package/dist/{carbon-element-CMnOQRY8.js → carbon-element-BHXvTuS8.js} +20 -20
  324. package/dist/{carbon-element-B18tSkZ6.js → carbon-element-CY_4MezR.js} +20 -20
  325. package/dist/{clike-Dz7-b3Bs.js → clike-D-W_e6Lj.js} +20 -20
  326. package/dist/{clojure-Cv2VjSR-.js → clojure-BKr3NaqS.js} +20 -20
  327. package/dist/{cmake-B7mApY_A.js → cmake-CCO4hHlz.js} +20 -20
  328. package/dist/{cobol-CLpo2wzU.js → cobol-BP7APbz-.js} +20 -20
  329. package/dist/{coffeescript-Cp4m_frl.js → coffeescript-DAdmYC08.js} +20 -20
  330. package/dist/{collection-helpers-CVjseChk.js → collection-helpers-CeBujCju.js} +20 -20
  331. package/dist/{commonlisp-DGHzJz_w.js → commonlisp-Bo8JYmEV.js} +20 -20
  332. package/dist/{crystal-D8zlcNoF.js → crystal-Bm8pGIh6.js} +20 -20
  333. package/dist/{css-gJR1aLn3.js → css-BJk1lVKu.js} +20 -20
  334. package/dist/{custom-element-Clzn_oL-.js → custom-element-DRG4IpGT.js} +20 -20
  335. package/dist/{cypher-CM68cGds.js → cypher-D-eVDQC7.js} +20 -20
  336. package/dist/{d-DS7hYUri.js → d-D9LdG4k3.js} +20 -20
  337. package/dist/{diff-BchMez5u.js → diff-DZtMXlRt.js} +20 -20
  338. package/dist/{dtd-B4jYcQ7M.js → dtd-BkbtUIcB.js} +20 -20
  339. package/dist/{dylan-DK2Dyib7.js → dylan-CCohaM4H.js} +20 -20
  340. package/dist/{ebnf-Cn6Vnzxw.js → ebnf-DtT6UrMv.js} +20 -20
  341. package/dist/{ecl-9PhKPFNU.js → ecl-C2GNxTt8.js} +20 -20
  342. package/dist/{eiffel-CqAx-iZ-.js → eiffel-BW4n6uyg.js} +20 -20
  343. package/dist/{elm-Cw3MFe2J.js → elm-B9lXrM6D.js} +20 -20
  344. package/dist/{erlang-DeNh2sjw.js → erlang-BKwBedv4.js} +20 -20
  345. package/dist/{fcl-Dku8gwKl.js → fcl-BGYmKRZe.js} +20 -20
  346. package/dist/{forth-ccFEopc8.js → forth-DTbOVELu.js} +20 -20
  347. package/dist/{fortran-C0Pd1bYf.js → fortran-Dr7q8x3V.js} +20 -20
  348. package/dist/{gas-C9KeMzH-.js → gas-CsCwQ5DC.js} +20 -20
  349. package/dist/{gherkin-CTd3ycq1.js → gherkin-CAJyZEc1.js} +20 -20
  350. package/dist/{groovy-C2OuB7B3.js → groovy-CpFdbfFQ.js} +20 -20
  351. package/dist/{haskell-CGuEw9Yh.js → haskell-V36thOn1.js} +20 -20
  352. package/dist/{haxe-Bpicn7Ma.js → haxe-CeQWqhmF.js} +20 -20
  353. package/dist/{http-C2Dl8BK6.js → http-Cm3L1exf.js} +20 -20
  354. package/dist/{idl-D0DUTXQY.js → idl-DyN-eyoA.js} +20 -20
  355. package/dist/{javascript-vBL1foWi.js → javascript-B7L-ezNz.js} +20 -20
  356. package/dist/{julia-YTKmImms.js → julia-B_bgxt8f.js} +20 -20
  357. package/dist/{livescript-BqlKQjy2.js → livescript-B0UjDUzz.js} +20 -20
  358. package/dist/{lua-DlwCIvBO.js → lua-Bs-1T_TR.js} +20 -20
  359. package/dist/{mathematica-Dv2FPQ3c.js → mathematica-QbiSkUw_.js} +20 -20
  360. package/dist/{mbox-BRYTWZIN.js → mbox-IxVDt6G7.js} +20 -20
  361. package/dist/{mirc-Bfe4ByuU.js → mirc--MFZdywV.js} +20 -20
  362. package/dist/{mllike-jcboaTW3.js → mllike-s7nUnXIp.js} +20 -20
  363. package/dist/{modelica-DyjAoT58.js → modelica-BCpZ0s1C.js} +20 -20
  364. package/dist/{mscgen-cDZZxW92.js → mscgen-Br8J94Pi.js} +20 -20
  365. package/dist/{mumps-BHJOz0VL.js → mumps-BsSCi6Lf.js} +20 -20
  366. package/dist/{nginx-C7Xm6ldH.js → nginx-ZiZlz_Vj.js} +20 -20
  367. package/dist/{ntriples-WgSzAP5x.js → ntriples-1fM-fgdb.js} +20 -20
  368. package/dist/{octave-D4LNKBtY.js → octave-nXauetiK.js} +20 -20
  369. package/dist/{oz-BoqKtF9D.js → oz-B13mLmyp.js} +20 -20
  370. package/dist/{pascal-Di4a6U4m.js → pascal-B_W4OXqj.js} +20 -20
  371. package/dist/{perl-DidNKejT.js → perl-a1VQ4XvC.js} +20 -20
  372. package/dist/{pig-BNb2vBfH.js → pig-BtQy1wID.js} +20 -20
  373. package/dist/{powershell-BKZXxjKi.js → powershell-uO49D63Q.js} +20 -20
  374. package/dist/{properties-DGvo0ocD.js → properties-BhuX6-mY.js} +20 -20
  375. package/dist/{protobuf-CO4RB5i_.js → protobuf-CNIIc7zI.js} +20 -20
  376. package/dist/{puppet-BuoIdj3c.js → puppet-ByObhsu2.js} +20 -20
  377. package/dist/{python-D0eLBtFd.js → python-PHhd4JZq.js} +20 -20
  378. package/dist/{q-C5wfDOE6.js → q-qVcarjaG.js} +20 -20
  379. package/dist/{r-B2NBzJ7Q.js → r-Cd28Rn61.js} +20 -20
  380. package/dist/{rpm-bppY7Ljs.js → rpm-tHd62SNx.js} +20 -20
  381. package/dist/{ruby-1BC0cOBU.js → ruby-BWVi67xq.js} +20 -20
  382. package/dist/{sas-BeMF8yJO.js → sas-BwjQFPr2.js} +20 -20
  383. package/dist/{scheme-CIQ0ih8s.js → scheme-Czr-sVIy.js} +20 -20
  384. package/dist/{settings-DtiFDQAJ.js → settings-C6RJ_X7P.js} +20 -20
  385. package/dist/{shell-Aikfsln6.js → shell-BetDWStl.js} +20 -20
  386. package/dist/{sieve-AcrCVYff.js → sieve-rrPKwsBh.js} +20 -20
  387. package/dist/{simple-mode-pAhBuoYJ.js → simple-mode-C8-rTa2M.js} +20 -20
  388. package/dist/{smalltalk-B2nQQuEp.js → smalltalk-YAI5xh7_.js} +20 -20
  389. package/dist/{solr-dRPr0Biz.js → solr-VDOKdk1b.js} +20 -20
  390. package/dist/{sparql-Cj99XEDx.js → sparql-zO1kYCog.js} +20 -20
  391. package/dist/{spreadsheet-sgTJtcQB.js → spreadsheet-6g8nHE2j.js} +20 -20
  392. package/dist/{sql-C8kOX3sr.js → sql-Biw9poPQ.js} +20 -20
  393. package/dist/{stex-7QvUJU5I.js → stex-THaXVwNW.js} +20 -20
  394. package/dist/{stylus-DkIl6udx.js → stylus-RHXL_HsJ.js} +20 -20
  395. package/dist/{swift-BjpHlYuP.js → swift-lfFyPRRo.js} +20 -20
  396. package/dist/{sync-CTB9Fa1m.js → sync-D5E2V6_l.js} +20 -20
  397. package/dist/{tcl-C1Yvc7pn.js → tcl-C4Tb2U0q.js} +20 -20
  398. package/dist/{textile-DKmSRPjM.js → textile-CnQDonvJ.js} +20 -20
  399. package/dist/{throttle-Bas3c59v.js → throttle-B7gS0Tg4.js} +20 -20
  400. package/dist/{tiddlywiki-DN1bYf4c.js → tiddlywiki-BPc4WZCH.js} +20 -20
  401. package/dist/{tiki-F3wxU3m-.js → tiki-D4dz8j1V.js} +20 -20
  402. package/dist/{toml-KiNov0Ms.js → toml-88vYtIh1.js} +20 -20
  403. package/dist/{troff-BZvX0oqw.js → troff-BgVjEoT-.js} +20 -20
  404. package/dist/{ttcn-BiJT56Tu.js → ttcn-DdYulzch.js} +20 -20
  405. package/dist/{ttcn-cfg-3VvAFBAY.js → ttcn-cfg-LwcHiYmJ.js} +20 -20
  406. package/dist/{turtle-BvExPgO5.js → turtle-CgiVr9yq.js} +20 -20
  407. package/dist/{vb-D2uTYiVC.js → vb-BWY0HckZ.js} +20 -20
  408. package/dist/{vbscript-DpTTELsB.js → vbscript-BBJV-ooB.js} +20 -20
  409. package/dist/{velocity-jIy5jhYQ.js → velocity-wom_bhlv.js} +20 -20
  410. package/dist/{verilog-CXOzQ6Od.js → verilog-BCY2xdlY.js} +20 -20
  411. package/dist/{vhdl-Dg-0Ynfd.js → vhdl-BjJYRa0a.js} +20 -20
  412. package/dist/{webidl-Elhmuz8r.js → webidl-KE8LT1tN.js} +20 -20
  413. package/dist/{xquery-EKuNgB1T.js → xquery-Ca5C9BJw.js} +20 -20
  414. package/dist/{yacas-CirFB63Y.js → yacas-DGeGvU7X.js} +20 -20
  415. package/dist/{z80-D_iQ-043.js → z80-CEYQTt8_.js} +20 -20
@@ -6,11 +6,12 @@
6
6
  */
7
7
 
8
8
  import { __decorate } from 'tslib';
9
- import { LitElement } from 'lit';
10
- import { property, state } from 'lit/decorators.js';
9
+ import { LitElement, html } from 'lit';
10
+ import { property } from 'lit/decorators.js';
11
11
  import styles from './chain-of-thought.scss.js';
12
12
  import prefix from '../../../globals/settings.js';
13
13
  import { uuid } from '../../../globals/utils/uuid.js';
14
+ import { carbonElement } from '../../../globals/decorators/carbon-element.js';
14
15
 
15
16
  /*
16
17
  * Copyright IBM Corp. 2025
@@ -20,13 +21,8 @@ import { uuid } from '../../../globals/utils/uuid.js';
20
21
  *
21
22
  * @license
22
23
  */
23
- const numberFormatter = new Intl.NumberFormat("en-US");
24
- const formatStepLabelTextDefault = ({ stepNumber, stepTitle, }) => {
25
- const formattedNumber = numberFormatter.format(stepNumber);
26
- const formattedTitle = stepTitle || "";
27
- return `${formattedNumber}: ${formattedTitle}`;
28
- };
29
- class ChainOfThoughtElement extends LitElement {
24
+ const stepSelector = `${prefix}-chain-of-thought-step`;
25
+ let CDSAIChatChainOfThought = class CDSAIChatChainOfThought extends LitElement {
30
26
  constructor() {
31
27
  super(...arguments);
32
28
  /**
@@ -34,156 +30,103 @@ class ChainOfThoughtElement extends LitElement {
34
30
  */
35
31
  this.open = false;
36
32
  /**
37
- * Array of steps in the chain of thought.
38
- */
39
- this.steps = [];
40
- /**
41
- * Formatting for label of each step item.
42
- */
43
- this.formatStepLabelText = formatStepLabelTextDefault;
44
- /**
45
- * Text string used to label step input.
46
- */
47
- this.inputLabelText = "Input";
48
- /**
49
- * Text string used to label step output.
50
- */
51
- this.outputLabelText = "Output";
52
- /**
53
- * Text string used to label the tool.
54
- */
55
- this.toolLabelText = "Tool";
56
- /**
57
- * Text string used to label the button to open the chain of thought panel.
58
- */
59
- this.explainabilityText = "Show chain of thought";
60
- /**
61
- * Text string used to label the succeeded status icon.
33
+ * When true, each child step should be fully controlled by the host.
62
34
  */
63
- this.statusSucceededLabelText = "Succeeded";
35
+ this.controlled = false;
64
36
  /**
65
- * Text string used to label the failed status icon.
37
+ * ID of the content panel. Useful for wiring to an external toggle.
66
38
  */
67
- this.statusFailedLabelText = "Failed";
68
- /**
69
- * Text string used to label the processing status icon.
70
- */
71
- this.statusProcessingLabelText = "Processing";
72
- /**
73
- * Steps, but we add in whether the step is open or not.
74
- */
75
- this._steps = [];
76
- /**
77
- * ID we use for a11y.
78
- */
79
- this._chainOfThoughtPanelID = `${prefix}-chain-of-thought-panel-id-${uuid()}`;
39
+ this.panelId = `${prefix}-chain-of-thought-panel-id-${uuid()}`;
80
40
  }
81
- firstUpdated(_changedProperties) {
82
- const steps = this.steps ?? [];
83
- this._steps = steps.map((item) => ({ ...item, open: false }));
41
+ connectedCallback() {
42
+ if (!this.hasAttribute("role")) {
43
+ this.setAttribute("role", "list");
44
+ }
45
+ this.addEventListener("chain-of-thought-step-toggled", this.handleStepToggle);
46
+ super.connectedCallback();
47
+ }
48
+ disconnectedCallback() {
49
+ this.removeEventListener("chain-of-thought-step-toggled", this.handleStepToggle);
50
+ super.disconnectedCallback();
51
+ }
52
+ get steps() {
53
+ return this.querySelectorAll(stepSelector);
84
54
  }
85
55
  updated(changedProperties) {
86
- if (changedProperties.has("steps")) {
87
- const incomingSteps = this.steps ?? [];
88
- const currentSteps = this._steps ?? [];
89
- this._steps = incomingSteps.map((item, index) => ({
90
- ...item,
91
- open: currentSteps[index]?.open ?? false,
92
- }));
56
+ if (changedProperties.has("controlled")) {
57
+ this.propagateControlled();
58
+ }
59
+ if (changedProperties.has("open") &&
60
+ changedProperties.get("open") !== undefined) {
61
+ this.dispatchToggleEvent();
93
62
  }
94
63
  }
95
- }
96
- ChainOfThoughtElement.styles = styles;
97
- __decorate([
98
- property({ type: Boolean, attribute: "open", reflect: true })
99
- ], ChainOfThoughtElement.prototype, "open", void 0);
100
- __decorate([
101
- property({ type: Array, attribute: "steps", reflect: true })
102
- ], ChainOfThoughtElement.prototype, "steps", void 0);
103
- __decorate([
104
- property({ type: Function, attribute: false })
105
- ], ChainOfThoughtElement.prototype, "formatStepLabelText", void 0);
106
- __decorate([
107
- property({ type: String, attribute: "input-label-text", reflect: true })
108
- ], ChainOfThoughtElement.prototype, "inputLabelText", void 0);
64
+ handleStepToggle(event) {
65
+ const { detail, target } = event;
66
+ this.onStepToggle?.(Boolean(detail?.open), target);
67
+ }
68
+ propagateControlled() {
69
+ this.steps.forEach((step) => {
70
+ if (this.controlled) {
71
+ step.setAttribute("data-parent-controlled", "");
72
+ step.setAttribute("controlled", "");
73
+ }
74
+ else if (step.hasAttribute("data-parent-controlled")) {
75
+ step.removeAttribute("data-parent-controlled");
76
+ step.removeAttribute("controlled");
77
+ }
78
+ });
79
+ }
80
+ dispatchToggleEvent() {
81
+ const detail = {
82
+ open: this.open,
83
+ panelId: this.panelId,
84
+ };
85
+ this.dispatchEvent(new CustomEvent("chain-of-thought-toggled", {
86
+ detail,
87
+ bubbles: true,
88
+ composed: true,
89
+ }));
90
+ const panel = this.shadowRoot?.getElementById(this.panelId) ?? this;
91
+ this.onToggle?.(this.open, panel);
92
+ }
93
+ render() {
94
+ return html `
95
+ <div class="${prefix}--chain-of-thought">
96
+ <div
97
+ id=${this.panelId}
98
+ class="${prefix}--chain-of-thought-content"
99
+ aria-hidden=${this.open ? "false" : "true"}
100
+ ?hidden=${!this.open}
101
+ >
102
+ <div class="${prefix}--chain-of-thought-inner-content">
103
+ <slot></slot>
104
+ </div>
105
+ </div>
106
+ </div>
107
+ `;
108
+ }
109
+ };
110
+ CDSAIChatChainOfThought.styles = styles;
109
111
  __decorate([
110
- property({ type: String, attribute: "output-label-text", reflect: true })
111
- ], ChainOfThoughtElement.prototype, "outputLabelText", void 0);
112
+ property({ type: Boolean, reflect: true })
113
+ ], CDSAIChatChainOfThought.prototype, "open", void 0);
112
114
  __decorate([
113
- property({ type: String, attribute: "tool-label-text", reflect: true })
114
- ], ChainOfThoughtElement.prototype, "toolLabelText", void 0);
115
+ property({ type: Boolean, reflect: true })
116
+ ], CDSAIChatChainOfThought.prototype, "controlled", void 0);
115
117
  __decorate([
116
- property({ type: String, attribute: "explainability-text", reflect: true })
117
- ], ChainOfThoughtElement.prototype, "explainabilityText", void 0);
118
+ property({ type: String, attribute: "panel-id", reflect: true })
119
+ ], CDSAIChatChainOfThought.prototype, "panelId", void 0);
118
120
  __decorate([
119
121
  property({ type: Function, attribute: false })
120
- ], ChainOfThoughtElement.prototype, "onToggle", void 0);
122
+ ], CDSAIChatChainOfThought.prototype, "onToggle", void 0);
121
123
  __decorate([
122
124
  property({ type: Function, attribute: false })
123
- ], ChainOfThoughtElement.prototype, "onStepToggle", void 0);
124
- __decorate([
125
- property({
126
- type: String,
127
- attribute: "status-succeeded-label-text",
128
- reflect: true,
129
- })
130
- ], ChainOfThoughtElement.prototype, "statusSucceededLabelText", void 0);
131
- __decorate([
132
- property({
133
- type: String,
134
- attribute: "status-failed-label-text",
135
- reflect: true,
136
- })
137
- ], ChainOfThoughtElement.prototype, "statusFailedLabelText", void 0);
138
- __decorate([
139
- property({
140
- type: String,
141
- attribute: "status-processing-label-text",
142
- reflect: true,
143
- })
144
- ], ChainOfThoughtElement.prototype, "statusProcessingLabelText", void 0);
145
- __decorate([
146
- property({ type: String, attribute: "filter-placeholder-text" })
147
- ], ChainOfThoughtElement.prototype, "filterPlaceholderText", void 0);
148
- __decorate([
149
- property({ type: String, attribute: "previous-page-text" })
150
- ], ChainOfThoughtElement.prototype, "previousPageText", void 0);
151
- __decorate([
152
- property({ type: String, attribute: "next-page-text" })
153
- ], ChainOfThoughtElement.prototype, "nextPageText", void 0);
154
- __decorate([
155
- property({ type: String, attribute: "items-per-page-text" })
156
- ], ChainOfThoughtElement.prototype, "itemsPerPageText", void 0);
157
- __decorate([
158
- property({ type: String, attribute: "locale" })
159
- ], ChainOfThoughtElement.prototype, "locale", void 0);
160
- __decorate([
161
- property({ type: Object, attribute: false })
162
- ], ChainOfThoughtElement.prototype, "getPaginationSupplementalText", void 0);
163
- __decorate([
164
- property({ type: Object, attribute: false })
165
- ], ChainOfThoughtElement.prototype, "getPaginationStatusText", void 0);
166
- __decorate([
167
- property({ type: String, attribute: "feedback" })
168
- ], ChainOfThoughtElement.prototype, "feedback", void 0);
169
- __decorate([
170
- property({ type: String, attribute: "show-less-text" })
171
- ], ChainOfThoughtElement.prototype, "showLessText", void 0);
172
- __decorate([
173
- property({ type: String, attribute: "show-more-text" })
174
- ], ChainOfThoughtElement.prototype, "showMoreText", void 0);
175
- __decorate([
176
- property({ type: String, attribute: "tooltip-content" })
177
- ], ChainOfThoughtElement.prototype, "tooltipContent", void 0);
178
- __decorate([
179
- property({ type: Object, attribute: false })
180
- ], ChainOfThoughtElement.prototype, "getLineCountText", void 0);
181
- __decorate([
182
- state()
183
- ], ChainOfThoughtElement.prototype, "_steps", void 0);
184
- __decorate([
185
- state()
186
- ], ChainOfThoughtElement.prototype, "_chainOfThoughtPanelID", void 0);
125
+ ], CDSAIChatChainOfThought.prototype, "onStepToggle", void 0);
126
+ CDSAIChatChainOfThought = __decorate([
127
+ carbonElement("cds-aichat-chain-of-thought")
128
+ ], CDSAIChatChainOfThought);
129
+ var CDSAIChatChainOfThought$1 = CDSAIChatChainOfThought;
187
130
 
188
- export { ChainOfThoughtElement };
131
+ export { CDSAIChatChainOfThought, CDSAIChatChainOfThought$1 as default };
189
132
  //# sourceMappingURL=chain-of-thought.js.map
@@ -1 +1 @@
1
- {"version":3,"file":"chain-of-thought.js","sources":["../../../../src/components/chain-of-thought/src/chain-of-thought.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAcH,MAAM,eAAe,GAAG,IAAI,IAAI,CAAC,YAAY,CAAC,OAAO,CAAC;AAEtD,MAAM,0BAA0B,GAAG,CAAC,EAClC,UAAU,EACV,SAAS,GAIV,KAAI;IACH,MAAM,eAAe,GAAG,eAAe,CAAC,MAAM,CAAC,UAAU,CAAC;AAC1D,IAAA,MAAM,cAAc,GAAG,SAAS,IAAI,EAAE;AACtC,IAAA,OAAO,CAAA,EAAG,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CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE;AAC/B,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAGlB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE;AACjC,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAGtB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,gBAAgB,EAAE;AACjC,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAGtB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,iBAAiB,EAAE;AAChC,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,gBAAA,EAAA,MAAA,CAAA;AAGxB,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,KAAK,EAAE;AACgB,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,kBAAA,EAAA,MAAA,CAAA;AAM5D,UAAA,CAAA;AADC,IAAA,KAAK;AACsC,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,QAAA,EAAA,MAAA,CAAA;AAM5C,UAAA,CAAA;AADC,IAAA,KAAK;AACmE,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,wBAAA,EAAA,MAAA,CAAA;;;;"}
1
+ {"version":3,"file":"chain-of-thought.js","sources":["../../../../src/components/chain-of-thought/src/chain-of-thought.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAgBH,MAAM,YAAY,GAAG,CAAA,EAAG,MAAM,wBAAwB;AAGtD,IAAM,uBAAuB,GAA7B,MAAM,uBAAwB,SAAQ,UAAU,CA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E,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AAC7B,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,MAAA,EAAA,MAAA,CAAA;AAMb,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,OAAO,EAAE,OAAO,EAAE,IAAI,EAAE;AACvB,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,YAAA,EAAA,MAAA,CAAA;AAMnB,UAAA,CAAA;AADC,IAAA,QAAQ,CAAC,EAAE,IAAI,EAAE,MAAM,EAAE,SAAS,EAAE,UAAU,EAAE,OAAO,EAAE,IAAI,EAAE;AACN,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,SAAA,EAAA,MAAA,CAAA;AAM1D,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE;AACZ,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,UAAA,EAAA,MAAA,CAAA;AAMlC,UAAA,CAAA;IADC,QAAQ,CAAC,EAAE,IAAI,EAAE,QAAQ,EAAE,SAAS,EAAE,KAAK,EAAE;AACR,CAAA,EAAA,uBAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AA/BlC,uBAAuB,GAAA,UAAA,CAAA;IAD5B,aAAa,CAAC,6BAA6B;AACtC,CAAA,EAAA,uBAAuB,CA4H5B;AASD,gCAAe,uBAAuB;;;;"}
@@ -7,7 +7,7 @@
7
7
 
8
8
  import { css } from 'lit';
9
9
 
10
- var styles = css([":host{display:block;margin-block-start:1rem}:host([open]) .cds-aichat--chain-of-thought-content{display:block;max-block-size:-moz-fit-content;max-block-size:fit-content;opacity:1;overflow:visible}:host([open]) .cds-aichat--chain-of-thought-button-chevron svg{transform:rotate(-90deg)}.cds-aichat--chain-of-thought-button-chevron{display:flex;flex-basis:1.5rem}@media screen and (prefers-reduced-motion:reduce){.cds-aichat--chain-of-thought-button-chevron svg{transform:rotate(-270deg);transition:none}}.cds-aichat--chain-of-thought-button-chevron svg{transform:rotate(-270deg);transition:all .11s cubic-bezier(.2,0,.38,.9)}.cds-aichat--chain-of-thought-content{display:none;max-block-size:0;opacity:0;overflow:hidden;transition:all allow-discrete .11s cubic-bezier(0,0,.38,.9)}.cds-aichat--chain-of-thought-inner-content{background-color:var(--cds-layer-01,#f4f4f4);border:1px solid var(--cds-border-subtle-01,#c6c6c6);margin-block-start:.5rem}.cds-aichat--chain-of-thought-item:not(:last-child){padding-block-end:.75rem}.cds-aichat--chain-of-thought-item cds-aichat-markdown:not(:first-child){padding-block-start:.5rem}.cds-aichat--chain-of-thought-item-label{font-size:var(--cds-heading-01-font-size,.875rem);font-weight:var(--cds-heading-01-font-weight,600);letter-spacing:var(--cds-heading-01-letter-spacing,.16px);line-height:var(--cds-heading-01-line-height,1.42857)}button.cds-aichat--chain-of-thought-button{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;box-sizing:border-box;cursor:pointer;display:inline-block;font-family:inherit;font-size:100%;inline-size:100%;margin:0;padding:0;text-align:start;vertical-align:baseline}button.cds-aichat--chain-of-thought-button *,button.cds-aichat--chain-of-thought-button :after,button.cds-aichat--chain-of-thought-button :before{box-sizing:inherit}button.cds-aichat--chain-of-thought-button::-moz-focus-inner{border:0}button.cds-aichat--chain-of-thought-button{align-items:center;color:var(--cds-text-primary,#161616);display:flex;font-size:var(--cds-heading-01-font-size,.875rem);font-weight:var(--cds-heading-01-font-weight,600);letter-spacing:var(--cds-heading-01-letter-spacing,.16px);line-height:var(--cds-heading-01-line-height,1.42857)}button.cds-aichat--chain-of-thought-button:focus,button.cds-aichat--chain-of-thought-button:focus-visible{outline:2px solid var(--cds-focus,#0f62fe)}.cds-aichat--chain-of-thought-accordion-item-content{background:var(--cds-layer-01,#f4f4f4);color:var(--cds-text-primary,#161616);display:block;max-block-size:-moz-fit-content;max-block-size:fit-content;opacity:1;overflow:visible;transition:all allow-discrete .11s cubic-bezier(0,0,.38,.9)}.cds-aichat--chain-of-thought-item{padding-block:1rem;padding-inline:2rem 1rem}.cds-aichat--chain-of-thought-accordion-item-content[hidden]{display:none;max-block-size:0;opacity:0;overflow:hidden;padding-block:0;padding-inline:0}.cds-aichat--chain-of-thought-accordion-item-header-chevron{color:var(--cds-text-primary,#161616);display:flex;flex:0 1 2rem;justify-content:center}@media screen and (prefers-reduced-motion:reduce){.cds-aichat--chain-of-thought-accordion-item-header-chevron svg{fill:var(--cds-text-primary,#161616);transform:rotate(-270deg);transition:none}}.cds-aichat--chain-of-thought-accordion-item-header-chevron svg{fill:var(--cds-text-primary,#161616);transform:rotate(-270deg);transition:all .11s cubic-bezier(.2,0,.38,.9)}.cds-aichat--chain-of-thought-accordion-item-header-chevron[data-open] svg{transform:rotate(-90deg)}.cds-aichat--chain-of-thought-accordion-item-header-chevron[data-disabled] svg{visibility:hidden}.cds-aichat--chain-of-thought-accordion-item button.cds-aichat--chain-of-thought-accordion-item-header{-webkit-appearance:none;-moz-appearance:none;appearance:none;background:none;border:0;box-sizing:border-box;cursor:pointer;display:inline-block;font-family:inherit;font-size:100%;inline-size:100%;margin:0;padding:0;text-align:start;vertical-align:baseline}.cds-aichat--chain-of-thought-accordion-item button.cds-aichat--chain-of-thought-accordion-item-header *,.cds-aichat--chain-of-thought-accordion-item button.cds-aichat--chain-of-thought-accordion-item-header :after,.cds-aichat--chain-of-thought-accordion-item button.cds-aichat--chain-of-thought-accordion-item-header :before{box-sizing:inherit}.cds-aichat--chain-of-thought-accordion-item button.cds-aichat--chain-of-thought-accordion-item-header::-moz-focus-inner{border:0}.cds-aichat--chain-of-thought-accordion-item button.cds-aichat--chain-of-thought-accordion-item-header{align-items:center;background:var(--cds-layer-accent-02,#e0e0e0);block-size:2rem;display:flex;font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857);padding:.5rem 0}.cds-aichat--chain-of-thought-accordion-item button.cds-aichat--chain-of-thought-accordion-item-header[disabled]{cursor:default}.cds-aichat--chain-of-thought-accordion-item button.cds-aichat--chain-of-thought-accordion-item-header:focus,.cds-aichat--chain-of-thought-accordion-item button.cds-aichat--chain-of-thought-accordion-item-header:focus-visible{box-shadow:0 -1px 0 0 var(--cds-focus,#0f62fe),inset 0 1px 0 0 var(--cds-focus,#0f62fe),inset 2px 0 0 0 var(--cds-focus,#0f62fe),0 1px 0 0 var(--cds-focus,#0f62fe),inset 0 -1px 0 0 var(--cds-focus,#0f62fe),inset -2px 0 0 0 var(--cds-focus,#0f62fe);outline:none;position:relative;z-index:2}.cds-aichat--chain-of-thought-accordion-item:nth-child(odd) button.cds-aichat--chain-of-thought-accordion-item-header{background:var(--cds-layer-02,#fff)}.cds-aichat--chain-of-thought-accordion-item-header-title{color:var(--cds-text-primary,#161616);flex:1 1;margin-inline-end:.5rem;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.cds-aichat--chain-of-thought-accordion-item-header-status{align-items:center;display:flex;flex:0 0 1.5rem;justify-content:center}.cds-aichat--chain-of-thought-accordion-item-header-status--failure{align-items:center;display:flex;justify-content:center;margin-inline-end:.5rem}.cds-aichat--chain-of-thought-accordion-item-header-status--failure svg{fill:var(--cds-support-error,#da1e28)}.cds-aichat--chain-of-thought-accordion-item-header-status--success{align-items:center;display:flex;justify-content:center;margin-inline-end:.5rem}.cds-aichat--chain-of-thought-accordion-item-header-status--success svg{fill:var(--cds-support-success,#24a148)}"]);
10
+ var styles = css([":host{display:block}:host([open]) .cds-aichat--chain-of-thought-content{display:block;max-block-size:-moz-fit-content;max-block-size:fit-content;opacity:1;overflow:visible}.cds-aichat--chain-of-thought-content{display:none;max-block-size:0;opacity:0;overflow:hidden;transition:all allow-discrete .11s cubic-bezier(0,0,.38,.9)}.cds-aichat--chain-of-thought-inner-content{background-color:var(--cds-layer-01,#f4f4f4);border:1px solid var(--cds-border-subtle-01,#c6c6c6);margin-block-start:.5rem}"]);
11
11
 
12
12
  export { styles as default };
13
13
  //# sourceMappingURL=chain-of-thought.scss.js.map
@@ -0,0 +1,33 @@
1
+ import { LitElement } from "lit";
2
+ declare class CDSAIChatToolCallData extends LitElement {
3
+ static styles: any;
4
+ /**
5
+ * Plain text name of the tool.
6
+ */
7
+ toolName: string;
8
+ /**
9
+ * Text string used to label step input.
10
+ */
11
+ inputLabelText: string;
12
+ /**
13
+ * Text string used to label step output.
14
+ */
15
+ outputLabelText: string;
16
+ /**
17
+ * Text string used to label the tool.
18
+ */
19
+ toolLabelText: string;
20
+ connectedCallback(): void;
21
+ firstUpdated(): void;
22
+ private handleSlotChange;
23
+ private syncSlotContent;
24
+ private hasAssignedContent;
25
+ render(): import("lit-html").TemplateResult<1>;
26
+ }
27
+ declare global {
28
+ interface HTMLElementTagNameMap {
29
+ "cds-aichat-tool-call-data": CDSAIChatToolCallData;
30
+ }
31
+ }
32
+ export { CDSAIChatToolCallData };
33
+ export default CDSAIChatToolCallData;
@@ -0,0 +1,179 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { __decorate } from 'tslib';
9
+ import { LitElement, html } from 'lit';
10
+ import { property, state } from 'lit/decorators.js';
11
+ import styles from './tool-call-data.scss.js';
12
+ import prefix from '../../../globals/settings.js';
13
+ import { carbonElement } from '../../../globals/decorators/carbon-element.js';
14
+
15
+ /*
16
+ * Copyright IBM Corp. 2025
17
+ *
18
+ * This source code is licensed under the Apache-2.0 license found in the
19
+ * LICENSE file in the root directory of this source tree.
20
+ *
21
+ * @license
22
+ */
23
+ const baseClass = `${prefix}--tool-call-data`;
24
+ let CDSAIChatToolCallData = class CDSAIChatToolCallData extends LitElement {
25
+ constructor() {
26
+ super(...arguments);
27
+ /**
28
+ * Plain text name of the tool.
29
+ */
30
+ this.toolName = "";
31
+ /**
32
+ * Text string used to label step input.
33
+ */
34
+ this.inputLabelText = "Input";
35
+ /**
36
+ * Text string used to label step output.
37
+ */
38
+ this.outputLabelText = "Output";
39
+ /**
40
+ * Text string used to label the tool.
41
+ */
42
+ this.toolLabelText = "Tool";
43
+ /**
44
+ * @internal
45
+ */
46
+ this.hasDescriptionSlot = false;
47
+ /**
48
+ * @internal
49
+ */
50
+ this.hasInputSlot = false;
51
+ /**
52
+ * @internal
53
+ */
54
+ this.hasOutputSlot = false;
55
+ }
56
+ connectedCallback() {
57
+ super.connectedCallback();
58
+ queueMicrotask(() => this.syncSlotContent());
59
+ }
60
+ firstUpdated() {
61
+ this.syncSlotContent();
62
+ }
63
+ handleSlotChange(slot, event) {
64
+ const slotElement = event.target;
65
+ const nodes = slotElement.assignedNodes({ flatten: true });
66
+ const hasContent = this.hasAssignedContent(nodes);
67
+ if (slot === "description" && hasContent !== this.hasDescriptionSlot) {
68
+ this.hasDescriptionSlot = hasContent;
69
+ }
70
+ if (slot === "input" && hasContent !== this.hasInputSlot) {
71
+ this.hasInputSlot = hasContent;
72
+ }
73
+ if (slot === "output" && hasContent !== this.hasOutputSlot) {
74
+ this.hasOutputSlot = hasContent;
75
+ }
76
+ }
77
+ syncSlotContent() {
78
+ const descriptionSlot = this.shadowRoot?.querySelector('slot[name="description"]');
79
+ const inputSlot = this.shadowRoot?.querySelector('slot[name="input"]');
80
+ const outputSlot = this.shadowRoot?.querySelector('slot[name="output"]');
81
+ if (descriptionSlot) {
82
+ this.hasDescriptionSlot = this.hasAssignedContent(descriptionSlot.assignedNodes({ flatten: true }));
83
+ }
84
+ if (inputSlot) {
85
+ this.hasInputSlot = this.hasAssignedContent(inputSlot.assignedNodes({ flatten: true }));
86
+ }
87
+ if (outputSlot) {
88
+ this.hasOutputSlot = this.hasAssignedContent(outputSlot.assignedNodes({ flatten: true }));
89
+ }
90
+ }
91
+ hasAssignedContent(nodes) {
92
+ return nodes.some((node) => {
93
+ if (node.nodeType === Node.ELEMENT_NODE) {
94
+ return true;
95
+ }
96
+ if (node.nodeType === Node.TEXT_NODE) {
97
+ return Boolean(node.textContent?.trim());
98
+ }
99
+ return false;
100
+ });
101
+ }
102
+ render() {
103
+ const hasToolName = Boolean(this.toolName);
104
+ const hasContent = hasToolName ||
105
+ this.hasDescriptionSlot ||
106
+ this.hasInputSlot ||
107
+ this.hasOutputSlot;
108
+ if (!hasContent) {
109
+ return html ``;
110
+ }
111
+ return html `
112
+ <div
113
+ class="${baseClass} ${baseClass}-description"
114
+ part="description"
115
+ ?hidden=${!this.hasDescriptionSlot}
116
+ >
117
+ <slot
118
+ name="description"
119
+ @slotchange=${(event) => this.handleSlotChange("description", event)}
120
+ ></slot>
121
+ </div>
122
+ ${hasToolName
123
+ ? html `<div class="${baseClass} ${baseClass}-toolName">
124
+ <div class="${baseClass}-label">${this.toolLabelText}</div>
125
+ ${this.toolName}
126
+ </div>`
127
+ : null}
128
+ <div
129
+ class="${baseClass} ${baseClass}-input"
130
+ ?hidden=${!this.hasInputSlot}
131
+ >
132
+ <div class="${baseClass}-label">${this.inputLabelText}</div>
133
+ <slot
134
+ name="input"
135
+ @slotchange=${(event) => this.handleSlotChange("input", event)}
136
+ ></slot>
137
+ </div>
138
+ <div
139
+ class="${baseClass} ${baseClass}-output"
140
+ ?hidden=${!this.hasOutputSlot}
141
+ >
142
+ <div class="${baseClass}-label">${this.outputLabelText}</div>
143
+ <slot
144
+ name="output"
145
+ @slotchange=${(event) => this.handleSlotChange("output", event)}
146
+ ></slot>
147
+ </div>
148
+ `;
149
+ }
150
+ };
151
+ CDSAIChatToolCallData.styles = styles;
152
+ __decorate([
153
+ property({ type: String, attribute: "tool-name" })
154
+ ], CDSAIChatToolCallData.prototype, "toolName", void 0);
155
+ __decorate([
156
+ property({ type: String, attribute: "input-label-text", reflect: true })
157
+ ], CDSAIChatToolCallData.prototype, "inputLabelText", void 0);
158
+ __decorate([
159
+ property({ type: String, attribute: "output-label-text", reflect: true })
160
+ ], CDSAIChatToolCallData.prototype, "outputLabelText", void 0);
161
+ __decorate([
162
+ property({ type: String, attribute: "tool-label-text", reflect: true })
163
+ ], CDSAIChatToolCallData.prototype, "toolLabelText", void 0);
164
+ __decorate([
165
+ state()
166
+ ], CDSAIChatToolCallData.prototype, "hasDescriptionSlot", void 0);
167
+ __decorate([
168
+ state()
169
+ ], CDSAIChatToolCallData.prototype, "hasInputSlot", void 0);
170
+ __decorate([
171
+ state()
172
+ ], CDSAIChatToolCallData.prototype, "hasOutputSlot", void 0);
173
+ CDSAIChatToolCallData = __decorate([
174
+ carbonElement("cds-aichat-tool-call-data")
175
+ ], CDSAIChatToolCallData);
176
+ var CDSAIChatToolCallData_default = CDSAIChatToolCallData;
177
+
178
+ export { CDSAIChatToolCallData, CDSAIChatToolCallData_default as default };
179
+ //# sourceMappingURL=tool-call-data.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-call-data.js","sources":["../../../../src/components/chain-of-thought/src/tool-call-data.ts"],"sourcesContent":[null],"names":[],"mappings":";;;;;;;;;;;;;;AAAA;;;;;;;AAOG;AAUH,MAAM,SAAS,GAAG,CAAA,EAAG,MAAM,kBAAkB;AAG7C,IAAM,qBAAqB,GAA3B,MAAM,qBAAsB,SAAQ,UAAU,CAAA;AAA9C,IAAA,WAAA,GAAA;;AAGE;;AAEG;QAEH,IAAA,CAAA,QAAQ,GAAG,EAAE;AAEb;;AAEG;QAEH,IAAA,CAAA,cAAc,GAAG,OAAO;AAExB;;AAEG;QAEH,IAAA,CAAA,eAAe,GAAG,QAAQ;AAE1B;;AAEG;QAEH,IAAA,CAAA,aAAa,GAAG,MAAM;AAEtB;;AAEG;QAEK,IAAA,CAAA,kBAAkB,GAAG,KAAK;AAElC;;AAEG;QAEK,IAAA,CAAA,YAAY,GAAG,KAAK;AAE5B;;AAEG;QAEK,IAAA,CAAA,aAAa,GAAG,KAAK;IAgI/B;IA9HE,iBAAiB,GAAA;QACf,KAAK,CAAC,iBAAiB,EAAE;QACzB,cAAc,CAAC,MAAM,IAAI,CAAC,eAA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,IAAA,KAAK;AAC6B,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,oBAAA,EAAA,MAAA,CAAA;AAM3B,UAAA,CAAA;AADP,IAAA,KAAK;AACuB,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,cAAA,EAAA,MAAA,CAAA;AAMrB,UAAA,CAAA;AADP,IAAA,KAAK;AACwB,CAAA,EAAA,qBAAA,CAAA,SAAA,EAAA,eAAA,EAAA,MAAA,CAAA;AA3C1B,qBAAqB,GAAA,UAAA,CAAA;IAD1B,aAAa,CAAC,2BAA2B;AACpC,CAAA,EAAA,qBAAqB,CA2K1B;AASD,oCAAe,qBAAqB;;;;"}
@@ -0,0 +1,13 @@
1
+ /**
2
+ * Copyright IBM Corp. 2025
3
+ *
4
+ * This source code is licensed under the Apache-2.0 license found in the
5
+ * LICENSE file in the root directory of this source tree.
6
+ */
7
+
8
+ import { css } from 'lit';
9
+
10
+ var styles = css([":host{display:block;font-size:var(--cds-body-01-font-size,.875rem);font-weight:var(--cds-body-01-font-weight,400);letter-spacing:var(--cds-body-01-letter-spacing,.16px);line-height:var(--cds-body-01-line-height,1.42857)}.cds-aichat--tool-call-data{padding-block-end:1rem}.cds-aichat--tool-call-data:last-child{padding-block-end:0}.cds-aichat--tool-call-data-label{font-size:var(--cds-heading-01-font-size,.875rem);font-weight:var(--cds-heading-01-font-weight,600);letter-spacing:var(--cds-heading-01-letter-spacing,.16px);line-height:var(--cds-heading-01-line-height,1.42857)}"]);
11
+
12
+ export { styles as default };
13
+ //# sourceMappingURL=tool-call-data.scss.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"tool-call-data.scss.js","sources":[],"sourcesContent":[],"names":[],"mappings":";;;;;;;;;;;;;"}
@@ -14,8 +14,10 @@ export { CHAT_BUTTON_KIND, CHAT_BUTTON_TYPE, CHAT_BUTTON_SIZE, CHAT_BUTTON_TOOLT
14
14
  type ChatButtonSize = CHAT_BUTTON_SIZE.SMALL | CHAT_BUTTON_SIZE.MEDIUM | CHAT_BUTTON_SIZE.LARGE;
15
15
  /**
16
16
  * Component extending the @carbon/web-components' button
17
+ *
18
+ * @element cds-aichat-button
17
19
  */
18
- declare class ChatButton extends CDSButton {
20
+ declare class CDSAIChatButton extends CDSButton {
19
21
  static styles: any;
20
22
  /**
21
23
  * Specify whether the `ChatButton` should be rendered as a quick action button
@@ -23,10 +25,16 @@ declare class ChatButton extends CDSButton {
23
25
  isQuickAction: boolean;
24
26
  /**
25
27
  * Button size.
28
+ * Options: "sm", "md", "lg".
26
29
  */
27
30
  size: ChatButtonSize;
28
- private readonly allowedSizes;
29
31
  protected willUpdate(changedProps: PropertyValues<this>): void;
30
32
  private _normalizeButtonState;
31
33
  }
32
- export default ChatButton;
34
+ declare global {
35
+ interface HTMLElementTagNameMap {
36
+ "cds-aichat-button": CDSAIChatButton;
37
+ }
38
+ }
39
+ export { CDSAIChatButton };
40
+ export default CDSAIChatButton;
@@ -10,7 +10,6 @@ import { property, customElement } from 'lit/decorators.js';
10
10
  import { CHAT_BUTTON_SIZE } from '../defs.js';
11
11
  import CarbonButtonElement, { BUTTON_KIND } from '@carbon/web-components/es/components/button/button.js';
12
12
  export { BUTTON_KIND as CHAT_BUTTON_KIND, BUTTON_TYPE as CHAT_BUTTON_TOOLTIP_ALIGNMENT, BUTTON_TYPE as CHAT_BUTTON_TOOLTIP_POSITION, BUTTON_TYPE as CHAT_BUTTON_TYPE } from '@carbon/web-components/es/components/button/button.js';
13
- import prefix from '../../../globals/settings.js';
14
13
  import styles from './chat-button.scss.js';
15
14
 
16
15
  /**
@@ -23,14 +22,19 @@ import styles from './chat-button.scss.js';
23
22
  */
24
23
  /**
25
24
  * Component extending the @carbon/web-components' button
25
+ *
26
+ * @element cds-aichat-button
26
27
  */
27
- let ChatButton = class ChatButton extends CarbonButtonElement {
28
+ let CDSAIChatButton = class CDSAIChatButton extends CarbonButtonElement {
28
29
  constructor() {
29
30
  super(...arguments);
30
31
  /**
31
32
  * Specify whether the `ChatButton` should be rendered as a quick action button
32
33
  */
33
34
  this.isQuickAction = false;
35
+ /**
36
+ * @internal
37
+ */
34
38
  this.allowedSizes = [
35
39
  CHAT_BUTTON_SIZE.SMALL,
36
40
  CHAT_BUTTON_SIZE.MEDIUM,
@@ -57,17 +61,17 @@ let ChatButton = class ChatButton extends CarbonButtonElement {
57
61
  }
58
62
  }
59
63
  };
60
- ChatButton.styles = styles;
64
+ CDSAIChatButton.styles = styles;
61
65
  __decorate([
62
66
  property({ type: Boolean, attribute: "is-quick-action" })
63
- ], ChatButton.prototype, "isQuickAction", void 0);
67
+ ], CDSAIChatButton.prototype, "isQuickAction", void 0);
64
68
  __decorate([
65
- property({ reflect: true })
66
- ], ChatButton.prototype, "size", void 0);
67
- ChatButton = __decorate([
68
- customElement(`${prefix}-button`)
69
- ], ChatButton);
70
- var AIChatButton = ChatButton;
69
+ property({ reflect: true, attribute: "size" })
70
+ ], CDSAIChatButton.prototype, "size", void 0);
71
+ CDSAIChatButton = __decorate([
72
+ customElement("cds-aichat-button")
73
+ ], CDSAIChatButton);
74
+ var AIChatButton = CDSAIChatButton;
71
75
 
72
- export { CHAT_BUTTON_SIZE, AIChatButton as default };
76
+ export { CDSAIChatButton, CHAT_BUTTON_SIZE, AIChatButton as default };
73
77
  //# sourceMappingURL=chat-button.js.map