@levu/snap 0.3.9 → 0.3.10

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/CHANGELOG.md CHANGED
@@ -5,6 +5,13 @@ All notable changes to this project will be documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [0.3.10] - 2026-02-28
9
+
10
+ ### Fixed
11
+ - Seeded multiline prompt readline buffer from `initialValue`, so editing existing values supports character-by-character backspace/delete behavior.
12
+ - Improved multiline paste recovery when terminal submit flow collapses newline-separated URLs into a concatenated single line.
13
+ - Added regression coverage for concatenated submit recovery and initial-value editability.
14
+
8
15
  ## [0.3.9] - 2026-02-28
9
16
 
10
17
  ### Fixed
@@ -73,6 +73,10 @@ export const createMultilineTextPrompt = () => {
73
73
  output.write(pc.dim(` Press Enter to submit; Shift+Enter for newline (Alt+Enter fallback)\n`));
74
74
  const lines = value.split('\n');
75
75
  let currentLine = lines.length > 0 ? lines.pop() : '';
76
+ rl.line = currentLine;
77
+ if (typeof rl.cursor === 'number') {
78
+ rl.cursor = currentLine.length;
79
+ }
76
80
  const getLiveLine = () => {
77
81
  const rlLine = typeof rl.line === 'string' ? rl.line : '';
78
82
  if (rlLine.length > 0)
@@ -137,7 +141,10 @@ export const createMultilineTextPrompt = () => {
137
141
  return '';
138
142
  const normalizedPrimary = String(primary || '').trim();
139
143
  const recoveredLastLine = recoveredLines[recoveredLines.length - 1] || '';
140
- if (normalizedPrimary && recoveredLastLine !== normalizedPrimary)
144
+ const recoveredJoined = recoveredLines.join('');
145
+ if (normalizedPrimary &&
146
+ recoveredLastLine !== normalizedPrimary &&
147
+ recoveredJoined !== normalizedPrimary)
141
148
  return '';
142
149
  return recoveredLines.join('\n');
143
150
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@levu/snap",
3
- "version": "0.3.9",
3
+ "version": "0.3.10",
4
4
  "type": "module",
5
5
  "bin": {
6
6
  "snap": "./dist/cli-entry.js"