@agentforge-io/chat-sdk 2.5.5 → 2.5.7

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 (2) hide show
  1. package/dist/react.js +36 -12
  2. package/package.json +1 -1
package/dist/react.js CHANGED
@@ -1271,7 +1271,22 @@ const WIDGET_CSS = `
1271
1271
  * greeting reads as the assistant *responding* to the page loading,
1272
1272
  * not part of the static UI. */
1273
1273
  .af-widget-root.af-variant-bare .af-greeting-slot {
1274
- padding: 4px 0 6px;
1274
+ /* Glue the greeting to the BOTTOM of the panel's flex column.
1275
+ * Without this, the greeting drifted to the middle of an empty
1276
+ * panel: .af-messages is flex:1 and absorbs the leftover space,
1277
+ * but the greeting-slot sits AFTER it as a sibling. margin-top:
1278
+ * auto collapses any free space above the slot so it parks just
1279
+ * above the composer cluster. */
1280
+ margin-top: auto;
1281
+ padding: 4px 0 10px;
1282
+ }
1283
+ /* When the greeting is shown the messages container is empty —
1284
+ * collapse it so its 6px-padding strip doesn't create a visible gap
1285
+ * above the greeting block. Once any real message lands, the
1286
+ * greeting unmounts and .af-messages goes back to flex:1 normally. */
1287
+ .af-widget-root.af-variant-bare .af-panel:has(.af-greeting-slot) .af-messages {
1288
+ flex: 0 0 auto;
1289
+ padding: 0;
1275
1290
  }
1276
1291
  .af-widget-root.af-variant-bare .af-msg-row-greeting {
1277
1292
  opacity: 0;
@@ -1306,22 +1321,31 @@ const WIDGET_CSS = `
1306
1321
  .af-widget-root.af-variant-bare .af-msg-row {
1307
1322
  display: flex;
1308
1323
  align-items: flex-end;
1309
- gap: 8px;
1324
+ /* Tight 4px gap — the avatar sits next to the bubble, not
1325
+ * floating beside it. 8px reads as a separate column on small
1326
+ * viewports. */
1327
+ gap: 4px;
1310
1328
  max-width: 92%;
1311
1329
  }
1312
1330
  /* When the row hosts a delegation avatar STACK, center the avatar
1313
- * column against the bubble AND shrink the gap. The flex-end
1314
- * default lines the single 26px avatar with the bubble's last text
1315
- * line (iMessage feel) but a stack with a smaller satellite trail
1316
- * reads disconnected when anchored to the bottom the satellites
1317
- * float in space because the active avatar's edge is the only
1318
- * thing meeting the bubble. Centering tucks the entire group
1319
- * against the bubble's vertical midline so the cluster reads as
1320
- * one composite glyph; the tighter gap (8 → 6) pulls the message
1321
- * column closer to the cluster. */
1331
+ * column against the bubble. The flex-end default lines the single
1332
+ * 26px avatar with the bubble's last text line (iMessage feel) but
1333
+ * a stack with a smaller satellite trail reads disconnected when
1334
+ * anchored to the bottom. Centering tucks the entire group against
1335
+ * the bubble's vertical midline so the cluster reads as one
1336
+ * composite glyph. */
1322
1337
  .af-widget-root.af-variant-bare .af-msg-row:has(.af-msg-avatar-stack) {
1323
1338
  align-items: center;
1324
- gap: 6px;
1339
+ }
1340
+ /* Typing-state rows: the bubble is short (a single row of dots) so
1341
+ * the regular flex-end alignment leaves the avatar sticking to the
1342
+ * dots' bottom edge while the dots themselves animate at the
1343
+ * bubble's vertical center — visually the avatar reads as
1344
+ * "trailing" the dots rather than being next to them. Centering
1345
+ * the row puts the avatar at the same y as the dots, AND tightens
1346
+ * the perceived distance because both elements share the midline. */
1347
+ .af-widget-root.af-variant-bare .af-msg-row:has(.af-msg-typing) {
1348
+ align-items: center;
1325
1349
  }
1326
1350
  .af-widget-root.af-variant-bare .af-msg-row-assistant {
1327
1351
  align-self: flex-start;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@agentforge-io/chat-sdk",
3
- "version": "2.5.5",
3
+ "version": "2.5.7",
4
4
  "description": "Framework-free chat session SDK for AgentForge public chat tokens. Headless — no DOM. Drop into any frontend (React, Vue, Svelte, vanilla) and listen for events.",
5
5
  "license": "MIT",
6
6
  "main": "dist/index.js",