@g9tm/aiassistant-react 1.11.0 → 1.13.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/cards.js +1 -1
- package/dist/pages.js +1 -1
- package/dist/parts.js +2 -2
- package/package.json +2 -2
package/dist/cards.js
CHANGED
|
@@ -28,7 +28,7 @@ export function ApprovalCard(props) {
|
|
|
28
28
|
setBusy(false);
|
|
29
29
|
}
|
|
30
30
|
};
|
|
31
|
-
return (_jsxs("div", { className: cls(ui, "card.approval"), "data-answered": p.answered ?? "", children: [_jsx("h3", { children: p.readOnly ? t("card.readonly_routine") : p.title }), p.warning ? _jsx("p", { className: "g9a-warning", role: "note", children: t("card.tainted") }) : null, _jsx("ol", { children: p.steps.map((s) => (_jsxs("li", { className: cls(ui, "card.approval.step"), children: [_jsxs("label", { children: [_jsx("input", { type: "checkbox", checked: s.ticked, disabled: p.answered !== null || p.steps.length === 1, onChange: () => ui.assistant.tick(p.id, s.index) }), s.text, s.undoable ? null : _jsxs("span", { className: "g9a-irreversible", children: [" (", t("card.irreversible"), ")"] })] }), s.facts.map((f, i) => _jsx("div", { className: cls(ui, "card.approval.fact"), children: say(f.key, f.args) }, i)), s.diff.map((d, i) => _jsx("div", { className: cls(ui, "card.approval.fact"), children: say(d.name, d.args) + ": " + (d.before ?? "—") + " ← " + (d.after ?? "—") }, "d" + String(i)))] }, s.index))) }), p.answered === null ? (_jsxs(_Fragment, { children: [needsCode(p.method) || p.failCode === REMOTE_EXPIRED ? _jsx("div", { className: cls(ui, "card.approval.code"), children: _jsx(PinPad, { label: t("card.code"), value: code, onInput: setCode }) }) : null, p.failCode === "confirm.waiting" ? _jsx("p", { className: "g9a-note", role: "status", children: t("card.waiting") })
|
|
31
|
+
return (_jsxs("div", { className: cls(ui, "card.approval"), "data-answered": p.answered ?? "", children: [_jsx("h3", { children: p.readOnly ? t("card.readonly_routine") : p.title }), p.warning ? _jsx("p", { className: "g9a-warning", role: "note", children: t("card.tainted") }) : null, _jsx("ol", { children: p.steps.map((s) => (_jsxs("li", { className: cls(ui, "card.approval.step"), children: [_jsxs("label", { children: [_jsx("input", { type: "checkbox", checked: s.ticked, disabled: p.answered !== null || p.steps.length === 1, onChange: () => ui.assistant.tick(p.id, s.index) }), s.text, s.undoable || s.undoOnDevice ? null : _jsxs("span", { className: "g9a-irreversible", children: [" (", t("card.irreversible"), ")"] })] }), s.facts.map((f, i) => _jsx("div", { className: cls(ui, "card.approval.fact"), children: say(f.key, f.args) }, i)), s.diff.map((d, i) => _jsx("div", { className: cls(ui, "card.approval.fact"), children: say(d.name, d.args) + ": " + (d.before ?? "—") + " ← " + (d.after ?? "—") }, "d" + String(i)))] }, s.index))) }), p.answered === null ? (_jsxs(_Fragment, { children: [needsCode(p.method) || p.failCode === REMOTE_EXPIRED ? _jsx("div", { className: cls(ui, "card.approval.code"), children: _jsx(PinPad, { label: t("card.code"), value: code, onInput: setCode }) }) : null, p.failCode === "confirm.waiting" ? _jsx("p", { className: "g9a-note", role: "status", children: t("card.waiting") })
|
|
32
32
|
: p.failCode ? _jsxs("p", { className: "g9a-note", role: "alert", children: [pageTexts(ui.texts).t(p.failCode), p.triesLeft !== null ? " · " + t("card.tries_left", { count: p.triesLeft }) : ""] }) : null, _jsxs("div", { className: "g9a-row", children: [_jsx("button", { type: "button", className: cls(ui, "card.approval.confirm"), disabled: busy || (needsCode(p.method) && code.length === 0), onClick: () => void confirm(), children: t("card.confirm") }), _jsx("button", { type: "button", className: cls(ui, "card.approval.refuse"), disabled: busy, onClick: () => void ui.assistant.refuse(p.id), children: t("card.refuse") })] })] })) : _jsx("p", { className: "g9a-note", children: t("card.answered") })] }));
|
|
33
33
|
}
|
|
34
34
|
export function Cards(props) {
|
package/dist/pages.js
CHANGED
|
@@ -250,7 +250,7 @@ function RoutineBody() {
|
|
|
250
250
|
const plan = card?.plan;
|
|
251
251
|
body = (_jsxs(_Fragment, { children: [_jsx("div", { className: "g9a-row", children: _jsx("button", { type: "button", className: "g9a-routines__back", onClick: () => choose(null), children: t("routine.back") }) }), _jsx("h4", { children: chosen.title || chosen.id }), result !== null ? _jsx("p", { className: "g9a-note g9a-routines__result", role: "status", children: result })
|
|
252
252
|
: report ? _jsx("div", { className: "g9a-routines__report", children: report.map((b, i) => _jsx(BlockView, { block: b }, i)) })
|
|
253
|
-
: plan ? (_jsxs("div", { className: cls(ui, "card.approval"), "data-routine-card": plan.id, children: [_jsx("h3", { children: plan.readOnly ? t("card.readonly_routine") : plan.title }), plan.warning ? _jsx("p", { className: "g9a-warning", role: "note", children: t("card.tainted") }) : null, _jsx("ol", { children: plan.steps.map((s) => (_jsxs("li", { className: cls(ui, "card.approval.step"), children: [s.text, s.undoable ? null : _jsxs("span", { className: "g9a-irreversible", children: [" (", t("card.irreversible"), ")"] }), s.facts.map((f, i) => _jsx("div", { className: cls(ui, "card.approval.fact"), children: say(f.key, f.args) }, i)), s.diff.map((d, i) => _jsx("div", { className: cls(ui, "card.approval.fact"), children: say(d.name, d.args) + ": " + (d.before ?? "—") + " ← " + (d.after ?? "—") }, "d" + String(i)))] }, s.index))) }), needsCode(plan.method) ? _jsx(PinPad, { label: t("card.code"), value: code, onInput: setCode }) : null, failure ? _jsx("p", { className: "g9a-note", role: "alert", "data-code": failure, children: (failure === "confirm.waiting" ? t("card.waiting") : t("routine.failed")) + (triesLeft !== null ? " · " + t("card.tries_left", { count: triesLeft }) : "") }) : null, _jsxs("div", { className: "g9a-row", children: [_jsx("button", { type: "button", className: cls(ui, "card.approval.confirm"), disabled: busy || (needsCode(plan.method) && code.length === 0), onClick: () => void run(), children: t("card.confirm") }), _jsx("button", { type: "button", className: cls(ui, "card.approval.refuse"), disabled: busy, onClick: () => { setCard(null); setFailure(null); }, children: t("card.refuse") })] })] })) : (_jsxs("form", { className: "g9a-routines__form", noValidate: true, onSubmit: (e) => { e.preventDefault(); void preview(); }, children: [chosen.slots.map((slot) => {
|
|
253
|
+
: plan ? (_jsxs("div", { className: cls(ui, "card.approval"), "data-routine-card": plan.id, children: [_jsx("h3", { children: plan.readOnly ? t("card.readonly_routine") : plan.title }), plan.warning ? _jsx("p", { className: "g9a-warning", role: "note", children: t("card.tainted") }) : null, _jsx("ol", { children: plan.steps.map((s) => (_jsxs("li", { className: cls(ui, "card.approval.step"), children: [s.text, s.undoable || s.undoOnDevice ? null : _jsxs("span", { className: "g9a-irreversible", children: [" (", t("card.irreversible"), ")"] }), s.facts.map((f, i) => _jsx("div", { className: cls(ui, "card.approval.fact"), children: say(f.key, f.args) }, i)), s.diff.map((d, i) => _jsx("div", { className: cls(ui, "card.approval.fact"), children: say(d.name, d.args) + ": " + (d.before ?? "—") + " ← " + (d.after ?? "—") }, "d" + String(i)))] }, s.index))) }), needsCode(plan.method) ? _jsx(PinPad, { label: t("card.code"), value: code, onInput: setCode }) : null, failure ? _jsx("p", { className: "g9a-note", role: "alert", "data-code": failure, children: (failure === "confirm.waiting" ? t("card.waiting") : t("routine.failed")) + (triesLeft !== null ? " · " + t("card.tries_left", { count: triesLeft }) : "") }) : null, _jsxs("div", { className: "g9a-row", children: [_jsx("button", { type: "button", className: cls(ui, "card.approval.confirm"), disabled: busy || (needsCode(plan.method) && code.length === 0), onClick: () => void run(), children: t("card.confirm") }), _jsx("button", { type: "button", className: cls(ui, "card.approval.refuse"), disabled: busy, onClick: () => { setCard(null); setFailure(null); }, children: t("card.refuse") })] })] })) : (_jsxs("form", { className: "g9a-routines__form", noValidate: true, onSubmit: (e) => { e.preventDefault(); void preview(); }, children: [chosen.slots.map((slot) => {
|
|
254
254
|
const st = stateOf(slot);
|
|
255
255
|
return (_jsxs("div", { className: "g9a-routines__slot", "data-slot": slot.name, "data-field": slot.field, "data-state": st, children: [slot.field === "pick" ? (_jsxs(_Fragment, { children: [_jsx("span", { className: "g9a-routines__label", children: labelOf(slot) }), _jsx(Picker, { slot: slot, label: labelOf(slot), picked: picks.get(slot.name) ?? null, onPick: (p) => setPicks((m) => {
|
|
256
256
|
const next = new Map(m);
|
package/dist/parts.js
CHANGED
|
@@ -4,8 +4,8 @@ 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";
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@g9tm/aiassistant-react",
|
|
3
|
-
"version": "1.
|
|
3
|
+
"version": "1.13.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.13.0"
|
|
33
33
|
},
|
|
34
34
|
"devDependencies": {
|
|
35
35
|
"@types/react": "19.3.0",
|