effective-progress 0.4.0 → 0.4.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/README.md +3 -0
- package/package.json +1 -1
- package/src/renderer.ts +3 -4
package/README.md
CHANGED
|
@@ -83,6 +83,9 @@ Effect.runPromise(program);
|
|
|
83
83
|
- `examples/advancedExample.ts` - full API usage with custom config and manual task control
|
|
84
84
|
- `examples/showcase.ts` - nested concurrent tasks, spinner workloads, and mixed Effect/Console logging
|
|
85
85
|
- `examples/performance.ts` - stress-style run with high log volume and deeply nested progress updates
|
|
86
|
+
- `examples/themeDepthPalette.ts` - depth-aware nested theming via `Theme.depthPalette`
|
|
87
|
+
- `examples/twoLineWidthCap.ts` - two-line determinate layout with `maxTaskWidth` clamping
|
|
88
|
+
- `examples/customColorStage.ts` - override `ColorStage` to emit plain (no ANSI) frame output
|
|
86
89
|
|
|
87
90
|
## Log retention
|
|
88
91
|
|
package/package.json
CHANGED
package/src/renderer.ts
CHANGED
|
@@ -283,15 +283,14 @@ const shrinkByPriority = (
|
|
|
283
283
|
cells: ReadonlyArray<CellModel>,
|
|
284
284
|
overflow: number,
|
|
285
285
|
): number => {
|
|
286
|
-
// First collapse pass:
|
|
287
|
-
//
|
|
286
|
+
// First collapse pass: shrink columns by explicit collapse priority.
|
|
287
|
+
// Columns with no-wrap-ellipsis are still shrinkable; the wrap mode only
|
|
288
|
+
// decides whether we hard-truncate or append an ellipsis when fitted.
|
|
288
289
|
const shrinkable = cells
|
|
289
290
|
.map((cell, index) => ({
|
|
290
291
|
index,
|
|
291
292
|
priority: cell.collapsePriority ?? Number.MAX_SAFE_INTEGER,
|
|
292
|
-
wrapMode: cell.wrapMode ?? "truncate",
|
|
293
293
|
}))
|
|
294
|
-
.filter((entry) => entry.wrapMode === "truncate")
|
|
295
294
|
.sort((a, b) => a.priority - b.priority);
|
|
296
295
|
|
|
297
296
|
let remainingOverflow = overflow;
|