Releases: TokamakUI/Tokamak
0.11.1
This is a minor update to fix building from Xcode 14.1 (#528)
What's Changed
- Enable async/await in DOM Fiber renderer by @ahti in #516
- [bug] Missing CoreGraphics import for Swift 5.7.1 / Xcode 14.1 by @gregcotten in #528
New Contributors
- @ahti made their first contribution in #516
- @gregcotten made their first contribution in #528
Full Changelog: 0.11.0...0.11.1
0.11.0
This release adds support for SwiftWasm 5.7. It also includes a new reconciler modeled after React's Fiber reconciler. It can provide faster updates and allow for larger View hierarchies. It also includes layout steps that can match SwiftUI layouts closer than CSS approximations.
You can specify which reconciler to use in your App's configuration:
struct CounterApp: App {
static let _configuration: _AppConfiguration = .init(
// Specify `useDynamicLayout` to enable the layout steps in place of CSS approximations.
reconciler: .fiber(useDynamicLayout: true)
)
var body: some Scene {
WindowGroup("Counter Demo") {
Counter(count: 5, limit: 15)
}
}
}What's Changed
- Experimental "React Fiber"-like Reconciler by @carson-katri in #471
- Support meta tags in StaticHTMLRenderer by @AndrewBarba in #483
- Reenable macOS CI builds, using macOS 12 and Xcode 13.4 by @ezraberch in #484
- Add html5 doctype to static renderer by @AndrewBarba in #486
- Revert "Add html5 doctype to static renderer (#486)" by @MaxDesiatov in #487
- Clarify testing commands in
CONTRIBUTING.mdby @MaxDesiatov in #488 - Support
foregroundColorforTextFieldby @carson-katri in #453 - Custom Layout Engine for Fiber Reconciler by @carson-katri in #472
- Add support for 'Fiber' label in CI by @carson-katri in #493
- Tweak formatting rules for attributes by @MaxDesiatov in #492
- Add configuration options to
Appto choose reconciler by @carson-katri in #495 - Add
_ShapeViewandbackgroundmodifiers support to Fiber renderers by @carson-katri in #491 - Add
_PaddingLayoutsupport to layout engine by @carson-katri in #485 - Add file size to benchmark script by @ezraberch in #496
- Implement
AnyShapeby @filip-sakel in #497 - Fix build and tests for 5.7 toolchain by @kateinoigakukun in #499
- Add
Layoutprotocol for FiberReconciler by @carson-katri in #498 - Support
Imagein Fiber renderers by @carson-katri in #500 - Add support for preferences,
@StateObject,@EnvironmentObject, and customDynamicPropertytypes by @carson-katri in #501 - Allow window resizing in Fiber renderers by @carson-katri in #502
- Use Swift 5.7 nightly on CI, fix build issues by @MaxDesiatov in #507
- Update default assignee in
bug_report.mdby @MaxDesiatov in #510 - Disable GTK macOS builds by @MaxDesiatov in #512
- Fix typos in doc comments across the codebase by @BenedictSt in #513
- Create
FAQ.mdby @MaxDesiatov in #511
New Contributors
- @AndrewBarba made their first contribution in #483
- @BenedictSt made their first contribution in #513
Full Changelog: 0.10.1...0.11.0
0.10.1
This is a small bugfix release, which updates JavaScriptKit dependency to 0.15 and required version of carton to 0.15.
Merged pull requests:
- Update JSKit dependency (#482) via @MaxDesiatov
- Explicitly mention
cartonversion in "Requirements" (#481) via @MaxDesiatov - Use stable
v5.6version ofswiftwasm-action(#477) via @MaxDesiatov
0.10.0
This release adds support for SwiftWasm 5.6. It also updates JavaScriptKit and OpenCombineJS dependencies. Due to issues with support for older SwiftWasm releases in the carton/SwiftPM integration, Tokamak now requires SwiftWasm 5.6 or later, while SwiftWasm 5.4 and 5.5 are no longer supported.
Merged pull requests:
- Build and test with SwiftWasm 5.6 on CI (#475) via @MaxDesiatov
0.9.1
This release fixes an issue with EnvironmentValues, updates CI workflow for SwiftWasm 5.5, and bumps JavaScriptKit dependency to 0.12.0.
Merged pull requests:
- Fix typo (#462) via @regexident
- Fix
rootEnvironmentnot merged with.defaultEnvironment(#461) via @regexident - Build and test with SwiftWasm 5.5 on CI (#460) via @MaxDesiatov
0.9.0
This release adds support for SwiftWasm 5.5 and bumps the minimum required version to Swift 5.4. It now depends on JavaScriptKit 0.11.1, which no longer requires manual memory management of JSClosure instances. The downside of that update is that minimum browser version requirements are significantly higher now. See README.md for more details.
Additionally, a few new features were added to the DOM renderer:
CanvasandTimelineView;onHovermodifier;taskmodifier for runningasyncfunctions;- Sanitizers for
Textview.
Many thanks (in alphabetical order) to @agg23, @carson-katri, @ezraberch, and @mbrandonw for their contributions to this release!
Closed issues:
TextFieldNot Rendering the field (#455)- Can't find
CGSizeorCGFloattype (#450) UnitPointconstants don't match SwiftUI (#443)
Merged pull requests:
- Update for JSKit 0.11.1, add async
taskmodifier (#457) via @MaxDesiatov - Switch to Xcode 13.0 in
gtk_macos_buildjob (#454) via @MaxDesiatov - Add
CanvasandTimelineViewto DOM renderer (#449) via @carson-katri - Initial implementation of
onHover(#448) via @agg23 - Refactor
NavigationView(#446) via @ezraberch - Save HTML snapshots with .html extension. (#447) via @mbrandonw
- Add HTML renderer support for AngularGradient (#444) via @ezraberch
- Bump requirements to Swift 5.4, migrate to
@resultBuilder(#442) via @MaxDesiatov - Add HTML sanitizer to
Text(#437) via @ezraberch - Add
@ezraberchto the list of maintainers (#440) via @MaxDesiatov
0.8.0
This release adds support for more SwiftUI types and modifiers, and fixes bugs. Including, but not limited to:
Toolbartype andtoolbarmodifierProgressViewtypeAnimationand related types and modifiersopacity,scaleEffect,aspectRatio, andcontrolSizemodifiersMaterialandGradienttypesHierarchicalShapeStyle(.primary/.secondary/.tertiary/.quaternary) typeContainerRelativeShapetypespacingargument support for initializers ofHStackandVStack- support for standard Foundation types, such as
CGRect,CGSize(we previously used our own implementation of those, which weren't fully compatible with Foundation) - ability to sort HTML attributes when generating static HTML, which is essential for end-to-end tests that cover generated output.
Many thanks to @carson-katri, @ezraberch, and @yonihemi for their contributions to this release!
Closed issues:
- Is there anyway to compile this from Xcode? (#406)
- Xcode doesn't compile — gtk/gtk.h not found (#405)
- Use
NSGeometrytypes from Foundation (#404) - Adding padding to a view contained in a Button causes the Button to disappear (#403)
- .background modifier with contained shape causes view to expand to full vertical size of the screen (#402)
- Multi-line string handling in Text views (#400)
- Content with spacer jumps when blurring and focusing the page (#395)
- Frame sizes do not match expected behavior. (#387)
- URL hash change demo crashes (#369)
- Infinite loops w/ 100% CPU usage caused by stack overflows (#367)
- TokamakDemo breaks after use of
_domRef(#326) - Add support for
toolbarmodifier and related types (#316)
Merged pull requests:
- Revise
ShapeStyleand addGradients (#435) via @carson-katri - Add
Toolbarimplementation for HTML renderer (#169) via @carson-katri - Fix SwiftLint action (#434) via @ezraberch
- Add View Traits and transitions (#426) via @carson-katri
- Add
ToolbarItemand its builder functions (#430) via @MaxDesiatov - Add
controlSize/controlProminencemodifiers (#431) via @carson-katri - Fix background/overlay layout in DOM/HTML renderers (#429) via @carson-katri
- Add
ProgressView(#425) via @carson-katri - Add support for custom fonts (#421) via @carson-katri
- Animation implementation using the Web Animations API (#427) via @carson-katri
- Add
scaleEffectmodifier (#424) via @carson-katri - Add
aspectRatiomodifier (#422) via @carson-katri - Check minWidth/Height == nil (#420) via @carson-katri
- Add Primary/Secondary/Tertiary/QuaternaryContentStyle (#419) via @carson-katri
- Add
Materialto the HTML renderer (#418) via @carson-katri - Improve ShapeStyles to match iOS 15+ (#417) via @carson-katri
- Add ContainerRelativeShape (#416) via @carson-katri
- Add HTML implementation for
opacitymodifier (#415) via @MaxDesiatov - Support
spacingproperty onHStack/VStack(#273) via @MaxDesiatov - Explicitly import CoreFoundation (#413) via @yonihemi
- Fix handling of stroked shapes (#414) via @ezraberch
- Add a snapshot test for
PathSVG layout (#412) via @MaxDesiatov - Attempt
paddingmodifier fusion to avoid nesteddivs (#253) via @MaxDesiatov - Use
CGFloat,CGPoint,CGRectfrom Foundation (#411) via @MaxDesiatov - Add reconciler stress tests for elaborate testing (#381) via @MaxDesiatov
- Fix spacers after
DOMRenderer.update(#410) via @ezraberch - Replace
ViewDeferredToRenderer, fix renderer tests (#408) via @MaxDesiatov - Allow DOMRenderer to render buttons with non-Text labels (#403) (#409) via @ezraberch
- Sort attributes in HTML nodes when rendering (#346) via @MaxDesiatov
0.7.0
This release introduces new view types such as DatePicker, new modifiers such as shadow, improves test coverage, updates dependencies, and fixes multiple bugs and crashes. Additionally, a proof of concept GTK renderer is now available in the TokamakGTK module.
Many thanks to (in alphabetical order) @carson-katri, @filip-sakel @foscomputerservices, @literalpie, @mattpolzin, @mortenbekditlevsen, and @Snowy1803 for their contributions to this release!
Closed issues:
@ObservedObjectis a get-only property (#392)- What is the difference between
HTMLandDynamicHTML? (#388) - Reduce
View.bodyVisibility (#385) - Verify that type constructor names contain contain module names (#368)
- Crash when using a
Viewwith optional content (#362) - Set up code coverage reports on GitHub Actions (#350)
- Shadow support (#324)
- Implement
DatePickerview in the DOM renderer (#320) TokamakDemobuild failed (#305)
Merged pull requests:
- Add
@dynamicMemberLookuptoBinding(#396) via @carson-katri - Add
DatePickerto theTokamakDOMmodule (#394) via @Snowy1803 - Use
String(reflecting:)vsString(describing:)(#391) via @MaxDesiatov - Clarify the difference between
HTMLandDynamicHTML(#389) via @MaxDesiatov - Add
_spi(TokamakCore)to ideally internal public members (#386) via @filip-sakel - Make properties of
CGPoint,CGSizeandCGRectvars instead oflets (#382) via @mortenbekditlevsen - Use immediate scheduler in
TestRenderer(#380) via @MaxDesiatov - Simple Code Coverage analysis (#378) via @mattpolzin
- Add checks for metadata state (#375) via @MaxDesiatov
- Use upstream OpenCombine instead of a fork (#377) via @MaxDesiatov
- Update JavaScriptKit, OpenCombineJS dependencies (#376) via @MaxDesiatov
- Clean up metadata reflection code (#372) via @MaxDesiatov
- Add David Hunt to the list of maintainers (#373) via @MaxDesiatov
- Refactor environment injection, add a test (#371) via @MaxDesiatov
- Replace uses of the Runtime library with stdlib (#370) via @MaxDesiatov
- Use
macos-latestagent for the GTK build (#360) via @MaxDesiatov - Add a benchmark target and a script to run it (#365) via @MaxDesiatov
- Fix crashes in views with optional content (#364) via @MaxDesiatov
- Add GTK support for
SecureField(#363) via @mortenbekditlevsen - Add support for shadow modifier (#355) via @literalpie
- Two infinite loop fixes (#359) via @foscomputerservices
- Added
TextFieldsupport for GTK usingGtkEntry(#361) via @mortenbekditlevsen - Fixed a small issue with re-renderers being dropped (#356) via @foscomputerservices
- Removed an extra space that cause Safari to issue "Invalid value" (#358) via @foscomputerservices
- Add
@mortenbekditlevsento the list of maintainers inREADME.md(#352) via @MaxDesiatov - Build the GTK renderer on Ubuntu on CI (#347) via @MaxDesiatov
- Add missing
Linkre-export to TokamakDOM (#351) via @MaxDesiatov - GTK shape support WIP (#348) via @mortenbekditlevsen
- Add a "bug report" issue template (#349) via @MaxDesiatov
0.6.1
This release fixes autocomplete in Xcode for projects that depend on Tokamak.
0.6.0
This release introduces support for the Image view, which can load images bundled as SwiftPM resources. It also adds the PreferenceKey protocol and preference(key:value:), onPreferenceChange, backgroundPreferenceValue, transformPreference, and overlayPreferenceValue modifiers. Many thanks to @carson-katri and @j-f1 for implementing this!
Merged pull requests:
- Add @kateinoigakukun to the list of maintainers (#310) via @MaxDesiatov
- Add
Imageimplementation, bump JSKit to 0.9.0 (#155) via @j-f1 - Add Preferences (#307) via @carson-katri
- Remove unused Dangerfile.swift (#311) via @MaxDesiatov