@cometchat/skills 4.3.0 → 4.4.1

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 (233) hide show
  1. package/LICENSE +21 -0
  2. package/bin/install.js +27 -0
  3. package/package.json +14 -1
  4. package/skills/cometchat/SKILL.md +233 -69
  5. package/skills/cometchat/references/asking-questions.md +48 -0
  6. package/skills/cometchat-a11y/SKILL.md +3 -2
  7. package/skills/cometchat-android-v5/SKILL.md +2 -1
  8. package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
  9. package/skills/cometchat-android-v5-calls/references/README.md +1 -1
  10. package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
  11. package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
  12. package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
  13. package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
  14. package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
  15. package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
  16. package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
  17. package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
  18. package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
  19. package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
  20. package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
  21. package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
  22. package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
  23. package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
  24. package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
  25. package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
  26. package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
  27. package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
  28. package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
  29. package/skills/cometchat-android-v5-components/SKILL.md +4 -3
  30. package/skills/cometchat-android-v5-core/SKILL.md +5 -3
  31. package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
  32. package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
  33. package/skills/cometchat-android-v5-features/SKILL.md +5 -4
  34. package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
  35. package/skills/cometchat-android-v5-production/SKILL.md +2 -1
  36. package/skills/cometchat-android-v5-push/SKILL.md +2 -3
  37. package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
  38. package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
  39. package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
  40. package/skills/cometchat-android-v6/SKILL.md +2 -1
  41. package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
  42. package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
  43. package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
  44. package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
  45. package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
  46. package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
  47. package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
  48. package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
  49. package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
  50. package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
  51. package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
  52. package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
  53. package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
  54. package/skills/cometchat-android-v6-core/SKILL.md +208 -28
  55. package/skills/cometchat-android-v6-events/SKILL.md +4 -1
  56. package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
  57. package/skills/cometchat-android-v6-features/SKILL.md +26 -2
  58. package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
  59. package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
  60. package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
  61. package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
  62. package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
  63. package/skills/cometchat-android-v6-production/SKILL.md +6 -3
  64. package/skills/cometchat-android-v6-push/SKILL.md +43 -2
  65. package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
  66. package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
  67. package/skills/cometchat-angular-calls/SKILL.md +256 -389
  68. package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
  69. package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
  70. package/skills/cometchat-angular-calls/references/call-session.md +2 -2
  71. package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
  72. package/skills/cometchat-angular-calls/references/device-management.md +53 -34
  73. package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
  74. package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
  75. package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
  76. package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
  77. package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
  78. package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
  79. package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
  80. package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
  81. package/skills/cometchat-angular-components/SKILL.md +149 -620
  82. package/skills/cometchat-angular-core/SKILL.md +232 -312
  83. package/skills/cometchat-angular-customization/SKILL.md +415 -223
  84. package/skills/cometchat-angular-features/SKILL.md +216 -334
  85. package/skills/cometchat-angular-patterns/SKILL.md +168 -359
  86. package/skills/cometchat-angular-placement/SKILL.md +189 -560
  87. package/skills/cometchat-angular-production/SKILL.md +241 -92
  88. package/skills/cometchat-angular-push/SKILL.md +280 -294
  89. package/skills/cometchat-angular-testing/SKILL.md +430 -158
  90. package/skills/cometchat-angular-theming/SKILL.md +190 -265
  91. package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
  92. package/skills/cometchat-astro-patterns/SKILL.md +3 -2
  93. package/skills/cometchat-calls/SKILL.md +25 -19
  94. package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
  95. package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
  96. package/skills/cometchat-calls/references/use-case-support.md +3 -4
  97. package/skills/cometchat-calls/references/use-case-team.md +23 -12
  98. package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
  99. package/skills/cometchat-components/SKILL.md +163 -25
  100. package/skills/cometchat-core/SKILL.md +258 -20
  101. package/skills/cometchat-customization/SKILL.md +50 -25
  102. package/skills/cometchat-features/SKILL.md +314 -35
  103. package/skills/cometchat-flutter-v5/SKILL.md +10 -4
  104. package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
  105. package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
  106. package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
  107. package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
  108. package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
  109. package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
  110. package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
  111. package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
  112. package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
  113. package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
  114. package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
  115. package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
  116. package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
  117. package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
  118. package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
  119. package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
  120. package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
  121. package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
  122. package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
  123. package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
  124. package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
  125. package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
  126. package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
  127. package/skills/cometchat-flutter-v6/SKILL.md +17 -16
  128. package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
  129. package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
  130. package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
  131. package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
  132. package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
  133. package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
  134. package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
  135. package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
  136. package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
  137. package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
  138. package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
  139. package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
  140. package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
  141. package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
  142. package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
  143. package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
  144. package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
  145. package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
  146. package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
  147. package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
  148. package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
  149. package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
  150. package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
  151. package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
  152. package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
  153. package/skills/cometchat-i18n/SKILL.md +140 -79
  154. package/skills/cometchat-ios/SKILL.md +4 -2
  155. package/skills/cometchat-ios-calls/SKILL.md +225 -95
  156. package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
  157. package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
  158. package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
  159. package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
  160. package/skills/cometchat-ios-calls/references/call-session.md +51 -54
  161. package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
  162. package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
  163. package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
  164. package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
  165. package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
  166. package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
  167. package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
  168. package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
  169. package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
  170. package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
  171. package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
  172. package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
  173. package/skills/cometchat-ios-components/SKILL.md +200 -12
  174. package/skills/cometchat-ios-core/SKILL.md +173 -45
  175. package/skills/cometchat-ios-customization/SKILL.md +276 -110
  176. package/skills/cometchat-ios-features/SKILL.md +64 -36
  177. package/skills/cometchat-ios-placement/SKILL.md +15 -12
  178. package/skills/cometchat-ios-production/SKILL.md +12 -4
  179. package/skills/cometchat-ios-push/SKILL.md +53 -19
  180. package/skills/cometchat-ios-testing/SKILL.md +14 -9
  181. package/skills/cometchat-ios-theming/SKILL.md +39 -3
  182. package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
  183. package/skills/cometchat-native-bare-patterns/SKILL.md +36 -19
  184. package/skills/cometchat-native-calls/SKILL.md +29 -17
  185. package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
  186. package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
  187. package/skills/cometchat-native-calls/references/call-session.md +2 -2
  188. package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
  189. package/skills/cometchat-native-calls/references/device-management.md +53 -30
  190. package/skills/cometchat-native-calls/references/group-calls.md +35 -30
  191. package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
  192. package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
  193. package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
  194. package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
  195. package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
  196. package/skills/cometchat-native-calls/references/share-invite.md +7 -5
  197. package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
  198. package/skills/cometchat-native-components/SKILL.md +84 -52
  199. package/skills/cometchat-native-core/SKILL.md +102 -33
  200. package/skills/cometchat-native-customization/SKILL.md +150 -28
  201. package/skills/cometchat-native-expo-patterns/SKILL.md +60 -29
  202. package/skills/cometchat-native-features/SKILL.md +24 -17
  203. package/skills/cometchat-native-placement/SKILL.md +19 -10
  204. package/skills/cometchat-native-production/SKILL.md +9 -3
  205. package/skills/cometchat-native-push/SKILL.md +2 -1
  206. package/skills/cometchat-native-testing/SKILL.md +1 -2
  207. package/skills/cometchat-native-theming/SKILL.md +54 -29
  208. package/skills/cometchat-native-troubleshooting/SKILL.md +11 -5
  209. package/skills/cometchat-nextjs-patterns/SKILL.md +22 -8
  210. package/skills/cometchat-placement/SKILL.md +42 -3
  211. package/skills/cometchat-production/SKILL.md +12 -5
  212. package/skills/cometchat-react-calls/SKILL.md +220 -10
  213. package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
  214. package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
  215. package/skills/cometchat-react-calls/references/call-session.md +1 -1
  216. package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
  217. package/skills/cometchat-react-calls/references/device-management.md +55 -51
  218. package/skills/cometchat-react-calls/references/group-calls.md +18 -23
  219. package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
  220. package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
  221. package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
  222. package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
  223. package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
  224. package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
  225. package/skills/cometchat-react-calls/references/share-invite.md +4 -5
  226. package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
  227. package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
  228. package/skills/cometchat-react-patterns/SKILL.md +45 -5
  229. package/skills/cometchat-react-push/SKILL.md +258 -72
  230. package/skills/cometchat-react-router-patterns/SKILL.md +12 -6
  231. package/skills/cometchat-react-testing/SKILL.md +14 -5
  232. package/skills/cometchat-theming/SKILL.md +181 -18
  233. package/skills/cometchat-troubleshooting/SKILL.md +40 -20
