@lamemind/loom-deck 0.5.0 → 0.5.1
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/cli.js +13 -1
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -204,6 +204,18 @@ function forceEmojiWidth(s) {
|
|
|
204
204
|
return s + VS16;
|
|
205
205
|
return s;
|
|
206
206
|
}
|
|
207
|
+
// Normalizza il marker Done per il display. `✔` (U+2714) è text-presentation-
|
|
208
|
+
// default: string-width — quindi Ink, sia per il layout sia per il troncamento —
|
|
209
|
+
// lo misura 2 (rispetta il VS16 di `✔️`), ma VTE/Ptyxis lo disegna largo 1
|
|
210
|
+
// (ignora il VS16). Risultato: le righe Done finivano 1 colonna più strette del
|
|
211
|
+
// riservato → la coda della riga (bordo destro del pane incluso) slittava a
|
|
212
|
+
// sinistra, sfasando il layout solo su quelle righe. `✅` (U+2705) è invece
|
|
213
|
+
// emoji-presentation-default → largo 2 sia per string-width sia per il terminale,
|
|
214
|
+
// come 🔵/🟡: colonna Prog allineata. Cambia SOLO il display: `task.prog` resta
|
|
215
|
+
// `✔️` così `isDone()` continua a matchare.
|
|
216
|
+
function displayProg(prog) {
|
|
217
|
+
return forceEmojiWidth(prog.replace(/✔️?/g, '✅'));
|
|
218
|
+
}
|
|
207
219
|
// Età relativa compatta (ms epoch → "2m"/"3h"/"5d") per il preview sessioni.
|
|
208
220
|
function relTime(ts) {
|
|
209
221
|
const sec = Math.max(0, Math.floor((Date.now() - ts) / 1000));
|
|
@@ -391,7 +403,7 @@ function TasksPane({ tasks, selected, spotCount, childCount, focused, loadError,
|
|
|
391
403
|
return (_jsxs(Box, { flexDirection: "column", width: "50%", marginRight: 1, borderStyle: "single", borderColor: focused ? 'cyan' : 'gray', paddingX: 1, children: [_jsxs(Text, { bold: true, color: focused ? 'cyan' : undefined, children: ["Tasks (", tasks.length, ")"] }), _jsxs(Text, { inverse: spotSelected && focused, bold: spotSelected && !focused, wrap: "truncate-end", children: [spotSelected ? '▶ ' : ' ', "\u25CB spot sessioni libere", spotCount > 0 ? ` (${spotCount})` : ''] }), loadError ? (_jsx(Text, { color: "red", wrap: "truncate-end", children: loadError })) : (tasks.map((task, i) => {
|
|
392
404
|
const sel = i + 1 === selected; // +1: lo 0 è spot
|
|
393
405
|
const n = childCount.get(task.id) ?? 0;
|
|
394
|
-
return (_jsxs(Text, { inverse: sel && focused, bold: sel && !focused, dimColor: !sel && isDone(task.prog), wrap: "truncate-end", children: [sel ? '▶ ' : ' ', task.id, " ", forceEmojiWidth(task.pri), " ",
|
|
406
|
+
return (_jsxs(Text, { inverse: sel && focused, bold: sel && !focused, dimColor: !sel && isDone(task.prog), wrap: "truncate-end", children: [sel ? '▶ ' : ' ', task.id, " ", forceEmojiWidth(task.pri), " ", displayProg(task.prog), " ", task.desc, n > 0 ? ` (${n})` : ''] }, task.id));
|
|
395
407
|
})), detail ? _jsx(DetailPane, { detail: detail }) : null] }));
|
|
396
408
|
}
|
|
397
409
|
function SessionsPane({ parentLabel, isSpot, sessions, total, hidden, selectedId, focused, }) {
|
package/package.json
CHANGED