@cerebriline/ui 0.0.0-stage → 4.100.313

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 (222) hide show
  1. package/ADOPTION.md +833 -0
  2. package/LICENSE +201 -0
  3. package/RADIX-COLORS-LICENSE +21 -0
  4. package/README.md +427 -2
  5. package/components/agent-approval-card.css +70 -0
  6. package/components/agent-approval-card.tsx +109 -0
  7. package/components/agent-ask-question.css +103 -0
  8. package/components/agent-ask-question.tsx +276 -0
  9. package/components/agent-aurora.css +228 -0
  10. package/components/agent-aurora.tsx +96 -0
  11. package/components/agent-changes.css +13 -0
  12. package/components/agent-changes.tsx +167 -0
  13. package/components/agent-chat/agent-chat.css +556 -0
  14. package/components/agent-chat/index.tsx +1037 -0
  15. package/components/agent-chat/tool-diff.tsx +165 -0
  16. package/components/agent-chat/tool-summary/agents.ts +114 -0
  17. package/components/agent-chat/tool-summary/diff.ts +152 -0
  18. package/components/agent-chat/tool-summary/index.ts +928 -0
  19. package/components/agent-chat/tool-summary/parsers.ts +611 -0
  20. package/components/agent-chat/tool-summary/paths.ts +84 -0
  21. package/components/agent-chat/tool-summary/team.ts +401 -0
  22. package/components/agent-command-output.tsx +63 -0
  23. package/components/agent-composer.tsx +263 -0
  24. package/components/agent-context-usage.tsx +181 -0
  25. package/components/agent-conversation-layout.tsx +139 -0
  26. package/components/agent-hero-heading.css +53 -0
  27. package/components/agent-hero-heading.tsx +45 -0
  28. package/components/agent-image-lightbox.tsx +48 -0
  29. package/components/agent-prompt-queue.css +20 -0
  30. package/components/agent-prompt-queue.tsx +350 -0
  31. package/components/agent-pull-request-bar.css +13 -0
  32. package/components/agent-pull-request-bar.tsx +346 -0
  33. package/components/agent-quick-actions.css +19 -0
  34. package/components/agent-quick-actions.tsx +70 -0
  35. package/components/agent-session-row.tsx +183 -0
  36. package/components/agent-welcome-hero-pointer.ts +199 -0
  37. package/components/agent-welcome-hero.css +205 -0
  38. package/components/agent-welcome-hero.tsx +68 -0
  39. package/components/attachment-drop-zone.tsx +154 -0
  40. package/components/badge.tsx +21 -0
  41. package/components/button.tsx +324 -0
  42. package/components/generated-media.tsx +173 -0
  43. package/components/github-icon.tsx +19 -0
  44. package/components/index.ts +133 -0
  45. package/components/markdown.css +490 -0
  46. package/components/markdown.ts +365 -0
  47. package/components/mermaid-block.tsx +722 -0
  48. package/components/mermaid-diagram.ts +1260 -0
  49. package/components/mermaid-dom.ts +301 -0
  50. package/components/message-scroller.css +118 -0
  51. package/components/message-scroller.tsx +114 -0
  52. package/components/search-combobox.css +67 -0
  53. package/components/search-combobox.tsx +433 -0
  54. package/components/session-status.css +19 -0
  55. package/components/session-status.tsx +39 -0
  56. package/components/switch.css +221 -0
  57. package/components/switch.tsx +48 -0
  58. package/components.css +16 -0
  59. package/dist/components/agent-approval-card.d.ts +14 -0
  60. package/dist/components/agent-approval-card.d.ts.map +1 -0
  61. package/dist/components/agent-approval-card.js +12 -0
  62. package/dist/components/agent-approval-card.js.map +1 -0
  63. package/dist/components/agent-ask-question.d.ts +18 -0
  64. package/dist/components/agent-ask-question.d.ts.map +1 -0
  65. package/dist/components/agent-ask-question.js +101 -0
  66. package/dist/components/agent-ask-question.js.map +1 -0
  67. package/dist/components/agent-aurora.d.ts +3 -0
  68. package/dist/components/agent-aurora.d.ts.map +1 -0
  69. package/dist/components/agent-aurora.js +60 -0
  70. package/dist/components/agent-aurora.js.map +1 -0
  71. package/dist/components/agent-changes.d.ts +26 -0
  72. package/dist/components/agent-changes.d.ts.map +1 -0
  73. package/dist/components/agent-changes.js +19 -0
  74. package/dist/components/agent-changes.js.map +1 -0
  75. package/dist/components/agent-chat/disclosure.d.ts +25 -0
  76. package/dist/components/agent-chat/disclosure.d.ts.map +1 -0
  77. package/dist/components/agent-chat/disclosure.js +39 -0
  78. package/dist/components/agent-chat/disclosure.js.map +1 -0
  79. package/dist/components/agent-chat/index.d.ts +140 -0
  80. package/dist/components/agent-chat/index.d.ts.map +1 -0
  81. package/dist/components/agent-chat/index.js +379 -0
  82. package/dist/components/agent-chat/index.js.map +1 -0
  83. package/dist/components/agent-chat/tool-diff.d.ts +32 -0
  84. package/dist/components/agent-chat/tool-diff.d.ts.map +1 -0
  85. package/dist/components/agent-chat/tool-diff.js +97 -0
  86. package/dist/components/agent-chat/tool-diff.js.map +1 -0
  87. package/dist/components/agent-chat/tool-summary/agents.d.ts +10 -0
  88. package/dist/components/agent-chat/tool-summary/agents.d.ts.map +1 -0
  89. package/dist/components/agent-chat/tool-summary/agents.js +100 -0
  90. package/dist/components/agent-chat/tool-summary/agents.js.map +1 -0
  91. package/dist/components/agent-chat/tool-summary/diff.d.ts +22 -0
  92. package/dist/components/agent-chat/tool-summary/diff.d.ts.map +1 -0
  93. package/dist/components/agent-chat/tool-summary/diff.js +127 -0
  94. package/dist/components/agent-chat/tool-summary/diff.js.map +1 -0
  95. package/dist/components/agent-chat/tool-summary/index.d.ts +145 -0
  96. package/dist/components/agent-chat/tool-summary/index.d.ts.map +1 -0
  97. package/dist/components/agent-chat/tool-summary/index.js +663 -0
  98. package/dist/components/agent-chat/tool-summary/index.js.map +1 -0
  99. package/dist/components/agent-chat/tool-summary/parsers.d.ts +114 -0
  100. package/dist/components/agent-chat/tool-summary/parsers.d.ts.map +1 -0
  101. package/dist/components/agent-chat/tool-summary/parsers.js +502 -0
  102. package/dist/components/agent-chat/tool-summary/parsers.js.map +1 -0
  103. package/dist/components/agent-chat/tool-summary/paths.d.ts +10 -0
  104. package/dist/components/agent-chat/tool-summary/paths.d.ts.map +1 -0
  105. package/dist/components/agent-chat/tool-summary/paths.js +88 -0
  106. package/dist/components/agent-chat/tool-summary/paths.js.map +1 -0
  107. package/dist/components/agent-chat/tool-summary/team.d.ts +16 -0
  108. package/dist/components/agent-chat/tool-summary/team.d.ts.map +1 -0
  109. package/dist/components/agent-chat/tool-summary/team.js +283 -0
  110. package/dist/components/agent-chat/tool-summary/team.js.map +1 -0
  111. package/dist/components/agent-command-output.d.ts +14 -0
  112. package/dist/components/agent-command-output.d.ts.map +1 -0
  113. package/dist/components/agent-command-output.js +22 -0
  114. package/dist/components/agent-command-output.js.map +1 -0
  115. package/dist/components/agent-composer.d.ts +34 -0
  116. package/dist/components/agent-composer.d.ts.map +1 -0
  117. package/dist/components/agent-composer.js +65 -0
  118. package/dist/components/agent-composer.js.map +1 -0
  119. package/dist/components/agent-context-usage.d.ts +28 -0
  120. package/dist/components/agent-context-usage.d.ts.map +1 -0
  121. package/dist/components/agent-context-usage.js +51 -0
  122. package/dist/components/agent-context-usage.js.map +1 -0
  123. package/dist/components/agent-conversation-layout.d.ts +30 -0
  124. package/dist/components/agent-conversation-layout.d.ts.map +1 -0
  125. package/dist/components/agent-conversation-layout.js +24 -0
  126. package/dist/components/agent-conversation-layout.js.map +1 -0
  127. package/dist/components/agent-hero-heading.d.ts +2 -0
  128. package/dist/components/agent-hero-heading.d.ts.map +1 -0
  129. package/dist/components/agent-hero-heading.js +20 -0
  130. package/dist/components/agent-hero-heading.js.map +1 -0
  131. package/dist/components/agent-image-lightbox.d.ts +11 -0
  132. package/dist/components/agent-image-lightbox.d.ts.map +1 -0
  133. package/dist/components/agent-image-lightbox.js +8 -0
  134. package/dist/components/agent-image-lightbox.js.map +1 -0
  135. package/dist/components/agent-prompt-queue.d.ts +14 -0
  136. package/dist/components/agent-prompt-queue.d.ts.map +1 -0
  137. package/dist/components/agent-prompt-queue.js +114 -0
  138. package/dist/components/agent-prompt-queue.js.map +1 -0
  139. package/dist/components/agent-pull-request-bar.d.ts +72 -0
  140. package/dist/components/agent-pull-request-bar.d.ts.map +1 -0
  141. package/dist/components/agent-pull-request-bar.js +90 -0
  142. package/dist/components/agent-pull-request-bar.js.map +1 -0
  143. package/dist/components/agent-quick-actions.d.ts +14 -0
  144. package/dist/components/agent-quick-actions.d.ts.map +1 -0
  145. package/dist/components/agent-quick-actions.js +12 -0
  146. package/dist/components/agent-quick-actions.js.map +1 -0
  147. package/dist/components/agent-session-row.d.ts +45 -0
  148. package/dist/components/agent-session-row.d.ts.map +1 -0
  149. package/dist/components/agent-session-row.js +34 -0
  150. package/dist/components/agent-session-row.js.map +1 -0
  151. package/dist/components/agent-welcome-hero-pointer.d.ts +3 -0
  152. package/dist/components/agent-welcome-hero-pointer.d.ts.map +1 -0
  153. package/dist/components/agent-welcome-hero-pointer.js +169 -0
  154. package/dist/components/agent-welcome-hero-pointer.js.map +1 -0
  155. package/dist/components/agent-welcome-hero.d.ts +9 -0
  156. package/dist/components/agent-welcome-hero.d.ts.map +1 -0
  157. package/dist/components/agent-welcome-hero.js +14 -0
  158. package/dist/components/agent-welcome-hero.js.map +1 -0
  159. package/dist/components/attachment-drop-zone.d.ts +15 -0
  160. package/dist/components/attachment-drop-zone.d.ts.map +1 -0
  161. package/dist/components/attachment-drop-zone.js +64 -0
  162. package/dist/components/attachment-drop-zone.js.map +1 -0
  163. package/dist/components/badge.d.ts +5 -0
  164. package/dist/components/badge.d.ts.map +1 -0
  165. package/dist/components/badge.js +7 -0
  166. package/dist/components/badge.js.map +1 -0
  167. package/dist/components/button.d.ts +27 -0
  168. package/dist/components/button.d.ts.map +1 -0
  169. package/dist/components/button.js +209 -0
  170. package/dist/components/button.js.map +1 -0
  171. package/dist/components/generated-media.d.ts +12 -0
  172. package/dist/components/generated-media.d.ts.map +1 -0
  173. package/dist/components/generated-media.js +105 -0
  174. package/dist/components/generated-media.js.map +1 -0
  175. package/dist/components/github-icon.d.ts +3 -0
  176. package/dist/components/github-icon.d.ts.map +1 -0
  177. package/dist/components/github-icon.js +6 -0
  178. package/dist/components/github-icon.js.map +1 -0
  179. package/dist/components/index.d.ts +24 -0
  180. package/dist/components/index.d.ts.map +1 -0
  181. package/dist/components/index.js +25 -0
  182. package/dist/components/index.js.map +1 -0
  183. package/dist/components/markdown.d.ts +48 -0
  184. package/dist/components/markdown.d.ts.map +1 -0
  185. package/dist/components/markdown.js +264 -0
  186. package/dist/components/markdown.js.map +1 -0
  187. package/dist/components/mermaid-block.d.ts +14 -0
  188. package/dist/components/mermaid-block.d.ts.map +1 -0
  189. package/dist/components/mermaid-block.js +339 -0
  190. package/dist/components/mermaid-block.js.map +1 -0
  191. package/dist/components/mermaid-diagram.d.ts +264 -0
  192. package/dist/components/mermaid-diagram.d.ts.map +1 -0
  193. package/dist/components/mermaid-diagram.js +999 -0
  194. package/dist/components/mermaid-diagram.js.map +1 -0
  195. package/dist/components/mermaid-dom.d.ts +51 -0
  196. package/dist/components/mermaid-dom.d.ts.map +1 -0
  197. package/dist/components/mermaid-dom.js +246 -0
  198. package/dist/components/mermaid-dom.js.map +1 -0
  199. package/dist/components/message-scroller.d.ts +23 -0
  200. package/dist/components/message-scroller.d.ts.map +1 -0
  201. package/dist/components/message-scroller.js +31 -0
  202. package/dist/components/message-scroller.js.map +1 -0
  203. package/dist/components/search-combobox.d.ts +44 -0
  204. package/dist/components/search-combobox.d.ts.map +1 -0
  205. package/dist/components/search-combobox.js +191 -0
  206. package/dist/components/search-combobox.js.map +1 -0
  207. package/dist/components/session-status.d.ts +9 -0
  208. package/dist/components/session-status.d.ts.map +1 -0
  209. package/dist/components/session-status.js +11 -0
  210. package/dist/components/session-status.js.map +1 -0
  211. package/dist/components/switch.d.ts +7 -0
  212. package/dist/components/switch.d.ts.map +1 -0
  213. package/dist/components/switch.js +14 -0
  214. package/dist/components/switch.js.map +1 -0
  215. package/package.json +177 -5
  216. package/theme/base.css +83 -0
  217. package/theme/component-theme.css +126 -0
  218. package/theme/index.css +3 -0
  219. package/theme/palette.css +347 -0
  220. package/theme/scoped-tokens.css +503 -0
  221. package/theme/theme.css +90 -0
  222. package/theme/tokens.css +165 -0
