@gemboss/ui 0.69.0 → 0.70.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/CHANGELOG.md +18 -0
- package/catalog/editor.html +1 -1
- package/catalog/index.html +4 -4
- package/gemboss-ui.css +2 -2
- package/package.json +2 -1
- package/parts/components.css +1 -1
- package/parts/core.css +1 -1
- package/parts/shell.css +1 -1
- package/src/assistant/chat.tsx +84 -10
- package/src/assistant/composer-menus.tsx +251 -0
- package/src/assistant/engine.tsx +5 -1
- package/src/assistant/index.ts +2 -0
- package/src/assistant-chat.css +1 -1
- package/src/chat-composer-menus.css +1 -0
- package/src/chat-composer.css +1 -1
- package/src/chat-voice.css +1 -1
- package/src/chat.css +1 -1
- package/src/menu.tsx +5 -2
|
@@ -0,0 +1,251 @@
|
|
|
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, 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, and the work mode ("AI model: Claude Code · Opus · Standard"). */
|
|
182
|
+
export function aiButtonName(ai: ChatComposerAi): string {
|
|
183
|
+
const e = ai.engine && ai.engine.engines.length ? ai.engine : null;
|
|
184
|
+
const cur = e?.engines.find((x) => x.id === e.engine);
|
|
185
|
+
const model = e?.model ? (cur?.models ?? e.models)?.find((m) => m.id === e.model)?.label : undefined;
|
|
186
|
+
const mode = ai.mode?.items.find((m) => m.id === ai.mode?.value)?.label;
|
|
187
|
+
const parts = [cur?.label ?? (e ? e.engine : null), model, mode].filter(Boolean);
|
|
188
|
+
return parts.length ? `AI model: ${parts.join(" · ")}` : "AI model";
|
|
189
|
+
}
|
|
190
|
+
|
|
191
|
+
/** The ✦ menu: Model (the engines), How far it goes (the work modes), All AI settings…. Draws nothing with neither. */
|
|
192
|
+
export function ComposerAiMenu({ ai, disabled }: { ai: ChatComposerAi; disabled?: boolean }) {
|
|
193
|
+
const engine = ai.engine && ai.engine.engines.length ? ai.engine : null;
|
|
194
|
+
// The chip published the engine choice to Settings › AI & engines (engine-settings.tsx draws it from there); ✦ does now.
|
|
195
|
+
usePublishEngineSettings(engine);
|
|
196
|
+
const mode = ai.mode && ai.mode.items.length ? ai.mode : null;
|
|
197
|
+
if (!engine && !mode) return null;
|
|
198
|
+
const lockedWhy = typeof ai.locked === "string" ? ai.locked : undefined;
|
|
199
|
+
// The engine rows only: the work mode and All AI settings… do not depend on the engine being reachable.
|
|
200
|
+
const engineOff = Boolean(ai.locked || engine?.locked || engine?.disabled);
|
|
201
|
+
const tone = engine?.bridge && engine.showBridgeDot !== false ? BRIDGE_TONE[engine.bridge.state] : null;
|
|
202
|
+
const settings = ai.onOpenSettings ?? (engine ? () => engine.onOpenSettings("engine") : undefined);
|
|
203
|
+
const pick = (id: string) => {
|
|
204
|
+
if (!engine || id === engine.engine) return;
|
|
205
|
+
const next = engine.engines.find((x) => x.id === id);
|
|
206
|
+
// A switched engine answers with the model it keeps (`model`, the desktop remembers one per engine), else its first
|
|
207
|
+
// ("Default": the CLI's own setting). Its models are chosen in Settings.
|
|
208
|
+
if (engine.onPick) engine.onPick(id, next?.model ?? next?.models?.[0]?.id ?? "");
|
|
209
|
+
else engine.onEngineChange?.(id);
|
|
210
|
+
};
|
|
211
|
+
// Opening ✦ is opening the engine list, as opening the chip's Settings section was: the surface reads its engines again (a CLI
|
|
212
|
+
// signed in since the page loaded) and drops an old refusal (`onOpen`). A switch it refuses is said over the text box
|
|
213
|
+
// (ChatComposer), since the list has closed by then.
|
|
214
|
+
return (
|
|
215
|
+
<Menu label={aiButtonName(ai)} className="gemboss-ec-ai" disabled={disabled} onOpenChange={(o) => { if (o) ai.onOpen?.(); }}
|
|
216
|
+
icon={<><SparkleGlyph />{tone && tone !== "ok" ? <span className={DOT_CLASS[tone]} aria-hidden="true" /> : null}</>}>
|
|
217
|
+
{engine ? (
|
|
218
|
+
<MenuGroup title="Model" overline>
|
|
219
|
+
{engine.engines.map((e) => {
|
|
220
|
+
const on = e.id === engine.engine;
|
|
221
|
+
const model = on && engine.model ? (e.models ?? engine.models)?.find((m) => m.id === engine.model)?.label : undefined;
|
|
222
|
+
const line = [model, e.badge].filter(Boolean).join(" · ");
|
|
223
|
+
return (
|
|
224
|
+
<MenuItem key={e.id} checked={on} description={line || undefined} disabled={engineOff || e.disabled}
|
|
225
|
+
title={(engineOff ? lockedWhy : undefined) ?? (typeof e.note === "string" ? e.note : undefined)} onClick={() => pick(e.id)}>
|
|
226
|
+
{e.label}
|
|
227
|
+
</MenuItem>
|
|
228
|
+
);
|
|
229
|
+
})}
|
|
230
|
+
</MenuGroup>
|
|
231
|
+
) : null}
|
|
232
|
+
{engine && mode ? <MenuSeparator /> : null}
|
|
233
|
+
{mode ? (
|
|
234
|
+
<MenuGroup title={mode.title ?? "How far it goes"} overline>
|
|
235
|
+
{mode.items.map((m) => (
|
|
236
|
+
<MenuItem key={m.id} checked={m.id === mode.value} description={m.description} disabled={Boolean(ai.locked) || m.disabled}
|
|
237
|
+
title={(ai.locked ? lockedWhy : undefined) ?? m.title} onClick={() => { if (m.id !== mode.value) mode.onChange(m.id); }}>
|
|
238
|
+
{m.label}
|
|
239
|
+
</MenuItem>
|
|
240
|
+
))}
|
|
241
|
+
</MenuGroup>
|
|
242
|
+
) : null}
|
|
243
|
+
{settings ? (
|
|
244
|
+
<>
|
|
245
|
+
<MenuSeparator />
|
|
246
|
+
<MenuItem className="gemboss-ec-ai-settings" onClick={settings}>{ai.settingsLabel ?? "All AI settings…"}</MenuItem>
|
|
247
|
+
</>
|
|
248
|
+
) : null}
|
|
249
|
+
</Menu>
|
|
250
|
+
);
|
|
251
|
+
}
|
package/src/assistant/engine.tsx
CHANGED
|
@@ -50,6 +50,9 @@ export interface EngineChoice {
|
|
|
50
50
|
/** THIS engine's models. Give them on every engine and the Engine card lists each engine with its own models, all at
|
|
51
51
|
* once, and one click picks the engine and the model together (`onPick`): the admin's shape. 0.29.0. */
|
|
52
52
|
models?: readonly Choice[];
|
|
53
|
+
/** The model this engine answers with when it is picked (the desktop remembers one per engine). The composer's ✦ switches
|
|
54
|
+
* to it, not to the first of `models`, so going there and back keeps the seller's choice. 0.70.0. */
|
|
55
|
+
model?: string;
|
|
53
56
|
}
|
|
54
57
|
|
|
55
58
|
export interface Choice {
|
|
@@ -120,7 +123,8 @@ export const BRIDGE_TONE: Record<BridgeState, "ok" | "warn" | "down" | "idle"> =
|
|
|
120
123
|
};
|
|
121
124
|
/** Literal class names, never a template like `gb-engine-dot--` + tone: a runtime-built class is a stem the admin's orphan
|
|
122
125
|
* gate (a-tap-target-rule-outlived-its-markup) would have to exempt wholesale, as host.tsx says of MODE_CLASS. */
|
|
123
|
-
|
|
126
|
+
/** The bridge state's dot (the chip's, and ✦'s corner in the composer since 0.70.0). */
|
|
127
|
+
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
128
|
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
129
|
const NOTICE_CLASS = { warn: "gb-engine-notice gb-engine-notice--warn", down: "gb-engine-notice gb-engine-notice--down" } as const;
|
|
126
130
|
const STATE_LABEL: Record<BridgeState, keyof EnginePickerLabels> = {
|
package/src/assistant/index.ts
CHANGED
|
@@ -10,6 +10,8 @@ export { BRIDGE_TONE, BridgeNotice, ENGINE_PICKER_EN, EnginePicker, engineChipNa
|
|
|
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";
|
package/src/assistant-chat.css
CHANGED
|
@@ -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:
|
|
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}
|
|
@@ -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}@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-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}
|
package/src/chat-composer.css
CHANGED
|
@@ -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:
|
|
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-voice.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gemboss-ec-input .gemboss-ec-mic{flex:0 0 auto;position:relative;width:
|
|
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}
|
package/src/menu.tsx
CHANGED
|
@@ -31,8 +31,11 @@ import { chooseRow, closeMenu, focusRow, menuKeyDown, menuRows, openMenu, regist
|
|
|
31
31
|
* `ghost` (10/11/2026): the ⋯ without its border and fill, as the buttons beside it on a toolbar of ghost buttons (the funnel
|
|
32
32
|
* board's step toolbar: Edit page, Remove step, then ⋯). The icon trigger only: a `text` trigger is already drawn as a link and
|
|
33
33
|
* a `select` one is a field, so neither takes it. */
|
|
34
|
-
export function Menu({ label, icon, text, select, end, children, className, disabled, loading, ghost }: {
|
|
34
|
+
export function Menu({ label, icon, text, select, end, children, className, disabled, loading, ghost, onOpenChange }: {
|
|
35
35
|
label: string;
|
|
36
|
+
/** Told when the list opens and closes, however it did (its button, a row, Escape, a click outside). 0.70.0, first caller:
|
|
37
|
+
* the composer's ✦, which reads its engines again when it opens. */
|
|
38
|
+
onOpenChange?: (open: boolean) => void;
|
|
36
39
|
icon?: React.ReactNode;
|
|
37
40
|
text?: React.ReactNode;
|
|
38
41
|
select?: React.ReactNode;
|
|
@@ -82,7 +85,7 @@ export function Menu({ label, icon, text, select, end, children, className, disa
|
|
|
82
85
|
onKeyDown={(e) => { if (ref.current && !off) menuKeyDown(ref.current, e, { entry: enter }); }}
|
|
83
86
|
// Opened while off by anything but its button (find-in-page opens a closed details that holds a match, a script):
|
|
84
87
|
// closed again.
|
|
85
|
-
onToggle={(e) => { if (off && e.currentTarget.open) e.currentTarget.open = false; }}>
|
|
88
|
+
onToggle={(e) => { if (off && e.currentTarget.open) { e.currentTarget.open = false; return; } onOpenChange?.(e.currentTarget.open); }}>
|
|
86
89
|
{select !== undefined ? (
|
|
87
90
|
<summary className="ui-menu__select" aria-label={typeof select === "string" ? `${label}: ${select}` : label} aria-haspopup="menu" onClick={onSummary}
|
|
88
91
|
aria-disabled={off || undefined} aria-busy={loading || undefined} tabIndex={off ? -1 : undefined}>
|