blessed-components 0.0.1 → 1.0.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/ROADMAP.md CHANGED
@@ -1,53 +1,93 @@
1
1
  # blessed-components — Roadmap
2
2
 
3
- Biblioteca de componentes reutilizables para interfaces de terminal construidas
4
- sobre `blessed`.
3
+ Composable, typed terminal UI components built on top of `blessed`.
5
4
 
6
- ## Visión
5
+ ## Vision
7
6
 
8
- Convertir bloques de texto, tags, Unicode, cálculo de ancho y estado en
9
- componentes con:
7
+ Turn manual strings, Blessed tags, Unicode glyphs, width calculations, keyboard
8
+ handling, and lifecycle cleanup into reusable components with:
10
9
 
11
- - API pequeña y consistente.
12
- - renderizado determinista.
13
- - actualización de datos sin reconstruir pantalla.
14
- - soporte para terminales estrechas, sin color y sin Unicode.
15
- - integración directa con elementos `blessed`.
16
- - pruebas mediante API pública.
10
+ - small, consistent public APIs;
11
+ - deterministic renderers;
12
+ - structured data instead of presentation strings;
13
+ - responsive behavior for narrow terminals;
14
+ - Unicode, ASCII, color, and no-color modes;
15
+ - predictable focus and keyboard interaction;
16
+ - direct integration with Blessed elements;
17
+ - tests through public behavior;
18
+ - no leaked listeners, timers, or processes.
17
19
 
18
- ## Vocabulario
20
+ ## Product position
19
21
 
20
- Los ejemplos iniciales representan dos componentes distintos:
22
+ Blessed already provides low-level elements such as boxes, lists, forms,
23
+ prompts, tables, progress bars, logs, terminals, images, and layouts.
24
+ `blessed-contrib` adds dashboard-oriented charts, gauges, maps, sparklines,
25
+ tables, trees, Markdown, grids, and carousels.
21
26
 
22
- | Nombre | Responsabilidad |
23
- | ------------- | -------------------------------------------------------- |
24
- | `Sparkline` | Serie temporal compacta usando `▁▂▃▄▅▆▇█`. |
25
- | `MetricBars` | Grupo de métricas con barras horizontales y porcentajes. |
26
- | `ProgressBar` | Una sola barra horizontal. Base usada por `MetricBars`. |
27
- | `Stat` | Etiqueta y valor destacado. |
28
- | `Card` | Marco opcional que compone título, contenido y pie. |
27
+ This library should not become another collection of thin aliases.
29
28
 
30
- `BarChart` queda reservado para barras que representan categorías o series. No
31
- debe usarse para `Sparkline` ni `ProgressBar`.
29
+ Its advantage should be:
32
30
 
33
- ## API pública propuesta
31
+ 1. typed and consistent APIs;
32
+ 2. pure renderers that work without a live terminal;
33
+ 3. composition from small primitives;
34
+ 4. responsive width and height behavior;
35
+ 5. explicit controlled and uncontrolled state;
36
+ 6. keyboard maps and focus contracts;
37
+ 7. themes and semantic visual tokens;
38
+ 8. lifecycle safety;
39
+ 9. maintained tests and documentation;
40
+ 10. optional adapters for existing Blessed capabilities.
34
41
 
35
- Dos capas:
42
+ ## Artifact taxonomy
36
43
 
37
- 1. Renderers puros: reciben datos y retornan contenido compatible con
38
- `blessed`.
39
- 2. Widgets: crean elementos `blessed`, conservan estado y exponen `setData`.
44
+ | Artifact | Meaning in this project | Examples |
45
+ | --------- | ----------------------------------------------------- | ----------------------------- |
46
+ | Utility | Non-visual, framework-independent logic. | width, scale, format, keymaps |
47
+ | Primitive | One low-level terminal behavior with minimal styling. | focus scope, viewport |
48
+ | Component | Reusable visual unit with useful defaults. | progress bar, badge |
49
+ | Pattern | Documented composition solving recurring behavior. | async state, confirm flow |
50
+ | Block | Opinionated application-level composition. | process monitor, git status |
51
+ | Template | Complete terminal application scaffold. | dashboard starter |
52
+
53
+ Components belong in the npm package. Blocks and templates should remain
54
+ examples until repeated use proves a stable public API.
55
+
56
+ ## Naming
57
+
58
+ The initial examples represent different components:
59
+
60
+ | Name | Responsibility |
61
+ | ------------- | ------------------------------------------------------- |
62
+ | `Sparkline` | Compact time series using `▁▂▃▄▅▆▇█`. |
63
+ | `MetricBars` | Labeled metrics rendered as aligned horizontal bars. |
64
+ | `ProgressBar` | One bounded horizontal bar. |
65
+ | `BarChart` | Comparison of categories or series. |
66
+ | `Stat` | Label, highlighted value, and optional trend. |
67
+ | `Card` | Composable frame with header, body, and footer regions. |
68
+
69
+ `Sparkline`, `ProgressBar`, and `BarChart` must not be used as interchangeable
70
+ names.
71
+
72
+ ## Proposed public API
73
+
74
+ Use two layers:
75
+
76
+ 1. Pure renderers receive data and return Blessed-compatible content or render
77
+ models.
78
+ 2. Blessed adapters create elements, connect events, retain state, and expose
79
+ lifecycle methods.
40
80
 
41
81
  ```ts
42
82
  import {
43
- renderSparkline,
83
+ metricBars,
44
84
  renderMetricBars,
85
+ renderSparkline,
45
86
  sparkline,
46
- metricBars,
47
87
  } from 'blessed-components'
48
88
  ```
49
89
 
50
- ### Renderer puro
90
+ ### Pure renderer
51
91
 
52
92
  ```ts
53
93
  const content = renderSparkline({
@@ -58,7 +98,7 @@ const content = renderSparkline({
58
98
  })
59
99
  ```
60
100
 
61
- ### Widget Blessed
101
+ ### Blessed component
62
102
 
63
103
  ```ts
64
104
  const downloads = sparkline({
@@ -76,7 +116,7 @@ const downloads = sparkline({
76
116
  downloads.setData(nextDownloadsByDay)
77
117
  ```
78
118
 
79
- ### MetricBars
119
+ ### Metric bars
80
120
 
81
121
  ```ts
82
122
  const score = metricBars({
@@ -93,314 +133,667 @@ const score = metricBars({
93
133
  })
94
134
  ```
95
135
 
