linecraft 0.1.0 → 0.2.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.
Files changed (283) hide show
  1. package/LICENSE +1 -1
  2. package/README.md +313 -64
  3. package/lib/api/color.d.ts +6 -0
  4. package/lib/api/color.d.ts.map +1 -0
  5. package/lib/api/color.js +9 -0
  6. package/lib/api/color.js.map +1 -0
  7. package/lib/api/color.test.d.ts +2 -0
  8. package/lib/api/color.test.d.ts.map +1 -0
  9. package/lib/api/color.test.js +23 -0
  10. package/lib/api/color.test.js.map +1 -0
  11. package/lib/api/flex.d.ts +55 -0
  12. package/lib/api/flex.d.ts.map +1 -0
  13. package/lib/api/flex.js +86 -0
  14. package/lib/api/flex.js.map +1 -0
  15. package/lib/api/flex.test.d.ts +2 -0
  16. package/lib/api/flex.test.d.ts.map +1 -0
  17. package/lib/api/flex.test.js +82 -0
  18. package/lib/api/flex.test.js.map +1 -0
  19. package/lib/api/grid.d.ts +22 -0
  20. package/lib/api/grid.d.ts.map +1 -0
  21. package/lib/api/grid.js +65 -0
  22. package/lib/api/grid.js.map +1 -0
  23. package/lib/api/grid.test.d.ts +2 -0
  24. package/lib/api/grid.test.d.ts.map +1 -0
  25. package/lib/api/grid.test.js +48 -0
  26. package/lib/api/grid.test.js.map +1 -0
  27. package/lib/components/base.d.ts +53 -0
  28. package/lib/components/base.d.ts.map +1 -0
  29. package/lib/components/base.js +47 -0
  30. package/lib/components/base.js.map +1 -0
  31. package/lib/components/col.d.ts +35 -0
  32. package/lib/components/col.d.ts.map +1 -0
  33. package/lib/components/col.js +168 -0
  34. package/lib/components/col.js.map +1 -0
  35. package/lib/components/col.test.d.ts +2 -0
  36. package/lib/components/col.test.d.ts.map +1 -0
  37. package/lib/components/col.test.js +96 -0
  38. package/lib/components/col.test.js.map +1 -0
  39. package/lib/components/index.d.ts +3 -0
  40. package/lib/components/index.d.ts.map +1 -0
  41. package/lib/components/index.js +5 -0
  42. package/lib/components/index.js.map +1 -0
  43. package/lib/components/progress-bar-grid.d.ts +20 -0
  44. package/lib/components/progress-bar-grid.d.ts.map +1 -0
  45. package/lib/components/progress-bar-grid.js +44 -0
  46. package/lib/components/progress-bar-grid.js.map +1 -0
  47. package/lib/components/progress-bar-grid.test.d.ts +2 -0
  48. package/lib/components/progress-bar-grid.test.d.ts.map +1 -0
  49. package/lib/components/progress-bar-grid.test.js +101 -0
  50. package/lib/components/progress-bar-grid.test.js.map +1 -0
  51. package/lib/components/progress-bar.d.ts +26 -3
  52. package/lib/components/progress-bar.d.ts.map +1 -1
  53. package/lib/components/progress-bar.js +62 -6
  54. package/lib/components/progress-bar.js.map +1 -1
  55. package/lib/components/progress-bar.test.d.ts +2 -0
  56. package/lib/components/progress-bar.test.d.ts.map +1 -0
  57. package/lib/components/progress-bar.test.js +153 -0
  58. package/lib/components/progress-bar.test.js.map +1 -0
  59. package/lib/components/prompt.d.ts +14 -0
  60. package/lib/components/prompt.d.ts.map +1 -0
  61. package/lib/components/prompt.js +77 -0
  62. package/lib/components/prompt.js.map +1 -0
  63. package/lib/components/renderable.d.ts +42 -0
  64. package/lib/components/renderable.d.ts.map +1 -0
  65. package/lib/components/renderable.js +225 -0
  66. package/lib/components/renderable.js.map +1 -0
  67. package/lib/components/spinner.d.ts +2 -2
  68. package/lib/components/spinner.d.ts.map +1 -1
  69. package/lib/components/spinner.js +3 -1
  70. package/lib/components/spinner.js.map +1 -1
  71. package/lib/components/spinner.test.d.ts +2 -0
  72. package/lib/components/spinner.test.d.ts.map +1 -0
  73. package/lib/components/spinner.test.js +168 -0
  74. package/lib/components/spinner.test.js.map +1 -0
  75. package/lib/components/style.d.ts +16 -0
  76. package/lib/components/style.d.ts.map +1 -0
  77. package/lib/components/style.js +72 -0
  78. package/lib/components/style.js.map +1 -0
  79. package/lib/components/style.test.d.ts +2 -0
  80. package/lib/components/style.test.d.ts.map +1 -0
  81. package/lib/components/style.test.js +135 -0
  82. package/lib/components/style.test.js.map +1 -0
  83. package/lib/components/text.d.ts +24 -0
  84. package/lib/components/text.d.ts.map +1 -0
  85. package/lib/components/text.js +65 -0
  86. package/lib/components/text.js.map +1 -0
  87. package/lib/drawing/boxes.d.ts +33 -0
  88. package/lib/drawing/boxes.d.ts.map +1 -0
  89. package/lib/drawing/boxes.js +76 -0
  90. package/lib/drawing/boxes.js.map +1 -0
  91. package/lib/index.d.ts +18 -11
  92. package/lib/index.d.ts.map +1 -1
  93. package/lib/index.js +21 -10
  94. package/lib/index.js.map +1 -1
  95. package/lib/index.test.d.ts +2 -0
  96. package/lib/index.test.d.ts.map +1 -0
  97. package/lib/index.test.js +80 -0
  98. package/lib/index.test.js.map +1 -0
  99. package/lib/layout/flex.d.ts +39 -0
  100. package/lib/layout/flex.d.ts.map +1 -0
  101. package/lib/layout/flex.js +300 -0
  102. package/lib/layout/flex.js.map +1 -0
  103. package/lib/layout/flex.test.d.ts +2 -0
  104. package/lib/layout/flex.test.d.ts.map +1 -0
  105. package/lib/layout/flex.test.js +206 -0
  106. package/lib/layout/flex.test.js.map +1 -0
  107. package/lib/layout/grid.d.ts +53 -0
  108. package/lib/layout/grid.d.ts.map +1 -0
  109. package/lib/layout/grid.js +421 -0
  110. package/lib/layout/grid.js.map +1 -0
  111. package/lib/layout/grid.test.d.ts +2 -0
  112. package/lib/layout/grid.test.d.ts.map +1 -0
  113. package/lib/layout/grid.test.js +139 -0
  114. package/lib/layout/grid.test.js.map +1 -0
  115. package/lib/native/ansi.d.ts +104 -0
  116. package/lib/native/ansi.d.ts.map +1 -0
  117. package/lib/native/ansi.js +120 -0
  118. package/lib/native/ansi.js.map +1 -0
  119. package/lib/native/ansi.test.d.ts +2 -0
  120. package/lib/native/ansi.test.d.ts.map +1 -0
  121. package/lib/native/ansi.test.js +57 -0
  122. package/lib/native/ansi.test.js.map +1 -0
  123. package/lib/native/buffer.d.ts +32 -0
  124. package/lib/native/buffer.d.ts.map +1 -0
  125. package/lib/native/buffer.js +49 -0
  126. package/lib/native/buffer.js.map +1 -0
  127. package/lib/native/buffer.test.d.ts +2 -0
  128. package/lib/native/buffer.test.d.ts.map +1 -0
  129. package/lib/native/buffer.test.js +64 -0
  130. package/lib/native/buffer.test.js.map +1 -0
  131. package/lib/native/diff.d.ts +20 -0
  132. package/lib/native/diff.d.ts.map +1 -0
  133. package/lib/native/diff.js +33 -0
  134. package/lib/native/diff.js.map +1 -0
  135. package/lib/native/diff.test.d.ts +2 -0
  136. package/lib/native/diff.test.d.ts.map +1 -0
  137. package/lib/native/diff.test.js +106 -0
  138. package/lib/native/diff.test.js.map +1 -0
  139. package/lib/native/region-old.d.ts +117 -0
  140. package/lib/native/region-old.d.ts.map +1 -0
  141. package/lib/native/region-old.js +539 -0
  142. package/lib/native/region-old.js.map +1 -0
  143. package/lib/native/region-renderer.d.ts +167 -0
  144. package/lib/native/region-renderer.d.ts.map +1 -0
  145. package/lib/native/region-renderer.js +1238 -0
  146. package/lib/native/region-renderer.js.map +1 -0
  147. package/lib/native/region-simple.d.ts +44 -0
  148. package/lib/native/region-simple.d.ts.map +1 -0
  149. package/lib/native/region-simple.js +290 -0
  150. package/lib/native/region-simple.js.map +1 -0
  151. package/lib/native/region.d.ts +53 -0
  152. package/lib/native/region.d.ts.map +1 -0
  153. package/lib/native/region.js +426 -0
  154. package/lib/native/region.js.map +1 -0
  155. package/lib/native/region.test.d.ts +2 -0
  156. package/lib/native/region.test.d.ts.map +1 -0
  157. package/lib/native/region.test.js +248 -0
  158. package/lib/native/region.test.js.map +1 -0
  159. package/lib/native/throttle.d.ts +29 -0
  160. package/lib/native/throttle.d.ts.map +1 -0
  161. package/lib/native/throttle.js +57 -0
  162. package/lib/native/throttle.js.map +1 -0
  163. package/lib/native/throttle.test.d.ts +2 -0
  164. package/lib/native/throttle.test.d.ts.map +1 -0
  165. package/lib/native/throttle.test.js +86 -0
  166. package/lib/native/throttle.test.js.map +1 -0
  167. package/lib/native.d.ts +5 -11
  168. package/lib/native.d.ts.map +1 -1
  169. package/lib/native.js +8 -64
  170. package/lib/native.js.map +1 -1
  171. package/lib/region.d.ts +48 -5
  172. package/lib/region.d.ts.map +1 -1
  173. package/lib/region.js +474 -36
  174. package/lib/region.js.map +1 -1
  175. package/lib/region.test.d.ts +2 -0
  176. package/lib/region.test.d.ts.map +1 -0
  177. package/lib/region.test.js +227 -0
  178. package/lib/region.test.js.map +1 -0
  179. package/lib/region.visual.test.d.ts +2 -0
  180. package/lib/region.visual.test.d.ts.map +1 -0
  181. package/lib/region.visual.test.js +55 -0
  182. package/lib/region.visual.test.js.map +1 -0
  183. package/lib/test-helpers/capturable-terminal.d.ts +61 -0
  184. package/lib/test-helpers/capturable-terminal.d.ts.map +1 -0
  185. package/lib/test-helpers/capturable-terminal.js +113 -0
  186. package/lib/test-helpers/capturable-terminal.js.map +1 -0
  187. package/lib/test-helpers/capturable-terminal.test.d.ts +2 -0
  188. package/lib/test-helpers/capturable-terminal.test.d.ts.map +1 -0
  189. package/lib/test-helpers/capturable-terminal.test.js +45 -0
  190. package/lib/test-helpers/capturable-terminal.test.js.map +1 -0
  191. package/lib/test-helpers/mock-region.d.ts +21 -0
  192. package/lib/test-helpers/mock-region.d.ts.map +1 -0
  193. package/lib/test-helpers/mock-region.js +37 -0
  194. package/lib/test-helpers/mock-region.js.map +1 -0
  195. package/lib/test-helpers/virtual-terminal-diff-reflow.test.d.ts +2 -0
  196. package/lib/test-helpers/virtual-terminal-diff-reflow.test.d.ts.map +1 -0
  197. package/lib/test-helpers/virtual-terminal-diff-reflow.test.js +256 -0
  198. package/lib/test-helpers/virtual-terminal-diff-reflow.test.js.map +1 -0
  199. package/lib/test-helpers/virtual-terminal-flex-resize.test.d.ts +2 -0
  200. package/lib/test-helpers/virtual-terminal-flex-resize.test.d.ts.map +1 -0
  201. package/lib/test-helpers/virtual-terminal-flex-resize.test.js +438 -0
  202. package/lib/test-helpers/virtual-terminal-flex-resize.test.js.map +1 -0
  203. package/lib/test-helpers/virtual-terminal.d.ts +176 -0
  204. package/lib/test-helpers/virtual-terminal.d.ts.map +1 -0
  205. package/lib/test-helpers/virtual-terminal.js +492 -0
  206. package/lib/test-helpers/virtual-terminal.js.map +1 -0
  207. package/lib/test-helpers/virtual-terminal.test.d.ts +2 -0
  208. package/lib/test-helpers/virtual-terminal.test.d.ts.map +1 -0
  209. package/lib/test-helpers/virtual-terminal.test.js +219 -0
  210. package/lib/test-helpers/virtual-terminal.test.js.map +1 -0
  211. package/lib/ts/components/spinner.test.d.ts +2 -0
  212. package/lib/ts/components/spinner.test.d.ts.map +1 -0
  213. package/lib/ts/components/spinner.test.js +168 -0
  214. package/lib/ts/components/spinner.test.js.map +1 -0
  215. package/lib/ts/utils/colors.test.d.ts +2 -0
  216. package/lib/ts/utils/colors.test.d.ts.map +1 -0
  217. package/lib/ts/utils/colors.test.js +87 -0
  218. package/lib/ts/utils/colors.test.js.map +1 -0
  219. package/lib/types.d.ts +8 -2
  220. package/lib/types.d.ts.map +1 -1
  221. package/lib/types.js.map +1 -1
  222. package/lib/utils/colors-simple.d.ts +51 -0
  223. package/lib/utils/colors-simple.d.ts.map +1 -0
  224. package/lib/utils/colors-simple.js +59 -0
  225. package/lib/utils/colors-simple.js.map +1 -0
  226. package/lib/utils/colors.d.ts +1 -1
  227. package/lib/utils/colors.d.ts.map +1 -1
  228. package/lib/utils/colors.js.map +1 -1
  229. package/lib/utils/colors.test.d.ts +2 -0
  230. package/lib/utils/colors.test.d.ts.map +1 -0
  231. package/lib/utils/colors.test.js +87 -0
  232. package/lib/utils/colors.test.js.map +1 -0
  233. package/lib/utils/cursor-position.d.ts +22 -0
  234. package/lib/utils/cursor-position.d.ts.map +1 -0
  235. package/lib/utils/cursor-position.js +139 -0
  236. package/lib/utils/cursor-position.js.map +1 -0
  237. package/lib/utils/debug-log.d.ts +2 -0
  238. package/lib/utils/debug-log.d.ts.map +1 -0
  239. package/lib/utils/debug-log.js +36 -0
  240. package/lib/utils/debug-log.js.map +1 -0
  241. package/lib/utils/terminal.d.ts +27 -0
  242. package/lib/utils/terminal.d.ts.map +1 -0
  243. package/lib/utils/terminal.js +116 -0
  244. package/lib/utils/terminal.js.map +1 -0
  245. package/lib/utils/text.d.ts +21 -0
  246. package/lib/utils/text.d.ts.map +1 -0
  247. package/lib/utils/text.js +82 -0
  248. package/lib/utils/text.js.map +1 -0
  249. package/lib/utils/wait-for-spacebar.d.ts +10 -0
  250. package/lib/utils/wait-for-spacebar.d.ts.map +1 -0
  251. package/lib/utils/wait-for-spacebar.js +71 -0
  252. package/lib/utils/wait-for-spacebar.js.map +1 -0
  253. package/package.json +31 -28
  254. package/.cursor/plan.md +0 -952
  255. package/TESTING.md +0 -102
  256. package/build.zig +0 -100
  257. package/examples/basic-progress.ts +0 -21
  258. package/examples/multi-lane.ts +0 -29
  259. package/examples/spinner.ts +0 -20
  260. package/examples/test-basic.ts +0 -23
  261. package/src/ts/components/progress-bar.ts +0 -53
  262. package/src/ts/components/spinner.ts +0 -56
  263. package/src/ts/index.ts +0 -37
  264. package/src/ts/native.ts +0 -86
  265. package/src/ts/region.ts +0 -89
  266. package/src/ts/types/ffi-napi.d.ts +0 -11
  267. package/src/ts/types/ref-napi.d.ts +0 -5
  268. package/src/ts/types.ts +0 -53
  269. package/src/ts/utils/colors.ts +0 -72
  270. package/src/zig/ansi.zig +0 -21
  271. package/src/zig/buffer.zig +0 -37
  272. package/src/zig/diff.zig +0 -43
  273. package/src/zig/region.zig +0 -292
  274. package/src/zig/renderer.zig +0 -92
  275. package/src/zig/test_ansi.zig +0 -66
  276. package/src/zig/test_buffer.zig +0 -82
  277. package/src/zig/test_diff.zig +0 -220
  278. package/src/zig/test_integration.zig +0 -76
  279. package/src/zig/test_region.zig +0 -191
  280. package/src/zig/test_runner.zig +0 -27
  281. package/src/zig/test_throttle.zig +0 -59
  282. package/src/zig/throttle.zig +0 -38
  283. package/tsconfig.json +0 -21
