@syntrologie/adapt-chatbot 2.8.0-canary.670 → 2.8.0-canary.671

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.
@@ -1,9 +1,9 @@
1
1
  import {
2
2
  AdaptiveChatBar
3
- } from "./chunk-222UQBRX.js";
3
+ } from "./chunk-JUREJJQG.js";
4
4
  import "./chunk-EWPPVPJ4.js";
5
- import "./chunk-7DITMWEM.js";
6
- import "./chunk-IBYQSXOU.js";
5
+ import "./chunk-4I3MSBMT.js";
6
+ import "./chunk-NV544RYQ.js";
7
7
  import "./chunk-TTZAYVJL.js";
8
8
  import "./chunk-LY5AGXVD.js";
9
9
  export {
@@ -2,8 +2,8 @@ import {
2
2
  AdaptiveChatTrail,
3
3
  extractSuggestedReplies,
4
4
  looksLikeSerializedModelResponse
5
- } from "./chunk-7DITMWEM.js";
6
- import "./chunk-IBYQSXOU.js";
5
+ } from "./chunk-4I3MSBMT.js";
6
+ import "./chunk-NV544RYQ.js";
7
7
  import "./chunk-TTZAYVJL.js";
8
8
  import "./chunk-LY5AGXVD.js";
9
9
  export {
@@ -1,10 +1,10 @@
1
1
  import {
2
2
  ChatAssistantLitMountable,
3
3
  renderFallbackHtml
4
- } from "./chunk-C4JSPA7Y.js";
4
+ } from "./chunk-LAFPC6JS.js";
5
5
  import "./chunk-YJ3NQYLQ.js";
6
6
  import "./chunk-EWPPVPJ4.js";
7
- import "./chunk-IBYQSXOU.js";
7
+ import "./chunk-NV544RYQ.js";
8
8
  import "./chunk-TTZAYVJL.js";
9
9
  import "./chunk-LY5AGXVD.js";
10
10
  export {
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  renderMarkdown
3
- } from "./chunk-IBYQSXOU.js";
3
+ } from "./chunk-NV544RYQ.js";
4
4
  import {
5
5
  IMAGE_STANDIN_BACKGROUND,
6
6
  standinInitial
@@ -1881,4 +1881,4 @@ export {
1881
1881
  extractSuggestedReplies,
1882
1882
  looksLikeSerializedModelResponse
1883
1883
  };
1884
- //# sourceMappingURL=chunk-7DITMWEM.js.map
1884
+ //# sourceMappingURL=chunk-4I3MSBMT.js.map
@@ -3,11 +3,11 @@ import {
3
3
  } from "./chunk-EWPPVPJ4.js";
4
4
  import {
5
5
  extractSuggestedReplies
6
- } from "./chunk-7DITMWEM.js";
6
+ } from "./chunk-4I3MSBMT.js";
7
7
  import {
8
8
  createDictation,
9
9
  isDictationSupported
10
- } from "./chunk-IBYQSXOU.js";
10
+ } from "./chunk-NV544RYQ.js";
11
11
  import {
12
12
  CHAT_TRANSCRIPT_EVENT
13
13
  } from "./chunk-TTZAYVJL.js";
@@ -783,4 +783,4 @@ export {
783
783
  pickPersona,
784
784
  AdaptiveChatBar
785
785
  };
786
- //# sourceMappingURL=chunk-222UQBRX.js.map
786
+ //# sourceMappingURL=chunk-JUREJJQG.js.map
@@ -4,7 +4,7 @@ import {
4
4
  import {
5
5
  createAgUiMapState,
6
6
  mapAgUiEvent
7
- } from "./chunk-IBYQSXOU.js";
7
+ } from "./chunk-NV544RYQ.js";
8
8
  import {
9
9
  stripMountPlumbing
10
10
  } from "./chunk-TTZAYVJL.js";
@@ -23987,4 +23987,4 @@ fast-json-patch/module/duplex.mjs:
23987
23987
  * MIT license
23988
23988
  *)
23989
23989
  */