@@ -3,13 +3,14 @@ name: cometchat-theming
3
3
  description: Customize CometChat UI to match the user's app design system. Covers the CSS variable cascade, preset themes, brand color overrides, design system extraction, dark mode, and framework-specific override locations.
4
4
  license: "MIT"
5
5
  compatibility: "Node.js >=18; @cometchat/chat-uikit-react ^6; integration must already be applied"
6
- allowed-tools: "shell, file-read, file-search, file-list, grep"
7
6
  metadata:
8
7
  author: "CometChat"
9
8
  version: "3.1.0"
10
9
  tags: "cometchat theming css customization branding dark-mode"
11
10
  ---
12
11
 
12
+ > **Ground truth:** per-platform UI Kit theme system + `docs/ui-kit`. **Official docs:** https://www.cometchat.com/docs/ui-kit/react/theme · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP). Verify symbols against the installed package/source before relying on them.
13
+
13
14
  > **Companion skills:** `cometchat-core` covers CSS import placement
14
15
  > and the one-import rule; `cometchat-customization` covers
15
16
  > component-level CSS selectors for deeper overrides;
@@ -37,22 +38,35 @@ This file is imported once at the app root (see `cometchat-core`).
37
38
  Every `<CometChat*>` component reads these variables — there is no
38
39
  component-level style-props API for colors, fonts, or spacing.