96
- ## Principios de diseño
136
+ ## Design principles
137
+
138
+ - Separate data, rendering, and Blessed lifecycle.
139
+ - Keep pure renderers as the source of visual truth.
140
+ - Make Blessed adapters thin.
141
+ - Prefer composition over components with dozens of options.
142
+ - Reuse one scaling primitive across progress bars, gauges, and charts.
143
+ - Reuse one selection model across lists, tables, trees, menus, and palettes.
144
+ - Let callers decide when `screen.render()` runs.
145
+ - Calculate dimensions from actual inner width and height.
146
+ - Clamp bounded values.
147
+ - Never mutate caller-owned arrays or objects.
148
+ - Escape dynamic text before applying Blessed tags.
149
+ - Use semantic theme tokens, not hard-coded presentation tags.
150
+ - Export all public option, state, event, and handle types.
151
+ - Keep `blessed` as a peer dependency.
152
+ - Add dependencies only when they provide substantial value.
153
+
154
+ ## State model
155
+
156
+ Interactive components should support both modes when useful:
157
+
158
+ - Controlled: caller supplies state and receives change events.
159
+ - Uncontrolled: component owns state from a `defaultValue`.
160
+
161
+ Examples:
162
+
163
+ ```ts
164
+ select({ value, onValueChange })
165
+ select({ defaultValue })
166
+
167
+ tabs({ activeId, onActiveIdChange })
168
+ tabs({ defaultActiveId })
169
+ ```
170
+
171
+ Do not add both modes to display-only components.
172
+
173
+ ## Common component handle
174
+
175
+ Candidate interface:
176
+
177
+ ```ts
178
+ interface ComponentHandle<TData, TElement> {
179
+ readonly element: TElement
180
+ setData(data: TData): void
181
+ focus(): void
182
+ render(): void
183
+ destroy(): void
184
+ }
185
+ ```
97
186
 
98
- - Datos separados de presentación.
99
- - Renderer puro como fuente única del contenido.
100
- - Widget `blessed` como adaptador fino.
101
- - `setData` actualiza contenido; caller decide cuándo ejecutar
102
- `screen.render()`.
103
- - Dimensiones automáticas usan ancho interior real.
104
- - Valores fuera de rango se limitan mediante `clamp`.
105
- - Datos inválidos producen error descriptivo o estado vacío documentado.
106
- - Tema mediante tokens semánticos, no tags escritos por consumidor.
107
- - Colores y caracteres configurables por componente.
108
- - Sin mutación de arrays u objetos recibidos.
109
- - TypeScript primero; tipos publicados con paquete.
110
- - Dependencia `blessed` como `peerDependency`.
187
+ Adopt only after the first vertical slice. Returning an extended Blessed
188
+ element may produce a smaller API. The tracer bullet must decide this.
111
189
 
112
- ## Arquitectura objetivo
190
+ ## Target architecture
113
191
 
114
192
  ```text
115
193
  src/
116
194
  core/
117
- width.ts
118
- scale.ts
195
+ capabilities.ts
196
+ characters.ts
197
+ color.ts
198
+ crop.ts
199
+ events.ts
200
+ focus.ts
119
201
  format.ts
120
- theme.ts
202
+ keymap.ts
203
+ layout.ts
204
+ render-model.ts
205
+ scale.ts
121
206
  tags.ts
207
+ theme.ts
208
+ truncate.ts
209
+ width.ts
210
+ primitives/
211
+ collection/
212
+ focus-scope/
213
+ overlay/
214
+ scroll-area/
215
+ selection/
216
+ viewport/
122
217
  components/
123
- stat/
124
- progress-bar/
125
- sparkline/
126
- metric-bars/
218
+ data-display/
219
+ feedback/
220
+ input/
221
+ layout/
222
+ navigation/
223
+ visualization/
127
224
  adapters/
128
- blessed.ts
225
+ blessed/
226
+ blocks/
227
+ examples-only/
129
228
  index.ts
130
229
  tests/
131
230
  public-api/
132
231
  blessed-integration/
232
+ terminal-fixtures/
133
233
  examples/
234
+ component-gallery/
134
235
  dashboard/
236
+ process-monitor/
135
237
  ```
136
238
 
