truemap-cli 0.1.0 → 0.3.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/README.md +31 -27
- package/bin/truemap.js +3 -0
- package/kit/fonts/OFL.txt +93 -0
- package/kit/fonts/ibm-plex-mono-latin-400-normal.woff2 +0 -0
- package/kit/fonts/ibm-plex-mono-latin-500-normal.woff2 +0 -0
- package/kit/fonts/ibm-plex-sans-latin-400-normal.woff2 +0 -0
- package/kit/fonts/ibm-plex-sans-latin-500-normal.woff2 +0 -0
- package/kit/fonts/ibm-plex-sans-latin-600-normal.woff2 +0 -0
- package/kit/truemap.css +248 -186
- package/package.json +1 -1
- package/skills/truemap/SKILL.md +4 -3
- package/src/check.js +32 -1
- package/src/cli.js +75 -20
- package/src/export.js +62 -0
- package/src/guide.md +67 -32
- package/src/outline.js +71 -0
- package/src/server.js +453 -394
- package/src/ui/sdk.js +350 -58
- package/src/ui/wires.js +237 -0
- package/src/ui/workspace.css +194 -128
- package/src/ui/workspace.html +59 -45
- package/src/ui/workspace.js +277 -104
package/src/ui/wires.js
ADDED
|
@@ -0,0 +1,237 @@
|
|
|
1
|
+
// Draws the wires of every .tm-map from data-to="id id:label". Used by the page SDK and by exported pages.
|
|
2
|
+
// Plain script, no dependencies: defines window.truemapWires.draw().
|
|
3
|
+
//
|
|
4
|
+
// Rules that keep the map honest:
|
|
5
|
+
// - a wire only touches its own two boxes; layers in between are crossed through free columns
|
|
6
|
+
// - every horizontal run in a gap between layers gets its own track (wires from the same box may share one)
|
|
7
|
+
// - a gap grows when it needs more tracks
|
|
8
|
+
// - exits leave from the middle of a box, entries arrive in its left third (upward ones: right third)
|
|
9
|
+
(() => {
|
|
10
|
+
if (window.truemapWires) return;
|
|
11
|
+
const SVGNS = 'http://www.w3.org/2000/svg';
|
|
12
|
+
const LANE = 9; const R = 7;
|
|
13
|
+
|
|
14
|
+
// An orthogonal path through the given points with rounded corners.
|
|
15
|
+
function ortho(points) {
|
|
16
|
+
const pts = points.filter((p, i) => i === 0 || p[0] !== points[i - 1][0] || p[1] !== points[i - 1][1]);
|
|
17
|
+
let d = `M${pts[0][0]},${pts[0][1]}`;
|
|
18
|
+
for (let i = 1; i < pts.length - 1; i++) {
|
|
19
|
+
const [px, py] = pts[i - 1]; const [x, y] = pts[i]; const [nx, ny] = pts[i + 1];
|
|
20
|
+
const l1 = Math.hypot(x - px, y - py); const l2 = Math.hypot(nx - x, ny - y);
|
|
21
|
+
if (!l1 || !l2 || (px === x && x === nx) || (py === y && y === ny)) continue;
|
|
22
|
+
const rr = Math.min(R, l1 / 2, l2 / 2);
|
|
23
|
+
d += ` L${x - ((x - px) / l1) * rr},${y - ((y - py) / l1) * rr} Q${x},${y} ${x + ((nx - x) / l2) * rr},${y + ((ny - y) / l2) * rr}`;
|
|
24
|
+
}
|
|
25
|
+
const last = pts[pts.length - 1];
|
|
26
|
+
return `${d} L${last[0]},${last[1]}`;
|
|
27
|
+
}
|
|
28
|
+
|
|
29
|
+
function drawMap(map) {
|
|
30
|
+
map.querySelector(':scope > svg.tm-wires')?.remove();
|
|
31
|
+
const sources = [...map.querySelectorAll('[data-to]')];
|
|
32
|
+
if (!sources.length) return false;
|
|
33
|
+
// Coordinates live in the map's scroll space, so wires scroll with the boxes.
|
|
34
|
+
const box = map.getBoundingClientRect();
|
|
35
|
+
const ox = box.left + map.clientLeft - map.scrollLeft; const oy = box.top + map.clientTop - map.scrollTop;
|
|
36
|
+
const rel = (r) => ({ l: r.left - ox, r: r.right - ox, t: r.top - oy, b: r.bottom - oy, cx: (r.left + r.right) / 2 - ox, cy: (r.top + r.bottom) / 2 - oy });
|
|
37
|
+
const rects = [...map.querySelectorAll('.tm-node, .tm-step')].map((n) => ({ n, ...rel(n.getBoundingClientRect()) }));
|
|
38
|
+
const rectOf = new Map(rects.map((o) => [o.n, o]));
|
|
39
|
+
|
|
40
|
+
// Rows: boxes that overlap vertically. Gap i lies between row i and row i+1.
|
|
41
|
+
const rows = [];
|
|
42
|
+
for (const o of [...rects].sort((p, q) => p.t - q.t)) {
|
|
43
|
+
const row = rows.find((w) => o.t < w.b - 2 && o.b > w.t + 2);
|
|
44
|
+
if (row) { row.t = Math.min(row.t, o.t); row.b = Math.max(row.b, o.b); row.items.push(o); } else rows.push({ t: o.t, b: o.b, items: [o] });
|
|
45
|
+
}
|
|
46
|
+
rows.sort((p, q) => p.t - q.t);
|
|
47
|
+
const rowOf = (o) => rows.findIndex((w) => w.items.includes(o));
|
|
48
|
+
|
|
49
|
+
const edges = [];
|
|
50
|
+
for (const src of sources) {
|
|
51
|
+
for (const spec of src.getAttribute('data-to').split(/[\s,]+/).filter(Boolean)) {
|
|
52
|
+
const [id, ...labelParts] = spec.split(':');
|
|
53
|
+
const dst = document.getElementById(id);
|
|
54
|
+
if (!dst || dst === src || !map.contains(dst) || !rectOf.has(src) || !rectOf.has(dst)) continue;
|
|
55
|
+
const a = rectOf.get(src); const b = rectOf.get(dst);
|
|
56
|
+
const ra = rowOf(a); const rb = rowOf(b);
|
|
57
|
+
edges.push({ src, dst, a, b, ra, rb, dir: rb > ra ? 'down' : rb < ra ? 'up' : 'same', label: labelParts.join(':').replace(/_/g, ' ') });
|
|
58
|
+
}
|
|
59
|
+
}
|
|
60
|
+
const group = (key, pick) => {
|
|
61
|
+
const m = new Map();
|
|
62
|
+
for (const e of edges.filter(pick)) (m.get(e[key]) || m.set(e[key], []).get(e[key])).push(e);
|
|
63
|
+
for (const l of m.values()) l.sort((p, q) => (key === 'src' ? p.b.cx - q.b.cx : p.a.cx - q.a.cx));
|
|
64
|
+
return m;
|
|
65
|
+
};
|
|
66
|
+
const downOut = group('src', (e) => e.dir === 'down'); const downIn = group('dst', (e) => e.dir === 'down');
|
|
67
|
+
const upOut = group('src', (e) => e.dir === 'up'); const upIn = group('dst', (e) => e.dir === 'up');
|
|
68
|
+
const slot = (list, e) => list.indexOf(e) - (list.length - 1) / 2;
|
|
69
|
+
|
|
70
|
+
// Free vertical columns through rows lo..hi (exclusive of the wire's own boxes), one wire per column.
|
|
71
|
+
const columns = [];
|
|
72
|
+
function column(e, lo, hi, prefer) {
|
|
73
|
+
const blockers = rects.filter((o) => { const r = rowOf(o); return r > lo && r < hi; });
|
|
74
|
+
const free = (x) => !blockers.some((o) => x > o.l - 7 && x < o.r + 7)
|
|
75
|
+
&& !columns.some((c) => Math.abs(c.x - x) < 8 && c.src !== e.src && c.lo < hi && c.hi > lo);
|
|
76
|
+
const cands = [prefer[0], prefer[1], ...blockers.flatMap((o) => [o.l - 13, o.r + 13])];
|
|
77
|
+
for (const c of [...cands]) for (let k = 1; k <= 4; k++) cands.push(c + k * 9, c - k * 9);
|
|
78
|
+
const x = cands.filter(free).sort((p, q) => Math.abs(p - prefer[0]) + Math.abs(p - prefer[1]) - Math.abs(q - prefer[0]) - Math.abs(q - prefer[1]))[0] ?? prefer[0];
|
|
79
|
+
columns.push({ x, lo, hi, src: e.src });
|
|
80
|
+
return x;
|
|
81
|
+
}
|
|
82
|
+
|
|
83
|
+
// Plan every wire. Horizontal runs in a gap are recorded as lane requests and get their y later.
|
|
84
|
+
const lanes = new Map(); // gap index -> [{x1, x2, src, ref}]
|
|
85
|
+
const lane = (gap, x1, x2, e) => { const ref = { y: null, gap }; ref.item = { x1: Math.min(x1, x2), x2: Math.max(x1, x2), src: e.src, ref }; (lanes.get(gap) || lanes.set(gap, []).get(gap)).push(ref.item); return ref; };
|
|
86
|
+
const plans = [];
|
|
87
|
+
for (const e of edges) {
|
|
88
|
+
const { a, b } = e;
|
|
89
|
+
if (e.dir === 'down') {
|
|
90
|
+
const sx = a.cx + slot(downOut.get(e.src), e) * 14; const sy = a.b; const ty = b.t - 6;
|
|
91
|
+
const ins = downIn.get(e.dst); const ti = ins.indexOf(e);
|
|
92
|
+
const straight = ins.length === 1 && Math.abs(a.cx - b.cx) < 4;
|
|
93
|
+
const tx = straight ? b.cx : Math.min(b.l + 26 + ti * 14, b.cx - 14);
|
|
94
|
+
if (e.rb === e.ra + 1) {
|
|
95
|
+
if (Math.abs(sx - tx) < 1) plans.push({ e, pts: [[sx, sy], [tx, ty]], head: 'down', tx, ty, label: { x: sx + 6, y: sy + 13 } });
|
|
96
|
+
else { const y = lane(e.ra, sx, tx, e); plans.push({ e, pts: [[sx, sy], [sx, y], [tx, y], [tx, ty]], head: 'down', tx, ty, label: { x: sx + 6, y: sy + 13 } }); }
|
|
97
|
+
} else {
|
|
98
|
+
const x = column(e, e.ra, e.rb, [sx, tx]);
|
|
99
|
+
const y1 = lane(e.ra, sx, x, e); const y2 = lane(e.rb - 1, x, tx, e);
|
|
100
|
+
plans.push({ e, pts: [[sx, sy], [sx, y1], [x, y1], [x, y2], [tx, y2], [tx, ty]], head: 'down', tx, ty, label: { x: sx + 6, y: sy + 13 } });
|
|
101
|
+
}
|
|
102
|
+
} else if (e.dir === 'up') {
|
|
103
|
+
const sx = a.r - 26 - (slot(upOut.get(e.src), e) + (upOut.get(e.src).length - 1) / 2) * 14; const sy = a.t;
|
|
104
|
+
const tx = b.r - 26 - upIn.get(e.dst).indexOf(e) * 14; const ty = b.b + 6;
|
|
105
|
+
if (e.rb === e.ra - 1) {
|
|
106
|
+
const y = lane(e.rb, sx, tx, e);
|
|
107
|
+
plans.push({ e, pts: [[sx, sy], [sx, y], [tx, y], [tx, ty]], head: 'up', tx, ty, label: { x: sx + 6, y: sy - 6 } });
|
|
108
|
+
} else {
|
|
109
|
+
const x = column(e, e.rb, e.ra, [sx, tx]);
|
|
110
|
+
const y1 = lane(e.ra - 1, sx, x, e); const y2 = lane(e.rb, x, tx, e);
|
|
111
|
+
plans.push({ e, pts: [[sx, sy], [sx, y1], [x, y1], [x, y2], [tx, y2], [tx, ty]], head: 'up', tx, ty, label: { x: sx + 6, y: sy - 6 } });
|
|
112
|
+
}
|
|
113
|
+
} else {
|
|
114
|
+
const blocked = rects.some((o) => o.n !== e.src && o.n !== e.dst && rowOf(o) === e.ra && o.l >= Math.min(a.r, b.r) - 1 && o.r <= Math.max(a.l, b.l) + 1);
|
|
115
|
+
if (!blocked) { // side by side
|
|
116
|
+
const right = b.l >= a.r; const sx = right ? a.r : a.l; const tx = right ? b.l - 6 : b.r + 6;
|
|
117
|
+
plans.push({ e, pts: [[sx, a.cy], [(sx + tx) / 2, a.cy], [(sx + tx) / 2, b.cy], [tx, b.cy]], head: right ? 'right' : 'left', tx, ty: b.cy, label: { x: (sx + tx) / 2, y: Math.min(a.t, b.t) - 6, middle: true } });
|
|
118
|
+
} else { // boxes in between: over the row (under it for the first row)
|
|
119
|
+
const over = e.ra > 0;
|
|
120
|
+
const sx = a.cx + (b.cx > a.cx ? 18 : -18); const tx = b.cx + (b.cx > a.cx ? -18 : 18);
|
|
121
|
+
const sy = over ? a.t : a.b; const ty = over ? b.t - 6 : b.b + 6;
|
|
122
|
+
const y = lane(over ? e.ra - 1 : e.ra, sx, tx, e);
|
|
123
|
+
plans.push({ e, pts: [[sx, sy], [sx, y], [tx, y], [tx, ty]], head: over ? 'down' : 'up', tx, ty, label: { x: sx + 6, y: over ? sy - 6 : sy + 13 } });
|
|
124
|
+
}
|
|
125
|
+
}
|
|
126
|
+
}
|
|
127
|
+
|
|
128
|
+
// Entries keep clear of unrelated vertical lines in the same gap (at least 18px), sliding within the
|
|
129
|
+
// target box, so an entry never looks like the continuation of another box's exit.
|
|
130
|
+
const stems = [];
|
|
131
|
+
for (const p of plans) {
|
|
132
|
+
const P = p.pts;
|
|
133
|
+
if (P.length === 2 && P[0][0] === P[1][0] && p.head === 'down') { stems.push({ p, kind: 'straight', gap: p.e.ra, x: () => P[0][0] }); continue; }
|
|
134
|
+
if (P.length < 4 || typeof P[1][1] !== 'object') continue;
|
|
135
|
+
stems.push({ p, kind: 'exit', gap: P[1][1].gap, x: () => P[0][0] });
|
|
136
|
+
stems.push({ p, kind: 'entry', gap: P[P.length - 2][1].gap, x: () => P[P.length - 1][0] });
|
|
137
|
+
}
|
|
138
|
+
const shares = (p, q) => [p.e.src, p.e.dst].some((n) => n === q.e.src || n === q.e.dst);
|
|
139
|
+
for (const s of stems.filter((t) => t.kind === 'entry')) {
|
|
140
|
+
const clash = (x) => stems.some((o) => o.p !== s.p && !shares(o.p, s.p) && o.gap === s.gap && Math.abs(o.x() - x) < 18);
|
|
141
|
+
const x0 = s.x(); if (!clash(x0)) continue;
|
|
142
|
+
const b = s.p.e.b; const cands = [];
|
|
143
|
+
for (let k = 1; k <= 16; k++) cands.push(x0 + k * 7, x0 - k * 7);
|
|
144
|
+
const nx = cands.find((x) => x > b.l + 10 && x < b.r - 10 && !clash(x));
|
|
145
|
+
if (nx === undefined) continue;
|
|
146
|
+
const P = s.p.pts; P[P.length - 1][0] = nx; P[P.length - 2][0] = nx; s.p.tx = nx;
|
|
147
|
+
const item = P[P.length - 2][1].item; item.x1 = Math.min(item.x1, nx); item.x2 = Math.max(item.x2, nx);
|
|
148
|
+
}
|
|
149
|
+
|
|
150
|
+
// Tracks: interval colouring per gap. Wires from the same box may share a track.
|
|
151
|
+
let grow = false;
|
|
152
|
+
for (const [gap, items] of lanes) {
|
|
153
|
+
items.sort((p, q) => p.x1 - q.x1);
|
|
154
|
+
const tracks = [];
|
|
155
|
+
for (const it of items) {
|
|
156
|
+
let t = tracks.find((k) => k.srcs.has(it.src) || k.end < it.x1 - 10);
|
|
157
|
+
if (!t) { t = { end: -Infinity, srcs: new Set() }; tracks.push(t); }
|
|
158
|
+
if (!(t.srcs.has(it.src) || t.end < it.x1 - 10)) { t.srcs.clear(); }
|
|
159
|
+
t.end = Math.max(t.end, it.x2); t.srcs.add(it.src); it.track = tracks.indexOf(t);
|
|
160
|
+
}
|
|
161
|
+
const top = gap >= 0 && gap < rows.length - 1 ? rows[gap].b : rows[0].t - 40;
|
|
162
|
+
const bottom = gap >= 0 && gap < rows.length - 1 ? rows[gap + 1].t : rows[0].t;
|
|
163
|
+
const need = tracks.length * LANE + 22;
|
|
164
|
+
if (gap >= 0 && gap < rows.length - 1 && bottom - top < need) {
|
|
165
|
+
// Make room: push the next layer down.
|
|
166
|
+
const layer = rows[gap + 1].items[0].n.closest('.tm-layer');
|
|
167
|
+
if (layer) {
|
|
168
|
+
const cur = parseFloat(getComputedStyle(layer).marginTop) || 0;
|
|
169
|
+
layer.dataset.tmGrown = '1';
|
|
170
|
+
layer.style.marginTop = `${cur + (need - (bottom - top))}px`;
|
|
171
|
+
grow = true;
|
|
172
|
+
}
|
|
173
|
+
}
|
|
174
|
+
const mid = (top + bottom) / 2;
|
|
175
|
+
for (const it of items) it.ref.y = mid + (it.track - (tracks.length - 1) / 2) * LANE;
|
|
176
|
+
}
|
|
177
|
+
if (grow) return true; // layout changed: draw again
|
|
178
|
+
|
|
179
|
+
// Draw.
|
|
180
|
+
const w = map.scrollWidth; const h = map.scrollHeight;
|
|
181
|
+
const svg = document.createElementNS(SVGNS, 'svg');
|
|
182
|
+
svg.setAttribute('class', 'tm-wires'); svg.setAttribute('aria-hidden', 'true');
|
|
183
|
+
svg.setAttribute('width', w); svg.setAttribute('height', h); svg.setAttribute('viewBox', `0 0 ${w} ${h}`);
|
|
184
|
+
const placed = []; const labelsBy = new Map();
|
|
185
|
+
for (const p of plans) {
|
|
186
|
+
const { e } = p;
|
|
187
|
+
const key = e.src.classList.contains('is-key') && e.dst.classList.contains('is-key');
|
|
188
|
+
const ext = e.dst.classList.contains('is-ext') || e.src.classList.contains('is-ext');
|
|
189
|
+
const pts = p.pts.map(([x, y]) => [x, typeof y === 'object' ? y.y : y]);
|
|
190
|
+
const path = document.createElementNS(SVGNS, 'path');
|
|
191
|
+
path.setAttribute('d', ortho(pts)); path.setAttribute('class', `tm-wire${key ? ' is-key' : ''}${ext ? ' is-ext' : ''}`);
|
|
192
|
+
const { tx, ty } = p;
|
|
193
|
+
const head = { down: `M${tx - 4.5},${ty - 1} L${tx + 4.5},${ty - 1} L${tx},${ty + 6} Z`, up: `M${tx - 4.5},${ty + 1} L${tx + 4.5},${ty + 1} L${tx},${ty - 6} Z`,
|
|
194
|
+
right: `M${tx - 1},${ty - 4.5} L${tx - 1},${ty + 4.5} L${tx + 6},${ty} Z`, left: `M${tx + 1},${ty - 4.5} L${tx + 1},${ty + 4.5} L${tx - 6},${ty} Z` }[p.head];
|
|
195
|
+
const arrow = document.createElementNS(SVGNS, 'path');
|
|
196
|
+
arrow.setAttribute('d', head); arrow.setAttribute('class', `tm-wire-head${key ? ' is-key' : ''}`);
|
|
197
|
+
svg.appendChild(path); svg.appendChild(arrow);
|
|
198
|
+
// Labels sit by the box the wire leaves; one per text per box; never on another label or a box.
|
|
199
|
+
const used = labelsBy.get(e.src) || labelsBy.set(e.src, { texts: [], x: null }).get(e.src);
|
|
200
|
+
if (e.label && !used.texts.includes(e.label)) {
|
|
201
|
+
const lw = e.label.length * 6.4; const y = p.label.y;
|
|
202
|
+
let x = p.label.middle ? p.label.x - lw / 2 : Math.max(p.label.x, used.x ?? -Infinity);
|
|
203
|
+
const hits = (lx) => placed.some((q) => lx < q.r + 8 && lx + lw > q.l - 8 && Math.abs(q.y - y) < 12)
|
|
204
|
+
|| rects.some((o) => lx < o.r && lx + lw > o.l && y > o.t && y - 10 < o.b);
|
|
205
|
+
for (let i = 0; i < 40 && hits(x); i++) x += 12;
|
|
206
|
+
const t = document.createElementNS(SVGNS, 'text');
|
|
207
|
+
t.setAttribute('class', 'tm-wire-label'); t.setAttribute('x', x); t.setAttribute('y', y);
|
|
208
|
+
t.textContent = e.label; svg.appendChild(t);
|
|
209
|
+
placed.push({ l: x, r: x + lw, y });
|
|
210
|
+
if (!p.label.middle) used.x = x + lw + 12;
|
|
211
|
+
used.texts.push(e.label);
|
|
212
|
+
}
|
|
213
|
+
}
|
|
214
|
+
// key wires on top, labels above every wire
|
|
215
|
+
[...svg.querySelectorAll('.tm-wire.is-key, .tm-wire-head.is-key')].forEach((el) => svg.appendChild(el));
|
|
216
|
+
[...svg.querySelectorAll('.tm-wire-label')].forEach((el) => svg.appendChild(el));
|
|
217
|
+
map.insertBefore(svg, map.firstChild);
|
|
218
|
+
markScroll(map);
|
|
219
|
+
return false;
|
|
220
|
+
}
|
|
221
|
+
|
|
222
|
+
function drawWires() {
|
|
223
|
+
document.documentElement.style.setProperty('--tm-vw', `${document.documentElement.clientWidth}px`);
|
|
224
|
+
for (const map of document.querySelectorAll('.tm-map, .tm-blueprint')) {
|
|
225
|
+
// Start from the authored spacing, then let gaps grow as the tracks require.
|
|
226
|
+
for (const l of map.querySelectorAll('.tm-layer[data-tm-grown]')) { l.style.marginTop = ''; delete l.dataset.tmGrown; }
|
|
227
|
+
for (let pass = 0; pass < 4 && drawMap(map); pass++) { /* re-layout */ }
|
|
228
|
+
if (map.querySelector(':scope > svg.tm-wires') === null && map.querySelector('[data-to]')) drawMap(map);
|
|
229
|
+
}
|
|
230
|
+
}
|
|
231
|
+
// A map wider than the window fades at the edge it can scroll towards.
|
|
232
|
+
function markScroll(map) {
|
|
233
|
+
map.classList.toggle('tm-scrolls', map.scrollWidth - map.clientWidth - map.scrollLeft > 4);
|
|
234
|
+
if (!map.__tmScroll) { map.__tmScroll = true; map.addEventListener('scroll', () => markScroll(map), { passive: true }); }
|
|
235
|
+
}
|
|
236
|
+
window.truemapWires = { draw: drawWires };
|
|
237
|
+
})();
|
package/src/ui/workspace.css
CHANGED
|
@@ -1,158 +1,224 @@
|
|
|
1
|
+
@font-face { font-family: "IBM Plex Sans"; font-weight: 400; font-display: swap; src: url("/__truemap/fonts/ibm-plex-sans-latin-400-normal.woff2") format("woff2"); }
|
|
2
|
+
@font-face { font-family: "IBM Plex Sans"; font-weight: 500; font-display: swap; src: url("/__truemap/fonts/ibm-plex-sans-latin-500-normal.woff2") format("woff2"); }
|
|
3
|
+
@font-face { font-family: "IBM Plex Sans"; font-weight: 600; font-display: swap; src: url("/__truemap/fonts/ibm-plex-sans-latin-600-normal.woff2") format("woff2"); }
|
|
4
|
+
@font-face { font-family: "IBM Plex Mono"; font-weight: 400; font-display: swap; src: url("/__truemap/fonts/ibm-plex-mono-latin-400-normal.woff2") format("woff2"); }
|
|
5
|
+
|
|
1
6
|
:root {
|
|
2
|
-
--paper: #
|
|
7
|
+
--paper: #f6f7f4;
|
|
8
|
+
--chrome: #fbfbfa;
|
|
3
9
|
--sheet: #ffffff;
|
|
4
|
-
--wash: #
|
|
5
|
-
--ink: #
|
|
6
|
-
--
|
|
7
|
-
--
|
|
8
|
-
--
|
|
9
|
-
--rule
|
|
10
|
-
--
|
|
11
|
-
--route
|
|
12
|
-
--
|
|
13
|
-
--
|
|
14
|
-
--
|
|
15
|
-
--
|
|
16
|
-
--
|
|
17
|
-
--
|
|
10
|
+
--wash: #eef0ec;
|
|
11
|
+
--ink: #17202b;
|
|
12
|
+
--text: #2a3441;
|
|
13
|
+
--graphite: #5b6573;
|
|
14
|
+
--pencil: #8a939e;
|
|
15
|
+
--rule: #e2e5e0;
|
|
16
|
+
--rule-strong: #c2c8c1;
|
|
17
|
+
--route: #2453c4;
|
|
18
|
+
--route-ink: #1b3f96;
|
|
19
|
+
--route-wash: #e9eefb;
|
|
20
|
+
--action: #2453c4;
|
|
21
|
+
--action-hover: #1b3f96;
|
|
22
|
+
--changed: #a2690a;
|
|
23
|
+
--broken: #b03a2e;
|
|
24
|
+
--fine: #2c7550;
|
|
25
|
+
--font: "IBM Plex Sans", system-ui, -apple-system, "Segoe UI", "PingFang SC", "Microsoft YaHei", sans-serif;
|
|
26
|
+
--code: "IBM Plex Mono", ui-monospace, "SF Mono", "Cascadia Mono", Consolas, monospace;
|
|
27
|
+
--panel-w: 372px;
|
|
18
28
|
color-scheme: light dark;
|
|
19
29
|
}
|
|
20
30
|
@media (prefers-color-scheme: dark) {
|
|
21
31
|
:root {
|
|
22
|
-
--paper: #
|
|
23
|
-
--
|
|
24
|
-
--
|
|
32
|
+
--paper: #121519; --chrome: #16191e; --sheet: #191d23; --wash: #1f242b;
|
|
33
|
+
--ink: #edf0f3; --text: #d0d6dd; --graphite: #9ba4af; --pencil: #707a86;
|
|
34
|
+
--rule: #262c34; --rule-strong: #3d4651;
|
|
35
|
+
--route: #7ea3ff; --route-ink: #a9c0ff; --route-wash: #1b2440; --action: #3a66d6; --action-hover: #2f57bd;
|
|
36
|
+
--changed: #d9a54a; --broken: #ec8170; --fine: #73bd95;
|
|
25
37
|
}
|
|
26
38
|
}
|
|
27
39
|
|
|
28
40
|
* { box-sizing: border-box; }
|
|
29
41
|
html, body { height: 100%; }
|
|
30
|
-
body { margin: 0; background: var(--paper); color: var(--
|
|
42
|
+
body { margin: 0; background: var(--paper); color: var(--text); font: 14px/1.5 var(--font); -webkit-font-smoothing: antialiased; overflow: hidden; }
|
|
31
43
|
button { font: inherit; color: inherit; }
|
|
32
|
-
[hidden] { display: none !important; }
|
|
33
44
|
:focus-visible { outline: 2px solid var(--route); outline-offset: 2px; }
|
|
34
|
-
|
|
45
|
+
code { font-family: var(--code); font-size: 0.9em; }
|
|
46
|
+
[hidden] { display: none !important; }
|
|
35
47
|
|
|
36
|
-
.app {
|
|
37
|
-
.app.
|
|
38
|
-
.app.
|
|
48
|
+
.app { display: grid; grid-template-columns: minmax(0, 1fr) var(--panel-w); grid-template-rows: 48px minmax(0, 1fr); height: 100vh; height: 100dvh; }
|
|
49
|
+
.app.panel-closed { grid-template-columns: minmax(0, 1fr) 0; }
|
|
50
|
+
.app.panel-closed .panel { display: none; }
|
|
39
51
|
|
|
40
52
|
/* ---------- top bar ---------- */
|
|
41
|
-
.
|
|
42
|
-
.
|
|
53
|
+
.bar { grid-column: 1 / -1; display: flex; align-items: center; gap: 10px; padding: 0 10px 0 16px; background: var(--chrome); border-bottom: 1px solid var(--rule); min-width: 0; }
|
|
54
|
+
.brand { display: flex; align-items: center; gap: 8px; flex: none; }
|
|
55
|
+
.mark { width: 19px; height: 19px; }
|
|
56
|
+
.mark-line { fill: var(--sheet); stroke: var(--ink); stroke-width: 1.5; stroke-linejoin: round; }
|
|
57
|
+
.mark-fill { fill: var(--route); }
|
|
58
|
+
.wordmark { font-size: 15px; font-weight: 600; letter-spacing: -0.012em; color: var(--ink); }
|
|
59
|
+
.slash { color: var(--rule-strong); font-size: 18px; font-weight: 300; margin: 0 -2px; }
|
|
43
60
|
.switcher { position: relative; min-width: 0; }
|
|
44
|
-
.page-btn { display: flex; align-items: center; gap:
|
|
61
|
+
.page-btn { display: flex; align-items: center; gap: 6px; max-width: 100%; border: 0; background: none; padding: 6px 8px; border-radius: 6px; cursor: pointer; min-width: 0; }
|
|
45
62
|
.page-btn:hover, .page-btn[aria-expanded="true"] { background: var(--wash); }
|
|
46
|
-
.
|
|
47
|
-
.mark rect { fill: none; stroke: var(--ink); stroke-width: 2.5; }
|
|
48
|
-
.mark path { fill: var(--route); }
|
|
49
|
-
.page-name { font-weight: 600; white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
63
|
+
.page-name { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
50
64
|
.chev { width: 14px; height: 14px; flex: none; fill: none; stroke: var(--graphite); stroke-width: 1.6; stroke-linecap: round; stroke-linejoin: round; }
|
|
51
65
|
.path { font: 12px var(--code); color: var(--pencil); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; min-width: 0; }
|
|
52
66
|
.spacer { flex: 1; }
|
|
53
|
-
|
|
54
|
-
.
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
.menu {
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
}
|
|
62
|
-
.menu-head { padding: 10px 12px 6px; display: grid; gap: 8px; }
|
|
63
|
-
.menu-head span { font-size: 12px; color: var(--pencil); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
64
|
-
.menu-head input { width: 100%; border: 1px solid var(--rule); border-radius: 4px; padding: 6px 8px; background: var(--paper); color: var(--ink); font: inherit; }
|
|
65
|
-
.menu-list { overflow: auto; padding: 2px 6px 6px; }
|
|
66
|
-
.page-item { display: flex; align-items: center; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 7px 8px; border-radius: 4px; cursor: pointer; }
|
|
67
|
+
|
|
68
|
+
.menu { position: absolute; top: calc(100% + 6px); left: 0; z-index: 20; width: 340px; max-height: min(70vh, 520px); display: flex; flex-direction: column;
|
|
69
|
+
background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 10px; box-shadow: 0 16px 40px -16px rgba(23, 32, 43, .3); overflow: hidden; }
|
|
70
|
+
.menu-head { padding: 10px 12px 6px; font-size: 12px; color: var(--pencil); display: grid; gap: 8px; }
|
|
71
|
+
.menu-head input { width: 100%; font: 13.5px var(--font); color: var(--text); padding: 7px 9px; border: 1px solid var(--rule); border-radius: 6px; background: var(--paper); outline: none; }
|
|
72
|
+
.menu-head input:focus { border-color: var(--route); }
|
|
73
|
+
.menu-list { overflow-y: auto; padding: 2px 6px 6px; }
|
|
74
|
+
.menu-gap { height: 1px; background: var(--rule); margin: 4px 8px; }
|
|
75
|
+
.page-item { display: flex; align-items: center; gap: 10px; width: 100%; text-align: left; border: 0; background: none; padding: 7px 8px; border-radius: 6px; cursor: pointer; }
|
|
67
76
|
.page-item:hover, .page-item:focus-visible { background: var(--wash); outline: none; }
|
|
68
77
|
.page-item.active .pi-title { color: var(--route); }
|
|
69
|
-
.pi-text {
|
|
70
|
-
.pi-title {
|
|
71
|
-
.pi-file {
|
|
72
|
-
.menu-
|
|
73
|
-
.menu-foot { display: flex; justify-content: space-between; align-items: center; padding: 8px 14px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--pencil); }
|
|
78
|
+
.pi-text { display: grid; min-width: 0; flex: 1; }
|
|
79
|
+
.pi-title { font-weight: 500; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
80
|
+
.pi-file { font: 11.5px var(--code); color: var(--pencil); }
|
|
81
|
+
.menu-foot { display: flex; align-items: center; justify-content: space-between; padding: 8px 14px; border-top: 1px solid var(--rule); font-size: 12px; color: var(--pencil); }
|
|
74
82
|
.text-btn { border: 0; background: none; padding: 0; color: var(--route); cursor: pointer; font-size: 12.5px; }
|
|
75
83
|
.text-btn:hover { text-decoration: underline; text-underline-offset: 3px; }
|
|
76
84
|
|
|
77
|
-
.
|
|
78
|
-
.
|
|
79
|
-
.
|
|
80
|
-
|
|
81
|
-
.check-
|
|
82
|
-
.check
|
|
83
|
-
.check
|
|
84
|
-
.
|
|
85
|
-
.
|
|
86
|
-
.
|
|
87
|
-
.
|
|
88
|
-
|
|
89
|
-
|
|
90
|
-
.
|
|
91
|
-
|
|
92
|
-
.
|
|
93
|
-
.
|
|
94
|
-
.
|
|
95
|
-
.
|
|
96
|
-
|
|
97
|
-
|
|
98
|
-
.
|
|
99
|
-
.
|
|
100
|
-
.
|
|
101
|
-
.
|
|
102
|
-
.
|
|
103
|
-
.
|
|
104
|
-
|
|
105
|
-
|
|
106
|
-
|
|
107
|
-
.
|
|
108
|
-
|
|
109
|
-
.
|
|
110
|
-
.
|
|
111
|
-
.
|
|
112
|
-
.
|
|
113
|
-
.
|
|
114
|
-
.
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
.
|
|
118
|
-
.
|
|
119
|
-
.
|
|
120
|
-
.
|
|
121
|
-
.
|
|
122
|
-
.
|
|
123
|
-
.
|
|
124
|
-
.
|
|
125
|
-
|
|
126
|
-
.
|
|
127
|
-
|
|
128
|
-
.
|
|
129
|
-
|
|
130
|
-
.
|
|
131
|
-
.
|
|
132
|
-
.
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
.
|
|
136
|
-
.
|
|
137
|
-
.
|
|
138
|
-
.
|
|
139
|
-
.
|
|
140
|
-
.
|
|
141
|
-
.
|
|
142
|
-
.
|
|
143
|
-
.
|
|
144
|
-
.
|
|
145
|
-
.
|
|
146
|
-
.
|
|
147
|
-
|
|
85
|
+
.tri { display: inline-block; width: 8px; height: 7px; flex: none; background: var(--fine); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
|
|
86
|
+
.tri.changed { background: var(--changed); }
|
|
87
|
+
.tri.broken { background: var(--broken); }
|
|
88
|
+
|
|
89
|
+
.check { display: inline-flex; align-items: center; gap: 7px; border: 0; background: none; padding: 6px 8px; border-radius: 6px; font-size: 13px; color: var(--graphite); white-space: nowrap; cursor: default; }
|
|
90
|
+
.check i { display: inline-block; width: 8px; height: 7px; background: var(--fine); clip-path: polygon(50% 0, 100% 100%, 0 100%); }
|
|
91
|
+
.check[data-state="changed"] { color: var(--changed); cursor: pointer; }
|
|
92
|
+
.check[data-state="changed"] i { background: var(--changed); }
|
|
93
|
+
.check[data-state="broken"] { color: var(--broken); cursor: pointer; }
|
|
94
|
+
.check[data-state="broken"] i { background: var(--broken); }
|
|
95
|
+
.check[data-state="changed"]:hover, .check[data-state="broken"]:hover { background: var(--wash); }
|
|
96
|
+
|
|
97
|
+
.annotate { display: inline-flex; align-items: center; gap: 8px; border: 0; background: none; padding: 6px 8px; border-radius: 6px; cursor: pointer; font-size: 13px; color: var(--graphite); }
|
|
98
|
+
.annotate:hover { background: var(--wash); color: var(--ink); }
|
|
99
|
+
.annotate .track { position: relative; width: 28px; height: 16px; border-radius: 8px; background: var(--rule-strong); transition: background-color 140ms ease; }
|
|
100
|
+
.annotate .thumb { position: absolute; top: 2px; left: 2px; width: 12px; height: 12px; border-radius: 50%; background: #fff; transition: transform 140ms ease; }
|
|
101
|
+
.annotate[aria-checked="true"] { color: var(--ink); }
|
|
102
|
+
.annotate[aria-checked="true"] .track { background: var(--route); }
|
|
103
|
+
.annotate[aria-checked="true"] .thumb { transform: translateX(12px); }
|
|
104
|
+
.annotate:disabled { opacity: .45; cursor: default; }
|
|
105
|
+
|
|
106
|
+
.icon-btn { position: relative; display: inline-grid; place-items: center; width: 32px; height: 32px; border: 0; background: none; border-radius: 6px; cursor: pointer; color: var(--graphite); }
|
|
107
|
+
.icon-btn:hover { background: var(--wash); color: var(--ink); }
|
|
108
|
+
.icon-btn svg { width: 19px; height: 19px; fill: none; stroke: currentColor; stroke-width: 1.5; stroke-linejoin: round; }
|
|
109
|
+
.icon-btn .panel-fill { fill: currentColor; stroke: none; opacity: 0; }
|
|
110
|
+
.icon-btn[aria-pressed="true"] .panel-fill { opacity: .28; }
|
|
111
|
+
.unread { position: absolute; top: 6px; right: 5px; width: 7px; height: 7px; border-radius: 50%; background: var(--route); box-shadow: 0 0 0 2px var(--chrome); }
|
|
112
|
+
.unread.count { top: 2px; right: 0; width: auto; min-width: 16px; height: 16px; padding: 0 4px; border-radius: 8px; background: var(--action); color: #fff; font: 600 10px/16px var(--code); text-align: center; }
|
|
113
|
+
|
|
114
|
+
/* ---------- stage ---------- */
|
|
115
|
+
.stage { position: relative; min-width: 0; min-height: 0; background: var(--paper); }
|
|
116
|
+
#frame { display: block; width: 100%; height: 100%; border: 0; background: var(--paper); }
|
|
117
|
+
.empty { position: absolute; inset: 0; display: flex; flex-direction: column; align-items: flex-start; justify-content: center; max-width: 520px; margin: 0 auto; padding: 32px; }
|
|
118
|
+
.empty-mark { width: 30px; height: 30px; margin-bottom: 20px; }
|
|
119
|
+
.empty h1 { font-size: 26px; line-height: 1.2; letter-spacing: -0.015em; color: var(--ink); margin: 0 0 10px; font-weight: 600; }
|
|
120
|
+
.empty p { font-size: 15.5px; color: var(--graphite); margin: 0 0 22px; line-height: 1.55; }
|
|
121
|
+
.primary { border: 0; background: var(--action); color: #fff; font-weight: 500; padding: 10px 16px; border-radius: 6px; cursor: pointer; }
|
|
122
|
+
.primary:hover { background: var(--action-hover); }
|
|
123
|
+
|
|
124
|
+
/* ---------- conversation panel ---------- */
|
|
125
|
+
.panel { display: flex; flex-direction: column; min-height: 0; background: var(--chrome); border-left: 1px solid var(--rule); }
|
|
126
|
+
.panel-head { display: flex; align-items: center; justify-content: space-between; gap: 10px; padding: 12px 16px 10px; border-bottom: 1px solid var(--rule); }
|
|
127
|
+
.agent-state { display: inline-flex; align-items: center; gap: 8px; font-size: 13px; color: var(--graphite); min-width: 0; }
|
|
128
|
+
.agent-state i { width: 7px; height: 7px; border-radius: 50%; background: var(--rule-strong); flex: none; }
|
|
129
|
+
.agent-state[data-state="listening"] i { background: var(--fine); }
|
|
130
|
+
.agent-state[data-state="working"] i { background: var(--route); animation: pulse 1.4s ease-in-out infinite; }
|
|
131
|
+
.agent-state[data-state="idle"] i, .agent-state[data-state="stale"] i { background: var(--changed); }
|
|
132
|
+
.agent-state[data-state="closed"] i { background: var(--broken); }
|
|
133
|
+
@keyframes pulse { 50% { opacity: .35; } }
|
|
134
|
+
.elapsed { font: 12px var(--code); color: var(--pencil); }
|
|
135
|
+
|
|
136
|
+
.msgs { flex: 1; overflow-y: auto; padding: 14px 16px 18px; min-height: 0; }
|
|
137
|
+
.intro h2 { font-size: 15px; font-weight: 600; color: var(--ink); margin: 6px 0 10px; }
|
|
138
|
+
.intro ol { margin: 0; padding: 0; list-style: none; counter-reset: s; }
|
|
139
|
+
.intro li { counter-increment: s; position: relative; padding-left: 26px; margin: 0 0 10px; color: var(--graphite); font-size: 13.5px; line-height: 1.5; }
|
|
140
|
+
.intro li::before { content: counter(s); position: absolute; left: 0; top: 1px; width: 17px; height: 17px; border-radius: 50%; border: 1px solid var(--rule-strong); font: 500 10.5px/15px var(--code); text-align: center; color: var(--graphite); }
|
|
141
|
+
.intro kbd { font: 11.5px var(--code); padding: 0 4px; border: 1px solid var(--rule-strong); border-bottom-width: 2px; border-radius: 4px; color: var(--ink); background: var(--sheet); }
|
|
142
|
+
|
|
143
|
+
.who { display: flex; align-items: baseline; gap: 8px; margin: 18px 0 6px; font-size: 12px; color: var(--pencil); }
|
|
144
|
+
.who b { font-weight: 600; color: var(--graphite); }
|
|
145
|
+
.msgs > .who:first-child { margin-top: 2px; }
|
|
146
|
+
.msg { margin: 0 0 8px; font-size: 14px; line-height: 1.55; color: var(--text); overflow-wrap: anywhere; }
|
|
147
|
+
.msg.user { background: var(--sheet); border: 1px solid var(--rule); border-radius: 8px; padding: 9px 12px; }
|
|
148
|
+
.msg.user .from-page { font-size: 11.5px; color: var(--changed); margin-top: 4px; }
|
|
149
|
+
.msg.user .waiting { font-size: 11.5px; color: var(--pencil); margin-top: 4px; }
|
|
150
|
+
.msg p { margin: 0 0 8px; } .msg p:last-child { margin-bottom: 0; }
|
|
151
|
+
.msg ul, .msg ol { margin: 4px 0 8px; padding-left: 18px; } .msg li { margin: 2px 0; }
|
|
152
|
+
.msg h4 { font-size: 14px; margin: 12px 0 4px; color: var(--ink); }
|
|
153
|
+
.msg :not(pre) > code { background: var(--wash); padding: 1px 4px; border-radius: 4px; color: var(--ink); }
|
|
154
|
+
.msg pre { background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; padding: 8px 10px; overflow-x: auto; font-size: 12.5px; }
|
|
155
|
+
.msg a { color: var(--route); text-underline-offset: 3px; }
|
|
156
|
+
.msg strong { color: var(--ink); font-weight: 600; }
|
|
157
|
+
.msg-notes { list-style: none; margin: 0; padding: 0; display: grid; gap: 7px; }
|
|
158
|
+
.msg-notes + .msg-text { margin-top: 8px; padding-top: 8px; border-top: 1px solid var(--rule); }
|
|
159
|
+
.mn { display: grid; grid-template-columns: 18px minmax(0, 1fr); gap: 2px 8px; }
|
|
160
|
+
.mn-num { grid-row: 1 / span 2; width: 18px; height: 18px; border-radius: 50%; background: var(--action); color: #fff; font: 600 10px/18px var(--code); text-align: center; margin-top: 1px; }
|
|
161
|
+
.mn-what { font-size: 12px; color: var(--pencil); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
162
|
+
.mn-what b { color: var(--graphite); font-weight: 500; }
|
|
163
|
+
.answer-q { display: block; font-size: 12px; color: var(--pencil); margin-bottom: 2px; }
|
|
164
|
+
|
|
165
|
+
.working { display: flex; align-items: center; gap: 8px; margin: 14px 0 0; font-size: 13px; color: var(--graphite); }
|
|
166
|
+
.working i { width: 7px; height: 7px; border-radius: 50%; background: var(--route); animation: pulse 1.4s ease-in-out infinite; }
|
|
167
|
+
|
|
168
|
+
.notice { margin: 0 12px 10px; padding: 11px 13px; border-radius: 8px; background: var(--wash); font-size: 13px; color: var(--graphite); line-height: 1.5; }
|
|
169
|
+
.notice b { display: block; color: var(--ink); font-weight: 600; margin-bottom: 2px; font-size: 13.5px; }
|
|
170
|
+
.notice .after { margin: 8px 0 0; }
|
|
171
|
+
.notice .cmd { display: flex; align-items: center; gap: 6px; margin-top: 8px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 6px; padding: 5px 5px 5px 9px; }
|
|
172
|
+
.notice .cmd code { flex: 1; font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; }
|
|
173
|
+
.notice .copy { border: 0; background: none; color: var(--route); font-size: 12px; font-weight: 500; padding: 3px 6px; border-radius: 4px; cursor: pointer; }
|
|
174
|
+
.notice .copy:hover { background: var(--route-wash); }
|
|
175
|
+
|
|
176
|
+
.composer { padding: 0 12px 12px; }
|
|
177
|
+
.notes { list-style: none; margin: 0 0 8px; padding: 0; display: grid; gap: 4px; max-height: 34vh; overflow-y: auto; }
|
|
178
|
+
.note { display: grid; grid-template-columns: 18px minmax(0, 1fr) auto; gap: 1px 8px; align-items: start; padding: 7px 6px 7px 8px; background: var(--sheet); border: 1px solid var(--rule); border-radius: 7px; cursor: pointer; }
|
|
179
|
+
.note:hover { border-color: var(--rule-strong); }
|
|
180
|
+
.note .mn-num { grid-row: 1 / span 2; }
|
|
181
|
+
.note-text { font-size: 13px; color: var(--text); overflow: hidden; display: -webkit-box; -webkit-line-clamp: 2; -webkit-box-orient: vertical; }
|
|
182
|
+
.note-x { grid-row: 1 / span 2; grid-column: 3; border: 0; background: none; color: var(--pencil); cursor: pointer; width: 22px; height: 22px; border-radius: 4px; font-size: 16px; line-height: 1; }
|
|
183
|
+
.note-x:hover { background: var(--wash); color: var(--ink); }
|
|
184
|
+
|
|
185
|
+
.box { background: var(--sheet); border: 1px solid var(--rule-strong); border-radius: 10px; padding: 9px 10px 8px 12px; }
|
|
186
|
+
.box:focus-within { border-color: var(--route); }
|
|
187
|
+
#input { display: block; width: 100%; resize: none; border: 0; outline: none; background: none; font: 14px/1.5 var(--font); color: var(--text); max-height: 180px; overflow-y: auto; padding: 0; }
|
|
148
188
|
#input::placeholder { color: var(--pencil); }
|
|
149
|
-
.
|
|
150
|
-
.
|
|
189
|
+
.box-foot { display: flex; align-items: center; justify-content: space-between; gap: 8px; margin-top: 6px; }
|
|
190
|
+
.box-hint { font-size: 11.5px; color: var(--pencil); }
|
|
191
|
+
.send { border: 0; background: var(--action); color: #fff; font-size: 13px; font-weight: 500; padding: 6px 12px; border-radius: 6px; cursor: pointer; }
|
|
192
|
+
.send:hover { background: var(--action-hover); }
|
|
193
|
+
.send:disabled { background: var(--wash); color: var(--pencil); cursor: default; }
|
|
194
|
+
|
|
195
|
+
/* the server is gone */
|
|
196
|
+
.app[data-conn="closed"] .composer, .app[data-conn="closed"] .annotate { opacity: .5; pointer-events: none; }
|
|
151
197
|
|
|
152
|
-
/* ----------
|
|
198
|
+
/* ---------- small screens: the conversation becomes a bottom sheet ---------- */
|
|
153
199
|
@media (max-width: 860px) {
|
|
154
|
-
.app, .app.
|
|
155
|
-
.path { display: none; }
|
|
156
|
-
.
|
|
200
|
+
.app, .app.panel-closed { grid-template-columns: minmax(0, 1fr); }
|
|
201
|
+
.path, .slash, .wordmark, #checkText { display: none; }
|
|
202
|
+
.bar { gap: 4px; padding: 0 6px 0 12px; }
|
|
203
|
+
.panel { position: fixed; left: 0; right: 0; bottom: 0; height: min(70vh, 560px); z-index: 30; border-left: 0; border-top: 1px solid var(--rule-strong); border-radius: 14px 14px 0 0; box-shadow: 0 -18px 40px -24px rgba(23, 32, 43, .45); }
|
|
204
|
+
.menu { width: min(340px, calc(100vw - 24px)); }
|
|
157
205
|
}
|
|
158
|
-
@media (prefers-reduced-motion: reduce) {
|
|
206
|
+
@media (prefers-reduced-motion: reduce) {
|
|
207
|
+
* { animation: none !important; transition: none !important; }
|
|
208
|
+
}
|
|
209
|
+
.app[data-conn="closed"] .empty .primary { display: none; }
|
|
210
|
+
|
|
211
|
+
/* ---------- more menu ---------- */
|
|
212
|
+
.more { position: relative; }
|
|
213
|
+
.icon-btn .dot { fill: currentColor; stroke: none; }
|
|
214
|
+
.more-menu { left: auto; right: 0; width: 300px; padding: 6px; }
|
|
215
|
+
.more-file { padding: 6px 8px 10px; }
|
|
216
|
+
.more-label { display: block; font-size: 12px; color: var(--pencil); margin-bottom: 4px; }
|
|
217
|
+
.more-path { display: flex; align-items: center; gap: 10px; min-width: 0; }
|
|
218
|
+
.more-path code { flex: 1; min-width: 0; font-size: 12px; color: var(--ink); white-space: nowrap; overflow: hidden; text-overflow: ellipsis; direction: rtl; text-align: left; }
|
|
219
|
+
.more-item { display: flex; align-items: flex-start; gap: 10px; width: 100%; border: 0; background: none; text-align: left; padding: 8px; border-radius: 6px; cursor: pointer; color: var(--ink); }
|
|
220
|
+
.more-item:hover:not(:disabled), .more-item:focus-visible { background: var(--wash); outline: none; }
|
|
221
|
+
.more-item svg { width: 18px; height: 18px; flex: none; margin-top: 1px; fill: none; stroke: var(--graphite); stroke-width: 1.5; stroke-linecap: round; stroke-linejoin: round; }
|
|
222
|
+
.more-item span { display: grid; gap: 1px; font-weight: 500; }
|
|
223
|
+
.more-item small { font-size: 12px; font-weight: 400; color: var(--pencil); }
|
|
224
|
+
.more-item:disabled { opacity: .45; cursor: default; }
|