39
40
 
40
- To override: write CSS rules that set `--cometchat-*` variables on
41
- `:root` (or a scoped container), **after** the `css-variables.css`
42
- import. The cascade does the rest every component picks up the new
43
- values automatically.
41
+ **Scope to `.cometchat`, not `:root`.** The UI Kit renders under a `.cometchat`
42
+ root element. The canonical scope (per the docs) is that class — it keeps the
43
+ overrides from leaking into the rest of your app, and it's where component-scoped
44
+ overrides hang off. (`:root` *works* because CSS variables inherit downward, but
45
+ it's global and lower-precedence — prefer `.cometchat`.) Write the rules **after**
46
+ the `css-variables.css` import.
44
47
 
45
48
  ```css
46
49
  /* Must appear AFTER the @import of css-variables.css */
47
- :root {
50
+
51
+ /* Global — applies to every CometChat component */
52
+ .cometchat {
48
53
  --cometchat-primary-color: #6C63FF;
49
54
  --cometchat-background-color-01: #FFFFFF;
50
55
  --cometchat-text-color-primary: #141414;
51
56
  --cometchat-font-family: "Inter", sans-serif;
52
57
  --cometchat-radius-2: 8px;
53
58
  }
59
+
60
+ /* Component-scoped — only the conversations list */
61
+ .cometchat .cometchat-conversations {
62
+ --cometchat-primary-color: #FF6C63;
63
+ }
54
64
  ```
55
65
 
66
+ **Precedence ladder** (highest wins): runtime `element.style.setProperty(...)` →
67
+ component-scoped `.cometchat .cometchat-<component> { --var }` → global
68
+ `.cometchat { --var }` → the kit's `css-variables.css` defaults.
69
+
56
70
  ### Dark mode
57
71
 
58
72
  Two broad strategies — pick based on how the project already handles dark mode.
@@ -61,7 +75,7 @@ Two broad strategies — pick based on how the project already handles dark mode
61
75
 
62
76
  ```css
63
77
  @media (prefers-color-scheme: dark) {
64
- :root {
78
+ .cometchat {
65
79
  --cometchat-primary-color: #7B73FF;
66
80
  --cometchat-background-color-01: #1A1A2E;
67
81
  --cometchat-text-color-primary: #E0E0E0;
@@ -70,25 +84,25 @@ Two broad strategies — pick based on how the project already handles dark mode
70
84
  }
71
85
  ```
72
86
 
73
- **Strategy B — App-controlled theme toggle.** If the project already has a theme toggle (next-themes, Tailwind `dark:` prefix, React Context, etc.), wire CometChat's dark mode to the same trigger. The shared trigger is typically a CSS class or `data-theme` attribute on `<html>` or `<body>`. Scope the override to that selector:
87
+ **Strategy B — App-controlled theme toggle.** If the project already has a theme toggle (next-themes, Tailwind `dark:` prefix, React Context, etc.), wire CometChat's dark mode to the same trigger. The trigger is typically a class or `data-theme` attribute on an ancestor (`<html>`/`<body>`/the `.cometchat-root` wrapper). Scope the override to **`.cometchat` under that ancestor** — NOT `:root` (a bare `:root` can never be a *descendant* of `.dark`/`[data-theme]`, so `.dark :root { }` matches nothing):
74
88
 
75
89
  ```css
76
90
  /* next-themes default: applies a `.dark` class to <html> */
77
- .dark :root {
91
+ .dark .cometchat {
78
92
  --cometchat-primary-color: #7B73FF;
79
93
  --cometchat-background-color-01: #1A1A2E;
80
94
  --cometchat-text-color-primary: #E0E0E0;
81
95
  }
82
96
 
83
- /* OR if the project uses data-theme="dark" on <html> (common with Tailwind CSS v4) */
84
- [data-theme="dark"] :root {
97
+ /* OR data-theme="dark" on the wrapper (the kit's own convention + Tailwind v4) */
98
+ .cometchat-root[data-theme="dark"] .cometchat {
85
99
  --cometchat-primary-color: #7B73FF;
86
100
  --cometchat-background-color-01: #1A1A2E;
87
101
  --cometchat-text-color-primary: #E0E0E0;
88
102
  }
89
103
 
90
104
  /* OR for Tailwind's `class` strategy with `darkMode: 'class'` in tailwind.config */
91
- html.dark {
105
+ html.dark .cometchat {
92
106
  --cometchat-primary-color: #7B73FF;
93
107
  --cometchat-background-color-01: #1A1A2E;
94
108
  --cometchat-text-color-primary: #E0E0E0;
@@ -175,11 +189,13 @@ Target file is determined by `framework` in `.cometchat/config.json`:
175
189
 
176
190
  | Framework | Target file |
177
191
  |---|---|
178
- | `reactjs` | `src/index.css` (append `:root { ... }` block after the existing import) |
192
+ | `reactjs` | `src/index.css` (append a `.cometchat { ... }` block after the existing import) |
179
193
  | `nextjs` | `src/app/globals.css` (App Router) or `styles/globals.css` (Pages Router) |
180
194
  | `react-router` | `app/app.css` (or `src/index.css` if you used a Vite-style structure) |
181
195
  | `astro` | Inline `<style>` tag or imported CSS **inside** `src/cometchat/ChatApp.tsx` (see section 1 for why) |
182
196
 
197
+ Scope the block to `.cometchat` (global) or `.cometchat .cometchat-<component>` (component-specific) — see §1's precedence ladder.
198
+
183
199
  The override block must be written **after** the existing
184
200
  `@cometchat/chat-uikit-react/css-variables.css` import so it takes
185
201
  precedence. If the project imports the CometChat CSS in a TSX file
@@ -205,9 +221,9 @@ Otherwise ask the user (preserve the structured shape — `question`/`header`/`m
205
221
  ### Step 2 — Build the override block
206
222
 
207
223
  **Path A — Preset:** Look up the preset in section 5's table. Emit a
208
- `:root { ... }` block with those five variables. If the preset's
224
+ `.cometchat { ... }` block with those five variables. If the preset's
209
225
  `Dark mode included` column is "yes" (currently just `discord`),
210
- also emit a `@media (prefers-color-scheme: dark) { :root { ... } }`
226
+ also emit a `@media (prefers-color-scheme: dark) { .cometchat { ... } }`
211
227
  block with sensible dark variants (invert background to dark, text to
212
228
  light, keep primary).
213
229
 
@@ -215,7 +231,7 @@ light, keep primary).
215
231
  `#853953`). Emit at minimum:
216
232
 
217
233
  ```css
218
- :root {
234
+ .cometchat {
219
235
  --cometchat-primary-color: #853953;
220
236
  }
221
237
  ```
@@ -235,12 +251,12 @@ earlier theming pass; replace that block rather than duplicating.
235
251
 
236
252
  ### Step 4 — Write / update the override block
237
253
 
238
- Use `Edit` to insert or replace the `:root` block. Keep it grouped and
254
+ Use `Edit` to insert or replace the `.cometchat` block. Keep it grouped and
239
255
  commented so the user can see where their theme lives:
240
256
 
241
257
  ```css
242
258
  /* CometChat theme override — edit these to change the chat UI */
243
- :root {
259
+ .cometchat {
244
260
  --cometchat-primary-color: #853953;
245
261
  --cometchat-font-family: "Inter", sans-serif;
246
262
  }
@@ -294,6 +310,19 @@ worth knowing:
294
310
  | `--cometchat-radius-2` | Medium radius (bubbles, buttons) |
295
311
  | `--cometchat-radius-3` | Larger radius (panels) |
296
312
 
313
+ ### Color palette scales (the real brand-swap surface)
314
+
315
+ `--cometchat-primary-color` is the headline accent, but the docs' canonical
316
+ brand-override surface is two **numbered scales** (50 → 900, light + dark hex
317
+ each) — set these to re-skin the kit, not just the single primary token:
318
+
319
+ | Scale | What it drives |
320
+ |---|---|
321
+ | `--cometchat-neutral-color-50` … `-900` | Greys: surfaces, borders, dividers, disabled. **`--cometchat-neutral-color-300`** is the incoming message-bubble body (default `#E8E8E8`). |
322
+ | `--cometchat-extended-primary-color-50` … `-900` | Tints/shades of the brand color the kit derives for hovers, badges, selected states. Set these alongside `--cometchat-primary-color` for a complete brand swap. |
323
+
324
+ Plus the semantic status tokens: `--cometchat-error-color`, `--cometchat-info-color`, `--cometchat-success-color`, `--cometchat-warning-color`, and `--cometchat-message-seen-color`. (Docs: ui-kit/react/theme/color-resources.)
325
+
297
326
  For the full 200+ list, query the docs MCP (see below) or read
