refactor: Rename package from SwiftTUI to TUIKit

BREAKING CHANGE: Package name changed due to name collision with
existing rensbreur/SwiftTUI package.

Changes:
- Rename package from SwiftTUI to TUIKit in Package.swift
- Rename Sources/SwiftTUI to Sources/TUIKit
- Rename Sources/SwiftTUIExample to Sources/TUIKitExample
- Rename Tests/SwiftTUITests to Tests/TUIKitTests
- Rename SwiftTUI.swift to TUIKit.swift
- Update all imports: import SwiftTUI -> import TUIKit
- Update all code references: SwiftTUI.renderToBuffer -> TUIKit.renderToBuffer
- Update documentation comments
- Rename swiftTUIVersion to tuiKitVersion

All 181 tests passing.
This commit is contained in:
phranck
2026-01-28 19:32:09 +01:00
parent 44d9d4490e
commit 45e73faafb
65 changed files with 140 additions and 140 deletions
@@ -0,0 +1,40 @@
//
// DemoSection.swift
// TUIKitExample
//
// A reusable section component for organizing demo content.
//
import TUIKit
/// A section with a styled title and content.
///
/// Used to group related demo content with a yellow underlined title.
///
/// # Example
///
/// ```swift
/// DemoSection("Basic Features") {
/// Text("Feature 1")
/// Text("Feature 2")
/// }
/// ```
struct DemoSection<Content: View>: View {
let title: String
let content: Content
init(_ title: String, @ViewBuilder content: () -> Content) {
self.title = title
self.content = content()
}
var body: some View {
VStack(alignment: .leading) {
Text(title)
.bold()
.underline()
.foregroundColor(.yellow)
content
}
}
}
@@ -0,0 +1,50 @@
//
// HeaderView.swift
// TUIKitExample
//
// A reusable header component for demo pages.
//
import TUIKit
/// A styled header with title on the left and version on the right.
///
/// Used at the top of each demo page to provide consistent branding
/// and optional subtitle.
///
/// # Example
///
/// ```swift
/// HeaderView(
/// title: "My Demo",
/// subtitle: "An optional description"
/// )
/// ```
struct HeaderView: View {
let title: String
let subtitle: String?
init(title: String, subtitle: String? = nil) {
self.title = title
self.subtitle = subtitle
}
var body: some View {
VStack {
HStack {
Text(title)
.bold()
.foregroundColor(.cyan)
Spacer()
Text("TUIKit v\(tuiKitVersion)")
.dim()
}
if let sub = subtitle {
Text(sub)
.dim()
.italic()
}
Divider(character: "")
}
}
}