Commit graph

64 commits

Author SHA1 Message Date
c0107de978 docs: Actualizar sección documentación según protocolo
Formato requerido por PROTOCOLO_DOCUMENTACION_2025-12-16.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 01:38:22 +01:00
362393dd10 docs: Bump zcatgui to v0.16.1
- Actualizar CLAUDE.md con tarea TTF completada
- Añadir v0.16.1 al historial (fuente embebida)
- Actualizar versión en todos los lugares

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 01:27:26 +01:00
42a9e97a6b docs: Actualizar REFERENCE.md con fuente embebida
- Cambiar ejemplo TTF a usar initEmbedded() (recomendado)
- Añadir nota sobre fuente embebida en Features

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 01:22:01 +01:00
22d5e51769 feat: Embeber fuente AdwaitaSans-Regular.ttf
- Añadir src/render/fonts/AdwaitaSans-Regular.ttf (860KB)
- Crear src/render/embedded_font.zig con @embedFile
- Añadir TtfFont.initEmbedded() para carga sin dependencias
- Exportar embedded_font en zcatgui.zig

Ahora cualquier programa que use zcatgui tiene TTF
disponible automáticamente sin archivos externos.

Licencia: SIL Open Font License (redistribución OK)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 01:21:28 +01:00
a11e1ea842 feat: zcatgui v0.16.0 - TTF rasterization con antialiasing
Cambios:
- TTF rasterization completo con bezier curves
- Antialiasing via supersampling 2x
- Integración TTF en SoftwareRenderer (setTtfFont)
- Fix ArrayListUnmanaged para Zig 0.15.2
- Documentación REFERENCE.md actualizada

CLAUDE.md actualizado con v0.16.0 y historial.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 01:05:48 +01:00
0625e18e77 docs: Actualizar REFERENCE.md con API TTF completa
- Reemplazar nota de placeholder con documentación real
- Añadir ejemplos de código para cargar y usar TTF
- Documentar FontRef para API unificada bitmap/TTF
- Listar fuentes recomendadas con rutas en Fedora
- Documentar features: AA, cache, alpha blending

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 00:58:29 +01:00
f2900d9dc2 test(ttf): Añadir tests con AdwaitaSans real
- Test carga fuente del sistema
- Verificar parsing de contornos para 'A'
- Verificar rasterización produce bitmap con datos
- Test múltiples caracteres (AaBb0123)
- Tests skip gracefully si fuente no disponible

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 00:42:51 +01:00
69745ba857 feat(ttf): Implementar rasterización TTF con antialiasing
- Añadir GlyphPoint, Contour, GlyphOutline para representar contornos
- Implementar getGlyphOutline() para parsear tabla glyf
- Implementar rasterizeGlyph() con supersampling 2x
- Scanline fill con non-zero winding rule
- Subdivisión de curvas Bezier cuadráticas
- Cache de glyphs por codepoint+size
- Alpha blending para antialiasing
- Reemplazar drawGlyphPlaceholder con renderizado real

El código parsea contornos TTF y los rasteriza con antialiasing.
Próximo paso: test visual con AdwaitaSans.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 00:42:02 +01:00
54626c8edf docs: Actualizar CLAUDE.md con protocolo documentación y tarea TTF
- Añadir sección PROTOCOLO DE DOCUMENTACIÓN (2025-12-16)
  - Agenda = índice, detalles en hitos/
  - Límite ~300 líneas por archivo
- Añadir sección TAREA ACTUAL: Fuentes TTF con Antialiasing
  - Estado de ttf.zig y fases de implementación
- TextInput: añadir text_color/border_color para validación

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-16 00:30:42 +01:00
1a5529dd5b feat: Centrado vertical texto y x_offset para botones
Cambios:
- base.zig: Añadido x_offset a ActionButtonsOpts y NavButtonsOpts
- text_input.zig: char_height 8→16 para fuente 8x16
- table/render.zig: char_height 8→16 (header y celdas)

