@trawlme/cli 3.4.1 → 3.4.2

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.
@@ -42,20 +42,14 @@ export declare function renderPinch(state: PinchState, frame?: number): string;
42
42
  /**
43
43
  * #131 — the ART lines only (no caption), optionally COMPACT: trailing and
44
44
  * leading fully-transparent grid rows are dropped so Pinch takes fewer
45
- * terminal lines (some grids carry an all-'.' padding row). Used by the
46
- * animation loop, where a caption + full height would be too heavy for a
47
- * frame redrawn every ~380ms. `working` is rendered at frame 0 (blip on).
45
+ * terminal lines (some grids carry an all-'.' padding row). `frame` is passed
46
+ * through to `gridForState` only `working` reacts to it (the cyan antenna
47
+ * blip toggles), so the loop can pulse the tips while the body stays still.
48
48
  */
49
49
  export declare function renderPinchArt(state: PinchState, opts?: {
50
50
  compact?: boolean;
51
+ frame?: number;
51
52
  }): string;
52
- /**
53
- * #131 — frame sequence for the "working" animation shown during long waits
54
- * (the `create` wizard, `--watch`). The claws pump up (working → wave →
55
- * celebrating) and back down, reading as Pinch busily working. No new art —
56
- * an order over the canonical state grids.
57
- */
58
- export declare const WORKING_FRAMES: readonly PinchState[];
59
53
  /**
60
54
  * True when it's safe to print Pinch art: a real color-capable interactive
61
55
  * terminal. False under NO_COLOR (https://no-color.org — presence, not
package/dist/lib/pinch.js CHANGED
@@ -247,12 +247,12 @@ export function renderPinch(state, frame = 0) {
247
247
  /**
248
248
  * #131 — the ART lines only (no caption), optionally COMPACT: trailing and
249
249
  * leading fully-transparent grid rows are dropped so Pinch takes fewer
250
- * terminal lines (some grids carry an all-'.' padding row). Used by the
251
- * animation loop, where a caption + full height would be too heavy for a
252
- * frame redrawn every ~380ms. `working` is rendered at frame 0 (blip on).
250
+ * terminal lines (some grids carry an all-'.' padding row). `frame` is passed
251
+ * through to `gridForState` only `working` reacts to it (the cyan antenna
252
+ * blip toggles), so the loop can pulse the tips while the body stays still.
253
253
  */
254
254
  export function renderPinchArt(state, opts = {}) {
255
- let grid = gridForState(state, 0);
255
+ let grid = gridForState(state, opts.frame ?? 0);
256
256
  if (opts.compact) {
257
257
  const blank = (row) => [...row].every((c) => c === TRANSPARENT);
258
258
  let start = 0;
@@ -268,13 +268,6 @@ export function renderPinchArt(state, opts = {}) {
268
268
  lines[1] = `${lines[1]} \x1b[1m?${RESET}`;
269
269
  return lines.join('\n');
270
270
  }
271
- /**
272
- * #131 — frame sequence for the "working" animation shown during long waits
273
- * (the `create` wizard, `--watch`). The claws pump up (working → wave →
274
- * celebrating) and back down, reading as Pinch busily working. No new art —
275
- * an order over the canonical state grids.
276
- */
277
- export const WORKING_FRAMES = ['working', 'wave', 'celebrating', 'wave'];
278
271
  /**
279
272
  * True when it's safe to print Pinch art: a real color-capable interactive
280
273
  * terminal. False under NO_COLOR (https://no-color.org — presence, not
@@ -4,9 +4,12 @@ export interface PinchAnimation {
4
4
  stop(): void;
5
5
  }
6
6
  /**
7
- * #131 — animate Pinch (a claw-wiggle over the r6f grids) IN PLACE on STDERR
8
- * while a long operation runs (the `create` wizard, `--watch`). The frame is
9
- * redrawn every {@link FRAME_MS} via ANSI cursor moves; `stop()` clears it.
7
+ * #131 / #139 show Pinch IN PLACE on STDERR while a long operation runs (the
8
+ * `create` wizard, `--watch`). Pinch stays a STILL `working` sprite; the ONLY
9
+ * animation is the cyan antenna-tip blip pulsing on/off every {@link FRAME_MS}
10
+ * (frame 0 = cyan, frame 1 = orange). The body — mouth, claws, eyes — never
11
+ * moves (the old loop cycled whole poses, which flickered "in every
12
+ * direction"). Redrawn via ANSI cursor moves; `stop()` clears the block.
10
13
  *
11
14
  * Contract: the CALLER must have already checked `pinchEnabled()` (TTY /
12
15
  * !NO_COLOR) and that the command is NOT `--json` — this writes only to
@@ -1,11 +1,16 @@
1
1
  import chalk from 'chalk';
2
- import { renderPinchArt, WORKING_FRAMES } from './pinch.js';
3
- /** Frame cadence — slow enough to read as a wave, fast enough to feel alive. */
4
- const FRAME_MS = 380;
2
+ import { renderPinchArt } from './pinch.js';
3
+ /** Frame cadence — a calm, ~2/second pulse. The only thing that moves is the
4
+ * cyan antenna blip, so this is intentionally slow: a fast rate on a 2-pixel
5
+ * color change reads as a nervous flicker. */
6
+ const FRAME_MS = 600;
5
7
  /**
6
- * #131 — animate Pinch (a claw-wiggle over the r6f grids) IN PLACE on STDERR
7
- * while a long operation runs (the `create` wizard, `--watch`). The frame is
8
- * redrawn every {@link FRAME_MS} via ANSI cursor moves; `stop()` clears it.
8
+ * #131 / #139 show Pinch IN PLACE on STDERR while a long operation runs (the
9
+ * `create` wizard, `--watch`). Pinch stays a STILL `working` sprite; the ONLY
10
+ * animation is the cyan antenna-tip blip pulsing on/off every {@link FRAME_MS}
11
+ * (frame 0 = cyan, frame 1 = orange). The body — mouth, claws, eyes — never
12
+ * moves (the old loop cycled whole poses, which flickered "in every
13
+ * direction"). Redrawn via ANSI cursor moves; `stop()` clears the block.
9
14
  *
10
15
  * Contract: the CALLER must have already checked `pinchEnabled()` (TTY /
11
16
  * !NO_COLOR) and that the command is NOT `--json` — this writes only to
@@ -14,7 +19,12 @@ const FRAME_MS = 380;
14
19
  * own.
15
20
  */
16
21
  export function startPinchAnimation(statusText) {
17
- const frames = WORKING_FRAMES.map((s) => renderPinchArt(s, { compact: true }));
22
+ // Two frames of the SAME `working` sprite identical geometry, the antenna
23
+ // tips just toggle cyan↔orange. Nothing else changes between frames.
24
+ const frames = [
25
+ renderPinchArt('working', { compact: true, frame: 0 }), // cyan tips
26
+ renderPinchArt('working', { compact: true, frame: 1 }), // orange tips
27
+ ];
18
28
  const artHeight = frames[0].split('\n').length;
19
29
  const totalHeight = artHeight + 1; // + the status line below the art
20
30
  const out = process.stderr;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trawlme/cli",
3
- "version": "3.4.1",
3
+ "version": "3.4.2",
4
4
  "description": "Trawl CLI — manage scraps from the terminal",
5
5
  "type": "module",
6
6
  "bin": {