package/LICENSE ADDED
@@ -0,0 +1,201 @@
1
+ Apache License
2
+ Version 2.0, January 2004
3
+ http://www.apache.org/licenses/
4
+
5
+ TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
6
+
7
+ 1. Definitions.
8
+
9
+ "License" shall mean the terms and conditions for use, reproduction,
10
+ and distribution as defined by Sections 1 through 9 of this document.
11
+
12
+ "Licensor" shall mean the copyright owner or entity authorized by
13
+ the copyright owner that is granting the License.
14
+
15
+ "Legal Entity" shall mean the union of the acting entity and all
16
+ other entities that control, are controlled by, or are under common
17
+ control with that entity. For the purposes of this definition,
18
+ "control" means (i) the power, direct or indirect, to cause the
19
+ direction or management of such entity, whether by contract or
20
+ otherwise, or (ii) ownership of fifty percent (50%) or more of the
21
+ outstanding shares, or (iii) beneficial ownership of such entity.
22
+
23
+ "You" (or "Your") shall mean an individual or Legal Entity
24
+ exercising permissions granted by this License.
25
+
26
+ "Source" form shall mean the preferred form for making modifications,
27
+ including but not limited to software source code, documentation
28
+ source, and configuration files.
29
+
30
+ "Object" form shall mean any form resulting from mechanical
31
+ transformation or translation of a Source form, including but
32
+ not limited to compiled object code, generated documentation,
33
+ and conversions to other media types.
34
+
35
+ "Work" shall mean the work of authorship, whether in Source or
36
+ Object form, made available under the License, as indicated by a
37
+ copyright notice that is included in or attached to the work
38
+ (an example is provided in the Appendix below).
39
+
40
+ "Derivative Works" shall mean any work, whether in Source or Object
41
+ form, that is based on (or derived from) the Work and for which the
42
+ editorial revisions, annotations, elaborations, or other modifications
43
+ represent, as a whole, an original work of authorship. For the purposes
44
+ of this License, Derivative Works shall not include works that remain
45
+ separable from, or merely link (or bind by name) to the interfaces of,
46
+ the Work and Derivative Works thereof.
47
+
48
+ "Contribution" shall mean any work of authorship, including
49
+ the original version of the Work and any modifications or additions
50
+ to that Work or Derivative Works thereof, that is intentionally
51
+ submitted to Licensor for inclusion in the Work by the copyright owner
52
+ or by an individual or Legal Entity authorized to submit on behalf of
53
+ the copyright owner. For the purposes of this definition, "submitted"
54
+ means any form of electronic, verbal, or written communication sent
55
+ to the Licensor or its representatives, including but not limited to
56
+ communication on electronic mailing lists, source code control systems,
57
+ and issue tracking systems that are managed by, or on behalf of, the
58
+ Licensor for the purpose of discussing and improving the Work, but
59
+ excluding communication that is conspicuously marked or otherwise
60
+ designated in writing by the copyright owner as "Not a Contribution."
61
+
62
+ "Contributor" shall mean Licensor and any individual or Legal Entity
63
+ on behalf of whom a Contribution has been received by Licensor and
64
+ subsequently incorporated within the Work.
65
+
66
+ 2. Grant of Copyright License. Subject to the terms and conditions of
67
+ this License, each Contributor hereby grants to You a perpetual,
68
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
69
+ copyright license to reproduce, prepare Derivative Works of,
70
+ publicly display, publicly perform, sublicense, and distribute the
71
+ Work and such Derivative Works in Source or Object form.
72
+
73
+ 3. Grant of Patent License. Subject to the terms and conditions of
74
+ this License, each Contributor hereby grants to You a perpetual,
75
+ worldwide, non-exclusive, no-charge, royalty-free, irrevocable
76
+ (except as stated in this section) patent license to make, have made,
77
+ use, offer to sell, sell, import, and otherwise transfer the Work,
78
+ where such license applies only to those patent claims licensable
79
+ by such Contributor that are necessarily infringed by their
80
+ Contribution(s) alone or by combination of their Contribution(s)
81
+ with the Work to which such Contribution(s) was submitted. If You
82
+ institute patent litigation against any entity (including a
83
+ cross-claim or counterclaim in a lawsuit) alleging that the Work
84
+ or a Contribution incorporated within the Work constitutes direct
85
+ or contributory patent infringement, then any patent licenses
86
+ granted to You under this License for that Work shall terminate
87
+ as of the date such litigation is filed.
88
+
89
+ 4. Redistribution. You may reproduce and distribute copies of the
90
+ Work or Derivative Works thereof in any medium, with or without
91
+ modifications, and in Source or Object form, provided that You
92
+ meet the following conditions:
93
+
94
+ (a) You must give any other recipients of the Work or
95
+ Derivative Works a copy of this License; and
96
+
97
+ (b) You must cause any modified files to carry prominent notices
98
+ stating that You changed the files; and
99
+
100
+ (c) You must retain, in the Source form of any Derivative Works
101
+ that You distribute, all copyright, patent, trademark, and
102
+ attribution notices from the Source form of the Work,
103
+ excluding those notices that do not pertain to any part of
104
+ the Derivative Works; and
105
+
106
+ (d) If the Work includes a "NOTICE" text file as part of its
107
+ distribution, then any Derivative Works that You distribute must
108
+ include a readable copy of the attribution notices contained
109
+ within such NOTICE file, excluding those notices that do not
110
+ pertain to any part of the Derivative Works, in at least one
111
+ of the following places: within a NOTICE text file distributed
112
+ as part of the Derivative Works; within the Source form or
113
+ documentation, if provided along with the Derivative Works; or,
114
+ within a display generated by the Derivative Works, if and
115
+ wherever such third-party notices normally appear. The contents
116
+ of the NOTICE file are for informational purposes only and
117
+ do not modify the License. You may add Your own attribution
118
+ notices within Derivative Works that You distribute, alongside
119
+ or as an addendum to the NOTICE text from the Work, provided
120
+ that such additional attribution notices cannot be construed
121
+ as modifying the License.
122
+
123
+ You may add Your own copyright statement to Your modifications and
124
+ may provide additional or different license terms and conditions
125
+ for use, reproduction, or distribution of Your modifications, or
126
+ for any such Derivative Works as a whole, provided Your use,
127
+ reproduction, and distribution of the Work otherwise complies with
128
+ the conditions stated in this License.
129
+
130
+ 5. Submission of Contributions. Unless You explicitly state otherwise,
131
+ any Contribution intentionally submitted for inclusion in the Work
132
+ by You to the Licensor shall be under the terms and conditions of
133
+ this License, without any additional terms or conditions.
134
+ Notwithstanding the above, nothing herein shall supersede or modify
135
+ the terms of any separate license agreement you may have executed
136
+ with Licensor regarding such Contributions.
137
+
138
+ 6. Trademarks. This License does not grant permission to use the trade
139
+ names, trademarks, service marks, or product names of the Licensor,
140
+ except as required for reasonable and customary use in describing the
141
+ origin of the Work and reproducing the content of the NOTICE file.
142
+
143
+ 7. Disclaimer of Warranty. Unless required by applicable law or
144
+ agreed to in writing, Licensor provides the Work (and each
145
+ Contributor provides its Contributions) on an "AS IS" BASIS,
146
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
147
+ implied, including, without limitation, any warranties or conditions
148
+ of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
149
+ PARTICULAR PURPOSE. You are solely responsible for determining the
150
+ appropriateness of using or redistributing the Work and assume any
151
+ risks associated with Your exercise of permissions under this License.
152
+
153
+ 8. Limitation of Liability. In no event and under no legal theory,
154
+ whether in tort (including negligence), contract, or otherwise,
155
+ unless required by applicable law (such as deliberate and grossly
156
+ negligent acts) or agreed to in writing, shall any Contributor be
157
+ liable to You for damages, including any direct, indirect, special,
158
+ incidental, or consequential damages of any character arising as a
159
+ result of this License or out of the use or inability to use the
160
+ Work (including but not limited to damages for loss of goodwill,
161
+ work stoppage, computer failure or malfunction, or any and all
162
+ other commercial damages or losses), even if such Contributor
163
+ has been advised of the possibility of such damages.
164
+
165
+ 9. Accepting Warranty or Additional Liability. While redistributing
166
+ the Work or Derivative Works thereof, You may choose to offer,
167
+ and charge a fee for, acceptance of support, warranty, indemnity,
168
+ or other liability obligations and/or rights consistent with this
169
+ License. However, in accepting such obligations, You may act only
170
+ on Your own behalf and on Your sole responsibility, not on behalf
171
+ of any other Contributor, and only if You agree to indemnify,
172
+ defend, and hold each Contributor harmless for any liability
173
+ incurred by, or claims asserted against, such Contributor by reason
174
+ of your accepting any such warranty or additional liability.
175
+
176
+ END OF TERMS AND CONDITIONS
177
+
178
+ APPENDIX: How to apply the Apache License to your work.
179
+
180
+ To apply the Apache License to your work, attach the following
181
+ boilerplate notice, with the fields enclosed by brackets "[]"
182
+ replaced with your own identifying information. (Don't include
183
+ the brackets!) The text should be enclosed in the appropriate
184
+ comment syntax for the file format. We also recommend that a
185
+ file or class name and description of purpose be included on the
186
+ same "printed page" as the copyright notice for easier
187
+ identification within third-party archives.
188
+
189
+ Copyright 2026 Cline Bot Inc.
190
+
191
+ Licensed under the Apache License, Version 2.0 (the "License");
192
+ you may not use this file except in compliance with the License.
193
+ You may obtain a copy of the License at
194
+
195
+ http://www.apache.org/licenses/LICENSE-2.0
196
+
197
+ Unless required by applicable law or agreed to in writing, software
198
+ distributed under the License is distributed on an "AS IS" BASIS,
199
+ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
200
+ See the License for the specific language governing permissions and
201
+ limitations under the License.
@@ -0,0 +1,21 @@
1
+ MIT License
2
+
3
+ Copyright (c) 2021 Radix
4
+
5
+ Permission is hereby granted, free of charge, to any person obtaining a copy
6
+ of this software and associated documentation files (the "Software"), to deal
7
+ in the Software without restriction, including without limitation the rights
8
+ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
9
+ copies of the Software, and to permit persons to whom the Software is
10
+ furnished to do so, subject to the following conditions:
11
+
12
+ The above copyright notice and this permission notice shall be included in all
13
+ copies or substantial portions of the Software.
14
+
15
+ THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
16
+ IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
17
+ FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
18
+ AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
19
+ LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
20
+ OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
21
+ SOFTWARE.
package/README.md CHANGED
@@ -1,3 +1,428 @@
1
- # Temporary Holding Version
1
+ # @cerebriline/ui
2
2
 