El centrado vertical del texto ahora funciona correctamente
con fuentes 8x16 (VGA standard).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 21:22:23 +01:00
75613ec23f refactor: Rename DataManager to ChangeNotifier in panels
- Rename data_manager.zig to change_notifier.zig
- Update exports in panels.zig
- Clarifies that ChangeNotifier is for panel communication,
  not application data management (which apps implement separately)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 19:30:09 +01:00
7f5550dd1f feat(panels): Add DetailPanelBase for edit/detail panels
New module panels/detail/ with:
- DetailPanelState: 8-state machine for edit lifecycle
  (empty, viewing, editing, new, saving, saved, error_save, deleting)
- DetailPanelBase: Common functionality for detail panels
  - Semaphore visual indicator (color + text)
  - Action buttons (New, Save, Delete)
  - Navigation buttons (|< < > >|)
  - Progressive escape handling
  - Saved state timer (2s transition)

Enables code reuse across detail panels (Customer, Document, Product, etc.)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-14 12:30:56 +01:00
7aab1ef7c9 chore: Eliminar widgets/table.zig (código muerto)
1592 líneas eliminadas - archivo no usado.
widgets.zig importa table/table.zig (versión fragmentada).

Detectado durante auditoría de tamaños de archivo.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 23:06:22 +01:00
1ee10b8e17 feat: Añadir archivos nuevos de widgets y focus
Archivos que estaban localmente pero no en el repo:
- src/core/focus_group.zig (416 líneas)
- src/widgets/focus.zig (272 líneas)
- src/widgets/progress.zig (806 líneas)
- src/widgets/table.zig (1592 líneas)
- src/widgets/textarea.zig (871 líneas)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 22:55:41 +01:00
aa3d0edcff docs: Actualizar rutas teamdocs en CLAUDE.md
Nueva estructura teamdocs con carpetas agenda/, normas/, historial/.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 00:13:42 +01:00
e56d3bd1a7 fix: Aplicar clipping a headers de tabla, no solo contenido
El clip se aplicaba solo al área de contenido (excluyendo header),
lo que permitía que el texto de los headers se extendiera fuera
de los límites de la tabla.

Ahora el clip abarca toda la tabla (bounds completos) antes de
dibujar headers y contenido.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-12 00:07:29 +01:00
f3cdb213cf fix: Add table clipping + cursor animation API
Table clipping:
- Add clip region around table content area
- Prevents cell text from drawing outside table bounds
- Header and scrollbar render outside clip region

Cursor animation API:
- Add CURSOR_IDLE_TIMEOUT_MS (5s) and CURSOR_BLINK_PERIOD_MS (500ms) constants
- Add needsCursorAnimation() to check if cursor should blink
- Add getAnimationTimeout() for dynamic event loop timeout
- Update TextInput to use constants from Context

The application can now query ctx.getAnimationTimeout() to determine
if a short timeout is needed for cursor animation, or if it can wait
indefinitely for events.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 23:41:56 +01:00
e98646b442 feat: Hybrid cursor blink - blinks while active, solid when idle
Implement user-friendly cursor behavior:
- Cursor blinks (500ms on/off) while there's user activity
- After 5 seconds of inactivity, cursor becomes solid (always visible)
- Any input (keyboard, mouse move, click, scroll) resets the timer

Changes:
- context.zig: Add last_input_time_ms tracking
- input.zig: Add hasActivity() and hasActivityWithMouse() methods
- input.zig: Track mouse_x_prev/mouse_y_prev for movement detection
- text_input.zig: Implement hybrid blink logic

This saves battery on laptops while maintaining natural cursor feedback.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 23:32:35 +01:00
59935aeb2b refactor: Split textarea.zig and progress.zig into modular structures
Split large widget files for better maintainability (~500-600 lines per file):

textarea/ (was 882 lines):
- types.zig: TextAreaConfig, TextAreaColors, TextAreaResult
- state.zig: TextAreaState with cursor/selection methods
- render.zig: drawLineNumber, drawLineText, drawLineSelection
- textarea.zig: Main API with re-exports and tests

