This PR requires `carton` 0.6.0 that you can install from Homebrew as usual.
To cleanly manage scheduler closures, new `JSScheduler` class is introduced that conforms to OpenCombine's `Scheduler` protocol. I think it will be moved to OpenCombineJS in the future.
* Fix compatibility with JavaScriptKit 0.7
* Formatting update
* Specify `carton` 0.6.0 as a requirement
* Optimize immediate schedule function
* Update formatting
* Update to the latest version of SwiftFormat
This fixes inconsistencies in argument and parameter formatting that we previously had.
* Fix function length in `Path.swift`
* Fix linter warnings
* More formatting cleanups
* Add `StrokeStyle.zero` in the `StaticHTML` module
Removes the `View`-based initializer of `DOMRenderer` which no longer leaves any `public` initializers on it, means we can make it fully internal. `DOMNode` is now internal too, which is great as it was an implementation detail anyway. Corollary, `DefaultApp` is no longer needed.
`Target` was cleaned up is it doesn't need to hold `App` or `Scene` values, now it's just a simple protocol.
I've updated `README.md` to show usage of the `App` protocol in the basic example.
Closes#224.
Adding this module as a dependency, Tokamak users would only need to add a single import regardless of the platform they're targeting. Thus, instead of
```swift
#if canImport(SwiftUI)
import SwiftUI
#else
import TokamakDOM
#endif
```
a single `import TokamakShim` is enough. `TokamakShim` re-exports correct modules based on a target platform.
I've also renamed the `TokamakDemo Native` directory to `NativeDemo` for brevity.
`xcodebuild` output in the `macos_demo_build` job is now passed to `xcpretty` for more readable build logs.
It's not needed there as `ViewBuilder` is smarter now.
The macOS SwiftUI SDK even with Xcode 12 still doesn't have the `@ViewBuilder` attribute on the `View` protocol, so we have to build for iOS on CI to make the native buld pass.
Resolves#167, which wasn't caused by protocol conformance problems, but by infinite recursion in the `_ConditionalContent` implementation of `body`.
Adds assorted formatting fixes, some are apparently caused by the newer `swiftformat` version.
* Add "Modular structure" section to `README.md`
This clarifies the general structure of the `Tokamak` package and lays out "the underscore rules" to indicate "package private" access for symbols that aren't intended for public use.
* Refine wording in the "Modular structure" section
* Add logo to README.md
* Fix header logo layout in README.md
* Increase header logo width to 640px
* Add Jed Fox as a maintainer to README.md
* Update README.md
Co-authored-by: Jed Fox <git@twopointzero.us>
* Text styles and Environment setup for View font
* Text modifiers and demo
* Format Source files
* Fix font-size and add font-family when no Font is specified
* Add TextStyle
* PR fixes
* Format files
* Add note about Text modifiers