@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
@@ -1,365 +1,290 @@
1
1
  ---
2
2
  name: cometchat-angular-theming
3
- description: "CometChatThemeService palette — color tokens, light/dark mode, typography, per-component style objects, and CSS variable overrides for the CometChat Angular UI Kit v4."
3
+ description: "CSS-variable theming for the CometChat Angular UI Kit v5 (@cometchat/chat-uikit-angular@5) the --cometchat-* token reference, brand color overrides, light/dark mode via CometChatUIKit.themeMode and the kit's ThemeService, global styles.css placement, and the ::ng-deep / ViewEncapsulation.None nuance Angular needs. NO theme service palette API (that was v4)."
4
4
  license: "MIT"
5
- compatibility: "Angular >=12 <=15; @cometchat/chat-uikit-angular ^4; @cometchat/chat-sdk-javascript ^4"
6
- allowed-tools: "shell, file-read, file-search, file-list, ask-user"
5
+ compatibility: "Angular >=17 <22 (standalone APIs); @cometchat/chat-uikit-angular ^5.0; @cometchat/chat-sdk-javascript ^4.1"
7
6
  metadata:
8
7
  author: "CometChat"
9
- version: "3.0.0"
10
- tags: "cometchat angular theming colors dark-mode typography palette css-variables"
8
+ version: "4.0.0"
9
+ tags: "cometchat angular theming css-variables dark-mode typography branding v5 themeMode"
11
10
  ---
12
11
 
13
12
  ## Purpose
14
13
 
15
- Teaches Claude how to theme the CometChat Angular UI Kit v4 via `CometChatThemeService` and per-component style objects. Covers palette tokens, light/dark mode switching, typography, per-component style classes, CSS variable overrides, and preset themes.
14
+ How to theme the CometChat **Angular UI Kit v5** (`@cometchat/chat-uikit-angular@5`). v5 theming is **CSS-custom-property based** — the same `--cometchat-*` token system the React kit uses. You override tokens in your global stylesheet; every `<cometchat-*>` component reads them through the cascade. There is **no programmatic palette API** in v5.
16
15
 
17
- **Read `cometchat-angular-core` first** — `CometChatThemeService` is injected in `AppComponent`'s constructor, which is covered there.
16
+ **Read `cometchat-angular-core` first** — install, init, login, standalone-component model.
18
17
 
19
- Ground truth: `docs/ui-kit/angular/theme`, `docs/ui-kit/angular/colors`, `docs/ui-kit/angular/component-styling`, and `@cometchat/chat-uikit-angular@4.x` style exports.
18
+ Ground truth: `@cometchat/chat-uikit-angular@5.0.2` bundled types + the kit's bundled CSS variables. The full token list (200+) is shared across the web kits — query the docs MCP or read the kit's bundled `css-variables.css` rather than inventing names. **Official docs:** https://www.cometchat.com/docs/ui-kit/angular/overview · **Docs MCP:** `claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp` (or fetch the URL directly without MCP).
20
19
 
21
20
  ---
22
21
 
23
- ## 0. Preset themes (quickest start)
22
+ ## 1. v4 v5: what changed
24
23
 
25
- Five built-in presets. Apply by setting these CSS variables in `src/styles.scss` after any existing imports:
24
+ | Area | v4 (legacy, NgModule, Angular 12–15) | v5 (this skill, standalone, Angular 17–21) |
25
+ |---|---|---|
26
+ | Theme mechanism | `CometChatThemeService` injected in `AppComponent` | **CSS variables** (`--cometchat-*`) in global styles |
27
+ | Brand color | `themeService.theme.palette.setPrimary({ light, dark })` | **`:root { --cometchat-primary-color: #...; }`** |
28
+ | Light/dark mode | `themeService.theme.palette.setMode("dark")` | **`CometChatUIKit.themeMode = 'dark'`** (static setter) or the kit's `ThemeService` |
29
+ | Per-component styling | `*Style` objects (`new ConversationsStyle({...})`) from `@cometchat/uikit-shared` | **CSS variables + scoped CSS overrides** (`::ng-deep` / `ViewEncapsulation.None`) |
30
+ | Token source package | `@cometchat/uikit-shared` | bundled in `@cometchat/chat-uikit-angular` |
26
31
 
