@g9tm/aiassistant-react 1.10.0 → 1.12.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/icons.d.ts +3 -0
- package/dist/icons.js +22 -0
- package/dist/index.d.ts +2 -1
- package/dist/index.js +1 -1
- package/dist/parts.d.ts +10 -2
- package/dist/parts.js +17 -10
- package/dist/styles.d.ts +1 -1
- package/dist/styles.js +77 -34
- package/dist/surfaces.d.ts +5 -1
- package/dist/surfaces.js +4 -4
- package/package.json +2 -2
package/dist/icons.d.ts
ADDED
|
@@ -0,0 +1,3 @@
|
|
|
1
|
+
export type IconName = "mark" | "new" | "download" | "close" | "attach" | "send" | "stop" | "mic" | "copy" | "check" | "good" | "bad" | "again" | "edit";
|
|
2
|
+
/** The path of an icon (empty for a name it does not know). */
|
|
3
|
+
export declare function iconPath(name: IconName): string;
|
package/dist/icons.js
ADDED
|
@@ -0,0 +1,22 @@
|
|
|
1
|
+
// The panel's line icons (24-unit grid, drawn with the text colour), inline so no image or font is loaded. The React
|
|
2
|
+
// renderer keeps the same file (tests/ts/client/renderer-parity.test.ts).
|
|
3
|
+
const PATHS = new Map([
|
|
4
|
+
["mark", "M12 3.5l1.9 5.1 5.1 1.9-5.1 1.9-1.9 5.1-1.9-5.1-5.1-1.9 5.1-1.9zM18.5 15.5l.8 2 2 .8-2 .8-.8 2-.8-2-2-.8 2-.8z"],
|
|
5
|
+
["new", "M12 4H6a2 2 0 0 0-2 2v12a2 2 0 0 0 2 2h12a2 2 0 0 0 2-2v-6M17.6 3.4a2 2 0 0 1 2.9 2.9L12 14.8l-3.7.9.9-3.7z"],
|
|
6
|
+
["download", "M12 4v11M7 10.5l5 5 5-5M5 20h14"],
|
|
7
|
+
["close", "M6.5 6.5l11 11M17.5 6.5l-11 11"],
|
|
8
|
+
["attach", "M20 11.4l-8 8a5 5 0 0 1-7.1-7.1l8.3-8.3a3.3 3.3 0 0 1 4.7 4.7l-8.3 8.3a1.7 1.7 0 0 1-2.4-2.4l7.6-7.6"],
|
|
9
|
+
["send", "M12 19V5.5M6 11.5l6-6 6 6"],
|
|
10
|
+
["stop", "M8 8h8v8H8z"],
|
|
11
|
+
["mic", "M12 3.5a3 3 0 0 0-3 3V12a3 3 0 0 0 6 0V6.5a3 3 0 0 0-3-3zM5.5 11.5a6.5 6.5 0 0 0 13 0M12 18v2.5"],
|
|
12
|
+
["copy", "M9 9h10.5v10.5H9zM15 9V5H4.5v10.5H9"],
|
|
13
|
+
["check", "M5 12.5l4.5 4.5L19 7.5"],
|
|
14
|
+
["good", "M7.5 10.5v9h-3v-9zM7.5 10.5l3.8-6.6a1.9 1.9 0 0 1 3.4 1.5l-.9 3.6h5a1.8 1.8 0 0 1 1.8 2.1l-1.2 6.3a2 2 0 0 1-2 1.6H7.5"],
|
|
15
|
+
["bad", "M7.5 13.5v-9h-3v9zM7.5 13.5l3.8 6.6a1.9 1.9 0 0 0 3.4-1.5l-.9-3.6h5a1.8 1.8 0 0 0 1.8-2.1l-1.2-6.3a2 2 0 0 0-2-1.6H7.5"],
|
|
16
|
+
["again", "M4.5 12a7.5 7.5 0 0 1 13-5.1L19.5 9M19.5 4.5V9H15M19.5 12a7.5 7.5 0 0 1-13 5.1L4.5 15M4.5 19.5V15H9"],
|
|
17
|
+
["edit", "M4.5 19.5h4l10-10a2.8 2.8 0 0 0-4-4l-10 10zM13 7l4 4"],
|
|
18
|
+
]);
|
|
19
|
+
/** The path of an icon (empty for a name it does not know). */
|
|
20
|
+
export function iconPath(name) {
|
|
21
|
+
return PATHS.get(name) ?? "";
|
|
22
|
+
}
|
package/dist/index.d.ts
CHANGED
|
@@ -1,8 +1,9 @@
|
|
|
1
1
|
/** @g9tm/aiassistant-react: React DOM components of the G9 AI assistant, customisable in five layers like the Svelte ones. */
|
|
2
2
|
export { AssistantRoot, AssistantChat, AssistantPanel, MessageList, Surfaces } from "./surfaces.js";
|
|
3
3
|
export type { AssistantPanelProps, AssistantRootProps, SurfaceKind, SurfaceProps } from "./surfaces.js";
|
|
4
|
-
export { Composer, Message, ModelPicker, PdfButton, RevealText, Small, StagesThinking, ThinkingOrb, WorkCard } from "./parts.js";
|
|
4
|
+
export { Composer, Icon, Message, ModelPicker, PdfButton, RevealText, Small, StagesThinking, ThinkingOrb, WorkCard } from "./parts.js";
|
|
5
5
|
export type { ComposerProps, SmallKind } from "./parts.js";
|
|
6
|
+
export type { IconName } from "./icons.js";
|
|
6
7
|
export { BlockView, Chart, CsvButton, TextView, TourCard } from "./blocks.js";
|
|
7
8
|
export type { ChartView, CsvButtonProps } from "./blocks.js";
|
|
8
9
|
export { ApprovalCard, Cards } from "./cards.js";
|
package/dist/index.js
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
/** @g9tm/aiassistant-react: React DOM components of the G9 AI assistant, customisable in five layers like the Svelte ones. */
|
|
2
2
|
export { AssistantRoot, AssistantChat, AssistantPanel, MessageList, Surfaces } from "./surfaces.js";
|
|
3
|
-
export { Composer, Message, ModelPicker, PdfButton, RevealText, Small, StagesThinking, ThinkingOrb, WorkCard } from "./parts.js";
|
|
3
|
+
export { Composer, Icon, Message, ModelPicker, PdfButton, RevealText, Small, StagesThinking, ThinkingOrb, WorkCard } from "./parts.js";
|
|
4
4
|
export { BlockView, Chart, CsvButton, TextView, TourCard } from "./blocks.js";
|
|
5
5
|
export { ApprovalCard, Cards } from "./cards.js";
|
|
6
6
|
export { Dialog, PinPad, SecretField } from "./slots.js";
|
package/dist/parts.d.ts
CHANGED
|
@@ -5,6 +5,11 @@
|
|
|
5
5
|
import type { ReactNode } from "react";
|
|
6
6
|
import type { AssistantState, MessageView, PlanView, Provenance, RunView } from "@g9tm/aiassistant";
|
|
7
7
|
import type { Part } from "./context.js";
|
|
8
|
+
import type { IconName } from "./icons.js";
|
|
9
|
+
/** One line icon, drawn in the text colour; hidden from screen readers (its button carries the words). */
|
|
10
|
+
export declare function Icon(props: {
|
|
11
|
+
name: IconName;
|
|
12
|
+
}): ReactNode;
|
|
8
13
|
/** Reveals an answer that arrived in front of the person over about 1.5 s; history and reduced motion show it whole. */
|
|
9
14
|
export declare function RevealText(props: {
|
|
10
15
|
text: string;
|
|
@@ -29,7 +34,8 @@ export declare const StagesThinking: Part<{
|
|
|
29
34
|
* "still working". The clock starts again when another run comes into the same card.
|
|
30
35
|
*/
|
|
31
36
|
export declare function WorkCard(props: {
|
|
32
|
-
run: RunView;
|
|
37
|
+
run: RunView; /** Its own Stop button (off inside the chat, where send turns into Stop). */
|
|
38
|
+
stop?: boolean;
|
|
33
39
|
}): ReactNode;
|
|
34
40
|
/** One message: its text (revealed only when it arrived in front of the person), blocks, card, provenance and feedback. */
|
|
35
41
|
export declare function Message(props: {
|
|
@@ -61,4 +67,6 @@ export declare function ModelPicker(props: {
|
|
|
61
67
|
* "Download PDF" of the open conversation, once it has messages: the server's signed link (ten minutes), opened by the
|
|
62
68
|
* host. Busy while the link is asked for; a notice if it could not be made. Hidden when the host cannot open links.
|
|
63
69
|
*/
|
|
64
|
-
export declare const PdfButton: Part<
|
|
70
|
+
export declare const PdfButton: Part<{
|
|
71
|
+
icon?: boolean;
|
|
72
|
+
}>;
|
package/dist/parts.js
CHANGED
|
@@ -4,11 +4,16 @@ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-run
|
|
|
4
4
|
* work card, the composer, the model picker, the PDF button, the small chips, the thinking orb and the stages.
|
|
5
5
|
*/
|
|
6
6
|
import { useEffect, useRef, useState } from "react";
|
|
7
|
-
import { can, finished, LONG_RUNNING_MS, obj, REVEAL_MS, str,
|
|
8
|
-
import { askAgain, atWord, chatOf, composerOf, editLast, FEEDBACK_REASONS, matchQuick, pageCalls, pageTexts, pickRefs, putPick, rateAnswer, ratingsOf, readModels, refsIn, slashQuery, statusOf } from "@g9tm/aiassistant/pages";
|
|
7
|
+
import { can, finished, LONG_RUNNING_MS, obj, REVEAL_MS, str, windowView } from "@g9tm/aiassistant";
|
|
8
|
+
import { askAgain, atWord, chatOf, composerOf, editLast, FEEDBACK_REASONS, matchQuick, pageCalls, pageTexts, pickRefs, putPick, rateAnswer, ratingsOf, readModels, refsIn, slashQuery, statusOf, visibleText } from "@g9tm/aiassistant/pages";
|
|
9
9
|
import { BlockView, TextView } from "./blocks.js";
|
|
10
10
|
import { ApprovalCard, Cards } from "./cards.js";
|
|
11
11
|
import { cls, override, sty, swappable, useSnapshot, useUi } from "./context.js";
|
|
12
|
+
import { iconPath } from "./icons.js";
|
|
13
|
+
/** One line icon, drawn in the text colour; hidden from screen readers (its button carries the words). */
|
|
14
|
+
export function Icon(props) {
|
|
15
|
+
return (_jsx("svg", { className: "g9a-icon", "data-icon": props.name, viewBox: "0 0 24 24", width: "18", height: "18", fill: props.name === "stop" ? "currentColor" : "none", stroke: "currentColor", strokeWidth: "1.8", strokeLinecap: "round", strokeLinejoin: "round", "aria-hidden": "true", focusable: "false", children: _jsx("path", { d: iconPath(props.name) }) }));
|
|
16
|
+
}
|
|
12
17
|
/** The time now, ticking every `ms` while `on` (for elapsed time and reveal); still while it is off. */
|
|
13
18
|
function useNow(ms, on) {
|
|
14
19
|
const [now, setNow] = useState(() => Date.now());
|
|
@@ -80,7 +85,7 @@ export function WorkCard(props) {
|
|
|
80
85
|
const seconds = Math.max(0, Math.round((now - started) / 1000));
|
|
81
86
|
const long = r.longRunning || now - started >= LONG_RUNNING_MS;
|
|
82
87
|
const label = (s) => (s.id === "role" ? t("stage.role", { role: s.role ?? "" }) : t("stage." + s.id));
|
|
83
|
-
return (_jsxs("div", { className: cls(ui, "work"), role: "status", children: [
|
|
88
|
+
return (_jsxs("div", { className: cls(ui, "work"), role: "status", children: [_jsxs("div", { className: "g9a-work-main", children: [_jsxs("div", { className: "g9a-work-head", children: [_jsx(ThinkingOrb, {}), _jsx("strong", { children: long ? t("work.long") : t("work.title") }), _jsx("span", { className: cls(ui, "work.elapsed"), children: t("work.elapsed", { seconds }) })] }), chatOf(ui.assistant).status && statusOf(r) ? _jsx("div", { className: cls(ui, "work.status"), children: pageTexts(ui.texts).t("work.status", { what: t(statusOf(r)?.key ?? "", statusOf(r)?.args) }) }) : null, _jsx("div", { className: "g9a-stages", children: r.stages.filter((s) => s.id !== "waiting").map((s, i) => _jsx("span", { className: cls(ui, "work.stage"), "data-state": s.state, children: label(s) }, i)) }), r.progress ? _jsx("div", { className: cls(ui, "work.progress"), children: t(r.progress.key, r.progress.args) }) : null, r.tools.slice(-3).map((x, i) => _jsx("div", { className: cls(ui, "work.tool"), "data-state": x.state, children: t(x.title.key) === x.title.key ? x.name : t(x.title.key) }, i)), r.streamingText ? _jsx("div", { className: "g9a-stream", children: r.streamingText }) : null] }), props.stop ?? true ? _jsx("button", { type: "button", className: cls(ui, "composer.stop"), onClick: () => void ui.assistant.stop(), children: t("composer.stop") }) : null] }));
|
|
84
89
|
}
|
|
85
90
|
/** One message: its text (revealed only when it arrived in front of the person), blocks, card, provenance and feedback. */
|
|
86
91
|
export function Message(props) {
|
|
@@ -93,7 +98,7 @@ export function Message(props) {
|
|
|
93
98
|
const Approval = override(ui, "ApprovalCard") ?? ApprovalCard;
|
|
94
99
|
const Other = override(ui, "Card") ?? Cards;
|
|
95
100
|
const plan = m.card?.kind === "plan" ? props.plans.get(m.card.id) : undefined;
|
|
96
|
-
return (_jsx("div", { className: cls(ui, "message") + " " + cls(ui, m.role === "user" ? "message.user" : "message.assistant"), "data-kind": m.kind, "data-pending": m.pending, children: m.card ? (plan ? _jsx(Approval, { plan: plan }) : m.card.kind !== "plan" ? _jsx(Other, { card: m.card, runId: props.runId }) : null) : (_jsxs(_Fragment, { children: [m.text.length > 0 ? _jsx("div", { className: cls(ui, "message.text"), children: _jsx(RevealText, { text: m.text, reveal: reveal }) }) : null, m.blocks.map((b, i) => _jsx(BlockView, { block: b, at: m.id + ":" + String(i) }, i)), m.next.length > 0 ? _jsx("div", { className: cls(ui, "block.actions"), children: m.next.map((n) => _jsx("button", { type: "button", className: cls(ui, "block.action"), "data-role": "next", onClick: () => void ui.assistant.send(n), children: n }, n)) }) : null, m.role === "assistant" ? (_jsxs("div", { className: cls(ui, "message.feedback"), children: [_jsx(Small, { kind: "provenance", provenance: m.provenance }), ui.assistant.host.copy ? _jsx("button", { type: "button", "data-role": "copy", onClick: () => { void ui.assistant.host.copy?.(m.text); setCopied(true); }, children: copied ? "
|
|
101
|
+
return (_jsx("div", { className: cls(ui, "message") + " " + cls(ui, m.role === "user" ? "message.user" : "message.assistant"), "data-kind": m.kind, "data-pending": m.pending, children: m.card ? (plan ? _jsx(Approval, { plan: plan }) : m.card.kind !== "plan" ? _jsx(Other, { card: m.card, runId: props.runId }) : null) : (_jsxs(_Fragment, { children: [m.text.length > 0 ? _jsx("div", { className: cls(ui, "message.text"), children: _jsx(RevealText, { text: m.text, reveal: reveal }) }) : null, m.blocks.map((b, i) => _jsx(BlockView, { block: b, at: m.id + ":" + String(i) }, i)), m.next.length > 0 ? _jsx("div", { className: cls(ui, "block.actions"), children: m.next.map((n) => _jsx("button", { type: "button", className: cls(ui, "block.action"), "data-role": "next", onClick: () => void ui.assistant.send(n), children: n }, n)) }) : null, m.role === "assistant" ? (_jsxs("div", { className: cls(ui, "message.feedback"), children: [_jsx(Small, { kind: "provenance", provenance: m.provenance }), ui.assistant.host.copy ? _jsx("button", { type: "button", className: "g9a-icon-button", "data-role": "copy", "aria-label": t("feedback.copy"), title: t("feedback.copy"), onClick: () => { void ui.assistant.host.copy?.(m.text); setCopied(true); }, children: _jsx(Icon, { name: copied ? "check" : "copy" }) }) : null, m.provenance === "learned" ? _jsx("button", { type: "button", "data-role": "feedback", onClick: () => void ui.assistant.notRight(m.id), children: t("feedback.not_right") }) : null, props.last && chatOf(ui.assistant).again && !m.pending ? _jsxs(_Fragment, { children: [_jsx("button", { type: "button", className: "g9a-icon-button", "data-role": "again", "aria-label": pageTexts(ui.texts).t("message.again"), title: pageTexts(ui.texts).t("message.again"), onClick: () => void askAgain(ui.assistant), children: _jsx(Icon, { name: "again" }) }), _jsx("button", { type: "button", className: "g9a-icon-button", "data-role": "edit", "aria-label": pageTexts(ui.texts).t("message.edit"), title: pageTexts(ui.texts).t("message.edit"), onClick: () => editLast(ui.assistant), children: _jsx(Icon, { name: "edit" }) })] }) : null] })) : null, m.role === "assistant" && chatOf(ui.assistant).feedback && !m.pending && m.id ? _jsx(RateRow, { message: m }) : null] })) }));
|
|
97
102
|
}
|
|
98
103
|
/** «Helpful?» under an answer (`chat.feedback`): 👍 / 👎, a 👎's reasons in the same row, then thanks. */
|
|
99
104
|
function RateRow(props) {
|
|
@@ -107,7 +112,7 @@ function RateRow(props) {
|
|
|
107
112
|
if (rating === "asking") {
|
|
108
113
|
return (_jsxs("div", { className: cls(ui, "message.rate"), children: [_jsx("span", { children: t("feedback.why") }), FEEDBACK_REASONS.map((r) => _jsx("button", { type: "button", "data-role": "reason", onClick: () => void rateAnswer(ui.assistant, props.message, false, r), children: t("feedback.reason." + r) }, r)), _jsx("button", { type: "button", "data-role": "reason", onClick: () => void rateAnswer(ui.assistant, props.message, false, null), children: t("feedback.skip") })] }));
|
|
109
114
|
}
|
|
110
|
-
return (_jsxs("div", { className: cls(ui, "message.rate"), children: [_jsx("span", { children: t("feedback.ask") }), _jsx("button", { type: "button", "data-role": "good", "aria-label": t("feedback.good"), onClick: () => void rateAnswer(ui.assistant, props.message, true), children: "
|
|
115
|
+
return (_jsxs("div", { className: cls(ui, "message.rate"), children: [_jsx("span", { children: t("feedback.ask") }), _jsx("button", { type: "button", className: "g9a-icon-button", "data-role": "good", "aria-label": t("feedback.good"), title: t("feedback.good"), onClick: () => void rateAnswer(ui.assistant, props.message, true), children: _jsx(Icon, { name: "good" }) }), _jsx("button", { type: "button", className: "g9a-icon-button", "data-role": "bad", "aria-label": t("feedback.bad"), title: t("feedback.bad"), onClick: () => void rateAnswer(ui.assistant, props.message, false), children: _jsx(Icon, { name: "bad" }) })] }));
|
|
111
116
|
}
|
|
112
117
|
/** The composer: input, attach (only when the host can pick a file), mic (only when the host or the server can dictate), send or stop. */
|
|
113
118
|
export function Composer(props) {
|
|
@@ -188,11 +193,11 @@ export function Composer(props) {
|
|
|
188
193
|
const stop = (await host.record?.().catch(() => null)) ?? null;
|
|
189
194
|
setRecording(() => stop);
|
|
190
195
|
};
|
|
191
|
-
return (_jsxs("form", { className: cls(ui, "composer"), style: sty(ui, "composer"), onSubmit: (e) => { e.preventDefault(); void send(); }, children: [props.attachments.length > 0 ? (_jsx("div", { className: cls(ui, "file-chips"), children: props.attachments.map((a) => _jsxs("span", { className: cls(ui, "file-chip"), children: [a.name, _jsx("button", { type: "button", "aria-label": t("files.remove"), onClick: () => ui.assistant.detach(a.id), children: "\u00D7" })] }, a.id)) })) : null, quick.length > 0 || found.length > 0 ? (_jsxs("div", { className: cls(ui, "composer.menu"), role: "listbox", children: [quick.map((q) => _jsx("button", { type: "button", "data-role": "quick", onClick: () => { setText(""); void ui.assistant.ask(q.send); }, children: q.label }, q.label)), found.map((r) => _jsx("button", { type: "button", "data-role": "pick", onClick: () => pickOne(r), children: r.label }, r.kind + ":" + r.id))] })) : null, _jsxs("div", { className: "g9a-composer-row", children: [can(host, "attach") ? _jsx("button", { type: "button", className: cls(ui, "composer.attach"), "aria-label": t("composer.attach"), onClick: () => void ui.assistant.attachFromDevice(), children: "
|
|
196
|
+
return (_jsxs("form", { className: cls(ui, "composer"), style: sty(ui, "composer"), onSubmit: (e) => { e.preventDefault(); void send(); }, children: [props.attachments.length > 0 ? (_jsx("div", { className: cls(ui, "file-chips"), children: props.attachments.map((a) => _jsxs("span", { className: cls(ui, "file-chip"), children: [a.name, _jsx("button", { type: "button", "aria-label": t("files.remove"), onClick: () => ui.assistant.detach(a.id), children: "\u00D7" })] }, a.id)) })) : null, quick.length > 0 || found.length > 0 ? (_jsxs("div", { className: cls(ui, "composer.menu"), role: "listbox", children: [quick.map((q) => _jsx("button", { type: "button", "data-role": "quick", onClick: () => { setText(""); void ui.assistant.ask(q.send); }, children: q.label }, q.label)), found.map((r) => _jsx("button", { type: "button", "data-role": "pick", onClick: () => pickOne(r), children: r.label }, r.kind + ":" + r.id))] })) : null, _jsxs("div", { className: "g9a-composer-row", children: [can(host, "attach") ? _jsx("button", { type: "button", className: cls(ui, "composer.attach"), "aria-label": t("composer.attach"), title: t("composer.attach"), onClick: () => void ui.assistant.attachFromDevice(), children: _jsx(Icon, { name: "attach" }) }) : null, _jsx("textarea", { ref: input, value: text, className: cls(ui, "composer.input"), rows: 1, placeholder: placeholder, "aria-label": placeholder, onChange: (e) => setText(e.currentTarget.value), onKeyDown: (e) => { if (e.key === "Enter" && !e.shiftKey && !e.nativeEvent.isComposing && chat.enterSends !== false) {
|
|
192
197
|
e.preventDefault();
|
|
193
198
|
void send();
|
|
194
|
-
} } }), can(host, "mic") ? _jsx("button", { type: "button", className: cls(ui, "composer.mic"), "aria-label": t("composer.mic"), onClick: () => void dictate(), children: "
|
|
195
|
-
: voice && can(host, "record") ? _jsx("button", { type: "button", className: cls(ui, "composer.mic"), "aria-label": t("composer.mic"), "aria-pressed": recording !== null, onClick: () => void record(), children: recording ? "
|
|
199
|
+
} } }), can(host, "mic") ? _jsx("button", { type: "button", className: cls(ui, "composer.mic"), "aria-label": t("composer.mic"), title: t("composer.mic"), onClick: () => void dictate(), children: _jsx(Icon, { name: "mic" }) })
|
|
200
|
+
: voice && can(host, "record") ? _jsx("button", { type: "button", className: cls(ui, "composer.mic"), "aria-label": t("composer.mic"), "aria-pressed": recording !== null, onClick: () => void record(), children: _jsx(Icon, { name: recording ? "stop" : "mic" }) }) : null, _jsx("button", { type: "submit", className: cls(ui, props.busy ? "composer.stop" : "composer.send"), "aria-label": props.busy ? t("composer.stop") : t("composer.send"), title: props.busy ? t("composer.stop") : t("composer.send"), "data-empty": !props.busy && text.trim().length === 0, children: _jsx(Icon, { name: props.busy ? "stop" : "send" }) })] })] }));
|
|
196
201
|
}
|
|
197
202
|
/**
|
|
198
203
|
* The model and thinking effort for what the person sends next (`assistant.model`, kept on the conversation by the
|
|
@@ -225,7 +230,7 @@ export function ModelPicker(props) {
|
|
|
225
230
|
* "Download PDF" of the open conversation, once it has messages: the server's signed link (ten minutes), opened by the
|
|
226
231
|
* host. Busy while the link is asked for; a notice if it could not be made. Hidden when the host cannot open links.
|
|
227
232
|
*/
|
|
228
|
-
export const PdfButton = swappable("PdfButton", () => {
|
|
233
|
+
export const PdfButton = swappable("PdfButton", (props) => {
|
|
229
234
|
const ui = useUi();
|
|
230
235
|
const t = pageTexts(ui.texts).t;
|
|
231
236
|
const s = useSnapshot(ui.assistant);
|
|
@@ -250,5 +255,7 @@ export const PdfButton = swappable("PdfButton", () => {
|
|
|
250
255
|
}
|
|
251
256
|
setBusy(false);
|
|
252
257
|
};
|
|
253
|
-
return (_jsxs(_Fragment, { children: [
|
|
258
|
+
return (_jsxs(_Fragment, { children: [props.icon
|
|
259
|
+
? _jsx("button", { type: "button", className: "g9a-pdf g9a-icon-button", "aria-busy": busy, disabled: busy, "aria-label": busy ? t("pdf.busy") : t("pdf.download"), title: t("pdf.download"), onClick: () => void download(), children: _jsx(Icon, { name: "download" }) })
|
|
260
|
+
: _jsx("button", { type: "button", className: "g9a-pdf", "aria-busy": busy, disabled: busy, onClick: () => void download(), children: busy ? t("pdf.busy") : t("pdf.download") }), failed ? _jsx("span", { className: "g9a-note g9a-pdf__failed", role: "alert", children: t("pdf.failed") }) : null] }));
|
|
254
261
|
});
|
package/dist/styles.d.ts
CHANGED
|
@@ -2,4 +2,4 @@
|
|
|
2
2
|
* The library's own look, from theme tokens only, all under `.g9a-styled` (no global CSS): the same rules as the
|
|
3
3
|
* Svelte renderer. `unstyled` leaves structure and class names only, and this sheet is not drawn.
|
|
4
4
|
*/
|
|
5
|
-
export declare const STYLES = ".g9a-root { display: contents; }\n.g9a-styled { font-family: var(--g9a-font); font-size: var(--g9a-font-size); color: var(--g9a-ink); line-height: 1.6; }\n.g9a-styled button { font: inherit; cursor: pointer; min-block-size: 38px; padding: 0 12px; border-radius: var(--g9a-radius-s); border: 1px solid var(--g9a-line); background: var(--g9a-surface); color: var(--g9a-ink); }\n.g9a-styled input, .g9a-styled textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--g9a-line); border-radius: var(--g9a-radius-s); background: var(--g9a-surface); color: var(--g9a-ink); }\n.g9a-styled .g9a-panel { box-sizing: border-box; display: flex; flex-direction: column; background: var(--g9a-surface); color: var(--g9a-ink); box-shadow: var(--g9a-shadow); overflow: hidden; }\n.g9a-styled .g9a-panel[data-layout=\"side\"] { position: fixed; inset-block: 0; inset-inline-end: 0; inline-size: min(420px, 100%); border-inline-start: 1px solid var(--g9a-line); }\n.g9a-styled .g9a-panel[data-layout=\"sheet\"] { position: fixed; inset-inline: 0; inset-block-end: 0; block-size: 85vh; border-start-start-radius: 16px; border-start-end-radius: 16px; }\n.g9a-styled .g9a-panel[data-layout=\"fullscreen\"] { position: fixed; inset: 0; }\n.g9a-styled .g9a-panel[data-layout=\"inline\"] { inline-size: 100%; block-size: 100%; box-shadow: none; border: 1px solid var(--g9a-line); border-radius: var(--g9a-radius); }\n.g9a-styled .g9a-panel[data-layout=\"card\"] { border-radius: var(--g9a-radius); border: 1px solid var(--g9a-line); max-block-size: 520px; }\n.g9a-styled .g9a-panel[data-layout=\"compact\"] { box-shadow: none; }\n.g9a-styled .g9a-panel__header { display: flex; align-items: center; gap: var(--g9a-gap); padding: var(--g9a-pad); border-bottom: 1px solid var(--g9a-line); }\n.g9a-styled .g9a-panel__header > strong { flex: 1; min-inline-size: 0; }\n.g9a-styled .g9a-panel__body, .g9a-styled .g9a-chat { display: flex; flex-direction: column; flex: 1; min-block-size: 0; }\n.g9a-styled .g9a-messages { flex: 1; overflow-y: auto; padding: var(--g9a-pad); display: flex; flex-direction: column; gap: var(--g9a-gap); }\n.g9a-styled .g9a-messages-frame { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }\n.g9a-styled .g9a-messages[data-selectable=\"true\"] { user-select: text; -webkit-user-select: text; }\n.g9a-styled .g9a-messages__newest { position: absolute; bottom: 8px; inset-inline-start: 50%; transform: translateX(-50%); }\n.g9a-styled .g9a-list { margin: 0 0 6px; padding-inline-start: 1.4em; }\n.g9a-styled .g9a-list li { padding-inline-start: 0.2em; }\n.g9a-styled .g9a-composer__menu, .g9a-styled .g9a-block__entities, .g9a-styled .g9a-tour-nav { display: flex; flex-wrap: wrap; gap: 6px; }\n.g9a-styled .g9a-message { max-inline-size: 88%; padding: 8px 12px; border-radius: var(--g9a-radius); background: var(--g9a-surface-2); }\n.g9a-styled .g9a-message__user { align-self: flex-start; background: var(--g9a-user-bubble, color-mix(in srgb, var(--g9a-accent) 12%, var(--g9a-surface))); }\n.g9a-styled .g9a-message__assistant { align-self: flex-end; }\n.g9a-styled .g9a-message[data-pending=\"true\"] { opacity: .7; }\n.g9a-styled .g9a-message__feedback { display: flex; gap: 6px; align-items: center; margin-block-start: 4px; }\n.g9a-styled .g9a-message__feedback button { min-block-size: 26px; font-size: 12px; padding: 0 8px; }\n.g9a-styled .g9a-message__provenance { font-size: 11px; color: var(--g9a-muted); }\n.g9a-styled .g9a-p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }\n.g9a-styled code { font-family: ui-monospace, monospace; background: var(--g9a-surface); border-radius: 4px; padding: 0 4px; }\n.g9a-styled a { color: var(--g9a-accent); }\n.g9a-styled .g9a-work { display: flex; gap: var(--g9a-gap); align-items: flex-start; padding: var(--g9a-pad); border-top: 1px solid var(--g9a-line); }\n.g9a-styled .g9a-work-main { flex: 1; min-inline-size: 0; }\n.g9a-styled .g9a-work-head { display: flex; justify-content: space-between; gap: var(--g9a-gap); }\n.g9a-styled .g9a-work__elapsed, .g9a-styled .g9a-work__tool, .g9a-styled .g9a-note { color: var(--g9a-muted); font-size: 12px; }\n.g9a-styled .g9a-stages, .g9a-styled .g9a-stages-thinking { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 4px; }\n.g9a-styled .g9a-work__stage, .g9a-styled .g9a-stages-thinking > span { padding: 1px 10px; border-radius: 999px; border: 1px solid var(--g9a-line); font-size: 12px; color: var(--g9a-muted); }\n.g9a-styled [data-state=\"on\"].g9a-work__stage, .g9a-styled .g9a-stages-thinking > [data-state=\"on\"] { background: color-mix(in srgb, var(--g9a-accent) 20%, transparent); color: var(--g9a-ink); border-color: var(--g9a-accent); }\n.g9a-styled .g9a-thinking-orb { inline-size: 18px; block-size: 18px; border-radius: 50%; background: var(--g9a-accent); animation: g9a-pulse 1.2s ease-in-out infinite; flex: none; margin-block-start: 4px; }\n.g9a-styled .g9a-thinking-orb[data-still=\"true\"] { animation: none; }\n@keyframes g9a-pulse { 0%, 100% { transform: scale(.8); opacity: .6; } 50% { transform: scale(1); opacity: 1; } }\n@media (prefers-reduced-motion: reduce) { .g9a-styled .g9a-thinking-orb { animation: none; } }\n.g9a-styled .g9a-composer { padding: var(--g9a-pad); border-top: 1px solid var(--g9a-line); }\n.g9a-styled .g9a-composer-row { display: flex; gap: var(--g9a-gap); align-items: flex-end; }\n.g9a-styled .g9a-composer__input { flex: 1; min-inline-size: 0; resize: none; max-block-size: 30vh; }\n.g9a-styled .g9a-composer__send { background: var(--g9a-accent); color: var(--g9a-accent-ink); border-color: var(--g9a-accent); }\n.g9a-styled .g9a-file-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-block-end: 6px; }\n.g9a-styled .g9a-file-chip { background: var(--g9a-surface-2); border-radius: 999px; padding: 2px 4px 2px 10px; font-size: 12px; }\n.g9a-styled .g9a-file-chip button { min-block-size: 20px; border: 0; background: none; padding: 0 6px; }\n.g9a-styled .g9a-card__approval { border: 1px solid var(--g9a-approval-card-border); border-radius: var(--g9a-radius); padding: var(--g9a-pad); background: var(--g9a-surface); }\n.g9a-styled .g9a-card__approval h3 { margin: 0 0 6px; font-size: 15px; }\n.g9a-styled .g9a-card__approval__fact { font-size: 12px; color: var(--g9a-muted); padding-inline-start: 24px; }\n.g9a-styled .g9a-card__approval__confirm { background: var(--g9a-accent); color: var(--g9a-accent-ink); border-color: var(--g9a-accent); }\n.g9a-styled .g9a-warning { color: var(--g9a-warn); font-size: 13px; }\n.g9a-styled .g9a-irreversible { color: var(--g9a-danger); font-size: 12px; }\n.g9a-styled .g9a-row { display: flex; gap: var(--g9a-gap); margin-block-start: 8px; }\n.g9a-styled .g9a-mode-banner { background: var(--g9a-surface-2); border-bottom: 1px solid var(--g9a-line); color: var(--g9a-warn); padding: 6px var(--g9a-pad); font-size: 13px; }\n.g9a-styled .g9a-usage-chip { display: inline-block; block-size: 22px; line-height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px;\nbackground: linear-gradient(to left, var(--g9a-surface-2) calc(100% - var(--g9a-usage)), color-mix(in srgb, var(--g9a-accent) 25%, transparent) 0); }\n.g9a-styled .g9a-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--g9a-line); margin-block-end: 8px; }\n.g9a-styled .g9a-tabs [aria-selected=\"true\"] { border-bottom: 2px solid var(--g9a-accent); }\n.g9a-styled [data-page] { background: var(--g9a-surface); color: var(--g9a-ink); border-radius: var(--g9a-radius-s); }\n.g9a-styled .g9a-admin-capability { border: 1px solid var(--g9a-line); border-radius: 8px; padding: 8px; margin-block-end: 8px; display: grid; gap: 4px; }\n.g9a-styled .g9a-admin-capability label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }\n.g9a-styled [data-bad=\"true\"], .g9a-styled [data-ok=\"false\"] { color: var(--g9a-danger); }\n.g9a-styled .g9a-block-title { font-weight: 600; margin-block: 4px; }\n.g9a-styled .g9a-block__table table { border-collapse: collapse; inline-size: 100%; font-size: 13px; }\n.g9a-styled .g9a-block__table th, .g9a-styled .g9a-block__table td { border-bottom: 1px solid var(--g9a-line); padding: 4px 6px; text-align: start; }\n.g9a-styled [data-kind=\"number\"], .g9a-styled [data-kind=\"money\"], .g9a-styled [data-kind=\"percent\"] { text-align: end; font-variant-numeric: tabular-nums; }\n.g9a-styled .g9a-block__table__card { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 6px; padding: 6px 8px; background: var(--g9a-surface); border-radius: var(--g9a-radius-s); }\n.g9a-styled .g9a-block__table__card dt { color: var(--g9a-muted); }\n.g9a-styled .g9a-block__table__card dd { margin: 0; }\n.g9a-styled .g9a-block__chart__bar { display: grid; grid-template-columns: 1fr; gap: 2px; margin-block-end: 6px; }\n.g9a-styled .g9a-bar-track { display: block; block-size: 10px; background: var(--g9a-surface); border-radius: 5px; overflow: hidden; }\n.g9a-styled .g9a-bar-fill { display: block; block-size: 100%; background: var(--g9a-chart-bar); border-radius: 5px; }\n.g9a-styled .g9a-bar-value { font-size: 12px; color: var(--g9a-muted); }\n.g9a-styled .g9a-block__chart__line { inline-size: 100%; block-size: 140px; }\n.g9a-styled .g9a-block__chart__line path { stroke: var(--g9a-chart-bar); stroke-width: 2; }\n.g9a-styled .g9a-donut { inline-size: 120px; }\n.g9a-styled .g9a-donut path { fill: none; stroke: var(--g9a-chart-bar); stroke-width: 14; }\n.g9a-styled .g9a-block__kpi { display: flex; flex-wrap: wrap; gap: var(--g9a-gap); }\n.g9a-styled .g9a-block__kpi > div { display: flex; flex-direction: column; padding: 6px 10px; background: var(--g9a-surface); border-radius: var(--g9a-radius-s); }\n.g9a-styled .g9a-block__actions { display: flex; flex-wrap: wrap; gap: 6px; margin-block-start: 6px; }\n.g9a-styled .g9a-block__action { background: color-mix(in srgb, var(--g9a-accent) 12%, var(--g9a-surface)); border-color: var(--g9a-accent); }\n.g9a-styled .g9a-block__action::after { content: \" \u2039\"; }\n.g9a-styled [dir=\"ltr\"] .g9a-block__action::after { content: \" \u203A\"; }\n.g9a-styled .g9a-suggested { font-size: 10px; color: var(--g9a-muted); margin-inline-start: 6px; }\n.g9a-styled .g9a-block__callout { border-inline-start: 3px solid var(--g9a-accent); padding: 6px 10px; background: var(--g9a-surface); }\n.g9a-styled .g9a-block__callout[data-tone=\"danger\"] { border-color: var(--g9a-danger); }\n.g9a-styled .g9a-block__callout[data-tone=\"warn\"] { border-color: var(--g9a-warn); }\n.g9a-styled .g9a-block__image img { max-inline-size: 100%; border-radius: var(--g9a-radius-s); }\n.g9a-styled .g9a-dialog { position: fixed; inset: 10% 8%; background: var(--g9a-surface); border-radius: var(--g9a-radius); box-shadow: var(--g9a-shadow); padding: var(--g9a-pad); overflow: auto; }\n.g9a-styled .g9a-hero { padding: var(--g9a-pad); border: 1px solid var(--g9a-line); border-radius: var(--g9a-radius); background: var(--g9a-surface); }\n.g9a-styled .g9a-badge { margin-inline-start: 6px; background: var(--g9a-danger); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; }\n.g9a-styled .g9a-measure { inline-size: 100%; block-size: 0; }\n.g9a-styled .g9a-count { font-size: 11px; color: var(--g9a-muted); margin-inline-start: 4px; }\n.g9a-styled .g9a-history__list, .g9a-styled .g9a-routines__list, .g9a-styled .g9a-picker__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }\n.g9a-styled .g9a-history__row { display: flex; gap: 4px; align-items: center; }\n.g9a-styled .g9a-history__open { flex: 1; min-inline-size: 0; text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.g9a-styled .g9a-history__row[data-waiting=\"true\"] .g9a-history__open { border-color: var(--g9a-warn); }\n.g9a-styled .g9a-history__delete, .g9a-styled .g9a-history__delete-yes { color: var(--g9a-danger); }\n.g9a-styled .g9a-routines__form { display: grid; gap: var(--g9a-gap); }\n.g9a-styled .g9a-routines__slot { display: grid; gap: 2px; }\n.g9a-styled .g9a-routines__slot[data-state=\"missing\"] input, .g9a-styled .g9a-routines__slot[data-state=\"invalid\"] input { border-color: var(--g9a-danger); }\n.g9a-styled .g9a-routines__choose { inline-size: 100%; text-align: start; }\n.g9a-styled .g9a-picker__chosen { font-weight: 600; margin-inline-end: 6px; }\n.g9a-styled .g9a-csv { display: flex; gap: 6px; align-items: center; margin-block: 4px; }\n";
|
|
5
|
+
export declare const STYLES = ".g9a-root { display: contents; }\n.g9a-styled { font-family: var(--g9a-font); font-size: var(--g9a-font-size); color: var(--g9a-ink); line-height: 1.6; }\n.g9a-styled button { font: inherit; cursor: pointer; min-block-size: 38px; padding: 0 12px; border-radius: var(--g9a-radius-s); border: 1px solid var(--g9a-line); background: var(--g9a-surface); color: var(--g9a-ink); }\n.g9a-styled input, .g9a-styled textarea { font: inherit; padding: 8px 10px; border: 1px solid var(--g9a-line); border-radius: var(--g9a-radius-s); background: var(--g9a-surface); color: var(--g9a-ink); }\n.g9a-styled .g9a-panel { box-sizing: border-box; display: flex; flex-direction: column; background: var(--g9a-surface); color: var(--g9a-ink); box-shadow: var(--g9a-shadow); overflow: hidden; }\n.g9a-styled .g9a-panel[data-layout=\"side\"] { position: fixed; inset-block: 0; inset-inline-end: 0; inline-size: min(420px, 100%); border-inline-start: 1px solid var(--g9a-line); }\n.g9a-styled .g9a-panel[data-layout=\"sheet\"] { position: fixed; inset-inline: 0; inset-block-end: 0; block-size: 85vh; border-start-start-radius: 16px; border-start-end-radius: 16px; }\n.g9a-styled .g9a-panel[data-layout=\"fullscreen\"] { position: fixed; inset: 0; }\n.g9a-styled .g9a-panel[data-layout=\"inline\"] { inline-size: 100%; block-size: 100%; box-shadow: none; border: 1px solid var(--g9a-line); border-radius: var(--g9a-radius); }\n.g9a-styled .g9a-panel[data-layout=\"card\"] { border-radius: var(--g9a-radius); border: 1px solid var(--g9a-line); max-block-size: 520px; }\n.g9a-styled .g9a-panel[data-layout=\"compact\"] { box-shadow: none; }\n.g9a-styled .g9a-panel__header { display: flex; align-items: center; gap: 10px; padding-block: 10px; padding-inline: var(--g9a-pad) 8px; border-bottom: 1px solid var(--g9a-line); }\n.g9a-styled .g9a-panel__header > strong { flex: 1; min-inline-size: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.g9a-styled .g9a-panel__mark, .g9a-styled .g9a-messages__empty-mark { display: inline-grid; place-items: center; flex: none; inline-size: 30px; block-size: 30px; border-radius: 50%; color: var(--g9a-accent); background: color-mix(in srgb, var(--g9a-accent) 15%, transparent); }\n.g9a-styled .g9a-panel__tools { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }\n.g9a-styled .g9a-icon { flex: none; }\n.g9a-styled .g9a-icon-button, .g9a-styled .g9a-composer__attach, .g9a-styled .g9a-composer__mic { display: inline-grid; place-items: center; flex: none; inline-size: 34px; min-block-size: 34px; padding: 0; border: 0; border-radius: var(--g9a-radius); background: transparent; color: var(--g9a-muted); transition: background-color var(--g9a-motion), color var(--g9a-motion); }\n.g9a-styled .g9a-icon-button:hover, .g9a-styled .g9a-composer__attach:hover, .g9a-styled .g9a-composer__mic:hover { background: color-mix(in srgb, var(--g9a-ink) 8%, transparent); color: var(--g9a-ink); }\n.g9a-styled .g9a-composer__mic[aria-pressed=\"true\"] { color: var(--g9a-danger); }\n.g9a-styled button:focus-visible { outline: 2px solid color-mix(in srgb, var(--g9a-accent) 70%, transparent); outline-offset: 2px; }\n.g9a-styled button:disabled { opacity: .5; cursor: default; }\n.g9a-styled .g9a-panel__body, .g9a-styled .g9a-chat { display: flex; flex-direction: column; flex: 1; min-block-size: 0; }\n.g9a-styled .g9a-messages { flex: 1; overflow-y: auto; padding: 16px var(--g9a-pad) 12px; display: flex; flex-direction: column; gap: 20px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--g9a-ink) 20%, transparent) transparent; }\n.g9a-styled .g9a-messages > [data-id] { display: flex; flex-direction: column; min-inline-size: 0; }\n.g9a-styled .g9a-messages__empty { margin-block: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 8px; text-align: center; }\n.g9a-styled .g9a-messages__empty-mark { inline-size: 48px; block-size: 48px; margin-block-end: 6px; }\n.g9a-styled .g9a-messages__empty-mark .g9a-icon { inline-size: 24px; block-size: 24px; }\n.g9a-styled .g9a-messages__empty > strong { font-size: 16px; font-weight: 600; }\n.g9a-styled .g9a-messages__empty .g9a-block__actions { justify-content: center; margin-block-start: 14px; }\n.g9a-styled .g9a-messages-frame { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }\n.g9a-styled .g9a-messages[data-selectable=\"true\"] { user-select: text; -webkit-user-select: text; }\n.g9a-styled .g9a-messages__newest { position: absolute; bottom: 10px; inset-inline: 0; margin-inline: auto; inline-size: fit-content; min-block-size: 32px; padding: 0 14px; border-radius: 999px; font-size: 12px; background: var(--g9a-surface); box-shadow: var(--g9a-shadow); }\n.g9a-styled .g9a-list { margin: 0 0 6px; padding-inline-start: 1.4em; }\n.g9a-styled .g9a-list li { padding-inline-start: 0.2em; }\n.g9a-styled .g9a-composer__menu, .g9a-styled .g9a-block__entities, .g9a-styled .g9a-tour-nav { display: flex; flex-wrap: wrap; gap: 6px; }\n.g9a-styled .g9a-message { max-inline-size: 100%; min-inline-size: 0; }\n.g9a-styled .g9a-message__user { align-self: flex-start; max-inline-size: 85%; padding: 9px 14px; border-radius: calc(var(--g9a-radius) + 8px); border-start-start-radius: var(--g9a-radius-s); background: var(--g9a-user-bubble, color-mix(in srgb, var(--g9a-accent) 16%, var(--g9a-surface))); }\n.g9a-styled .g9a-message__user .g9a-p:last-child { margin: 0; }\n.g9a-styled .g9a-message__assistant { align-self: stretch; }\n.g9a-styled .g9a-message__assistant > * + * { margin-block-start: 10px; }\n.g9a-styled .g9a-message[data-pending=\"true\"] { opacity: .7; }\n.g9a-styled .g9a-message__feedback, .g9a-styled .g9a-message__rate { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; color: var(--g9a-muted); font-size: 12px; }\n.g9a-styled .g9a-message__rate > span { margin-inline-end: 4px; }\n.g9a-styled .g9a-message__feedback button, .g9a-styled .g9a-message__rate button { min-block-size: 30px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--g9a-muted); font-size: 12px; }\n.g9a-styled .g9a-message__feedback .g9a-icon-button, .g9a-styled .g9a-message__rate .g9a-icon-button { inline-size: 30px; padding: 0; border-radius: var(--g9a-radius-s); }\n.g9a-styled .g9a-message__feedback .g9a-icon, .g9a-styled .g9a-message__rate .g9a-icon { inline-size: 16px; block-size: 16px; }\n.g9a-styled .g9a-message__feedback button:hover, .g9a-styled .g9a-message__rate button:hover { background: color-mix(in srgb, var(--g9a-ink) 8%, transparent); color: var(--g9a-ink); }\n.g9a-styled .g9a-message__provenance { font-size: 11px; color: var(--g9a-muted); padding: 1px 8px; margin-inline-end: 4px; border-radius: 999px; background: color-mix(in srgb, var(--g9a-ink) 7%, transparent); }\n.g9a-styled .g9a-p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }\n.g9a-styled code { font-family: ui-monospace, monospace; background: var(--g9a-surface-2); border-radius: 4px; padding: 0 4px; }\n.g9a-styled a { color: var(--g9a-accent); }\n.g9a-styled .g9a-work { display: flex; gap: var(--g9a-gap); align-items: flex-start; margin: 0 var(--g9a-pad) 4px; padding: 10px 12px; border-radius: var(--g9a-radius); background: var(--g9a-surface-2); }\n.g9a-styled .g9a-work-main { flex: 1; min-inline-size: 0; }\n.g9a-styled .g9a-work-head { display: flex; align-items: center; gap: 10px; }\n.g9a-styled .g9a-work-head > strong { flex: 1; min-inline-size: 0; font-size: 13px; font-weight: 600; }\n.g9a-styled .g9a-work__elapsed { font-variant-numeric: tabular-nums; }\n.g9a-styled .g9a-work__progress, .g9a-styled .g9a-work__status { font-size: 12px; margin-block-start: 2px; }\n.g9a-styled .g9a-work__tool { display: flex; align-items: center; gap: 8px; }\n.g9a-styled .g9a-work__tool::before { content: \"\"; flex: none; inline-size: 5px; block-size: 5px; border-radius: 50%; background: currentColor; opacity: .6; }\n.g9a-styled .g9a-work__tool[data-state=\"start\"] { color: var(--g9a-ink); }\n.g9a-styled .g9a-work__tool[data-state=\"start\"]::before { background: var(--g9a-accent); opacity: 1; }\n.g9a-styled .g9a-stream { font-size: 12px; color: var(--g9a-muted); margin-block-start: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; }\n.g9a-styled .g9a-work__elapsed, .g9a-styled .g9a-work__tool, .g9a-styled .g9a-note { color: var(--g9a-muted); font-size: 12px; }\n.g9a-styled .g9a-stages { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-block: 8px 2px; }\n.g9a-styled .g9a-stages-thinking { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 4px; }\n.g9a-styled .g9a-work__stage { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--g9a-muted); }\n.g9a-styled .g9a-work__stage::before { content: \"\"; flex: none; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--g9a-line); }\n.g9a-styled .g9a-work__stage[data-state=\"on\"] { color: var(--g9a-ink); font-weight: 600; }\n.g9a-styled .g9a-work__stage[data-state=\"on\"]::before { background: var(--g9a-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g9a-accent) 25%, transparent); }\n.g9a-styled .g9a-work__stage[data-state=\"done\"]::before { background: color-mix(in srgb, var(--g9a-accent) 55%, transparent); }\n.g9a-styled .g9a-stages-thinking > span { padding: 1px 10px; border-radius: 999px; border: 1px solid var(--g9a-line); font-size: 12px; color: var(--g9a-muted); }\n.g9a-styled .g9a-stages-thinking > [data-state=\"on\"] { background: color-mix(in srgb, var(--g9a-accent) 20%, transparent); color: var(--g9a-ink); border-color: var(--g9a-accent); }\n.g9a-styled .g9a-thinking-orb { inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--g9a-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--g9a-accent) 20%, transparent); animation: g9a-pulse 1.2s ease-in-out infinite; flex: none; }\n.g9a-styled .g9a-thinking-orb[data-still=\"true\"] { animation: none; }\n@keyframes g9a-pulse { 0%, 100% { transform: scale(.8); opacity: .6; } 50% { transform: scale(1); opacity: 1; } }\n@media (prefers-reduced-motion: reduce) { .g9a-styled .g9a-thinking-orb { animation: none; } }\n.g9a-styled .g9a-composer { padding: 8px var(--g9a-pad) var(--g9a-pad); }\n.g9a-styled .g9a-composer-row { display: flex; gap: 2px; align-items: flex-end; padding: 5px; border: 1px solid var(--g9a-line); border-radius: calc(var(--g9a-radius) + 10px); background: var(--g9a-surface-2); transition: border-color var(--g9a-motion), box-shadow var(--g9a-motion); }\n.g9a-styled .g9a-composer-row:focus-within { border-color: color-mix(in srgb, var(--g9a-accent) 60%, var(--g9a-line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g9a-accent) 15%, transparent); }\n.g9a-styled .g9a-composer-row .g9a-composer__attach, .g9a-styled .g9a-composer-row .g9a-composer__mic, .g9a-styled .g9a-composer-row .g9a-composer__send, .g9a-styled .g9a-composer-row .g9a-composer__stop { inline-size: 36px; min-block-size: 36px; border-radius: 50%; }\n.g9a-styled .g9a-composer__input { flex: 1; min-inline-size: 0; min-block-size: 36px; max-block-size: 30vh; box-sizing: border-box; resize: none; padding: 7px 6px; border: 0; border-radius: 0; background: transparent; outline: none; line-height: 1.55; }\n.g9a-styled .g9a-composer__send { background: var(--g9a-accent); color: var(--g9a-accent-ink); border-color: var(--g9a-accent); }\n.g9a-styled .g9a-composer-row .g9a-composer__send, .g9a-styled .g9a-composer-row .g9a-composer__stop { display: inline-grid; place-items: center; flex: none; padding: 0; border: 0; transition: opacity var(--g9a-motion), transform var(--g9a-motion); }\n.g9a-styled .g9a-composer__send[data-empty=\"true\"] { opacity: .45; }\n.g9a-styled .g9a-composer-row .g9a-composer__stop { background: var(--g9a-ink); color: var(--g9a-surface); }\n.g9a-styled .g9a-composer__menu button { min-block-size: 30px; border-radius: 999px; font-size: 12px; }\n.g9a-styled .g9a-composer__menu { margin-block-end: 8px; }\n.g9a-styled .g9a-file-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-block-end: 6px; }\n.g9a-styled .g9a-file-chip { display: inline-flex; align-items: center; gap: 2px; background: var(--g9a-surface-2); border: 1px solid var(--g9a-line); border-radius: 999px; padding-block: 2px; padding-inline: 10px 2px; font-size: 12px; }\n.g9a-styled .g9a-file-chip button { min-block-size: 22px; border: 0; border-radius: 999px; background: none; padding: 0 6px; color: var(--g9a-muted); }\n.g9a-styled .g9a-card__approval { border: 1px solid color-mix(in srgb, var(--g9a-approval-card-border) 55%, transparent); border-radius: calc(var(--g9a-radius) + 4px); padding: 14px; background: var(--g9a-surface); }\n.g9a-styled .g9a-card__approval h3 { margin: 0 0 6px; font-size: 15px; }\n.g9a-styled .g9a-card__approval__fact { font-size: 12px; color: var(--g9a-muted); padding-inline-start: 24px; }\n.g9a-styled .g9a-card__approval__confirm { background: var(--g9a-accent); color: var(--g9a-accent-ink); border-color: var(--g9a-accent); }\n.g9a-styled .g9a-warning { color: var(--g9a-warn); font-size: 13px; }\n.g9a-styled .g9a-irreversible { color: var(--g9a-danger); font-size: 12px; }\n.g9a-styled .g9a-row { display: flex; gap: var(--g9a-gap); margin-block-start: 8px; }\n.g9a-styled .g9a-mode-banner { background: var(--g9a-surface-2); border-bottom: 1px solid var(--g9a-line); color: var(--g9a-warn); padding: 6px var(--g9a-pad); font-size: 13px; }\n.g9a-styled .g9a-usage-chip { display: inline-block; block-size: 22px; line-height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px;\n background: linear-gradient(to left, var(--g9a-surface-2) calc(100% - var(--g9a-usage)), color-mix(in srgb, var(--g9a-accent) 25%, transparent) 0); }\n.g9a-styled .g9a-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--g9a-line); margin-block-end: 8px; }\n.g9a-styled .g9a-tabs [aria-selected=\"true\"] { border-bottom: 2px solid var(--g9a-accent); }\n.g9a-styled [data-page] { background: var(--g9a-surface); color: var(--g9a-ink); border-radius: var(--g9a-radius-s); }\n.g9a-styled .g9a-admin-capability { border: 1px solid var(--g9a-line); border-radius: 8px; padding: 8px; margin-block-end: 8px; display: grid; gap: 4px; }\n.g9a-styled .g9a-admin-capability label { display: flex; justify-content: space-between; gap: 8px; font-size: 13px; }\n.g9a-styled [data-bad=\"true\"], .g9a-styled [data-ok=\"false\"] { color: var(--g9a-danger); }\n.g9a-styled .g9a-block-title { font-weight: 600; margin-block: 4px; }\n.g9a-styled .g9a-block__table table { border-collapse: collapse; inline-size: 100%; font-size: 13px; }\n.g9a-styled .g9a-block__table th, .g9a-styled .g9a-block__table td { border-bottom: 1px solid var(--g9a-line); padding: 6px 8px; text-align: start; }\n.g9a-styled .g9a-block__table th { color: var(--g9a-muted); font-size: 12px; font-weight: 600; }\n.g9a-styled [data-kind=\"number\"], .g9a-styled [data-kind=\"money\"], .g9a-styled [data-kind=\"percent\"] { text-align: end; font-variant-numeric: tabular-nums; }\n.g9a-styled .g9a-block__table__card { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 6px; padding: 8px 10px; background: var(--g9a-surface-2); border-radius: var(--g9a-radius-s); }\n.g9a-styled .g9a-block__table__card dt { color: var(--g9a-muted); }\n.g9a-styled .g9a-block__table__card dd { margin: 0; }\n.g9a-styled .g9a-block__chart__bar { display: grid; grid-template-columns: 1fr; gap: 2px; margin-block-end: 6px; }\n.g9a-styled .g9a-bar-track { display: block; block-size: 8px; background: var(--g9a-surface-2); border-radius: 4px; overflow: hidden; }\n.g9a-styled .g9a-bar-fill { display: block; block-size: 100%; background: var(--g9a-chart-bar); border-radius: 4px; }\n.g9a-styled .g9a-bar-value { font-size: 12px; color: var(--g9a-muted); }\n.g9a-styled .g9a-block__chart__line { inline-size: 100%; block-size: 140px; }\n.g9a-styled .g9a-block__chart__line path { stroke: var(--g9a-chart-bar); stroke-width: 2; }\n.g9a-styled .g9a-donut { inline-size: 120px; }\n.g9a-styled .g9a-donut path { fill: none; stroke: var(--g9a-chart-bar); stroke-width: 14; }\n.g9a-styled .g9a-block__kpi { display: flex; flex-wrap: wrap; gap: var(--g9a-gap); }\n.g9a-styled .g9a-block__kpi > div { display: flex; flex-direction: column; flex: 1 1 110px; padding: 8px 12px; background: var(--g9a-surface-2); border-radius: var(--g9a-radius); }\n.g9a-styled .g9a-block__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 6px; }\n.g9a-styled .g9a-block__action { display: inline-flex; align-items: center; gap: 10px; max-inline-size: 100%; padding: 0 14px; border-radius: 999px; border-color: color-mix(in srgb, var(--g9a-accent) 35%, transparent); background: color-mix(in srgb, var(--g9a-accent) 10%, transparent); text-align: start; transition: background-color var(--g9a-motion), border-color var(--g9a-motion); }\n.g9a-styled .g9a-block__action:hover { background: color-mix(in srgb, var(--g9a-accent) 18%, transparent); border-color: color-mix(in srgb, var(--g9a-accent) 60%, transparent); }\n.g9a-styled .g9a-block__action::after { content: \"\"; flex: none; inline-size: 6px; block-size: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); opacity: .55; }\n.g9a-styled[dir=\"rtl\"] .g9a-block__action::after { transform: rotate(135deg); }\n.g9a-styled .g9a-suggested { font-size: 10px; color: var(--g9a-muted); margin-inline-start: 6px; }\n.g9a-styled .g9a-block__callout { border-inline-start: 3px solid var(--g9a-accent); padding: 8px 12px; background: var(--g9a-surface-2); border-start-end-radius: var(--g9a-radius-s); border-end-end-radius: var(--g9a-radius-s); }\n.g9a-styled .g9a-block__callout[data-tone=\"danger\"] { border-color: var(--g9a-danger); }\n.g9a-styled .g9a-block__callout[data-tone=\"warn\"] { border-color: var(--g9a-warn); }\n.g9a-styled .g9a-block__image img { max-inline-size: 100%; border-radius: var(--g9a-radius-s); }\n.g9a-styled .g9a-dialog { position: fixed; inset: 10% 8%; background: var(--g9a-surface); border-radius: var(--g9a-radius); box-shadow: var(--g9a-shadow); padding: var(--g9a-pad); overflow: auto; }\n.g9a-styled .g9a-hero { padding: var(--g9a-pad); border: 1px solid var(--g9a-line); border-radius: var(--g9a-radius); background: var(--g9a-surface); }\n.g9a-styled .g9a-badge { margin-inline-start: 6px; background: var(--g9a-danger); color: #fff; border-radius: 999px; padding: 0 6px; font-size: 11px; }\n.g9a-styled .g9a-measure { inline-size: 100%; block-size: 0; }\n.g9a-styled .g9a-count { font-size: 11px; color: var(--g9a-muted); margin-inline-start: 4px; }\n.g9a-styled .g9a-history__list, .g9a-styled .g9a-routines__list, .g9a-styled .g9a-picker__list { list-style: none; margin: 0; padding: 0; display: grid; gap: 4px; }\n.g9a-styled .g9a-history__row { display: flex; gap: 4px; align-items: center; }\n.g9a-styled .g9a-history__open { flex: 1; min-inline-size: 0; text-align: start; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }\n.g9a-styled .g9a-history__row[data-waiting=\"true\"] .g9a-history__open { border-color: var(--g9a-warn); }\n.g9a-styled .g9a-history__delete, .g9a-styled .g9a-history__delete-yes { color: var(--g9a-danger); }\n.g9a-styled .g9a-routines__form { display: grid; gap: var(--g9a-gap); }\n.g9a-styled .g9a-routines__slot { display: grid; gap: 2px; }\n.g9a-styled .g9a-routines__slot[data-state=\"missing\"] input, .g9a-styled .g9a-routines__slot[data-state=\"invalid\"] input { border-color: var(--g9a-danger); }\n.g9a-styled .g9a-routines__choose { inline-size: 100%; text-align: start; }\n.g9a-styled .g9a-picker__chosen { font-weight: 600; margin-inline-end: 6px; }\n.g9a-styled .g9a-csv { display: flex; gap: 6px; align-items: center; margin-block: 4px; }\n";
|
package/dist/styles.js
CHANGED
|
@@ -13,45 +13,86 @@ export const STYLES = `.g9a-root { display: contents; }
|
|
|
13
13
|
.g9a-styled .g9a-panel[data-layout="inline"] { inline-size: 100%; block-size: 100%; box-shadow: none; border: 1px solid var(--g9a-line); border-radius: var(--g9a-radius); }
|
|
14
14
|
.g9a-styled .g9a-panel[data-layout="card"] { border-radius: var(--g9a-radius); border: 1px solid var(--g9a-line); max-block-size: 520px; }
|
|
15
15
|
.g9a-styled .g9a-panel[data-layout="compact"] { box-shadow: none; }
|
|
16
|
-
.g9a-styled .g9a-panel__header { display: flex; align-items: center; gap:
|
|
17
|
-
.g9a-styled .g9a-panel__header > strong { flex: 1; min-inline-size: 0; }
|
|
16
|
+
.g9a-styled .g9a-panel__header { display: flex; align-items: center; gap: 10px; padding-block: 10px; padding-inline: var(--g9a-pad) 8px; border-bottom: 1px solid var(--g9a-line); }
|
|
17
|
+
.g9a-styled .g9a-panel__header > strong { flex: 1; min-inline-size: 0; font-size: 15px; font-weight: 600; overflow: hidden; text-overflow: ellipsis; white-space: nowrap; }
|
|
18
|
+
.g9a-styled .g9a-panel__mark, .g9a-styled .g9a-messages__empty-mark { display: inline-grid; place-items: center; flex: none; inline-size: 30px; block-size: 30px; border-radius: 50%; color: var(--g9a-accent); background: color-mix(in srgb, var(--g9a-accent) 15%, transparent); }
|
|
19
|
+
.g9a-styled .g9a-panel__tools { display: flex; align-items: center; gap: 2px; margin-inline-start: auto; }
|
|
20
|
+
.g9a-styled .g9a-icon { flex: none; }
|
|
21
|
+
.g9a-styled .g9a-icon-button, .g9a-styled .g9a-composer__attach, .g9a-styled .g9a-composer__mic { display: inline-grid; place-items: center; flex: none; inline-size: 34px; min-block-size: 34px; padding: 0; border: 0; border-radius: var(--g9a-radius); background: transparent; color: var(--g9a-muted); transition: background-color var(--g9a-motion), color var(--g9a-motion); }
|
|
22
|
+
.g9a-styled .g9a-icon-button:hover, .g9a-styled .g9a-composer__attach:hover, .g9a-styled .g9a-composer__mic:hover { background: color-mix(in srgb, var(--g9a-ink) 8%, transparent); color: var(--g9a-ink); }
|
|
23
|
+
.g9a-styled .g9a-composer__mic[aria-pressed="true"] { color: var(--g9a-danger); }
|
|
24
|
+
.g9a-styled button:focus-visible { outline: 2px solid color-mix(in srgb, var(--g9a-accent) 70%, transparent); outline-offset: 2px; }
|
|
25
|
+
.g9a-styled button:disabled { opacity: .5; cursor: default; }
|
|
18
26
|
.g9a-styled .g9a-panel__body, .g9a-styled .g9a-chat { display: flex; flex-direction: column; flex: 1; min-block-size: 0; }
|
|
19
|
-
.g9a-styled .g9a-messages { flex: 1; overflow-y: auto; padding: var(--g9a-pad); display: flex; flex-direction: column; gap: var(--g9a-
|
|
27
|
+
.g9a-styled .g9a-messages { flex: 1; overflow-y: auto; padding: 16px var(--g9a-pad) 12px; display: flex; flex-direction: column; gap: 20px; scrollbar-width: thin; scrollbar-color: color-mix(in srgb, var(--g9a-ink) 20%, transparent) transparent; }
|
|
28
|
+
.g9a-styled .g9a-messages > [data-id] { display: flex; flex-direction: column; min-inline-size: 0; }
|
|
29
|
+
.g9a-styled .g9a-messages__empty { margin-block: auto; display: flex; flex-direction: column; align-items: center; gap: 6px; padding: 24px 8px; text-align: center; }
|
|
30
|
+
.g9a-styled .g9a-messages__empty-mark { inline-size: 48px; block-size: 48px; margin-block-end: 6px; }
|
|
31
|
+
.g9a-styled .g9a-messages__empty-mark .g9a-icon { inline-size: 24px; block-size: 24px; }
|
|
32
|
+
.g9a-styled .g9a-messages__empty > strong { font-size: 16px; font-weight: 600; }
|
|
33
|
+
.g9a-styled .g9a-messages__empty .g9a-block__actions { justify-content: center; margin-block-start: 14px; }
|
|
20
34
|
.g9a-styled .g9a-messages-frame { flex: 1; min-height: 0; display: flex; flex-direction: column; position: relative; }
|
|
21
35
|
.g9a-styled .g9a-messages[data-selectable="true"] { user-select: text; -webkit-user-select: text; }
|
|
22
|
-
.g9a-styled .g9a-messages__newest { position: absolute; bottom:
|
|
36
|
+
.g9a-styled .g9a-messages__newest { position: absolute; bottom: 10px; inset-inline: 0; margin-inline: auto; inline-size: fit-content; min-block-size: 32px; padding: 0 14px; border-radius: 999px; font-size: 12px; background: var(--g9a-surface); box-shadow: var(--g9a-shadow); }
|
|
23
37
|
.g9a-styled .g9a-list { margin: 0 0 6px; padding-inline-start: 1.4em; }
|
|
24
38
|
.g9a-styled .g9a-list li { padding-inline-start: 0.2em; }
|
|
25
39
|
.g9a-styled .g9a-composer__menu, .g9a-styled .g9a-block__entities, .g9a-styled .g9a-tour-nav { display: flex; flex-wrap: wrap; gap: 6px; }
|
|
26
|
-
.g9a-styled .g9a-message { max-inline-size:
|
|
27
|
-
.g9a-styled .g9a-message__user { align-self: flex-start; background: var(--g9a-user-bubble, color-mix(in srgb, var(--g9a-accent)
|
|
28
|
-
.g9a-styled .g9a-
|
|
40
|
+
.g9a-styled .g9a-message { max-inline-size: 100%; min-inline-size: 0; }
|
|
41
|
+
.g9a-styled .g9a-message__user { align-self: flex-start; max-inline-size: 85%; padding: 9px 14px; border-radius: calc(var(--g9a-radius) + 8px); border-start-start-radius: var(--g9a-radius-s); background: var(--g9a-user-bubble, color-mix(in srgb, var(--g9a-accent) 16%, var(--g9a-surface))); }
|
|
42
|
+
.g9a-styled .g9a-message__user .g9a-p:last-child { margin: 0; }
|
|
43
|
+
.g9a-styled .g9a-message__assistant { align-self: stretch; }
|
|
44
|
+
.g9a-styled .g9a-message__assistant > * + * { margin-block-start: 10px; }
|
|
29
45
|
.g9a-styled .g9a-message[data-pending="true"] { opacity: .7; }
|
|
30
|
-
.g9a-styled .g9a-message__feedback { display: flex;
|
|
31
|
-
.g9a-styled .g9a-
|
|
32
|
-
.g9a-styled .g9a-
|
|
46
|
+
.g9a-styled .g9a-message__feedback, .g9a-styled .g9a-message__rate { display: flex; flex-wrap: wrap; align-items: center; gap: 2px; color: var(--g9a-muted); font-size: 12px; }
|
|
47
|
+
.g9a-styled .g9a-message__rate > span { margin-inline-end: 4px; }
|
|
48
|
+
.g9a-styled .g9a-message__feedback button, .g9a-styled .g9a-message__rate button { min-block-size: 30px; padding: 0 10px; border: 0; border-radius: 999px; background: transparent; color: var(--g9a-muted); font-size: 12px; }
|
|
49
|
+
.g9a-styled .g9a-message__feedback .g9a-icon-button, .g9a-styled .g9a-message__rate .g9a-icon-button { inline-size: 30px; padding: 0; border-radius: var(--g9a-radius-s); }
|
|
50
|
+
.g9a-styled .g9a-message__feedback .g9a-icon, .g9a-styled .g9a-message__rate .g9a-icon { inline-size: 16px; block-size: 16px; }
|
|
51
|
+
.g9a-styled .g9a-message__feedback button:hover, .g9a-styled .g9a-message__rate button:hover { background: color-mix(in srgb, var(--g9a-ink) 8%, transparent); color: var(--g9a-ink); }
|
|
52
|
+
.g9a-styled .g9a-message__provenance { font-size: 11px; color: var(--g9a-muted); padding: 1px 8px; margin-inline-end: 4px; border-radius: 999px; background: color-mix(in srgb, var(--g9a-ink) 7%, transparent); }
|
|
33
53
|
.g9a-styled .g9a-p { margin: 0 0 6px; white-space: pre-wrap; overflow-wrap: anywhere; }
|
|
34
|
-
.g9a-styled code { font-family: ui-monospace, monospace; background: var(--g9a-surface); border-radius: 4px; padding: 0 4px; }
|
|
54
|
+
.g9a-styled code { font-family: ui-monospace, monospace; background: var(--g9a-surface-2); border-radius: 4px; padding: 0 4px; }
|
|
35
55
|
.g9a-styled a { color: var(--g9a-accent); }
|
|
36
|
-
.g9a-styled .g9a-work { display: flex; gap: var(--g9a-gap); align-items: flex-start;
|
|
56
|
+
.g9a-styled .g9a-work { display: flex; gap: var(--g9a-gap); align-items: flex-start; margin: 0 var(--g9a-pad) 4px; padding: 10px 12px; border-radius: var(--g9a-radius); background: var(--g9a-surface-2); }
|
|
37
57
|
.g9a-styled .g9a-work-main { flex: 1; min-inline-size: 0; }
|
|
38
|
-
.g9a-styled .g9a-work-head { display: flex;
|
|
58
|
+
.g9a-styled .g9a-work-head { display: flex; align-items: center; gap: 10px; }
|
|
59
|
+
.g9a-styled .g9a-work-head > strong { flex: 1; min-inline-size: 0; font-size: 13px; font-weight: 600; }
|
|
60
|
+
.g9a-styled .g9a-work__elapsed { font-variant-numeric: tabular-nums; }
|
|
61
|
+
.g9a-styled .g9a-work__progress, .g9a-styled .g9a-work__status { font-size: 12px; margin-block-start: 2px; }
|
|
62
|
+
.g9a-styled .g9a-work__tool { display: flex; align-items: center; gap: 8px; }
|
|
63
|
+
.g9a-styled .g9a-work__tool::before { content: ""; flex: none; inline-size: 5px; block-size: 5px; border-radius: 50%; background: currentColor; opacity: .6; }
|
|
64
|
+
.g9a-styled .g9a-work__tool[data-state="start"] { color: var(--g9a-ink); }
|
|
65
|
+
.g9a-styled .g9a-work__tool[data-state="start"]::before { background: var(--g9a-accent); opacity: 1; }
|
|
66
|
+
.g9a-styled .g9a-stream { font-size: 12px; color: var(--g9a-muted); margin-block-start: 4px; overflow: hidden; display: -webkit-box; -webkit-line-clamp: 3; line-clamp: 3; -webkit-box-orient: vertical; }
|
|
39
67
|
.g9a-styled .g9a-work__elapsed, .g9a-styled .g9a-work__tool, .g9a-styled .g9a-note { color: var(--g9a-muted); font-size: 12px; }
|
|
40
|
-
.g9a-styled .g9a-stages
|
|
41
|
-
.g9a-styled .g9a-
|
|
42
|
-
.g9a-styled
|
|
43
|
-
.g9a-styled .g9a-
|
|
68
|
+
.g9a-styled .g9a-stages { display: flex; flex-wrap: wrap; gap: 4px 16px; margin-block: 8px 2px; }
|
|
69
|
+
.g9a-styled .g9a-stages-thinking { display: flex; flex-wrap: wrap; gap: 6px; margin-block: 4px; }
|
|
70
|
+
.g9a-styled .g9a-work__stage { display: inline-flex; align-items: center; gap: 6px; font-size: 12px; color: var(--g9a-muted); }
|
|
71
|
+
.g9a-styled .g9a-work__stage::before { content: ""; flex: none; inline-size: 7px; block-size: 7px; border-radius: 50%; background: var(--g9a-line); }
|
|
72
|
+
.g9a-styled .g9a-work__stage[data-state="on"] { color: var(--g9a-ink); font-weight: 600; }
|
|
73
|
+
.g9a-styled .g9a-work__stage[data-state="on"]::before { background: var(--g9a-accent); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g9a-accent) 25%, transparent); }
|
|
74
|
+
.g9a-styled .g9a-work__stage[data-state="done"]::before { background: color-mix(in srgb, var(--g9a-accent) 55%, transparent); }
|
|
75
|
+
.g9a-styled .g9a-stages-thinking > span { padding: 1px 10px; border-radius: 999px; border: 1px solid var(--g9a-line); font-size: 12px; color: var(--g9a-muted); }
|
|
76
|
+
.g9a-styled .g9a-stages-thinking > [data-state="on"] { background: color-mix(in srgb, var(--g9a-accent) 20%, transparent); color: var(--g9a-ink); border-color: var(--g9a-accent); }
|
|
77
|
+
.g9a-styled .g9a-thinking-orb { inline-size: 10px; block-size: 10px; border-radius: 50%; background: var(--g9a-accent); box-shadow: 0 0 0 4px color-mix(in srgb, var(--g9a-accent) 20%, transparent); animation: g9a-pulse 1.2s ease-in-out infinite; flex: none; }
|
|
44
78
|
.g9a-styled .g9a-thinking-orb[data-still="true"] { animation: none; }
|
|
45
79
|
@keyframes g9a-pulse { 0%, 100% { transform: scale(.8); opacity: .6; } 50% { transform: scale(1); opacity: 1; } }
|
|
46
80
|
@media (prefers-reduced-motion: reduce) { .g9a-styled .g9a-thinking-orb { animation: none; } }
|
|
47
|
-
.g9a-styled .g9a-composer { padding: var(--g9a-pad)
|
|
48
|
-
.g9a-styled .g9a-composer-row { display: flex; gap: var(--g9a-
|
|
49
|
-
.g9a-styled .g9a-
|
|
81
|
+
.g9a-styled .g9a-composer { padding: 8px var(--g9a-pad) var(--g9a-pad); }
|
|
82
|
+
.g9a-styled .g9a-composer-row { display: flex; gap: 2px; align-items: flex-end; padding: 5px; border: 1px solid var(--g9a-line); border-radius: calc(var(--g9a-radius) + 10px); background: var(--g9a-surface-2); transition: border-color var(--g9a-motion), box-shadow var(--g9a-motion); }
|
|
83
|
+
.g9a-styled .g9a-composer-row:focus-within { border-color: color-mix(in srgb, var(--g9a-accent) 60%, var(--g9a-line)); box-shadow: 0 0 0 3px color-mix(in srgb, var(--g9a-accent) 15%, transparent); }
|
|
84
|
+
.g9a-styled .g9a-composer-row .g9a-composer__attach, .g9a-styled .g9a-composer-row .g9a-composer__mic, .g9a-styled .g9a-composer-row .g9a-composer__send, .g9a-styled .g9a-composer-row .g9a-composer__stop { inline-size: 36px; min-block-size: 36px; border-radius: 50%; }
|
|
85
|
+
.g9a-styled .g9a-composer__input { flex: 1; min-inline-size: 0; min-block-size: 36px; max-block-size: 30vh; box-sizing: border-box; resize: none; padding: 7px 6px; border: 0; border-radius: 0; background: transparent; outline: none; line-height: 1.55; }
|
|
50
86
|
.g9a-styled .g9a-composer__send { background: var(--g9a-accent); color: var(--g9a-accent-ink); border-color: var(--g9a-accent); }
|
|
87
|
+
.g9a-styled .g9a-composer-row .g9a-composer__send, .g9a-styled .g9a-composer-row .g9a-composer__stop { display: inline-grid; place-items: center; flex: none; padding: 0; border: 0; transition: opacity var(--g9a-motion), transform var(--g9a-motion); }
|
|
88
|
+
.g9a-styled .g9a-composer__send[data-empty="true"] { opacity: .45; }
|
|
89
|
+
.g9a-styled .g9a-composer-row .g9a-composer__stop { background: var(--g9a-ink); color: var(--g9a-surface); }
|
|
90
|
+
.g9a-styled .g9a-composer__menu button { min-block-size: 30px; border-radius: 999px; font-size: 12px; }
|
|
91
|
+
.g9a-styled .g9a-composer__menu { margin-block-end: 8px; }
|
|
51
92
|
.g9a-styled .g9a-file-chips { display: flex; flex-wrap: wrap; gap: 4px; margin-block-end: 6px; }
|
|
52
|
-
.g9a-styled .g9a-file-chip { background: var(--g9a-surface-2); border-radius: 999px; padding: 2px
|
|
53
|
-
.g9a-styled .g9a-file-chip button { min-block-size:
|
|
54
|
-
.g9a-styled .g9a-card__approval { border: 1px solid var(--g9a-approval-card-border); border-radius: var(--g9a-radius); padding:
|
|
93
|
+
.g9a-styled .g9a-file-chip { display: inline-flex; align-items: center; gap: 2px; background: var(--g9a-surface-2); border: 1px solid var(--g9a-line); border-radius: 999px; padding-block: 2px; padding-inline: 10px 2px; font-size: 12px; }
|
|
94
|
+
.g9a-styled .g9a-file-chip button { min-block-size: 22px; border: 0; border-radius: 999px; background: none; padding: 0 6px; color: var(--g9a-muted); }
|
|
95
|
+
.g9a-styled .g9a-card__approval { border: 1px solid color-mix(in srgb, var(--g9a-approval-card-border) 55%, transparent); border-radius: calc(var(--g9a-radius) + 4px); padding: 14px; background: var(--g9a-surface); }
|
|
55
96
|
.g9a-styled .g9a-card__approval h3 { margin: 0 0 6px; font-size: 15px; }
|
|
56
97
|
.g9a-styled .g9a-card__approval__fact { font-size: 12px; color: var(--g9a-muted); padding-inline-start: 24px; }
|
|
57
98
|
.g9a-styled .g9a-card__approval__confirm { background: var(--g9a-accent); color: var(--g9a-accent-ink); border-color: var(--g9a-accent); }
|
|
@@ -60,7 +101,7 @@ export const STYLES = `.g9a-root { display: contents; }
|
|
|
60
101
|
.g9a-styled .g9a-row { display: flex; gap: var(--g9a-gap); margin-block-start: 8px; }
|
|
61
102
|
.g9a-styled .g9a-mode-banner { background: var(--g9a-surface-2); border-bottom: 1px solid var(--g9a-line); color: var(--g9a-warn); padding: 6px var(--g9a-pad); font-size: 13px; }
|
|
62
103
|
.g9a-styled .g9a-usage-chip { display: inline-block; block-size: 22px; line-height: 22px; padding: 0 8px; border-radius: 999px; font-size: 11px;
|
|
63
|
-
background: linear-gradient(to left, var(--g9a-surface-2) calc(100% - var(--g9a-usage)), color-mix(in srgb, var(--g9a-accent) 25%, transparent) 0); }
|
|
104
|
+
background: linear-gradient(to left, var(--g9a-surface-2) calc(100% - var(--g9a-usage)), color-mix(in srgb, var(--g9a-accent) 25%, transparent) 0); }
|
|
64
105
|
.g9a-styled .g9a-tabs { display: flex; gap: 4px; border-bottom: 1px solid var(--g9a-line); margin-block-end: 8px; }
|
|
65
106
|
.g9a-styled .g9a-tabs [aria-selected="true"] { border-bottom: 2px solid var(--g9a-accent); }
|
|
66
107
|
.g9a-styled [data-page] { background: var(--g9a-surface); color: var(--g9a-ink); border-radius: var(--g9a-radius-s); }
|
|
@@ -69,27 +110,29 @@ background: linear-gradient(to left, var(--g9a-surface-2) calc(100% - var(--g9a-
|
|
|
69
110
|
.g9a-styled [data-bad="true"], .g9a-styled [data-ok="false"] { color: var(--g9a-danger); }
|
|
70
111
|
.g9a-styled .g9a-block-title { font-weight: 600; margin-block: 4px; }
|
|
71
112
|
.g9a-styled .g9a-block__table table { border-collapse: collapse; inline-size: 100%; font-size: 13px; }
|
|
72
|
-
.g9a-styled .g9a-block__table th, .g9a-styled .g9a-block__table td { border-bottom: 1px solid var(--g9a-line); padding:
|
|
113
|
+
.g9a-styled .g9a-block__table th, .g9a-styled .g9a-block__table td { border-bottom: 1px solid var(--g9a-line); padding: 6px 8px; text-align: start; }
|
|
114
|
+
.g9a-styled .g9a-block__table th { color: var(--g9a-muted); font-size: 12px; font-weight: 600; }
|
|
73
115
|
.g9a-styled [data-kind="number"], .g9a-styled [data-kind="money"], .g9a-styled [data-kind="percent"] { text-align: end; font-variant-numeric: tabular-nums; }
|
|
74
|
-
.g9a-styled .g9a-block__table__card { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 6px; padding:
|
|
116
|
+
.g9a-styled .g9a-block__table__card { display: grid; grid-template-columns: auto 1fr; gap: 2px 10px; margin: 0 0 6px; padding: 8px 10px; background: var(--g9a-surface-2); border-radius: var(--g9a-radius-s); }
|
|
75
117
|
.g9a-styled .g9a-block__table__card dt { color: var(--g9a-muted); }
|
|
76
118
|
.g9a-styled .g9a-block__table__card dd { margin: 0; }
|
|
77
119
|
.g9a-styled .g9a-block__chart__bar { display: grid; grid-template-columns: 1fr; gap: 2px; margin-block-end: 6px; }
|
|
78
|
-
.g9a-styled .g9a-bar-track { display: block; block-size:
|
|
79
|
-
.g9a-styled .g9a-bar-fill { display: block; block-size: 100%; background: var(--g9a-chart-bar); border-radius:
|
|
120
|
+
.g9a-styled .g9a-bar-track { display: block; block-size: 8px; background: var(--g9a-surface-2); border-radius: 4px; overflow: hidden; }
|
|
121
|
+
.g9a-styled .g9a-bar-fill { display: block; block-size: 100%; background: var(--g9a-chart-bar); border-radius: 4px; }
|
|
80
122
|
.g9a-styled .g9a-bar-value { font-size: 12px; color: var(--g9a-muted); }
|
|
81
123
|
.g9a-styled .g9a-block__chart__line { inline-size: 100%; block-size: 140px; }
|
|
82
124
|
.g9a-styled .g9a-block__chart__line path { stroke: var(--g9a-chart-bar); stroke-width: 2; }
|
|
83
125
|
.g9a-styled .g9a-donut { inline-size: 120px; }
|
|
84
126
|
.g9a-styled .g9a-donut path { fill: none; stroke: var(--g9a-chart-bar); stroke-width: 14; }
|
|
85
127
|
.g9a-styled .g9a-block__kpi { display: flex; flex-wrap: wrap; gap: var(--g9a-gap); }
|
|
86
|
-
.g9a-styled .g9a-block__kpi > div { display: flex; flex-direction: column; padding:
|
|
87
|
-
.g9a-styled .g9a-block__actions { display: flex; flex-wrap: wrap; gap:
|
|
88
|
-
.g9a-styled .g9a-block__action {
|
|
89
|
-
.g9a-styled .g9a-block__action
|
|
90
|
-
.g9a-styled
|
|
128
|
+
.g9a-styled .g9a-block__kpi > div { display: flex; flex-direction: column; flex: 1 1 110px; padding: 8px 12px; background: var(--g9a-surface-2); border-radius: var(--g9a-radius); }
|
|
129
|
+
.g9a-styled .g9a-block__actions { display: flex; flex-wrap: wrap; gap: 8px; margin-block-start: 6px; }
|
|
130
|
+
.g9a-styled .g9a-block__action { display: inline-flex; align-items: center; gap: 10px; max-inline-size: 100%; padding: 0 14px; border-radius: 999px; border-color: color-mix(in srgb, var(--g9a-accent) 35%, transparent); background: color-mix(in srgb, var(--g9a-accent) 10%, transparent); text-align: start; transition: background-color var(--g9a-motion), border-color var(--g9a-motion); }
|
|
131
|
+
.g9a-styled .g9a-block__action:hover { background: color-mix(in srgb, var(--g9a-accent) 18%, transparent); border-color: color-mix(in srgb, var(--g9a-accent) 60%, transparent); }
|
|
132
|
+
.g9a-styled .g9a-block__action::after { content: ""; flex: none; inline-size: 6px; block-size: 6px; border: solid currentColor; border-width: 0 1.5px 1.5px 0; transform: rotate(-45deg); opacity: .55; }
|
|
133
|
+
.g9a-styled[dir="rtl"] .g9a-block__action::after { transform: rotate(135deg); }
|
|
91
134
|
.g9a-styled .g9a-suggested { font-size: 10px; color: var(--g9a-muted); margin-inline-start: 6px; }
|
|
92
|
-
.g9a-styled .g9a-block__callout { border-inline-start: 3px solid var(--g9a-accent); padding:
|
|
135
|
+
.g9a-styled .g9a-block__callout { border-inline-start: 3px solid var(--g9a-accent); padding: 8px 12px; background: var(--g9a-surface-2); border-start-end-radius: var(--g9a-radius-s); border-end-end-radius: var(--g9a-radius-s); }
|
|
93
136
|
.g9a-styled .g9a-block__callout[data-tone="danger"] { border-color: var(--g9a-danger); }
|
|
94
137
|
.g9a-styled .g9a-block__callout[data-tone="warn"] { border-color: var(--g9a-warn); }
|
|
95
138
|
.g9a-styled .g9a-block__image img { max-inline-size: 100%; border-radius: var(--g9a-radius-s); }
|
package/dist/surfaces.d.ts
CHANGED
|
@@ -24,11 +24,13 @@ export declare function AssistantRoot(props: AssistantRootProps): ReactNode;
|
|
|
24
24
|
export declare function MessageList(props: {
|
|
25
25
|
messages: MessageView[];
|
|
26
26
|
plans: ReadonlyMap<string, PlanView>;
|
|
27
|
-
runId: string | null;
|
|
27
|
+
runId: string | null; /** Up to four first questions, shown with a welcome while there is no message yet. */
|
|
28
|
+
starts?: string[];
|
|
28
29
|
}): ReactNode;
|
|
29
30
|
/** The chat: a composition of exported parts only (mode banner, messages, work card, composer). */
|
|
30
31
|
export declare function AssistantChat(props: {
|
|
31
32
|
placeholder?: string;
|
|
33
|
+
starts?: string[];
|
|
32
34
|
}): ReactNode;
|
|
33
35
|
export interface AssistantPanelProps {
|
|
34
36
|
/** Open or closed; left out, the panel keeps its own state (open at first). */
|
|
@@ -41,6 +43,8 @@ export interface AssistantPanelProps {
|
|
|
41
43
|
title?: string;
|
|
42
44
|
/** The header's own content in place of the title. */
|
|
43
45
|
header?: ReactNode;
|
|
46
|
+
/** Up to four first questions shown while the conversation is empty. */
|
|
47
|
+
starts?: string[];
|
|
44
48
|
}
|
|
45
49
|
/**
|
|
46
50
|
* The panel in six layouts (sheet, side, fullscreen, inline, card, compact) or "auto" by the container's width; the
|
package/dist/surfaces.js
CHANGED
|
@@ -7,7 +7,7 @@ import { useEffect, useLayoutEffect, useRef, useState } from "react";
|
|
|
7
7
|
import { pickLayout } from "@g9tm/aiassistant";
|
|
8
8
|
import { chatOf, loadHostTexts, pageTexts, withHostTexts } from "@g9tm/aiassistant/pages";
|
|
9
9
|
import { cls, override, sty, UiProvider, useSnapshot, useUi } from "./context.js";
|
|
10
|
-
import { Composer, Message, PdfButton, Small, WorkCard } from "./parts.js";
|
|
10
|
+
import { Composer, Icon, Message, PdfButton, Small, WorkCard } from "./parts.js";
|
|
11
11
|
import { STYLES } from "./styles.js";
|
|
12
12
|
import { themeVars } from "./theme.js";
|
|
13
13
|
/**
|
|
@@ -57,7 +57,7 @@ export function MessageList(props) {
|
|
|
57
57
|
measure();
|
|
58
58
|
}, [n, lastOne?.text.length]);
|
|
59
59
|
const lastAnswer = lastOne?.role === "assistant" ? lastOne.id : null;
|
|
60
|
-
return (_jsxs("div", { className: "g9a-messages-frame", children: [
|
|
60
|
+
return (_jsxs("div", { className: "g9a-messages-frame", children: [_jsxs("div", { className: cls(ui, "messages"), ref: box, "aria-live": "polite", onScroll: measure, "data-selectable": chatOf(ui.assistant).selectable, children: [n === 0 ? (_jsxs("div", { className: "g9a-messages__empty", children: [_jsx("span", { className: "g9a-messages__empty-mark", children: _jsx(Icon, { name: "mark" }) }), _jsx("strong", { children: pageTexts(ui.texts).t("chat.empty.title") }), _jsx("span", { className: "g9a-note", children: pageTexts(ui.texts).t("chat.empty.hint") }), (props.starts ?? []).length > 0 ? (_jsx("div", { className: cls(ui, "block.actions"), children: (props.starts ?? []).slice(0, 4).map((q) => _jsx("button", { type: "button", className: cls(ui, "block.action"), "data-role": "start", onClick: () => void ui.assistant.send(q), children: q }, q)) })) : null] })) : null, props.messages.map((m) => _jsx("div", { "data-id": m.id, children: _jsx(Item, { message: m, plans: props.plans, runId: props.runId, last: m.id === lastAnswer }) }, m.id))] }), below ? _jsx("button", { type: "button", className: cls(ui, "messages.newest"), "data-role": "newest", onClick: () => { const el = box.current; if (el)
|
|
61
61
|
el.scrollTop = el.scrollHeight; setBelow(false); }, children: pageTexts(ui.texts).t("messages.newest") }) : null] }));
|
|
62
62
|
}
|
|
63
63
|
/** The chat: a composition of exported parts only (mode banner, messages, work card, composer). */
|
|
@@ -68,7 +68,7 @@ export function AssistantChat(props) {
|
|
|
68
68
|
const Work = override(ui, "WorkCard") ?? WorkCard;
|
|
69
69
|
const Compose = override(ui, "Composer") ?? Composer;
|
|
70
70
|
useEffect(() => { ui.assistant.stateWatch.start(); }, [ui.assistant]);
|
|
71
|
-
return (_jsxs("div", { className: cls(ui, "chat"), children: [_jsx(Small, { kind: "mode", state: s.state }), _jsx(List, { messages: s.messages, plans: s.plans, runId: s.run?.runId ?? null }), s.run ? _jsx(Work, { run: s.run }) : null, s.error ? _jsx("div", { className: "g9a-note", role: "alert", children: ui.texts.t(s.error) }) : null, _jsx(Compose, { busy: s.busy, attachments: s.attachments, placeholder: props.placeholder })] }));
|
|
71
|
+
return (_jsxs("div", { className: cls(ui, "chat"), children: [_jsx(Small, { kind: "mode", state: s.state }), _jsx(List, { messages: s.messages, plans: s.plans, runId: s.run?.runId ?? null, starts: s.busy ? [] : props.starts ?? [] }), s.run ? _jsx(Work, { run: s.run, stop: false }) : null, s.error ? _jsx("div", { className: "g9a-note", role: "alert", children: ui.texts.t(s.error) }) : null, _jsx(Compose, { busy: s.busy, attachments: s.attachments, placeholder: props.placeholder })] }));
|
|
72
72
|
}
|
|
73
73
|
/**
|
|
74
74
|
* The panel in six layouts (sheet, side, fullscreen, inline, card, compact) or "auto" by the container's width; the
|
|
@@ -121,7 +121,7 @@ export function AssistantPanel(props) {
|
|
|
121
121
|
window.addEventListener("keydown", onKey);
|
|
122
122
|
return () => window.removeEventListener("keydown", onKey);
|
|
123
123
|
});
|
|
124
|
-
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "g9a-measure", ref: measure }), open || always ? (_jsxs("section", { className: cls(ui, "panel"), style: { ...(sty(ui, "panel") ?? {}), ...(always ? {} : { zIndex: ui.layer - 1 }) }, "data-layout": current, role: current === "sheet" || current === "fullscreen" ? "dialog" : "region", "aria-label": props.title ?? t("assistant.name"), children: [current !== "compact" ? (_jsxs("header", { className: cls(ui, "panel.header"), children: [props.header ?? _jsx("strong", { children: props.title ?? t("assistant.name") }), _jsx("button", { type: "button", onClick: () => ui.assistant.fresh(), children:
|
|
124
|
+
return (_jsxs(_Fragment, { children: [_jsx("div", { className: "g9a-measure", ref: measure }), open || always ? (_jsxs("section", { className: cls(ui, "panel"), style: { ...(sty(ui, "panel") ?? {}), ...(always ? {} : { zIndex: ui.layer - 1 }) }, "data-layout": current, role: current === "sheet" || current === "fullscreen" ? "dialog" : "region", "aria-label": props.title ?? t("assistant.name"), children: [current !== "compact" ? (_jsxs("header", { className: cls(ui, "panel.header"), children: [props.header ?? _jsxs(_Fragment, { children: [_jsx("span", { className: "g9a-panel__mark", children: _jsx(Icon, { name: "mark" }) }), _jsx("strong", { children: props.title ?? t("assistant.name") })] }), _jsxs("div", { className: "g9a-panel__tools", children: [_jsx("button", { type: "button", className: "g9a-icon-button", "data-role": "new", "aria-label": t("panel.new"), title: t("panel.new"), onClick: () => ui.assistant.fresh(), children: _jsx(Icon, { name: "new" }) }), _jsx(Pdf, { icon: true }), always ? null : _jsx("button", { type: "button", className: "g9a-icon-button", "data-role": "close", "aria-label": t("panel.close"), title: t("panel.close"), onClick: () => change(false), children: _jsx(Icon, { name: "close" }) })] })] })) : null, _jsx("div", { className: cls(ui, "panel.body"), children: _jsx(AssistantChat, { starts: props.starts ?? [] }) })] })) : null] }));
|
|
125
125
|
}
|
|
126
126
|
/**
|
|
127
127
|
* The small surfaces: the dashboard hero (greeting, one status line, three starts, a place to write), the bar button
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g9tm/aiassistant-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.12.0",
|
|
4
4
|
"description": "React DOM components for the G9 AI assistant, fully customisable (layouts, tokens, per-part classes, overrides, parts).",
|
|
5
5
|
"license": "MIT",
|
|
6
6
|
"author": {
|
|
@@ -29,7 +29,7 @@
|
|
|
29
29
|
"access": "public"
|
|
30
30
|
},
|
|
31
31
|
"dependencies": {
|
|
32
|
-
"@g9tm/aiassistant": "1.
|
|
32
|
+
"@g9tm/aiassistant": "1.12.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/react": "19.3.0",
|