3
- This version is a temporary placeholder for this package. An operational version to replace this has been submitted for review and is awaiting a staged release.
3
+ Shared visual foundations and reusable React presentation primitives for Cline
4
+ web products. The package lets teams adopt the same semantic theme and agent
5
+ chat language without adopting another product's routes, state, or runtime.
6
+
7
+ The package is configured for public npm releases on its own version and
8
+ release cycle. Its API is still pre-stable, so consumers should pin an exact
9
+ version and review compatibility notes when updating. Check availability with
10
+ `npm view @cerebriline/ui version`; an `E404` means the first release is still pending.
11
+
12
+ See the [adoption primer](./ADOPTION.md) for complete setup instructions,
13
+ component examples, boundaries, and release status.
14
+
15
+ ## Install
16
+
17
+ After the initial release is available:
18
+
19
+ ```bash
20
+ bun add --exact @cerebriline/ui
21
+ ```
22
+
23
+ Use `@cerebriline/ui@next` only for deliberate previews. Monorepo consumers use
24
+ `"@cerebriline/ui": "workspace:*"` instead.
25
+
26
+ ## Entry points
27
+
28
+ | Import | Contents | Runtime requirement |
29
+ | --- | --- | --- |
30
+ | `@cerebriline/ui` | Reusable React primitives exported from [`components/index.ts`](./components/index.ts) | React 18.3 or 19 and Tailwind v4 |
31
+ | `@cerebriline/ui/components.css` | Styles, namespaced Tailwind mappings, and source registration for the root React primitives | Tailwind v4 and theme tokens |
32
+ | `@cerebriline/ui/theme/palette.css` | Cline-owned light/dark solid and alpha color scales | CSS |
33
+ | `@cerebriline/ui/theme/tokens.css` | Light/dark custom properties only | CSS |
34
+ | `@cerebriline/ui/theme/scoped-tokens.css` | Light/dark custom properties scoped to `.cline-ui-theme` | CSS |
35
+ | `@cerebriline/ui/theme/theme.css` | Tailwind v4 semantic mapping and dark variant | Tailwind v4 |
36
+ | `@cerebriline/ui/components/markdown.css` | Optional framework-neutral Markdown and Streamdown treatment | Theme tokens |
37
+ | `@cerebriline/ui/theme/base.css` | Optional document, Markdown, scrollbar, selection, and cursor styles | Tailwind v4 |
38
+ | `@cerebriline/ui/theme/index.css` | Complete theme: tokens, Tailwind mapping, and base styles | Tailwind v4 |
39
+ | `@cerebriline/ui/components/agent-chat` | Conversation, message, reasoning, action, and tool-activity React primitives | React 18.3 or 19 |
40
+ | `@cerebriline/ui/components/agent-chat.css` | Framework-neutral styles for the agent-chat primitives | Theme tokens |
41
+ | `@cerebriline/ui/components/message-scroller` | Shadcn message scrolling, turn anchors, visibility hooks, and centered scroll controls | React 19 |
42
+ | `@cerebriline/ui/components/message-scroller.css` | Framework-neutral scroller styles (also included in `components.css`) | Theme tokens |
43
+
44
+ `@shadcn/react` is pinned to 0.3.1 with a Bun dependency patch in
45
+ `patches/@shadcn%2Freact@0.3.1.patch`. The patch consumes anchors from loaded
46
+ and prepended history and distinguishes existing rows from replacement DOM
47
+ nodes, so prompt acknowledgment and typing-indicator replacement preserve the
48
+ reader's position. Keep the patch when upgrading until upstream passes
49
+ `tests/message-scroller.test.tsx`. Consumers installing outside this monorepo
50
+ must apply the same patch until an upstream release includes the fix.
51
+
52
+ `MessageScroller` composes `@shadcn/react/message-scroller`. It provides turn
53
+ anchoring, streaming follow behavior, message jumps, and visibility tracking.
54
+ The dedicated entry point requires React 19; see the
55
+ [message scroller guide](./ADOPTION.md#message-scroller) for composition and
56
+ transcript outline examples.
57
+
58
+ `SessionStatus` uses semantic tone colors by default. Set
59
+ `--cline-ui-session-status-color` on the component to override its dot color
60
+ for a host-specific status palette.
61
+
62
+ `SearchCombobox` provides a searchable selector for repository and model lists.
63
+ Its in-place panel requires ancestors that do not clip overflow.
64
+
65
+ Import `components.css` after Tailwind and either token entry point. It
66
+ registers package-namespaced mappings and the packaged component sources so
67
+ their utilities are emitted without changing generic host utility names.
68
+
69
+ `AgentQuickActions` renders prompt shortcuts and reports selection to the host.
70
+
71
+ `AgentConversationLayout`, `AgentConversationHeader`, and `AgentSessionContent`
72
+ share welcome/conversation geometry and header groups through host-owned slots.
73
+ See the [conversation layout adoption guide](./ADOPTION.md#conversation-layout-and-header).
74
+
75
+ `Button` and `IconButton` share `fill`, `surface`, and `ghost` variants across
76
+ accent, neutral, and destructive tones. Both default to `type="button"` so they
77
+ are safe inside forms. `IconButton` requires an accessible `aria-label`, and
78
+ both components support Radix-style composition through `asChild`.
79
+
80
+ ```tsx
81
+ import { Button, IconButton } from "@cerebriline/ui";
82
+
83
+ <Button size="sm" tone="accent" variant="fill">
84
+ Continue
85
+ </Button>;
86
+
87
+ <IconButton aria-label="Close" size="sm">
88
+ <CloseIcon />
89
+ </IconButton>;
90
+ ```
91
+
92
+ `AgentAurora` fills its nearest positioned ancestor, which must have resolved
93
+ dimensions.
94
+
95
+ `Switch` is a medium-size native checkbox styled as a switch. It supports
96
+ `checked`, `defaultChecked`, `onCheckedChange`, and native input/form props.
97
+ Provide an accessible name with a label or `aria-label`. Its ref targets the
98
+ input; `className` and `style` customize the wrapper. See [switch usage and
99
+ implementation rationale](./ADOPTION.md#switch) for examples and design decisions.
100
+
101
+ `AgentHeroHeading` renders the shared cycling “What would you like to …?”
102
+ welcome heading and respects reduced-motion preferences.
103
+
104
+ `AgentWelcomeHero` renders the interactive Cline bot and grid used on agent
105
+ welcome surfaces. It supports bot-only and grid-only compositions and becomes
106
+ static when reduced motion is requested.
107
+
108
+ `AgentApprovalCard` is controlled presentation; the host owns approval state
109
+ and submits its callbacks.
110
+
111
+ `AgentAskQuestion` answers single-choice items as soon as an option is picked
112
+ and also accepts a typed custom answer. The host owns pending answers, errors,
113
+ and response transport. Multiple-choice items set `multiple: true` and provide
114
+ `onAnswers` for explicit array submission.
115
+
116
+ `AgentComposer` and its body, field, textarea, actions, attachments, and settings
117
+ primitives share the desktop input presentation without taking ownership of
118
+ drafts, keyboard handling, models, uploads, or runtime actions. See the
119
+ [composer adoption contract](./ADOPTION.md#composer-presentation).
120
+
121
+ `AgentPromptQueue` renders queued prompts and reports edit, remove, and steer
122
+ actions to the host.
123
+
124
+ The token entry point has no React, Tailwind, font-package, or desktop runtime
125
+ dependency. Apps provide Inter and Geist Mono themselves, which
126
+ lets each bundler control font loading and asset emission.
127
+
128
+ `palette.css` and `tokens.css` are the canonical theme sources;
129
+ `scoped-tokens.css` and the internal component Tailwind mapping are generated
130
+ from them and `theme.css`. Contributors change the source theme files and run
131
+ `bun run generate:theme`; tests and CI reject drift in either generated output.
132
+ Consumers may import either public token entry point.
133
+
134
+ ## Theme usage
135
+
136
+ For a Tailwind v4 app, import framework and consumer dependencies first:
137
+
138
+ ```css
139
+ @import "@fontsource-variable/inter";
140
+ @import "@fontsource-variable/geist-mono";
141
+ @import "tailwindcss";
142
+ @import "@cerebriline/ui/theme/index.css";
143
+ ```
144
+
145
+ An app that only needs framework-neutral values can import:
146
+
147
+ ```css
148
+ @import "@cerebriline/ui/theme/tokens.css";
149
+ ```
150
+
151
+ For an embedded surface, import scoped tokens and optional Markdown styles:
152
+
153
+ ```css
154
+ @import "@cerebriline/ui/theme/scoped-tokens.css";
155
+ @import "@cerebriline/ui/components.css";
156
+ @import "@cerebriline/ui/components/markdown.css";
157
+ ```
158
+
159
+ ```tsx
160
+ <section className="cline-ui-theme">
161
+ <div className="cline-markdown">...</div>
162
+ </section>
163
+ ```
164
+
165
+ Dark values activate when `.dark` is on the wrapper or an ancestor.
166
+
167
+ Embedded hosts should not import `@cerebriline/ui/theme/theme.css`; it intentionally
168
+ maps generic Tailwind names such as `bg-background` for Cline-owned surfaces.
169
+
170
+ The theme follows the standard shadcn semantic contract (`--background`,
171
+ `--foreground`, `--card`, `--primary`, `--border`, `--ring`, charts, and
172
+ sidebar surfaces) and Tailwind theme names. This means shadcn components and
173
+ normal Tailwind utilities inherit Cline defaults without custom adapters.
174
+
175
+ Theme authors work through three layers:
176
+
177
+ 1. Cline-owned 12-step solid and alpha palettes: Slate as `--neutral-*`,
178
+ Violet as `--accent-*`, Ruby as `--error-*`, Green as `--success-*`, Amber
179
+ as `--warning-*`, and Sky as `--info-*`.
180
+ 2. Readable visual roles such as `--surface-1`, `--text-2`, `--border-1`, and
181
+ `--success-surface`.
182
+ 3. Stable shadcn compatibility variables consumed by components.
183
+
184
+ Prefer visual or status roles when authoring new framework-neutral component
185
+ CSS. Continue using standard shadcn names in shadcn-compatible components.
186
+ Tailwind exposes the role and compatibility layers, but intentionally does not
187
+ register every raw palette step. Brand artwork may use the separate
188
+ `--brand-*` colors.
189
+
190
+ The palette values are derived from Radix Colors 3.0.0 under the included MIT
191
+ license; `@cerebriline/ui` does not depend on Radix Colors at runtime.
192
+
193
+ ## Agent-chat usage
194
+
195
+ Agent-chat consumers must provide React 18.3 or 19. Install React in the
196
+ consuming application if it is not already present:
197
+
198
+ ```bash
199
+ bun add react@^19 react-dom@^19
200
+ ```
201
+
202
+ Applications already on React 18.3 can retain that compatible version.
203
+
204
+ In the application's global CSS, import the component styles after at least the
205
+ theme tokens:
206
+
207
+ ```css
208
+ @import "@cerebriline/ui/theme/tokens.css";
209
+ @import "@cerebriline/ui/components/agent-chat.css";
210
+ ```
211
+
212
+ Then import the React components:
213
+
214
+ ```tsx
215
+ import {
216
+ Conversation,
217
+ ConversationContent,
218
+ ConversationEmptyState,
219
+ ConversationScrollButton,
220
+ ConversationViewport,
221
+ Message,
222
+ MessageAction,
223
+ MessageActions,
224
+ MessageContent,
225
+ Reasoning,
226
+ ReasoningContent,
227
+ ReasoningTrigger,
228
+ ToolActivity,
229
+ ToolActivityCode,
230
+ ToolActivityContent,
231
+ ToolActivityDetails,
232
+ ToolActivityTrigger,
233
+ WorkActivity,
234
+ WorkActivityContent,
235
+ WorkActivityTrigger,
236
+ } from "@cerebriline/ui/components/agent-chat";
237
+ ```
238
+
239
+ `Conversation` owns sticky scrolling, `Message` owns role presentation,
240
+ `Reasoning` and `ToolActivity` provide accessible disclosures, `ThinkingBlock`
241
+ is the standard thinking-trace row ("Thinking" shimmer while streaming,
242
+ "Thought for Ns" once done), `WorkActivity` folds a finished run's working
243
+ rows behind a "Worked for 4m 12s and made 14 tool calls" summary, and the
244
+ smaller action, empty-state, detail, and code primitives fill out common
245
+ transcript states.
246
+
247
+ For assistant Markdown, `@cerebriline/ui/components/markdown` exports the shared
248
+ Streamdown configuration — `markdownCodeHighlighter` (lazy Shiki with GitHub
249
+ light/dark themes), `agentMarkdownControls`, and the opt-in
250
+ `createLazyMermaidPlugin` / `agentMarkdownControlsWithMermaid` pair — and
251
+ `@cerebriline/ui/components/markdown.css` carries the matching chat styling (quiet
252
+ single-box code blocks with a hover copy control, chat-scale headings, table
253
+ cards). The Mermaid plugin dynamically imports the renderer only after a
254
+ `mermaid` fence is encountered and enforces strict security for model-authored
255
+ source. Import the CSS unlayered so it wins over Streamdown's Tailwind
256
+ utilities, and keep `streamdown`, `shiki`, `@shikijs/langs`, `@shikijs/themes`,
257
+ and (when enabling diagrams) `mermaid` installed as optional peer dependencies.
258
+ Products keep their own `<Streamdown>` wrapper for link and image policy.
259
+
260
+ Hosts that want a native-looking diagram block register
261
+ `createMermaidRenderer()` from `@cerebriline/ui/components/mermaid-block` through
262
+ `<Streamdown plugins={{ renderers: [createMermaidRenderer()] }} />` instead of
263
+ the `mermaid` diagram plugin (Streamdown consults `renderers` first, so the
264
+ built-in block is skipped). The block shows the diagram's filename in its
265
+ header — from the fence title (```` ```mermaid title="my-diagram" ````), the
266
+ diagram's frontmatter `title:`, or a name derived from its contents — and
267
+ offers zoom, fullscreen, copy, and a Download menu with PNG and Mermaid
268
+ source (`.mmd`) only. Diagrams use Mermaid's `base` theme with variables
269
+ resolved from the live design tokens (`--card`, `--foreground`, `--primary`,
270
+ ...) as concrete sRGB, follow light/dark (`.dark` on the root) and the accent
271
+ palette, and re-render when either changes; a diagram's own `%%{init}%%`,
272
+ frontmatter `config:`, `classDef`, and `style` still override the site theme.
273
+ PNG exports are opaque (filled with the surface color), rendered at 2x-3x
274
+ (following the device pixel ratio, not Streamdown's fixed 5x), and capped at
275
+ 4096px on the longest edge, re-encoding smaller if needed, so they stay under
276
+ the ~5 MiB image attachment limit. The pure naming, theming, and
277
+ sizing logic lives in `@cerebriline/ui/components/mermaid-diagram` (DOM-free).
278
+
279
+ Give
280
+ each conversation a bounded height through an explicit height or a complete
281
+ flex/min-height chain so its viewport can scroll.
282
+
283
+ Diagram links need host handling. Mermaid's strict mode blocks scripts and
284
+ dangerous URL schemes, but a `click <node> "https://…"` directive still renders
285
+ a live anchor inside the SVG, and Streamdown injects that SVG with
286
+ `dangerouslySetInnerHTML` — so it never passes through the `a` component a
287
+ product supplies. The plugin therefore runs `neutralizeDiagramLinks` over
288
+ rendered output: navigable `href` / `xlink:href` / `target` attributes are
289
+ removed, and an http(s) destination is preserved on the attribute exported as
290
+ `DIAGRAM_LINK_HREF_ATTRIBUTE` (`data-cline-diagram-href`). Diagram links are
291
+ inert by default; a host that wants them clickable should read that attribute
292
+ and route the destination through its own link policy. Treat them as untrusted:
293
+ a diagram's visible label is authored independently of its destination, so
294
+ confirm before opening rather than reusing a "looks honest" heuristic.
295
+
296
+ These are presentation primitives, not an agent SDK. Consumers map their own
297
+ message and tool schemas into the components and retain their own Markdown,
298
+ transport, approvals, persistence, and product actions.
299
+
300
+ ## Session-row presentation
301
+
302
+ The root entry exports `AgentSessionRow`, `AgentSessionRowEditor`, and
303
+ `AgentSessionOverview`. Desktop uses these for its existing session row, rename
304
+ frame, and hover metadata. Hosts retain their icons, actions, rename input,
305
+ menus, data formatting, and session behavior. See the session-row section in
306
+ [ADOPTION.md](./ADOPTION.md) for the slot and trigger/ref contract.
307
+
308
+ ## Storybook
309
+
310
+ Run the interactive component catalog from the repository root:
311
+
312
+ ```bash
313
+ bun -F @cerebriline/ui storybook
314
+ ```
315
+
316
+ Then open `http://localhost:6006`. Build the static catalog with:
317
+
318
+ ```bash
319
+ bun -F @cerebriline/ui build-storybook
320
+ ```
321
+
322
+ In the repository's agent sandbox, bind to a forwarded host and unused port:
323
+
324
+ ```bash
325
+ bun -F @cerebriline/ui storybook -- --host 0.0.0.0 --port 3490 --exact-port
326
+ ```
327
+
328
+ The catalog includes the theme foundations and representative agent-chat
329
+ states in light, dark, desktop, and narrow viewports.
330
+
331
+ Storybook currently runs from a Cline monorepo checkout. It is not hosted or
332
+ included in the npm package; deployment can be added once the catalog and
333
+ ownership model settle.
334
+
335
+ ## Layering and compatibility
336
+
337
+ - Import the Cline theme after Tailwind so its default typography values win.
338
+ - Import `components/markdown.css` after either token entry point.
339
+ - Import `agent-chat.css` after theme tokens.
340
+ - Override `:root` or `.dark` after package imports for deliberate product
341
+ variations; do not rename the default semantic contract.
342
+ - `base.css` is optional because it contains opinionated Markdown and global
343
+ interaction styles.
344
+ - Shell layout, routes, provider/session state, and runtime behavior stay with
345
+ each consumer.
346
+ - Contract changes should include a compatibility note, package tests, a
347
+ Storybook build, and at least one real consumer build.
348
+
349
+ ## Releases
350
+
351
+ The standalone `ui-publish.yml` workflow validates the package and publishes
352
+ only after a manual dispatch from `main`. Production releases use the npm
353
+ `latest` tag; deliberate previews use `next`. UI releases do not trigger the
354
+ SDK release, GitHub releases, or Slack announcements.
355
+
356
+ ### 0.2.0-next.10 compatibility notes
357
+
358
+ This preview packages the already-merged desktop UI updates for external
359
+ consumers:
360
+
361
+ - `SearchCombobox.onOpen` is an optional callback for refreshing a catalog when
362
+ its picker opens. Hosts still own fetching, selection, and error handling.
363
+ - A single queued prompt is visible immediately with its existing edit/remove/
364
+ steer controls. Multiple prompts retain the collapsible list. This does not
365
+ add a runtime queue operation or an Enter-to-steer shortcut to consumers.
366
+ - `ToolFileDiff` derives its options from the peer component, allowing the
367
+ published declarations to work with both `@pierre/diffs` 1.3 and 1.4.
368
+
369
+ Consumers on `0.2.0-next.9` can retain existing props. Adopt the callback
370
+ explicitly to enable catalog refresh. The version change prepares a package;
371
+ publication still requires the separate manual workflow below.
372
+
373
+ ### Publish a preview
374
+
375
+ Prepare an unused `0.2.0-next.N` version in this package's `package.json`,
376
+ regenerate the workspace lockfile with Bun if needed, and merge the release
377
+ commit to `main`. Keep `internal: true`: the UI package has its own release
378
+ workflow and is excluded from SDK-wide version bumps.
379
+
380
+ After merging the version change, dispatch:
381
+
382
+ ```sh
383
+ gh workflow run ui-publish.yml \
384
+ --repo cline/cline \
385
+ --ref main \
386
+ -f npm_tag=next \
387
+ -f confirm_publish=publish
388
+ ```
389
+
390
+ The workflow builds dependencies, runs UI and integration checks, builds
391
+ Storybook, tests the packed artifact, and publishes that artifact with
392
+ provenance. It rejects a version that already exists. Recheck registry versions
393
+ before release preparation; if the version was taken, commit the next unused
394
+ prerelease before dispatching. Publishing does not happen when the PR merges.
395
+
396
+ After the run succeeds, verify that the registry's `next` tag points to the
397
+ prepared version and that `latest` is unchanged. Install the exact preview in
398
+ an external consumer and verify its build, styles, keyboard interaction, and
399
+ disabled states:
400
+
401
+ ```sh
402
+ bun add --exact '@cerebriline/ui@<prepared-version>'
403
+ ```
404
+
405
+ Commit the consumer's manifest and lockfile. Monorepo consumers retain
406
+ `workspace:*`; rebuild with `bun -F @cerebriline/ui build` and restart the consuming
407
+ app. If a preview regresses, pin the previous version and publish a corrected
408
+ prerelease instead of replacing an existing version.
409
+
410
+ The install command above pins the resolved release. Commit the consumer
411
+ lockfile and update deliberately. The package is ESM and its React components
412
+ target browser applications. A complete Tailwind theme also requires Tailwind
413
+ v4 and the two font packages shown above.
414
+
415
+ `AgentContextUsage` supplies the desktop context ring, accessible trigger label,
416
+ and usage-detail body through a render callback. The host keeps its existing
417
+ button/popover behavior and passes its formatted cost separately from the latest
418
+ request's context tokens. See [context usage](./ADOPTION.md#context-usage).
419
+
420
+ ## Where it comes from
421
+
422
+ A fork of the [Cline](https://github.com/cline/cline) SDK (`@cline/ui`),
423
+ published under its own scope. The source is in
424
+ [`sdk/packages/ui`](https://github.com/mann1x/cline/tree/main/sdk/packages/ui) and keeps
425
+ upstream's package names; they are renamed when this package is packed. One
426
+ version is published per Cerebriline release, with the same number.
427
+
428
+ Needs Node 22 or newer. Apache-2.0, as upstream.