27
- | Preset | `--cometchat-primary-color` | `--cometchat-font-family` | `--cometchat-background-color-01` | `--cometchat-text-color-primary` | Notes |
28
- |---|---|---|---|---|---|
29
- | `slack` | `#611f69` | `Lato, sans-serif` | `#ffffff` | `#1d1c1d` | |
30
- | `whatsapp` | `#25d366` | `'Segoe UI', Helvetica, sans-serif` | `#f0f2f5` | `#111b21` | |
31
- | `imessage` | `#007aff` | `-apple-system, 'SF Pro Text', sans-serif` | `#ffffff` | `#000000` | |
32
- | `discord` | `#5865f2` | `'gg sans', 'Noto Sans', Helvetica, sans-serif` | `#36393f` | `#dcddde` | Dark mode built-in |
33
- | `notion` | `#2eaadc` | `-apple-system, Helvetica, sans-serif` | `#ffffff` | `#37352f` | |
32
+ **Removed in v5 — do NOT emit (phantom symbols):** `CometChatThemeService`; `theme.palette.setMode()/setPrimary()/setAccent()`; the `*Style` constructors (`ConversationsStyle`, `MessageListStyle`, `AvatarStyle`, …) and their `@cometchat/uikit-shared` package. Translate `setPrimary({light,dark})` into a `:root` light token + a dark-scoped override (§4); translate each `*Style` field into the matching `--cometchat-*` variable or a scoped CSS rule (§7 Recipe 3).
34
33
 
35
- Example — apply the Slack preset:
34
+ ---
36
35
 
37
- ```scss
38
- /* src/styles.scss — after existing imports */
39
- :root {
40
- --cometchat-primary-color: #611f69;
41
- --cometchat-font-family: Lato, -apple-system, BlinkMacSystemFont, 'Segoe UI', sans-serif;
42
- --cometchat-background-color-01: #ffffff;
43
- --cometchat-text-color-primary: #1d1c1d;
44
- }
45
- ```
36
+ ## 2. How theming works in v5
46
37
 
47
- Also set the matching `CometChatThemeService` palette so the Angular DI layer stays in sync:
38
+ Every `<cometchat-*>` component reads `--cometchat-*` CSS variables at render time there is no color/font props API on the components.
48
39
 
49
- ```typescript
50
- // AppComponent constructor:
51
- themeService.theme.palette.setPrimary({ light: "#611f69", dark: "#611f69" });
52
40
  ```
