@gemboss/ui 0.68.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 +166 -5
- package/README.md +89 -9
- package/catalog/editor.html +10 -8
- package/catalog/index.html +615 -564
- package/gemboss-ui.css +3 -3
- package/package.json +6 -2
- package/parts/components.css +1 -1
- package/parts/core.css +1 -1
- package/parts/shell.css +1 -1
- package/src/assistant/attachments.tsx +486 -0
- package/src/assistant/chat-cards.tsx +343 -0
- package/src/assistant/chat.tsx +113 -16
- package/src/assistant/composer-menus.tsx +251 -0
- package/src/assistant/engine.tsx +5 -1
- package/src/assistant/host.tsx +8 -11
- package/src/assistant/index.ts +10 -1
- package/src/assistant-chat.css +1 -1
- package/src/assistant-plain.js +1 -1
- package/src/assistant.css +1 -1
- package/src/auth-field.css +1 -1
- package/src/auth.tsx +4 -2
- package/src/chat-attachments.css +1 -0
- package/src/chat-cards.css +1 -0
- package/src/chat-composer-menus.css +1 -0
- package/src/chat-composer.css +1 -1
- package/src/chat-plain.js +5 -5
- package/src/chat-voice.css +1 -1
- package/src/chat.css +1 -1
- package/src/collections.tsx +8 -1
- package/src/editor/controls.tsx +51 -10
- package/src/editor/field-frame.tsx +4 -10
- package/src/editor/index.ts +2 -4
- package/src/editor/inspector-frame.tsx +143 -32
- package/src/editor/items-field.tsx +8 -3
- package/src/editor/items.ts +30 -6
- package/src/editor/panel.tsx +4 -5
- package/src/editor-inspector-frame.css +1 -1
- package/src/editor-media.css +1 -0
- package/src/editor-plain.js +1 -1
- package/src/editor-rail.css +1 -1
- package/src/editor.css +1 -1
- package/src/email-editor/editor.tsx +96 -69
- package/src/email-editor.css +1 -1
- package/src/gem-at-work.css +1 -1
- package/src/gem-at-work.ts +177 -33
- package/src/gem-holo.css +1 -1
- package/src/icons.tsx +42 -0
- package/src/index-table-extras.css +1 -0
- package/src/index-table.tsx +37 -16
- package/src/menu.tsx +11 -4
- package/src/narration.css +1 -1
- package/src/selection.tsx +22 -12
- package/src/editor/chips.tsx +0 -24
- package/src/editor-chips.css +0 -1
|
@@ -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/host.tsx
CHANGED
|
@@ -15,6 +15,7 @@
|
|
|
15
15
|
import "../assistant.css"; // its own stylesheet travels with it (0.23.0): a surface that never renders it never loads it
|
|
16
16
|
import React, { Children, isValidElement, useCallback, useEffect, useLayoutEffect, useRef, useState, type ReactNode } from "react";
|
|
17
17
|
|
|
18
|
+
import { Icon } from "../icons"; // every glyph in the frame is from the GemBoss set (11/11/2026), not an SVG drawn here
|
|
18
19
|
import { DOCK_MIN_HEIGHT, SIDE_MIN_WIDTH, clampDockHeight, clampSideWidth } from "./dock";
|
|
19
20
|
import { sideAvailable, useAssistant } from "./provider";
|
|
20
21
|
|
|
@@ -128,7 +129,7 @@ function HostMenu({ label, trigger = "gb-dock-icon", children }: { label: string
|
|
|
128
129
|
return (
|
|
129
130
|
<details ref={ref} className="gb-dock-menu">
|
|
130
131
|
<summary className={trigger} title={label} aria-label={label}>
|
|
131
|
-
<
|
|
132
|
+
<Icon name="more" size={18} />
|
|
132
133
|
</summary>
|
|
133
134
|
{/* title="": the popup's header carries "Drag this bar…" as its title, and a browser shows an ancestor's title on
|
|
134
135
|
any child without one of its own, so every row said it (review #3941). */}
|
|
@@ -480,9 +481,7 @@ export function AssistantHost({
|
|
|
480
481
|
<button type="button" className="gb-dock-shrink" onClick={onShrink}>
|
|
481
482
|
{/* Two arrows pulled INTO the centre. The first attempt drew two corner brackets, which at 16px
|
|
482
483
|
reads as a plus sign — the opposite of "make this smaller". */}
|
|
483
|
-
<
|
|
484
|
-
<path d="M16 4l-5 5M11 9h3.5M11 9V5.5M4 16l5-5M9 11H5.5M9 11v3.5" stroke="currentColor" strokeWidth="1.6" fill="none" strokeLinecap="round" strokeLinejoin="round"/>
|
|
485
|
-
</svg>
|
|
484
|
+
<Icon name="shrink" size={16} />
|
|
486
485
|
<span>{shrinkLabel}</span>
|
|
487
486
|
</button>
|
|
488
487
|
</>}
|
|
@@ -497,7 +496,7 @@ export function AssistantHost({
|
|
|
497
496
|
<span className="gb-dock-ministatus">
|
|
498
497
|
{dock.busy && runStartedAt ? `${L.working} · ${elapsed(runStartedAt)}` : waiting ? L.waiting : dock.unread ? L.answerWaiting : miniHint || L.askAboutScreen}
|
|
499
498
|
</span>
|
|
500
|
-
<span className="gb-dock-minichevron" aria-hidden
|
|
499
|
+
<span className="gb-dock-minichevron" aria-hidden><Icon name="chevronUp" size={14} /></span>
|
|
501
500
|
</button>
|
|
502
501
|
{/* A bar that follows you onto every screen has to be closable from the bar itself. While a
|
|
503
502
|
run is live `dismiss` opens it instead — see ./dock. */}
|
|
@@ -507,7 +506,7 @@ export function AssistantHost({
|
|
|
507
506
|
onClick={dock.dismiss}
|
|
508
507
|
title={dock.busy ? L.openInsteadTitle : L.hideTitle}
|
|
509
508
|
>
|
|
510
|
-
<
|
|
509
|
+
<Icon name="close" size={18} />
|
|
511
510
|
{/* The NAME follows the behaviour: while a run is live this button opens the popup rather
|
|
512
511
|
than hiding it, and `title` is not the accessible name. */}
|
|
513
512
|
<span className="gb-dock-sr">{dock.busy ? L.openInstead : L.hide}</span>
|
|
@@ -572,7 +571,7 @@ export function AssistantHost({
|
|
|
572
571
|
title={L.newChat}
|
|
573
572
|
onClick={onNewChat}
|
|
574
573
|
>
|
|
575
|
-
<
|
|
574
|
+
<Icon name="plus" size={18} />
|
|
576
575
|
<span className="gb-dock-sr">{L.newChat}</span>
|
|
577
576
|
</button>
|
|
578
577
|
) : null}
|
|
@@ -584,9 +583,7 @@ export function AssistantHost({
|
|
|
584
583
|
>
|
|
585
584
|
{/* The exact mirror of "Shrink to popup": same top-right ↔ bottom-left axis, arrows
|
|
586
585
|
pointing OUT instead of in. */}
|
|
587
|
-
<
|
|
588
|
-
<path d="M11 9l5-5M16 4h-3.5M16 4v3.5M9 11l-5 5M4 16h3.5M4 16v-3.5" stroke="currentColor" strokeWidth="1.6" fill="none" strokeLinecap="round" strokeLinejoin="round"/>
|
|
589
|
-
</svg>
|
|
586
|
+
<Icon name="expand" size={18} />
|
|
590
587
|
<span className="gb-dock-sr">{L.openFull}</span>
|
|
591
588
|
</button>
|
|
592
589
|
{/* ⋯ (0.31.0): what is used once in a while — the surface's rows, Clear history, and the two window controls
|
|
@@ -608,7 +605,7 @@ export function AssistantHost({
|
|
|
608
605
|
title={dock.busy ? L.closeBusyTitle : L.close}
|
|
609
606
|
onClick={dock.dismiss}
|
|
610
607
|
>
|
|
611
|
-
<
|
|
608
|
+
<Icon name="close" size={18} />
|
|
612
609
|
<span className="gb-dock-sr">{dock.busy ? L.closeBusy : L.close}</span>
|
|
613
610
|
</button>
|
|
614
611
|
</div>
|
package/src/assistant/index.ts
CHANGED
|
@@ -9,7 +9,16 @@ export { BRIDGE_TONE, BridgeNotice, ENGINE_PICKER_EN, EnginePicker, engineChipNa
|
|
|
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
|
-
export { AssistantChat, ChatAttach, ChatBubble, ChatComposer, ChatError, ChatLabelsProvider, ChatMarkdown, ChatMessage, ChatMeta, ChatNote, ChatPending, ChatStarters, 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 ComposerDensity } from "./chat";
|
|
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";
|
|
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
|
|
16
|
+
// tray in the message box (ChatComposer `top`), the pictures of a sent message, one picture large. Its own stylesheet entry.
|
|
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";
|
|
18
|
+
// What can appear in the stream beside words (11/11/2026, canvas board ChatKit): the card a turn's result, job or change is drawn on,
|
|
19
|
+
// the choices (chips or a poll), the question waiting over the box, the words a turn rewrote, a page's bars, buttons that go
|
|
20
|
+
// elsewhere, the rating row. Its own module and stylesheet (`@gemboss/ui/chat-cards.css`).
|
|
21
|
+
export { ChatCard, ChatCardButton, ChatChoices, ChatCta, ChatDecide, ChatFeedback, ChatPageBands, ChatTextChanges, ChatThing, type ChatCardProps, type ChatCardTag, type ChatCardTone, type ChatChoiceItem, type ChatChoicesProps, type ChatCtaAction, type ChatPageBand, type ChatRating, type ChatTextChange } from "./chat-cards";
|
|
13
22
|
// Speaking instead of typing (B15-voice, 08/11/2026): the hook ChatComposer's `voice` runs on, for a box that is not a chat. Also
|
|
14
23
|
// its own entry, `@gemboss/ui/assistant/dictation` (no CSS on the way).
|
|
15
24
|
export { DICTATION_NOTE, appendDictated, canDictate, dictationLanguage, dictationProblemText, useCanDictate, useDictation, type Dictation, type DictationOptions } from "./dictation";
|
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}
|
package/src/assistant-plain.js
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
(function(d){"use strict";var W=d.gembossUI;if(!W){d.console&&d.console.error("@gemboss/ui assistant-plain.js: load kit-plain.js first (it defines gembossUI)");return}if(W.assistantFrame)return;var F=280,Te=480,nt=56,it=12,Pe=nt+it,ve=24,z=380,be=400,ge=720,Re=480,Oe="(min-width: 1100px)",rt="(max-width: 640px)",ye="--gb-assistant-side-w",J=9007199254740991;function ke(t,i){var r=isFinite(i)&&i>0?Math.max(z,Math.min(ge,i-Re)):ge;return Math.min(Math.max(Math.round(t),z),r)}function xe(t,i,r){return r<i?i:Math.min(Math.max(Math.round(t),i),r)}function B(t,i){var r=Math.max(F,i-Pe);return Math.min(Math.max(Math.round(t),F),r)}function Z(t,i){var r=t!==null&&isFinite(t)&&t>0?t:1/0;return B(r,i)}var We={presentation:"hidden",mounted:!1,busy:!1,unread:!1,dockHeight:Te,dockOffsetRight:ve,openNonce:0,sideWidth:be,floatShape:"side",sideAllowed:!1};function h(t,i){var r={},f;for(f in t)r[f]=t[f];for(f in i)r[f]=i[f];return r}function $(t){return t.sideAllowed?t.floatShape:"dock"}function Ce(t,i){switch(i.type){case"enter-full":return h(t,{presentation:"full",mounted:!0,unread:!1,openNonce:t.openNonce+1});case"leave-full":return t.presentation!=="full"?t:h(t,{presentation:t.busy?$(t):"mini"});case"dock":return h(t,{presentation:"dock",floatShape:"dock",mounted:!0,unread:!1,openNonce:t.openNonce+1});case"side":return t.sideAllowed?h(t,{presentation:"side",floatShape:"side",mounted:!0,unread:!1,openNonce:t.openNonce+1}):h(t,{presentation:"dock",floatShape:"dock",mounted:!0,unread:!1,openNonce:t.openNonce+1});case"reopen":return h(t,{presentation:$(t),mounted:!0,unread:!1,openNonce:t.openNonce+1});case"side-allowed":return i.allowed===t.sideAllowed?t:i.allowed?h(t,{sideAllowed:!0,presentation:t.presentation==="dock"&&t.floatShape==="side"?"side":t.presentation}):h(t,{sideAllowed:!1,presentation:t.presentation==="side"?"dock":t.presentation});case"restore-float":return h(t,{floatShape:i.shape});case"minimize":return h(t,{presentation:"mini"});case"dismiss":return t.busy?h(t,{presentation:t.presentation==="mini"?$(t):"mini"}):h(t,{presentation:"hidden"});case"busy":{if(i.busy===t.busy)return t;var r=t.presentation==="mini"||t.presentation==="hidden";return h(t,{busy:i.busy,unread:!i.busy&&r?!0:t.unread})}case"resize":return h(t,{dockHeight:B(i.height,i.viewport)});case"slide":return h(t,{dockOffsetRight:xe(i.offsetRight,i.min,i.max)});case"side-resize":return h(t,{sideWidth:ke(i.width,i.available)});default:return t}}W.assistantDock={reducer:Ce,initial:We,clampSideWidth:ke,clampDockOffset:xe,clampDockHeight:B,openingDockHeight:Z,DOCK_MIN_HEIGHT:F,DOCK_DEFAULT_HEIGHT:Te,DOCK_VIEWPORT_RESERVE:Pe,DOCK_DEFAULT_OFFSET_RIGHT:ve,SIDE_MIN_WIDTH:z,SIDE_DEFAULT_WIDTH:be,SIDE_MAX_WIDTH:ge,SIDE_PAGE_MIN:Re,SIDE_FITS_QUERY:Oe};var at={ready:"Ready",working:"Working",done:"Done \u2014 tap to see it",answerWaiting:"An answer is waiting",askAboutScreen:"Ask about this screen",reopen:"Reopen the {title}",hide:"Hide the assistant",hideTitle:"Hide the assistant",openInstead:"Open the assistant",openInsteadTitle:"Still working \u2014 open it",grip:"Drag to resize the assistant; left and right arrows move it sideways",headerTitle:"Drag this bar to move the popup left or right",newChat:"New chat",openFull:"Open full screen",minimize:"Minimise",minimizeTitle:"Shrink to a bar",close:"Close the assistant",closeBusy:"Shrink to a bar",closeBusyTitle:"Still working \u2014 shrink it to a bar",shrinkToPopup:"Shrink to popup",tablist:"Assistant or a person",primaryTab:"Assistant",pinSide:"Pin to the side",floatPopup:"Float as a popup",sideGrip:"Drag to resize the assistant; left and right arrows work too",backToSide:"Back to the side panel",more:"More",clearHistory:"Clear history"},Fe={hidden:"gb-dock-hidden",mini:"gb-dock-mini",dock:"gb-dock-dock",side:"gb-dock-side",full:"gb-dock-full"},ze="http://www.w3.org/2000/svg",we=function(t){return typeof Node<"u"&&t instanceof Node};function c(t,i,r){var f=document.createElement(t);if(i)for(var b in i){var y=i[b];y==null||y===!1||(b==="text"?f.textContent=String(y):b==="className"?f.className=y:f.setAttribute(b,y===!0?"":String(y)))}return ee(f,r),f}function ee(t,i){return i==null||i===!1?t:Array.isArray(i)?(i.forEach(function(r){ee(t,r)}),t):(t.appendChild(we(i)?i:document.createTextNode(String(i))),t)}function G(t){var i=document.createElementNS(ze,"svg");return i.setAttribute("viewBox","0 0 20 20"),i.setAttribute("aria-hidden","true"),t.forEach(function(r){var f=document.createElementNS(ze,r.tag||"path");for(var b in r)b!=="tag"&&f.setAttribute(b,r[b]);i.appendChild(f)}),i}var M={close:function(){return G([{d:"M6 6l8 8M14 6l-8 8",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round"}])},plus:function(){return G([{d:"M10 4.5v11M4.5 10h11",stroke:"currentColor","stroke-width":"1.7","stroke-linecap":"round"}])},expand:function(){return G([{d:"M11 9l5-5M16 4h-3.5M16 4v3.5M9 11l-5 5M4 16h3.5M4 16v-3.5",stroke:"currentColor","stroke-width":"1.6",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}])},shrink:function(){return G([{d:"M16 4l-5 5M11 9h3.5M11 9V5.5M4 16l5-5M9 11H5.5M9 11v3.5",stroke:"currentColor","stroke-width":"1.6",fill:"none","stroke-linecap":"round","stroke-linejoin":"round"}])},more:function(){return G([{tag:"circle",cx:"5",cy:"10",r:"1.5",fill:"currentColor"},{tag:"circle",cx:"10",cy:"10",r:"1.5",fill:"currentColor"},{tag:"circle",cx:"15",cy:"10",r:"1.5",fill:"currentColor"}])}};function ot(t){var i=Math.max(0,Math.floor((Date.now()-t)/1e3)),r=i%60;return Math.floor(i/60)+":"+(r<10?"0":"")+r}function Be(t){try{return t==="session"?d.sessionStorage:d.localStorage}catch{return null}}function I(t,i){var r=Be(t);try{return r?r.getItem(i):null}catch{return null}}function A(t,i,r){var f=Be(t);try{f&&(r===null?f.removeItem(i):f.setItem(i,r))}catch{}}function K(){var t=document.querySelector(".gemboss-platform-main"),i=t?t.getBoundingClientRect().left:0;return(document.documentElement.clientWidth||d.innerWidth)-i}W.fullChromeRoom=function(t){var i=t&&t.closest?t.closest(".gb-dock"):null;if(!i||typeof d.ResizeObserver>"u")return function(){};var r=null,f=function(){t.removeAttribute("data-chrome"),t.style.removeProperty("--gb-chat-chrome-w"),t.style.removeProperty("--gb-chat-chrome-h")},b=new d.ResizeObserver(function(){y()});function y(){var w=i.querySelector(":scope > [data-gb-dock-chrome]");if(w!==r&&(r&&b.unobserve(r),w&&b.observe(w),r=w),!w||getComputedStyle(w).position!=="absolute")return f();var E=w.getBoundingClientRect(),S=t.getBoundingClientRect();if(E.left>=S.right||E.bottom<=S.top||E.right<=S.left)return f();t.style.setProperty("--gb-chat-chrome-w",Math.ceil(S.right-E.left+8)+"px"),t.style.setProperty("--gb-chat-chrome-h",Math.ceil(E.bottom-S.top+8)+"px"),t.setAttribute("data-chrome","")}y(),b.observe(t),b.observe(i);var te=new MutationObserver(y);return te.observe(i,{childList:!0,attributes:!0,attributeFilter:["class"]}),function(){b.disconnect(),te.disconnect()}},W.assistantFrame=function(t){t=t||{};var i={title:t.title||"Assistant",storagePrefix:t.storagePrefix||"gemboss.assistant",bodyClassPrefix:t.bodyClassPrefix||"gemboss-assistant",dockedEvent:t.dockedEvent||"gemboss:assistant-docked",allowSide:t.allowSide!==!1,keepAcrossPages:t.keepAcrossPages!==!1,fullHref:t.fullHref||"",miniHint:t.miniHint||"",canClearHistory:t.canClearHistory!==!1},r=h(at,t.labels||{}),f=function(){try{return i.fullHref?new URL(i.fullHref,d.location.href).pathname:""}catch{return""}},b=t.isFullLink||function(e){return!!f()&&e.pathname===f()},y=t.isOnFullPage||function(){return!!f()&&d.location.pathname===f()},te=t.onExpand||function(){i.fullHref&&(d.location.href=i.fullHref)},w=t.onShrink||function(){A("session",k("presentation"),$(a));var e=document.referrer,n=!1;try{n=!!e&&new URL(e).origin===d.location.origin&&new URL(e).pathname!==d.location.pathname}catch{n=!1}n?d.history.back():m({type:"reopen"})},E=t.onNewChat||null,S=t.onClearHistory||null,Ee=t.menuItems||null,ne=t.fullActions||null,U=d.matchMedia?d.matchMedia(rt):null,k=function(e){return i.storagePrefix+"."+e},a=We,ie=[],re=[],L=function(e,n,l,s){e.addEventListener(n,l,s),re.push(function(){e.removeEventListener(n,l,s)})},ae=null,Se=ve,oe=be,se=null,Ge=!1,H=0,p=c("div",{className:"gb-dock "+Fe.hidden}),le=c("div",{className:"gb-dock-body"}),de=c("div",{className:"gb-dock-pane",id:"gem-dock-pane-assistant"}),X=t.rail?we(t.rail)?t.rail:t.rail.el:null,N=null,q=null,Ke=!1;X?(N=c("div",{className:"gemboss-assistant-layout is-dock"}),q=c("div",{className:"gemboss-assistant-page"}),t.body&&q.appendChild(t.body),N.appendChild(q),de.appendChild(N)):t.body&&de.appendChild(t.body),le.appendChild(de),p.appendChild(le);var o={},Ne="";function Ue(){var e=document.querySelector(".gemboss-platform-main"),n=e?e.getBoundingClientRect().width:document.documentElement.clientWidth||d.innerWidth,l=Math.min(460,Math.max(0,n-48));return{min:8,max:Math.max(8,Math.floor(n-l-8))}}function ce(){var e=Math.ceil(p.getBoundingClientRect().width||600),n=document.querySelector(".gemboss-platform-main"),l=n?n.getBoundingClientRect().width:document.documentElement.clientWidth||d.innerWidth;return{min:8,max:Math.max(8,Math.floor(l-e-8))}}function m(e){var n=a;a=Ce(a,e),a!==n&&(n.presentation!==a.presentation&&((a.presentation==="full"||a.presentation==="dock"||a.presentation==="side")&&A("local",k("lastMode"),a.presentation),a.presentation==="side"&&(a=Ce(a,{type:"side-resize",width:oe,available:K()})),i.keepAcrossPages&&A("session",k("presentation"),a.presentation)),n.busy!==a.busy&&(se=a.busy?Date.now():null),x(),ie.slice().forEach(function(l){try{l(Ze.state())}catch(s){d.console&&d.console.error(s)}}))}function Xe(e){A("local",k("shape"),e)}function _(e){var n=d.innerHeight,l=Math.round(e)>=Z(null,n);ae=l?null:Math.round(e),m({type:"resize",height:e,viewport:n}),A("local",k("dockHeight"),l?null:String(Math.round(e)))}function ue(e,n,l){Se=Math.round(e),m({type:"slide",offsetRight:e,min:n,max:l}),A("local",k("dockOffsetRight"),String(Math.round(e)))}function T(e){oe=Math.round(e),m({type:"side-resize",width:e,available:K()}),A("local",k("sideWidth"),String(Math.round(e)))}var qe=function(){m({type:"dock"}),Xe("dock")},Ve=function(){m({type:"side"}),a.sideAllowed&&Xe("side")},P=function(){m({type:"reopen"})},Ye=function(){m({type:"minimize"})},fe=function(){m({type:"dismiss"})};function R(e,n,l){l=l||{};var s=c("button",{type:"button",className:["ui-menu__item",l.danger?"ui-menu__item--danger":"",l.className||""].filter(Boolean).join(" "),disabled:!!l.disabled},e);return s.addEventListener("click",function(u){var v=s.closest("details");if(v){v.removeAttribute("open");var g=v.querySelector("summary");g&&g.focus()}n&&n(u)}),s}function Ae(e,n,l){var s=c("details",{className:"gb-dock-menu"}),u=c("summary",{className:n,title:e,"aria-label":e});return u.appendChild(M.more()),s.appendChild(u),s.appendChild(c("div",{className:"gemboss-popover-surface gb-dock-menu-list",title:""},l)),s}function st(){var e=[];return(Ee||[]).forEach(function(n){we(n)?e.push(n):n&&e.push(R(n.label,n.onClick,{danger:n.danger,disabled:n.disabled,className:n.className}))}),S&&e.push(R(r.clearHistory,function(){S()},{danger:!0,disabled:!i.canClearHistory})),e}L(d,"keydown",function(e){var n=p.querySelector("details.gb-dock-menu[open]");if(!(!n||e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)){var l=document.activeElement,s=l&&l.closest?l.closest('dialog[open], [aria-modal="true"]'):null;if(!(s&&!n.contains(s)))if(e.preventDefault(),n.contains(l)){e.stopPropagation(),n.open=!1;var u=n.querySelector("summary");u&&u.focus()}else n.open=!1}},!0),L(document,"pointerdown",function(e){Array.prototype.forEach.call(p.querySelectorAll("details.gb-dock-menu[open]"),function(n){n.contains(e.target)||(n.open=!1)})},!0),L(d,"blur",function(){Array.prototype.forEach.call(p.querySelectorAll("details.gb-dock-menu[open]"),function(e){e.open=!1})});function O(e){Ge=e,p.classList.toggle("gb-dock-dragging",e)}function lt(e){var n=null;e.addEventListener("pointerdown",function(s){s.preventDefault(),e.setPointerCapture(s.pointerId),O(!0),n={startY:s.clientY,startH:a.dockHeight}}),e.addEventListener("pointermove",function(s){n&&_(n.startH+(n.startY-s.clientY))});var l=function(s){n=null,O(!1);try{e.releasePointerCapture(s.pointerId)}catch{}};e.addEventListener("pointerup",l),e.addEventListener("pointercancel",l),e.addEventListener("keydown",function(s){var u=s.shiftKey?96:32,v=B(J,d.innerHeight),g;s.key==="ArrowUp"?(s.preventDefault(),_(a.dockHeight+u)):s.key==="ArrowDown"?(s.preventDefault(),_(a.dockHeight-u)):s.key==="ArrowLeft"?(g=ce(),s.preventDefault(),ue(a.dockOffsetRight+u,g.min,g.max)):s.key==="ArrowRight"?(g=ce(),s.preventDefault(),ue(a.dockOffsetRight-u,g.min,g.max)):s.key==="Home"?(s.preventDefault(),_(v)):s.key==="End"&&(s.preventDefault(),_(F))})}function dt(e){var n=null;e.addEventListener("pointerdown",function(s){a.presentation!=="dock"||s.target.closest&&s.target.closest("button, summary, .gb-dock-menu")||(e.setPointerCapture(s.pointerId),O(!0),n={startX:s.clientX,startOffset:a.dockOffsetRight,moved:!1})}),e.addEventListener("pointermove",function(s){if(n&&!(!n.moved&&Math.abs(s.clientX-n.startX)<4)){n.moved=!0;var u=ce();ue(n.startOffset-(s.clientX-n.startX),u.min,u.max)}});var l=function(s){if(n){n=null,O(!1);try{e.releasePointerCapture(s.pointerId)}catch{}}};e.addEventListener("pointerup",l),e.addEventListener("pointercancel",l)}var D=null;function V(e,n){if(D=null,O(!1),document.body.classList.remove("ui-resizing"),e&&n)try{e.releasePointerCapture(n.pointerId)}catch{}}function ct(e){e.addEventListener("pointerdown",function(n){n.button!==0||n.pointerType==="mouse"&&n.ctrlKey||(n.preventDefault(),e.setPointerCapture(n.pointerId),O(!0),document.body.classList.add("ui-resizing"),D={startX:n.clientX,startW:a.sideWidth,id:n.pointerId})}),e.addEventListener("pointermove",function(n){if(!(!D||n.pointerId!==D.id)){if(n.pointerType==="mouse"&&n.buttons===0){V(e,n);return}T(D.startW+(D.startX-n.clientX))}}),e.addEventListener("pointerup",function(n){V(e,n)}),e.addEventListener("pointercancel",function(n){V(e,n)}),e.addEventListener("lostpointercapture",function(){D&&V()}),e.addEventListener("keydown",function(n){if(!(n.altKey||n.metaKey||n.ctrlKey)){var l=n.shiftKey?64:16;n.key==="ArrowLeft"?(n.preventDefault(),T(a.sideWidth+l)):n.key==="ArrowRight"?(n.preventDefault(),T(a.sideWidth-l)):n.key==="Home"?(n.preventDefault(),T(z)):n.key==="End"&&(n.preventDefault(),T(J))}})}function ut(e){Array.prototype.slice.call(p.childNodes).forEach(function(C){C!==le&&p.removeChild(C)}),o={};var n=function(C){p.insertBefore(C,le)},l=e==="dock",s=e==="side",u=st();if(e==="full"){var v=c("div",{className:"gb-dock-fullchrome","data-gb-dock-chrome":""});if(U&&U.matches){var g=c("div",{className:"gb-dock-menu-actions"});[].concat(ne).forEach(function(C){ee(C&&C.classList&&C.classList.contains("gb-dock-shrink-keep")?v:g,C)}),g.addEventListener("click",function(C){C.target.closest("button")&&(g.parentNode.parentNode.open=!1)}),v.appendChild(Ae(r.more,"gb-dock-shrink gb-dock-menu-pill",[g].concat(u,o.shrinkLabel=R("",function(){w()}))))}else{o.shrinkLabel=c("span"),ee(v,ne),u.length&&v.appendChild(Ae(r.more,"gb-dock-shrink gb-dock-menu-pill",u));var Y=c("button",{type:"button",className:"gb-dock-shrink"},[M.shrink(),o.shrinkLabel]);Y.addEventListener("click",function(){w()}),v.appendChild(Y)}n(v)}if(e==="mini"&&(o.miniDot=c("span",{className:"gb-dock-dot","aria-hidden":"true"}),o.miniStatus=c("span",{className:"gb-dock-ministatus"}),o.miniBar=c("button",{type:"button",className:"gb-dock-minibar"},[o.miniDot,c("strong",null,i.title),o.miniStatus,c("span",{className:"gb-dock-minichevron","aria-hidden":"true"},"\u25B2")]),o.miniBar.addEventListener("click",P),o.miniClose=c("button",{type:"button",className:"gb-dock-icon"}),o.miniCloseSr=c("span",{className:"gb-dock-sr"}),o.miniClose.appendChild(M.close()),o.miniClose.appendChild(o.miniCloseSr),o.miniClose.addEventListener("click",fe),n(c("div",{className:"gb-dock-minirow"},[o.miniBar,o.miniClose]))),s&&(o.sideGrip=c("div",{className:"ui-resizer gb-dock-sidegrip",role:"separator","aria-orientation":"vertical","aria-label":r.sideGrip,tabindex:"0"}),ct(o.sideGrip),n(o.sideGrip)),l||s){l&&(o.grip=c("div",{className:"gb-dock-grip",role:"separator","aria-orientation":"horizontal","aria-label":r.grip,tabindex:"0"},c("span",{"aria-hidden":"true"})),lt(o.grip),n(o.grip)),o.dot=c("span",{className:"gb-dock-dot","aria-hidden":"true"}),o.status=c("span",{className:"gb-dock-status"});var j=c("div",{className:"gb-dock-actions"});if(E){var $e=c("button",{type:"button",className:"gb-dock-icon gb-dock-action",title:r.newChat},[M.plus(),c("span",{className:"gb-dock-sr"},r.newChat)]);$e.addEventListener("click",function(){E()}),j.appendChild($e)}var et=c("button",{type:"button",className:"gb-dock-icon",title:r.openFull},[M.expand(),c("span",{className:"gb-dock-sr"},r.openFull)]);et.addEventListener("click",function(){te()}),j.appendChild(et);var Q=u.slice();u.length&&Q.push(c("hr",{className:"gb-dock-menu-sep"})),l&&a.sideAllowed&&Q.push(R(r.pinSide,Ve,{className:"gb-dock-pinside"})),s&&Q.push(R(r.floatPopup,qe)),Q.push(R(r.minimizeTitle,Ye)),j.appendChild(Ae(r.more,"gb-dock-icon",Q)),o.close=c("button",{type:"button",className:"gb-dock-icon"}),o.closeSr=c("span",{className:"gb-dock-sr"}),o.close.appendChild(M.close()),o.close.appendChild(o.closeSr),o.close.addEventListener("click",fe),j.appendChild(o.close);var tt=c("header",{className:"gb-dock-header",title:l?r.headerTitle:null},[o.dot,c("span",{className:"gb-dock-title"},i.title),o.status,j]);l&&dt(tt),n(tt)}}function x(){var e=a.presentation,n=[a.mounted?e:"unmounted",a.sideAllowed,!!E,!!S,i.canClearHistory,i.title,(Ee||[]).length,(ne||[]).length,U&&U.matches].join("|");if(n!==Ne&&(ut(a.mounted?e:"hidden"),Ne=n),a.mounted&&!p.parentNode&&(t.container||document.body).appendChild(p),p.className="gb-dock "+Fe[e]+(Ge?" gb-dock-dragging":""),N){var l=e==="full";N.className="gemboss-assistant-layout"+(l?"":" is-dock"),l&&X.parentNode!==N?N.insertBefore(X,q):!l&&X.parentNode===N&&N.removeChild(X),q.className="gemboss-assistant-page"+(Ke?" is-switching":"")}e==="hidden"?(p.removeAttribute("role"),p.removeAttribute("aria-label"),p.setAttribute("inert","")):(p.setAttribute("role","region"),p.setAttribute("aria-label",i.title),p.removeAttribute("inert")),p.style.removeProperty("height"),p.style.removeProperty("right"),p.style.removeProperty("--gb-dock-side-w"),e==="dock"&&(p.style.height=a.dockHeight+"px",p.style.right=a.dockOffsetRight+"px"),e==="side"&&p.style.setProperty("--gb-dock-side-w",a.sideWidth+"px");var s=a.busy?r.working:a.unread?r.done:r.ready;o.dot&&(o.dot.className="gb-dock-dot"+(a.busy?" gb-dock-dot-busy":"")),o.status&&(o.status.textContent=s),o.close&&(o.close.title=a.busy?r.closeBusyTitle:r.close,o.closeSr.textContent=a.busy?r.closeBusy:r.close),o.grip&&(o.grip.setAttribute("aria-valuenow",String(a.dockHeight)),o.grip.setAttribute("aria-valuemin",String(F)),o.grip.setAttribute("aria-valuemax",String(B(J,d.innerHeight)))),o.sideGrip&&(o.sideGrip.setAttribute("aria-valuenow",String(a.sideWidth)),o.sideGrip.setAttribute("aria-valuemin",String(z)),o.sideGrip.setAttribute("aria-valuemax",String(ke(J,K())))),o.miniBar&&(o.miniBar.setAttribute("aria-label",r.reopen.replace("{title}",i.title)),o.miniDot.className="gb-dock-dot"+(a.busy?" gb-dock-dot-busy":a.unread?" gb-dock-dot-unread":""),o.miniStatus.textContent=a.busy&&se?r.working+" \xB7 "+ot(se):a.unread?r.answerWaiting:i.miniHint||r.askAboutScreen,o.miniClose.title=a.busy?r.openInsteadTitle:r.hideTitle,o.miniCloseSr.textContent=a.busy?r.openInstead:r.hide),o.shrinkLabel&&(o.shrinkLabel.textContent=a.sideAllowed&&a.floatShape==="side"?r.backToSide:r.shrinkToPopup),a.busy&&se&&e==="mini"?H||(H=d.setInterval(x,1e3)):H&&(d.clearInterval(H),H=0);var u=i.bodyClassPrefix,v=document.body;v.classList.toggle(u+"-busy",a.busy),v.classList.toggle(u+"-unread",a.unread&&!a.busy),v.classList.toggle(u+"-side",e==="side"),e==="side"?v.style.setProperty(ye,a.sideWidth+"px"):v.style.removeProperty(ye),e!=="side"&&D&&V(),De().forEach(function(g){var Y=e!=="hidden";g.hidden=Y,g.style.display=Y?"none":""})}function De(){var e=t.launchers;return e?typeof e=="string"?Array.prototype.slice.call(document.querySelectorAll(e)):Array.prototype.slice.call(e.length!==void 0?e:[e]):[]}L(document,"click",function(e){if(!(!t.launchers||e.defaultPrevented)){var n=e.target&&e.target.closest?e.target.closest("button"):null;n&&De().indexOf(n)>=0&&(e.preventDefault(),P())}}),L(document,"click",function(e){if(!(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)){var n=e.target&&e.target.closest?e.target.closest("a"):null;if(!(!n||n.target==="_blank")){var l;try{l=new URL(n.href,d.location.origin)}catch{return}if(!(!b(l)||y())){var s=I("local",k("lastMode"))||"",u=!!n.closest(".gnav-assistant");(u?s==="full":s!=="dock"&&s!=="side")||(e.preventDefault(),e.stopPropagation(),P(),d.dispatchEvent(new CustomEvent(i.dockedEvent)))}}}},!0);function je(e,n){e&&(e.addEventListener?(e.addEventListener("change",n),re.push(function(){e.removeEventListener("change",n)})):(e.addListener(n),re.push(function(){e.removeListener(n)})))}var He=d.matchMedia?d.matchMedia(Oe):null,Qe=function(){m({type:"side-allowed",allowed:i.allowSide&&(!He||He.matches)})};je(He,Qe),je(U,x),L(d,"resize",function(){m({type:"resize",height:Z(ae,d.innerHeight),viewport:d.innerHeight});var e=Ue();m({type:"slide",offsetRight:Se,min:e.min,max:e.max}),m({type:"side-resize",width:oe,available:K()})}),Qe();var Me=I("local",k("dockHeight")),Ie=Me===null||Me===""?NaN:Number(Me);ae=isFinite(Ie)&&Ie>0?Ie:null,m({type:"resize",height:Z(ae,d.innerHeight),viewport:d.innerHeight});var Le=I("local",k("dockOffsetRight")),pe=Number(Le);if(Le!==null&&Le!==""&&isFinite(pe)&&pe>=0){Se=pe;var Je=Ue();m({type:"slide",offsetRight:pe,min:Je.min,max:Je.max})}var _e=I("local",k("shape"));(_e==="side"||_e==="dock")&&m({type:"restore-float",shape:_e}),A("local",k("floatShape"),null);var me=Number(I("local",k("sideWidth")));if(isFinite(me)&&me>0&&(oe=me,m({type:"side-resize",width:me,available:K()})),y())m({type:"enter-full"});else if(i.keepAcrossPages){var he=I("session",k("presentation"));he==="dock"||he==="side"?m({type:"reopen"}):(he==="mini"||he==="full")&&(m({type:"reopen"}),m({type:"minimize"}))}x();var Ze={el:p,pane:de,state:function(){return h(a,{})},open:P,reopen:P,openDock:qe,openSide:Ve,minimize:Ye,dismiss:fe,toggle:function(){a.presentation==="hidden"||a.presentation==="mini"?P():fe()},enterFull:function(){m({type:"enter-full"})},leaveFull:function(){m({type:"leave-full"})},setBusy:function(e){m({type:"busy",busy:!!e})},setSwitching:function(e){Ke=!!e,x()},setDockHeight:_,setSideWidth:T,setDockOffsetRight:function(e){var n=ce();ue(e,n.min,n.max)},onChange:function(e){return ie.push(e),function(){ie=ie.filter(function(n){return n!==e})}},update:function(e){e=e||{},e.title!==void 0&&(i.title=e.title),e.miniHint!==void 0&&(i.miniHint=e.miniHint),e.canClearHistory!==void 0&&(i.canClearHistory=e.canClearHistory!==!1),e.menuItems!==void 0&&(Ee=e.menuItems),e.fullActions!==void 0&&(ne=e.fullActions),e.labels&&(r=h(r,e.labels)),Ne="",x()},destroy:function(){re.forEach(function(n){n()}),H&&d.clearInterval(H);var e=i.bodyClassPrefix;document.body.classList.remove(e+"-busy",e+"-unread",e+"-side"),document.body.style.removeProperty(ye),De().forEach(function(n){n.hidden=!1,n.style.display=""}),p.parentNode&&p.parentNode.removeChild(p)}};return Ze}})(typeof globalThis<"u"?globalThis:this);
|
|
1
|
+
(function(d){"use strict";var z=d.gembossUI;if(!z){d.console&&d.console.error("@gemboss/ui assistant-plain.js: load kit-plain.js first (it defines gembossUI)");return}if(z.assistantFrame)return;var B=280,Pe=480,nt=56,it=12,Re=nt+it,be=24,G=380,ge=400,ye=720,xe=480,Oe="(min-width: 1100px)",rt="(max-width: 640px)",ke="--gb-assistant-side-w",Z=9007199254740991;function Ee(t,i){var r=isFinite(i)&&i>0?Math.max(G,Math.min(ye,i-xe)):ye;return Math.min(Math.max(Math.round(t),G),r)}function We(t,i,r){return r<i?i:Math.min(Math.max(Math.round(t),i),r)}function K(t,i){var r=Math.max(B,i-Re);return Math.min(Math.max(Math.round(t),B),r)}function $(t,i){var r=t!==null&&isFinite(t)&&t>0?t:1/0;return K(r,i)}var Fe={presentation:"hidden",mounted:!1,busy:!1,unread:!1,dockHeight:Pe,dockOffsetRight:be,openNonce:0,sideWidth:ge,floatShape:"side",sideAllowed:!1};function m(t,i){var r={},p;for(p in t)r[p]=t[p];for(p in i)r[p]=i[p];return r}function ee(t){return t.sideAllowed?t.floatShape:"dock"}function Ce(t,i){switch(i.type){case"enter-full":return m(t,{presentation:"full",mounted:!0,unread:!1,openNonce:t.openNonce+1});case"leave-full":return t.presentation!=="full"?t:m(t,{presentation:t.busy?ee(t):"mini"});case"dock":return m(t,{presentation:"dock",floatShape:"dock",mounted:!0,unread:!1,openNonce:t.openNonce+1});case"side":return t.sideAllowed?m(t,{presentation:"side",floatShape:"side",mounted:!0,unread:!1,openNonce:t.openNonce+1}):m(t,{presentation:"dock",floatShape:"dock",mounted:!0,unread:!1,openNonce:t.openNonce+1});case"reopen":return m(t,{presentation:ee(t),mounted:!0,unread:!1,openNonce:t.openNonce+1});case"side-allowed":return i.allowed===t.sideAllowed?t:i.allowed?m(t,{sideAllowed:!0,presentation:t.presentation==="dock"&&t.floatShape==="side"?"side":t.presentation}):m(t,{sideAllowed:!1,presentation:t.presentation==="side"?"dock":t.presentation});case"restore-float":return m(t,{floatShape:i.shape});case"minimize":return m(t,{presentation:"mini"});case"dismiss":return t.busy?m(t,{presentation:t.presentation==="mini"?ee(t):"mini"}):m(t,{presentation:"hidden"});case"busy":{if(i.busy===t.busy)return t;var r=t.presentation==="mini"||t.presentation==="hidden";return m(t,{busy:i.busy,unread:!i.busy&&r?!0:t.unread})}case"resize":return m(t,{dockHeight:K(i.height,i.viewport)});case"slide":return m(t,{dockOffsetRight:We(i.offsetRight,i.min,i.max)});case"side-resize":return m(t,{sideWidth:Ee(i.width,i.available)});default:return t}}z.assistantDock={reducer:Ce,initial:Fe,clampSideWidth:Ee,clampDockOffset:We,clampDockHeight:K,openingDockHeight:$,DOCK_MIN_HEIGHT:B,DOCK_DEFAULT_HEIGHT:Pe,DOCK_VIEWPORT_RESERVE:Re,DOCK_DEFAULT_OFFSET_RIGHT:be,SIDE_MIN_WIDTH:G,SIDE_DEFAULT_WIDTH:ge,SIDE_MAX_WIDTH:ye,SIDE_PAGE_MIN:xe,SIDE_FITS_QUERY:Oe};var at={ready:"Ready",working:"Working",done:"Done \u2014 tap to see it",answerWaiting:"An answer is waiting",askAboutScreen:"Ask about this screen",reopen:"Reopen the {title}",hide:"Hide the assistant",hideTitle:"Hide the assistant",openInstead:"Open the assistant",openInsteadTitle:"Still working \u2014 open it",grip:"Drag to resize the assistant; left and right arrows move it sideways",headerTitle:"Drag this bar to move the popup left or right",newChat:"New chat",openFull:"Open full screen",minimize:"Minimise",minimizeTitle:"Shrink to a bar",close:"Close the assistant",closeBusy:"Shrink to a bar",closeBusyTitle:"Still working \u2014 shrink it to a bar",shrinkToPopup:"Shrink to popup",tablist:"Assistant or a person",primaryTab:"Assistant",pinSide:"Pin to the side",floatPopup:"Float as a popup",sideGrip:"Drag to resize the assistant; left and right arrows work too",backToSide:"Back to the side panel",more:"More",clearHistory:"Clear history"},ze={hidden:"gb-dock-hidden",mini:"gb-dock-mini",dock:"gb-dock-dock",side:"gb-dock-side",full:"gb-dock-full"},we=function(t){return typeof Node<"u"&&t instanceof Node};function c(t,i,r){var p=document.createElement(t);if(i)for(var k in i){var g=i[k];g==null||g===!1||(k==="text"?p.textContent=String(g):k==="className"?p.className=g:p.setAttribute(k,g===!0?"":String(g)))}return te(p,r),p}function te(t,i){return i==null||i===!1?t:Array.isArray(i)?(i.forEach(function(r){te(t,r)}),t):(t.appendChild(we(i)?i:document.createTextNode(String(i))),t)}function L(t,i){var r=document.createElement("template");return r.innerHTML='<svg viewBox="0 0 20 20" width="'+t+'" height="'+t+'" aria-hidden="true" focusable="false"><g fill="none" stroke="currentColor" stroke-width="1.5" stroke-linecap="round" stroke-linejoin="round">'+i+"</g></svg>",r.content.firstChild}var I={close:'<path d="M5 5l10 10M15 5 5 15"/>',plus:'<path d="M10 4v12M4 10h12"/>',expand:'<path d="M11 9l5-5M16 4h-3.5M16 4v3.5M9 11l-5 5M4 16h3.5M4 16v-3.5"/>',shrink:'<path d="M16 4l-5 5M11 9h3.5M11 9V5.5M4 16l5-5M9 11H5.5M9 11v3.5"/>',chevronUp:'<path d="M6 12l4-4 4 4"/>',more:'<circle cx="4.5" cy="10" r="1"/><circle cx="10" cy="10" r="1"/><circle cx="15.5" cy="10" r="1"/>'},H={close:function(){return L(18,I.close)},plus:function(){return L(18,I.plus)},expand:function(){return L(18,I.expand)},shrink:function(){return L(16,I.shrink)},chevronUp:function(){return L(14,I.chevronUp)},more:function(){return L(18,I.more)}};function ot(t){var i=Math.max(0,Math.floor((Date.now()-t)/1e3)),r=i%60;return Math.floor(i/60)+":"+(r<10?"0":"")+r}function Be(t){try{return t==="session"?d.sessionStorage:d.localStorage}catch{return null}}function _(t,i){var r=Be(t);try{return r?r.getItem(i):null}catch{return null}}function A(t,i,r){var p=Be(t);try{p&&(r===null?p.removeItem(i):p.setItem(i,r))}catch{}}function U(){var t=document.querySelector(".gemboss-platform-main"),i=t?t.getBoundingClientRect().left:0;return(document.documentElement.clientWidth||d.innerWidth)-i}z.fullChromeRoom=function(t){var i=t&&t.closest?t.closest(".gb-dock"):null;if(!i||typeof d.ResizeObserver>"u")return function(){};var r=null,p=function(){t.removeAttribute("data-chrome"),t.style.removeProperty("--gb-chat-chrome-w"),t.style.removeProperty("--gb-chat-chrome-h")},k=new d.ResizeObserver(function(){g()});function g(){var C=i.querySelector(":scope > [data-gb-dock-chrome]");if(C!==r&&(r&&k.unobserve(r),C&&k.observe(C),r=C),!C||getComputedStyle(C).position!=="absolute")return p();var w=C.getBoundingClientRect(),S=t.getBoundingClientRect();if(w.left>=S.right||w.bottom<=S.top||w.right<=S.left)return p();t.style.setProperty("--gb-chat-chrome-w",Math.ceil(S.right-w.left+8)+"px"),t.style.setProperty("--gb-chat-chrome-h",Math.ceil(w.bottom-S.top+8)+"px"),t.setAttribute("data-chrome","")}g(),k.observe(t),k.observe(i);var ne=new MutationObserver(g);return ne.observe(i,{childList:!0,attributes:!0,attributeFilter:["class"]}),function(){k.disconnect(),ne.disconnect()}},z.assistantFrame=function(t){t=t||{};var i={title:t.title||"Assistant",storagePrefix:t.storagePrefix||"gemboss.assistant",bodyClassPrefix:t.bodyClassPrefix||"gemboss-assistant",dockedEvent:t.dockedEvent||"gemboss:assistant-docked",allowSide:t.allowSide!==!1,keepAcrossPages:t.keepAcrossPages!==!1,fullHref:t.fullHref||"",miniHint:t.miniHint||"",canClearHistory:t.canClearHistory!==!1},r=m(at,t.labels||{}),p=function(){try{return i.fullHref?new URL(i.fullHref,d.location.href).pathname:""}catch{return""}},k=t.isFullLink||function(e){return!!p()&&e.pathname===p()},g=t.isOnFullPage||function(){return!!p()&&d.location.pathname===p()},ne=t.onExpand||function(){i.fullHref&&(d.location.href=i.fullHref)},C=t.onShrink||function(){A("session",y("presentation"),ee(a));var e=document.referrer,n=!1;try{n=!!e&&new URL(e).origin===d.location.origin&&new URL(e).pathname!==d.location.pathname}catch{n=!1}n?d.history.back():h({type:"reopen"})},w=t.onNewChat||null,S=t.onClearHistory||null,Se=t.menuItems||null,ie=t.fullActions||null,X=d.matchMedia?d.matchMedia(rt):null,y=function(e){return i.storagePrefix+"."+e},a=Fe,re=[],ae=[],T=function(e,n,l,s){e.addEventListener(n,l,s),ae.push(function(){e.removeEventListener(n,l,s)})},oe=null,Ne=be,se=ge,le=null,Ge=!1,M=0,f=c("div",{className:"gb-dock "+ze.hidden}),de=c("div",{className:"gb-dock-body"}),ce=c("div",{className:"gb-dock-pane",id:"gem-dock-pane-assistant"}),q=t.rail?we(t.rail)?t.rail:t.rail.el:null,N=null,Y=null,Ke=!1;q?(N=c("div",{className:"gemboss-assistant-layout is-dock"}),Y=c("div",{className:"gemboss-assistant-page"}),t.body&&Y.appendChild(t.body),N.appendChild(Y),ce.appendChild(N)):t.body&&ce.appendChild(t.body),de.appendChild(ce),f.appendChild(de);var o={},Ae="";function Ue(){var e=document.querySelector(".gemboss-platform-main"),n=e?e.getBoundingClientRect().width:document.documentElement.clientWidth||d.innerWidth,l=Math.min(460,Math.max(0,n-48));return{min:8,max:Math.max(8,Math.floor(n-l-8))}}function ue(){var e=Math.ceil(f.getBoundingClientRect().width||600),n=document.querySelector(".gemboss-platform-main"),l=n?n.getBoundingClientRect().width:document.documentElement.clientWidth||d.innerWidth;return{min:8,max:Math.max(8,Math.floor(l-e-8))}}function h(e){var n=a;a=Ce(a,e),a!==n&&(n.presentation!==a.presentation&&((a.presentation==="full"||a.presentation==="dock"||a.presentation==="side")&&A("local",y("lastMode"),a.presentation),a.presentation==="side"&&(a=Ce(a,{type:"side-resize",width:se,available:U()})),i.keepAcrossPages&&A("session",y("presentation"),a.presentation)),n.busy!==a.busy&&(le=a.busy?Date.now():null),F(),re.slice().forEach(function(l){try{l(Ze.state())}catch(s){d.console&&d.console.error(s)}}))}function Xe(e){A("local",y("shape"),e)}function P(e){var n=d.innerHeight,l=Math.round(e)>=$(null,n);oe=l?null:Math.round(e),h({type:"resize",height:e,viewport:n}),A("local",y("dockHeight"),l?null:String(Math.round(e)))}function fe(e,n,l){Ne=Math.round(e),h({type:"slide",offsetRight:e,min:n,max:l}),A("local",y("dockOffsetRight"),String(Math.round(e)))}function R(e){se=Math.round(e),h({type:"side-resize",width:e,available:U()}),A("local",y("sideWidth"),String(Math.round(e)))}var qe=function(){h({type:"dock"}),Xe("dock")},Ye=function(){h({type:"side"}),a.sideAllowed&&Xe("side")},x=function(){h({type:"reopen"})},Ve=function(){h({type:"minimize"})},pe=function(){h({type:"dismiss"})};function O(e,n,l){l=l||{};var s=c("button",{type:"button",className:["ui-menu__item",l.danger?"ui-menu__item--danger":"",l.className||""].filter(Boolean).join(" "),disabled:!!l.disabled},e);return s.addEventListener("click",function(u){var v=s.closest("details");if(v){v.removeAttribute("open");var b=v.querySelector("summary");b&&b.focus()}n&&n(u)}),s}function De(e,n,l){var s=c("details",{className:"gb-dock-menu"}),u=c("summary",{className:n,title:e,"aria-label":e});return u.appendChild(H.more()),s.appendChild(u),s.appendChild(c("div",{className:"gemboss-popover-surface gb-dock-menu-list",title:""},l)),s}function st(){var e=[];return(Se||[]).forEach(function(n){we(n)?e.push(n):n&&e.push(O(n.label,n.onClick,{danger:n.danger,disabled:n.disabled,className:n.className}))}),S&&e.push(O(r.clearHistory,function(){S()},{danger:!0,disabled:!i.canClearHistory})),e}T(d,"keydown",function(e){var n=f.querySelector("details.gb-dock-menu[open]");if(!(!n||e.key!=="Escape"||e.defaultPrevented||e.isComposing||e.keyCode===229)){var l=document.activeElement,s=l&&l.closest?l.closest('dialog[open], [aria-modal="true"]'):null;if(!(s&&!n.contains(s)))if(e.preventDefault(),n.contains(l)){e.stopPropagation(),n.open=!1;var u=n.querySelector("summary");u&&u.focus()}else n.open=!1}},!0),T(document,"pointerdown",function(e){Array.prototype.forEach.call(f.querySelectorAll("details.gb-dock-menu[open]"),function(n){n.contains(e.target)||(n.open=!1)})},!0),T(d,"blur",function(){Array.prototype.forEach.call(f.querySelectorAll("details.gb-dock-menu[open]"),function(e){e.open=!1})});function W(e){Ge=e,f.classList.toggle("gb-dock-dragging",e)}function lt(e){var n=null;e.addEventListener("pointerdown",function(s){s.preventDefault(),e.setPointerCapture(s.pointerId),W(!0),n={startY:s.clientY,startH:a.dockHeight}}),e.addEventListener("pointermove",function(s){n&&P(n.startH+(n.startY-s.clientY))});var l=function(s){n=null,W(!1);try{e.releasePointerCapture(s.pointerId)}catch{}};e.addEventListener("pointerup",l),e.addEventListener("pointercancel",l),e.addEventListener("keydown",function(s){var u=s.shiftKey?96:32,v=K(Z,d.innerHeight),b;s.key==="ArrowUp"?(s.preventDefault(),P(a.dockHeight+u)):s.key==="ArrowDown"?(s.preventDefault(),P(a.dockHeight-u)):s.key==="ArrowLeft"?(b=ue(),s.preventDefault(),fe(a.dockOffsetRight+u,b.min,b.max)):s.key==="ArrowRight"?(b=ue(),s.preventDefault(),fe(a.dockOffsetRight-u,b.min,b.max)):s.key==="Home"?(s.preventDefault(),P(v)):s.key==="End"&&(s.preventDefault(),P(B))})}function dt(e){var n=null;e.addEventListener("pointerdown",function(s){a.presentation!=="dock"||s.target.closest&&s.target.closest("button, summary, .gb-dock-menu")||(e.setPointerCapture(s.pointerId),W(!0),n={startX:s.clientX,startOffset:a.dockOffsetRight,moved:!1})}),e.addEventListener("pointermove",function(s){if(n&&!(!n.moved&&Math.abs(s.clientX-n.startX)<4)){n.moved=!0;var u=ue();fe(n.startOffset-(s.clientX-n.startX),u.min,u.max)}});var l=function(s){if(n){n=null,W(!1);try{e.releasePointerCapture(s.pointerId)}catch{}}};e.addEventListener("pointerup",l),e.addEventListener("pointercancel",l)}var D=null;function V(e,n){if(D=null,W(!1),document.body.classList.remove("ui-resizing"),e&&n)try{e.releasePointerCapture(n.pointerId)}catch{}}function ct(e){e.addEventListener("pointerdown",function(n){n.button!==0||n.pointerType==="mouse"&&n.ctrlKey||(n.preventDefault(),e.setPointerCapture(n.pointerId),W(!0),document.body.classList.add("ui-resizing"),D={startX:n.clientX,startW:a.sideWidth,id:n.pointerId})}),e.addEventListener("pointermove",function(n){if(!(!D||n.pointerId!==D.id)){if(n.pointerType==="mouse"&&n.buttons===0){V(e,n);return}R(D.startW+(D.startX-n.clientX))}}),e.addEventListener("pointerup",function(n){V(e,n)}),e.addEventListener("pointercancel",function(n){V(e,n)}),e.addEventListener("lostpointercapture",function(){D&&V()}),e.addEventListener("keydown",function(n){if(!(n.altKey||n.metaKey||n.ctrlKey)){var l=n.shiftKey?64:16;n.key==="ArrowLeft"?(n.preventDefault(),R(a.sideWidth+l)):n.key==="ArrowRight"?(n.preventDefault(),R(a.sideWidth-l)):n.key==="Home"?(n.preventDefault(),R(G)):n.key==="End"&&(n.preventDefault(),R(Z))}})}function ut(e){Array.prototype.slice.call(f.childNodes).forEach(function(E){E!==de&&f.removeChild(E)}),o={};var n=function(E){f.insertBefore(E,de)},l=e==="dock",s=e==="side",u=st();if(e==="full"){var v=c("div",{className:"gb-dock-fullchrome","data-gb-dock-chrome":""});if(X&&X.matches){var b=c("div",{className:"gb-dock-menu-actions"});[].concat(ie).forEach(function(E){te(E&&E.classList&&E.classList.contains("gb-dock-shrink-keep")?v:b,E)}),b.addEventListener("click",function(E){E.target.closest("button")&&(b.parentNode.parentNode.open=!1)}),v.appendChild(De(r.more,"gb-dock-shrink gb-dock-menu-pill",[b].concat(u,o.shrinkLabel=O("",function(){C()}))))}else{o.shrinkLabel=c("span"),te(v,ie),u.length&&v.appendChild(De(r.more,"gb-dock-shrink gb-dock-menu-pill",u));var j=c("button",{type:"button",className:"gb-dock-shrink"},[H.shrink(),o.shrinkLabel]);j.addEventListener("click",function(){C()}),v.appendChild(j)}n(v)}if(e==="mini"&&(o.miniDot=c("span",{className:"gb-dock-dot","aria-hidden":"true"}),o.miniStatus=c("span",{className:"gb-dock-ministatus"}),o.miniBar=c("button",{type:"button",className:"gb-dock-minibar"},[o.miniDot,c("strong",null,i.title),o.miniStatus,c("span",{className:"gb-dock-minichevron","aria-hidden":"true"},H.chevronUp())]),o.miniBar.addEventListener("click",x),o.miniClose=c("button",{type:"button",className:"gb-dock-icon"}),o.miniCloseSr=c("span",{className:"gb-dock-sr"}),o.miniClose.appendChild(H.close()),o.miniClose.appendChild(o.miniCloseSr),o.miniClose.addEventListener("click",pe),n(c("div",{className:"gb-dock-minirow"},[o.miniBar,o.miniClose]))),s&&(o.sideGrip=c("div",{className:"ui-resizer gb-dock-sidegrip",role:"separator","aria-orientation":"vertical","aria-label":r.sideGrip,tabindex:"0"}),ct(o.sideGrip),n(o.sideGrip)),l||s){l&&(o.grip=c("div",{className:"gb-dock-grip",role:"separator","aria-orientation":"horizontal","aria-label":r.grip,tabindex:"0"},c("span",{"aria-hidden":"true"})),lt(o.grip),n(o.grip)),o.dot=c("span",{className:"gb-dock-dot","aria-hidden":"true"}),o.status=c("span",{className:"gb-dock-status"});var Q=c("div",{className:"gb-dock-actions"});if(w){var $e=c("button",{type:"button",className:"gb-dock-icon gb-dock-action",title:r.newChat},[H.plus(),c("span",{className:"gb-dock-sr"},r.newChat)]);$e.addEventListener("click",function(){w()}),Q.appendChild($e)}var et=c("button",{type:"button",className:"gb-dock-icon",title:r.openFull},[H.expand(),c("span",{className:"gb-dock-sr"},r.openFull)]);et.addEventListener("click",function(){ne()}),Q.appendChild(et);var J=u.slice();u.length&&J.push(c("hr",{className:"gb-dock-menu-sep"})),l&&a.sideAllowed&&J.push(O(r.pinSide,Ye,{className:"gb-dock-pinside"})),s&&J.push(O(r.floatPopup,qe)),J.push(O(r.minimizeTitle,Ve)),Q.appendChild(De(r.more,"gb-dock-icon",J)),o.close=c("button",{type:"button",className:"gb-dock-icon"}),o.closeSr=c("span",{className:"gb-dock-sr"}),o.close.appendChild(H.close()),o.close.appendChild(o.closeSr),o.close.addEventListener("click",pe),Q.appendChild(o.close);var tt=c("header",{className:"gb-dock-header",title:l?r.headerTitle:null},[o.dot,c("span",{className:"gb-dock-title"},i.title),o.status,Q]);l&&dt(tt),n(tt)}}function F(){var e=a.presentation,n=[a.mounted?e:"unmounted",a.sideAllowed,!!w,!!S,i.canClearHistory,i.title,(Se||[]).length,(ie||[]).length,X&&X.matches].join("|");if(n!==Ae&&(ut(a.mounted?e:"hidden"),Ae=n),a.mounted&&!f.parentNode&&(t.container||document.body).appendChild(f),f.className="gb-dock "+ze[e]+(Ge?" gb-dock-dragging":""),N){var l=e==="full";N.className="gemboss-assistant-layout"+(l?"":" is-dock"),l&&q.parentNode!==N?N.insertBefore(q,Y):!l&&q.parentNode===N&&N.removeChild(q),Y.className="gemboss-assistant-page"+(Ke?" is-switching":"")}e==="hidden"?(f.removeAttribute("role"),f.removeAttribute("aria-label"),f.setAttribute("inert","")):(f.setAttribute("role","region"),f.setAttribute("aria-label",i.title),f.removeAttribute("inert")),f.style.removeProperty("height"),f.style.removeProperty("right"),f.style.removeProperty("--gb-dock-side-w"),e==="dock"&&(f.style.height=a.dockHeight+"px",f.style.right=a.dockOffsetRight+"px"),e==="side"&&f.style.setProperty("--gb-dock-side-w",a.sideWidth+"px");var s=a.busy?r.working:a.unread?r.done:r.ready;o.dot&&(o.dot.className="gb-dock-dot"+(a.busy?" gb-dock-dot-busy":"")),o.status&&(o.status.textContent=s),o.close&&(o.close.title=a.busy?r.closeBusyTitle:r.close,o.closeSr.textContent=a.busy?r.closeBusy:r.close),o.grip&&(o.grip.setAttribute("aria-valuenow",String(a.dockHeight)),o.grip.setAttribute("aria-valuemin",String(B)),o.grip.setAttribute("aria-valuemax",String(K(Z,d.innerHeight)))),o.sideGrip&&(o.sideGrip.setAttribute("aria-valuenow",String(a.sideWidth)),o.sideGrip.setAttribute("aria-valuemin",String(G)),o.sideGrip.setAttribute("aria-valuemax",String(Ee(Z,U())))),o.miniBar&&(o.miniBar.setAttribute("aria-label",r.reopen.replace("{title}",i.title)),o.miniDot.className="gb-dock-dot"+(a.busy?" gb-dock-dot-busy":a.unread?" gb-dock-dot-unread":""),o.miniStatus.textContent=a.busy&&le?r.working+" \xB7 "+ot(le):a.unread?r.answerWaiting:i.miniHint||r.askAboutScreen,o.miniClose.title=a.busy?r.openInsteadTitle:r.hideTitle,o.miniCloseSr.textContent=a.busy?r.openInstead:r.hide),o.shrinkLabel&&(o.shrinkLabel.textContent=a.sideAllowed&&a.floatShape==="side"?r.backToSide:r.shrinkToPopup),a.busy&&le&&e==="mini"?M||(M=d.setInterval(F,1e3)):M&&(d.clearInterval(M),M=0);var u=i.bodyClassPrefix,v=document.body;v.classList.toggle(u+"-busy",a.busy),v.classList.toggle(u+"-unread",a.unread&&!a.busy),v.classList.toggle(u+"-side",e==="side"),e==="side"?v.style.setProperty(ke,a.sideWidth+"px"):v.style.removeProperty(ke),e!=="side"&&D&&V(),He().forEach(function(b){var j=e!=="hidden";b.hidden=j,b.style.display=j?"none":""})}function He(){var e=t.launchers;return e?typeof e=="string"?Array.prototype.slice.call(document.querySelectorAll(e)):Array.prototype.slice.call(e.length!==void 0?e:[e]):[]}T(document,"click",function(e){if(!(!t.launchers||e.defaultPrevented)){var n=e.target&&e.target.closest?e.target.closest("button"):null;n&&He().indexOf(n)>=0&&(e.preventDefault(),x())}}),T(document,"click",function(e){if(!(e.defaultPrevented||e.button!==0||e.metaKey||e.ctrlKey||e.shiftKey||e.altKey)){var n=e.target&&e.target.closest?e.target.closest("a"):null;if(!(!n||n.target==="_blank")){var l;try{l=new URL(n.href,d.location.origin)}catch{return}if(!(!k(l)||g())){var s=_("local",y("lastMode"))||"",u=!!n.closest(".gnav-assistant");(u?s==="full":s!=="dock"&&s!=="side")||(e.preventDefault(),e.stopPropagation(),x(),d.dispatchEvent(new CustomEvent(i.dockedEvent)))}}}},!0);function je(e,n){e&&(e.addEventListener?(e.addEventListener("change",n),ae.push(function(){e.removeEventListener("change",n)})):(e.addListener(n),ae.push(function(){e.removeListener(n)})))}var Me=d.matchMedia?d.matchMedia(Oe):null,Qe=function(){h({type:"side-allowed",allowed:i.allowSide&&(!Me||Me.matches)})};je(Me,Qe),je(X,F),T(d,"resize",function(){h({type:"resize",height:$(oe,d.innerHeight),viewport:d.innerHeight});var e=Ue();h({type:"slide",offsetRight:Ne,min:e.min,max:e.max}),h({type:"side-resize",width:se,available:U()})}),Qe();var Le=_("local",y("dockHeight")),Ie=Le===null||Le===""?NaN:Number(Le);oe=isFinite(Ie)&&Ie>0?Ie:null,h({type:"resize",height:$(oe,d.innerHeight),viewport:d.innerHeight});var _e=_("local",y("dockOffsetRight")),he=Number(_e);if(_e!==null&&_e!==""&&isFinite(he)&&he>=0){Ne=he;var Je=Ue();h({type:"slide",offsetRight:he,min:Je.min,max:Je.max})}var Te=_("local",y("shape"));(Te==="side"||Te==="dock")&&h({type:"restore-float",shape:Te}),A("local",y("floatShape"),null);var me=Number(_("local",y("sideWidth")));if(isFinite(me)&&me>0&&(se=me,h({type:"side-resize",width:me,available:U()})),g())h({type:"enter-full"});else if(i.keepAcrossPages){var ve=_("session",y("presentation"));ve==="dock"||ve==="side"?h({type:"reopen"}):(ve==="mini"||ve==="full")&&(h({type:"reopen"}),h({type:"minimize"}))}F();var Ze={el:f,pane:ce,state:function(){return m(a,{})},open:x,reopen:x,openDock:qe,openSide:Ye,minimize:Ve,dismiss:pe,toggle:function(){a.presentation==="hidden"||a.presentation==="mini"?x():pe()},enterFull:function(){h({type:"enter-full"})},leaveFull:function(){h({type:"leave-full"})},setBusy:function(e){h({type:"busy",busy:!!e})},setSwitching:function(e){Ke=!!e,F()},setDockHeight:P,setSideWidth:R,setDockOffsetRight:function(e){var n=ue();fe(e,n.min,n.max)},onChange:function(e){return re.push(e),function(){re=re.filter(function(n){return n!==e})}},update:function(e){e=e||{},e.title!==void 0&&(i.title=e.title),e.miniHint!==void 0&&(i.miniHint=e.miniHint),e.canClearHistory!==void 0&&(i.canClearHistory=e.canClearHistory!==!1),e.menuItems!==void 0&&(Se=e.menuItems),e.fullActions!==void 0&&(ie=e.fullActions),e.labels&&(r=m(r,e.labels)),Ae="",F()},destroy:function(){ae.forEach(function(n){n()}),M&&d.clearInterval(M);var e=i.bodyClassPrefix;document.body.classList.remove(e+"-busy",e+"-unread",e+"-side"),document.body.style.removeProperty(ke),He().forEach(function(n){n.hidden=!1,n.style.display=""}),f.parentNode&&f.parentNode.removeChild(f)}};return Ze}})(typeof globalThis<"u"?globalThis:this);
|
package/src/assistant.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gb-dock{position:fixed;z-index:320;right:24px;bottom:0;width:min(460px,calc(100vw - 288px));display:flex;flex-direction:column;min-height:0;background:var(--gemboss-surface);background:color-mix(in srgb,var(--gemboss-surface) 93%,transparent);-webkit-backdrop-filter:blur(14px) saturate(1.4);backdrop-filter:blur(14px) saturate(1.4);border:1px solid var(--gemboss-divider);border-bottom:0;border-radius:12px 12px 0 0;box-shadow:0 -2px 6px #0f172a0d,0 24px 64px #0f172a2e;overflow:hidden;transition:transform .14s cubic-bezier(.2,.8,.3,1),opacity .14s ease-out}@starting-style{.gb-dock-dock,.gb-dock-mini{transform:translateY(10px);opacity:0}.gb-dock-side{transform:translate(12px);opacity:0}}.gb-dock-dragging,.gb-dock-dragging *{transition:none!important}@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){.gb-dock{background:var(--gemboss-surface)}}@media (prefers-reduced-motion: reduce){.gb-dock{transition:none}}.gb-dock-hidden{display:none}.gb-dock-full{z-index:4;inset:56px 0 0 240px;width:auto;border:0;border-radius:0;box-shadow:none;background:var(--gemboss-app-bg);-webkit-backdrop-filter:none;backdrop-filter:none}.gb-dock-side{z-index:290;top:56px;right:0;bottom:0;width:var(--gb-dock-side-w, 400px);background:var(--gemboss-surface);-webkit-backdrop-filter:none;backdrop-filter:none;border:0;border-left:1px solid var(--gemboss-divider);border-radius:0;box-shadow:none;overflow:visible}.gb-dock-side .gb-dock-body,.gb-dock-side .gb-dock-pane{overflow:hidden}.gb-dock-side .gb-dock-header{cursor:default;touch-action:auto}.gb-dock-side .gb-dock-status{flex:0 0 auto;position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.gb-dock-side .gb-dock-header:active{cursor:default}.gb-dock-side>.gb-dock-sidegrip{position:absolute;top:0;bottom:0;left:-3px;width:5px;z-index:3}@media (min-width: 1100px){body.gemboss-assistant-side .gemboss-platform-main{margin-right:var(--gb-assistant-side-w, 400px)}}.gb-dock-fullchrome{position:absolute;top:10px;right:16px;z-index:1;display:flex;gap:8px}.gb-dock-shrink{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border:1px solid var(--gemboss-divider);border-radius:var(--gemboss-radius-full);background:var(--gemboss-surface);color:var(--gemboss-text-muted);font:inherit;font-size:var(--gemboss-fs-caption);cursor:pointer;white-space:nowrap}.gb-dock-shrink:hover{background:var(--gemboss-hover);color:var(--gemboss-text)}.gb-dock-shrink:focus-visible{outline:2px solid var(--gemboss-primary);outline-offset:2px}.gb-dock-shrink svg{width:16px;height:16px;flex:0 0 auto}.gb-dock-menu-actions .gb-dock-shrink{display:flex;border:0;border-radius:8px}@media (max-width: 560px){.gb-dock-fullchrome{position:static;justify-content:flex-end;padding:8px 12px 0}.gb-dock-full .gemboss-assistant-layout>.gemboss-assistant-rail{position:absolute;top:8px;left:12px;z-index:1;width:auto;flex:none;padding:0;border:0}.gb-dock-full .gemboss-assistant-layout>.gemboss-assistant-rail .gemboss-assistant-newchat{width:44px;min-height:44px;padding:0;border-radius:var(--gemboss-radius-full)}}.gb-dock-mini{height:auto;width:min(320px,calc(100vw - 288px));-webkit-backdrop-filter:blur(14px) saturate(1.4);backdrop-filter:blur(14px) saturate(1.4);border-radius:12px 12px 0 0}.gb-dock-mini .gb-dock-body{display:none}.gb-dock-minirow{display:flex;align-items:center;padding-right:4px}.gb-dock-minirow .gb-dock-minibar{flex:1 1 auto;min-width:0}.gb-dock-minirow .gb-dock-icon{flex:0 0 auto}.gb-dock-minibar{display:flex;align-items:center;gap:8px;width:100%;min-height:48px;padding:0 12px;border:0;background:transparent;font:inherit;color:var(--gemboss-text-strong);cursor:pointer;text-align:left}.gb-dock-minibar:hover{background:var(--gemboss-hover)}.gb-dock-minibar strong{font-size:13px;font-weight:600;flex:0 0 auto}.gb-dock-ministatus{flex:1 1 auto;min-width:0;font-size:12px;color:var(--gemboss-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gb-dock-minichevron{font-size:10px;color:var(--gemboss-text-muted)}.gb-dock-grip{position:absolute;top:0;left:0;right:0;height:14px;z-index:2;display:grid;place-items:center;cursor:ns-resize;touch-action:none;background:transparent}.gb-dock-grip>span{display:block;width:44px;height:4px;border-radius:2px;background:var(--gemboss-divider)}.gb-dock-grip:hover>span,.gb-dock-grip:focus-visible>span{background:var(--gemboss-text-muted)}.gb-dock-grip:focus-visible{outline:2px solid var(--gemboss-primary);outline-offset:-2px}.gb-dock-header{flex:0 0 auto;cursor:grab;touch-action:none;user-select:none;display:flex;align-items:center;gap:8px;padding:0 4px 0 16px;min-height:48px;border-bottom:1px solid var(--gemboss-divider);background:transparent}.gb-dock-title{font-size:13px;font-weight:600;color:var(--gemboss-text-strong);white-space:nowrap;flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}.gb-dock-status{flex:1 1 auto;min-width:0;font-size:12px;color:var(--gemboss-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gb-dock-header:active{cursor:grabbing}.gb-dock-actions{display:flex;align-items:center;gap:2px;cursor:default;margin-left:auto}.gb-dock-action{margin-right:8px}.gb-dock-menu{position:relative}.gb-dock-menu>summary{list-style:none}.gb-dock-menu>summary::-webkit-details-marker{display:none}.gb-dock-menu[open]>summary{color:var(--gemboss-text-strong);background:var(--gemboss-hover)}.gb-dock-menu-list{position:absolute;top:calc(100% + 4px);right:0;z-index:5;display:grid;min-width:220px;padding:6px;box-sizing:border-box;cursor:default}.gb-dock-menu-list>.ui-menu__item{border-radius:8px}.gb-dock-menu-list>.ui-menu__item:disabled{opacity:.5;cursor:not-allowed;background:transparent}.gb-dock-menu-sep{height:1px;margin:4px 0;border:0;background:var(--gemboss-divider)}.gb-dock-menu-pill{width:44px;padding:0;justify-content:center}.gb-dock-menu-pill svg{width:18px;height:18px}.gb-dock-icon{width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:var(--gemboss-text-muted);cursor:pointer;padding:0}.gb-dock-icon:hover{background:var(--gemboss-hover);color:var(--gemboss-text-strong)}.gb-dock-icon:focus-visible{outline:2px solid var(--gemboss-primary);outline-offset:-2px}.gb-dock-icon svg{width:18px;height:18px}.gb-dock-icon-on{color:var(--gemboss-active-fg);background:var(--gemboss-active-bg)}.gb-dock-dot{flex:0 0 auto;width:8px;height:8px;border-radius:50%;background:var(--gemboss-divider)}.gb-dock-dot-busy{background:var(--gemboss-primary);animation:gb-dock-pulse 1.4s ease-in-out infinite}.gb-dock-dot-unread{background:var(--gemboss-success-strong)}@keyframes gb-dock-pulse{0%,to{opacity:1}50%{opacity:.35}}@media (prefers-reduced-motion: reduce){.gb-dock-dot-busy{animation:none}}.gb-dock-tabs{flex:0 0 auto;display:flex;gap:4px;padding:0 8px;border-bottom:1px solid var(--gemboss-divider)}.gb-dock-tab{position:relative;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--gemboss-text-muted);font:inherit;font-size:13px;cursor:pointer;white-space:nowrap}.gb-dock-tab:hover{color:var(--gemboss-text-strong)}.gb-dock-tab[aria-selected=true]{color:var(--gemboss-text-strong);font-weight:600;border-bottom-color:var(--gemboss-primary)}.gb-dock-tab:focus-visible{outline:2px solid var(--gemboss-primary);outline-offset:-2px}.gb-dock-badge{min-width:18px;padding:0 6px;border-radius:var(--gemboss-radius-full);background:var(--gemboss-primary);color:var(--gemboss-on-primary, #fff);font-size:11px;font-weight:700;line-height:18px;text-align:center}.gb-dock-body{flex:1 1 auto;min-height:0;display:flex;min-width:0}.gb-dock-body>*{flex:1 1 auto;min-width:0;min-height:0}.gb-dock-pane{display:flex;min-width:0;min-height:0}.gb-dock-pane>*{flex:1 1 auto;min-width:0;min-height:0}.gb-dock-body .gemboss-assistant-layout,.gb-dock-body .gemboss-assistant-page{height:auto;min-height:0}.gb-dock-pane[hidden]{display:none}.gb-dock-booting{flex:1 1 auto;display:grid;place-items:center;padding:24px;color:var(--gemboss-text-muted);font-size:14px}.gb-dock-sr{position:absolute;left:0;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@media (max-width: 420px){.gb-dock-status{display:none}}@media (max-width: 760px){.gb-dock{right:8px;left:8px;width:auto;padding-bottom:env(safe-area-inset-bottom);border-radius:12px 12px 0 0}.gb-dock-mini{width:auto}.gb-dock-full{inset:56px 0 0;border-radius:0}.gb-dock-side{left:0;right:0;width:auto;border-left:0;border-radius:0}.gb-dock-sidegrip,.gb-dock-pinside{display:none}.gb-dock-menu-list>.gb-dock-pinside{display:none}}@media (min-width: 761px) and (max-width: 1099.98px){.gb-dock-side{left:240px;width:auto}.gb-dock-side .gb-dock-sidegrip,.gb-dock-pinside{display:none}.gb-dock-menu-list>.gb-dock-pinside{display:none}}.gb-assistant-launcher{display:inline-flex;align-items:center;gap:8px;border:0;cursor:pointer;font-family:var(--gemboss-font-sans, system-ui, sans-serif)}.gb-assistant-launcher svg{flex:0 0 auto}.gb-assistant-launcher:focus-visible{outline:2px solid var(--gemboss-accent, #5661f5);outline-offset:2px}.gb-assistant-launcher--rail{width:100%;min-height:44px;margin:8px 0 4px;padding:0 12px;border-radius:var(--gemboss-radius-md, 8px);background:var(--gemboss-accent-soft);color:var(--gemboss-accent-strong);font-size:13px;font-weight:600;line-height:1;text-align:left}.gb-assistant-launcher--rail:hover{background:color-mix(in srgb,var(--gemboss-accent) 16%,var(--gemboss-surface))}.gb-assistant-launcher--rail .gb-assistant-launcher-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gb-assistant-launcher-kbd{font:inherit;font-size:11px;opacity:.7;border:1px solid currentColor;border-radius:5px;padding:1px 5px}.gb-assistant-launcher--topbar{display:none;position:relative;justify-content:center;flex:0 0 auto;width:44px;height:44px;padding:0;border-radius:var(--gemboss-radius-md, 8px);background:transparent;color:var(--gemboss-text, #1b1c1e)}.gb-assistant-launcher--topbar:hover,.gb-assistant-launcher--topbar:active{background:var(--gemboss-hover, #eceef2)}.gb-assistant-launcher--topbar .gb-assistant-launcher-label,.gb-assistant-launcher--topbar .gb-assistant-launcher-kbd{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}@media (max-width: 760px){.gb-assistant-launcher--rail{display:none}.gb-assistant-launcher--topbar{display:inline-flex}}
|
|
1
|
+
.gb-dock{position:fixed;z-index:320;right:24px;bottom:0;width:min(460px,calc(100vw - 288px));display:flex;flex-direction:column;min-height:0;background:var(--gemboss-surface);background:color-mix(in srgb,var(--gemboss-surface) 93%,transparent);-webkit-backdrop-filter:blur(14px) saturate(1.4);backdrop-filter:blur(14px) saturate(1.4);border:1px solid var(--gemboss-divider);border-bottom:0;border-radius:12px 12px 0 0;box-shadow:0 -2px 6px #0f172a0d,0 24px 64px #0f172a2e;overflow:hidden;transition:transform .14s cubic-bezier(.2,.8,.3,1),opacity .14s ease-out}@starting-style{.gb-dock-dock,.gb-dock-mini{transform:translateY(10px);opacity:0}.gb-dock-side{transform:translate(12px);opacity:0}}.gb-dock-dragging,.gb-dock-dragging *{transition:none!important}@supports not ((backdrop-filter: blur(1px)) or (-webkit-backdrop-filter: blur(1px))){.gb-dock{background:var(--gemboss-surface)}}@media (prefers-reduced-motion: reduce){.gb-dock{transition:none}}.gb-dock-hidden{display:none}.gb-dock-full{z-index:4;inset:56px 0 0 240px;width:auto;border:0;border-radius:0;box-shadow:none;background:var(--gemboss-app-bg);-webkit-backdrop-filter:none;backdrop-filter:none}.gb-dock-side{z-index:290;top:56px;right:0;bottom:0;width:var(--gb-dock-side-w, 400px);background:var(--gemboss-surface);-webkit-backdrop-filter:none;backdrop-filter:none;border:0;border-left:1px solid var(--gemboss-divider);border-radius:0;box-shadow:none;overflow:visible}.gb-dock-side .gb-dock-body,.gb-dock-side .gb-dock-pane{overflow:hidden}.gb-dock-side .gb-dock-header{cursor:default;touch-action:auto}.gb-dock-side .gb-dock-status{flex:0 0 auto;position:absolute;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}.gb-dock-side .gb-dock-header:active{cursor:default}.gb-dock-side>.gb-dock-sidegrip{position:absolute;top:0;bottom:0;left:-3px;width:5px;z-index:3}@media (min-width: 1100px){body.gemboss-assistant-side .gemboss-platform-main{margin-right:var(--gb-assistant-side-w, 400px)}}.gb-dock-fullchrome{position:absolute;top:10px;right:16px;z-index:1;display:flex;gap:8px}.gb-dock-shrink{display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border:1px solid var(--gemboss-divider);border-radius:var(--gemboss-radius-full);background:var(--gemboss-surface);color:var(--gemboss-text-muted);font:inherit;font-size:var(--gemboss-fs-caption);cursor:pointer;white-space:nowrap}.gb-dock-shrink:hover{background:var(--gemboss-hover);color:var(--gemboss-text)}.gb-dock-shrink:focus-visible{outline:2px solid var(--gemboss-primary);outline-offset:2px}.gb-dock-shrink svg{width:16px;height:16px;flex:0 0 auto}.gb-dock-menu-actions .gb-dock-shrink{display:flex;border:0;border-radius:8px}@media (max-width: 560px){.gb-dock-fullchrome{position:static;justify-content:flex-end;padding:8px 12px 0}.gb-dock-full .gemboss-assistant-layout>.gemboss-assistant-rail{position:absolute;top:8px;left:12px;z-index:1;width:auto;flex:none;padding:0;border:0}.gb-dock-full .gemboss-assistant-layout>.gemboss-assistant-rail .gemboss-assistant-newchat{width:44px;min-height:44px;padding:0;border-radius:var(--gemboss-radius-full)}}.gb-dock-mini{height:auto;width:min(320px,calc(100vw - 288px));-webkit-backdrop-filter:blur(14px) saturate(1.4);backdrop-filter:blur(14px) saturate(1.4);border-radius:12px 12px 0 0}.gb-dock-mini .gb-dock-body{display:none}.gb-dock-minirow{display:flex;align-items:center;padding-right:4px}.gb-dock-minirow .gb-dock-minibar{flex:1 1 auto;min-width:0}.gb-dock-minirow .gb-dock-icon{flex:0 0 auto}.gb-dock-minibar{display:flex;align-items:center;gap:8px;width:100%;min-height:48px;padding:0 12px;border:0;background:transparent;font:inherit;color:var(--gemboss-text-strong);cursor:pointer;text-align:left}.gb-dock-minibar:hover{background:var(--gemboss-hover)}.gb-dock-minibar strong{font-size:13px;font-weight:600;flex:0 0 auto}.gb-dock-ministatus{flex:1 1 auto;min-width:0;font-size:12px;color:var(--gemboss-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gb-dock-minichevron{display:flex;color:var(--gemboss-text-muted)}.gb-dock-grip{position:absolute;top:0;left:0;right:0;height:14px;z-index:2;display:grid;place-items:center;cursor:ns-resize;touch-action:none;background:transparent}.gb-dock-grip>span{display:block;width:44px;height:4px;border-radius:2px;background:var(--gemboss-divider)}.gb-dock-grip:hover>span,.gb-dock-grip:focus-visible>span{background:var(--gemboss-text-muted)}.gb-dock-grip:focus-visible{outline:2px solid var(--gemboss-primary);outline-offset:-2px}.gb-dock-header{flex:0 0 auto;cursor:grab;touch-action:none;user-select:none;display:flex;align-items:center;gap:8px;padding:0 4px 0 16px;min-height:48px;border-bottom:1px solid var(--gemboss-divider);background:transparent}.gb-dock-title{font-size:13px;font-weight:600;color:var(--gemboss-text-strong);white-space:nowrap;flex:0 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis}.gb-dock-status{flex:1 1 auto;min-width:0;font-size:12px;color:var(--gemboss-text-muted);overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gb-dock-header:active{cursor:grabbing}.gb-dock-actions{display:flex;align-items:center;gap:2px;cursor:default;margin-left:auto}.gb-dock-action{margin-right:8px}.gb-dock-menu{position:relative}.gb-dock-menu>summary{list-style:none}.gb-dock-menu>summary::-webkit-details-marker{display:none}.gb-dock-menu[open]>summary{color:var(--gemboss-text-strong);background:var(--gemboss-hover)}.gb-dock-menu-list{position:absolute;top:calc(100% + 4px);right:0;z-index:5;display:grid;min-width:220px;padding:6px;box-sizing:border-box;cursor:default}.gb-dock-menu-list>.ui-menu__item{border-radius:8px}.gb-dock-menu-list>.ui-menu__item:disabled{opacity:.5;cursor:not-allowed;background:transparent}.gb-dock-menu-sep{height:1px;margin:4px 0;border:0;background:var(--gemboss-divider)}.gb-dock-menu-pill{width:44px;padding:0;justify-content:center}.gb-dock-menu-pill svg{width:18px;height:18px}.gb-dock-icon{width:44px;height:44px;display:grid;place-items:center;border:0;border-radius:8px;background:transparent;color:var(--gemboss-text-muted);cursor:pointer;padding:0}.gb-dock-icon:hover{background:var(--gemboss-hover);color:var(--gemboss-text-strong)}.gb-dock-icon:focus-visible{outline:2px solid var(--gemboss-primary);outline-offset:-2px}.gb-dock-icon svg{width:18px;height:18px}.gb-dock-icon-on{color:var(--gemboss-active-fg);background:var(--gemboss-active-bg)}.gb-dock-dot{flex:0 0 auto;width:8px;height:8px;border-radius:50%;background:var(--gemboss-divider)}.gb-dock-dot-busy{background:var(--gemboss-primary);animation:gb-dock-pulse 1.4s ease-in-out infinite}.gb-dock-dot-unread{background:var(--gemboss-success-strong)}@keyframes gb-dock-pulse{0%,to{opacity:1}50%{opacity:.35}}@media (prefers-reduced-motion: reduce){.gb-dock-dot-busy{animation:none}}.gb-dock-tabs{flex:0 0 auto;display:flex;gap:4px;padding:0 8px;border-bottom:1px solid var(--gemboss-divider)}.gb-dock-tab{position:relative;display:inline-flex;align-items:center;gap:6px;min-height:44px;padding:0 12px;border:0;border-bottom:2px solid transparent;background:transparent;color:var(--gemboss-text-muted);font:inherit;font-size:13px;cursor:pointer;white-space:nowrap}.gb-dock-tab:hover{color:var(--gemboss-text-strong)}.gb-dock-tab[aria-selected=true]{color:var(--gemboss-text-strong);font-weight:600;border-bottom-color:var(--gemboss-primary)}.gb-dock-tab:focus-visible{outline:2px solid var(--gemboss-primary);outline-offset:-2px}.gb-dock-badge{min-width:18px;padding:0 6px;border-radius:var(--gemboss-radius-full);background:var(--gemboss-primary);color:var(--gemboss-on-primary, #fff);font-size:11px;font-weight:700;line-height:18px;text-align:center}.gb-dock-body{flex:1 1 auto;min-height:0;display:flex;min-width:0}.gb-dock-body>*{flex:1 1 auto;min-width:0;min-height:0}.gb-dock-pane{display:flex;min-width:0;min-height:0}.gb-dock-pane>*{flex:1 1 auto;min-width:0;min-height:0}.gb-dock-body .gemboss-assistant-layout,.gb-dock-body .gemboss-assistant-page{height:auto;min-height:0}.gb-dock-pane[hidden]{display:none}.gb-dock-booting{flex:1 1 auto;display:grid;place-items:center;padding:24px;color:var(--gemboss-text-muted);font-size:14px}.gb-dock-sr{position:absolute;left:0;width:1px;height:1px;padding:0;margin:-1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap;border:0}@media (max-width: 420px){.gb-dock-status{display:none}}@media (max-width: 760px){.gb-dock{right:8px;left:8px;width:auto;padding-bottom:env(safe-area-inset-bottom);border-radius:12px 12px 0 0}.gb-dock-mini{width:auto}.gb-dock-full{inset:56px 0 0;border-radius:0}.gb-dock-side{left:0;right:0;width:auto;border-left:0;border-radius:0}.gb-dock-sidegrip,.gb-dock-pinside{display:none}.gb-dock-menu-list>.gb-dock-pinside{display:none}}@media (min-width: 761px) and (max-width: 1099.98px){.gb-dock-side{left:240px;width:auto}.gb-dock-side .gb-dock-sidegrip,.gb-dock-pinside{display:none}.gb-dock-menu-list>.gb-dock-pinside{display:none}}.gb-assistant-launcher{display:inline-flex;align-items:center;gap:8px;border:0;cursor:pointer;font-family:var(--gemboss-font-sans, system-ui, sans-serif)}.gb-assistant-launcher svg{flex:0 0 auto}.gb-assistant-launcher:focus-visible{outline:2px solid var(--gemboss-accent, #5661f5);outline-offset:2px}.gb-assistant-launcher--rail{width:100%;min-height:44px;margin:8px 0 4px;padding:0 12px;border-radius:var(--gemboss-radius-md, 8px);background:var(--gemboss-accent-soft);color:var(--gemboss-accent-strong);font-size:13px;font-weight:600;line-height:1;text-align:left}.gb-assistant-launcher--rail:hover{background:color-mix(in srgb,var(--gemboss-accent) 16%,var(--gemboss-surface))}.gb-assistant-launcher--rail .gb-assistant-launcher-label{flex:1 1 auto;min-width:0;overflow:hidden;text-overflow:ellipsis;white-space:nowrap}.gb-assistant-launcher-kbd{font:inherit;font-size:11px;opacity:.7;border:1px solid currentColor;border-radius:5px;padding:1px 5px}.gb-assistant-launcher--topbar{display:none;position:relative;justify-content:center;flex:0 0 auto;width:44px;height:44px;padding:0;border-radius:var(--gemboss-radius-md, 8px);background:transparent;color:var(--gemboss-text, #1b1c1e)}.gb-assistant-launcher--topbar:hover,.gb-assistant-launcher--topbar:active{background:var(--gemboss-hover, #eceef2)}.gb-assistant-launcher--topbar .gb-assistant-launcher-label,.gb-assistant-launcher--topbar .gb-assistant-launcher-kbd{position:absolute;width:1px;height:1px;overflow:hidden;clip:rect(0 0 0 0);white-space:nowrap}@media (max-width: 760px){.gb-assistant-launcher--rail{display:none}.gb-assistant-launcher--topbar{display:inline-flex}}
|
package/src/auth-field.css
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
.gb-auth-pages{position:absolute;inset:0;overflow:hidden;pointer-events:none;perspective:1600px;perspective-origin:60% 40%}.gb-auth-pages-plane{position:absolute;left:70%;top:50%;width:min(140%,1240px);display:grid;grid-template-columns:repeat(var(--gb-pages-n, 5),minmax(0,1fr));align-items:start;column-gap:20px;transform-style:preserve-3d;transform:translate(-50%,-50%) rotateX(calc(52deg - var(--gb-fy, 0) * 3deg)) rotate(calc(-20deg + var(--gb-fx, 0) * 3deg));transition:transform 1.2s cubic-bezier(.25,1,.5,1)}.gb-auth-pages-col{display:flex;flex-direction:column;will-change:transform;animation:gb-pages-lap 100s linear infinite}.gb-auth-pages-col:nth-child(2n){margin-top:18%;animation-duration:120s;animation-direction:reverse}.gb-auth-pages-col:nth-child(3){margin-top:-14%;animation-duration:130s}.gb-auth-pages-col img{display:block;width:100%;height:auto;aspect-ratio:3 / 4;margin:0 0 20px;border-radius:10px;object-fit:cover;object-position:50% 0;background:#1b1c22;box-shadow:0 0 0 1px #ffffff14,0 30px 60px -20px #000c}@keyframes gb-pages-lap{to{transform:translate3d(0,-50%,0)}}.gb-auth-pages-veil{position:absolute;inset:0;background:radial-gradient(70% 60% at 88% 0%,rgba(86,97,245,.26),transparent 70%),linear-gradient(90deg,#0b0b0c,#0b0b0cf2 34%,#0b0b0cb8 58%,#0b0b0c33 84%,#0b0b0c4d),linear-gradient(180deg,#0b0b0c,#0b0b0c00 22% 74%,#0b0b0c)}.gb-auth-pages~.gb-auth-panel-in{z-index:1;text-shadow:0 1px 24px rgba(11,11,12,.9)}.gb-auth-pages~.gb-auth-panel-in .gb-auth-panel-h{text-wrap:balance}.gb-auth-pages~.gb-auth-panel-in .gb-auth-panel-p{max-width:34ch}@media (prefers-reduced-motion: no-preference){.gb-auth--alive .gb-auth-header>*,.gb-auth--alive .gb-auth-form>*,.gb-auth--alive .gb-auth-stage>*>:not(.gb-auth-header):not(.gb-auth-form),.gb-auth--alive .gb-auth-panel-in>*{animation:gb-auth-rise .7s cubic-bezier(.25,1,.5,1) both}.gb-auth--alive .gb-auth-header>:nth-child(2){animation-delay:.06s}.gb-auth--alive .gb-auth-header>:nth-child(3){animation-delay:.12s}.gb-auth--alive .gb-auth-form>:nth-child(1){animation-delay:.16s}.gb-auth--alive .gb-auth-form>:nth-child(2){animation-delay:.21s}.gb-auth--alive .gb-auth-form>:nth-child(3){animation-delay:.26s}.gb-auth--alive .gb-auth-form>:nth-child(4){animation-delay:.31s}.gb-auth--alive .gb-auth-form>:nth-child(n+5){animation-delay:.36s}.gb-auth--alive .gb-auth-stage>*>:not(.gb-auth-header):not(.gb-auth-form){animation-delay:.4s}.gb-auth--alive .gb-auth-panel-in>:nth-child(1){animation-delay:.2s}.gb-auth--alive .gb-auth-panel-in>:nth-child(2){animation-delay:.28s}.gb-auth--alive .gb-auth-panel-in>:nth-child(3){animation-delay:.36s}.gb-auth--alive .gb-auth-pages{animation:gb-auth-fade 1.6s ease .1s both}
|
|
1
|
+
.gb-auth-pages{position:absolute;inset:0;overflow:hidden;pointer-events:none;perspective:1600px;perspective-origin:60% 40%}.gb-auth-pages-plane{position:absolute;left:70%;top:50%;width:min(140%,1240px);display:grid;grid-template-columns:repeat(var(--gb-pages-n, 5),minmax(0,1fr));align-items:start;column-gap:20px;transform-style:preserve-3d;transform:translate(-50%,-50%) rotateX(calc(52deg - var(--gb-fy, 0) * 3deg)) rotate(calc(-20deg + var(--gb-fx, 0) * 3deg));transition:transform 1.2s cubic-bezier(.25,1,.5,1)}.gb-auth-pages-col{display:flex;flex-direction:column;will-change:transform;animation:gb-pages-lap 100s linear infinite}.gb-auth-pages-col:nth-child(2n){margin-top:18%;animation-duration:120s;animation-direction:reverse}.gb-auth-pages-col:nth-child(3){margin-top:-14%;animation-duration:130s}.gb-auth-pages-col img{display:block;width:100%;height:auto;aspect-ratio:3 / 4;margin:0 0 20px;border-radius:10px;object-fit:cover;object-position:50% 0;background:#1b1c22;box-shadow:0 0 0 1px #ffffff14,0 30px 60px -20px #000c}@keyframes gb-pages-lap{to{transform:translate3d(0,-50%,0)}}.gb-auth-pages-veil{position:absolute;inset:0;background:radial-gradient(70% 60% at 88% 0%,rgba(86,97,245,.26),transparent 70%),linear-gradient(90deg,#0b0b0c,#0b0b0cf2 34%,#0b0b0cb8 58%,#0b0b0c33 84%,#0b0b0c4d),linear-gradient(180deg,#0b0b0c,#0b0b0c00 22% 74%,#0b0b0c)}.gb-auth-pages~.gb-auth-panel-in{z-index:1;text-shadow:0 1px 24px rgba(11,11,12,.9)}.gb-auth-pages~.gb-auth-panel-in .gb-auth-panel-h{text-wrap:balance}.gb-auth-pages~.gb-auth-panel-in .gb-auth-panel-p{max-width:34ch}@media (prefers-reduced-motion: no-preference){.gb-auth--alive .gb-auth-header>*,.gb-auth--alive .gb-auth-form>*,.gb-auth--alive .gb-auth-stage>*>:not(.gb-auth-header):not(.gb-auth-form),.gb-auth--alive .gb-auth-panel-in>*{animation:gb-auth-rise .7s cubic-bezier(.25,1,.5,1) both}.gb-auth--alive .gb-auth-header>:nth-child(2){animation-delay:.06s}.gb-auth--alive .gb-auth-header>:nth-child(3){animation-delay:.12s}.gb-auth--alive .gb-auth-form>:nth-child(1){animation-delay:.16s}.gb-auth--alive .gb-auth-form>:nth-child(2){animation-delay:.21s}.gb-auth--alive .gb-auth-form>:nth-child(3){animation-delay:.26s}.gb-auth--alive .gb-auth-form>:nth-child(4){animation-delay:.31s}.gb-auth--alive .gb-auth-form>:nth-child(n+5){animation-delay:.36s}.gb-auth--alive .gb-auth-stage>*>:not(.gb-auth-header):not(.gb-auth-form){animation-delay:.4s}.gb-auth--alive .gb-auth-panel-in>:nth-child(1){animation-delay:.2s}.gb-auth--alive .gb-auth-panel-in>:nth-child(2){animation-delay:.28s}.gb-auth--alive .gb-auth-panel-in>:nth-child(3){animation-delay:.36s}.gb-auth--alive .gb-auth-pages{animation:gb-auth-fade 1.6s ease .1s both}}@keyframes gb-auth-rise{0%{opacity:0;transform:translateY(12px)}to{opacity:1;transform:none}}@keyframes gb-auth-fade{0%{opacity:0}to{opacity:1}}@media (prefers-reduced-motion: reduce){.gb-auth-pages-col{animation:none}.gb-auth-pages-plane{transition:none}}
|