@syntrologie/adapt-chatbot 2.8.0-canary.282 → 2.8.0-canary.284

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,8 +1,8 @@
1
1
  import {
2
2
  AdaptiveChatBar
3
3
  } from "./chunk-QELVKBQV.js";
4
- import "./chunk-XP2UFKPG.js";
5
- import "./chunk-K2IG34L7.js";
4
+ import "./chunk-DOMEUJR7.js";
5
+ import "./chunk-UC4XU6GH.js";
6
6
  import "./chunk-UVKRO5ER.js";
7
7
  export {
8
8
  AdaptiveChatBar
@@ -1 +1 @@
1
- {"version":3,"file":"AdaptiveChatBarMountable.d.ts","sourceRoot":"","sources":["../src/AdaptiveChatBarMountable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,mBAAmB,CAAC;AAuX3B,eAAO,MAAM,wBAAwB;qBAClB,WAAW,gBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAI;sBAyC9D,WAAW,gBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;CAQ5E,CAAC"}
1
+ {"version":3,"file":"AdaptiveChatBarMountable.d.ts","sourceRoot":"","sources":["../src/AdaptiveChatBarMountable.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA4BG;AAEH,OAAO,mBAAmB,CAAC;AAmY3B,eAAO,MAAM,wBAAwB;qBAClB,WAAW,gBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,MAAM,IAAI;sBAyC9D,WAAW,gBAAgB,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,GAAG,IAAI;CAQ5E,CAAC"}
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  AdaptiveChatTrail
3
- } from "./chunk-XP2UFKPG.js";
4
- import "./chunk-K2IG34L7.js";
3
+ } from "./chunk-DOMEUJR7.js";
4
+ import "./chunk-UC4XU6GH.js";
5
5
  import "./chunk-UVKRO5ER.js";
6
6
  export {
7
7
  AdaptiveChatTrail
@@ -2,7 +2,7 @@ import {
2
2
  ChatAssistantLitMountable,
3
3
  renderFallbackHtml
4
4
  } from "./chunk-FQ7QUZZ3.js";
5
- import "./chunk-K2IG34L7.js";
5
+ import "./chunk-UC4XU6GH.js";
6
6
  import "./chunk-435KJD27.js";
7
7
  import "./chunk-UVKRO5ER.js";
8
8
  export {
@@ -102,6 +102,15 @@ export interface ChatTransportConfig {
102
102
  * doesn't know about MutationEnvelope).
103
103
  */
104
104
  onElementMutation?: (mutations: ElementMutation[]) => void;
105
+ /**
106
+ * Slot the chat-bar widget is mounted into (e.g. ``"drawer"``,
107
+ * ``"adaptive-chat"``). Forwarded as ``X-Active-Lid-Slot`` on every
108
+ * ``/api/adaptive/stream`` request so the backend can route mounts to
109
+ * the canvas next to whichever lid the visitor sent from. Optional —
110
+ * omitting it falls back to the template's static ``default_slot``
111
+ * server-side, which is the pre-change behaviour.
112
+ */
113
+ activeLidSlot?: string;
105
114
  }
106
115
  /**
107
116
  * Debounce window for connect errors. Single transient errors
@@ -1 +1 @@
1
- {"version":3,"file":"ChatTransport.d.ts","sourceRoot":"","sources":["../src/ChatTransport.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;GA0CG;AASH,OAAO,KAAK,EAAE,eAAe,EAAE,MAAM,YAAY,CAAC;AAGlD,OAAO,KAAK,EAAE,oBAAoB,EAAE,MAAM,SAAS,CAAC;AAEpD;;;;GAIG;AACH,MAAM,WAAW,qBAAqB;IACpC,KAAK,CAAC,EAAE,MAAM,CAAC;IACf,OAAO,CAAC,EAAE,MAAM,CAAC;IACjB,QAAQ,CAAC,EAAE,MAAM,CAAC;IAClB,OAAO,CAAC,EAAE,MAAM,CAAC;CAClB;AAED,MAAM,WAAW,mBAAmB;IAClC,mFAAmF;IACnF,UAAU,EAAE,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B;CAuH1B;AAED;;;;GAIG;AACH,eAAO,MAAM,aAAa,eAAsB,CAAC"}
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  renderMarkdown
3
- } from "./chunk-K2IG34L7.js";
3
+ } from "./chunk-UC4XU6GH.js";
4
4
 
5
5
  // src/AdaptiveChatTrail.ts
6
6
  import { html, LitElement, nothing } from "lit";
@@ -379,4 +379,4 @@ if (!customElements.get("adaptive-chat-trail")) {
379
379
  export {
380
380
  AdaptiveChatTrail
381
381
  };
382
- //# sourceMappingURL=chunk-XP2UFKPG.js.map
382
+ //# sourceMappingURL=chunk-DOMEUJR7.js.map
@@ -2253,6 +2253,7 @@ function renderChatInput(props) {
2253
2253
  autoResize(e);
2254
2254
  props.onInput(e);
2255
2255
  };
2256
+ const placeholder = props.placeholder ?? "Type a message...";
2256
2257
  return html2`
2257
2258
  ${props.suggestions?.length && !props.isStreaming ? html2`<div data-sc-suggestions>
2258
2259
  ${props.suggestions.map(
@@ -2263,7 +2264,7 @@ function renderChatInput(props) {
2263
2264
  <div data-sc-chat-input>
2264
2265
  <textarea
2265
2266
  rows="1"
2266
- placeholder="Type a message..."
2267
+ placeholder=${placeholder}
2267
2268
  .value=${props.value}
2268
2269
  @input=${handleInput}
2269
2270
  @keydown=${props.onKeyDown}
@@ -2368,7 +2369,7 @@ function renderBubbleContent(message) {
2368
2369
  return html4`<div data-sc-msg-assistant>${unsafeHTML(renderMarkdown(message.content))}</div>`;
2369
2370
  }
2370
2371
  function renderMessageBubble(props) {
2371
- const { message, toolLabels, toolRenderers } = props;
2372
+ const { message, toolLabels, toolRenderers, defaultToolRenderer } = props;
2372
2373
  const isUser = message.role === "user";
2373
2374
  const toolCards = message.toolCalls?.map((tc) => {
2374
2375
  const approve = () => props.onToolApprove(tc.id);
@@ -2382,6 +2383,14 @@ function renderMessageBubble(props) {
2382
2383
  deny
2383
2384
  });
2384
2385
  }
2386
+ if (defaultToolRenderer) {
2387
+ return defaultToolRenderer.render({
2388
+ toolCall: tc,
2389
+ phase: tc.status,
2390
+ approve,
2391
+ deny
2392
+ });
2393
+ }
2385
2394
  return renderToolCallCard({
2386
2395
  toolCall: tc,
2387
2396
  toolLabel: toolLabels?.[tc.name],
@@ -2431,6 +2440,7 @@ function renderMessageList(props) {
2431
2440
  message: msg,
2432
2441
  toolLabels: props.toolLabels,
2433
2442
  toolRenderers: props.toolRenderers,
2443
+ defaultToolRenderer: props.defaultToolRenderer,
2434
2444
  onCopy: props.onCopy,
2435
2445
  onRegenerate: props.onRegenerate,
2436
2446
  onToolApprove: props.onToolApprove,
@@ -2461,16 +2471,16 @@ var STYLE_RULES = `
2461
2471
  [data-sc-chat] {
2462
2472
  font-family: var(--sc-font-family, system-ui, -apple-system, sans-serif);
2463
2473
  color: var(--sc-content-text-color, #1a1a2e);
2464
- line-height: 1.5;
2465
- font-size: 0.9375rem;
2474
+ line-height: var(--sc-chat-line-height, 1.5);
2475
+ font-size: var(--sc-chat-font-size, 0.9375rem);
2466
2476
  }
2467
2477
 
2468
2478
  /* \u2500\u2500 Message list \u2500\u2500 */
2469
2479
  [data-sc-chat] [data-sc-msg-list] {
2470
2480
  display: flex;
2471
2481
  flex-direction: column;
2472
- gap: 4px;
2473
- padding: 16px 16px 8px;
2482
+ gap: var(--sc-chat-msg-gap, 4px);
2483
+ padding: var(--sc-chat-msg-list-padding, 16px 16px 8px);
2474
2484
  }
2475
2485
 
2476
2486
  /* \u2500\u2500 Message row (avatar + content) \u2500\u2500 */
@@ -2504,20 +2514,20 @@ var STYLE_RULES = `
2504
2514
 
2505
2515
  /* \u2500\u2500 Bubbles \u2500\u2500 */
2506
2516
  [data-sc-chat] [data-sc-msg-user] {
2507
- background: var(--sc-color-primary, #6a59ce);
2508
- color: var(--sc-color-primary-text, #ffffff);
2509
- border-radius: 18px 18px 4px 18px;
2510
- padding: 10px 16px;
2517
+ background: var(--sc-chat-msg-user-bg, var(--sc-color-primary, #6a59ce));
2518
+ color: var(--sc-chat-msg-user-color, var(--sc-color-primary-text, #ffffff));
2519
+ border-radius: var(--sc-chat-msg-user-radius, 18px 18px 4px 18px);
2520
+ padding: var(--sc-chat-msg-user-padding, 10px 16px);
2511
2521
  word-break: break-word;
2512
2522
  }
2513
2523
 
2514
2524
  [data-sc-chat] [data-sc-msg-assistant] {
2515
- background: var(--sc-chat-assistant-bubble-bg, #f4f4f8);
2516
- color: var(--sc-content-text-color, #1a1a2e);
2517
- border-radius: 18px 18px 18px 4px;
2518
- padding: 10px 16px;
2525
+ background: var(--sc-chat-msg-assistant-bg, var(--sc-chat-assistant-bubble-bg, #f4f4f8));
2526
+ color: var(--sc-chat-msg-assistant-color, var(--sc-content-text-color, #1a1a2e));
2527
+ border-radius: var(--sc-chat-msg-assistant-radius, 18px 18px 18px 4px);
2528
+ padding: var(--sc-chat-msg-assistant-padding, 10px 16px);
2529
+ box-shadow: var(--sc-chat-msg-assistant-shadow, 0 1px 2px rgba(0, 0, 0, 0.04));
2519
2530
  word-break: break-word;
2520
- box-shadow: 0 1px 2px rgba(0, 0, 0, 0.04);
2521
2531
  }
2522
2532
 
2523
2533
  [data-sc-chat] [data-sc-msg-assistant] > :first-child { margin-top: 0; }
@@ -2634,7 +2644,7 @@ var STYLE_RULES = `
2634
2644
  display: flex;
2635
2645
  align-items: flex-end;
2636
2646
  gap: 8px;
2637
- padding: 12px 16px;
2647
+ padding: var(--sc-chat-input-padding, 12px 16px);
2638
2648
  border-top: 1px solid var(--sc-content-border-color, #e8e8ee);
2639
2649
  background: var(--sc-chat-input-bg, #ffffff);
2640
2650
  }
@@ -2642,10 +2652,10 @@ var STYLE_RULES = `
2642
2652
  [data-sc-chat] [data-sc-chat-input] textarea {
2643
2653
  flex: 1;
2644
2654
  border: 1px solid var(--sc-content-border-color, #e8e8ee);
2645
- border-radius: 14px;
2646
- padding: 10px 16px;
2655
+ border-radius: var(--sc-chat-textarea-radius, 14px);
2656
+ padding: var(--sc-chat-textarea-padding, 10px 16px);
2647
2657
  font-family: inherit;
2648
- font-size: 0.9rem;
2658
+ font-size: var(--sc-chat-textarea-font-size, 0.9rem);
2649
2659
  resize: none;
2650
2660
  outline: none;
2651
2661
  background: var(--sc-chat-input-bg, #ffffff);
@@ -2659,16 +2669,16 @@ var STYLE_RULES = `
2659
2669
 
2660
2670
  [data-sc-chat] [data-sc-chat-input] textarea:focus {
2661
2671
  border-color: var(--sc-color-primary, #6a59ce);
2662
- box-shadow: 0 0 0 3px rgba(106, 89, 206, 0.1);
2672
+ box-shadow: 0 0 0 3px var(--sc-chat-focus-ring, rgba(106, 89, 206, 0.1));
2663
2673
  }
2664
2674
 
2665
2675
  [data-sc-chat] [data-sc-send-btn] {
2666
2676
  background: var(--sc-color-primary, #6a59ce);
2667
2677
  color: var(--sc-color-primary-text, #ffffff);
2668
2678
  border: none;
2669
- border-radius: 50%;
2670
- width: 38px;
2671
- height: 38px;
2679
+ border-radius: var(--sc-chat-send-btn-radius, 50%);
2680
+ width: var(--sc-chat-send-btn-size, 38px);
2681
+ height: var(--sc-chat-send-btn-size, 38px);
2672
2682
  cursor: pointer;
2673
2683
  display: flex;
2674
2684
  align-items: center;
@@ -2696,7 +2706,7 @@ var STYLE_RULES = `
2696
2706
  display: block;
2697
2707
  }
2698
2708
 
2699
- /* \u2500\u2500 Typing indicator \u2500\u2500 */
2709
+ /* \u2500\u2500 Typing indicator (compact: three bouncing dots) \u2500\u2500 */
2700
2710
  [data-sc-chat] [data-sc-typing] {
2701
2711
  display: flex;
2702
2712
  gap: 4px;
@@ -2746,7 +2756,7 @@ var STYLE_RULES = `
2746
2756
  box-shadow: 0 2px 6px rgba(0, 0, 0, 0.06);
2747
2757
  }
2748
2758
 
2749
- /* \u2500\u2500 Action bar \u2500\u2500 */
2759
+ /* \u2500\u2500 Action bar (hover-revealed message actions: copy, regenerate) \u2500\u2500 */
2750
2760
  [data-sc-chat] [data-sc-action-bar] {
2751
2761
  display: none;
2752
2762
  gap: 2px;
@@ -2777,7 +2787,7 @@ var STYLE_RULES = `
2777
2787
  color: var(--sc-content-text-color, #1a1a2e);
2778
2788
  }
2779
2789
 
2780
- /* \u2500\u2500 Tool call cards \u2500\u2500 */
2790
+ /* \u2500\u2500 Tool call cards (compact: bordered card + icon) \u2500\u2500 */
2781
2791
  [data-sc-chat] [data-sc-tool-card] {
2782
2792
  border: 1px solid var(--sc-content-border-color, #e8e8ee);
2783
2793
  border-left: 3px solid var(--sc-color-primary, #6a59ce);
@@ -2882,7 +2892,7 @@ var STYLE_RULES = `
2882
2892
  margin-top: 4px;
2883
2893
  }
2884
2894
 
2885
- /* \u2500\u2500 Scroll-to-bottom \u2500\u2500 */
2895
+ /* \u2500\u2500 Scroll-to-bottom button \u2500\u2500 */
2886
2896
  [data-sc-chat] [data-sc-scroll-btn] {
2887
2897
  position: absolute;
2888
2898
  bottom: 80px;
@@ -2910,6 +2920,8 @@ var STYLE_RULES = `
2910
2920
  [data-sc-chat] [data-sc-scroll-btn] svg {
2911
2921
  display: block;
2912
2922
  }
2923
+
2924
+
2913
2925
  `.trim();
2914
2926
  function injectChatStyles(root = typeof document === "undefined" ? void 0 : document) {
2915
2927
  if (!root) return;
@@ -3087,8 +3099,7 @@ var SyntroChat = class extends LitElement {
3087
3099
  this._isComposing = false;
3088
3100
  };
3089
3101
  this._onSuggestion = (text2) => {
3090
- this._appendUserMessage(text2);
3091
- this.transport.send({ type: "user-message", text: text2 });
3102
+ this.sendUserMessage(text2);
3092
3103
  };
3093
3104
  }
3094
3105
  createRenderRoot() {
@@ -3196,9 +3207,27 @@ var SyntroChat = class extends LitElement {
3196
3207
  return { ...m2, toolCalls };
3197
3208
  });
3198
3209
  }
3210
+ /**
3211
+ * Append a user message to the local log and forward it to the
3212
+ * transport. Equivalent to typing `text` and pressing Send — exposed
3213
+ * publicly so consumers that render their own input affordances (e.g.
3214
+ * suggestion rows inside a custom empty-state slot) get the same
3215
+ * optimistic-append behavior the built-in input has, without
3216
+ * duplicating logic.
3217
+ */
3218
+ sendUserMessage(text2) {
3219
+ const trimmed = text2.trim();
3220
+ if (!trimmed) return;
3221
+ this._appendUserMessage(trimmed);
3222
+ this.transport.send({ type: "user-message", text: trimmed });
3223
+ }
3199
3224
  render() {
3200
3225
  const headerSlot = this.slots?.header;
3201
- const emptyState = this.slots?.emptyState ?? (this.greeting ? html7`<div style="padding:24px;text-align:center;color:var(--sc-content-text-secondary-color,#87919f)">${this.greeting}</div>` : void 0);
3226
+ const emptyState = this.slots?.emptyState ?? (this.greeting ? html7`<div
3227
+ style="padding:24px;text-align:center;color:var(--sc-content-text-secondary-color,#87919f)"
3228
+ >
3229
+ ${this.greeting}
3230
+ </div>` : void 0);
3202
3231
  return html7`
3203
3232
  <div data-sc-chat style="display:flex;flex-direction:column;height:100%;position:relative;">
3204
3233
  ${headerSlot && typeof headerSlot === "object" && "values" in headerSlot ? headerSlot : nothing5}
@@ -3208,6 +3237,7 @@ var SyntroChat = class extends LitElement {
3208
3237
  isTyping: this._isTyping,
3209
3238
  toolLabels: this.toolLabels,
3210
3239
  toolRenderers: this.toolRenderers,
3240
+ defaultToolRenderer: this.defaultToolRenderer,
3211
3241
  onCopy: this._onCopy,
3212
3242
  onRegenerate: this._onRegenerate,
3213
3243
  onToolApprove: this._onToolApprove,
@@ -3234,7 +3264,8 @@ var SyntroChat = class extends LitElement {
3234
3264
  suggestions: this._messages.length === 0 ? this.suggestions : void 0,
3235
3265
  onSuggestion: this._onSuggestion,
3236
3266
  inputActionsSlot: this.slots?.inputActions,
3237
- beforeInputSlot: this.slots?.beforeInput
3267
+ beforeInputSlot: this.slots?.beforeInput,
3268
+ placeholder: this.placeholder
3238
3269
  })}
3239
3270
  </div>
3240
3271
  `;
@@ -3246,7 +3277,9 @@ SyntroChat.properties = {
3246
3277
  suggestions: { attribute: false },
3247
3278
  toolLabels: { attribute: false },
3248
3279
  toolRenderers: { attribute: false },
3280
+ defaultToolRenderer: { attribute: false },
3249
3281
  autoExecTools: { attribute: false },
3282
+ placeholder: { type: String },
3250
3283
  slots: { attribute: false },
3251
3284
  _messages: { state: true },
3252
3285
  _isTyping: { state: true },
@@ -3270,4 +3303,4 @@ export {
3270
3303
  dompurify/dist/purify.es.mjs:
3271
3304
  (*! @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 *)
3272
3305
  */
3273
- //# sourceMappingURL=chunk-K2IG34L7.js.map
3306
+ //# sourceMappingURL=chunk-UC4XU6GH.js.map