@fairyhunter13/opentui-core 0.1.88

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.
Files changed (147) hide show
  1. package/3d/SpriteResourceManager.d.ts +74 -0
  2. package/3d/SpriteUtils.d.ts +13 -0
  3. package/3d/TextureUtils.d.ts +24 -0
  4. package/3d/ThreeRenderable.d.ts +40 -0
  5. package/3d/WGPURenderer.d.ts +61 -0
  6. package/3d/animation/ExplodingSpriteEffect.d.ts +71 -0
  7. package/3d/animation/PhysicsExplodingSpriteEffect.d.ts +76 -0
  8. package/3d/animation/SpriteAnimator.d.ts +124 -0
  9. package/3d/animation/SpriteParticleGenerator.d.ts +62 -0
  10. package/3d/canvas.d.ts +44 -0
  11. package/3d/index.d.ts +12 -0
  12. package/3d/physics/PlanckPhysicsAdapter.d.ts +19 -0
  13. package/3d/physics/RapierPhysicsAdapter.d.ts +19 -0
  14. package/3d/physics/physics-interface.d.ts +27 -0
  15. package/3d.d.ts +2 -0
  16. package/3d.js +34042 -0
  17. package/3d.js.map +155 -0
  18. package/LICENSE +21 -0
  19. package/NativeSpanFeed.d.ts +41 -0
  20. package/README.md +62 -0
  21. package/Renderable.d.ts +334 -0
  22. package/animation/Timeline.d.ts +126 -0
  23. package/ansi.d.ts +13 -0
  24. package/assets/javascript/highlights.scm +205 -0
  25. package/assets/javascript/tree-sitter-javascript.wasm +0 -0
  26. package/assets/markdown/highlights.scm +150 -0
  27. package/assets/markdown/injections.scm +27 -0
  28. package/assets/markdown/tree-sitter-markdown.wasm +0 -0
  29. package/assets/markdown_inline/highlights.scm +115 -0
  30. package/assets/markdown_inline/tree-sitter-markdown_inline.wasm +0 -0
  31. package/assets/typescript/highlights.scm +604 -0
  32. package/assets/typescript/tree-sitter-typescript.wasm +0 -0
  33. package/assets/zig/highlights.scm +284 -0
  34. package/assets/zig/tree-sitter-zig.wasm +0 -0
  35. package/buffer.d.ts +107 -0
  36. package/console.d.ts +143 -0
  37. package/edit-buffer.d.ts +98 -0
  38. package/editor-view.d.ts +73 -0
  39. package/index-e4hzc2j2.js +113 -0
  40. package/index-e4hzc2j2.js.map +10 -0
  41. package/index-nkrr8a4c.js +18415 -0
  42. package/index-nkrr8a4c.js.map +64 -0
  43. package/index-nyw5p3ep.js +12619 -0
  44. package/index-nyw5p3ep.js.map +43 -0
  45. package/index.d.ts +21 -0
  46. package/index.js +430 -0
  47. package/index.js.map +9 -0
  48. package/lib/KeyHandler.d.ts +61 -0
  49. package/lib/RGBA.d.ts +25 -0
  50. package/lib/ascii.font.d.ts +508 -0
  51. package/lib/border.d.ts +49 -0
  52. package/lib/bunfs.d.ts +7 -0
  53. package/lib/clipboard.d.ts +17 -0
  54. package/lib/clock.d.ts +15 -0
  55. package/lib/data-paths.d.ts +26 -0
  56. package/lib/debounce.d.ts +42 -0
  57. package/lib/detect-links.d.ts +6 -0
  58. package/lib/env.d.ts +42 -0
  59. package/lib/extmarks-history.d.ts +17 -0
  60. package/lib/extmarks.d.ts +89 -0
  61. package/lib/hast-styled-text.d.ts +17 -0
  62. package/lib/index.d.ts +21 -0
  63. package/lib/keymapping.d.ts +25 -0
  64. package/lib/objects-in-viewport.d.ts +24 -0
  65. package/lib/output.capture.d.ts +24 -0
  66. package/lib/parse.keypress-kitty.d.ts +2 -0
  67. package/lib/parse.keypress.d.ts +26 -0
  68. package/lib/parse.mouse.d.ts +30 -0
  69. package/lib/paste.d.ts +7 -0
  70. package/lib/queue.d.ts +15 -0
  71. package/lib/renderable.validations.d.ts +12 -0
  72. package/lib/scroll-acceleration.d.ts +43 -0
  73. package/lib/selection.d.ts +63 -0
  74. package/lib/singleton.d.ts +7 -0
  75. package/lib/stdin-parser.d.ts +76 -0
  76. package/lib/styled-text.d.ts +63 -0
  77. package/lib/terminal-capability-detection.d.ts +30 -0
  78. package/lib/terminal-palette.d.ts +50 -0
  79. package/lib/tree-sitter/assets/update.d.ts +11 -0
  80. package/lib/tree-sitter/client.d.ts +47 -0
  81. package/lib/tree-sitter/default-parsers.d.ts +2 -0
  82. package/lib/tree-sitter/download-utils.d.ts +21 -0
  83. package/lib/tree-sitter/index.d.ts +8 -0
  84. package/lib/tree-sitter/parser.worker.d.ts +1 -0
  85. package/lib/tree-sitter/parsers-config.d.ts +38 -0
  86. package/lib/tree-sitter/resolve-ft.d.ts +2 -0
  87. package/lib/tree-sitter/types.d.ts +81 -0
  88. package/lib/tree-sitter-styled-text.d.ts +14 -0
  89. package/lib/validate-dir-name.d.ts +1 -0
  90. package/lib/yoga.options.d.ts +32 -0
  91. package/package.json +80 -0
  92. package/parser.worker.js +869 -0
  93. package/parser.worker.js.map +12 -0
  94. package/plugins/core-slot.d.ts +72 -0
  95. package/plugins/registry.d.ts +38 -0
  96. package/plugins/types.d.ts +34 -0
  97. package/post/filters.d.ts +105 -0
  98. package/renderables/ASCIIFont.d.ts +52 -0
  99. package/renderables/Box.d.ts +72 -0
  100. package/renderables/Code.d.ts +78 -0
  101. package/renderables/Diff.d.ts +142 -0
  102. package/renderables/EditBufferRenderable.d.ts +162 -0
  103. package/renderables/FrameBuffer.d.ts +16 -0
  104. package/renderables/Input.d.ts +67 -0
  105. package/renderables/LineNumberRenderable.d.ts +74 -0
  106. package/renderables/Markdown.d.ts +173 -0
  107. package/renderables/ScrollBar.d.ts +77 -0
  108. package/renderables/ScrollBox.d.ts +124 -0
  109. package/renderables/Select.d.ts +115 -0
  110. package/renderables/Slider.d.ts +44 -0
  111. package/renderables/TabSelect.d.ts +96 -0
  112. package/renderables/Text.d.ts +36 -0
  113. package/renderables/TextBufferRenderable.d.ts +105 -0
  114. package/renderables/TextNode.d.ts +91 -0
  115. package/renderables/TextTable.d.ts +140 -0
  116. package/renderables/Textarea.d.ts +114 -0
  117. package/renderables/TimeToFirstDraw.d.ts +24 -0
  118. package/renderables/__tests__/renderable-test-utils.d.ts +12 -0
  119. package/renderables/composition/VRenderable.d.ts +16 -0
  120. package/renderables/composition/constructs.d.ts +35 -0
  121. package/renderables/composition/vnode.d.ts +46 -0
  122. package/renderables/index.d.ts +22 -0
  123. package/renderables/markdown-parser.d.ts +10 -0
  124. package/renderer.d.ts +388 -0
  125. package/runtime-plugin-support.d.ts +3 -0
  126. package/runtime-plugin-support.js +29 -0
  127. package/runtime-plugin-support.js.map +10 -0
  128. package/runtime-plugin.d.ts +11 -0
  129. package/runtime-plugin.js +16 -0
  130. package/runtime-plugin.js.map +9 -0
  131. package/syntax-style.d.ts +54 -0
  132. package/testing/manual-clock.d.ts +16 -0
  133. package/testing/mock-keys.d.ts +81 -0
  134. package/testing/mock-mouse.d.ts +38 -0
  135. package/testing/mock-tree-sitter-client.d.ts +23 -0
  136. package/testing/spy.d.ts +7 -0
  137. package/testing/test-recorder.d.ts +61 -0
  138. package/testing/test-renderer.d.ts +23 -0
  139. package/testing.d.ts +6 -0
  140. package/testing.js +675 -0
  141. package/testing.js.map +15 -0
  142. package/text-buffer-view.d.ts +42 -0
  143. package/text-buffer.d.ts +67 -0
  144. package/types.d.ts +131 -0
  145. package/utils.d.ts +14 -0
  146. package/zig-structs.d.ts +155 -0
  147. package/zig.d.ts +351 -0
