@sevenfold/setto-client 0.41.1 → 0.43.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.
@@ -15,7 +15,8 @@ type Message = {
15
15
  avatarUrl?: string | null;
16
16
  authorName?: string | null;
17
17
  attachments?: Attachment[];
18
- kind?: 'message' | 'navigation' | 'agent_joined' | 'agent_requested';
18
+ /** `agent_present` is the widget's own: the person on the chat button, under the opening line. */
19
+ kind?: 'message' | 'navigation' | 'agent_joined' | 'agent_requested' | 'agent_present';
19
20
  action?: {
20
21
  type: 'navigate';
21
22
  url: string;
@@ -62,14 +63,21 @@ export declare function nextWordBoundary(content: string, visibleLength: number)
62
63
  export declare function sineOut(progress: number): number;
63
64
  export declare function isAtChatBottom(scrollHeight: number, scrollTop: number, clientHeight: number): boolean;
64
65
  export declare function chatComposerSpace(height: number): number;
66
+ /** The greeting the teammate on the chat button wrote themselves, in the widget's language, if any. */
67
+ export declare function ownGreeting(locale: string, human: Pick<NearbyHuman, 'greeting'>): string | null;
65
68
  /**
66
- * The opening line from the teammate whose face is on the chat button: their
67
- * own, or this. Mirrors setto-server's back office (`defaultGreeting`).
69
+ * The line under the assistant's opening when someone is on the chat button
70
+ * and has not written a greeting of their own. Until 0.43.0 the opening was
71
+ * a canned «Hei, jeg heter Simon! Pixel svarer deg …» in their name, which
72
+ * read as if they had typed it and then handed over to an AI (Simon,
73
+ * 2026-10-14). The assistant opens now, and this notice shows the person.
68
74
  */
69
- export declare function humanIntro(locale: string, human: Pick<NearbyHuman, 'name' | 'greeting'>, agent?: string): string;
75
+ export declare function presenceLine(locale: string, name: string): string;
76
+ /** Messages that are only the widget's opening: local, and none of them the visitor's. */
77
+ export declare function isOpeningOnly(messages: readonly Message[]): boolean;
70
78
  /**
71
79
  * Whether the team row needs «Snakk med et menneske» above the faces. Not for
72
- * one person who is online: their greeting already says to tap their picture.
80
+ * one person who is online: the notice under the opening already shows them.
73
81
  */
74
82
  export declare function teamRowLabelled(humans: readonly Pick<NearbyHuman, 'online'>[]): boolean;
75
83
  /** `@Name` as a whole word, any case, as setto-server reads it. */
@@ -104,8 +112,11 @@ export declare function TranslationNote({ translation, showingOriginal, onToggle
104
112
  * visitor's language, without «Show original». A notice is Setto's own line,
105
113
  * not something a person wrote, so there is no original worth reading.
106
114
  */
107
- export declare function AgentJoinedEvent({ message }: {
115
+ export declare function AgentJoinedEvent({ message, onPick, pickLabel, }: {
108
116
  message: Message;
117
+ /** Tapping the photo writes `@Name` in the box, as a face in the team row does. */
118
+ onPick?: () => void;
119
+ pickLabel?: string;
109
120
  }): import("react/jsx-runtime").JSX.Element;
110
121
  /**
111
122
  * A teammate is composing. The row opts out of the transcript's polite live
@@ -35503,11 +35503,20 @@ function norwegian(locale) {
35503
35503
  function intro(locale, name2, agent = "Barista") {
35504
35504
  return norwegian(locale) ? `Hei! Jeg er ${agent}, ${name2 ? `${name2}s` : "nettstedets"} AI-assistent. Jeg svarer ut fra det teamet har delt her, og hjelper deg videre til dem når det trengs.` : `Hello! I’m ${agent}, the AI assistant for ${name2 ?? "this website"}. I answer from what the team has shared here and help you reach them when needed.`;
35505
35505
  }
35506
- function humanIntro(locale, human, agent = "Barista") {
35507
- const own2 = (norwegian(locale) ? human.greeting?.no : human.greeting?.en)?.trim();
35508
- if (own2) return own2;
35509
- const name2 = human.name ?? "";
35510
- return norwegian(locale) ? `Hei, jeg heter ${name2}! ${agent} svarer deg med en gang, og vil du heller snakke med meg, skriver du @${name2} eller trykker på bildet mitt.` : `Hi, my name is ${name2}! ${agent} will answer you right away. If you would rather talk to me, type @${name2} or tap my picture.`;
35506
+ function ownGreeting(locale, human) {
35507
+ return (norwegian(locale) ? human.greeting?.no : human.greeting?.en)?.trim() || null;
35508
+ }
35509
+ function presenceLine(locale, name2) {
35510
+ return norwegian(locale) ? `${name2} er her også. Trykk på bildet eller skriv @${name2} for å snakke med et menneske.` : `${name2} is here too. Tap the photo or type @${name2} to talk to a person.`;
35511
+ }
35512
+ function isOpeningOnly(messages) {
35513
+ return messages.length > 0 && messages.length <= 2 && messages.every((message) => !message.id && message.role !== "visitor" && message.content);
35514
+ }
35515
+ function sameOpening(a, b) {
35516
+ return a.length === b.length && a.every((message, index2) => {
35517
+ const other = b[index2];
35518
+ return message.role === other.role && message.kind === other.kind && message.content === other.content && message.avatarUrl === other.avatarUrl;
35519
+ });
35511
35520
  }
35512
35521
  function teamRowLabelled(humans) {
35513
35522
  return !(humans.length === 1 && humans[0].online);
@@ -35624,20 +35633,34 @@ function TranslationNote({
35624
35633
  ] });
35625
35634
  }
35626
35635
  const NO_ORIGINALS = /* @__PURE__ */ new Set();
35627
- function AgentJoinedEvent({ message }) {
35636
+ function AgentJoinedEvent({
35637
+ message,
35638
+ onPick,
35639
+ pickLabel
35640
+ }) {
35628
35641
  const shown = shownMessage(message, NO_ORIGINALS);
35629
35642
  return /* @__PURE__ */ jsxs("div", { className: "setto-chat__message setto-chat__message--system setto-chat__message--agent-joined", children: [
35630
35643
  /* @__PURE__ */ jsx(
35631
- "span",
35644
+ PersonAvatar,
35632
35645
  {
35646
+ url: message.avatarUrl ?? null,
35633
35647
  className: "setto-chat__avatar setto-chat__avatar--human setto-chat__avatar--joined",
35634
- "aria-hidden": "true",
35635
- children: message.avatarUrl ? /* @__PURE__ */ jsx("img", { src: message.avatarUrl, alt: "" }) : /* @__PURE__ */ jsx(PersonIcon, {})
35648
+ onPick,
35649
+ label: pickLabel
35636
35650
  }
35637
35651
  ),
35638
35652
  /* @__PURE__ */ jsx("div", { className: "setto-chat__message-stack", children: /* @__PURE__ */ jsx("div", { className: "setto-chat__message-bubble", children: /* @__PURE__ */ jsx("span", { className: "setto-chat__message-copy", lang: shown.lang, children: shown.content }) }) })
35639
35653
  ] });
35640
35654
  }
35655
+ function PersonAvatar({
35656
+ url,
35657
+ className,
35658
+ onPick,
35659
+ label
35660
+ }) {
35661
+ const face = url ? /* @__PURE__ */ jsx("img", { src: url, alt: "" }) : /* @__PURE__ */ jsx(PersonIcon, {});
35662
+ return onPick ? /* @__PURE__ */ jsx("button", { type: "button", className, onClick: onPick, "aria-label": label, title: label, children: face }) : /* @__PURE__ */ jsx("span", { className, "aria-hidden": "true", children: face });
35663
+ }
35641
35664
  function TeamTypingRow({ label, avatarUrl }) {
35642
35665
  return /* @__PURE__ */ jsxs(
35643
35666
  "div",
@@ -36327,13 +36350,13 @@ function SettoChat() {
36327
36350
  nearby: "I nærheten",
36328
36351
  askFor: (name2, online) => `Spør etter ${name2} (${online ? "tilgjengelig nå" : "i nærheten"})`,
36329
36352
  someone: "Teamet",
36353
+ mention: (name2) => `Skriv @${name2} for å spørre etter ${name2}`,
36330
36354
  send: "Send melding",
36331
36355
  sending: "Svarer …",
36332
36356
  attach: "Legg ved bilde",
36333
36357
  remove: "Fjern",
36334
36358
  failed: "Jeg får ikke svart akkurat nå. Kontakt gjerne teamet direkte.",
36335
36359
  image: "Bilde",
36336
- team: "Teamet",
36337
36360
  seen: "Sett",
36338
36361
  emptyChats: "Nye samtaler du starter her vises i denne listen."
36339
36362
  } : {
@@ -36352,30 +36375,36 @@ function SettoChat() {
36352
36375
  nearby: "Nearby",
36353
36376
  askFor: (name2, online) => `Ask for ${name2} (${online ? "available now" : "nearby"})`,
36354
36377
  someone: "The team",
36378
+ mention: (name2) => `Write @${name2} to ask for ${name2}`,
36355
36379
  send: "Send message",
36356
36380
  sending: "Replying …",
36357
36381
  attach: "Attach image",
36358
36382
  remove: "Remove",
36359
36383
  failed: "I cannot reply right now. Please contact the team directly.",
36360
36384
  image: "Image",
36361
- team: "The team",
36362
36385
  seen: "Seen",
36363
36386
  emptyChats: "New conversations you start here will appear in this list."
36364
36387
  };
36365
36388
  function ensureVisitor() {
36366
36389
  return visitor.current ??= visitorId();
36367
36390
  }
36368
- function welcomeMessage() {
36369
- if (greeter) {
36370
- return {
36371
- role: "human",
36372
- content: humanIntro(locale, greeter, agentName),
36391
+ function welcomeMessages() {
36392
+ const theirs = greeter ? ownGreeting(locale, greeter) : null;
36393
+ if (greeter && theirs)
36394
+ return [{ role: "human", content: theirs, authorName: greeter.name, avatarUrl: greeter.avatarUrl }];
36395
+ const own2 = (norwegian(locale) ? settings?.welcome?.no : settings?.welcome?.en)?.trim();
36396
+ const opening = { role: "assistant", content: own2 || intro(locale, settings?.displayName ?? void 0, agentName) };
36397
+ if (!greeter?.name) return [opening];
36398
+ return [
36399
+ opening,
36400
+ {
36401
+ role: "system",
36402
+ kind: "agent_present",
36403
+ content: presenceLine(locale, greeter.name),
36373
36404
  authorName: greeter.name,
36374
36405
  avatarUrl: greeter.avatarUrl
36375
- };
36376
- }
36377
- const own2 = (norwegian(locale) ? settings?.welcome?.no : settings?.welcome?.en)?.trim();
36378
- return { role: "assistant", content: own2 || intro(locale, settings?.displayName ?? void 0, agentName) };
36406
+ }
36407
+ ];
36379
36408
  }
36380
36409
  function pickHuman(human) {
36381
36410
  setTapped((current) => new Set(current).add(human.handle));
@@ -36386,6 +36415,17 @@ function SettoChat() {
36386
36415
  }
36387
36416
  setFocusRequest((current) => current + 1);
36388
36417
  }
36418
+ function pickByName(name2) {
36419
+ const human = nearby.find((person) => person.name === name2);
36420
+ if (human) {
36421
+ pickHuman(human);
36422
+ return;
36423
+ }
36424
+ const next = insertMention(draft, name2, null).value;
36425
+ setDraft(next);
36426
+ typingSender().update(next);
36427
+ setFocusRequest((current) => current + 1);
36428
+ }
36389
36429
  function rememberConversation(id) {
36390
36430
  conversationId.current = id;
36391
36431
  try {
@@ -36530,13 +36570,10 @@ function SettoChat() {
36530
36570
  const greeterKey = greeter ? `${greeter.handle}:${greeter.avatarUrl ?? ""}` : "";
36531
36571
  useEffect(() => {
36532
36572
  if (!mounted || !settings || conversationId.current) return;
36533
- const welcome = welcomeMessage();
36573
+ const welcome = welcomeMessages();
36534
36574
  setMessages((current) => {
36535
- if (current.length === 0) return [welcome];
36536
- const only = current[0];
36537
- if (current.length === 1 && only && !only.id && (only.role === "assistant" || only.role === "human")) {
36538
- return only.role === welcome.role && only.content === welcome.content && only.avatarUrl === welcome.avatarUrl ? current : [welcome];
36539
- }
36575
+ if (current.length === 0) return welcome;
36576
+ if (isOpeningOnly(current)) return sameOpening(current, welcome) ? current : welcome;
36540
36577
  return current;
36541
36578
  });
36542
36579
  }, [mounted, settings, locale, greeterKey]);
@@ -36676,7 +36713,7 @@ function SettoChat() {
36676
36713
  setRealtime(null);
36677
36714
  setTeamTypingUntil(null);
36678
36715
  setHumanJoined(false);
36679
- setMessages([welcomeMessage()]);
36716
+ setMessages(welcomeMessages());
36680
36717
  setDraft("");
36681
36718
  setTapped(/* @__PURE__ */ new Set());
36682
36719
  setQueued(false);
@@ -36916,11 +36953,13 @@ function SettoChat() {
36916
36953
  "aria-busy": loadingConversation,
36917
36954
  children: /* @__PURE__ */ jsxs("div", { className: "setto-chat__message-list", children: [
36918
36955
  messages.map((item, index2) => {
36919
- if (item.role === "system" && (item.kind === "agent_joined" || item.kind === "agent_requested")) {
36956
+ if (item.role === "system" && (item.kind === "agent_joined" || item.kind === "agent_requested" || item.kind === "agent_present")) {
36920
36957
  return /* @__PURE__ */ jsx(
36921
36958
  AgentJoinedEvent,
36922
36959
  {
36923
- message: item
36960
+ message: item,
36961
+ onPick: item.authorName ? () => pickByName(item.authorName) : void 0,
36962
+ pickLabel: item.authorName ? labels.mention(item.authorName) : void 0
36924
36963
  },
36925
36964
  item.id ?? `agent-joined-${index2}`
36926
36965
  );
@@ -36931,16 +36970,17 @@ function SettoChat() {
36931
36970
  {
36932
36971
  className: `setto-chat__message setto-chat__message--${item.role}`,
36933
36972
  children: [
36934
- item.role === "assistant" || item.role === "human" ? /* @__PURE__ */ jsx(
36935
- "span",
36973
+ item.role === "human" ? /* @__PURE__ */ jsx(
36974
+ PersonAvatar,
36936
36975
  {
36937
- className: `setto-chat__avatar setto-chat__avatar--${item.role}`,
36938
- "aria-hidden": "true",
36939
- children: item.role === "human" && item.avatarUrl ? /* @__PURE__ */ jsx("img", { src: item.avatarUrl, alt: "" }) : item.role === "human" ? /* @__PURE__ */ jsx(PersonIcon, {}) : /* @__PURE__ */ jsx(AgentAvatar, { url: agentAvatarUrl })
36976
+ url: item.avatarUrl ?? null,
36977
+ className: "setto-chat__avatar setto-chat__avatar--human",
36978
+ onPick: item.authorName ? () => pickByName(item.authorName) : void 0,
36979
+ label: item.authorName ? labels.mention(item.authorName) : void 0
36940
36980
  }
36941
- ) : null,
36981
+ ) : item.role === "assistant" ? /* @__PURE__ */ jsx("span", { className: "setto-chat__avatar setto-chat__avatar--assistant", "aria-hidden": "true", children: /* @__PURE__ */ jsx(AgentAvatar, { url: agentAvatarUrl }) }) : null,
36942
36982
  /* @__PURE__ */ jsxs("div", { className: "setto-chat__message-stack", children: [
36943
- item.role === "assistant" || item.role === "human" ? /* @__PURE__ */ jsx("span", { className: "setto-chat__speaker", children: item.role === "human" ? item.authorName || labels.team : `${agentName} · ${labels.ai}` }) : null,
36983
+ item.role === "assistant" ? /* @__PURE__ */ jsx("span", { className: "setto-chat__speaker", children: `${agentName} · ${labels.ai}` }) : null,
36944
36984
  /* @__PURE__ */ jsxs("div", { className: "setto-chat__message-bubble", children: [
36945
36985
  /* @__PURE__ */ jsx("div", { className: "setto-chat__message-copy", lang: shown.lang, children: shown.content ? item.role === "assistant" ? /* @__PURE__ */ jsx(SiteChatMarkdown, { content: shown.content, reveal: item.reveal }) : shown.content : /* @__PURE__ */ jsx("span", { className: "setto-chat__typing", children: "···" }) }),
36946
36986
  item.attachments?.map((attachment) => /* @__PURE__ */ jsx(
@@ -37098,7 +37138,7 @@ function useChatStyles() {
37098
37138
  .setto-chat__scrim{position:absolute;inset:0;z-index:45;border:0;background:rgba(33,23,17,.32);opacity:0;pointer-events:none;transition:opacity 220ms ease}.setto-chat__scrim.is-open{opacity:1;pointer-events:auto}.setto-chat__chats{position:relative;z-index:50;width:min(84vw,280px);height:100%;flex:0 0 280px;padding:1rem .85rem calc(1rem + env(safe-area-inset-bottom));display:flex;flex-direction:column;gap:.9rem;background:color-mix(in srgb,var(--setto-chat-crema) 32%,var(--setto-chat-canvas));border-right:1px solid color-mix(in srgb,var(--setto-chat-ink) 12%,transparent);overflow:hidden}.setto-chat__chats-heading{display:flex;align-items:center;justify-content:space-between;gap:.5rem;min-height:34px;font-size:.66rem;font-weight:600;letter-spacing:.1em;text-transform:uppercase;color:color-mix(in srgb,var(--setto-chat-ink) 58%,transparent)}.setto-chat__chats-heading button{width:34px;height:34px;padding:0;border:0;border-radius:8px;background:transparent;color:color-mix(in srgb,var(--setto-chat-ink) 58%,transparent);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.setto-chat__new{display:flex;align-items:center;gap:.55rem;width:100%;padding:.5rem .55rem;border:0;border-radius:8px;background:transparent;color:var(--setto-chat-ink);font-weight:600;font-size:.9rem;text-align:left;cursor:pointer;transition:background 140ms ease}.setto-chat__new:hover{background:color-mix(in srgb,var(--setto-chat-ink) 5%,transparent)}.setto-chat__chat-list{display:flex;flex-direction:column;gap:.1rem;flex:1;min-height:0;overflow:auto;overscroll-behavior:contain;margin-right:-.85rem;padding-right:.3rem}.setto-chat__chat-list p{margin:.35rem .55rem;font-size:.85rem;line-height:1.5;color:color-mix(in srgb,var(--setto-chat-ink) 58%,transparent)}.setto-chat__chat-row{width:100%;display:grid;grid-template-columns:minmax(0,1fr) auto;gap:.4rem;padding:.55rem;border:0;border-radius:8px;background:transparent;color:var(--setto-chat-ink);text-align:left;cursor:pointer}.setto-chat__chat-row:hover,.setto-chat__chat-row.is-active{background:color-mix(in srgb,var(--setto-chat-ink) 7.5%,transparent)}.setto-chat__chat-row span{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:.9rem;font-weight:600}.setto-chat__chat-row time{font-size:.72rem;color:color-mix(in srgb,var(--setto-chat-ink) 55%,transparent)}
37099
37139
  .setto-chat__main{position:relative;z-index:1;display:flex;flex:1;min-width:0;max-width:820px;height:100%;margin:0 auto;flex-direction:column;background:var(--setto-chat-canvas)}.setto-chat__header{position:absolute;inset:0 0 auto;z-index:30;min-height:calc(46px + 2 * var(--setto-chat-edge));padding:var(--setto-chat-edge);display:flex;align-items:center;gap:.5rem;background:linear-gradient(to bottom,color-mix(in srgb,var(--setto-chat-crema) 88%,transparent),color-mix(in srgb,var(--setto-chat-crema) 72%,transparent));border-bottom:1px solid color-mix(in srgb,var(--setto-chat-ink) 12%,transparent);backdrop-filter:blur(20px) saturate(150%);-webkit-backdrop-filter:blur(20px) saturate(150%);isolation:isolate}.setto-chat__round-button{flex:none;width:46px;height:46px;padding:0;border:1px solid color-mix(in srgb,var(--setto-chat-ink) 12%,transparent);border-radius:50%;background:var(--setto-chat-raised);color:var(--setto-chat-ink);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background 160ms ease,border-color 160ms ease,color 160ms ease}.setto-chat__round-button:hover{background:var(--setto-chat-crema);border-color:var(--setto-chat-accent);color:var(--setto-chat-accent)}.setto-chat__round-button:active{transform:scale(.96)}.setto-chat__brand{flex:1;min-width:0;display:flex;flex-direction:column;align-items:center;line-height:1.15;text-align:center}.setto-chat__brand h2{margin:0;color:var(--setto-chat-ink);font-size:1.02rem;font-weight:600;line-height:1.15}.setto-chat__brand p{max-width:100%;margin:2px 0 0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap;color:color-mix(in srgb,var(--setto-chat-ink) 56%,transparent);font-size:.78rem;line-height:1.15}
37100
37140
  .setto-chat__body{position:relative;display:flex;flex:1 1 auto;min-height:0;height:100%;flex-direction:column}.setto-chat__log{display:flex;flex:1 1 auto;min-height:0;overflow-y:auto;overscroll-behavior:contain;flex-direction:column;padding:calc(46px + 2 * var(--setto-chat-edge) + 1.3rem) .75rem var(--setto-chat-composer-space,8rem);scroll-padding-bottom:var(--setto-chat-composer-space,8rem);scroll-behavior:auto;-webkit-overflow-scrolling:touch}.setto-chat__message-list{display:flex;flex-direction:column}.setto-chat__message{--setto-chat-bubble:color-mix(in srgb,var(--setto-chat-ink) 7%,var(--setto-chat-canvas));display:flex;align-items:flex-end;gap:.55rem;width:100%;margin-bottom:1rem;color:color-mix(in srgb,var(--setto-chat-ink) 92%,transparent);font-size:16px;line-height:1.5;overflow-wrap:anywhere}.setto-chat__message-stack{display:flex;min-width:0;max-width:min(78%,36rem);flex-direction:column;align-items:flex-start}.setto-chat__message-bubble{position:relative;min-width:2.5rem;padding:.58rem .82rem;border-radius:19px 19px 19px 5px;background:var(--setto-chat-bubble);white-space:pre-wrap}.setto-chat__message--assistant .setto-chat__message-bubble::before,.setto-chat__message--human .setto-chat__message-bubble::before{content:"";position:absolute;z-index:0;left:-7px;bottom:0;width:16px;height:17px;border-bottom-right-radius:14px;background:var(--setto-chat-bubble)}.setto-chat__message--assistant .setto-chat__message-bubble::after,.setto-chat__message--human .setto-chat__message-bubble::after{content:"";position:absolute;z-index:1;left:-10px;bottom:0;width:10px;height:18px;border-bottom-right-radius:10px;background:var(--setto-chat-canvas)}.setto-chat__message-copy,.setto-chat__image{position:relative;z-index:2}.setto-chat__message--visitor{--setto-chat-bubble:var(--setto-chat-accent);justify-content:flex-end;color:var(--setto-chat-on-accent)}.setto-chat__message--visitor .setto-chat__message-stack{align-items:flex-end}.setto-chat__message--visitor .setto-chat__message-bubble{border-radius:19px 19px 5px 19px}.setto-chat__message--visitor .setto-chat__message-bubble::before{content:"";position:absolute;z-index:0;right:-7px;bottom:0;width:16px;height:17px;border-bottom-left-radius:14px;background:var(--setto-chat-bubble)}.setto-chat__message--visitor .setto-chat__message-bubble::after{content:"";position:absolute;z-index:1;right:-10px;bottom:0;width:10px;height:18px;border-bottom-left-radius:10px;background:var(--setto-chat-canvas)}.setto-chat__message--system{justify-content:center;color:color-mix(in srgb,var(--setto-chat-ink) 55%,transparent);font-size:.78rem;line-height:1.45;text-align:center}.setto-chat__message--system .setto-chat__message-stack{max-width:85%;align-items:center}.setto-chat__message--system .setto-chat__message-bubble{padding:.25rem .6rem;background:transparent}.setto-chat__avatar{position:relative;z-index:3;display:grid;place-items:center;flex:0 0 34px;width:34px;height:34px;margin-bottom:1px;overflow:hidden;border:2px solid var(--setto-chat-canvas);border-radius:50%;background:var(--setto-chat-crema);color:var(--setto-chat-ink);box-shadow:0 2px 8px color-mix(in srgb,var(--setto-chat-ink) 14%,transparent)}.setto-chat__avatar--assistant{background:var(--setto-chat-accent);color:var(--setto-chat-on-accent)}.setto-chat__avatar img{display:block;width:100%;height:100%;object-fit:cover}.setto-chat__speaker{display:block;margin:0 0 .2rem .4rem;color:color-mix(in srgb,var(--setto-chat-ink) 52%,transparent);font-size:.69rem;font-weight:500;line-height:1.2}.setto-chat__typing{display:inline-block;min-width:1.8rem;animation:setto-chat-pulse 1s ease-in-out infinite}.setto-chat__image{display:block;width:max-content;max-width:100%;margin-top:.65rem;overflow:hidden;border-radius:13px}.setto-chat__image img{display:block;width:min(280px,100%);max-height:260px;object-fit:cover}
37101
- .setto-chat__message--agent-joined{justify-content:flex-start;align-items:center;gap:.55rem;padding:.1rem .4rem;color:color-mix(in srgb,var(--setto-chat-ink) 62%,transparent);font-size:.8rem;line-height:1.4;text-align:left}.setto-chat__message--agent-joined .setto-chat__message-stack{max-width:calc(100% - 38px);align-items:flex-start}.setto-chat__message--agent-joined .setto-chat__message-bubble{min-width:0;padding:.2rem 0;background:transparent;white-space:normal}.setto-chat__avatar--joined{flex-basis:30px;width:30px;height:30px;margin:0;border-width:1px;box-shadow:0 2px 7px color-mix(in srgb,var(--setto-chat-ink) 12%,transparent)}
37141
+ .setto-chat__message--agent-joined{justify-content:flex-start;align-items:center;gap:.55rem;padding:.1rem 0;color:color-mix(in srgb,var(--setto-chat-ink) 62%,transparent);font-size:.8rem;line-height:1.4;text-align:left}.setto-chat__message--agent-joined .setto-chat__message-stack{max-width:calc(100% - 38px);align-items:flex-start}.setto-chat__message--agent-joined .setto-chat__message-bubble{min-width:0;padding:.2rem 0;background:transparent;white-space:normal}.setto-chat__avatar--joined{margin:0}button.setto-chat__avatar{padding:0;font:inherit;cursor:pointer;-webkit-tap-highlight-color:transparent;transition:transform 140ms ease}button.setto-chat__avatar:active{transform:scale(.94)}button.setto-chat__avatar:focus-visible{outline:2px solid var(--setto-chat-accent);outline-offset:2px}
37102
37142
  .setto-chat__receipt{display:block;margin:.26rem .45rem 0 0;color:color-mix(in srgb,var(--setto-chat-ink) 52%,transparent);font-size:.69rem;font-weight:500;line-height:1.2}.setto-chat__translation{display:flex;flex-wrap:wrap;align-items:baseline;gap:0 .3rem;margin:.3rem .4rem 0;color:color-mix(in srgb,var(--setto-chat-ink) 52%,transparent);font-size:.69rem;font-weight:500;line-height:1.3}.setto-chat__translation button{padding:0;border:0;border-radius:2px;background:transparent;color:inherit;font:inherit;line-height:inherit;text-decoration:underline;text-decoration-color:color-mix(in srgb,var(--setto-chat-ink) 30%,transparent);text-underline-offset:2px;cursor:pointer;transition:color 140ms ease}.setto-chat__translation button:hover{color:var(--setto-chat-ink);text-decoration-color:currentColor}.setto-chat__translation button:focus-visible{outline:2px solid var(--setto-chat-accent);outline-offset:2px}.setto-chat__message--system .setto-chat__translation{justify-content:center}.setto-chat__message--typing{animation:setto-chat-typing-in 180ms cubic-bezier(.2,.8,.2,1) both}.setto-chat__message--typing .setto-chat__message-bubble{min-width:3.25rem;text-align:center}.setto-chat__message--typing .setto-chat__typing{font-weight:700;letter-spacing:.06em}@keyframes setto-chat-typing-in{from{opacity:0;transform:translateY(4px)}}@media(prefers-reduced-motion:reduce){.setto-chat__message--typing{animation:none}}
37103
37143
  .setto-chat__composer-shell{position:absolute;left:0;right:0;bottom:0;z-index:25;display:grid;grid-template-columns:minmax(0,1fr);padding:1.5rem .75rem 0;background:transparent;isolation:isolate}.setto-chat__composer-shell::before{content:"";position:absolute;inset:0;pointer-events:none;background:linear-gradient(to bottom,transparent 0%,color-mix(in srgb,var(--setto-chat-canvas) 82%,transparent) 46%,var(--setto-chat-canvas) 66%);backdrop-filter:blur(14px);-webkit-backdrop-filter:blur(14px);-webkit-mask-image:linear-gradient(to bottom,rgba(0,0,0,0) 0%,rgba(0,0,0,.4) 34%,rgba(0,0,0,1) 66%);mask-image:linear-gradient(to bottom,rgba(0,0,0,0) 0%,rgba(0,0,0,.4) 34%,rgba(0,0,0,1) 66%)}.setto-chat__composer{position:relative;z-index:1;display:flex;flex-direction:column;gap:.15rem;width:100%;min-width:0;margin:0;padding:.35rem .4rem;border:2px solid color-mix(in srgb,var(--setto-chat-ink) 10%,transparent);border-radius:24px;background:var(--setto-chat-canvas);box-shadow:0 8px 24px -16px color-mix(in srgb,var(--setto-chat-ink) 28%,transparent);transition:border-color 200ms ease,box-shadow 360ms cubic-bezier(.16,1,.3,1)}.setto-chat__composer:focus-within{border-color:var(--setto-chat-accent)}.setto-chat__composer textarea,.setto-chat__composer textarea:hover,.setto-chat__composer textarea:focus,.setto-chat__composer textarea:focus-visible{width:100%;min-height:36px;max-height:${MAX_COMPOSER_HEIGHT}px;overflow-y:auto;padding:.45rem .25rem;resize:none;-webkit-appearance:none!important;appearance:none!important;border:0!important;border-radius:0!important;outline:0!important;box-shadow:none!important;background:transparent!important;color:var(--setto-chat-ink);font-family:"Archivo Variable",Archivo,system-ui,sans-serif;font-size:16px;line-height:1.35}.setto-chat__composer textarea::placeholder{color:color-mix(in srgb,var(--setto-chat-ink) 52%,transparent)}.setto-chat__composer textarea::-webkit-scrollbar{width:6px}.setto-chat__composer textarea::-webkit-scrollbar-track{background:transparent}.setto-chat__composer textarea::-webkit-scrollbar-thumb{border-radius:999px;background:color-mix(in srgb,var(--setto-chat-ink) 24%,transparent)}.setto-chat__composer textarea::-webkit-scrollbar-button{display:none;height:0}@supports not selector(::-webkit-scrollbar){.setto-chat__composer textarea{scrollbar-width:thin;scrollbar-color:color-mix(in srgb,var(--setto-chat-ink) 24%,transparent) transparent}}.setto-chat__composer-tools{display:flex;align-items:center;gap:.4rem;width:100%;min-width:0}.setto-chat__attach{flex:none;width:34px;height:34px;padding:0;border:0;border-radius:50%;background:transparent;color:color-mix(in srgb,var(--setto-chat-ink) 58%,transparent);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:background 160ms ease,color 160ms ease}.setto-chat__attach:hover:not(:disabled){background:color-mix(in srgb,var(--setto-chat-ink) 6%,transparent);color:var(--setto-chat-ink)}.setto-chat__attach:disabled{opacity:.4;cursor:default}.setto-chat__send{flex:none;width:36px;height:36px;margin-left:auto;padding:0;border:0;border-radius:50%;background:var(--setto-chat-accent);color:var(--setto-chat-on-accent);display:inline-flex;align-items:center;justify-content:center;cursor:pointer;transition:transform 360ms cubic-bezier(.16,1,.3,1),box-shadow 360ms cubic-bezier(.16,1,.3,1),background 200ms ease,opacity 200ms ease}.setto-chat__send:hover:not(:disabled){transform:translateY(-2px);box-shadow:0 12px 24px -12px color-mix(in srgb,var(--setto-chat-ink) 45%,transparent)}.setto-chat__send:active:not(:disabled){transform:translateY(0);box-shadow:0 4px 10px -8px color-mix(in srgb,var(--setto-chat-ink) 40%,transparent);transition-duration:90ms}.setto-chat__send:disabled{opacity:.35;cursor:default}.setto-chat__send.is-queued{animation:setto-chat-queued 1.1s ease-in-out infinite}.setto-chat__attachments{display:flex;flex-wrap:wrap;gap:.4rem;list-style:none;margin:0;padding:.15rem .15rem 0}.setto-chat__attachments li{position:relative;width:56px;height:56px;border-radius:10px;overflow:hidden;border:1px solid color-mix(in srgb,var(--setto-chat-ink) 12%,transparent);background:var(--setto-chat-crema)}.setto-chat__attachments img{display:block;width:100%;height:100%;object-fit:cover}.setto-chat__attachments button{position:absolute;top:2px;right:2px;width:18px;height:18px;padding:0;border:0;border-radius:50%;background:color-mix(in srgb,var(--setto-chat-ink) 72%,transparent);color:var(--setto-chat-canvas);display:inline-flex;align-items:center;justify-content:center;cursor:pointer}.setto-chat__composer-floor{position:relative;z-index:1;width:calc(100% + 1.5rem);height:max(var(--setto-chat-edge),env(safe-area-inset-bottom));margin-left:-.75rem;background:var(--setto-chat-canvas)}
37104
37144
  .setto-chat__launcher{width:58px;height:58px;padding:3px;border:1px solid color-mix(in srgb,var(--setto-chat-canvas) 54%,transparent);border-radius:50%;background:color-mix(in srgb,var(--setto-chat-raised) 35%,transparent);box-shadow:0 10px 30px color-mix(in srgb,var(--setto-chat-ink) 24%,transparent),inset 0 0 0 1px color-mix(in srgb,var(--setto-chat-ink) 9%,transparent);backdrop-filter:blur(14px) saturate(115%);-webkit-backdrop-filter:blur(14px) saturate(115%);color:var(--setto-chat-ink);display:grid;place-items:center;cursor:pointer;transition:transform 180ms ease,box-shadow 180ms ease}.setto-chat__launcher:hover{transform:translateY(-2px);box-shadow:0 15px 35px color-mix(in srgb,var(--setto-chat-ink) 28%,transparent),inset 0 0 0 1px color-mix(in srgb,var(--setto-chat-ink) 9%,transparent)}.setto-chat__launcher span{width:46px;height:46px;border-radius:50%;display:grid;place-items:center;background:var(--setto-chat-accent);color:var(--setto-chat-on-accent)}.setto-chat__launcher img{display:block;width:50px;height:50px;border-radius:50%;object-fit:cover}.setto-chat__launcher span{overflow:hidden}.setto-chat__launcher span img{width:100%;height:100%}.setto-chat__launcher:focus-visible,.setto-chat button:focus-visible,.setto-chat input:focus-visible{outline:2px solid var(--setto-chat-accent);outline-offset:2px}@keyframes setto-chat-pulse{50%{opacity:.35}}@keyframes setto-chat-queued{50%{opacity:.55}}