@syntrologie/adapt-chatbot 2.27.0 → 2.28.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/AdaptiveChatBar.d.ts +76 -0
- package/dist/AdaptiveChatBar.d.ts.map +1 -0
- package/dist/AdaptiveChatBar.js +10 -0
- package/dist/AdaptiveChatBar.js.map +7 -0
- package/dist/AdaptiveChatBarMountable.d.ts +35 -0
- package/dist/AdaptiveChatBarMountable.d.ts.map +1 -0
- package/dist/AdaptiveChatTrail.d.ts +77 -0
- package/dist/AdaptiveChatTrail.d.ts.map +1 -0
- package/dist/AdaptiveChatTrail.js +9 -0
- package/dist/AdaptiveChatTrail.js.map +7 -0
- package/dist/AdaptiveChipsStrip.d.ts +1150 -0
- package/dist/AdaptiveChipsStrip.d.ts.map +1 -0
- package/dist/AdaptiveChipsStrip.js +11 -0
- package/dist/AdaptiveChipsStrip.js.map +7 -0
- package/dist/AdaptiveChipsStripMountable.d.ts +24 -0
- package/dist/AdaptiveChipsStripMountable.d.ts.map +1 -0
- package/dist/ChatAssistantLit.d.ts +22 -50
- package/dist/ChatAssistantLit.d.ts.map +1 -1
- package/dist/ChatAssistantLit.js +5 -3
- package/dist/ChatSession.d.ts +178 -0
- package/dist/ChatSession.d.ts.map +1 -0
- package/dist/ChatTransport.d.ts +283 -0
- package/dist/ChatTransport.d.ts.map +1 -0
- package/dist/NavLinkMountable.d.ts +25 -0
- package/dist/NavLinkMountable.d.ts.map +1 -0
- package/dist/NavLinkMountable.test.d.ts +2 -0
- package/dist/NavLinkMountable.test.d.ts.map +1 -0
- package/dist/TextAnswerMountable.d.ts +17 -0
- package/dist/TextAnswerMountable.d.ts.map +1 -0
- package/dist/Turnstile.d.ts +83 -0
- package/dist/Turnstile.d.ts.map +1 -0
- package/dist/chunk-435KJD27.js +192 -0
- package/dist/chunk-435KJD27.js.map +7 -0
- package/dist/chunk-AUER7ZCK.js +634 -0
- package/dist/chunk-AUER7ZCK.js.map +7 -0
- package/dist/chunk-DOMEUJR7.js +382 -0
- package/dist/chunk-DOMEUJR7.js.map +7 -0
- package/dist/{chunk-W457NMGD.js → chunk-KUO67E2W.js} +1537 -4130
- package/dist/chunk-KUO67E2W.js.map +7 -0
- package/dist/chunk-QELVKBQV.js +214 -0
- package/dist/chunk-QELVKBQV.js.map +7 -0
- package/dist/chunk-UC4XU6GH.js +3306 -0
- package/dist/chunk-UC4XU6GH.js.map +7 -0
- package/dist/elements/ActionHandler.d.ts +34 -0
- package/dist/elements/ActionHandler.d.ts.map +1 -0
- package/dist/elements/ElementInstanceStore.d.ts +155 -0
- package/dist/elements/ElementInstanceStore.d.ts.map +1 -0
- package/dist/elements/ElementInstanceStore.test.d.ts +2 -0
- package/dist/elements/ElementInstanceStore.test.d.ts.map +1 -0
- package/dist/elements/ElementTypeHandler.d.ts +77 -0
- package/dist/elements/ElementTypeHandler.d.ts.map +1 -0
- package/dist/elements/ItemHandler.d.ts +60 -0
- package/dist/elements/ItemHandler.d.ts.map +1 -0
- package/dist/elements/ItemHandler.test.d.ts +2 -0
- package/dist/elements/ItemHandler.test.d.ts.map +1 -0
- package/dist/elements/TileHandler.d.ts +52 -0
- package/dist/elements/TileHandler.d.ts.map +1 -0
- package/dist/elements/blockRenderer.d.ts +46 -0
- package/dist/elements/blockRenderer.d.ts.map +1 -0
- package/dist/elements/blockRenderer.test.d.ts +13 -0
- package/dist/elements/blockRenderer.test.d.ts.map +1 -0
- package/dist/elements/blocks.d.ts +58 -0
- package/dist/elements/blocks.d.ts.map +1 -0
- package/dist/elements/envelope.d.ts +24 -0
- package/dist/elements/envelope.d.ts.map +1 -0
- package/dist/elements/fetcher.d.ts +40 -0
- package/dist/elements/fetcher.d.ts.map +1 -0
- package/dist/elements/index.d.ts +32 -0
- package/dist/elements/index.d.ts.map +1 -0
- package/dist/elements/types.d.ts +106 -0
- package/dist/elements/types.d.ts.map +1 -0
- package/dist/observer/__tests__/allowlist.test.d.ts +9 -0
- package/dist/observer/__tests__/allowlist.test.d.ts.map +1 -0
- package/dist/observer/__tests__/observer-isolation.test.d.ts +13 -0
- package/dist/observer/__tests__/observer-isolation.test.d.ts.map +1 -0
- package/dist/observer/__tests__/queue.test.d.ts +2 -0
- package/dist/observer/__tests__/queue.test.d.ts.map +1 -0
- package/dist/observer/__tests__/transport.test.d.ts +2 -0
- package/dist/observer/__tests__/transport.test.d.ts.map +1 -0
- package/dist/observer/allowlist.d.ts +32 -0
- package/dist/observer/allowlist.d.ts.map +1 -0
- package/dist/observer/index.d.ts +35 -0
- package/dist/observer/index.d.ts.map +1 -0
- package/dist/observer/queue.d.ts +57 -0
- package/dist/observer/queue.d.ts.map +1 -0
- package/dist/observer/transport.d.ts +26 -0
- package/dist/observer/transport.d.ts.map +1 -0
- package/dist/runtime.d.ts +7 -0
- package/dist/runtime.d.ts.map +1 -1
- package/dist/runtime.js +1617 -2
- package/dist/runtime.js.map +4 -4
- package/dist/schema.d.ts +3120 -7
- package/dist/schema.d.ts.map +1 -1
- package/dist/schema.js +40 -0
- package/dist/schema.js.map +2 -2
- package/dist/types.d.ts +30 -2
- package/dist/types.d.ts.map +1 -1
- package/package.json +13 -1
- package/dist/chunk-W457NMGD.js.map +0 -7
|
@@ -0,0 +1,214 @@
|
|
|
1
|
+
// src/AdaptiveChatBar.ts
|
|
2
|
+
import { html, LitElement } from "lit";
|
|
3
|
+
import { styleMap } from "lit/directives/style-map.js";
|
|
4
|
+
var DEFAULT_PLACEHOLDER = "Ask, find, or navigate\u2026";
|
|
5
|
+
var AdaptiveChatBar = class extends LitElement {
|
|
6
|
+
constructor() {
|
|
7
|
+
super(...arguments);
|
|
8
|
+
this.messages = [];
|
|
9
|
+
this.placeholder = DEFAULT_PLACEHOLDER;
|
|
10
|
+
/**
|
|
11
|
+
* Initial assistant message shown before any real conversation
|
|
12
|
+
* starts. Renders inside the trail as a phantom assistant chip
|
|
13
|
+
* when messages.length === 0; auto-disappears as soon as the
|
|
14
|
+
* first user message lands. Mirrors ChatAssistantLit's greeting.
|
|
15
|
+
*/
|
|
16
|
+
this.greeting = void 0;
|
|
17
|
+
/**
|
|
18
|
+
* Whether a chat round-trip is in flight (request sent, awaiting
|
|
19
|
+
* reply). The single send/stop button morphs accordingly: ↑ when
|
|
20
|
+
* ready, ⏹ when in-flight. Parent owns this state — set true after
|
|
21
|
+
* `chat-message-sent` fires, false when the reply lands or the
|
|
22
|
+
* request is aborted. Enter is inert while in-flight.
|
|
23
|
+
*/
|
|
24
|
+
this.inFlight = false;
|
|
25
|
+
this._input = "";
|
|
26
|
+
this._onInput = (e) => {
|
|
27
|
+
this._input = e.target.value;
|
|
28
|
+
};
|
|
29
|
+
this._onKeyDown = (e) => {
|
|
30
|
+
if (e.key === "Enter" && !e.shiftKey) {
|
|
31
|
+
e.preventDefault();
|
|
32
|
+
if (this.inFlight) return;
|
|
33
|
+
this._send();
|
|
34
|
+
}
|
|
35
|
+
};
|
|
36
|
+
// Single button. Click delegates to send-or-interrupt based on
|
|
37
|
+
// current state. Same DOM node, different behavior — discoverability
|
|
38
|
+
// wins from the user not having to scan for which control is active.
|
|
39
|
+
this._onSendOrInterrupt = () => {
|
|
40
|
+
if (this.inFlight) {
|
|
41
|
+
this.dispatchEvent(new CustomEvent("chat-interrupt", { bubbles: true, composed: true }));
|
|
42
|
+
return;
|
|
43
|
+
}
|
|
44
|
+
this._send();
|
|
45
|
+
};
|
|
46
|
+
this._onClose = () => {
|
|
47
|
+
this.dispatchEvent(new CustomEvent("canvas-close", { bubbles: true, composed: true }));
|
|
48
|
+
};
|
|
49
|
+
}
|
|
50
|
+
createRenderRoot() {
|
|
51
|
+
return this;
|
|
52
|
+
}
|
|
53
|
+
_send() {
|
|
54
|
+
const text = this._input.trim();
|
|
55
|
+
if (!text) return;
|
|
56
|
+
this.dispatchEvent(
|
|
57
|
+
new CustomEvent("chat-message-sent", {
|
|
58
|
+
detail: { text },
|
|
59
|
+
bubbles: true,
|
|
60
|
+
composed: true
|
|
61
|
+
})
|
|
62
|
+
);
|
|
63
|
+
this._input = "";
|
|
64
|
+
const input = this.querySelector("input[data-chat-input]");
|
|
65
|
+
if (input) input.value = "";
|
|
66
|
+
}
|
|
67
|
+
render() {
|
|
68
|
+
return html`
|
|
69
|
+
<div style=${styleMap(rootStyles())}>
|
|
70
|
+
<adaptive-chat-trail
|
|
71
|
+
.messages=${this.messages}
|
|
72
|
+
.greeting=${this.greeting}
|
|
73
|
+
></adaptive-chat-trail>
|
|
74
|
+
<div style=${styleMap(rowStyles())} data-chat-row>
|
|
75
|
+
<span style=${styleMap(avatarStyles())} aria-hidden="true">✦</span>
|
|
76
|
+
<input
|
|
77
|
+
data-chat-input
|
|
78
|
+
type="text"
|
|
79
|
+
placeholder=${this.placeholder}
|
|
80
|
+
.value=${this._input}
|
|
81
|
+
@input=${this._onInput}
|
|
82
|
+
@keydown=${this._onKeyDown}
|
|
83
|
+
style=${styleMap(inputStyles())}
|
|
84
|
+
aria-label="Chat input"
|
|
85
|
+
/>
|
|
86
|
+
<button
|
|
87
|
+
type="button"
|
|
88
|
+
data-chat-send
|
|
89
|
+
data-state=${this.inFlight ? "in-flight" : "ready"}
|
|
90
|
+
@click=${this._onSendOrInterrupt}
|
|
91
|
+
aria-label=${this.inFlight ? "Stop" : "Send message"}
|
|
92
|
+
title=${this.inFlight ? "Interrupt" : "Send"}
|
|
93
|
+
style=${styleMap(sendStyles(this.inFlight))}
|
|
94
|
+
>${this.inFlight ? "\u25A0" : "\u2191"}</button>
|
|
95
|
+
<button
|
|
96
|
+
type="button"
|
|
97
|
+
data-chat-close
|
|
98
|
+
@click=${this._onClose}
|
|
99
|
+
aria-label="Hide chat"
|
|
100
|
+
style=${styleMap(closeStyles())}
|
|
101
|
+
>✕</button>
|
|
102
|
+
</div>
|
|
103
|
+
</div>
|
|
104
|
+
`;
|
|
105
|
+
}
|
|
106
|
+
};
|
|
107
|
+
AdaptiveChatBar.properties = {
|
|
108
|
+
messages: { attribute: false },
|
|
109
|
+
placeholder: { type: String },
|
|
110
|
+
greeting: { type: String },
|
|
111
|
+
inFlight: { type: Boolean, reflect: true },
|
|
112
|
+
_input: { state: true }
|
|
113
|
+
};
|
|
114
|
+
function rootStyles() {
|
|
115
|
+
return {
|
|
116
|
+
display: "flex",
|
|
117
|
+
flexDirection: "column",
|
|
118
|
+
gap: "6px",
|
|
119
|
+
// Fill the host container's width. Floating consumers (e.g.
|
|
120
|
+
// bottom-right pinned) constrain via their own wrapper's max-width.
|
|
121
|
+
width: "100%",
|
|
122
|
+
pointerEvents: "auto"
|
|
123
|
+
};
|
|
124
|
+
}
|
|
125
|
+
function rowStyles() {
|
|
126
|
+
return {
|
|
127
|
+
display: "flex",
|
|
128
|
+
alignItems: "center",
|
|
129
|
+
gap: "8px",
|
|
130
|
+
padding: "10px 12px",
|
|
131
|
+
borderRadius: "var(--sc-tile-border-radius, 14px)",
|
|
132
|
+
// Consume the same surface tokens as SyntroTileCard so a workspace
|
|
133
|
+
// theme that sets --sc-tile-background / --sc-tile-border /
|
|
134
|
+
// --sc-tile-shadow renders the lid consistently with the tiles below.
|
|
135
|
+
// Fallbacks are neutral slate (matches darkDefaults shape) so the
|
|
136
|
+
// widget still looks intentional on a page that sets no tokens.
|
|
137
|
+
background: "var(--sc-tile-background, rgba(15, 19, 24, 0.6))",
|
|
138
|
+
backdropFilter: "blur(24px) saturate(140%)",
|
|
139
|
+
WebkitBackdropFilter: "blur(24px) saturate(140%)",
|
|
140
|
+
border: "var(--sc-tile-border, 1px solid rgba(255, 255, 255, 0.08))",
|
|
141
|
+
boxShadow: "var(--sc-tile-shadow, 0 2px 12px rgba(0, 0, 0, 0.3))",
|
|
142
|
+
color: "var(--sc-tile-title-color, #fafafa)",
|
|
143
|
+
fontFamily: "var(--sc-font-family, inherit)"
|
|
144
|
+
};
|
|
145
|
+
}
|
|
146
|
+
function avatarStyles() {
|
|
147
|
+
return {
|
|
148
|
+
display: "inline-flex",
|
|
149
|
+
alignItems: "center",
|
|
150
|
+
justifyContent: "center",
|
|
151
|
+
width: "24px",
|
|
152
|
+
height: "24px",
|
|
153
|
+
borderRadius: "9999px",
|
|
154
|
+
background: "hsl(var(--sc-accent-color) / 0.15)",
|
|
155
|
+
border: "1px solid hsl(var(--sc-accent-color) / 0.30)",
|
|
156
|
+
color: "hsl(var(--sc-accent-color) / 0.95)",
|
|
157
|
+
flexShrink: "0",
|
|
158
|
+
fontSize: "11px"
|
|
159
|
+
};
|
|
160
|
+
}
|
|
161
|
+
function inputStyles() {
|
|
162
|
+
return {
|
|
163
|
+
flex: "1",
|
|
164
|
+
minWidth: "0",
|
|
165
|
+
background: "transparent",
|
|
166
|
+
border: "none",
|
|
167
|
+
outline: "none",
|
|
168
|
+
color: "inherit",
|
|
169
|
+
fontSize: "13px"
|
|
170
|
+
};
|
|
171
|
+
}
|
|
172
|
+
function sendStyles(inFlight) {
|
|
173
|
+
return {
|
|
174
|
+
width: "28px",
|
|
175
|
+
height: "28px",
|
|
176
|
+
display: "inline-flex",
|
|
177
|
+
alignItems: "center",
|
|
178
|
+
justifyContent: "center",
|
|
179
|
+
borderRadius: "9999px",
|
|
180
|
+
// Ready: filled accent (send is the affordance). In-flight: hollow
|
|
181
|
+
// ring + accent ring (stop is a one-of-a-kind disruptive action,
|
|
182
|
+
// styled differently so the user reads "this isn't just send").
|
|
183
|
+
background: inFlight ? "transparent" : "hsl(var(--sc-accent-color) / 0.85)",
|
|
184
|
+
color: inFlight ? "hsl(var(--sc-accent-color) / 0.95)" : "var(--sc-accent-foreground, #fff)",
|
|
185
|
+
border: inFlight ? "1px solid hsl(var(--sc-accent-color) / 0.55)" : "none",
|
|
186
|
+
cursor: "pointer",
|
|
187
|
+
flexShrink: "0",
|
|
188
|
+
transition: "background 150ms ease, color 150ms ease, border-color 150ms ease"
|
|
189
|
+
};
|
|
190
|
+
}
|
|
191
|
+
function closeStyles() {
|
|
192
|
+
return {
|
|
193
|
+
width: "28px",
|
|
194
|
+
height: "28px",
|
|
195
|
+
display: "inline-flex",
|
|
196
|
+
alignItems: "center",
|
|
197
|
+
justifyContent: "center",
|
|
198
|
+
borderRadius: "9999px",
|
|
199
|
+
background: "transparent",
|
|
200
|
+
color: "inherit",
|
|
201
|
+
border: "var(--sc-content-bubble-border, 1px solid rgba(255, 255, 255, 0.18))",
|
|
202
|
+
cursor: "pointer",
|
|
203
|
+
flexShrink: "0",
|
|
204
|
+
opacity: "0.7"
|
|
205
|
+
};
|
|
206
|
+
}
|
|
207
|
+
if (!customElements.get("adaptive-chat-bar")) {
|
|
208
|
+
customElements.define("adaptive-chat-bar", AdaptiveChatBar);
|
|
209
|
+
}
|
|
210
|
+
|
|
211
|
+
export {
|
|
212
|
+
AdaptiveChatBar
|
|
213
|
+
};
|
|
214
|
+
//# sourceMappingURL=chunk-QELVKBQV.js.map
|
|
@@ -0,0 +1,7 @@
|
|
|
1
|
+
{
|
|
2
|
+
"version": 3,
|
|
3
|
+
"sources": ["../src/AdaptiveChatBar.ts"],
|
|
4
|
+
"sourcesContent": ["/**\n * AdaptiveChatBar \u2014 the canvas lid composition for the chat-canvas\n * experience. Renders the bubble-up trail on top and an always-visible\n * input row below.\n *\n * Wiring contract (events out):\n * - `chat-message-sent` ({ text }): the user submitted text via Enter\n * or the send button. The owning code is responsible for pushing\n * this into the conversation history and producing a reply.\n * - `canvas-close`: the user clicked the close \u2715 button. Propagated\n * to the canvas overlay so the underlying drawer is dismissed.\n *\n * Wiring contract (props in):\n * - `messages`: the conversation trail, passed straight through to\n * `<adaptive-chat-trail>`.\n * - `placeholder`: input placeholder copy. Defaults to a generic\n * \"Ask, find, or navigate\u2026\" \u2014 the host (typically the slot's lid\n * widget mount) can override to a context-specific string.\n *\n * Light DOM. Glassmorphism is applied at the input-row level so the\n * trail above floats over the host page without chrome. See PRD \u00A74.4.\n */\n\nimport { html, LitElement } from 'lit';\nimport { styleMap } from 'lit/directives/style-map.js';\n\nimport './AdaptiveChatTrail.js';\nimport type { TrailMessage } from './AdaptiveChatTrail.js';\n\nconst DEFAULT_PLACEHOLDER = 'Ask, find, or navigate\u2026';\n\nexport class AdaptiveChatBar extends LitElement {\n static override properties = {\n messages: { attribute: false },\n placeholder: { type: String },\n greeting: { type: String },\n inFlight: { type: Boolean, reflect: true },\n _input: { state: true },\n };\n\n messages: TrailMessage[] = [];\n placeholder = DEFAULT_PLACEHOLDER;\n /**\n * Initial assistant message shown before any real conversation\n * starts. Renders inside the trail as a phantom assistant chip\n * when messages.length === 0; auto-disappears as soon as the\n * first user message lands. Mirrors ChatAssistantLit's greeting.\n */\n greeting: string | undefined = undefined;\n /**\n * Whether a chat round-trip is in flight (request sent, awaiting\n * reply). The single send/stop button morphs accordingly: \u2191 when\n * ready, \u23F9 when in-flight. Parent owns this state \u2014 set true after\n * `chat-message-sent` fires, false when the reply lands or the\n * request is aborted. Enter is inert while in-flight.\n */\n inFlight = false;\n _input = '';\n\n override createRenderRoot(): HTMLElement {\n return this;\n }\n\n private _onInput = (e: Event): void => {\n this._input = (e.target as HTMLInputElement).value;\n };\n\n private _onKeyDown = (e: KeyboardEvent): void => {\n if (e.key === 'Enter' && !e.shiftKey) {\n e.preventDefault();\n // Enter is the send affordance \u2014 while in-flight there's nothing\n // to send, so it's a no-op. Interrupt requires the explicit\n // \u23F9 click to avoid surprise-aborting on a stray keystroke.\n if (this.inFlight) return;\n this._send();\n }\n };\n\n // Single button. Click delegates to send-or-interrupt based on\n // current state. Same DOM node, different behavior \u2014 discoverability\n // wins from the user not having to scan for which control is active.\n private _onSendOrInterrupt = (): void => {\n if (this.inFlight) {\n this.dispatchEvent(new CustomEvent('chat-interrupt', { bubbles: true, composed: true }));\n return;\n }\n this._send();\n };\n\n private _onClose = (): void => {\n this.dispatchEvent(new CustomEvent('canvas-close', { bubbles: true, composed: true }));\n };\n\n private _send(): void {\n const text = this._input.trim();\n if (!text) return;\n this.dispatchEvent(\n new CustomEvent<{ text: string }>('chat-message-sent', {\n detail: { text },\n bubbles: true,\n composed: true,\n })\n );\n this._input = '';\n // Drop the input value too \u2014 the input's bound value is `this._input`\n // via the render, but jsdom's two-way binding via property only takes\n // effect after the next render, so set it imperatively for the test\n // and for browser symmetry (most browsers do the right thing here\n // anyway because Lit re-renders on the state change).\n const input = this.querySelector<HTMLInputElement>('input[data-chat-input]');\n if (input) input.value = '';\n }\n\n override render() {\n return html`\n <div style=${styleMap(rootStyles())}>\n <adaptive-chat-trail\n .messages=${this.messages}\n .greeting=${this.greeting}\n ></adaptive-chat-trail>\n <div style=${styleMap(rowStyles())} data-chat-row>\n <span style=${styleMap(avatarStyles())} aria-hidden=\"true\">\u2726</span>\n <input\n data-chat-input\n type=\"text\"\n placeholder=${this.placeholder}\n .value=${this._input}\n @input=${this._onInput}\n @keydown=${this._onKeyDown}\n style=${styleMap(inputStyles())}\n aria-label=\"Chat input\"\n />\n <button\n type=\"button\"\n data-chat-send\n data-state=${this.inFlight ? 'in-flight' : 'ready'}\n @click=${this._onSendOrInterrupt}\n aria-label=${this.inFlight ? 'Stop' : 'Send message'}\n title=${this.inFlight ? 'Interrupt' : 'Send'}\n style=${styleMap(sendStyles(this.inFlight))}\n >${this.inFlight ? '\u25A0' : '\u2191'}</button>\n <button\n type=\"button\"\n data-chat-close\n @click=${this._onClose}\n aria-label=\"Hide chat\"\n style=${styleMap(closeStyles())}\n >\u2715</button>\n </div>\n </div>\n `;\n }\n}\n\n// ---------------------------------------------------------------------------\n// Styles \u2014 kept inline (Lit styleMap) so they participate in light-DOM\n// rendering and pick up host CSS variables (e.g. --sc-tile-background).\n// ---------------------------------------------------------------------------\n\nfunction rootStyles(): Record<string, string> {\n return {\n display: 'flex',\n flexDirection: 'column',\n gap: '6px',\n // Fill the host container's width. Floating consumers (e.g.\n // bottom-right pinned) constrain via their own wrapper's max-width.\n width: '100%',\n pointerEvents: 'auto',\n };\n}\n\nfunction rowStyles(): Record<string, string> {\n return {\n display: 'flex',\n alignItems: 'center',\n gap: '8px',\n padding: '10px 12px',\n borderRadius: 'var(--sc-tile-border-radius, 14px)',\n // Consume the same surface tokens as SyntroTileCard so a workspace\n // theme that sets --sc-tile-background / --sc-tile-border /\n // --sc-tile-shadow renders the lid consistently with the tiles below.\n // Fallbacks are neutral slate (matches darkDefaults shape) so the\n // widget still looks intentional on a page that sets no tokens.\n background: 'var(--sc-tile-background, rgba(15, 19, 24, 0.6))',\n backdropFilter: 'blur(24px) saturate(140%)',\n WebkitBackdropFilter: 'blur(24px) saturate(140%)',\n border: 'var(--sc-tile-border, 1px solid rgba(255, 255, 255, 0.08))',\n boxShadow: 'var(--sc-tile-shadow, 0 2px 12px rgba(0, 0, 0, 0.3))',\n color: 'var(--sc-tile-title-color, #fafafa)',\n fontFamily: 'var(--sc-font-family, inherit)',\n };\n}\n\nfunction avatarStyles(): Record<string, string> {\n return {\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n width: '24px',\n height: '24px',\n borderRadius: '9999px',\n background: 'hsl(var(--sc-accent-color) / 0.15)',\n border: '1px solid hsl(var(--sc-accent-color) / 0.30)',\n color: 'hsl(var(--sc-accent-color) / 0.95)',\n flexShrink: '0',\n fontSize: '11px',\n };\n}\n\nfunction inputStyles(): Record<string, string> {\n return {\n flex: '1',\n minWidth: '0',\n background: 'transparent',\n border: 'none',\n outline: 'none',\n color: 'inherit',\n fontSize: '13px',\n };\n}\n\nfunction sendStyles(inFlight: boolean): Record<string, string> {\n return {\n width: '28px',\n height: '28px',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '9999px',\n // Ready: filled accent (send is the affordance). In-flight: hollow\n // ring + accent ring (stop is a one-of-a-kind disruptive action,\n // styled differently so the user reads \"this isn't just send\").\n background: inFlight ? 'transparent' : 'hsl(var(--sc-accent-color) / 0.85)',\n color: inFlight ? 'hsl(var(--sc-accent-color) / 0.95)' : 'var(--sc-accent-foreground, #fff)',\n border: inFlight ? '1px solid hsl(var(--sc-accent-color) / 0.55)' : 'none',\n cursor: 'pointer',\n flexShrink: '0',\n transition: 'background 150ms ease, color 150ms ease, border-color 150ms ease',\n };\n}\n\nfunction closeStyles(): Record<string, string> {\n return {\n width: '28px',\n height: '28px',\n display: 'inline-flex',\n alignItems: 'center',\n justifyContent: 'center',\n borderRadius: '9999px',\n background: 'transparent',\n color: 'inherit',\n border: 'var(--sc-content-bubble-border, 1px solid rgba(255, 255, 255, 0.18))',\n cursor: 'pointer',\n flexShrink: '0',\n opacity: '0.7',\n };\n}\n\nif (!customElements.get('adaptive-chat-bar')) {\n customElements.define('adaptive-chat-bar', AdaptiveChatBar);\n}\n\ndeclare global {\n interface HTMLElementTagNameMap {\n 'adaptive-chat-bar': AdaptiveChatBar;\n }\n}\n"],
|
|
5
|
+
"mappings": ";AAuBA,SAAS,MAAM,kBAAkB;AACjC,SAAS,gBAAgB;AAKzB,IAAM,sBAAsB;AAErB,IAAM,kBAAN,cAA8B,WAAW;AAAA,EAAzC;AAAA;AASL,oBAA2B,CAAC;AAC5B,uBAAc;AAOd;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAA+B;AAQ/B;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA;AAAA,oBAAW;AACX,kBAAS;AAMT,SAAQ,WAAW,CAAC,MAAmB;AACrC,WAAK,SAAU,EAAE,OAA4B;AAAA,IAC/C;AAEA,SAAQ,aAAa,CAAC,MAA2B;AAC/C,UAAI,EAAE,QAAQ,WAAW,CAAC,EAAE,UAAU;AACpC,UAAE,eAAe;AAIjB,YAAI,KAAK,SAAU;AACnB,aAAK,MAAM;AAAA,MACb;AAAA,IACF;AAKA;AAAA;AAAA;AAAA,SAAQ,qBAAqB,MAAY;AACvC,UAAI,KAAK,UAAU;AACjB,aAAK,cAAc,IAAI,YAAY,kBAAkB,EAAE,SAAS,MAAM,UAAU,KAAK,CAAC,CAAC;AACvF;AAAA,MACF;AACA,WAAK,MAAM;AAAA,IACb;AAEA,SAAQ,WAAW,MAAY;AAC7B,WAAK,cAAc,IAAI,YAAY,gBAAgB,EAAE,SAAS,MAAM,UAAU,KAAK,CA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