298
327
  `node_modules/@cometchat/chat-uikit-react/dist/styles/css-variables/css-variables.css`.
299
328
 
@@ -319,6 +348,140 @@ The CometChat docs MCP at `cometchat-docs` is the canonical source for:
319
348
  **Canonical reference URL:**
320
349
  https://www.cometchat.com/docs/ui-kit/react/theme
321
350
 
351
+ ## 10. Copy-ready UI recipes (ENG-35714)
352
+
353
+ A short catalog of worked examples for the most-asked customizations. Pasted into `cometchat-overrides.css` (or the framework-specific override file from §6), these compile against any kit ≥ v5 without further tweaking.
354
+
355
+ ### Recipe 1 — Brand color + system font (most common)
356
+
357
+ ```css
358
+ .cometchat {
359
+ /* Brand primary — replaces "CometChat purple" everywhere it shows up */
360
+ --cometchat-primary-color: #2563EB; /* tailwind blue-600 */
361
+ --cometchat-primary-button-background: var(--cometchat-primary-color);
362
+ --cometchat-primary-button-text: #FFFFFF; /* NOT -primary-button-text-color */
363
+
364
+ /* System font stack — matches your app's typography */
365
+ --cometchat-font-family: -apple-system, BlinkMacSystemFont, "Segoe UI", Roboto, "Helvetica Neue", Arial, sans-serif;
366
+ }
367
+ ```
368
+
369
+ ### Recipe 2 — Force dark mode (regardless of OS)
370
+
371
+ ```css
372
+ /* App-controlled: you set data-theme="dark" on the .cometchat-root wrapper.
373
+ The canonical scope is `.cometchat-root[data-theme="dark"] .cometchat` —
374
+ NOT a bare `:root`/`[data-theme="dark"]` (a bare :root in the selector list
375
+ would force dark UNCONDITIONALLY, ignoring the toggle). */
376
+ .cometchat-root[data-theme="dark"] .cometchat {
377
+ --cometchat-background-color-01: #0F172A; /* page background */
378
+ --cometchat-background-color-02: #1E293B; /* card / surface */
379
+ --cometchat-background-color-03: #334155; /* hover */
380
+ --cometchat-text-color-primary: #F1F5F9;
381
+ --cometchat-text-color-secondary: #94A3B8;
382
+ --cometchat-border-color-default: #1E293B;
383
+ --cometchat-primary-color: #60A5FA; /* lighter primary for dark bg */
384
+ color-scheme: dark;
385
+ }
386
+ ```
387
+
388
+ For OS-driven auto theme (the default per ENG-35715), wrap the same variables in `@media (prefers-color-scheme: dark) { .cometchat { … } }` instead of the `data-theme` selector. The variables-only approach beats class-toggling because it works everywhere the kit renders without an explicit theme prop.
389
+
390
+ ### Recipe 3 — Custom message bubble color (outgoing/incoming)
391
+
392
+ **Preferred technique (per docs): override the CSS *variable* inside the bubble
393
+ `__body` selector** — not raw `background`/`color`. The kit's bubble reads
394
+ `--cometchat-neutral-color-300` (incoming) and the primary color (outgoing); setting
395
+ those inside the scoped selector keeps the rest of the bubble's styling intact.
396
+
397
+ ```css
398
+ /* Outgoing bubble (your messages) — override the variable the body reads */
399
+ .cometchat .cometchat-message-bubble-outgoing .cometchat-message-bubble__body {
400
+ --cometchat-primary-color: #2563EB;
401
+ }
402
+
403
+ /* Incoming bubble (their messages) — neutral-300 is the incoming body token */
404
+ .cometchat .cometchat-message-bubble-incoming .cometchat-message-bubble__body {
405
+ --cometchat-neutral-color-300: #E8E8E8;
406
+ }
407
+ ```
408
+
409
+ **Per-message-TYPE overrides.** Beyond direction, the kit body carries a
410
+ per-type class so you can style one message type only. Chain it onto the body:
411
+
412
+ ```css
413
+ /* Style only TEXT bubbles outgoing */
414
+ .cometchat .cometchat-message-bubble-outgoing
415
+ .cometchat-message-bubble__body.cometchat-message-bubble__text-message {
416
+ border-radius: 16px 16px 4px 16px;
417
+ }
418
+ ```
419
+
420
+ > ⚠️ **Use the kit's ACTUAL class names — some are misspelled in the kit's own CSS** (verified against `cometchat-uikit-react-v6/src/styles/`). Real per-type classes: `__text-message`, `__audio-message`, `__file-message`, `__document-message`, `__delete-message`, `__sticker-message`, **`__pol-message`** (poll — note the missing `l`), and **`__whiteboad-message`** (note the missing `r`; a correctly-spelled `__whiteboard-message` also exists). The non-directional `.cometchat-action-bubble` styles call/group action bubbles. Direction classes are `.cometchat-message-bubble-outgoing` / `-incoming` (NOT BEM `--sender`/`--receiver`). Class names are NOT version-stable — re-verify in DevTools (and against `src/styles/`) when the kit bumps; the CSS variables (Recipe 1) ARE stable.
421
+
422
+ ### Recipe 4 — Rounded corners + borderless header
423
+
424
+ ```css
425
+ .cometchat {
426
+ --cometchat-radius-1: 8px;
427
+ --cometchat-radius-2: 12px;
428
+ --cometchat-radius-max: 999px; /* fully circular avatars */
429
+ }
430
+
431
+ .cometchat .cometchat-message-header,
432
+ .cometchat .cometchat-conversations-header {
433
+ border-bottom: none;
434
+ box-shadow: 0 1px 2px rgba(0,0,0,0.05); /* subtle shadow instead of a line */
435
+ }
436
+ ```
437
+
438
+ ### Recipe 5 — Tighter conversation list (denser layout)
439
+
440
+ ```css
441
+ /* The kit's conversation rows are .cometchat-list-item inside .cometchat-conversations
442
+ (there is NO .cometchat-conversations-list-item selector). Re-verify nested
443
+ classes in DevTools — they aren't version-stable. */
444
+ .cometchat-conversations .cometchat-list-item {
445
+ padding-block: 8px; /* default is 12px */
446
+ }
447
+
448
+ .cometchat-conversations .cometchat-list-item .cometchat-avatar {
449
+ width: 36px; /* default is 40-48px */
450
+ height: 36px;
451
+ }
452
+ ```
453
+
454
+ > ⚠️ **v6 has NO React theme-provider / theme object.** Earlier kits exposed `CometChatThemeProvider` + a `CometChatTheme` `{ palette, typography }` object — **neither exists in v6** (they're v4/v5 residue; importing them won't compile). v6 theming is **exclusively CSS variables** (Recipes 1–5) + the `[data-theme="dark"]` attribute. To drive theme from your design tokens, write your tokens INTO the `--cometchat-*` CSS variables. Read-only helpers `getThemeMode()` / `isDarkMode()` exist for branching logic, but there is no provider/theme-object API.
455
+
456
+ > **Where to find more recipes:** the upstream sample at https://github.com/cometchat/cometchat-uikit-react/tree/v6/sample-app has a `theme.tsx` with the full reference palette. For per-`*Style` field enumeration (a per-version exhaustive list), the kit's TypeScript `.d.ts` files in `node_modules/@cometchat/chat-uikit-react/dist/types/` are authoritative — open them when a recipe doesn't cover what you need.
457
+
458
+ ### Recipe 6 — Custom notification & call sounds (Sound Manager)
459
+
460
+ Sounds are **not CSS** — they're driven by the Sound Manager, a helper class with static methods. The UI Kit plays the built-in cues automatically; use this to **override** a cue with your own audio, or to **mute** by passing a silent/empty track. (Docs: ui-kit/react/sound-manager.)
461
+
462
+ > **Access it as `CometChatUIKit.SoundManager`.** The class `CometChatSoundManager` is **NOT** a package-root export in v6 — `import { CometChatSoundManager } from "@cometchat/chat-uikit-react"` fails with `TS2459: ... declares 'CometChatSoundManager' locally, but it is not exported`. It is exposed as the static `CometChatUIKit.SoundManager` (verified `CometChatUIKit.ts:53`). And `play()` takes a **string literal** — `play("incomingCall")` — NOT `play(SoundManager.Sound.incomingCall)` (the `Sound` map's values are typed optional, so passing one fails `TS2345`; the kit's own JSDoc uses the string form). Verified against kit 6.5.1 in a live build (Journey-7 runtime test, 2026-06-14).
463
+
464
+ ```ts
465
+ import { CometChatUIKit } from "@cometchat/chat-uikit-react";
466
+ const SoundManager = CometChatUIKit.SoundManager;
467
+
468
+ // Play a cue — pass the STRING LITERAL: "incomingCall" | "outgoingCall"
469
+ // | "incomingMessage" | "incomingMessageFromOther" | "outgoingMessage"
470
+ SoundManager.play("incomingCall");
471
+
472
+ // Override a cue with your own audio (2nd arg = custom URL/asset path)
473
+ SoundManager.play("incomingMessage", "/sounds/ping.mp3");
474
+
475
+ // Per-event helpers exist too (each takes an optional custom-sound URL):
476
+ SoundManager.onIncomingCall("/sounds/ring.mp3");
477
+ SoundManager.onOutgoingMessage();
478
+
479
+ // Stop whatever is playing (resets playback position)
480
+ SoundManager.pause();
481
+ ```
482
+
483
+ > Browser autoplay policies block audio until the user has interacted with the page — `SoundManager.hasInteracted()` returns whether that's happened, so gate any manual `play()` on it. To **mute** the kit's own cues, the cleaner path is the component-level config (e.g. `CometChatMessageList`/conversation sound props) rather than monkey-patching the manager.
484
+
322
485
  ## Hard rules
