@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.
- package/LICENSE +21 -0
- package/bin/install.js +27 -0
- package/package.json +14 -1
- package/skills/cometchat/SKILL.md +233 -69
- package/skills/cometchat/references/asking-questions.md +48 -0
- package/skills/cometchat-a11y/SKILL.md +3 -2
- package/skills/cometchat-android-v5/SKILL.md +2 -1
- package/skills/cometchat-android-v5-calls/SKILL.md +36 -22
- package/skills/cometchat-android-v5-calls/references/README.md +1 -1
- package/skills/cometchat-android-v5-calls/references/add-calls-to-existing-chat.md +7 -5
- package/skills/cometchat-android-v5-calls/references/audio-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/call-layouts.md +33 -25
- package/skills/cometchat-android-v5-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v5-calls/references/custom-ui.md +5 -5
- package/skills/cometchat-android-v5-calls/references/event-listeners.md +2 -2
- package/skills/cometchat-android-v5-calls/references/idle-timeout.md +20 -14
- package/skills/cometchat-android-v5-calls/references/in-call-chat.md +1 -1
- package/skills/cometchat-android-v5-calls/references/migration-v4-to-v5.md +43 -27
- package/skills/cometchat-android-v5-calls/references/participant-management.md +3 -3
- package/skills/cometchat-android-v5-calls/references/raise-hand.md +25 -19
- package/skills/cometchat-android-v5-calls/references/recording.md +2 -2
- package/skills/cometchat-android-v5-calls/references/ringing-integration.md +1 -1
- package/skills/cometchat-android-v5-calls/references/screen-sharing.md +5 -9
- package/skills/cometchat-android-v5-calls/references/session-settings.md +3 -3
- package/skills/cometchat-android-v5-calls/references/setup.md +1 -1
- package/skills/cometchat-android-v5-calls/references/share-invite.md +9 -4
- package/skills/cometchat-android-v5-calls/references/video-controls.md +4 -4
- package/skills/cometchat-android-v5-calls/references/voip-calling.md +2 -2
- package/skills/cometchat-android-v5-components/SKILL.md +4 -3
- package/skills/cometchat-android-v5-core/SKILL.md +5 -3
- package/skills/cometchat-android-v5-customization/SKILL.md +171 -7
- package/skills/cometchat-android-v5-extensions/SKILL.md +7 -4
- package/skills/cometchat-android-v5-features/SKILL.md +5 -4
- package/skills/cometchat-android-v5-placement/SKILL.md +2 -1
- package/skills/cometchat-android-v5-production/SKILL.md +2 -1
- package/skills/cometchat-android-v5-push/SKILL.md +2 -3
- package/skills/cometchat-android-v5-testing/SKILL.md +2 -1
- package/skills/cometchat-android-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-android-v5-troubleshooting/SKILL.md +3 -2
- package/skills/cometchat-android-v6/SKILL.md +2 -1
- package/skills/cometchat-android-v6-builder-settings/SKILL.md +11 -7
- package/skills/cometchat-android-v6-calls/SKILL.md +79 -18
- package/skills/cometchat-android-v6-calls/references/advanced-features.md +87 -0
- package/skills/cometchat-android-v6-calls/references/call-layouts.md +24 -15
- package/skills/cometchat-android-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-android-v6-calls/references/device-management.md +17 -16
- package/skills/cometchat-android-v6-calls/references/idle-timeout.md +7 -4
- package/skills/cometchat-android-v6-calls/references/in-call-chat.md +13 -8
- package/skills/cometchat-android-v6-calls/references/raise-hand.md +6 -4
- package/skills/cometchat-android-v6-compose-components/SKILL.md +52 -29
- package/skills/cometchat-android-v6-compose-customization/SKILL.md +156 -1
- package/skills/cometchat-android-v6-compose-placement/SKILL.md +129 -40
- package/skills/cometchat-android-v6-compose-theming/SKILL.md +27 -1
- package/skills/cometchat-android-v6-core/SKILL.md +208 -28
- package/skills/cometchat-android-v6-events/SKILL.md +4 -1
- package/skills/cometchat-android-v6-extensions/SKILL.md +2 -1
- package/skills/cometchat-android-v6-features/SKILL.md +26 -2
- package/skills/cometchat-android-v6-kotlin-components/SKILL.md +31 -1
- package/skills/cometchat-android-v6-kotlin-customization/SKILL.md +172 -1
- package/skills/cometchat-android-v6-kotlin-placement/SKILL.md +20 -5
- package/skills/cometchat-android-v6-kotlin-theming/SKILL.md +36 -5
- package/skills/cometchat-android-v6-migration/SKILL.md +44 -42
- package/skills/cometchat-android-v6-production/SKILL.md +6 -3
- package/skills/cometchat-android-v6-push/SKILL.md +43 -2
- package/skills/cometchat-android-v6-testing/SKILL.md +11 -8
- package/skills/cometchat-android-v6-troubleshooting/SKILL.md +26 -5
- package/skills/cometchat-angular-calls/SKILL.md +256 -389
- package/skills/cometchat-angular-calls/references/add-calls-to-existing-chat.md +3 -2
- package/skills/cometchat-angular-calls/references/call-layouts.md +29 -12
- package/skills/cometchat-angular-calls/references/call-session.md +2 -2
- package/skills/cometchat-angular-calls/references/custom-ui.md +18 -10
- package/skills/cometchat-angular-calls/references/device-management.md +53 -34
- package/skills/cometchat-angular-calls/references/group-calls.md +45 -24
- package/skills/cometchat-angular-calls/references/idle-timeout.md +31 -15
- package/skills/cometchat-angular-calls/references/ngzone-and-async-callbacks.md +7 -6
- package/skills/cometchat-angular-calls/references/raise-hand.md +9 -4
- package/skills/cometchat-angular-calls/references/recording-screen-share.md +32 -39
- package/skills/cometchat-angular-calls/references/ringing-integration.md +3 -1
- package/skills/cometchat-angular-calls/references/share-invite.md +11 -5
- package/skills/cometchat-angular-calls/references/virtual-background.md +29 -0
- package/skills/cometchat-angular-components/SKILL.md +149 -620
- package/skills/cometchat-angular-core/SKILL.md +232 -312
- package/skills/cometchat-angular-customization/SKILL.md +415 -223
- package/skills/cometchat-angular-features/SKILL.md +216 -334
- package/skills/cometchat-angular-patterns/SKILL.md +168 -359
- package/skills/cometchat-angular-placement/SKILL.md +189 -560
- package/skills/cometchat-angular-production/SKILL.md +241 -92
- package/skills/cometchat-angular-push/SKILL.md +280 -294
- package/skills/cometchat-angular-testing/SKILL.md +430 -158
- package/skills/cometchat-angular-theming/SKILL.md +190 -265
- package/skills/cometchat-angular-troubleshooting/SKILL.md +192 -157
- package/skills/cometchat-astro-patterns/SKILL.md +3 -2
- package/skills/cometchat-calls/SKILL.md +25 -19
- package/skills/cometchat-calls/references/use-case-broadcast.md +15 -10
- package/skills/cometchat-calls/references/use-case-marketplace.md +2 -3
- package/skills/cometchat-calls/references/use-case-support.md +3 -4
- package/skills/cometchat-calls/references/use-case-team.md +23 -12
- package/skills/cometchat-calls/references/use-case-telehealth.md +3 -4
- package/skills/cometchat-components/SKILL.md +163 -25
- package/skills/cometchat-core/SKILL.md +258 -20
- package/skills/cometchat-customization/SKILL.md +50 -25
- package/skills/cometchat-features/SKILL.md +314 -35
- package/skills/cometchat-flutter-v5/SKILL.md +10 -4
- package/skills/cometchat-flutter-v5-calls/SKILL.md +188 -158
- package/skills/cometchat-flutter-v5-calls/references/add-calls-to-existing-chat.md +48 -24
- package/skills/cometchat-flutter-v5-calls/references/call-layouts.md +20 -15
- package/skills/cometchat-flutter-v5-calls/references/call-session.md +100 -145
- package/skills/cometchat-flutter-v5-calls/references/device-management.md +12 -8
- package/skills/cometchat-flutter-v5-calls/references/group-calls.md +30 -36
- package/skills/cometchat-flutter-v5-calls/references/idle-timeout.md +15 -13
- package/skills/cometchat-flutter-v5-calls/references/in-call-chat.md +12 -9
- package/skills/cometchat-flutter-v5-calls/references/migration-v4-to-v5.md +115 -65
- package/skills/cometchat-flutter-v5-calls/references/raise-hand.md +41 -30
- package/skills/cometchat-flutter-v5-calls/references/ringing-integration.md +17 -14
- package/skills/cometchat-flutter-v5-calls/references/share-invite.md +8 -2
- package/skills/cometchat-flutter-v5-conversations/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-core/SKILL.md +5 -4
- package/skills/cometchat-flutter-v5-customization/SKILL.md +136 -5
- package/skills/cometchat-flutter-v5-events/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-messages/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-production/SKILL.md +15 -6
- package/skills/cometchat-flutter-v5-push/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-testing/SKILL.md +17 -6
- package/skills/cometchat-flutter-v5-theming/SKILL.md +2 -1
- package/skills/cometchat-flutter-v5-troubleshooting/SKILL.md +7 -6
- package/skills/cometchat-flutter-v5-users-groups/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6/SKILL.md +17 -16
- package/skills/cometchat-flutter-v6-calls/SKILL.md +72 -57
- package/skills/cometchat-flutter-v6-calls/references/add-calls-to-existing-chat.md +5 -3
- package/skills/cometchat-flutter-v6-calls/references/advanced-features.md +89 -0
- package/skills/cometchat-flutter-v6-calls/references/call-layouts.md +15 -12
- package/skills/cometchat-flutter-v6-calls/references/call-session.md +2 -2
- package/skills/cometchat-flutter-v6-calls/references/device-management.md +9 -3
- package/skills/cometchat-flutter-v6-calls/references/group-calls.md +10 -10
- package/skills/cometchat-flutter-v6-calls/references/idle-timeout.md +15 -7
- package/skills/cometchat-flutter-v6-calls/references/in-call-chat.md +6 -3
- package/skills/cometchat-flutter-v6-calls/references/raise-hand.md +23 -16
- package/skills/cometchat-flutter-v6-components/SKILL.md +32 -11
- package/skills/cometchat-flutter-v6-conversations/SKILL.md +39 -11
- package/skills/cometchat-flutter-v6-core/SKILL.md +182 -21
- package/skills/cometchat-flutter-v6-customization/SKILL.md +97 -25
- package/skills/cometchat-flutter-v6-events/SKILL.md +3 -2
- package/skills/cometchat-flutter-v6-features/SKILL.md +15 -6
- package/skills/cometchat-flutter-v6-messages/SKILL.md +111 -60
- package/skills/cometchat-flutter-v6-migration/SKILL.md +18 -25
- package/skills/cometchat-flutter-v6-placement/SKILL.md +79 -50
- package/skills/cometchat-flutter-v6-production/SKILL.md +13 -12
- package/skills/cometchat-flutter-v6-push/SKILL.md +41 -19
- package/skills/cometchat-flutter-v6-testing/SKILL.md +4 -4
- package/skills/cometchat-flutter-v6-theming/SKILL.md +38 -5
- package/skills/cometchat-flutter-v6-troubleshooting/SKILL.md +182 -17
- package/skills/cometchat-flutter-v6-users-groups/SKILL.md +12 -4
- package/skills/cometchat-i18n/SKILL.md +140 -79
- package/skills/cometchat-ios/SKILL.md +4 -2
- package/skills/cometchat-ios-calls/SKILL.md +225 -95
- package/skills/cometchat-ios-calls/references/add-calls-to-existing-chat.md +11 -9
- package/skills/cometchat-ios-calls/references/audio-modes-and-controls.md +45 -0
- package/skills/cometchat-ios-calls/references/avaudiosession-routing.md +6 -7
- package/skills/cometchat-ios-calls/references/call-layouts.md +31 -91
- package/skills/cometchat-ios-calls/references/call-session.md +51 -54
- package/skills/cometchat-ios-calls/references/callkit-and-pushkit.md +33 -29
- package/skills/cometchat-ios-calls/references/custom-ui.md +38 -38
- package/skills/cometchat-ios-calls/references/group-calls.md +33 -70
- package/skills/cometchat-ios-calls/references/idle-timeout.md +24 -25
- package/skills/cometchat-ios-calls/references/in-call-chat.md +19 -23
- package/skills/cometchat-ios-calls/references/migration-v4-to-v5.md +128 -70
- package/skills/cometchat-ios-calls/references/picture-in-picture.md +20 -20
- package/skills/cometchat-ios-calls/references/raise-hand.md +14 -227
- package/skills/cometchat-ios-calls/references/recording-screen-share.md +35 -122
- package/skills/cometchat-ios-calls/references/ringing-integration.md +17 -16
- package/skills/cometchat-ios-calls/references/share-invite.md +8 -12
- package/skills/cometchat-ios-calls/references/swiftui-uikit-hosting.md +4 -4
- package/skills/cometchat-ios-components/SKILL.md +200 -12
- package/skills/cometchat-ios-core/SKILL.md +173 -45
- package/skills/cometchat-ios-customization/SKILL.md +276 -110
- package/skills/cometchat-ios-features/SKILL.md +64 -36
- package/skills/cometchat-ios-placement/SKILL.md +15 -12
- package/skills/cometchat-ios-production/SKILL.md +12 -4
- package/skills/cometchat-ios-push/SKILL.md +53 -19
- package/skills/cometchat-ios-testing/SKILL.md +14 -9
- package/skills/cometchat-ios-theming/SKILL.md +39 -3
- package/skills/cometchat-ios-troubleshooting/SKILL.md +41 -21
- package/skills/cometchat-native-bare-patterns/SKILL.md +36 -19
- package/skills/cometchat-native-calls/SKILL.md +29 -17
- package/skills/cometchat-native-calls/references/add-calls-to-existing-chat.md +2 -2
- package/skills/cometchat-native-calls/references/call-layouts.md +15 -14
- package/skills/cometchat-native-calls/references/call-session.md +2 -2
- package/skills/cometchat-native-calls/references/custom-ui.md +12 -8
- package/skills/cometchat-native-calls/references/device-management.md +53 -30
- package/skills/cometchat-native-calls/references/group-calls.md +35 -30
- package/skills/cometchat-native-calls/references/idle-timeout.md +6 -6
- package/skills/cometchat-native-calls/references/in-call-chat.md +10 -8
- package/skills/cometchat-native-calls/references/migration-v4-to-v5.md +2 -2
- package/skills/cometchat-native-calls/references/raise-hand.md +15 -13
- package/skills/cometchat-native-calls/references/recording-screen-share.md +49 -170
- package/skills/cometchat-native-calls/references/share-invite.md +7 -5
- package/skills/cometchat-native-calls/references/voip-push-end-to-end.md +4 -2
- package/skills/cometchat-native-components/SKILL.md +84 -52
- package/skills/cometchat-native-core/SKILL.md +102 -33
- package/skills/cometchat-native-customization/SKILL.md +150 -28
- package/skills/cometchat-native-expo-patterns/SKILL.md +60 -29
- package/skills/cometchat-native-features/SKILL.md +24 -17
- package/skills/cometchat-native-placement/SKILL.md +19 -10
- package/skills/cometchat-native-production/SKILL.md +9 -3
- package/skills/cometchat-native-push/SKILL.md +2 -1
- package/skills/cometchat-native-testing/SKILL.md +1 -2
- package/skills/cometchat-native-theming/SKILL.md +54 -29
- package/skills/cometchat-native-troubleshooting/SKILL.md +11 -5
- package/skills/cometchat-nextjs-patterns/SKILL.md +22 -8
- package/skills/cometchat-placement/SKILL.md +42 -3
- package/skills/cometchat-production/SKILL.md +12 -5
- package/skills/cometchat-react-calls/SKILL.md +220 -10
- package/skills/cometchat-react-calls/references/add-calls-to-existing-chat.md +4 -3
- package/skills/cometchat-react-calls/references/call-layouts.md +5 -6
- package/skills/cometchat-react-calls/references/call-session.md +1 -1
- package/skills/cometchat-react-calls/references/custom-ui.md +61 -15
- package/skills/cometchat-react-calls/references/device-management.md +55 -51
- package/skills/cometchat-react-calls/references/group-calls.md +18 -23
- package/skills/cometchat-react-calls/references/idle-timeout.md +25 -12
- package/skills/cometchat-react-calls/references/in-call-chat.md +7 -7
- package/skills/cometchat-react-calls/references/migration-v4-to-v5.md +9 -11
- package/skills/cometchat-react-calls/references/raise-hand.md +14 -14
- package/skills/cometchat-react-calls/references/recording-screen-share.md +39 -38
- package/skills/cometchat-react-calls/references/ringing-integration.md +2 -2
- package/skills/cometchat-react-calls/references/share-invite.md +4 -5
- package/skills/cometchat-react-calls/references/testing-calls-on-web.md +20 -2
- package/skills/cometchat-react-calls/references/virtual-background.md +32 -0
- package/skills/cometchat-react-patterns/SKILL.md +45 -5
- package/skills/cometchat-react-push/SKILL.md +258 -72
- package/skills/cometchat-react-router-patterns/SKILL.md +12 -6
- package/skills/cometchat-react-testing/SKILL.md +14 -5
- package/skills/cometchat-theming/SKILL.md +181 -18
- package/skills/cometchat-troubleshooting/SKILL.md +40 -20
|
@@ -1,365 +1,290 @@
|
|
|
1
1
|
---
|
|
2
2
|
name: cometchat-angular-theming
|
|
3
|
-
description: "
|
|
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 >=
|
|
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: "
|
|
10
|
-
tags: "cometchat angular theming
|
|
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
|
-
|
|
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** —
|
|
16
|
+
**Read `cometchat-angular-core` first** — install, init, login, standalone-component model.
|
|
18
17
|
|
|
19
|
-
Ground truth:
|
|
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
|
-
##
|
|
22
|
+
## 1. v4 → v5: what changed
|
|
24
23
|
|
|
25
|
-
|
|
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
|
-
|
|
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
|
-
|
|
34
|
+
---
|
|
36
35
|
|
|
37
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
50
|
+
## 3. Where to put overrides in Angular (the key nuance)
|
|
57
51
|
|
|
58
|
-
|
|
52
|
+
### Global tokens → `src/styles.css` (the common case)
|
|
59
53
|
|
|
60
|
-
|
|
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
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
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
|
-
|
|
64
|
+
(Confirm it's listed in `angular.json` → `…architect.build.options.styles` — it is by default.)
|
|
72
65
|
|
|
73
|
-
|
|
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
|
-
|
|
70
|
+
**Option A — `::ng-deep`** (scoped, keeps default encapsulation):
|
|
82
71
|
|
|
83
|
-
```
|
|
84
|
-
|
|
85
|
-
|
|
86
|
-
|
|
87
|
-
|
|
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
|
-
|
|
80
|
+
**Option B — `ViewEncapsulation.None`** (component CSS becomes global while mounted):
|
|
103
81
|
|
|
104
82
|
```typescript
|
|
105
|
-
@Component({
|
|
106
|
-
|
|
107
|
-
|
|
108
|
-
|
|
109
|
-
|
|
110
|
-
|
|
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
|
-
|
|
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
|
-
##
|
|
96
|
+
## 4. Light / dark mode
|
|
120
97
|
|
|
121
|
-
###
|
|
98
|
+
### 4a. `CometChatUIKit.themeMode` — the kit's switch
|
|
122
99
|
|
|
123
|
-
|
|
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
|
-
|
|
141
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
174
|
-
|
|
175
|
-
|
|
176
|
-
|
|
177
|
-
|
|
178
|
-
|
|
179
|
-
|
|
180
|
-
|
|
181
|
-
|
|
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
|
-
|
|
194
|
-
<cometchat-conversations [conversationsStyle]="conversationsStyle"></cometchat-conversations>
|
|
195
|
-
```
|
|
130
|
+
### 4d. Keep `themeMode` in sync (the sample-app pattern)
|
|
196
131
|
|
|
197
|
-
|
|
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
|
-
|
|
201
|
-
|
|
202
|
-
|
|
203
|
-
|
|
204
|
-
|
|
205
|
-
|
|
206
|
-
|
|
207
|
-
|
|
208
|
-
|
|
209
|
-
|
|
210
|
-
|
|
211
|
-
|
|
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
|
-
###
|
|
150
|
+
### 4c. Your own dark token overrides (CSS)
|
|
216
151
|
|
|
217
|
-
|
|
218
|
-
|
|
219
|
-
|
|
220
|
-
|
|
221
|
-
|
|
222
|
-
|
|
223
|
-
|
|
224
|
-
|
|
225
|
-
|
|
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
|
-
|
|
235
|
-
|
|
236
|
-
|
|
237
|
-
|
|
238
|
-
|
|
239
|
-
|
|
240
|
-
|
|
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
|
-
|
|
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.
|
|
266
|
-
|
|
267
|
-
### Match a brand color (most common)
|
|
176
|
+
## 5. The `--cometchat-*` token reference
|
|
268
177
|
|
|
269
|
-
|
|
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
|
-
|
|
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
|
-
|
|
199
|
+
---
|
|
277
200
|
|
|
278
|
-
|
|
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
|
-
|
|
203
|
+
Write the values into `src/styles.css` as a `:root` block.
|
|
285
204
|
|
|
286
|
-
|
|
287
|
-
|
|
288
|
-
|
|
289
|
-
|
|
290
|
-
|
|
291
|
-
|
|
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
|
-
|
|
213
|
+
---
|
|
296
214
|
|
|
297
|
-
|
|
215
|
+
## 7. Recipes
|
|
298
216
|
|
|
217
|
+
**Recipe 1 — brand color (most common):**
|
|
299
218
|
```css
|
|
300
|
-
|
|
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
|
-
|
|
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
|
-
|
|
237
|
+
**Recipe 4 — custom font:** `:root { --cometchat-font-family: "Inter", sans-serif; }`
|
|
311
238
|
|
|
312
|
-
|
|
239
|
+
**Recipe 5 — rounded corners:** `:root { --cometchat-radius-2: 12px; --cometchat-radius-max: 999px; }`
|
|
313
240
|
|
|
314
|
-
|
|
315
|
-
/* styles.css */
|
|
316
|
-
:root {
|
|
317
|
-
/* Primary color */
|
|
318
|
-
--cometchat-primary-color: #6851D6;
|
|
241
|
+
---
|
|
319
242
|
|
|
320
|
-
|
|
321
|
-
--cometchat-background-color-01: #ffffff;
|
|
322
|
-
--cometchat-background-color-02: #fafafa;
|
|
323
|
-
--cometchat-background-color-03: #f5f5f5;
|
|
243
|
+
## Localization
|
|
324
244
|
|
|
325
|
-
|
|
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
|
-
|
|
331
|
-
--cometchat-border-color-default: #e8e8e8;
|
|
247
|
+
## Sound Manager — custom notification & call sounds
|
|
332
248
|
|
|
333
|
-
|
|
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
|
-
|
|
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
|
-
|
|
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
|
-
|
|
261
|
+
// Per-event helpers (call versions loop until pause); then stop:
|
|
262
|
+
CometChatSoundManager.onIncomingCall();
|
|
263
|
+
CometChatSoundManager.pause();
|
|
264
|
+
```
|
|
345
265
|
|
|
346
|
-
|
|
266
|
+
## 8. Anti-patterns
|
|
347
267
|
|
|
348
|
-
|
|
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
|
-
|
|
276
|
+
---
|
|
351
277
|
|
|
352
|
-
|
|
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
|
-
|
|
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
|
-
|
|
359
|
-
|
|
360
|
-
|
|
361
|
-
|
|
362
|
-
|
|
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
|