@bitbaum/chatkit 0.9.0 → 0.10.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 (47) hide show
  1. package/README.md +38 -6
  2. package/dist/index.d.ts +1 -0
  3. package/dist/index.d.ts.map +1 -1
  4. package/dist/index.js +1 -0
  5. package/dist/index.js.map +1 -1
  6. package/dist/react/AnswerActions.d.ts +39 -0
  7. package/dist/react/AnswerActions.d.ts.map +1 -0
  8. package/dist/react/AnswerActions.js +49 -0
  9. package/dist/react/AnswerActions.js.map +1 -0
  10. package/dist/react/AttachMenu.d.ts +11 -2
  11. package/dist/react/AttachMenu.d.ts.map +1 -1
  12. package/dist/react/AttachMenu.js +21 -24
  13. package/dist/react/AttachMenu.js.map +1 -1
  14. package/dist/react/Markdown.d.ts +17 -1
  15. package/dist/react/Markdown.d.ts.map +1 -1
  16. package/dist/react/Markdown.js +37 -10
  17. package/dist/react/Markdown.js.map +1 -1
  18. package/dist/react/Sheet.d.ts +20 -0
  19. package/dist/react/Sheet.d.ts.map +1 -0
  20. package/dist/react/Sheet.js +37 -0
  21. package/dist/react/Sheet.js.map +1 -0
  22. package/dist/react/Thread.d.ts +19 -2
  23. package/dist/react/Thread.d.ts.map +1 -1
  24. package/dist/react/Thread.js +10 -8
  25. package/dist/react/Thread.js.map +1 -1
  26. package/dist/react/icons.d.ts +3 -0
  27. package/dist/react/icons.d.ts.map +1 -1
  28. package/dist/react/icons.js +3 -0
  29. package/dist/react/icons.js.map +1 -1
  30. package/dist/react/index.d.ts +6 -1
  31. package/dist/react/index.d.ts.map +1 -1
  32. package/dist/react/index.js +4 -1
  33. package/dist/react/index.js.map +1 -1
  34. package/dist/react/use-speech.d.ts +25 -0
  35. package/dist/react/use-speech.d.ts.map +1 -0
  36. package/dist/react/use-speech.js +66 -0
  37. package/dist/react/use-speech.js.map +1 -0
  38. package/dist/replies.d.ts +6 -3
  39. package/dist/replies.d.ts.map +1 -1
  40. package/dist/replies.js +8 -5
  41. package/dist/replies.js.map +1 -1
  42. package/dist/speech.d.ts +17 -0
  43. package/dist/speech.d.ts.map +1 -0
  44. package/dist/speech.js +81 -0
  45. package/dist/speech.js.map +1 -0
  46. package/package.json +1 -1
  47. package/styles.css +120 -0
package/styles.css CHANGED
@@ -122,6 +122,15 @@
122
122
  }
123
123
  .ck-input::placeholder {
124
124
  color: var(--ck-muted);
125
+ /* One line, always: an empty box is one row high on every phone, and a
126
+ long placeholder is cut at the edge rather than wrapped into a second
127
+ line that the box then clips in half (320px, 2026-10-21). */
128
+ white-space: nowrap;
129
+ overflow: hidden;
130
+ text-overflow: ellipsis;
131
+ }
132
+ .ck-input:placeholder-shown {
133
+ overflow: hidden;
125
134
  }