progress/ (was 806 lines):
- render.zig: Shared drawing helpers (stripes, gradients, arcs)
- bar.zig: ProgressBar widget
- circle.zig: ProgressCircle widget
- spinner.zig: Spinner widget with animation state
- progress.zig: Main API with re-exports and tests

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 23:21:06 +01:00
cfe4ee7935 refactor: Split table.zig into modular structure
Split the 1770-line table.zig into a cleaner module structure:

  src/widgets/table/
  ├── table.zig     (~400 lines) - Public API + re-exports + tests
  ├── types.zig     (~150 lines) - Enums, configs, column definitions
  ├── state.zig     (~500 lines) - TableState, TableResult
  ├── keyboard.zig  (~270 lines) - Keyboard handling, search
  └── render.zig    (~350 lines) - Drawing functions

Benefits:
- Each file is now manageable (<500 lines)
- Clearer separation of concerns
- Easier to navigate and modify
- Same public API (no breaking changes)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 23:11:35 +01:00
e73836493e docs: Plan de refactoring table.zig antes de dividir
Commit de seguridad antes de dividir table.zig (1770 líneas) en
múltiples archivos más manejables.

Ver docs/TABLE_REFACTORING_PLAN.md para el plan completo.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 23:04:08 +01:00
05e4f2c926 feat: Implement keyboard system improvements (4 phases)
Phase 1: Frame timing in Context
- Added current_time_ms and frame_delta_ms to Context
- Added setFrameTime() method for applications to provide timing

Phase 2: Centralized shortcuts system
- Added StandardShortcut enum with common shortcuts (copy, paste, etc.)
- Added isStandardActive() function for checking shortcuts
- Updated TextInput to use centralized shortcuts

Phase 3: Incremental search in table
- Added search_buffer, search_len, search_last_time to TableState
- Added addSearchChar(), getSearchTerm(), clearSearch() methods
- Typing in focused table searches first column (case-insensitive)
- 1 second timeout resets search buffer

Phase 4: Blinking cursor in TextInput
- Cursor blinks every 500ms when field is focused
- Uses current_time_ms from Context for timing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 22:58:22 +01:00
7073ccef9f docs: Plan de refactoring sistema de teclado
Auditoría comparando con Gio, microui y DVUI identificó 4 problemas:
1. SDL_KEYDOWN y SDL_TEXTINPUT separados
2. Dos arrays para eventos de teclado
3. Sin timing en Context para animaciones
4. Shortcuts duplicados en cada widget

Plan de 4 fases aprobado (~7-11 horas total).

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 22:43:05 +01:00
466735a6fd docs: Renombrar TEAM_STANDARDS a teamdocs
🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 19:33:25 +01:00
3517a6f972 docs: Documentar sistema de focus completado y widgets adaptados
- Actualizar FOCUS_TRANSITION_2025-12-11.md con patrón de integración
- Actualizar CLAUDE.md: sección SISTEMA DE FOCUS - RESUELTO
- Widgets adaptados a FocusSystem:
  - numberentry.zig: registerFocusable, requestFocus, hasFocus
  - textarea.zig: registerFocusable, requestFocus, hasFocus
  - select.zig: campo focused, integración completa
  - radio.zig: reemplazado focus manual por FocusSystem
  - slider.zig: reemplazado focus manual por FocusSystem
  - tabs.zig: navegación teclado solo cuando tiene focus

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 18:50:37 +01:00
7cde6370d8 fix: Sistema de focus rediseñado y funcionando
Cambios principales:
- Nuevo FocusSystem unificado en core/focus.zig
- Separación registration_group / active_group para multi-panel
- Focus implícito para primer widget del grupo activo
- Table inicializa selected_row/col a 0 cuando tiene datos
- Corregido test navKeyPressed (usaba setKeyState en vez de handleKeyEvent)