137
- `core` no conoce `blessed`. `components` usa `core` para producir modelos o
138
- contenido. `adapters` conecta contenido, eventos y ciclo de vida con
139
- `blessed`.
140
-
141
- ## Estrategia TDD
142
-
143
- Desarrollo por cortes verticales. Nunca escribir todas las pruebas antes de
144
- toda la implementación.
145
-
146
- ```text
147
- RED: prueba de un comportamiento público
148
-
149
- GREEN: implementación mínima
150
-
151
- REFACTOR: limpiar manteniendo verde
152
-
153
- siguiente comportamiento
154
- ```
155
-
156
- Prioridad de pruebas:
157
-
158
- 1. Salida visible del renderer público.
159
- 2. Límites, escalado y ancho disponible.
160
- 3. Actualización mediante `setData`.
161
- 4. Integración real con elemento `blessed`.
162
- 5. Fallbacks ASCII, sin color y estado vacío.
163
-
164
- Evitar pruebas de funciones privadas, mocks internos o estructura de carpetas.
165
- Snapshots grandes no serán contrato principal; usar expectativas pequeñas y
166
- legibles.
167
-
168
- ## Hitos
169
-
170
- ### M0 Fundación del paquete
171
-
172
- Objetivo: paquete instalable, testeable y publicable.
173
-
174
- - Configurar TypeScript.
175
- - Elegir runner de pruebas.
176
- - Definir builds ESM y CommonJS según compatibilidad real de `blessed`.
177
- - Configurar lint, format, coverage y CI.
178
- - Publicar exports y tipos.
179
- - Añadir ejemplo mínimo que monte un componente en `blessed`.
180
-
181
- Criterio de salida:
182
-
183
- - `npm test`, `npm run build` y typecheck pasan.
184
- - consumidor externo puede importar un renderer.
185
- - CI prueba versiones Node soportadas.
186
-
187
- ### M1 Tracer bullet: ProgressBar
188
-
189
- Objetivo: probar camino completo renderer widget pantalla.
190
-
191
- Ciclos RED→GREEN:
192
-
193
- 1. Renderiza barra al 50% con ancho fijo.
194
- 2. Limita valores menores que `min` y mayores que `max`.
195
- 3. Muestra etiqueta y valor formateado.
196
- 4. Respeta ancho interior estrecho.
197
- 5. `setData` cambia contenido del widget.
198
- 6. Usa caracteres ASCII cuando Unicode está desactivado.
199
-
200
- Criterio de salida:
201
-
202
- - API pública validada con un componente pequeño.
203
- - patrón reutilizable para próximos widgets.
204
-
205
- ### M2 Sparkline
206
-
207
- Objetivo: componetizar gráfico de descargas.
208
-
209
- Ciclos RED→GREEN:
210
-
211
- 1. Escala valores al rango `▁`…`█`.
212
- 2. Conserva orden de serie.
213
- 3. Maneja serie constante sin división por cero.
214
- 4. Maneja serie vacía con placeholder.
215
- 5. Reduce o recorta datos según ancho disponible.
216
- 6. Renderiza label, valor principal y summary opcionales.
217
- 7. Actualiza serie mediante `setData`.
218
- 8. Permite dominio explícito `{ min, max }`.
219
-
220
- Criterio de salida:
221
-
222
- - ejemplo `downloads` ya no contiene strings de presentación manuales.
223
- - salida estable en terminal estrecha.
224
-
225
- ### M3 MetricBars
226
-
227
- Objetivo: componetizar score general y desglose.
228
-
229
- Ciclos RED→GREEN:
230
-
231
- 1. Renderiza una métrica mediante `ProgressBar`.
232
- 2. Alinea labels usando ancho visible, no longitud bruta con tags.
233
- 3. Renderiza varias métricas en orden.
234
- 4. Calcula ancho restante para barra y valor.
235
- 5. Trunca labels largos.
236
- 6. Admite valor general opcional.
237
- 7. Actualiza una lista completa mediante `setData`.
238
-
239
- Criterio de salida:
240
-
241
- - ejemplo `score` usa datos estructurados.
242
- - `MetricBars` compone `ProgressBar`; no duplica escalado.
243
-
244
- ### M4 Sistema visual
245
-
246
- Objetivo: consistencia entre componentes.
247
-
248
- - `Theme`: `primary`, `muted`, `success`, `warning`, `danger`, `border`.
249
- - Presets `unicode`, `ascii`, `noColor`.
250
- - `formatNumber`, `formatPercent`, `formatDuration`, `formatBytes`.
251
- - Utilidad de ancho visible compatible con tags `blessed`.
252
- - Escape seguro de texto dinámico.
253
- - Estados `empty`, `loading`, `error`, `disabled`.
254
-
255
- Criterio de salida:
256
-
257
- - consumidor cambia apariencia sin construir tags manuales.
258
- - texto con llaves o tags no rompe contenido.
259
-
260
- ### M5 Composición de dashboard
239
+ `core` must not import Blessed. `primitives` model shared behavior.
240
+ `components` compose core logic and primitives. `adapters/blessed` owns Blessed
241
+ elements and events.
242
+
243
+ ## Component opportunity analysis
244
+
245
+ Legend:
246
+
247
+ - **Build**: strong fit and clear differentiation.
248
+ - **Adapt**: wrap or compose existing Blessed behavior with better contracts.
249
+ - **Research**: valuable, but API or terminal behavior needs validation.
250
+ - **Defer**: expensive, niche, or already served well elsewhere.
251
+
252
+ ### 1. Foundation utilities
253
+
254
+ These unlock almost every visual component and should be built first.
255
+
256
+ | Utility | Purpose | Decision | Priority |
257
+ | -------------------- | --------------------------------------------------------- | -------- | -------- |
258
+ | `visibleWidth` | Measure text while ignoring Blessed tags and ANSI codes. | Build | P0 |
259
+ | `truncate` | End, middle, and start truncation by terminal cell width. | Build | P0 |
260
+ | `wrapText` | Cell-aware wrapping with indentation. | Build | P0 |
261
+ | `escapeTags` | Prevent dynamic text from becoming Blessed markup. | Build | P0 |
262
+ | `scaleValue` | Map numeric domains into cell or glyph ranges. | Build | P0 |
263
+ | `clamp` | Bound values safely. | Build | P0 |
264
+ | `sampleSeries` | Downsample time-series data to available width. | Build | P0 |
265
+ | `formatNumber` | Locale-aware compact and full numbers. | Build | P0 |
266
+ | `formatPercent` | Consistent percentages and precision. | Build | P0 |
267
+ | `formatBytes` | IEC/SI byte formatting. | Build | P1 |
268
+ | `formatDuration` | Human and clock duration formats. | Build | P1 |
269
+ | `formatRate` | Values per second or interval. | Build | P1 |
270
+ | `formatDateTime` | Terminal-friendly timestamps. | Build | P1 |
271
+ | `detectCapabilities` | Unicode, color depth, mouse, and terminal features. | Build | P1 |
272
+ | `createKeymap` | Normalized key bindings with help metadata. | Build | P1 |
273
+ | `createTheme` | Merge semantic tokens and component overrides. | Build | P1 |
274
+ | `renderToString` | Render pure models for tests and static terminal output. | Build | P1 |
275
+ | `diffRows` | Identify changed rows for high-frequency updates. | Research | P2 |
276
+
277
+ ### 2. Layout and composition
278
+
279
+ Blessed has positioning and a basic layout element. Opportunity exists in
280
+ predictable, typed composition and responsive rules.
281
+
282
+ | Component | Purpose | Decision | Priority |
283
+ | --------------- | ------------------------------------------------------- | -------- | -------- |
284
+ | `Box` | Typed base container with theme defaults. | Adapt | P1 |
285
+ | `Card` | Root, header, title, description, body, footer. | Build | P1 |
286
+ | `Stack` | Vertical or horizontal flow with gaps. | Build | P1 |
287
+ | `Cluster` | Wrapping inline group for badges and actions. | Build | P2 |
288
+ | `Grid` | Responsive row/column placement with spans. | Build | P2 |
289
+ | `SplitPane` | Resizable horizontal or vertical regions. | Research | P2 |
290
+ | `SidebarLayout` | Sidebar plus main content with collapse rules. | Build | P2 |
291
+ | `Center` | Center one child in available space. | Build | P2 |
292
+ | `Spacer` | Flexible or fixed empty space. | Build | P2 |
293
+ | `Divider` | Horizontal or vertical separator with optional label. | Build | P1 |
294
+ | `AspectRatio` | Preserve cell-aware proportions. | Research | P3 |
295
+ | `Viewport` | Measure and expose available inner dimensions. | Build | P1 |
296
+ | `ScrollArea` | Consistent scrollbar, paging, and scroll events. | Adapt | P1 |
297
+ | `Resizable` | Keyboard/mouse resize behavior for one region. | Research | P3 |
298
+ | `Collapsible` | Show or hide a region while preserving state. | Build | P2 |
299
+ | `Accordion` | Multiple collapsible sections with keyboard navigation. | Build | P2 |
300
+ | `Page` | Full-screen region with title and action slots. | Build | P2 |
301
+ | `AppShell` | Header, footer, sidebar, content, and overlay layers. | Build | P2 |
302
+
303
+ ### 3. Typography and small data display
304
+
305
+ High value, low complexity, excellent early components.
306
+
307
+ | Component | Purpose | Decision | Priority |
308
+ | ----------------- | ----------------------------------------------------- | -------- | -------- |
309
+ | `Text` | Safe themed text with truncation and wrapping. | Adapt | P0 |
310
+ | `Heading` | Hierarchical terminal heading styles. | Build | P1 |
311
+ | `Label` | Stable labels for controls and values. | Build | P1 |
312
+ | `MutedText` | Secondary information using semantic theme tokens. | Build | P1 |
313
+ | `Code` | Inline code with safe escaping. | Build | P2 |
314
+ | `Preformatted` | Preserve whitespace with horizontal scroll policy. | Build | P2 |
315
+ | `Stat` | Label, value, unit, trend, and description. | Build | P0 |
316
+ | `KeyValue` | Aligned label/value rows. | Build | P1 |
317
+ | `DescriptionList` | Responsive term/description groups. | Build | P2 |
318
+ | `Badge` | Compact semantic status. | Build | P1 |
319
+ | `Tag` | Removable or static categorization token. | Build | P2 |
320
+ | `Pill` | Rounded-character compact label where supported. | Defer | P3 |
321
+ | `Timestamp` | Formatted absolute or relative time. | Build | P2 |
322
+ | `Trend` | Up/down/flat indicator with accessible text fallback. | Build | P1 |
323
+ | `Rating` | Discrete score using symbols and text fallback. | Research | P3 |
324
+ | `Kbd` | Display keyboard shortcuts consistently. | Build | P1 |
325
+ | `Breadcrumb` | Current location path with truncation. | Build | P2 |
326
+
327
+ ### 4. Progress, status, and feedback
328
+
329
+ These components share bounded values, semantic tones, and live updates.
330
+
331
+ | Component | Purpose | Decision | Priority |
332
+ | -------------------- | ------------------------------------------------------- | -------- | -------- |
333
+ | `ProgressBar` | One determinate horizontal progress bar. | Build | P0 |
334
+ | `ProgressStack` | Segmented progress across categories. | Build | P1 |
335
+ | `ProgressList` | Multiple labeled progress rows. | Build | P1 |
336
+ | `Spinner` | Indeterminate activity indicator. | Build | P1 |
337
+ | `Status` | State icon, label, and optional detail. | Build | P1 |
338
+ | `Alert` | Inline information, success, warning, or error message. | Build | P1 |
339
+ | `Callout` | Framed explanatory content. | Build | P2 |
340
+ | `Toast` | Timed transient notification stack. | Build | P2 |
341
+ | `NotificationCenter` | Persistent notification list and unread state. | Research | P3 |
342
+ | `Skeleton` | Placeholder rows while content loads. | Research | P2 |
343
+ | `EmptyState` | Empty result message with optional action. | Build | P1 |
344
+ | `ErrorState` | Error details, cause, and retry action. | Build | P1 |
345
+ | `LoadingOverlay` | Block interaction while work runs. | Build | P2 |
346
+ | `TaskProgress` | Multi-step task status with current activity. | Build | P1 |
347
+ | `StepIndicator` | Completed, active, and pending steps. | Build | P1 |
348
+ | `ConnectionStatus` | Online, reconnecting, offline, latency. | Build | P2 |
349
+ | `HealthIndicator` | Service health summary with reasons. | Build | P2 |
350
+
351
+ ### 5. Collections and structured data
352
+
353
+ This family should share selection, focus, sorting, filtering, scrolling, and
354
+ virtualization primitives.
355
+
356
+ | Component | Purpose | Decision | Priority |
357
+ | -------------- | ---------------------------------------------------------- | ----------- | -------- |
358
+ | `List` | Typed items, selection, empty state, and render callbacks. | Adapt | P1 |
359
+ | `VirtualList` | Render large lists using visible rows only. | Build | P2 |
360
+ | `GroupedList` | Sections with sticky or repeated headings. | Build | P2 |
361
+ | `Table` | Typed columns, alignment, truncation, and selection. | Build | P1 |
362
+ | `DataTable` | Sort, filter, paginate, resize, and column visibility. | Build | P2 |
363
+ | `VirtualTable` | Large row sets with bounded rendering. | Research | P2 |
364
+ | `Tree` | Expandable hierarchical navigation. | Build | P2 |
365
+ | `TreeTable` | Hierarchical rows plus columns. | Research | P3 |
366
+ | `Timeline` | Ordered events with time and status. | Build | P2 |
367
+ | `ActivityFeed` | Live events with grouping and retention. | Build | P2 |
368
+ | `DiffView` | Side-by-side or unified text differences. | Build | P2 |
369
+ | `FileTree` | File-specific tree with icons and git state. | Build | P2 |
370
+ | `ProcessList` | PID, CPU, memory, status, and actions. | Block first | P3 |
371
+ | `LogViewer` | Streaming logs with retention and pause. | Build | P1 |
372
+ | `LogExplorer` | Search, filters, levels, timestamps, and follow mode. | Build | P2 |
373
+ | `JsonViewer` | Expandable structured JSON values. | Build | P2 |
374
+ | `Inspector` | Generic nested object inspection. | Build | P2 |
375
+ | `HexViewer` | Byte offsets, hex, and text representation. | Defer | P3 |
376
+ | `AnsiViewer` | Safely display ANSI-formatted output. | Research | P3 |
377
+
378
+ ### 6. Charts and numeric visualization
379
+
380
+ Charts are useful but expensive. Build shared axes, domains, legends, and
381
+ sampling first. Avoid duplicating `blessed-contrib` without a measurable API,
382
+ quality, or maintenance advantage.
383
+
384
+ | Component | Purpose | Decision | Priority |
385
+ | ------------------ | --------------------------------------------------- | ------------ | -------- |
386
+ | `Sparkline` | Compact single-series trend. | Build | P0 |
387
+ | `MultiSparkline` | Aligned compact series with labels. | Build | P1 |
388
+ | `MetricBars` | Labeled horizontal metric bars. | Build | P0 |
389
+ | `Gauge` | One bounded value with label and thresholds. | Build | P1 |
390
+ | `StackedGauge` | Composition of portions in one track. | Build | P2 |
391
+ | `BulletChart` | Actual value against target and qualitative ranges. | Build | P2 |
392
+ | `BarChart` | Categorical value comparison. | Research | P2 |
393
+ | `StackedBarChart` | Category composition over multiple series. | Research | P3 |
394
+ | `LineChart` | One or more series over an axis. | Research | P2 |
395
+ | `AreaChart` | Filled time-series trend. | Defer | P3 |
396
+ | `Histogram` | Numeric distribution by bins. | Build | P2 |
397
+ | `Heatmap` | Dense matrix of intensity values. | Research | P3 |
398
+ | `CalendarHeatmap` | Activity intensity by date. | Build | P3 |
399
+ | `ScatterPlot` | Relationship between two numeric values. | Defer | P3 |
400
+ | `BoxPlot` | Statistical distribution summary. | Defer | P3 |
401
+ | `Donut` | Part-to-whole radial display. | Defer | P3 |
402
+ | `PieChart` | Part-to-whole radial display. | Do not build | — |
403
+ | `CandlestickChart` | Open/high/low/close financial series. | Defer | P3 |
404
+ | `WaterfallChart` | Sequential positive and negative contributions. | Defer | P3 |
405
+ | `Legend` | Shared series labels and glyphs. | Build | P1 |
406
+ | `Axis` | Shared numeric/category axis renderer. | Build | P2 |
407
+ | `Thresholds` | Shared warning and critical ranges. | Build | P1 |
408
+
409
+ `PieChart` is a non-goal: terminal cell aspect ratios and low resolution make
410
+ angle and area comparison poor. Prefer `MetricBars`, `ProgressStack`, or
411
+ `Donut` only when visual familiarity outweighs precision.
412
+
413
+ ### 7. Navigation
414
+
415
+ Navigation components need a shared focus model and documented keyboard maps.
416
+
417
+ | Component | Purpose | Decision | Priority |
418
+ | ---------------- | ---------------------------------------------- | -------- | -------- |
419
+ | `Tabs` | Switch between labeled views. | Build | P1 |
420
+ | `TabList` | Compound tab trigger collection. | Build | P1 |
421
+ | `Menu` | Vertical action navigation. | Build | P1 |
422
+ | `MenuBar` | Top-level horizontal menus. | Build | P2 |
423
+ | `ContextMenu` | Mouse or keyboard anchored action menu. | Research | P3 |
424
+ | `NavigationList` | Route or view navigation with active state. | Build | P2 |
425
+ | `Pagination` | Move through bounded result pages. | Build | P2 |
426
+ | `Pager` | Previous/next navigation for views or records. | Build | P2 |
427
+ | `Carousel` | Manual or timed view rotation. | Adapt | P3 |
428
+ | `CommandPalette` | Searchable command execution. | Build | P2 |
429
+ | `QuickSwitcher` | Search and switch resources or views. | Build | P2 |
430
+ | `HelpOverlay` | Searchable keyboard shortcut reference. | Build | P1 |
431
+
432
+ ### 8. Inputs and forms
433
+
434
+ Blessed already has form elements. Value comes from typed values, validation,
435
+ consistent state, composition, and cleanup.
436
+
437
+ | Component | Purpose | Decision | Priority |
438
+ | ----------------- | ------------------------------------------------------ | -------- | -------- |
439
+ | `Button` | Typed action with tone, disabled, and loading states. | Adapt | P1 |
440
+ | `IconButton` | Compact action with required text description. | Build | P2 |
441
+ | `TextField` | Single-line text with label, hint, and error. | Adapt | P1 |
442
+ | `PasswordField` | Masked input with reveal behavior. | Build | P2 |
443
+ | `TextArea` | Multiline text with validation and counters. | Adapt | P2 |
444
+ | `NumberField` | Numeric input with parsing, bounds, and step. | Build | P2 |
445
+ | `SearchField` | Query input with clear and submit actions. | Build | P1 |
446
+ | `Checkbox` | Boolean value with indeterminate state. | Adapt | P1 |
447
+ | `RadioGroup` | One value from visible choices. | Adapt | P1 |
448
+ | `Switch` | Immediate boolean setting. | Build | P2 |
449
+ | `Select` | One value from a popup or inline list. | Build | P1 |
450
+ | `MultiSelect` | Multiple values with filtering. | Build | P2 |
451
+ | `Combobox` | Searchable input plus suggestions. | Build | P2 |
452
+ | `Autocomplete` | Suggest completions while typing. | Build | P2 |
453
+ | `DateInput` | Parse and validate a date string. | Research | P3 |
454
+ | `TimeInput` | Parse and validate time. | Research | P3 |
455
+ | `KeybindingInput` | Capture and display shortcut combinations. | Build | P3 |
456
+ | `FilePicker` | Navigate and select files or directories. | Adapt | P2 |
457
+ | `FormField` | Label, control, hint, required, and error composition. | Build | P1 |
458
+ | `Form` | Submission, validation, reset, and field registry. | Adapt | P1 |
459
+
460
+ ### 9. Overlays and transient UI
461
+
462
+ Terminal overlays require layering, focus capture, focus restoration, and
463
+ global key cleanup.
464
+
465
+ | Component | Purpose | Decision | Priority |
466
+ | --------------- | ----------------------------------------------- | -------- | -------- |
467
+ | `Overlay` | Shared screen layer and dismissal behavior. | Build | P1 |
468
+ | `Dialog` | Modal content with focus capture and restore. | Build | P1 |
469
+ | `ConfirmDialog` | Confirm or cancel a consequential action. | Build | P1 |
470
+ | `PromptDialog` | Request one value in a modal flow. | Adapt | P2 |
471
+ | `Drawer` | Edge-attached temporary panel. | Build | P2 |
472
+ | `Popover` | Anchored temporary content. | Research | P3 |
473
+ | `Tooltip` | Delayed contextual help. | Adapt | P3 |
474
+ | `ToastViewport` | Position and manage toast notifications. | Build | P2 |
475
+ | `Spotlight` | Full-screen searchable action/resource overlay. | Build | P2 |
476
+
477
+ ### 10. Developer-tool components
478
+
479
+ Strong opportunity: terminal applications are frequently developer tools.
480
+ These components can differentiate the package from generic dashboard
481
+ libraries.
482
+
483
+ | Component | Purpose | Decision | Priority |
484
+ | ------------------ | --------------------------------------------------- | ----------- | -------- |
485
+ | `CodeViewer` | Syntax-highlighted, scrollable source. | Build | P2 |
486
+ | `DiffViewer` | Unified or split patch rendering. | Build | P2 |
487
+ | `StackTrace` | Parse and navigate stack frames. | Build | P2 |
488
+ | `TestResults` | Suites, tests, failures, duration, and retry state. | Block first | P2 |
489
+ | `BuildStatus` | Build phases, duration, logs, and outcome. | Block first | P2 |
490
+ | `GitStatus` | Branch, staged, modified, untracked, conflicts. | Block first | P2 |
491
+ | `CommitList` | Commit summary, author, date, and refs. | Block first | P3 |
492
+ | `DependencyTree` | Package dependency hierarchy and problems. | Block first | P3 |
493
+ | `RequestInspector` | HTTP request/response headers and body. | Block first | P3 |
494
+ | `QueryResults` | Database result table and execution metadata. | Block first | P3 |
495
+ | `EnvironmentTable` | Masked environment variable inspection. | Build | P3 |
496
+ | `ShortcutRecorder` | Inspect keypress names emitted by terminal. | Build | P3 |
497
+ | `EventLog` | Structured event stream for debugging TUI behavior. | Build | P2 |
498
+ | `PerformancePanel` | FPS, render time, memory, and event-loop delay. | Research | P3 |
499
+
500
+ ### 11. Terminal and process components
501
+
502
+ High power, high lifecycle and security cost.
503
+
504
+ | Component | Purpose | Decision | Priority |
505
+ | --------------- | ----------------------------------------------- | ----------- | -------- |
506
+ | `TerminalPane` | Embed a subprocess terminal. | Adapt | P3 |
507
+ | `ProcessRunner` | Run command, stream output, expose exit state. | Research | P3 |
508
+ | `ProcessTable` | Monitor multiple child processes. | Block first | P3 |
509
+ | `CommandOutput` | Read-only stdout/stderr viewer with status. | Build | P2 |
510
+ | `TaskRunner` | Execute named tasks with logs and cancellation. | Block first | P3 |
511
+ | `REPL` | Prompt, history, evaluation, and results. | Research | P3 |
512
+ | `ShellHistory` | Search and select previous commands. | Research | P3 |
513
+
514
+ Process APIs must never execute shell strings implicitly. Commands, arguments,
515
+ environment, cancellation, and signal behavior require explicit contracts.
516
+
517
+ ### 12. Content and media
518
+
519
+ Useful, but dependency-heavy features should remain optional entry points.
520
+
521
+ | Component | Purpose | Decision | Priority |
522
+ | ---------------- | ------------------------------------------------------ | -------- | -------- |
523
+ | `MarkdownViewer` | Render Markdown into terminal-safe content. | Research | P3 |
524
+ | `RichText` | Styled spans, links, and selectable text. | Research | P3 |
525
+ | `Link` | Visible URL plus optional terminal hyperlink sequence. | Build | P2 |
526
+ | `Image` | Capability-aware terminal image or text fallback. | Adapt | P3 |
527
+ | `AsciiArt` | Render static art with alignment and cropping. | Build | P3 |
528
+ | `BigText` | Large glyph text through Blessed. | Adapt | P3 |
529
+ | `QRCode` | Render QR codes using terminal cells. | Build | P3 |
530
+ | `ColorSwatch` | Show terminal color and numeric representation. | Build | P3 |
531
+ | `Palette` | Display semantic theme colors and contrast pairs. | Build | P3 |
532
+
533
+ ### 13. Date, time, and scheduling
534
+
535
+ | Component | Purpose | Decision | Priority |
536
+ | ----------------- | ----------------------------------------- | -------- | -------- |
537
+ | `Clock` | Live local or zoned time. | Build | P2 |
538
+ | `Timer` | Elapsed duration with pause and reset. | Build | P2 |
539
+ | `Countdown` | Remaining duration with completion event. | Build | P2 |
540
+ | `Calendar` | Navigate and select dates. | Research | P3 |
541
+ | `DateRangePicker` | Select a bounded date interval. | Defer | P3 |
542
+ | `Schedule` | Ordered upcoming events. | Build | P3 |
543
+ | `Gantt` | Time-based task spans. | Defer | P3 |
544
+
545
+ ### 14. Application blocks
546
+
547
+ Build as examples first. Promote lower-level pieces only after reuse appears.
548
+
549
+ | Block | Components it validates |
550
+ | --------------------- | ------------------------------------------------ |
551
+ | `SystemMonitor` | stats, sparklines, process table, gauges |
552
+ | `ServiceDashboard` | health, latency, logs, alerts, timelines |
553
+ | `GitClient` | file tree, status, commit list, diff viewer |
554
+ | `TestRunner` | tree, progress, failures, logs, command output |
555
+ | `TaskDashboard` | task progress, process output, notifications |
556
+ | `DatabaseExplorer` | tree, query editor, results table, inspector |
557
+ | `HTTPInspector` | request list, headers, body, timing bars |
558
+ | `PackageExplorer` | search, dependency tree, metadata, versions |
559
+ | `FileManager` | tree, list, preview, actions, dialogs |
560
+ | `LogDashboard` | filters, virtual log viewer, histogram, timeline |
561
+ | `KubernetesDashboard` | resource table, status, events, logs |
562
+ | `QueueMonitor` | rates, depth, workers, failures, retries |
563
+ | `CI Dashboard` | pipelines, jobs, duration, logs, artifacts |
564
+ | `CommandCenter` | command palette, shortcuts, task runner |
565
+
566
+ ## Recommended scope
567
+
568
+ ### Release 0.1 — Display foundation
569
+
570
+ - `visibleWidth`
571
+ - `truncate`
572
+ - `escapeTags`
573
+ - `scaleValue`
574
+ - number and percent formatters
575
+ - `Text`
576
+ - `ProgressBar`
577
+ - `Sparkline`
578
+ - `MetricBars`
579
+ - `Stat`
261
580
 
