@adatechnology/conversations-ui 0.4.2 → 0.6.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.
Files changed (110) hide show
  1. package/README.md +231 -0
  2. package/dist/{ConversationSimulatorPanel-DnXElfY8.d.ts → ConversationSimulatorPanel-CrfFjiWh.d.ts} +2 -268
  3. package/dist/{chunk-PJNR6UMN.js → chunk-CBYEHPX6.js} +1 -63
  4. package/dist/{chunk-4P5KMWOI.js → chunk-FAQLC3TX.js} +327 -522
  5. package/dist/{chunk-HMCOTZAX.js → chunk-HOKNKXIT.js} +1 -1
  6. package/dist/chunk-MRVFFJEH.js +64 -0
  7. package/dist/chunk-O6457XHK.js +255 -0
  8. package/dist/chunk-OVFCLRQQ.js +84 -0
  9. package/dist/flows/index.js +5 -3
  10. package/dist/index.d.ts +21 -5
  11. package/dist/index.js +783 -807
  12. package/dist/participant/index.d.ts +186 -0
  13. package/dist/participant/index.js +1708 -0
  14. package/dist/preview/index.d.ts +4 -2
  15. package/dist/preview/index.js +4 -2
  16. package/dist/quickReply.types-B4gmZsSr.d.ts +274 -0
  17. package/dist/styles.css +689 -0
  18. package/package.json +8 -4
  19. package/src/ChannelIcon.tsx +2 -0
  20. package/src/MessageText.test.tsx +76 -0
  21. package/src/MessageText.tsx +28 -12
  22. package/src/MessageTextCopiedBadge.tsx +15 -0
  23. package/src/StatusTicks.test.tsx +51 -0
  24. package/src/StatusTicks.tsx +36 -6
  25. package/src/buildOutput.test.ts +41 -0
  26. package/src/channelCapability.test.ts +17 -0
  27. package/src/conversationChannel.test.ts +30 -1
  28. package/src/conversationChannel.ts +19 -1
  29. package/src/legacyChannels.golden.test.ts +89 -0
  30. package/src/legacyDefaults.golden.test.tsx +127 -0
  31. package/src/legacyStyles.fixture.css +1121 -0
  32. package/src/legacyStyles.golden.test.ts +121 -0
  33. package/src/messageTextCopyInteraction.test.ts +75 -0
  34. package/src/messageTextCopyInteraction.ts +37 -0
  35. package/src/participant/ParticipantAttachmentItem.tsx +77 -0
  36. package/src/participant/ParticipantChannelBadges.test.tsx +59 -0
  37. package/src/participant/ParticipantChannelBadges.tsx +75 -0
  38. package/src/participant/ParticipantComposer.test.tsx +97 -0
  39. package/src/participant/ParticipantComposer.tsx +167 -0
  40. package/src/participant/ParticipantConversations.test.tsx +90 -0
  41. package/src/participant/ParticipantConversations.tsx +49 -0
  42. package/src/participant/ParticipantConversationsScreen.tsx +78 -0
  43. package/src/participant/ParticipantInbox.test.tsx +244 -0
  44. package/src/participant/ParticipantInbox.tsx +149 -0
  45. package/src/participant/ParticipantInboxRow.tsx +75 -0
  46. package/src/participant/ParticipantInboxSearchField.tsx +34 -0
  47. package/src/participant/ParticipantLoadState.tsx +27 -0
  48. package/src/participant/ParticipantMessageBubble.test.tsx +167 -0
  49. package/src/participant/ParticipantMessageBubble.tsx +185 -0
  50. package/src/participant/ParticipantProtocolBadge.tsx +74 -0
  51. package/src/participant/ParticipantProtocolView.test.tsx +208 -0
  52. package/src/participant/ParticipantThread.test.tsx +149 -0
  53. package/src/participant/ParticipantThread.tsx +184 -0
  54. package/src/participant/ParticipantThreadScreen.tsx +135 -0
  55. package/src/participant/bindAttachmentUrlResolver.test.ts +25 -0
  56. package/src/participant/bindAttachmentUrlResolver.ts +7 -0
  57. package/src/participant/index.ts +26 -0
  58. package/src/participant/participant.types.ts +52 -0
  59. package/src/participant/participantApi.types.ts +59 -0
  60. package/src/participant/participantAttachmentUrl.test.ts +32 -0
  61. package/src/participant/participantAttachmentUrl.ts +10 -0
  62. package/src/participant/participantBubbleActions.test.ts +44 -0
  63. package/src/participant/participantBubbleActions.ts +40 -0
  64. package/src/participant/participantChannels.test.ts +42 -0
  65. package/src/participant/participantChannels.ts +33 -0
  66. package/src/participant/participantDrafts.test.ts +65 -0
  67. package/src/participant/participantDrafts.ts +50 -0
  68. package/src/participant/participantFileValidation.test.ts +86 -0
  69. package/src/participant/participantFileValidation.ts +72 -0
  70. package/src/participant/participantFixtures.test-helper.ts +41 -0
  71. package/src/participant/participantGrouping.test.ts +236 -0
  72. package/src/participant/participantGrouping.ts +90 -0
  73. package/src/participant/participantInboxState.test.ts +69 -0
  74. package/src/participant/participantInboxState.ts +74 -0
  75. package/src/participant/participantLabels.ts +115 -0
  76. package/src/participant/participantLoadView.test.ts +23 -0
  77. package/src/participant/participantLoadView.ts +21 -0
  78. package/src/participant/participantMessages.test.ts +128 -0
  79. package/src/participant/participantMessages.ts +73 -0
  80. package/src/participant/participantNewMessages.test.ts +54 -0
  81. package/src/participant/participantNewMessages.ts +29 -0
  82. package/src/participant/participantProtocol.test.ts +104 -0
  83. package/src/participant/participantProtocol.ts +52 -0
  84. package/src/participant/participantProtocolCopy.test.ts +45 -0
  85. package/src/participant/participantProtocolCopy.ts +32 -0
  86. package/src/participant/participantQuickReply.test.ts +23 -0
  87. package/src/participant/participantQuickReply.ts +6 -0
  88. package/src/participant/participantScroll.test.ts +69 -0
  89. package/src/participant/participantScroll.ts +43 -0
  90. package/src/participant/participantSendController.test.ts +201 -0
  91. package/src/participant/participantSendController.ts +134 -0
  92. package/src/participant/participantSendStates.ts +31 -0
  93. package/src/participant/participantTheme.ts +20 -0
  94. package/src/participant/participantThreadState.test.ts +75 -0
  95. package/src/participant/participantThreadState.ts +59 -0
  96. package/src/participant/shouldMarkRead.test.ts +24 -0
  97. package/src/participant/shouldMarkRead.ts +16 -0
  98. package/src/participant/useDocumentVisibility.ts +18 -0
  99. package/src/participant/useParticipantConversationView.ts +60 -0
  100. package/src/participant/useParticipantDraft.ts +45 -0
  101. package/src/participant/useParticipantInbox.ts +57 -0
  102. package/src/participant/useParticipantMarkRead.ts +26 -0
  103. package/src/participant/useParticipantRevalidation.ts +36 -0
  104. package/src/participant/useParticipantSend.ts +84 -0
  105. package/src/participant/useParticipantThread.ts +116 -0
  106. package/src/participant/useParticipantThreadScroll.ts +26 -0
  107. package/src/participant/useStickToBottom.ts +77 -0
  108. package/src/preview/ConversationSimulatorPanel.tsx +8 -0
  109. package/src/styles.css +178 -0
  110. package/src/types.ts +3 -1
