@opentui/core 0.6.0 → 0.6.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/index.node.js CHANGED
@@ -109,7 +109,7 @@ import {
109
109
  resolveRenderLib2,
110
110
  MeasureMode2,
111
111
  exports_yoga
112
- } from "./chunk-node-df90qrqc.js";
112
+ } from "./chunk-node-f7c1g447.js";
113
113
  import {
114
114
  isValidBorderStyle2,
115
115
  parseBorderStyle2,
@@ -240,7 +240,7 @@ import {
240
240
  CliRenderEvents2,
241
241
  RendererControlState2,
242
242
  CliRenderer2
243
- } from "./chunk-node-hjr2tm60.js";
243
+ } from "./chunk-node-jh6t3wnm.js";
244
244
  // src/post/effects.ts
245
245
  function toU8(value) {
246
246
  return Math.round(Math.max(0, Math.min(1, Number.isFinite(value) ? value : 0)) * 255);
@@ -8223,7 +8223,6 @@ function mouseButton(event) {
8223
8223
  }
8224
8224
  // src/renderables/Textarea.ts
8225
8225
  var unsupportedKeyCharacters = /[\x00-\x1f\x7f-\x9f]/;
8226
- var unsupportedPasteCharacters = /[\x00-\x08\x0b\x0c\x0e-\x1f\x7f-\x9f]/g;
8227
8226
  function clonePlaceholder(value) {
8228
8227
  if (value === null || typeof value === "string")
8229
8228
  return value;
@@ -8409,7 +8408,7 @@ class TextareaRenderable extends EditBufferRenderable2 {
8409
8408
  ]);
8410
8409
  }
8411
8410
  handlePaste(event) {
8412
- this.insertText(stripAnsiSequences2(decodePasteBytes2(event.bytes)).replace(unsupportedPasteCharacters, ""));
8411
+ this.insertText(stripAnsiSequences2(decodePasteBytes2(event.bytes)));
8413
8412
  }
8414
8413
  handleKeyPress(key) {
8415
8414
  if (this.traits.suspend !== true) {
@@ -8575,7 +8574,7 @@ class InputRenderable extends TextareaRenderable {
8575
8574
  this._minLength = minLength;
8576
8575
  this._lastCommittedValue = this.plainText;
8577
8576
  if (initialValue) {
8578
- this.cursorOffset = initialValue.length;
8577
+ this.cursorOffset = this.editBuffer.getEOL().offset;
8579
8578
  }
8580
8579
  } catch (error) {
8581
8580
  this.rollbackConstruction(error);
@@ -8607,7 +8606,7 @@ class InputRenderable extends TextareaRenderable {
8607
8606
  if (currentValue !== newValue) {
8608
8607
  this.runMutation(() => {
8609
8608
  this.setText(newValue);
8610
- this.cursorOffset = newValue.length;
8609
+ this.cursorOffset = this.editBuffer.getEOL().offset;
8611
8610
  this.emit("input" /* INPUT */, newValue);
8612
8611
  });
8613
8612
  }
@@ -15400,5 +15399,5 @@ export {
15400
15399
  yellow2 as yellow
15401
15400
  };
15402
15401
 
15403
- //# debugId=D3A3225F18CACB4D64756E2164756E21
15402
+ //# debugId=D7CA8DED54CBCCD364756E2164756E21
15404
15403
  //# sourceMappingURL=index.node.js.map