262
- Objetivo: construir pantallas completas sin strings monolíticos.
581
+ This release proves rendering, width calculations, themes, packaging, and
582
+ updates without requiring complex focus behavior.
263
583
 
264
- Componentes:
584
+ ### Release 0.2 — Composition and states
265
585
 
266
- - `Stat`
267
586
  - `Card`
587
+ - `Stack`
588
+ - `Divider`
268
589
  - `KeyValue`
269
590
  - `Badge`
270
- - `Divider`
271
- - `Stack`
272
-
273
- Validación:
274
-
275
- - dashboard de ejemplo combina `Stat`, `Sparkline` y `MetricBars`.
276
- - resize recalcula contenido sin fugas de listeners.
277
- - navegación de foco sigue siendo responsabilidad clara.
278
-
279
- ### M6 — Feedback y datos vivos
280
-
281
- Componentes:
282
-
591
+ - `Trend`
283
592
  - `Spinner`
284
- - `Status`
285
593
  - `Alert`
594
+ - `EmptyState`
595
+ - `TaskProgress`
596
+
597
+ ### Release 0.3 — Collections and live output
598
+
599
+ - shared selection primitive
600
+ - `List`
601
+ - `Table`
286
602
  - `LogViewer`
287
- - `Timer`
603
+ - `Timeline`
604
+ - `JsonViewer`
605
+ - virtualization experiment
288
606
 