Bug resuelto: tabla no respondía a teclado sin clic previo
Causa: selected_col quedaba en -1, selectedCell() retornaba null

Documentación: docs/FOCUS_TRANSITION_2025-12-11.md

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 17:55:08 +01:00
9b6210c76e refactor: Unificar sistema de focus - trabajo en progreso
PROBLEMA DETECTADO:
- Existían dos sistemas de focus paralelos que no se comunicaban
- FocusManager (widgets/focus.zig) usaba IDs u32
- FocusGroupManager (core/focus_group.zig) usaba IDs u64
- Esto causaba que Tab no funcionara y clics no cambiaran focus

SOLUCIÓN CONSENSUADA:
- Usar SOLO FocusGroupManager como fuente de verdad
- Integrar en Context con métodos públicos
- Widgets se auto-registran en el grupo activo al dibujarse
- Tab navega DENTRO del grupo activo
- F6 (u otro) cambia entre grupos/paneles

CAMBIOS:
- context.zig: Añadidos createFocusGroup(), setActiveFocusGroup(),
  hasFocus(), requestFocus(), registerFocusable(), handleTabKey()
- text_input.zig: Usa @intFromPtr para ID único, se auto-registra
- table.zig: Ahora se registra como widget focusable
- widgets.zig/zcatgui.zig: Eliminadas referencias antiguas a FocusManager
- CLAUDE.md: Documentado el trabajo en progreso

ESTADO: EN PROGRESO - Compila pero requiere más testing

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-11 00:26:22 +01:00
88f5a15491 docs: Add MainLoop to VERIFIED_FEATURES
- Add mainloop.zig section with feature status
- Note that patterns are tested via zsimifactu manual implementation
- Add to verification history

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 12:26:22 +01:00
80b5d99bfd feat(core): Add MainLoop helper for optimized application loops
MainLoop encapsulates the CPU optimization patterns:
- Progressive sleep (8ms → 33ms → SDL_WaitEventTimeout)
- Automatic event handling
- Dirty region support
- Configurable timing parameters

Usage:
```zig
const MyApp = struct {
    pub fn handleEvent(self: *MyApp, event: Event, ctx: *Context) void { ... }
    pub fn update(self: *MyApp, ctx: *Context) bool { return changed; }
    pub fn draw(self: *MyApp, ctx: *Context, renderer: *Renderer) void { ... }
};

var loop = try MainLoop.init(allocator, 800, 600);
loop.run(backend, &app);
```

This moves CPU optimization from application code to library level,
making it easy for all zcatgui apps to achieve 0% CPU in idle.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 12:25:27 +01:00
3c0daa9644 docs: Update VERIFIED_FEATURES with partial redraw and SIMD
- Add clearRect as verified feature
- Mark fillRect as improved with SIMD @memset
- Add historial entry: render 1.4ms → 1.0ms

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 12:19:19 +01:00
f7af2ba833 perf(framebuffer): Optimize fillRect with row-wise @memset
For solid colors (alpha=255), use @memset per row instead of
pixel-by-pixel loop. @memset is SIMD-optimized by the compiler
(uses SSE/AVX on x86-64).

Result: Render time 1.4ms → 1.0ms (28% faster in Release build)

Also cleaner code separation between solid color fast path
and alpha blending slow path.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 12:18:47 +01:00
e5ba9b178c feat(render): Add partial redraw support with dirty regions
Framebuffer:
- Add clearRect() for clearing specific rectangular regions

SoftwareRenderer:
- Add executeWithDirtyRegions() for optimized partial rendering
- Add clearRect() convenience method
- Add commandBounds() to extract bounding box from draw commands
- Add rectsIntersect() helper for intersection testing

This enables applications to:
1. Clear only dirty regions instead of full screen
2. Skip rendering commands outside dirty areas
3. Significantly reduce CPU when only small areas change

