@gemboss/ui 0.69.0 → 0.70.1

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.
@@ -0,0 +1,257 @@
1
+ "use client";
2
+
3
+ /**
4
+ * THE COMPOSER'S TWO MENUS (0.70.0, canvas board ChatComposer, Chris 10/11/2026): "+" and ✦, at the start of the toolbar
5
+ * under the text box, in every Gem chat.
6
+ *
7
+ * "+" what can go with the message: a picture or a file, one from the store's Media, the screenshot on the clipboard, a
8
+ * page or section to mention. It replaces the paperclip every host drew in `tools` (Chris: the send, mic and paperclip
9
+ * read too big and unbalanced; many products show one "+" that opens the rest). A row is drawn only when the host
10
+ * gives it something to do, so the menu never offers a row that does nothing.
11
+ * ✦ which AI answers and how far it goes: the engine choice the chip used to carry (`EnginePickerProps`, published to
12
+ * Settings › AI & engines exactly as the chip did), the work mode the admin's select carried, and "All AI settings…".
13
+ * One icon instead of two labelled chips, so the toolbar never has to cut a label at a narrow width.
14
+ *
15
+ * Both are the kit's `Menu` (menu.tsx): the list floats in the top layer (a dock or a dialog cannot cut it), opens with focus
16
+ * on its first row (or on the choice that is on), ↑ ↓ Home End move, Escape closes with focus back on the button, a click
17
+ * outside closes it. The rows are `MenuItem`s, the choices `menuitemradio`s in a `MenuGroup` with a line under each.
18
+ * The glyphs are the kit's icon set (`<Icon>`, one set for the chat frame since #7244).
19
+ */
20
+ import "../chat-composer-menus.css";
21
+ import React, { useEffect, useRef, useState } from "react";
22
+ import { Icon, type IconName } from "../icons";
23
+ import { Menu, MenuGroup, MenuItem, MenuSeparator } from "../menu";
24
+ import { BRIDGE_TONE, DOT_CLASS, ENGINE_PICKER_EN, bridgeSuffix, type EnginePickerProps } from "./engine";
25
+ import { usePublishEngineSettings } from "./engine-settings-store";
26
+
27
+ // ── What a host gives ────────────────────────────────────────────────────────────────────────────────────────────────
28
+
29
+ /** One row of the "+" menu. Give it ONE action: `onFiles` (a file picker), `paste` (the clipboard's picture) or `onSelect`. */
30
+ export interface ChatAddItem {
31
+ /** What the row says ("Attach image", "Pick from Media"). */
32
+ label: string;
33
+ /** A line under it, muted (the formats a picker takes). */
34
+ description?: string;
35
+ /** The row's mark. Default: from the action (a file picker: image when it only takes pictures, else file). */
36
+ icon?: ChatAddIcon;
37
+ /** A file picker: what it takes, one or several, and the files picked. */
38
+ accept?: string;
39
+ multiple?: boolean;
40
+ onFiles?: (files: File[]) => void;
41
+ /** The picture on the clipboard (a screenshot just taken), handed over as files. Drawn only where the browser can read the
42
+ * clipboard (a secure page, the async Clipboard API); elsewhere ⌘V in the box still pastes it. */
43
+ paste?: (files: File[]) => void;
44
+ /** Anything else: the host opens its own picker (Media, a page to mention). */
45
+ onSelect?: () => void;
46
+ disabled?: boolean;
47
+ /** Why it is off, or more about it: its tooltip. */
48
+ title?: string;
49
+ }
50
+ export type ChatAddIcon = "image" | "file" | "media" | "screenshot" | "mention" | "link";
51
+
52
+ export interface ChatComposerAdd {
53
+ items: readonly ChatAddItem[];
54
+ /** Something it added is still on its way (an upload): the "+" shows a ring and takes no press. */
55
+ busy?: boolean;
56
+ /** The button's name (default "Add image, file or mention"). */
57
+ label?: string;
58
+ }
59
+
60
+ /** A choice of the ✦ menu (a work mode). */
61
+ export interface ChatAiChoice {
62
+ id: string;
63
+ label: string;
64
+ /** The line under it ("Makes the change, you review"). */
65
+ description?: string;
66
+ disabled?: boolean;
67
+ title?: string;
68
+ }
69
+
70
+ export interface ChatComposerAi {
71
+ /** The engine choice: the package's EnginePicker props. Listed as "Model" (one row per engine, its plan under it), and
72
+ * published to Settings › AI & engines as the chip published it. Absent or no engines: no Model rows. */
73
+ engine?: EnginePickerProps | null;
74
+ /** How far a turn goes (the admin's work modes). */
75
+ mode?: { title?: string; items: readonly ChatAiChoice[]; value: string; onChange: (id: string) => void } | null;
76
+ /** "All AI settings…": the surface's Settings › AI. Default: the engine's own door (`engine.onOpenSettings("engine")`). */
77
+ onOpenSettings?: () => void;
78
+ settingsLabel?: string;
79
+ /** A turn is running and a switch is refused now: the rows stay readable and are off; a string says why. */
80
+ locked?: boolean | string;
81
+ /** ✦ opened: the surface reads its engines again (a CLI signed in since the page loaded) and drops an old refusal. Not the
82
+ * engine's `onOpenChange`, which says whether Settings › AI & engines is on screen. */
83
+ onOpen?: () => void;
84
+ }
85
+
86
+ // ── Glyphs: the kit's icon set ───────────────────────────────────────────────────────────────────────────────────────
87
+
88
+ export function PlusGlyph() { return <Icon name="plus" />; }
89
+ export function SparkleGlyph() { return <Icon name="sparkle" />; }
90
+ const ROW_GLYPH: Record<ChatAddIcon, IconName> = {
91
+ image: "image", file: "paperclip", media: "media", screenshot: "screenshot", mention: "at", link: "link",
92
+ };
93
+ const iconOf = (it: ChatAddItem): ChatAddIcon =>
94
+ it.icon ?? (it.paste ? "screenshot" : it.onFiles ? (/^\s*image\/[^,]*(\s*,\s*image\/[^,]*)*\s*$/.test(it.accept ?? "") ? "image" : "file") : "media");
95
+
96
+ // ── The clipboard ──────────────────────────────────────────────────────────────────────────────────────────────────────
97
+
98
+ type ClipboardWithRead = Clipboard & { read?: () => Promise<Array<{ types: readonly string[]; getType: (t: string) => Promise<Blob> }>> };
99
+ /** The browser can read a picture off the clipboard (a secure page with the async Clipboard API). */
100
+ export function canReadClipboardImages(): boolean {
101
+ if (typeof window === "undefined" || typeof navigator === "undefined") return false;
102
+ return window.isSecureContext !== false && typeof (navigator.clipboard as ClipboardWithRead | undefined)?.read === "function";
103
+ }
104
+ /** The pictures on the clipboard, as files ("screenshot.png"); [] when it holds none; null when the browser refused. */
105
+ export async function readClipboardImages(): Promise<File[] | null> {
106
+ const clip = navigator.clipboard as ClipboardWithRead | undefined;
107
+ if (!clip?.read) return null;
108
+ let items: Awaited<ReturnType<NonNullable<ClipboardWithRead["read"]>>>;
109
+ try { items = await clip.read(); } catch { return null; }
110
+ const files: File[] = [];
111
+ for (const item of items) {
112
+ const type = item.types.find((t) => t.startsWith("image/"));
113
+ if (!type) continue;
114
+ try {
115
+ const blob = await item.getType(type);
116
+ // The subtype before any "+" and without a vendor "x-": image/svg+xml → svg, image/x-icon → icon.
117
+ const ext = type.slice(6).split("+")[0]!.replace(/^x-/i, "").replace(/[^a-z0-9]+/gi, "") || "png";
118
+ files.push(new File([blob], `screenshot.${ext}`, { type }));
119
+ } catch { /* that item would not give its picture: the others still go */ }
120
+ }
121
+ return files;
122
+ }
123
+
124
+ /** What the "+" says when the clipboard gave nothing: in the line over the text box, where the voice's line is. Both keys, not a
125
+ * Mac's alone: the line is the kit's, on every surface and every machine. */
126
+ export const PASTE_EMPTY = "No picture on the clipboard. Copy a screenshot first, or paste it into the box (Ctrl+V, ⌘V on a Mac).";
127
+ export const PASTE_REFUSED = "The browser didn't let GemBoss read the clipboard. Paste it into the box instead (Ctrl+V, ⌘V on a Mac).";
128
+
129
+ // ── "+" ────────────────────────────────────────────────────────────────────────────────────────────────────────────────
130
+
131
+ /** The "+" menu's rows that the browser can do here (a paste row waits for the browser: the server cannot know). */
132
+ function useAddRows(add: ChatComposerAdd): ChatAddItem[] {
133
+ const [canPaste, setCanPaste] = useState(false);
134
+ useEffect(() => { setCanPaste(canReadClipboardImages()); }, []);
135
+ return add.items.filter((it) => (it.paste ? canPaste : Boolean(it.onFiles || it.onSelect)));
136
+ }
137
+
138
+ /** The "+" menu and the hidden file inputs its rows open: two parts, placed apart by ChatComposer. The menu goes in the toolbar's
139
+ * lead; the inputs go outside it (an input arriving in the lead would restart the density stepping, which watches the lead), and
140
+ * outside the list (the list closes before a picker opens). `onNote`: a sentence for the line over the box, or null to clear it. */
141
+ export function useComposerAdd(add: ChatComposerAdd | null | undefined, disabled: boolean | undefined, onNote: (note: string | null) => void): { menu: React.ReactNode; inputs: React.ReactNode } {
142
+ const items = useAddRows(add ?? { items: [] });
143
+ const inputs = useRef<Array<HTMLInputElement | null>>([]);
144
+ if (!add || items.length === 0) return { menu: null, inputs: null };
145
+ const label = add.label ?? "Add image, file or mention";
146
+ return {
147
+ menu: (
148
+ <Menu label={label} icon={<PlusGlyph />} className="gemboss-ec-add" disabled={disabled} loading={add.busy}>
149
+ {items.map((it, i) => (
150
+ <MenuItem key={`${i}:${it.label}`} icon={<Icon name={ROW_GLYPH[iconOf(it)]} size={16} />} description={it.description} disabled={it.disabled} title={it.title}
151
+ onClick={() => {
152
+ onNote(null);
153
+ if (it.onFiles) inputs.current[i]?.click();
154
+ else if (it.paste) {
155
+ const take = it.paste;
156
+ void readClipboardImages().then((files) => {
157
+ if (files === null) onNote(PASTE_REFUSED);
158
+ else if (files.length === 0) onNote(PASTE_EMPTY);
159
+ else take(files);
160
+ });
161
+ } else it.onSelect?.();
162
+ }}>
163
+ {it.label}
164
+ </MenuItem>
165
+ ))}
166
+ </Menu>
167
+ ),
168
+ inputs: items.some((it) => it.onFiles) ? (
169
+ <span className="gemboss-ec-addfiles" hidden>
170
+ {items.map((it, i) => (it.onFiles ? (
171
+ <input key={`f${i}`} ref={(el) => { inputs.current[i] = el; }} type="file" hidden tabIndex={-1} accept={it.accept} multiple={it.multiple}
172
+ onChange={(e) => { const files = [...(e.target.files ?? [])]; e.target.value = ""; if (files.length) it.onFiles?.(files); }} />
173
+ ) : null))}
174
+ </span>
175
+ ) : null,
176
+ };
177
+ }
178
+
179
+ // ── ✦ ───────────────────────────────────────────────────────────────────────────────────────────────────────────────────
180
+
181
+ /** What the ✦ button says out loud: the engine, its model, the work mode, and the bridge when it is not fine, as the chip says it
182
+ * ("AI model: Claude Code · Opus · Standard. Bridge on your machine: Not connected"; 12/11/2026, the dot alone said nothing to a
183
+ * screen reader). Not when the surface hides the bridge dot (`showBridgeDot: false`). */
184
+ export function aiButtonName(ai: ChatComposerAi): string {
185
+ const e = ai.engine && ai.engine.engines.length ? ai.engine : null;
186
+ const cur = e?.engines.find((x) => x.id === e.engine);
187
+ const model = e?.model ? (cur?.models ?? e.models)?.find((m) => m.id === e.model)?.label : undefined;
188
+ const mode = ai.mode?.items.find((m) => m.id === ai.mode?.value)?.label;
189
+ const parts = [cur?.label ?? (e ? e.engine : null), model, mode].filter(Boolean);
190
+ const paid = cur?.paid ? ". Paid per turn" : "";
191
+ const bridge = e && e.showBridgeDot !== false ? bridgeSuffix(e.bridge, { ...ENGINE_PICKER_EN, ...e.labels }) : "";
192
+ return (parts.length ? `AI model: ${parts.join(" · ")}` : "AI model") + paid + bridge;
193
+ }
194
+
195
+ /** The ✦ menu: Model (the engines), How far it goes (the work modes), All AI settings…. Draws nothing with neither. */
196
+ export function ComposerAiMenu({ ai, disabled }: { ai: ChatComposerAi; disabled?: boolean }) {
197
+ const engine = ai.engine && ai.engine.engines.length ? ai.engine : null;
198
+ // The chip published the engine choice to Settings › AI & engines (engine-settings.tsx draws it from there); ✦ does now.
199
+ usePublishEngineSettings(engine);
200
+ const mode = ai.mode && ai.mode.items.length ? ai.mode : null;
201
+ if (!engine && !mode) return null;
202
+ const lockedWhy = typeof ai.locked === "string" ? ai.locked : undefined;
203
+ // The engine rows only: the work mode and All AI settings… do not depend on the engine being reachable.
204
+ const engineOff = Boolean(ai.locked || engine?.locked || engine?.disabled);
205
+ const tone = engine?.bridge && engine.showBridgeDot !== false ? BRIDGE_TONE[engine.bridge.state] : null;
206
+ // A paid engine says so on the button, in words (money, §11): the dot is the bridge's.
207
+ const paid = Boolean(engine?.engines.find((x) => x.id === engine.engine)?.paid);
208
+ const settings = ai.onOpenSettings ?? (engine ? () => engine.onOpenSettings("engine") : undefined);
209
+ const pick = (id: string) => {
210
+ if (!engine || id === engine.engine) return;
211
+ const next = engine.engines.find((x) => x.id === id);
212
+ // A switched engine answers with the model it keeps (`model`, the desktop remembers one per engine), else its first
213
+ // ("Default": the CLI's own setting). Its models are chosen in Settings.
214
+ if (engine.onPick) engine.onPick(id, next?.model ?? next?.models?.[0]?.id ?? "");
215
+ else engine.onEngineChange?.(id);
216
+ };
217
+ // Opening ✦ is opening the engine list, as opening the chip's Settings section was: the surface reads its engines again (a CLI
218
+ // signed in since the page loaded) and drops an old refusal (`onOpen`). A switch it refuses is said over the text box
219
+ // (ChatComposer), since the list has closed by then.
220
+ return (
221
+ <Menu label={aiButtonName(ai)} className={paid ? "gemboss-ec-ai is-paid" : "gemboss-ec-ai"} disabled={disabled} onOpenChange={(o) => { if (o) ai.onOpen?.(); }}
222
+ icon={<><SparkleGlyph />{paid ? <span className="gemboss-ec-ai-paid" aria-hidden="true">Paid</span> : null}{tone && tone !== "ok" ? <span className={DOT_CLASS[tone]} aria-hidden="true" /> : null}</>}>
223
+ {engine ? (
224
+ <MenuGroup title="Model" overline>
225
+ {engine.engines.map((e) => {
226
+ const on = e.id === engine.engine;
227
+ const model = on && engine.model ? (e.models ?? engine.models)?.find((m) => m.id === engine.model)?.label : undefined;
228
+ const line = [model, e.badge, e.paid && !/\bpaid\b/i.test(e.badge ?? "") ? "Paid per turn" : null].filter(Boolean).join(" · ");
229
+ return (
230
+ <MenuItem key={e.id} checked={on} description={line || undefined} disabled={engineOff || e.disabled}
231
+ title={(engineOff ? lockedWhy : undefined) ?? (typeof e.note === "string" ? e.note : undefined)} onClick={() => pick(e.id)}>
232
+ {e.label}
233
+ </MenuItem>
234
+ );
235
+ })}
236
+ </MenuGroup>
237
+ ) : null}
238
+ {engine && mode ? <MenuSeparator /> : null}
239
+ {mode ? (
240
+ <MenuGroup title={mode.title ?? "How far it goes"} overline>
241
+ {mode.items.map((m) => (
242
+ <MenuItem key={m.id} checked={m.id === mode.value} description={m.description} disabled={Boolean(ai.locked) || m.disabled}
243
+ title={(ai.locked ? lockedWhy : undefined) ?? m.title} onClick={() => { if (m.id !== mode.value) mode.onChange(m.id); }}>
244
+ {m.label}
245
+ </MenuItem>
246
+ ))}
247
+ </MenuGroup>
248
+ ) : null}
249
+ {settings ? (
250
+ <>
251
+ <MenuSeparator />
252
+ <MenuItem className="gemboss-ec-ai-settings" onClick={settings}>{ai.settingsLabel ?? "All AI settings…"}</MenuItem>
253
+ </>
254
+ ) : null}
255
+ </Menu>
256
+ );
257
+ }
@@ -41,6 +41,9 @@ export interface EngineChoice {
41
41
  note?: ReactNode;
42
42
  /** A short badge beside the name ("not signed in", "your plan"). */
43
43
  badge?: string;
44
+ /** Billed per turn to a paid API key, not a plan (12/11/2026, Gems/CLAUDE.md §11): while it is the engine, ✦ says "Paid" on the
45
+ * button, its name says "Paid per turn", and its Model row says so. The chip carried it in its words; ✦ has none. */
46
+ paid?: boolean;
44
47
  badgeTone?: "success" | "warning" | "critical" | "info";
45
48
  /** Cannot be picked right now. Say why in `note`. */
46
49
  disabled?: boolean;
@@ -50,6 +53,9 @@ export interface EngineChoice {
50
53
  /** THIS engine's models. Give them on every engine and the Engine card lists each engine with its own models, all at
51
54
  * once, and one click picks the engine and the model together (`onPick`): the admin's shape. 0.29.0. */
52
55
  models?: readonly Choice[];
56
+ /** The model this engine answers with when it is picked (the desktop remembers one per engine). The composer's ✦ switches
57
+ * to it, not to the first of `models`, so going there and back keeps the seller's choice. 0.70.0. */
58
+ model?: string;
53
59
  }
54
60
 
55
61
  export interface Choice {
@@ -120,7 +126,8 @@ export const BRIDGE_TONE: Record<BridgeState, "ok" | "warn" | "down" | "idle"> =
120
126
  };
121
127
  /** Literal class names, never a template like `gb-engine-dot--` + tone: a runtime-built class is a stem the admin's orphan
122
128
  * gate (a-tap-target-rule-outlived-its-markup) would have to exempt wholesale, as host.tsx says of MODE_CLASS. */
123
- const DOT_CLASS = { ok: "gb-engine-dot gb-engine-dot--ok", warn: "gb-engine-dot gb-engine-dot--warn", down: "gb-engine-dot gb-engine-dot--down", idle: "gb-engine-dot gb-engine-dot--idle" } as const;
129
+ /** The bridge state's dot (the chip's, and ✦'s corner in the composer since 0.70.0). */
130
+ export const DOT_CLASS = { ok: "gb-engine-dot gb-engine-dot--ok", warn: "gb-engine-dot gb-engine-dot--warn", down: "gb-engine-dot gb-engine-dot--down", idle: "gb-engine-dot gb-engine-dot--idle" } as const;
124
131
  const BADGE_CLASS = { success: "ui-badge ui-badge--success", warning: "ui-badge ui-badge--warning", critical: "ui-badge ui-badge--critical", info: "ui-badge ui-badge--info" } as const;
125
132
  const NOTICE_CLASS = { warn: "gb-engine-notice gb-engine-notice--warn", down: "gb-engine-notice gb-engine-notice--down" } as const;
126
133
  const STATE_LABEL: Record<BridgeState, keyof EnginePickerLabels> = {
@@ -227,13 +234,22 @@ export function useEnginePicker(options: { onOpenSettings: (tab: EnginePickerTab
227
234
  /** What the Settings section's cards take: the chip's props without its door (`onOpenSettings`), which they never call. */
228
235
  export type EngineCardProps = Omit<EnginePickerProps, "onOpenSettings"> & { onOpenSettings?: EnginePickerProps["onOpenSettings"] };
229
236
 
237
+ /** The bridge's state in words ("Not running"), as the chip and ✦ say it. */
238
+ export function bridgeStateWords(state: BridgeState, L: EnginePickerLabels = ENGINE_PICKER_EN): string { return L[STATE_LABEL[state]] ?? ENGINE_PICKER_EN[STATE_LABEL[state]] ?? state; }
239
+
240
+ /** The bridge in a spoken name when it is not fine (". Bridge on your machine: Not connected"), "" when running: the chip's
241
+ * name and ✦'s say it with this one rule. */
242
+ export function bridgeSuffix(bridge: BridgeStatus | null | undefined, L: EnginePickerLabels = ENGINE_PICKER_EN): string {
243
+ return bridge && bridge.state !== "running" ? `. ${L.bridge ?? ENGINE_PICKER_EN.bridge}: ${bridgeStateWords(bridge.state, L)}` : "";
244
+ }
245
+
230
246
  /** What the chip says out loud: the engine, the model, and the bridge when it is not fine. */
231
247
  export function engineChipName(p: Pick<EnginePickerProps, "engines" | "engine" | "models" | "model" | "bridge">, L: EnginePickerLabels = ENGINE_PICKER_EN): string {
232
248
  const cur = p.engines.find((e) => e.id === p.engine);
233
249
  const eng = cur?.label ?? p.engine;
234
250
  const model = p.model ? (cur?.models ?? p.models)?.find((m) => m.id === p.model)?.label : undefined;
235
- const bridge = p.bridge && p.bridge.state !== "running" ? `. ${L.bridge}: ${L[STATE_LABEL[p.bridge.state]]}` : "";
236
- return `${L.chip}: ${eng}${model ? ` · ${model}` : ""}${bridge}`;
251
+ // A paid engine (EngineChoice.paid) is said by the chip too: the chip and ✦ must not disagree about what costs money.
252
+ return `${L.chip}: ${eng}${model ? ` · ${model}` : ""}${cur?.paid ? ". Paid per turn" : ""}${bridgeSuffix(p.bridge, L)}`;
237
253
  }
238
254
 
239
255
  export function EnginePicker(props: EnginePickerProps) {
@@ -4,12 +4,14 @@ export { AssistantHost, AssistantMenuItem, type AssistantHostLabels, type Assist
4
4
  export { AssistantProvider, SIDE_WIDTH_VAR, useAssistant, useAssistantPageFacts, type AssistantDockApi, type AssistantOptions } from "./provider";
5
5
  export * from "./dock";
6
6
  export { AssistantWorkspaceLayout, OpenChatTabs, SessionRail, SESSION_RAIL_EN, groupSessions, normalizeForSearch, relativeTime, type AssistantSession, type SessionGroup, type SessionRailIcons, type SessionRailLabels } from "./sessions";
7
- export { BRIDGE_TONE, BridgeNotice, ENGINE_PICKER_EN, EnginePicker, engineChipName, engineMarkOf, useEnginePicker, type BridgeSetup, type BridgeState, type BridgeStatus, type Choice, type EngineChoice, type EnginePickerLabels, type EnginePickerProps, type EnginePickerTab } from "./engine";
7
+ export { BRIDGE_TONE, BridgeNotice, ENGINE_PICKER_EN, EnginePicker, bridgeStateWords, bridgeSuffix, engineChipName, engineMarkOf, useEnginePicker, type BridgeSetup, type BridgeState, type BridgeStatus, type Choice, type EngineChoice, type EnginePickerLabels, type EnginePickerProps, type EnginePickerTab } from "./engine";
8
8
  // The engine in the surface's Settings ("AI & engines", 0.52.0; the only place since 0.53.0): the chip opens it
9
9
  // (`onOpenSettings`), the section draws it.
10
10
  export { EngineSettings, EngineSettingsSection, type EngineSettingsProps } from "./engine-settings";
11
11
  // 0.29.0: the chat BODY as components (the surface hands in messages and actions), its markdown, and each engine's mark.
12
12
  export { AssistantChat, ChatAttach, ChatBubble, ChatComposer, ChatError, ChatLabelsProvider, ChatMarkdown, ChatMessage, ChatMeta, ChatNote, ChatPending, ChatStarters, ChatStepMark, chatStepMarkIcon, ChatSteps, ChatThread, CHAT_EN, PaperclipIcon, firstBlank, selectBlank, useComposerDensity, useFullChromeRoom, type AssistantChatProps, type ChatComposerProps, type ChatComposerVoice, type ChatFix, type ChatLabels, type ChatMarkdownProps, type ChatMessageData, type ChatStarter, type ChatStep, type ChatStepMarkKind, type ComposerDensity } from "./chat";
13
+ // The composer's "+" and ✦ menus (0.70.0): what a host hands ChatComposer's `add` and `ai`, and the clipboard reader "+" uses.
14
+ export { aiButtonName, canReadClipboardImages, PASTE_EMPTY, PASTE_REFUSED, readClipboardImages, type ChatAddIcon, type ChatAddItem, type ChatAiChoice, type ChatComposerAdd, type ChatComposerAi } from "./composer-menus";
13
15
  // Files in the chat (11/11/2026, canvas board ChatKit states 2–11): what is attached and its uploads, the panel as a drop target, the
14
16
  // tray in the message box (ChatComposer `top`), the pictures of a sent message, one picture large. Its own stylesheet entry.
15
17
  export { attachmentProblem, ChatAttachments, ChatDropZone, ChatImages, ChatLightbox, fileTypeName, limitsInWords, typesInWords, useChatAttachments, useChatDrop, type ChatAttachLimits, type ChatAttachment, type ChatAttachmentsProps, type ChatAttachmentsState, type ChatDrop, type ChatImage, type ChatUpload } from "./attachments";
@@ -1 +1 @@
1
- .gb-chat{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;background:var(--gemboss-surface, #fff)}.gemboss-assistant-layout:not(.is-dock) .gb-chat{background:transparent}.gb-chat>.gemboss-ec-scroll{flex:1 1 auto}.gb-dock:not(.gb-dock-full) .gb-chat-head{display:none}.gb-chat-head{flex:none;box-sizing:border-box;justify-content:center}.gb-chat[data-chrome]>.gb-chat-head{padding-right:var(--gb-chat-chrome-w);min-height:var(--gb-chat-chrome-h)}.gb-chat[data-chrome]:not(:has(>.gb-chat-head))>.gemboss-ec-scroll{padding-top:var(--gb-chat-chrome-h)}.gemboss-ec-starter.gb-chat-starter{white-space:normal;border-radius:12px;text-align:left;overflow-wrap:anywhere}.gb-chat-starter-hint{display:block;margin-bottom:4px;color:var(--gemboss-text-muted);font-size:var(--gemboss-fs-caption, 12px)}.gemboss-ec-starters.gb-chat-starters-cards{flex-direction:column;flex-wrap:nowrap;row-gap:8px}.gb-chat-starters-cards .gb-chat-starter{display:flex;align-items:center;gap:12px;padding:12px 16px}.gb-chat-starter-icon{flex:none;width:32px;height:32px;border-radius:var(--gemboss-radius-md, 8px);display:grid;place-items:center;background:var(--gemboss-accent-soft, #eef0fe);color:var(--gemboss-accent, #5661f5)}.gb-chat-starter-icon svg{width:20px;height:20px;fill:currentColor}.gb-chat-starter-body{display:flex;flex-direction:column;gap:2px;min-width:0}.gb-chat-starter-label{font-weight:600}.gb-chat-starter-sub{color:var(--gemboss-text-muted);font-size:var(--gemboss-fs-caption, 12px)}.gb-chat-label{margin:0;color:var(--gemboss-text-muted);font-size:var(--gemboss-fs-caption, 12px)}.gb-chat-target{color:var(--gemboss-text-muted)}.gb-chat-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px;color:var(--gemboss-text-muted);font-size:var(--gemboss-fs-caption, 12px)}.gb-chat-copy{flex:none}.gb-chat-note{margin:0;align-self:center;text-align:center;color:var(--gemboss-text-muted);font-size:var(--gemboss-fs-caption, 12px)}.gb-chat-notice{margin:0}.gb-chat-error{display:grid;gap:8px;margin:0;overflow-wrap:anywhere}.gb-chat-cmd{display:block;padding:6px 8px;border-radius:8px;background:#0000000d;color:var(--gemboss-text);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:16px;overflow-wrap:anywhere;user-select:all}.gb-chat-original>summary{cursor:pointer;min-height:24px;display:flex;align-items:center}.gemboss-ec-input .gemboss-ec-attach-btn{flex:0 0 auto;width:44px;height:44px;border-radius:50%;padding:0;display:inline-flex;align-items:center;justify-content:center;border:0;background-color:transparent;color:var(--gemboss-text-muted);cursor:pointer}.gemboss-ec-input .gemboss-ec-attach-btn:hover:not(:disabled){background-color:var(--gemboss-hover, rgba(0, 0, 0, .05));color:var(--gemboss-text)}.gemboss-ec-input .gemboss-ec-attach-btn:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}.gemboss-ec-input .gemboss-ec-attach-btn:disabled{opacity:.5;cursor:default}.gemboss-ec-input .gemboss-ec-attach-btn svg{width:24px;height:24px}@media (pointer: fine){.gemboss-ec-input .gb-engine-chip{position:relative}.gemboss-ec-input .gb-engine-chip:after{content:"";position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);height:44px;z-index:1}}@media (pointer: coarse),(max-width: 47.9975em){.gb-chat-original>summary{min-height:44px}}.gemboss-ec-decide{display:flex;flex-direction:column;gap:8px;margin:0 12px;padding:12px;border:1px solid var(--gemboss-divider);border-radius:16px;background:var(--gemboss-surface);box-shadow:var(--gemboss-shadow-raised, 0 4px 16px rgba(31, 30, 29, .1))}.gemboss-ec-decide-label{font-size:var(--gemboss-fs-caption, 12px);font-weight:600;color:var(--gemboss-warning, #9a6700)}.gemboss-ec-decide+.gemboss-ec-input{margin-top:8px}:where(.gemboss-ec-pending-star){display:inline-block;width:10px;height:10px;border-radius:50%;background:currentColor}.gemboss-narr-row.thinking .gemboss-narr-dot{margin-top:2px}
1
+ .gb-chat{display:flex;flex-direction:column;min-width:0;min-height:0;height:100%;background:var(--gemboss-surface, #fff)}.gemboss-assistant-layout:not(.is-dock) .gb-chat{background:transparent}.gb-chat>.gemboss-ec-scroll{flex:1 1 auto}.gb-dock:not(.gb-dock-full) .gb-chat-head{display:none}.gb-chat-head{flex:none;box-sizing:border-box;justify-content:center}.gb-chat[data-chrome]>.gb-chat-head{padding-right:var(--gb-chat-chrome-w);min-height:var(--gb-chat-chrome-h)}.gb-chat[data-chrome]:not(:has(>.gb-chat-head))>.gemboss-ec-scroll{padding-top:var(--gb-chat-chrome-h)}.gemboss-ec-starter.gb-chat-starter{white-space:normal;border-radius:12px;text-align:left;overflow-wrap:anywhere}.gb-chat-starter-hint{display:block;margin-bottom:4px;color:var(--gemboss-text-muted);font-size:var(--gemboss-fs-caption, 12px)}.gemboss-ec-starters.gb-chat-starters-cards{flex-direction:column;flex-wrap:nowrap;row-gap:8px}.gb-chat-starters-cards .gb-chat-starter{display:flex;align-items:center;gap:12px;padding:12px 16px}.gb-chat-starter-icon{flex:none;width:32px;height:32px;border-radius:var(--gemboss-radius-md, 8px);display:grid;place-items:center;background:var(--gemboss-accent-soft, #eef0fe);color:var(--gemboss-accent, #5661f5)}.gb-chat-starter-icon svg{width:20px;height:20px;fill:currentColor}.gb-chat-starter-body{display:flex;flex-direction:column;gap:2px;min-width:0}.gb-chat-starter-label{font-weight:600}.gb-chat-starter-sub{color:var(--gemboss-text-muted);font-size:var(--gemboss-fs-caption, 12px)}.gb-chat-label{margin:0;color:var(--gemboss-text-muted);font-size:var(--gemboss-fs-caption, 12px)}.gb-chat-target{color:var(--gemboss-text-muted)}.gb-chat-meta{display:flex;flex-wrap:wrap;align-items:center;gap:8px;color:var(--gemboss-text-muted);font-size:var(--gemboss-fs-caption, 12px)}.gb-chat-copy{flex:none}.gb-chat-note{margin:0;align-self:center;text-align:center;color:var(--gemboss-text-muted);font-size:var(--gemboss-fs-caption, 12px)}.gb-chat-notice{margin:0}.gb-chat-error{display:grid;gap:8px;margin:0;overflow-wrap:anywhere}.gb-chat-cmd{display:block;padding:6px 8px;border-radius:8px;background:#0000000d;color:var(--gemboss-text);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:16px;overflow-wrap:anywhere;user-select:all}.gb-chat-original>summary{cursor:pointer;min-height:24px;display:flex;align-items:center}.gemboss-ec-input .gemboss-ec-attach-btn{flex:0 0 auto;width:28px;height:28px;border-radius:50%;padding:0;display:inline-flex;align-items:center;justify-content:center;border:0;background-color:transparent;color:var(--gemboss-text-muted);cursor:pointer}.gemboss-ec-input .gemboss-ec-attach-btn:hover:not(:disabled){background-color:var(--gemboss-hover, rgba(0, 0, 0, .05));color:var(--gemboss-text)}.gemboss-ec-input .gemboss-ec-attach-btn:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}.gemboss-ec-input .gemboss-ec-attach-btn:disabled{opacity:.5;cursor:default}.gemboss-ec-input .gemboss-ec-attach-btn svg{width:16px;height:16px}@media (pointer: coarse),(max-width: 47.9975em){.gb-chat-original>summary{min-height:44px}.gemboss-ec-input .gemboss-ec-attach-btn{width:44px;height:44px}.gemboss-ec-input .gemboss-ec-attach-btn svg{width:20px;height:20px}}.gemboss-ec-decide{display:flex;flex-direction:column;gap:8px;margin:0 12px;padding:12px;border:1px solid var(--gemboss-divider);border-radius:16px;background:var(--gemboss-surface);box-shadow:var(--gemboss-shadow-raised, 0 4px 16px rgba(31, 30, 29, .1))}.gemboss-ec-decide-label{font-size:var(--gemboss-fs-caption, 12px);font-weight:600;color:var(--gemboss-warning, #9a6700)}.gemboss-ec-decide+.gemboss-ec-input{margin-top:8px}:where(.gemboss-ec-pending-star){display:inline-block;width:10px;height:10px;border-radius:50%;background:currentColor}.gemboss-narr-row.thinking .gemboss-narr-dot{margin-top:2px}
@@ -1 +1 @@
1
- .gb-chat-drop{position:absolute;inset:8px;z-index:5;display:grid;place-items:center;border:2px dashed var(--gemboss-primary);border-radius:16px;background:color-mix(in srgb,var(--gemboss-primary) 8%,transparent);pointer-events:none;animation:gb-chat-drop-in .16s cubic-bezier(.16,1,.3,1)}.gb-chat-drop-card{display:grid;justify-items:center;gap:4px;max-width:calc(100% - 32px);padding:16px 24px;border-radius:16px;text-align:center;background:var(--gemboss-surface, #fff);box-shadow:var(--gemboss-shadow-resting, 0 1px 3px rgba(0, 0, 0, .12))}.gb-chat-drop-card svg{color:var(--gemboss-primary)}.gb-chat-drop-title{font-size:var(--gemboss-fs-body, 14px);font-weight:600;color:var(--gemboss-text, #303030)}.gb-chat-drop-limits{font-size:var(--gemboss-fs-caption, 12px);color:var(--gemboss-text-muted)}.gb-chat-drop-count{margin-top:4px;padding:2px 8px;border-radius:var(--gemboss-radius-full, 999px);font-size:var(--gemboss-fs-caption, 12px);font-weight:600;color:var(--gemboss-primary-dark, var(--gemboss-primary));background:color-mix(in srgb,var(--gemboss-primary) 12%,transparent)}@keyframes gb-chat-drop-in{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:none}}.gb-chat-tray{flex:1 0 100%;min-width:0;display:grid;gap:4px;padding:0 0 4px}.gemboss-ec-input:has(>.gb-chat-tray:not([data-empty])):has(>.gemboss-ec-toolbar>.gemboss-ec-toolbar-lead:empty){flex-wrap:wrap}.gb-chat-tray[data-empty]{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.gb-chat-tray-row{list-style:none;margin:0;padding:0 0 4px;display:flex;gap:8px;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}.gb-chat-tray-item{position:relative;flex:0 0 auto;display:flex;align-items:center}.gb-chat-tray-item.is-card{gap:8px;height:56px;max-width:200px;padding:0 32px 0 0;border:1px solid var(--gemboss-divider);border-radius:8px;background:var(--gemboss-surface, #fff)}.gb-chat-tray-thumb{position:relative;display:block;flex:0 0 auto;width:56px;height:56px;padding:0;overflow:hidden;border:1px solid var(--gemboss-divider);border-radius:8px;background:var(--gemboss-divider-soft, #f1f1f1);cursor:zoom-in}.gb-chat-tray-item.is-card .gb-chat-tray-thumb{height:54px;border:0;border-radius:8px 0 0 8px}.gb-chat-tray-thumb:disabled{cursor:default}.gb-chat-tray-thumb:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}.gb-chat-tray-thumb img{display:block;width:100%;height:100%;object-fit:cover}.gb-chat-tray-type{position:relative;display:grid;place-items:center;flex:0 0 auto;width:40px;height:40px;margin-left:8px;border-radius:6px;font-size:var(--gemboss-fs-caption, 12px);font-weight:700;letter-spacing:.02em;color:var(--gemboss-primary-dark, var(--gemboss-primary));background:color-mix(in srgb,var(--gemboss-primary) 10%,transparent)}.gb-chat-tray-item:not(.is-card)>.gb-chat-tray-type{width:56px;height:56px;margin:0;border:1px solid var(--gemboss-divider);border-radius:8px}.gb-chat-tray-item.is-error .gb-chat-tray-type{color:var(--gemboss-danger-strong, var(--gemboss-danger));background:var(--gemboss-danger-soft, #fee9e8)}.gb-chat-tray-text{display:grid;min-width:0;line-height:1.3}.gb-chat-tray-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--gemboss-fs-caption, 12px);font-weight:600;color:var(--gemboss-text, #303030)}.gb-chat-tray-sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--gemboss-fs-caption, 12px);color:var(--gemboss-text-muted)}.gb-chat-tray-item.is-error .gb-chat-tray-thumb,.gb-chat-tray-item.is-error:not(.is-card)>.gb-chat-tray-type,.gb-chat-tray-item.is-error.is-card{border:2px solid var(--gemboss-danger)}.gb-chat-tray-item.is-error .gb-chat-tray-thumb img{opacity:.5}.gb-chat-tray-item.is-error .gb-chat-tray-sub{color:var(--gemboss-danger-strong, var(--gemboss-danger))}.gb-chat-tray-scrim{position:absolute;inset:0;display:grid;place-items:center;border-radius:inherit;background:#00000052;pointer-events:none}.gb-chat-tray-type .gb-chat-tray-scrim{background:transparent}.gb-chat-tray-ring{color:var(--gemboss-on-primary, #fff)}.gb-chat-tray-type .gb-chat-tray-ring{color:var(--gemboss-primary)}.gb-chat-tray-ring circle{fill:none;stroke-width:3}.gb-chat-tray-ring-track{stroke:currentColor;opacity:.3}.gb-chat-tray-ring-bar{stroke:currentColor;stroke-linecap:round;transform:rotate(-90deg);transform-origin:50% 50%;transition:stroke-dashoffset .2s linear}.gb-chat-tray-ring.is-unknown .gb-chat-tray-ring-bar{animation:gb-chat-ring-turn .9s linear infinite}@keyframes gb-chat-ring-turn{0%{transform:rotate(-90deg)}to{transform:rotate(270deg)}}.gb-chat-tray-x{position:absolute;top:0;right:0;width:24px;height:24px;padding:2px;display:flex;align-items:flex-start;justify-content:flex-end;border:0;background:transparent;cursor:pointer;color:var(--gemboss-on-primary, #fff)}.gb-chat-tray-item.is-card .gb-chat-tray-x{top:50%;right:4px;transform:translateY(-50%);align-items:center;justify-content:center;color:var(--gemboss-text-muted)}.gb-chat-tray-x-dot{display:grid;place-items:center;width:20px;height:20px;border-radius:var(--gemboss-radius-full, 999px);background:#0009;transition:background var(--gemboss-transition-fast, .12s) ease}.gb-chat-tray-item.is-card .gb-chat-tray-x-dot{background:transparent}.gb-chat-tray-x:hover .gb-chat-tray-x-dot{background:#000000c7}.gb-chat-tray-item.is-card .gb-chat-tray-x:hover .gb-chat-tray-x-dot{background:var(--gemboss-hover, rgba(0, 0, 0, .05));color:var(--gemboss-text, #303030)}.gb-chat-tray-x:focus-visible{outline:none}.gb-chat-tray-x:focus-visible .gb-chat-tray-x-dot{outline:2px solid var(--ui-focus, #5661f5);outline-offset:1px}.gb-chat-tray-line{margin:0;font-size:var(--gemboss-fs-caption, 12px);line-height:1.4;color:var(--gemboss-text-muted)}.gb-chat-tray-line:empty{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.gb-chat-tray-line.is-error{color:var(--gemboss-danger-strong, var(--gemboss-danger))}.gb-chat-images{display:grid;gap:4px;width:100%}.gb-chat-images[data-layout=two]{grid-template-columns:repeat(2,minmax(0,1fr))}.gb-chat-images[data-layout=grid]{grid-template-columns:repeat(3,minmax(0,1fr))}.gb-chat-images-cell{position:relative;display:block;width:100%;padding:0;overflow:hidden;border:0;border-radius:12px;background:var(--gemboss-divider-soft, #f1f1f1);cursor:zoom-in}.gb-chat-images-cell:disabled{cursor:default}.gb-chat-images-cell:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}.gb-chat-images-cell img{display:block;width:100%;height:100%;object-fit:cover}.gb-chat-images[data-layout=one] .gb-chat-images-cell img{height:auto;max-height:220px}.gb-chat-images[data-layout=two] .gb-chat-images-cell,.gb-chat-images[data-layout=grid] .gb-chat-images-cell{aspect-ratio:1}.gb-chat-images[data-layout=grid] .gb-chat-images-cell{border-radius:8px}.gb-chat-images-more{position:absolute;inset:0;display:grid;place-items:center;font-size:var(--gemboss-fs-h2, 20px);font-weight:600;color:#fff;background:#00000080}.gb-chat-lightbox{width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:32px;border:0;background:transparent;display:none;place-items:center;overflow:hidden}.gb-chat-lightbox[open]{display:grid;animation:gb-chat-lightbox-in .12s ease-out}.gb-chat-lightbox::backdrop{background:#000000c7}.gb-chat-lightbox img{max-width:100%;max-height:calc(100dvh - 64px);object-fit:contain;border-radius:8px;box-shadow:0 12px 48px #00000080}.gb-chat-lightbox-close{position:absolute;top:16px;right:16px;width:44px;height:44px;padding:0;display:grid;place-items:center;border:0;border-radius:var(--gemboss-radius-full, 999px);color:#fff;background:#ffffff24;cursor:pointer}.gb-chat-lightbox-close:hover{background:#ffffff47}.gb-chat-lightbox-close:focus-visible{outline:2px solid #fff;outline-offset:2px}@keyframes gb-chat-lightbox-in{0%{opacity:0}to{opacity:1}}@media (pointer: coarse),(max-width: 47.9975em){.gb-chat-tray-thumb,.gb-chat-tray-item:not(.is-card)>.gb-chat-tray-type{width:72px;height:72px}.gb-chat-tray-item.is-card{height:72px}.gb-chat-tray-item.is-card .gb-chat-tray-thumb{height:70px}.gb-chat-tray-x{width:44px;height:44px}.gb-chat-tray-x-dot{width:24px;height:24px}.gb-chat-tray-item.is-card{padding-right:44px}.gb-chat-tray-item.is-card .gb-chat-tray-x{right:0}}@media (prefers-reduced-motion: reduce){.gb-chat-drop,.gb-chat-lightbox[open],.gb-chat-tray-ring.is-unknown .gb-chat-tray-ring-bar{animation:none}.gb-chat-tray-ring-bar{transition:none}}
1
+ .gb-chat-drop{position:absolute;inset:8px;z-index:5;display:grid;place-items:center;border:2px dashed var(--gemboss-primary);border-radius:16px;background:color-mix(in srgb,var(--gemboss-primary) 8%,transparent);pointer-events:none;animation:gb-chat-drop-in .16s cubic-bezier(.16,1,.3,1)}.gb-chat-drop-card{display:grid;justify-items:center;gap:4px;max-width:calc(100% - 32px);padding:16px 24px;border-radius:16px;text-align:center;background:var(--gemboss-surface, #fff);box-shadow:var(--gemboss-shadow-resting, 0 1px 3px rgba(0, 0, 0, .12))}.gb-chat-drop-card svg{color:var(--gemboss-primary)}.gb-chat-drop-title{font-size:var(--gemboss-fs-body, 14px);font-weight:600;color:var(--gemboss-text, #303030)}.gb-chat-drop-limits{font-size:var(--gemboss-fs-caption, 12px);color:var(--gemboss-text-muted)}.gb-chat-drop-count{margin-top:4px;padding:2px 8px;border-radius:var(--gemboss-radius-full, 999px);font-size:var(--gemboss-fs-caption, 12px);font-weight:600;color:var(--gemboss-primary-dark, var(--gemboss-primary));background:color-mix(in srgb,var(--gemboss-primary) 12%,transparent)}@keyframes gb-chat-drop-in{0%{opacity:0;transform:scale(.98)}to{opacity:1;transform:none}}.gb-chat-tray{flex:1 0 100%;min-width:0;display:grid;gap:4px;padding:0 0 4px}.gemboss-ec-input:has(>.gb-chat-tray:not([data-empty])):has(>.gemboss-ec-toolbar>.gemboss-ec-toolbar-lead:empty){flex-wrap:wrap}.gb-chat-tray[data-empty]{position:absolute;width:1px;height:1px;padding:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.gb-chat-tray-row{list-style:none;margin:0;padding:0 0 4px;display:flex;gap:8px;min-width:0;overflow-x:auto;overscroll-behavior-x:contain;scrollbar-width:thin}.gb-chat-tray-item{position:relative;flex:0 0 auto;display:flex;align-items:center}.gb-chat-tray-item.is-card{gap:8px;height:56px;max-width:200px;padding:0 32px 0 0;border:1px solid var(--gemboss-divider);border-radius:8px;background:var(--gemboss-surface, #fff)}.gb-chat-tray-thumb{position:relative;display:block;flex:0 0 auto;width:56px;height:56px;padding:0;overflow:hidden;border:1px solid var(--gemboss-divider);border-radius:8px;background:var(--gemboss-divider-soft, #f1f1f1);cursor:zoom-in}.gb-chat-tray-item.is-card .gb-chat-tray-thumb{height:54px;border:0;border-radius:8px 0 0 8px}.gb-chat-tray-thumb:disabled{cursor:default}.gb-chat-tray-thumb:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}.gb-chat-tray-thumb img{display:block;width:100%;height:100%;object-fit:cover}.gb-chat-tray-type{position:relative;display:grid;place-items:center;flex:0 0 auto;width:40px;height:40px;margin-left:8px;border-radius:6px;font-size:var(--gemboss-fs-caption, 12px);font-weight:700;letter-spacing:.02em;color:var(--gemboss-primary-dark, var(--gemboss-primary));background:color-mix(in srgb,var(--gemboss-primary) 10%,transparent)}.gb-chat-tray-item:not(.is-card)>.gb-chat-tray-type{width:56px;height:56px;margin:0;border:1px solid var(--gemboss-divider);border-radius:8px}.gb-chat-tray-item.is-error .gb-chat-tray-type{color:var(--gemboss-danger-strong, var(--gemboss-danger));background:var(--gemboss-danger-soft, #fee9e8)}.gb-chat-tray-text{display:grid;min-width:0;line-height:1.3}.gb-chat-tray-name{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--gemboss-fs-caption, 12px);font-weight:600;color:var(--gemboss-text, #303030)}.gb-chat-tray-sub{overflow:hidden;text-overflow:ellipsis;white-space:nowrap;font-size:var(--gemboss-fs-caption, 12px);color:var(--gemboss-text-muted)}.gb-chat-tray-item.is-error .gb-chat-tray-thumb,.gb-chat-tray-item.is-error:not(.is-card)>.gb-chat-tray-type,.gb-chat-tray-item.is-error.is-card{border:2px solid var(--gemboss-danger)}.gb-chat-tray-item.is-error .gb-chat-tray-thumb img{opacity:.5}.gb-chat-tray-item.is-error .gb-chat-tray-sub{color:var(--gemboss-danger-strong, var(--gemboss-danger))}.gb-chat-tray-scrim{position:absolute;inset:0;display:grid;place-items:center;border-radius:inherit;background:#00000052;pointer-events:none}.gb-chat-tray-type .gb-chat-tray-scrim{background:transparent}.gb-chat-tray-ring{color:var(--gemboss-on-primary, #fff)}.gb-chat-tray-type .gb-chat-tray-ring{color:var(--gemboss-primary)}.gb-chat-tray-ring circle{fill:none;stroke-width:3}.gb-chat-tray-ring-track{stroke:currentColor;opacity:.3}.gb-chat-tray-ring-bar{stroke:currentColor;stroke-linecap:round;transform:rotate(-90deg);transform-origin:50% 50%;transition:stroke-dashoffset .2s linear}.gb-chat-tray-ring.is-unknown .gb-chat-tray-ring-bar{animation:gb-chat-ring-turn .9s linear infinite}@keyframes gb-chat-ring-turn{0%{transform:rotate(-90deg)}to{transform:rotate(270deg)}}.gb-chat-tray-x{position:absolute;top:0;right:0;width:24px;height:24px;padding:2px;display:flex;align-items:flex-start;justify-content:flex-end;border:0;background:transparent;cursor:pointer;color:var(--gemboss-on-primary, #fff)}.gb-chat-tray-item.is-card .gb-chat-tray-x{top:50%;right:4px;transform:translateY(-50%);align-items:center;justify-content:center;color:var(--gemboss-text-muted)}.gb-chat-tray-x-dot{display:grid;place-items:center;width:20px;height:20px;border-radius:var(--gemboss-radius-full, 999px);background:#0009;transition:background var(--gemboss-transition-fast, .12s) ease}.gb-chat-tray-item.is-card .gb-chat-tray-x-dot{background:transparent}.gb-chat-tray-x:hover .gb-chat-tray-x-dot{background:#000000c7}.gb-chat-tray-item.is-card .gb-chat-tray-x:hover .gb-chat-tray-x-dot{background:var(--gemboss-hover, rgba(0, 0, 0, .05));color:var(--gemboss-text, #303030)}.gb-chat-tray-x:focus-visible{outline:none}.gb-chat-tray-x:focus-visible .gb-chat-tray-x-dot{outline:2px solid var(--ui-focus, #5661f5);outline-offset:1px}.gb-chat-tray-line{margin:0;font-size:var(--gemboss-fs-caption, 12px);line-height:1.4;color:var(--gemboss-text-muted)}.gb-chat-tray-line:empty{position:absolute;width:1px;height:1px;overflow:hidden;clip-path:inset(50%)}.gb-chat-tray-line.is-error{color:var(--gemboss-danger-strong, var(--gemboss-danger))}.gb-chat-images{display:grid;gap:4px;width:100%}.gb-chat-images[data-layout=two]{grid-template-columns:repeat(2,minmax(0,1fr))}.gb-chat-images[data-layout=grid]{grid-template-columns:repeat(3,minmax(0,1fr))}.gb-chat-images-cell{position:relative;display:block;width:100%;padding:0;overflow:hidden;border:0;border-radius:12px;background:var(--gemboss-divider-soft, #f1f1f1);cursor:zoom-in}.gb-chat-images-cell:disabled{cursor:default}.gb-chat-images-cell:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}.gb-chat-images-cell img{display:block;width:100%;height:100%;object-fit:cover}.gb-chat-images[data-layout=one] .gb-chat-images-cell img{height:auto;max-height:220px}.gb-chat-images[data-layout=two] .gb-chat-images-cell,.gb-chat-images[data-layout=grid] .gb-chat-images-cell{aspect-ratio:1}.gb-chat-images[data-layout=grid] .gb-chat-images-cell{border-radius:8px}.gb-chat-images-more{position:absolute;inset:0;display:grid;place-items:center;font-size:var(--gemboss-fs-h2, 20px);font-weight:600;color:#fff;background:#00000080}.gb-chat-lightbox{width:100vw;height:100dvh;max-width:none;max-height:none;margin:0;padding:32px;border:0;background:transparent;display:none;place-items:center;overflow:hidden}.gb-chat-lightbox[open]{display:grid;animation:gb-chat-lightbox-in .12s ease-out}.gb-chat-lightbox::backdrop{background:#000000c7}.gb-chat-lightbox img{max-width:100%;max-height:calc(100dvh - 64px);object-fit:contain;border-radius:8px;box-shadow:0 12px 48px #00000080}.gb-chat-lightbox-close{position:absolute;top:16px;right:16px;width:44px;height:44px;padding:0;display:grid;place-items:center;border:0;border-radius:var(--gemboss-radius-full, 999px);color:#fff;background:#ffffff24;cursor:pointer}.gb-chat-lightbox-close:hover{background:#ffffff47}.gb-chat-lightbox-close:focus-visible{outline:2px solid #fff;outline-offset:2px}@keyframes gb-chat-lightbox-in{0%{opacity:0}to{opacity:1}}.gb-chat-lightbox-bar{position:absolute;left:50%;bottom:16px;transform:translate(-50%);display:flex;flex-wrap:wrap;justify-content:center;align-items:center;gap:8px 12px;width:max-content;max-width:calc(100vw - 32px);color:#fff;font-size:var(--gemboss-fs-body, 14px);text-align:center}.gb-chat-lightbox-bar a{color:#fff}.gb-chat-lightbox-bar .ui-btn{background:#fff}.gb-chat-lightbox:has(.gb-chat-lightbox-bar) img{max-height:calc(100dvh - 140px)}@media (pointer: coarse),(max-width: 47.9975em){.gb-chat-tray-thumb,.gb-chat-tray-item:not(.is-card)>.gb-chat-tray-type{width:72px;height:72px}.gb-chat-tray-item.is-card{height:72px}.gb-chat-tray-item.is-card .gb-chat-tray-thumb{height:70px}.gb-chat-tray-x{width:44px;height:44px}.gb-chat-tray-x-dot{width:24px;height:24px}.gb-chat-tray-item.is-card{padding-right:44px}.gb-chat-tray-item.is-card .gb-chat-tray-x{right:0}}@media (prefers-reduced-motion: reduce){.gb-chat-drop,.gb-chat-lightbox[open],.gb-chat-tray-ring.is-unknown .gb-chat-tray-ring-bar{animation:none}.gb-chat-tray-ring-bar{transition:none}}
@@ -0,0 +1 @@
1
+ .gemboss-ec-toolbar-lead>.ui-menu{flex:none}.gemboss-ec-toolbar-lead>.ui-menu:first-child{margin-inline-start:9px}.gemboss-ec-input .ui-menu.gemboss-ec-add>summary,.gemboss-ec-input .ui-menu.gemboss-ec-ai>summary{position:relative;box-sizing:border-box;width:28px;height:28px;min-width:28px;min-height:28px;padding:0;border:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;transition:background-color var(--gemboss-transition-fast, .12s) ease}.gemboss-ec-input .ui-menu.gemboss-ec-add>summary{background-color:var(--gemboss-surface, #fff);color:var(--gemboss-text);box-shadow:inset 0 0 0 1px var(--gemboss-divider)}.gemboss-ec-input .ui-menu.gemboss-ec-ai>summary{background-color:transparent;color:var(--gemboss-primary);box-shadow:none}.gemboss-ec-input .ui-menu.gemboss-ec-add>summary:hover:not([aria-disabled=true]),.gemboss-ec-input .ui-menu.gemboss-ec-add[open]>summary{background-color:var(--gemboss-hover, rgba(0, 0, 0, .05))}.gemboss-ec-input .ui-menu.gemboss-ec-ai>summary:hover:not([aria-disabled=true]),.gemboss-ec-input .ui-menu.gemboss-ec-ai[open]>summary{background-color:color-mix(in srgb,var(--gemboss-primary) 10%,transparent)}.gemboss-ec-input .ui-menu:is(.gemboss-ec-add,.gemboss-ec-ai)>summary:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}.gemboss-ec-input .ui-menu:is(.gemboss-ec-add,.gemboss-ec-ai)>summary[aria-disabled=true]{opacity:.5;cursor:default}.gemboss-ec-input .ui-menu:is(.gemboss-ec-add,.gemboss-ec-ai)>summary svg{width:16px;height:16px}.gemboss-ec-input .ui-menu.gemboss-ec-ai>summary .gb-engine-dot{position:absolute;top:2px;right:2px}.ui-menu.gemboss-ec-ai>.ui-menu__list{min-width:260px}.gemboss-ec-input .ui-menu.gemboss-ec-ai.is-paid>summary{width:auto;padding-inline:6px 9px;gap:4px;border-radius:999px;background-color:var(--gemboss-warning-soft, #fff8e0)}.gemboss-ec-input .ui-menu.gemboss-ec-ai.is-paid>summary:hover:not([aria-disabled=true]),.gemboss-ec-input .ui-menu.gemboss-ec-ai.is-paid[open]>summary{background-color:color-mix(in srgb,var(--gemboss-warning, #9a6700) 14%,var(--gemboss-warning-soft, #fff8e0))}.gemboss-ec-ai-paid{font-size:var(--gemboss-fs-micro, 11px);line-height:16px;font-weight:650;color:var(--gemboss-warning, #9a6700)}@media (pointer: coarse),(max-width: 47.9975em){.gemboss-ec-input .ui-menu.gemboss-ec-add>summary,.gemboss-ec-input .ui-menu.gemboss-ec-ai>summary{width:44px;height:44px;min-width:44px;min-height:44px}.gemboss-ec-input .ui-menu:is(.gemboss-ec-add,.gemboss-ec-ai)>summary svg{width:20px;height:20px}.gemboss-ec-input .ui-menu.gemboss-ec-ai.is-paid>summary{width:auto;padding-inline:10px 14px}}.gemboss-ec-addnote{flex:1 0 100%;box-sizing:border-box;margin:0;padding:0 8px;border:solid transparent;border-width:0 1px;font-size:var(--gemboss-fs-caption);line-height:1.4;color:var(--gemboss-text-muted)}.gemboss-ec-addnote-problem{color:var(--gemboss-danger-strong, #8e1f0b)}.gemboss-ec-addnote:empty{position:absolute;width:1px;height:1px;padding:0;border-width:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}
@@ -1 +1 @@
1
- .gemboss-ec-toolbar{flex:1 0 100%;display:flex;align-items:center;gap:4px;min-width:0}.gemboss-ec-toolbar-lead{flex:1 1 auto;display:flex;align-items:center;gap:4px;min-width:0}.gemboss-ec-toolbar-lead:empty{display:none}.gemboss-ec-toolbar-lead:empty+*{margin-left:auto}.gemboss-ec-toolbar-tools{display:flex;align-items:center;gap:4px;flex:none;min-width:0}.gemboss-ec-toolbar-tools:empty{display:none}.gemboss-ec-input:has(>.gemboss-ec-toolbar>.gemboss-ec-toolbar-lead:empty){flex-wrap:nowrap;align-items:flex-end}.gemboss-ec-input:has(>.gemboss-ec-toolbar>.gemboss-ec-toolbar-lead:empty)>textarea{flex:1 1 0}.gemboss-ec-input:has(>.gemboss-ec-toolbar>.gemboss-ec-toolbar-lead:empty)>.gemboss-ec-toolbar{flex:0 0 auto}@media (pointer: coarse){.gemboss-ec-input .gemboss-ec-stop{width:44px;height:44px;min-width:44px}.gemboss-ec-input .gemboss-ec-stop-send{min-height:44px}}.gemboss-ec-stop{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:44px;height:44px;min-width:44px;border:none;border-radius:50%;background:var(--gemboss-danger);color:var(--gemboss-on-primary, #fff);cursor:pointer}.gemboss-ec-stop svg{width:12px;height:12px;fill:currentColor}.gemboss-ec-stop:disabled{opacity:.6;cursor:default}.gemboss-ec-stop:hover{filter:brightness(1.08)}.gemboss-ec-stop:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}
1
+ .gemboss-ec-toolbar{flex:1 0 100%;display:flex;align-items:center;gap:4px;min-width:0}.gemboss-ec-toolbar-lead{flex:1 1 auto;display:flex;align-items:center;gap:4px;min-width:0}.gemboss-ec-toolbar-lead:empty{display:none}.gemboss-ec-toolbar-lead:empty+*{margin-left:auto}.gemboss-ec-toolbar-tools{display:flex;align-items:center;gap:4px;flex:none;min-width:0}.gemboss-ec-toolbar-tools:empty{display:none}.gemboss-ec-input:has(>.gemboss-ec-toolbar>.gemboss-ec-toolbar-lead:empty){flex-wrap:nowrap;align-items:flex-end}.gemboss-ec-input:has(>.gemboss-ec-toolbar>.gemboss-ec-toolbar-lead:empty)>textarea{flex:1 1 0}.gemboss-ec-input:has(>.gemboss-ec-toolbar>.gemboss-ec-toolbar-lead:empty)>.gemboss-ec-toolbar{flex:0 0 auto}@media (pointer: coarse),(max-width: 47.9975em){.gemboss-ec-input .gemboss-ec-stop{width:44px;height:44px;min-width:44px}.gemboss-ec-input .gemboss-ec-stop svg{width:12px;height:12px}.gemboss-ec-input .gemboss-ec-stop-send{min-height:44px}}.gemboss-ec-stop{flex:0 0 auto;display:inline-flex;align-items:center;justify-content:center;width:28px;height:28px;min-width:28px;border:none;border-radius:50%;background:var(--gemboss-danger);color:var(--gemboss-on-primary, #fff);cursor:pointer}.gemboss-ec-stop svg{width:10px;height:10px;fill:currentColor}.gemboss-ec-stop:disabled{opacity:.6;cursor:default}.gemboss-ec-stop:hover{filter:brightness(1.08)}.gemboss-ec-stop:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}@media (pointer: coarse),(max-width: 47.9975em){.gemboss-ec-input textarea{font-size:16px}}.gemboss-ec-input.gemboss-ec-input--flush{margin:0}
package/src/chat-plain.js CHANGED
@@ -1,4 +1,4 @@
1
- (function(M){"use strict";var N=M.gembossUI;if(!N){M.console&&M.console.error("@gemboss/ui chat-plain.js: load kit-plain.js first (it defines gembossUI)");return}if(N.chat)return;var b={thread:"Conversation",message:"Message",send:"Send",stop:"Stop",attach:"Attach a file",copy:"Copy",copied:"Copied",copyCommand:"Copy command",originalError:"Original error",stopped:"Stopped",steps:"What it is doing",thought:"Thought",thinking:"Thinking",working:"Working",showLess:"Show less",showAll:"Show all {n} lines",openImage:"Open image"},S="http://www.w3.org/2000/svg",A=function(e){return typeof Node<"u"&&e instanceof Node};function l(e,n,r){var t=document.createElement(e);if(n)for(var a in n){var i=n[a];i==null||i===!1||(a==="text"?t.textContent=String(i):a==="className"?t.className=i:t.setAttribute(a,i===!0?"":String(i)))}return q(t,r),t}function q(e,n){return n==null||n===!1?e:Array.isArray(n)?(n.forEach(function(r){q(e,r)}),e):(e.appendChild(A(n)?n:document.createTextNode(String(n))),e)}function D(e,n,r){var t=document.createElementNS(S,"svg");if(t.setAttribute("viewBox",e),t.setAttribute("aria-hidden","true"),t.setAttribute("focusable","false"),n.forEach(function(i){var s=document.createElementNS(S,i.tag||"path");for(var o in i)o!=="tag"&&s.setAttribute(o,i[o]);t.appendChild(s)}),r)for(var a in r)t.setAttribute(a,r[a]);return t}var ie={check:'<path d="M4 10.5 8 14.5 16 5.5"/>',close:'<path d="M5 5l10 10M15 5 5 15"/>',dot:'<circle cx="10" cy="10" r="2.6" fill="currentColor"/>',chevronRight:'<path d="M7.5 4.5 13 10l-5.5 5.5"/>',sparkle:'<path d="M9 3.5c.4 2.9 1.6 4.1 4.5 4.5-2.9.4-4.1 1.6-4.5 4.5-.4-2.9-1.6-4.1-4.5-4.5 2.9-.4 4.1-1.6 4.5-4.5z"/><path d="M14.5 12.5c.2 1.3.7 1.8 2 2-1.3.2-1.8.7-2 2-.2-1.3-.7-1.8-2-2 1.3-.2 1.8-.7 2-2z"/>'};function C(e,n){var r=l("span",{className:"gemboss-narr-dot","aria-hidden":"true"});return r.innerHTML='<svg viewBox="0 0 20 20" width="12" height="12" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">'+ie[e==="thinking"?"sparkle":e==="steer"?"chevronRight":n==="failed"?"close":n==="ok"?e==="trace"?"dot":"check":"dot"]+"</g></svg>",r}var le=[{host:"admin.gemboss.ai",path:"/api/gemboss/market-image/"},{host:"gemmedia-api-production.up.railway.app",path:"/"},{host:"media.gemboss.ai",path:"/v1/theme-media/assets/"},{host:"gemmedia.ops.gemboss.ai",path:"/v1/theme-media/assets/"},{host:"gemmedia.gemboss.ai",path:"/v1/theme-media/assets/"},{host:"cdn.shopify.com",path:"/"}],H=/[\u0000-\u001f\u007f]/g;function T(e){var n=String(e).replace(H,"").trim();return n?n.charAt(0)==="/"?n.charAt(1)==="/"||n.charAt(1)==="\\"?null:{href:n,internal:!0}:/^(https?:\/\/|mailto:)/i.test(n)?{href:n,internal:!1}:null:null}var j="https://same-origin.invalid",se=/^\/[^/]+(\/[^/]+)*\/$/;function P(e,n){var r=String(e).replace(H,"").trim(),t;if(r.charAt(0)==="/"){var a=(n||[]).filter(function(i){return!i.host&&se.test(i.path)});if(!a.length||r.charAt(1)==="/"||r.indexOf("\\")>=0||/%(2f|5c|25)|;/i.test(r))return null;try{t=new URL(r,j)}catch{return null}return t.origin!==j||/\.\.|%2e/i.test(t.pathname)?null:a.some(function(i){return t.pathname.indexOf(i.path)===0})?t.href.slice(j.length):null}try{t=new URL(r)}catch{return null}return t.protocol!=="https:"||t.username||t.password||t.port?null:le.concat(n||[]).some(function(i){return i.host===t.hostname&&t.pathname.indexOf(i.path)===0})?t.href:null}var O=function(e,n){return e.split(n).length-1};function F(e,n){var r=e.length,t,a,i,s,o=O(e,"("),d=O(e,")"),f=O(e,"["),c=O(e,"]");for(n=n!==!1;n&&r>0;)t=e.charAt(r-1),/[.,:;!?_~'"]/.test(t)?r-=1:t===")"&&o<d?(r-=1,d-=1):t==="]"&&f<c?(r-=1,c-=1):n=!1;if(s=e.slice(0,r),a=T(s),!a||a.internal)return null;try{i=new URL(a.href)}catch{return null}return!/^https?:$/.test(i.protocol)||!i.hostname?null:{href:a.href,rest:e.slice(r)}}var oe=/(`([^`]+)`)|(\*\*([^*]+)\*\*)|(\*([^*\n]+)\*)|(!\[([^\]]*)\]\(([^)\s]+)\))|(\[([^\]]+)\]\(([^)\s]+)\))|(<(https?:\/\/[^\s<>]+)>)|(https?:\/\/[^\s<>`"*\u2000-\u206f\u3000-\u9fff\uff00-\uffef]+)/gi;function $(e,n){n=n||{};for(var r=[],t=function(m){if(m){var v=r[r.length-1];v&&v.t==="text"?v.text+=m:r.push({t:"text",text:m})}},a=new RegExp(oe.source,"gi"),i=0,s;(s=a.exec(e))!==null;){if(t(e.slice(i,s.index)),s[2]!=null)r.push({t:"code",text:s[2]});else if(s[4]!=null)r.push({t:"bold",text:s[4]});else if(s[6]!=null)r.push({t:"italic",text:s[6]});else if(s[7]!=null){var o=P(s[9],n.imageHosts),d=s[8].trim();if(o)r.push({t:"image",alt:d,src:o});else{var f=T(s[9]);f&&!f.internal?r.push({t:"link",label:d||"image",href:f.href,internal:!1}):t(d)}}else if(s[10]!=null){var c=s[12],p=n.ownLink&&n.ownLink(c)?{href:c,internal:!0,own:!0}:T(c);p?r.push({t:"link",label:s[11],href:p.href,internal:p.internal}):t(s[11])}else{var h=s[15]!=null&&s.index>0&&/[a-z\d]/i.test(e.charAt(s.index-1)),g=h?null:s[14]!=null?F(s[14],!1):F(s[15]);g?(r.push({t:"link",label:g.href,href:g.href,internal:!1}),t(g.rest)):t(s[0])}i=s.index+s[0].length}return t(e.slice(i)),r}var z=function(e){return/^\s*\|.*\|\s*$/.test(e)},ue=function(e){return/^\s*\|?[\s:-]*-[-\s:|]*\|?\s*$/.test(e)&&e.indexOf("-")>=0},U=function(e){return e.trim().replace(/^\||\|$/g,"").split("|").map(function(n){return n.trim()})};function K(e){for(var n=String(e??"").split(`
1
+ (function(M){"use strict";var N=M.gembossUI;if(!N){M.console&&M.console.error("@gemboss/ui chat-plain.js: load kit-plain.js first (it defines gembossUI)");return}if(N.chat)return;var b={thread:"Conversation",message:"Message",send:"Send",stop:"Stop",attach:"Attach a file",copy:"Copy",copied:"Copied",copyCommand:"Copy command",originalError:"Original error",stopped:"Stopped",steps:"What it is doing",thought:"Thought",thinking:"Thinking",working:"Working",showLess:"Show less",showAll:"Show all {n} lines",openImage:"Open image"},S="http://www.w3.org/2000/svg",A=function(e){return typeof Node<"u"&&e instanceof Node};function l(e,n,r){var t=document.createElement(e);if(n)for(var a in n){var i=n[a];i==null||i===!1||(a==="text"?t.textContent=String(i):a==="className"?t.className=i:a==="style"?t.style.cssText=String(i):t.setAttribute(a,i===!0?"":String(i)))}return q(t,r),t}function q(e,n){return n==null||n===!1?e:Array.isArray(n)?(n.forEach(function(r){q(e,r)}),e):(e.appendChild(A(n)?n:document.createTextNode(String(n))),e)}function D(e,n,r){var t=document.createElementNS(S,"svg");if(t.setAttribute("viewBox",e),t.setAttribute("aria-hidden","true"),t.setAttribute("focusable","false"),n.forEach(function(i){var s=document.createElementNS(S,i.tag||"path");for(var o in i)o!=="tag"&&s.setAttribute(o,i[o]);t.appendChild(s)}),r)for(var a in r)t.setAttribute(a,r[a]);return t}var ie={check:'<path d="M4 10.5 8 14.5 16 5.5"/>',close:'<path d="M5 5l10 10M15 5 5 15"/>',dot:'<circle cx="10" cy="10" r="2.6" fill="currentColor"/>',chevronRight:'<path d="M7.5 4.5 13 10l-5.5 5.5"/>',sparkle:'<path d="M9 3.5c.4 2.9 1.6 4.1 4.5 4.5-2.9.4-4.1 1.6-4.5 4.5-.4-2.9-1.6-4.1-4.5-4.5 2.9-.4 4.1-1.6 4.5-4.5z"/><path d="M14.5 12.5c.2 1.3.7 1.8 2 2-1.3.2-1.8.7-2 2-.2-1.3-.7-1.8-2-2 1.3-.2 1.8-.7 2-2z"/>'};function C(e,n){var r=l("span",{className:"gemboss-narr-dot","aria-hidden":"true"});return r.innerHTML='<svg viewBox="0 0 20 20" width="12" height="12" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">'+ie[e==="thinking"?"sparkle":e==="steer"?"chevronRight":n==="failed"?"close":n==="ok"?e==="trace"?"dot":"check":"dot"]+"</g></svg>",r}var le=[{host:"admin.gemboss.ai",path:"/api/gemboss/market-image/"},{host:"gemmedia-api-production.up.railway.app",path:"/"},{host:"media.gemboss.ai",path:"/v1/theme-media/assets/"},{host:"gemmedia.ops.gemboss.ai",path:"/v1/theme-media/assets/"},{host:"gemmedia.gemboss.ai",path:"/v1/theme-media/assets/"},{host:"cdn.shopify.com",path:"/"}],H=/[\u0000-\u001f\u007f]/g;function T(e){var n=String(e).replace(H,"").trim();return n?n.charAt(0)==="/"?n.charAt(1)==="/"||n.charAt(1)==="\\"?null:{href:n,internal:!0}:/^(https?:\/\/|mailto:)/i.test(n)?{href:n,internal:!1}:null:null}var j="https://same-origin.invalid",se=/^\/[^/]+(\/[^/]+)*\/$/;function P(e,n){var r=String(e).replace(H,"").trim(),t;if(r.charAt(0)==="/"){var a=(n||[]).filter(function(i){return!i.host&&se.test(i.path)});if(!a.length||r.charAt(1)==="/"||r.indexOf("\\")>=0||/%(2f|5c|25)|;/i.test(r))return null;try{t=new URL(r,j)}catch{return null}return t.origin!==j||/\.\.|%2e/i.test(t.pathname)?null:a.some(function(i){return t.pathname.indexOf(i.path)===0})?t.href.slice(j.length):null}try{t=new URL(r)}catch{return null}return t.protocol!=="https:"||t.username||t.password||t.port?null:le.concat(n||[]).some(function(i){return i.host===t.hostname&&t.pathname.indexOf(i.path)===0})?t.href:null}var O=function(e,n){return e.split(n).length-1};function F(e,n){var r=e.length,t,a,i,s,o=O(e,"("),d=O(e,")"),f=O(e,"["),c=O(e,"]");for(n=n!==!1;n&&r>0;)t=e.charAt(r-1),/[.,:;!?_~'"]/.test(t)?r-=1:t===")"&&o<d?(r-=1,d-=1):t==="]"&&f<c?(r-=1,c-=1):n=!1;if(s=e.slice(0,r),a=T(s),!a||a.internal)return null;try{i=new URL(a.href)}catch{return null}return!/^https?:$/.test(i.protocol)||!i.hostname?null:{href:a.href,rest:e.slice(r)}}var oe=/(`([^`]+)`)|(\*\*([^*]+)\*\*)|(\*([^*\n]+)\*)|(!\[([^\]]*)\]\(([^)\s]+)\))|(\[([^\]]+)\]\(([^)\s]+)\))|(<(https?:\/\/[^\s<>]+)>)|(https?:\/\/[^\s<>`"*\u2000-\u206f\u3000-\u9fff\uff00-\uffef]+)/gi;function $(e,n){n=n||{};for(var r=[],t=function(m){if(m){var v=r[r.length-1];v&&v.t==="text"?v.text+=m:r.push({t:"text",text:m})}},a=new RegExp(oe.source,"gi"),i=0,s;(s=a.exec(e))!==null;){if(t(e.slice(i,s.index)),s[2]!=null)r.push({t:"code",text:s[2]});else if(s[4]!=null)r.push({t:"bold",text:s[4]});else if(s[6]!=null)r.push({t:"italic",text:s[6]});else if(s[7]!=null){var o=P(s[9],n.imageHosts),d=s[8].trim();if(o)r.push({t:"image",alt:d,src:o});else{var f=T(s[9]);f&&!f.internal?r.push({t:"link",label:d||"image",href:f.href,internal:!1}):t(d)}}else if(s[10]!=null){var c=s[12],p=n.ownLink&&n.ownLink(c)?{href:c,internal:!0,own:!0}:T(c);p?r.push({t:"link",label:s[11],href:p.href,internal:p.internal}):t(s[11])}else{var h=s[15]!=null&&s.index>0&&/[a-z\d]/i.test(e.charAt(s.index-1)),g=h?null:s[14]!=null?F(s[14],!1):F(s[15]);g?(r.push({t:"link",label:g.href,href:g.href,internal:!1}),t(g.rest)):t(s[0])}i=s.index+s[0].length}return t(e.slice(i)),r}var z=function(e){return/^\s*\|.*\|\s*$/.test(e)},ue=function(e){return/^\s*\|?[\s:-]*-[-\s:|]*\|?\s*$/.test(e)&&e.indexOf("-")>=0},U=function(e){return e.trim().replace(/^\||\|$/g,"").split("|").map(function(n){return n.trim()})};function K(e){for(var n=String(e??"").split(`
2
2
  `),r=[],t=0,a=[],i=function(){a.length&&r.push({t:"para",lines:a.slice()}),a.length=0};t<n.length;){var s=n[t],o;if(o=/^\s*```([\w#+.-]*)\s*$/.exec(s)){i();var d=[];for(t+=1;t<n.length&&!/^\s*```\s*$/.test(n[t]);)d.push(n[t]),t+=1;t+=1,r.push({t:"code",lang:o[1]||"",body:d.join(`
3
3
  `)});continue}if(o=/^(#{1,6})\s+(.*)$/.exec(s)){i(),o[2].trim()&&r.push({t:"heading",level:Math.min(o[1].length,3),text:o[2].trim()}),t+=1;continue}if(/^\s*(---|\*\*\*|___)\s*$/.test(s)){i(),r.push({t:"rule"}),t+=1;continue}if(z(s)&&t+1<n.length&&ue(n[t+1])){i();var f=U(s),c=[];for(t+=2;t<n.length&&z(n[t]);)c.push(U(n[t])),t+=1;r.push({t:"table",head:f,rows:c});continue}if(o=/^\s*([-*+]|\d+[.)])\s+(.*)$/.exec(s)){i();for(var p=/\d/.test(o[1]),h=p?parseInt(o[1],10):void 0,g=[];t<n.length;){var m=/^\s*([-*+]|\d+[.)])\s+(.*)$/.exec(n[t]);if(!m||/\d/.test(m[1])!==p)break;g.push(m[2]),t+=1}var v={t:"list",ordered:p,items:g};h!==void 0&&h!==1&&(v.start=h),r.push(v);continue}if(/^\s*>\s?/.test(s)){i();for(var y=[];t<n.length&&/^\s*>\s?/.test(n[t]);)y.push(n[t].replace(/^\s*>\s?/,"")),t+=1;r.push({t:"quote",lines:y});continue}if(s.trim()===""){i(),t+=1;continue}a.push(s),t+=1}return i(),r}var I=12;function x(e,n,r){return $(e,n).map(function(t){if(t.t==="text")return document.createTextNode(t.text);if(t.t==="code")return l("code",{className:"gemboss-md-code",text:t.text});if(t.t==="bold")return l("strong",0,x(t.text,n,r));if(t.t==="italic")return l("em",0,x(t.text,n,r));if(t.t==="link"){if(n.ownLink&&n.ownLink(t.href)&&n.renderLink)return n.renderLink(t.href,t.label)||document.createTextNode(t.label);var a=l("a",{className:"gemboss-ec-md-link",href:t.href,target:t.internal?null:"_blank",rel:t.internal?null:"noopener noreferrer",text:t.label});return t.internal&&n.onNavigate&&a.addEventListener("click",function(i){i.metaKey||i.ctrlKey||i.shiftKey||(i.preventDefault(),n.onNavigate(t.href))}),a}return l("a",{className:"gemboss-md-imglink",href:t.src,target:"_blank",rel:"noopener noreferrer","aria-label":t.alt?null:r.openImage},l("img",{className:"gemboss-md-img",src:t.src,alt:t.alt,loading:"lazy",referrerpolicy:"no-referrer"}))})}function G(e,n,r){var t=[];return e.forEach(function(a,i){t=t.concat(x(a,n,r)),i<e.length-1&&t.push(l("br"))}),t}function ce(e,n){var r=e.body.split(`
4
4
  `),t=r.length>I,a=!1,i=l("code",{text:t?r.slice(0,I).join(`
@@ -1 +1 @@
1
- .gemboss-ec-input .gemboss-ec-mic{flex:0 0 auto;position:relative;width:44px;height:44px;min-width:44px;padding:0;border:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background-color:transparent;color:var(--gemboss-text-muted);cursor:pointer}.gemboss-ec-input .gemboss-ec-mic svg{width:22px;height:22px}.gemboss-ec-input .gemboss-ec-mic:hover:not(:disabled){background-color:var(--gemboss-hover);color:var(--gemboss-text)}.gemboss-ec-input .gemboss-ec-mic:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}.gemboss-ec-input .gemboss-ec-mic:disabled{opacity:.5;cursor:default}.gemboss-ec-input .gemboss-ec-mic[aria-pressed=true],.gemboss-ec-input .gemboss-ec-mic[aria-pressed=true]:hover:not(:disabled){background-color:var(--gemboss-danger-soft);color:var(--gemboss-danger-strong)}.gemboss-ec-input .gemboss-ec-mic[aria-pressed=true]:after{content:"";position:absolute;inset:0;border-radius:50%;border:2px solid var(--gemboss-danger-strong);pointer-events:none;animation:gemboss-ec-mic-ring 1.6s ease-out infinite}@keyframes gemboss-ec-mic-ring{0%{opacity:1;transform:scale(1)}to{opacity:.25;transform:scale(1.12)}}@media (prefers-reduced-motion: reduce){.gemboss-ec-input .gemboss-ec-mic[aria-pressed=true]:after{animation:none}}@media (pointer: coarse){.gemboss-ec-input .gemboss-ec-mic{width:44px;height:44px;min-width:44px}}.gemboss-ec-voice{flex:1 0 100%;box-sizing:border-box;margin:0;padding:0 8px;border:solid transparent;border-width:0 1px;font-size:var(--gemboss-fs-caption);line-height:1.4;color:var(--gemboss-text-muted)}.gemboss-ec-voice:empty{position:absolute;width:1px;height:1px;padding:0;border-width:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.gemboss-ec-input:has(>.gemboss-ec-voice:not(:empty)):has(>.gemboss-ec-toolbar>.gemboss-ec-toolbar-lead:empty){flex-wrap:wrap}.gemboss-ec-voice-on{font-weight:600;color:var(--gemboss-danger-strong)}.gemboss-ec-voice-on:before{content:"";display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;vertical-align:1px;background-color:currentColor}.gemboss-ec-voice-problem{color:var(--gemboss-text)}
1
+ .gemboss-ec-input .gemboss-ec-mic{flex:0 0 auto;position:relative;width:28px;height:28px;min-width:28px;padding:0;border:0;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;background-color:transparent;color:var(--gemboss-text-muted);cursor:pointer}.gemboss-ec-input .gemboss-ec-mic svg{width:16px;height:16px}.gemboss-ec-input .gemboss-ec-mic:hover:not(:disabled){background-color:var(--gemboss-hover);color:var(--gemboss-text)}.gemboss-ec-input .gemboss-ec-mic:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}.gemboss-ec-input .gemboss-ec-mic:disabled{opacity:.5;cursor:default}.gemboss-ec-input .gemboss-ec-mic[aria-pressed=true],.gemboss-ec-input .gemboss-ec-mic[aria-pressed=true]:hover:not(:disabled){background-color:var(--gemboss-danger-soft);color:var(--gemboss-danger-strong)}.gemboss-ec-input .gemboss-ec-mic[aria-pressed=true]:after{content:"";position:absolute;inset:0;border-radius:50%;border:2px solid var(--gemboss-danger-strong);pointer-events:none;animation:gemboss-ec-mic-ring 1.6s ease-out infinite}@keyframes gemboss-ec-mic-ring{0%{opacity:1;transform:scale(1)}to{opacity:.25;transform:scale(1.12)}}@media (prefers-reduced-motion: reduce){.gemboss-ec-input .gemboss-ec-mic[aria-pressed=true]:after{animation:none}}@media (pointer: coarse),(max-width: 47.9975em){.gemboss-ec-input .gemboss-ec-mic{width:44px;height:44px;min-width:44px}.gemboss-ec-input .gemboss-ec-mic svg{width:20px;height:20px}}.gemboss-ec-voice{flex:1 0 100%;box-sizing:border-box;margin:0;padding:0 8px;border:solid transparent;border-width:0 1px;font-size:var(--gemboss-fs-caption);line-height:1.4;color:var(--gemboss-text-muted)}.gemboss-ec-voice:empty{position:absolute;width:1px;height:1px;padding:0;border-width:0;overflow:hidden;clip-path:inset(50%);white-space:nowrap}.gemboss-ec-input:has(>.gemboss-ec-voice:not(:empty)):has(>.gemboss-ec-toolbar>.gemboss-ec-toolbar-lead:empty){flex-wrap:wrap}.gemboss-ec-voice-on{font-weight:600;color:var(--gemboss-danger-strong)}.gemboss-ec-voice-on:before{content:"";display:inline-block;width:8px;height:8px;margin-right:6px;border-radius:50%;vertical-align:1px;background-color:currentColor}.gemboss-ec-voice-problem{color:var(--gemboss-text)}
package/src/chat.css CHANGED
@@ -1 +1 @@
1
- .gemboss-ec{--gemboss-ec-inset: 16px}@media (max-width: 640px){.gemboss-ec{--gemboss-ec-inset: 12px}}.gemboss-ec-head{padding:16px var(--gemboss-ec-inset, 16px);border-bottom:1px solid var(--gemboss-divider);display:flex;flex-direction:column;gap:2px}.gemboss-ec-title{font-family:var(--gemboss-serif);font-size:15px;font-weight:600}.gemboss-ec-sub{font-size:12px;color:var(--gemboss-text-muted)}.gemboss-ec-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--gemboss-ec-inset, 16px);display:flex;flex-direction:column;gap:16px;scrollbar-gutter:stable}.gemboss-ec-scroll{scrollbar-width:thin;scrollbar-color:rgba(31,30,29,.22) transparent}.gemboss-ec-scroll::-webkit-scrollbar{width:9px}.gemboss-ec-scroll::-webkit-scrollbar-track{background:transparent}.gemboss-ec-scroll::-webkit-scrollbar-thumb{background:#1f1e1d33;border-radius:6px;border:2px solid transparent;background-clip:content-box}.gemboss-ec-msg{display:flex;flex-direction:column;gap:8px;max-width:100%}.gemboss-ec-msg.user{align-items:flex-end}.gemboss-ec-msg.assistant{align-items:flex-start}.gemboss-ec-bubble{font-size:var(--gemboss-fs-body);line-height:1.5;padding:12px;border-radius:16px;max-width:min(90%,68ch);white-space:pre-wrap;word-break:break-word}.gemboss-ec-msg.user .gemboss-ec-bubble{background:var(--gemboss-primary);color:var(--gemboss-on-primary, #fff);border-bottom-right-radius:4px}.gemboss-ec-msg.assistant .gemboss-ec-bubble{background:var(--gemboss-surface);color:var(--gemboss-text);border:1px solid var(--gemboss-divider);border-bottom-left-radius:4px}.gemboss-ec-msg.user .gemboss-ec-bubble,:root[data-theme=dark] .gemboss-ec-msg.assistant .gemboss-ec-bubble{--gemboss-ec-md-ink: color-mix(in srgb, currentColor 78%, transparent);--gemboss-ec-md-line: color-mix(in srgb, currentColor 32%, transparent);--gemboss-ec-md-fill: color-mix(in srgb, currentColor 14%, transparent)}:is(.gemboss-ec-msg.user,:root[data-theme=dark] .gemboss-ec-msg.assistant) .gemboss-ec-bubble :is(.gemboss-md-h3,.gemboss-md-quote){color:var(--gemboss-ec-md-ink)}:is(.gemboss-ec-msg.user,:root[data-theme=dark] .gemboss-ec-msg.assistant) .gemboss-ec-bubble :is(.gemboss-md-quote,.gemboss-md-rule,.gemboss-md-table th,.gemboss-md-table td,.gemboss-md-codeblock,.gemboss-md-img){border-color:var(--gemboss-ec-md-line)}:is(.gemboss-ec-msg.user,:root[data-theme=dark] .gemboss-ec-msg.assistant) .gemboss-ec-bubble :is(.gemboss-md-code,.gemboss-md-table th,.gemboss-md-codeblock,.gemboss-md-img){background:var(--gemboss-ec-md-fill)}.gemboss-ec-toolbar>button[type=submit] svg{width:18px;height:18px;fill:currentColor}.gemboss-ec-pending{display:inline-flex;align-items:center;gap:8px;padding:6px 2px;font-size:var(--gemboss-fs-caption);color:var(--gemboss-text-muted)}.gemboss-ec-pending-star{color:var(--gemboss-primary);font-size:12px;line-height:1;animation:gemboss-star-pulse 1.1s ease-in-out infinite}.gemboss-ec-pending-verb{color:var(--gemboss-text);animation:gemboss-verb-in .4s ease-out}.gemboss-ec-pending-meta{font-variant-numeric:tabular-nums;opacity:.7;font-size:var(--gemboss-fs-caption)}@keyframes gemboss-star-pulse{0%,to{transform:scale(.85);opacity:.55}50%{transform:scale(1.15);opacity:1}}@keyframes gemboss-verb-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:none}}.gemboss-ec-cursor{display:inline-block;width:2px;height:1.05em;margin-left:2px;vertical-align:-2px;background:var(--gemboss-primary);border-radius:2px;animation:gemboss-cursor-blink 1s steps(1) infinite}@keyframes gemboss-cursor-blink{0%,45%{opacity:1}50%,95%{opacity:.15}to{opacity:1}}@media (prefers-reduced-motion: reduce){.gemboss-ec-pending-star,.gemboss-ec-cursor{animation:none}}.gemboss-ec-md-link{color:var(--gemboss-primary-dark);font-weight:600;text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--gemboss-primary) 35%,transparent);cursor:pointer}.gemboss-ec-md-link:hover{border-bottom-color:var(--gemboss-primary)}strong>.gemboss-ec-md-link{font-weight:inherit}.gemboss-ec-md-link:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px;border-radius:2px}.gemboss-ec-msg.user .gemboss-ec-md-link{color:inherit;border-bottom-color:color-mix(in srgb,currentColor 55%,transparent)}.gemboss-ec-msg.user .gemboss-ec-md-link:hover{border-bottom-color:currentColor}.gemboss-ec-starters{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.gemboss-ec-starter{text-align:left;font-size:13px;padding:6px 12px;border-radius:var(--gemboss-radius-full);cursor:pointer;background:var(--gemboss-surface);border:1px solid var(--gemboss-divider);color:var(--gemboss-text);white-space:nowrap;max-width:100%}.gemboss-ec-starter:hover{border-color:var(--gemboss-primary);background:#5661f50f}.gemboss-ec-input{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin:12px;padding:8px;border:1px solid var(--gemboss-divider);border-radius:16px;background:var(--gemboss-surface);transition:border-color var(--gemboss-transition-fast) ease,box-shadow var(--gemboss-transition-fast) ease}.gemboss-ec-input:focus-within{border-color:var(--gemboss-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--ui-focus, #5661f5) 12%,transparent)}.gemboss-ec-input textarea{flex:1 0 100%;min-width:0;width:100%;box-sizing:border-box;resize:none;border-radius:0;background:transparent;border:1px solid transparent;padding:6px 8px;font-size:var(--gemboss-fs-body);font-family:inherit;min-height:0;max-height:84px;line-height:1.5;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(31,30,29,.22) transparent}.gemboss-ec-input textarea::-webkit-scrollbar{width:7px}.gemboss-ec-input textarea::-webkit-scrollbar-track{background:transparent}.gemboss-ec-input textarea::-webkit-scrollbar-thumb{background:#1f1e1d33;border-radius:4px;border:2px solid transparent;background-clip:content-box}.gemboss-ec-input textarea:focus{outline:none}.gemboss-ec-toolbar>button[type=submit]{flex:0 0 auto;width:44px;height:44px;min-width:44px;min-height:44px;border-radius:50%;border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;background:var(--gemboss-primary);color:var(--gemboss-on-primary, #fff);font-size:16px;font-weight:700;transition:background var(--gemboss-transition-fast) ease,filter var(--gemboss-transition-fast) ease}.gemboss-ec-toolbar>button[type=submit]:hover:not(:disabled){background:var(--gemboss-primary-dark)}.gemboss-ec-toolbar>button[type=submit]:active:not(:disabled){background:var(--gemboss-primary-dark);filter:brightness(.94)}.gemboss-ec-toolbar>button[type=submit]:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}.gemboss-ec-toolbar>button[type=submit]:disabled{background:var(--gemboss-divider);color:var(--gemboss-text-muted);opacity:1;cursor:default}.gemboss-narr{list-style:none;margin:0;padding:8px 0 0;display:flex;flex-direction:column;gap:8px}.gemboss-narr-row{display:flex;align-items:center;gap:8px;font-size:var(--gemboss-fs-caption);color:var(--gemboss-text-muted)}.gemboss-narr-dot{width:16px;height:16px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:10px;flex:0 0 auto}.gemboss-narr-row.ok .gemboss-narr-dot{background:var(--gemboss-active-bg);color:var(--gemboss-active-fg)}.gemboss-narr-row.failed .gemboss-narr-dot{background:#fde8e6;color:var(--gemboss-danger)}.gemboss-narr-row.running .gemboss-narr-dot{background:transparent}.gemboss-narr-dot-engine{background:transparent!important;color:inherit}.gemboss-narr-row.ok .gemboss-narr-dot-engine{color:var(--gemboss-text)}.gemboss-narr-row.failed .gemboss-narr-dot-engine{color:var(--gemboss-danger)}.gemboss-narr-row.ok .gemboss-narr-text,.gemboss-narr-row.failed .gemboss-narr-text{color:var(--gemboss-text)}.gemboss-narr-row.steer .gemboss-narr-dot{background:transparent;color:var(--gemboss-text-muted)}.gemboss-narr-steer{color:var(--gemboss-text);font-weight:500;overflow-wrap:anywhere}.gemboss-narr-spin{width:11px;height:11px;border:2px solid var(--gemboss-divider-soft);border-top-color:var(--gemboss-primary);border-radius:50%;animation:gemboss-spin .7s linear infinite}@keyframes gemboss-spin{to{transform:rotate(360deg)}}.gemboss-narr-row.thinking{align-items:flex-start}.gemboss-narr-row.thinking .gemboss-narr-dot{color:var(--gemboss-text-muted);background:transparent}.gemboss-narr-thinking-live{font-style:italic;color:var(--gemboss-text-muted);white-space:pre-wrap;opacity:.9;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.gemboss-narr-thinking{font-size:var(--gemboss-fs-caption)}.gemboss-narr-thinking>summary{cursor:pointer;color:var(--gemboss-text-muted);list-style:none;user-select:none}.gemboss-narr-thinking>summary::-webkit-details-marker{display:none}.gemboss-narr-thinking>summary:before{content:"\25b8 "}.gemboss-narr-thinking[open]>summary:before{content:"\25be "}.gemboss-narr-thinking-body{margin-top:6px;padding:8px;border-left:2px solid var(--gemboss-divider-soft);color:var(--gemboss-text-muted);font-style:italic;white-space:pre-wrap;line-height:1.5}.gemboss-narr-row.trace code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:var(--gemboss-fs-caption);word-break:break-word}.gemboss-narr-trace-call{color:var(--gemboss-text-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.gemboss-narr-trace{font-size:var(--gemboss-fs-caption);min-width:0}.gemboss-narr-trace>summary{cursor:pointer;color:var(--gemboss-text-muted);list-style:none;user-select:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.gemboss-narr-trace[open]>summary{display:block;overflow:visible}.gemboss-narr-trace>summary::-webkit-details-marker{display:none}.gemboss-narr-trace>summary,.gemboss-narr-thinking>summary{min-height:24px;box-sizing:border-box;padding-block:2px}.gemboss-narr-trace>summary:before{content:"\25b8 "}.gemboss-narr-trace[open]>summary:before{content:"\25be "}.gemboss-narr-trace-body{margin-top:6px;padding:8px;border-left:2px solid var(--gemboss-divider-soft);color:var(--gemboss-text-muted);white-space:pre-wrap;line-height:1.5;overflow-x:auto}@media (max-width: 640px){.gemboss-ec-input textarea{min-height:0}.gemboss-ec-scroll{padding:var(--gemboss-ec-inset, 12px)}}.gemboss-ec-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.gemboss-ec-chip{background:var(--gemboss-surface);border:1px solid var(--gemboss-divider);border-radius:var(--gemboss-radius-full);padding:8px 16px;font-size:13px;cursor:pointer;color:var(--gemboss-text);min-height:44px}.gemboss-ec-chip:hover{border-color:var(--gemboss-primary);color:var(--gemboss-active-fg)}.gemboss-ec-chip:disabled{opacity:.5;cursor:default}@media (pointer: fine){.gemboss-ec-starters{row-gap:16px}.gemboss-ec-tab,.gemboss-ec-starter,.gemboss-ec-upload,.gemboss-ec-workmode,.gemboss-ec-input .gemboss-ec-attach-btn,.gemboss-ec-stop,.gemboss-ec-stop-send,.gemboss-ec-toolbar>button[type=submit]{position:relative}.gemboss-ec-tab:after,.gemboss-ec-starter:after,.gemboss-ec-upload:after,.gemboss-ec-workmode:before,.gemboss-ec-input .gemboss-ec-attach-btn:after,.gemboss-ec-stop:after,.gemboss-ec-stop-send:after,.gemboss-ec-toolbar>button[type=submit]:after{content:"";position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);height:44px;pointer-events:auto;z-index:1}}@media (pointer: coarse){.gemboss-ec-toolbar>button[type=submit]{width:44px;height:44px;font-size:17px}.gemboss-ec-starter,.gemboss-ec-opt,.gemboss-ec-input textarea{min-height:44px}}.gemboss-md-p{margin:0 0 8px}.gemboss-md-p:last-child{margin-bottom:0}.gemboss-md-h{margin:16px 0 6px;font-weight:650;line-height:1.3}.gemboss-md-h:first-child{margin-top:0}.gemboss-md-h1{font-size:17px}.gemboss-md-h2{font-size:15px}.gemboss-md-h3{font-size:var(--gemboss-fs-body);color:var(--gemboss-text-muted)}.gemboss-md-list{margin:0 0 8px;padding-left:20px}.gemboss-md-list li{margin:2px 0}.gemboss-md-quote{margin:0 0 8px;padding:2px 0 2px 12px;border-left:3px solid var(--gemboss-divider);color:var(--gemboss-text-muted)}.gemboss-md-rule{margin:12px 0;border:0;border-top:1px solid var(--gemboss-divider)}.gemboss-md-code{padding:1px 6px;border-radius:6px;background:var(--gemboss-primary-soft);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em;word-break:break-word}.gemboss-md-tablewrap{margin:0 0 12px;overflow-x:auto}.gemboss-md-table{border-collapse:collapse;font-size:var(--gemboss-fs-caption);min-width:100%}.gemboss-md-table th,.gemboss-md-table td{border:1px solid var(--gemboss-divider);padding:6px 8px;text-align:left;vertical-align:top;white-space:nowrap}.gemboss-md-table th{background:var(--gemboss-primary-soft);font-weight:600}.gemboss-md-imglink{display:inline-block;max-width:100%;margin:4px 0 8px;border-radius:8px;line-height:0}.gemboss-md-imglink:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}.gemboss-md-img{display:block;max-width:100%;max-height:320px;height:auto;border:1px solid var(--gemboss-divider);border-radius:8px;background:var(--gemboss-primary-soft);object-fit:contain}.gemboss-md-codeblock{position:relative;margin:0 0 12px;border:1px solid var(--gemboss-divider);border-radius:8px;background:var(--gemboss-primary-soft);overflow:hidden}.gemboss-md-codelang{display:block;padding:4px 12px 0;color:var(--gemboss-text-muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px}.gemboss-md-codeblock pre{margin:0;padding:8px 12px;overflow-x:auto}.gemboss-md-codeblock code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5;white-space:pre}.gemboss-md-codemore{display:block;width:100%;padding:6px 12px;border:0;border-top:1px solid var(--gemboss-divider);background:transparent;color:var(--gemboss-text-muted);font-size:12px;text-align:left;cursor:pointer}.gemboss-md-codemore:hover{background:#00000008}.gemboss-narr-row.source{align-items:flex-start}.gemboss-narr-source{min-width:0;flex:1}.gemboss-narr-source-head{font-size:11px;color:var(--gemboss-text-muted, #686b71);margin-bottom:4px}.gemboss-narr-source-head code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.gemboss-narr-source-code{margin:0;padding:8px 12px;border-radius:8px;max-height:220px;overflow:auto;background:var(--gemboss-primary-soft, #f2f3f5);border:1px solid var(--gemboss-divider, #e5e7ea);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:var(--gemboss-fs-micro);line-height:17px;white-space:pre;tab-size:2}.gemboss-narr-source-code .c-com{color:#6a7a86;font-style:italic}.gemboss-narr-source-code .c-str{color:#9a3412}.gemboss-narr-source-code .c-num{color:#1d6fa5}.gemboss-narr-source-code .c-kw{color:#7c3aed;font-weight:600}.gemboss-narr-source-code .c-key{color:#0b6b3a}.gemboss-narr-source-code .c-tag{color:#b0197a}.gemboss-narr-source-code .c-attr{color:#7c3aed}.gemboss-narr-source-code .c-pun{color:#6a6d73}@media (max-width: 520px){.gemboss-narr-source-code{max-height:160px;font-size:11px}}.gemboss-narr-dot-quiet{visibility:hidden}
1
+ .gemboss-ec{--gemboss-ec-inset: 16px}@media (max-width: 640px){.gemboss-ec{--gemboss-ec-inset: 12px}}.gemboss-ec-head{padding:16px var(--gemboss-ec-inset, 16px);border-bottom:1px solid var(--gemboss-divider);display:flex;flex-direction:column;gap:2px}.gemboss-ec-title{font-family:var(--gemboss-serif);font-size:15px;font-weight:600}.gemboss-ec-sub{font-size:12px;color:var(--gemboss-text-muted)}.gemboss-ec-scroll{flex:1;min-height:0;overflow-y:auto;padding:var(--gemboss-ec-inset, 16px);display:flex;flex-direction:column;gap:16px;scrollbar-gutter:stable}.gemboss-ec-scroll{scrollbar-width:thin;scrollbar-color:rgba(31,30,29,.22) transparent}.gemboss-ec-scroll::-webkit-scrollbar{width:9px}.gemboss-ec-scroll::-webkit-scrollbar-track{background:transparent}.gemboss-ec-scroll::-webkit-scrollbar-thumb{background:#1f1e1d33;border-radius:6px;border:2px solid transparent;background-clip:content-box}.gemboss-ec-msg{display:flex;flex-direction:column;gap:8px;max-width:100%}.gemboss-ec-msg.user{align-items:flex-end}.gemboss-ec-msg.assistant{align-items:flex-start}.gemboss-ec-bubble{font-size:var(--gemboss-fs-body);line-height:1.5;padding:12px;border-radius:16px;max-width:min(90%,68ch);white-space:pre-wrap;word-break:break-word}.gemboss-ec-msg.user .gemboss-ec-bubble{background:var(--gemboss-primary);color:var(--gemboss-on-primary, #fff);border-bottom-right-radius:4px}.gemboss-ec-msg.assistant .gemboss-ec-bubble{background:var(--gemboss-surface);color:var(--gemboss-text);border:1px solid var(--gemboss-divider);border-bottom-left-radius:4px}.gemboss-ec-msg.user .gemboss-ec-bubble,:root[data-theme=dark] .gemboss-ec-msg.assistant .gemboss-ec-bubble{--gemboss-ec-md-ink: color-mix(in srgb, currentColor 78%, transparent);--gemboss-ec-md-line: color-mix(in srgb, currentColor 32%, transparent);--gemboss-ec-md-fill: color-mix(in srgb, currentColor 14%, transparent)}:is(.gemboss-ec-msg.user,:root[data-theme=dark] .gemboss-ec-msg.assistant) .gemboss-ec-bubble :is(.gemboss-md-h3,.gemboss-md-quote){color:var(--gemboss-ec-md-ink)}:is(.gemboss-ec-msg.user,:root[data-theme=dark] .gemboss-ec-msg.assistant) .gemboss-ec-bubble :is(.gemboss-md-quote,.gemboss-md-rule,.gemboss-md-table th,.gemboss-md-table td,.gemboss-md-codeblock,.gemboss-md-img){border-color:var(--gemboss-ec-md-line)}:is(.gemboss-ec-msg.user,:root[data-theme=dark] .gemboss-ec-msg.assistant) .gemboss-ec-bubble :is(.gemboss-md-code,.gemboss-md-table th,.gemboss-md-codeblock,.gemboss-md-img){background:var(--gemboss-ec-md-fill)}.gemboss-ec-toolbar>button[type=submit] svg{width:16px;height:16px;fill:currentColor}.gemboss-ec-pending{display:inline-flex;align-items:center;gap:8px;padding:6px 2px;font-size:var(--gemboss-fs-caption);color:var(--gemboss-text-muted)}.gemboss-ec-pending-star{color:var(--gemboss-primary);font-size:12px;line-height:1;animation:gemboss-star-pulse 1.1s ease-in-out infinite}.gemboss-ec-pending-verb{color:var(--gemboss-text);animation:gemboss-verb-in .4s ease-out}.gemboss-ec-pending-meta{font-variant-numeric:tabular-nums;opacity:.7;font-size:var(--gemboss-fs-caption)}@keyframes gemboss-star-pulse{0%,to{transform:scale(.85);opacity:.55}50%{transform:scale(1.15);opacity:1}}@keyframes gemboss-verb-in{0%{opacity:0;transform:translateY(2px)}to{opacity:1;transform:none}}.gemboss-ec-cursor{display:inline-block;width:2px;height:1.05em;margin-left:2px;vertical-align:-2px;background:var(--gemboss-primary);border-radius:2px;animation:gemboss-cursor-blink 1s steps(1) infinite}@keyframes gemboss-cursor-blink{0%,45%{opacity:1}50%,95%{opacity:.15}to{opacity:1}}@media (prefers-reduced-motion: reduce){.gemboss-ec-pending-star,.gemboss-ec-cursor{animation:none}}.gemboss-ec-md-link{color:var(--gemboss-primary-dark);font-weight:600;text-decoration:none;border-bottom:1px solid color-mix(in srgb,var(--gemboss-primary) 35%,transparent);cursor:pointer}.gemboss-ec-md-link:hover{border-bottom-color:var(--gemboss-primary)}strong>.gemboss-ec-md-link{font-weight:inherit}.gemboss-ec-md-link:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px;border-radius:2px}.gemboss-ec-msg.user .gemboss-ec-md-link{color:inherit;border-bottom-color:color-mix(in srgb,currentColor 55%,transparent)}.gemboss-ec-msg.user .gemboss-ec-md-link:hover{border-bottom-color:currentColor}.gemboss-ec-starters{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.gemboss-ec-starter{text-align:left;font-size:13px;padding:6px 12px;border-radius:var(--gemboss-radius-full);cursor:pointer;background:var(--gemboss-surface);border:1px solid var(--gemboss-divider);color:var(--gemboss-text);white-space:nowrap;max-width:100%}.gemboss-ec-starter:hover{border-color:var(--gemboss-primary);background:#5661f50f}.gemboss-ec-input{display:flex;flex-wrap:wrap;align-items:center;gap:4px;margin:12px;padding:8px;border:1px solid var(--gemboss-divider);border-radius:16px;background:var(--gemboss-surface);transition:border-color var(--gemboss-transition-fast) ease,box-shadow var(--gemboss-transition-fast) ease}.gemboss-ec-input:focus-within{border-color:var(--gemboss-primary);box-shadow:0 0 0 3px color-mix(in srgb,var(--ui-focus, #5661f5) 12%,transparent)}.gemboss-ec-input textarea{flex:1 0 100%;min-width:0;width:100%;box-sizing:border-box;resize:none;border-radius:0;background:transparent;border:1px solid transparent;padding:6px 8px;font-size:var(--gemboss-fs-body);font-family:inherit;min-height:0;max-height:84px;line-height:1.5;overflow-y:auto;scrollbar-width:thin;scrollbar-color:rgba(31,30,29,.22) transparent}.gemboss-ec-input textarea::-webkit-scrollbar{width:7px}.gemboss-ec-input textarea::-webkit-scrollbar-track{background:transparent}.gemboss-ec-input textarea::-webkit-scrollbar-thumb{background:#1f1e1d33;border-radius:4px;border:2px solid transparent;background-clip:content-box}.gemboss-ec-input textarea:focus{outline:none}.gemboss-ec-toolbar>button[type=submit]{flex:0 0 auto;width:28px;height:28px;min-width:28px;min-height:28px;border-radius:50%;border:0;cursor:pointer;display:inline-flex;align-items:center;justify-content:center;background:var(--gemboss-primary);color:var(--gemboss-on-primary, #fff);font-size:16px;font-weight:700;transition:background var(--gemboss-transition-fast) ease,filter var(--gemboss-transition-fast) ease}.gemboss-ec-toolbar>button[type=submit]:hover:not(:disabled){background:var(--gemboss-primary-dark)}.gemboss-ec-toolbar>button[type=submit]:active:not(:disabled){background:var(--gemboss-primary-dark);filter:brightness(.94)}.gemboss-ec-toolbar>button[type=submit]:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}.gemboss-ec-toolbar>button[type=submit]:disabled{background:var(--gemboss-divider);color:var(--gemboss-text-muted);opacity:1;cursor:default}.gemboss-narr{list-style:none;margin:0;padding:8px 0 0;display:flex;flex-direction:column;gap:8px}.gemboss-narr-row{display:flex;align-items:center;gap:8px;font-size:var(--gemboss-fs-caption);color:var(--gemboss-text-muted)}.gemboss-narr-dot{width:16px;height:16px;border-radius:50%;display:inline-flex;align-items:center;justify-content:center;font-size:10px;flex:0 0 auto}.gemboss-narr-row.ok .gemboss-narr-dot{background:var(--gemboss-active-bg);color:var(--gemboss-active-fg)}.gemboss-narr-row.failed .gemboss-narr-dot{background:#fde8e6;color:var(--gemboss-danger)}.gemboss-narr-row.running .gemboss-narr-dot{background:transparent}.gemboss-narr-dot-engine{background:transparent!important;color:inherit}.gemboss-narr-row.ok .gemboss-narr-dot-engine{color:var(--gemboss-text)}.gemboss-narr-row.failed .gemboss-narr-dot-engine{color:var(--gemboss-danger)}.gemboss-narr-row.ok .gemboss-narr-text,.gemboss-narr-row.failed .gemboss-narr-text{color:var(--gemboss-text)}.gemboss-narr-row.steer .gemboss-narr-dot{background:transparent;color:var(--gemboss-text-muted)}.gemboss-narr-steer{color:var(--gemboss-text);font-weight:500;overflow-wrap:anywhere}.gemboss-narr-spin{width:11px;height:11px;border:2px solid var(--gemboss-divider-soft);border-top-color:var(--gemboss-primary);border-radius:50%;animation:gemboss-spin .7s linear infinite}@keyframes gemboss-spin{to{transform:rotate(360deg)}}.gemboss-narr-row.thinking{align-items:flex-start}.gemboss-narr-row.thinking .gemboss-narr-dot{color:var(--gemboss-text-muted);background:transparent}.gemboss-narr-thinking-live{font-style:italic;color:var(--gemboss-text-muted);white-space:pre-wrap;opacity:.9;display:-webkit-box;-webkit-line-clamp:3;-webkit-box-orient:vertical;overflow:hidden}.gemboss-narr-thinking{font-size:var(--gemboss-fs-caption)}.gemboss-narr-thinking>summary{cursor:pointer;color:var(--gemboss-text-muted);list-style:none;user-select:none}.gemboss-narr-thinking>summary::-webkit-details-marker{display:none}.gemboss-narr-thinking>summary:before{content:"\25b8 "}.gemboss-narr-thinking[open]>summary:before{content:"\25be "}.gemboss-narr-thinking-body{margin-top:6px;padding:8px;border-left:2px solid var(--gemboss-divider-soft);color:var(--gemboss-text-muted);font-style:italic;white-space:pre-wrap;line-height:1.5}.gemboss-narr-row.trace code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:var(--gemboss-fs-caption);word-break:break-word}.gemboss-narr-trace-call{color:var(--gemboss-text-muted);display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.gemboss-narr-trace{font-size:var(--gemboss-fs-caption);min-width:0}.gemboss-narr-trace>summary{cursor:pointer;color:var(--gemboss-text-muted);list-style:none;user-select:none;display:-webkit-box;-webkit-line-clamp:2;-webkit-box-orient:vertical;overflow:hidden}.gemboss-narr-trace[open]>summary{display:block;overflow:visible}.gemboss-narr-trace>summary::-webkit-details-marker{display:none}.gemboss-narr-trace>summary,.gemboss-narr-thinking>summary{min-height:24px;box-sizing:border-box;padding-block:2px}.gemboss-narr-trace>summary:before{content:"\25b8 "}.gemboss-narr-trace[open]>summary:before{content:"\25be "}.gemboss-narr-trace-body{margin-top:6px;padding:8px;border-left:2px solid var(--gemboss-divider-soft);color:var(--gemboss-text-muted);white-space:pre-wrap;line-height:1.5;overflow-x:auto}@media (max-width: 640px){.gemboss-ec-input textarea{min-height:0}.gemboss-ec-scroll{padding:var(--gemboss-ec-inset, 12px)}}.gemboss-ec-chips{display:flex;flex-wrap:wrap;gap:8px;margin-top:4px}.gemboss-ec-chip{background:var(--gemboss-surface);border:1px solid var(--gemboss-divider);border-radius:var(--gemboss-radius-full);padding:8px 16px;font-size:13px;cursor:pointer;color:var(--gemboss-text);min-height:44px}.gemboss-ec-chip:hover{border-color:var(--gemboss-primary);color:var(--gemboss-active-fg)}.gemboss-ec-chip:disabled{opacity:.5;cursor:default}@media (pointer: fine){.gemboss-ec-starters{row-gap:16px}.gemboss-ec-tab,.gemboss-ec-starter,.gemboss-ec-upload{position:relative}.gemboss-ec-tab:after,.gemboss-ec-starter:after,.gemboss-ec-upload:after{content:"";position:absolute;left:0;right:0;top:50%;transform:translateY(-50%);height:44px;pointer-events:auto;z-index:1}}@media (pointer: coarse),(max-width: 47.9975em){.gemboss-ec-toolbar>button[type=submit]{width:44px;height:44px;min-width:44px;min-height:44px;font-size:17px}.gemboss-ec-toolbar>button[type=submit] svg{width:18px;height:18px}}@media (pointer: coarse){.gemboss-ec-starter,.gemboss-ec-opt,.gemboss-ec-input textarea{min-height:44px}}.gemboss-md-p{margin:0 0 8px}.gemboss-md-p:last-child{margin-bottom:0}.gemboss-md-h{margin:16px 0 6px;font-weight:650;line-height:1.3}.gemboss-md-h:first-child{margin-top:0}.gemboss-md-h1{font-size:17px}.gemboss-md-h2{font-size:15px}.gemboss-md-h3{font-size:var(--gemboss-fs-body);color:var(--gemboss-text-muted)}.gemboss-md-list{margin:0 0 8px;padding-left:20px}.gemboss-md-list li{margin:2px 0}.gemboss-md-quote{margin:0 0 8px;padding:2px 0 2px 12px;border-left:3px solid var(--gemboss-divider);color:var(--gemboss-text-muted)}.gemboss-md-rule{margin:12px 0;border:0;border-top:1px solid var(--gemboss-divider)}.gemboss-md-code{padding:1px 6px;border-radius:6px;background:var(--gemboss-primary-soft);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:.9em;word-break:break-word}.gemboss-md-tablewrap{margin:0 0 12px;overflow-x:auto}.gemboss-md-table{border-collapse:collapse;font-size:var(--gemboss-fs-caption);min-width:100%}.gemboss-md-table th,.gemboss-md-table td{border:1px solid var(--gemboss-divider);padding:6px 8px;text-align:left;vertical-align:top;white-space:nowrap}.gemboss-md-table th{background:var(--gemboss-primary-soft);font-weight:600}.gemboss-md-imglink{display:inline-block;max-width:100%;margin:4px 0 8px;border-radius:8px;line-height:0}.gemboss-md-imglink:focus-visible{outline:2px solid var(--ui-focus, #5661f5);outline-offset:2px}.gemboss-md-img{display:block;max-width:100%;max-height:320px;height:auto;border:1px solid var(--gemboss-divider);border-radius:8px;background:var(--gemboss-primary-soft);object-fit:contain}.gemboss-md-codeblock{position:relative;margin:0 0 12px;border:1px solid var(--gemboss-divider);border-radius:8px;background:var(--gemboss-primary-soft);overflow:hidden}.gemboss-md-codelang{display:block;padding:4px 12px 0;color:var(--gemboss-text-muted);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:11px}.gemboss-md-codeblock pre{margin:0;padding:8px 12px;overflow-x:auto}.gemboss-md-codeblock code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:12px;line-height:1.5;white-space:pre}.gemboss-md-codemore{display:block;width:100%;padding:6px 12px;border:0;border-top:1px solid var(--gemboss-divider);background:transparent;color:var(--gemboss-text-muted);font-size:12px;text-align:left;cursor:pointer}.gemboss-md-codemore:hover{background:#00000008}.gemboss-narr-row.source{align-items:flex-start}.gemboss-narr-source{min-width:0;flex:1}.gemboss-narr-source-head{font-size:11px;color:var(--gemboss-text-muted, #686b71);margin-bottom:4px}.gemboss-narr-source-head code{font-family:ui-monospace,SFMono-Regular,Menlo,monospace}.gemboss-narr-source-code{margin:0;padding:8px 12px;border-radius:8px;max-height:220px;overflow:auto;background:var(--gemboss-primary-soft, #f2f3f5);border:1px solid var(--gemboss-divider, #e5e7ea);font-family:ui-monospace,SFMono-Regular,Menlo,monospace;font-size:var(--gemboss-fs-micro);line-height:17px;white-space:pre;tab-size:2}.gemboss-narr-source-code .c-com{color:#6a7a86;font-style:italic}.gemboss-narr-source-code .c-str{color:#9a3412}.gemboss-narr-source-code .c-num{color:#1d6fa5}.gemboss-narr-source-code .c-kw{color:#7c3aed;font-weight:600}.gemboss-narr-source-code .c-key{color:#0b6b3a}.gemboss-narr-source-code .c-tag{color:#b0197a}.gemboss-narr-source-code .c-attr{color:#7c3aed}.gemboss-narr-source-code .c-pun{color:#6a6d73}@media (max-width: 520px){.gemboss-narr-source-code{max-height:160px;font-size:11px}}.gemboss-narr-dot-quiet{visibility:hidden}