@bbki.ng/bb-msg-history 0.6.0 → 0.6.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/dist/const/authors.js
CHANGED
|
@@ -6,7 +6,7 @@ import { THEME } from './theme.js';
|
|
|
6
6
|
export const AUTHOR_CONFIG = {
|
|
7
7
|
'bbki.ng': {
|
|
8
8
|
avatar: `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 48 48" fill="none"><path d="M29.1152 21.3106C32.0605 21.3106 34.4481 18.9101 34.4481 15.9489V24.6457C34.4481 25.7585 33.5508 26.6607 32.444 26.6607H15.1207C14.0138 26.6607 13.1166 25.7585 13.1166 24.6457V15.9489C13.1166 18.9101 15.5042 21.3106 18.4494 21.3106C21.3947 21.3106 23.7823 18.9101 23.7823 15.9489C23.7823 18.9101 26.17 21.3106 29.1152 21.3106Z" fill="${THEME.gray[400]}"/><path d="M23.7823 15.9373L23.7823 15.9489C23.7823 15.9451 23.7823 15.9412 23.7823 15.9373Z" fill="${THEME.gray[400]}"/><path d="M23.1143 28.004C23.1205 30.9598 25.5057 33.3541 28.4472 33.3541C31.3886 33.3541 33.7738 30.9598 33.7801 28.004H23.1143Z" fill="${THEME.gray[400]}"/><path d="M13.7846 28.004C13.7846 28.0079 13.7846 28.0117 13.7846 28.0156C13.7908 30.9714 16.1761 33.3657 19.1175 33.3657C22.0589 33.3657 24.4442 30.9714 24.4504 28.0156H13.7846V28.004Z" fill="${THEME.gray[400]}"/><path d="M14.4527 15.9373C14.4527 16.6792 13.8545 17.2806 13.1166 17.2806C12.3786 17.2806 11.7805 16.6792 11.7805 15.9373C11.7805 15.1954 12.3786 14.594 13.1166 14.594C13.8545 14.594 14.4527 15.1954 14.4527 15.9373Z" fill="${THEME.gray[400]}"/><path d="M25.1184 15.2657C25.1184 16.0076 24.5202 16.609 23.7823 16.609C23.0444 16.609 22.4462 16.0076 22.4462 15.2657C22.4462 14.5238 23.0444 13.9224 23.7823 13.9224C24.5202 13.9224 25.1184 14.5238 25.1184 15.2657Z" fill="${THEME.gray[400]}"/><path d="M35.7842 15.9373C35.7842 16.6792 35.186 17.2806 34.4481 17.2806C33.7102 17.2806 33.112 16.6792 33.112 15.9373C33.112 15.1954 33.7102 14.594 34.4481 14.594C35.186 14.594 35.7842 15.1954 35.7842 15.9373Z" fill="${THEME.gray[400]}"/></svg>`,
|
|
9
|
-
bubbleColor: THEME.gray[
|
|
9
|
+
bubbleColor: THEME.gray[200],
|
|
10
10
|
textColor: THEME.gray[900],
|
|
11
11
|
side: 'right',
|
|
12
12
|
},
|
package/dist/const/styles.js
CHANGED
|
@@ -193,6 +193,7 @@ export const MAIN_STYLES = `
|
|
|
193
193
|
display: flex;
|
|
194
194
|
flex-direction: column;
|
|
195
195
|
position: relative;
|
|
196
|
+
padding-bottom: 12px;
|
|
196
197
|
}
|
|
197
198
|
|
|
198
199
|
/* Timestamp styles */
|
|
@@ -204,7 +205,7 @@ export const MAIN_STYLES = `
|
|
|
204
205
|
visibility: hidden;
|
|
205
206
|
transition: opacity 0.2s ease, visibility 0.2s ease;
|
|
206
207
|
white-space: nowrap;
|
|
207
|
-
bottom:
|
|
208
|
+
bottom: 1px;
|
|
208
209
|
line-height: 1;
|
|
209
210
|
pointer-events: none;
|
|
210
211
|
}
|
|
@@ -245,6 +246,15 @@ export const MAIN_STYLES = `
|
|
|
245
246
|
color: ${THEME.gray[900]};
|
|
246
247
|
}
|
|
247
248
|
|
|
249
|
+
/* Subsequent messages - all corners rounded */
|
|
250
|
+
.msg-row--subsequent .msg-bubble--left {
|
|
251
|
+
border-bottom-left-radius: 1rem;
|
|
252
|
+
}
|
|
253
|
+
|
|
254
|
+
.msg-row--subsequent .msg-bubble--right {
|
|
255
|
+
border-bottom-right-radius: 1rem;
|
|
256
|
+
}
|
|
257
|
+
|
|
248
258
|
/* Empty state */
|
|
249
259
|
.empty-state {
|
|
250
260
|
text-align: center;
|
|
@@ -43,10 +43,10 @@ export function buildMessageRowHtml(author, text, config, isSubsequent, timestam
|
|
|
43
43
|
${side === 'left' ? avatarHtml : ''}
|
|
44
44
|
|
|
45
45
|
<div class="msg-content">
|
|
46
|
-
${timestampHtml}
|
|
47
46
|
<div class="msg-bubble msg-bubble--${side}"${styleAttr}>
|
|
48
47
|
${escapeHtml(text)}
|
|
49
48
|
</div>
|
|
49
|
+
${timestampHtml}
|
|
50
50
|
</div>
|
|
51
51
|
|
|
52
52
|
${side === 'right' ? avatarHtml : ''}
|
package/package.json
CHANGED
package/src/const/authors.ts
CHANGED
|
@@ -8,7 +8,7 @@ import { THEME } from './theme.js';
|
|
|
8
8
|
export const AUTHOR_CONFIG: Record<string, Omit<AuthorConfig, 'isCustomAvatar'>> = {
|
|
9
9
|
'bbki.ng': {
|
|
10
10
|
avatar: `<svg xmlns="http://www.w3.org/2000/svg" width="28" height="28" viewBox="0 0 48 48" fill="none"><path d="M29.1152 21.3106C32.0605 21.3106 34.4481 18.9101 34.4481 15.9489V24.6457C34.4481 25.7585 33.5508 26.6607 32.444 26.6607H15.1207C14.0138 26.6607 13.1166 25.7585 13.1166 24.6457V15.9489C13.1166 18.9101 15.5042 21.3106 18.4494 21.3106C21.3947 21.3106 23.7823 18.9101 23.7823 15.9489C23.7823 18.9101 26.17 21.3106 29.1152 21.3106Z" fill="${THEME.gray[400]}"/><path d="M23.7823 15.9373L23.7823 15.9489C23.7823 15.9451 23.7823 15.9412 23.7823 15.9373Z" fill="${THEME.gray[400]}"/><path d="M23.1143 28.004C23.1205 30.9598 25.5057 33.3541 28.4472 33.3541C31.3886 33.3541 33.7738 30.9598 33.7801 28.004H23.1143Z" fill="${THEME.gray[400]}"/><path d="M13.7846 28.004C13.7846 28.0079 13.7846 28.0117 13.7846 28.0156C13.7908 30.9714 16.1761 33.3657 19.1175 33.3657C22.0589 33.3657 24.4442 30.9714 24.4504 28.0156H13.7846V28.004Z" fill="${THEME.gray[400]}"/><path d="M14.4527 15.9373C14.4527 16.6792 13.8545 17.2806 13.1166 17.2806C12.3786 17.2806 11.7805 16.6792 11.7805 15.9373C11.7805 15.1954 12.3786 14.594 13.1166 14.594C13.8545 14.594 14.4527 15.1954 14.4527 15.9373Z" fill="${THEME.gray[400]}"/><path d="M25.1184 15.2657C25.1184 16.0076 24.5202 16.609 23.7823 16.609C23.0444 16.609 22.4462 16.0076 22.4462 15.2657C22.4462 14.5238 23.0444 13.9224 23.7823 13.9224C24.5202 13.9224 25.1184 14.5238 25.1184 15.2657Z" fill="${THEME.gray[400]}"/><path d="M35.7842 15.9373C35.7842 16.6792 35.186 17.2806 34.4481 17.2806C33.7102 17.2806 33.112 16.6792 33.112 15.9373C33.112 15.1954 33.7102 14.594 34.4481 14.594C35.186 14.594 35.7842 15.1954 35.7842 15.9373Z" fill="${THEME.gray[400]}"/></svg>`,
|
|
11
|
-
bubbleColor: THEME.gray[
|
|
11
|
+
bubbleColor: THEME.gray[200],
|
|
12
12
|
textColor: THEME.gray[900],
|
|
13
13
|
side: 'right',
|
|
14
14
|
},
|
package/src/const/styles.ts
CHANGED
|
@@ -194,6 +194,7 @@ export const MAIN_STYLES = `
|
|
|
194
194
|
display: flex;
|
|
195
195
|
flex-direction: column;
|
|
196
196
|
position: relative;
|
|
197
|
+
padding-bottom: 12px;
|
|
197
198
|
}
|
|
198
199
|
|
|
199
200
|
/* Timestamp styles */
|
|
@@ -205,7 +206,7 @@ export const MAIN_STYLES = `
|
|
|
205
206
|
visibility: hidden;
|
|
206
207
|
transition: opacity 0.2s ease, visibility 0.2s ease;
|
|
207
208
|
white-space: nowrap;
|
|
208
|
-
bottom:
|
|
209
|
+
bottom: 1px;
|
|
209
210
|
line-height: 1;
|
|
210
211
|
pointer-events: none;
|
|
211
212
|
}
|
|
@@ -246,6 +247,15 @@ export const MAIN_STYLES = `
|
|
|
246
247
|
color: ${THEME.gray[900]};
|
|
247
248
|
}
|
|
248
249
|
|
|
250
|
+
/* Subsequent messages - all corners rounded */
|
|
251
|
+
.msg-row--subsequent .msg-bubble--left {
|
|
252
|
+
border-bottom-left-radius: 1rem;
|
|
253
|
+
}
|
|
254
|
+
|
|
255
|
+
.msg-row--subsequent .msg-bubble--right {
|
|
256
|
+
border-bottom-right-radius: 1rem;
|
|
257
|
+
}
|
|
258
|
+
|
|
249
259
|
/* Empty state */
|
|
250
260
|
.empty-state {
|
|
251
261
|
text-align: center;
|
|
@@ -58,10 +58,10 @@ export function buildMessageRowHtml(
|
|
|
58
58
|
${side === 'left' ? avatarHtml : ''}
|
|
59
59
|
|
|
60
60
|
<div class="msg-content">
|
|
61
|
-
${timestampHtml}
|
|
62
61
|
<div class="msg-bubble msg-bubble--${side}"${styleAttr}>
|
|
63
62
|
${escapeHtml(text)}
|
|
64
63
|
</div>
|
|
64
|
+
${timestampHtml}
|
|
65
65
|
</div>
|
|
66
66
|
|
|
67
67
|
${side === 'right' ? avatarHtml : ''}
|