blecsd 0.3.0 → 0.6.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.
- package/README.md +146 -147
- package/dist/{border-Jb7TrMob.d.ts → border-Br-Jc027.d.ts} +2 -2
- package/dist/{cell-DwIu2ryP.d.ts → cell-5Ty_3yMs.d.ts} +1 -1
- package/dist/cellRenderer-D0-DJXWl.d.ts +374 -0
- package/dist/chunk-4N7IFBRQ.js +4 -0
- package/dist/{chunk-DNRXW56C.js → chunk-4XCFTNGN.js} +1 -1
- package/dist/chunk-5YWRP2KG.js +3 -0
- package/dist/chunk-6PX5R326.js +1 -0
- package/dist/chunk-73Y45MLV.js +12 -0
- package/dist/chunk-7ZFQO3OQ.js +1 -0
- package/dist/chunk-A3GSH6MV.js +1 -0
- package/dist/chunk-A5B2BGUM.js +1 -0
- package/dist/chunk-AM6IDSXI.js +1 -0
- package/dist/chunk-EHYOVHRL.js +2 -0
- package/dist/chunk-EMZA6G2M.js +4 -0
- package/dist/chunk-EOFT3PNU.js +1 -0
- package/dist/chunk-ETFDYZVJ.js +1 -0
- package/dist/chunk-FUW7OD3H.js +1 -0
- package/dist/chunk-GRMSEMU7.js +1 -0
- package/dist/chunk-I7AUKTXE.js +1 -0
- package/dist/chunk-IANAVH2A.js +1 -0
- package/dist/chunk-JN2OGNK3.js +1 -0
- package/dist/chunk-JVMNMAHX.js +1 -0
- package/dist/chunk-K2QWNDXV.js +1 -0
- package/dist/chunk-KYNS3GBJ.js +2 -0
- package/dist/chunk-LI3ZYXUT.js +1 -0
- package/dist/chunk-LNEISTXM.js +1 -0
- package/dist/chunk-QABNK7IA.js +1 -0
- package/dist/chunk-QS5QXZNJ.js +1 -0
- package/dist/chunk-QTDRFJG2.js +1 -0
- package/dist/chunk-RJULLVTH.js +1 -0
- package/dist/chunk-SVHITP3F.js +2 -0
- package/dist/chunk-UKVY43V3.js +1 -0
- package/dist/chunk-VIT4KE6Q.js +1 -0
- package/dist/chunk-XG5PVDOP.js +1 -0
- package/dist/chunk-XH5GTWCV.js +1 -0
- package/dist/chunk-XYMPBCYW.js +1 -0
- package/dist/chunk-YRSSCEAS.js +1 -0
- package/dist/chunk-ZL46COQF.js +1 -0
- package/dist/cli/init.js +1 -1
- package/dist/{componentStorage-CJTh-TPO.d.ts → componentStorage-CXJvx4Lt.d.ts} +2 -2
- package/dist/components/index.d.ts +7209 -6691
- package/dist/components/index.js +5 -1
- package/dist/core/index.d.ts +2501 -1262
- package/dist/core/index.js +1 -1
- package/dist/debug/index.d.ts +310 -84
- package/dist/debug/index.js +8 -1
- package/dist/{dirtyTracking-C4v8MmM9.d.ts → dirtyTracking-kCS9-NVF.d.ts} +2 -2
- package/dist/{doubleBuffer-CKQFmlPN.d.ts → doubleBuffer-CWASihKh.d.ts} +1 -1
- package/dist/errors/index.js +1 -1
- package/dist/{inputActions-CRsUtTHM.d.ts → factories-vW7bn_He.d.ts} +21 -786
- package/dist/{gameLoop-C-Ez_i54.d.ts → gameLoop-C1AyRWyP.d.ts} +3 -3
- package/dist/index.d.ts +25 -500
- package/dist/index.js +1 -3
- package/dist/input/index.d.ts +1 -1
- package/dist/input/index.js +1 -1
- package/dist/inputStream-COARA4CP.d.ts +1182 -0
- package/dist/interactiveSystem-h92W9W4n.d.ts +1977 -0
- package/dist/{keyParser-BnHbg2iD.d.ts → keyParser-DReXe2j-.d.ts} +41 -41
- package/dist/{events-9ForpTfM.d.ts → mouseParser-CCqSEUVN.d.ts} +177 -2
- package/dist/{packedStore-BgvnEdE7.d.ts → packedStore-480t2X74.d.ts} +1 -1
- package/dist/panelMovement-DGzIQ8Ll.d.ts +1908 -0
- package/dist/{parser-iMHmQuUh.d.ts → parser-Q1YLXYpF.d.ts} +1 -1
- package/dist/positioning-DiUivJXa.d.ts +917 -0
- package/dist/{renderable-CwqGwrEV.d.ts → renderable-IbSJao5y.d.ts} +2 -2
- package/dist/{scheduler-CMcYew9Z.d.ts → scheduler-NbHT3-D2.d.ts} +3 -1
- package/dist/schemas/index.d.ts +6 -6
- package/dist/schemas/index.js +1 -1
- package/dist/systems/index.d.ts +1057 -1807
- package/dist/systems/index.js +1 -1
- package/dist/terminal/index.d.ts +7207 -2709
- package/dist/terminal/index.js +1 -1
- package/dist/terminalBuffer-BbUz27qM.d.ts +691 -0
- package/dist/{terminus-14-bold-HWSPRLJD.js → terminus-14-bold-ZS4IH465.js} +1 -1
- package/dist/{terminus-14-normal-T3SWMH4D.js → terminus-14-normal-HD5N7F5W.js} +1 -1
- package/dist/text/index.d.ts +263 -0
- package/dist/text/index.js +3 -0
- package/dist/textWrap-Ct2J8gO6.d.ts +761 -0
- package/dist/{tilemap-BirMJdbu.d.ts → tilemap-ByvTsepD.d.ts} +5 -5
- package/dist/{types-CPB4CpbH.d.ts → types-B8LmNkzG.d.ts} +1 -1
- package/dist/utils/index.d.ts +827 -780
- package/dist/utils/index.js +32 -1
- package/dist/{virtualScrollback-D9uLFe8l.d.ts → virtualScrollback-CiooIebp.d.ts} +4 -4
- package/dist/virtualViewport-fIlbIGPt.d.ts +657 -0
- package/dist/{virtualizedLineStore-DwPEvPkk.d.ts → virtualizedLineStore-DfyhojPZ.d.ts} +1 -1
- package/dist/widgets/bigText.d.ts +13 -13
- package/dist/widgets/bigText.js +1 -1
- package/dist/widgets/fonts/index.d.ts +1 -1
- package/dist/widgets/fonts/index.js +1 -1
- package/dist/widgets/index.d.ts +2933 -1102
- package/dist/widgets/index.js +24 -1
- package/package.json +9 -22
- package/dist/3d/index.d.ts +0 -5
- package/dist/3d/index.js +0 -1
- package/dist/audio/index.d.ts +0 -177
- package/dist/audio/index.js +0 -1
- package/dist/chunk-2IEMMRUO.js +0 -1
- package/dist/chunk-35LCBY6P.js +0 -1
- package/dist/chunk-3AV52GY5.js +0 -1
- package/dist/chunk-3LHLSY3Y.js +0 -1
- package/dist/chunk-3O4TQHGK.js +0 -4
- package/dist/chunk-3UJWZ5ZN.js +0 -1
- package/dist/chunk-5PELJRUQ.js +0 -1
- package/dist/chunk-6M2J5QUA.js +0 -1
- package/dist/chunk-7IQEUVGF.js +0 -1
- package/dist/chunk-A6M6TFBL.js +0 -1
- package/dist/chunk-CIK4AMUA.js +0 -1
- package/dist/chunk-CUEUJAHK.js +0 -3
- package/dist/chunk-D42Q2KKR.js +0 -1
- package/dist/chunk-DYEXOFUU.js +0 -2
- package/dist/chunk-DYU72XLL.js +0 -1
- package/dist/chunk-E4CJRSND.js +0 -1
- package/dist/chunk-EAY7B5GL.js +0 -1
- package/dist/chunk-FCMTWFSE.js +0 -1
- package/dist/chunk-FGHEFXLK.js +0 -1
- package/dist/chunk-FL56THSI.js +0 -25
- package/dist/chunk-G437VE43.js +0 -1
- package/dist/chunk-G7GIWWLE.js +0 -1
- package/dist/chunk-GGXNWT36.js +0 -8
- package/dist/chunk-HLFORKXS.js +0 -1
- package/dist/chunk-J7MBKEBY.js +0 -1
- package/dist/chunk-K3SX2LY5.js +0 -1
- package/dist/chunk-LDAFEXN5.js +0 -1
- package/dist/chunk-LYSK5S63.js +0 -1
- package/dist/chunk-MKMFUXLB.js +0 -33
- package/dist/chunk-MQWPHPUM.js +0 -1
- package/dist/chunk-MTI376CU.js +0 -5
- package/dist/chunk-MTV2RJZD.js +0 -1
- package/dist/chunk-NZ55KBM6.js +0 -1
- package/dist/chunk-OB66FB4F.js +0 -1
- package/dist/chunk-OMMJ7B5P.js +0 -1
- package/dist/chunk-OR3BZY7C.js +0 -1
- package/dist/chunk-PXXGH3BV.js +0 -1
- package/dist/chunk-R7AICVRN.js +0 -2
- package/dist/chunk-RZ7FGVI6.js +0 -1
- package/dist/chunk-SHUC6JWA.js +0 -1
- package/dist/chunk-TWSWTBYL.js +0 -1
- package/dist/chunk-UMGTXSQB.js +0 -11
- package/dist/chunk-X3Q3T2SS.js +0 -4
- package/dist/chunk-XZJRWFOS.js +0 -1
- package/dist/chunk-ZAHG7Y3X.js +0 -1
- package/dist/game/index.d.ts +0 -486
- package/dist/game/index.js +0 -1
- package/dist/index-DBS5Uefn.d.ts +0 -3156
- package/dist/mouseParser-Cfrbn3AX.d.ts +0 -177
- package/dist/viewport3d-xI33-_wq.d.ts +0 -182
- package/dist/virtualViewport-Bpv6jlKt.d.ts +0 -1856
|
@@ -0,0 +1,761 @@
|
|
|
1
|
+
import { o as BorderCharset } from './border-Br-Jc027.js';
|
|
2
|
+
|
|
3
|
+
/**
|
|
4
|
+
* Box rendering utilities for drawing borders and boxes.
|
|
5
|
+
* @module utils/box
|
|
6
|
+
*/
|
|
7
|
+
|
|
8
|
+
/**
|
|
9
|
+
* Box drawing characters as strings (for convenience).
|
|
10
|
+
*/
|
|
11
|
+
interface BoxChars {
|
|
12
|
+
readonly topLeft: string;
|
|
13
|
+
readonly topRight: string;
|
|
14
|
+
readonly bottomLeft: string;
|
|
15
|
+
readonly bottomRight: string;
|
|
16
|
+
readonly horizontal: string;
|
|
17
|
+
readonly vertical: string;
|
|
18
|
+
}
|
|
19
|
+
/**
|
|
20
|
+
* Converts a BorderCharset (code points) to BoxChars (strings).
|
|
21
|
+
*
|
|
22
|
+
* @param charset - Border character set with code points
|
|
23
|
+
* @returns Box characters as strings
|
|
24
|
+
*
|
|
25
|
+
* @example
|
|
26
|
+
* ```typescript
|
|
27
|
+
* import { BORDER_ROUNDED, charsetToBoxChars } from 'blecsd';
|
|
28
|
+
*
|
|
29
|
+
* const chars = charsetToBoxChars(BORDER_ROUNDED);
|
|
30
|
+
* console.log(chars.topLeft); // "╭"
|
|
31
|
+
* ```
|
|
32
|
+
*/
|
|
33
|
+
declare function charsetToBoxChars(charset: BorderCharset): BoxChars;
|
|
34
|
+
/**
|
|
35
|
+
* Preset box styles as string characters.
|
|
36
|
+
*/
|
|
37
|
+
declare const BOX_SINGLE: BoxChars;
|
|
38
|
+
declare const BOX_DOUBLE: BoxChars;
|
|
39
|
+
declare const BOX_ROUNDED: BoxChars;
|
|
40
|
+
declare const BOX_BOLD: BoxChars;
|
|
41
|
+
/**
|
|
42
|
+
* ASCII box characters (works in all terminals).
|
|
43
|
+
*/
|
|
44
|
+
declare const BOX_ASCII: BoxChars;
|
|
45
|
+
/**
|
|
46
|
+
* Dashed box characters.
|
|
47
|
+
*/
|
|
48
|
+
declare const BOX_DASHED: BoxChars;
|
|
49
|
+
/**
|
|
50
|
+
* Interface for a renderable cell buffer.
|
|
51
|
+
* Any object implementing this interface can be used with renderBox.
|
|
52
|
+
*/
|
|
53
|
+
interface CellBuffer {
|
|
54
|
+
/** Width of the buffer in cells */
|
|
55
|
+
readonly width: number;
|
|
56
|
+
/** Height of the buffer in cells */
|
|
57
|
+
readonly height: number;
|
|
58
|
+
/**
|
|
59
|
+
* Set a cell's character and colors.
|
|
60
|
+
* @param x - Column (0-indexed)
|
|
61
|
+
* @param y - Row (0-indexed)
|
|
62
|
+
* @param char - Character to display
|
|
63
|
+
* @param fg - Foreground color (optional)
|
|
64
|
+
* @param bg - Background color (optional)
|
|
65
|
+
*/
|
|
66
|
+
setCell(x: number, y: number, char: string, fg?: number, bg?: number): void;
|
|
67
|
+
}
|
|
68
|
+
/**
|
|
69
|
+
* Simple in-memory cell buffer for testing and rendering.
|
|
70
|
+
*/
|
|
71
|
+
interface Cell {
|
|
72
|
+
char: string;
|
|
73
|
+
fg: number;
|
|
74
|
+
bg: number;
|
|
75
|
+
}
|
|
76
|
+
/**
|
|
77
|
+
* Creates a simple cell buffer.
|
|
78
|
+
*
|
|
79
|
+
* @param width - Buffer width in cells
|
|
80
|
+
* @param height - Buffer height in cells
|
|
81
|
+
* @param defaultFg - Default foreground color (default: 0xffffffff white)
|
|
82
|
+
* @param defaultBg - Default background color (default: 0x00000000 transparent)
|
|
83
|
+
* @returns A CellBuffer instance
|
|
84
|
+
*
|
|
85
|
+
* @example
|
|
86
|
+
* ```typescript
|
|
87
|
+
* import { createCellBuffer, renderBox, BOX_SINGLE } from 'blecsd';
|
|
88
|
+
*
|
|
89
|
+
* const buffer = createCellBuffer(80, 24);
|
|
90
|
+
* renderBox(buffer, 5, 2, 20, 10, BOX_SINGLE);
|
|
91
|
+
* ```
|
|
92
|
+
*/
|
|
93
|
+
declare function createCellBuffer(width: number, height: number, defaultFg?: number, defaultBg?: number): CellBuffer & {
|
|
94
|
+
cells: Cell[][];
|
|
95
|
+
};
|
|
96
|
+
/**
|
|
97
|
+
* Options for rendering a box.
|
|
98
|
+
*/
|
|
99
|
+
interface RenderBoxOptions {
|
|
100
|
+
/** Foreground color for the border (optional) */
|
|
101
|
+
fg?: number;
|
|
102
|
+
/** Background color for the border (optional) */
|
|
103
|
+
bg?: number;
|
|
104
|
+
/** Fill the interior with background color (default: false) */
|
|
105
|
+
fill?: boolean;
|
|
106
|
+
/** Fill character for interior (default: ' ') */
|
|
107
|
+
fillChar?: string;
|
|
108
|
+
}
|
|
109
|
+
/**
|
|
110
|
+
* Renders a box to a cell buffer.
|
|
111
|
+
*
|
|
112
|
+
* Draws border characters around the specified rectangle.
|
|
113
|
+
* Minimum size is 1x1 (just corners).
|
|
114
|
+
*
|
|
115
|
+
* @param buffer - The cell buffer to render to
|
|
116
|
+
* @param x - Left column (0-indexed)
|
|
117
|
+
* @param y - Top row (0-indexed)
|
|
118
|
+
* @param width - Box width (including borders)
|
|
119
|
+
* @param height - Box height (including borders)
|
|
120
|
+
* @param chars - Box characters to use
|
|
121
|
+
* @param options - Rendering options
|
|
122
|
+
*
|
|
123
|
+
* @example
|
|
124
|
+
* ```typescript
|
|
125
|
+
* import { createCellBuffer, renderBox, BOX_ROUNDED } from 'blecsd';
|
|
126
|
+
*
|
|
127
|
+
* const buffer = createCellBuffer(80, 24);
|
|
128
|
+
*
|
|
129
|
+
* // Draw a simple box
|
|
130
|
+
* renderBox(buffer, 5, 2, 20, 10, BOX_ROUNDED);
|
|
131
|
+
*
|
|
132
|
+
* // Draw with colors
|
|
133
|
+
* renderBox(buffer, 30, 2, 20, 10, BOX_DOUBLE, {
|
|
134
|
+
* fg: 0x00ff00ff, // Green
|
|
135
|
+
* fill: true
|
|
136
|
+
* });
|
|
137
|
+
* ```
|
|
138
|
+
*/
|
|
139
|
+
declare function renderBox(buffer: CellBuffer, x: number, y: number, width: number, height: number, chars: BoxChars, options?: RenderBoxOptions): void;
|
|
140
|
+
/**
|
|
141
|
+
* Renders a horizontal line to a cell buffer.
|
|
142
|
+
*
|
|
143
|
+
* @param buffer - The cell buffer to render to
|
|
144
|
+
* @param x - Starting column (0-indexed)
|
|
145
|
+
* @param y - Row (0-indexed)
|
|
146
|
+
* @param length - Line length
|
|
147
|
+
* @param char - Character to use (default: horizontal box char)
|
|
148
|
+
* @param fg - Foreground color (optional)
|
|
149
|
+
* @param bg - Background color (optional)
|
|
150
|
+
*
|
|
151
|
+
* @example
|
|
152
|
+
* ```typescript
|
|
153
|
+
* import { createCellBuffer, renderHLine, BOX_SINGLE } from 'blecsd';
|
|
154
|
+
*
|
|
155
|
+
* const buffer = createCellBuffer(80, 24);
|
|
156
|
+
* renderHLine(buffer, 5, 10, 20, BOX_SINGLE.horizontal);
|
|
157
|
+
* ```
|
|
158
|
+
*/
|
|
159
|
+
declare function renderHLine(buffer: CellBuffer, x: number, y: number, length: number, char?: string, fg?: number, bg?: number): void;
|
|
160
|
+
/**
|
|
161
|
+
* Renders a vertical line to a cell buffer.
|
|
162
|
+
*
|
|
163
|
+
* @param buffer - The cell buffer to render to
|
|
164
|
+
* @param x - Column (0-indexed)
|
|
165
|
+
* @param y - Starting row (0-indexed)
|
|
166
|
+
* @param length - Line length
|
|
167
|
+
* @param char - Character to use (default: vertical box char)
|
|
168
|
+
* @param fg - Foreground color (optional)
|
|
169
|
+
* @param bg - Background color (optional)
|
|
170
|
+
*
|
|
171
|
+
* @example
|
|
172
|
+
* ```typescript
|
|
173
|
+
* import { createCellBuffer, renderVLine, BOX_SINGLE } from 'blecsd';
|
|
174
|
+
*
|
|
175
|
+
* const buffer = createCellBuffer(80, 24);
|
|
176
|
+
* renderVLine(buffer, 10, 5, 10, BOX_SINGLE.vertical);
|
|
177
|
+
* ```
|
|
178
|
+
*/
|
|
179
|
+
declare function renderVLine(buffer: CellBuffer, x: number, y: number, length: number, char?: string, fg?: number, bg?: number): void;
|
|
180
|
+
/**
|
|
181
|
+
* Fills a rectangular region with a character.
|
|
182
|
+
*
|
|
183
|
+
* @param buffer - The cell buffer to render to
|
|
184
|
+
* @param x - Left column (0-indexed)
|
|
185
|
+
* @param y - Top row (0-indexed)
|
|
186
|
+
* @param width - Region width
|
|
187
|
+
* @param height - Region height
|
|
188
|
+
* @param char - Fill character (default: ' ')
|
|
189
|
+
* @param fg - Foreground color (optional)
|
|
190
|
+
* @param bg - Background color (optional)
|
|
191
|
+
*
|
|
192
|
+
* @example
|
|
193
|
+
* ```typescript
|
|
194
|
+
* import { createCellBuffer, fillRect } from 'blecsd';
|
|
195
|
+
*
|
|
196
|
+
* const buffer = createCellBuffer(80, 24);
|
|
197
|
+
* boxFillRect(buffer, 5, 2, 20, 10, ' ', 0xffffffff, 0x0000aaff);
|
|
198
|
+
* ```
|
|
199
|
+
*/
|
|
200
|
+
declare function boxFillRect(buffer: CellBuffer, x: number, y: number, width: number, height: number, char?: string, fg?: number, bg?: number): void;
|
|
201
|
+
/**
|
|
202
|
+
* Renders text to a cell buffer.
|
|
203
|
+
*
|
|
204
|
+
* @param buffer - The cell buffer to render to
|
|
205
|
+
* @param x - Starting column (0-indexed)
|
|
206
|
+
* @param y - Row (0-indexed)
|
|
207
|
+
* @param text - Text to render
|
|
208
|
+
* @param fg - Foreground color (optional)
|
|
209
|
+
* @param bg - Background color (optional)
|
|
210
|
+
*
|
|
211
|
+
* @example
|
|
212
|
+
* ```typescript
|
|
213
|
+
* import { createCellBuffer, renderText } from 'blecsd';
|
|
214
|
+
*
|
|
215
|
+
* const buffer = createCellBuffer(80, 24);
|
|
216
|
+
* renderText(buffer, 10, 5, 'Hello, World!');
|
|
217
|
+
* ```
|
|
218
|
+
*/
|
|
219
|
+
declare function renderText(buffer: CellBuffer, x: number, y: number, text: string, fg?: number, bg?: number): void;
|
|
220
|
+
/**
|
|
221
|
+
* Converts a cell buffer to a string representation.
|
|
222
|
+
* Useful for testing and debugging.
|
|
223
|
+
*
|
|
224
|
+
* @param buffer - The cell buffer with cells property
|
|
225
|
+
* @returns String representation of the buffer
|
|
226
|
+
*
|
|
227
|
+
* @example
|
|
228
|
+
* ```typescript
|
|
229
|
+
* import { createCellBuffer, renderBox, BOX_SINGLE, bufferToString } from 'blecsd';
|
|
230
|
+
*
|
|
231
|
+
* const buffer = createCellBuffer(10, 5);
|
|
232
|
+
* renderBox(buffer, 0, 0, 10, 5, BOX_SINGLE);
|
|
233
|
+
* console.log(bufferToString(buffer));
|
|
234
|
+
* // Output:
|
|
235
|
+
* // ┌────────┐
|
|
236
|
+
* // │ │
|
|
237
|
+
* // │ │
|
|
238
|
+
* // │ │
|
|
239
|
+
* // └────────┘
|
|
240
|
+
* ```
|
|
241
|
+
*/
|
|
242
|
+
declare function bufferToString(buffer: CellBuffer & {
|
|
243
|
+
cells: Cell[][];
|
|
244
|
+
}): string;
|
|
245
|
+
|
|
246
|
+
/**
|
|
247
|
+
* Rope Data Structure for Large Text Buffers
|
|
248
|
+
*
|
|
249
|
+
* A rope is a binary tree where leaf nodes contain text strings and internal
|
|
250
|
+
* nodes contain the total length of text in their left subtree. This allows
|
|
251
|
+
* for O(log n) insert, delete, and index operations.
|
|
252
|
+
*
|
|
253
|
+
* @module utils/rope
|
|
254
|
+
*
|
|
255
|
+
* @example
|
|
256
|
+
* ```typescript
|
|
257
|
+
* import { createRope, insert, deleteRange, getLine, getText } from 'blecsd';
|
|
258
|
+
*
|
|
259
|
+
* // Create a rope from text
|
|
260
|
+
* let rope = createRope('Hello, World!');
|
|
261
|
+
*
|
|
262
|
+
* // Insert at position
|
|
263
|
+
* rope = insert(rope, 7, 'Beautiful ');
|
|
264
|
+
* // Result: "Hello, Beautiful World!"
|
|
265
|
+
*
|
|
266
|
+
* // Delete a range
|
|
267
|
+
* rope = deleteRange(rope, 0, 7);
|
|
268
|
+
* // Result: "Beautiful World!"
|
|
269
|
+
*
|
|
270
|
+
* // Get specific line
|
|
271
|
+
* const line = getLine(rope, 0);
|
|
272
|
+
* ```
|
|
273
|
+
*/
|
|
274
|
+
/**
|
|
275
|
+
* Maximum characters in a leaf node.
|
|
276
|
+
* Smaller values give better balance but more nodes.
|
|
277
|
+
* Larger values reduce overhead but slower operations.
|
|
278
|
+
*/
|
|
279
|
+
declare const LEAF_MAX_SIZE = 512;
|
|
280
|
+
/**
|
|
281
|
+
* Minimum characters in a leaf node before merging.
|
|
282
|
+
*/
|
|
283
|
+
declare const LEAF_MIN_SIZE = 256;
|
|
284
|
+
/**
|
|
285
|
+
* Maximum depth before forcing rebalance.
|
|
286
|
+
*/
|
|
287
|
+
declare const MAX_DEPTH = 48;
|
|
288
|
+
/**
|
|
289
|
+
* A leaf node containing actual text content.
|
|
290
|
+
*/
|
|
291
|
+
interface RopeLeaf {
|
|
292
|
+
readonly type: 'leaf';
|
|
293
|
+
/** The text content of this leaf */
|
|
294
|
+
readonly text: string;
|
|
295
|
+
/** Total number of characters */
|
|
296
|
+
readonly length: number;
|
|
297
|
+
/** Number of newlines in this leaf */
|
|
298
|
+
readonly newlines: number;
|
|
299
|
+
/** Line break positions within this leaf (relative to start) */
|
|
300
|
+
readonly lineBreaks: readonly number[];
|
|
301
|
+
}
|
|
302
|
+
/**
|
|
303
|
+
* An internal node containing two subtrees.
|
|
304
|
+
*/
|
|
305
|
+
interface RopeNode {
|
|
306
|
+
readonly type: 'node';
|
|
307
|
+
/** Left subtree */
|
|
308
|
+
readonly left: Rope;
|
|
309
|
+
/** Right subtree */
|
|
310
|
+
readonly right: Rope;
|
|
311
|
+
/** Total length of left subtree (weight) */
|
|
312
|
+
readonly leftLength: number;
|
|
313
|
+
/** Total length of entire subtree */
|
|
314
|
+
readonly length: number;
|
|
315
|
+
/** Total newlines in entire subtree */
|
|
316
|
+
readonly newlines: number;
|
|
317
|
+
/** Depth of tree from this node */
|
|
318
|
+
readonly depth: number;
|
|
319
|
+
}
|
|
320
|
+
/**
|
|
321
|
+
* A rope is either a leaf or an internal node.
|
|
322
|
+
*/
|
|
323
|
+
type Rope = RopeLeaf | RopeNode;
|
|
324
|
+
/**
|
|
325
|
+
* Line information returned by getLine.
|
|
326
|
+
*/
|
|
327
|
+
interface LineInfo {
|
|
328
|
+
/** Line content (without newline) */
|
|
329
|
+
readonly text: string;
|
|
330
|
+
/** Start index in rope */
|
|
331
|
+
readonly start: number;
|
|
332
|
+
/** End index in rope (exclusive) */
|
|
333
|
+
readonly end: number;
|
|
334
|
+
/** Line number (0-based) */
|
|
335
|
+
readonly lineNumber: number;
|
|
336
|
+
}
|
|
337
|
+
/**
|
|
338
|
+
* Statistics about a rope.
|
|
339
|
+
*/
|
|
340
|
+
interface RopeStats {
|
|
341
|
+
/** Total characters */
|
|
342
|
+
readonly length: number;
|
|
343
|
+
/** Total newlines */
|
|
344
|
+
readonly newlines: number;
|
|
345
|
+
/** Number of leaf nodes */
|
|
346
|
+
readonly leafCount: number;
|
|
347
|
+
/** Maximum depth */
|
|
348
|
+
readonly depth: number;
|
|
349
|
+
/** Average leaf size */
|
|
350
|
+
readonly avgLeafSize: number;
|
|
351
|
+
}
|
|
352
|
+
/**
|
|
353
|
+
* Creates a rope from a string.
|
|
354
|
+
*
|
|
355
|
+
* @param text - Initial text content
|
|
356
|
+
* @returns A new Rope
|
|
357
|
+
*
|
|
358
|
+
* @example
|
|
359
|
+
* ```typescript
|
|
360
|
+
* import { createRope } from 'blecsd';
|
|
361
|
+
*
|
|
362
|
+
* const rope = createRope('Hello, World!');
|
|
363
|
+
* ```
|
|
364
|
+
*/
|
|
365
|
+
declare function createRope(text?: string): Rope;
|
|
366
|
+
/**
|
|
367
|
+
* Creates an empty rope.
|
|
368
|
+
*
|
|
369
|
+
* @returns An empty Rope
|
|
370
|
+
*/
|
|
371
|
+
declare function createEmptyRope(): Rope;
|
|
372
|
+
/**
|
|
373
|
+
* Gets the total length of the rope.
|
|
374
|
+
*
|
|
375
|
+
* @param rope - The rope to measure
|
|
376
|
+
* @returns Total character count
|
|
377
|
+
*
|
|
378
|
+
* @example
|
|
379
|
+
* ```typescript
|
|
380
|
+
* import { createRope, getLength } from 'blecsd';
|
|
381
|
+
*
|
|
382
|
+
* const rope = createRope('Hello');
|
|
383
|
+
* console.log(getLength(rope)); // 5
|
|
384
|
+
* ```
|
|
385
|
+
*/
|
|
386
|
+
declare function getLength(rope: Rope): number;
|
|
387
|
+
/**
|
|
388
|
+
* Gets the total number of newlines in the rope.
|
|
389
|
+
*
|
|
390
|
+
* @param rope - The rope to measure
|
|
391
|
+
* @returns Total newline count
|
|
392
|
+
*/
|
|
393
|
+
declare function getNewlineCount(rope: Rope): number;
|
|
394
|
+
/**
|
|
395
|
+
* Gets the total number of lines (newlines + 1).
|
|
396
|
+
*
|
|
397
|
+
* @param rope - The rope to measure
|
|
398
|
+
* @returns Line count
|
|
399
|
+
*/
|
|
400
|
+
declare function getLineCount(rope: Rope): number;
|
|
401
|
+
/**
|
|
402
|
+
* Checks if the rope is empty.
|
|
403
|
+
*
|
|
404
|
+
* @param rope - The rope to check
|
|
405
|
+
* @returns true if empty
|
|
406
|
+
*/
|
|
407
|
+
declare function isEmpty(rope: Rope): boolean;
|
|
408
|
+
/**
|
|
409
|
+
* Gets the character at a specific index.
|
|
410
|
+
*
|
|
411
|
+
* @param rope - The rope to query
|
|
412
|
+
* @param index - Character index (0-based)
|
|
413
|
+
* @returns Character at index, or undefined if out of bounds
|
|
414
|
+
*
|
|
415
|
+
* @example
|
|
416
|
+
* ```typescript
|
|
417
|
+
* import { createRope, charAt } from 'blecsd';
|
|
418
|
+
*
|
|
419
|
+
* const rope = createRope('Hello');
|
|
420
|
+
* console.log(charAt(rope, 0)); // 'H'
|
|
421
|
+
* ```
|
|
422
|
+
*/
|
|
423
|
+
declare function charAt(rope: Rope, index: number): string | undefined;
|
|
424
|
+
/**
|
|
425
|
+
* Gets a substring from the rope.
|
|
426
|
+
*
|
|
427
|
+
* @param rope - The rope to query
|
|
428
|
+
* @param start - Start index (inclusive)
|
|
429
|
+
* @param end - End index (exclusive), defaults to end of rope
|
|
430
|
+
* @returns Substring
|
|
431
|
+
*
|
|
432
|
+
* @example
|
|
433
|
+
* ```typescript
|
|
434
|
+
* import { createRope, substring } from 'blecsd';
|
|
435
|
+
*
|
|
436
|
+
* const rope = createRope('Hello, World!');
|
|
437
|
+
* console.log(substring(rope, 0, 5)); // 'Hello'
|
|
438
|
+
* ```
|
|
439
|
+
*/
|
|
440
|
+
declare function substring(rope: Rope, start: number, end?: number): string;
|
|
441
|
+
/**
|
|
442
|
+
* Converts entire rope to string.
|
|
443
|
+
*
|
|
444
|
+
* @param rope - The rope to convert
|
|
445
|
+
* @returns Full text content
|
|
446
|
+
*
|
|
447
|
+
* @example
|
|
448
|
+
* ```typescript
|
|
449
|
+
* import { createRope, getText } from 'blecsd';
|
|
450
|
+
*
|
|
451
|
+
* const rope = createRope('Hello');
|
|
452
|
+
* console.log(getText(rope)); // 'Hello'
|
|
453
|
+
* ```
|
|
454
|
+
*/
|
|
455
|
+
declare function getText(rope: Rope): string;
|
|
456
|
+
/**
|
|
457
|
+
* Gets the line index for a character position.
|
|
458
|
+
*
|
|
459
|
+
* @param rope - The rope to query
|
|
460
|
+
* @param index - Character index
|
|
461
|
+
* @returns Line number (0-based)
|
|
462
|
+
*
|
|
463
|
+
* @example
|
|
464
|
+
* ```typescript
|
|
465
|
+
* import { createRope, getLineForIndex } from 'blecsd';
|
|
466
|
+
*
|
|
467
|
+
* const rope = createRope('Line 1\nLine 2\nLine 3');
|
|
468
|
+
* console.log(getLineForIndex(rope, 7)); // 1 (start of 'Line 2')
|
|
469
|
+
* ```
|
|
470
|
+
*/
|
|
471
|
+
declare function getLineForIndex(rope: Rope, index: number): number;
|
|
472
|
+
/**
|
|
473
|
+
* Gets the start index of a line.
|
|
474
|
+
*
|
|
475
|
+
* @param rope - The rope to query
|
|
476
|
+
* @param lineNumber - Line number (0-based)
|
|
477
|
+
* @returns Start index of line, or -1 if out of bounds
|
|
478
|
+
*/
|
|
479
|
+
declare function getLineStart(rope: Rope, lineNumber: number): number;
|
|
480
|
+
/**
|
|
481
|
+
* Gets the end index of a line (position of newline or end of rope).
|
|
482
|
+
*
|
|
483
|
+
* @param rope - The rope to query
|
|
484
|
+
* @param lineNumber - Line number (0-based)
|
|
485
|
+
* @returns End index of line, or -1 if out of bounds
|
|
486
|
+
*/
|
|
487
|
+
declare function getLineEnd(rope: Rope, lineNumber: number): number;
|
|
488
|
+
/**
|
|
489
|
+
* Gets a specific line's content.
|
|
490
|
+
*
|
|
491
|
+
* @param rope - The rope to query
|
|
492
|
+
* @param lineNumber - Line number (0-based)
|
|
493
|
+
* @returns Line info or undefined if out of bounds
|
|
494
|
+
*
|
|
495
|
+
* @example
|
|
496
|
+
* ```typescript
|
|
497
|
+
* import { createRope, getLine } from 'blecsd';
|
|
498
|
+
*
|
|
499
|
+
* const rope = createRope('Line 1\nLine 2\nLine 3');
|
|
500
|
+
* const line = getLine(rope, 1);
|
|
501
|
+
* console.log(line?.text); // 'Line 2'
|
|
502
|
+
* ```
|
|
503
|
+
*/
|
|
504
|
+
declare function getLine(rope: Rope, lineNumber: number): LineInfo | undefined;
|
|
505
|
+
/**
|
|
506
|
+
* Gets a range of lines.
|
|
507
|
+
*
|
|
508
|
+
* @param rope - The rope to query
|
|
509
|
+
* @param startLine - Start line (inclusive)
|
|
510
|
+
* @param endLine - End line (exclusive)
|
|
511
|
+
* @returns Array of line info
|
|
512
|
+
*
|
|
513
|
+
* @example
|
|
514
|
+
* ```typescript
|
|
515
|
+
* import { createRope, getLines } from 'blecsd';
|
|
516
|
+
*
|
|
517
|
+
* const rope = createRope('Line 1\nLine 2\nLine 3');
|
|
518
|
+
* const lines = getLines(rope, 0, 2);
|
|
519
|
+
* // lines = [{ text: 'Line 1', ... }, { text: 'Line 2', ... }]
|
|
520
|
+
* ```
|
|
521
|
+
*/
|
|
522
|
+
declare function getLines(rope: Rope, startLine: number, endLine: number): LineInfo[];
|
|
523
|
+
/**
|
|
524
|
+
* Inserts text at a position.
|
|
525
|
+
*
|
|
526
|
+
* @param rope - The rope to modify
|
|
527
|
+
* @param index - Position to insert at
|
|
528
|
+
* @param text - Text to insert
|
|
529
|
+
* @returns New rope with text inserted
|
|
530
|
+
*
|
|
531
|
+
* @example
|
|
532
|
+
* ```typescript
|
|
533
|
+
* import { createRope, insert } from 'blecsd';
|
|
534
|
+
*
|
|
535
|
+
* let rope = createRope('Hello World');
|
|
536
|
+
* rope = insert(rope, 6, 'Beautiful ');
|
|
537
|
+
* // Result: 'Hello Beautiful World'
|
|
538
|
+
* ```
|
|
539
|
+
*/
|
|
540
|
+
declare function insert(rope: Rope, index: number, text: string): Rope;
|
|
541
|
+
/**
|
|
542
|
+
* Appends text to the end.
|
|
543
|
+
*
|
|
544
|
+
* @param rope - The rope to modify
|
|
545
|
+
* @param text - Text to append
|
|
546
|
+
* @returns New rope with text appended
|
|
547
|
+
*
|
|
548
|
+
* @example
|
|
549
|
+
* ```typescript
|
|
550
|
+
* import { createRope, append } from 'blecsd';
|
|
551
|
+
*
|
|
552
|
+
* let rope = createRope('Hello');
|
|
553
|
+
* rope = append(rope, ' World');
|
|
554
|
+
* // Result: 'Hello World'
|
|
555
|
+
* ```
|
|
556
|
+
*/
|
|
557
|
+
declare function append(rope: Rope, text: string): Rope;
|
|
558
|
+
/**
|
|
559
|
+
* Prepends text to the start.
|
|
560
|
+
*
|
|
561
|
+
* @param rope - The rope to modify
|
|
562
|
+
* @param text - Text to prepend
|
|
563
|
+
* @returns New rope with text prepended
|
|
564
|
+
*/
|
|
565
|
+
declare function prepend(rope: Rope, text: string): Rope;
|
|
566
|
+
/**
|
|
567
|
+
* Deletes a range of text.
|
|
568
|
+
*
|
|
569
|
+
* @param rope - The rope to modify
|
|
570
|
+
* @param start - Start index (inclusive)
|
|
571
|
+
* @param end - End index (exclusive)
|
|
572
|
+
* @returns New rope with range deleted
|
|
573
|
+
*
|
|
574
|
+
* @example
|
|
575
|
+
* ```typescript
|
|
576
|
+
* import { createRope, deleteRange } from 'blecsd';
|
|
577
|
+
*
|
|
578
|
+
* let rope = createRope('Hello Beautiful World');
|
|
579
|
+
* rope = deleteRange(rope, 6, 16);
|
|
580
|
+
* // Result: 'Hello World'
|
|
581
|
+
* ```
|
|
582
|
+
*/
|
|
583
|
+
declare function deleteRange(rope: Rope, start: number, end: number): Rope;
|
|
584
|
+
/**
|
|
585
|
+
* Replaces a range of text.
|
|
586
|
+
*
|
|
587
|
+
* @param rope - The rope to modify
|
|
588
|
+
* @param start - Start index (inclusive)
|
|
589
|
+
* @param end - End index (exclusive)
|
|
590
|
+
* @param text - Replacement text
|
|
591
|
+
* @returns New rope with range replaced
|
|
592
|
+
*
|
|
593
|
+
* @example
|
|
594
|
+
* ```typescript
|
|
595
|
+
* import { createRope, replaceRange } from 'blecsd';
|
|
596
|
+
*
|
|
597
|
+
* let rope = createRope('Hello World');
|
|
598
|
+
* rope = replaceRange(rope, 6, 11, 'Universe');
|
|
599
|
+
* // Result: 'Hello Universe'
|
|
600
|
+
* ```
|
|
601
|
+
*/
|
|
602
|
+
declare function replaceRange(rope: Rope, start: number, end: number, text: string): Rope;
|
|
603
|
+
/**
|
|
604
|
+
* Gets statistics about the rope structure.
|
|
605
|
+
*
|
|
606
|
+
* @param rope - The rope to analyze
|
|
607
|
+
* @returns Rope statistics
|
|
608
|
+
*/
|
|
609
|
+
declare function getStats(rope: Rope): RopeStats;
|
|
610
|
+
/**
|
|
611
|
+
* Verifies rope integrity (for testing/debugging).
|
|
612
|
+
*
|
|
613
|
+
* @param rope - The rope to verify
|
|
614
|
+
* @returns true if valid
|
|
615
|
+
*/
|
|
616
|
+
declare function verify(rope: Rope): boolean;
|
|
617
|
+
|
|
618
|
+
/**
|
|
619
|
+
* Text wrapping utilities with Unicode and ANSI support.
|
|
620
|
+
* @module utils/textWrap
|
|
621
|
+
*/
|
|
622
|
+
|
|
623
|
+
/**
|
|
624
|
+
* Text alignment options.
|
|
625
|
+
*/
|
|
626
|
+
type TextAlign = 'left' | 'center' | 'right';
|
|
627
|
+
/**
|
|
628
|
+
* Options for text wrapping.
|
|
629
|
+
*/
|
|
630
|
+
interface WrapOptions {
|
|
631
|
+
/** Maximum width in characters */
|
|
632
|
+
width: number;
|
|
633
|
+
/** Whether to wrap text (default: true) */
|
|
634
|
+
wrap?: boolean;
|
|
635
|
+
/** Text alignment (default: 'left') */
|
|
636
|
+
align?: TextAlign;
|
|
637
|
+
/** Break mid-word if word exceeds width (default: false) */
|
|
638
|
+
breakWord?: boolean;
|
|
639
|
+
}
|
|
640
|
+
/**
|
|
641
|
+
* Removes ANSI escape sequences from a string.
|
|
642
|
+
*
|
|
643
|
+
* @param text - Text with possible ANSI codes
|
|
644
|
+
* @returns Text without ANSI codes
|
|
645
|
+
*
|
|
646
|
+
* @example
|
|
647
|
+
* ```typescript
|
|
648
|
+
* import { stripAnsi } from 'blecsd';
|
|
649
|
+
*
|
|
650
|
+
* const plain = stripAnsi('\x1b[31mRed\x1b[0m');
|
|
651
|
+
* console.log(plain); // "Red"
|
|
652
|
+
* ```
|
|
653
|
+
*/
|
|
654
|
+
declare function stripAnsi(text: string): string;
|
|
655
|
+
/**
|
|
656
|
+
* Gets the visible width of a string (excluding ANSI codes).
|
|
657
|
+
* Currently handles ASCII only. East Asian width support to be added.
|
|
658
|
+
*
|
|
659
|
+
* @param text - Text to measure
|
|
660
|
+
* @returns Visible character width
|
|
661
|
+
*
|
|
662
|
+
* @example
|
|
663
|
+
* ```typescript
|
|
664
|
+
* import { getVisibleWidth } from 'blecsd';
|
|
665
|
+
*
|
|
666
|
+
* console.log(getVisibleWidth('Hello')); // 5
|
|
667
|
+
* console.log(getVisibleWidth('\x1b[31mHello\x1b[0m')); // 5 (ANSI codes not counted)
|
|
668
|
+
* ```
|
|
669
|
+
*/
|
|
670
|
+
declare function getVisibleWidth(text: string): number;
|
|
671
|
+
/**
|
|
672
|
+
* Truncates a string to fit within a specified width,
|
|
673
|
+
* preserving ANSI codes and adding ellipsis if truncated.
|
|
674
|
+
*
|
|
675
|
+
* @param text - Text to truncate
|
|
676
|
+
* @param width - Maximum width
|
|
677
|
+
* @param ellipsis - Ellipsis string (default: '…')
|
|
678
|
+
* @returns Truncated text
|
|
679
|
+
*
|
|
680
|
+
* @example
|
|
681
|
+
* ```typescript
|
|
682
|
+
* import { truncate } from 'blecsd';
|
|
683
|
+
*
|
|
684
|
+
* console.log(truncate('Hello World', 8)); // "Hello W…"
|
|
685
|
+
* ```
|
|
686
|
+
*/
|
|
687
|
+
declare function truncate(text: string, width: number, ellipsis?: string): string;
|
|
688
|
+
/**
|
|
689
|
+
* Aligns a line of text within a specified width.
|
|
690
|
+
*
|
|
691
|
+
* @param line - Line to align
|
|
692
|
+
* @param width - Target width
|
|
693
|
+
* @param align - Alignment type
|
|
694
|
+
* @returns Aligned line (padded with spaces)
|
|
695
|
+
*
|
|
696
|
+
* @example
|
|
697
|
+
* ```typescript
|
|
698
|
+
* import { alignLine } from 'blecsd';
|
|
699
|
+
*
|
|
700
|
+
* console.log(alignLine('Hello', 10, 'left')); // "Hello "
|
|
701
|
+
* console.log(alignLine('Hello', 10, 'center')); // " Hello "
|
|
702
|
+
* console.log(alignLine('Hello', 10, 'right')); // " Hello"
|
|
703
|
+
* ```
|
|
704
|
+
*/
|
|
705
|
+
declare function alignLine(line: string, width: number, align: TextAlign): string;
|
|
706
|
+
/**
|
|
707
|
+
* Wraps text to fit within a specified width, breaking at word boundaries.
|
|
708
|
+
*
|
|
709
|
+
* @param text - Text to wrap
|
|
710
|
+
* @param width - Maximum width per line
|
|
711
|
+
* @returns Array of wrapped lines
|
|
712
|
+
*
|
|
713
|
+
* @example
|
|
714
|
+
* ```typescript
|
|
715
|
+
* import { wordWrap } from 'blecsd';
|
|
716
|
+
*
|
|
717
|
+
* const lines = wordWrap('The quick brown fox jumps over the lazy dog', 20);
|
|
718
|
+
* // ["The quick brown fox", "jumps over the lazy", "dog"]
|
|
719
|
+
* ```
|
|
720
|
+
*/
|
|
721
|
+
declare function wordWrap(text: string, width: number): string[];
|
|
722
|
+
/**
|
|
723
|
+
* Wraps and aligns text with full options.
|
|
724
|
+
*
|
|
725
|
+
* @param text - Text to wrap
|
|
726
|
+
* @param options - Wrapping options
|
|
727
|
+
* @returns Array of wrapped and aligned lines
|
|
728
|
+
*
|
|
729
|
+
* @example
|
|
730
|
+
* ```typescript
|
|
731
|
+
* import { wrapText } from 'blecsd';
|
|
732
|
+
*
|
|
733
|
+
* const lines = wrapText('Hello world, this is a test', {
|
|
734
|
+
* width: 15,
|
|
735
|
+
* wrap: true,
|
|
736
|
+
* align: 'center'
|
|
737
|
+
* });
|
|
738
|
+
* // [" Hello world ", " this is a test"]
|
|
739
|
+
* ```
|
|
740
|
+
*/
|
|
741
|
+
declare function wrapText(text: string, options: WrapOptions): string[];
|
|
742
|
+
/**
|
|
743
|
+
* Pads text to a specific height by adding empty lines.
|
|
744
|
+
*
|
|
745
|
+
* @param lines - Array of lines
|
|
746
|
+
* @param height - Target height
|
|
747
|
+
* @param width - Line width for padding
|
|
748
|
+
* @param valign - Vertical alignment ('top' | 'middle' | 'bottom')
|
|
749
|
+
* @returns Array of lines padded to height
|
|
750
|
+
*
|
|
751
|
+
* @example
|
|
752
|
+
* ```typescript
|
|
753
|
+
* import { padHeight } from 'blecsd';
|
|
754
|
+
*
|
|
755
|
+
* const lines = padHeight(['Hello'], 3, 10, 'middle');
|
|
756
|
+
* // [" ", "Hello ", " "]
|
|
757
|
+
* ```
|
|
758
|
+
*/
|
|
759
|
+
declare function padHeight(lines: string[], height: number, width: number, valign?: 'top' | 'middle' | 'bottom'): string[];
|
|
760
|
+
|
|
761
|
+
export { type RopeStats as $, getLineForIndex as A, type BoxChars as B, getNewlineCount as C, isEmpty as D, verify as E, wordWrap as F, truncate as G, alignLine as H, getVisibleWidth as I, stripAnsi as J, padHeight as K, BOX_ASCII as L, BOX_BOLD as M, BOX_DASHED as N, BOX_DOUBLE as O, BOX_ROUNDED as P, BOX_SINGLE as Q, type Cell as R, type CellBuffer as S, LEAF_MAX_SIZE as T, LEAF_MIN_SIZE as U, type LineInfo as V, MAX_DEPTH as W, type RenderBoxOptions as X, type Rope as Y, type RopeLeaf as Z, type RopeNode as _, getLines as a, type TextAlign as a0, type WrapOptions as a1, getStats as b, renderBox as c, renderHLine as d, renderVLine as e, createCellBuffer as f, getLine as g, bufferToString as h, boxFillRect as i, charsetToBoxChars as j, createRope as k, createEmptyRope as l, insert as m, deleteRange as n, replaceRange as o, getText as p, getLineCount as q, renderText as r, append as s, prepend as t, charAt as u, substring as v, wrapText as w, getLength as x, getLineStart as y, getLineEnd as z };
|