@devchitchat/chat 4.4.3 → 4.4.4

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.
@@ -1,22 +1,43 @@
1
- /* dark themedefault */
1
+ /* Apple Human Interface Guidelines Dark Mode
2
+ Reference: developer.apple.com/design/human-interface-guidelines/color */
2
3
  :root, [data-theme="dark"] {
3
- --bg-base: #1a1b1e;
4
- --bg-topbar: #141517;
5
- --bg-sidebar: #1e1f22;
6
- --bg-hover: rgba(255,255,255,0.06);
7
- --bg-active: rgba(88,166,255,0.12);
8
- --bg-input: #2b2d31;
9
- --bg-call: #1e1f22;
4
+ /* System Backgrounds (Dark) */
5
+ --bg-base: #000000; /* systemBackground */
6
+ --bg-topbar: #1C1C1E; /* secondarySystemBackground */
7
+ --bg-sidebar: #1C1C1E; /* secondarySystemBackground */
8
+ --bg-hover: rgba(118,118,128,0.24); /* systemFill / tertiary */
9
+ --bg-active: rgba(10,132,255,0.20); /* systemBlue / 20% */
10
+ --bg-input: #2C2C2E; /* tertiarySystemBackground */
11
+ --bg-call: #1C1C1E;
12
+ --bg-elevated: #3A3A3C; /* quaternarySystemBackground */
10
13
 
11
- --text-primary: #e3e5e8;
12
- --text-secondary: #585c60;
13
- --text-muted: #6d6f78;
14
+ /* Labels (Dark) */
15
+ --text-primary: #FFFFFF; /* label */
16
+ --text-secondary: rgba(235,235,245,0.60); /* secondaryLabel */
17
+ --text-muted: rgba(235,235,245,0.30); /* tertiaryLabel */
14
18
 
15
- --border: #2e3035;
16
- --accent: #58a6ff;
19
+ /* Separator (Dark) */
20
+ --border: rgba(84,84,88,0.65); /* separator */
17
21
 
18
- --color-success: #3ba55c;
19
- --color-danger: #ed4245;
22
+ /* System Blue (Dark) */
23
+ --accent: #0A84FF;
20
24
 
21
- --code-background: rgba(255,255,255,.1);
25
+ /* System Colors (Dark) */
26
+ --color-success: #30D158; /* systemGreen */
27
+ --color-danger: #FF453A; /* systemRed */
28
+ --color-warning: #FF9F0A; /* systemOrange */
29
+
30
+ /* Fills (Dark) */
31
+ --fill-primary: rgba(120,120,128,0.36);
32
+ --fill-secondary: rgba(120,120,128,0.32);
33
+ --fill-tertiary: rgba(118,118,128,0.24);
34
+ --fill-quaternary: rgba(116,116,128,0.18);
35
+
36
+ /* Code */
37
+ --code-background: rgba(118,118,128,0.24);
38
+
39
+ /* Shadows */
40
+ --shadow-sm: 0 1px 3px rgba(0,0,0,0.55), 0 1px 2px rgba(0,0,0,0.40);
41
+ --shadow-md: 0 4px 16px rgba(0,0,0,0.65), 0 2px 6px rgba(0,0,0,0.45);
42
+ --shadow-lg: 0 10px 40px rgba(0,0,0,0.75), 0 4px 14px rgba(0,0,0,0.55);
22
43
  }
@@ -7,16 +7,26 @@
7
7
  --bg-active: rgba(80,180,80,0.16);
8
8
  --bg-input: #1f2e1f;
9
9
  --bg-call: #192419;
10
+ --bg-elevated: #243524;
10
11
 
11
12
  --text-primary: #d6e8d0;
12
- --text-secondary: #3f533d;
13
- --text-muted: #4a6645;
13
+ --text-secondary: rgba(180,220,170,0.60);
14
+ --text-muted: rgba(180,220,170,0.35);
14
15
 
15
- --border: #243524;
16
+ --border: rgba(36,53,36,0.95);
16
17
  --accent: #60c060;
17
18
 