Usage: Pass dirty_regions from Context.getDirtyRects() to
executeWithDirtyRegions() instead of using clear()+executeAll().

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 12:12:21 +01:00
d44d4d26d2 docs: Update VERIFIED_FEATURES with waitEvent verification
- Mark waitEvent and waitEventTimeout as verified in sdl2.zig
- Add historial entry: CPU 92% → 1.9% with progressive sleep

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 12:07:47 +01:00
eebd0022ce feat(backend): Add waitEvent and waitEventTimeout for 0% CPU idle
- Add waitEvent() and waitEventTimeout() to Backend abstract interface
- Implement SDL_WaitEvent and SDL_WaitEventTimeout in SDL2 backend
- Refactor translateEvent into shared function
- Optional vtable entries with fallback to pollEvent for compatibility

This enables progressive sleep patterns:
- Phase 1: Short sleep (8ms) for quick response
- Phase 2: Medium sleep (33ms) for moderate idle
- Phase 3: SDL_WaitEventTimeout for 0% CPU in deep idle

Result: CPU 92% → 1.9% in idle applications.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 12:06:45 +01:00
d8f0523e8f docs: Add VERIFIED_FEATURES.md - tracking production-tested features
Documento que distingue features realmente probadas en producción
vs solo tests unitarios. Incluye:
- 48 widgets con estado de verificación
- Core modules (context, input, layout, style)
- Render modules (framebuffer, font, software)
- Backends (SDL2, WASM, Android, iOS)

Verificado en zsimifactu:
- Table, TextInput, Split, Panel
- Font 8x16 Latin-1, UTF-8 rendering
- SDL2 backend completo

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 12:00:37 +01:00
51d41bd01e perf(font): Optimizar drawChar con fast path para caracteres visibles
- Early out para caracteres completamente fuera del clip
- Fast path para caracteres 100% visibles (caso común)
- Escritura directa al buffer de píxeles sin setPixel
- Loop optimizado para fuentes de 8px de ancho
- Unroll de los 8 bits del glyph byte

Resultados:
- Debug: 40ms → 32ms por frame
- Release: 40ms → 1.5ms por frame (~26x más rápido)

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 11:40:58 +01:00
097f1474ca perf(sdl2): Usar aceleración GPU + VSync para reducir CPU
Cambio de SDL_RENDERER_SOFTWARE a SDL_RENDERER_ACCELERATED | PRESENTVSYNC:
- VSync sincroniza con el refresco del monitor (~60Hz)
- SDL_RenderPresent() ahora bloquea hasta el próximo frame
- Elimina necesidad de sleep manual en aplicaciones
- CPU de ~70% a ~1-5% en idle

Fallback a software renderer si GPU no disponible.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 10:49:55 +01:00
feb1c4f48d feat(TextInput): Manejar teclas especiales internamente
El widget TextInput ahora procesa internamente:
- Backspace/Delete: borrar caracteres
- Flechas izq/der: mover cursor
- Home/End: inicio/fin del texto
- Shift+movimiento: selección
- Ctrl+A: seleccionar todo
- Enter: submit

Esto hace que el widget sea auto-contenido y reutilizable,
sin requerir manejo de teclas en la aplicación.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 01:39:26 +01:00
f7a7b48c2c docs: Documentar soporte UTF-8 en renderizado de texto
- REFERENCE.md: Nueva sección "UTF-8 Text Rendering" explicando:
  - Cómo funciona la decodificación UTF-8 → Latin-1
  - Caracteres soportados (ASCII + Latin-1 Supplement)
  - Por qué UTF-8 es el estándar correcto para BD/archivos
  - Ejemplo de uso con texto español

- software.zig: Doc comments explicando el sistema UTF-8

El renderer ahora maneja texto UTF-8 automáticamente,
permitiendo mostrar correctamente: ñ, á, é, í, ó, ú, ¿, ¡, €, etc.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 01:37:00 +01:00
2e1b627f11 fix(render): Decodificar UTF-8 correctamente en drawText
El renderer iteraba byte por byte, causando que caracteres UTF-8
multi-byte (como ñ, á, é) se mostraran incorrectamente.

