Releases: coenttb/swift-html-types
Releases · coenttb/swift-html-types
swift-html-types 0.1.0
What's New in 0.1.0
New Features
- Cols: ExpressibleByIntegerLiteral - Enhanced type safety for column specifications
- BR: HTMLVoidElement - Added line break element support
- Explicit Input extensions - Improved Input element type system
Improvements
- SwiftLint compliance - Comprehensive code formatting and style improvements
- Type fixes - Enhanced type safety for cols/rows attributes
- Code quality - Extensive formatting improvements across the codebase
Documentation
- Updated installation instructions to reference version 0.1.0
- Comprehensive test coverage for HTML element types
This release includes significant enhancements to the type system and code quality while maintaining backward compatibility.
Installation
Swift Package Manager
dependencies: [
.package(url: "https://github.com/coenttb/swift-html-types", from: "0.1.0")
]0.0.1 Initial Release
swift-html-types v0.0.1 - Initial Release
This is the initial release of swift-html-types, a comprehensive, accurate, and type-safe domain model of HTML elements and attributes in Swift.
🚀 Features
- Complete HTML Type Coverage: Comprehensive definitions for HTML elements and attributes with proper type safety
- Foundation Integration: Optional Foundation module for URL safety and enhanced functionality
- Modular Architecture: Six focused modules for different use cases:
HTMLTypes- Core HTML typesHTMLTypesFoundation- Foundation integrationHTMLAttributeTypes- HTML attribute definitionsHTMLAttributeTypesFoundation- Attribute Foundation integrationHTMLElementTypes- HTML element definitionsHTMLElementTypesFoundation- Element Foundation integration
📦 Installation
Swift Package Manager
dependencies: [
.package(url: "https://github.com/coenttb/swift-html-types", from: "0.0.1")
]🔧 Usage
import HTMLTypes
// Create elements with appropriate attributes
let anchor = Anchor(href: "https://example.com")
let input = Input.search(name: "query", placeholder: "Search...")Foundation Integration
import HTMLTypesFoundation
let url: Foundation.URL = .init(...)
let anchor = Anchor(url: url)📊 Package Status
- ✅ Builds successfully on Swift 5.9+
- ✅ Comprehensive test coverage
- ℹ️ Contains deprecation warnings for legacy HTML attributes (intentional, reflecting HTML spec deprecations)
🔗 Related Projects
This package is part of a modular ecosystem for HTML generation in Swift:
- swift-css-types - CSS type definitions
- swift-html - HTML DSL built on these types