Commit Graph
7 Commits
Author SHA1 Message Date
phranck 2cdb0dd3db Refactor: Simplify Spinner API — remove speed, track width, and trail length enums
Radically simplify the Spinner public API from 6 parameters to 3.
Remove SpinnerSpeed, BouncingTrackWidth, and BouncingTrailLength enums.
Hardcode calibrated intervals (dots 110ms, line 140ms, bouncing 100ms),
fixed track width (9), and trail opacities with edge overshoot for
smooth fade-in/fade-out at track edges.
2026-02-02 20:25:38 +01:00
phranck dec8c7c29f Feat: Add Spinner view with dots, line, and bouncing styles
Auto-animating loading indicator with three visual styles:
- Dots (braille rotation), Line (ASCII rotation), Bouncing (Larson scanner
  with fade trail). Time-based frame calculation ensures each spinner runs
  at its own speed independent of render triggers.

Configurable: SpinnerSpeed (.slow/.regular/.fast), BouncingTrackWidth
(.minimum/.default/.maximum/.fixed(Int)), BouncingTrailLength
(.short/.regular/.long), custom color.

Run loop upgraded from 100ms to 40ms polling (~25 FPS) to support
smooth animations.
2026-02-02 19:57:58 +01:00
phranck 50825d61da Feat: Structural identity for @State — persistent state across view reconstruction
Implement SwiftUI-style structural identity so @State values survive
full view-tree reconstruction on every render pass. State is keyed by
ViewIdentity (path-based) and property index in a central StateStorage.

- Add ViewIdentity (path-based structural identity for views)
- Add StateStorage with GC and branch invalidation
- Refactor @State to self-hydrate from StateStorage during init
- Set root hydration context in RenderLoop before app.body evaluation
- Extend RenderContext with identity propagation helpers
- Add ConditionalView branch invalidation on switch
- Remove scene cache from RenderLoop (app.body evaluated fresh per frame)
- Enhance Example App pages with @State (ButtonsPage, OverlaysPage, ContainersPage)
- Update DocC articles (StateManagement, RenderCycle)
- Add 12 tests for state storage identity
2026-02-02 18:31:53 +01:00
phranck 1877ae65e6 Refactor: Eliminate AppState singleton via RenderNotifier and constructor injection 2026-02-02 17:31:52 +01:00
phranck 68fcf47637 Refactor: Restrict access levels to minimize public API surface
Systematically audit and restrict public declarations across the entire
framework. Internal plumbing (rendering, registries, framework services)
is now internal/private while the user-facing API remains public.

Categories changed:
- Rendering infrastructure (Renderable, ANSIRenderer, BorderRenderer,
  Terminal, ViewRenderer) → internal
- Framework services (PreferenceStorage, LifecycleManager, TUIContext,
  KeyEventDispatcher) → internal
- Implementation modifier types (OnAppearModifier, OnDisappearModifier,
  TaskModifier, StatusBarItemsModifier, etc.) → internal
- View properties (Text.content, Button.label, Menu.items, etc.) → internal
- Registries (PaletteRegistry, AppearanceRegistry) → internal
- Styling internals (ANSIColor, SemanticColor, GeneratedPalette.Hue,
  BorderStyle block-styles) → internal
- ContainerView/ContainerConfig/ContainerStyle → fully internal
- ThemeManager.items/init → internal
- ViewBuilder glue types properties/inits → internal

Also includes:
- Doc warnings (/// - Important:) on types public only for technical reasons
- DocC landing page and CustomViews article updated for internal types
- All DocC symbol links to internal types converted to code text (0 warnings)
- README test badge updated to 498
- Example app ContainerView usage replaced with Panel

498 tests passing, 0 DocC warnings.
2026-01-31 14:29:39 +01:00
phranck 9f7092d4c8 Refactor: Replace EnvironmentStorage singleton with semantic colors and deprecate @Environment (Phase 6) 2026-01-31 01:13:31 +01:00
phranck 95029184e7 Chore: Rename TUIKit to TUIkit
- Rename module, targets and products in Package.swift
- Rename directories: Sources/TUIkit, TUIkitExample, Tests/TUIkitTests
- Rename files: TUIkit.swift, TUIkit.docc/TUIkit.md
- Update all import statements, module-qualified calls, file headers
- Update doc comments, string literals and DocC articles
- Update CI workflow, README, .swiftlint.yml and markdown docs
- Merge platform badges into single combined badge in README
- Add "Example App auslagern" task to to-dos.md
2026-01-30 20:29:29 +01:00