Cambios:
- Decodificación completa de UTF-8 (1-4 bytes)
- Mapeo de codepoints a Latin-1 para renderizado
- Caracteres fuera de Latin-1 se muestran como '?'

Esto permite mostrar correctamente texto en español y otros
idiomas europeos que usan caracteres Latin-1.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 01:30:21 +01:00
784fecac01 feat(fonts): Sistema de fuentes multi-tamaño con 8x16 Latin-1
Nuevas fuentes bitmap 8x16 (altura VGA estándar, mejor legibilidad):
- font_8x16: ASCII básico (95 caracteres)
- font_8x16_latin1: Latin-1 completo (224 caracteres)

Sistema FontSize para selección por categoría:
- getFontForSize(.small) → 8x8 Latin-1 (compacto)
- getFontForSize(.medium) → 8x16 Latin-1 (estándar UI)
- getFontForSizeAscii() variantes para menor memoria

Soporte completo español/europeo: ñ, Ñ, á, é, í, ó, ú, ü, ¿, ¡, ç, ß

Documentación actualizada en REFERENCE.md con tabla de fuentes
y ejemplos de uso.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 01:19:34 +01:00
520c5d7343 🌍 Font Latin-1 completo para soporte español/europeo
- Nuevo font_data.zig con datos de glifos separados
- font_8x8_ascii: ASCII básico (32-126)
- font_8x8_latin1: Latin-1 completo (32-255)
- Soporte español: ñ, Ñ, á, é, í, ó, ú, ü, ¿, ¡
- Soporte europeo: français, deutsch, português, italiano
- Exports: default_font_latin1, font_data

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 01:03:02 +01:00
14d717d7f4 🔧 Font completo + key repeat para navegación
- Font bitmap 8x8 completo (ASCII 32-126)
- navKeyPressed() ahora detecta key repeat de SDL2
- Exportar default_font desde render module

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-10 00:50:44 +01:00
296939bb65 🔧 FIX: Compatibilidad Zig 0.15.2
- build.zig.zon: .name = .zcatgui (enum literal, no string)
- examples/widgets_demo.zig: Añadido try en Context.init
- examples/table_demo.zig: Añadido try en Context.init
- ZIG_VERSION_NOTES.md: Referencia a sistema notas versiones

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 23:01:09 +01:00
2de8f626be docs: Update CLAUDE.md with REFERENCE.md link and cleanup
- Add REFERENCE.md to documentation protocol (Step 3)
- Update widget count to 37
- Update LOC to ~35K
- Add REFERENCE.md to file structure
- Remove obsolete roadmap sections (now in DEVELOPMENT_PLAN.md)
- Simplify documentation section with table
- Clean up references section

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 22:46:09 +01:00
b42945ba81 docs: Complete API Reference Manual (1370 lines)
REFERENCE.md - Comprehensive documentation for zcatgui library

Contents:
- Overview and design philosophy
- Installation and build commands (all platforms)
- Quick start guide with examples
- Architecture diagram and file structure
- Core modules documentation:
  - Context, Layout, Style, Input, Command
  - Clipboard, DragDrop, Shortcuts, Focus
  - Accessibility, Gesture recognition

- All 37 widgets documented with categories:
  - Basic: Label, Button, TextInput, TextArea, Checkbox, Radio, Switch
  - Selection: Select, List, AutoComplete, Menu, Tabs
  - Data: Table, Tree, VirtualScroll
  - Input: Slider, NumberEntry, ColorPicker, DatePicker
  - Feedback: Progress, Tooltip, Toast, Badge, Loader
  - Layout: Split, Panel, Modal, ScrollArea, Surface, Grid, Resize, Divider
  - Navigation: AppBar, NavDrawer, Sheet, Breadcrumb, Discloser
  - Visual: Icon, IconButton, Image, RichText, Canvas, Chart
  - Interactive: Reorderable, Selectable

