* Add Image view
* Add image to demo
* Update progress.md
* Alt text
* Use Bundle type to load images, remove systemName
* Add `logo-header.png` resource to `TokamakDemo`
* Reduce image size in the demo
* Allow bundles passed to `Image` to be optional
* Pass `nil` as a default `bundle` to `Image`
Co-authored-by: Max Desiatov <max@desiatov.com>
* Ignore xcodeproj generated by SwiftPM
* Update to use official OpenCombine to avoid Xcode build error
* Use forked version with ObservableObject implementation
* Fix ambigious error
* Ignore SwiftPM edit mode package
* Update toolchain version
Requires #276 to be merged, as earlier versions of JavaScriptKit can't be depended on in macOS builds due to unsafe flags.
* Add Link View
* Add Publish support
* Remove #if checks
* Upgrade swift snapshot
* Try swiftwasm-action@main
* Remove Publish support from this repo
* Remove TokamakPublish target
* Allow tests to be run on macOS
* Update `ci.yml` to build and run the test product
* Trigger CI on all PRs without branch restrictions
* Rename linux_build to swiftwasm_build in ci.yml
Co-authored-by: Carson Katri <carson.katri@gmail.com>
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
This allows specifying 0.3 (to be released after this PR is merged) dependency on Tokamak in `carton` templates, otherwise branch/commit dependencies in our `Package.swift` can't be correctly resolved.
`swift test` is temporarily disabled on macOS as the upstream Swift toolchain doesn't support unsafe flags in the JavaScriptKit dependency together with a `from` constraint. We could run it on Linux, but my OpenCombine fork doesn't support Linux builds yet (logged as #263).
* Use the latest 5.3 snapshot in `.swift-version`
These SwiftWasm snapshots should be more stable in general and also have a workaround for https://github.com/swiftwasm/JavaScriptKit/issues/6 included. They still use the old metadata layout, so Runtime and OpenCombine dependencies had to be updated in `Package.swift` for `@ObservableObject` to work with these snapshots.
* Fix linter warning
This change is required to make Tokamak compatible with `carton` 0.4, which bundles the latest JavaScriptKit runtime. Currently the new runtime and old Swift parts of JavaScriptKit are incompatible with each other, which leads to a white screen when building and running Tokamak from `main` with `carton` 0.4.
It's already a part of a couple of other PRs, but opening this one separately to expedite it as `carton` 0.4 is already released. I haven't announced it widely yet, so I hope we can merge this in quickly to avoid any confusion among our early adopters who try to use Tokamak with the latest version of `carton` 🙂
This pulls a fork of OpenCombine that can be compiled with the same SwiftWasm snapshot we use in `main`.
The only caveat is that this doesn't work for `ObservableObject`s that are subclasses of other classes with `@Published` properties. This issue needs to be fixed in [the Runtime library fork](https://github.com/MaxDesiatov/Runtime). Since this is a rare case, and fixing it wouldn't change this `@ObservedObject` implementation, I think it's ready for review as is.
* Migrate reconciler and AppKit renderer to View API
* Fix building tests, cleanup unused code
* Remove more unused code
* Remove TokamakAppKit, add ParentView/GroupView
* Remove unused code, make testMount pass
* Cleanup more unused code
* Add ValueStorage protocol
* Add getter/setter internal properties on State
* Fix more State test assertions
* Fix all the reconciler tests 🎉