289
- Capacidades:
607
+ ### Release 0.4 — Navigation and overlays
608
+
609
+ - shared keymap and focus-scope primitives
610
+ - `Tabs`
611
+ - `Menu`
612
+ - `HelpOverlay`
613
+ - `Overlay`
614
+ - `Dialog`
615
+ - `ConfirmDialog`
616
+ - `CommandPalette`
290
617
 
291
- - actualizaciones frecuentes con render mínimo.
292
- - pausa, reanudación y limpieza de timers/listeners.
293
- - límite configurable de historial.
618
+ ### Release 0.5 Forms
294
619
 
295
- ### M7 — Datos avanzados
620
+ - `Button`
621
+ - `FormField`
622
+ - `TextField`
623
+ - `SearchField`
624
+ - `Checkbox`
625
+ - `RadioGroup`
626
+ - `Select`
627
+ - `Form`
296
628
 
297
- Componentes:
629
+ ### Release 0.6 — Advanced data display
298
630
 
299
- - `BarChart`
300
- - `LineChart`
301
- - `Histogram`
302
- - `Heatmap`
303
- - `Table`
631
+ - `DataTable`
304
632
  - `Tree`
633
+ - `DiffView`
634
+ - `LogExplorer`
635
+ - `CodeViewer`
636
+ - `StackTrace`
637
+
638
+ ### Release 0.7 — Layout system
639
+
640
+ - `Viewport`
641
+ - `ScrollArea`
642
+ - `Grid`
643
+ - `SidebarLayout`
644
+ - `Collapsible`
645
+ - `Accordion`
646
+ - `AppShell`
647
+
648
+ ### Release 0.8 — Visualization primitives
649
+
650
+ - `Legend`
651
+ - `Axis`
652
+ - `Thresholds`
653
+ - `Gauge`
654
+ - `ProgressStack`
655
+ - `Histogram`
656
+ - chart prototype evaluation
305
657
 
