@convokitapp/vue-ui 0.5.0 → 0.7.0
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/CHANGELOG.md +98 -0
- package/PARITY.md +45 -0
- package/README.md +125 -1
- package/dist/index.cjs +418 -53
- package/dist/index.cjs.map +1 -1
- package/dist/index.css +56 -1
- package/dist/index.css.map +1 -1
- package/dist/index.d.cts +129 -21
- package/dist/index.d.ts +129 -21
- package/dist/index.js +417 -53
- package/dist/index.js.map +1 -1
- package/package.json +3 -3
package/dist/index.css
CHANGED
|
@@ -11,6 +11,7 @@
|
|
|
11
11
|
--ckui-incoming: #f4f4f5;
|
|
12
12
|
--ckui-outgoing: #18181b;
|
|
13
13
|
--ckui-outgoing-text: #fafafa;
|
|
14
|
+
--ckui-badge: #18181b;
|
|
14
15
|
--ckui-radius: 10px;
|
|
15
16
|
--ckui-avatar-size: 40px;
|
|
16
17
|
--ckui-font:
|
|
@@ -32,6 +33,7 @@
|
|
|
32
33
|
--ckui-incoming: inherit;
|
|
33
34
|
--ckui-outgoing: inherit;
|
|
34
35
|
--ckui-outgoing-text: inherit;
|
|
36
|
+
--ckui-badge: inherit;
|
|
35
37
|
--ckui-radius: inherit;
|
|
36
38
|
--ckui-avatar-size: inherit;
|
|
37
39
|
--ckui-font: inherit;
|
|
@@ -100,7 +102,9 @@
|
|
|
100
102
|
}
|
|
101
103
|
.ckui-conversation-item {
|
|
102
104
|
display: grid;
|
|
103
|
-
grid-template-columns: auto minmax(0, 1fr)
|
|
105
|
+
grid-template-columns: auto minmax(0, 1fr);
|
|
106
|
+
grid-auto-flow: column;
|
|
107
|
+
grid-auto-columns: auto;
|
|
104
108
|
gap: 12px;
|
|
105
109
|
align-items: center;
|
|
106
110
|
width: 100%;
|
|
@@ -140,6 +144,44 @@
|
|
|
140
144
|
color: var(--ckui-muted);
|
|
141
145
|
font-size: 12px;
|
|
142
146
|
}
|
|
147
|
+
.ckui-conversation-item[data-unread] .ckui-conversation-item__body strong {
|
|
148
|
+
font-weight: 700;
|
|
149
|
+
}
|
|
150
|
+
.ckui-conversation-item[data-unread] .ckui-conversation-item__body span {
|
|
151
|
+
color: var(--ckui-text);
|
|
152
|
+
}
|
|
153
|
+
.ckui-conversation-item__meta {
|
|
154
|
+
display: grid;
|
|
155
|
+
flex: 0 0 auto;
|
|
156
|
+
gap: 4px;
|
|
157
|
+
justify-items: end;
|
|
158
|
+
align-self: start;
|
|
159
|
+
padding-top: 2px;
|
|
160
|
+
}
|
|
161
|
+
.ckui-conversation-item__time {
|
|
162
|
+
color: var(--ckui-muted);
|
|
163
|
+
font-size: 11px;
|
|
164
|
+
white-space: nowrap;
|
|
165
|
+
}
|
|
166
|
+
.ckui-unread-badge {
|
|
167
|
+
display: inline-grid;
|
|
168
|
+
place-items: center;
|
|
169
|
+
min-width: 20px;
|
|
170
|
+
height: 20px;
|
|
171
|
+
padding: 0 6px;
|
|
172
|
+
border-radius: 999px;
|
|
173
|
+
background: var(--ckui-badge);
|
|
174
|
+
color: var(--ckui-outgoing-text);
|
|
175
|
+
font-size: 11px;
|
|
176
|
+
font-weight: 600;
|
|
177
|
+
line-height: 1;
|
|
178
|
+
}
|
|
179
|
+
.ckui-unread-badge--dot {
|
|
180
|
+
min-width: 8px;
|
|
181
|
+
width: 8px;
|
|
182
|
+
height: 8px;
|
|
183
|
+
padding: 0;
|
|
184
|
+
}
|
|
143
185
|
.ckui-avatar {
|
|
144
186
|
display: inline-grid;
|
|
145
187
|
flex: 0 0 auto;
|
|
@@ -427,6 +469,19 @@ button.ckui-media-card {
|
|
|
427
469
|
--ckui-avatar-size: 30px;
|
|
428
470
|
font-size: 10px;
|
|
429
471
|
}
|
|
472
|
+
.ckui[data-density=compact] .ckui-conversation-item__meta {
|
|
473
|
+
align-self: center;
|
|
474
|
+
padding-top: 0;
|
|
475
|
+
}
|
|
476
|
+
.ckui[data-density=compact] .ckui-unread-badge {
|
|
477
|
+
min-width: 18px;
|
|
478
|
+
height: 18px;
|
|
479
|
+
font-size: 10px;
|
|
480
|
+
}
|
|
481
|
+
.ckui[data-density=compact] .ckui-unread-badge--dot {
|
|
482
|
+
min-width: 8px;
|
|
483
|
+
height: 8px;
|
|
484
|
+
}
|
|
430
485
|
.ckui[data-density=compact] .ckui-message-list {
|
|
431
486
|
gap: 5px;
|
|
432
487
|
padding: 10px 12px;
|
package/dist/index.css.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"sources":["../src/styles.css"],"sourcesContent":[".ckui-theme,\n.ckui {\n --ckui-background: #fafafa;\n --ckui-surface: #ffffff;\n --ckui-primary: #18181b;\n --ckui-text: #09090b;\n --ckui-muted: #71717a;\n --ckui-border: #e4e4e7;\n --ckui-error: #dc2626;\n --ckui-incoming: #f4f4f5;\n --ckui-outgoing: #18181b;\n --ckui-outgoing-text: #fafafa;\n --ckui-radius: 10px;\n --ckui-avatar-size: 40px;\n --ckui-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n}\n\n.ckui-theme .ckui {\n --ckui-background: inherit;\n --ckui-surface: inherit;\n --ckui-primary: inherit;\n --ckui-text: inherit;\n --ckui-muted: inherit;\n --ckui-border: inherit;\n --ckui-error: inherit;\n --ckui-incoming: inherit;\n --ckui-outgoing: inherit;\n --ckui-outgoing-text: inherit;\n --ckui-radius: inherit;\n --ckui-avatar-size: inherit;\n --ckui-font: inherit;\n}\n\n.ckui,\n.ckui *,\n.ckui *::before,\n.ckui *::after { box-sizing: border-box; }\n\n.ckui { color: var(--ckui-text); font-family: var(--ckui-font); font-size: 14px; line-height: 1.45; }\n.ckui button, .ckui textarea { color: inherit; font: inherit; }\n.ckui button:focus-visible, .ckui textarea:focus-visible { outline: 2px solid color-mix(in srgb, var(--ckui-primary) 38%, white); outline-offset: 2px; }\n\n.ckui-conversation-list,\n.ckui-conversation {\n display: flex;\n min-width: 0;\n min-height: 0;\n height: 100%;\n overflow: hidden;\n flex-direction: column;\n border: 1px solid var(--ckui-border);\n border-radius: var(--ckui-radius);\n background: var(--ckui-surface);\n box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);\n}\n\n.ckui-scroll-area, .ckui-message-list { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }\n.ckui-scroll-area { flex: 1; background: var(--ckui-surface); }\n\n.ckui-conversation-list__toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 52px;\n padding: 8px 10px 8px 16px;\n border-bottom: 1px solid var(--ckui-border);\n background: var(--ckui-surface);\n color: var(--ckui-text);\n font-size: 14px;\n font-weight: 600;\n letter-spacing: -0.01em;\n}\n\n.ckui-conversation-list__items { display: grid; }\n.ckui-conversation-item {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr) auto;\n gap: 12px;\n align-items: center;\n width: 100%;\n min-height: 68px;\n padding: 10px 14px;\n border: 0;\n border-bottom: 1px solid var(--ckui-border);\n border-radius: 0;\n background: var(--ckui-surface);\n cursor: pointer;\n text-align: left;\n transition: background-color 120ms ease;\n}\n.ckui-conversation-item:hover { background: color-mix(in srgb, var(--ckui-primary) 4%, var(--ckui-surface)); }\n.ckui-conversation-item[data-selected] { background: color-mix(in srgb, var(--ckui-primary) 7%, var(--ckui-surface)); }\n.ckui-conversation-item__body { display: grid; min-width: 0; gap: 2px; }\n.ckui-conversation-item__body strong, .ckui-conversation-item__body span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ckui-conversation-item__body strong { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }\n.ckui-conversation-item__body span { color: var(--ckui-muted); font-size: 12px; }\n\n.ckui-avatar {\n display: inline-grid;\n flex: 0 0 auto;\n width: var(--ckui-avatar-size);\n height: var(--ckui-avatar-size);\n overflow: hidden;\n place-items: center;\n border: 1px solid var(--ckui-border);\n border-radius: 999px;\n background: color-mix(in srgb, var(--ckui-primary) 6%, var(--ckui-surface));\n color: var(--ckui-text);\n font-size: 12px;\n font-weight: 600;\n}\n.ckui-avatar__image, .ckui-avatar__fallback { width: 100%; height: 100%; }\n.ckui-avatar__image { object-fit: cover; }\n.ckui-avatar__fallback { display: grid; place-items: center; }\n.ckui-separator { display: none; }\n\n.ckui-icon-button, .ckui-send-button, .ckui-link-button { border: 0; background: transparent; cursor: pointer; }\n.ckui-icon-button { display: inline-grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 7px; color: var(--ckui-muted); }\n.ckui-icon-button:hover { background: color-mix(in srgb, var(--ckui-primary) 6%, transparent); color: var(--ckui-text); }\n.ckui-state, .ckui-inline-state { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 120px; padding: 20px; color: var(--ckui-muted); text-align: center; }\n.ckui-inline-state { min-height: 52px; font-size: 12px; }\n.ckui-state--error, .ckui-conversation-error { color: var(--ckui-error); }\n.ckui-link-button { color: currentColor; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }\n\n.ckui-conversation-header { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 12px; border-bottom: 1px solid var(--ckui-border); background: var(--ckui-surface); }\n.ckui-conversation-header__body { display: grid; flex: 1; min-width: 0; gap: 1px; }\n.ckui-conversation-header__body strong { overflow: hidden; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; text-overflow: ellipsis; white-space: nowrap; }\n.ckui-conversation-header__body span { color: var(--ckui-muted); font-size: 12px; }\n.ckui-conversation-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid color-mix(in srgb, var(--ckui-error) 22%, var(--ckui-border)); background: color-mix(in srgb, var(--ckui-error) 5%, var(--ckui-surface)); font-size: 12px; }\n\n.ckui-message-list { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 18px; background: var(--ckui-background); }\n.ckui-message-row { display: flex; flex-direction: column; align-items: flex-start; }\n.ckui-message-row--outgoing { align-items: flex-end; }\n.ckui-message-bubble { max-width: min(74%, 560px); padding: 9px 12px 7px; border: 1px solid var(--ckui-border); border-radius: calc(var(--ckui-radius) + 2px); background: var(--ckui-incoming); }\n.ckui-message-row--outgoing .ckui-message-bubble { border-color: var(--ckui-outgoing); background: var(--ckui-outgoing); color: var(--ckui-outgoing-text); }\n.ckui-message-sender { display: block; margin-bottom: 3px; color: var(--ckui-muted); font-size: 11px; font-weight: 600; }\n.ckui-message-text { overflow-wrap: anywhere; white-space: pre-wrap; }\n.ckui-message-time { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 5px; color: color-mix(in srgb, currentColor 62%, transparent); font-size: 10px; }\n.ckui-read-receipt { min-height: 16px; padding-top: 3px; color: var(--ckui-muted); font-size: 10px; }\n\n.ckui-media { margin-top: 8px; }\n.ckui-media-card { display: flex; align-items: center; gap: 9px; width: 100%; min-width: 210px; padding: 9px; overflow: hidden; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--ckui-surface) 94%, transparent); color: var(--ckui-text); text-align: left; }\nbutton.ckui-media-card { cursor: pointer; }\n.ckui-media-card > span { display: grid; flex: 1; min-width: 0; }\n.ckui-media-card strong, .ckui-media-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ckui-media-card small { color: var(--ckui-muted); }\n.ckui-media-card--image { display: grid; max-width: 330px; padding: 0; }\n.ckui-media-card--image img { display: block; width: 100%; max-height: 280px; object-fit: cover; }\n.ckui-media-name { padding: 0 10px 9px; font-size: 11px; }\n.ckui-media-placeholder { min-height: 120px; place-items: center; padding: 20px; }\n\n.ckui-typing { min-height: 26px; padding: 5px 16px; border-top: 1px solid var(--ckui-border); background: var(--ckui-surface); color: var(--ckui-muted); font-size: 11px; }\n.ckui-composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--ckui-border); background: var(--ckui-surface); }\n.ckui-composer__input { flex: 1; min-width: 0; min-height: 38px; max-height: 132px; padding: 9px 11px; resize: none; border: 1px solid var(--ckui-border); border-radius: 8px; outline: 0; background: var(--ckui-surface); box-shadow: 0 1px 2px rgb(0 0 0 / 0.03); }\n.ckui-composer__input::placeholder { color: var(--ckui-muted); }\n.ckui-composer__input:focus { border-color: color-mix(in srgb, var(--ckui-primary) 45%, var(--ckui-border)); }\n.ckui-send-button { display: inline-grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; border-radius: 8px; background: var(--ckui-primary); color: var(--ckui-outgoing-text); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }\n.ckui-send-button:hover:not(:disabled) { opacity: 0.9; }\n.ckui-send-button:disabled, .ckui-icon-button:disabled { cursor: not-allowed; opacity: 0.45; }\n\n.ckui[data-density='compact'] { font-size: 12px; }\n.ckui[data-density='compact'] .ckui-conversation-list__toolbar { min-height: 44px; }\n.ckui[data-density='compact'] .ckui-conversation-item { min-height: 46px; padding: 6px 10px; }\n.ckui[data-density='compact'] .ckui-avatar { --ckui-avatar-size: 30px; font-size: 10px; }\n.ckui[data-density='compact'] .ckui-message-list { gap: 5px; padding: 10px 12px; }\n.ckui[data-density='compact'] .ckui-message-bubble { max-width: 88%; padding: 6px 9px; border-radius: 8px; }\n.ckui[data-density='compact'] .ckui-conversation-header { min-height: 48px; }\n.ckui[data-density='compact'] .ckui-typing { min-height: 22px; padding-block: 3px; }\n.ckui[data-density='compact'] .ckui-composer { padding: 6px 8px; }\n.ckui-spin { animation: ckui-spin 900ms linear infinite; }\n@keyframes ckui-spin { to { transform: rotate(360deg); } }\n@media (prefers-reduced-motion: reduce) { .ckui *, .ckui *::before, .ckui *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }\n@media (max-width: 560px) { .ckui-message-bubble { max-width: 88%; } .ckui-message-list { padding-inline: 12px; } }\n"],"mappings":";AAAA,CAAC;AACD,CAAC;AACC,qBAAmB;AACnB,kBAAgB;AAChB,kBAAgB;AAChB,eAAa;AACb,gBAAc;AACd,iBAAe;AACf,gBAAc;AACd,mBAAiB;AACjB,mBAAiB;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|
+
{"version":3,"sources":["../src/styles.css"],"sourcesContent":[".ckui-theme,\n.ckui {\n --ckui-background: #fafafa;\n --ckui-surface: #ffffff;\n --ckui-primary: #18181b;\n --ckui-text: #09090b;\n --ckui-muted: #71717a;\n --ckui-border: #e4e4e7;\n --ckui-error: #dc2626;\n --ckui-incoming: #f4f4f5;\n --ckui-outgoing: #18181b;\n --ckui-outgoing-text: #fafafa;\n --ckui-badge: #18181b;\n --ckui-radius: 10px;\n --ckui-avatar-size: 40px;\n --ckui-font: ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, \"Segoe UI\", sans-serif;\n}\n\n.ckui-theme .ckui {\n --ckui-background: inherit;\n --ckui-surface: inherit;\n --ckui-primary: inherit;\n --ckui-text: inherit;\n --ckui-muted: inherit;\n --ckui-border: inherit;\n --ckui-error: inherit;\n --ckui-incoming: inherit;\n --ckui-outgoing: inherit;\n --ckui-outgoing-text: inherit;\n --ckui-badge: inherit;\n --ckui-radius: inherit;\n --ckui-avatar-size: inherit;\n --ckui-font: inherit;\n}\n\n.ckui,\n.ckui *,\n.ckui *::before,\n.ckui *::after { box-sizing: border-box; }\n\n.ckui { color: var(--ckui-text); font-family: var(--ckui-font); font-size: 14px; line-height: 1.45; }\n.ckui button, .ckui textarea { color: inherit; font: inherit; }\n.ckui button:focus-visible, .ckui textarea:focus-visible { outline: 2px solid color-mix(in srgb, var(--ckui-primary) 38%, white); outline-offset: 2px; }\n\n.ckui-conversation-list,\n.ckui-conversation {\n display: flex;\n min-width: 0;\n min-height: 0;\n height: 100%;\n overflow: hidden;\n flex-direction: column;\n border: 1px solid var(--ckui-border);\n border-radius: var(--ckui-radius);\n background: var(--ckui-surface);\n box-shadow: 0 1px 2px rgb(0 0 0 / 0.04);\n}\n\n.ckui-scroll-area, .ckui-message-list { min-height: 0; overflow: auto; overscroll-behavior: contain; scrollbar-gutter: stable; }\n.ckui-scroll-area { flex: 1; background: var(--ckui-surface); }\n\n.ckui-conversation-list__toolbar {\n display: flex;\n align-items: center;\n justify-content: space-between;\n min-height: 52px;\n padding: 8px 10px 8px 16px;\n border-bottom: 1px solid var(--ckui-border);\n background: var(--ckui-surface);\n color: var(--ckui-text);\n font-size: 14px;\n font-weight: 600;\n letter-spacing: -0.01em;\n}\n\n.ckui-conversation-list__items { display: grid; }\n.ckui-conversation-item {\n display: grid;\n grid-template-columns: auto minmax(0, 1fr);\n grid-auto-flow: column;\n grid-auto-columns: auto;\n gap: 12px;\n align-items: center;\n width: 100%;\n min-height: 68px;\n padding: 10px 14px;\n border: 0;\n border-bottom: 1px solid var(--ckui-border);\n border-radius: 0;\n background: var(--ckui-surface);\n cursor: pointer;\n text-align: left;\n transition: background-color 120ms ease;\n}\n.ckui-conversation-item:hover { background: color-mix(in srgb, var(--ckui-primary) 4%, var(--ckui-surface)); }\n.ckui-conversation-item[data-selected] { background: color-mix(in srgb, var(--ckui-primary) 7%, var(--ckui-surface)); }\n.ckui-conversation-item__body { display: grid; min-width: 0; gap: 2px; }\n.ckui-conversation-item__body strong, .ckui-conversation-item__body span { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ckui-conversation-item__body strong { font-size: 14px; font-weight: 600; letter-spacing: -0.01em; }\n.ckui-conversation-item__body span { color: var(--ckui-muted); font-size: 12px; }\n.ckui-conversation-item[data-unread] .ckui-conversation-item__body strong { font-weight: 700; }\n.ckui-conversation-item[data-unread] .ckui-conversation-item__body span { color: var(--ckui-text); }\n.ckui-conversation-item__meta { display: grid; flex: 0 0 auto; gap: 4px; justify-items: end; align-self: start; padding-top: 2px; }\n.ckui-conversation-item__time { color: var(--ckui-muted); font-size: 11px; white-space: nowrap; }\n.ckui-unread-badge { display: inline-grid; place-items: center; min-width: 20px; height: 20px; padding: 0 6px; border-radius: 999px; background: var(--ckui-badge); color: var(--ckui-outgoing-text); font-size: 11px; font-weight: 600; line-height: 1; }\n.ckui-unread-badge--dot { min-width: 8px; width: 8px; height: 8px; padding: 0; }\n\n.ckui-avatar {\n display: inline-grid;\n flex: 0 0 auto;\n width: var(--ckui-avatar-size);\n height: var(--ckui-avatar-size);\n overflow: hidden;\n place-items: center;\n border: 1px solid var(--ckui-border);\n border-radius: 999px;\n background: color-mix(in srgb, var(--ckui-primary) 6%, var(--ckui-surface));\n color: var(--ckui-text);\n font-size: 12px;\n font-weight: 600;\n}\n.ckui-avatar__image, .ckui-avatar__fallback { width: 100%; height: 100%; }\n.ckui-avatar__image { object-fit: cover; }\n.ckui-avatar__fallback { display: grid; place-items: center; }\n.ckui-separator { display: none; }\n\n.ckui-icon-button, .ckui-send-button, .ckui-link-button { border: 0; background: transparent; cursor: pointer; }\n.ckui-icon-button { display: inline-grid; flex: 0 0 auto; width: 34px; height: 34px; place-items: center; border-radius: 7px; color: var(--ckui-muted); }\n.ckui-icon-button:hover { background: color-mix(in srgb, var(--ckui-primary) 6%, transparent); color: var(--ckui-text); }\n.ckui-state, .ckui-inline-state { display: flex; align-items: center; justify-content: center; gap: 8px; min-height: 120px; padding: 20px; color: var(--ckui-muted); text-align: center; }\n.ckui-inline-state { min-height: 52px; font-size: 12px; }\n.ckui-state--error, .ckui-conversation-error { color: var(--ckui-error); }\n.ckui-link-button { color: currentColor; font-weight: 600; text-decoration: underline; text-underline-offset: 3px; }\n\n.ckui-conversation-header { display: flex; align-items: center; gap: 10px; min-height: 60px; padding: 8px 12px; border-bottom: 1px solid var(--ckui-border); background: var(--ckui-surface); }\n.ckui-conversation-header__body { display: grid; flex: 1; min-width: 0; gap: 1px; }\n.ckui-conversation-header__body strong { overflow: hidden; font-size: 14px; font-weight: 600; letter-spacing: -0.01em; text-overflow: ellipsis; white-space: nowrap; }\n.ckui-conversation-header__body span { color: var(--ckui-muted); font-size: 12px; }\n.ckui-conversation-error { display: flex; align-items: center; justify-content: space-between; gap: 12px; padding: 8px 14px; border-bottom: 1px solid color-mix(in srgb, var(--ckui-error) 22%, var(--ckui-border)); background: color-mix(in srgb, var(--ckui-error) 5%, var(--ckui-surface)); font-size: 12px; }\n\n.ckui-message-list { display: flex; flex: 1; flex-direction: column; gap: 12px; padding: 18px; background: var(--ckui-background); }\n.ckui-message-row { display: flex; flex-direction: column; align-items: flex-start; }\n.ckui-message-row--outgoing { align-items: flex-end; }\n.ckui-message-bubble { max-width: min(74%, 560px); padding: 9px 12px 7px; border: 1px solid var(--ckui-border); border-radius: calc(var(--ckui-radius) + 2px); background: var(--ckui-incoming); }\n.ckui-message-row--outgoing .ckui-message-bubble { border-color: var(--ckui-outgoing); background: var(--ckui-outgoing); color: var(--ckui-outgoing-text); }\n.ckui-message-sender { display: block; margin-bottom: 3px; color: var(--ckui-muted); font-size: 11px; font-weight: 600; }\n.ckui-message-text { overflow-wrap: anywhere; white-space: pre-wrap; }\n.ckui-message-time { display: flex; align-items: center; justify-content: flex-end; gap: 3px; margin-top: 5px; color: color-mix(in srgb, currentColor 62%, transparent); font-size: 10px; }\n.ckui-read-receipt { min-height: 16px; padding-top: 3px; color: var(--ckui-muted); font-size: 10px; }\n\n.ckui-media { margin-top: 8px; }\n.ckui-media-card { display: flex; align-items: center; gap: 9px; width: 100%; min-width: 210px; padding: 9px; overflow: hidden; border: 1px solid color-mix(in srgb, currentColor 16%, transparent); border-radius: 8px; background: color-mix(in srgb, var(--ckui-surface) 94%, transparent); color: var(--ckui-text); text-align: left; }\nbutton.ckui-media-card { cursor: pointer; }\n.ckui-media-card > span { display: grid; flex: 1; min-width: 0; }\n.ckui-media-card strong, .ckui-media-card small { overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.ckui-media-card small { color: var(--ckui-muted); }\n.ckui-media-card--image { display: grid; max-width: 330px; padding: 0; }\n.ckui-media-card--image img { display: block; width: 100%; max-height: 280px; object-fit: cover; }\n.ckui-media-name { padding: 0 10px 9px; font-size: 11px; }\n.ckui-media-placeholder { min-height: 120px; place-items: center; padding: 20px; }\n\n.ckui-typing { min-height: 26px; padding: 5px 16px; border-top: 1px solid var(--ckui-border); background: var(--ckui-surface); color: var(--ckui-muted); font-size: 11px; }\n.ckui-composer { display: flex; align-items: flex-end; gap: 8px; padding: 10px 12px; border-top: 1px solid var(--ckui-border); background: var(--ckui-surface); }\n.ckui-composer__input { flex: 1; min-width: 0; min-height: 38px; max-height: 132px; padding: 9px 11px; resize: none; border: 1px solid var(--ckui-border); border-radius: 8px; outline: 0; background: var(--ckui-surface); box-shadow: 0 1px 2px rgb(0 0 0 / 0.03); }\n.ckui-composer__input::placeholder { color: var(--ckui-muted); }\n.ckui-composer__input:focus { border-color: color-mix(in srgb, var(--ckui-primary) 45%, var(--ckui-border)); }\n.ckui-send-button { display: inline-grid; flex: 0 0 auto; width: 38px; height: 38px; place-items: center; border-radius: 8px; background: var(--ckui-primary); color: var(--ckui-outgoing-text); box-shadow: 0 1px 2px rgb(0 0 0 / 0.08); }\n.ckui-send-button:hover:not(:disabled) { opacity: 0.9; }\n.ckui-send-button:disabled, .ckui-icon-button:disabled { cursor: not-allowed; opacity: 0.45; }\n\n.ckui[data-density='compact'] { font-size: 12px; }\n.ckui[data-density='compact'] .ckui-conversation-list__toolbar { min-height: 44px; }\n.ckui[data-density='compact'] .ckui-conversation-item { min-height: 46px; padding: 6px 10px; }\n.ckui[data-density='compact'] .ckui-avatar { --ckui-avatar-size: 30px; font-size: 10px; }\n.ckui[data-density='compact'] .ckui-conversation-item__meta { align-self: center; padding-top: 0; }\n.ckui[data-density='compact'] .ckui-unread-badge { min-width: 18px; height: 18px; font-size: 10px; }\n.ckui[data-density='compact'] .ckui-unread-badge--dot { min-width: 8px; height: 8px; }\n.ckui[data-density='compact'] .ckui-message-list { gap: 5px; padding: 10px 12px; }\n.ckui[data-density='compact'] .ckui-message-bubble { max-width: 88%; padding: 6px 9px; border-radius: 8px; }\n.ckui[data-density='compact'] .ckui-conversation-header { min-height: 48px; }\n.ckui[data-density='compact'] .ckui-typing { min-height: 22px; padding-block: 3px; }\n.ckui[data-density='compact'] .ckui-composer { padding: 6px 8px; }\n.ckui-spin { animation: ckui-spin 900ms linear infinite; }\n@keyframes ckui-spin { to { transform: rotate(360deg); } }\n@media (prefers-reduced-motion: reduce) { .ckui *, .ckui *::before, .ckui *::after { scroll-behavior: auto !important; transition-duration: .01ms !important; animation-duration: .01ms !important; animation-iteration-count: 1 !important; } }\n@media (max-width: 560px) { .ckui-message-bubble { max-width: 88%; } .ckui-message-list { padding-inline: 12px; } }\n"],"mappings":";AAAA,CAAC;AACD,CAAC;AACC,qBAAmB;AACnB,kBAAgB;AAChB,kBAAgB;AAChB,eAAa;AACb,gBAAc;AACd,iBAAe;AACf,gBAAc;AACd,mBAAiB;AACjB,mBAAiB;AACjB,wBAAsB;AACtB,gBAAc;AACd,iBAAe;AACf,sBAAoB;AACpB;AAAA,IAAa,aAAa;AAAA,IAAE,SAAS;AAAA,IAAE,aAAa;AAAA,IAAE,kBAAkB;AAAA,IAAE,UAAU;AAAA,IAAE;AACxF;AAEA,CAlBC,WAkBW,CAjBX;AAkBC,qBAAmB;AACnB,kBAAgB;AAChB,kBAAgB;AAChB,eAAa;AACb,gBAAc;AACd,iBAAe;AACf,gBAAc;AACd,mBAAiB;AACjB,mBAAiB;AACjB,wBAAsB;AACtB,gBAAc;AACd,iBAAe;AACf,sBAAoB;AACpB,eAAa;AACf;AAEA,CAlCC;AAmCD,CAnCC,KAmCK;AACN,CApCC,KAoCK,CAAC;AACP,CArCC,KAqCK,CAAC;AAAU,cAAY;AAAY;AAEzC,CAvCC;AAuCO,SAAO,IAAI;AAAc,eAAa,IAAI;AAAc,aAAW;AAAM,eAAa;AAAM;AACpG,CAxCC,KAwCK;AAAQ,CAxCb,KAwCmB;AAAW,SAAO;AAAS,QAAM;AAAS;AAC9D,CAzCC,KAyCK,MAAM;AAAgB,CAzC3B,KAyCiC,QAAQ;AAAiB,WAAS,IAAI,MAAM,UAAU,GAAG,IAAI,EAAE,IAAI,gBAAgB,GAAG,EAAE;AAAQ,kBAAgB;AAAK;AAEvJ,CAAC;AACD,CAAC;AACC,WAAS;AACT,aAAW;AACX,cAAY;AACZ,UAAQ;A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+1,4 @@
|
|
|
1
|
-
import { Conversation as Conversation$1, MessageListOptions, Message, SendMessageInput, MarkConversationReadOptions, RealtimeConnectionHandlers, RealtimeSubscription, MessageEvent, MessageDeletedEvent, ReadEvent, TypingEvent, ReadPosition, MessageMedia, ConvoKitClient } from '@convokitapp/sdk';
|
|
1
|
+
import { Conversation as Conversation$1, InboxPage, MessageListOptions, Message, SendMessageInput, MarkConversationReadOptions, ConversationPrivateState, ClearConversationUnreadOptions, ClearUnreadResult, RealtimeConnectionHandlers, RealtimeSubscription, MessageEvent, MessageDeletedEvent, ReadEvent, TypingEvent, ReadPosition, InboxSummary, MessageMedia, ConvoKitClient, InboxEntry } from '@convokitapp/sdk';
|
|
2
2
|
import * as vue from 'vue';
|
|
3
3
|
import { CSSProperties, HTMLAttributes, Ref, VNodeChild, PropType, MaybeRefOrGetter, TextareaHTMLAttributes } from 'vue';
|
|
4
4
|
|
|
@@ -11,17 +11,39 @@ interface ConvoKitUiClient {
|
|
|
11
11
|
offset: number;
|
|
12
12
|
archived: boolean;
|
|
13
13
|
}): Promise<Conversation$1[]>;
|
|
14
|
+
/** Activity-ordered inbox pages with a preview, unread count and read state per row (core 0.6). Pass the previous
|
|
15
|
+
* `nextCursor` back as `cursor` (null for the head). Adapters without it, and custom page loaders, use the legacy
|
|
16
|
+
* `getConversations` path without summaries; a 404 from this endpoint falls back to that path for the store's life.
|
|
17
|
+
*/
|
|
18
|
+
listInbox?(options: {
|
|
19
|
+
limit: number;
|
|
20
|
+
cursor: string | null;
|
|
21
|
+
archived: boolean;
|
|
22
|
+
}): Promise<InboxPage>;
|
|
23
|
+
/** The room and, from a 0.7 core and backend, the caller's own `membership`; the room store captures
|
|
24
|
+
* `membership.privateStateVersion` once per open for that open's acknowledgements.
|
|
25
|
+
*/
|
|
14
26
|
getConversation(conversationId: string): Promise<Conversation$1>;
|
|
15
27
|
/** Newest first, with a paired value cursor; never derive an offset from rendered rows. */
|
|
16
28
|
getMessages(options: MessageListOptions): Promise<Message[]>;
|
|
17
29
|
/** Complete authorized message, including related media absent from raw row events. */
|
|
18
30
|
getMessage(id: string): Promise<Message>;
|
|
19
31
|
sendMessage(input: SendMessageInput): Promise<Message>;
|
|
20
|
-
/** Acknowledge through `options.throughMessageId` (the newest rendered row). Custom adapters must forward
|
|
21
|
-
*
|
|
22
|
-
*
|
|
32
|
+
/** Acknowledge through `options.throughMessageId` (the newest rendered row). Custom adapters must forward the
|
|
33
|
+
* options unchanged (0.7 adds `privateStateVersion`, the version captured when the room opened; an adapter that
|
|
34
|
+
* drops it acknowledges the position but never clears the caller's unread marker) and reject a missing target
|
|
35
|
+
* with `code: 'MESSAGE_NOT_FOUND'` (or a 404 without a code); the UI never sends a request without a target.
|
|
36
|
+
* Membership failures keep their error code, if any, so they surface as errors.
|
|
23
37
|
*/
|
|
24
38
|
markConversationRead(conversationId: string, options?: MarkConversationReadOptions): Promise<void>;
|
|
39
|
+
/** Mark the room unread for the caller only (0.7.0). Optional: `markUnread` rejects without it. */
|
|
40
|
+
markConversationUnread?(conversationId: string): Promise<ConversationPrivateState>;
|
|
41
|
+
/** Remove the caller's unread marker, only while it still has `options.ifVersion` when given (0.7.0); a mismatch or
|
|
42
|
+
* an unmarked room answers `cleared: false`, never an error. Optional: `clearUnread` rejects without it, and a room
|
|
43
|
+
* opened with a marker that renders nothing leaves the marker in place (the room store clears it through this
|
|
44
|
+
* member, never through an untargeted acknowledgement).
|
|
45
|
+
*/
|
|
46
|
+
clearConversationUnread?(conversationId: string, options?: ClearConversationUnreadOptions): Promise<ClearUnreadResult>;
|
|
25
47
|
sendTyping(input: {
|
|
26
48
|
conversationId: string;
|
|
27
49
|
isTyping: boolean;
|
|
@@ -29,6 +51,11 @@ interface ConvoKitUiClient {
|
|
|
29
51
|
onConnectionEvent(handlers: RealtimeConnectionHandlers): RealtimeSubscription;
|
|
30
52
|
/** Notify on inbox mutations AND on initial subscription/reconnect. No room data in the signal. */
|
|
31
53
|
onInboxChanged(handler: () => void, onError?: (error: Error) => void): RealtimeSubscription;
|
|
54
|
+
/** Message inserts/edits, read-position advances and the caller's own unread-marker changes in the caller's
|
|
55
|
+
* rooms; never fires on join/rejoin. The list store throttles these (`activityRefreshWindowMs`); room stores
|
|
56
|
+
* ignore them.
|
|
57
|
+
*/
|
|
58
|
+
onInboxActivity?(handler: () => void, onError?: (error: Error) => void): RealtimeSubscription;
|
|
32
59
|
onMessage(conversationId: string, handler: (event: MessageEvent) => void, onError?: (error: Error) => void): RealtimeSubscription;
|
|
33
60
|
onMessageDeleted(conversationId: string, handler: (event: MessageDeletedEvent) => void, onError?: (error: Error) => void): RealtimeSubscription;
|
|
34
61
|
onReadReceipt(conversationId: string, handler: (event: ReadEvent) => void, onError?: (error: Error) => void): RealtimeSubscription;
|
|
@@ -51,6 +78,12 @@ interface ConversationPageRequest {
|
|
|
51
78
|
type ConversationPageLoader = (request: ConversationPageRequest) => Promise<Conversation$1[]>;
|
|
52
79
|
interface ConversationListState {
|
|
53
80
|
conversations: Readonly<Ref<Conversation$1[]>>;
|
|
81
|
+
/** Per-room preview, unread count, read state and private unread marker (`isUnread`, `unreadMarkedAt`,
|
|
82
|
+
* `privateStateVersion`, 0.7.0) by conversation ID; empty on the legacy `getConversations` path.
|
|
83
|
+
*/
|
|
84
|
+
summaries: Readonly<Ref<ReadonlyMap<string, InboxSummary>>>;
|
|
85
|
+
/** The bound session's user; `''` without a session, on the legacy path and after disposal. */
|
|
86
|
+
currentUserId: Readonly<Ref<string>>;
|
|
54
87
|
filter: Readonly<Ref<ConversationFilter>>;
|
|
55
88
|
isInitialLoading: Readonly<Ref<boolean>>;
|
|
56
89
|
isLoadingMore: Readonly<Ref<boolean>>;
|
|
@@ -89,6 +122,12 @@ interface ConversationItemSlotProps {
|
|
|
89
122
|
index: number;
|
|
90
123
|
selected: boolean;
|
|
91
124
|
select: () => void;
|
|
125
|
+
/** Present when the list carries an inbox summary for this row (0.6.0); `summary.isUnread` (0.7.0) is the row's
|
|
126
|
+
* unread state including the viewer's private marker.
|
|
127
|
+
*/
|
|
128
|
+
summary?: InboxSummary;
|
|
129
|
+
/** Present when the list knows the viewer (0.6.0); compare with `summary.latestMessage.senderId`. */
|
|
130
|
+
currentUserId?: string;
|
|
92
131
|
}
|
|
93
132
|
interface MessageSlotProps {
|
|
94
133
|
message: Message;
|
|
@@ -979,6 +1018,8 @@ interface UseConversationListOptions {
|
|
|
979
1018
|
initialFilter?: ConversationFilter;
|
|
980
1019
|
pageSize?: number;
|
|
981
1020
|
autoLoad?: boolean;
|
|
1021
|
+
/** Max-wait window (ms) that coalesces `inbox_activity` signals into one refresh; default 500, 0 = immediate. */
|
|
1022
|
+
activityRefreshWindowMs?: number;
|
|
982
1023
|
}
|
|
983
1024
|
interface ConversationListController extends ConversationListState {
|
|
984
1025
|
loadInitial(): Promise<void>;
|
|
@@ -986,12 +1027,26 @@ interface ConversationListController extends ConversationListState {
|
|
|
986
1027
|
loadMore(): Promise<void>;
|
|
987
1028
|
setFilter(filter: ConversationFilter): Promise<void>;
|
|
988
1029
|
setQuery(query: string): Promise<void>;
|
|
1030
|
+
/** Mark a room unread for the viewer only (0.7.0); its summary shows the marker at once. Rejects when the adapter
|
|
1031
|
+
* lacks `markConversationUnread`.
|
|
1032
|
+
*/
|
|
1033
|
+
markUnread(conversationId: string): Promise<void>;
|
|
1034
|
+
/** Remove the viewer's marker, only while it still has `options.ifVersion` when given; resolves to whether this
|
|
1035
|
+
* request removed it. Rejects when the adapter lacks `clearConversationUnread`.
|
|
1036
|
+
*/
|
|
1037
|
+
clearUnread(conversationId: string, options?: ClearConversationUnreadOptions): Promise<boolean>;
|
|
989
1038
|
dispose(): Promise<void>;
|
|
990
1039
|
}
|
|
991
1040
|
declare function useConversationList(options: UseConversationListOptions): ConversationListController;
|
|
992
1041
|
|
|
993
1042
|
interface ConversationListViewProps extends ConvoKitAppearanceProps {
|
|
994
1043
|
conversations: readonly Conversation$1[];
|
|
1044
|
+
/** Inbox summaries by conversation ID (0.6.0). Rows with one show a preview, time and unread badge: the count, or
|
|
1045
|
+
* a numberless dot when `isUnread` is set without one (0.7.0).
|
|
1046
|
+
*/
|
|
1047
|
+
summaries?: ReadonlyMap<string, InboxSummary>;
|
|
1048
|
+
/** The viewer; a preview from them reads `You: …`. Absent → no prefix. */
|
|
1049
|
+
currentUserId?: string;
|
|
995
1050
|
selectedConversationId?: string;
|
|
996
1051
|
onConversationSelect?: (conversation: Conversation$1) => void;
|
|
997
1052
|
onRefresh?: () => void | Promise<void>;
|
|
@@ -1012,6 +1067,14 @@ declare const ConversationListView: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1012
1067
|
readonly type: PropType<readonly Conversation$1[]>;
|
|
1013
1068
|
readonly required: true;
|
|
1014
1069
|
};
|
|
1070
|
+
readonly summaries: {
|
|
1071
|
+
readonly type: PropType<ReadonlyMap<string, InboxSummary>>;
|
|
1072
|
+
readonly default: undefined;
|
|
1073
|
+
};
|
|
1074
|
+
readonly currentUserId: {
|
|
1075
|
+
readonly type: StringConstructor;
|
|
1076
|
+
readonly default: undefined;
|
|
1077
|
+
};
|
|
1015
1078
|
readonly selectedConversationId: {
|
|
1016
1079
|
readonly type: StringConstructor;
|
|
1017
1080
|
readonly default: undefined;
|
|
@@ -1083,6 +1146,14 @@ declare const ConversationListView: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1083
1146
|
readonly type: PropType<readonly Conversation$1[]>;
|
|
1084
1147
|
readonly required: true;
|
|
1085
1148
|
};
|
|
1149
|
+
readonly summaries: {
|
|
1150
|
+
readonly type: PropType<ReadonlyMap<string, InboxSummary>>;
|
|
1151
|
+
readonly default: undefined;
|
|
1152
|
+
};
|
|
1153
|
+
readonly currentUserId: {
|
|
1154
|
+
readonly type: StringConstructor;
|
|
1155
|
+
readonly default: undefined;
|
|
1156
|
+
};
|
|
1086
1157
|
readonly selectedConversationId: {
|
|
1087
1158
|
readonly type: StringConstructor;
|
|
1088
1159
|
readonly default: undefined;
|
|
@@ -1149,6 +1220,7 @@ declare const ConversationListView: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1149
1220
|
"onLoad-more"?: () => any;
|
|
1150
1221
|
}>, {
|
|
1151
1222
|
readonly isInitialLoading: boolean;
|
|
1223
|
+
readonly currentUserId: string;
|
|
1152
1224
|
readonly scrollElement: Ref<HTMLElement | null, HTMLElement | null>;
|
|
1153
1225
|
readonly paginationThreshold: number;
|
|
1154
1226
|
readonly classNames: Partial<Record<ConvoKitUiPart, string>>;
|
|
@@ -1156,6 +1228,7 @@ declare const ConversationListView: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1156
1228
|
readonly density: ConvoKitUiDensity;
|
|
1157
1229
|
readonly unstyled: boolean;
|
|
1158
1230
|
readonly onRefresh: () => void | Promise<void>;
|
|
1231
|
+
readonly summaries: ReadonlyMap<string, InboxSummary>;
|
|
1159
1232
|
readonly isLoadingMore: boolean;
|
|
1160
1233
|
readonly hasMore: boolean;
|
|
1161
1234
|
readonly selectedConversationId: string;
|
|
@@ -1193,10 +1266,22 @@ declare const ConversationList: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1193
1266
|
type: BooleanConstructor;
|
|
1194
1267
|
default: boolean;
|
|
1195
1268
|
};
|
|
1269
|
+
activityRefreshWindowMs: {
|
|
1270
|
+
type: NumberConstructor;
|
|
1271
|
+
default: undefined;
|
|
1272
|
+
};
|
|
1196
1273
|
onControllerChange: {
|
|
1197
1274
|
type: PropType<(controller: ConversationListController) => void>;
|
|
1198
1275
|
default: undefined;
|
|
1199
1276
|
};
|
|
1277
|
+
summaries: {
|
|
1278
|
+
readonly type: PropType<ReadonlyMap<string, InboxSummary>>;
|
|
1279
|
+
readonly default: undefined;
|
|
1280
|
+
};
|
|
1281
|
+
currentUserId: {
|
|
1282
|
+
readonly type: StringConstructor;
|
|
1283
|
+
readonly default: undefined;
|
|
1284
|
+
};
|
|
1200
1285
|
selectedConversationId: {
|
|
1201
1286
|
readonly type: StringConstructor;
|
|
1202
1287
|
readonly default: undefined;
|
|
@@ -1284,10 +1369,22 @@ declare const ConversationList: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1284
1369
|
type: BooleanConstructor;
|
|
1285
1370
|
default: boolean;
|
|
1286
1371
|
};
|
|
1372
|
+
activityRefreshWindowMs: {
|
|
1373
|
+
type: NumberConstructor;
|
|
1374
|
+
default: undefined;
|
|
1375
|
+
};
|
|
1287
1376
|
onControllerChange: {
|
|
1288
1377
|
type: PropType<(controller: ConversationListController) => void>;
|
|
1289
1378
|
default: undefined;
|
|
1290
1379
|
};
|
|
1380
|
+
summaries: {
|
|
1381
|
+
readonly type: PropType<ReadonlyMap<string, InboxSummary>>;
|
|
1382
|
+
readonly default: undefined;
|
|
1383
|
+
};
|
|
1384
|
+
currentUserId: {
|
|
1385
|
+
readonly type: StringConstructor;
|
|
1386
|
+
readonly default: undefined;
|
|
1387
|
+
};
|
|
1291
1388
|
selectedConversationId: {
|
|
1292
1389
|
readonly type: StringConstructor;
|
|
1293
1390
|
readonly default: undefined;
|
|
@@ -1353,6 +1450,7 @@ declare const ConversationList: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1353
1450
|
"onConversation-select"?: (...args: any[]) => any;
|
|
1354
1451
|
}>, {
|
|
1355
1452
|
isInitialLoading: boolean;
|
|
1453
|
+
currentUserId: string;
|
|
1356
1454
|
scrollElement: Ref<HTMLElement | null, HTMLElement | null>;
|
|
1357
1455
|
paginationThreshold: number;
|
|
1358
1456
|
classNames: Partial<Record<ConvoKitUiPart, string>>;
|
|
@@ -1363,6 +1461,7 @@ declare const ConversationList: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1363
1461
|
autoLoad: boolean;
|
|
1364
1462
|
onControllerChange: (controller: ConversationListController) => void;
|
|
1365
1463
|
conversations: readonly Conversation$1[];
|
|
1464
|
+
summaries: ReadonlyMap<string, InboxSummary>;
|
|
1366
1465
|
isLoadingMore: boolean;
|
|
1367
1466
|
hasMore: boolean;
|
|
1368
1467
|
selectedConversationId: string;
|
|
@@ -1372,8 +1471,29 @@ declare const ConversationList: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1372
1471
|
pageLoader: ConversationPageLoader;
|
|
1373
1472
|
initialFilter: ConversationFilter;
|
|
1374
1473
|
pageSize: number;
|
|
1474
|
+
activityRefreshWindowMs: number;
|
|
1375
1475
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1376
1476
|
|
|
1477
|
+
/** Whether a message is an optimistic row awaiting server acknowledgement. */
|
|
1478
|
+
declare function isConvoKitPendingMessage(message: Message): boolean;
|
|
1479
|
+
declare function matchesConversation(conversation: Conversation$1, filter: ConversationFilter): boolean;
|
|
1480
|
+
declare function applyConversationFilter(conversations: readonly Conversation$1[], filter: ConversationFilter): Conversation$1[];
|
|
1481
|
+
declare function mergeConversations(current: readonly Conversation$1[], incoming: readonly Conversation$1[]): Conversation$1[];
|
|
1482
|
+
/** Merge inbox pages by conversation ID: a later entry replaces an earlier one (its room moved), and the result is
|
|
1483
|
+
* re-ordered by `(activityAt desc, id desc)`. Server order is authoritative within a page; this is the rule applied
|
|
1484
|
+
* whenever pages are combined (load more, refresh).
|
|
1485
|
+
*/
|
|
1486
|
+
declare function mergeInboxEntries(current: readonly InboxEntry[], incoming: readonly InboxEntry[]): InboxEntry[];
|
|
1487
|
+
/** Device-zone clock time, shared by message rows and inbox rows. */
|
|
1488
|
+
declare function formatMessageTime(date: Date): string;
|
|
1489
|
+
declare function mergeMessages(current: readonly Message[], incoming: readonly Message[]): Message[];
|
|
1490
|
+
/** Readers of a message under the unified rule: a user's read position (createdAt, id) wins when present,
|
|
1491
|
+
* otherwise the acknowledgement time is compared with createdAt (legacy participants, empty-room acknowledgements).
|
|
1492
|
+
* The sender and pending rows never have readers.
|
|
1493
|
+
*/
|
|
1494
|
+
declare function readerIdsFor(message: Message, readAtByUserId: ReadonlyMap<string, Date>, readPositionByUserId?: ReadonlyMap<string, ReadPosition>): ReadonlySet<string>;
|
|
1495
|
+
declare function formatFileSize(size: number | undefined): string | null;
|
|
1496
|
+
|
|
1377
1497
|
interface MessageListViewProps extends ConvoKitAppearanceProps {
|
|
1378
1498
|
conversation: Conversation$1;
|
|
1379
1499
|
messages: readonly Message[];
|
|
@@ -1397,7 +1517,6 @@ interface MessageListViewProps extends ConvoKitAppearanceProps {
|
|
|
1397
1517
|
class?: unknown;
|
|
1398
1518
|
style?: unknown;
|
|
1399
1519
|
}
|
|
1400
|
-
declare function defaultFormatTime(date: Date): string;
|
|
1401
1520
|
/** Controlled message history with read receipts, structured media, and older-page loading. */
|
|
1402
1521
|
declare const MessageListView: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
1403
1522
|
conversation: {
|
|
@@ -1462,7 +1581,7 @@ declare const MessageListView: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1462
1581
|
};
|
|
1463
1582
|
formatTime: {
|
|
1464
1583
|
type: PropType<(date: Date) => string>;
|
|
1465
|
-
default: typeof
|
|
1584
|
+
default: typeof formatMessageTime;
|
|
1466
1585
|
};
|
|
1467
1586
|
imageLoading: {
|
|
1468
1587
|
type: PropType<"eager" | "lazy">;
|
|
@@ -1549,7 +1668,7 @@ declare const MessageListView: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1549
1668
|
};
|
|
1550
1669
|
formatTime: {
|
|
1551
1670
|
type: PropType<(date: Date) => string>;
|
|
1552
|
-
default: typeof
|
|
1671
|
+
default: typeof formatMessageTime;
|
|
1553
1672
|
};
|
|
1554
1673
|
imageLoading: {
|
|
1555
1674
|
type: PropType<"eager" | "lazy">;
|
|
@@ -1606,6 +1725,8 @@ interface ConvoKitTheme {
|
|
|
1606
1725
|
incomingBubble: string;
|
|
1607
1726
|
outgoingBubble: string;
|
|
1608
1727
|
outgoingText: string;
|
|
1728
|
+
/** Unread badge and dot background (0.6.0); the badge label uses `outgoingText`. Defaults to the primary color. */
|
|
1729
|
+
badge: string;
|
|
1609
1730
|
radius: string;
|
|
1610
1731
|
avatarSize: string;
|
|
1611
1732
|
fontFamily: string;
|
|
@@ -1646,17 +1767,4 @@ declare const ConvoKitThemeProvider: vue.DefineComponent<vue.ExtractPropTypes<{
|
|
|
1646
1767
|
}, {}, {}, {}, string, vue.ComponentProvideOptions, true, {}, any>;
|
|
1647
1768
|
declare function useConvoKitTheme(): Readonly<Ref<ConvoKitTheme>>;
|
|
1648
1769
|
|
|
1649
|
-
|
|
1650
|
-
declare function isConvoKitPendingMessage(message: Message): boolean;
|
|
1651
|
-
declare function matchesConversation(conversation: Conversation$1, filter: ConversationFilter): boolean;
|
|
1652
|
-
declare function applyConversationFilter(conversations: readonly Conversation$1[], filter: ConversationFilter): Conversation$1[];
|
|
1653
|
-
declare function mergeConversations(current: readonly Conversation$1[], incoming: readonly Conversation$1[]): Conversation$1[];
|
|
1654
|
-
declare function mergeMessages(current: readonly Message[], incoming: readonly Message[]): Message[];
|
|
1655
|
-
/** Readers of a message under the unified rule: a user's read position (createdAt, id) wins when present,
|
|
1656
|
-
* otherwise the acknowledgement time is compared with createdAt (legacy participants, empty-room acknowledgements).
|
|
1657
|
-
* The sender and pending rows never have readers.
|
|
1658
|
-
*/
|
|
1659
|
-
declare function readerIdsFor(message: Message, readAtByUserId: ReadonlyMap<string, Date>, readPositionByUserId?: ReadonlyMap<string, ReadPosition>): ReadonlySet<string>;
|
|
1660
|
-
declare function formatFileSize(size: number | undefined): string | null;
|
|
1661
|
-
|
|
1662
|
-
export { type BaseViewProps, type ComposerSlotProps, Conversation, type ConversationController, type ConversationFilter, type ConversationItemSlotProps, ConversationList, type ConversationListController, type ConversationListProps, type ConversationListState, ConversationListView, type ConversationListViewProps, type ConversationPageLoader, type ConversationPageRequest, type ConversationProps, type ConversationState, ConversationView, type ConversationViewProps, type ConvoKitAppearanceProps, ConvoKitAvatar, type ConvoKitTheme, ConvoKitThemeProvider, type ConvoKitUiClient, type ConvoKitUiDensity, type ConvoKitUiPart, type ErrorSlot, type ErrorSlotProps, type MediaSlotProps, MessageListView, type MessageListViewProps, type MessageSlotProps, type ReadReceiptSlotProps, type ScrollOptions, type StateSlot, type TypingSlotProps, type UseConversationListOptions, type UseConversationOptions, applyConversationFilter, createConvoKitUiClient, defaultConvoKitTheme, defaultReadersResolver, formatFileSize, isConvoKitPendingMessage, matchesConversation, mergeConversations, mergeMessages, readerIdsFor, useConversation, useConversationList, useConvoKitTheme };
|
|
1770
|
+
export { type BaseViewProps, type ComposerSlotProps, Conversation, type ConversationController, type ConversationFilter, type ConversationItemSlotProps, ConversationList, type ConversationListController, type ConversationListProps, type ConversationListState, ConversationListView, type ConversationListViewProps, type ConversationPageLoader, type ConversationPageRequest, type ConversationProps, type ConversationState, ConversationView, type ConversationViewProps, type ConvoKitAppearanceProps, ConvoKitAvatar, type ConvoKitTheme, ConvoKitThemeProvider, type ConvoKitUiClient, type ConvoKitUiDensity, type ConvoKitUiPart, type ErrorSlot, type ErrorSlotProps, type MediaSlotProps, MessageListView, type MessageListViewProps, type MessageSlotProps, type ReadReceiptSlotProps, type ScrollOptions, type StateSlot, type TypingSlotProps, type UseConversationListOptions, type UseConversationOptions, applyConversationFilter, createConvoKitUiClient, defaultConvoKitTheme, defaultReadersResolver, formatFileSize, isConvoKitPendingMessage, matchesConversation, mergeConversations, mergeInboxEntries, mergeMessages, readerIdsFor, useConversation, useConversationList, useConvoKitTheme };
|