package/LICENSE CHANGED
@@ -1,6 +1,6 @@
1
1
  MIT License
2
2
 
3
- Copyright (c) 2025 EchoKit Contributors
3
+ Copyright (c) 2025 Linecraft Contributors
4
4
 
5
5
  Permission is hereby granted, free of charge, to any person obtaining a copy
6
6
  of this software and associated documentation files (the "Software"), to deal
package/README.md CHANGED
@@ -1,111 +1,360 @@
1
- # EchoKit
1
+ # Linecraft
2
2
 
3
- High-performance terminal UI library for Node.js with Zig backend.
4
-
5
- EchoKit provides a friendly TypeScript API while leveraging Zig's speed and efficiency for terminal operations like diffing, ANSI cursor movement, buffering, and throttling.
6
-
7
- ## Features
8
-
9
- - **High Performance**: Zig backend handles all performance-critical operations
10
- - **Automatic Batching**: Updates are automatically batched and throttled
11
- - **Dynamic Regions**: Regions expand automatically as you add lines
12
- - **Simple API**: Clean, intuitive TypeScript interface
13
- - **Components**: Built-in progress bars and spinners
3
+ Build terminal UIs with components. Create progress bars, spinners, code error displays, and responsive layouts without the hassle.
14
4
 
15
5
  ## Installation
