mirror of
https://github.com/phranck/TUIkit.git
synced 2026-05-21 09:50:35 +00:00
d0627bafdc
- Extract View system foundation into new TUIkitView module (Layer 1) - View, ViewBuilder, TupleViews, ViewModifier, PrimitiveViews, EquatableView - Renderable, RenderContext, RenderCache, ChildInfo, SpacerProtocol - State, StateStorage, StateRegistration, HydrationContext - EnvironmentValues, EnvironmentModifier, ViewServiceEnvironment - Introduce SpacerProtocol to decouple ChildInfo from concrete Spacer type - Split ServiceEnvironment.swift (StateStorageKey/RenderCacheKey to TUIkitView) - Add @_exported import TUIkitView in Exports.swift for backward compatibility - Make internal types public for cross-module visibility (Renderable, Layoutable, renderToBuffer, ChildView, ChildInfo, ModifiedView, StateStorage, RenderCache) - Organize TUIkitCore into Rendering/, Environment/, Input/, Extensions/, Concurrency/ - Organize TUIkitStyling into Color/, Theme/, Styles/
21 lines
670 B
Swift
21 lines
670 B
Swift
// 🖥️ TUIKit — Terminal UI Kit for Swift
|
||
// SpacerProtocol.swift
|
||
//
|
||
// Created by LAYERED.work
|
||
// License: MIT
|
||
|
||
/// A protocol for views that act as flexible spacers in layout containers.
|
||
///
|
||
/// This protocol decouples the layout system from the concrete `Spacer` type,
|
||
/// allowing `ChildView` and `ChildInfo` to detect spacer behavior without
|
||
/// depending on a specific view type.
|
||
///
|
||
/// The concrete `Spacer` view conforms to this protocol.
|
||
@MainActor
|
||
public protocol SpacerProtocol {
|
||
/// The minimum length of the spacer (in characters/lines).
|
||
///
|
||
/// If nil, the spacer expands as much as possible.
|
||
var spacerMinLength: Int? { get }
|
||
}
|