18
19
  --color-success: #4aad5a;
19
20
  --color-danger: #d05a3a;
21
+
22
+ --fill-primary: rgba(80,180,80,0.20);
23
+ --fill-secondary: rgba(80,180,80,0.16);
24
+ --fill-tertiary: rgba(80,180,80,0.12);
25
+ --fill-quaternary: rgba(80,180,80,0.08);
26
+
20
27
  --code-background: rgba(255,255,255,.1);
21
28
 
29
+ --shadow-sm: 0 1px 3px rgba(0,0,0,0.55), 0 1px 2px rgba(0,0,0,0.40);
30
+ --shadow-md: 0 4px 16px rgba(0,0,0,0.60), 0 2px 6px rgba(0,0,0,0.40);
31
+ --shadow-lg: 0 10px 40px rgba(0,0,0,0.70), 0 4px 14px rgba(0,0,0,0.50);
22
32
  }
@@ -1,23 +1,43 @@
1
- /* light theme */
2
- :root, [data-theme="light"] {
3
- --bg-base: #f9fafb;
4
- --bg-topbar: #ffffff;
5
- --bg-sidebar: #f2f3f5;
6
- --bg-hover: rgba(0,0,0,0.05);
7
- --bg-active: rgba(0,100,220,0.1);
8
- --bg-input: #ffffff;
9
- --bg-call: #f2f3f5;
1
+ /* Apple Human Interface Guidelines — Light Mode
2
+ Reference: developer.apple.com/design/human-interface-guidelines/color */
3
+ [data-theme="light"] {
4
+ /* System Backgrounds (Light) */
5
+ --bg-base: #F2F2F7; /* systemGroupedBackground */
6
+ --bg-topbar: #FFFFFF; /* systemBackground */
7
+ --bg-sidebar: #FFFFFF; /* systemBackground */
8
+ --bg-hover: rgba(60,60,67,0.08); /* systemFill / quaternary */
9
+ --bg-active: rgba(0,122,255,0.12); /* systemBlue / 12% */
10
+ --bg-input: #FFFFFF; /* systemBackground */
11
+ --bg-call: #F2F2F7;
12
+ --bg-elevated: #FFFFFF;
10
13
 
11
- --text-primary: #060607;
12
- --text-secondary: #a2a7bb;
13
- --text-muted: #80848e;
14
+ /* Labels (Light) */
15
+ --text-primary: #000000; /* label */
16
+ --text-secondary: rgba(60,60,67,0.60); /* secondaryLabel */
17
+ --text-muted: rgba(60,60,67,0.30); /* tertiaryLabel */
14
18
 
15
- --border: #e3e5e8;
16
- --accent: #0068d6;
19
+ /* Separator (Light) */
20
+ --border: rgba(60,60,67,0.29); /* separator */
17
21
 
18
- --color-success: #248046;
19
- --color-danger: #da373c;
22
+ /* System Blue (Light) */
23
+ --accent: #007AFF;
20
24
 
21
- --code-background: rgba(0,0,0,.1);
25
+ /* System Colors (Light) */
26
+ --color-success: #34C759; /* systemGreen */
27
+ --color-danger: #FF3B30; /* systemRed */
28
+ --color-warning: #FF9500; /* systemOrange */
22
29
 
30
+ /* Fills (Light) */
31
+ --fill-primary: rgba(120,120,128,0.20);
32
+ --fill-secondary: rgba(120,120,128,0.16);
33
+ --fill-tertiary: rgba(118,118,128,0.12);
34
+ --fill-quaternary: rgba(116,116,128,0.08);
35
+
36
+ /* Code */
37
+ --code-background: rgba(120,120,128,0.18);
38
+
39
+ /* Shadows */
40
+ --shadow-sm: 0 1px 3px rgba(0,0,0,0.10), 0 1px 2px rgba(0,0,0,0.07);
41
+ --shadow-md: 0 4px 16px rgba(0,0,0,0.10), 0 2px 6px rgba(0,0,0,0.07);
42
+ --shadow-lg: 0 10px 40px rgba(0,0,0,0.12), 0 4px 14px rgba(0,0,0,0.08);
23
43
  }
@@ -7,16 +7,26 @@
7
7
  --bg-active: rgba(0,200,200,0.15);
8
8
  --bg-input: #152a3e;
9
9
  --bg-call: #0f2137;
10
+ --bg-elevated: #1a3448;
10
11
 
11
12
  --text-primary: #cde8f0;
12
- --text-secondary: #475e65;
13
- --text-muted: #4a7080;
13
+ --text-secondary: rgba(180,220,230,0.60);
14
+ --text-muted: rgba(180,220,230,0.35);
14
15
 
15
- --border: #1a3448;
16
+ --border: rgba(26,52,72,0.9);
16
17
  --accent: #00c8c8;
17
18
 
18
19
  --color-success: #2fb57a;
19
20
  --color-danger: #e05a5a;
20
21
 
22
+ --fill-primary: rgba(0,200,200,0.20);
23
+ --fill-secondary: rgba(0,200,200,0.16);
24
+ --fill-tertiary: rgba(0,200,200,0.12);
25
+ --fill-quaternary: rgba(0,200,200,0.08);
26
+
21
27
  --code-background: rgba(255,255,255,.1);
28
+
29
+ --shadow-sm: 0 1px 3px rgba(0,0,0,0.55), 0 1px 2px rgba(0,0,0,0.40);
30
+ --shadow-md: 0 4px 16px rgba(0,0,0,0.60), 0 2px 6px rgba(0,0,0,0.40);
31
+ --shadow-lg: 0 10px 40px rgba(0,0,0,0.70), 0 4px 14px rgba(0,0,0,0.50);
22
32
  }