package/src/styles.css CHANGED
@@ -1119,3 +1119,181 @@
1119
1119
  border-top-color: rgb(51 65 85);
1120
1120
  background: rgb(17 24 39);
1121
1121
  }
1122
+
1123
+ .cv-status-ticks { display: flex; align-items: center; line-height: 1; cursor: help; }
1124
+ .cv-status-ticks--queued,
1125
+ .cv-status-ticks--sent,
1126
+ .cv-status-ticks--delivered { color: rgb(0 0 0 / 40%); }
1127
+ .dark .cv-status-ticks--queued,
1128
+ .dark .cv-status-ticks--sent,
1129
+ .dark .cv-status-ticks--delivered { color: rgb(255 255 255 / 40%); }
1130
+ .cv-status-ticks--read { color: rgb(14 165 233); }
1131
+ .cv-status-ticks--failed { color: rgb(239 68 68); }
1132
+
1133
+ .cv-message-text { position: relative; font-size: 14.2px; line-height: 19px; white-space: pre-wrap; overflow-wrap: break-word; word-break: break-word; }
1134
+ .cv-message-text--copyable { user-select: all; cursor: pointer; }
1135
+ .cv-message-text strong { font-weight: 700; }
1136
+ .cv-message-text em { font-style: italic; }
1137
+ .cv-message-text del { text-decoration-line: line-through; }
1138
+ .cv-message-text__copied { position: absolute; top: 0; right: 0; transform: translateY(-100%); background: #3b4a54; color: #fff; font-size: 11px; padding: 0.125rem 0.375rem; border-radius: 0.25rem; box-shadow: 0 10px 15px -3px rgb(0 0 0 / 0.1), 0 4px 6px -4px rgb(0 0 0 / 0.1); }
1139
+
1140
+ /* Participant view (.cv-p-*). Public theming API: override --cv-p-surface, --cv-p-surface-raised,
1141
+ --cv-p-text, --cv-p-text-muted, --cv-p-border, --cv-p-accent, --cv-p-accent-contrast,
1142
+ --cv-p-highlight, --cv-p-danger, --cv-p-radius, --cv-p-channel-app, --cv-p-channel-whatsapp on .cv-p or any
1143
+ ancestor. Channel colors must keep 3:1 against surface, surface-raised and highlight. */
1144
+ .cv-p {
1145
+ --cv-p-i-surface: var(--cv-p-surface, #ffffff);
1146
+ --cv-p-i-surface-raised: var(--cv-p-surface-raised, #f3f4f6);
1147
+ --cv-p-i-text: var(--cv-p-text, #111827);
1148
+ --cv-p-i-text-muted: var(--cv-p-text-muted, #5b6573);
1149
+ --cv-p-i-border: var(--cv-p-border, #d5d9df);
1150
+ --cv-p-i-accent: var(--cv-p-accent, #a85a1c);
1151
+ --cv-p-i-accent-contrast: var(--cv-p-accent-contrast, #ffffff);
1152
+ --cv-p-i-highlight: var(--cv-p-highlight, #fbefe2);
1153
+ --cv-p-i-danger: var(--cv-p-danger, #c62828);
1154
+ --cv-p-i-radius: var(--cv-p-radius, 0);
1155
+ --cv-p-i-touch: 2.75rem;
1156
+ display: flex;
1157
+ flex-direction: column;
1158
+ min-height: 0;
1159
+ height: 100%;
1160
+ background: var(--cv-p-i-surface);
1161
+ color: var(--cv-p-i-text);
1162
+ font-family: 'Avenir Next', Avenir, 'Segoe UI', sans-serif;
1163
+ line-height: 1.4;
1164
+ box-sizing: border-box;
1165
+ }
1166
+ .dark .cv-p {
1167
+ --cv-p-i-surface: var(--cv-p-surface, #10222c);
1168
+ --cv-p-i-surface-raised: var(--cv-p-surface-raised, #1c2b33);
1169
+ --cv-p-i-text: var(--cv-p-text, #f0f2ee);
1170
+ --cv-p-i-text-muted: var(--cv-p-text-muted, #8fa3ad);
1171
+ --cv-p-i-border: var(--cv-p-border, rgb(143 163 173 / 26%));
1172
+ --cv-p-i-accent: var(--cv-p-accent, #d58a47);
1173
+ --cv-p-i-accent-contrast: var(--cv-p-accent-contrast, #10222c);
1174
+ --cv-p-i-highlight: var(--cv-p-highlight, rgb(213 138 71 / 10%));
1175
+ --cv-p-i-danger: var(--cv-p-danger, #ff6b63);
1176
+ }
1177
+ .cv-p *, .cv-p *::before, .cv-p *::after { box-sizing: border-box; }
1178
+ .cv-p :focus-visible { outline: 2px solid var(--cv-p-i-accent); outline-offset: 2px; }
1179
+ .cv-p-sr-only {
1180
+ position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0;
1181
+ overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0;
1182
+ }
1183
+
1184
+ .cv-p-button, .cv-p-chip, .cv-p-row, .cv-p-thread__older, .cv-p-bubble__retry, .cv-p-bubble__action {
1185
+ font: inherit; color: inherit; cursor: pointer;
1186
+ }
1187
+ .cv-p-button {
1188
+ min-height: var(--cv-p-i-touch); min-width: var(--cv-p-i-touch); padding: 0 0.75rem;
1189
+ background: transparent; border: 1px solid var(--cv-p-i-border); border-radius: var(--cv-p-i-radius);
1190
+ display: inline-flex; align-items: center; justify-content: center;
1191
+ }
1192
+ .cv-p-button:disabled { opacity: 0.45; cursor: not-allowed; }
1193
+ .cv-p-button--primary { background: var(--cv-p-i-accent); border-color: var(--cv-p-i-accent); color: var(--cv-p-i-accent-contrast); font-weight: 600; }
1194
+ .cv-p-chip {
1195
+ flex: none; min-height: 2.75rem; padding: 0 0.875rem; display: inline-flex; align-items: center; gap: 0.4rem;
1196
+ background: transparent; border: 1px solid var(--cv-p-i-border); border-radius: var(--cv-p-i-radius); color: var(--cv-p-i-text-muted);
1197
+ font-size: 0.85rem;
1198
+ }
1199
+ .cv-p-chip[aria-pressed='true'] { background: var(--cv-p-i-text); border-color: var(--cv-p-i-text); color: var(--cv-p-i-surface); }
1200
+ .cv-p-chip__count {
1201
+ font: 0.7rem 'SFMono-Regular', Consolas, monospace; background: var(--cv-p-i-accent);
1202
+ color: var(--cv-p-i-accent-contrast); padding: 0 0.35rem;
1203
+ }
1204
+
1205
+ .cv-p-inbox { overflow-y: auto; }
1206
+ .cv-p-inbox__title { margin: 0; padding: 0.75rem 1rem; font-size: 1rem; border-bottom: 1px solid var(--cv-p-i-border); }
1207
+ .cv-p-filters { display: flex; gap: 0.5rem; padding: 0.625rem 1rem; overflow-x: auto; border-bottom: 1px solid var(--cv-p-i-border); }
1208
+ .cv-p-error { display: flex; flex-direction: column; align-items: center; gap: 0.5rem; padding: 1.5rem 1rem; text-align: center; color: var(--cv-p-i-danger, #b91c1c); }
1209
+ .cv-p-error__message { margin: 0; }
1210
+ .cv-p-loading { display: flex; flex-direction: column; gap: 0.5rem; padding: 1rem; }
1211
+ .cv-p-skeleton { display: block; height: 3rem; border-radius: var(--cv-p-i-radius); background: var(--cv-p-i-surface-raised); }
1212
+ .cv-p-inbox__more { display: block; margin: 0.75rem auto; padding: 0 1rem; }
1213
+ .cv-p-empty { padding: 2rem 1rem; text-align: center; color: var(--cv-p-i-text-muted); }
1214
+ .cv-p-section__heading {
1215
+ display: flex; justify-content: space-between; margin: 0; padding: 0.875rem 1rem 0.375rem;
1216
+ font: 0.68rem 'SFMono-Regular', Consolas, monospace; letter-spacing: 0.1em; text-transform: uppercase;
1217
+ color: var(--cv-p-i-text-muted); list-style: none;
1218
+ }
1219
+ .cv-p-section--awaiting .cv-p-section__heading { color: var(--cv-p-i-accent); }
1220
+ .cv-p-section--closed > summary { cursor: pointer; min-height: var(--cv-p-i-touch); align-items: center; }
1221
+ .cv-p-section--closed > summary::-webkit-details-marker { display: none; }
1222
+
1223
+ .cv-p-row {
1224
+ width: 100%; min-height: var(--cv-p-i-touch); display: grid; grid-template-columns: 2.25rem 1fr auto; gap: 0.625rem;
1225
+ padding: 0.75rem 1rem; text-align: left; background: transparent; border: 0;
1226
+ border-bottom: 1px solid var(--cv-p-i-border); border-left: 3px solid transparent;
1227
+ }
1228
+ .cv-p-row--awaiting { border-left-color: var(--cv-p-i-accent); background: var(--cv-p-i-highlight); }
1229
+ .cv-p-row__icon {
1230
+ width: 2.25rem; height: 2.25rem; display: grid; place-items: center; border: 1px solid var(--cv-p-i-border);
1231
+ border-radius: var(--cv-p-i-radius); font: 0.7rem 'SFMono-Regular', Consolas, monospace; text-transform: uppercase; color: var(--cv-p-i-accent);
1232
+ }
1233
+ .cv-p-inbox__icon { color: var(--cv-p-i-accent); font-size: 1rem; }
1234
+ .cv-p-inbox__icon svg { width: 1.25rem; height: 1.25rem; }
1235
+ .cv-p-row__tags { display: flex; flex-wrap: wrap; align-items: center; gap: 0.25rem 0.5rem; }
1236
+ .cv-p-channels { display: inline-flex; flex-wrap: wrap; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
1237
+ .cv-p-channel { display: inline-grid; place-items: center; width: 1.375rem; height: 1.375rem; border: 1px solid var(--cv-p-i-border); border-radius: var(--cv-p-i-radius); color: var(--cv-p-i-text-muted); }
1238
+ .cv-p-channel svg { display: block; }
1239
+ .cv-p-channel--whatsapp { color: var(--cv-p-channel-whatsapp, #20914f); }
1240
+ .cv-p-channel--app { color: var(--cv-p-channel-app, var(--cv-p-i-accent)); }
1241
+ .cv-p-row__body { display: flex; flex-direction: column; min-width: 0; }
1242
+ .cv-p-row__kind { font: 0.64rem 'SFMono-Regular', Consolas, monospace; letter-spacing: 0.08em; text-transform: uppercase; color: var(--cv-p-i-text-muted); }
1243
+ .cv-p-row__title { font-weight: 600; font-size: 0.92rem; }
1244
+ .cv-p-row__preview { color: var(--cv-p-i-text-muted); font-size: 0.82rem; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
1245
+ .cv-p-row__meta { display: flex; flex-direction: column; align-items: flex-end; gap: 0.25rem; font: 0.7rem 'SFMono-Regular', Consolas, monospace; color: var(--cv-p-i-text-muted); }
1246
+ .cv-p-row__unread { min-width: 1.25rem; padding: 0 0.3rem; text-align: center; font-weight: 700; background: var(--cv-p-i-accent); color: var(--cv-p-i-accent-contrast); }
1247
+
1248
+ .cv-p-thread__header { display: flex; align-items: center; gap: 0.5rem; padding: 0.5rem 1rem; border-bottom: 1px solid var(--cv-p-i-border); }
1249
+ .cv-p-thread__heading { flex: 1; min-width: 0; display: flex; flex-direction: column; }
1250
+ .cv-p-thread__title { flex: 1; margin: 0; font-size: 1rem; min-width: 0; }
1251
+ .cv-p-thread__title-button { min-height: var(--cv-p-i-touch); padding: 0; background: none; border: 0; color: inherit; font: inherit; font-weight: 600; text-align: left; text-decoration: underline; cursor: pointer; }
1252
+ .cv-p-thread__subject-card { margin: 0.75rem 1rem 0; padding: 0.625rem 0.75rem; border: 1px solid var(--cv-p-i-border); background: var(--cv-p-i-surface-raised); border-radius: var(--cv-p-i-radius); font-size: 0.82rem; }
1253
+ .cv-p-thread__scroll { flex: 1; min-height: 0; overflow-y: auto; overflow-anchor: none; padding: 0.5rem 1rem 1rem; }
1254
+ .cv-p-thread__older { display: block; margin: 0 auto 0.5rem; min-height: var(--cv-p-i-touch); padding: 0 1rem; background: transparent; border: 1px solid var(--cv-p-i-border); border-radius: var(--cv-p-i-radius); }
1255
+ .cv-p-thread__messages { display: flex; flex-direction: column; gap: 0.5rem; }
1256
+ .cv-p-thread__live { padding: 0 1rem; font-size: 0.75rem; color: var(--cv-p-i-accent); }
1257
+ .cv-p-thread__live:empty { position: absolute; width: 1px; height: 1px; margin: -1px; padding: 0; overflow: hidden; clip: rect(0 0 0 0); white-space: nowrap; border: 0; }
1258
+ .cv-p-thread__closed { margin: 0; padding: 1rem; text-align: center; color: var(--cv-p-i-text-muted); border-top: 1px solid var(--cv-p-i-border); }
1259
+ .cv-p-day { align-self: center; margin: 0.5rem 0; font: 0.65rem 'SFMono-Regular', Consolas, monospace; text-transform: uppercase; color: var(--cv-p-i-text-muted); }
1260
+
1261
+ .cv-p-bubble { max-width: 82%; align-self: flex-start; padding: 0.5rem 0.7rem; font-size: 0.88rem; background: var(--cv-p-i-surface-raised); border: 1px solid var(--cv-p-i-border); border-radius: var(--cv-p-i-radius); }
1262
+ .cv-p-bubble--mine { align-self: flex-end; background: var(--cv-p-i-highlight); border-color: var(--cv-p-i-accent); }
1263
+ .cv-p-bubble__author { display: block; margin-bottom: 0.15rem; font: 0.65rem 'SFMono-Regular', Consolas, monospace; text-transform: uppercase; color: var(--cv-p-i-accent); }
1264
+ .cv-p-bubble__meta { display: flex; justify-content: flex-end; align-items: center; gap: 0.35rem; margin-top: 0.25rem; font: 0.65rem 'SFMono-Regular', Consolas, monospace; color: var(--cv-p-i-text-muted); }
1265
+ .cv-p-bubble__status { display: inline-flex; align-items: center; gap: 0.25rem; }
1266
+ .cv-p-bubble__retry { min-height: var(--cv-p-i-touch); display: inline-flex; align-items: center; gap: 0.25rem; padding: 0 0.5rem; background: transparent; border: 1px solid var(--cv-p-i-danger); color: var(--cv-p-i-danger); border-radius: var(--cv-p-i-radius); font-size: 0.7rem; }
1267
+ .cv-p-bubble__actions { display: inline-flex; gap: 0.5rem; margin-top: 0.25rem; }
1268
+ .cv-p-bubble__action { min-height: var(--cv-p-i-touch); display: inline-flex; align-items: center; padding: 0 0.75rem; background: transparent; border: 1px solid var(--cv-p-i-border); color: inherit; border-radius: var(--cv-p-i-radius); font-size: 0.7rem; }
1269
+ .cv-p-attachment { display: flex; flex-direction: column; gap: 0.25rem; margin-top: 0.35rem; color: inherit; }
1270
+ .cv-p-attachment--document { flex-direction: row; justify-content: space-between; min-height: var(--cv-p-i-touch); align-items: center; text-decoration: underline; }
1271
+ .cv-p-attachment__image { display: block; max-width: 100%; max-height: 16rem; object-fit: contain; }
1272
+ .cv-p-attachment__audio { width: 100%; min-height: var(--cv-p-i-touch); }
1273
+ .cv-p-attachment__name, .cv-p-attachment__size { font-size: 0.75rem; overflow-wrap: anywhere; }
1274
+
1275
+ .cv-p-composer { display: flex; flex-direction: column; gap: 0.5rem; padding: 0.5rem 1rem 1rem; border-top: 1px solid var(--cv-p-i-border); }
1276
+ .cv-p-composer__row { display: flex; align-items: flex-end; gap: 0.5rem; }
1277
+ .cv-p-composer__input { flex: 1; min-height: var(--cv-p-i-touch); max-height: 8rem; resize: none; padding: 0.7rem; font: inherit; font-size: 0.9rem; color: inherit; background: var(--cv-p-i-surface); border: 1px solid var(--cv-p-i-border); border-radius: var(--cv-p-i-radius); }
1278
+ .cv-p-composer__error { margin: 0; font-size: 0.8rem; color: var(--cv-p-i-danger); }
1279
+ .cv-p-quick { display: flex; gap: 0.5rem; overflow-x: auto; }
1280
+ .cv-p-files { display: flex; flex-direction: column; gap: 0.25rem; margin: 0; padding: 0; list-style: none; }
1281
+ .cv-p-files__item { display: flex; align-items: center; gap: 0.5rem; font-size: 0.8rem; }
1282
+ .cv-p-files__name { flex: 1; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
1283
+ .cv-p-files__size { color: var(--cv-p-i-text-muted); }
1284
+ .cv-p-files__remove { min-width: var(--cv-p-i-touch); min-height: var(--cv-p-i-touch); background: transparent; border: 0; color: inherit; font: inherit; cursor: pointer; }
1285
+
1286
+ .cv-p-protocol { min-width: 0; overflow-wrap: anywhere; font: 0.7rem 'SFMono-Regular', Consolas, monospace; letter-spacing: 0.04em; color: var(--cv-p-i-text-muted); }
1287
+ .cv-p-protocol--header { display: flex; align-items: center; gap: 0.5rem; }
1288
+ .cv-p-protocol__copy { min-height: var(--cv-p-i-touch); min-width: var(--cv-p-i-touch); padding: 0 0.75rem; background: transparent; border: 1px solid var(--cv-p-i-border); border-radius: var(--cv-p-i-radius); color: var(--cv-p-i-text); font: inherit; font-size: 0.75rem; cursor: pointer; }
1289
+ .cv-p-search { padding: 0.625rem 1rem; border-bottom: 1px solid var(--cv-p-i-border); }
1290
+ .cv-p-search__input { width: 100%; box-sizing: border-box; min-height: var(--cv-p-i-touch); padding: 0 0.75rem; font: inherit; font-size: 0.9rem; color: var(--cv-p-i-text); background: var(--cv-p-i-surface); border: 1px solid var(--cv-p-i-border); border-radius: var(--cv-p-i-radius); }
1291
+ .cv-p-search__input:focus-visible, .cv-p-protocol__copy:focus-visible { outline: 2px solid var(--cv-p-i-accent); outline-offset: 2px; }
1292
+
1293
+ @media (prefers-reduced-motion: no-preference) {
1294
+ .cv-p-protocol__copy, .cv-p-search__input { transition: border-color 0.12s, background-color 0.12s; }
1295
+ .cv-p-row, .cv-p-button, .cv-p-chip { transition: background-color 0.12s, border-color 0.12s; }
1296
+ }
1297
+
1298
+ .cv-p-root { display: flex; flex-direction: column; min-height: 0; height: 100%; }
1299
+ .cv-p-root__screen { display: flex; flex-direction: column; flex: 1; min-height: 0; }
package/src/types.ts CHANGED
@@ -1,3 +1,5 @@
1
+ import type { MessageDeliveryStatus } from '@adatechnology/conversation-contracts'
2
+
1
3
  export interface ConversationsUIConfig {
2
4
  apiBaseUrl: string
3
5
  theme?: ConversationsTheme
@@ -72,7 +74,7 @@ export interface MessagePayload {
72
74
  direction: 'inbound' | 'outbound'
73
75
  sender: 'bot' | 'customer' | 'agent'
74
76
  timestamp: string
75
- status?: 'sent' | 'delivered' | 'read' | 'failed'
77
+ status?: MessageDeliveryStatus
76
78
  readAt?: string
77
79
  agentName?: string | null
78
80
  templateName?: string