323
486
 
324
487
  - **Do NOT call `cometchat apply-theme`.** It's a v2 CLI command that
@@ -1,15 +1,16 @@
1
1
  ---
2
2
  name: cometchat-troubleshooting
3
- description: Diagnose and fix problems with a CometChat integration. Runs verify checks, detects drift, queries the docs MCP for symptom-to-cause lookups, and proposes targeted fixes. Works on any state — broken, missing, or drifted integrations.
3
+ description: Diagnose and fix problems with a CometChat integration. Runs verify checks, detects drift, looks up symptom-to-cause via the docs (docs MCP when available, public docs site otherwise), and proposes targeted fixes. Works on any state — broken, missing, or drifted integrations.
4
4
  license: "MIT"
5
5
  compatibility: "Node.js >=18; @cometchat/chat-uikit-react ^6"
6
- allowed-tools: "shell, file-read, file-search, file-list, grep"
7
6
  metadata:
8
7
  author: "CometChat"
9
8
  version: "3.0.0"
10
9
  tags: "cometchat troubleshooting fix diagnose verify drift errors doctor"
11
10
  ---
12
11
 
12
+ > **Ground truth:** observed runtime failures + the per-platform UI Kit + SDK error dictionaries. (Official docs linked below.) Verify symbols against the installed package/source before relying on them.
13
+
13
14
  > **Companion skills:** `cometchat-core` is the authoritative source for
