@trawlme/cli 3.2.0 → 3.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.
@@ -3,19 +3,20 @@
3
3
  * art. Distinct from Clawd's 8-bit lane: Pinch is drawn with full 24-bit
4
4
  * (`\x1b[38;2;r;g;bm` / `\x1b[48;2;r;g;bm`) color blocks, not a fixed palette.
5
5
  *
6
- * The 14×9 cube-grid is packed two grid rows into one terminal row: the
6
+ * The 9×6 cube-grid (#133 mini) is packed two grid rows into one terminal
7
+ * row: the
7
8
  * upper row's color becomes the half-block's foreground, the lower row's
8
9
  * becomes its background, using the upper-half-block glyph '▀' (or '▄' when
9
- * only the lower half is filled). A 9-row grid therefore renders in 5
10
- * terminal rows, 14 columns wide. '.' cells are transparent — no color
10
+ * only the lower half is filled). A 6-row grid therefore renders in 3
11
+ * terminal rows, 9 columns wide. '.' cells are transparent — no color
11
12
  * escape is emitted for that half, so the terminal's own background shows
12
13
  * through.
13
14
  *
14
15
  * Grids + palette are mirrored from trawl_vue
15
16
  * `src/modules/trawl/assets/mascot/_src/pinch.model.mjs` (AVCOLORS +
16
17
  * AVATAR_GRIDS, rev r6f) — no cross-repo import (cli is a standalone npm
17
- * package). Claws are 2×2 'O' blocks at cols 0-1 / 12-13, fully outside the
18
- * body silhouette (on the sides), per r6f.
18
+ * package). Claws are 1-wide 2-tall 'O' blocks at cols 0 / 8, on the SIDES (raised
19
+ * for wave/celebrating), per the r6f shape (#133 shrank the sprite).
19
20
  *
20
21
  * See comes-io/trawl_cli#94, comes-io/trawl_cli#122.
21
22
  */
package/dist/lib/pinch.js CHANGED
@@ -3,19 +3,20 @@
3
3
  * art. Distinct from Clawd's 8-bit lane: Pinch is drawn with full 24-bit
4
4
  * (`\x1b[38;2;r;g;bm` / `\x1b[48;2;r;g;bm`) color blocks, not a fixed palette.
5
5
  *
6
- * The 14×9 cube-grid is packed two grid rows into one terminal row: the
6
+ * The 9×6 cube-grid (#133 mini) is packed two grid rows into one terminal
7
+ * row: the
7
8
  * upper row's color becomes the half-block's foreground, the lower row's
8
9
  * becomes its background, using the upper-half-block glyph '▀' (or '▄' when
9
- * only the lower half is filled). A 9-row grid therefore renders in 5
10
- * terminal rows, 14 columns wide. '.' cells are transparent — no color
10
+ * only the lower half is filled). A 6-row grid therefore renders in 3
11
+ * terminal rows, 9 columns wide. '.' cells are transparent — no color
11
12
  * escape is emitted for that half, so the terminal's own background shows
12
13
  * through.
13
14
  *
14
15
  * Grids + palette are mirrored from trawl_vue
15
16
  * `src/modules/trawl/assets/mascot/_src/pinch.model.mjs` (AVCOLORS +
16
17
  * AVATAR_GRIDS, rev r6f) — no cross-repo import (cli is a standalone npm
17
- * package). Claws are 2×2 'O' blocks at cols 0-1 / 12-13, fully outside the
18
- * body silhouette (on the sides), per r6f.
18
+ * package). Claws are 1-wide 2-tall 'O' blocks at cols 0 / 8, on the SIDES (raised
19
+ * for wave/celebrating), per the r6f shape (#133 shrank the sprite).
19
20
  *
20
21
  * See comes-io/trawl_cli#94, comes-io/trawl_cli#122.
21
22
  */
@@ -29,60 +30,52 @@ const PALETTE = {
29
30
  };
30
31
  const TRANSPARENT = '.';
31
32
  /**
32
- * Explicit per-state 14×9 grids, ported verbatim from trawl_vue's
33
- * AVATAR_GRIDS (pinch.model.mjs, rev r6f) — no derivation/mutation from a
34
- * shared base, so each state stays a straight, auditable copy of its source
35
- * grid. CLI state → source grid: wave→wave, thinkingworking (a.k.a.
36
- * AVGRID/idle), celebrating→celebrating, confused→confused.
33
+ * Explicit per-state 9×6 grids (#133 mini). The 14×9 grids were ported
34
+ * verbatim from trawl_vue's AVATAR_GRIDS (pinch.model.mjs, rev r6f); this
35
+ * mini redraw preserves the same features + shape at a smaller pixel count.
36
+ * CLI state → pose: wave, thinking (idle/working), celebrating, confused.
37
37
  */
38
38
  const GRIDS = {
39
+ // #133 — MINI redraw: 9 cols × 6 rows (was the 14×9 r6f port), so Pinch
40
+ // renders in 3 terminal lines instead of 4-5. Half-block is the ANSI floor
41
+ // (2px/line) so "smaller" means fewer pixels, not scaling — this keeps all
42
+ // r6f features (antennae O, eyes W+K pupils, blush P, mouth K, and the
43
+ // signature claws as 1-wide 2-tall O blocks on the SIDES at cols 0/8,
44
+ // raised for wave/celebrating). Body/shell spans cols 1-7.
39
45
  wave: [
40
- '....O....O....',
41
- '....O....O....',
42
- '..BBBBBBBBBB..',
43
- '..BWWBBBBWWBOO',
44
- '..BWKBBBBKWBOO',
45
- '..BBBBBBBBBB..',
46
- 'OOBBPKBBKPBB..',
47
- 'OOBBBBKKBBBB..',
48
- '..............',
46
+ '..O...O..',
47
+ '.BBBBBBBO', // right claw raised (cols 8, rows 1-2)
48
+ '.BWKBKWBO',
49
+ '.BBBBBBB.',
50
+ 'OBPKKKPB.', // left claw resting (col 0, rows 4-5) + blush + mouth
51
+ 'OBBBBBBB.',
49
52
  ],
50
- // 'thinking' maps to the source's 'working' grid (identical to 'idle').
51
- // The frame param is accepted for signature compatibility but ignored — a
52
- // static working frame rather than an animated blip (#122, simplified;
53
- // the source has no per-frame "thinking" animation to port).
53
+ // 'thinking' = the idle/working pose: both claws resting low (rows 4-5).
54
54
  thinking: [
55
- '....O....O....',
56
- '....O....O....',
57
- '..BBBBBBBBBB..',
58
- '..BWWBBBBWWB..',
59
- '..BWKBBBBKWB..',
60
- '..BBBBBBBBBB..',
61
- 'OOBBPKBBKPBBOO',
62
- 'OOBBBBKKBBBBOO',
63
- '..............',
55
+ '..O...O..',
56
+ '.BBBBBBB.',
57
+ '.BWKBKWB.',
58
+ '.BBBBBBB.',
59
+ 'OBPKKKPBO',
60
+ 'OBBBBBBBO',
64
61
  ],
62
+ // both claws raised (rows 1-2) + a big open mouth.
65
63
  celebrating: [
66
- '....O....O....',
67
- '....O....O....',
68
- '..BBBBBBBBBB..',
69
- 'OOBWWBBBBWWBOO',
70
- 'OOBWKBBBBKWBOO',
71
- '..BBBBBBBBBB..',
72
- '..BBPKKKKPBB..',
73
- '..BBBKKKKBBB..',
74
- '..............',
64
+ '..O...O..',
65
+ 'OBBBBBBBO',
66
+ 'OBWKBKWBO',
67
+ '.BBBBBBB.',
68
+ '.BKKKKKB.',
69
+ '.BBBBBBB.',
75
70
  ],
71
+ // antennae drooped + spread, flat mouth (no K), claws resting.
76
72
  confused: [
77
- '..............',
78
- '...O......O...',
79
- '..BBBBBBBBBB..',
80
- '..BWWBBBBWWB..',
81
- '..BWKBBBBKWB..',
82
- '..BBBBBBBBBB..',
83
- 'OOBBPBBBBPBBOO',
84
- 'OOBBBBKKBBBBOO',
85
- '..............',
73
+ '.O.....O.',
74
+ '.BBBBBBB.',
75
+ '.BWKBKWB.',
76
+ '.BBBBBBB.',
77
+ 'OBPBBBPBO',
78
+ 'OBBBBBBBO',
86
79
  ],
87
80
  };
88
81
  const CAPTIONS = {
@@ -120,7 +113,8 @@ function renderCell(upper, lower) {
120
113
  return `${fgCode(lowerColor)}▄${RESET}`;
121
114
  return `${fgCode(upperColor)}${bgCode(lowerColor)}▀${RESET}`;
122
115
  }
123
- /** Pack a 9-row grid into 5 terminal lines (rows 0-1, 2-3, 4-5, 6-7, 8-blank). */
116
+ /** Pack a grid into terminal lines, 2 grid rows per line (upper=fg, lower=bg).
117
+ * The #133 mini grid is 6 rows → 3 lines. */
124
118
  function renderGrid(rows) {
125
119
  const lines = [];
126
120
  for (let i = 0; i < rows.length; i += 2) {
@@ -146,11 +140,9 @@ export function renderPinch(state, frame = 0) {
146
140
  const grid = gridForState(state, frame);
147
141
  const lines = renderGrid(grid);
148
142
  if (state === 'confused') {
149
- // "beside the art" — a bold '?' to the right of the eye row (grid rows
150
- // 4-5 pack into terminal line index 2, unchanged by the r6f grid — the
151
- // antenna/shell/eye/claw row layout stayed the same, only width + claw
152
- // placement changed).
153
- lines[2] = `${lines[2]} \x1b[1m?${RESET}`;
143
+ // "beside the art" — a bold '?' to the right of the eye row. In the #133
144
+ // mini grid the eyes are grid rows 2-3, which pack into terminal line 1.
145
+ lines[1] = `${lines[1]} \x1b[1m?${RESET}`;
154
146
  }
155
147
  return [...lines, CAPTIONS[state]].join('\n');
156
148
  }
@@ -175,7 +167,7 @@ export function renderPinchArt(state, opts = {}) {
175
167
  }
176
168
  const lines = renderGrid(grid);
177
169
  if (state === 'confused')
178
- lines[2] = `${lines[2]} \x1b[1m?${RESET}`;
170
+ lines[1] = `${lines[1]} \x1b[1m?${RESET}`;
179
171
  return lines.join('\n');
180
172
  }
181
173
  /**
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@trawlme/cli",
3
- "version": "3.2.0",
3
+ "version": "3.3.0",
4
4
  "description": "Trawl CLI — manage scraps from the terminal",
5
5
  "type": "module",
6
6
  "bin": {