306
- Regla: construir solo cuando primitives actuales no puedan componer caso.
307
- Evitar duplicar `blessed-contrib` sin ventaja clara de API, tamaño, pruebas o
308
- accesibilidad.
658
+ ### Release 0.9 Hardening
309
659
 
310
- ### M8 Interacción
660
+ - Windows, macOS, and Linux compatibility;
661
+ - terminal capability matrix;
662
+ - mouse and keyboard integration tests;
663
+ - high-frequency update benchmarks;
664
+ - memory and listener leak tests;
665
+ - public API review;
666
+ - migration tooling;
667
+ - documentation site and component gallery.
311
668
 
312
- Componentes:
669
+ ### Release 1.0 — Stable core
313
670
 
314
- - `Tabs`
315
- - `Menu`
316
- - `CommandPalette`
317
- - `Select`
318
- - `TextField`
319
- - `Form`
671
+ - stable semantic versioning policy;
672
+ - stable component lifecycle contract;
673
+ - stable theme token contract;
674
+ - documented keyboard maps;
675
+ - runnable examples for every component;
676
+ - performance budgets;
677
+ - accessibility and fallback guidance;
678
+ - upgrade and deprecation policy.
320
679
 
321
- Requisitos:
322
-
323
- - teclado configurable.
324
- - foco visible.
325
- - cleanup completo de eventos.
326
- - acciones públicas testeables sin inspeccionar internals.
327
-
328
- ### M9 — Release 1.0
329
-
330
- - API estable y política SemVer.
331
- - documentación por componente.
332
- - ejemplos copiables.
333
- - tabla de compatibilidad Node, terminal y `blessed`.
334
- - changelog y guía de migración.
335
- - pruebas en Linux, macOS y Windows.
336
- - presupuesto de tamaño y rendimiento.
337
-
338
- ## Backlog de componentes
339
-
340
- | Prioridad | Componente | Estado objetivo |
341
- | --------- | ------------------------------------------- | ----------------- |
342
- | P0 | `ProgressBar` | tracer bullet |
343
- | P0 | `Sparkline` | ejemplo downloads |
344
- | P0 | `MetricBars` | ejemplo score |
345
- | P0 | `Stat` | valor destacado |
346
- | P1 | `Card`, `KeyValue`, `Badge`, `Divider` | composición |
347
- | P1 | `Spinner`, `Status`, `Alert` | feedback |
348
- | P1 | `Table`, `LogViewer` | datos |
349
- | P2 | `Stack`, `Tabs`, `Menu` | layout/navegación |
350
- | P2 | `BarChart`, `LineChart`, `Histogram` | charts |
351
- | P3 | `CommandPalette`, `Form`, `Tree`, `Heatmap` | avanzado |
352
-
353
- ## Contratos comunes
354
-
355
- Todos los componentes deben definir:
356
-
357
- - datos aceptados.
358
- - salida para datos vacíos.
359
- - comportamiento ante valores inválidos.
360
- - política de truncado y resize.
361
- - soporte color/Unicode.
362
- - métodos de actualización.
363
- - eventos emitidos, si existen.
364
- - ownership de listeners, timers y destrucción.
365
-
366
- Interfaz común candidata:
680
+ ## TDD strategy
367
681
 