16
6
 
17
7
  ```bash
18
- pnpm install echokit
8
+ npm install linecraft
9
+ # or
10
+ pnpm add linecraft
19
11
  ```
20
12
 
21
13
  ## Quick Start
22
14
 
23
- ### Basic Progress Bar
24
-
25
15
  ```typescript
26
- import { createRegion, createProgressBar } from 'echokit';
16
+ import { Region, Styled, Spinner, Section, Grid } from 'linecraft';
17
+
18
+ const r = Region();
19
+
20
+ // Set some content
21
+ r.set(
22
+ Section({ title: 'Hello' },
23
+ Grid({ template: [20, '1*'], columnGap: 2 },
24
+ Styled({ color: 'cyan' }, 'Status:'),
25
+ Styled({ color: 'green' }, 'Ready')
26
+ )
27
+ )
28
+ );
29
+
30
+ // Add a spinner
31
+ r.set(
32
+ Section({ title: 'Loading' },
33
+ Grid({ template: [3, '1*'], columnGap: 1 },
34
+ Spinner({ style: 'classic-dots', color: 'green' }),
35
+ Styled({ color: 'white' }, 'Installing packages...')
36
+ )
37
+ )
38
+ );
39
+
40
+ // Clean up when done
41
+ r.destroy(true);
42
+ ```
43
+
44
+ ## Core API
27
45
 