23990
- //# sourceMappingURL=chunk-C4JSPA7Y.js.map
23990
+ //# sourceMappingURL=chunk-LAFPC6JS.js.map
@@ -3473,6 +3473,18 @@ var STYLE_RULES = `
3473
3473
  transition: box-shadow 0.2s;
3474
3474
  }
3475
3475
 
3476
+ /* \`pill-placement="row"\` (App Home): the pill in the flow, in its own row between
3477
+ * the scroll area and the input. While it shows the scroll viewport is that much
3478
+ * shorter, so it never covers what is being read or tapped (floating, it sat on
3479
+ * an app's buttons in the chat), and nothing is out of reach. */
3480
+ [data-sc-chat][data-sc-pill="row"] [data-sc-scroll-btn] {
3481
+ position: static;
3482
+ transform: none;
3483
+ flex: none;
3484
+ align-self: center;
3485
+ margin: 6px 0;
3486
+ }
3487
+
3476
3488
  [data-sc-chat] [data-sc-scroll-btn]:hover {
3477
3489
  box-shadow: 0 4px 12px rgba(0, 0, 0, 0.15);
3478
3490
  }
@@ -3505,6 +3517,7 @@ var _SyntroChat = class _SyntroChat2 extends LitElement {
3505
3517
  super(...arguments);
3506
3518
  this.voiceInput = false;
3507
3519
  this.historyView = "bottom";
3520
+ this.pillPlacement = "overlay";
3508
3521
  this._messages = [];
3509
3522
  this._micListening = false;
3510
3523
  this._micDisabled = false;
@@ -3521,10 +3534,27 @@ var _SyntroChat = class _SyntroChat2 extends LitElement {
3521
3534
  this._stickToBottom = true;
3522
3535
  this._messagesBelow = 0;
3523
3536
  this._lastUserScrollIntentTs = 0;
3537
+ this._gliding = null;
3524
3538
  this._anchoredMessageId = null;
3525
3539
  this._historyAnchor = false;
3526
3540
  this._markUserScrollIntent = () => {
3527
3541
  this._lastUserScrollIntentTs = Date.now();
3542
+ this._gliding = null;
3543
+ };
3544
+ this._cancelGlide = () => {
3545
+ this._gliding = null;
3546
+ };
3547
+ this._landGlide = () => {
3548
+ const id = this._gliding;
3549
+ this._gliding = null;
3550
+ if (!id || id !== this._anchoredMessageId) return;
3551
+ const container = this._scrollContainer;
3552
+ const row = this.querySelector(`[data-sc-msg-id="${id}"]`);
3553
+ if (!container?.scrollTo || !row) return;
3554
+ const off = row.getBoundingClientRect().top - container.getBoundingClientRect().top;
3555
+ if (Math.abs(off) <= 1) return;
3556
+ container.scrollTo({ top: container.scrollTop + off, behavior: "auto" });
3557
+ this._syncScrollState();
3528
3558
  };
3529
3559
  this._handleScroll = () => {
3530
3560
  if (!this._scrollContainer) return;
@@ -3976,6 +4006,9 @@ var _SyntroChat = class _SyntroChat2 extends LitElement {
3976
4006
  this.transport?.disconnect();
3977
4007
  this.removeEventListener("mcp-app-resize", this._onAppResize);
3978
4008
  this._scrollContainer?.removeEventListener("scroll", this._handleScroll);
4009
+ this._scrollContainer?.removeEventListener("scrollend", this._landGlide);
4010
+ this._scrollContainer?.removeEventListener("pointerdown", this._cancelGlide);
4011
+ this._scrollContainer?.removeEventListener("keydown", this._cancelGlide);
3979
4012
  this._scrollContainer?.removeEventListener("wheel", this._markUserScrollIntent);
3980
4013
  this._scrollContainer?.removeEventListener("touchmove", this._markUserScrollIntent);
3981
4014
  this._scrollContainer = null;
@@ -3992,6 +4025,9 @@ var _SyntroChat = class _SyntroChat2 extends LitElement {
3992
4025
  if (this._scrollContainer) return;
3993
4026
  this._scrollContainer = this.querySelector("[data-sc-scroll-area]");
3994
4027
  this._scrollContainer?.addEventListener("scroll", this._handleScroll);
4028
+ this._scrollContainer?.addEventListener("scrollend", this._landGlide);
4029
+ this._scrollContainer?.addEventListener("pointerdown", this._cancelGlide, { passive: true });
4030
+ this._scrollContainer?.addEventListener("keydown", this._cancelGlide);
3995
4031
  this._scrollContainer?.addEventListener("wheel", this._markUserScrollIntent, {
3996
4032
  passive: true
3997
4033
  });
@@ -4105,6 +4141,8 @@ var _SyntroChat = class _SyntroChat2 extends LitElement {
4105
4141
  const row = this.querySelector(`[data-sc-msg-id="${messageId}"]`);
4106
4142
  if (!row) return;
4107
4143
  const top = row.getBoundingClientRect().top - container.getBoundingClientRect().top + container.scrollTop;
4144
+ const reach = Math.min(top, container.scrollHeight - container.clientHeight);
4145
+ this._gliding = this.pillPlacement === "row" && !history && Math.abs(reach - container.scrollTop) > 1 ? messageId : null;
4108
4146
  container.scrollTo({ top, behavior: history ? "auto" : "smooth" });
4109
4147
  this._syncScrollState();
4110
4148
  });
@@ -4181,7 +4219,7 @@ var _SyntroChat = class _SyntroChat2 extends LitElement {
4181
4219
  ${this.greeting}
4182
4220
  </div>` : void 0);
4183
4221
  return html7`
4184
- <div data-sc-chat style="display:flex;flex-direction:column;height:100%;position:relative;">
4222
+ <div data-sc-chat data-sc-pill=${this.pillPlacement === "row" ? "row" : "overlay"} style="display:flex;flex-direction:column;height:100%;position:relative;">
4185
4223
  ${headerSlot && typeof headerSlot === "object" && "values" in headerSlot ? headerSlot : nothing5}
4186
4224
  <div data-sc-scroll-area style="flex:1;overflow-y:auto;">
4187
4225
  ${renderMessageList({
@@ -4242,6 +4280,7 @@ _SyntroChat.properties = {
4242
4280
  slots: { attribute: false },
4243
4281
  voiceInput: { type: Boolean, attribute: "voice-input" },
4244
4282
  historyView: { type: String, attribute: "history-view" },
4283
+ pillPlacement: { type: String, attribute: "pill-placement" },
4245
4284
  _messages: { state: true },
4246
4285
  _micListening: { state: true },
4247
4286
  _micDisabled: { state: true },
@@ -4382,4 +4421,4 @@ export {
4382
4421
  dompurify/dist/purify.es.mjs:
4383
4422
  (*! @license DOMPurify 3.3.1 | (c) Cure53 and other contributors | Released under the Apache license 2.0 and Mozilla Public License 2.0 | github.com/cure53/DOMPurify/blob/3.3.1/LICENSE *)
4384
4423
  */
4385
- //# sourceMappingURL=chunk-IBYQSXOU.js.map
4424
+ //# sourceMappingURL=chunk-NV544RYQ.js.map