All notable changes to JSONDrivenUI will be documented in this file.
- Minimum deployment targets raised to iOS 17.0 / macOS 14.0
- Swift tools version bumped to 5.9
- Kingfisher dependency bumped to 8.0+
ViewPropertiesdefaults changed from hardcoded values tonil(e.g.,foregroundColorno longer defaults to white)Color.init(hex:)is now failable (init?) — returnsnilfor invalid hex instead of whiteViewMaterial,ViewProperties,Values, andViewTypeare nowpublic- Removed
View+Extensions.swift(embedInAnyView()helper)
- Button — with
actionIdfor tap callbacks and optional subview labels - Toggle — on/off switch with
isOndefault state andactionId - TextField — text input with
placeholderand submit callback - NavigationStack — modern navigation container (replaces deprecated NavigationView)
- NavigationLink — push navigation with destination/label subviews
- Color — solid color fill view
- Grid — grid layout container
- GridRow — row within a Grid
backgroundColor— background color (hex)cornerRadius— uses modern.clipShape(.rect(cornerRadius:))APIclipShape— clip tocircle,capsule, orrectangleopacity— transparency (0.0–1.0)shadowRadius,shadowColor,shadowX,shadowY— drop shadowrotation— rotation in degreesblur— Gaussian blurgrayscale— desaturation (0.0–1.0)maxWidth,maxHeight— maximum frame dimensions
accessibilityLabel— VoiceOver labelaccessibilityHint— VoiceOver hintaccessibilityHidden— hide from VoiceOver
- New
ActionCallbacktype alias andonActionparameter onJSONDataView - Buttons, Toggles, and TextFields fire callbacks with their
actionId - Stateful wrappers (
ToggleWrapper,TextFieldWrapper) manage@Stateinternally
@resultBuilder-based DSL for building JSON programmatically- Node types:
VStackNode,HStackNode,ZStackNode,TextNode,ImageNode,ButtonNode,ToggleNode,TextFieldNode,ScrollViewNode,ListNode,GridNode,GridRowNode,NavigationStackNode,NavigationLinkNode,SpacerNode,DividerNode,RectangleNode,CircleNode,ColorNode - Chainable modifiers:
.padding(),.foregroundColor(),.backgroundColor(),.cornerRadius(),.opacity(),.shadow(),.rotation(),.blur(),.grayscale(),.frame(),.maxFrame(),.border(),.clipShape(),.font(),.fontWeight(),.accessibilityLabel(),.accessibilityHint(),.accessibilityHidden() buildJSON()andbuildJSONString()top-level functions
JSONDrivenUIErrorenum with.decodingFailed,.maxDepthExceeded,.fileNotFound- Descriptive error messages in debug builds showing exact decoding failure path
- Generic fallback message in release builds
- Recursion depth limit (max 50 levels) prevents stack overflow
JSONDataView(jsonString:onAction:)initializerViewFactorydepth limiting withmaxDepthconstant
- 6-tab multiplatform demo app (iOS + macOS)
- Basic — Text, Image, SF Symbols layout
- Layout — HStack, VStack, ZStack, Grid, LazyVStack, ScrollView
- Interactive — Button, Toggle, TextField with action callbacks
- Styling — Shadows, corners, opacity, blur, rotation, grayscale
- Navigation — NavigationStack with NavigationLinks
- More — SwiftUI-to-JSON editor (syntax highlighted), Live JSON editor (syntax highlighted), Builder DSL round-trip demo
- 160 unit tests across 11 test files
- Coverage: color parsing, JSON decoding, property defaults, builder DSL, node types, node modifiers, JSON export, view factory, error handling, depth limiting
- Copy-paste error in
ViewFactory: HStack showed "LazyHStack" error message and vice versa ViewPropertiesdefaults were hardcoded (white foreground, red border) — nownilfontWeightdefault was"body"(invalid weight) — nownil- Example app image URLs changed from
http://tohttps://
ViewFactoryannotated with@MainActorfor Kingfisher 8.x compatibilityPresentableProtocolannotated with@MainActor- Model types marked
finaland@unchecked Sendablefor Swift 6 readiness - All model properties made
publicfor external consumers - CI updated to run tests (
swift test -v) on macOS 15 with Xcode 16 - README rewritten with badges, screenshot gallery, organized property tables, and DSL reference
See git history for changes prior to 1.0.0.