@@ -7,16 +7,26 @@
7
7
  --bg-active: rgba(230,100,140,0.16);
8
8
  --bg-input: #2c1a26;
9
9
  --bg-call: #241520;
10
+ --bg-elevated: #36202e;
10
11
 
11
12
  --text-primary: #f0d8e4;
12
- --text-secondary: #79596a;
13
- --text-muted: #7a4860;
13
+ --text-secondary: rgba(230,200,215,0.60);
14
+ --text-muted: rgba(230,200,215,0.35);
14
15
 
15
- --border: #36202e;
16
+ --border: rgba(54,32,46,0.95);
16
17
  --accent: #e8688a;
17
18
 
18
19
  --color-success: #5ab87a;
19
20
  --color-danger: #e05050;
21
+
22
+ --fill-primary: rgba(230,100,140,0.20);
23
+ --fill-secondary: rgba(230,100,140,0.16);
24
+ --fill-tertiary: rgba(230,100,140,0.12);
25
+ --fill-quaternary: rgba(230,100,140,0.08);
26
+
20
27
  --code-background: rgba(255,255,255,.1);
21
28
 
29
+ --shadow-sm: 0 1px 3px rgba(0,0,0,0.55), 0 1px 2px rgba(0,0,0,0.40);
30
+ --shadow-md: 0 4px 16px rgba(0,0,0,0.60), 0 2px 6px rgba(0,0,0,0.40);
31
+ --shadow-lg: 0 10px 40px rgba(0,0,0,0.70), 0 4px 14px rgba(0,0,0,0.50);
22
32
  }
@@ -126,7 +126,10 @@ export class MessageService {
126
126
  const parent = this.messageRepo.getById(parentMsgId)
127
127
  if (!parent) throw new ServiceError('NOT_FOUND', 'Message not found')
128
128
  if (parent.channel_id !== channelId) throw new ServiceError('BAD_REQUEST', 'Message does not belong to this channel')
129
- return this.messageRepo.listReplies({ parentMsgId })
129
+ const rows = this.messageRepo.listReplies({ parentMsgId })
130
+ return this.reactionService
131
+ ? this.reactionService.enrichWithReactions({ messages: rows, requestingUserId: userId })
132
+ : rows
130
133
  }
131
134
 
132
135
  getReplyCountsForMessages({ msgIds }) {