@@ -0,0 +1,508 @@
1
+ import { OptimizedBuffer } from "../buffer.js";
2
+ import { type ColorInput } from "./RGBA.js";
3
+ export type ASCIIFontName = "tiny" | "block" | "shade" | "slick" | "huge" | "grid" | "pallet";
4
+ export declare const fonts: {
5
+ tiny: {
6
+ name: string;
7
+ version: string;
8
+ homepage: string;
9
+ colors: number;
10
+ lines: number;
11
+ buffer: string[];
12
+ letterspace: string[];
13
+ letterspace_size: number;
14
+ chars: {
15
+ A: string[];
16
+ B: string[];
17
+ C: string[];
18
+ D: string[];
19
+ E: string[];
20
+ F: string[];
21
+ G: string[];
22
+ H: string[];
23
+ I: string[];
24
+ J: string[];
25
+ K: string[];
26
+ L: string[];
27
+ M: string[];
28
+ N: string[];
29
+ O: string[];
30
+ P: string[];
31
+ Q: string[];
32
+ R: string[];
33
+ S: string[];
34
+ T: string[];
35
+ U: string[];
36
+ V: string[];
37
+ W: string[];
38
+ X: string[];
39
+ Y: string[];
40
+ Z: string[];
41
+ "0": string[];
42
+ "1": string[];
43
+ "2": string[];
44
+ "3": string[];
45
+ "4": string[];
46
+ "5": string[];
47
+ "6": string[];
48
+ "7": string[];
49
+ "8": string[];
50
+ "9": string[];
51
+ "!": string[];
52
+ "?": string[];
53
+ ".": string[];
54
+ "+": string[];
55
+ "-": string[];
56
+ _: string[];
57
+ "=": string[];
58
+ "@": string[];
59
+ "#": string[];
60
+ $: string[];
61
+ "%": string[];
62
+ "&": string[];
63
+ "(": string[];
64
+ ")": string[];
65
+ "/": string[];
66
+ ":": string[];
67
+ ";": string[];
68
+ ",": string[];
69
+ "'": string[];
70
+ "\"": string[];
71
+ " ": string[];
72
+ };
73
+ };
74
+ block: {
75
+ name: string;
76
+ version: string;
77
+ homepage: string;
78
+ colors: number;
79
+ lines: number;
80
+ buffer: string[];
81
+ letterspace: string[];
82
+ letterspace_size: number;
83
+ chars: {
84
+ A: string[];
85
+ B: string[];
86
+ C: string[];
87
+ D: string[];
88
+ E: string[];
89
+ F: string[];
90
+ G: string[];
91
+ H: string[];
92
+ I: string[];
93
+ J: string[];
94
+ K: string[];
95
+ L: string[];
96
+ M: string[];
97
+ N: string[];
98
+ O: string[];
99
+ P: string[];
100
+ Q: string[];
101
+ R: string[];
102
+ S: string[];
103
+ T: string[];
104
+ U: string[];
105
+ V: string[];
106
+ W: string[];
107
+ X: string[];
108
+ Y: string[];
109
+ Z: string[];
110
+ "0": string[];
111
+ "1": string[];
112
+ "2": string[];
113
+ "3": string[];
114
+ "4": string[];
115
+ "5": string[];
116
+ "6": string[];
117
+ "7": string[];
118
+ "8": string[];
119
+ "9": string[];
120
+ "!": string[];
121
+ "?": string[];
122
+ ".": string[];
123
+ "+": string[];
124
+ "-": string[];
125
+ _: string[];
126
+ "=": string[];
127
+ "@": string[];
128
+ "#": string[];
129
+ $: string[];
130
+ "%": string[];
131
+ "&": string[];
132
+ "(": string[];
133
+ ")": string[];
134
+ "/": string[];
135
+ ":": string[];
136
+ ";": string[];
137
+ ",": string[];
138
+ "'": string[];
139
+ "\"": string[];
140
+ " ": string[];
141
+ };
142
+ };
143
+ shade: {
144
+ name: string;
145
+ version: string;
146
+ homepage: string;
147
+ colors: number;
148
+ lines: number;
149
+ buffer: string[];
150
+ letterspace: string[];
151
+ letterspace_size: number;
152
+ chars: {
153
+ A: string[];
154
+ B: string[];
155
+ C: string[];
156
+ D: string[];
157
+ E: string[];
158
+ F: string[];
159
+ G: string[];
160
+ H: string[];
161
+ I: string[];
162
+ J: string[];
163
+ K: string[];
164
+ L: string[];
165
+ M: string[];
166
+ N: string[];
167
+ O: string[];
168
+ P: string[];
169
+ Q: string[];
170
+ R: string[];
171
+ S: string[];
172
+ T: string[];
173
+ U: string[];
174
+ V: string[];
175
+ W: string[];
176
+ X: string[];
177
+ Y: string[];
178
+ Z: string[];
179
+ "0": string[];
180
+ "1": string[];
181
+ "2": string[];
182
+ "3": string[];
183
+ "4": string[];
184
+ "5": string[];
185
+ "6": string[];
186
+ "7": string[];
187
+ "8": string[];
188
+ "9": string[];
189
+ "!": string[];
190
+ "?": string[];
191
+ ".": string[];
192
+ "+": string[];
193
+ "-": string[];
194
+ _: string[];
195
+ "=": string[];
196
+ "@": string[];
197
+ "#": string[];
198
+ $: string[];
199
+ "%": string[];
200
+ "&": string[];
201
+ "(": string[];
202
+ ")": string[];
203
+ "/": string[];
204
+ ":": string[];
205
+ ";": string[];
206
+ ",": string[];
207
+ "'": string[];
208
+ "\"": string[];
209
+ " ": string[];
210
+ };
211
+ };
212
+ slick: {
213
+ name: string;
214
+ version: string;
215
+ homepage: string;
216
+ colors: number;
217
+ lines: number;
218
+ buffer: string[];
219
+ letterspace: string[];
220
+ letterspace_size: number;
221
+ chars: {
222
+ A: string[];
223
+ B: string[];
224
+ C: string[];
225
+ D: string[];
226
+ E: string[];
227
+ F: string[];
228
+ G: string[];
229
+ H: string[];
230
+ I: string[];
231
+ J: string[];
232
+ K: string[];
233
+ L: string[];
234
+ M: string[];
235
+ N: string[];
236
+ O: string[];
237
+ P: string[];
238
+ Q: string[];
239
+ R: string[];
240
+ S: string[];
241
+ T: string[];
242
+ U: string[];
243
+ V: string[];
244
+ W: string[];
245
+ X: string[];
246
+ Y: string[];
247
+ Z: string[];
248
+ "0": string[];
249
+ "1": string[];
250
+ "2": string[];
251
+ "3": string[];
252
+ "4": string[];
253
+ "5": string[];
254
+ "6": string[];
255
+ "7": string[];
256
+ "8": string[];
257
+ "9": string[];
258
+ "!": string[];
259
+ "?": string[];
260
+ ".": string[];
261
+ "+": string[];
262
+ "-": string[];
263
+ _: string[];
264
+ "=": string[];
265
+ "@": string[];
266
+ "#": string[];
267
+ $: string[];
268
+ "%": string[];
269
+ "&": string[];
270
+ "(": string[];
271
+ ")": string[];
272
+ "/": string[];
273
+ ":": string[];
274
+ ";": string[];
275
+ ",": string[];
276
+ "'": string[];
277
+ "\"": string[];
278
+ " ": string[];
279
+ };
280
+ };
281
+ huge: {
282
+ name: string;
283
+ version: string;
284
+ homepage: string;
285
+ colors: number;
286
+ lines: number;
287
+ buffer: string[];
288
+ letterspace: string[];
289
+ letterspace_size: number;
290
+ chars: {
291
+ A: string[];
292
+ B: string[];
293
+ C: string[];
294
+ D: string[];
295
+ E: string[];
296
+ F: string[];
297
+ G: string[];
298
+ H: string[];
299
+ I: string[];
300
+ J: string[];
301
+ K: string[];
302
+ L: string[];
303
+ M: string[];
304
+ N: string[];
305
+ O: string[];
306
+ P: string[];
307
+ Q: string[];
308
+ R: string[];
309
+ S: string[];
310
+ T: string[];
311
+ U: string[];
312
+ V: string[];
313
+ W: string[];
314
+ X: string[];
315
+ Y: string[];
316
+ Z: string[];
317
+ "0": string[];
318
+ "1": string[];
319
+ "2": string[];
320
+ "3": string[];
321
+ "4": string[];
322
+ "5": string[];
323
+ "6": string[];
324
+ "7": string[];
325
+ "8": string[];
326
+ "9": string[];
327
+ "!": string[];
328
+ "?": string[];
329
+ ".": string[];
330
+ "+": string[];
331
+ "-": string[];
332
+ _: string[];
333
+ "=": string[];
334
+ "@": string[];
335
+ "#": string[];
336
+ $: string[];
337
+ "%": string[];
338
+ "&": string[];
339
+ "(": string[];
340
+ ")": string[];
341
+ "/": string[];
342
+ ":": string[];
343
+ ";": string[];
344
+ ",": string[];
345
+ "'": string[];
346
+ "\"": string[];
347
+ " ": string[];
348
+ };
349
+ };
350
+ grid: {
351
+ name: string;
352
+ version: string;
353
+ homepage: string;
354
+ colors: number;
355
+ lines: number;
356
+ buffer: string[];
357
+ letterspace: string[];
358
+ letterspace_size: number;
359
+ chars: {
360
+ A: string[];
361
+ B: string[];
362
+ C: string[];
363
+ D: string[];
364
+ E: string[];
365
+ F: string[];
366
+ G: string[];
367
+ H: string[];
368
+ I: string[];
369
+ J: string[];
370
+ K: string[];
371
+ L: string[];
372
+ M: string[];
373
+ N: string[];
374
+ O: string[];
375
+ P: string[];
376
+ Q: string[];
377
+ R: string[];
378
+ S: string[];
379
+ T: string[];
380
+ U: string[];
381
+ V: string[];
382
+ W: string[];
383
+ X: string[];
384
+ Y: string[];
385
+ Z: string[];
386
+ "0": string[];
387
+ "1": string[];
388
+ "2": string[];
389
+ "3": string[];
390
+ "4": string[];
391
+ "5": string[];
392
+ "6": string[];
393
+ "7": string[];
394
+ "8": string[];
395
+ "9": string[];
396
+ "!": string[];
397
+ "?": string[];
398
+ ".": string[];
399
+ "+": string[];
400
+ "-": string[];
401
+ _: string[];
402
+ "=": string[];
403
+ "@": string[];
404
+ "#": string[];
405
+ $: string[];
406
+ "%": string[];
407
+ "&": string[];
408
+ "(": string[];
409
+ ")": string[];
410
+ "/": string[];
411
+ ":": string[];
412
+ ";": string[];
413
+ ",": string[];
414
+ "'": string[];
415
+ "\"": string[];
416
+ " ": string[];
417
+ };
418
+ };
419
+ pallet: {
420
+ name: string;
421
+ version: string;
422
+ homepage: string;
423
+ colors: number;
424
+ lines: number;
425
+ buffer: string[];
426
+ letterspace: string[];
427
+ letterspace_size: number;
428
+ chars: {
429
+ A: string[];
430
+ B: string[];
431
+ C: string[];
432
+ D: string[];
433
+ E: string[];
434
+ F: string[];
435
+ G: string[];
436
+ H: string[];
437
+ I: string[];
438
+ J: string[];
439
+ K: string[];
440
+ L: string[];
441
+ M: string[];
442
+ N: string[];
443
+ O: string[];
444
+ P: string[];
445
+ Q: string[];
446
+ R: string[];
447
+ S: string[];
448
+ T: string[];
449
+ U: string[];
450
+ V: string[];
451
+ W: string[];
452
+ X: string[];
453
+ Y: string[];
454
+ Z: string[];
455
+ "0": string[];
456
+ "1": string[];
457
+ "2": string[];
458
+ "3": string[];
459
+ "4": string[];
460
+ "5": string[];
461
+ "6": string[];
462
+ "7": string[];
463
+ "8": string[];
464
+ "9": string[];
465
+ "!": string[];
466
+ "?": string[];
467
+ ".": string[];
468
+ "+": string[];
469
+ "-": string[];
470
+ _: string[];
471
+ "=": string[];
472
+ "@": string[];
473
+ "#": string[];
474
+ $: string[];
475
+ "%": string[];
476
+ "&": string[];
477
+ "(": string[];
478
+ ")": string[];
479
+ "/": string[];
480
+ ":": string[];
481
+ ";": string[];
482
+ ",": string[];
483
+ "'": string[];
484
+ "\"": string[];
485
+ " ": string[];
486
+ };
487
+ };
488
+ };
489
+ export declare function measureText({ text, font }: {
490
+ text: string;
491
+ font?: keyof typeof fonts;
492
+ }): {
493
+ width: number;
494
+ height: number;
495
+ };
496
+ export declare function getCharacterPositions(text: string, font?: keyof typeof fonts): number[];
497
+ export declare function coordinateToCharacterIndex(x: number, text: string, font?: keyof typeof fonts): number;
498
+ export declare function renderFontToFrameBuffer(buffer: OptimizedBuffer, { text, x, y, color, backgroundColor, font, }: {
499
+ text: string;
500
+ x?: number;
501
+ y?: number;
502
+ color?: ColorInput | ColorInput[];
503
+ backgroundColor?: ColorInput;
504
+ font?: keyof typeof fonts;
505
+ }): {
506
+ width: number;
507
+ height: number;
508
+ };
@@ -0,0 +1,49 @@
1
+ import type { ColorInput } from "./RGBA.js";
2
+ export interface BorderCharacters {
3
+ topLeft: string;
4
+ topRight: string;
5
+ bottomLeft: string;
6
+ bottomRight: string;
7
+ horizontal: string;
8
+ vertical: string;
9
+ topT: string;
10
+ bottomT: string;
11
+ leftT: string;
12
+ rightT: string;
13
+ cross: string;
14
+ }
15
+ export type BorderStyle = "single" | "double" | "rounded" | "heavy";
16
+ export type BorderSides = "top" | "right" | "bottom" | "left";
17
+ export declare function isValidBorderStyle(value: unknown): value is BorderStyle;
18
+ export declare function parseBorderStyle(value: unknown, fallback?: BorderStyle): BorderStyle;
19
+ export declare const BorderChars: Record<BorderStyle, BorderCharacters>;
20
+ export interface BorderConfig {
21
+ borderStyle: BorderStyle;
22
+ border: boolean | BorderSides[];
23
+ borderColor?: ColorInput;
24
+ customBorderChars?: BorderCharacters;
25
+ }
26
+ export interface BoxDrawOptions {
27
+ x: number;
28
+ y: number;
29
+ width: number;
30
+ height: number;
31
+ borderStyle: BorderStyle;
32
+ border: boolean | BorderSides[];
33
+ borderColor: ColorInput;
34
+ customBorderChars?: BorderCharacters;
35
+ backgroundColor: ColorInput;
36
+ shouldFill?: boolean;
37
+ title?: string;
38
+ titleAlignment?: "left" | "center" | "right";
39
+ }
40
+ export interface BorderSidesConfig {
41
+ top: boolean;
42
+ right: boolean;
43
+ bottom: boolean;
44
+ left: boolean;
45
+ }
46
+ export declare function getBorderFromSides(sides: BorderSidesConfig): boolean | BorderSides[];
47
+ export declare function getBorderSides(border: boolean | BorderSides[]): BorderSidesConfig;
48
+ export declare function borderCharsToArray(chars: BorderCharacters): Uint32Array;
49
+ export declare const BorderCharArrays: Record<BorderStyle, Uint32Array>;
package/lib/bunfs.d.ts ADDED
@@ -0,0 +1,7 @@
1
+ export declare function isBunfsPath(path: string): boolean;
2
+ export declare function getBunfsRootPath(): string;
3
+ /**
4
+ * Normalizes a path to the embedded root.
5
+ * Flattens directory structure to ensure file exists at root.
6
+ */
7
+ export declare function normalizeBunfsPath(fileName: string): string;
@@ -0,0 +1,17 @@
1
+ import type { Pointer } from "bun:ffi";
2
+ import type { RenderLib } from "../zig.js";
3
+ export declare enum ClipboardTarget {
4
+ Clipboard = 0,
5
+ Primary = 1,
6
+ Secondary = 2,
7
+ Query = 3
8
+ }
9
+ export declare function encodeOsc52Payload(text: string, encoder?: TextEncoder): Uint8Array;
10
+ export declare class Clipboard {
11
+ private lib;
12
+ private rendererPtr;
13
+ constructor(lib: RenderLib, rendererPtr: Pointer);
14
+ copyToClipboardOSC52(text: string, target?: ClipboardTarget): boolean;
15
+ clearClipboardOSC52(target?: ClipboardTarget): boolean;
16
+ isOsc52Supported(): boolean;
17
+ }
package/lib/clock.d.ts ADDED
@@ -0,0 +1,15 @@
1
+ export type TimerHandle = ReturnType<typeof globalThis.setTimeout> | number;
2
+ export interface Clock {
3
+ now(): number;
4
+ setTimeout(fn: () => void, delayMs: number): TimerHandle;
5
+ clearTimeout(handle: TimerHandle): void;
6
+ setInterval(fn: () => void, delayMs: number): TimerHandle;
7
+ clearInterval(handle: TimerHandle): void;
8
+ }
9
+ export declare class SystemClock implements Clock {
10
+ now(): number;
11
+ setTimeout(fn: () => void, delayMs: number): TimerHandle;
12
+ clearTimeout(handle: TimerHandle): void;
13
+ setInterval(fn: () => void, delayMs: number): TimerHandle;
14
+ clearInterval(handle: TimerHandle): void;
15
+ }
@@ -0,0 +1,26 @@
1
+ import { EventEmitter } from "events";
2
+ export interface DataPaths {
3
+ globalConfigPath: string;
4
+ globalConfigFile: string;
5
+ localConfigFile: string;
6
+ globalDataPath: string;
7
+ }
8
+ export interface DataPathsEvents {
9
+ "paths:changed": [paths: DataPaths];
10
+ }
11
+ export declare class DataPathsManager extends EventEmitter<DataPathsEvents> {
12
+ private _appName;
13
+ private _globalConfigPath?;
14
+ private _globalConfigFile?;
15
+ private _localConfigFile?;
16
+ private _globalDataPath?;
17
+ constructor();
18
+ get appName(): string;
19
+ set appName(value: string);
20
+ get globalConfigPath(): string;
21
+ get globalConfigFile(): string;
22
+ get localConfigFile(): string;
23
+ get globalDataPath(): string;
24
+ toObject(): DataPaths;
25
+ }
26
+ export declare function getDataPaths(): DataPathsManager;
@@ -0,0 +1,42 @@
1
+ /**
2
+ * Debounce controller that manages debounce instances for a specific scope
3
+ */
4
+ export declare class DebounceController {
5
+ private scopeId;
6
+ constructor(scopeId: string | number);
7
+ /**
8
+ * Debounces the provided function with the given ID
9
+ *
10
+ * @param id Unique identifier within this scope
11
+ * @param ms Milliseconds to wait before executing
12
+ * @param fn Function to execute
13
+ */
14
+ debounce<R>(id: string | number, ms: number, fn: () => Promise<R>): Promise<R>;
15
+ /**
16
+ * Clear a specific debounce timer in this scope
17
+ *
18
+ * @param id The debounce ID to clear
19
+ */
20
+ clearDebounce(id: string | number): void;
21
+ /**
22
+ * Clear all debounce timers in this scope
23
+ */
24
+ clear(): void;
25
+ }
26
+ /**
27
+ * Creates a new debounce controller for a specific scope
28
+ *
29
+ * @param scopeId Unique identifier for this debounce scope
30
+ * @returns A DebounceController for the specified scope
31
+ */
32
+ export declare function createDebounce(scopeId: string | number): DebounceController;
33
+ /**
34
+ * Clears all debounce timers for a specific scope
35
+ *
36
+ * @param scopeId The scope identifier
37
+ */
38
+ export declare function clearDebounceScope(scopeId: string | number): void;
39
+ /**
40
+ * Clears all active debounce timers across all scopes
41
+ */
42
+ export declare function clearAllDebounces(): void;
@@ -0,0 +1,6 @@
1
+ import type { TextChunk } from "../text-buffer";
2
+ import type { SimpleHighlight } from "./tree-sitter/types";
3
+ export declare function detectLinks(chunks: TextChunk[], context: {
4
+ content: string;
5
+ highlights: SimpleHighlight[];
6
+ }): TextChunk[];