blecsd 0.4.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 +145 -145
- package/dist/{border-DGNDfT6T.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-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-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 +8172 -7777
- package/dist/components/index.js +5 -1
- package/dist/core/index.d.ts +4777 -3942
- 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-Fyw14_Gm.d.ts → factories-vW7bn_He.d.ts} +21 -786
- package/dist/{gameLoop-CSTb7e0L.d.ts → gameLoop-C1AyRWyP.d.ts} +3 -3
- package/dist/index.d.ts +24 -1217
- 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-m7fWto6g.d.ts → keyParser-DReXe2j-.d.ts} +28 -28
- 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-DeeZleia.d.ts → scheduler-NbHT3-D2.d.ts} +1 -1
- package/dist/schemas/index.d.ts +6 -6
- package/dist/schemas/index.js +1 -1
- package/dist/systems/index.d.ts +785 -1882
- package/dist/systems/index.js +1 -1
- package/dist/terminal/index.d.ts +7563 -3387
- 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 +829 -782
- 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 +1620 -910
- 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-25OEBENM.js +0 -3
- package/dist/chunk-26STV7ZS.js +0 -1
- package/dist/chunk-2NMGUEFC.js +0 -4
- package/dist/chunk-35LCBY6P.js +0 -1
- package/dist/chunk-4PRDJTCM.js +0 -1
- package/dist/chunk-5PELJRUQ.js +0 -1
- package/dist/chunk-5VEKHA3B.js +0 -5
- package/dist/chunk-6KEM3OS2.js +0 -11
- package/dist/chunk-6XWY6GB7.js +0 -1
- package/dist/chunk-735KKTP3.js +0 -1
- package/dist/chunk-7SWJNDOL.js +0 -26
- package/dist/chunk-APKUNIMB.js +0 -1
- package/dist/chunk-CJCSZRV6.js +0 -1
- package/dist/chunk-DMBMCCLN.js +0 -1
- package/dist/chunk-DQTVJITR.js +0 -1
- package/dist/chunk-DSKQ5J4R.js +0 -1
- package/dist/chunk-E4CJRSND.js +0 -1
- package/dist/chunk-EF4DC6IN.js +0 -1
- package/dist/chunk-EJAKECSN.js +0 -1
- package/dist/chunk-FNQRUMFD.js +0 -1
- package/dist/chunk-GJ3RS2VG.js +0 -1
- package/dist/chunk-KTVEMB2I.js +0 -1
- package/dist/chunk-KYAPE44E.js +0 -8
- package/dist/chunk-LI4Y7TBZ.js +0 -1
- package/dist/chunk-NHOL4BN6.js +0 -1
- package/dist/chunk-NPNUUSIB.js +0 -1
- package/dist/chunk-NZ55KBM6.js +0 -1
- package/dist/chunk-OFRWGW2G.js +0 -1
- package/dist/chunk-OMMJ7B5P.js +0 -1
- package/dist/chunk-OMU5BSAS.js +0 -2
- package/dist/chunk-P3ZLIQJP.js +0 -1
- package/dist/chunk-PWI36BQJ.js +0 -1
- package/dist/chunk-QQMUDJ32.js +0 -2
- package/dist/chunk-R3ICZOE4.js +0 -1
- package/dist/chunk-RZ7FGVI6.js +0 -1
- package/dist/chunk-S6WS46FE.js +0 -1
- package/dist/chunk-TSARUU56.js +0 -1
- package/dist/chunk-WJRVUAZR.js +0 -33
- package/dist/chunk-WY5EZOOL.js +0 -1
- package/dist/chunk-YY6RZCZH.js +0 -4
- package/dist/chunk-ZPGJCHXH.js +0 -1
- package/dist/chunk-ZPL2J25N.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-B7p5ow7K.d.ts +0 -177
- package/dist/viewport3d-xI33-_wq.d.ts +0 -182
- package/dist/virtualViewport-DTSN6jFk.d.ts +0 -1856
package/dist/utils/index.d.ts
CHANGED
|
@@ -1,256 +1,20 @@
|
|
|
1
|
-
import { B as
|
|
2
|
-
export {
|
|
3
|
-
|
|
1
|
+
import { c as renderBox, d as renderHLine, e as renderVLine, r as renderText, f as createCellBuffer, h as bufferToString$1, i as boxFillRect, j as charsetToBoxChars, B as BoxChars, k as createRope, l as createEmptyRope, m as insert, n as deleteRange, o as replaceRange, p as getText, g as getLine, q as getLineCount$1, s as append, t as prepend, u as charAt, v as substring, x as getLength, y as getLineStart, z as getLineEnd, A as getLineForIndex, a as getLines, C as getNewlineCount, b as getStats, D as isEmpty, E as verify, F as wordWrap, w as wrapText, G as truncate, H as alignLine, I as getVisibleWidth, J as stripAnsi, K as padHeight } from '../textWrap-Ct2J8gO6.js';
|
|
2
|
+
export { L as BOX_ASCII, M as BOX_BOLD, N as BOX_DASHED, O as BOX_DOUBLE, P as BOX_ROUNDED, Q as BOX_SINGLE, R as Cell, S as CellBuffer, T as LEAF_MAX_SIZE, U as LEAF_MIN_SIZE, V as LineInfo, W as MAX_DEPTH, X as RenderBoxOptions, Y as Rope, Z as RopeLeaf, _ as RopeNode, $ as RopeStats, a0 as TextAlign, a1 as WrapOptions } from '../textWrap-Ct2J8gO6.js';
|
|
3
|
+
import { c as colorToHex, h as hexToColor, p as packColor, u as unpackColor, a as parseColor } from '../color-B78w3zH-.js';
|
|
4
|
+
import { c as createComponentStore, a as createSparseStore, b as createTypedArrayPool, g as getComponentMemoryReport, e as estimateMemoryUsage, i as isWithinMemoryBounds } from '../componentStorage-CXJvx4Lt.js';
|
|
5
|
+
export { d as ComponentMemoryReport, C as ComponentStore, f as ComponentStoreConfig, S as SparseStorageConfig, h as SparseStore, T as TypedArrayPool } from '../componentStorage-CXJvx4Lt.js';
|
|
6
|
+
import * as zod from 'zod';
|
|
4
7
|
import { z } from 'zod';
|
|
5
|
-
import
|
|
6
|
-
|
|
7
|
-
export { C as
|
|
8
|
-
import '../
|
|
8
|
+
import * as zod_v4_core from 'zod/v4/core';
|
|
9
|
+
import { c as createLineStore, a as createLineStoreFromLines, b as createEmptyLineStore, d as appendToStore, e as appendLines, g as getLineAtIndex, f as getLineRange, h as getLineCount, i as getLineForOffset, j as getOffsetForLine, k as getLineInfo, l as getVisibleLines, m as exportContent, n as exportLineRange, o as getStoreStats, p as getByteSize, q as isStoreEmpty, t as trimToLineCount } from '../virtualizedLineStore-DfyhojPZ.js';
|
|
10
|
+
export { C as CHUNKED_THRESHOLD, L as LineIndexSchema, r as LineRangeParamsSchema, s as LineStoreStats, T as TrimParamsSchema, u as VirtualizedLineInfo, v as VirtualizedLineRange, V as VirtualizedLineStore, w as VisibleLinesParamsSchema } from '../virtualizedLineStore-DfyhojPZ.js';
|
|
11
|
+
import { S as StyleData } from '../renderable-IbSJao5y.js';
|
|
12
|
+
import { c as createScrollbackBuffer, a as appendLine, b as appendLines$1, g as getLine$1, d as getLineRange$1, s as scrollbackScrollBy, e as scrollbackScrollToTop, f as scrollbackScrollToBottom, j as jumpToLine, h as exportToText, l as loadFromText, i as clearScrollback, t as trimToLineCount$1, k as getVisibleLines$1, m as getScrollbackStats, n as getMemoryUsage, o as compressOldChunks, p as decompressAll } from '../virtualScrollback-CiooIebp.js';
|
|
13
|
+
export { C as COMPRESSION_RATIO, q as Chunk, D as DEFAULT_CHUNK_SIZE, r as DEFAULT_MAX_CACHED, u as DEFAULT_MAX_MEMORY, L as LineRange, S as ScrollbackBuffer, v as ScrollbackConfig, w as ScrollbackLine, x as ScrollbackStats } from '../virtualScrollback-CiooIebp.js';
|
|
14
|
+
import '../border-Br-Jc027.js';
|
|
15
|
+
import '../types-B8LmNkzG.js';
|
|
9
16
|
import 'bitecs';
|
|
10
17
|
|
|
11
|
-
/**
|
|
12
|
-
* Box rendering utilities for drawing borders and boxes.
|
|
13
|
-
* @module utils/box
|
|
14
|
-
*/
|
|
15
|
-
|
|
16
|
-
/**
|
|
17
|
-
* Box drawing characters as strings (for convenience).
|
|
18
|
-
*/
|
|
19
|
-
interface BoxChars {
|
|
20
|
-
readonly topLeft: string;
|
|
21
|
-
readonly topRight: string;
|
|
22
|
-
readonly bottomLeft: string;
|
|
23
|
-
readonly bottomRight: string;
|
|
24
|
-
readonly horizontal: string;
|
|
25
|
-
readonly vertical: string;
|
|
26
|
-
}
|
|
27
|
-
/**
|
|
28
|
-
* Converts a BorderCharset (code points) to BoxChars (strings).
|
|
29
|
-
*
|
|
30
|
-
* @param charset - Border character set with code points
|
|
31
|
-
* @returns Box characters as strings
|
|
32
|
-
*
|
|
33
|
-
* @example
|
|
34
|
-
* ```typescript
|
|
35
|
-
* import { BORDER_ROUNDED, charsetToBoxChars } from 'blecsd';
|
|
36
|
-
*
|
|
37
|
-
* const chars = charsetToBoxChars(BORDER_ROUNDED);
|
|
38
|
-
* console.log(chars.topLeft); // "╭"
|
|
39
|
-
* ```
|
|
40
|
-
*/
|
|
41
|
-
declare function charsetToBoxChars(charset: BorderCharset): BoxChars;
|
|
42
|
-
/**
|
|
43
|
-
* Preset box styles as string characters.
|
|
44
|
-
*/
|
|
45
|
-
declare const BOX_SINGLE: BoxChars;
|
|
46
|
-
declare const BOX_DOUBLE: BoxChars;
|
|
47
|
-
declare const BOX_ROUNDED: BoxChars;
|
|
48
|
-
declare const BOX_BOLD: BoxChars;
|
|
49
|
-
/**
|
|
50
|
-
* ASCII box characters (works in all terminals).
|
|
51
|
-
*/
|
|
52
|
-
declare const BOX_ASCII: BoxChars;
|
|
53
|
-
/**
|
|
54
|
-
* Dashed box characters.
|
|
55
|
-
*/
|
|
56
|
-
declare const BOX_DASHED: BoxChars;
|
|
57
|
-
/**
|
|
58
|
-
* Interface for a renderable cell buffer.
|
|
59
|
-
* Any object implementing this interface can be used with renderBox.
|
|
60
|
-
*/
|
|
61
|
-
interface CellBuffer {
|
|
62
|
-
/** Width of the buffer in cells */
|
|
63
|
-
readonly width: number;
|
|
64
|
-
/** Height of the buffer in cells */
|
|
65
|
-
readonly height: number;
|
|
66
|
-
/**
|
|
67
|
-
* Set a cell's character and colors.
|
|
68
|
-
* @param x - Column (0-indexed)
|
|
69
|
-
* @param y - Row (0-indexed)
|
|
70
|
-
* @param char - Character to display
|
|
71
|
-
* @param fg - Foreground color (optional)
|
|
72
|
-
* @param bg - Background color (optional)
|
|
73
|
-
*/
|
|
74
|
-
setCell(x: number, y: number, char: string, fg?: number, bg?: number): void;
|
|
75
|
-
}
|
|
76
|
-
/**
|
|
77
|
-
* Simple in-memory cell buffer for testing and rendering.
|
|
78
|
-
*/
|
|
79
|
-
interface Cell {
|
|
80
|
-
char: string;
|
|
81
|
-
fg: number;
|
|
82
|
-
bg: number;
|
|
83
|
-
}
|
|
84
|
-
/**
|
|
85
|
-
* Creates a simple cell buffer.
|
|
86
|
-
*
|
|
87
|
-
* @param width - Buffer width in cells
|
|
88
|
-
* @param height - Buffer height in cells
|
|
89
|
-
* @param defaultFg - Default foreground color (default: 0xffffffff white)
|
|
90
|
-
* @param defaultBg - Default background color (default: 0x00000000 transparent)
|
|
91
|
-
* @returns A CellBuffer instance
|
|
92
|
-
*
|
|
93
|
-
* @example
|
|
94
|
-
* ```typescript
|
|
95
|
-
* import { createCellBuffer, renderBox, BOX_SINGLE } from 'blecsd';
|
|
96
|
-
*
|
|
97
|
-
* const buffer = createCellBuffer(80, 24);
|
|
98
|
-
* renderBox(buffer, 5, 2, 20, 10, BOX_SINGLE);
|
|
99
|
-
* ```
|
|
100
|
-
*/
|
|
101
|
-
declare function createCellBuffer(width: number, height: number, defaultFg?: number, defaultBg?: number): CellBuffer & {
|
|
102
|
-
cells: Cell[][];
|
|
103
|
-
};
|
|
104
|
-
/**
|
|
105
|
-
* Options for rendering a box.
|
|
106
|
-
*/
|
|
107
|
-
interface RenderBoxOptions {
|
|
108
|
-
/** Foreground color for the border (optional) */
|
|
109
|
-
fg?: number;
|
|
110
|
-
/** Background color for the border (optional) */
|
|
111
|
-
bg?: number;
|
|
112
|
-
/** Fill the interior with background color (default: false) */
|
|
113
|
-
fill?: boolean;
|
|
114
|
-
/** Fill character for interior (default: ' ') */
|
|
115
|
-
fillChar?: string;
|
|
116
|
-
}
|
|
117
|
-
/**
|
|
118
|
-
* Renders a box to a cell buffer.
|
|
119
|
-
*
|
|
120
|
-
* Draws border characters around the specified rectangle.
|
|
121
|
-
* Minimum size is 1x1 (just corners).
|
|
122
|
-
*
|
|
123
|
-
* @param buffer - The cell buffer to render to
|
|
124
|
-
* @param x - Left column (0-indexed)
|
|
125
|
-
* @param y - Top row (0-indexed)
|
|
126
|
-
* @param width - Box width (including borders)
|
|
127
|
-
* @param height - Box height (including borders)
|
|
128
|
-
* @param chars - Box characters to use
|
|
129
|
-
* @param options - Rendering options
|
|
130
|
-
*
|
|
131
|
-
* @example
|
|
132
|
-
* ```typescript
|
|
133
|
-
* import { createCellBuffer, renderBox, BOX_ROUNDED } from 'blecsd';
|
|
134
|
-
*
|
|
135
|
-
* const buffer = createCellBuffer(80, 24);
|
|
136
|
-
*
|
|
137
|
-
* // Draw a simple box
|
|
138
|
-
* renderBox(buffer, 5, 2, 20, 10, BOX_ROUNDED);
|
|
139
|
-
*
|
|
140
|
-
* // Draw with colors
|
|
141
|
-
* renderBox(buffer, 30, 2, 20, 10, BOX_DOUBLE, {
|
|
142
|
-
* fg: 0x00ff00ff, // Green
|
|
143
|
-
* fill: true
|
|
144
|
-
* });
|
|
145
|
-
* ```
|
|
146
|
-
*/
|
|
147
|
-
declare function renderBox(buffer: CellBuffer, x: number, y: number, width: number, height: number, chars: BoxChars, options?: RenderBoxOptions): void;
|
|
148
|
-
/**
|
|
149
|
-
* Renders a horizontal line to a cell buffer.
|
|
150
|
-
*
|
|
151
|
-
* @param buffer - The cell buffer to render to
|
|
152
|
-
* @param x - Starting column (0-indexed)
|
|
153
|
-
* @param y - Row (0-indexed)
|
|
154
|
-
* @param length - Line length
|
|
155
|
-
* @param char - Character to use (default: horizontal box char)
|
|
156
|
-
* @param fg - Foreground color (optional)
|
|
157
|
-
* @param bg - Background color (optional)
|
|
158
|
-
*
|
|
159
|
-
* @example
|
|
160
|
-
* ```typescript
|
|
161
|
-
* import { createCellBuffer, renderHLine, BOX_SINGLE } from 'blecsd';
|
|
162
|
-
*
|
|
163
|
-
* const buffer = createCellBuffer(80, 24);
|
|
164
|
-
* renderHLine(buffer, 5, 10, 20, BOX_SINGLE.horizontal);
|
|
165
|
-
* ```
|
|
166
|
-
*/
|
|
167
|
-
declare function renderHLine(buffer: CellBuffer, x: number, y: number, length: number, char?: string, fg?: number, bg?: number): void;
|
|
168
|
-
/**
|
|
169
|
-
* Renders a vertical line to a cell buffer.
|
|
170
|
-
*
|
|
171
|
-
* @param buffer - The cell buffer to render to
|
|
172
|
-
* @param x - Column (0-indexed)
|
|
173
|
-
* @param y - Starting row (0-indexed)
|
|
174
|
-
* @param length - Line length
|
|
175
|
-
* @param char - Character to use (default: vertical box char)
|
|
176
|
-
* @param fg - Foreground color (optional)
|
|
177
|
-
* @param bg - Background color (optional)
|
|
178
|
-
*
|
|
179
|
-
* @example
|
|
180
|
-
* ```typescript
|
|
181
|
-
* import { createCellBuffer, renderVLine, BOX_SINGLE } from 'blecsd';
|
|
182
|
-
*
|
|
183
|
-
* const buffer = createCellBuffer(80, 24);
|
|
184
|
-
* renderVLine(buffer, 10, 5, 10, BOX_SINGLE.vertical);
|
|
185
|
-
* ```
|
|
186
|
-
*/
|
|
187
|
-
declare function renderVLine(buffer: CellBuffer, x: number, y: number, length: number, char?: string, fg?: number, bg?: number): void;
|
|
188
|
-
/**
|
|
189
|
-
* Fills a rectangular region with a character.
|
|
190
|
-
*
|
|
191
|
-
* @param buffer - The cell buffer to render to
|
|
192
|
-
* @param x - Left column (0-indexed)
|
|
193
|
-
* @param y - Top row (0-indexed)
|
|
194
|
-
* @param width - Region width
|
|
195
|
-
* @param height - Region height
|
|
196
|
-
* @param char - Fill character (default: ' ')
|
|
197
|
-
* @param fg - Foreground color (optional)
|
|
198
|
-
* @param bg - Background color (optional)
|
|
199
|
-
*
|
|
200
|
-
* @example
|
|
201
|
-
* ```typescript
|
|
202
|
-
* import { createCellBuffer, fillRect } from 'blecsd';
|
|
203
|
-
*
|
|
204
|
-
* const buffer = createCellBuffer(80, 24);
|
|
205
|
-
* fillRect(buffer, 5, 2, 20, 10, ' ', 0xffffffff, 0x0000aaff);
|
|
206
|
-
* ```
|
|
207
|
-
*/
|
|
208
|
-
declare function fillRect(buffer: CellBuffer, x: number, y: number, width: number, height: number, char?: string, fg?: number, bg?: number): void;
|
|
209
|
-
/**
|
|
210
|
-
* Renders text to a cell buffer.
|
|
211
|
-
*
|
|
212
|
-
* @param buffer - The cell buffer to render to
|
|
213
|
-
* @param x - Starting column (0-indexed)
|
|
214
|
-
* @param y - Row (0-indexed)
|
|
215
|
-
* @param text - Text to render
|
|
216
|
-
* @param fg - Foreground color (optional)
|
|
217
|
-
* @param bg - Background color (optional)
|
|
218
|
-
*
|
|
219
|
-
* @example
|
|
220
|
-
* ```typescript
|
|
221
|
-
* import { createCellBuffer, renderText } from 'blecsd';
|
|
222
|
-
*
|
|
223
|
-
* const buffer = createCellBuffer(80, 24);
|
|
224
|
-
* renderText(buffer, 10, 5, 'Hello, World!');
|
|
225
|
-
* ```
|
|
226
|
-
*/
|
|
227
|
-
declare function renderText(buffer: CellBuffer, x: number, y: number, text: string, fg?: number, bg?: number): void;
|
|
228
|
-
/**
|
|
229
|
-
* Converts a cell buffer to a string representation.
|
|
230
|
-
* Useful for testing and debugging.
|
|
231
|
-
*
|
|
232
|
-
* @param buffer - The cell buffer with cells property
|
|
233
|
-
* @returns String representation of the buffer
|
|
234
|
-
*
|
|
235
|
-
* @example
|
|
236
|
-
* ```typescript
|
|
237
|
-
* import { createCellBuffer, renderBox, BOX_SINGLE, bufferToString } from 'blecsd';
|
|
238
|
-
*
|
|
239
|
-
* const buffer = createCellBuffer(10, 5);
|
|
240
|
-
* renderBox(buffer, 0, 0, 10, 5, BOX_SINGLE);
|
|
241
|
-
* console.log(bufferToString(buffer));
|
|
242
|
-
* // Output:
|
|
243
|
-
* // ┌────────┐
|
|
244
|
-
* // │ │
|
|
245
|
-
* // │ │
|
|
246
|
-
* // │ │
|
|
247
|
-
* // └────────┘
|
|
248
|
-
* ```
|
|
249
|
-
*/
|
|
250
|
-
declare function bufferToString$1(buffer: CellBuffer & {
|
|
251
|
-
cells: Cell[][];
|
|
252
|
-
}): string;
|
|
253
|
-
|
|
254
18
|
/**
|
|
255
19
|
* Text buffer change coalescing.
|
|
256
20
|
*
|
|
@@ -937,50 +701,6 @@ declare function getDiffStats(result: DiffResult): {
|
|
|
937
701
|
collapsedChunks: number;
|
|
938
702
|
};
|
|
939
703
|
|
|
940
|
-
/**
|
|
941
|
-
* Codepage character mapping tables.
|
|
942
|
-
*
|
|
943
|
-
* Each codepage maps byte values (0-255) to their corresponding UTF-8 characters.
|
|
944
|
-
* Bytes 0x00-0x7F are standard ASCII for all codepages.
|
|
945
|
-
*
|
|
946
|
-
* @module utils/encoding/codepages
|
|
947
|
-
*/
|
|
948
|
-
/**
|
|
949
|
-
* CP437 (IBM PC / DOS) extended character set.
|
|
950
|
-
*
|
|
951
|
-
* The high bytes (0x80-0xFF) contain box-drawing characters, block elements,
|
|
952
|
-
* mathematical symbols, and Greek letters commonly used in DOS applications
|
|
953
|
-
* and ANSI art.
|
|
954
|
-
*
|
|
955
|
-
* @see https://en.wikipedia.org/wiki/Code_page_437
|
|
956
|
-
*/
|
|
957
|
-
declare const CP437_HIGH_BYTES: readonly string[];
|
|
958
|
-
/**
|
|
959
|
-
* CP437 control character symbols (0x00-0x1F).
|
|
960
|
-
*
|
|
961
|
-
* In CP437, these bytes can display as special symbols rather than control codes.
|
|
962
|
-
*/
|
|
963
|
-
declare const CP437_CONTROL_CHARS: readonly string[];
|
|
964
|
-
/**
|
|
965
|
-
* CP850 (DOS Latin-1) extended character set.
|
|
966
|
-
*
|
|
967
|
-
* Similar to CP437 but with more accented Latin characters and fewer
|
|
968
|
-
* box-drawing/Greek characters.
|
|
969
|
-
*/
|
|
970
|
-
declare const CP850_HIGH_BYTES: readonly string[];
|
|
971
|
-
/**
|
|
972
|
-
* CP866 (DOS Cyrillic) extended character set.
|
|
973
|
-
*
|
|
974
|
-
* Provides Cyrillic characters for Russian and other Slavic languages.
|
|
975
|
-
*/
|
|
976
|
-
declare const CP866_HIGH_BYTES: readonly string[];
|
|
977
|
-
/**
|
|
978
|
-
* CP1252 (Windows Latin-1) extended character set.
|
|
979
|
-
*
|
|
980
|
-
* Windows Western European codepage. More standardized than DOS codepages.
|
|
981
|
-
*/
|
|
982
|
-
declare const CP1252_HIGH_BYTES: readonly string[];
|
|
983
|
-
|
|
984
704
|
/**
|
|
985
705
|
* Legacy codepage encoding utilities.
|
|
986
706
|
*
|
|
@@ -1031,9 +751,9 @@ type CodePage = z.infer<typeof CodePageSchema>;
|
|
|
1031
751
|
* - `error`: Throw an error on unmappable characters
|
|
1032
752
|
*/
|
|
1033
753
|
declare const UnmappableModeSchema: z.ZodEnum<{
|
|
1034
|
-
error: "error";
|
|
1035
|
-
skip: "skip";
|
|
1036
754
|
replace: "replace";
|
|
755
|
+
skip: "skip";
|
|
756
|
+
error: "error";
|
|
1037
757
|
}>;
|
|
1038
758
|
/**
|
|
1039
759
|
* Unmappable character handling mode type.
|
|
@@ -1050,9 +770,9 @@ declare const ConversionOptionsSchema: z.ZodObject<{
|
|
|
1050
770
|
cp1252: "cp1252";
|
|
1051
771
|
}>;
|
|
1052
772
|
unmappable: z.ZodDefault<z.ZodEnum<{
|
|
1053
|
-
error: "error";
|
|
1054
|
-
skip: "skip";
|
|
1055
773
|
replace: "replace";
|
|
774
|
+
skip: "skip";
|
|
775
|
+
error: "error";
|
|
1056
776
|
}>>;
|
|
1057
777
|
replacement: z.ZodDefault<z.ZodString>;
|
|
1058
778
|
interpretControlChars: z.ZodDefault<z.ZodBoolean>;
|
|
@@ -1217,29 +937,6 @@ declare function getSupportedCodePages(): readonly CodePage[];
|
|
|
1217
937
|
*/
|
|
1218
938
|
declare function getCodePageMap(codepage: CodePage, options?: PartialConversionOptions): readonly string[];
|
|
1219
939
|
|
|
1220
|
-
declare const index_CP1252_HIGH_BYTES: typeof CP1252_HIGH_BYTES;
|
|
1221
|
-
declare const index_CP437_CONTROL_CHARS: typeof CP437_CONTROL_CHARS;
|
|
1222
|
-
declare const index_CP437_HIGH_BYTES: typeof CP437_HIGH_BYTES;
|
|
1223
|
-
declare const index_CP850_HIGH_BYTES: typeof CP850_HIGH_BYTES;
|
|
1224
|
-
declare const index_CP866_HIGH_BYTES: typeof CP866_HIGH_BYTES;
|
|
1225
|
-
type index_CodePage = CodePage;
|
|
1226
|
-
declare const index_CodePageSchema: typeof CodePageSchema;
|
|
1227
|
-
type index_ConversionOptions = ConversionOptions;
|
|
1228
|
-
declare const index_ConversionOptionsSchema: typeof ConversionOptionsSchema;
|
|
1229
|
-
type index_PartialConversionOptions = PartialConversionOptions;
|
|
1230
|
-
type index_UnmappableMode = UnmappableMode;
|
|
1231
|
-
declare const index_UnmappableModeSchema: typeof UnmappableModeSchema;
|
|
1232
|
-
declare const index_bufferToString: typeof bufferToString;
|
|
1233
|
-
declare const index_byteToChar: typeof byteToChar;
|
|
1234
|
-
declare const index_charToByte: typeof charToByte;
|
|
1235
|
-
declare const index_getCodePageMap: typeof getCodePageMap;
|
|
1236
|
-
declare const index_getSupportedCodePages: typeof getSupportedCodePages;
|
|
1237
|
-
declare const index_isCodePageSupported: typeof isCodePageSupported;
|
|
1238
|
-
declare const index_stringToBuffer: typeof stringToBuffer;
|
|
1239
|
-
declare namespace index {
|
|
1240
|
-
export { index_CP1252_HIGH_BYTES as CP1252_HIGH_BYTES, index_CP437_CONTROL_CHARS as CP437_CONTROL_CHARS, index_CP437_HIGH_BYTES as CP437_HIGH_BYTES, index_CP850_HIGH_BYTES as CP850_HIGH_BYTES, index_CP866_HIGH_BYTES as CP866_HIGH_BYTES, type index_CodePage as CodePage, index_CodePageSchema as CodePageSchema, type index_ConversionOptions as ConversionOptions, index_ConversionOptionsSchema as ConversionOptionsSchema, type index_PartialConversionOptions as PartialConversionOptions, type index_UnmappableMode as UnmappableMode, index_UnmappableModeSchema as UnmappableModeSchema, index_bufferToString as bufferToString, index_byteToChar as byteToChar, index_charToByte as charToByte, index_getCodePageMap as getCodePageMap, index_getSupportedCodePages as getSupportedCodePages, index_isCodePageSupported as isCodePageSupported, index_stringToBuffer as stringToBuffer };
|
|
1241
|
-
}
|
|
1242
|
-
|
|
1243
940
|
/**
|
|
1244
941
|
* Fast Word Wrap with Caching
|
|
1245
942
|
*
|
|
@@ -1824,7 +1521,7 @@ declare function fuzzyMatch(query: string, text: string, options?: FuzzyOptions)
|
|
|
1824
1521
|
* // ]
|
|
1825
1522
|
* ```
|
|
1826
1523
|
*/
|
|
1827
|
-
declare function fuzzySearch(query: string, items: readonly string[], options?: FuzzyOptions): FuzzyMatch<string>[];
|
|
1524
|
+
declare function fuzzySearch$1(query: string, items: readonly string[], options?: FuzzyOptions): FuzzyMatch<string>[];
|
|
1828
1525
|
/**
|
|
1829
1526
|
* Performs fuzzy search on an array of objects.
|
|
1830
1527
|
*
|
|
@@ -2517,12 +2214,9 @@ declare function gutterWidthChanged(oldTotal: number, newTotal: number, minWidth
|
|
|
2517
2214
|
declare function renderGutterBlock(result: GutterResult, currentHighlight: string, normalStyle: string, reset?: string): readonly string[];
|
|
2518
2215
|
|
|
2519
2216
|
/**
|
|
2520
|
-
*
|
|
2521
|
-
*
|
|
2522
|
-
* Line-based tokenization with state tracking for efficient re-highlighting.
|
|
2523
|
-
* Only changed lines and affected multi-line constructs are re-processed.
|
|
2217
|
+
* Type definitions for syntax highlighting.
|
|
2524
2218
|
*
|
|
2525
|
-
* @module utils/syntaxHighlight
|
|
2219
|
+
* @module utils/syntaxHighlight/types
|
|
2526
2220
|
*/
|
|
2527
2221
|
/**
|
|
2528
2222
|
* Token types for syntax highlighting.
|
|
@@ -2618,40 +2312,13 @@ interface HighlightStats {
|
|
|
2618
2312
|
readonly lineCount: number;
|
|
2619
2313
|
readonly fullInvalidate: boolean;
|
|
2620
2314
|
}
|
|
2621
|
-
|
|
2622
|
-
declare const DEFAULT_HIGHLIGHT_BATCH = 100;
|
|
2623
|
-
/** Initial empty line state */
|
|
2624
|
-
declare const EMPTY_STATE: LineState;
|
|
2625
|
-
/**
|
|
2626
|
-
* JavaScript/TypeScript grammar.
|
|
2627
|
-
*/
|
|
2628
|
-
declare const GRAMMAR_JAVASCRIPT: Grammar;
|
|
2629
|
-
/**
|
|
2630
|
-
* Python grammar.
|
|
2631
|
-
*/
|
|
2632
|
-
declare const GRAMMAR_PYTHON: Grammar;
|
|
2633
|
-
/**
|
|
2634
|
-
* Rust grammar.
|
|
2635
|
-
*/
|
|
2636
|
-
declare const GRAMMAR_RUST: Grammar;
|
|
2637
|
-
/**
|
|
2638
|
-
* Go grammar.
|
|
2639
|
-
*/
|
|
2640
|
-
declare const GRAMMAR_GO: Grammar;
|
|
2641
|
-
/**
|
|
2642
|
-
* Shell/Bash grammar.
|
|
2643
|
-
*/
|
|
2644
|
-
declare const GRAMMAR_SHELL: Grammar;
|
|
2645
|
-
/**
|
|
2646
|
-
* JSON grammar.
|
|
2647
|
-
*/
|
|
2648
|
-
declare const GRAMMAR_JSON: Grammar;
|
|
2315
|
+
|
|
2649
2316
|
/**
|
|
2650
|
-
*
|
|
2317
|
+
* Cache management for syntax highlighting.
|
|
2318
|
+
*
|
|
2319
|
+
* @module utils/syntaxHighlight/cache
|
|
2651
2320
|
*/
|
|
2652
|
-
|
|
2653
|
-
/** All available grammars */
|
|
2654
|
-
declare const GRAMMARS: readonly Grammar[];
|
|
2321
|
+
|
|
2655
2322
|
/**
|
|
2656
2323
|
* Creates a new highlight cache.
|
|
2657
2324
|
*
|
|
@@ -2700,15 +2367,75 @@ declare function invalidateLine(cache: HighlightCache, line: number): void;
|
|
|
2700
2367
|
* @param cache - The cache to update
|
|
2701
2368
|
*/
|
|
2702
2369
|
declare function invalidateAllLines(cache: HighlightCache): void;
|
|
2370
|
+
|
|
2703
2371
|
/**
|
|
2704
|
-
*
|
|
2372
|
+
* Constants for syntax highlighting.
|
|
2705
2373
|
*
|
|
2706
|
-
* @
|
|
2707
|
-
* @param line - The line text
|
|
2708
|
-
* @param startState - The state at the start of the line
|
|
2709
|
-
* @returns The line entry with tokens and end state
|
|
2374
|
+
* @module utils/syntaxHighlight/constants
|
|
2710
2375
|
*/
|
|
2711
|
-
|
|
2376
|
+
|
|
2377
|
+
/** Default batch size for background highlighting */
|
|
2378
|
+
declare const DEFAULT_HIGHLIGHT_BATCH = 100;
|
|
2379
|
+
/** Initial empty line state */
|
|
2380
|
+
declare const EMPTY_STATE: LineState;
|
|
2381
|
+
|
|
2382
|
+
/**
|
|
2383
|
+
* Language grammar definitions for syntax highlighting.
|
|
2384
|
+
*
|
|
2385
|
+
* @module utils/syntaxHighlight/grammars
|
|
2386
|
+
*/
|
|
2387
|
+
|
|
2388
|
+
/**
|
|
2389
|
+
* JavaScript/TypeScript grammar.
|
|
2390
|
+
*/
|
|
2391
|
+
declare const GRAMMAR_SHELL: Grammar;
|
|
2392
|
+
/**
|
|
2393
|
+
* JSON grammar.
|
|
2394
|
+
*/
|
|
2395
|
+
declare const GRAMMAR_JSON: Grammar;
|
|
2396
|
+
/**
|
|
2397
|
+
* Plain text (no highlighting).
|
|
2398
|
+
*/
|
|
2399
|
+
declare const GRAMMAR_PLAINTEXT: Grammar;
|
|
2400
|
+
/** All available grammars */
|
|
2401
|
+
declare const GRAMMARS: readonly Grammar[];
|
|
2402
|
+
|
|
2403
|
+
/**
|
|
2404
|
+
* Language grammar definitions for syntax highlighting.
|
|
2405
|
+
*
|
|
2406
|
+
* @module utils/syntaxHighlight/grammars
|
|
2407
|
+
*/
|
|
2408
|
+
|
|
2409
|
+
/**
|
|
2410
|
+
* JavaScript/TypeScript grammar.
|
|
2411
|
+
*/
|
|
2412
|
+
declare const GRAMMAR_RUST: Grammar;
|
|
2413
|
+
/**
|
|
2414
|
+
* Go grammar.
|
|
2415
|
+
*/
|
|
2416
|
+
declare const GRAMMAR_GO: Grammar;
|
|
2417
|
+
|
|
2418
|
+
/**
|
|
2419
|
+
* Language grammar definitions for syntax highlighting.
|
|
2420
|
+
*
|
|
2421
|
+
* @module utils/syntaxHighlight/grammars
|
|
2422
|
+
*/
|
|
2423
|
+
|
|
2424
|
+
/**
|
|
2425
|
+
* JavaScript/TypeScript grammar.
|
|
2426
|
+
*/
|
|
2427
|
+
declare const GRAMMAR_JAVASCRIPT: Grammar;
|
|
2428
|
+
/**
|
|
2429
|
+
* Python grammar.
|
|
2430
|
+
*/
|
|
2431
|
+
declare const GRAMMAR_PYTHON: Grammar;
|
|
2432
|
+
|
|
2433
|
+
/**
|
|
2434
|
+
* Highlighting and language detection logic.
|
|
2435
|
+
*
|
|
2436
|
+
* @module utils/syntaxHighlight/highlighter
|
|
2437
|
+
*/
|
|
2438
|
+
|
|
2712
2439
|
/**
|
|
2713
2440
|
* Highlights text and caches the results.
|
|
2714
2441
|
*
|
|
@@ -2759,6 +2486,22 @@ declare function detectLanguageFromContent(content: string): Grammar;
|
|
|
2759
2486
|
*/
|
|
2760
2487
|
declare function getGrammarByName(name: string): Grammar;
|
|
2761
2488
|
|
|
2489
|
+
/**
|
|
2490
|
+
* Tokenization logic for syntax highlighting.
|
|
2491
|
+
*
|
|
2492
|
+
* @module utils/syntaxHighlight/tokenizer
|
|
2493
|
+
*/
|
|
2494
|
+
|
|
2495
|
+
/**
|
|
2496
|
+
* Tokenizes a single line.
|
|
2497
|
+
*
|
|
2498
|
+
* @param grammar - The grammar to use
|
|
2499
|
+
* @param line - The line text
|
|
2500
|
+
* @param startState - The state at the start of the line
|
|
2501
|
+
* @returns The line entry with tokens and end state
|
|
2502
|
+
*/
|
|
2503
|
+
declare function tokenizeLine(grammar: Grammar, line: string, startState: LineState): LineEntry;
|
|
2504
|
+
|
|
2762
2505
|
/**
|
|
2763
2506
|
* Efficient Markdown Rendering
|
|
2764
2507
|
*
|
|
@@ -2969,377 +2712,477 @@ interface MarkdownStats {
|
|
|
2969
2712
|
*/
|
|
2970
2713
|
declare function getMarkdownStats(result: MarkdownParseResult): MarkdownStats;
|
|
2971
2714
|
|
|
2715
|
+
declare const boxRender: Readonly<{
|
|
2716
|
+
renderBox: typeof renderBox;
|
|
2717
|
+
renderHLine: typeof renderHLine;
|
|
2718
|
+
renderVLine: typeof renderVLine;
|
|
2719
|
+
renderText: typeof renderText;
|
|
2720
|
+
createCellBuffer: typeof createCellBuffer;
|
|
2721
|
+
bufferToString: typeof bufferToString$1;
|
|
2722
|
+
boxFillRect: typeof boxFillRect;
|
|
2723
|
+
charsetToBoxChars: typeof charsetToBoxChars;
|
|
2724
|
+
BOX_ASCII: BoxChars;
|
|
2725
|
+
BOX_BOLD: BoxChars;
|
|
2726
|
+
BOX_DASHED: BoxChars;
|
|
2727
|
+
BOX_DOUBLE: BoxChars;
|
|
2728
|
+
BOX_ROUNDED: BoxChars;
|
|
2729
|
+
BOX_SINGLE: BoxChars;
|
|
2730
|
+
}>;
|
|
2731
|
+
type BoxRenderModule = typeof boxRender;
|
|
2732
|
+
|
|
2972
2733
|
/**
|
|
2973
|
-
*
|
|
2974
|
-
*
|
|
2975
|
-
* A rope is a binary tree where leaf nodes contain text strings and internal
|
|
2976
|
-
* nodes contain the total length of text in their left subtree. This allows
|
|
2977
|
-
* for O(log n) insert, delete, and index operations.
|
|
2978
|
-
*
|
|
2979
|
-
* @module utils/rope
|
|
2980
|
-
*
|
|
2981
|
-
* @example
|
|
2982
|
-
* ```typescript
|
|
2983
|
-
* import { createRope, insert, deleteRange, getLine, getText } from 'blecsd';
|
|
2984
|
-
*
|
|
2985
|
-
* // Create a rope from text
|
|
2986
|
-
* let rope = createRope('Hello, World!');
|
|
2987
|
-
*
|
|
2988
|
-
* // Insert at position
|
|
2989
|
-
* rope = insert(rope, 7, 'Beautiful ');
|
|
2990
|
-
* // Result: "Hello, Beautiful World!"
|
|
2991
|
-
*
|
|
2992
|
-
* // Delete a range
|
|
2993
|
-
* rope = deleteRange(rope, 0, 7);
|
|
2994
|
-
* // Result: "Beautiful World!"
|
|
2995
|
-
*
|
|
2996
|
-
* // Get specific line
|
|
2997
|
-
* const line = getLine(rope, 0);
|
|
2998
|
-
* ```
|
|
2999
|
-
*/
|
|
3000
|
-
/**
|
|
3001
|
-
* Maximum characters in a leaf node.
|
|
3002
|
-
* Smaller values give better balance but more nodes.
|
|
3003
|
-
* Larger values reduce overhead but slower operations.
|
|
3004
|
-
*/
|
|
3005
|
-
declare const LEAF_MAX_SIZE = 512;
|
|
3006
|
-
/**
|
|
3007
|
-
* Minimum characters in a leaf node before merging.
|
|
3008
|
-
*/
|
|
3009
|
-
declare const LEAF_MIN_SIZE = 256;
|
|
3010
|
-
/**
|
|
3011
|
-
* Maximum depth before forcing rebalance.
|
|
3012
|
-
*/
|
|
3013
|
-
declare const MAX_DEPTH = 48;
|
|
3014
|
-
/**
|
|
3015
|
-
* A leaf node containing actual text content.
|
|
3016
|
-
*/
|
|
3017
|
-
interface RopeLeaf {
|
|
3018
|
-
readonly type: 'leaf';
|
|
3019
|
-
/** The text content of this leaf */
|
|
3020
|
-
readonly text: string;
|
|
3021
|
-
/** Total number of characters */
|
|
3022
|
-
readonly length: number;
|
|
3023
|
-
/** Number of newlines in this leaf */
|
|
3024
|
-
readonly newlines: number;
|
|
3025
|
-
/** Line break positions within this leaf (relative to start) */
|
|
3026
|
-
readonly lineBreaks: readonly number[];
|
|
3027
|
-
}
|
|
3028
|
-
/**
|
|
3029
|
-
* An internal node containing two subtrees.
|
|
3030
|
-
*/
|
|
3031
|
-
interface RopeNode {
|
|
3032
|
-
readonly type: 'node';
|
|
3033
|
-
/** Left subtree */
|
|
3034
|
-
readonly left: Rope;
|
|
3035
|
-
/** Right subtree */
|
|
3036
|
-
readonly right: Rope;
|
|
3037
|
-
/** Total length of left subtree (weight) */
|
|
3038
|
-
readonly leftLength: number;
|
|
3039
|
-
/** Total length of entire subtree */
|
|
3040
|
-
readonly length: number;
|
|
3041
|
-
/** Total newlines in entire subtree */
|
|
3042
|
-
readonly newlines: number;
|
|
3043
|
-
/** Depth of tree from this node */
|
|
3044
|
-
readonly depth: number;
|
|
3045
|
-
}
|
|
3046
|
-
/**
|
|
3047
|
-
* A rope is either a leaf or an internal node.
|
|
3048
|
-
*/
|
|
3049
|
-
type Rope = RopeLeaf | RopeNode;
|
|
3050
|
-
/**
|
|
3051
|
-
* Line information returned by getLine.
|
|
3052
|
-
*/
|
|
3053
|
-
interface LineInfo {
|
|
3054
|
-
/** Line content (without newline) */
|
|
3055
|
-
readonly text: string;
|
|
3056
|
-
/** Start index in rope */
|
|
3057
|
-
readonly start: number;
|
|
3058
|
-
/** End index in rope (exclusive) */
|
|
3059
|
-
readonly end: number;
|
|
3060
|
-
/** Line number (0-based) */
|
|
3061
|
-
readonly lineNumber: number;
|
|
3062
|
-
}
|
|
3063
|
-
/**
|
|
3064
|
-
* Statistics about a rope.
|
|
3065
|
-
*/
|
|
3066
|
-
interface RopeStats {
|
|
3067
|
-
/** Total characters */
|
|
3068
|
-
readonly length: number;
|
|
3069
|
-
/** Total newlines */
|
|
3070
|
-
readonly newlines: number;
|
|
3071
|
-
/** Number of leaf nodes */
|
|
3072
|
-
readonly leafCount: number;
|
|
3073
|
-
/** Maximum depth */
|
|
3074
|
-
readonly depth: number;
|
|
3075
|
-
/** Average leaf size */
|
|
3076
|
-
readonly avgLeafSize: number;
|
|
3077
|
-
}
|
|
3078
|
-
/**
|
|
3079
|
-
* Creates a rope from a string.
|
|
3080
|
-
*
|
|
3081
|
-
* @param text - Initial text content
|
|
3082
|
-
* @returns A new Rope
|
|
2734
|
+
* Change coalescing utilities namespace.
|
|
3083
2735
|
*
|
|
3084
2736
|
* @example
|
|
3085
2737
|
* ```typescript
|
|
3086
|
-
* import {
|
|
2738
|
+
* import { changeCoalesce } from 'blecsd/utils';
|
|
3087
2739
|
*
|
|
3088
|
-
* const
|
|
2740
|
+
* const coalescer = changeCoalesce.createCoalescer({ debounceMs: 50 });
|
|
2741
|
+
* changeCoalesce.queueChange(coalescer, changeCoalesce.insertChange(10, 'hello'));
|
|
2742
|
+
* const result = changeCoalesce.flushChanges(coalescer);
|
|
3089
2743
|
* ```
|
|
3090
2744
|
*/
|
|
3091
|
-
|
|
3092
|
-
|
|
3093
|
-
|
|
3094
|
-
|
|
3095
|
-
|
|
3096
|
-
|
|
3097
|
-
|
|
2745
|
+
|
|
2746
|
+
declare const changeCoalesce: Readonly<{
|
|
2747
|
+
createCoalescer: typeof createCoalescer;
|
|
2748
|
+
queueChange: typeof queueChange;
|
|
2749
|
+
flushChanges: typeof flushChanges;
|
|
2750
|
+
insertChange: typeof insertChange;
|
|
2751
|
+
deleteChange: typeof deleteChange;
|
|
2752
|
+
replaceChange: typeof replaceChange;
|
|
2753
|
+
getCoalescingState: typeof getCoalescingState;
|
|
2754
|
+
destroyCoalescer: typeof destroyCoalescer;
|
|
2755
|
+
}>;
|
|
2756
|
+
type ChangeCoalesceModule = typeof changeCoalesce;
|
|
2757
|
+
|
|
3098
2758
|
/**
|
|
3099
|
-
*
|
|
3100
|
-
*
|
|
3101
|
-
* @param rope - The rope to measure
|
|
3102
|
-
* @returns Total character count
|
|
2759
|
+
* Color utilities namespace.
|
|
3103
2760
|
*
|
|
3104
2761
|
* @example
|
|
3105
2762
|
* ```typescript
|
|
3106
|
-
* import {
|
|
2763
|
+
* import { colors } from 'blecsd/utils';
|
|
3107
2764
|
*
|
|
3108
|
-
* const
|
|
3109
|
-
*
|
|
2765
|
+
* const hex = colors.colorToHex(255, 0, 0);
|
|
2766
|
+
* const color = colors.hexToColor('#ff0000');
|
|
2767
|
+
* const packed = colors.packColor(255, 0, 0);
|
|
3110
2768
|
* ```
|
|
3111
2769
|
*/
|
|
3112
|
-
|
|
3113
|
-
|
|
3114
|
-
|
|
3115
|
-
|
|
3116
|
-
|
|
3117
|
-
|
|
3118
|
-
|
|
3119
|
-
|
|
3120
|
-
|
|
3121
|
-
|
|
3122
|
-
*
|
|
3123
|
-
* @param rope - The rope to measure
|
|
3124
|
-
* @returns Line count
|
|
3125
|
-
*/
|
|
3126
|
-
declare function getLineCount(rope: Rope): number;
|
|
3127
|
-
/**
|
|
3128
|
-
* Checks if the rope is empty.
|
|
3129
|
-
*
|
|
3130
|
-
* @param rope - The rope to check
|
|
3131
|
-
* @returns true if empty
|
|
3132
|
-
*/
|
|
3133
|
-
declare function isEmpty(rope: Rope): boolean;
|
|
2770
|
+
|
|
2771
|
+
declare const colors: Readonly<{
|
|
2772
|
+
colorToHex: typeof colorToHex;
|
|
2773
|
+
hexToColor: typeof hexToColor;
|
|
2774
|
+
packColor: typeof packColor;
|
|
2775
|
+
unpackColor: typeof unpackColor;
|
|
2776
|
+
parseColor: typeof parseColor;
|
|
2777
|
+
}>;
|
|
2778
|
+
type ColorsModule = typeof colors;
|
|
2779
|
+
|
|
3134
2780
|
/**
|
|
3135
|
-
*
|
|
3136
|
-
*
|
|
3137
|
-
* @param rope - The rope to query
|
|
3138
|
-
* @param index - Character index (0-based)
|
|
3139
|
-
* @returns Character at index, or undefined if out of bounds
|
|
2781
|
+
* Component storage utilities namespace.
|
|
3140
2782
|
*
|
|
3141
2783
|
* @example
|
|
3142
2784
|
* ```typescript
|
|
3143
|
-
* import {
|
|
2785
|
+
* import { componentStore } from 'blecsd/utils';
|
|
3144
2786
|
*
|
|
3145
|
-
* const
|
|
3146
|
-
*
|
|
2787
|
+
* const store = componentStore.createComponentStore({ maxEntities: 10000 });
|
|
2788
|
+
* const sparse = componentStore.createSparseStore({ defaultValue: 0 });
|
|
2789
|
+
* const report = componentStore.getComponentMemoryReport(store);
|
|
3147
2790
|
* ```
|
|
3148
2791
|
*/
|
|
3149
|
-
|
|
2792
|
+
|
|
2793
|
+
declare const componentStore: Readonly<{
|
|
2794
|
+
createComponentStore: typeof createComponentStore;
|
|
2795
|
+
createSparseStore: typeof createSparseStore;
|
|
2796
|
+
createTypedArrayPool: typeof createTypedArrayPool;
|
|
2797
|
+
getComponentMemoryReport: typeof getComponentMemoryReport;
|
|
2798
|
+
estimateMemoryUsage: typeof estimateMemoryUsage;
|
|
2799
|
+
isWithinMemoryBounds: typeof isWithinMemoryBounds;
|
|
2800
|
+
}>;
|
|
2801
|
+
type ComponentStoreModule = typeof componentStore;
|
|
2802
|
+
|
|
3150
2803
|
/**
|
|
3151
|
-
*
|
|
3152
|
-
*
|
|
3153
|
-
* @param rope - The rope to query
|
|
3154
|
-
* @param start - Start index (inclusive)
|
|
3155
|
-
* @param end - End index (exclusive), defaults to end of rope
|
|
3156
|
-
* @returns Substring
|
|
2804
|
+
* Cursor navigation utilities namespace.
|
|
3157
2805
|
*
|
|
3158
2806
|
* @example
|
|
3159
2807
|
* ```typescript
|
|
3160
|
-
* import {
|
|
2808
|
+
* import { cursorNav } from 'blecsd/utils';
|
|
3161
2809
|
*
|
|
3162
|
-
* const
|
|
3163
|
-
*
|
|
2810
|
+
* const cursor = cursorNav.createCursor(0, 0);
|
|
2811
|
+
* const result = cursorNav.moveCursorDown(cursor, viewport, lineIndex);
|
|
2812
|
+
* cursorNav.goToLine(cursor, 10);
|
|
3164
2813
|
* ```
|
|
3165
2814
|
*/
|
|
3166
|
-
|
|
2815
|
+
|
|
2816
|
+
declare const cursorNav: Readonly<{
|
|
2817
|
+
createCursor: typeof createCursor;
|
|
2818
|
+
moveCursorUp: typeof moveCursorUp;
|
|
2819
|
+
moveCursorDown: typeof moveCursorDown;
|
|
2820
|
+
moveCursorLeft: typeof moveCursorLeft;
|
|
2821
|
+
moveCursorRight: typeof moveCursorRight;
|
|
2822
|
+
goToLine: typeof goToLine;
|
|
2823
|
+
goToStart: typeof goToStart;
|
|
2824
|
+
goToEnd: typeof goToEnd;
|
|
2825
|
+
pageUp: typeof pageUp;
|
|
2826
|
+
pageDown: typeof pageDown;
|
|
2827
|
+
clampCursor: typeof clampCursor;
|
|
2828
|
+
ensureCursorVisible: typeof ensureCursorVisible;
|
|
2829
|
+
createViewport: typeof createViewport;
|
|
2830
|
+
createNavConfig: typeof createNavConfig;
|
|
2831
|
+
buildLineIndex: typeof buildLineIndex;
|
|
2832
|
+
buildLineIndexFromLengths: typeof buildLineIndexFromLengths;
|
|
2833
|
+
lineForOffset: typeof lineForOffset;
|
|
2834
|
+
offsetForLine: typeof offsetForLine;
|
|
2835
|
+
}>;
|
|
2836
|
+
type CursorNavModule = typeof cursorNav;
|
|
2837
|
+
|
|
3167
2838
|
/**
|
|
3168
|
-
*
|
|
3169
|
-
*
|
|
3170
|
-
* @param rope - The rope to convert
|
|
3171
|
-
* @returns Full text content
|
|
2839
|
+
* Diff rendering utilities namespace.
|
|
3172
2840
|
*
|
|
3173
2841
|
* @example
|
|
3174
2842
|
* ```typescript
|
|
3175
|
-
* import {
|
|
2843
|
+
* import { diffRenderer } from 'blecsd/utils';
|
|
3176
2844
|
*
|
|
3177
|
-
* const
|
|
3178
|
-
*
|
|
2845
|
+
* const diff = diffRenderer.computeDiff(oldLines, newLines);
|
|
2846
|
+
* const cache = diffRenderer.createDiffCache();
|
|
2847
|
+
* const cached = diffRenderer.computeDiffCached(cache, oldLines, newLines);
|
|
2848
|
+
* const stats = diffRenderer.getDiffStats(diff);
|
|
3179
2849
|
* ```
|
|
3180
2850
|
*/
|
|
3181
|
-
|
|
2851
|
+
|
|
2852
|
+
declare const diffRenderer: Readonly<{
|
|
2853
|
+
computeDiff: typeof computeDiff;
|
|
2854
|
+
computeDiffCached: typeof computeDiffCached;
|
|
2855
|
+
getDiffStats: typeof getDiffStats;
|
|
2856
|
+
getSideBySideView: typeof getSideBySideView;
|
|
2857
|
+
parseUnifiedDiff: typeof parseUnifiedDiff;
|
|
2858
|
+
toUnifiedDiff: typeof toUnifiedDiff;
|
|
2859
|
+
createDiffCache: typeof createDiffCache;
|
|
2860
|
+
clearDiffCache: typeof clearDiffCache;
|
|
2861
|
+
collapseUnchanged: typeof collapseUnchanged;
|
|
2862
|
+
collapseChunk: typeof collapseChunk;
|
|
2863
|
+
expandChunk: typeof expandChunk;
|
|
2864
|
+
expandAll: typeof expandAll;
|
|
2865
|
+
toggleChunk: typeof toggleChunk;
|
|
2866
|
+
getVisibleDiffLines: typeof getVisibleDiffLines;
|
|
2867
|
+
getTotalLineCount: typeof getTotalLineCount$1;
|
|
2868
|
+
DEFAULT_CONTEXT: 3;
|
|
2869
|
+
DEFAULT_COLLAPSE_THRESHOLD: 10;
|
|
2870
|
+
}>;
|
|
2871
|
+
type DiffRendererModule = typeof diffRenderer;
|
|
2872
|
+
|
|
2873
|
+
declare const encoding: Readonly<{
|
|
2874
|
+
byteToChar: typeof byteToChar;
|
|
2875
|
+
charToByte: typeof charToByte;
|
|
2876
|
+
bufferToString: typeof bufferToString;
|
|
2877
|
+
stringToBuffer: typeof stringToBuffer;
|
|
2878
|
+
isCodePageSupported: typeof isCodePageSupported;
|
|
2879
|
+
getSupportedCodePages: typeof getSupportedCodePages;
|
|
2880
|
+
getCodePageMap: typeof getCodePageMap;
|
|
2881
|
+
CodePageSchema: zod.ZodEnum<{
|
|
2882
|
+
cp437: "cp437";
|
|
2883
|
+
cp850: "cp850";
|
|
2884
|
+
cp866: "cp866";
|
|
2885
|
+
cp1252: "cp1252";
|
|
2886
|
+
}>;
|
|
2887
|
+
UnmappableModeSchema: zod.ZodEnum<{
|
|
2888
|
+
replace: "replace";
|
|
2889
|
+
skip: "skip";
|
|
2890
|
+
error: "error";
|
|
2891
|
+
}>;
|
|
2892
|
+
ConversionOptionsSchema: zod.ZodObject<{
|
|
2893
|
+
codepage: zod.ZodEnum<{
|
|
2894
|
+
cp437: "cp437";
|
|
2895
|
+
cp850: "cp850";
|
|
2896
|
+
cp866: "cp866";
|
|
2897
|
+
cp1252: "cp1252";
|
|
2898
|
+
}>;
|
|
2899
|
+
unmappable: zod.ZodDefault<zod.ZodEnum<{
|
|
2900
|
+
replace: "replace";
|
|
2901
|
+
skip: "skip";
|
|
2902
|
+
error: "error";
|
|
2903
|
+
}>>;
|
|
2904
|
+
replacement: zod.ZodDefault<zod.ZodString>;
|
|
2905
|
+
interpretControlChars: zod.ZodDefault<zod.ZodBoolean>;
|
|
2906
|
+
}, zod_v4_core.$strict>;
|
|
2907
|
+
CP437_CONTROL_CHARS: readonly string[];
|
|
2908
|
+
CP437_HIGH_BYTES: readonly string[];
|
|
2909
|
+
CP850_HIGH_BYTES: readonly string[];
|
|
2910
|
+
CP866_HIGH_BYTES: readonly string[];
|
|
2911
|
+
CP1252_HIGH_BYTES: readonly string[];
|
|
2912
|
+
}>;
|
|
2913
|
+
type EncodingModule = typeof encoding;
|
|
2914
|
+
|
|
3182
2915
|
/**
|
|
3183
|
-
*
|
|
3184
|
-
*
|
|
3185
|
-
* @param rope - The rope to query
|
|
3186
|
-
* @param index - Character index
|
|
3187
|
-
* @returns Line number (0-based)
|
|
2916
|
+
* Fast word wrap utilities namespace with caching support.
|
|
3188
2917
|
*
|
|
3189
2918
|
* @example
|
|
3190
2919
|
* ```typescript
|
|
3191
|
-
* import {
|
|
2920
|
+
* import { fastWrap } from 'blecsd/utils';
|
|
3192
2921
|
*
|
|
3193
|
-
* const
|
|
3194
|
-
*
|
|
2922
|
+
* const cache = fastWrap.createWrapCache();
|
|
2923
|
+
* const result = fastWrap.wrapWithCache(cache, text, width);
|
|
2924
|
+
* const visible = fastWrap.wrapVisibleFirst(cache, text, width, startLine, endLine);
|
|
3195
2925
|
* ```
|
|
3196
2926
|
*/
|
|
3197
|
-
|
|
3198
|
-
|
|
3199
|
-
|
|
3200
|
-
|
|
3201
|
-
|
|
3202
|
-
|
|
3203
|
-
|
|
3204
|
-
|
|
3205
|
-
|
|
3206
|
-
|
|
3207
|
-
|
|
3208
|
-
|
|
3209
|
-
|
|
3210
|
-
|
|
3211
|
-
|
|
3212
|
-
|
|
3213
|
-
|
|
2927
|
+
|
|
2928
|
+
declare const fastWrap: Readonly<{
|
|
2929
|
+
wrapWithCache: typeof wrapWithCache;
|
|
2930
|
+
wrapVisibleFirst: typeof wrapVisibleFirst;
|
|
2931
|
+
continueWrap: typeof continueWrap;
|
|
2932
|
+
createWrapCache: typeof createWrapCache;
|
|
2933
|
+
clearWrapCache: typeof clearWrapCache;
|
|
2934
|
+
resizeWrapCache: typeof resizeWrapCache;
|
|
2935
|
+
invalidateAll: typeof invalidateAll;
|
|
2936
|
+
invalidateRange: typeof invalidateRange;
|
|
2937
|
+
invalidateParagraph: typeof invalidateParagraph;
|
|
2938
|
+
lineToPosition: typeof lineToPosition;
|
|
2939
|
+
positionToLine: typeof positionToLine;
|
|
2940
|
+
getWrapCacheStats: typeof getWrapCacheStats;
|
|
2941
|
+
DEFAULT_BATCH_SIZE: 100;
|
|
2942
|
+
MAX_PARAGRAPH_CHUNK: 1000;
|
|
2943
|
+
}>;
|
|
2944
|
+
type FastWrapModule = typeof fastWrap;
|
|
2945
|
+
|
|
3214
2946
|
/**
|
|
3215
|
-
*
|
|
3216
|
-
*
|
|
3217
|
-
* @param rope - The rope to query
|
|
3218
|
-
* @param lineNumber - Line number (0-based)
|
|
3219
|
-
* @returns Line info or undefined if out of bounds
|
|
2947
|
+
* Fold regions utilities namespace.
|
|
3220
2948
|
*
|
|
3221
2949
|
* @example
|
|
3222
2950
|
* ```typescript
|
|
3223
|
-
* import {
|
|
2951
|
+
* import { fold } from 'blecsd/utils';
|
|
3224
2952
|
*
|
|
3225
|
-
* const
|
|
3226
|
-
*
|
|
3227
|
-
*
|
|
2953
|
+
* const state = fold.createFoldState(100);
|
|
2954
|
+
* fold.addFoldRegion(state, { start: 10, end: 20, level: 0 });
|
|
2955
|
+
* fold.foldRegion(state, 0);
|
|
2956
|
+
* const visible = fold.getVisibleFoldLines(state, 0, 50);
|
|
3228
2957
|
* ```
|
|
3229
2958
|
*/
|
|
3230
|
-
|
|
2959
|
+
|
|
2960
|
+
declare const fold: Readonly<{
|
|
2961
|
+
createFoldState: typeof createFoldState;
|
|
2962
|
+
addFoldRegion: typeof addFoldRegion;
|
|
2963
|
+
removeFoldRegion: typeof removeFoldRegion;
|
|
2964
|
+
foldRegion: typeof foldRegion;
|
|
2965
|
+
unfoldRegion: typeof unfoldRegion;
|
|
2966
|
+
toggleFold: typeof toggleFold;
|
|
2967
|
+
foldAll: typeof foldAll;
|
|
2968
|
+
unfoldAll: typeof unfoldAll;
|
|
2969
|
+
foldAtDepth: typeof foldAtDepth;
|
|
2970
|
+
getVisibleFoldLines: typeof getVisibleFoldLines;
|
|
2971
|
+
getAllFoldRegions: typeof getAllFoldRegions;
|
|
2972
|
+
getFoldAtLine: typeof getFoldAtLine;
|
|
2973
|
+
getFoldStats: typeof getFoldStats;
|
|
2974
|
+
originalToVisibleLine: typeof originalToVisibleLine;
|
|
2975
|
+
visibleToOriginalLine: typeof visibleToOriginalLine;
|
|
2976
|
+
updateTotalLines: typeof updateTotalLines;
|
|
2977
|
+
}>;
|
|
2978
|
+
type FoldModule = typeof fold;
|
|
2979
|
+
|
|
2980
|
+
declare const fuzzySearch: Readonly<{
|
|
2981
|
+
fuzzyMatch: typeof fuzzyMatch;
|
|
2982
|
+
search: typeof fuzzySearch$1;
|
|
2983
|
+
fuzzyFilter: typeof fuzzyFilter;
|
|
2984
|
+
fuzzySearchBy: typeof fuzzySearchBy;
|
|
2985
|
+
fuzzyTest: typeof fuzzyTest;
|
|
2986
|
+
highlightMatch: typeof highlightMatch;
|
|
2987
|
+
FuzzyOptionsSchema: zod.ZodObject<{
|
|
2988
|
+
caseSensitive: zod.ZodDefault<zod.ZodBoolean>;
|
|
2989
|
+
threshold: zod.ZodDefault<zod.ZodNumber>;
|
|
2990
|
+
limit: zod.ZodOptional<zod.ZodNumber>;
|
|
2991
|
+
consecutiveBonus: zod.ZodDefault<zod.ZodNumber>;
|
|
2992
|
+
wordBoundaryBonus: zod.ZodDefault<zod.ZodNumber>;
|
|
2993
|
+
prefixBonus: zod.ZodDefault<zod.ZodNumber>;
|
|
2994
|
+
gapPenalty: zod.ZodDefault<zod.ZodNumber>;
|
|
2995
|
+
}, zod_v4_core.$strip>;
|
|
2996
|
+
}>;
|
|
2997
|
+
type FuzzySearchModule = typeof fuzzySearch;
|
|
2998
|
+
|
|
3231
2999
|
/**
|
|
3232
|
-
*
|
|
3233
|
-
*
|
|
3234
|
-
* @param rope - The rope to query
|
|
3235
|
-
* @param startLine - Start line (inclusive)
|
|
3236
|
-
* @param endLine - End line (exclusive)
|
|
3237
|
-
* @returns Array of line info
|
|
3000
|
+
* Line gutter utilities namespace.
|
|
3238
3001
|
*
|
|
3239
3002
|
* @example
|
|
3240
3003
|
* ```typescript
|
|
3241
|
-
* import {
|
|
3004
|
+
* import { gutter } from 'blecsd/utils';
|
|
3242
3005
|
*
|
|
3243
|
-
* const
|
|
3244
|
-
* const
|
|
3245
|
-
*
|
|
3006
|
+
* const config = gutter.createGutterConfig({ mode: 'absolute' });
|
|
3007
|
+
* const width = gutter.computeGutterWidth(100);
|
|
3008
|
+
* const result = gutter.computeVisibleGutter(config, 0, 50, 100);
|
|
3246
3009
|
* ```
|
|
3247
3010
|
*/
|
|
3248
|
-
|
|
3011
|
+
|
|
3012
|
+
declare const gutter: Readonly<{
|
|
3013
|
+
computeGutterWidth: typeof computeGutterWidth;
|
|
3014
|
+
computeVisibleGutter: typeof computeVisibleGutter;
|
|
3015
|
+
formatLineNumber: typeof formatLineNumber;
|
|
3016
|
+
renderGutterBlock: typeof renderGutterBlock;
|
|
3017
|
+
createGutterConfig: typeof createGutterConfig;
|
|
3018
|
+
computeDigitWidth: typeof computeDigitWidth;
|
|
3019
|
+
gutterWidthChanged: typeof gutterWidthChanged;
|
|
3020
|
+
}>;
|
|
3021
|
+
type GutterModule = typeof gutter;
|
|
3022
|
+
|
|
3249
3023
|
/**
|
|
3250
|
-
*
|
|
3251
|
-
*
|
|
3252
|
-
* @param rope - The rope to modify
|
|
3253
|
-
* @param index - Position to insert at
|
|
3254
|
-
* @param text - Text to insert
|
|
3255
|
-
* @returns New rope with text inserted
|
|
3024
|
+
* Helper utilities namespace for common operations.
|
|
3256
3025
|
*
|
|
3257
3026
|
* @example
|
|
3258
3027
|
* ```typescript
|
|
3259
|
-
* import {
|
|
3028
|
+
* import { helpers } from 'blecsd/utils';
|
|
3260
3029
|
*
|
|
3261
|
-
*
|
|
3262
|
-
*
|
|
3263
|
-
*
|
|
3030
|
+
* const grouped = helpers.groupBy(items, item => item.category);
|
|
3031
|
+
* const sorted = helpers.sortBy(items, item => item.priority);
|
|
3032
|
+
* const unique = helpers.unique([1, 2, 2, 3]);
|
|
3264
3033
|
* ```
|
|
3265
3034
|
*/
|
|
3266
|
-
|
|
3035
|
+
|
|
3036
|
+
declare const helpers: Readonly<{
|
|
3037
|
+
findFile: typeof findFile;
|
|
3038
|
+
findAllFiles: typeof findAllFiles;
|
|
3039
|
+
groupBy: typeof groupBy;
|
|
3040
|
+
merge: typeof merge;
|
|
3041
|
+
shallowMerge: typeof shallowMerge;
|
|
3042
|
+
partition: typeof partition;
|
|
3043
|
+
unique: typeof unique;
|
|
3044
|
+
uniqueBy: typeof uniqueBy;
|
|
3045
|
+
sortBy: typeof sortBy;
|
|
3046
|
+
sortByIndex: typeof sortByIndex;
|
|
3047
|
+
sortByName: typeof sortByName;
|
|
3048
|
+
sortByPriority: typeof sortByPriority;
|
|
3049
|
+
}>;
|
|
3050
|
+
type HelpersModule = typeof helpers;
|
|
3051
|
+
|
|
3267
3052
|
/**
|
|
3268
|
-
*
|
|
3269
|
-
*
|
|
3270
|
-
* @param rope - The rope to modify
|
|
3271
|
-
* @param text - Text to append
|
|
3272
|
-
* @returns New rope with text appended
|
|
3053
|
+
* Lazy content loading utilities namespace.
|
|
3273
3054
|
*
|
|
3274
3055
|
* @example
|
|
3275
3056
|
* ```typescript
|
|
3276
|
-
* import {
|
|
3057
|
+
* import { lazyContent } from 'blecsd/utils';
|
|
3277
3058
|
*
|
|
3278
|
-
*
|
|
3279
|
-
*
|
|
3280
|
-
*
|
|
3059
|
+
* const source = lazyContent.createArraySource(lines);
|
|
3060
|
+
* const content = lazyContent.createLazyContent(source, { chunkSize: 100 });
|
|
3061
|
+
* const lines = lazyContent.getLazyLines(content, 0, 50);
|
|
3062
|
+
* lazyContent.prefetchAround(content, 100);
|
|
3281
3063
|
* ```
|
|
3282
3064
|
*/
|
|
3283
|
-
|
|
3284
|
-
|
|
3285
|
-
|
|
3286
|
-
|
|
3287
|
-
|
|
3288
|
-
|
|
3289
|
-
|
|
3290
|
-
|
|
3291
|
-
|
|
3065
|
+
|
|
3066
|
+
declare const lazyContent: Readonly<{
|
|
3067
|
+
createLazyContent: typeof createLazyContent;
|
|
3068
|
+
createArraySource: typeof createArraySource;
|
|
3069
|
+
getLazyLines: typeof getLazyLines;
|
|
3070
|
+
prefetchAround: typeof prefetchAround;
|
|
3071
|
+
evictChunks: typeof evictChunks;
|
|
3072
|
+
isRangeLoaded: typeof isRangeLoaded;
|
|
3073
|
+
getLazyContentState: typeof getLazyContentState;
|
|
3074
|
+
clearLazyContent: typeof clearLazyContent;
|
|
3075
|
+
}>;
|
|
3076
|
+
type LazyContentModule = typeof lazyContent;
|
|
3077
|
+
|
|
3078
|
+
declare const lineStore: Readonly<{
|
|
3079
|
+
createLineStore: typeof createLineStore;
|
|
3080
|
+
createLineStoreFromLines: typeof createLineStoreFromLines;
|
|
3081
|
+
createEmptyLineStore: typeof createEmptyLineStore;
|
|
3082
|
+
appendToStore: typeof appendToStore;
|
|
3083
|
+
appendLines: typeof appendLines;
|
|
3084
|
+
getLineAtIndex: typeof getLineAtIndex;
|
|
3085
|
+
getLineRange: typeof getLineRange;
|
|
3086
|
+
getLineCount: typeof getLineCount;
|
|
3087
|
+
getLineForOffset: typeof getLineForOffset;
|
|
3088
|
+
getOffsetForLine: typeof getOffsetForLine;
|
|
3089
|
+
getLineInfo: typeof getLineInfo;
|
|
3090
|
+
getVisibleLines: typeof getVisibleLines;
|
|
3091
|
+
exportContent: typeof exportContent;
|
|
3092
|
+
exportLineRange: typeof exportLineRange;
|
|
3093
|
+
getStoreStats: typeof getStoreStats;
|
|
3094
|
+
getByteSize: typeof getByteSize;
|
|
3095
|
+
isStoreEmpty: typeof isStoreEmpty;
|
|
3096
|
+
trimToLineCount: typeof trimToLineCount;
|
|
3097
|
+
CHUNKED_THRESHOLD: 1000000;
|
|
3098
|
+
LineIndexSchema: zod.ZodNumber;
|
|
3099
|
+
LineRangeParamsSchema: zod.ZodObject<{
|
|
3100
|
+
startLine: zod.ZodNumber;
|
|
3101
|
+
endLine: zod.ZodNumber;
|
|
3102
|
+
}, zod_v4_core.$strip>;
|
|
3103
|
+
TrimParamsSchema: zod.ZodObject<{
|
|
3104
|
+
maxLines: zod.ZodNumber;
|
|
3105
|
+
}, zod_v4_core.$strip>;
|
|
3106
|
+
VisibleLinesParamsSchema: zod.ZodObject<{
|
|
3107
|
+
firstVisible: zod.ZodNumber;
|
|
3108
|
+
visibleCount: zod.ZodNumber;
|
|
3109
|
+
overscanBefore: zod.ZodDefault<zod.ZodNumber>;
|
|
3110
|
+
overscanAfter: zod.ZodDefault<zod.ZodNumber>;
|
|
3111
|
+
}, zod_v4_core.$strip>;
|
|
3112
|
+
}>;
|
|
3113
|
+
type LineStoreModule = typeof lineStore;
|
|
3114
|
+
|
|
3292
3115
|
/**
|
|
3293
|
-
*
|
|
3294
|
-
*
|
|
3295
|
-
* @param rope - The rope to modify
|
|
3296
|
-
* @param start - Start index (inclusive)
|
|
3297
|
-
* @param end - End index (exclusive)
|
|
3298
|
-
* @returns New rope with range deleted
|
|
3116
|
+
* Markdown rendering utilities namespace.
|
|
3299
3117
|
*
|
|
3300
3118
|
* @example
|
|
3301
3119
|
* ```typescript
|
|
3302
|
-
* import {
|
|
3120
|
+
* import { markdownRenderer } from 'blecsd/utils';
|
|
3303
3121
|
*
|
|
3304
|
-
*
|
|
3305
|
-
*
|
|
3306
|
-
*
|
|
3122
|
+
* const result = markdownRenderer.parseMarkdown(text);
|
|
3123
|
+
* const cache = markdownRenderer.createMarkdownCache();
|
|
3124
|
+
* const cached = markdownRenderer.parseMarkdownCached(cache, text);
|
|
3125
|
+
* const visible = markdownRenderer.getVisibleMarkdown(result, 0, 50);
|
|
3307
3126
|
* ```
|
|
3308
3127
|
*/
|
|
3309
|
-
|
|
3128
|
+
|
|
3129
|
+
declare const markdownRenderer: Readonly<{
|
|
3130
|
+
parseMarkdown: typeof parseMarkdown;
|
|
3131
|
+
renderMarkdown: typeof renderMarkdown;
|
|
3132
|
+
getVisibleMarkdown: typeof getVisibleMarkdown;
|
|
3133
|
+
parseMarkdownCached: typeof parseMarkdownCached;
|
|
3134
|
+
createMarkdownCache: typeof createMarkdownCache;
|
|
3135
|
+
clearMarkdownCache: typeof clearMarkdownCache;
|
|
3136
|
+
invalidateLines: typeof invalidateLines;
|
|
3137
|
+
parseInline: typeof parseInline;
|
|
3138
|
+
renderBlock: typeof renderBlock;
|
|
3139
|
+
getMarkdownStats: typeof getMarkdownStats;
|
|
3140
|
+
getTotalLineCount: typeof getTotalLineCount;
|
|
3141
|
+
DEFAULT_PARSE_BATCH: 100;
|
|
3142
|
+
}>;
|
|
3143
|
+
type MarkdownRendererModule = typeof markdownRenderer;
|
|
3144
|
+
|
|
3310
3145
|
/**
|
|
3311
|
-
*
|
|
3312
|
-
*
|
|
3313
|
-
* @param rope - The rope to modify
|
|
3314
|
-
* @param start - Start index (inclusive)
|
|
3315
|
-
* @param end - End index (exclusive)
|
|
3316
|
-
* @param text - Replacement text
|
|
3317
|
-
* @returns New rope with range replaced
|
|
3146
|
+
* Rope data structure utilities namespace for efficient large text buffers.
|
|
3318
3147
|
*
|
|
3319
3148
|
* @example
|
|
3320
3149
|
* ```typescript
|
|
3321
|
-
* import {
|
|
3150
|
+
* import { rope } from 'blecsd/utils';
|
|
3322
3151
|
*
|
|
3323
|
-
*
|
|
3324
|
-
*
|
|
3325
|
-
*
|
|
3152
|
+
* const myRope = rope.createRope('Hello World');
|
|
3153
|
+
* const updated = rope.insert(myRope, 5, ', Beautiful');
|
|
3154
|
+
* const text = rope.getText(updated);
|
|
3155
|
+
* const line = rope.getLine(updated, 0);
|
|
3326
3156
|
* ```
|
|
3327
3157
|
*/
|
|
3328
|
-
|
|
3329
|
-
|
|
3330
|
-
|
|
3331
|
-
|
|
3332
|
-
|
|
3333
|
-
|
|
3334
|
-
|
|
3335
|
-
|
|
3336
|
-
|
|
3337
|
-
|
|
3338
|
-
|
|
3339
|
-
|
|
3340
|
-
|
|
3341
|
-
|
|
3342
|
-
|
|
3158
|
+
|
|
3159
|
+
declare const rope: Readonly<{
|
|
3160
|
+
createRope: typeof createRope;
|
|
3161
|
+
createEmptyRope: typeof createEmptyRope;
|
|
3162
|
+
insert: typeof insert;
|
|
3163
|
+
deleteRange: typeof deleteRange;
|
|
3164
|
+
replaceRange: typeof replaceRange;
|
|
3165
|
+
getText: typeof getText;
|
|
3166
|
+
getLine: typeof getLine;
|
|
3167
|
+
getLineCount: typeof getLineCount$1;
|
|
3168
|
+
append: typeof append;
|
|
3169
|
+
prepend: typeof prepend;
|
|
3170
|
+
charAt: typeof charAt;
|
|
3171
|
+
substring: typeof substring;
|
|
3172
|
+
getLength: typeof getLength;
|
|
3173
|
+
getLineStart: typeof getLineStart;
|
|
3174
|
+
getLineEnd: typeof getLineEnd;
|
|
3175
|
+
getLineForIndex: typeof getLineForIndex;
|
|
3176
|
+
getLines: typeof getLines;
|
|
3177
|
+
getNewlineCount: typeof getNewlineCount;
|
|
3178
|
+
getStats: typeof getStats;
|
|
3179
|
+
isEmpty: typeof isEmpty;
|
|
3180
|
+
verify: typeof verify;
|
|
3181
|
+
LEAF_MAX_SIZE: 512;
|
|
3182
|
+
LEAF_MIN_SIZE: 256;
|
|
3183
|
+
MAX_DEPTH: 48;
|
|
3184
|
+
}>;
|
|
3185
|
+
type RopeModule = typeof rope;
|
|
3343
3186
|
|
|
3344
3187
|
/**
|
|
3345
3188
|
* Style attribute encoding for terminal rendering.
|
|
@@ -3459,7 +3302,7 @@ declare function attrsToStyle(attrs: number): {
|
|
|
3459
3302
|
* // Uses provided defaults for fg/bg
|
|
3460
3303
|
* ```
|
|
3461
3304
|
*/
|
|
3462
|
-
declare function sattr(style: StyleInput, defaultFg?: number, defaultBg?: number): StyleAttr;
|
|
3305
|
+
declare function sattr$1(style: StyleInput, defaultFg?: number, defaultBg?: number): StyleAttr;
|
|
3463
3306
|
/**
|
|
3464
3307
|
* Converts a StyleData object to a style attribute.
|
|
3465
3308
|
* Convenience function for converting from Renderable component data.
|
|
@@ -3593,6 +3436,107 @@ declare function encodeStyleAttr(attr: StyleAttr): bigint;
|
|
|
3593
3436
|
*/
|
|
3594
3437
|
declare function decodeStyleAttr(encoded: bigint): StyleAttr;
|
|
3595
3438
|
|
|
3439
|
+
/**
|
|
3440
|
+
* Style attribute encoding utilities namespace.
|
|
3441
|
+
*
|
|
3442
|
+
* @example
|
|
3443
|
+
* ```typescript
|
|
3444
|
+
* import { sattr } from 'blecsd/utils';
|
|
3445
|
+
*
|
|
3446
|
+
* const attr = sattr.create({ fg: 0xffffff, bg: 0x000000, bold: true });
|
|
3447
|
+
* const encoded = sattr.encodeStyleAttr(attr);
|
|
3448
|
+
* const decoded = sattr.decodeStyleAttr(encoded);
|
|
3449
|
+
* const merged = sattr.sattrMerge(attr, decoded);
|
|
3450
|
+
* ```
|
|
3451
|
+
*/
|
|
3452
|
+
|
|
3453
|
+
declare const sattr: Readonly<{
|
|
3454
|
+
create: typeof sattr$1;
|
|
3455
|
+
encodeStyleAttr: typeof encodeStyleAttr;
|
|
3456
|
+
decodeStyleAttr: typeof decodeStyleAttr;
|
|
3457
|
+
sattrMerge: typeof sattrMerge;
|
|
3458
|
+
sattrEqual: typeof sattrEqual;
|
|
3459
|
+
sattrInvert: typeof sattrInvert;
|
|
3460
|
+
sattrCopy: typeof sattrCopy;
|
|
3461
|
+
sattrEmpty: typeof sattrEmpty;
|
|
3462
|
+
sattrAddFlag: typeof sattrAddFlag;
|
|
3463
|
+
sattrRemoveFlag: typeof sattrRemoveFlag;
|
|
3464
|
+
sattrHasFlag: typeof sattrHasFlag;
|
|
3465
|
+
sattrFromStyleData: typeof sattrFromStyleData;
|
|
3466
|
+
attrsToStyle: typeof attrsToStyle;
|
|
3467
|
+
styleToAttrs: typeof styleToAttrs;
|
|
3468
|
+
AttrFlags: typeof AttrFlags;
|
|
3469
|
+
}>;
|
|
3470
|
+
type SattrModule = typeof sattr;
|
|
3471
|
+
|
|
3472
|
+
/**
|
|
3473
|
+
* Virtualized scrollback buffer utilities namespace.
|
|
3474
|
+
*
|
|
3475
|
+
* @example
|
|
3476
|
+
* ```typescript
|
|
3477
|
+
* import { scrollback } from 'blecsd/utils';
|
|
3478
|
+
*
|
|
3479
|
+
* const buffer = scrollback.createScrollbackBuffer({ maxLines: 10000 });
|
|
3480
|
+
* scrollback.appendLine(buffer, 'Log line 1');
|
|
3481
|
+
* const line = scrollback.getScrollbackLine(buffer, 0);
|
|
3482
|
+
* scrollback.scrollbackScrollBy(buffer, -10);
|
|
3483
|
+
* ```
|
|
3484
|
+
*/
|
|
3485
|
+
|
|
3486
|
+
declare const scrollback: Readonly<{
|
|
3487
|
+
createScrollbackBuffer: typeof createScrollbackBuffer;
|
|
3488
|
+
appendLine: typeof appendLine;
|
|
3489
|
+
appendLines: typeof appendLines$1;
|
|
3490
|
+
getLine: typeof getLine$1;
|
|
3491
|
+
getLineRange: typeof getLineRange$1;
|
|
3492
|
+
scrollbackScrollBy: typeof scrollbackScrollBy;
|
|
3493
|
+
scrollbackScrollToTop: typeof scrollbackScrollToTop;
|
|
3494
|
+
scrollbackScrollToBottom: typeof scrollbackScrollToBottom;
|
|
3495
|
+
jumpToLine: typeof jumpToLine;
|
|
3496
|
+
exportToText: typeof exportToText;
|
|
3497
|
+
loadFromText: typeof loadFromText;
|
|
3498
|
+
clearScrollback: typeof clearScrollback;
|
|
3499
|
+
trimToLineCount: typeof trimToLineCount$1;
|
|
3500
|
+
getVisibleLines: typeof getVisibleLines$1;
|
|
3501
|
+
getScrollbackStats: typeof getScrollbackStats;
|
|
3502
|
+
getMemoryUsage: typeof getMemoryUsage;
|
|
3503
|
+
compressOldChunks: typeof compressOldChunks;
|
|
3504
|
+
decompressAll: typeof decompressAll;
|
|
3505
|
+
DEFAULT_CHUNK_SIZE: 1000;
|
|
3506
|
+
DEFAULT_MAX_CACHED: 100;
|
|
3507
|
+
DEFAULT_MAX_MEMORY: number;
|
|
3508
|
+
COMPRESSION_RATIO: 0.5;
|
|
3509
|
+
}>;
|
|
3510
|
+
type ScrollbackModule = typeof scrollback;
|
|
3511
|
+
|
|
3512
|
+
declare const syntaxHL: Readonly<{
|
|
3513
|
+
highlightWithCache: typeof highlightWithCache;
|
|
3514
|
+
createHighlightCache: typeof createHighlightCache;
|
|
3515
|
+
tokenizeLine: typeof tokenizeLine;
|
|
3516
|
+
detectLanguage: typeof detectLanguage;
|
|
3517
|
+
setGrammar: typeof setGrammar;
|
|
3518
|
+
clearHighlightCache: typeof clearHighlightCache;
|
|
3519
|
+
highlightVisibleFirst: typeof highlightVisibleFirst;
|
|
3520
|
+
continueHighlight: typeof continueHighlight;
|
|
3521
|
+
invalidateLine: typeof invalidateLine;
|
|
3522
|
+
invalidateLines: typeof invalidateLines$1;
|
|
3523
|
+
invalidateAllLines: typeof invalidateAllLines;
|
|
3524
|
+
getHighlightStats: typeof getHighlightStats;
|
|
3525
|
+
detectLanguageFromContent: typeof detectLanguageFromContent;
|
|
3526
|
+
getGrammarByName: typeof getGrammarByName;
|
|
3527
|
+
GRAMMAR_JAVASCRIPT: Grammar;
|
|
3528
|
+
GRAMMAR_PYTHON: Grammar;
|
|
3529
|
+
GRAMMAR_RUST: Grammar;
|
|
3530
|
+
GRAMMAR_GO: Grammar;
|
|
3531
|
+
GRAMMAR_JSON: Grammar;
|
|
3532
|
+
GRAMMAR_SHELL: Grammar;
|
|
3533
|
+
GRAMMAR_PLAINTEXT: Grammar;
|
|
3534
|
+
GRAMMARS: readonly Grammar[];
|
|
3535
|
+
EMPTY_STATE: LineState;
|
|
3536
|
+
DEFAULT_HIGHLIGHT_BATCH: 100;
|
|
3537
|
+
}>;
|
|
3538
|
+
type SyntaxHLModule = typeof syntaxHL;
|
|
3539
|
+
|
|
3596
3540
|
/**
|
|
3597
3541
|
* Tag parsing system for styled terminal text.
|
|
3598
3542
|
*
|
|
@@ -3911,6 +3855,51 @@ declare const ParsedContentSchema: z.ZodObject<{
|
|
|
3911
3855
|
plainText: z.ZodString;
|
|
3912
3856
|
}, z.core.$strip>;
|
|
3913
3857
|
|
|
3858
|
+
declare const tags: Readonly<{
|
|
3859
|
+
parseTags: typeof parseTags;
|
|
3860
|
+
stripTags: typeof stripTags;
|
|
3861
|
+
hasTags: typeof hasTags;
|
|
3862
|
+
escapeTags: typeof escapeTags;
|
|
3863
|
+
cleanTags: typeof cleanTags;
|
|
3864
|
+
wrapWithTags: typeof wrapWithTags;
|
|
3865
|
+
createTaggedText: typeof createTaggedText;
|
|
3866
|
+
parsedToTaggedText: typeof parsedToTaggedText;
|
|
3867
|
+
segmentToTaggedText: typeof segmentToTaggedText;
|
|
3868
|
+
taggedLength: typeof taggedLength;
|
|
3869
|
+
mergeSegments: typeof mergeSegments;
|
|
3870
|
+
generateTags: typeof generateTags;
|
|
3871
|
+
generateCloseTags: typeof generateCloseTags;
|
|
3872
|
+
colorToTag: typeof colorToTag;
|
|
3873
|
+
attrToTag: typeof attrToTag;
|
|
3874
|
+
attrsToTags: typeof attrsToTags;
|
|
3875
|
+
AlignmentSchema: zod.ZodEnum<{
|
|
3876
|
+
left: "left";
|
|
3877
|
+
right: "right";
|
|
3878
|
+
center: "center";
|
|
3879
|
+
}>;
|
|
3880
|
+
ParsedContentSchema: zod.ZodObject<{
|
|
3881
|
+
segments: zod.ZodArray<zod.ZodObject<{
|
|
3882
|
+
text: zod.ZodString;
|
|
3883
|
+
fg: zod.ZodNumber;
|
|
3884
|
+
bg: zod.ZodNumber;
|
|
3885
|
+
attrs: zod.ZodNumber;
|
|
3886
|
+
}, zod_v4_core.$strip>>;
|
|
3887
|
+
alignment: zod.ZodEnum<{
|
|
3888
|
+
left: "left";
|
|
3889
|
+
right: "right";
|
|
3890
|
+
center: "center";
|
|
3891
|
+
}>;
|
|
3892
|
+
plainText: zod.ZodString;
|
|
3893
|
+
}, zod_v4_core.$strip>;
|
|
3894
|
+
TextSegmentSchema: zod.ZodObject<{
|
|
3895
|
+
text: zod.ZodString;
|
|
3896
|
+
fg: zod.ZodNumber;
|
|
3897
|
+
bg: zod.ZodNumber;
|
|
3898
|
+
attrs: zod.ZodNumber;
|
|
3899
|
+
}, zod_v4_core.$strip>;
|
|
3900
|
+
}>;
|
|
3901
|
+
type TagsModule = typeof tags;
|
|
3902
|
+
|
|
3914
3903
|
/**
|
|
3915
3904
|
* Efficient Text Search
|
|
3916
3905
|
*
|
|
@@ -4175,147 +4164,67 @@ declare function getMatchStatus(cache: SearchCache): {
|
|
|
4175
4164
|
declare function searchReverse(text: string, query: string, options?: SearchOptions): SearchResult;
|
|
4176
4165
|
|
|
4177
4166
|
/**
|
|
4178
|
-
* Text
|
|
4179
|
-
* @module utils/textWrap
|
|
4180
|
-
*/
|
|
4181
|
-
|
|
4182
|
-
/**
|
|
4183
|
-
* Text alignment options.
|
|
4184
|
-
*/
|
|
4185
|
-
type TextAlign = 'left' | 'center' | 'right';
|
|
4186
|
-
/**
|
|
4187
|
-
* Options for text wrapping.
|
|
4188
|
-
*/
|
|
4189
|
-
interface WrapOptions {
|
|
4190
|
-
/** Maximum width in characters */
|
|
4191
|
-
width: number;
|
|
4192
|
-
/** Whether to wrap text (default: true) */
|
|
4193
|
-
wrap?: boolean;
|
|
4194
|
-
/** Text alignment (default: 'left') */
|
|
4195
|
-
align?: TextAlign;
|
|
4196
|
-
/** Break mid-word if word exceeds width (default: false) */
|
|
4197
|
-
breakWord?: boolean;
|
|
4198
|
-
}
|
|
4199
|
-
/**
|
|
4200
|
-
* Removes ANSI escape sequences from a string.
|
|
4201
|
-
*
|
|
4202
|
-
* @param text - Text with possible ANSI codes
|
|
4203
|
-
* @returns Text without ANSI codes
|
|
4167
|
+
* Text search utilities namespace with caching support.
|
|
4204
4168
|
*
|
|
4205
4169
|
* @example
|
|
4206
4170
|
* ```typescript
|
|
4207
|
-
* import {
|
|
4171
|
+
* import { textSearch } from 'blecsd/utils';
|
|
4208
4172
|
*
|
|
4209
|
-
* const
|
|
4210
|
-
*
|
|
4173
|
+
* const cache = textSearch.createSearchCache();
|
|
4174
|
+
* const result = textSearch.searchWithCache(cache, lines, 'query');
|
|
4175
|
+
* const next = textSearch.getNextMatch(result, currentPos);
|
|
4176
|
+
* const visible = textSearch.getVisibleMatches(result, startLine, endLine);
|
|
4211
4177
|
* ```
|
|
4212
4178
|
*/
|
|
4213
|
-
|
|
4214
|
-
|
|
4215
|
-
|
|
4216
|
-
|
|
4217
|
-
|
|
4218
|
-
|
|
4219
|
-
|
|
4220
|
-
|
|
4221
|
-
|
|
4222
|
-
|
|
4223
|
-
|
|
4224
|
-
|
|
4225
|
-
|
|
4226
|
-
|
|
4227
|
-
|
|
4228
|
-
|
|
4229
|
-
|
|
4230
|
-
|
|
4231
|
-
|
|
4232
|
-
|
|
4233
|
-
|
|
4234
|
-
|
|
4235
|
-
|
|
4236
|
-
|
|
4237
|
-
|
|
4238
|
-
|
|
4239
|
-
* @example
|
|
4240
|
-
* ```typescript
|
|
4241
|
-
* import { truncate } from 'blecsd';
|
|
4242
|
-
*
|
|
4243
|
-
* console.log(truncate('Hello World', 8)); // "Hello W…"
|
|
4244
|
-
* ```
|
|
4245
|
-
*/
|
|
4246
|
-
declare function truncate(text: string, width: number, ellipsis?: string): string;
|
|
4247
|
-
/**
|
|
4248
|
-
* Aligns a line of text within a specified width.
|
|
4249
|
-
*
|
|
4250
|
-
* @param line - Line to align
|
|
4251
|
-
* @param width - Target width
|
|
4252
|
-
* @param align - Alignment type
|
|
4253
|
-
* @returns Aligned line (padded with spaces)
|
|
4254
|
-
*
|
|
4255
|
-
* @example
|
|
4256
|
-
* ```typescript
|
|
4257
|
-
* import { alignLine } from 'blecsd';
|
|
4258
|
-
*
|
|
4259
|
-
* console.log(alignLine('Hello', 10, 'left')); // "Hello "
|
|
4260
|
-
* console.log(alignLine('Hello', 10, 'center')); // " Hello "
|
|
4261
|
-
* console.log(alignLine('Hello', 10, 'right')); // " Hello"
|
|
4262
|
-
* ```
|
|
4263
|
-
*/
|
|
4264
|
-
declare function alignLine(line: string, width: number, align: TextAlign): string;
|
|
4265
|
-
/**
|
|
4266
|
-
* Wraps text to fit within a specified width, breaking at word boundaries.
|
|
4267
|
-
*
|
|
4268
|
-
* @param text - Text to wrap
|
|
4269
|
-
* @param width - Maximum width per line
|
|
4270
|
-
* @returns Array of wrapped lines
|
|
4271
|
-
*
|
|
4272
|
-
* @example
|
|
4273
|
-
* ```typescript
|
|
4274
|
-
* import { wordWrap } from 'blecsd';
|
|
4275
|
-
*
|
|
4276
|
-
* const lines = wordWrap('The quick brown fox jumps over the lazy dog', 20);
|
|
4277
|
-
* // ["The quick brown fox", "jumps over the lazy", "dog"]
|
|
4278
|
-
* ```
|
|
4279
|
-
*/
|
|
4280
|
-
declare function wordWrap(text: string, width: number): string[];
|
|
4281
|
-
/**
|
|
4282
|
-
* Wraps and aligns text with full options.
|
|
4283
|
-
*
|
|
4284
|
-
* @param text - Text to wrap
|
|
4285
|
-
* @param options - Wrapping options
|
|
4286
|
-
* @returns Array of wrapped and aligned lines
|
|
4287
|
-
*
|
|
4288
|
-
* @example
|
|
4289
|
-
* ```typescript
|
|
4290
|
-
* import { wrapText } from 'blecsd';
|
|
4291
|
-
*
|
|
4292
|
-
* const lines = wrapText('Hello world, this is a test', {
|
|
4293
|
-
* width: 15,
|
|
4294
|
-
* wrap: true,
|
|
4295
|
-
* align: 'center'
|
|
4296
|
-
* });
|
|
4297
|
-
* // [" Hello world ", " this is a test"]
|
|
4298
|
-
* ```
|
|
4299
|
-
*/
|
|
4300
|
-
declare function wrapText(text: string, options: WrapOptions): string[];
|
|
4179
|
+
|
|
4180
|
+
declare const textSearch: Readonly<{
|
|
4181
|
+
search: typeof search;
|
|
4182
|
+
searchWithCache: typeof searchWithCache;
|
|
4183
|
+
createSearchCache: typeof createSearchCache;
|
|
4184
|
+
getNextMatch: typeof getNextMatch;
|
|
4185
|
+
getPreviousMatch: typeof getPreviousMatch;
|
|
4186
|
+
getVisibleMatches: typeof getVisibleMatches;
|
|
4187
|
+
clearSearchCache: typeof clearSearchCache;
|
|
4188
|
+
updateSearchQuery: typeof updateSearchQuery;
|
|
4189
|
+
searchBatch: typeof searchBatch;
|
|
4190
|
+
searchLiteral: typeof searchLiteral;
|
|
4191
|
+
searchRegex: typeof searchRegex;
|
|
4192
|
+
searchReverse: typeof searchReverse;
|
|
4193
|
+
boyerMooreHorspool: typeof boyerMooreHorspool;
|
|
4194
|
+
findNearestMatch: typeof findNearestMatch;
|
|
4195
|
+
getMatchAt: typeof getMatchAt;
|
|
4196
|
+
getMatchStatus: typeof getMatchStatus;
|
|
4197
|
+
positionToLineColumn: typeof positionToLineColumn;
|
|
4198
|
+
DEFAULT_SEARCH_BATCH: 100000;
|
|
4199
|
+
DEFAULT_TIMEOUT: 5000;
|
|
4200
|
+
WORD_BOUNDARY_BEFORE: RegExp;
|
|
4201
|
+
WORD_BOUNDARY_AFTER: RegExp;
|
|
4202
|
+
}>;
|
|
4203
|
+
type TextSearchModule = typeof textSearch;
|
|
4204
|
+
|
|
4301
4205
|
/**
|
|
4302
|
-
*
|
|
4303
|
-
*
|
|
4304
|
-
* @param lines - Array of lines
|
|
4305
|
-
* @param height - Target height
|
|
4306
|
-
* @param width - Line width for padding
|
|
4307
|
-
* @param valign - Vertical alignment ('top' | 'middle' | 'bottom')
|
|
4308
|
-
* @returns Array of lines padded to height
|
|
4206
|
+
* Text wrapping utilities namespace.
|
|
4309
4207
|
*
|
|
4310
4208
|
* @example
|
|
4311
4209
|
* ```typescript
|
|
4312
|
-
* import {
|
|
4210
|
+
* import { textWrap } from 'blecsd/utils';
|
|
4313
4211
|
*
|
|
4314
|
-
* const
|
|
4315
|
-
*
|
|
4212
|
+
* const wrapped = textWrap.wordWrap(text, 80);
|
|
4213
|
+
* const truncated = textWrap.truncate(text, 50);
|
|
4214
|
+
* const aligned = textWrap.alignLine(text, 80, 'center');
|
|
4316
4215
|
* ```
|
|
4317
4216
|
*/
|
|
4318
|
-
|
|
4217
|
+
|
|
4218
|
+
declare const textWrap: Readonly<{
|
|
4219
|
+
wordWrap: typeof wordWrap;
|
|
4220
|
+
wrapText: typeof wrapText;
|
|
4221
|
+
truncate: typeof truncate;
|
|
4222
|
+
alignLine: typeof alignLine;
|
|
4223
|
+
getVisibleWidth: typeof getVisibleWidth;
|
|
4224
|
+
stripAnsi: typeof stripAnsi;
|
|
4225
|
+
padHeight: typeof padHeight;
|
|
4226
|
+
}>;
|
|
4227
|
+
type TextWrapModule = typeof textWrap;
|
|
4319
4228
|
|
|
4320
4229
|
/**
|
|
4321
4230
|
* Time Utilities
|
|
@@ -4396,6 +4305,26 @@ declare function unixTimestamp(date?: Date): number;
|
|
|
4396
4305
|
*/
|
|
4397
4306
|
declare function unixTimestampMs(date?: Date): number;
|
|
4398
4307
|
|
|
4308
|
+
/**
|
|
4309
|
+
* Time utilities namespace.
|
|
4310
|
+
*
|
|
4311
|
+
* @example
|
|
4312
|
+
* ```typescript
|
|
4313
|
+
* import { time } from 'blecsd/utils';
|
|
4314
|
+
*
|
|
4315
|
+
* const formatted = time.formatDate(new Date());
|
|
4316
|
+
* const timestamp = time.unixTimestamp();
|
|
4317
|
+
* const timestampMs = time.unixTimestampMs();
|
|
4318
|
+
* ```
|
|
4319
|
+
*/
|
|
4320
|
+
|
|
4321
|
+
declare const time: Readonly<{
|
|
4322
|
+
formatDate: typeof formatDate;
|
|
4323
|
+
unixTimestamp: typeof unixTimestamp;
|
|
4324
|
+
unixTimestampMs: typeof unixTimestampMs;
|
|
4325
|
+
}>;
|
|
4326
|
+
type TimeModule = typeof time;
|
|
4327
|
+
|
|
4399
4328
|
/**
|
|
4400
4329
|
* Unicode code point utilities for low-level string handling.
|
|
4401
4330
|
* @module utils/unicode/codePoint
|
|
@@ -5948,4 +5877,122 @@ declare function getCategories(corpus: readonly WidthTestCase[]): readonly Width
|
|
|
5948
5877
|
*/
|
|
5949
5878
|
declare function formatTestReport(results: WidthTestResult): string;
|
|
5950
5879
|
|
|
5951
|
-
|
|
5880
|
+
declare const unicode: Readonly<{
|
|
5881
|
+
width: Readonly<{
|
|
5882
|
+
stringWidth: typeof stringWidth;
|
|
5883
|
+
charWidth: typeof charWidth;
|
|
5884
|
+
charWidthAt: typeof charWidthAt;
|
|
5885
|
+
codePointWidth: typeof codePointWidth;
|
|
5886
|
+
graphemeWidth: typeof graphemeWidth;
|
|
5887
|
+
stringWidthGrapheme: typeof stringWidthGrapheme;
|
|
5888
|
+
strWidth: typeof strWidth;
|
|
5889
|
+
getCharWidth: typeof getCharWidth;
|
|
5890
|
+
hasWideChars: typeof hasWideChars;
|
|
5891
|
+
hasZeroWidthChars: typeof hasZeroWidthChars;
|
|
5892
|
+
isWideChar: typeof isWideChar;
|
|
5893
|
+
isZeroWidthChar: typeof isZeroWidthChar;
|
|
5894
|
+
isAmbiguousChar: typeof isAmbiguousChar;
|
|
5895
|
+
isCombiningChar: typeof isCombiningChar;
|
|
5896
|
+
isCombiningCharBinarySearch: typeof isCombiningCharBinarySearch;
|
|
5897
|
+
getCombiningCharCount: typeof getCombiningCharCount;
|
|
5898
|
+
truncateByWidth: typeof truncateByWidth;
|
|
5899
|
+
sliceByWidth: typeof sliceByWidth;
|
|
5900
|
+
sliceByWidthGrapheme: typeof sliceByWidthGrapheme;
|
|
5901
|
+
truncateWithEllipsis: typeof truncateWithEllipsis;
|
|
5902
|
+
truncateWithEllipsisGrapheme: typeof truncateWithEllipsisGrapheme;
|
|
5903
|
+
padStartByWidth: typeof padStartByWidth;
|
|
5904
|
+
padEndByWidth: typeof padEndByWidth;
|
|
5905
|
+
centerByWidth: typeof centerByWidth;
|
|
5906
|
+
columnAtIndex: typeof columnAtIndex;
|
|
5907
|
+
indexAtColumn: typeof indexAtColumn;
|
|
5908
|
+
WIDE_RANGES: readonly CodePointRange[];
|
|
5909
|
+
ZERO_WIDTH_RANGES: readonly CodePointRange[];
|
|
5910
|
+
AMBIGUOUS_RANGES: readonly CodePointRange[];
|
|
5911
|
+
FULLWIDTH_RANGES: readonly CodePointRange[];
|
|
5912
|
+
EMOJI_WIDE_RANGES: readonly CodePointRange[];
|
|
5913
|
+
COMBINING_RANGES: readonly CodePointRange[];
|
|
5914
|
+
COMBINING_SET: ReadonlySet<number>;
|
|
5915
|
+
}>;
|
|
5916
|
+
codePoint: Readonly<{
|
|
5917
|
+
codePointAt: typeof codePointAt;
|
|
5918
|
+
codePoints: typeof codePoints;
|
|
5919
|
+
toCodePoints: typeof toCodePoints;
|
|
5920
|
+
fromCodePoint: typeof fromCodePoint;
|
|
5921
|
+
codePointLength: typeof codePointLength;
|
|
5922
|
+
charAtCodePoint: typeof charAtCodePoint;
|
|
5923
|
+
characters: typeof characters;
|
|
5924
|
+
sliceCodePoints: typeof sliceCodePoints;
|
|
5925
|
+
isValidCodePoint: typeof isValidCodePoint;
|
|
5926
|
+
isBMP: typeof isBMP;
|
|
5927
|
+
isAstral: typeof isAstral;
|
|
5928
|
+
}>;
|
|
5929
|
+
grapheme: Readonly<{
|
|
5930
|
+
graphemeClusters: typeof graphemeClusters;
|
|
5931
|
+
toGraphemes: typeof toGraphemes;
|
|
5932
|
+
graphemeAt: typeof graphemeAt;
|
|
5933
|
+
graphemeCount: typeof graphemeCount;
|
|
5934
|
+
sliceGraphemes: typeof sliceGraphemes;
|
|
5935
|
+
reverseGraphemes: typeof reverseGraphemes;
|
|
5936
|
+
hasGraphemeSegmenter: typeof hasGraphemeSegmenter;
|
|
5937
|
+
}>;
|
|
5938
|
+
normalize: Readonly<{
|
|
5939
|
+
normalizeNFC: typeof normalizeNFC;
|
|
5940
|
+
normalizeNFD: typeof normalizeNFD;
|
|
5941
|
+
normalizeNFKC: typeof normalizeNFKC;
|
|
5942
|
+
normalizeNFKD: typeof normalizeNFKD;
|
|
5943
|
+
dropUnicode: typeof dropUnicode;
|
|
5944
|
+
toAscii: typeof toAscii;
|
|
5945
|
+
stripCombining: typeof stripCombining;
|
|
5946
|
+
stripZeroWidth: typeof stripZeroWidth;
|
|
5947
|
+
stripControl: typeof stripControl;
|
|
5948
|
+
}>;
|
|
5949
|
+
surrogate: Readonly<{
|
|
5950
|
+
codePointToSurrogatePair: typeof codePointToSurrogatePair;
|
|
5951
|
+
surrogatePairToCodePoint: typeof surrogatePairToCodePoint;
|
|
5952
|
+
isHighSurrogate: typeof isHighSurrogate;
|
|
5953
|
+
isLowSurrogate: typeof isLowSurrogate;
|
|
5954
|
+
isSurrogate: typeof isSurrogate;
|
|
5955
|
+
isSurrogateCode: typeof isSurrogateCode;
|
|
5956
|
+
HIGH_SURROGATE_START: 55296;
|
|
5957
|
+
HIGH_SURROGATE_END: 56319;
|
|
5958
|
+
LOW_SURROGATE_START: 56320;
|
|
5959
|
+
LOW_SURROGATE_END: 57343;
|
|
5960
|
+
}>;
|
|
5961
|
+
stringWidth: typeof stringWidth;
|
|
5962
|
+
charWidth: typeof charWidth;
|
|
5963
|
+
truncateByWidth: typeof truncateByWidth;
|
|
5964
|
+
hasWideChars: typeof hasWideChars;
|
|
5965
|
+
isWideChar: typeof isWideChar;
|
|
5966
|
+
graphemeClusters: typeof graphemeClusters;
|
|
5967
|
+
toCodePoints: typeof toCodePoints;
|
|
5968
|
+
normalizeNFC: typeof normalizeNFC;
|
|
5969
|
+
}>;
|
|
5970
|
+
type UnicodeModule = typeof unicode;
|
|
5971
|
+
|
|
5972
|
+
declare const widthHarness: Readonly<{
|
|
5973
|
+
buildTestCorpus: typeof buildTestCorpus;
|
|
5974
|
+
runWidthTests: typeof runWidthTests;
|
|
5975
|
+
formatTestReport: typeof formatTestReport;
|
|
5976
|
+
installWidthOverrides: typeof installWidthOverrides;
|
|
5977
|
+
clearWidthOverrides: typeof clearWidthOverrides;
|
|
5978
|
+
getOverrideWidth: typeof getOverrideWidth;
|
|
5979
|
+
measureWidthWithOverrides: typeof measureWidthWithOverrides;
|
|
5980
|
+
getOverrideCount: typeof getOverrideCount;
|
|
5981
|
+
getKnownBadSequences: typeof getKnownBadSequences;
|
|
5982
|
+
getCategories: typeof getCategories;
|
|
5983
|
+
filterByCategory: typeof filterByCategory;
|
|
5984
|
+
TerminalWidthProfileSchema: zod.ZodObject<{
|
|
5985
|
+
terminal: zod.ZodString;
|
|
5986
|
+
overrides: zod.ZodArray<zod.ZodObject<{
|
|
5987
|
+
codePoint: zod.ZodNumber;
|
|
5988
|
+
width: zod.ZodNumber;
|
|
5989
|
+
}, zod_v4_core.$strip>>;
|
|
5990
|
+
}, zod_v4_core.$strip>;
|
|
5991
|
+
WidthOverrideSchema: zod.ZodObject<{
|
|
5992
|
+
codePoint: zod.ZodNumber;
|
|
5993
|
+
width: zod.ZodNumber;
|
|
5994
|
+
}, zod_v4_core.$strip>;
|
|
5995
|
+
}>;
|
|
5996
|
+
type WidthHarnessModule = typeof widthHarness;
|
|
5997
|
+
|
|
5998
|
+
export { AMBIGUOUS_RANGES, type Alignment, AlignmentSchema, AttrFlags, type BlockData, type BlockType, type BlockquoteData, BoxChars, type BoxRenderModule, COMBINING_RANGES, COMBINING_SET, type ChangeCoalesceModule, type CoalescingConfig, type CoalescingState, type CodeData, type CodePage, type CodePointRange, type ColorsModule, type ComponentStoreModule, type ContentChunk, type ContentSource, type ConversionOptions, type CursorNavConfig, type CursorNavModule, type CursorPosition, DEFAULT_BATCH_SIZE, DEFAULT_COLLAPSE_THRESHOLD, DEFAULT_CONTEXT, DEFAULT_HIGHLIGHT_BATCH, DEFAULT_PARSE_BATCH, DEFAULT_SEARCH_BATCH, DEFAULT_TIMEOUT, type DiffCache, type DiffChunk, type DiffConfig, type DiffLine, type DiffRendererModule, type DiffResult, type DiffType, type DirtyRegion, type DropUnicodeOptions, EMOJI_WIDE_RANGES, EMPTY_STATE, type EncodingModule, FULLWIDTH_RANGES, type FastWrapModule, type FastWrapOptions, type FlushResult, type FoldConfig, type FoldModule, type FoldRegion, type FoldStats, type FuzzyMatch, type FuzzyOptions, FuzzyOptionsSchema, type FuzzySearchModule, type FuzzySearchOptions, GRAMMARS, GRAMMAR_GO, GRAMMAR_JAVASCRIPT, GRAMMAR_JSON, GRAMMAR_PLAINTEXT, GRAMMAR_PYTHON, GRAMMAR_RUST, GRAMMAR_SHELL, type Grammar, type GraphemeSliceResult, type GutterConfig, type GutterLine, type GutterModule, type GutterResult, HIGH_SURROGATE_END, HIGH_SURROGATE_START, type HeadingData, type HelpersModule, type HighlightCache, type HighlightResult, type HighlightStats, type HrData, type HtmlData, type InlineElement, type InlineType, type KnownBadSequence, LOW_SURROGATE_END, LOW_SURROGATE_START, type LazyContentConfig, type LazyContentModule, type LazyContentState, type LineEntry, type LineIndex, type LineNumberMode, type LinePosition, type LineState, type LineStoreModule, type LineStyle, type ListData, type ListItem, MAX_PARAGRAPH_CHUNK, type MarkdownBlock, type MarkdownCache, type MarkdownParseResult, type MarkdownRendererModule, type MarkdownStats, type NavigationResult, type ParagraphData, type ParsedContent, ParsedContentSchema, type PartialConversionOptions, type ProgressiveSearchResult, type ProgressiveWrapResult, type RenderedLine, type RopeModule, type SattrModule, type ScrollbackModule, type SearchCache, type SearchMatch, type SearchOptions, type SearchResult, type SideBySideLine, type SliceResult, type StyleAttr, type StyleInput, type SyntaxHLModule, type TableCell, type TableData, type TagsModule, type TerminalWidthProfile, TerminalWidthProfileSchema, type TextChange, type TextSearchModule, type TextSegment, TextSegmentSchema, type TextWrapModule, type TimeModule, type Token, type TokenType, type UnicodeModule, type UnmappableMode, type ViewportState, type VisibleDiff, type VisibleLine, type VisibleMarkdown, WIDE_RANGES, WORD_BOUNDARY_AFTER, WORD_BOUNDARY_BEFORE, type WidthHarnessModule, type WidthOptions, type WidthOverride, WidthOverrideSchema, type WidthTestCase, type WidthTestCategory, type WidthTestFailure, type WidthTestResult, type WrapCache, type WrapCacheStats, type WrapEntry, ZERO_WIDTH_RANGES, addFoldRegion, alignLine, append, appendLine, appendLines$1 as appendLines, appendLines as appendLinesToStore, appendToStore, attrToTag, attrsToStyle, attrsToTags, boxFillRect, boxRender, boyerMooreHorspool, bufferToString$1 as bufferToString, buildLineIndex, buildLineIndexFromLengths, buildTestCorpus, centerByWidth, changeCoalesce, charAt, charAtCodePoint, charWidth, charWidthAt, characters, charsetToBoxChars, clampCursor, cleanTags, clearDiffCache, clearHighlightCache, clearLazyContent, clearMarkdownCache, clearScrollback, clearSearchCache, clearWidthOverrides, clearWrapCache, codePointAt, codePointLength, codePointToSurrogatePair, codePointWidth, codePoints, collapseChunk, collapseUnchanged, colorToHex, colorToTag, colors, columnAtIndex, componentStore, compressOldChunks, computeDiff, computeDiffCached, computeDigitWidth, computeGutterWidth, computeVisibleGutter, continueHighlight, continueWrap, createArraySource, createCellBuffer, createCoalescer, createComponentStore, createCursor, createDiffCache, createEmptyLineStore, createEmptyRope, createFoldState, createGutterConfig, createHighlightCache, createLazyContent, createLineStore, createLineStoreFromLines, createMarkdownCache, createNavConfig, createRope, createScrollbackBuffer, createSearchCache, createSparseStore, createTaggedText, createTypedArrayPool, createViewport, createWrapCache, cursorNav, decodeStyleAttr, decompressAll, deleteChange, deleteRange, destroyCoalescer, detectLanguage, detectLanguageFromContent, diffRenderer, dropUnicode, encodeStyleAttr, encoding, ensureCursorVisible, escapeTags, estimateMemoryUsage, evictChunks, expandAll, expandChunk, exportContent, exportLineRange, exportToText, fastWrap, filterByCategory, findAllFiles, findFile, findNearestMatch, flushChanges, fold, foldAll, foldAtDepth, foldRegion, formatDate, formatLineNumber, formatTestReport, fromCodePoint, fuzzyFilter, fuzzyMatch, fuzzySearch, fuzzySearchBy, fuzzySearch$1 as fuzzySearchFn, fuzzyTest, generateCloseTags, generateTags, getAllFoldRegions, getByteSize, getCategories, getCharWidth, getCoalescingState, getCombiningCharCount, getComponentMemoryReport, getDiffStats, getFoldAtLine, getFoldStats, getGrammarByName, getHighlightStats, getKnownBadSequences, getLazyContentState, getLazyLines, getLength, getLine, getLineAtIndex, getLineCount$1 as getLineCount, getLineEnd, getLineForIndex, getLineForOffset, getLineInfo, getLineRange$1 as getLineRange, getLineStart, getLineCount as getLineStoreLineCount, getLineRange as getLineStoreRange, getVisibleLines as getLineStoreVisibleLines, getLines, getTotalLineCount as getMarkdownLineCount, getMarkdownStats, getMatchAt, getMatchStatus, getMemoryUsage, getNewlineCount, getNextMatch, getOffsetForLine, getOverrideCount, getOverrideWidth, getPreviousMatch, getLine$1 as getScrollbackLine, getScrollbackStats, getSideBySideView, getStats, getStoreStats, getText, getTotalLineCount$1 as getTotalLineCount, getVisibleDiffLines, getVisibleFoldLines, getVisibleLines$1 as getVisibleLines, getVisibleMarkdown, getVisibleMatches, getVisibleWidth, getWrapCacheStats, goToEnd, goToLine, goToStart, graphemeAt, graphemeClusters, graphemeCount, graphemeWidth, groupBy, gutter, gutterWidthChanged, hasGraphemeSegmenter, hasTags, hasWideChars, hasZeroWidthChars, helpers, hexToColor, highlightMatch, highlightVisibleFirst, highlightWithCache, indexAtColumn, insert, insertChange, installWidthOverrides, invalidateAll, invalidateAllLines, invalidateLine, invalidateLines$1 as invalidateLines, invalidateLines as invalidateMarkdownLines, invalidateParagraph, invalidateRange, isAmbiguousChar, isAstral, isBMP, isCombiningChar, isCombiningCharBinarySearch, isEmpty, isHighSurrogate, isLowSurrogate, isRangeLoaded, isStoreEmpty, isSurrogate, isSurrogateCode, isValidCodePoint, isWideChar, isWithinMemoryBounds, isZeroWidthChar, jumpToLine, lazyContent, lineForOffset, lineStore, lineToPosition, loadFromText, markdownRenderer, measureWidthWithOverrides, merge, mergeSegments, moveCursorDown, moveCursorLeft, moveCursorRight, moveCursorUp, normalizeNFC, normalizeNFD, normalizeNFKC, normalizeNFKD, offsetForLine, originalToVisibleLine, packColor, padEndByWidth, padHeight, padStartByWidth, pageDown, pageUp, parseColor, parseInline, parseMarkdown, parseMarkdownCached, parseTags, parseUnifiedDiff, parsedToTaggedText, partition, positionToLine, positionToLineColumn, prefetchAround, prepend, queueChange, removeFoldRegion, renderBlock, renderBox, renderGutterBlock, renderHLine, renderMarkdown, renderText, renderVLine, replaceChange, replaceRange, resizeWrapCache, reverseGraphemes, rope, runWidthTests, sattr, sattrAddFlag, sattrCopy, sattrEmpty, sattrEqual, sattr$1 as sattrFn, sattrFromStyleData, sattrHasFlag, sattrInvert, sattrMerge, sattrRemoveFlag, scrollback, scrollbackScrollBy, scrollbackScrollToBottom, scrollbackScrollToTop, search, searchBatch, searchLiteral, searchRegex, searchReverse, searchWithCache, segmentToTaggedText, setGrammar, shallowMerge, sliceByWidth, sliceByWidthGrapheme, sliceCodePoints, sliceGraphemes, sortBy, sortByIndex, sortByName, sortByPriority, strWidth, stringWidth, stringWidthGrapheme, stripAnsi, stripCombining, stripControl, stripTags, stripZeroWidth, styleToAttrs, substring, surrogatePairToCodePoint, syntaxHL, taggedLength, tags, textSearch, textWrap, time, toAscii, toCodePoints, toGraphemes, toUnifiedDiff, toggleChunk, toggleFold, tokenizeLine, trimToLineCount as trimLineStore, trimToLineCount$1 as trimToLineCount, truncate, truncateByWidth, truncateWithEllipsis, truncateWithEllipsisGrapheme, unfoldAll, unfoldRegion, unicode, unique, uniqueBy, unixTimestamp, unixTimestampMs, unpackColor, updateSearchQuery, updateTotalLines, verify, visibleToOriginalLine, widthHarness, wordWrap, wrapText, wrapVisibleFirst, wrapWithCache, wrapWithTags };
|