41
+ your global styles.css :root { --cometchat-primary-color: #...; }
42
+ ↓ (CSS cascade)
43
+ every <cometchat-*> component picks up the value automatically
44
+ ```
45
+
46
+ **Precedence (high → low):** scoped CSS override (with `::ng-deep`/`ViewEncapsulation.None`) → `:root { --cometchat-* }` global override → kit default tokens.
53
47
 
54
48
  ---
55
49
 
56
- ## 1. How theming works in Angular
50
+ ## 3. Where to put overrides in Angular (the key nuance)
57
51
 
58
- The Angular UI Kit uses two mechanisms for theming:
52
+ ### Global tokens `src/styles.css` (the common case)
59
53
 
60
- 1. **`CometChatThemeService`** Angular DI service that controls the global palette (primary color, mode). Inject once in `AppComponent`.
61
- 2. **Per-component style objects** — typed style classes (`ConversationsStyle`, `MessageListStyle`, etc.) passed as `[*Style]` inputs to individual components.
54
+ `src/styles.{css,scss}` is **not** view-encapsulated, so `:root` overrides there cascade into every component including the kit. ~95% of theming lives here:
62
55
 
63
- ```
64
- CometChatThemeService (global palette)
65
-
66
- every <cometchat-*> component reads palette via the service
67
-
68
- component's default styles merge with palette + per-component style overrides
56
+ ```css
57
+ /* src/styles.css — app-wide */
58
+ :root {
59
+ --cometchat-primary-color: #6852D6;
60
+ --cometchat-font-family: "Inter", sans-serif;
61
+ }
69
62
  ```
70
63
 
71
- ### Style precedence (highest to lowest)
64
+ (Confirm it's listed in `angular.json` → `…architect.build.options.styles` — it is by default.)
72
65
 
73
- 1. **Per-component `[*Style]` input** wins always. Per-component tweak.
74
- 2. **`CometChatThemeService` palette** — app-wide primary color + mode.
75
- 3. **Default theme** — the UI Kit's built-in palette.
66
+ ### Component-scoped overrides need `::ng-deep` or `ViewEncapsulation.None`
76
67
 
77
- ---
78
-
79
- ## 2. CometChatThemeService — global palette
68
+ > **Angular gotcha (#1 reason a CometChat override "does nothing"):** the kit renders **inside your component's view**, and Angular's default `ViewEncapsulation.Emulated` rewrites a component's CSS with a per-component attribute. A plain rule in `chat.component.css` only matches elements carrying that attribute — the kit's nested DOM does not — so the rule silently fails.
80
69
 
81
- Inject in `AppComponent`'s constructor (not `ngOnInit` the palette must be set before any component renders):
70
+ **Option A `::ng-deep`** (scoped, keeps default encapsulation):
82
71
 
83
- ```typescript
84
- import { Component } from "@angular/core";
85
- import { CometChatThemeService } from "@cometchat/chat-uikit-angular";
86
-
87
- @Component({ selector: "app-root", templateUrl: "./app.component.html" })
88
- export class AppComponent {
89
- constructor(private themeService: CometChatThemeService) {
90
- // Set mode
91
- themeService.theme.palette.setMode("light"); // "light" | "dark"
92
-
93
- // Set primary brand color (light + dark variants)
94
- themeService.theme.palette.setPrimary({ light: "#6851D6", dark: "#6851D6" });
95
-
96
- // Optional: set accent color
97
- themeService.theme.palette.setAccent({ light: "#F76808", dark: "#FF8A3D" });
98
- }
72
+ ```css
73
+ /* chat.component.css */
74
+ :host ::ng-deep {
75
+ --cometchat-primary-color: #FF6B35;
76
+ --cometchat-background-color-01: #ffffff;
99
77
  }
100
78
  ```
101
79
 
102
- ### Dynamic mode switching
80
+ **Option B `ViewEncapsulation.None`** (component CSS becomes global while mounted):
103
81
 
104
82
  ```typescript
105
- @Component({ /* ... */ })
106
- export class AppComponent {
107
- constructor(private themeService: CometChatThemeService) {}
108
-
109
- toggleDarkMode(isDark: boolean): void {
110
- this.themeService.theme.palette.setMode(isDark ? "dark" : "light");
111
- }
112
- }
83
+ @Component({
84
+ selector: "app-chat",
85
+ standalone: true,
86
+ styleUrls: ["./chat.component.css"],
87
+ encapsulation: ViewEncapsulation.None,
88
+ })
89
+ export class ChatComponent {}
113
90
  ```
114
91
 
115
- The palette change propagates to all rendered CometChat components immediately no page reload needed.
92
+ **Recommendation:** use global `src/styles.css` for brand/app-wide theming (no encapsulation issue). Reach for `::ng-deep` / `ViewEncapsulation.None` only when you need *different* CometChat theming in *different* parts of the app.
116
93
 
117
94
  ---
118
95
 
119
- ## 3. Color tokens
96
+ ## 4. Light / dark mode
120
97
 
121
- ### Primary (brand accent)
98
+ ### 4a. `CometChatUIKit.themeMode` — the kit's switch
122
99
 
123
- | Method | Controls |
124
- |---|---|
125
- | `setPrimary({ light, dark })` | Outgoing message bubbles, send button, active tabs, buttons |
126
- | `setAccent({ light, dark })` | Secondary accent — links, highlights |
127
-
128
- Both methods take `{ light: "#hex", dark: "#hex" }`. Always provide both variants.
129
-
130
- ### Mode
131
-
132
- | Mode | Effect |
133
- |---|---|
134
- | `"light"` | Light backgrounds, dark text |
135
- | `"dark"` | Dark backgrounds, light text |
136
-
137
- ### Palette methods reference
100
+ Static setter (verified in v5 `.d.ts`: `static set themeMode(value: 'light' | 'dark')`):
138
101
 
139
102
  ```typescript
140
- themeService.theme.palette.setMode("light" | "dark");
141
- themeService.theme.palette.setPrimary({ light: "#hex", dark: "#hex" });
142
- themeService.theme.palette.setAccent({ light: "#hex", dark: "#hex" });
143
- themeService.theme.palette.setBackground({ light: "#hex", dark: "#hex" });
144
- themeService.theme.palette.setSecondary({ light: "#hex", dark: "#hex" });
103
+ import { CometChatUIKit } from "@cometchat/chat-uikit-angular";
104
+ CometChatUIKit.themeMode = "dark"; // 'light' | 'dark'
145
105
  ```
146
106
 
147
- ---
107
+ ### 4b. `ThemeService` — Angular-idiomatic toggle (optional)
148
108
 
149
- ## 4. Per-component style objects
109
+ The kit exports an injectable `ThemeService` (`providedIn: 'root'`, from `@cometchat/chat-uikit-angular`) that on construction reads OS `prefers-color-scheme`, applies a `data-theme` attribute on `<html>` (SSR-safe via the `DOCUMENT` token), follows live OS changes, and exposes a `currentTheme` signal (`'light' | 'dark'`). API: `currentTheme()`, `setTheme('light' | 'dark')`, `toggleTheme()`, `initFromPreference()`. It is a **mode toggle only** (no colors/palette).
150
110
 
151
- Each component accepts a typed style object. Import from `@cometchat/uikit-shared`:
111
+ > **Two gotchas, verified against the v5.0.2 source:**
112
+ > 1. **It does NOT persist to `localStorage`.** The kit's own JSDoc claims it does, but `applyTheme()` only sets the signal + the `<html>` `data-theme` attribute — there is no `localStorage` write. If you need persistence across reloads, wrap it (read/write `localStorage` yourself).
113
+ > 2. **It does NOT touch `CometChatUIKit.themeMode`.** Toggling `ThemeService` flips `<html data-theme>` (which your CSS overrides key off, §4c) but leaves the SDK-level `themeMode` (§4a) on its default. The kit's sample app bridges this with a thin wrapper that mirrors the signal into the SDK setter via an `effect` (see §4d).
152
114
 
153
115
  ```typescript
154
- import {
155
- ConversationsStyle,
156
- MessagesStyle,
157
- MessageListStyle,
158
- MessageComposerStyle,
159
- MessageHeaderStyle,
160
- UsersStyle,
161
- GroupsStyle,
162
- AvatarStyle,
163
- BadgeStyle,
164
- StatusIndicatorStyle,
165
- ListItemStyle,
166
- DateStyle,
167
- BackdropStyle,
168
- ConfirmDialogStyle,
169
- LoaderStyle,
170
- } from "@cometchat/uikit-shared";
171
- ```
116
+ import { Component, inject } from "@angular/core";
117
+ import { ThemeService } from "@cometchat/chat-uikit-angular";
172
118
 
173
- ### ConversationsStyle
174
-
175
- ```typescript
176
- conversationsStyle = new ConversationsStyle({
177
- width: "100%",
178
- height: "100%",
179
- border: "1px solid #e8e8e8",
180
- borderRadius: "8px",
181
- background: "#ffffff",
182
- titleTextFont: "600 18px Inter, sans-serif",
183
- titleTextColor: "#141414",
184
- lastMessageTextFont: "400 14px Inter, sans-serif",
185
- lastMessageTextColor: "#727272",
186
- typingIndictorTextColor: "#6851D6",
187
- onlineStatusColor: "#09C26F",
188
- privateGroupIconBackground: "#F76808",
189
- passwordGroupIconBackground: "#FFAB00",
190
- });
119
+ @Component({
120
+ selector: "app-root", standalone: true,
121
+ template: `<button (click)="toggle()">{{ themeService.currentTheme() === 'dark' ? 'Light' : 'Dark' }} mode</button>`,
122
+ })
123
+ export class AppComponent {
124
+ themeService = inject(ThemeService);
125
+ constructor() { this.themeService.initFromPreference(); }
126
+ toggle() { this.themeService.toggleTheme(); } // or setTheme('dark' | 'light')
127
+ }
191
128
  ```
192
129
 
193
- ```html
194
- <cometchat-conversations [conversationsStyle]="conversationsStyle"></cometchat-conversations>
195
- ```
130
+ ### 4d. Keep `themeMode` in sync (the sample-app pattern)
196
131
 
197
- ### MessageListStyle
132
+ If you want the kit's `ThemeService` toggle (§4b) AND the SDK-level `CometChatUIKit.themeMode` (§4a) to stay aligned, wrap the kit service and mirror its signal — this is exactly what the v5 sample app does:
198
133
 
199
134
  ```typescript
200
- messageListStyle = new MessageListStyle({
201
- width: "100%",
202
- height: "100%",
203
- background: "#fafafa",
204
- border: "none",
205
- // Bubble colors
206
- sendBubbleBackground: "#6851D6",
207
- sendBubbleTextColor: "#ffffff",
208
- sendBubbleTextFont: "400 15px Inter, sans-serif",
209
- receiveBubbleBackground: "#f0f0f0",
210
- receiveBubbleTextColor: "#141414",
211
- receiveBubbleTextFont: "400 15px Inter, sans-serif",
212
- });
135
+ import { Injectable, inject, effect } from "@angular/core";
136
+ import { ThemeService as UIKitThemeService, CometChatUIKit } from "@cometchat/chat-uikit-angular";
137
+
138
+ @Injectable({ providedIn: "root" })
139
+ export class AppThemeService {
140
+ private uiKitTheme = inject(UIKitThemeService);
141
+ readonly currentTheme = this.uiKitTheme.currentTheme; // re-expose for templates
142
+ private sync = effect(() => { CometChatUIKit.themeMode = this.uiKitTheme.currentTheme(); },
143
+ { allowSignalWrites: true });
144
+ setTheme(t: "light" | "dark") { this.uiKitTheme.setTheme(t); }
145
+ toggleTheme() { this.uiKitTheme.toggleTheme(); }
146
+ }
213
147
  ```
148
+ Inject `AppThemeService` (not the kit one directly) so the SDK-sync side-effect always fires.
214
149
 
215
- ### MessageComposerStyle
150
+ ### 4c. Your own dark token overrides (CSS)
216
151
 
217
- ```typescript
218
- messageComposerStyle = new MessageComposerStyle({
219
- width: "100%",
220
- background: "#ffffff",
221
- border: "1px solid #e8e8e8",
222
- borderRadius: "0",
223
- inputBackground: "#f5f5f5",
224
- inputBorder: "none",
225
- inputBorderRadius: "8px",
226
- textFont: "400 15px Inter, sans-serif",
227
- textColor: "#141414",
228
- placeHolderTextColor: "#a1a1a1",
229
- sendIconTint: "#6851D6",
230
- attachmentIconTint: "#727272",
231
- });
152
+ **OS-driven:**
153
+ ```css
154
+ @media (prefers-color-scheme: dark) {
155
+ :root {
156
+ --cometchat-primary-color: #A594F3;
157
+ --cometchat-background-color-01: #1A1A2E;
158
+ --cometchat-text-color-primary: #E0E0E0;
159
+ }
160
+ }
232
161
  ```
233
162
 
234
- ### AvatarStyle
235
-
236
- ```typescript
237
- avatarStyle = new AvatarStyle({
238
- width: "40px",
239
- height: "40px",
240
- border: "none",
241
- borderRadius: "50%",
242
- backgroundColor: "#6851D6",
243
- nameTextColor: "#ffffff",
244
- nameTextFont: "600 16px Inter, sans-serif",
245
- backgroundSize: "cover",
246
- });
163
+ **App-controlled** (scope to whatever `ThemeService`/your toggle writes on `<html>`, e.g. `data-theme="dark"`):
164
+ ```css
165
+ [data-theme="dark"] {
166
+ --cometchat-primary-color: #A594F3;
167
+ --cometchat-background-color-01: #1A1A2E;
168
+ --cometchat-text-color-primary: #E0E0E0;
169
+ }
247
170
  ```
248
171
 
249
- ### BadgeStyle
250
-
251
- ```typescript
252
- badgeStyle = new BadgeStyle({
253
- background: "#6851D6",
254
- textColor: "#ffffff",
255
- textFont: "600 11px Inter, sans-serif",
256
- border: "none",
257
- borderRadius: "10px",
258
- width: "20px",
259
- height: "20px",
260
- });
261
- ```
172
+ Don't ship both OS-driven and app-toggle dark overrides unless the user explicitly wants the hybrid.
262
173
 
263
174
  ---
264
175
 
265
- ## 5. Common theming recipes
266
-
267
- ### Match a brand color (most common)
176
+ ## 5. The `--cometchat-*` token reference
268
177
 
269
- ```typescript
270
- // In AppComponent constructor:
271
- themeService.theme.palette.setPrimary({ light: "#FF6B35", dark: "#FF8F66" });
272
- ```
178
+ Shared web-kit tokens (same names as the React kit). Set in `src/styles.css`. **Do not invent names** — query the docs MCP or read the kit's bundled `css-variables.css`.
273
179
 
274
- This single call changes the outgoing message bubble color, send button, active tab indicator, and every primary accent in the UI.
180
+ | Variable | Controls |
181
+ |---|---|
182
+ | `--cometchat-primary-color` | Outgoing bubble, primary buttons, active tab, accents |
183
+ | `--cometchat-primary-color-hover` | Hover of primary elements |
184
+ | `--cometchat-text-color-primary` | Main body text |
185
+ | `--cometchat-text-color-secondary` | Timestamps, muted labels |
186
+ | `--cometchat-text-color-tertiary` | Placeholders |
187
+ | `--cometchat-background-color-01` | Main app background |
188
+ | `--cometchat-background-color-02` | Panels (list, details sidebar) |
189
+ | `--cometchat-background-color-03` | Hover / selected states |
190
+ | `--cometchat-icon-color-primary` / `-secondary` | Icon tints |
191
+ | `--cometchat-border-color-default` / `-light` | Borders, dividers |
192
+ | `--cometchat-font-family` | All text |
193
+ | `--cometchat-radius-1` / `-2` / `-3` / `-max` | Corner radii (`-max` = `999px` circular) |
194
+
195
+ **Palette scales** (the real brand-swap surface — verified present in the Angular kit): `--cometchat-neutral-color-50` … `-900` (greys: surfaces, borders, disabled; **`-300`** is the incoming message-bubble body) and `--cometchat-extended-primary-color-50` … `-900` (the brand-color tints/shades the kit derives for hovers, badges, selected states — set these alongside `--cometchat-primary-color` for a full re-skin). Plus semantic `--cometchat-error-color` / `-info-color` / `-success-color` / `-warning-color`.
196
+
197
+ For the full 200+ list, query the docs MCP (§9).
275
198
 
276
- ### Dark mode + custom brand
199
+ ---
277
200
 
278
- ```typescript
279
- themeService.theme.palette.setMode("dark");
280
- themeService.theme.palette.setPrimary({ light: "#6851D6", dark: "#A594F3" });
281
- themeService.theme.palette.setBackground({ light: "#ffffff", dark: "#1a1a1a" });
282
- ```
201
+ ## 6. Preset themes
283
202
 
284
- ### Custom message bubble colors
203
+ Write the values into `src/styles.css` as a `:root` block.
285
204
 
286
- ```typescript
287
- messageListStyle = new MessageListStyle({
288
- sendBubbleBackground: "#FF6B35",
289
- sendBubbleTextColor: "#ffffff",
290
- receiveBubbleBackground: "#f0f0f0",
291
- receiveBubbleTextColor: "#1a1a1a",
292
- });
293
- ```
205
+ | Preset | primary-color | text-color-primary | background-color-01 | font-family | radius-2 |
206
+ |---|---|---|---|---|---|
207
+ | `slack` | `#611f69` | `#1d1c1d` | `#ffffff` | `Lato, sans-serif` | `8px` |
208
+ | `whatsapp` | `#25d366` | `#111b21` | `#f0f2f5` | `'Segoe UI', sans-serif` | `12px` |
209
+ | `imessage` | `#007aff` | `#000000` | `#ffffff` | `-apple-system, sans-serif` | `18px` |
210
+ | `discord` (dark) | `#5865f2` | `#dcddde` | `#36393f` | `'gg sans', sans-serif` | `8px` |
211
+ | `notion` | `#2eaadc` | `#37352f` | `#ffffff` | `-apple-system, sans-serif` | `6px` |
294
212
 
295
- ### Custom font across the whole UI
213
+ ---
296
214
 
297
- The Angular UI Kit reads font from CSS. Override via global styles:
215
+ ## 7. Recipes
298
216
 
217
+ **Recipe 1 — brand color (most common):**
299
218
  ```css
300
- /* styles.css (global) */
301
- :root {
302
- --cometchat-font-family: "Inter", sans-serif;
303
- }
219
+ :root { --cometchat-primary-color: #FF6B35; --cometchat-primary-color-hover: #E85D2C; }
304
220
  ```
221
+ One token recolors the outgoing bubble, send button, active tab, and every primary accent.
305
222
 
306
- Or pass `textFont` / `titleTextFont` in each component's style object.
223
+ **Recipe 2 — brand + dark toggle:** wire `ThemeService` (§4b — optionally the `themeMode`-syncing wrapper in §4d) + `:root` light tokens + `[data-theme="dark"]` overrides (§4c). The toggle flips `<html data-theme>`; your `[data-theme="dark"]` block recolors the kit.
307
224
 
308
- ---
225
+ **Recipe 3 — custom bubble colors** (class-level, not tokens; needs `::ng-deep`; class names aren't version-stable — verify in DevTools). Prefer overriding the bubble's CSS *variable* inside the `__body` selector over a raw `background` (keeps the rest of the bubble styling intact; incoming bubbles read `--cometchat-neutral-color-300`):
226
+ ```css
227
+ /* outgoing — override the var the body reads */
228
+ :host ::ng-deep .cometchat-message-bubble-outgoing .cometchat-message-bubble__body { --cometchat-primary-color: #FF6B35; }
229
+ /* incoming — neutral-300 is the incoming body token */
230
+ :host ::ng-deep .cometchat-message-bubble-incoming .cometchat-message-bubble__body { --cometchat-neutral-color-300: #E8E8E8; }
231
+ ```
232
+ **Per-message-TYPE bubbles** (style one type only — chain the type class onto `__body`). The Angular kit spells these correctly (unlike the React kit): `__text-message`, `__image-message`, `__video-message`, `__audio-message`, `__file-message`, `__document-message`, `__poll-message`, `__sticker-message`, `__meeting-message`, `__whiteboard-message`, `__delete-message`, `__group-message`; plus the non-directional `.cometchat-action-bubble`.
233
+ ```css
234
+ :host ::ng-deep .cometchat-message-bubble-outgoing .cometchat-message-bubble__body.cometchat-message-bubble__text-message { border-radius: 16px 16px 4px 16px; }
235
+ ```
309
236
 
310
- ## 6. CSS variable overrides
237
+ **Recipe 4 custom font:** `:root { --cometchat-font-family: "Inter", sans-serif; }`
311
238
 
312
- The Angular UI Kit exposes CSS custom properties for fine-grained control. Override in `styles.css` (global):
239
+ **Recipe 5 rounded corners:** `:root { --cometchat-radius-2: 12px; --cometchat-radius-max: 999px; }`
313
240
 
314
- ```css
315
- /* styles.css */
316
- :root {
317
- /* Primary color */
318
- --cometchat-primary-color: #6851D6;
241
+ ---
319
242
 
320
- /* Background colors */
321
- --cometchat-background-color-01: #ffffff;
322
- --cometchat-background-color-02: #fafafa;
323
- --cometchat-background-color-03: #f5f5f5;
243
+ ## Localization
324
244
 
325
- /* Text colors */
326
- --cometchat-text-color-primary: #141414;
327
- --cometchat-text-color-secondary: #727272;
328
- --cometchat-text-color-tertiary: #a1a1a1;
245
+ To translate the UI, switch the active language, or override individual strings, route to the dedicated **`cometchat-i18n`** skill — the canonical cross-family localization reference. Angular v5 uses `CometChatLocalize.init({ language })` + `setCurrentLanguage(...)` / `getLocalizedString(key)` / `addTranslation({...})` (the object signature, **not** the v4 positional `init("es")` form). `cometchat-i18n` covers bundled languages, custom strings, RTL, and date/time formatting.
329
246
 
330
- /* Border */
331
- --cometchat-border-color-default: #e8e8e8;
247
+ ## Sound Manager — custom notification & call sounds
332
248
 
333
- /* Font */
334
- --cometchat-font-family: "Inter", sans-serif;
335
- }
336
- ```
249
+ Sounds are a **behavioral** customization (not CSS) — driven by `CometChatSoundManager`, 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. `Sound` is a frozen object ON the class (`CometChatSoundManager.Sound`), not a separate export. (Docs: ui-kit/angular/sound-manager.)
337
250
 
338
- CSS variable overrides apply globally and take effect immediately. Use them for app-wide changes that the `CometChatThemeService` palette methods don't cover.
251
+ ```typescript
252
+ import { CometChatSoundManager } from "@cometchat/chat-uikit-angular";
339
253
 
340
- ---
254
+ // Play a default cue — keys: incomingCall | outgoingCall | incomingMessage
255
+ // | incomingMessageFromOther | outgoingMessage
256
+ CometChatSoundManager.play(CometChatSoundManager.Sound.incomingCall);
341
257
 
342
- ## 7. Anti-patterns
258
+ // Override a cue with your own audio (2nd arg = custom URL/asset path)
259
+ CometChatSoundManager.play(CometChatSoundManager.Sound.incomingMessage, 'assets/sounds/ping.mp3');
343
260
 
344
- 1. **Do NOT call `themeService.theme.palette.setMode()` in `ngOnInit`.** Call it in the constructor — the palette must be set before any CometChat component renders. `ngOnInit` runs after the first change detection cycle, which may be too late.
261
+ // Per-event helpers (call versions loop until pause); then stop:
262
+ CometChatSoundManager.onIncomingCall();
263
+ CometChatSoundManager.pause();
264
+ ```
345
265
 
346
- 2. **Do NOT mix `CometChatThemeService` and per-component `[*Style]` for the same property.** The per-component style wins — the service override becomes dead code. Pick one: service for app-wide, `[*Style]` for one-offs.
266
+ ## 8. Anti-patterns
347
267
 
348
- 3. **Do NOT use non-hex colors in style objects.** Some style properties expect hex strings. `rgb()` / named colors / `hsl()` may not work in all style properties.
268
+ 1. **Don't use `CometChatThemeService`** phantom in v5. Theme via CSS variables + `CometChatUIKit.themeMode` / `ThemeService`.
269
+ 2. **Don't call `theme.palette.setMode()/setPrimary()`** — phantom v4 APIs.
270
+ 3. **Don't construct `*Style` objects** (`new ConversationsStyle({...})`, etc.) — pattern + `@cometchat/uikit-shared` gone in v5. Use CSS variables / scoped CSS.
271
+ 4. **Don't put component-scoped overrides in encapsulated component CSS and expect them to hit the kit** — use global `styles.css`, `:host ::ng-deep`, or `ViewEncapsulation.None` (§3).
272
+ 5. **Don't invent `--cometchat-*` names** — a misspelled token silently does nothing.
273
+ 6. **Don't rely on memorized kit CSS class names** for component-level overrides (Recipe 3) — verify in DevTools per version.
274
+ 7. **Don't edit `node_modules`** — override in your own stylesheet so it survives reinstalls.
349
275
 
350
- 4. **Do NOT wrap `CometChatThemeService` injection in a lazy-loaded module.** The service is a singleton — inject it at the root level (`AppComponent`) so the palette is set before any component renders.
276
+ ---
351
277
 
352
- 5. **Do NOT forget to provide both `light` and `dark` variants** when calling `setPrimary()` or `setAccent()`. Providing only one variant leaves the other as the default, which may not match your brand in dark mode.
278
+ ## 9. Docs MCP (recommended)
353
279
 
354
- ---
280
+ ```bash
281
+ claude mcp add --transport http cometchat-docs https://www.cometchat.com/docs/mcp
282
+ ```
355
283
 
356
- ## Skill routing reference
284
+ For the full 200+ token list + component CSS selectors. Per-version exact tokens ship in `node_modules/@cometchat/chat-uikit-angular/styles/css-variables.css` (verified v5.0.2: tokens live under a `:root` block, with the kit's own dark overrides under `[data-theme="dark"]`). `CometChatUIKit.themeMode` (static get/set), `ThemeService`, and `CometChatSoundManager` are all confirmed in the bundled `.d.ts`.
357
285
 
358
- | Skill | When to route |
359
- |---|---|
360
- | `cometchat-angular-core` | Init, login, module setup — always first |
361
- | `cometchat-angular-components` | Per-component `[*Style]` prop reference |
362
- | `cometchat-angular-placement` | Where to put chat |
363
- | `cometchat-angular-theming` | This skill — palette, dark mode, typography |
364
- | `cometchat-angular-customization` | Custom slot views, formatters |
365
- | `cometchat-angular-troubleshooting` | Colors not applying, dark mode not switching |
286
+ ## Skill routing
287
+ - `cometchat-angular-core` — init/login/standalone
288
+ - `cometchat-angular-components` selectors, inputs/outputs, slots
289
+ - `cometchat-angular-customization` slot views, formatters, templates, events
290
+ - `cometchat-angular-troubleshooting` colors not applying / encapsulation issues