@syntrologie/adapt-chatbot 2.39.0 → 2.41.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.
@@ -2,7 +2,7 @@ import {
2
2
  AdaptiveChatBar
3
3
  } from "./chunk-FXHYE6FY.js";
4
4
  import "./chunk-EWPPVPJ4.js";
5
- import "./chunk-P74YY3MD.js";
5
+ import "./chunk-3Z52KSYZ.js";
6
6
  import "./chunk-VZIUXXAM.js";
7
7
  import "./chunk-UVKRO5ER.js";
8
8
  export {
@@ -135,6 +135,23 @@ export declare class AdaptiveChatTrail extends LitElement {
135
135
  forceExpanded: {
136
136
  type: BooleanConstructor;
137
137
  };
138
+ /**
139
+ * BUG (found 2026-08-13, reported live as a stray horizontal rule
140
+ * floating above the transcript with nothing above it): the
141
+ * expanded/forceExpanded scroll container always paints a
142
+ * `borderTop` to mark "the panel's top edge". That reads correctly
143
+ * in `AdaptiveChatBar`, which ALWAYS renders `renderHeader(...)`
144
+ * immediately above the trail when `forceExpanded` is true (see
145
+ * `AdaptiveChatBar.ts`'s `${this.forceExpanded ? renderHeader(...)
146
+ * : nothing}`) — the border separates header from transcript.
147
+ * `LeaveAMessageLit` mounts this element directly with no header
148
+ * above it, so the same border renders as an orphaned rule sitting
149
+ * in blank card padding. Default `false` preserves the existing
150
+ * `AdaptiveChatBar` look exactly; hosts with no header above the
151
+ * trail set this `true` to suppress it. */
152
+ hideTopBorder: {
153
+ type: BooleanConstructor;
154
+ };
138
155
  /**
139
156
  * Mirrors `chatSession.inFlight` — true between `send()` and the
140
157
  * assistant's first `receiveStart`/`receiveDelta`, OR while a
@@ -207,6 +224,7 @@ export declare class AdaptiveChatTrail extends LitElement {
207
224
  visibleCount: number;
208
225
  expanded: boolean;
209
226
  forceExpanded: boolean;
227
+ hideTopBorder: boolean;
210
228
  inFlight: boolean;
211
229
  thinkingText: string;
212
230
  /** Persona identity (FEAT-1784917430) — name + small avatar for assistant
@@ -1 +1 @@
1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atTrail,
3
3
  looksLikeSerializedModelResponse
4
- } from "./chunk-P74YY3MD.js";
4
+ } from "./chunk-3Z52KSYZ.js";
5
5
  import "./chunk-VZIUXXAM.js";
6
6
  import "./chunk-UVKRO5ER.js";
7
7
  export {
@@ -1,13 +1,93 @@
1
1
  /**
2
2
  * <syntro-leave-a-message> — escalation-only async human handoff
3
3
  * (spec: docs/superpowers/specs/2026-08-13-async-handoff-crisp-design.md).
4
- * Four states: form sentmail ("You got mail!") → flipped (reply +
5
- * inline follow-up). All delivery through an injected SupportChatBridge;
6
- * fail closed when the bridge is absent or the vendor SDK undetected.
4
+ * Five states: form (compose only)email (optional, fallback framing) →
5
+ * sent → mail ("You got mail!") → flipped (reply + inline follow-up). All
6
+ * delivery through an injected SupportChatBridge; fail closed when the
7
+ * bridge is absent or the vendor SDK undetected.
8
+ *
9
+ * REDESIGN (owner brief, 2026-08-13): the compose step used to bundle an
10
+ * email input + message textarea + one Send button into a single
11
+ * "required everything up front" form. That's backwards — the message is
12
+ * the thing that matters (it's already drafted for the visitor); email is
13
+ * a nice-to-have fallback for if they leave the page before a reply
14
+ * arrives. So: send the message FIRST (compose step, message box only),
15
+ * THEN ask for email as a distinct, skippable second step. Every visitor-
16
+ * facing string moved to `copy` (workspace configuration) — the bundle
17
+ * ships no English fallback text anywhere; absent copy means that piece
18
+ * does not render (mirrors the pre-existing `replyToast` precedent).
19
+ *
20
+ * FINAL LAYOUT CORRECTION (owner, same day): the send/submit control lives
21
+ * INSIDE the field's own border — bottom-right, exactly like
22
+ * `<syntro-chat>`'s composer — never below the field, never beside it as a
23
+ * sibling button. And nothing renders below the field's box at all: one
24
+ * line of framing/prompt copy above it, then the box, full stop (the card
25
+ * is clamped to ~276px by the deck it lives in). See `fieldWrapStyles` /
26
+ * `embeddedIconButtonStyles` below for the mechanics, and `srOnlyStyles`
27
+ * for how a field still gets a REAL accessible label without spending any
28
+ * of that vertical budget.
29
+ *
30
+ * SECOND CORRECTION (owner, same day): "why is it reinventing the wheel"
31
+ * — the live-chat face mounts the REAL `<adaptive-chat-trail>` transcript
32
+ * renderer (`./AdaptiveChatTrail.ts`) instead of hand-rolled bubble
33
+ * markup. It is explicitly NOT bound to the concierge's shared
34
+ * `chatSession` singleton (`./ChatSession.ts`) — this file never imports
35
+ * that module, directly or transitively (the trail's own import graph is
36
+ * `@syntrologie/chat` + `lit` only). Each card owns its own
37
+ * `_transcript` instance field and feeds it to its own
38
+ * `<adaptive-chat-trail>` element; see `LeaveAMessageLit.test.ts`'s
39
+ * singleton-isolation suite for the mutation-proven guarantee.
7
40
  */
8
41
  import { LitElement, nothing } from 'lit';
42
+ import './AdaptiveChatTrail.js';
9
43
  import type { SupportChatBridge } from './support-chat/types';
10
- export type LeaveAMessageState = 'form' | 'sent' | 'mail' | 'flipped';
44
+ export type LeaveAMessageState = 'form' | 'email' | 'sent' | 'mail' | 'flipped';
45
+ /**
46
+ * Every visitor-facing string on this card — authored entirely by the
47
+ * workspace (`default_widget_props.copy`), same pattern as `replyToast`.
48
+ * The bundle ships NO English fallback for any of these: absent copy means
49
+ * that piece of UI does not render. For the icon-only send/submit
50
+ * controls this isn't just a style choice — an icon button with no
51
+ * accessible name is a real usability defect, so `sendLabel` /
52
+ * `emailSubmitLabel` / `replySendLabel` double as BOTH the control's
53
+ * aria-label AND the gate on whether the control renders at all.
54
+ */
55
+ export interface LeaveAMessageCopy {
56
+ /** Framing line above the message box (form step) — explains the
57
+ * message was drafted from the conversation and remains editable. */
58
+ framing?: string;
59
+ /** Accessible (visually-hidden) label for the message textarea. */
60
+ messageLabel?: string;
61
+ /** Accessible name for the compose step's embedded send control.
62
+ * Absence removes the control (see interface doc above). */
63
+ sendLabel?: string;
64
+ /** Prompt shown on the email step — frames the address as optional, a
65
+ * fallback for a reply if the visitor leaves the page. */
66
+ emailPrompt?: string;
67
+ /** Accessible (visually-hidden) label for the email input. */
68
+ emailLabel?: string;
69
+ /** Placeholder for the email input — distinct copy from the label, never
70
+ * doubling as it. */
71
+ emailPlaceholder?: string;
72
+ /** Accessible name for the email step's embedded submit control.
73
+ * Absence removes the control. */
74
+ emailSubmitLabel?: string;
75
+ /** Quiet inline decline text, beside the email field. Absence removes
76
+ * the control — the visitor can still get the same effect by
77
+ * submitting a blank field. */
78
+ emailSkipLabel?: string;
79
+ /** Confirmation paragraph shown in the 'sent' state. */
80
+ sentBody?: string;
81
+ /** Button text for the 'mail' state ("You got mail!" tap target). */
82
+ mailLabel?: string;
83
+ /** Accessible (visually-hidden) label for the reply input. */
84
+ replyLabel?: string;
85
+ /** Placeholder for the reply input (flipped state). */
86
+ replyPlaceholder?: string;
87
+ /** Accessible name for the flipped state's embedded send control.
88
+ * Absence removes the control. */
89
+ replySendLabel?: string;
90
+ }
11
91
  /**
12
92
  * Minimal runtime slice the widget needs to raise the "You got mail!"
13
93
  * toast — mirrors adaptive-nav's `NavWidgetRuntime.events` shape (see
@@ -58,6 +138,9 @@ export declare class LeaveAMessageLit extends LitElement {
58
138
  replyToast: {
59
139
  attribute: boolean;
60
140
  };
141
+ copy: {
142
+ attribute: boolean;
143
+ };
61
144
  };
62
145
  bridge: SupportChatBridge | undefined;
63
146
  message: string;
@@ -76,9 +159,19 @@ export declare class LeaveAMessageLit extends LitElement {
76
159
  title?: string;
77
160
  body?: string;
78
161
  } | undefined;
162
+ /** Every OTHER visitor-facing string on this card — see
163
+ * `LeaveAMessageCopy` doc. */
164
+ copy: LeaveAMessageCopy | undefined;
165
+ /** Unique per-instance id prefix so `<label for>` never collides across
166
+ * more than one card mounted on the same page. */
167
+ private readonly _uid;
79
168
  private _email;
80
169
  private _reply;
81
- private _operatorMessages;
170
+ /** Visitor↔operator conversation, in order — rendered as a chat
171
+ * transcript once the visitor taps into the mail state (see render()'s
172
+ * 'flipped' branch). Seeded with the visitor's own compose-step message
173
+ * in `_submitMessage`. */
174
+ private _transcript;
82
175
  private _unsubscribe;
83
176
  createRenderRoot(): HTMLElement;
84
177
  connectedCallback(): void;
@@ -86,10 +179,10 @@ export declare class LeaveAMessageLit extends LitElement {
86
179
  disconnectedCallback(): void;
87
180
  /** Read the injected persistence store, if any (I2). */
88
181
  private _persistStore;
89
- /** Hydrate {state, operatorMessages, email} from a prior page's mount. */
182
+ /** Hydrate {state, transcript, email} from a prior page's mount. */
90
183
  private _loadPersisted;
91
- /** Snapshot {state, operatorMessages, email} so the NEXT mount (a fresh
92
- * page in the same session) can pick the thread back up. */
184
+ /** Snapshot {state, transcript, email} so the NEXT mount (a fresh page
185
+ * in the same session) can pick the thread back up. */
93
186
  private _persist;
94
187
  /**
95
188
  * Raise the reply toast through the canvas element. Pierces shadow roots to
@@ -98,12 +191,37 @@ export declare class LeaveAMessageLit extends LitElement {
98
191
  * always the durable signal.
99
192
  */
100
193
  private _toastReplyArrived;
101
- /** Paint our own focus ring from the theme see fieldStyles.outline. */
194
+ /** Paint our own focus ring from the theme. The border now lives on the
195
+ * field SHELL (`data-lam-field-wrap`), not the borderless inner
196
+ * textarea/input, so the ring targets that ancestor via `closest()`. */
102
197
  private _focusOn;
103
198
  private _focusOff;
104
199
  private _onReply;
105
- private _submit;
200
+ /** Compose step → email step. Delivers the message immediately; email
201
+ * capture is a SEPARATE, later, optional step (owner redesign). Seeds
202
+ * the chat transcript with the visitor's OWN plain message text (not
203
+ * the context-prefixed string sent to the bridge — that prefix is
204
+ * internal plumbing for the human agent, not something the visitor
205
+ * should see echoed back at themselves). */
206
+ private _submitMessage;
207
+ /** Email step → sent. Blank email is a valid submission (the field is
208
+ * optional) and simply skips `setVisitorEmail`; an invalid non-blank
209
+ * email blocks advancing so a mistyped address doesn't silently vanish. */
210
+ private _submitEmail;
211
+ /** Explicit decline — advances regardless of whatever is typed, without
212
+ * ever calling `setVisitorEmail`. Distinct from submitting a blank
213
+ * field only in that it discards partial input the visitor may not
214
+ * have meant to send. */
215
+ private _skipEmail;
106
216
  private _flip;
217
+ /** Maps this card's OWN `_transcript` (never the concierge's) to the
218
+ * shape `<adaptive-chat-trail>` renders. `visitor` → `'user'` (right-
219
+ * aligned, branded) and `operator` → `'assistant'` (left-aligned,
220
+ * neutral) purely for the trail's existing visual treatment — no
221
+ * claim that a human Crisp operator IS the AI assistant. Freshly
222
+ * computed on every render from local state; nothing here reads from
223
+ * or writes to `chatSession`. */
224
+ private _trailMessages;
107
225
  private _sendReply;
108
226
  render(): typeof nothing | import("lit-html").TemplateResult<1>;
109
227
  }
@@ -1 +1 @@
1
- {"version":3,"file":"LeaveAMessageLit.d.ts","sourceRoot":"","sources":["../src/LeaveAMessageLit.ts"],"names":[],"mappings":"AAAA;;;;;;GAMG;AACH,OAAO,EAAQ,UAAU,EAAE,OAAO,EAAE,MAAM,KAAK,CAAC;AAGhD,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,sBAAsB,CAAC;AAqE9D,MAAM,MAAM,kBAAkB,GAAG,MAAM,GAAG,MAAM,GAAG,MAAM,GAAG,SAAS,CAAC;AAEtE;;;;;;GAMG;AACH,MAAM,WAAW,oBAAoB;IACnC,MAAM,EAAE;QACN,OAAO,EAAE,CAAC,IAAI,EAAE,MAAM,EAAE,KAAK,CAAC,EAAE,MAAM,CAAC,MAAM,EAAE,OAAO,CAAC,KAAK,IAAI,CAAC;KAClE,CAAC;IACF;;;;;;;;;OASG;IACH,KAAK,CAAC,EAAE;QACN,IAAI,CAAC,EAAE;YACL,EAAE,CAAC,EAAE,CAAC,SAAS,EAAE,MAAM,KAAK;gBAC1B,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,KAAK,OAAO,CAAC;gBAC9B,GAAG,EAAE,CAAC,GAAG,EAAE,MAAM,EAAE,KAAK,EAAE,OAAO,KAAK,IAAI,CAAC;aAC5C,CAAC;SACH,CAAC;KACH,CAAC;CACH;AASD,qBAAa,gBAAiB,SAAQ,UAAU;IAC9C,OAAgB,UAAU;;;;;;;;;;;;;;;;;;;MAOxB;IAEF,MAAM,EAAE,iBAAiB,GAAG,SAAS,CAAC;IACtC,OAAO,SAAM;IACb,cAAc,SAAM;IACpB,KAAK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CAAC,KAAK,CAGX;IAEF;;;;;;sCAMkC;IAClC,OAAO,CAAC,cAAc;IAStB,OAAO,CAAC,UAAU,CAUhB;IAEO,MAAM;CA8MhB;AAED,wEAAwE;AACxE,wBAAgB,wBAAwB,IAAI,IAAI,CAI/C"}
@@ -1 +1 @@
1
- {"version":3,"file":"LeaveAMessageLit.test.d.ts","sourceRoot":"","sources":["../src/LeaveAMessageLit.test.ts"],"names":[],"mappings":"AAEA,OAAO,oBAAoB,CAAC"}
1
+ {"version":3,"file":"LeaveAMessageLit.test.d.ts","sourceRoot":"","sources":["../src/LeaveAMessageLit.test.ts"],"names":[],"mappings":"AAKA,OAAO,oBAAoB,CAAC"}
@@ -23,6 +23,7 @@ var _AdaptiveChatTrail = class _AdaptiveChatTrail extends LitElement {
23
23
  this.visibleCount = DEFAULT_VISIBLE;
24
24
  this.expanded = false;
25
25
  this.forceExpanded = false;
26
+ this.hideTopBorder = false;
26
27
  this.inFlight = false;
27
28
  this.thinkingText = "";
28
29
  /** Persona identity (FEAT-1784917430) — name + small avatar for assistant
@@ -717,14 +718,18 @@ var _AdaptiveChatTrail = class _AdaptiveChatTrail extends LitElement {
717
718
  // SyntroBottomSheet.test.ts.
718
719
  overscrollBehavior: "contain",
719
720
  paddingTop: "8px",
720
- borderTop: "var(--sc-content-bubble-border, 1px solid rgba(255, 255, 255, 0.18))",
721
+ ...this.hideTopBorder ? {} : {
722
+ borderTop: "var(--sc-content-bubble-border, 1px solid rgba(255, 255, 255, 0.18))"
723
+ },
721
724
  scrollBehavior: "smooth",
722
725
  scrollbarWidth: "thin"
723
726
  } : this.expanded ? {
724
727
  maxHeight: "min(320px, 40vh)",
725
728
  overflowY: "auto",
726
729
  paddingTop: "8px",
727
- borderTop: "var(--sc-content-bubble-border, 1px solid rgba(255, 255, 255, 0.18))",
730
+ ...this.hideTopBorder ? {} : {
731
+ borderTop: "var(--sc-content-bubble-border, 1px solid rgba(255, 255, 255, 0.18))"
732
+ },
728
733
  scrollBehavior: "smooth",
729
734
  scrollbarWidth: "thin"
730
735
  } : {
@@ -1069,6 +1074,21 @@ _AdaptiveChatTrail.properties = {
1069
1074
  * the chat in a full-screen surface (the mobile panel) where
1070
1075
  * collapse makes no sense — there's nothing to collapse INTO. */
1071
1076
  forceExpanded: { type: Boolean },
1077
+ /**
1078
+ * BUG (found 2026-08-13, reported live as a stray horizontal rule
1079
+ * floating above the transcript with nothing above it): the
1080
+ * expanded/forceExpanded scroll container always paints a
1081
+ * `borderTop` to mark "the panel's top edge". That reads correctly
1082
+ * in `AdaptiveChatBar`, which ALWAYS renders `renderHeader(...)`
1083
+ * immediately above the trail when `forceExpanded` is true (see
1084
+ * `AdaptiveChatBar.ts`'s `${this.forceExpanded ? renderHeader(...)
1085
+ * : nothing}`) — the border separates header from transcript.
1086
+ * `LeaveAMessageLit` mounts this element directly with no header
1087
+ * above it, so the same border renders as an orphaned rule sitting
1088
+ * in blank card padding. Default `false` preserves the existing
1089
+ * `AdaptiveChatBar` look exactly; hosts with no header above the
1090
+ * trail set this `true` to suppress it. */
1091
+ hideTopBorder: { type: Boolean },
1072
1092
  /**
1073
1093
  * Mirrors `chatSession.inFlight` — true between `send()` and the
1074
1094
  * assistant's first `receiveStart`/`receiveDelta`, OR while a
@@ -1697,4 +1717,4 @@ export {
1697
1717
  AdaptiveChatTrail,
1698
1718
  looksLikeSerializedModelResponse
1699
1719
  };
1700
- //# sourceMappingURL=chunk-P74YY3MD.js.map
1720
+ //# sourceMappingURL=chunk-3Z52KSYZ.js.map