14
15
  > correct init, login, and provider patterns; `cometchat-customization`
15
16
  > explains why drift after customization is expected;
@@ -41,28 +42,39 @@ The user has a problem with their CometChat integration. Trigger phrases:
41
42
  - "css-variables not loading"
42
43
  - "the chat doesn't show messages"
43
44
 
44
- ## 2. Docs MCP contract
45
+ ## 2. Docs lookup contract
45
46
 
46
- The CometChat docs MCP at `cometchat-docs` is a **hard requirement** for
47
- this skill. `cometchat doctor` handles the local diagnostic checks
48
- (integration state, drift, env vars, AST verify rules), but for any
49
- symptom that doesn't match a doctor known-issue code, the MCP is the
50
- canonical source for symptom cause fix.
47
+ `cometchat doctor` handles the local diagnostic checks (integration
48
+ state, drift, env vars, AST verify rules). For any symptom that doesn't
49
+ match a doctor known-issue code, the CometChat docs are the canonical
50
+ source for symptom cause fix. The docs MCP at `cometchat-docs` is the
51
+ **best** way to query them when it's available, but it is **not** a hard
52
+ requirement — it's one of three lookup paths, ordered by preference.
51
53
 
52
54
  **Hard rules:**
53
55
 
54
56
  1. **Always run `cometchat doctor` first** — its known-issues table
55
57
  covers the common failure modes (env-placeholder, env-missing, drift,
56
58
  init-before-login, no-auth-key-in-source).
57
- 2. **For symptoms NOT in doctor's table**, query the docs MCP with the
58
- exact error message or symptom keywords. Never guess at the cause.
59
- 3. **If the docs MCP is not installed**, STOP. Tell the user: "Doctor
60
- didn't recognize this symptom and I need the CometChat docs MCP to
61
- diagnose further. Install it with `claude mcp add --transport http
62
- cometchat-docs https://www.cometchat.com/docs/mcp` and re-run."
63
- 4. **Never blame the user's code** if doctor + MCP both pass — the issue
59
+ 2. **For symptoms NOT in doctor's table**, look up the exact error
60
+ message or symptom keywords against the docs. Never guess at the
61
+ cause. Use whichever lookup path is available, in this order:
62
+ - **(a) docs MCP** if a `cometchat-docs` MCP tool is available in
63
+ your agent, query it. This is the richest path.
64
+ - **(b) install the MCP, if your agent supports it** — Claude Code can
65
+ add it with `claude mcp add --transport http cometchat-docs
66
+ https://www.cometchat.com/docs/mcp`. Other agents (Cursor, Codex,
67
+ Cline, etc.) configure MCP servers their own way, or may not support
68
+ HTTP MCP at all — do NOT block on this. It's an optional upgrade.
69
+ - **(c) fetch/search the public docs directly** — the same content is
70
+ at <https://www.cometchat.com/docs>. Fetch the relevant
71
+ troubleshooting page, or web-search `site:cometchat.com/docs
72
+ "<symptom>"`. Every agent can do this; it is the universal fallback.
73
+ Never STOP and dead-end the user just because the MCP isn't installed —
74
+ fall through to (c).
75
+ 3. **Never blame the user's code** if doctor + docs both pass — the issue
64
76
  is probably infrastructure (network, dashboard config, auth provider).