368
- ```ts
369
- interface ComponentHandle<T> {
370
- element: blessed.Widgets.BoxElement
371
- setData(data: T): void
372
- destroy(): void
373
- }
682
+ Develop as vertical tracer bullets. Never write the complete test suite before
683
+ implementation.
684
+
685
+ ```text
686
+ RED: one public behavior fails
687
+
688
+ GREEN: minimum implementation passes
689
+
690
+ REFACTOR: improve design while green
691
+
692
+ next behavior
374
693
  ```
375
694
 
376
- Adoptar solo después del tracer bullet. Si retornar directamente elemento
377
- `blessed` resulta más natural, preferir API menor.
378
-
379
- ## Definition of Done por componente
380
-
381
- - API pública documentada.
382
- - cada comportamiento agregado mediante ciclo RED→GREEN.
383
- - tests ejercen renderer/widget público.
384
- - estados normal, vacío, inválido y estrecho cubiertos.
385
- - Unicode y ASCII cubiertos.
386
- - ejemplo ejecutable.
387
- - cero listeners o timers después de `destroy`.
388
- - exports y tipos verificados desde paquete compilado.
389
- - changelog actualizado.
390
-
391
- ## Decisiones antes de implementar M0
392
-
393
- 1. Runtime mínimo de Node.
394
- 2. TypeScript obligatorio o JS con tipos generados.
395
- 3. Runner: Vitest, Node test runner u otro.
396
- 4. Soporte ESM, CommonJS o ambos.
397
- 5. `blessed` exacto soportado: paquete original o fork mantenido.
398
- 6. Primera API de widget:
399
- - retornar elemento `blessed` extendido; o
400
- - retornar `ComponentHandle`.
401
- 7. Política de resize:
402
- - automática mediante eventos; o
403
- - explícita mediante `setSize`/`render`.
404
-
405
- Recomendación inicial: resolver estas decisiones durante M0; después ejecutar
406
- M1 como tracer bullet antes de ampliar catálogo.
695
+ Test priority:
696
+
697
+ 1. visible output through a public renderer;
698
+ 2. bounds, scaling, truncation, and available width;
699
+ 3. state updates through public methods;
700
+ 4. real Blessed element integration;
701
+ 5. keyboard and focus behavior;
702
+ 6. ASCII, no-color, empty, invalid, and narrow states;
703
+ 7. listener, timer, and process cleanup;
704
+ 8. package-level ESM and CommonJS imports.
705
+
706
+ Avoid:
707
+
708
+ - testing private helpers directly when public behavior can prove them;
709
+ - mocking internal collaborators;
710
+ - asserting internal event call order;
711
+ - large snapshots as the primary contract;
712
+ - relying only on one terminal size;
713
+ - tests that pass despite broken visible output.
714
+
715
+ ## First tracer bullet: ProgressBar
716
+
717
+ RED GREEN cycles:
718
+
719
+ 1. Render 50% at a fixed width.
720
+ 2. Clamp values below `min` and above `max`.
721
+ 3. Render label and formatted value.
722
+ 4. Respect narrow inner width.
723
+ 5. Update content through `setData`.
724
+ 6. Use ASCII characters when Unicode is disabled.
725
+ 7. Apply semantic theme tokens.
726
+ 8. Destroy adapter-owned listeners.
727
+ 9. Import built package from ESM and CommonJS.
728
+
729
+ Exit criteria:
730
+
731
+ - public renderer API is validated;
732
+ - Blessed adapter contract is validated;
733
+ - component handle decision is recorded;
734
+ - pattern can be reused by `MetricBars` and `Gauge`.
735
+
736
+ ## Component admission criteria
737
+
738
+ A new component enters the package only when:
739
+
740
+ 1. at least two realistic use cases exist;
741
+ 2. it provides more than a renamed Blessed constructor;
742
+ 3. its responsibilities cannot be composed clearly from existing exports;
743
+ 4. keyboard and focus behavior can be specified;
744
+ 5. narrow, empty, invalid, ASCII, and no-color states are understood;
745
+ 6. lifecycle ownership is explicit;
746
+ 7. a public-behavior test plan exists;
747
+ 8. maintenance cost is proportionate to expected use.
748
+
749
+ Otherwise, keep it as a pattern, example, block, or external integration.
750
+
751
+ ## Common contracts
752
+
753
+ Every component must document:
754
+
755
+ - accepted data;
756
+ - defaults;
757
+ - empty output;
758
+ - invalid input behavior;
759
+ - truncation and wrapping;
760
+ - resize behavior;
761
+ - Unicode and color fallbacks;
762
+ - controlled and uncontrolled state, if applicable;
763
+ - keyboard map;
764
+ - focus entry, movement, and restoration;
765
+ - emitted events;
766
+ - listener, timer, stream, and process ownership;
767
+ - `setData`, `setOptions`, or immutable recreation policy;
768
+ - destruction behavior;
769
+ - performance limits.
770
+
771
+ ## Definition of Done
772
+
773
+ - Public API and exported types documented.
774
+ - Each behavior added through a RED → GREEN cycle.
775
+ - Tests use public renderers or component handles.
776
+ - Normal, empty, invalid, and narrow states covered.
777
+ - Unicode, ASCII, color, and no-color behavior covered.
778
+ - Keyboard map covered for interactive components.
779
+ - Focus restoration covered for overlays.
780
+ - No listeners, timers, streams, or processes survive `destroy()`.
781
+ - Runnable example included.
782
+ - ESM and CommonJS package imports verified.
783
+ - Packed npm contents inspected.
784
+ - Changelog entry generated by release workflow.
785
+
786
+ ## Decisions still requiring prototypes
787
+
788
+ 1. Return an extended Blessed element or `ComponentHandle`.
789
+ 2. Represent pure output as strings, rows, cells, or a richer render model.
790
+ 3. Automatic resize listeners or explicit resize/update calls.
791
+ 4. One package or optional subpath exports for charts and media.
792
+ 5. Mouse behavior enabled by default or opt-in.
793
+ 6. Theme inheritance through explicit options or screen-attached context.
794
+ 7. Virtualization API shared by lists, tables, trees, and logs.
795
+ 8. Supported Blessed implementation: original package, maintained fork, or
796
+ adapter compatibility layer.
797
+
798
+ Resolve decisions through small prototypes and public behavior tests, not
799
+ abstract API design alone.