@xenosystem/agent-conversation 0.1.35 → 0.1.37
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/adapters/xenoAgentHostCatalog.d.ts.map +1 -1
- package/dist/adapters/xenoAgentHostCatalog.js +20 -5
- package/dist/adapters/xenoAgentHostCatalog.js.map +1 -1
- package/dist/components/agent/AgentView.d.ts +9 -0
- package/dist/components/agent/AgentView.d.ts.map +1 -1
- package/dist/components/agent/AgentView.js +883 -1045
- package/dist/components/agent/AgentView.js.map +1 -1
- package/dist/components/agent/GhostTextArea.d.ts +6 -0
- package/dist/components/agent/GhostTextArea.d.ts.map +1 -1
- package/dist/components/agent/GhostTextArea.js +15 -5
- package/dist/components/agent/GhostTextArea.js.map +1 -1
- package/dist/components/agent/LiveConversationCollaboration.d.ts +3 -1
- package/dist/components/agent/LiveConversationCollaboration.d.ts.map +1 -1
- package/dist/components/agent/LiveConversationCollaboration.js +3 -1
- package/dist/components/agent/LiveConversationCollaboration.js.map +1 -1
- package/dist/components/agent/MessageText.d.ts +36 -0
- package/dist/components/agent/MessageText.d.ts.map +1 -0
- package/dist/components/agent/MessageText.js +76 -0
- package/dist/components/agent/MessageText.js.map +1 -0
- package/dist/components/agent/SdkSessionPanel.d.ts +2 -0
- package/dist/components/agent/SdkSessionPanel.d.ts.map +1 -1
- package/dist/components/agent/SdkSessionPanel.js +1 -1
- package/dist/components/agent/SdkSessionPanel.js.map +1 -1
- package/dist/components/agent/composer/Composer.d.ts +282 -0
- package/dist/components/agent/composer/Composer.d.ts.map +1 -0
- package/dist/components/agent/composer/Composer.js +393 -0
- package/dist/components/agent/composer/Composer.js.map +1 -0
- package/dist/components/agent/composer/EffortCells.d.ts +12 -0
- package/dist/components/agent/composer/EffortCells.d.ts.map +1 -0
- package/dist/components/agent/composer/EffortCells.js +146 -0
- package/dist/components/agent/composer/EffortCells.js.map +1 -0
- package/dist/components/agent/composer/Tip.d.ts +19 -0
- package/dist/components/agent/composer/Tip.d.ts.map +1 -0
- package/dist/components/agent/composer/Tip.js +78 -0
- package/dist/components/agent/composer/Tip.js.map +1 -0
- package/dist/components/agent/composer/TypedMenu.d.ts +56 -0
- package/dist/components/agent/composer/TypedMenu.d.ts.map +1 -0
- package/dist/components/agent/composer/TypedMenu.js +156 -0
- package/dist/components/agent/composer/TypedMenu.js.map +1 -0
- package/dist/components/agent/mainAssistant.d.ts +9 -2
- package/dist/components/agent/mainAssistant.d.ts.map +1 -1
- package/dist/components/agent/mainAssistant.js +9 -2
- package/dist/components/agent/mainAssistant.js.map +1 -1
- package/dist/components/agent/toolCallDerive.d.ts +82 -0
- package/dist/components/agent/toolCallDerive.d.ts.map +1 -0
- package/dist/components/agent/toolCallDerive.js +741 -0
- package/dist/components/agent/toolCallDerive.js.map +1 -0
- package/dist/components/agent/transcript/Transcript.d.ts +127 -0
- package/dist/components/agent/transcript/Transcript.d.ts.map +1 -0
- package/dist/components/agent/transcript/Transcript.js +544 -0
- package/dist/components/agent/transcript/Transcript.js.map +1 -0
- package/dist/components/agent/transcript/glyphs.d.ts +83 -0
- package/dist/components/agent/transcript/glyphs.d.ts.map +1 -0
- package/dist/components/agent/transcript/glyphs.js +124 -0
- package/dist/components/agent/transcript/glyphs.js.map +1 -0
- package/dist/components/agent/transcript/stepModel.d.ts +163 -0
- package/dist/components/agent/transcript/stepModel.d.ts.map +1 -0
- package/dist/components/agent/transcript/stepModel.js +701 -0
- package/dist/components/agent/transcript/stepModel.js.map +1 -0
- package/dist/components/agent/transcript/turnModel.d.ts +124 -0
- package/dist/components/agent/transcript/turnModel.d.ts.map +1 -0
- package/dist/components/agent/transcript/turnModel.js +166 -0
- package/dist/components/agent/transcript/turnModel.js.map +1 -0
- package/dist/components/agent/transcript/useAskActions.d.ts +23 -0
- package/dist/components/agent/transcript/useAskActions.d.ts.map +1 -0
- package/dist/components/agent/transcript/useAskActions.js +92 -0
- package/dist/components/agent/transcript/useAskActions.js.map +1 -0
- package/dist/parityFixture.d.ts +54 -0
- package/dist/parityFixture.d.ts.map +1 -0
- package/dist/parityFixture.js +195 -0
- package/dist/parityFixture.js.map +1 -0
- package/dist/platformApiTypes.d.ts +10 -1
- package/dist/platformApiTypes.d.ts.map +1 -1
- package/dist/stores/agentChatStore.d.ts +61 -1
- package/dist/stores/agentChatStore.d.ts.map +1 -1
- package/dist/stores/agentChatStore.js +63 -8
- package/dist/stores/agentChatStore.js.map +1 -1
- package/dist/types/agentPermissions.d.ts +3 -1
- package/dist/types/agentPermissions.d.ts.map +1 -1
- package/dist/utils/acpExecutionAuthority.d.ts.map +1 -1
- package/dist/utils/acpExecutionAuthority.js +2 -0
- package/dist/utils/acpExecutionAuthority.js.map +1 -1
- package/package.json +6 -5
- package/src/composer.css +334 -0
- package/src/styles.css +7 -0
- package/src/transcript.css +585 -0
|
@@ -0,0 +1,393 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The composer's pieces — D9 / D9a / D11 of `XENO AGENT PANEL - SPEC.md`.
|
|
4
|
+
*
|
|
5
|
+
* 🔴 The markup and the classes are the LOCKED prototype's (artifact `XENO Agent Panel`,
|
|
6
|
+
* `xeno-agent-panel-proto.html`), element for element; `composer.css` carries its rules verbatim.
|
|
7
|
+
* Presentation only: every piece takes the value it shows and the callback it fires, and `AgentView`
|
|
8
|
+
* owns the state. Nothing here reaches the store.
|
|
9
|
+
*
|
|
10
|
+
* Where a control explains itself it uses `data-tip` / `data-key`, not `title` — the prototype's
|
|
11
|
+
* tooltip (`Tip.tsx`) is ONE element for the dock, with the shortcut in its own column and the Mac
|
|
12
|
+
* spelling mapped to Ctrl elsewhere. A native `title` is a different control wearing the same words.
|
|
13
|
+
*
|
|
14
|
+
* ModeSegment Chat | Agent | Machine — the envelope (D11); Machine is enabled by a host MEASUREMENT
|
|
15
|
+
* Ctx* the context strip's vocabulary: segments, dividers, the meter, the diff, a split button
|
|
16
|
+
* PermChip Ask first ⇄ Approve for me ⇄ Full access — the chip is its own chooser
|
|
17
|
+
* LaneGroup lane | (harness) | model | effort — one visual object, the lane its own chooser
|
|
18
|
+
* SendSquare send ⇄ stop in place, breathing on the transcript's 1.4 s clock
|
|
19
|
+
* XaMenu/XaRow the composer's 8 px popover and its rows
|
|
20
|
+
* EffortCells the effort control, the prototype's own (glide, the Ultra fusion, the lattice)
|
|
21
|
+
* Tip the dock's one tooltip: the sentence left, the shortcut right, no tail
|
|
22
|
+
*/
|
|
23
|
+
import { createContext, useContext, useEffect, useLayoutEffect, useRef, useState } from 'react';
|
|
24
|
+
import { createPortal } from 'react-dom';
|
|
25
|
+
import { Glyph } from '../transcript/Transcript.js';
|
|
26
|
+
export { EffortCells } from './EffortCells.js';
|
|
27
|
+
export { TypedMenu, tokenAt } from './TypedMenu.js';
|
|
28
|
+
export { Tip, shortcutFor } from './Tip.js';
|
|
29
|
+
export const LANE_NAME = { cloud: 'Cloud', local: 'Local', acp: 'ACP' };
|
|
30
|
+
export const LANE_TIP = {
|
|
31
|
+
cloud: 'The model is served through the XENO API. Each turn draws on your credits.',
|
|
32
|
+
local: 'The model runs on this computer. No credits, and it works offline.',
|
|
33
|
+
acp: 'Another agent runs the turn — Claude Code, Codex or another ACP agent — with its own models.',
|
|
34
|
+
};
|
|
35
|
+
const LANE_GLYPH = { cloud: 'cloud', local: 'monitor', acp: 'bot' };
|
|
36
|
+
const DOCK_ICONS = {
|
|
37
|
+
folder: { size: 12, sw: 1.9, join: 'miter', d: ['M3 7h6l2 2h10v10H3z'] },
|
|
38
|
+
monitor: { size: 12, sw: 2, join: 'miter', d: ['M3 5h18v11H3z', 'M8 20h8'] },
|
|
39
|
+
'git-branch': { size: 12, sw: 1.9, join: 'miter', d: ['M6 4v12M18 8v3a3 3 0 0 1-3 3H6', 'M4 17h4v4H4zM16 4h4v4h-4z'] },
|
|
40
|
+
message: { size: 12, sw: 1.9, join: 'miter', d: ['M4 5h16v11H9l-5 4z'] },
|
|
41
|
+
'app-window': { size: 12, sw: 1.9, join: 'miter', d: ['M3 5h18v14H3z', 'M3 9h18'] },
|
|
42
|
+
lock: { size: 12, sw: 2, join: 'miter', d: ['M5 11h14v10H5z', 'M8 11V7a4 4 0 0 1 8 0v4'] },
|
|
43
|
+
cloud: { size: 12, sw: 2, join: 'miter', d: ['M4 16h13a4 4 0 0 0 0-8 6 6 0 0 0-11.3-1.5A4 4 0 0 0 4 16z'] },
|
|
44
|
+
plus: { size: 14, sw: 2, d: ['M12 5v14M5 12h14'] },
|
|
45
|
+
'arrow-up': { size: 13, sw: 2.6, join: 'miter', d: ['M12 19V5M5 12l7-7 7 7'] },
|
|
46
|
+
'chevron-down': { size: 10, sw: 2.4, d: ['M6 9l6 6 6-6'] },
|
|
47
|
+
};
|
|
48
|
+
export function DockIcon({ name }) {
|
|
49
|
+
const icon = DOCK_ICONS[name];
|
|
50
|
+
return (_jsx("svg", { width: icon.size, height: icon.size, viewBox: "0 0 24 24", fill: "none", stroke: "currentColor", strokeWidth: icon.sw, strokeLinecap: "square", ...(icon.join ? { strokeLinejoin: icon.join } : {}), "aria-hidden": "true", children: icon.d.map((d) => _jsx("path", { d: d }, d)) }));
|
|
51
|
+
}
|
|
52
|
+
const isDockIcon = (name) => Object.prototype.hasOwnProperty.call(DOCK_ICONS, name);
|
|
53
|
+
/** A dock control's icon: the bench's hand-drawn one where it drew one, the XENO element otherwise. */
|
|
54
|
+
export function DockGlyph({ name, size }) {
|
|
55
|
+
return isDockIcon(name) ? _jsx(DockIcon, { name: name }) : _jsx(Glyph, { name: name, size: size });
|
|
56
|
+
}
|
|
57
|
+
export const PERM = {
|
|
58
|
+
standard: { chip: 'Ask first', tip: 'The agent asks before editing files or using the network' },
|
|
59
|
+
'trusted-workspace': { chip: 'Approve for me', tip: 'The agent proceeds, and asks only for actions detected as unsafe' },
|
|
60
|
+
'full-access': { chip: 'Full access', tip: 'The agent may edit files and reach the network without asking' },
|
|
61
|
+
};
|
|
62
|
+
export const PERM_ORDER = ['standard', 'trusted-workspace', 'full-access'];
|
|
63
|
+
/** The posture a profile shows as. Narrow profiles (read-only, plan) read as "Ask first": they ask, or refuse. */
|
|
64
|
+
export function postureOf(profile) {
|
|
65
|
+
return profile === 'trusted-workspace' || profile === 'full-access' ? profile : 'standard';
|
|
66
|
+
}
|
|
67
|
+
// ── the workspace row ────────────────────────────────────────────────────
|
|
68
|
+
export function ModeSegment({ mode, onMode, disabled, choosing, machine }) {
|
|
69
|
+
// D11's third envelope. It is disabled by a MEASUREMENT — whether a XENO Use daemon answered
|
|
70
|
+
// with a device — never by a build flag, and the tooltip carries the host's own reason so the
|
|
71
|
+
// person is told what to do rather than that it is unavailable.
|
|
72
|
+
const machineReady = machine?.available === true;
|
|
73
|
+
return (_jsxs("div", { className: "xa-segc", role: "group", "aria-label": "Mode", children: [_jsx("button", { type: "button", className: mode === 'chat' ? 'xa-on' : '', "aria-pressed": mode === 'chat', disabled: disabled, onClick: () => onMode('chat'), "data-tip": "Chat only \u2014 no access to project files", "data-key": "\u2318\u21E7M", children: "Chat" }), _jsx("button", { type: "button", className: mode === 'agent' ? 'xa-on' : '', "aria-pressed": mode === 'agent', disabled: disabled, onClick: () => onMode('agent'), "data-tip": "Agent can read, edit and run inside the project", "data-key": "\u2318\u21E7M", children: choosing && mode !== 'agent' ? 'Choosing…' : 'Agent' }), _jsx("button", { type: "button", className: mode === 'machine' ? 'xa-on' : '', "aria-pressed": mode === 'machine', disabled: disabled || !machineReady, onClick: () => onMode('machine'), "data-tip": machineReady
|
|
74
|
+
? 'Machine — this computer, per app, under a grant you can take back'
|
|
75
|
+
: machine
|
|
76
|
+
? `Machine is off: ${machine.reason || 'no machine is available to this host.'}`
|
|
77
|
+
: 'Machine — this surface has not been given a machine to offer', "data-key": machineReady ? '⌘⇧M' : undefined, children: "Machine" })] }));
|
|
78
|
+
}
|
|
79
|
+
export function CtxStrip({ children }) {
|
|
80
|
+
return _jsx("div", { className: "xa-ctx", children: children });
|
|
81
|
+
}
|
|
82
|
+
export function CtxSeg({ glyph, name, dim, branch, title, children, onClick, disabled }) {
|
|
83
|
+
const className = `xa-seg${name ? ' xa-name' : ''}${dim ? ' xa-dim' : ''}${branch ? ' xa-branch' : ''}`;
|
|
84
|
+
const body = _jsxs(_Fragment, { children: [glyph && _jsx(DockGlyph, { name: glyph, size: 12 }), _jsx("span", { children: children })] });
|
|
85
|
+
return onClick
|
|
86
|
+
? _jsx("button", { type: "button", className: className, "data-tip": title, onClick: onClick, disabled: disabled, children: body })
|
|
87
|
+
: _jsx("div", { className: className, "data-tip": title, children: body });
|
|
88
|
+
}
|
|
89
|
+
export function CtxVr({ branch }) {
|
|
90
|
+
return _jsx("span", { className: `xa-vr${branch ? ' xa-branch' : ''}` });
|
|
91
|
+
}
|
|
92
|
+
export function CtxGrow() { return _jsx("div", { className: "xa-grow" }); }
|
|
93
|
+
export function CtxMeter({ used, cells = 4, title }) {
|
|
94
|
+
const pct = Math.max(0, Math.min(100, Math.round(used * 100)));
|
|
95
|
+
const on = Math.round(used * cells);
|
|
96
|
+
return (_jsxs("div", { className: "xa-meter xa-num", "data-tip": title, children: [_jsx("span", { className: "xa-cells", children: Array.from({ length: cells }, (_, i) => _jsx("span", { className: i < on ? 'xa-on' : '' }, i)) }), _jsxs("span", { children: [pct, "% context"] })] }));
|
|
97
|
+
}
|
|
98
|
+
export function CtxDiff({ added, removed }) {
|
|
99
|
+
// one text node per count: `+{n}` is TWO JSX text nodes, which React renders as two DOM text nodes and
|
|
100
|
+
// Chromium shapes as two runs — 1/64 px wider than the bench's single "+1" (measured 2026-09-17)
|
|
101
|
+
return _jsxs("div", { className: "xa-diff xa-num", children: [_jsx("span", { className: "xa-a", children: `+${added.toLocaleString()}` }), _jsx("span", { className: "xa-d", children: `−${removed.toLocaleString()}` })] });
|
|
102
|
+
}
|
|
103
|
+
export function CtxAction({ children, onClick, disabled, title }) {
|
|
104
|
+
return _jsx("button", { type: "button", className: "xa-act1", onClick: onClick, disabled: disabled, "data-tip": title, children: children });
|
|
105
|
+
}
|
|
106
|
+
export function CtxSplit({ label, onClick, onMore, moreMenu, moreOpen, disabled, title }) {
|
|
107
|
+
return (_jsxs("div", { className: "xa-split", children: [_jsx("button", { type: "button", onClick: onClick, disabled: disabled, "data-tip": title, children: label }), onMore && (_jsxs(_Fragment, { children: [_jsx("span", { className: "xa-vr" }), _jsx("button", { type: "button", className: "xa-caret", "aria-label": "More", "data-menu": moreMenu, "aria-haspopup": "menu", "aria-expanded": !!moreOpen, onClick: onMore, disabled: disabled, children: _jsx(DockIcon, { name: "chevron-down" }) })] }))] }));
|
|
108
|
+
}
|
|
109
|
+
export function useFoldPick(open, options) {
|
|
110
|
+
const groupRef = useRef(null);
|
|
111
|
+
const [phase, setPhase] = useState('none');
|
|
112
|
+
const travelling = useRef(null);
|
|
113
|
+
/**
|
|
114
|
+
* 🔴 A SECOND flag, and it is not redundant. `travelling` is cleared by the layout effect the
|
|
115
|
+
* instant the slide starts — and React runs layout effects BEFORE passive ones, so the
|
|
116
|
+
* close-without-a-pick effect below then saw `travelling === null`, concluded nothing had been
|
|
117
|
+
* picked, and drove the icon straight to `in` while the word was still travelling. The hold
|
|
118
|
+
* lasted one frame. This flag stays raised until the travel actually finishes.
|
|
119
|
+
*/
|
|
120
|
+
const picking = useRef(false);
|
|
121
|
+
const wasOpen = useRef(open);
|
|
122
|
+
// closed without a pick → the icon simply returns
|
|
123
|
+
useEffect(() => {
|
|
124
|
+
if (wasOpen.current && !open && !picking.current) {
|
|
125
|
+
setPhase('in');
|
|
126
|
+
const id = window.setTimeout(() => setPhase('none'), 280);
|
|
127
|
+
wasOpen.current = open;
|
|
128
|
+
return () => window.clearTimeout(id);
|
|
129
|
+
}
|
|
130
|
+
wasOpen.current = open;
|
|
131
|
+
return undefined;
|
|
132
|
+
}, [open]);
|
|
133
|
+
// beat 2, once the new value has rendered: the word travels from where it was CLICKED to where
|
|
134
|
+
// it now lives. Measured after render, like the prototype, because the destination only exists
|
|
135
|
+
// then — and the icon is released only when the travel finishes.
|
|
136
|
+
useLayoutEffect(() => {
|
|
137
|
+
const from = travelling.current;
|
|
138
|
+
if (phase !== 'hold' || from === null)
|
|
139
|
+
return;
|
|
140
|
+
travelling.current = null;
|
|
141
|
+
wasOpen.current = false;
|
|
142
|
+
const group = groupRef.current;
|
|
143
|
+
const word = group?.querySelector(options.word);
|
|
144
|
+
if (!word) {
|
|
145
|
+
picking.current = false;
|
|
146
|
+
setPhase('in');
|
|
147
|
+
return;
|
|
148
|
+
}
|
|
149
|
+
const to = word.getBoundingClientRect().left;
|
|
150
|
+
const slide = word.animate([{ transform: `translateX(${from - to}px)` }, { transform: 'none' }], { duration: 220, easing: 'cubic-bezier(.3,0,.2,1)' });
|
|
151
|
+
let cancelled = false;
|
|
152
|
+
const done = () => { if (cancelled)
|
|
153
|
+
return; picking.current = false; setPhase('in'); };
|
|
154
|
+
void slide.finished.then(done).catch(done);
|
|
155
|
+
return () => { cancelled = true; };
|
|
156
|
+
}, [options.word, phase]);
|
|
157
|
+
useEffect(() => {
|
|
158
|
+
if (phase !== 'in')
|
|
159
|
+
return undefined;
|
|
160
|
+
const id = window.setTimeout(() => setPhase('none'), 280);
|
|
161
|
+
return () => window.clearTimeout(id);
|
|
162
|
+
}, [phase]);
|
|
163
|
+
/** Run the fold around a commit. `commit` is what actually changes the value and closes. */
|
|
164
|
+
const pick = (event, commit) => {
|
|
165
|
+
const button = event.currentTarget;
|
|
166
|
+
const still = typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
167
|
+
if (still) {
|
|
168
|
+
commit();
|
|
169
|
+
return;
|
|
170
|
+
}
|
|
171
|
+
const wordX = button.getBoundingClientRect().left + parseFloat(getComputedStyle(button).paddingLeft || '0');
|
|
172
|
+
const group = groupRef.current;
|
|
173
|
+
// beat 1 — everything that is not the chosen word fades where it stands
|
|
174
|
+
group?.querySelectorAll(`.xa-alt, ${options.icon ? '[data-fold-control]' : ''}`).forEach((element) => {
|
|
175
|
+
if (element !== button)
|
|
176
|
+
element.animate([{ opacity: 1 }, { opacity: 0 }], { duration: 120, fill: 'forwards' });
|
|
177
|
+
});
|
|
178
|
+
picking.current = true;
|
|
179
|
+
window.setTimeout(() => { travelling.current = wordX; setPhase('hold'); commit(); }, 120);
|
|
180
|
+
};
|
|
181
|
+
return { groupRef, phase, pick };
|
|
182
|
+
}
|
|
183
|
+
/**
|
|
184
|
+
* A control that is only there in some modes leaves the way it arrived. The prototype keeps the
|
|
185
|
+
* element mounted and hidden so it can RISE in and SINK out; unmounting it makes it blink away,
|
|
186
|
+
* and `.xa-sink` in the stylesheet had nothing to set it.
|
|
187
|
+
*/
|
|
188
|
+
export function usePresence(present) {
|
|
189
|
+
const [state, setState] = useState(present ? 'shown' : 'hidden');
|
|
190
|
+
const was = useRef(present);
|
|
191
|
+
useEffect(() => {
|
|
192
|
+
if (present === was.current)
|
|
193
|
+
return undefined;
|
|
194
|
+
was.current = present;
|
|
195
|
+
const still = typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
196
|
+
if (still) {
|
|
197
|
+
setState(present ? 'shown' : 'hidden');
|
|
198
|
+
return undefined;
|
|
199
|
+
}
|
|
200
|
+
setState(present ? 'rise' : 'sink');
|
|
201
|
+
const id = window.setTimeout(() => setState(present ? 'shown' : 'hidden'), present ? 280 : 200);
|
|
202
|
+
return () => window.clearTimeout(id);
|
|
203
|
+
}, [present]);
|
|
204
|
+
return state;
|
|
205
|
+
}
|
|
206
|
+
// ── approvals: the chip is its own chooser ───────────────────────────────
|
|
207
|
+
export function PermChip({ value, open, onToggle, onPick, disabled, present = true }) {
|
|
208
|
+
const ref = useClickAway(open, onToggle);
|
|
209
|
+
const current = PERM[value];
|
|
210
|
+
const amber = value === 'full-access';
|
|
211
|
+
const presence = usePresence(present);
|
|
212
|
+
const { groupRef, phase, pick } = useFoldPick(open, { word: '.xa-pname', icon: '.xa-permicon' });
|
|
213
|
+
const setRefs = (node) => {
|
|
214
|
+
;
|
|
215
|
+
ref.current = node;
|
|
216
|
+
groupRef.current = node;
|
|
217
|
+
};
|
|
218
|
+
if (presence === 'hidden')
|
|
219
|
+
return null;
|
|
220
|
+
return (_jsxs("span", { ref: setRefs, className: `xa-permgrp${presence === 'rise' ? ' xa-rise' : presence === 'sink' ? ' xa-sink' : ''}`, children: [_jsxs("button", { type: "button", className: `xa-txt${amber ? ' xa-amber' : ''}${open ? ' xa-open' : ''}`, "data-permpick": true, disabled: disabled, "aria-haspopup": "true", "aria-expanded": open, "data-tip": open ? current.tip : 'Who approves what the agent does — you, or the agent itself', "data-key": "\u2318\u21E7A", "data-fold-control": true, onClick: onToggle, children: [_jsx("span", { className: `xa-permicon${open ? ' xa-out' : phase === 'hold' ? ' xa-hold' : phase === 'in' ? ' xa-in' : ''}`, children: _jsx(DockGlyph, { name: amber ? 'alert' : 'lock', size: 12 }) }), _jsx("span", { className: "xa-pname", children: current.chip })] }), open && (_jsx("span", { className: "xa-permpick", children: PERM_ORDER.filter((k) => k !== value).map((k, i) => (_jsx("button", { type: "button", className: `xa-alt${k === 'full-access' ? ' xa-amber' : ''}`, "data-tip": PERM[k].tip, style: { animationDelay: `${150 + i * 50}ms` }, onClick: (event) => pick(event, () => onPick(k)), children: PERM[k].chip }, k))) }))] }));
|
|
221
|
+
}
|
|
222
|
+
export function LaneGroup(props) {
|
|
223
|
+
const groupRef = useRef(null);
|
|
224
|
+
const laneRef = useClickAway(props.laneOpen, props.onLaneToggle);
|
|
225
|
+
// the lane's icon blurs away when the chooser opens and the NEW one blurs in when it closes —
|
|
226
|
+
// the same three beats as the approvals chip, mirrored (the picked lane's name travels left into
|
|
227
|
+
// the control's place while its icon holds its absence)
|
|
228
|
+
const { groupRef: foldRef, phase: lanePhase, pick: pickLane } = useFoldPick(props.laneOpen, { word: '.xa-lname', icon: '.xa-laneicon' });
|
|
229
|
+
// The cadence rides on --d/--r per child (D9a): out left→right accelerating, back right→left decelerating.
|
|
230
|
+
useLayoutEffect(() => {
|
|
231
|
+
const group = groupRef.current;
|
|
232
|
+
if (!group)
|
|
233
|
+
return;
|
|
234
|
+
const kids = Array.from(group.children);
|
|
235
|
+
const items = kids.filter((k) => !k.classList.contains('xa-vr'));
|
|
236
|
+
const n = items.length;
|
|
237
|
+
if (!n)
|
|
238
|
+
return;
|
|
239
|
+
const gap = (i) => 110 + 60 * (n - 2 - i);
|
|
240
|
+
const out = [0];
|
|
241
|
+
for (let i = 0; i < n - 1; i += 1)
|
|
242
|
+
out.push(out[i] + gap(i));
|
|
243
|
+
const back = new Array(n);
|
|
244
|
+
back[n - 1] = 0;
|
|
245
|
+
for (let i = n - 2; i >= 0; i -= 1)
|
|
246
|
+
back[i] = back[i + 1] + gap(i);
|
|
247
|
+
let j = 0;
|
|
248
|
+
for (const k of kids) {
|
|
249
|
+
const vr = k.classList.contains('xa-vr');
|
|
250
|
+
const jj = Math.min(j, n - 1);
|
|
251
|
+
k.style.setProperty('--d', `${out[jj] - (vr ? 15 : 0)}ms`);
|
|
252
|
+
k.style.setProperty('--r', `${back[jj] + (vr ? 15 : 0)}ms`);
|
|
253
|
+
if (!vr)
|
|
254
|
+
j += 1;
|
|
255
|
+
}
|
|
256
|
+
const fold = out[n - 1] + 220;
|
|
257
|
+
group.style.setProperty('--xa-fold', `${fold}ms`);
|
|
258
|
+
group.parentElement?.closest('.xa-controls')?.setAttribute('style', `--xa-stin: ${fold + 20}ms`);
|
|
259
|
+
});
|
|
260
|
+
const { lane, laneOpen } = props;
|
|
261
|
+
const down = props.currentDown;
|
|
262
|
+
// the bench's model group is ONE element; the popover anchors on it rather than on a wrapper
|
|
263
|
+
return (_jsxs("div", { ref: (node) => {
|
|
264
|
+
;
|
|
265
|
+
laneRef.current = node;
|
|
266
|
+
groupRef.current = node;
|
|
267
|
+
foldRef.current = node;
|
|
268
|
+
}, className: "xa-mgrp", "data-lane": lane, children: [laneOpen && (_jsx("span", { className: "xa-lanepick", children: ['cloud', 'local', 'acp'].filter((l) => l !== lane).map((l, i) => {
|
|
269
|
+
const reason = props.laneDown?.[l];
|
|
270
|
+
return (_jsxs("button", { type: "button", className: `xa-alt${reason ? ' xa-na' : ''}`, "data-tip": reason || LANE_TIP[l], style: { animationDelay: `${150 + i * 50}ms` }, onClick: (event) => pickLane(event, () => props.onLanePick(l)), children: [reason && _jsx("span", { className: "xa-dot" }), LANE_NAME[l]] }, l));
|
|
271
|
+
}) })), down ? (_jsxs("button", { type: "button", className: `xa-txt xa-down${laneOpen ? ' xa-open' : ''}`, "data-lanepick": true, disabled: props.disabled, "data-tip": down, "aria-haspopup": "true", "aria-expanded": laneOpen, onClick: props.onLaneToggle, children: [_jsx("span", { className: "xa-dot" }), _jsx("span", { className: "xa-lname", children: props.currentDownLabel || `${LANE_NAME[lane]} unavailable` }), _jsx(Glyph, { name: "chevron-down", size: 10 })] })) : (_jsxs(_Fragment, { children: [_jsxs("button", { type: "button", className: `xa-txt${laneOpen ? ' xa-open' : ''}`, "data-lanepick": true, "data-fold-control": true, disabled: props.disabled, "aria-haspopup": "true", "aria-expanded": laneOpen, "data-tip": laneOpen ? LANE_TIP[lane] : 'Where the model runs: the XENO API, this computer, or another agent', onClick: props.onLaneToggle, children: [_jsx("span", { className: `xa-laneicon${laneOpen ? ' xa-out' : lanePhase === 'hold' ? ' xa-hold' : lanePhase === 'in' ? ' xa-in' : ''}`, children: _jsx(DockGlyph, { name: LANE_GLYPH[lane], size: 12 }) }), _jsx("span", { className: "xa-lname", children: LANE_NAME[lane] })] }), _jsx("span", { className: "xa-vr" }), props.harness && (_jsxs(_Fragment, { children: [_jsx("button", { type: "button", className: `xa-txt${props.harness.open ? ' xa-open' : ''}`, "data-menu": "harness", disabled: props.disabled || props.harness.disabled, "aria-haspopup": "listbox", "aria-expanded": props.harness.open, "data-tip": props.harness.title || 'The agent that runs the turn, with its own models', onClick: props.harness.onClick, children: _jsx("span", { className: "xa-model", children: props.harness.label }) }), _jsx("span", { className: "xa-vr" })] })), _jsx("button", { type: "button", className: `xa-txt${props.model.open ? ' xa-open' : ''}`, "data-menu": "model", disabled: props.disabled || props.model.disabled, "aria-haspopup": "listbox", "aria-expanded": props.model.open, "data-tip": props.model.title || 'Which model answers', onClick: props.model.onClick, children: _jsx("span", { className: "xa-model", children: props.model.label }) }), props.effort && (_jsx("button", { type: "button", className: `xa-txt xa-pillbtn${props.effort.open ? ' xa-open' : ''}`, "data-menu": "effort", disabled: props.disabled || props.effort.disabled, "aria-haspopup": "listbox", "aria-expanded": props.effort.open, "data-tip": props.effort.title || 'How long the model thinks before it answers', onClick: props.effort.onClick, children: _jsx("span", { className: "xa-pill", children: props.effort.label }) }))] })), props.children] }));
|
|
272
|
+
}
|
|
273
|
+
/**
|
|
274
|
+
* A notice: the title, the sentence under it, what to do about it, and a way to dismiss it. The
|
|
275
|
+
* prototype's shape — two lines, never one — because the first says WHAT and the second says what
|
|
276
|
+
* follows from it, and a notice that only says what is a status light.
|
|
277
|
+
*/
|
|
278
|
+
export function Notice({ glyph, title, sub, action, onAction, onDismiss, tone, center }) {
|
|
279
|
+
return (_jsxs("div", { className: `xa-notice${center ? ' xa-center' : ''}${tone ? ` xa-${tone}` : ''}`, children: [glyph && _jsx(Glyph, { name: glyph, size: 14 }), _jsxs("div", { className: "xa-txt", children: [_jsx("span", { className: "xa-ttl", children: title }), sub && _jsx("span", { className: "xa-sub", children: sub })] }), _jsx("div", { className: "xa-grow" }), action && onAction && _jsx("button", { type: "button", className: "xa-act", onClick: onAction, children: action }), onDismiss && _jsx("button", { type: "button", className: "xa-x", "aria-label": "Dismiss", onClick: onDismiss, children: _jsx(Glyph, { name: "x", size: 11 }) })] }));
|
|
280
|
+
}
|
|
281
|
+
/**
|
|
282
|
+
* The attachment tiles: 44px squares, an image showing itself, anything else showing its extension,
|
|
283
|
+
* and past four a `+N` tile that opens the rest — the prototype's own collapse.
|
|
284
|
+
*/
|
|
285
|
+
export function Tiles({ items, showAll, onShowAll, onRemove }) {
|
|
286
|
+
if (!items.length)
|
|
287
|
+
return null;
|
|
288
|
+
const collapse = items.length > 4 && !showAll;
|
|
289
|
+
const shown = collapse ? items.slice(0, 3) : items;
|
|
290
|
+
return (_jsxs("div", { className: "xa-tiles", children: [shown.map((item) => (_jsxs("div", { className: `xa-tile${item.dataUrl ? ' xa-img' : ''}`, "data-tip": item.name, children: [item.dataUrl
|
|
291
|
+
? _jsxs(_Fragment, { children: [_jsx("span", { className: "xa-thumb", style: { backgroundImage: `url(${item.dataUrl})`, backgroundSize: 'cover', backgroundPosition: 'center' } }), _jsx(Glyph, { name: "image", size: 16 })] })
|
|
292
|
+
: (item.kind || 'file'), _jsx("button", { type: "button", className: "xa-rm", "aria-label": `Remove ${item.name}`, onClick: () => onRemove(item.id), children: _jsx(Glyph, { name: "x", size: 8 }) })] }, item.id))), collapse && (_jsx("button", { type: "button", className: "xa-tile xa-more xa-num", "data-tip": `Show all ${items.length} attachments`, onClick: onShowAll, children: `+${items.length - 3}` }))] }));
|
|
293
|
+
}
|
|
294
|
+
// ── send ⇄ stop ──────────────────────────────────────────────────────────
|
|
295
|
+
export function SendSquare({ state, onSend, onStop, stopping, sendTitle }) {
|
|
296
|
+
const running = state === 'running';
|
|
297
|
+
return (_jsxs("button", { type: "button", className: `xa-send${state === 'idle' ? ' xa-idle' : ''}${running ? ' xa-running' : ''}`,
|
|
298
|
+
// idle is a look, not a lock (bench: the square is never disabled) — an empty send is a no-op
|
|
299
|
+
disabled: running ? stopping : false, "aria-label": running ? 'Stop' : 'Send', "data-tip": running ? (stopping ? 'Stopping…' : 'Stop this turn') : (sendTitle || 'Send'), "data-key": running ? 'Esc' : '⌘↵', onClick: running ? onStop : onSend, children: [_jsx("span", { className: "xa-arrow", children: _jsx(DockIcon, { name: "arrow-up" }) }), _jsx("span", { className: "xa-stop", children: _jsx("span", {}) })] }));
|
|
300
|
+
}
|
|
301
|
+
/** `Working · 4s` beside the square while a turn runs; `Still working` from 3 s. The seconds live here, not on the transcript. */
|
|
302
|
+
export function TurnStatus({ since }) {
|
|
303
|
+
const ref = useRef(null);
|
|
304
|
+
useEffect(() => {
|
|
305
|
+
if (since === null)
|
|
306
|
+
return;
|
|
307
|
+
const tick = () => {
|
|
308
|
+
const secs = Math.max(0, Math.floor((Date.now() - since) / 1000));
|
|
309
|
+
if (ref.current)
|
|
310
|
+
ref.current.textContent = `${secs >= 3 ? 'Still working' : 'Working'} · ${secs}s`;
|
|
311
|
+
};
|
|
312
|
+
tick();
|
|
313
|
+
const id = window.setInterval(tick, 250);
|
|
314
|
+
return () => window.clearInterval(id);
|
|
315
|
+
}, [since]);
|
|
316
|
+
// nothing running, nothing to report — and no empty element left standing in the controls row
|
|
317
|
+
if (since === null)
|
|
318
|
+
return null;
|
|
319
|
+
return _jsx("span", { ref: ref, className: "xa-status xa-num", "aria-live": "off" });
|
|
320
|
+
}
|
|
321
|
+
// ── menus ────────────────────────────────────────────────────────────────
|
|
322
|
+
/**
|
|
323
|
+
* The dock element every popover positions itself against — the prototype's `dock`. A menu is a
|
|
324
|
+
* child of the DOCK, not of its anchor: that is what lets it be clamped inside the composer column
|
|
325
|
+
* and sit above a control near the panel's edge without being clipped by the control's own box.
|
|
326
|
+
*/
|
|
327
|
+
export const ComposerDock = createContext(null);
|
|
328
|
+
export function XaMenu({ open, onClose, menu, width, header, children, className, clickAway = true }) {
|
|
329
|
+
const dock = useContext(ComposerDock);
|
|
330
|
+
const ref = useClickAway(open && clickAway, onClose);
|
|
331
|
+
const [seat, setSeat] = useState(null);
|
|
332
|
+
// positionMenu, verbatim: the composer COLUMN is the bound, the visible pill is the anchor, and a
|
|
333
|
+
// control past the column's midpoint opens right-aligned to itself.
|
|
334
|
+
useLayoutEffect(() => {
|
|
335
|
+
if (!open || !dock)
|
|
336
|
+
return;
|
|
337
|
+
const place = () => {
|
|
338
|
+
const node = ref.current;
|
|
339
|
+
const anchor = (dock.querySelector(`[data-menu="${menu}"]`) || (menu === 'more' ? dock.querySelector('.xa-controls') : null));
|
|
340
|
+
if (!node || !anchor)
|
|
341
|
+
return;
|
|
342
|
+
const d = dock.getBoundingClientRect();
|
|
343
|
+
const a = anchor.getBoundingClientRect();
|
|
344
|
+
const column = (dock.querySelector('.xa-dock-inner') || dock).getBoundingClientRect();
|
|
345
|
+
const columnLeft = column.left - d.left;
|
|
346
|
+
const columnRight = column.right - d.left;
|
|
347
|
+
const visible = (anchor.querySelector('.xa-pill') || anchor).getBoundingClientRect();
|
|
348
|
+
const rightSide = (a.left + a.right) / 2 > (column.left + column.right) / 2;
|
|
349
|
+
let left = rightSide ? visible.right - d.left - node.offsetWidth : visible.left - d.left;
|
|
350
|
+
left = Math.max(columnLeft, Math.min(left, columnRight - node.offsetWidth));
|
|
351
|
+
setSeat({ left, bottom: d.height - (visible.top - d.top) + 6 });
|
|
352
|
+
};
|
|
353
|
+
place();
|
|
354
|
+
const frame = requestAnimationFrame(place); // once the rows have laid out, the width is real
|
|
355
|
+
window.addEventListener('resize', place);
|
|
356
|
+
return () => { cancelAnimationFrame(frame); window.removeEventListener('resize', place); };
|
|
357
|
+
}, [dock, menu, open, ref, children]);
|
|
358
|
+
if (!open || !dock)
|
|
359
|
+
return null;
|
|
360
|
+
const node = (_jsxs("div", { ref: ref, className: `xa-menu xa-show${className ? ` ${className}` : ''}`, style: { ...(width ? { width } : {}), ...(seat ? { left: seat.left, bottom: seat.bottom } : { visibility: 'hidden' }) }, role: "listbox", onKeyDown: (event) => { if (event.key === 'Escape') {
|
|
361
|
+
event.stopPropagation();
|
|
362
|
+
onClose();
|
|
363
|
+
} }, children: [header && _jsx("div", { className: "xa-h xa-label", children: header }), _jsx("div", { className: "xa-mrows", children: children })] }));
|
|
364
|
+
return createPortal(node, dock);
|
|
365
|
+
}
|
|
366
|
+
export function XaRow({ label, sub, idx, na, tag, selected, amber, disabled, title, onClick, chev }) {
|
|
367
|
+
// the prototype's row, element for element: the rail that fills when the row is the chosen one,
|
|
368
|
+
// the label (with a second line in `.col` when there is a sub), then the index, the reason it
|
|
369
|
+
// cannot be picked, or the chevron that says it leads somewhere.
|
|
370
|
+
return (_jsxs("button", { type: "button", role: "option", "aria-selected": !!selected, className: `xa-mrow${selected ? ' xa-on' : ''}${amber ? ' xa-amber' : ''}${sub ? ' xa-tall' : ''}`, disabled: disabled, title: title, onClick: onClick, children: [_jsx("span", { className: "xa-rail" }), sub
|
|
371
|
+
? _jsxs("span", { className: "xa-col", children: [_jsx("span", { children: label }), _jsx("span", { className: "xa-sub", children: sub })] })
|
|
372
|
+
: _jsx("span", { children: label }), na ? _jsx("span", { className: "xa-na", children: na }) : tag ? _jsx("span", { className: "xa-na", children: tag }) : idx !== undefined ? _jsx("span", { className: "xa-idx xa-num", children: idx }) : null, chev && _jsx("span", { className: "xa-chev", children: _jsx(Glyph, { name: "chevron-right", size: 11 }) })] }));
|
|
373
|
+
}
|
|
374
|
+
export function XaMenuSearch({ value, onChange, placeholder, inputRef }) {
|
|
375
|
+
return _jsx("input", { ref: inputRef, className: "xa-search", value: value, onChange: (e) => onChange(e.target.value), placeholder: placeholder || 'Search', "aria-label": "Search", autoFocus: true });
|
|
376
|
+
}
|
|
377
|
+
// ── close on a click outside, the way every chooser here closes ──────────
|
|
378
|
+
function useClickAway(active, onAway) {
|
|
379
|
+
const ref = useRef(null);
|
|
380
|
+
useEffect(() => {
|
|
381
|
+
if (!active)
|
|
382
|
+
return;
|
|
383
|
+
const handle = (event) => {
|
|
384
|
+
const node = ref.current;
|
|
385
|
+
if (node && event.target instanceof Node && !node.contains(event.target))
|
|
386
|
+
onAway();
|
|
387
|
+
};
|
|
388
|
+
document.addEventListener('mousedown', handle);
|
|
389
|
+
return () => document.removeEventListener('mousedown', handle);
|
|
390
|
+
}, [active, onAway]);
|
|
391
|
+
return ref;
|
|
392
|
+
}
|
|
393
|
+
//# sourceMappingURL=Composer.js.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"Composer.js","sourceRoot":"","sources":["../../../../src/components/agent/composer/Composer.tsx"],"names":[],"mappings":";A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ffortCells({ options, value, onPick }: {
|
|
8
|
+
options: EffortOption[];
|
|
9
|
+
value: string | undefined;
|
|
10
|
+
onPick: (id: string) => void;
|
|
11
|
+
}): import("react").JSX.Element;
|
|
12
|
+
//# sourceMappingURL=EffortCells.d.ts.map
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
{"version":3,"file":"EffortCells.d.ts","sourceRoot":"","sources":["../../../../src/components/agent/composer/EffortCells.tsx"],"names":[],"mappings":"AAgBA,MAAM,WAAW,YAAY;IAC3B,EAAE,EAAE,MAAM,CAAA;IACV,KAAK,EAAE,MAAM,CAAA;IACb,QAAQ,CAAC,EAAE,OAAO,CAAA;IAClB,KAAK,CAAC,EAAE,MAAM,CAAA;CACf;AAKD,wBAAgB,WAAW,CAAC,EAAE,OAAO,EAAE,KAAK,EAAE,MAAM,EAAE,EAAE;IACtD,OAAO,EAAE,YAAY,EAAE,CAAA;IACvB,KAAK,EAAE,MAAM,GAAG,SAAS,CAAA;IACzB,MAAM,EAAE,CAAC,EAAE,EAAE,MAAM,KAAK,IAAI,CAAA;CAC7B,+BAoJA"}
|
|
@@ -0,0 +1,146 @@
|
|
|
1
|
+
import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
|
|
2
|
+
/**
|
|
3
|
+
* The effort control — PORTED VERBATIM from the LOCKED prototype (artifact `XENO Agent Panel`,
|
|
4
|
+
* `xeno-agent-panel-proto.html`), whose own comment records what three benches settled:
|
|
5
|
+
*
|
|
6
|
+
* "H's structure (the chosen cell opens up to hold the word) with I's motion (it glides). At Ultra
|
|
7
|
+
* the five filled cells FUSE into one bar at their own 10px height and 1px corners — the gaps
|
|
8
|
+
* close, inner corners go square — and one fixed lattice of 2px squares on a 3px pitch, three
|
|
9
|
+
* rows, runs the bar. Nothing moves: a crest of brightness travels right-to-left along it,
|
|
10
|
+
* stepping up through five bands toward Ultra; every square twinkles on its own clock."
|
|
11
|
+
*
|
|
12
|
+
* Every number here is the prototype's: the 3px pitch, the five brightness bands, the 15ms-per-px
|
|
13
|
+
* phase, the 190ms glide, the nearest-CELL hit test (not an equal fifth of the track, because the
|
|
14
|
+
* knob is wider than the cells). The React work is lifecycle only — the behaviour is a transcription.
|
|
15
|
+
*/
|
|
16
|
+
import { useCallback, useEffect, useLayoutEffect, useRef } from 'react';
|
|
17
|
+
const PITCH = 3;
|
|
18
|
+
const ROWS = 3;
|
|
19
|
+
export function EffortCells({ options, value, onPick }) {
|
|
20
|
+
const trackRef = useRef(null);
|
|
21
|
+
const boxes = useRef([]);
|
|
22
|
+
const at = Math.max(0, options.findIndex((option) => option.id === value));
|
|
23
|
+
const last = options.length - 1;
|
|
24
|
+
const still = typeof matchMedia === 'function' && matchMedia('(prefers-reduced-motion: reduce)').matches;
|
|
25
|
+
// remember where every cell was BEFORE the layout changes, so the glide below has a start
|
|
26
|
+
const remember = () => {
|
|
27
|
+
const track = trackRef.current;
|
|
28
|
+
if (!track)
|
|
29
|
+
return;
|
|
30
|
+
boxes.current = Array.from(track.querySelectorAll('.xa-cell')).map((cell) => cell.getBoundingClientRect());
|
|
31
|
+
};
|
|
32
|
+
const set = useCallback((index) => {
|
|
33
|
+
const option = options[Math.max(0, Math.min(last, index))];
|
|
34
|
+
if (!option || option.disabled)
|
|
35
|
+
return;
|
|
36
|
+
remember();
|
|
37
|
+
onPick(option.id);
|
|
38
|
+
}, [last, onPick, options]);
|
|
39
|
+
// H's structure, I's motion: the layout snaps, then each cell glides from its old box to its new one
|
|
40
|
+
useLayoutEffect(() => {
|
|
41
|
+
const track = trackRef.current;
|
|
42
|
+
if (!track || still)
|
|
43
|
+
return;
|
|
44
|
+
const cells = Array.from(track.querySelectorAll('.xa-cell'));
|
|
45
|
+
const before = boxes.current;
|
|
46
|
+
boxes.current = [];
|
|
47
|
+
if (before.length !== cells.length || !before[0] || before[0].width === 0)
|
|
48
|
+
return;
|
|
49
|
+
cells.forEach((cell, i) => {
|
|
50
|
+
const a = before[i];
|
|
51
|
+
const b = cell.getBoundingClientRect();
|
|
52
|
+
const dx = a.left - b.left;
|
|
53
|
+
const sx = a.width / b.width;
|
|
54
|
+
if (Math.abs(dx) < 0.5 && Math.abs(sx - 1) < 0.01)
|
|
55
|
+
return;
|
|
56
|
+
cell.animate([{ transform: `translateX(${dx}px) scaleX(${sx})` }, { transform: 'none' }], { duration: 190, easing: 'cubic-bezier(.2,.7,.2,1)' });
|
|
57
|
+
});
|
|
58
|
+
}, [at, still]);
|
|
59
|
+
// the lattice: one fixed field of 2px squares over the FUSED bar, three rows on a 3px pitch.
|
|
60
|
+
// Brightness steps through five bands rising toward the top level; phase is 15ms per px of x, so
|
|
61
|
+
// the crest reads as one river running right to left. Rebuilt only when the bar appears.
|
|
62
|
+
useEffect(() => {
|
|
63
|
+
const track = trackRef.current;
|
|
64
|
+
if (!track)
|
|
65
|
+
return;
|
|
66
|
+
const existing = track.querySelector('.xa-flow');
|
|
67
|
+
if (at !== last || last < 5) {
|
|
68
|
+
existing?.remove();
|
|
69
|
+
return;
|
|
70
|
+
}
|
|
71
|
+
if (existing)
|
|
72
|
+
return;
|
|
73
|
+
const cells = track.querySelectorAll('.xa-cell');
|
|
74
|
+
const first = cells[0];
|
|
75
|
+
const fifth = cells[Math.min(4, cells.length - 1)];
|
|
76
|
+
if (!first || !fifth)
|
|
77
|
+
return;
|
|
78
|
+
const x0 = first.offsetLeft;
|
|
79
|
+
const width = fifth.offsetLeft + fifth.offsetWidth - x0;
|
|
80
|
+
if (width <= 0)
|
|
81
|
+
return;
|
|
82
|
+
const flow = document.createElement('span');
|
|
83
|
+
flow.className = 'xa-flow';
|
|
84
|
+
flow.style.left = `${x0}px`;
|
|
85
|
+
flow.style.width = `${width}px`;
|
|
86
|
+
const columns = Math.ceil(width / PITCH);
|
|
87
|
+
for (let row = 0; row < ROWS; row += 1) {
|
|
88
|
+
for (let column = 0; column < columns; column += 1) {
|
|
89
|
+
const x = column * PITCH + 1;
|
|
90
|
+
const band = Math.min(4, Math.floor((x / width) * 5));
|
|
91
|
+
const square = document.createElement('i');
|
|
92
|
+
square.style.setProperty('--xa-x', `${x}px`);
|
|
93
|
+
square.style.setProperty('--xa-y', `${row * PITCH + 1}px`);
|
|
94
|
+
square.style.setProperty('--xa-lo', (0.07 + band * 0.025).toFixed(3));
|
|
95
|
+
square.style.setProperty('--xa-hi', (0.30 + band * 0.16).toFixed(2));
|
|
96
|
+
square.style.setProperty('--xa-wd', `${-Math.round(x * 15 + Math.random() * 80)}ms`);
|
|
97
|
+
square.style.setProperty('--xa-tt', `${Math.round(420 + Math.random() * 900)}ms`);
|
|
98
|
+
square.style.setProperty('--xa-td', `${-Math.round(Math.random() * 1300)}ms`);
|
|
99
|
+
flow.appendChild(square);
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
track.appendChild(flow);
|
|
103
|
+
}, [at, last]);
|
|
104
|
+
// the level under the pointer is whichever CELL is under it — not an equal fifth of the track,
|
|
105
|
+
// because the knob is wider than the cells. In a gap, the nearest cell wins.
|
|
106
|
+
const fromX = (x) => {
|
|
107
|
+
const track = trackRef.current;
|
|
108
|
+
if (!track)
|
|
109
|
+
return at;
|
|
110
|
+
let best = 0;
|
|
111
|
+
let closest = Infinity;
|
|
112
|
+
Array.from(track.querySelectorAll('.xa-cell')).forEach((cell, i) => {
|
|
113
|
+
const r = cell.getBoundingClientRect();
|
|
114
|
+
const d = x < r.left ? r.left - x : x > r.right ? x - r.right : 0;
|
|
115
|
+
if (d < closest) {
|
|
116
|
+
closest = d;
|
|
117
|
+
best = i;
|
|
118
|
+
}
|
|
119
|
+
});
|
|
120
|
+
return best;
|
|
121
|
+
};
|
|
122
|
+
const preview = (index) => {
|
|
123
|
+
const track = trackRef.current;
|
|
124
|
+
if (!track)
|
|
125
|
+
return;
|
|
126
|
+
Array.from(track.querySelectorAll('.xa-cell')).forEach((cell, i) => {
|
|
127
|
+
cell.classList.toggle('xa-pre', index !== null && i <= index && i > at);
|
|
128
|
+
});
|
|
129
|
+
};
|
|
130
|
+
return (_jsxs(_Fragment, { children: [_jsxs("div", { className: "xa-ends", children: [_jsx("span", { children: "Faster" }), _jsx("span", { children: "Smarter" })] }), _jsx("div", { className: "xa-line xa-cells", children: _jsx("div", { ref: trackRef, className: `xa-sl xa-cells${at === last ? ' xa-ultra' : ''}`, tabIndex: 0, role: "slider", "aria-label": "Effort", "aria-valuemin": 0, "aria-valuemax": last, "aria-valuenow": at, "aria-valuetext": options[at]?.label, onPointerDown: (event) => {
|
|
131
|
+
event.currentTarget.setPointerCapture(event.pointerId);
|
|
132
|
+
set(fromX(event.clientX));
|
|
133
|
+
}, onPointerMove: (event) => {
|
|
134
|
+
if (event.buttons !== 1)
|
|
135
|
+
return;
|
|
136
|
+
const next = fromX(event.clientX);
|
|
137
|
+
if (next !== at)
|
|
138
|
+
set(next);
|
|
139
|
+
}, onMouseLeave: () => preview(null), onKeyDown: (event) => {
|
|
140
|
+
if (event.key !== 'ArrowLeft' && event.key !== 'ArrowRight')
|
|
141
|
+
return;
|
|
142
|
+
event.preventDefault();
|
|
143
|
+
set(at + (event.key === 'ArrowRight' ? 1 : -1));
|
|
144
|
+
}, children: options.map((option, i) => (_jsx("span", { className: `xa-cell${i === at ? ' xa-cur' : i < at ? ' xa-on' : ''}`, title: option.title || option.label, onMouseEnter: () => preview(i), children: i === at ? option.label : '' }, option.id))) }) })] }));
|
|
145
|
+
}
|
|
146
|
+
//# sourceMappingURL=EffortCells.js.map
|