skild 0.10.12 → 0.10.13
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/index.js +5 -4
- package/package.json +1 -1
package/dist/index.js
CHANGED
|
@@ -313,10 +313,11 @@ async function interactiveTreeSelect(items, options) {
|
|
|
313
313
|
}
|
|
314
314
|
function toggleNode(node) {
|
|
315
315
|
const { state } = getNodeSelection(node, selected);
|
|
316
|
-
|
|
317
|
-
|
|
318
|
-
} else {
|
|
316
|
+
const shouldSelectAll = state !== "all";
|
|
317
|
+
if (shouldSelectAll) {
|
|
319
318
|
for (const idx of node.leafIndices) selected.add(idx);
|
|
319
|
+
} else {
|
|
320
|
+
for (const idx of node.leafIndices) selected.delete(idx);
|
|
320
321
|
}
|
|
321
322
|
}
|
|
322
323
|
function toggleAll() {
|
|
@@ -399,7 +400,7 @@ function formatTreeNode(node, selection, isCursor, options = {}) {
|
|
|
399
400
|
count = chalk2.dim(` (${selectedCount}/${totalCount})`);
|
|
400
401
|
}
|
|
401
402
|
const suffix = options.suffix || "";
|
|
402
|
-
const hint = "";
|
|
403
|
+
const hint = isCursor && totalCount > 0 ? chalk2.dim(" (Space to toggle)") : "";
|
|
403
404
|
const prefix = `${cursorMark}${indent}${checkbox} `;
|
|
404
405
|
const suffixWidth = stringWidth(suffix) + stringWidth(hint);
|
|
405
406
|
const maxWidth = options.maxWidth;
|