@opentui/core 0.0.0-20251026-8b7fde6b → 0.0.0-20251027-327d7e76
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/3d.js +1 -1
- package/Renderable.d.ts +4 -4
- package/edit-buffer.d.ts +6 -0
- package/{index-hgxcxzxa.js → index-bsb3x2r3.js} +117 -127
- package/{index-hgxcxzxa.js.map → index-bsb3x2r3.js.map} +8 -8
- package/index.js +19 -4
- package/index.js.map +4 -4
- package/lib/extmarks.d.ts +20 -12
- package/package.json +7 -7
- package/renderables/Textarea.d.ts +2 -2
- package/renderer.d.ts +1 -0
- package/testing/mock-keys.d.ts +20 -62
- package/testing.js +32 -78
- package/testing.js.map +3 -3
- package/zig.d.ts +7 -0
package/index.js
CHANGED
|
@@ -133,7 +133,7 @@ import {
|
|
|
133
133
|
white,
|
|
134
134
|
wrapWithDelegates,
|
|
135
135
|
yellow
|
|
136
|
-
} from "./index-
|
|
136
|
+
} from "./index-bsb3x2r3.js";
|
|
137
137
|
// src/text-buffer-view.ts
|
|
138
138
|
class TextBufferView {
|
|
139
139
|
lib;
|
|
@@ -406,6 +406,21 @@ class EditBuffer extends EventEmitter {
|
|
|
406
406
|
offset: boundary.offset
|
|
407
407
|
};
|
|
408
408
|
}
|
|
409
|
+
offsetToPosition(offset) {
|
|
410
|
+
this.guard();
|
|
411
|
+
const result = this.lib.editBufferOffsetToPosition(this.bufferPtr, offset);
|
|
412
|
+
if (!result)
|
|
413
|
+
return null;
|
|
414
|
+
return { row: result.row, col: result.col };
|
|
415
|
+
}
|
|
416
|
+
positionToOffset(row, col) {
|
|
417
|
+
this.guard();
|
|
418
|
+
return this.lib.editBufferPositionToOffset(this.bufferPtr, row, col);
|
|
419
|
+
}
|
|
420
|
+
getLineStartOffset(row) {
|
|
421
|
+
this.guard();
|
|
422
|
+
return this.lib.editBufferGetLineStartOffset(this.bufferPtr, row);
|
|
423
|
+
}
|
|
409
424
|
debugLogRope() {
|
|
410
425
|
this.guard();
|
|
411
426
|
this.lib.editBufferDebugLogRope(this.bufferPtr);
|
|
@@ -5499,8 +5514,8 @@ class TextareaRenderable extends EditBufferRenderable {
|
|
|
5499
5514
|
["submit", () => this.submit()]
|
|
5500
5515
|
]);
|
|
5501
5516
|
}
|
|
5502
|
-
handlePaste(
|
|
5503
|
-
this.insertText(text);
|
|
5517
|
+
handlePaste(event) {
|
|
5518
|
+
this.insertText(event.text);
|
|
5504
5519
|
}
|
|
5505
5520
|
handleKeyPress(key) {
|
|
5506
5521
|
const keyName = typeof key === "string" ? key : key.name;
|
|
@@ -6010,5 +6025,5 @@ export {
|
|
|
6010
6025
|
ASCIIFont
|
|
6011
6026
|
};
|
|
6012
6027
|
|
|
6013
|
-
//# debugId=
|
|
6028
|
+
//# debugId=36B0ACD96C2FA6A664756E2164756E21
|
|
6014
6029
|
//# sourceMappingURL=index.js.map
|