@sevenfold/setto-client 0.41.0 → 0.42.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.
- package/dist/modules/chat/SettoChat.d.ts +14 -3
- package/dist/setto-client.js +46 -31
- package/dist/setto-client.js.map +1 -1
- package/package.json +1 -1
|
@@ -67,6 +67,11 @@ export declare function chatComposerSpace(height: number): number;
|
|
|
67
67
|
* own, or this. Mirrors setto-server's back office (`defaultGreeting`).
|
|
68
68
|
*/
|
|
69
69
|
export declare function humanIntro(locale: string, human: Pick<NearbyHuman, 'name' | 'greeting'>, agent?: string): string;
|
|
70
|
+
/**
|
|
71
|
+
* 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.
|
|
73
|
+
*/
|
|
74
|
+
export declare function teamRowLabelled(humans: readonly Pick<NearbyHuman, 'online'>[]): boolean;
|
|
70
75
|
/** `@Name` as a whole word, any case, as setto-server reads it. */
|
|
71
76
|
export declare function mentionsName(content: string, name: string): boolean;
|
|
72
77
|
/** The handles a turn asks for: every named person @-mentioned, and every face tapped. */
|
|
@@ -94,10 +99,16 @@ export declare function TranslationNote({ translation, showingOriginal, onToggle
|
|
|
94
99
|
showingOriginal: boolean;
|
|
95
100
|
onToggle: () => void;
|
|
96
101
|
}): import("react/jsx-runtime").JSX.Element;
|
|
97
|
-
|
|
102
|
+
/**
|
|
103
|
+
* «Kari har blitt med i samtalen.» and «Kari har fått beskjed.»: shown in the
|
|
104
|
+
* visitor's language, without «Show original». A notice is Setto's own line,
|
|
105
|
+
* not something a person wrote, so there is no original worth reading.
|
|
106
|
+
*/
|
|
107
|
+
export declare function AgentJoinedEvent({ message, onPick, pickLabel, }: {
|
|
98
108
|
message: Message;
|
|
99
|
-
|
|
100
|
-
|
|
109
|
+
/** Tapping the photo writes `@Name` in the box, as a face in the team row does. */
|
|
110
|
+
onPick?: () => void;
|
|
111
|
+
pickLabel?: string;
|
|
101
112
|
}): import("react/jsx-runtime").JSX.Element;
|
|
102
113
|
/**
|
|
103
114
|
* A teammate is composing. The row opts out of the transcript's polite live
|
package/dist/setto-client.js
CHANGED
|
@@ -35509,6 +35509,9 @@ function humanIntro(locale, human, agent = "Barista") {
|
|
|
35509
35509
|
const name2 = human.name ?? "";
|
|
35510
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.`;
|
|
35511
35511
|
}
|
|
35512
|
+
function teamRowLabelled(humans) {
|
|
35513
|
+
return !(humans.length === 1 && humans[0].online);
|
|
35514
|
+
}
|
|
35512
35515
|
function escapeRegExp$1(value) {
|
|
35513
35516
|
return value.replace(/[.*+?^${}()|[\]\\]/g, "\\$&");
|
|
35514
35517
|
}
|
|
@@ -35623,32 +35626,32 @@ function TranslationNote({
|
|
|
35623
35626
|
const NO_ORIGINALS = /* @__PURE__ */ new Set();
|
|
35624
35627
|
function AgentJoinedEvent({
|
|
35625
35628
|
message,
|
|
35626
|
-
|
|
35627
|
-
|
|
35629
|
+
onPick,
|
|
35630
|
+
pickLabel
|
|
35628
35631
|
}) {
|
|
35629
|
-
const shown = shownMessage(message,
|
|
35632
|
+
const shown = shownMessage(message, NO_ORIGINALS);
|
|
35630
35633
|
return /* @__PURE__ */ jsxs("div", { className: "setto-chat__message setto-chat__message--system setto-chat__message--agent-joined", children: [
|
|
35631
35634
|
/* @__PURE__ */ jsx(
|
|
35632
|
-
|
|
35635
|
+
PersonAvatar,
|
|
35633
35636
|
{
|
|
35637
|
+
url: message.avatarUrl ?? null,
|
|
35634
35638
|
className: "setto-chat__avatar setto-chat__avatar--human setto-chat__avatar--joined",
|
|
35635
|
-
|
|
35636
|
-
|
|
35639
|
+
onPick,
|
|
35640
|
+
label: pickLabel
|
|
35637
35641
|
}
|
|
35638
35642
|
),
|
|
35639
|
-
/* @__PURE__ */
|
|
35640
|
-
/* @__PURE__ */ jsx("div", { className: "setto-chat__message-bubble", children: /* @__PURE__ */ jsx("span", { className: "setto-chat__message-copy", lang: shown.lang, children: shown.content }) }),
|
|
35641
|
-
shown.translation && message.id && onToggleOriginal ? /* @__PURE__ */ jsx(
|
|
35642
|
-
TranslationNote,
|
|
35643
|
-
{
|
|
35644
|
-
translation: shown.translation,
|
|
35645
|
-
showingOriginal: shown.showingOriginal,
|
|
35646
|
-
onToggle: () => onToggleOriginal(message.id)
|
|
35647
|
-
}
|
|
35648
|
-
) : null
|
|
35649
|
-
] })
|
|
35643
|
+
/* @__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 }) }) })
|
|
35650
35644
|
] });
|
|
35651
35645
|
}
|
|
35646
|
+
function PersonAvatar({
|
|
35647
|
+
url,
|
|
35648
|
+
className,
|
|
35649
|
+
onPick,
|
|
35650
|
+
label
|
|
35651
|
+
}) {
|
|
35652
|
+
const face = url ? /* @__PURE__ */ jsx("img", { src: url, alt: "" }) : /* @__PURE__ */ jsx(PersonIcon, {});
|
|
35653
|
+
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 });
|
|
35654
|
+
}
|
|
35652
35655
|
function TeamTypingRow({ label, avatarUrl }) {
|
|
35653
35656
|
return /* @__PURE__ */ jsxs(
|
|
35654
35657
|
"div",
|
|
@@ -36338,13 +36341,13 @@ function SettoChat() {
|
|
|
36338
36341
|
nearby: "I nærheten",
|
|
36339
36342
|
askFor: (name2, online) => `Spør etter ${name2} (${online ? "tilgjengelig nå" : "i nærheten"})`,
|
|
36340
36343
|
someone: "Teamet",
|
|
36344
|
+
mention: (name2) => `Skriv @${name2} for å spørre etter ${name2}`,
|
|
36341
36345
|
send: "Send melding",
|
|
36342
36346
|
sending: "Svarer …",
|
|
36343
36347
|
attach: "Legg ved bilde",
|
|
36344
36348
|
remove: "Fjern",
|
|
36345
36349
|
failed: "Jeg får ikke svart akkurat nå. Kontakt gjerne teamet direkte.",
|
|
36346
36350
|
image: "Bilde",
|
|
36347
|
-
team: "Teamet",
|
|
36348
36351
|
seen: "Sett",
|
|
36349
36352
|
emptyChats: "Nye samtaler du starter her vises i denne listen."
|
|
36350
36353
|
} : {
|
|
@@ -36363,13 +36366,13 @@ function SettoChat() {
|
|
|
36363
36366
|
nearby: "Nearby",
|
|
36364
36367
|
askFor: (name2, online) => `Ask for ${name2} (${online ? "available now" : "nearby"})`,
|
|
36365
36368
|
someone: "The team",
|
|
36369
|
+
mention: (name2) => `Write @${name2} to ask for ${name2}`,
|
|
36366
36370
|
send: "Send message",
|
|
36367
36371
|
sending: "Replying …",
|
|
36368
36372
|
attach: "Attach image",
|
|
36369
36373
|
remove: "Remove",
|
|
36370
36374
|
failed: "I cannot reply right now. Please contact the team directly.",
|
|
36371
36375
|
image: "Image",
|
|
36372
|
-
team: "The team",
|
|
36373
36376
|
seen: "Seen",
|
|
36374
36377
|
emptyChats: "New conversations you start here will appear in this list."
|
|
36375
36378
|
};
|
|
@@ -36397,6 +36400,17 @@ function SettoChat() {
|
|
|
36397
36400
|
}
|
|
36398
36401
|
setFocusRequest((current) => current + 1);
|
|
36399
36402
|
}
|
|
36403
|
+
function pickByName(name2) {
|
|
36404
|
+
const human = nearby.find((person) => person.name === name2);
|
|
36405
|
+
if (human) {
|
|
36406
|
+
pickHuman(human);
|
|
36407
|
+
return;
|
|
36408
|
+
}
|
|
36409
|
+
const next = insertMention(draft, name2, null).value;
|
|
36410
|
+
setDraft(next);
|
|
36411
|
+
typingSender().update(next);
|
|
36412
|
+
setFocusRequest((current) => current + 1);
|
|
36413
|
+
}
|
|
36400
36414
|
function rememberConversation(id) {
|
|
36401
36415
|
conversationId.current = id;
|
|
36402
36416
|
try {
|
|
@@ -36932,8 +36946,8 @@ function SettoChat() {
|
|
|
36932
36946
|
AgentJoinedEvent,
|
|
36933
36947
|
{
|
|
36934
36948
|
message: item,
|
|
36935
|
-
|
|
36936
|
-
|
|
36949
|
+
onPick: item.authorName ? () => pickByName(item.authorName) : void 0,
|
|
36950
|
+
pickLabel: item.authorName ? labels.mention(item.authorName) : void 0
|
|
36937
36951
|
},
|
|
36938
36952
|
item.id ?? `agent-joined-${index2}`
|
|
36939
36953
|
);
|
|
@@ -36944,16 +36958,17 @@ function SettoChat() {
|
|
|
36944
36958
|
{
|
|
36945
36959
|
className: `setto-chat__message setto-chat__message--${item.role}`,
|
|
36946
36960
|
children: [
|
|
36947
|
-
item.role === "
|
|
36948
|
-
|
|
36961
|
+
item.role === "human" ? /* @__PURE__ */ jsx(
|
|
36962
|
+
PersonAvatar,
|
|
36949
36963
|
{
|
|
36950
|
-
|
|
36951
|
-
"
|
|
36952
|
-
|
|
36964
|
+
url: item.avatarUrl ?? null,
|
|
36965
|
+
className: "setto-chat__avatar setto-chat__avatar--human",
|
|
36966
|
+
onPick: item.authorName ? () => pickByName(item.authorName) : void 0,
|
|
36967
|
+
label: item.authorName ? labels.mention(item.authorName) : void 0
|
|
36953
36968
|
}
|
|
36954
|
-
) : null,
|
|
36969
|
+
) : item.role === "assistant" ? /* @__PURE__ */ jsx("span", { className: "setto-chat__avatar setto-chat__avatar--assistant", "aria-hidden": "true", children: /* @__PURE__ */ jsx(AgentAvatar, { url: agentAvatarUrl }) }) : null,
|
|
36955
36970
|
/* @__PURE__ */ jsxs("div", { className: "setto-chat__message-stack", children: [
|
|
36956
|
-
item.role === "assistant"
|
|
36971
|
+
item.role === "assistant" ? /* @__PURE__ */ jsx("span", { className: "setto-chat__speaker", children: `${agentName} · ${labels.ai}` }) : null,
|
|
36957
36972
|
/* @__PURE__ */ jsxs("div", { className: "setto-chat__message-bubble", children: [
|
|
36958
36973
|
/* @__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: "···" }) }),
|
|
36959
36974
|
item.attachments?.map((attachment) => /* @__PURE__ */ jsx(
|
|
@@ -36995,7 +37010,7 @@ function SettoChat() {
|
|
|
36995
37010
|
),
|
|
36996
37011
|
/* @__PURE__ */ jsxs("div", { className: "setto-chat__composer-shell", ref: composerShellRef, children: [
|
|
36997
37012
|
nearby.length ? /* @__PURE__ */ jsxs("div", { className: "setto-chat__team", children: [
|
|
36998
|
-
/* @__PURE__ */ jsx("span", { className: "setto-chat__team-label", children: labels.teamRow }),
|
|
37013
|
+
teamRowLabelled(nearby) ? /* @__PURE__ */ jsx("span", { className: "setto-chat__team-label", children: labels.teamRow }) : null,
|
|
36999
37014
|
nearby.map((human) => /* @__PURE__ */ jsxs(
|
|
37000
37015
|
"button",
|
|
37001
37016
|
{
|
|
@@ -37111,11 +37126,11 @@ function useChatStyles() {
|
|
|
37111
37126
|
.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)}
|
|
37112
37127
|
.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}
|
|
37113
37128
|
.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}
|
|
37114
|
-
.setto-chat__message--agent-joined{justify-content:flex-start;align-items:center;gap:.55rem;padding:.1rem
|
|
37129
|
+
.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}
|
|
37115
37130
|
.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}}
|
|
37116
37131
|
.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)}
|
|
37117
37132
|
.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}}
|
|
37118
|
-
.setto-chat__team{position:relative;z-index:1;display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;margin:0 0 .55rem;padding:0 .2rem}.setto-chat__team-label{margin
|
|
37133
|
+
.setto-chat__team{position:relative;z-index:1;display:flex;flex-wrap:wrap;align-items:center;gap:.4rem;margin:0 0 .55rem;padding:0 .2rem}.setto-chat__team-label{flex:0 0 100%;margin:0 0 -.05rem .3rem;color:color-mix(in srgb,var(--setto-chat-ink) 56%,transparent);font-size:.74rem;font-weight:600}.setto-chat__person{display:inline-flex;align-items:center;gap:.4rem;min-height:34px;padding:.18rem .7rem .18rem .2rem;border:1px solid color-mix(in srgb,var(--setto-chat-ink) 12%,transparent);border-radius:999px;background:var(--setto-chat-canvas);color:var(--setto-chat-ink);font-size:.82rem;font-weight:600;line-height:1;cursor:pointer;transition:background 160ms ease,border-color 160ms ease}.setto-chat__person:hover{border-color:var(--setto-chat-accent)}.setto-chat__person.is-picked{border-color:var(--setto-chat-accent);background:color-mix(in srgb,var(--setto-chat-accent) 12%,var(--setto-chat-canvas))}.setto-chat__face{position:relative;display:grid;place-items:center;flex:0 0 28px;width:28px;height:28px;border-radius:50%;background:var(--setto-chat-crema);color:var(--setto-chat-ink)}.setto-chat__face>img,.setto-chat__face-agent{display:grid;place-items:center;width:100%;height:100%;overflow:hidden;border-radius:50%;object-fit:cover}.setto-chat__face svg{width:16px;height:16px}.setto-chat__face-agent{background:var(--setto-chat-accent);color:var(--setto-chat-on-accent)}.setto-chat__face-agent img{width:100%;height:100%;object-fit:cover}.setto-chat__presence{position:absolute;right:-1px;bottom:-1px;width:10px;height:10px;border:2px solid var(--setto-chat-canvas);border-radius:50%;background:color-mix(in srgb,var(--setto-chat-ink) 32%,var(--setto-chat-canvas))}.setto-chat__presence.is-online{background:#2f9e5a}.setto-chat__launcher{position:relative}.setto-chat__launcher>.setto-chat__presence{right:4px;bottom:4px;width:15px;height:15px;border-width:2.5px}.setto-chat__mentions{position:absolute;left:0;right:0;bottom:calc(100% + 8px);z-index:3;max-height:240px;margin:0;padding:6px;overflow:auto;overscroll-behavior:contain;list-style:none;border:1px solid color-mix(in srgb,var(--setto-chat-ink) 12%,transparent);border-radius:16px;background:var(--setto-chat-canvas);box-shadow:0 16px 36px -18px color-mix(in srgb,var(--setto-chat-ink) 40%,transparent)}.setto-chat__mentions li{display:flex;align-items:center;gap:.6rem;padding:.42rem .55rem;border-radius:10px;cursor:pointer}.setto-chat__mentions li.is-active{background:color-mix(in srgb,var(--setto-chat-ink) 7%,transparent)}.setto-chat__mention-name{font-weight:600;font-size:.92rem}.setto-chat__mention-detail{margin-left:auto;color:color-mix(in srgb,var(--setto-chat-ink) 55%,transparent);font-size:.76rem}
|
|
37119
37134
|
@media(max-width:700px){.setto-chat__chats{position:absolute;inset:0 auto 0 0;transform:translateX(-100%);transition:transform 260ms cubic-bezier(.16,1,.3,1);box-shadow:14px 0 35px color-mix(in srgb,var(--setto-chat-ink) 16%,transparent)}.setto-chat__chats--open{transform:none}.setto-chat__main{width:100%;max-width:none;margin:0}.setto-chat__log{padding-left:.75rem;padding-right:.75rem}}@media(min-width:701px){.setto-chat{--setto-chat-edge:.9rem}.setto-chat--mounted{top:auto;right:max(18px,env(safe-area-inset-right));bottom:max(18px,env(safe-area-inset-bottom));left:auto;width:min(440px,calc(100vw - 36px));height:min(720px,calc(100dvh - 36px));overflow:visible;background:transparent}.setto-chat__shell{position:relative;top:auto;left:auto;width:100%;height:100%;border:1px solid color-mix(in srgb,var(--setto-chat-ink) 14%,transparent);border-radius:26px;background:var(--setto-chat-canvas);box-shadow:0 28px 80px -24px color-mix(in srgb,var(--setto-chat-ink) 42%,transparent),0 8px 24px -12px color-mix(in srgb,var(--setto-chat-ink) 24%,transparent);transform:translateY(16px) scale(.975);transform-origin:right bottom}.setto-chat--visible .setto-chat__shell{transform:none}.setto-chat__chats{position:absolute;inset:0 auto 0 0;width:min(82%,280px);height:100%;transform:translateX(-100%);transition:transform 260ms cubic-bezier(.16,1,.3,1);box-shadow:14px 0 35px color-mix(in srgb,var(--setto-chat-ink) 16%,transparent)}.setto-chat__chats--open{transform:none}.setto-chat__main{width:100%;max-width:none;margin:0}.setto-chat__header,.setto-chat__log{padding-left:.9rem;padding-right:.9rem}.setto-chat__composer-shell{padding-left:.9rem;padding-right:.9rem}.setto-chat__composer-floor{width:calc(100% + 1.8rem);height:var(--setto-chat-edge);margin-left:-.9rem}.setto-chat__message{font-size:15.5px}.setto-chat__message-stack{max-width:82%}}@media(prefers-reduced-motion:reduce){.setto-chat,.setto-chat__shell,.setto-chat__chats,.setto-chat__launcher,.setto-chat__composer,.setto-chat__composer textarea,.setto-chat__send{transition:none!important}.setto-chat__typing,.setto-chat__send.is-queued{animation:none}}
|
|
37120
37135
|
`;
|
|
37121
37136
|
style.textContent += "@media(prefers-reduced-motion:reduce){.setto-chat__markdown.is-revealing .setto-chat__word{opacity:1;transform:none;filter:none;animation:none}}";
|