@simon_he/vue-tui 1.1.7 → 1.1.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.
@@ -2452,6 +2452,10 @@ const TInput = defineComponent({
2452
2452
  type: Boolean,
2453
2453
  default: false
2454
2454
  },
2455
+ collapseMultilineLines: {
2456
+ type: Number,
2457
+ default: 3
2458
+ },
2455
2459
  multilineTexts: {
2456
2460
  type: Array,
2457
2461
  default: () => []
@@ -3396,7 +3400,7 @@ const TInput = defineComponent({
3396
3400
  }
3397
3401
  if (props.collapseMultiline) {
3398
3402
  const lineCount = (text.match(/\n/g) || []).length + 1;
3399
- if (lineCount > 3 || text.length > 200) {
3403
+ if (lineCount > props.collapseMultilineLines) {
3400
3404
  insertMultilineToken(text);
3401
3405
  return;
3402
3406
  }
@@ -9,7 +9,7 @@ import { createFramePerfStore, createTraceStore } from "./trace-Bh8WnoMo.js";
9
9
  import { envFlag, envString, firstNonEmptyEnv } from "./env-Cl8qmNFN.js";
10
10
  import { createTerminalSelectionController } from "./terminal-selection-4W1SJj4c.js";
11
11
  import { createDebugLogger, isDebugEnabled } from "./debug-logger-CmsGI4of.js";
12
- import { TBox, TInput, TRenderPlane, resolveOverlayPlacement } from "./TSelect-CCsjjCOr.js";
12
+ import { TBox, TInput, TRenderPlane, resolveOverlayPlacement } from "./TSelect-CUDPduI4.js";
13
13
  import { TText, TView, createFrameMailbox } from "./frame-mailbox-DaTrfyaF.js";
14
14
  import { applyWheelScroll, createWheelScrollState, resetWheelScrollState } from "./wheel-scroll-CQ22Hcyj.js";
15
15
  import { computed, defineComponent, effectScope, getCurrentInstance, h, inject, nextTick, onBeforeUnmount, onMounted, onScopeDispose, onUnmounted, provide, ref, shallowReactive, shallowRef, toRef, watch, watchEffect } from "vue";
package/dist/agent.cjs CHANGED
@@ -3338,6 +3338,10 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue12.defineCo
3338
3338
  collectMentions: { type: Boolean, default: !1 },
3339
3339
  mentions: { type: Array, default: () => [] },
3340
3340
  collapseMultiline: { type: Boolean, default: !1 },
3341
+ /**
3342
+ * Collapses pasted text into one multiline chip when its line count exceeds this value.
3343
+ */
3344
+ collapseMultilineLines: { type: Number, default: 3 },
3341
3345
  multilineTexts: {
3342
3346
  type: Array,
3343
3347
  default: () => []
@@ -4048,7 +4052,7 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue12.defineCo
4048
4052
  return;
4049
4053
  }
4050
4054
  }
4051
- if (props.collapseMultiline && ((text2.match(/\n/g) || []).length + 1 > 3 || text2.length > 200)) {
4055
+ if (props.collapseMultiline && (text2.match(/\n/g) || []).length + 1 > props.collapseMultilineLines) {
4052
4056
  insertMultilineToken(text2);
4053
4057
  return;
4054
4058
  }
package/dist/agent.js CHANGED
@@ -6,7 +6,7 @@ import "./frame-perf-CHpWhbC4.js";
6
6
  import "./env-Cl8qmNFN.js";
7
7
  import "./terminal-selection-4W1SJj4c.js";
8
8
  import "./debug-logger-CmsGI4of.js";
9
- import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-CCsjjCOr.js";
9
+ import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-CUDPduI4.js";
10
10
  import { TText, TView } from "./frame-mailbox-DaTrfyaF.js";
11
11
  import "./path-BI9W15Zt.js";
12
12
  import "./wheel-scroll-CQ22Hcyj.js";
package/dist/cli.cjs CHANGED
@@ -9105,7 +9105,7 @@ function createStdoutRenderer(terminal, options) {
9105
9105
  }
9106
9106
  return end > start ? end : codePointEnd(data, start);
9107
9107
  };
9108
- function writeChunked(data, pin) {
9108
+ function writeChunked(data) {
9109
9109
  if (import_node_buffer3.Buffer.byteLength(data, "utf8") <= chunkSize) {
9110
9110
  out.write(data);
9111
9111
  return;
@@ -9115,8 +9115,8 @@ function createStdoutRenderer(terminal, options) {
9115
9115
  );
9116
9116
  try {
9117
9117
  for (let start = 0; start < data.length; ) {
9118
- let end = safeChunkEnd(data, start, chunkSize), chunk = data.slice(start, end);
9119
- out.write(end >= data.length || !pin ? chunk : `${chunk}${pin}`), start = end;
9118
+ let end = safeChunkEnd(data, start, chunkSize);
9119
+ out.write(data.slice(start, end)), start = end;
9120
9120
  }
9121
9121
  isDebugEnabled() && getDebugLog().render("writeChunked: chunked write completed");
9122
9122
  } catch (e) {
@@ -9904,12 +9904,12 @@ function createStdoutRenderer(terminal, options) {
9904
9904
  `terminal graphics frame: draws=${terminalGraphicsDraws}, clears=${terminalGraphicsClears}, bytes=${terminalGraphicsBytes}, activeNext=${nextActiveGraphics.size}`
9905
9905
  );
9906
9906
  }
9907
- let emittedCursorPos = null, frameCursorPin = null;
9907
+ let emittedCursorPos = null;
9908
9908
  if (getImeAnchor) {
9909
9909
  let anchor = getImeAnchor();
9910
9910
  if (anchor) {
9911
- let { x, y } = clampCellToViewport(anchor, size), cursorSequence = `\x1B[${y + 1 + rowOffset};${x + 1}H`;
9912
- frameCursorPin = cursorSequence, (hasFrameOutput || x !== lastCursorX || y !== lastCursorY) && (hasFrameOutput = !0, emittedCursorPos = { x, y }, closeActiveHrefBeforeCursorMove(), frameParts.push(cursorSequence));
9911
+ let { x, y } = clampCellToViewport(anchor, size);
9912
+ (hasFrameOutput || x !== lastCursorX || y !== lastCursorY) && (hasFrameOutput = !0, emittedCursorPos = { x, y }, closeActiveHrefBeforeCursorMove(), frameParts.push(`\x1B[${y + 1 + rowOffset};${x + 1}H`));
9913
9913
  }
9914
9914
  }
9915
9915
  if (!hasFrameOutput) {
@@ -9972,7 +9972,7 @@ function createStdoutRenderer(terminal, options) {
9972
9972
  if (writeMode === "chunked")
9973
9973
  isDebugEnabled() && getDebugLog().render(
9974
9974
  ` Using chunked write (chunkSize=${chunkSize}, threshold=${chunkThresholdBytes}, emaMs=${writeEmaMs.toFixed(2)})`
9975
- ), writeChunked(frame, frameCursorPin);
9975
+ ), writeChunked(frame);
9976
9976
  else if (writeMode === "sync" && canUseSyncStdout) {
9977
9977
  isDebugEnabled() && getDebugLog().render(" Using writeSync");
9978
9978
  try {
package/dist/cli.js CHANGED
@@ -11547,13 +11547,14 @@ function createStdoutRenderer(terminal, options) {
11547
11547
  * Write data in chunks to avoid overwhelming terminal buffers.
11548
11548
  * This is especially important for ghostty which can hang on large writes.
11549
11549
  *
11550
- * `pin` is appended after every chunk but the last. A host may observe the
11551
- * terminal between two writes (macOS asks for the IME rect when the marked text
11552
- * changes), and a chunk boundary would otherwise expose the cell of the last
11553
- * painted row instead of the frame's IME cursor, while the preedit — rendered
11554
- * only when the frame's synchronized output ends — stays on that cursor.
11550
+ * A chunked write must not interpose anything of its own: the frame's bytes form
11551
+ * one stream of cursor moves and cell writes, so an extra cursor move in the
11552
+ * middle of a span (the IME pin #141 appended after every chunk) painted the
11553
+ * rest of that span at the pin's cell — the input caret — and scrambled the
11554
+ * screen. The frame's own anchor move at its end is the only cursor move the
11555
+ * renderer owns.
11555
11556
  */
11556
- function writeChunked(data, pin) {
11557
+ function writeChunked(data) {
11557
11558
  if (Buffer.byteLength(data, "utf8") <= chunkSize) {
11558
11559
  out.write(data);
11559
11560
  return;
@@ -11562,8 +11563,7 @@ function createStdoutRenderer(terminal, options) {
11562
11563
  try {
11563
11564
  for (let start = 0; start < data.length;) {
11564
11565
  const end = safeChunkEnd(data, start, chunkSize);
11565
- const chunk = data.slice(start, end);
11566
- out.write(end >= data.length || !pin ? chunk : `${chunk}${pin}`);
11566
+ out.write(data.slice(start, end));
11567
11567
  start = end;
11568
11568
  }
11569
11569
  if (isDebugEnabled()) getDebugLog().render(`writeChunked: chunked write completed`);
@@ -12673,13 +12673,10 @@ function createStdoutRenderer(terminal, options) {
12673
12673
  if (isDebugEnabled()) getDebugLog().render(`terminal graphics frame: draws=${terminalGraphicsDraws}, clears=${terminalGraphicsClears}, bytes=${terminalGraphicsBytes}, activeNext=${nextActiveGraphics.size}`);
12674
12674
  }
12675
12675
  let emittedCursorPos = null;
12676
- let frameCursorPin = null;
12677
12676
  if (getImeAnchor) {
12678
12677
  const anchor = getImeAnchor();
12679
12678
  if (anchor) {
12680
12679
  const { x, y } = clampCellToViewport(anchor, size);
12681
- const cursorSequence = `\u001B[${y + 1 + rowOffset};${x + 1}H`;
12682
- frameCursorPin = cursorSequence;
12683
12680
  if (hasFrameOutput || x !== lastCursorX || y !== lastCursorY) {
12684
12681
  hasFrameOutput = true;
12685
12682
  emittedCursorPos = {
@@ -12687,7 +12684,7 @@ function createStdoutRenderer(terminal, options) {
12687
12684
  y
12688
12685
  };
12689
12686
  closeActiveHrefBeforeCursorMove();
12690
- frameParts.push(cursorSequence);
12687
+ frameParts.push(`\u001B[${y + 1 + rowOffset};${x + 1}H`);
12691
12688
  }
12692
12689
  }
12693
12690
  }
@@ -12778,7 +12775,7 @@ function createStdoutRenderer(terminal, options) {
12778
12775
  try {
12779
12776
  if (writeMode === "chunked") {
12780
12777
  if (isDebugEnabled()) getDebugLog().render(` Using chunked write (chunkSize=${chunkSize}, threshold=${chunkThresholdBytes}, emaMs=${writeEmaMs.toFixed(2)})`);
12781
- writeChunked(frame, frameCursorPin);
12778
+ writeChunked(frame);
12782
12779
  } else if (writeMode === "sync" && canUseSyncStdout) {
12783
12780
  if (isDebugEnabled()) getDebugLog().render(` Using writeSync`);
12784
12781
  try {
package/dist/index.cjs CHANGED
@@ -8975,6 +8975,10 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue20.defineCo
8975
8975
  collectMentions: { type: Boolean, default: !1 },
8976
8976
  mentions: { type: Array, default: () => [] },
8977
8977
  collapseMultiline: { type: Boolean, default: !1 },
8978
+ /**
8979
+ * Collapses pasted text into one multiline chip when its line count exceeds this value.
8980
+ */
8981
+ collapseMultilineLines: { type: Number, default: 3 },
8978
8982
  multilineTexts: {
8979
8983
  type: Array,
8980
8984
  default: () => []
@@ -9685,7 +9689,7 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue20.defineCo
9685
9689
  return;
9686
9690
  }
9687
9691
  }
9688
- if (props.collapseMultiline && ((text.match(/\n/g) || []).length + 1 > 3 || text.length > 200)) {
9692
+ if (props.collapseMultiline && (text.match(/\n/g) || []).length + 1 > props.collapseMultilineLines) {
9689
9693
  insertMultilineToken(text);
9690
9694
  return;
9691
9695
  }
package/dist/index.js CHANGED
@@ -8,10 +8,10 @@ import "./runtime-Byf8XXOT.js";
8
8
  import "./frame-perf-CHpWhbC4.js";
9
9
  import "./trace-Bh8WnoMo.js";
10
10
  import "./env-Cl8qmNFN.js";
11
- import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TRadioGroup, TSlider, TSwitch, TTable, TTag, TTree, TerminalProvider, createTInputHostPlugin } from "./TTree-3W5A2_EH.js";
11
+ import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TRadioGroup, TSlider, TSwitch, TTable, TTag, TTree, TerminalProvider, createTInputHostPlugin } from "./TTree-CYXTAY4k.js";
12
12
  import "./terminal-selection-4W1SJj4c.js";
13
13
  import "./debug-logger-CmsGI4of.js";
14
- import { TBox, TCommandPalette, TDialog, TInput, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-CCsjjCOr.js";
14
+ import { TBox, TCommandPalette, TDialog, TInput, TSelect, computeCommandPaletteMatchRanges } from "./TSelect-CUDPduI4.js";
15
15
  import { TText, TView } from "./frame-mailbox-DaTrfyaF.js";
16
16
  import "./path-BI9W15Zt.js";
17
17
  import "./wheel-scroll-CQ22Hcyj.js";
@@ -159,6 +159,13 @@ export declare const TInput: import("vue").DefineComponent<import("vue").Extract
159
159
  type: BooleanConstructor;
160
160
  default: boolean;
161
161
  };
162
+ /**
163
+ * Collapses pasted text into one multiline chip when its line count exceeds this value.
164
+ */
165
+ collapseMultilineLines: {
166
+ type: NumberConstructor;
167
+ default: number;
168
+ };
162
169
  multilineTexts: {
163
170
  type: PropType<readonly string[]>;
164
171
  default: () => never[];
@@ -346,6 +353,13 @@ export declare const TInput: import("vue").DefineComponent<import("vue").Extract
346
353
  type: BooleanConstructor;
347
354
  default: boolean;
348
355
  };
356
+ /**
357
+ * Collapses pasted text into one multiline chip when its line count exceeds this value.
358
+ */
359
+ collapseMultilineLines: {
360
+ type: NumberConstructor;
361
+ default: number;
362
+ };
349
363
  multilineTexts: {
350
364
  type: PropType<readonly string[]>;
351
365
  default: () => never[];
@@ -532,6 +546,7 @@ export declare const TInput: import("vue").DefineComponent<import("vue").Extract
532
546
  collectMentions: boolean;
533
547
  mentions: readonly string[];
534
548
  collapseMultiline: boolean;
549
+ collapseMultilineLines: number;
535
550
  multilineTexts: readonly string[];
536
551
  secret: boolean;
537
552
  maskChar: string;
package/dist/vue.cjs CHANGED
@@ -4122,6 +4122,10 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue15.defineCo
4122
4122
  collectMentions: { type: Boolean, default: !1 },
4123
4123
  mentions: { type: Array, default: () => [] },
4124
4124
  collapseMultiline: { type: Boolean, default: !1 },
4125
+ /**
4126
+ * Collapses pasted text into one multiline chip when its line count exceeds this value.
4127
+ */
4128
+ collapseMultilineLines: { type: Number, default: 3 },
4125
4129
  multilineTexts: {
4126
4130
  type: Array,
4127
4131
  default: () => []
@@ -4832,7 +4836,7 @@ var nextImeOwnerId = 0, nextPasteImageId = 0, TInput = (0, import_vue15.defineCo
4832
4836
  return;
4833
4837
  }
4834
4838
  }
4835
- if (props.collapseMultiline && ((text.match(/\n/g) || []).length + 1 > 3 || text.length > 200)) {
4839
+ if (props.collapseMultiline && (text.match(/\n/g) || []).length + 1 > props.collapseMultilineLines) {
4836
4840
  insertMultilineToken(text);
4837
4841
  return;
4838
4842
  }
package/dist/vue.js CHANGED
@@ -8,10 +8,10 @@ import "./runtime-Byf8XXOT.js";
8
8
  import "./frame-perf-CHpWhbC4.js";
9
9
  import "./trace-Bh8WnoMo.js";
10
10
  import "./env-Cl8qmNFN.js";
11
- import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TForm, TFormContextKey, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TProgress, TRadioGroup, TSlider, TSpinner, TSwitch, TTable, TTag, TToastViewport, TTree, TerminalProvider, createTInputHostPlugin, useTForm } from "./TTree-3W5A2_EH.js";
11
+ import { TAutocompleteInput, TBadge, TCheckbox, TCode, TDataTable, TDivider, TForm, TFormContextKey, TFormField, TLink, TLinkifyText, TList, TPasswordInput, TProgress, TRadioGroup, TSlider, TSpinner, TSwitch, TTable, TTag, TToastViewport, TTree, TerminalProvider, createTInputHostPlugin, useTForm } from "./TTree-CYXTAY4k.js";
12
12
  import "./terminal-selection-4W1SJj4c.js";
13
13
  import "./debug-logger-CmsGI4of.js";
14
- import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, clamp$1, computeCommandPaletteMatchRanges, createOverlayFocusStack, isCommitMention, isWhitespace, mentionChipStyle, padEndByCells as padEndByCells$1, resolveOverlayPlacement, sliceByCellsWindow, textCellWidth as textCellWidth$1 } from "./TSelect-CCsjjCOr.js";
14
+ import { TBox, TCommandPalette, TDialog, TInput, TRenderPlane, TSelect, clamp$1, computeCommandPaletteMatchRanges, createOverlayFocusStack, isCommitMention, isWhitespace, mentionChipStyle, padEndByCells as padEndByCells$1, resolveOverlayPlacement, sliceByCellsWindow, textCellWidth as textCellWidth$1 } from "./TSelect-CUDPduI4.js";
15
15
  import { TText, TView } from "./frame-mailbox-DaTrfyaF.js";
16
16
  import { normalizePath, stripTrailingSlash } from "./path-BI9W15Zt.js";
17
17
  import { applyWheelScroll, createWheelScrollState } from "./wheel-scroll-CQ22Hcyj.js";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@simon_he/vue-tui",
3
- "version": "1.1.7",
3
+ "version": "1.1.10",
4
4
  "description": "Vue 3 terminal UI components and renderers for browser DOM, CLI stdout, logs, markdown transcripts, and agent consoles",
5
5
  "keywords": [
6
6
  "agent-console",