28
- const region = createRegion({ width: 80 });
29
- const progress = createProgressBar(region, 1, {
30
- label: 'Installing packages',
31
- width: 50,
46
+ ### Region
47
+
48
+ A region is a managed area of your terminal. It handles rendering, resizing, and component updates.
49
+
50
+ ```typescript
51
+ const r = Region({
52
+ width: 80, // Optional: auto-detects if not set
53
+ height: 1, // Optional: expands as needed
54
+ debugLog: 'debug.log' // Optional: log rendering for debugging
32
55
  });
56
+ ```
33
57
 
34
- for (let i = 0; i <= 100; i++) {
35
- progress.update(i, 100);
36
- await new Promise(resolve => setTimeout(resolve, 50));
37
- }
58
+ ### Setting Content
38
59
 
39
- progress.finish();
40
- region.destroy();
60
+ ```typescript
61
+ // Replace all content
62
+ r.set('Hello, world!');
63
+
64
+ // Or use components
65
+ r.set(Styled({ color: 'green' }, 'Success!'));
66
+
67
+ // Append content (returns a reference you can use to delete later)
68
+ const ref = r.add('Line 2');
69
+ ref.delete(); // Remove it
41
70
  ```
42
71
 
43
- ### Spinner
72
+ ### Cleanup
73
+
74
+ ```typescript
75
+ r.destroy(true); // Clean up and restore terminal (true = clear first)
76
+ ```
77
+
78
+ ## Components
79
+
80
+ ### Styled
81
+
82
+ Apply colors and styling to text.
83
+
84
+ ```typescript
85
+ import { Styled } from 'linecraft';
86
+
87
+ r.set(Styled({
88
+ color: 'brightGreen',
89
+ bold: true
90
+ }, 'Bold green text'));
91
+ ```
92
+
93
+ **Options:**
94
+ - `color?: Color` - Text color
95
+ - `backgroundColor?: Color` - Background color
96
+ - `bold?: boolean` - Bold text
97
+ - `italic?: boolean` - Italic text
98
+ - `underline?: boolean` - Underlined text
99
+ - `overflow?: 'none' | 'ellipsis-end' | 'ellipsis-start' | 'ellipsis-middle' | 'wrap'` - Text overflow handling
100
+ - `align?: 'left' | 'right' | 'center'` - Text alignment
101
+
102
+ ### Section
103
+
104
+ Wrap content in a bordered box with an optional title.
105
+
106
+ ![Section Example](docs/examples/section.gif)
44
107
 
45
108
  ```typescript
46
- import { createRegion, createSpinner } from 'echokit';
109
+ import { Section } from 'linecraft';
47
110
 
48
- const region = createRegion({ width: 80 });
49
- const spinner = createSpinner(region, 1);
111
+ r.set(Section(
112
+ { title: 'My Section' },
113
+ 'Content goes here'
114
+ ));
115
+ ```
116
+
117
+ **Options:**
118
+ - `title?: string` - Title shown in a tab at the top
119
+ - `titleColor?: Color` - Color of the title
120
+ - `borderColor?: Color` - Color of borders
121
+ - `padding?: number` - Internal padding (default: 1)
122
+ - `left?: boolean` - Show left border (default: true)
123
+ - `right?: boolean` - Show right border (default: true)
124
+ - `top?: boolean` - Show top border (default: true)
125
+ - `bottom?: boolean` - Show bottom border (default: true)
50
126
 
51
- spinner.setText('Processing...');
52
- spinner.start();
127
+ ### CodeDebug
53
128
 
54
- // Do work...
55
- await doWork();
129
+ Display code errors and warnings with line numbers, context, and clickable file paths.
56
130
 
57
- spinner.stop();
58
- region.destroy();
131
+ ![CodeDebug Example](docs/examples/code-debug.gif)
132
+
133
+ ```typescript
134
+ import { CodeDebug } from 'linecraft';
135
+
136
+ r.set(CodeDebug({
137
+ startLine: 42,
138
+ startColumn: 10,
139
+ endLine: 42,
140
+ endColumn: 20,
141
+ errorLine: ' const result = fetchData();',
142
+ lineBefore: ' async function load() {',
143
+ lineAfter: ' return process(result);',
144
+ message: 'Type error: fetchData is not defined',
145
+ filePath: 'src/loaders/data.ts',
146
+ fullPath: '/absolute/path/to/src/loaders/data.ts',
147
+ baseDir: process.cwd(),
148
+ type: 'error' // 'error' | 'warning' | 'info'
149
+ }));
150
+ ```
151
+
152
+ **Features:**
153
+ - Automatic line number coloring (adapts to dark/light terminals)
154
+ - Responsive truncation with ellipsis
155
+ - Curved underlines for error ranges
156
+ - Message wrapping
157
+ - Clickable file paths (OSC 8 links)
158
+ - Context lines (before/after)
159
+
160
+ ### Spinner
161
+
162
+ Animated spinners for loading states. Includes built-in styles or use custom frames.
163
+
164
+ ![Spinner Example](docs/examples/spinner.gif)
165
+
166
+ ```typescript
167
+ import { Spinner } from 'linecraft';
168
+
169
+ // Built-in styles
170
+ r.set(Spinner({
171
+ style: 'classic-dots', // or 'bouncing-bar'
172
+ color: 'green',
173
+ interval: 100
174
+ }));
175
+
176
+ // Custom frames
177
+ r.set(Spinner({
178
+ frames: ['⠋', '⠙', '⠹', '⠸'],
179
+ color: 'yellow',
180
+ interval: 80
181
+ }));
59
182
  ```
60
183
 
61
- ### Custom Layout
184
+ **Options:**
185
+ - `style?: 'classic-dots' | 'bouncing-bar'` - Built-in animation style
186
+ - `frames?: string[]` - Custom frames (overrides style if provided)
187
+ - `interval?: number` - Milliseconds between frames (default: 80)
188
+ - `color?: Color` - Spinner color
189
+ - `autoStart?: boolean` - Start automatically (default: true)
190
+
191
+ Spinners automatically stop when components are replaced or the region is destroyed.
192
+
193
+ ### ProgressBar
194
+
195
+ Progress bars with customizable colors and styling.
196
+
197
+ ![ProgressBar Example](docs/examples/progressbar.gif)
62
198
 
63
199
  ```typescript
64
- import { createRegion } from 'echokit';
200
+ import { progressBar } from 'linecraft';
201
+
202
+ r.set(progressBar({
203
+ current: 75,
204
+ total: 100,
205
+ barColor: 'green',
206
+ bracketColor: 'brightBlack',
207
+ percentColor: 'yellow'
208
+ }));
209
+ ```
65
210
 
66
- const region = createRegion({ width: 80 });
211
+ **Options:**
212
+ - `current: number` - Current progress value
213
+ - `total: number` - Total/max value
214
+ - `barColor?: Color` - Color of the filled bar
215
+ - `bracketColor?: Color` - Color of brackets
216
+ - `percentColor?: Color` - Color of percentage text
217
+
218
+ ### Segments
219
+
220
+ Create segmented displays (like oh-my-zsh style prompts).
67
221
 
68
- // Set individual lines (1-based)
69
- region.setLine(1, { text: 'Status:', style: { bold: true } });
70
- region.setLine(2, ' ✓ Connected');
71
- region.setLine(3, ' ⏳ Processing...');
222
+ ![Segments Example](docs/examples/segments.gif)
72
223
 
73
- // Or set entire content at once
74
- region.set(`Status:
75
- ✓ Connected
76
- ⏳ Processing...
77
- Error`);
224
+ ```typescript
225
+ import { Segments } from 'linecraft';
226
+
227
+ r.set(Segments({
228
+ segments: [
229
+ { content: 'user@host', color: 'brightGreen', backgroundColor: 'blue' },
230
+ { content: '~/projects', color: 'white', backgroundColor: 'brightBlue' },
231
+ { content: 'main', color: 'black', backgroundColor: 'white' }
232
+ ],
233
+ borderStyle: 'cap' // 'cap' | 'brace' | 'round' | 'square' | 'none'
234
+ }));
78
235
  ```
79
236
 
80
- ## API
237
+ **Options:**
238
+ - `segments: Array<{ content: string, color?: Color, backgroundColor?: Color, borderStyle?: BorderStyle }>` - Array of segments
239
+ - `borderStyle?: BorderStyle` - Style for segment borders ('cap', 'brace', 'round', 'square', 'none')
81
240
 
82
- ### `createRegion(options?)`
241
+ ### Grid
83
242
 
84
- Creates a new terminal region.
243
+ Create responsive grid layouts. Children automatically wrap to new rows when they exceed the number of explicit columns.
244
+
245
+ ![Grid Example](docs/examples/grid.gif)
246
+
247
+ ```typescript
248
+ import { Grid } from 'linecraft';
249
+
250
+ // Basic grid
251
+ r.set(Grid({ template: [20, '1*'], columnGap: 2 },
252
+ Styled({ color: 'cyan' }, 'Label:'),
253
+ Styled({ color: 'yellow' }, 'Value')
254
+ ));
255
+
256
+ // Multiple rows (children wrap automatically)
257
+ r.set(Grid({
258
+ columns: [20, 20], // 2 columns per row
259
+ autoColumns: 20, // Size for extra columns
260
+ columnGap: 2,
261
+ rowGap: 1
262
+ },
263
+ Styled({ color: 'cyan' }, 'Left'),
264
+ Styled({ color: 'cyan' }, 'Right'),
265
+ fill({ char: '─', color: 'brightCyan' }),
266
+ fill({ char: '─', color: 'brightCyan' })
267
+ ));
268
+ ```
85
269
 
86
270
  **Options:**
87
- - `x?: number` - X position (default: 0)
88
- - `y?: number` - Y position (default: 0)
89
- - `width?: number` - Width (default: terminal width)
90
- - `height?: number` - Initial height (default: 1, expands as needed)
271
+ - `columns?: GridTemplateEntry[]` - Explicit column definitions (like CSS `grid-template-columns`)
272
+ - `autoColumns?: GridTemplateEntry` - Size for implicitly created columns (like CSS `grid-auto-columns`)
273
+ - `columnGap?: number` - Spaces between columns (default: 0)
274
+ - `rowGap?: number` - Spaces between rows (default: 0)
275
+ - `spaceBetween?: FillChar | FillChar[]` - Characters to draw between columns
276
+ - `justify?: 'start' | 'end' | 'center' | 'space-between'` - Justify content
277
+
278
+ **Template entries:**
279
+ - Fixed width: `20`, `30`
280
+ - Flex units: `'1*'`, `'2*'` (like CSS `1fr`, `2fr`)
281
+ - Minmax: `{ min: 40, width: '2*' }`
282
+ - Auto: `'auto'` (content-based sizing)
283
+
284
+ ### Fill
285
+
286
+ Fill available space with a character. Typically used within grids.
287
+
288
+ ![Fill Example](docs/examples/fill.gif)
289
+
290
+ ```typescript
291
+ import { fill } from 'linecraft';
91
292
 
92
- ### `region.setLine(lineNumber, content)`
293
+ r.set(fill({ char: '─', color: 'brightBlack' }));
294
+ ```
295
+
296
+ ## Utilities
297
+
298
+ ### Prompt
93
299
 
94
- Set a single line (1-based). Region expands automatically if needed.
300
+ Wait for user input before continuing.
95
301
 
96
- ### `region.set(content)`
302
+ ```typescript
303
+ import { prompt } from 'linecraft';
97
304
 
98
- Set entire content. Can be a string with `\n` separators or an array of `LineContent`.
305
+ await prompt(r, {
306
+ message: 'continue',
307
+ key: 'spacebar', // 'spacebar' | 'enter' | 'q' | 'any'
308
+ color: 'brightBlack'
309
+ });
310
+ ```
99
311
 
100
- ### `region.flush()`
312
+ ## Colors
101
313
 
102
- Force immediate render of pending updates (bypasses throttle).
314
+ Available colors:
315
+ - `black`, `red`, `green`, `yellow`, `blue`, `magenta`, `cyan`, `white`
316
+ - `brightBlack`, `brightRed`, `brightGreen`, `brightYellow`, `brightBlue`, `brightMagenta`, `brightCyan`, `brightWhite`
103
317
 
104
- ### `region.setThrottle(fps)`
318
+ ## Examples
319
+
320
+ Check out the `examples/` directory:
321
+
322
+ - `progress.ts` - Progress bars (basic and multi-lane)
323
+ - `spinner.ts` - Animated spinners
324
+ - `code-debug.ts` - Code error display
325
+ - `grid-all-features.ts` - Grid layout examples
326
+ - `segments.ts` - Segmented displays
327
+
328
+ Run examples with:
329
+ ```bash
330
+ pnpm example <name>
331
+ ```
105
332
 
106
- Set maximum render rate (default: 60 FPS).
333
+ ## API Reference
334
+
335
+ ### Region Methods
336
+
337
+ - `set(content)` - Replace all content
338
+ - `add(content)` - Append content, returns `ComponentReference` or `SectionReference`
339
+ - `destroy(clearFirst?)` - Clean up and restore terminal
340
+ - `width` - Current region width (read-only)
341
+ - `height` - Current region height (read-only)
342
+
343
+ ### ComponentReference
344
+
345
+ - `delete()` - Remove the component from the region
346
+
347
+ ### SectionReference
348
+
349
+ - `update(content)` - Update the section content
350
+ - `delete()` - Remove the section from the region
351
+
352
+ ## Contributing
353
+
354
+ Contributions welcome! Please open an issue or PR.
355
+
356
+ **Creating example recordings?** See [docs/creating-recordings.md](docs/creating-recordings.md) for a guide on using vhs to create animated GIFs.
107
357
 
108
358
  ## License
109
359
 
110
360
  MIT
111
-
@@ -0,0 +1,6 @@
1
+ import type { Color } from '../types';
2
+ /**
3
+ * Apply color to text
4
+ */
5
+ export declare function color(colorName: Color, text: string): string;
6
+ //# sourceMappingURL=color.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.d.ts","sourceRoot":"","sources":["../../src/api/color.ts"],"names":[],"mappings":"AAGA,OAAO,KAAK,EAAE,KAAK,EAAE,MAAM,UAAU,CAAC;AAEtC;;GAEG;AACH,wBAAgB,KAAK,CAAC,SAAS,EAAE,KAAK,EAAE,IAAI,EAAE,MAAM,GAAG,MAAM,CAE5D"}
@@ -0,0 +1,9 @@
1
+ // Color function for text styling
2
+ import { applyStyle } from '../utils/colors';
3
+ /**
4
+ * Apply color to text
5
+ */
6
+ export function color(colorName, text) {
7
+ return applyStyle(text, { color: colorName });
8
+ }
9
+ //# sourceMappingURL=color.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.js","sourceRoot":"","sources":["../../src/api/color.ts"],"names":[],"mappings":"AAAA,kCAAkC;AAElC,OAAO,EAAE,UAAU,EAAE,MAAM,iBAAiB,CAAC;AAG7C;;GAEG;AACH,MAAM,UAAU,KAAK,CAAC,SAAgB,EAAE,IAAY;IAClD,OAAO,UAAU,CAAC,IAAI,EAAE,EAAE,KAAK,EAAE,SAAS,EAAE,CAAC,CAAC;AAChD,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=color.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.test.d.ts","sourceRoot":"","sources":["../../src/api/color.test.ts"],"names":[],"mappings":""}
@@ -0,0 +1,23 @@
1
+ import { describe, it, expect } from 'vitest';
2
+ import { color } from './color';
3
+ describe('color', () => {
4
+ it('should apply red color', () => {
5
+ const result = color('red', 'Hello');
6
+ expect(result).toContain('\x1b[');
7
+ expect(result).toContain('31'); // Red ANSI code
8
+ expect(result).toContain('Hello');
9
+ });
10
+ it('should apply green color', () => {
11
+ const result = color('green', 'Hello');
12
+ expect(result).toContain('32'); // Green ANSI code
13
+ });
14
+ it('should apply blue color', () => {
15
+ const result = color('blue', 'Hello');
16
+ expect(result).toContain('34'); // Blue ANSI code
17
+ });
18
+ it('should reset color at end', () => {
19
+ const result = color('red', 'Hello');
20
+ expect(result).toMatch(/\x1b\[0m$/); // Reset code at end
21
+ });
22
+ });
23
+ //# sourceMappingURL=color.test.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"color.test.js","sourceRoot":"","sources":["../../src/api/color.test.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,QAAQ,EAAE,EAAE,EAAE,MAAM,EAAE,MAAM,QAAQ,CAAC;AAC9C,OAAO,EAAE,KAAK,EAAE,MAAM,SAAS,CAAC;AAEhC,QAAQ,CAAC,OAAO,EAAE,GAAG,EAAE;IACrB,EAAE,CAAC,wBAAwB,EAAE,GAAG,EAAE;QAChC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACrC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;QAClC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,gBAAgB;QAChD,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,OAAO,CAAC,CAAC;IACpC,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,0BAA0B,EAAE,GAAG,EAAE;QAClC,MAAM,MAAM,GAAG,KAAK,CAAC,OAAO,EAAE,OAAO,CAAC,CAAC;QACvC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,kBAAkB;IACpD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,yBAAyB,EAAE,GAAG,EAAE;QACjC,MAAM,MAAM,GAAG,KAAK,CAAC,MAAM,EAAE,OAAO,CAAC,CAAC;QACtC,MAAM,CAAC,MAAM,CAAC,CAAC,SAAS,CAAC,IAAI,CAAC,CAAC,CAAC,iBAAiB;IACnD,CAAC,CAAC,CAAC;IAEH,EAAE,CAAC,2BAA2B,EAAE,GAAG,EAAE;QACnC,MAAM,MAAM,GAAG,KAAK,CAAC,KAAK,EAAE,OAAO,CAAC,CAAC;QACrC,MAAM,CAAC,MAAM,CAAC,CAAC,OAAO,CAAC,WAAW,CAAC,CAAC,CAAC,oBAAoB;IAC3D,CAAC,CAAC,CAAC;AACL,CAAC,CAAC,CAAC"}
@@ -0,0 +1,55 @@
1
+ import { Flex } from '../layout/flex.js';
2
+ import { Col } from '../components/col.js';
3
+ import type { TerminalRegion } from '../region.js';
4
+ import type { FlexOptions } from '../layout/flex.js';
5
+ import type { ColOptions } from '../components/col.js';
6
+ import type { FlexChild } from '../components/renderable.js';
7
+ export type { FlexChild };
8
+ export type FlexChildWithDescriptors = FlexChild | ColDescriptor | FlexDescriptor;
9
+ /**
10
+ * Descriptor for a flex container (resolved later with region)
11
+ */
12
+ export interface FlexDescriptor {
13
+ type: 'flex';
14
+ options: FlexOptions;
15
+ children: FlexChild[];
16
+ }
17
+ /**
18
+ * Descriptor for a column (resolved later with region)
19
+ */
20
+ export interface ColDescriptor {
21
+ type: 'col';
22
+ options: ColOptions;
23
+ content: string;
24
+ }
25
+ /**
26
+ * Create a flex container with children
27
+ * Accepts strings, Renderables, arrays (for functional components), or descriptors
28
+ */
29
+ export declare function flex(options: FlexOptions, ...children: FlexChildWithDescriptors[]): FlexDescriptor;
30
+ /**
31
+ * Create a column (flex item) with options and content
32
+ */
33
+ export declare function col(options: ColOptions, content: string): ColDescriptor;
34
+ /**
35
+ * Resolve a flex descriptor tree into actual components
36
+ * Handles strings, arrays (for functional components), and descriptors
37
+ */
38
+ export declare function resolveFlexTree(region: TerminalRegion, descriptor: FlexDescriptor | ColDescriptor | FlexChild): Flex | Col;
39
+ /**
40
+ * Helper for functional components that return arrays
41
+ * Example:
42
+ * ```ts
43
+ * function myComponent(options, ...children) {
44
+ * return component([
45
+ * 'Label:',
46
+ * ...children
47
+ * ]);
48
+ * }
49
+ * ```
50
+ *
51
+ * Actually, you don't need this helper - just return the array directly!
52
+ * Flex will automatically flatten arrays.
53
+ */
54
+ export declare function component(children: FlexChild[]): FlexChild[];
55
+ //# sourceMappingURL=flex.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flex.d.ts","sourceRoot":"","sources":["../../src/ts/api/flex.ts"],"names":[],"mappings":"AAEA,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AAC3C,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,cAAc,CAAC;AACnD,OAAO,KAAK,EAAE,WAAW,EAAE,MAAM,mBAAmB,CAAC;AACrD,OAAO,KAAK,EAAE,UAAU,EAAE,MAAM,sBAAsB,CAAC;AACvD,OAAO,KAAK,EAAE,SAAS,EAAE,MAAM,6BAA6B,CAAC;AAG7D,YAAY,EAAE,SAAS,EAAE,CAAC;AAG1B,MAAM,MAAM,wBAAwB,GAAG,SAAS,GAAG,aAAa,GAAG,cAAc,CAAC;AAElF;;GAEG;AACH,MAAM,WAAW,cAAc;IAC7B,IAAI,EAAE,MAAM,CAAC;IACb,OAAO,EAAE,WAAW,CAAC;IACrB,QAAQ,EAAE,SAAS,EAAE,CAAC;CACvB;AAED;;GAEG;AACH,MAAM,WAAW,aAAa;IAC5B,IAAI,EAAE,KAAK,CAAC;IACZ,OAAO,EAAE,UAAU,CAAC;IACpB,OAAO,EAAE,MAAM,CAAC;CACjB;AAED;;;GAGG;AACH,wBAAgB,IAAI,CAClB,OAAO,EAAE,WAAW,EACpB,GAAG,QAAQ,EAAE,wBAAwB,EAAE,GACtC,cAAc,CAMhB;AAED;;GAEG;AACH,wBAAgB,GAAG,CACjB,OAAO,EAAE,UAAU,EACnB,OAAO,EAAE,MAAM,GACd,aAAa,CAMf;AAED;;;GAGG;AACH,wBAAgB,eAAe,CAC7B,MAAM,EAAE,cAAc,EACtB,UAAU,EAAE,cAAc,GAAG,aAAa,GAAG,SAAS,GACrD,IAAI,GAAG,GAAG,CAwCZ;AAED;;;;;;;;;;;;;;GAcG;AACH,wBAAgB,SAAS,CAAC,QAAQ,EAAE,SAAS,EAAE,GAAG,SAAS,EAAE,CAE5D"}
@@ -0,0 +1,86 @@
1
+ // Function-based API for flex layouts
2
+ import { Flex } from '../layout/flex.js';
3
+ import { Col } from '../components/col.js';
4
+ /**
5
+ * Create a flex container with children
6
+ * Accepts strings, Renderables, arrays (for functional components), or descriptors
7
+ */
8
+ export function flex(options, ...children) {
9
+ return {
10
+ type: 'flex',
11
+ options,
12
+ children: children,
13
+ };
14
+ }
15
+ /**
16
+ * Create a column (flex item) with options and content
17
+ */
18
+ export function col(options, content) {
19
+ return {
20
+ type: 'col',
21
+ options,
22
+ content,
23
+ };
24
+ }
25
+ /**
26
+ * Resolve a flex descriptor tree into actual components
27
+ * Handles strings, arrays (for functional components), and descriptors
28
+ */
29
+ export function resolveFlexTree(region, descriptor) {
30
+ if (typeof descriptor === 'string') {
31
+ // Plain string - wrap in col
32
+ return new Col(region, descriptor, {});
33
+ }
34
+ // Check if it's a descriptor object
35
+ if (typeof descriptor === 'object' && descriptor !== null && 'type' in descriptor) {
36
+ if (descriptor.type === 'col') {
37
+ return new Col(region, descriptor.content, descriptor.options);
38
+ }
39
+ if (descriptor.type === 'flex') {
40
+ const flexComponent = new Flex(region, descriptor.options);
41
+ // Resolve children - Flex.addChild now handles strings, arrays, and Renderables
42
+ for (const child of descriptor.children) {
43
+ if (typeof child === 'string') {
44
+ // Plain string - Flex.addChild will handle it
45
+ flexComponent.addChild(child);
46
+ }
47
+ else if (typeof child === 'object' && child !== null && 'type' in child) {
48
+ // Check if it's a descriptor
49
+ if (child.type === 'col' || child.type === 'flex') {
50
+ const resolved = resolveFlexTree(region, child);
51
+ flexComponent.addChild(resolved);
52
+ }
53
+ else {
54
+ // Not a descriptor, pass through as-is
55
+ flexComponent.addChild(child);
56
+ }
57
+ }
58
+ else {
59
+ // Already a Renderable or array - pass through
60
+ flexComponent.addChild(child);
61
+ }
62
+ }
63
+ return flexComponent;
64
+ }
65
+ }
66
+ throw new Error(`Unknown descriptor type: ${descriptor.type || typeof descriptor}`);
67
+ }
68
+ /**
69
+ * Helper for functional components that return arrays
70
+ * Example:
71
+ * ```ts
72
+ * function myComponent(options, ...children) {
73
+ * return component([
74
+ * 'Label:',
75
+ * ...children
76
+ * ]);
77
+ * }
78
+ * ```
79
+ *
80
+ * Actually, you don't need this helper - just return the array directly!
81
+ * Flex will automatically flatten arrays.
82
+ */
83
+ export function component(children) {
84
+ return children;
85
+ }
86
+ //# sourceMappingURL=flex.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flex.js","sourceRoot":"","sources":["../../src/ts/api/flex.ts"],"names":[],"mappings":"AAAA,sCAAsC;AAEtC,OAAO,EAAE,IAAI,EAAE,MAAM,mBAAmB,CAAC;AACzC,OAAO,EAAE,GAAG,EAAE,MAAM,sBAAsB,CAAC;AA8B3C;;;GAGG;AACH,MAAM,UAAU,IAAI,CAClB,OAAoB,EACpB,GAAG,QAAoC;IAEvC,OAAO;QACL,IAAI,EAAE,MAAM;QACZ,OAAO;QACP,QAAQ,EAAE,QAAuB;KAClC,CAAC;AACJ,CAAC;AAED;;GAEG;AACH,MAAM,UAAU,GAAG,CACjB,OAAmB,EACnB,OAAe;IAEf,OAAO;QACL,IAAI,EAAE,KAAK;QACX,OAAO;QACP,OAAO;KACR,CAAC;AACJ,CAAC;AAED;;;GAGG;AACH,MAAM,UAAU,eAAe,CAC7B,MAAsB,EACtB,UAAsD;IAEtD,IAAI,OAAO,UAAU,KAAK,QAAQ,EAAE,CAAC;QACnC,6BAA6B;QAC7B,OAAO,IAAI,GAAG,CAAC,MAAM,EAAE,UAAU,EAAE,EAAE,CAAC,CAAC;IACzC,CAAC;IAED,oCAAoC;IACpC,IAAI,OAAO,UAAU,KAAK,QAAQ,IAAI,UAAU,KAAK,IAAI,IAAI,MAAM,IAAI,UAAU,EAAE,CAAC;QAClF,IAAI,UAAU,CAAC,IAAI,KAAK,KAAK,EAAE,CAAC;YAC9B,OAAO,IAAI,GAAG,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;QACjE,CAAC;QAED,IAAI,UAAU,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;YAC/B,MAAM,aAAa,GAAG,IAAI,IAAI,CAAC,MAAM,EAAE,UAAU,CAAC,OAAO,CAAC,CAAC;YAE3D,gFAAgF;YAChF,KAAK,MAAM,KAAK,IAAI,UAAU,CAAC,QAAQ,EAAE,CAAC;gBACxC,IAAI,OAAO,KAAK,KAAK,QAAQ,EAAE,CAAC;oBAC9B,8CAA8C;oBAC9C,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAChC,CAAC;qBAAM,IAAI,OAAO,KAAK,KAAK,QAAQ,IAAI,KAAK,KAAK,IAAI,IAAI,MAAM,IAAI,KAAK,EAAE,CAAC;oBAC1E,6BAA6B;oBAC7B,IAAI,KAAK,CAAC,IAAI,KAAK,KAAK,IAAI,KAAK,CAAC,IAAI,KAAK,MAAM,EAAE,CAAC;wBAClD,MAAM,QAAQ,GAAG,eAAe,CAAC,MAAM,EAAE,KAAkD,CAAC,CAAC;wBAC7F,aAAa,CAAC,QAAQ,CAAC,QAAQ,CAAC,CAAC;oBACnC,CAAC;yBAAM,CAAC;wBACN,uCAAuC;wBACvC,aAAa,CAAC,QAAQ,CAAC,KAAY,CAAC,CAAC;oBACvC,CAAC;gBACH,CAAC;qBAAM,CAAC;oBACN,+CAA+C;oBAC/C,aAAa,CAAC,QAAQ,CAAC,KAAK,CAAC,CAAC;gBAChC,CAAC;YACH,CAAC;YAED,OAAO,aAAa,CAAC;QACvB,CAAC;IACH,CAAC;IAED,MAAM,IAAI,KAAK,CAAC,4BAA6B,UAAkB,CAAC,IAAI,IAAI,OAAO,UAAU,EAAE,CAAC,CAAC;AAC/F,CAAC;AAED;;;;;;;;;;;;;;GAcG;AACH,MAAM,UAAU,SAAS,CAAC,QAAqB;IAC7C,OAAO,QAAQ,CAAC;AAClB,CAAC"}
@@ -0,0 +1,2 @@
1
+ export {};
2
+ //# sourceMappingURL=flex.test.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"flex.test.d.ts","sourceRoot":"","sources":["../../src/ts/api/flex.test.ts"],"names":[],"mappings":""}