126
135
  .ck-actions {
127
136
  display: flex;
@@ -1057,6 +1066,13 @@ a.ck-source:hover {
1057
1066
  .ck-reply:hover {
1058
1067
  border-color: var(--ck-accent);
1059
1068
  }
1069
+ /* The first reply is the recommended next step: the same pill, drawn as the
1070
+ lead — a firmer line and the reading colour — so the eye lands on it. */
1071
+ .ck-reply-lead {
1072
+ border-color: var(--ck-line-2);
1073
+ background: var(--ck-raised);
1074
+ font-weight: 500;
1075
+ }
1060
1076
  .ck-reply:disabled {
1061
1077
  opacity: 0.5;
1062
1078
  cursor: default;
@@ -1194,6 +1210,110 @@ a.ck-source:hover {
1194
1210
  cursor: not-allowed;
1195
1211
  opacity: 0.45;
1196
1212
  }
1213
+ /* An app's own rows under Camera · Photos · Files in the attach sheet. */
1214
+ .ck-sheet-extra {
1215
+ display: flex;
1216
+ flex-direction: column;
1217
+ gap: 0.125rem;
1218
+ margin-top: 0.75rem;
1219
+ padding-top: 0.75rem;
1220
+ border-top: 1px solid var(--ck-line);
1221
+ }
1222
+
1223
+ /* while an answer is read aloud: Stop, a quiet wave, the time so far */
1224
+ .ck-player {
1225
+ align-items: center;
1226
+ }
1227
+ .ck-action-stop {
1228
+ color: var(--ck-fg);
1229
+ }
1230
+ .ck-player-wave {
1231
+ display: inline-flex;
1232
+ align-items: center;
1233
+ gap: 2px;
1234
+ height: 1rem;
1235
+ }
1236
+ .ck-player-wave > span {
1237
+ display: block;
1238
+ width: 2px;
1239
+ height: 0.375rem;
1240
+ border-radius: 1px;
1241
+ background: var(--ck-fg-2);
1242
+ animation: ck-wave 1s ease-in-out infinite;
1243
+ }
1244
+ .ck-player-wave > span:nth-child(2n) {
1245
+ animation-delay: 0.15s;
1246
+ }
1247
+ .ck-player-wave > span:nth-child(3n) {
1248
+ animation-delay: 0.3s;
1249
+ }
1250
+ @keyframes ck-wave {
1251
+ 50% {
1252
+ height: 1rem;
1253
+ }
1254
+ }
1255
+ .ck-player-time {
1256
+ font-size: 0.8125rem;
1257
+ font-variant-numeric: tabular-nums;
1258
+ color: var(--ck-fg-2);
1259
+ }
1260
+ @media (prefers-reduced-motion: reduce) {
1261
+ .ck-player-wave > span {
1262
+ animation: none;
1263
+ height: 0.75rem;
1264
+ }
1265
+ }
1266
+
1267
+ /* the sources sheet on a touch screen: one row per record */
1268
+ .ck-sources-open {
1269
+ cursor: pointer;
1270
+ font: inherit;
1271
+ }
1272
+ .ck-sources-open > svg {
1273
+ font-size: 1rem;
1274
+ }
1275
+ .ck-source-list {
1276
+ display: flex;
1277
+ flex-direction: column;
1278
+ margin: 0;
1279
+ padding: 0;
1280
+ list-style: none;
1281
+ }
1282
+ .ck-source-row {
1283
+ display: flex;
1284
+ align-items: flex-start;
1285
+ gap: 0.75rem;
1286
+ min-height: var(--ck-target);
1287
+ padding: 0.625rem 0.25rem;
1288
+ border-top: 1px solid var(--ck-line);
1289
+ color: var(--ck-fg);
1290
+ text-decoration: none;
1291
+ }
1292
+ .ck-source-list > li:first-child .ck-source-row {
1293
+ border-top: 0;
1294
+ }
1295
+ .ck-source-row .ck-source-id {
1296
+ margin-top: 0.125rem;
1297
+ }
1298
+ .ck-source-body {
1299
+ display: flex;
1300
+ min-width: 0;
1301
+ flex-direction: column;
1302
+ gap: 0.125rem;
1303
+ }
1304
+ .ck-source-title {
1305
+ font-weight: 500;
1306
+ overflow-wrap: anywhere;
1307
+ }
1308
+ .ck-source-detail {
1309
+ font-size: 0.8125rem;
1310
+ color: var(--ck-fg-2);
1311
+ overflow-wrap: anywhere;
1312
+ }
1313
+ a.ck-source-row:hover .ck-source-title {
1314
+ text-decoration: underline;
1315
+ }
1316
+
1197
1317
  @keyframes ck-rise {
1198
1318
  from {
1199
1319
  transform: translateY(1.5rem);