modern-swift-dev/calder-swiftui
Calder contains application utilities for Swift and Apple platforms. The package separates each concern into a small Swift module and keeps Apple UI code out of the foundational targets.
Products
CalderStdLibcontains the small set of Swift type helpers shared by the UI modules.CalderUIKitcontains UIKit and AppKit helpers.CalderSwiftUIcontains SwiftUI values, views, and extensions.CalderThemeprovides reusable themed controls and layouts.
Install
Until the first release is tagged, add the main branch:
dependencies: [
.package(
url: "https://github.com/modern-swift-dev/calder-swiftui.git",
branch: "main"
)
]Then add only the products your target imports:
.product(name: "CalderSwiftUI", package: "calder-swiftui")
.product(name: "CalderTheme", package: "calder-swiftui")Documentation
The Calder documentation site publishes guides and API documentation from main.
The central documentation repository owns Astro, the shared theme, and website/API generation. It builds from main daily and on manual runs. Edit page Markdown in Documentation/Site/ and keep DocC catalogs beside the module sources. See the docs README for local build and preview commands. Do not commit generated HTML to this repository.
Release documentation is a separate archive. Build it locally with:
make documentationThe command creates .build/documentation/Calder-Documentation.zip. Tagged GitHub releases attach that archive.
Pagination
Create PaginatedList.DataSource(items:) to supply a paginated list. Use configureAndLoad(firstPageLoader:nextPageLoader:) to install asynchronous loaders, reload() to refresh, and next() to request another page. The loaded items, count, state, and hasNext are readable by client applications; use the data source's mutation methods to insert, update, or remove items.
The data source and its loaders run on @MainActor. Reloading or clearing it invalidates earlier requests, including outstanding next-page loads. Concurrent requests for the same page are ignored; cancelled requests do not report errors.
PaginatedList.Selection writes every selection or deselection to its binding. Multi-selection remains presented so callers can provide their own dismissal UI; single-selection dismisses after choosing an item.
Development
Install tools and hooks, then run the checks:
make setup
make format
make lint
make testSee CONTRIBUTING.md for platform tests and release details.
Package Metadata
Repository: modern-swift-dev/calder-swiftui
Default branch: main
README: README.md