65
- 5. **Canonical reference URL:**
77
+ 4. **Canonical reference URL:**
66
78
  https://www.cometchat.com/docs/ui-kit/react/troubleshooting
67
79
 
68
80
  ---
@@ -207,20 +219,28 @@ Many issues are framework-specific. Check against these common patterns:
207
219
  | Vite / CRA | CSS variables not taking effect | Override block appears BEFORE the `@import` of css-variables.css | Reorder: the `@import` must come first, overrides must follow. |
208
220
  | Any | 401 Unauthorized | Wrong or expired auth key in `.env` | Check `.env` for `YOUR_AUTH_KEY_HERE`. Replace with real value from app.cometchat.com → API & Auth Keys. |
209
221
  | Any | `CometChat is not initialized` | Component renders before `init()` resolves | Use the provider pattern from `cometchat-core` section 6, or add an `isReady` gate before rendering CometChat components. |
222
+ | Any (custom attachment) | `TypeError: Cannot read properties of undefined (reading 'messageToReplyRef')` when opening the composer attachment menu | Called `getDataSource().getAttachmentOptions(composerId)` with **one argument**. The Polls / Collaborative-Doc / Collaborative-Whiteboard extension decorators read `messageToReplyRef` off the (required) **second** arg without optional chaining, so it crashes when that extension is enabled. | Pass a defined second arg: `getAttachmentOptions(composerId, { messageToReplyRef: { current: null } })`. See `cometchat-features` §Type-5. (Kit-side fix in flight; until released, always pass the 2nd arg.) |
223
+ | Any (custom message type) | Custom message bubble renders when sent but **disappears after reload** | Your custom `messagesRequestBuilder` doesn't fetch the custom category/type from history (the kit's default builder would, but yours replaced it). | Extend the defaults: append your `custom` category to `getAllMessageCategories()` and your type to `getAllMessageTypes()`, then pass that `MessagesRequestBuilder` to `CometChatMessageList`. See `cometchat-features` §Type-5. |
210
224
  | Any (React 19) | `Cannot update a component (ForwardRef) while rendering a different component` | Known React 19 warning from CometChat UI Kit internals (`closePopover` calls setState during render). **Not a bug in your code.** | Ignore — this is a cosmetic warning from inside the UI Kit's minified bundle. The UI works correctly. Will be fixed in a future UI Kit release. Do NOT try to patch this in user code. |
211
225
 
212
- ### Step 5 — Symptom-driven lookup via the docs MCP
226
+ ### Step 5 — Symptom-driven docs lookup
213
227
 
214
228
  If the user has reported a specific symptom that isn't covered by verify
215
- checks or the framework table, query the CometChat docs MCP:
229
+ checks or the framework table, look it up against the CometChat docs via
230
+ the best path available to your agent (§2 path a → b → c):
216
231
 
217
232
  ```
233
+ # If a cometchat-docs MCP tool is available:
218
234
  Use the cometchat-docs MCP to search for "<symptom keywords>"
235
+
236
+ # Otherwise (any agent), fetch/search the public docs:
237
+ Fetch https://www.cometchat.com/docs and search for "<symptom keywords>",
238
+ or web-search: site:cometchat.com/docs "<symptom keywords>"
219
239
  ```
220
240
 
221
241
  Common symptom searches:
222
242
 
223
- | Symptom | MCP search query |
243
+ | Symptom | Search query |
224
244
  |---|---|
225
245
  | Blank screen at /chat | "blank screen ssr nextjs" or "blank screen react-router" |
226
246
  | 401 Unauthorized | "401 unauthorized authentication" |
@@ -230,7 +250,7 @@ Common symptom searches:
230
250
  | Mixed user/group error | "user group same component" |
231
251
  | Theme not applying | "theming css variables override" |
232
252
 
233
- The docs MCP returns the canonical fix. Apply it as a targeted patch.
253
+ The docs return the canonical fix. Apply it as a targeted patch.
234
254
 
235
255
  ### Step 6 — Propose the fix
236
256