- Rendering system:
  - Framebuffer, SoftwareRenderer
  - Bitmap and TTF fonts
  - Animation system (20+ easing functions, spring physics)
  - Effects (shadows, gradients, blur, AA)

- Backend documentation:
  - SDL2 (desktop)
  - WASM (browser) with JS integration
  - Android (NDK)
  - iOS (UIKit bridge)

- Macro system (record/playback)
- Panel system (Lego architecture)
- Performance utilities (arena, pools, benchmarks)
- Theme system (5 built-in themes)
- Accessibility system
- Full API reference

Stats: 35K LOC, 81 source files, 37 widgets, 4 backends

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 18:42:52 +01:00
6889474327 feat: zcatgui v0.15.0 - Mobile & Web Backends
WASM Backend:
- src/backend/wasm.zig: Browser backend using extern JS functions
- web/zcatgui.js: Canvas 2D rendering bridge (~200 LOC)
- web/index.html: Demo page with event handling
- examples/wasm_demo.zig: Widget showcase for browser
- Output: 18KB WASM binary

Android Backend:
- src/backend/android.zig: ANativeActivity + ANativeWindow
- examples/android_demo.zig: Touch-enabled demo
- Touch-to-mouse event mapping
- Logging via __android_log_print
- Targets: ARM64 (device), x86_64 (emulator)

iOS Backend:
- src/backend/ios.zig: UIKit bridge via extern C functions
- ios/ZcatguiBridge.h: Objective-C header
- ios/ZcatguiBridge.m: UIKit implementation (~320 LOC)
- CADisplayLink render loop
- Touch event queue with @synchronized
- Targets: ARM64 (device), ARM64 simulator

Build System:
- WASM: zig build wasm
- Android: zig build android / android-x86
- iOS: zig build ios / ios-sim
- Conditional compilation for platform detection

Documentation:
- docs/MOBILE_WEB_BACKENDS.md: Comprehensive guide (~400 lines)
- Updated DEVELOPMENT_PLAN.md with FASE 10
- Updated CLAUDE.md with new commands

Stats: 3 backends, ~1500 new LOC, cross-platform ready

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 18:20:13 +01:00
91e13f6956 feat: zcatgui Gio parity - 12 new widgets + gesture system
New widgets (12):
- Switch: Toggle switch with animation
- IconButton: Circular icon button (filled/outlined/ghost/tonal)
- Divider: Horizontal/vertical separator with optional label
- Loader: 7 spinner styles (circular/dots/bars/pulse/bounce/ring/square)
- Surface: Elevated container with shadow layers
- Grid: Layout grid with scrolling and selection
- Resize: Draggable resize handle (horizontal/vertical/both)
- AppBar: Application bar (top/bottom) with actions
- NavDrawer: Navigation drawer with items, icons, badges
- Sheet: Side/bottom sliding panel with modal support
- Discloser: Expandable/collapsible container (3 icon styles)
- Selectable: Clickable region with selection modes

Core systems added:
- GestureRecognizer: Tap, double-tap, long-press, drag, swipe
- Velocity tracking and fling detection
- Spring physics for fluid animations

Integration:
- All widgets exported via widgets.zig
- GestureRecognizer exported via zcatgui.zig
- Spring/SpringConfig exported from animation.zig
- Color.withAlpha() method added to style.zig

Stats: 47 widget files, 338+ tests, +5,619 LOC
Full Gio UI parity achieved.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 17:21:15 +01:00
5a751782ea docs: Add comprehensive README.md
- Project overview and features
- Quick start example
- Full widget list (35 widgets)
- Unique features documentation (Macros, Lego Panels, Table)
- Theme system
- Performance utilities
- Build instructions
- Comparison with DVUI/Dear ImGui

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 14:01:01 +01:00
f219e14f9c docs: Mark all development phases complete
Updated DEVELOPMENT_PLAN.md checklist:
- All 35 widgets marked complete
- All 9 development phases complete
- 274+ tests passing
- Ready for v1.0.0 release

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
2025-12-09 14:00:09 +01:00